Nessuna descrizione

index.js.map 190KB

1
  1. {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./src/renderer/SvgHelper/index.ts","webpack:///./src/utils/uuid.ts","webpack:///./src/markers/RectMarker/RectBaseMarker.ts","webpack:///./src/markers/BaseMarker/index.ts","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/style-loader/lib/addStyles.js","webpack:///./src/board/Drawboard/index.ts","webpack:///./node_modules/uuid/v1.js","webpack:///./src/markers/RectMarker/index.ts","webpack:///./src/markers/RectangularMarker/index.ts","webpack:///./src/markers/BaseMarker/ResizeGrip.ts","webpack:///./src/markers/CoverMarker/index.ts","webpack:///./src/markers/TextMarker/index.ts","webpack:///./src/assets/check.svg","webpack:///./src/assets/times.svg","webpack:///./src/markers/ArrowMarker/index.ts","webpack:///./src/markers/LinearMarker/index.ts","webpack:///./src/markers/HighlightMarker/index.ts","webpack:///./src/markers/LineMarker/index.ts","webpack:///./src/utils/dom.ts","webpack:///./src/index.ts","webpack:///./src/board/Baseboard/index.ts","webpack:///./node_modules/uuid/lib/rng-browser.js","webpack:///./node_modules/uuid/lib/bytesToUuid.js","webpack:///./src/toolbar/toolbar-items.ts","webpack:///./src/markers/RectangularMarker/RectangularMarkerGrips.ts","webpack:///./src/toolbar/ToolbarItem.ts","webpack:///./src/assets/eraser.svg","webpack:///./src/assets/mouse-pointer.svg","webpack:///./src/assets/highlight.svg","webpack:///./src/assets/arrow.svg","webpack:///./src/assets/text.svg","webpack:///./src/assets/cover.svg","webpack:///./src/assets/rect.svg","webpack:///./src/assets/line.svg","webpack:///./src/renderer/Synthetizer/index.ts","webpack:///./src/utils/validator.ts","webpack:///./src/toolbar/Toolbar.ts","webpack:///./src/toolbar/ToolbarButton.ts","webpack:///./src/board/Drawboard/index.less?cc39","webpack:///./src/board/Drawboard/index.less","webpack:///./node_modules/style-loader/lib/urls.js","webpack:///./src/board/Whiteboard/index.ts","webpack:///./node_modules/siema/dist/siema.min.js","webpack:///./src/board/WhitePage/index.ts","webpack:///./src/markers/types.ts","webpack:///./src/board/WhitePage/index.less?8082","webpack:///./src/board/WhitePage/index.less","webpack:///./src/board/Whiteboard/index.less?74a2","webpack:///./src/board/Whiteboard/index.less","webpack:///./src/assets/bx-left-arrow.svg","webpack:///./src/assets/bx-right-arrow.svg"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","SvgHelper","createRect","width","height","attributes","rect","document","createElementNS","setAttribute","toString","setAttributes","createLine","x1","y1","x2","y2","line","createPolygon","points","polygon","createCircle","radius","circle","createGroup","g","el","_i","attributes_1","length","_a","attr","createTransform","createSVGTransform","createDefs","createMarker","id","orient","markerWidth","markerHeight","refX","refY","markerElement","marker","appendChild","createText","text","createTSpan","tspan","textContent","uuidV1","uuid","SvgHelper_1","RectBaseMarker","_super","__extends","setup","this","markerRect","addToRenderVisual","resize","x","y","onPosition","page","RectangularMarker","BaseMarker","_this","type","onChange","defs","isActive","isDragging","isResizing","previousMouseX","previousMouseY","manipulate","ev","scale","visual","getScreenCTM","dx","screenX","dy","screenY","target","event","data","move","pos","addToVisual","renderVisual","mouseDown","stopPropagation","select","mouseUp","endManipulation","mouseMove","translate","transform","baseVal","getItem","setMatrix","matrix","replaceItem","reactToManipulation","resizeByEvent","onSelected","deselect","appendItem","addEventListener","onTouch","passive","cb","preventDefault","newEvt","createEvent","touch","changedTouches","initMouseEvent","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","dispatchEvent","useSourceMap","list","map","item","content","cssMapping","btoa","sourceMapping","sourceMap","unescape","encodeURIComponent","JSON","stringify","sourceURLs","sources","source","sourceRoot","concat","join","cssWithMappingToString","mediaQuery","alreadyImportedModules","push","fn","memo","stylesInDom","isOldIE","all","atob","apply","arguments","getElement","parent","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","e","singleton","singletonCounter","stylesInsertedAtTop","fixUrls","addStylesToDom","styles","options","domStyle","refs","j","parts","addStyle","listToStyles","newStyles","base","part","css","media","insertStyleElement","style","insertInto","Error","lastStyleElementInsertedAtTop","insertAt","nextSibling","insertBefore","firstChild","before","removeStyleElement","parentNode","removeChild","idx","indexOf","splice","createStyleElement","createElement","undefined","attrs","nonce","nc","getNonce","addAttrs","keys","forEach","obj","update","remove","result","default","styleIndex","applyToSingletonTag","URL","createObjectURL","revokeObjectURL","Blob","link","rel","createLinkElement","autoFixUrls","convertToAbsoluteUrls","blob","oldSrc","href","styleSheet","cssText","createTextNode","newObj","DEBUG","newList","mayRemove","textStore","replaceText","index","replacement","filter","Boolean","cssNode","childNodes","index_1","toolbar_items_1","Synthetizer_1","Toolbar_1","Drawboard","_b","onComplete","open","onCancel","setTargetRect","initBoard","attachEvents","setStyles","adjustUI","showUI","hide","imgSrc","display","boardHolder","visibility","zIndex","toolbar","show","close","toolbarUI","body","boardCanvas","render","selectMarker","startRender","renderFinished","addMarker","markerType","getElementById","parentId","markers","bbox","getBBox","deleteActiveMarker","activeMarker","deleteMarker","targetRect","getBoundingClientRect","bodyRect","parentElement","left","top","done","Synthetizer","rasterize","buttons","adjustSize","positionUI","clientWidth","clientHeight","positionBoard","positionToolbar","offsetWidth","Toolbar","toolbars","toolbarClick","getUI","position","editorStyleSheet","innerHTML","toolbarItem","cancel","complete","renderFinishedClose","dataUrl","getToolbars","Baseboard","_nodeId","_clockseq","rng","bytesToUuid","_lastMSecs","_lastNSecs","buf","offset","b","node","clockseq","seedBytes","msecs","Date","getTime","nsecs","dt","tl","tmh","RectBaseMarker_1","RectMarker","RectangularMarkerGrips_1","BaseMarker_1","ResizeGrip_1","MIN_SIZE","CB_DISTANCE","addControlBox","controlBox","setTranslate","controlRect","controlGrips","RectangularMarkerGrips","addControlGrips","adjustControlBox","positionGrips","topLeft","createGrip","topCenter","topRight","centerLeft","centerRight","bottomLeft","bottomCenter","bottomRight","grip","ResizeGrip","gripMouseDown","gripMouseMove","gripMouseUp","gripSize","GRIP_SIZE","cx","cy","bottom","right","positionGrip","activeGrip","findGripByVisual","translateX","translateY","CoverMarker","RectangularMarker_1","OkIcon","CancelIcon","TextMarker","DEFAULT_TEXT","inDoubleTap","renderText","textElement","lastChild","lines_1","split","trim","setTimeout","sizeText","textSize","xScale","yScale","Math","min","setScale","onDblClick","showEditor","onTap","editor","className","editorTextArea","onEditorKeyDown","okButton","onEditorOkClick","cancelButton","closeEditor","setText","LinearMarker_1","ArrowMarker","ARROW_SIZE","tip","markerLine","LinearMarker","MIN_LENGTH","getLineLength","abs","sqrt","pow","movementX","movementY","markerBgLine","HighlightMarker","LineMarker","addClassName","ele","createDivWithClassName","Drawboard_1","Whiteboard_1","Whiteboard","uuid_1","setProperty","transformOrigin","imgEle","getRandomValues","crypto","msCrypto","rnds8","Uint8Array","rnds","Array","random","byteToHex","substr","bth","index_2","index_3","index_4","index_5","ToolbarItem_1","LineMarker_1","DeleteIcon","PointerIcon","CloseIcon","highlightMarkerToolbarItem","ToolbarItem","tooltipText","icon","arrowMarkerToolbarItem","textMarkerToolbarItem","coverMarkerToolbarItem","rectMarkerToolbarItem","lineMarkerToolbarItem","gripVisual","validator_1","markerImage","isHTMLImageElement","canvas","outerHTML","ctx","getContext","drawImage","DOMURL","img","Image","url","onload","toDataURL","src","HTMLImageElement","ToolbarButton_1","toolbarItems","clickHandler","toolbarButton","ToolbarButton","div","title","innerText","hmr","locals","location","baseUrl","protocol","host","currentDir","pathname","replace","fullMatch","origUrl","newUrl","unquotedOrigUrl","$1","test","Siema","dom_1","LeftArrowIcon","RightArrowIcon","prefix","SerializableWhiteboard","eventHub","visiblePageIndex","isFullscreen","pages","isInitialized","init","emitInterval","clearInterval","activePage","snap","pageIds","imgsContainer","pagesContainer","initMaster","emitSnapshot","initMirror","WhitePage","parentContainer","container","initSiema","controller","prevEle","nextEle","nextPageIndex","onPageChange","on","onSnapshot","alt","siema","selector","duration","easing","perPage","startIndex","draggable","multipleDrag","threshold","loop","rtl","goTo","emit","innerFunc","setInterval","opacity","self","configurable","iterator","constructor","writable","TypeError","config","mergeSettings","resolveSlidesNumber","selectorWidth","innerElements","slice","children","currentSlide","max","transformProperty","webkitOrNot","resizeHandler","pointerDown","drag","startX","endX","startY","letItGo","preventClick","touchstartHandler","touchendHandler","touchmoveHandler","mousedownHandler","mouseupHandler","mouseleaveHandler","mousemoveHandler","removeEventListener","overflow","direction","buildSliderFrame","onInit","sliderFrame","enableTransition","cursor","createDocumentFragment","buildSliderFrameItem","cloneNode","slideToCurrent","cssFloat","float","innerWidth","disableTransition","webkitTransition","transition","requestAnimationFrame","ceil","prev","next","nodeName","touches","pageX","pageY","updateAfterDrag","clearDrag","insert","detachEvents","removeAttribute","documentElement","types_1","initSource","drawboard","onPageSync","onMarkerSync","console","warn","markerMap","getMarkerByType","CoverMarker_1","RectMarker_1"],"mappings":"CAAA,SAAAA,EAAAC,GACA,oBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,SACA,sBAAAG,eAAAC,IACAD,OAAA,GAAAH,OACA,CACA,IAAAK,EAAAL,IACA,QAAAM,KAAAD,GAAA,iBAAAJ,gBAAAF,GAAAO,GAAAD,EAAAC,IAPA,CASCC,OAAA,WACD,mBCTA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAT,QAGA,IAAAC,EAAAM,EAAAE,GAAA,CACAJ,EAAAI,EACAC,GAAA,EACAV,QAAA,IAUA,OANAW,EAAAF,GAAAG,KAAAX,EAAAD,QAAAC,IAAAD,QAAAQ,GAGAP,EAAAS,GAAA,EAGAT,EAAAD,QA0DA,OArDAQ,EAAAK,EAAAF,EAGAH,EAAAM,EAAAP,EAGAC,EAAAO,EAAA,SAAAf,EAAAgB,EAAAC,GACAT,EAAAU,EAAAlB,EAAAgB,IACAG,OAAAC,eAAApB,EAAAgB,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,IAAK,OACH,OAAOsC,EAAA9X,WACT,IAAK,QACH,OAAOijB,EAAA3P,YACT,IAAK,YACH,OAAOpI,EAAAmL,gBACT,IAAK,OACH,OAAO4B,EAAA3B,WACT,IAAK,OACH,OAAO4M,EAAApS,WACT,IAAK,OACH,OAAO8G,EAAAlE,WACT,QACE,OAAOoE,EAAA9X,8BC1Bb,IAAAiE,EAAcnK,EAAQ,IAEtB,iBAAAmK,MAAA,EAA4C1K,EAAAI,EAASsK,EAAA,MAOrD,IAAAyC,EAAA,CAAe6T,KAAA,EAEftY,eAPAA,EAQAuF,gBAAAgB,GAEa1O,EAAQ,EAARA,CAA8DmK,EAAAyC,GAE3EzC,EAAAuW,SAAAjhB,EAAAD,QAAA2K,EAAAuW,0BCjBAjhB,EAAAD,QAA2BQ,EAAQ,EAARA,EAA8D,IAEzFqL,KAAA,CAAc5L,EAAAI,EAAS,wDAAsD,sBCD7E,IAAAsK,EAAcnK,EAAQ,IAEtB,iBAAAmK,MAAA,EAA4C1K,EAAAI,EAASsK,EAAA,MAOrD,IAAAyC,EAAA,CAAe6T,KAAA,EAEftY,eAPAA,EAQAuF,gBAAAgB,GAEa1O,EAAQ,EAARA,CAA8DmK,EAAAyC,GAE3EzC,EAAAuW,SAAAjhB,EAAAD,QAAA2K,EAAAuW,0BCjBAjhB,EAAAD,QAA2BQ,EAAQ,EAARA,EAA8D,IAEzFqL,KAAA,CAAc5L,EAAAI,EAAS,sqBAAoqB,oBCF3rBJ,EAAAD,QAAA,mjBCAAC,EAAAD,QAAA","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 20);\n","export class SvgHelper {\n public static createRect = (\n width: number | string,\n height: number | string,\n attributes?: Array<[string, string]>\n ): SVGRectElement => {\n const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n\n rect.setAttribute('width', width.toString());\n rect.setAttribute('height', height.toString());\n if (attributes) {\n SvgHelper.setAttributes(rect, attributes);\n }\n\n return rect;\n };\n\n public static createLine = (\n x1: number | string,\n y1: number | string,\n x2: number | string,\n y2: number | string,\n attributes?: Array<[string, string]>\n ): SVGLineElement => {\n const line = document.createElementNS('http://www.w3.org/2000/svg', 'line');\n\n line.setAttribute('x1', x1.toString());\n line.setAttribute('y1', y1.toString());\n line.setAttribute('x2', x2.toString());\n line.setAttribute('y2', y2.toString());\n if (attributes) {\n SvgHelper.setAttributes(line, attributes);\n }\n\n return line;\n };\n\n public static createPolygon = (\n points: string,\n attributes?: Array<[string, string]>\n ): SVGPolygonElement => {\n const polygon = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');\n\n polygon.setAttribute('points', points);\n if (attributes) {\n SvgHelper.setAttributes(polygon, attributes);\n }\n\n return polygon;\n };\n\n public static createCircle = (\n radius: number,\n attributes?: Array<[string, string]>\n ): SVGCircleElement => {\n const circle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');\n\n circle.setAttribute('cx', (radius / 2).toString());\n circle.setAttribute('cy', (radius / 2).toString());\n circle.setAttribute('r', radius.toString());\n if (attributes) {\n SvgHelper.setAttributes(circle, attributes);\n }\n\n return circle;\n };\n\n public static createGroup = (attributes?: Array<[string, string]>): SVGGElement => {\n const g = document.createElementNS('http://www.w3.org/2000/svg', 'g');\n if (attributes) {\n SvgHelper.setAttributes(g, attributes);\n }\n return g;\n };\n\n public static setAttributes = (el: SVGElement, attributes: Array<[string, string]>) => {\n for (const [attr, value] of attributes) {\n el.setAttribute(attr, value);\n }\n };\n\n public static createTransform = (): SVGTransform => {\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\n return svg.createSVGTransform();\n };\n\n public static createDefs = (): SVGDefsElement => {\n const defs = document.createElementNS('http://www.w3.org/2000/svg', 'defs');\n\n return defs;\n };\n\n public static createMarker = (\n id: string,\n orient: string,\n markerWidth: number | string,\n markerHeight: number | string,\n refX: number | string,\n refY: number | string,\n markerElement: SVGGraphicsElement\n ): SVGMarkerElement => {\n const marker = document.createElementNS('http://www.w3.org/2000/svg', 'marker');\n SvgHelper.setAttributes(marker, [\n ['id', id],\n ['orient', orient],\n ['markerWidth', markerWidth.toString()],\n ['markerHeight', markerHeight.toString()],\n ['refX', refX.toString()],\n ['refY', refY.toString()]\n ]);\n\n marker.appendChild(markerElement);\n\n return marker;\n };\n\n public static createText = (attributes?: Array<[string, string]>): SVGTextElement => {\n const text = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n text.setAttribute('x', '0');\n text.setAttribute('y', '0');\n\n if (attributes) {\n SvgHelper.setAttributes(text, attributes);\n }\n\n return text;\n };\n\n public static createTSpan = (\n text: string,\n attributes?: Array<[string, string]>\n ): SVGTSpanElement => {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.textContent = text;\n\n if (attributes) {\n SvgHelper.setAttributes(tspan, attributes);\n }\n\n return tspan;\n };\n}\n","import * as uuidV1 from 'uuid/v1';\n\nexport const uuid = uuidV1;\n","import { PositionType } from '../../event/Event';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { RectangularMarker } from '../RectangularMarker';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class RectBaseMarker extends RectangularMarker {\n public static createMarker = (page?: WhitePage): RectBaseMarker => {\n const marker = new RectBaseMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n private markerRect: SVGRectElement;\n\n protected setup() {\n super.setup();\n\n this.markerRect = SvgHelper.createRect(this.width, this.height);\n this.addToRenderVisual(this.markerRect);\n }\n\n protected resize(x: number, y: number, onPosition?: (pos: PositionType) => void) {\n super.resize(x, y, onPosition);\n this.markerRect.setAttribute('width', this.width.toString());\n this.markerRect.setAttribute('height', this.height.toString());\n }\n}\n","import { WhitePage } from './../../board/WhitePage/index';\nimport { PositionType } from '../../event/Event';\nimport { onSyncFunc, EventType } from '../../event/Event';\nimport { MarkerType } from '../types';\nimport * as uuid from 'uuid/v1';\nimport { SvgHelper } from '../../renderer/SvgHelper';\n\nexport class BaseMarker {\n id: string = uuid();\n type: MarkerType = 'base';\n // 归属的\n page?: WhitePage;\n // Marker 的属性发生变化后的回调\n onChange: onSyncFunc = () => {};\n\n public static createMarker = (page?: WhitePage): BaseMarker => {\n const marker = new BaseMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n public visual: SVGGElement;\n public renderVisual: SVGGElement;\n\n public onSelected: (marker: BaseMarker) => void;\n\n public defs: SVGElement[] = [];\n\n protected width: number = 200;\n protected height: number = 50;\n\n protected isActive: boolean = true;\n protected isDragging: boolean = false;\n protected isResizing: boolean = false;\n\n protected previousMouseX: number = 0;\n protected previousMouseY: number = 0;\n\n public reactToManipulation(\n type: EventType,\n { dx, dy, pos }: { dx: number; dy: number; pos: PositionType }\n ) {\n if (type === 'move') {\n this.move(dx, dy);\n }\n\n if (type === 'resize') {\n this.resizeByEvent(dx, dy, pos);\n }\n }\n\n /** 响应元素视图状态变化 */\n public manipulate = (ev: MouseEvent) => {\n const scale = this.visual.getScreenCTM()!.a;\n const dx = (ev.screenX - this.previousMouseX) / scale;\n const dy = (ev.screenY - this.previousMouseY) / scale;\n\n if (this.isDragging) {\n this.onChange({ target: 'marker', id: this.id, event: 'move', data: { dx, dy } });\n this.move(dx, dy);\n }\n\n if (this.isResizing) {\n this.resize(dx, dy, (pos: PositionType) => {\n this.onChange({ target: 'marker', id: this.id, event: 'resize', data: { dx, dy, pos } });\n });\n }\n\n this.previousMouseX = ev.screenX;\n this.previousMouseY = ev.screenY;\n };\n\n public endManipulation() {\n this.isDragging = false;\n this.isResizing = false;\n }\n\n public select() {\n this.isActive = true;\n if (this.onSelected) {\n this.onSelected(this);\n }\n return;\n }\n\n public deselect() {\n this.isActive = false;\n this.endManipulation();\n return;\n }\n\n protected setup() {\n this.visual = SvgHelper.createGroup();\n // translate\n this.visual.transform.baseVal.appendItem(SvgHelper.createTransform());\n\n this.visual.addEventListener('mousedown', this.mouseDown);\n this.visual.addEventListener('mouseup', this.mouseUp);\n this.visual.addEventListener('mousemove', this.mouseMove);\n\n this.visual.addEventListener('touchstart', this.onTouch, { passive: false });\n this.visual.addEventListener('touchend', this.onTouch, { passive: false });\n this.visual.addEventListener('touchmove', this.onTouch, { passive: false });\n\n this.renderVisual = SvgHelper.createGroup([['class', 'render-visual']]);\n this.visual.appendChild(this.renderVisual);\n }\n\n protected addToVisual = (el: SVGElement) => {\n this.visual.appendChild(el);\n };\n\n protected addToRenderVisual = (el: SVGElement) => {\n this.renderVisual.appendChild(el);\n };\n\n protected resize(x: number, y: number, cb?: Function) {\n return;\n }\n protected resizeByEvent(x: number, y: number, pos?: PositionType) {\n return;\n }\n\n /** 截获 Touch 事件,并且转发为 Mouse 事件 */\n protected onTouch(ev: TouchEvent) {\n ev.preventDefault();\n const newEvt = document.createEvent('MouseEvents');\n const touch = ev.changedTouches[0];\n let type = null;\n\n switch (ev.type) {\n case 'touchstart':\n type = 'mousedown';\n break;\n case 'touchmove':\n type = 'mousemove';\n break;\n case 'touchend':\n type = 'mouseup';\n break;\n default:\n break;\n }\n\n newEvt.initMouseEvent(\n type!,\n true,\n true,\n window,\n 0,\n touch.screenX,\n touch.screenY,\n touch.clientX,\n touch.clientY,\n ev.ctrlKey,\n ev.altKey,\n ev.shiftKey,\n ev.metaKey,\n 0,\n null\n );\n\n ev.target!.dispatchEvent(newEvt);\n }\n\n private mouseDown = (ev: MouseEvent) => {\n ev.stopPropagation();\n\n if (this.page && this.page.mode === 'mirror') {\n return;\n }\n\n this.select();\n this.isDragging = true;\n this.previousMouseX = ev.screenX;\n this.previousMouseY = ev.screenY;\n };\n\n private mouseUp = (ev: MouseEvent) => {\n ev.stopPropagation();\n this.endManipulation();\n };\n\n private mouseMove = (ev: MouseEvent) => {\n ev.stopPropagation();\n this.manipulate(ev);\n };\n\n private move = (dx: number, dy: number) => {\n const translate = this.visual.transform.baseVal.getItem(0);\n translate.setMatrix(translate.matrix.translate(dx, dy));\n this.visual.transform.baseVal.replaceItem(translate, 0);\n };\n}\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return '@media ' + item[2] + '{' + content + '}';\n } else {\n return content;\n }\n }).join('');\n }; // import a list of modules into the list\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (i = 0; i < modules.length; i++) {\n var item = modules[i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || '';\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n return '/*# ' + data + ' */';\n}","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target, parent) {\n if (parent){\n return parent.querySelector(target);\n }\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target, parent) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target, parent);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = require(\"./urls\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== \"boolean\") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n if (!options.insertInto) options.insertInto = \"head\";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = \"bottom\";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === \"top\") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === \"bottom\") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === \"object\" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertAt.before, target);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error(\"[Style Loader]\\n\\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\\n Must be 'top', 'bottom', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n\");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement(\"style\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\n\tif(options.attrs.nonce === undefined) {\n\t\tvar nonce = getNonce();\n\t\tif (nonce) {\n\t\t\toptions.attrs.nonce = nonce;\n\t\t}\n\t}\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement(\"link\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\toptions.attrs.rel = \"stylesheet\";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction getNonce() {\n\tif (typeof __webpack_nonce__ === 'undefined') {\n\t\treturn null;\n\t}\n\n\treturn __webpack_nonce__;\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t result = typeof options.transform === 'function'\n\t\t ? options.transform(obj.css) \n\t\t : options.transform.default(obj.css);\n\n\t if (result) {\n\t \t// If transform returns a value, use that instead of the original css.\n\t \t// This allows running runtime transformations on the css.\n\t \tobj.css = result;\n\t } else {\n\t \t// If the transform function returns a falsy value, don't add this css.\n\t \t// This allows conditional loading of css\n\t \treturn function() {\n\t \t\t// noop\n\t \t};\n\t }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === \"function\" &&\n\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\ttypeof Blob === \"function\" &&\n\t\ttypeof btoa === \"function\"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join('\\n');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? \"\" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute(\"media\", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn't defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default. Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t}\n\n\tvar blob = new Blob([css], { type: \"text/css\" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n","import { WhitePageSource } from './../types';\nimport { Baseboard } from './../Baseboard/index';\nimport { BaseMarker } from './../../markers/BaseMarker/index';\nimport { getToolbars } from './../../toolbar/toolbar-items';\nimport { WhitePage } from './../WhitePage/index';\nimport { onSyncFunc } from './../../event/Event';\n\nimport { Synthetizer } from '../../renderer/Synthetizer';\nimport { Toolbar } from '../../toolbar/Toolbar';\nimport { ToolbarItem } from '../../toolbar/ToolbarItem';\n\nimport './index.less';\n\nexport class Drawboard extends Baseboard {\n /** Options */\n private scale = 1.0;\n\n /** 句柄 */\n page: WhitePage;\n\n private markers: BaseMarker[];\n get markerMap(): { [key: string]: BaseMarker } {\n const map = {};\n this.markers.forEach(marker => {\n map[marker.id] = marker;\n });\n return map;\n }\n private activeMarker: BaseMarker | null;\n\n private toolbar: Toolbar;\n private toolbars: ToolbarItem[];\n private toolbarUI: HTMLElement;\n\n /** 回调 */\n private onComplete: (dataUrl: string) => void = () => {};\n private onChange: onSyncFunc = () => {};\n private onCancel: () => void;\n\n constructor(\n source: WhitePageSource,\n { page, onChange }: { page?: WhitePage; onChange?: onSyncFunc } = {}\n ) {\n super(source);\n\n if (page) {\n this.page = page;\n }\n\n this.markers = [];\n this.activeMarker = null;\n this.toolbars = getToolbars(page);\n\n if (onChange) {\n this.onChange = onChange;\n }\n }\n\n /** @region LifeCycle open - hide - show - ... - close */\n /** 打开画板 */\n public open = (onComplete?: (dataUrl: string) => void, onCancel?: () => void) => {\n if (onComplete) {\n this.onComplete = onComplete;\n }\n\n if (onCancel) {\n this.onCancel = onCancel;\n }\n\n this.setTargetRect();\n\n this.initBoard();\n this.attachEvents();\n this.setStyles();\n\n window.addEventListener('resize', this.adjustUI);\n\n if (this.page.mode === 'master') {\n this.showUI();\n }\n };\n\n public hide = () => {\n if (this.source.imgSrc) {\n this.target.style.display = 'none';\n }\n // 这里不使用 display:none,是为了保证在隐藏时候仍然可以执行更新\n this.boardHolder.style.visibility = 'hidden';\n this.boardHolder.style.zIndex = '-1';\n\n if (this.toolbar) {\n this.toolbar.hide();\n }\n };\n\n public show = () => {\n if (this.source.imgSrc) {\n this.target.style.display = 'block';\n }\n\n this.boardHolder.style.visibility = 'visible';\n this.boardHolder.style.zIndex = '9999';\n\n if (this.toolbar) {\n this.toolbar.show();\n }\n };\n\n public close = () => {\n if (this.toolbarUI) {\n document.body.removeChild(this.toolbarUI);\n }\n if (this.boardCanvas) {\n document.body.removeChild(this.boardHolder);\n }\n };\n\n public render = (onComplete: (dataUrl: string) => void, onCancel?: () => void) => {\n this.onComplete = onComplete;\n\n if (onCancel) {\n this.onCancel = onCancel;\n }\n\n this.selectMarker(null);\n this.startRender(this.renderFinished);\n };\n\n public addMarker = (markerType: typeof BaseMarker, { id }: { id?: string } = {}) => {\n // 假如 Drawboard 存在 Page 引用,则传导给 Marker\n const marker = markerType.createMarker(this.page);\n\n if (id) {\n marker.id = id;\n }\n\n marker.onSelected = this.selectMarker;\n marker.onChange = this.onChange;\n\n if (marker.defs && marker.defs.length > 0) {\n for (const d of marker.defs) {\n if (d.id && !this.boardCanvas.getElementById(d.id)) {\n this.defs.appendChild(d);\n }\n }\n }\n\n // 触发事件流\n this.onChange({\n target: 'marker',\n parentId: this.page ? this.page.id : this.id,\n event: 'add',\n data: { type: marker.type, id: marker.id }\n });\n\n this.markers.push(marker);\n\n this.selectMarker(marker);\n\n this.boardCanvas.appendChild(marker.visual);\n\n const bbox = marker.visual.getBBox();\n const x = this.width / 2 / this.scale - bbox.width / 2;\n const y = this.height / 2 / this.scale - bbox.height / 2;\n\n const translate = marker.visual.transform.baseVal.getItem(0);\n translate.setMatrix(translate.matrix.translate(x, y));\n marker.visual.transform.baseVal.replaceItem(translate, 0);\n };\n\n public deleteActiveMarker = () => {\n if (this.activeMarker) {\n // 触发事件\n if (this.onChange) {\n this.onChange({\n event: 'remove',\n id: this.activeMarker.id,\n target: 'marker',\n data: { id: this.activeMarker.id }\n });\n }\n this.deleteMarker(this.activeMarker);\n }\n };\n\n private setTargetRect = () => {\n const targetRect = this.target.getBoundingClientRect() as DOMRect;\n const bodyRect = document.body.parentElement!.getBoundingClientRect();\n this.targetRect = {\n left: targetRect.left - bodyRect.left,\n top: targetRect.top - bodyRect.top\n } as ClientRect;\n };\n\n private startRender = (done: (dataUrl: string) => void) => {\n const renderer = new Synthetizer();\n renderer.rasterize(this.target, this.boardCanvas, done);\n };\n\n private attachEvents = () => {\n this.boardCanvas.addEventListener('mousedown', this.mouseDown);\n this.boardCanvas.addEventListener('mousemove', this.mouseMove);\n this.boardCanvas.addEventListener('mouseup', this.mouseUp);\n };\n\n private mouseDown = (ev: MouseEvent) => {\n /* tslint:disable:no-bitwise */\n if (this.activeMarker && (ev.buttons & 1) > 0) {\n this.activeMarker.deselect();\n this.activeMarker = null;\n }\n };\n\n private mouseMove = (ev: MouseEvent) => {\n /* tslint:disable:no-bitwise */\n if (this.activeMarker && (ev.buttons & 1) > 0) {\n this.activeMarker.manipulate(ev);\n }\n };\n\n private mouseUp = (ev: MouseEvent) => {\n if (this.activeMarker) {\n this.activeMarker.endManipulation();\n }\n };\n\n private adjustUI = (ev: UIEvent) => {\n this.adjustSize();\n this.positionUI();\n };\n\n private adjustSize = () => {\n this.width = this.target.clientWidth;\n this.height = this.target.clientHeight;\n\n const scale = this.target.clientWidth / this.boardHolder.clientWidth;\n if (scale !== 1.0) {\n this.scale *= scale;\n this.boardHolder.style.width = `${this.width}px`;\n this.boardHolder.style.height = `${this.height}px`;\n\n this.boardHolder.style.transform = `scale(${this.scale})`;\n }\n };\n\n private positionUI = () => {\n this.setTargetRect();\n this.positionBoard();\n this.positionToolbar();\n };\n\n private positionToolbar = () => {\n this.toolbarUI.style.left = `${this.targetRect.left +\n this.target.offsetWidth -\n this.toolbarUI.clientWidth}px`;\n this.toolbarUI.style.top = `${this.targetRect.top - this.toolbarUI.clientHeight}px`;\n };\n\n private showUI = () => {\n this.toolbar = new Toolbar(this.toolbars, this.toolbarClick);\n this.toolbarUI = this.toolbar.getUI();\n document.body.appendChild(this.toolbarUI);\n this.toolbarUI.style.position = 'absolute';\n this.positionToolbar();\n };\n\n private setStyles = () => {\n const editorStyleSheet = document.createElementNS('http://www.w3.org/2000/svg', 'style');\n editorStyleSheet.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 `;\n\n this.boardCanvas.appendChild(editorStyleSheet);\n };\n\n private toolbarClick = (ev: MouseEvent, toolbarItem: ToolbarItem) => {\n if (toolbarItem.markerType) {\n this.addMarker(toolbarItem.markerType);\n } else {\n // command button\n switch (toolbarItem.name) {\n case 'delete': {\n this.deleteActiveMarker();\n break;\n }\n case 'pointer': {\n if (this.activeMarker) {\n this.selectMarker(null);\n }\n break;\n }\n case 'close': {\n this.cancel();\n break;\n }\n case 'ok': {\n this.complete();\n break;\n }\n default:\n break;\n }\n }\n };\n\n private selectMarker = (marker: BaseMarker | null) => {\n if (this.activeMarker && this.activeMarker !== marker) {\n this.activeMarker.deselect();\n }\n this.activeMarker = marker;\n };\n\n public deleteMarker = (marker: BaseMarker) => {\n this.boardCanvas.removeChild(marker.visual);\n if (this.activeMarker === marker) {\n this.activeMarker = null;\n }\n this.markers.splice(this.markers.indexOf(marker), 1);\n };\n\n private complete = () => {\n this.selectMarker(null);\n this.startRender(this.renderFinishedClose);\n };\n\n private cancel = () => {\n this.close();\n if (this.onCancel) {\n this.onCancel();\n }\n };\n\n private renderFinished = (dataUrl: string) => {\n this.onComplete(dataUrl);\n };\n\n private renderFinishedClose = (dataUrl: string) => {\n this.close();\n this.onComplete(dataUrl);\n };\n}\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","import { WhitePage } from './../../board/WhitePage/index';\nimport { MarkerType } from './../types';\nimport { RectBaseMarker } from './RectBaseMarker';\nimport { SvgHelper } from '../../renderer/SvgHelper';\n\nexport class RectMarker extends RectBaseMarker {\n type: MarkerType = 'rect';\n\n public static createMarker = (page?: WhitePage): RectBaseMarker => {\n const marker = new RectMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected setup() {\n super.setup();\n SvgHelper.setAttributes(this.visual, [['class', 'rect-marker']]);\n }\n}\n","import { RectangularMarkerGrips } from './RectangularMarkerGrips';\nimport { BaseMarker } from '../BaseMarker';\nimport { ResizeGrip } from '../BaseMarker/ResizeGrip';\nimport { PositionType } from '../../event/Event';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class RectangularMarker extends BaseMarker {\n public static createMarker = (page?: WhitePage): RectangularMarker => {\n const marker = new RectangularMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected MIN_SIZE = 5;\n\n private controlBox: SVGGElement;\n private readonly CB_DISTANCE: number = 10;\n private controlRect: SVGRectElement;\n\n private controlGrips: RectangularMarkerGrips;\n private activeGrip: ResizeGrip | null;\n\n public endManipulation() {\n super.endManipulation();\n this.isResizing = false;\n this.activeGrip = null;\n }\n\n public select() {\n super.select();\n this.controlBox.style.display = '';\n }\n\n public deselect() {\n super.deselect();\n this.controlBox.style.display = 'none';\n }\n\n protected setup() {\n super.setup();\n\n this.addControlBox();\n\n if (this.page && this.page.mode === 'mirror') {\n this.controlBox.style.display = 'none';\n }\n }\n\n protected resizeByEvent(x: number, y: number, pos: PositionType) {\n this.activeGrip = this.controlGrips[pos];\n this.resize(x, y);\n }\n\n protected resize(x: number, y: number, onPosition?: (pos: PositionType) => void) {\n let translateX = 0;\n let translateY = 0;\n\n switch (this.activeGrip) {\n case this.controlGrips.topLeft:\n this.width -= x;\n this.height -= y;\n translateX += x;\n translateY += y;\n if (onPosition) {\n onPosition('topLeft');\n }\n break;\n case this.controlGrips.bottomLeft:\n this.width -= x;\n this.height += y;\n translateX += x;\n if (onPosition) {\n onPosition('bottomLeft');\n }\n break;\n case this.controlGrips.topRight:\n this.width += x;\n this.height -= y;\n translateY += y;\n if (onPosition) {\n onPosition('topRight');\n }\n break;\n case this.controlGrips.bottomRight:\n this.width += x;\n this.height += y;\n if (onPosition) {\n onPosition('bottomRight');\n }\n break;\n case this.controlGrips.centerLeft:\n this.width -= x;\n translateX += x;\n if (onPosition) {\n onPosition('centerLeft');\n }\n break;\n case this.controlGrips.centerRight:\n this.width += x;\n if (onPosition) {\n onPosition('centerRight');\n }\n break;\n case this.controlGrips.topCenter:\n this.height -= y;\n translateY += y;\n if (onPosition) {\n onPosition('topCenter');\n }\n break;\n case this.controlGrips.bottomCenter:\n this.height += y;\n if (onPosition) {\n onPosition('bottomCenter');\n }\n break;\n default:\n break;\n }\n\n if (this.width < this.MIN_SIZE) {\n const offset = this.MIN_SIZE - this.width;\n this.width = this.MIN_SIZE;\n if (translateX !== 0) {\n translateX -= offset;\n }\n }\n if (this.height < this.MIN_SIZE) {\n const offset = this.MIN_SIZE - this.height;\n this.height = this.MIN_SIZE;\n if (translateY !== 0) {\n translateY -= offset;\n }\n }\n\n if (translateX !== 0 || translateY !== 0) {\n const translate = this.visual.transform.baseVal.getItem(0);\n translate.setMatrix(translate.matrix.translate(translateX, translateY));\n this.visual.transform.baseVal.replaceItem(translate, 0);\n }\n\n this.adjustControlBox();\n }\n\n protected onTouch(ev: TouchEvent) {\n super.onTouch(ev);\n }\n\n private addControlBox = () => {\n this.controlBox = SvgHelper.createGroup([['class', 'fc-whiteboard-rect-control-box']]);\n const translate = SvgHelper.createTransform();\n translate.setTranslate(-this.CB_DISTANCE / 2, -this.CB_DISTANCE / 2);\n this.controlBox.transform.baseVal.appendItem(translate);\n\n this.addToVisual(this.controlBox);\n\n this.controlRect = SvgHelper.createRect(\n this.width + this.CB_DISTANCE,\n this.height + this.CB_DISTANCE,\n [['class', 'fc-whiteboard-rect-control-rect']]\n );\n\n this.controlBox.appendChild(this.controlRect);\n\n this.controlGrips = new RectangularMarkerGrips();\n this.addControlGrips();\n };\n\n private adjustControlBox = () => {\n this.controlRect.setAttribute('width', (this.width + this.CB_DISTANCE).toString());\n this.controlRect.setAttribute('height', (this.height + this.CB_DISTANCE).toString());\n\n this.positionGrips();\n };\n\n private addControlGrips = () => {\n this.controlGrips.topLeft = this.createGrip();\n this.controlGrips.topCenter = this.createGrip();\n this.controlGrips.topRight = this.createGrip();\n this.controlGrips.centerLeft = this.createGrip();\n this.controlGrips.centerRight = this.createGrip();\n this.controlGrips.bottomLeft = this.createGrip();\n this.controlGrips.bottomCenter = this.createGrip();\n this.controlGrips.bottomRight = this.createGrip();\n\n this.positionGrips();\n };\n\n private createGrip = (): ResizeGrip => {\n const grip = new ResizeGrip();\n grip.visual.transform.baseVal.appendItem(SvgHelper.createTransform());\n this.controlBox.appendChild(grip.visual);\n\n grip.visual.addEventListener('mousedown', this.gripMouseDown);\n grip.visual.addEventListener('mousemove', this.gripMouseMove);\n grip.visual.addEventListener('mouseup', this.gripMouseUp);\n\n grip.visual.addEventListener('touchstart', this.onTouch, { passive: false });\n grip.visual.addEventListener('touchend', this.onTouch, { passive: false });\n grip.visual.addEventListener('touchmove', this.onTouch, { passive: false });\n\n return grip;\n };\n\n private positionGrips = () => {\n const gripSize = this.controlGrips.topLeft.GRIP_SIZE;\n\n const left = -gripSize / 2;\n const top = left;\n const cx = (this.width + this.CB_DISTANCE) / 2 - gripSize / 2;\n const cy = (this.height + this.CB_DISTANCE) / 2 - gripSize / 2;\n const bottom = this.height + this.CB_DISTANCE - gripSize / 2;\n const right = this.width + this.CB_DISTANCE - gripSize / 2;\n\n this.positionGrip(this.controlGrips.topLeft.visual, left, top);\n this.positionGrip(this.controlGrips.topCenter.visual, cx, top);\n this.positionGrip(this.controlGrips.topRight.visual, right, top);\n this.positionGrip(this.controlGrips.centerLeft.visual, left, cy);\n this.positionGrip(this.controlGrips.centerRight.visual, right, cy);\n this.positionGrip(this.controlGrips.bottomLeft.visual, left, bottom);\n this.positionGrip(this.controlGrips.bottomCenter.visual, cx, bottom);\n this.positionGrip(this.controlGrips.bottomRight.visual, right, bottom);\n };\n\n private positionGrip = (grip: SVGGraphicsElement, x: number, y: number) => {\n const translate = grip.transform.baseVal.getItem(0);\n translate.setTranslate(x, y);\n grip.transform.baseVal.replaceItem(translate, 0);\n };\n\n private gripMouseDown = (ev: MouseEvent) => {\n this.isResizing = true;\n this.activeGrip = this.controlGrips.findGripByVisual(ev.target as SVGGraphicsElement) || null;\n this.previousMouseX = ev.screenX;\n this.previousMouseY = ev.screenY;\n ev.stopPropagation();\n };\n\n private gripMouseUp = (ev: MouseEvent) => {\n this.isResizing = false;\n this.activeGrip = null;\n ev.stopPropagation();\n };\n\n private gripMouseMove = (ev: MouseEvent) => {\n if (this.isResizing) {\n this.manipulate(ev);\n }\n };\n}\n","import { SvgHelper } from '../../renderer/SvgHelper';\n\nexport class ResizeGrip {\n public visual: SVGGraphicsElement;\n\n public readonly GRIP_SIZE = 10;\n\n constructor() {\n this.visual = SvgHelper.createCircle(this.GRIP_SIZE, [['class', 'fc-whiteboard-control-grip']]);\n }\n}\n","import { MarkerType } from './../types';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { RectBaseMarker } from '../RectMarker/RectBaseMarker';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class CoverMarker extends RectBaseMarker {\n type: MarkerType = 'cover';\n\n public static createMarker = (page?: WhitePage): RectBaseMarker => {\n const marker = new CoverMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected setup() {\n super.setup();\n SvgHelper.setAttributes(this.visual, [['class', 'cover-marker']]);\n }\n}\n","import { MarkerType } from '../types';\nimport { RectangularMarker } from '../RectangularMarker';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { PositionType } from '../../event/Event';\nimport { WhitePage } from '../../board/WhitePage';\n\nconst OkIcon = require('../../assets/check.svg');\nconst CancelIcon = require('../../assets/times.svg');\n\nexport class TextMarker extends RectangularMarker {\n type: MarkerType = 'text';\n\n public static createMarker = (page?: WhitePage): TextMarker => {\n const marker = new TextMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n /** 设置文本 */\n public setText(text: string) {\n this.text = text;\n this.renderText();\n }\n\n protected readonly MIN_SIZE = 50;\n\n private readonly DEFAULT_TEXT = 'Double-click to edit text';\n private text: string = this.DEFAULT_TEXT;\n private textElement: SVGTextElement;\n\n private inDoubleTap = false;\n\n private editor: HTMLDivElement;\n\n private editorTextArea: HTMLTextAreaElement;\n\n protected setup() {\n super.setup();\n this.textElement = SvgHelper.createText();\n this.addToRenderVisual(this.textElement);\n SvgHelper.setAttributes(this.visual, [['class', 'text-marker']]);\n\n this.textElement.transform.baseVal.appendItem(SvgHelper.createTransform()); // translate transorm\n this.textElement.transform.baseVal.appendItem(SvgHelper.createTransform()); // scale transorm\n\n this.renderText();\n\n this.visual.addEventListener('dblclick', this.onDblClick);\n this.visual.addEventListener('touchstart', this.onTap);\n }\n\n protected resize(x: number, y: number, onPosition?: (pos: PositionType) => void) {\n super.resize(x, y, onPosition);\n\n this.sizeText();\n }\n\n private renderText = () => {\n const LINE_SIZE = '1.2em';\n\n while (this.textElement.lastChild) {\n this.textElement.removeChild(this.textElement.lastChild);\n }\n\n const lines = this.text.split(/\\r\\n|[\\n\\v\\f\\r\\x85\\u2028\\u2029]/);\n for (let line of lines) {\n if (line.trim() === '') {\n line = ' '; // workaround for swallowed empty lines\n }\n this.textElement.appendChild(SvgHelper.createTSpan(line, [['x', '0'], ['dy', LINE_SIZE]]));\n }\n\n setTimeout(this.sizeText, 10);\n };\n\n private sizeText = () => {\n const textSize = this.textElement.getBBox();\n let x = 0;\n let y = 0;\n let scale = 1.0;\n if (textSize.width > 0 && textSize.height > 0) {\n const xScale = (this.width * 1.0) / textSize.width;\n const yScale = (this.height * 1.0) / textSize.height;\n scale = Math.min(xScale, yScale);\n\n x = (this.width - textSize.width * scale) / 2;\n y = (this.height - textSize.height * scale) / 2;\n }\n\n this.textElement.transform.baseVal.getItem(0).setTranslate(x, y);\n this.textElement.transform.baseVal.getItem(1).setScale(scale, scale);\n };\n\n private onDblClick = (ev: MouseEvent) => {\n this.showEditor();\n };\n\n private onTap = (ev: TouchEvent) => {\n if (this.inDoubleTap) {\n this.inDoubleTap = false;\n this.showEditor();\n } else {\n this.inDoubleTap = true;\n setTimeout(() => {\n this.inDoubleTap = false;\n }, 300);\n }\n };\n\n private showEditor = () => {\n this.editor = document.createElement('div');\n this.editor.className = 'fc-whiteboard-text-editor';\n\n this.editorTextArea = document.createElement('textarea');\n if (this.text !== this.DEFAULT_TEXT) {\n this.editorTextArea.value = this.text;\n }\n this.editorTextArea.addEventListener('keydown', this.onEditorKeyDown);\n this.editor.appendChild(this.editorTextArea);\n\n document.body.appendChild(this.editor);\n\n const buttons = document.createElement('div');\n buttons.className = 'fc-whiteboard-text-editor-button-bar';\n this.editor.appendChild(buttons);\n\n const okButton = document.createElement('div');\n okButton.className = 'fc-whiteboard-text-editor-button';\n okButton.innerHTML = OkIcon;\n okButton.addEventListener('click', this.onEditorOkClick);\n buttons.appendChild(okButton);\n\n const cancelButton = document.createElement('div');\n cancelButton.className = 'fc-whiteboard-text-editor-button';\n cancelButton.innerHTML = CancelIcon;\n cancelButton.addEventListener('click', this.closeEditor);\n buttons.appendChild(cancelButton);\n };\n\n /** 响应文本输入的事件 */\n private onEditorOkClick = (ev: MouseEvent | null) => {\n if (this.editorTextArea.value.trim()) {\n this.text = this.editorTextArea.value;\n } else {\n this.text = this.DEFAULT_TEXT;\n }\n\n // 触发文本修改时间\n this.onChange({ target: 'marker', id: this.id, event: 'changeText', data: this.text });\n\n this.renderText();\n this.closeEditor();\n };\n\n private closeEditor = () => {\n document.body.removeChild(this.editor);\n };\n\n private onEditorKeyDown = (ev: KeyboardEvent) => {\n if (ev.key === 'Enter' && ev.ctrlKey) {\n ev.preventDefault();\n this.onEditorOkClick(null);\n }\n };\n}\n","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 512 512\\\"><path d=\\\"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z\\\"></path></svg><!-- 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) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 352 512\\\"><path d=\\\"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z\\\"></path></svg><!-- 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) -->\"","import { MarkerType } from './../types';\nimport { LinearMarker } from '../LinearMarker';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class ArrowMarker extends LinearMarker {\n type: MarkerType = 'arrow';\n\n public static createMarker = (page?: WhitePage): LinearMarker => {\n const marker = new ArrowMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n private readonly ARROW_SIZE = 6;\n\n protected setup() {\n super.setup();\n SvgHelper.setAttributes(this.visual, [['class', 'arrow-marker']]);\n\n const tip = SvgHelper.createPolygon(\n `0,0 ${this.ARROW_SIZE},${this.ARROW_SIZE / 2} 0,${this.ARROW_SIZE}`,\n [['class', 'arrow-marker-tip']]\n );\n this.defs.push(\n SvgHelper.createMarker(\n 'arrow-marker-head',\n 'auto',\n this.ARROW_SIZE,\n this.ARROW_SIZE,\n this.ARROW_SIZE - 1,\n this.ARROW_SIZE / 2,\n tip\n )\n );\n\n this.markerLine.setAttribute('marker-end', 'url(#arrow-marker-head');\n }\n}\n","import { WhitePage } from './../../board/WhitePage/index';\nimport { BaseMarker } from '../BaseMarker';\nimport { ResizeGrip } from '../BaseMarker/ResizeGrip';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { PositionType } from '../../event/Event';\n\nexport class LinearMarker extends BaseMarker {\n public static createMarker = (page?: WhitePage): LinearMarker => {\n const marker = new LinearMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected markerLine: SVGLineElement;\n\n private readonly MIN_LENGTH = 20;\n\n private markerBgLine: SVGLineElement; // touch target\n\n private controlBox: SVGGElement;\n\n private controlGrips: { left: ResizeGrip; right: ResizeGrip };\n private activeGrip: ResizeGrip | null;\n\n private x1: number = 0;\n private y1: number = 0;\n private x2: number = this.width;\n private y2: number = 0;\n\n public endManipulation() {\n super.endManipulation();\n this.isResizing = false;\n this.activeGrip = null;\n }\n\n public select() {\n super.select();\n this.controlBox.style.display = '';\n }\n\n public deselect() {\n super.deselect();\n this.controlBox.style.display = 'none';\n }\n\n protected setup() {\n super.setup();\n\n this.markerBgLine = SvgHelper.createLine(0, 0, this.x2, 0, [\n ['stroke', 'transparent'],\n ['stroke-width', '30']\n ]);\n this.addToRenderVisual(this.markerBgLine);\n this.markerLine = SvgHelper.createLine(0, 0, this.x2, 0);\n this.addToRenderVisual(this.markerLine);\n\n this.addControlBox();\n\n if (this.page && this.page.mode === 'mirror') {\n this.controlBox.style.display = 'none';\n }\n }\n\n protected resize(x: number, y: number, onPosition?: (pos: PositionType) => void) {\n if (this.activeGrip) {\n if (\n this.activeGrip === this.controlGrips.left &&\n this.getLineLength(this.x1 + x, this.y1 + 1, this.x2, this.y2) >= this.MIN_LENGTH\n ) {\n this.x1 += x;\n this.y1 += y;\n this.markerBgLine.setAttribute('x1', this.x1.toString());\n this.markerBgLine.setAttribute('y1', this.y1.toString());\n this.markerLine.setAttribute('x1', this.x1.toString());\n this.markerLine.setAttribute('y1', this.y1.toString());\n if (onPosition) {\n onPosition('left');\n }\n } else if (\n this.activeGrip === this.controlGrips.right &&\n this.getLineLength(this.x1, this.y1, this.x2 + x, this.y2 + y) >= this.MIN_LENGTH\n ) {\n this.x2 += x;\n this.y2 += y;\n this.markerBgLine.setAttribute('x2', this.x2.toString());\n this.markerBgLine.setAttribute('y2', this.y2.toString());\n this.markerLine.setAttribute('x2', this.x2.toString());\n this.markerLine.setAttribute('y2', this.y2.toString());\n if (onPosition) {\n onPosition('right');\n }\n }\n }\n\n this.adjustControlBox();\n }\n\n protected resizeByEvent(x: number, y: number, pos?: PositionType) {\n if (pos === 'left') {\n this.activeGrip = this.controlGrips.left;\n } else {\n this.activeGrip = this.controlGrips.right;\n }\n\n this.resize(x, y);\n }\n\n private getLineLength = (x1: number, y1: number, x2: number, y2: number): number => {\n const dx = Math.abs(x1 - x2);\n const dy = Math.abs(y1 - y2);\n\n return Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n };\n\n private addControlBox = () => {\n this.controlBox = SvgHelper.createGroup([['class', 'fc-whiteboard-line-control-box']]);\n this.addToVisual(this.controlBox);\n\n this.addControlGrips();\n };\n\n private adjustControlBox = () => {\n this.positionGrips();\n };\n\n private addControlGrips = () => {\n this.controlGrips = {\n left: this.createGrip(),\n right: this.createGrip()\n };\n\n this.positionGrips();\n };\n\n private createGrip = (): ResizeGrip => {\n const grip = new ResizeGrip();\n grip.visual.transform.baseVal.appendItem(SvgHelper.createTransform());\n this.controlBox.appendChild(grip.visual);\n\n grip.visual.addEventListener('mousedown', this.gripMouseDown);\n grip.visual.addEventListener('mousemove', this.gripMouseMove);\n grip.visual.addEventListener('mouseup', this.gripMouseUp);\n\n grip.visual.addEventListener('touchstart', this.onTouch, { passive: false });\n grip.visual.addEventListener('touchend', this.onTouch, { passive: false });\n grip.visual.addEventListener('touchmove', this.onTouch, { passive: false });\n\n return grip;\n };\n\n private positionGrips = () => {\n const gripSize = this.controlGrips.left.GRIP_SIZE;\n\n const x1 = this.x1 - gripSize / 2;\n const y1 = this.y1 - gripSize / 2;\n const x2 = this.x2 - gripSize / 2;\n const y2 = this.y2 - gripSize / 2;\n\n this.positionGrip(this.controlGrips.left.visual, x1, y1);\n this.positionGrip(this.controlGrips.right.visual, x2, y2);\n };\n\n private positionGrip = (grip: SVGGraphicsElement, x: number, y: number) => {\n const translate = grip.transform.baseVal.getItem(0);\n translate.setTranslate(x, y);\n grip.transform.baseVal.replaceItem(translate, 0);\n };\n\n private gripMouseDown = (ev: MouseEvent) => {\n this.isResizing = true;\n this.activeGrip =\n (ev.target as SVGGraphicsElement) === this.controlGrips.left.visual\n ? this.controlGrips.left\n : this.controlGrips.right;\n this.previousMouseX = ev.screenX;\n this.previousMouseY = ev.screenY;\n ev.stopPropagation();\n };\n\n private gripMouseUp = (ev: MouseEvent) => {\n this.isResizing = false;\n this.activeGrip = null;\n ev.stopPropagation();\n };\n\n private gripMouseMove = (ev: MouseEvent) => {\n if (this.isResizing) {\n this.resize(ev.movementX, ev.movementY);\n }\n };\n}\n","import { MarkerType } from './../types';\nimport { SvgHelper } from '../../renderer/SvgHelper';\nimport { RectBaseMarker } from '../RectMarker/RectBaseMarker';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class HighlightMarker extends RectBaseMarker {\n type: MarkerType = 'highlight';\n\n public static createMarker = (page?: WhitePage): RectBaseMarker => {\n const marker = new HighlightMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected setup() {\n super.setup();\n SvgHelper.setAttributes(this.visual, [['class', 'highlight-marker']]);\n }\n}\n","import { MarkerType } from './../types';\nimport { LinearMarker } from '../LinearMarker';\nimport { SvgHelper } from './../../renderer/SvgHelper/index';\nimport { WhitePage } from '../../board/WhitePage';\n\nexport class LineMarker extends LinearMarker {\n type: MarkerType = 'line';\n\n public static createMarker = (page?: WhitePage): LinearMarker => {\n const marker = new LineMarker();\n marker.page = page;\n marker.setup();\n return marker;\n };\n\n protected setup() {\n super.setup();\n SvgHelper.setAttributes(this.visual, [['class', 'line-marker']]);\n }\n}\n","/** 创建包含样式类名的 Div 元素 */\nexport function createDivWithClassName(className?: string, parent?: HTMLElement) {\n const ele = document.createElement('div');\n\n if (parent) {\n parent.appendChild(ele);\n }\n\n if (className) {\n addClassName(ele, className);\n }\n\n return ele;\n}\n\n/** 添加样式类名 */\nexport function addClassName(ele: HTMLElement, className: string) {\n if (!ele) {\n return;\n }\n\n ele.className = `${ele.className || ''} ${className}`.trim();\n}\n","export { Drawboard } from './board/Drawboard';\nexport { Whiteboard } from './board/Whiteboard';\nexport { WhiteboardMode } from './board/types';\n","import { uuid } from './../../utils/uuid';\nimport { WhitePageSource } from './../types';\nimport { SvgHelper } from './../../renderer/SvgHelper/index';\n\n/** 基础的绘制版 */\nexport class Baseboard {\n id: string = uuid();\n\n /** 元素 */\n source: WhitePageSource;\n\n // 目前使用 Image 元素作为输出源\n target: HTMLImageElement;\n targetRect: ClientRect;\n\n boardCanvas: SVGSVGElement;\n boardHolder: HTMLDivElement;\n defs: SVGDefsElement;\n\n width: number;\n height: number;\n\n constructor(source: WhitePageSource) {\n this.source = source;\n\n if (source.imgEle) {\n this.target = source.imgEle!;\n\n // 如果仅传入图片地址或者 Blob,则必须为全屏模式\n this.width = this.target.clientWidth;\n this.height = this.target.clientHeight;\n }\n }\n\n protected initBoard = () => {\n // init holder\n this.boardHolder = document.createElement('div');\n this.boardHolder.id = `fcw-board-holder-${this.id}`;\n // fix for Edge's touch behavior\n this.boardHolder.style.setProperty('touch-action', 'none');\n this.boardHolder.style.setProperty('-ms-touch-action', 'none');\n document.body.appendChild(this.boardHolder);\n\n // init canvas\n this.boardCanvas = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n this.boardCanvas.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n this.boardCanvas.setAttribute('width', this.width.toString());\n this.boardCanvas.setAttribute('height', this.height.toString());\n this.boardCanvas.setAttribute(\n 'viewBox',\n '0 0 ' + this.width.toString() + ' ' + this.height.toString()\n );\n\n this.boardHolder.style.position = 'absolute';\n this.boardHolder.style.width = `${this.width}px`;\n this.boardHolder.style.height = `${this.height}px`;\n this.boardHolder.style.transformOrigin = 'top left';\n this.positionBoard();\n this.defs = SvgHelper.createDefs();\n this.boardCanvas.appendChild(this.defs);\n this.boardHolder.appendChild(this.boardCanvas);\n };\n\n protected positionBoard = () => {\n this.boardHolder.style.top = this.targetRect.top + 'px';\n this.boardHolder.style.left = this.targetRect.left + 'px';\n };\n}\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([bth[buf[i++]], bth[buf[i++]], \n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]]]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","import { WhitePage } from './../board/WhitePage/index';\nimport { RectMarker } from './../markers/RectMarker/index';\nimport { CoverMarker } from './../markers/CoverMarker/index';\nimport { TextMarker } from './../markers/TextMarker/index';\nimport { ArrowMarker } from './../markers/ArrowMarker/index';\nimport { HighlightMarker } from './../markers/HighlightMarker/index';\nimport { ToolbarItem } from './ToolbarItem';\nimport { LineMarker } from '../markers/LineMarker';\n\nconst OkIcon = require('../assets/check.svg');\nconst DeleteIcon = require('../assets/eraser.svg');\nconst PointerIcon = require('../assets/mouse-pointer.svg');\nconst CloseIcon = require('../assets/times.svg');\n\nexport const highlightMarkerToolbarItem = new ToolbarItem({\n name: 'cover-marker',\n tooltipText: 'Cover',\n icon: require('../assets/highlight.svg'),\n markerType: HighlightMarker\n});\n\nexport const arrowMarkerToolbarItem = new ToolbarItem({\n name: 'arrow-marker',\n tooltipText: 'Arrow',\n icon: require('../assets/arrow.svg'),\n markerType: ArrowMarker\n});\n\nexport const textMarkerToolbarItem = new ToolbarItem({\n name: 'text-marker',\n tooltipText: 'Text',\n icon: require('../assets/text.svg'),\n markerType: TextMarker\n});\n\nexport const coverMarkerToolbarItem = new ToolbarItem({\n name: 'cover-marker',\n tooltipText: 'Cover',\n icon: require('../assets/cover.svg'),\n markerType: CoverMarker\n});\n\nexport const rectMarkerToolbarItem = new ToolbarItem({\n name: 'rect-marker',\n tooltipText: 'Rectangle',\n icon: require('../assets/rect.svg'),\n markerType: RectMarker\n});\n\nexport const lineMarkerToolbarItem = new ToolbarItem({\n name: 'line-marker',\n tooltipText: 'Line',\n icon: require('../assets/line.svg'),\n markerType: LineMarker\n});\n\nexport function getToolbars(page?: WhitePage) {\n const toolbars = [\n {\n icon: PointerIcon,\n name: 'pointer',\n tooltipText: 'Pointer'\n },\n {\n icon: DeleteIcon,\n name: 'delete',\n tooltipText: 'Delete'\n },\n {\n name: 'separator',\n tooltipText: ''\n },\n rectMarkerToolbarItem,\n coverMarkerToolbarItem,\n highlightMarkerToolbarItem,\n lineMarkerToolbarItem,\n arrowMarkerToolbarItem,\n textMarkerToolbarItem,\n {\n name: 'separator',\n tooltipText: ''\n }\n ];\n\n if (!page) {\n toolbars.push(\n ...[\n {\n icon: OkIcon,\n name: 'ok',\n tooltipText: 'OK'\n }\n ]\n );\n }\n\n toolbars.push({\n icon: CloseIcon,\n name: 'close',\n tooltipText: 'Close'\n });\n\n return toolbars;\n}\n","import { ResizeGrip } from '../BaseMarker/ResizeGrip';\n\nexport class RectangularMarkerGrips {\n public topLeft: ResizeGrip;\n public topCenter: ResizeGrip;\n public topRight: ResizeGrip;\n public centerLeft: ResizeGrip;\n public centerRight: ResizeGrip;\n public bottomLeft: ResizeGrip;\n public bottomCenter: ResizeGrip;\n public bottomRight: ResizeGrip;\n\n public findGripByVisual = (gripVisual: SVGGraphicsElement) => {\n switch (gripVisual) {\n case this.topLeft.visual:\n return this.topLeft;\n case this.topCenter.visual:\n return this.topCenter;\n case this.topRight.visual:\n return this.topRight;\n case this.centerLeft.visual:\n return this.centerLeft;\n case this.centerRight.visual:\n return this.centerRight;\n case this.bottomLeft.visual:\n return this.bottomLeft;\n case this.bottomCenter.visual:\n return this.bottomCenter;\n case this.bottomRight.visual:\n return this.bottomRight;\n default:\n return this.topLeft;\n }\n };\n}\n","import { BaseMarker } from './../markers/BaseMarker/index';\nexport class ToolbarItem {\n name: string;\n tooltipText: string;\n icon?: string;\n markerType?: typeof BaseMarker;\n\n constructor({\n name,\n tooltipText,\n icon,\n markerType\n }: {\n name: string;\n tooltipText: string;\n icon?: string;\n markerType?: typeof BaseMarker;\n }) {\n this.name = name;\n this.tooltipText = tooltipText;\n this.icon = icon;\n this.markerType = markerType;\n }\n}\n","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 512 512\\\"><path d=\\\"M497.941 273.941c18.745-18.745 18.745-49.137 0-67.882l-160-160c-18.745-18.745-49.136-18.746-67.883 0l-256 256c-18.745 18.745-18.745 49.137 0 67.882l96 96A48.004 48.004 0 0 0 144 480h356c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12H355.883l142.058-142.059zm-302.627-62.627l137.373 137.373L265.373 416H150.628l-80-80 124.686-124.686z\\\"></path></svg><!-- 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) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 320 512\\\"><path d=\\\"M302.189 329.126H196.105l55.831 135.993c3.889 9.428-.555 19.999-9.444 23.999l-49.165 21.427c-9.165 4-19.443-.571-23.332-9.714l-53.053-129.136-86.664 89.138C18.729 472.71 0 463.554 0 447.977V18.299C0 1.899 19.921-6.096 30.277 5.443l284.412 292.542c11.472 11.179 3.007 31.141-12.5 31.141z\\\"></path></svg><!-- 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) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 544 512\\\"><path d=\\\"M0 479.98L99.92 512l35.45-35.45-67.04-67.04L0 479.98zm124.61-240.01a36.592 36.592 0 0 0-10.79 38.1l13.05 42.83-50.93 50.94 96.23 96.23 50.86-50.86 42.74 13.08c13.73 4.2 28.65-.01 38.15-10.78l35.55-41.64-173.34-173.34-41.52 35.44zm403.31-160.7l-63.2-63.2c-20.49-20.49-53.38-21.52-75.12-2.35L190.55 183.68l169.77 169.78L530.27 154.4c19.18-21.74 18.15-54.63-2.35-75.13z\\\"></path></svg><!-- 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) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 448 512\\\"><path d=\\\"M313.941 216H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h301.941v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971V216z\\\"></path></svg><!-- 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) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 448 512\\\"><path d=\\\"M152 416h-24.013l26.586-80.782H292.8L319.386 416H296c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h136c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16h-26.739L275.495 42.746A16 16 0 0 0 260.382 32h-72.766a16 16 0 0 0-15.113 10.746L42.739 416H16c-8.837 0-16 7.163-16 16v32c0 8.837 7.163 16 16 16h136c8.837 0 16-7.163 16-16v-32c0-8.837-7.163-16-16-16zm64.353-271.778c4.348-15.216 6.61-28.156 7.586-34.644.839 6.521 2.939 19.476 7.727 34.706l41.335 124.006h-98.619l41.971-124.068z\\\"></path></svg><!-- 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) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 448 512\\\"><path d=\\\"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z\\\"></path></svg><!-- 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) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 448 512\\\"><path d=\\\"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z\\\"></path></svg><!-- 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) -->\"","module.exports = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 640 512\\\"><path d=\\\"M594.53 508.63L6.18 53.9c-6.97-5.42-8.23-15.47-2.81-22.45L23.01 6.18C28.43-.8 38.49-2.06 45.47 3.37L633.82 458.1c6.97 5.42 8.23 15.47 2.81 22.45l-19.64 25.27c-5.42 6.98-15.48 8.23-22.46 2.81z\\\"></path></svg><!-- 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) -->\"","import { isHTMLImageElement } from '../../utils/validator';\n\n/** 图片导出 */\nexport class Synthetizer {\n public rasterize(\n target: HTMLImageElement | HTMLDivElement,\n markerImage: SVGSVGElement,\n done: (dataUrl: string) => void\n ) {\n if (!isHTMLImageElement(target)) {\n throw new Error('Error: only support export HTMLImageElement');\n }\n\n const canvas = document.createElement('canvas');\n canvas.width = markerImage.width.baseVal.value;\n canvas.height = markerImage.height.baseVal.value;\n\n const data = markerImage.outerHTML;\n\n const ctx = canvas.getContext('2d');\n\n if (!ctx) {\n throw new Error('Invalid ctx');\n }\n\n ctx.drawImage(target as HTMLImageElement, 0, 0, canvas.width, canvas.height);\n\n const DOMURL = window.URL; // || window.webkitURL || window;\n\n const img = new Image(canvas.width, canvas.height);\n img.setAttribute('crossOrigin', 'anonymous');\n\n const blob = new Blob([data], { type: 'image/svg+xml' });\n\n const url = DOMURL.createObjectURL(blob);\n\n img.onload = () => {\n ctx.drawImage(img, 0, 0);\n DOMURL.revokeObjectURL(url);\n\n done(canvas.toDataURL('image/png'));\n };\n\n img.src = url;\n }\n}\n","/** 判断是否为有效的 HTMLImageElement */\nexport function isHTMLImageElement(ele: any) {\n if (typeof ele === 'object' && ele instanceof HTMLImageElement) {\n return true;\n }\n\n return false;\n}\n","import { ToolbarButton } from './ToolbarButton';\nimport { ToolbarItem } from './ToolbarItem';\nimport { uuid } from '../utils/uuid';\n\nexport class Toolbar {\n id: string = uuid();\n\n private toolbarItems: ToolbarItem[];\n private toolbarUI: HTMLElement;\n\n private clickHandler: (ev: MouseEvent, toolbarItem: ToolbarItem) => void;\n\n constructor(\n toolbarItems: ToolbarItem[],\n clickHandler: (ev: MouseEvent, toolbarItem: ToolbarItem) => void\n ) {\n this.toolbarItems = toolbarItems;\n this.clickHandler = clickHandler;\n }\n\n /** 获取 UI 元素 */\n public getUI = (): HTMLElement => {\n this.toolbarUI = document.createElement('div');\n this.toolbarUI.id = `fcw-toolbar-${this.id}`;\n this.toolbarUI.className = 'fc-whiteboard-toolbar';\n\n for (const toolbarItem of this.toolbarItems) {\n const toolbarButton = new ToolbarButton(toolbarItem, this.clickHandler);\n this.toolbarUI.appendChild(toolbarButton.getElement());\n }\n\n return this.toolbarUI;\n };\n\n public hide() {\n this.toolbarUI.style.visibility = 'hidden';\n this.toolbarUI.style.zIndex = '-1';\n }\n\n public show() {\n this.toolbarUI.style.visibility = 'visible';\n this.toolbarUI.style.zIndex = '999';\n }\n}\n","import { ToolbarItem } from './ToolbarItem';\n\nexport class ToolbarButton {\n private toolbarItem: ToolbarItem;\n private clickHandler: (ev: MouseEvent, toolbarItem: ToolbarItem) => void;\n\n constructor(\n toolbarItem: ToolbarItem,\n clickHandler?: (ev: MouseEvent, toolbarItem: ToolbarItem) => void\n ) {\n this.toolbarItem = toolbarItem;\n\n if (clickHandler) {\n this.clickHandler = clickHandler;\n }\n }\n\n public getElement = (): HTMLElement => {\n const div = document.createElement('div');\n if (this.toolbarItem.name !== 'separator') {\n div.className = 'fc-whiteboard-toolbar-button';\n if (this.clickHandler) {\n div.addEventListener('click', (ev: MouseEvent) => {\n if (this.clickHandler) {\n this.clickHandler(ev, this.toolbarItem);\n }\n });\n }\n\n if (this.toolbarItem.icon) {\n div.title = this.toolbarItem.tooltipText;\n div.innerHTML = this.toolbarItem.icon;\n } else {\n div.innerText = this.toolbarItem.tooltipText;\n }\n } else {\n div.className = 'fc-whiteboard-toolbar-separator';\n }\n\n return div;\n };\n}\n","\nvar content = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\", function() {\n\t\tvar newContent = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","exports = module.exports = require(\"../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".fc-whiteboard-logo {\\n display: inline-block;\\n margin: 0px;\\n padding: 0px;\\n fill: #333333;\\n}\\n.fc-whiteboard-logo a {\\n display: grid;\\n -ms-flex-align: center;\\n align-items: center;\\n justify-items: center;\\n padding: 3px;\\n width: 20px;\\n height: 20px;\\n}\\n.fc-whiteboard-logo a:hover {\\n fill: #ff8080;\\n}\\n.fc-whiteboard-toolbar {\\n background-color: #cccccc;\\n padding: 0px 5px;\\n margin: 0px;\\n border-top-left-radius: 10px;\\n border-top-right-radius: 10px;\\n display: grid;\\n grid-template-columns: repeat(20, auto);\\n}\\n.fc-whiteboard-toolbar-button,\\n.fc-whiteboard-toolbar-logo a {\\n display: inline-block;\\n margin: 2px;\\n padding: 3px;\\n cursor: pointer;\\n width: 20px;\\n height: 20px;\\n border-radius: 2px;\\n border-bottom: transparent solid 1px;\\n border-right: transparent solid 1px;\\n fill: #333333;\\n display: grid;\\n -ms-flex-align: center;\\n align-items: center;\\n justify-items: center;\\n}\\n.fc-whiteboard-toolbar-separator {\\n margin: 5px 5px;\\n border: 1px solid #dddddd;\\n}\\n.fc-whiteboard-toolbar-button:hover,\\n.fc-whiteboard-toolbar-logo a:hover {\\n background-color: #eeeeee;\\n background: -webkit-radial-gradient(#eeeeee, #cccccc);\\n background: -o-radial-gradient(#eeeeee, #cccccc);\\n background: radial-gradient(#eeeeee, #cccccc);\\n fill: #ff8080;\\n}\\n.fc-whiteboard-toolbar-button svg {\\n height: 16px;\\n}\\n.fc-whiteboard-text-editor {\\n position: fixed;\\n z-index: 20000;\\n left: 0px;\\n top: 0px;\\n width: 100vw;\\n height: 100vh;\\n background-color: rgba(0, 0, 0, 0.9);\\n display: -ms-flexbox;\\n display: flex;\\n -ms-flex-direction: column;\\n flex-direction: column;\\n -ms-flex-align: center;\\n align-items: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n}\\n.fc-whiteboard-text-editor textarea {\\n width: 50%;\\n min-width: 50px;\\n max-width: 500px;\\n height: 50%;\\n min-height: 50px;\\n max-height: 500px;\\n}\\n.fc-whiteboard-text-editor .fc-whiteboard-text-editor-button-bar {\\n display: -ms-flexbox;\\n display: flex;\\n -ms-flex-direction: row;\\n flex-direction: row;\\n -ms-flex-pack: end;\\n justify-content: flex-end;\\n width: 50%;\\n min-width: 50px;\\n max-width: 500px;\\n padding-top: 10px;\\n}\\n.fc-whiteboard-text-editor .fc-whiteboard-text-editor-button {\\n display: grid;\\n -ms-flex-align: center;\\n align-items: center;\\n padding: 0px;\\n margin-left: 15px;\\n width: 20px;\\n height: 20px;\\n cursor: pointer;\\n fill: #888888;\\n}\\n.fc-whiteboard-text-editor .fc-whiteboard-text-editor-button:hover {\\n fill: #ff8080;\\n}\\n\", \"\"]);\n\n","\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function \"fixes\" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n // get current location\n var location = typeof window !== \"undefined\" && window.location;\n\n if (!location) {\n throw new Error(\"fixUrls requires window.location\");\n }\n\n\t// blank or null?\n\tif (!css || typeof css !== \"string\") {\n\t return css;\n }\n\n var baseUrl = location.protocol + \"//\" + location.host;\n var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, \"/\");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\( = Match on the word \"url\" with any whitespace after it and then a parens\n\t ( = Start a capturing group\n\t (?: = Start a non-capturing group\n\t [^)(] = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t (?: = Start another non-capturing groups\n\t [^)(]+ = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t [^)(]* = Match anything that isn't a parentheses\n\t \\) = Match a end parentheses\n\t ) = End Group\n *\\) = Match anything and then a close parens\n ) = Close non-capturing group\n * = Match anything\n ) = Close capturing group\n\t \\) = Match a close parens\n\n\t /gi = Get all matches, not the first. Be case insensitive.\n\t */\n\tvar fixedCss = css.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(fullMatch, origUrl) {\n\t\t// strip quotes (if they exist)\n\t\tvar unquotedOrigUrl = origUrl\n\t\t\t.trim()\n\t\t\t.replace(/^\"(.*)\"$/, function(o, $1){ return $1; })\n\t\t\t.replace(/^'(.*)'$/, function(o, $1){ return $1; });\n\n\t\t// already a full url? no change\n\t\tif (/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(unquotedOrigUrl)) {\n\t\t return fullMatch;\n\t\t}\n\n\t\t// convert the url to a full url\n\t\tvar newUrl;\n\n\t\tif (unquotedOrigUrl.indexOf(\"//\") === 0) {\n\t\t \t//TODO: should we add protocol?\n\t\t\tnewUrl = unquotedOrigUrl;\n\t\t} else if (unquotedOrigUrl.indexOf(\"/\") === 0) {\n\t\t\t// path should be relative to the base url\n\t\t\tnewUrl = baseUrl + unquotedOrigUrl; // already starts with '/'\n\t\t} else {\n\t\t\t// path should be relative to current directory\n\t\t\tnewUrl = currentDir + unquotedOrigUrl.replace(/^\\.\\//, \"\"); // Strip leading './'\n\t\t}\n\n\t\t// send back the fixed url(...)\n\t\treturn \"url(\" + JSON.stringify(newUrl) + \")\";\n\t});\n\n\t// send back the fixed css\n\treturn fixedCss;\n};\n","import { SyncEvent } from './../../event/Event';\nimport * as Siema from 'siema';\n\nimport { WhiteboardMode } from '../types';\nimport { WhitePage } from '../WhitePage/index';\nimport { EventHub } from '../../event/EventHub';\nimport { uuid } from '../../utils/uuid';\nimport { addClassName, createDivWithClassName } from '../../utils/dom';\n\nimport './index.less';\n\nconst LeftArrowIcon = require('../../assets/bx-left-arrow.svg');\nconst RightArrowIcon = require('../../assets/bx-right-arrow.svg');\n\nconst prefix = 'fcw-board';\n\nexport class SerializableWhiteboard {\n id: string;\n sources: string[];\n pageIds: string[];\n visiblePageIndex: number;\n}\n\nexport class Whiteboard {\n id: string = uuid();\n sources: string[] = [];\n\n /** 元素 */\n // 如果传入的是图片地址,则需要挂载到该 Target 元素下\n target: HTMLDivElement;\n imgsContainer: HTMLDivElement;\n pagesContainer: HTMLDivElement;\n\n /** UI Options */\n // 事件中心\n eventHub?: EventHub;\n // 编辑模式\n mode: WhiteboardMode = 'master';\n // 是否为全屏模式\n isFullscreen: boolean = false;\n\n /** 句柄 */\n pages: WhitePage[] = [];\n get activePage() {\n return this.pages[this.visiblePageIndex];\n }\n siema: any;\n\n /** State | 内部状态 */\n // 是否被初始化过,如果尚未被初始化,则等待来自于 Master 的同步消息\n isInitialized: boolean = false;\n visiblePageIndex: number = 0;\n emitInterval: any;\n\n constructor(\n target: HTMLDivElement,\n {\n sources,\n eventHub,\n mode,\n visiblePageIndex\n }: {\n sources?: string[];\n eventHub?: EventHub;\n mode?: WhiteboardMode;\n visiblePageIndex?: number;\n } = {}\n ) {\n if (target) {\n this.target = target;\n } else {\n this.target = document.createElement('div');\n document.body.appendChild(this.target);\n }\n\n if (!this.target.id) {\n this.target.id = this.id;\n }\n\n addClassName(this.target, prefix);\n\n if (sources) {\n this.sources = sources;\n }\n\n this.eventHub = eventHub;\n\n if (mode) {\n this.mode = mode;\n }\n\n // set inner state\n if (typeof visiblePageIndex !== 'undefined') {\n this.visiblePageIndex = visiblePageIndex;\n }\n\n this.init();\n }\n\n /** LifeCycle */\n public open() {\n // 依次渲染所有的页,隐藏非当前页之外的其他页\n this.pages.forEach((page, i) => {\n page.open();\n\n if (i !== this.visiblePageIndex) {\n page.hide();\n }\n });\n }\n\n /** 关闭当前的 Whiteboard */\n public close() {\n if (this.emitInterval) {\n clearInterval(this.emitInterval);\n }\n }\n\n /** 展示当前的 WhitePage */\n public show() {\n if (this.activePage) {\n this.activePage.show();\n }\n }\n\n public hide() {\n if (this.activePage) {\n this.activePage.hide();\n }\n }\n\n /** 获取当前快照 */\n public snap(): SerializableWhiteboard {\n return {\n id: this.id,\n sources: this.sources,\n pageIds: this.pages.map(page => page.id),\n visiblePageIndex: this.visiblePageIndex\n };\n }\n\n /** 初始化操作 */\n private init() {\n // 为 target 添加子 imgs 容器\n this.imgsContainer = createDivWithClassName(`${prefix}-imgs`, this.target);\n // 为 target 添加子 pages 容器\n this.pagesContainer = createDivWithClassName(`${prefix}-pages`, this.target);\n\n if (this.mode === 'master') {\n this.initMaster();\n\n this.emitSnapshot();\n }\n\n if (this.mode === 'mirror') {\n this.initMirror();\n }\n }\n\n /** 以主模式启动 */\n private initMaster() {\n // 初始化所有的 WhitePages\n this.sources.forEach(source => {\n const page = new WhitePage(\n { imgSrc: source },\n {\n mode: this.mode,\n eventHub: this.eventHub,\n parentContainer: this.pagesContainer\n }\n );\n\n // 这里隐藏 Dashboard 的图片源,Siema 切换的是占位图片\n page.container.style.visibility = 'hidden';\n\n this.pages.push(page);\n });\n\n this.initSiema();\n\n // 初始化控制节点\n const controller = createDivWithClassName(`${prefix}-controller`, this.target);\n\n const prevEle = createDivWithClassName(`${prefix}-flip-arrow`, controller);\n prevEle.innerHTML = LeftArrowIcon;\n\n const nextEle = createDivWithClassName(`${prefix}-flip-arrow`, controller);\n nextEle.innerHTML = RightArrowIcon;\n\n nextEle!.addEventListener('click', () => {\n const nextPageIndex =\n this.visiblePageIndex + 1 > this.pages.length - 1 ? 0 : this.visiblePageIndex + 1;\n this.onPageChange(nextPageIndex);\n });\n prevEle!.addEventListener('click', () => {\n const nextPageIndex =\n this.visiblePageIndex - 1 < 0 ? this.pages.length - 1 : this.visiblePageIndex - 1;\n\n this.onPageChange(nextPageIndex);\n });\n }\n\n /** 以镜像模式启动 */\n private initMirror() {\n if (!this.eventHub) {\n throw new Error('Invalid eventHub');\n }\n\n this.eventHub.on('sync', (ev: SyncEvent) => {\n if (ev.target !== 'whiteboard') {\n return;\n }\n\n if (ev.event === 'snap') {\n // 如果已经初始化完毕,则直接跳过\n if (this.isInitialized) {\n return;\n }\n\n this.onSnapshot(ev.data as SerializableWhiteboard);\n }\n\n if (ev.event === 'changeIndex' && ev.id === this.id) {\n if (this.isInitialized) {\n this.onPageChange(ev.data as number);\n }\n }\n });\n }\n\n /** 初始化 Siema */\n private initSiema() {\n // 初始化所有的占位图片,用于给 Siema 播放使用\n this.sources.forEach(source => {\n const imgEle = document.createElement('img');\n addClassName(imgEle, `${prefix}-img`);\n imgEle.src = source;\n imgEle.alt = 'Siema image';\n\n this.imgsContainer.appendChild(imgEle);\n });\n\n // 初始化 Siema,并且添加控制节点\n this.siema = new Siema({\n selector: this.imgsContainer,\n duration: 200,\n easing: 'ease-out',\n perPage: 1,\n startIndex: 0,\n draggable: false,\n multipleDrag: true,\n threshold: 20,\n loop: false,\n rtl: false\n });\n }\n\n /** 响应页面切换的事件 */\n private onPageChange(nextPageIndex: number) {\n this.siema.goTo(nextPageIndex);\n this.visiblePageIndex = nextPageIndex;\n\n // 将所有的 Page 隐藏\n this.pages.forEach((page, i) => {\n if (nextPageIndex === i) {\n page.show();\n } else {\n page.hide();\n }\n });\n\n if (this.mode === 'master' && this.eventHub) {\n this.eventHub.emit('sync', {\n event: 'changeIndex',\n id: this.id,\n target: 'whiteboard',\n data: nextPageIndex\n });\n }\n }\n\n private emitSnapshot() {\n const innerFunc = () => {\n if (this.eventHub) {\n this.eventHub.emit('sync', {\n event: 'snap',\n id: this.id,\n target: 'whiteboard',\n data: this.snap()\n });\n }\n };\n\n // 定期触发事件\n this.emitInterval = setInterval(() => {\n innerFunc();\n }, 5 * 1000);\n\n // 首次事件,延时 500ms 发出\n setTimeout(innerFunc, 500);\n }\n\n /** 响应获取到的快照事件 */\n private onSnapshot(snap: SerializableWhiteboard) {\n const { id, sources, pageIds, visiblePageIndex } = snap;\n\n if (!this.isInitialized) {\n this.id = id;\n this.sources = sources;\n this.initSiema();\n\n // 初始化所有的 WhitePages\n this.sources.forEach((source, i) => {\n const page = new WhitePage(\n { imgSrc: source },\n {\n mode: this.mode,\n eventHub: this.eventHub,\n parentContainer: this.pagesContainer\n }\n );\n page.id = pageIds[i];\n\n // 这里隐藏 Dashboard 的图片源,Siema 切换的是占位图片\n page.container.style.opacity = 'hidden';\n\n this.pages.push(page);\n\n page.open();\n });\n }\n\n this.isInitialized = true;\n this.onPageChange(visiblePageIndex);\n }\n}\n","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(\"Siema\",[],t):\"object\"==typeof exports?exports.Siema=t():e.Siema=t()}(\"undefined\"!=typeof self?self:this,function(){return function(e){function t(r){if(i[r])return i[r].exports;var n=i[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,r){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,\"a\",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=0)}([function(e,t,i){\"use strict\";function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}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},s=function(){function e(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,i,r){return i&&e(t.prototype,i),r&&e(t,r),t}}(),l=function(){function e(t){var i=this;if(r(this,e),this.config=e.mergeSettings(t),this.selector=\"string\"==typeof this.config.selector?document.querySelector(this.config.selector):this.config.selector,null===this.selector)throw new Error(\"Something wrong with your selector 😭\");this.resolveSlidesNumber(),this.selectorWidth=this.selector.offsetWidth,this.innerElements=[].slice.call(this.selector.children),this.currentSlide=this.config.loop?this.config.startIndex%this.innerElements.length:Math.max(0,Math.min(this.config.startIndex,this.innerElements.length-this.perPage)),this.transformProperty=e.webkitOrNot(),[\"resizeHandler\",\"touchstartHandler\",\"touchendHandler\",\"touchmoveHandler\",\"mousedownHandler\",\"mouseupHandler\",\"mouseleaveHandler\",\"mousemoveHandler\",\"clickHandler\"].forEach(function(e){i[e]=i[e].bind(i)}),this.init()}return s(e,[{key:\"attachEvents\",value:function(){window.addEventListener(\"resize\",this.resizeHandler),this.config.draggable&&(this.pointerDown=!1,this.drag={startX:0,endX:0,startY:0,letItGo:null,preventClick:!1},this.selector.addEventListener(\"touchstart\",this.touchstartHandler),this.selector.addEventListener(\"touchend\",this.touchendHandler),this.selector.addEventListener(\"touchmove\",this.touchmoveHandler),this.selector.addEventListener(\"mousedown\",this.mousedownHandler),this.selector.addEventListener(\"mouseup\",this.mouseupHandler),this.selector.addEventListener(\"mouseleave\",this.mouseleaveHandler),this.selector.addEventListener(\"mousemove\",this.mousemoveHandler),this.selector.addEventListener(\"click\",this.clickHandler))}},{key:\"detachEvents\",value:function(){window.removeEventListener(\"resize\",this.resizeHandler),this.selector.removeEventListener(\"touchstart\",this.touchstartHandler),this.selector.removeEventListener(\"touchend\",this.touchendHandler),this.selector.removeEventListener(\"touchmove\",this.touchmoveHandler),this.selector.removeEventListener(\"mousedown\",this.mousedownHandler),this.selector.removeEventListener(\"mouseup\",this.mouseupHandler),this.selector.removeEventListener(\"mouseleave\",this.mouseleaveHandler),this.selector.removeEventListener(\"mousemove\",this.mousemoveHandler),this.selector.removeEventListener(\"click\",this.clickHandler)}},{key:\"init\",value:function(){this.attachEvents(),this.selector.style.overflow=\"hidden\",this.selector.style.direction=this.config.rtl?\"rtl\":\"ltr\",this.buildSliderFrame(),this.config.onInit.call(this)}},{key:\"buildSliderFrame\",value:function(){var e=this.selectorWidth/this.perPage,t=this.config.loop?this.innerElements.length+2*this.perPage:this.innerElements.length;this.sliderFrame=document.createElement(\"div\"),this.sliderFrame.style.width=e*t+\"px\",this.enableTransition(),this.config.draggable&&(this.selector.style.cursor=\"-webkit-grab\");var i=document.createDocumentFragment();if(this.config.loop)for(var r=this.innerElements.length-this.perPage;r<this.innerElements.length;r++){var n=this.buildSliderFrameItem(this.innerElements[r].cloneNode(!0));i.appendChild(n)}for(var s=0;s<this.innerElements.length;s++){var l=this.buildSliderFrameItem(this.innerElements[s]);i.appendChild(l)}if(this.config.loop)for(var o=0;o<this.perPage;o++){var a=this.buildSliderFrameItem(this.innerElements[o].cloneNode(!0));i.appendChild(a)}this.sliderFrame.appendChild(i),this.selector.innerHTML=\"\",this.selector.appendChild(this.sliderFrame),this.slideToCurrent()}},{key:\"buildSliderFrameItem\",value:function(e){var t=document.createElement(\"div\");return t.style.cssFloat=this.config.rtl?\"right\":\"left\",t.style.float=this.config.rtl?\"right\":\"left\",t.style.width=(this.config.loop?100/(this.innerElements.length+2*this.perPage):100/this.innerElements.length)+\"%\",t.appendChild(e),t}},{key:\"resolveSlidesNumber\",value:function(){if(\"number\"==typeof this.config.perPage)this.perPage=this.config.perPage;else if(\"object\"===n(this.config.perPage)){this.perPage=1;for(var e in this.config.perPage)window.innerWidth>=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 i=this.currentSlide;if(this.config.loop){if(this.currentSlide-e<0){this.disableTransition();var r=this.currentSlide+this.innerElements.length,n=this.perPage,s=r+n,l=(this.config.rtl?1:-1)*s*(this.selectorWidth/this.perPage),o=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(l+o)+\"px, 0, 0)\",this.currentSlide=r-e}else this.currentSlide=this.currentSlide-e}else this.currentSlide=Math.max(this.currentSlide-e,0);i!==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 i=this.currentSlide;if(this.config.loop){if(this.currentSlide+e>this.innerElements.length-this.perPage){this.disableTransition();var r=this.currentSlide-this.innerElements.length,n=this.perPage,s=r+n,l=(this.config.rtl?1:-1)*s*(this.selectorWidth/this.perPage),o=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(l+o)+\"px, 0, 0)\",this.currentSlide=r+e}else this.currentSlide=this.currentSlide+e}else this.currentSlide=Math.min(this.currentSlide+e,this.innerElements.length-this.perPage);i!==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 i=this.currentSlide;this.currentSlide=this.config.loop?e%this.innerElements.length:Math.min(Math.max(e,0),this.innerElements.length-this.perPage),i!==this.currentSlide&&(this.slideToCurrent(),this.config.onChange.call(this),t&&t.call(this))}}},{key:\"slideToCurrent\",value:function(e){var t=this,i=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,r=(this.config.rtl?1:-1)*i*(this.selectorWidth/this.perPage);e?requestAnimationFrame(function(){requestAnimationFrame(function(){t.enableTransition(),t.sliderFrame.style[t.transformProperty]=\"translate3d(\"+r+\"px, 0, 0)\"})}):this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+r+\"px, 0, 0)\"}},{key:\"updateAfterDrag\",value:function(){var e=(this.config.rtl?-1:1)*(this.drag.endX-this.drag.startX),t=Math.abs(e),i=this.config.multipleDrag?Math.ceil(t/(this.selectorWidth/this.perPage)):1,r=e>0&&this.currentSlide-i<0,n=e<0&&this.currentSlide+i>this.innerElements.length-this.perPage;e>0&&t>this.config.threshold&&this.innerElements.length>this.perPage?this.prev(i):e<0&&t>this.config.threshold&&this.innerElements.length>this.perPage&&this.next(i),this.slideToCurrent(r||n)}},{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)<Math.abs(this.drag.startX-e.touches[0].pageX)),this.pointerDown&&this.drag.letItGo){e.preventDefault(),this.drag.endX=e.touches[0].pageX,this.sliderFrame.style.webkitTransition=\"all 0ms \"+this.config.easing,this.sliderFrame.style.transition=\"all 0ms \"+this.config.easing;var t=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,i=t*(this.selectorWidth/this.perPage),r=this.drag.endX-this.drag.startX,n=this.config.rtl?i+r:i-r;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(this.config.rtl?1:-1)*n+\"px, 0, 0)\"}}},{key:\"mousedownHandler\",value:function(e){-1!==[\"TEXTAREA\",\"OPTION\",\"INPUT\",\"SELECT\"].indexOf(e.target.nodeName)||(e.preventDefault(),e.stopPropagation(),this.pointerDown=!0,this.drag.startX=e.pageX)}},{key:\"mouseupHandler\",value:function(e){e.stopPropagation(),this.pointerDown=!1,this.selector.style.cursor=\"-webkit-grab\",this.enableTransition(),this.drag.endX&&this.updateAfterDrag(),this.clearDrag()}},{key:\"mousemoveHandler\",value:function(e){if(e.preventDefault(),this.pointerDown){\"A\"===e.target.nodeName&&(this.drag.preventClick=!0),this.drag.endX=e.pageX,this.selector.style.cursor=\"-webkit-grabbing\",this.sliderFrame.style.webkitTransition=\"all 0ms \"+this.config.easing,this.sliderFrame.style.transition=\"all 0ms \"+this.config.easing;var t=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,i=t*(this.selectorWidth/this.perPage),r=this.drag.endX-this.drag.startX,n=this.config.rtl?i+r:i-r;this.sliderFrame.style[this.transformProperty]=\"translate3d(\"+(this.config.rtl?1:-1)*n+\"px, 0, 0)\"}}},{key:\"mouseleaveHandler\",value:function(e){this.pointerDown&&(this.pointerDown=!1,this.selector.style.cursor=\"-webkit-grab\",this.drag.endX=e.pageX,this.drag.preventClick=!1,this.enableTransition(),this.updateAfterDrag(),this.clearDrag())}},{key:\"clickHandler\",value:function(e){this.drag.preventClick&&e.preventDefault(),this.drag.preventClick=!1}},{key:\"remove\",value:function(e,t){if(e<0||e>=this.innerElements.length)throw new Error(\"Item to remove doesn't exist 😭\");var i=e<this.currentSlide,r=this.currentSlide+this.perPage-1===e;(i||r)&&this.currentSlide--,this.innerElements.splice(e,1),this.buildSliderFrame(),t&&t.call(this)}},{key:\"insert\",value:function(e,t,i){if(t<0||t>this.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 r=t<=this.currentSlide>0&&this.innerElements.length;this.currentSlide=r?this.currentSlide+1:this.currentSlide,this.innerElements.splice(t,0,e),this.buildSliderFrame(),i&&i.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 i=document.createDocumentFragment(),r=0;r<this.innerElements.length;r++)i.appendChild(this.innerElements[r]);this.selector.innerHTML=\"\",this.selector.appendChild(i),this.selector.removeAttribute(\"style\")}t&&t.call(this)}}],[{key:\"mergeSettings\",value:function(e){var t={selector:\".siema\",duration:200,easing:\"ease-out\",perPage:1,startIndex:0,draggable:!0,multipleDrag:!0,threshold:20,loop:!1,rtl:!1,onInit:function(){},onChange:function(){}},i=e;for(var r in i)t[r]=i[r];return t}},{key:\"webkitOrNot\",value:function(){return\"string\"==typeof document.documentElement.style.transform?\"transform\":\"WebkitTransform\"}}]),e}();t.default=l,e.exports=t.default}])});","import { TextMarker } from './../../markers/TextMarker/index';\nimport { MarkerType } from './../../markers/types';\nimport { SyncEvent } from './../../event/Event';\nimport { EventHub } from '../../event/EventHub';\nimport { WhiteboardMode, WhitePageSource } from './../types';\nimport { Drawboard } from './../Drawboard/index';\nimport { uuid } from './../../utils/uuid';\nimport { getMarkerByType } from '../../markers/types';\n\nimport './index.less';\nimport { createDivWithClassName } from '../../utils/dom';\n\nconst prefix = 'fcw-page';\n\n/** 白板中的每一页 */\nexport class WhitePage {\n id: string = uuid();\n\n source: WhitePageSource;\n target: HTMLImageElement;\n\n /** UI Options */\n container: HTMLDivElement;\n // 父容器指针\n parentContainer?: HTMLDivElement;\n mode: WhiteboardMode = 'master';\n\n /** Handlers */\n drawboard: Drawboard;\n eventHub?: EventHub;\n\n constructor(\n source: WhitePageSource,\n {\n mode,\n eventHub,\n parentContainer\n }: { mode?: WhiteboardMode; eventHub?: EventHub; parentContainer?: HTMLDivElement } = {}\n ) {\n if (mode) {\n this.mode = mode;\n }\n this.eventHub = eventHub;\n this.parentContainer = parentContainer;\n\n this.initSource(source);\n\n if (this.mode === 'master') {\n this.initMaster();\n }\n\n if (this.mode === 'mirror') {\n this.initMirror();\n }\n }\n\n /** LifeCycle open - close */\n public open() {\n this.drawboard.open();\n }\n\n public hide() {\n this.drawboard.hide();\n }\n\n public show() {\n this.drawboard.show();\n }\n\n public close() {\n this.drawboard.close();\n }\n\n /** 初始化源 */\n private initSource(source: WhitePageSource) {\n // 判断 Source 的类型是否符合要求\n if (typeof source.imgSrc === 'string' && !this.parentContainer) {\n throw new Error('Invalid source, If you set image url, you must also set parentContainer');\n }\n\n this.source = source;\n\n // 如果传入的 imgEle,则直接使用\n if (source.imgEle) {\n this.target = source.imgEle!;\n }\n\n // 如果是图片,则需要创建 Image 元素\n if (typeof source.imgSrc === 'string') {\n this.container = createDivWithClassName(prefix, this.parentContainer!);\n this.container.id = this.id;\n\n this.target = document.createElement('img');\n this.target.src = source.imgSrc;\n this.target.alt = 'Siema image';\n\n this.container.appendChild(this.target);\n }\n }\n\n /** 以 Master 模式启动 */\n protected initMaster() {\n if (this.eventHub) {\n // 对于 WhitePage 中加载的 Drawboard,必须是传入自身可控的 Image 元素\n this.drawboard = new Drawboard(\n { imgEle: this.target },\n {\n page: this,\n onChange: ev => this.eventHub!.emit('sync', ev)\n }\n );\n } else {\n this.drawboard = new Drawboard({ imgEle: this.target }, { page: this });\n }\n }\n\n /** 以 Mirror 模式启动 */\n protected initMirror() {\n if (!this.eventHub) {\n throw new Error('Invalid eventHub');\n }\n\n this.drawboard = new Drawboard({ imgEle: this.target }, { page: this });\n\n this.eventHub.on('sync', (ev: SyncEvent) => {\n try {\n // 判断是否为 WhitePage 的同步\n if (ev.target === 'page' && ev.id === this.id) {\n this.onPageSync();\n }\n\n // 处理 Marker 的同步事件\n if (ev.target === 'marker') {\n this.onMarkerSync(ev);\n }\n } catch (e) {\n console.warn(e);\n }\n });\n }\n\n /** 处理 Page 的同步事件 */\n private onPageSync() {}\n\n /** 处理 Marker 的同步事件 */\n private onMarkerSync(ev: SyncEvent) {\n if (ev.event === 'add' && ev.parentId === this.id) {\n const data: { id: string; type: MarkerType } = ev.data as {\n id: string;\n type: MarkerType;\n };\n\n // 这里判断该 Marker 是否已经添加过;如果已经存在则忽略\n const marker = this.drawboard.markerMap[data.id];\n if (!marker) {\n this.drawboard.addMarker(getMarkerByType(data.type), { id: data.id });\n }\n }\n\n // 其余的情况,不存在 id 则直接返回空\n if (!ev.id) {\n return;\n }\n\n if (ev.event === 'remove') {\n const data: { id: string } = ev.data as {\n id: string;\n };\n\n const marker = this.drawboard.markerMap[data.id];\n if (marker) {\n this.drawboard.deleteMarker(marker);\n }\n }\n\n if (ev.event === 'move' || ev.event === 'resize') {\n const marker = this.drawboard.markerMap[ev.id];\n\n if (marker) {\n marker.reactToManipulation(ev.event, ev.data as any);\n }\n }\n\n // 响应文本变化事件\n if (ev.event === 'changeText') {\n const marker = this.drawboard.markerMap[ev.id] as TextMarker;\n if (marker) {\n marker.setText(ev.data as string);\n }\n }\n }\n}\n","import { HighlightMarker } from './HighlightMarker/index';\nimport { TextMarker } from './TextMarker/index';\nimport { ArrowMarker } from './ArrowMarker/index';\nimport { BaseMarker } from './BaseMarker/index';\nimport { CoverMarker } from './CoverMarker';\nimport { LineMarker } from './LineMarker';\nimport { RectMarker } from './RectMarker';\n\nexport type MarkerType = 'base' | 'arrow' | 'cover' | 'line' | 'rect' | 'text' | 'highlight';\n\nexport function getMarkerByType(type: MarkerType): typeof BaseMarker {\n switch (type) {\n case 'arrow':\n return ArrowMarker;\n case 'base':\n return BaseMarker;\n case 'cover':\n return CoverMarker;\n case 'highlight':\n return HighlightMarker;\n case 'line':\n return LineMarker;\n case 'rect':\n return RectMarker;\n case 'text':\n return TextMarker;\n default:\n return BaseMarker;\n }\n}\n","\nvar content = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\", function() {\n\t\tvar newContent = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","exports = module.exports = require(\"../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".fcw-page img {\\n width: 100%;\\n height: 100%;\\n}\\n\", \"\"]);\n\n","\nvar content = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\", function() {\n\t\tvar newContent = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--11-1!../../../node_modules/postcss-loader/src/index.js!../../../node_modules/less-loader/dist/cjs.js??ref--11-3!./index.less\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","exports = module.exports = require(\"../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".fcw-board-imgs,\\n.fcw-board-pages,\\n.fcw-board .fcw-page {\\n position: absolute;\\n top: 0;\\n left: 0;\\n width: 100%;\\n height: 100%;\\n}\\n.fcw-board-img {\\n width: 100%;\\n height: 100%;\\n}\\n.fcw-board-flip-arrow {\\n height: 20px;\\n width: 20px;\\n cursor: pointer;\\n}\\n.fcw-board-controller {\\n position: absolute;\\n display: -ms-flexbox;\\n display: flex;\\n width: 50px;\\n height: 30px;\\n -ms-flex-pack: justify;\\n justify-content: space-between;\\n -ms-flex-align: center;\\n align-items: center;\\n top: -30px;\\n background-color: #cccccc;\\n padding: 0px 5px;\\n margin: 0px;\\n border-top-left-radius: 10px;\\n border-top-right-radius: 10px;\\n}\\n\", \"\"]);\n\n","module.exports = \"<svg t=\\\"1553418887330\\\" class=\\\"icon\\\" style viewBox=\\\"0 0 1024 1024\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" p-id=\\\"2264\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><defs><style type=\\\"text/css\\\"></style></defs><path d=\\\"M787.797333 90.197333a42.581333 42.581333 0 0 0-44.074666 2.688l-554.666667 384a42.794667 42.794667 0 0 0 0 70.186667l554.666667 384A42.666667 42.666667 0 0 0 810.666667 896V128a42.666667 42.666667 0 0 0-22.869334-37.802667zM725.333333 814.549333L288.298667 512 725.333333 209.450667v605.098666z\\\" p-id=\\\"2265\\\"></path></svg>\"","module.exports = \"<svg t=\\\"1553418900235\\\" class=\\\"icon\\\" style viewBox=\\\"0 0 1024 1024\\\" version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" p-id=\\\"2709\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\"><defs><style type=\\\"text/css\\\"></style></defs><path d=\\\"M236.202667 933.802667a42.837333 42.837333 0 0 0 44.074666-2.730667l554.666667-384a42.666667 42.666667 0 0 0 0-70.144l-554.666667-384A42.581333 42.581333 0 0 0 213.333333 128v768a42.666667 42.666667 0 0 0 22.869334 37.802667zM298.666667 209.450667L735.701333 512 298.666667 814.549333V209.450667z\\\" p-id=\\\"2710\\\"></path></svg>\""],"sourceRoot":""}