{"version":3,"sources":["webpack:///./node_modules/deepmerge/dist/cjs.js","webpack:///./node_modules/konva/lib/Context.js","webpack:///./node_modules/konva/lib/DragAndDrop.js","webpack:///./node_modules/konva/lib/Container.js","webpack:///./node_modules/konva/lib/Animation.js","webpack:///./node_modules/konva/lib/Canvas.js"],"names":["isMergeableObject","value","isNonNullObject","isSpecial","stringValue","Object","prototype","toString","call","isReactElement","canUseSymbol","Symbol","for","REACT_ELEMENT_TYPE","$$typeof","emptyTarget","val","Array","isArray","cloneUnlessOtherwiseSpecified","options","clone","deepmerge","defaultArrayMerge","target","source","concat","map","element","getMergeFunction","key","customMerge","getEnumerableOwnPropertySymbols","getOwnPropertySymbols","filter","symbol","propertyIsEnumerable","getKeys","keys","propertyIsOnObject","object","property","_","propertyIsUnsafe","hasOwnProperty","mergeObject","destination","forEach","arrayMerge","sourceIsArray","targetIsArray","sourceAndTargetTypesMatch","all","array","Error","reduce","prev","next","deepmerge_1","module","exports","__extends","this","extendStatics","d","b","setPrototypeOf","__proto__","p","__","constructor","create","defineProperty","HitContext","SceneContext","Context","Util_1","Global_1","COMMA","OPEN_PAREN","CLOSE_PAREN","OPEN_PAREN_BRACKET","CLOSE_BRACKET_PAREN","SEMICOLON","DOUBLE_PAREN","EQUALS","CONTEXT_METHODS","CONTEXT_PROPERTIES","traceArrMax","canvas","_context","_canvas","getContext","Konva","enableTrace","traceArr","_enableTrace","fillShape","shape","fillEnabled","_fill","strokeShape","hasStroke","_stroke","fillStrokeShape","attrs","fillAfterStrokeEnabled","getTrace","relaxed","n","trace","method","args","len","length","str","Util","_isArray","join","clearTrace","_trace","push","shift","reset","pixelRatio","getCanvas","getPixelRatio","setTransform","clear","bounds","clearRect","x","y","width","height","getWidth","getHeight","_applyLineCap","lineCap","getLineCap","setAttr","_applyOpacity","absOpacity","getAbsoluteOpacity","_applyLineJoin","lineJoin","attr","arc","a0","a1","a2","a3","a4","a5","arcTo","beginPath","bezierCurveTo","clip","closePath","createImageData","a","arguments","createLinearGradient","createPattern","createRadialGradient","drawImage","a6","a7","a8","ellipse","isPointInPath","fill","fillRect","strokeRect","fillText","measureText","text","getImageData","lineTo","moveTo","rect","putImageData","quadraticCurveTo","restore","rotate","save","scale","setLineDash","getLineDash","stroke","strokeText","transform","translate","that","_simplifyArray","origSetter","func","methodName","ret","origMethod","slice","apply","prop","_applyGlobalCompositeOperation","node","globalCompositeOperation","getGlobalCompositeOperation","get","set","_super","_fillColor","_fillFunc","_fillPattern","fillPatternX","getFillPatternX","fillPatternY","getFillPatternY","fillPatternRotation","getAngle","getFillPatternRotation","fillPatternOffsetX","getFillPatternOffsetX","fillPatternOffsetY","getFillPatternOffsetY","getFillPatternScaleX","getFillPatternScaleY","_getFillPattern","_fillLinearGradient","grd","_getLinearGradient","_fillRadialGradient","_getRadialGradient","hasColor","fillPriority","getFillPriority","hasPattern","getFillPatternImage","hasLinearGradient","getFillLinearGradientColorStops","hasRadialGradient","getFillRadialGradientColorStops","_strokeLinearGradient","start","getStrokeLinearGradientStartPoint","end","getStrokeLinearGradientEndPoint","colorStops","getStrokeLinearGradientColorStops","addColorStop","dash","strokeScaleEnabled","getStrokeScaleEnabled","dashEnabled","dashOffset","strokeWidth","getShadowForStrokeEnabled","_strokeFunc","_applyShadow","util","color","getShadowRGBA","blur","getShadowBlur","offset","getShadowOffset","getAbsoluteScale","ratio","scaleX","scaleY","Math","min","abs","colorKey","_fillFuncHit","hasHitStroke","hitStrokeWidth","_strokeFuncHit","DD","flag","_dragElements","elem","dragStatus","justDragged","Map","_drag","evt","nodesToFireEvents","stage","getStage","setPointersPositions","undefined","pointerId","_getFirstPointerId","pos","_changedPointerPositions","find","id","dragDistance","distance","max","startPointerPos","startDrag","isDragging","_setDragPosition","fire","type","_endDragBefore","listenClickTap","drawNode","getLayer","batchDraw","_endDragAfter","delete","isBrowser","window","addEventListener","Container","Factory_1","Node_1","Validators_1","_this","children","Collection","getChildren","filterFunc","results","each","child","hasChildren","removeChildren","i","parent","index","remove","destroyChildren","destroy","add","_i","getParent","_children","_validateAdd","_clearCaches","_fire","selector","_generalFind","warn","findOne","result","retArr","_descendants","valid","_isMatch","toCollection","fn","shouldStop","toObject","obj","Node","isAncestorOf","_id","no","getAllIntersections","arr","isVisible","intersects","_setChildrenIndices","drawScene","can","top","layer","context","cachedCanvas","_getCanvasCache","cachedSceneCanvas","scene","caching","isCache","m","getAbsoluteTransform","getMatrix","_drawCachedSceneCanvas","_drawChildren","drawHit","shouldDrawHit","hitCanvas","cachedHitCanvas","hit","_drawCachedHitCanvas","drawMethod","clipWidth","clipHeight","clipFunc","hasClip","selfCache","clipX","clipY","copy","invert","hasComposition","getClientRect","config","minX","minY","maxX","maxY","skipTransform","relativeTo","selfRect","Infinity","visible","skipShadow","skipStroke","shapes","hasVisible","_isVisible","_transformedRect","Factory","addComponentsGetterSetter","addGetterSetter","getNumberValidator","mapMethods","Animation","now","glob","performance","Date","getTime","layers","animIdCounter","frame","time","timeDiff","lastTime","frameRate","setLayers","lays","getLayers","addLayer","isRunning","animations","stop","_addAnimation","_removeAnimation","_updateFrameObject","anim","_handleAnimation","splice","_runFrames","layersLen","needRedraw","layerHash","draw","_animationLoop","Anim","requestAnimationFrame","animRunning","HitCanvas","SceneCanvas","Canvas","_pixelRatio","Context_1","getDevicePixelRatio","createCanvasElement","devicePixelRatio","_global","backingStoreRatio","webkitBackingStorePixelRatio","mozBackingStorePixelRatio","msBackingStorePixelRatio","oBackingStorePixelRatio","backingStorePixelRatio","conf","style","padding","margin","border","background","position","left","setPixelRatio","previousRatio","setSize","setWidth","setHeight","toDataURL","mimeType","quality","e","err","error","message"],"mappings":"0HAEA,IAAIA,EAAoB,SAA2BC,GAClD,OAAOC,EAAgBD,KAClBE,EAAUF,IAGhB,SAASC,EAAgBD,GACxB,QAASA,GAA0B,kBAAVA,EAG1B,SAASE,EAAUF,GAClB,IAAIG,EAAcC,OAAOC,UAAUC,SAASC,KAAKP,GAEjD,MAAuB,oBAAhBG,GACa,kBAAhBA,GACAK,E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EAnEE,GAqEb9Y,EAAQ8Y,OAASA,EACjB7I,EAAUmG,QAAQE,gBAAgBwC,EAAQ,kBAAcxK,EAAW6B,EAAaoG,sBAChF,IAAIsC,EAAe,SAAUxP,GAEzB,SAASwP,EAAYzD,QACF,IAAXA,IAAqBA,EAAS,CAAE3Q,MAAO,EAAGC,OAAQ,IACtD,IAAI0L,EAAQ/G,EAAOzM,KAAKsD,KAAMkV,IAAWlV,KAGzC,OAFAkQ,EAAMkD,QAAU,IAAI0F,EAAUlY,aAAasP,GAC3CA,EAAMiK,QAAQjF,EAAO3Q,MAAO2Q,EAAO1Q,QAC5B0L,EAEX,OARAnQ,EAAU4Y,EAAaxP,GAQhBwP,EATO,CAUhBC,GACF9Y,EAAQ6Y,YAAcA,EACtB,IAAID,EAAa,SAAUvP,GAEvB,SAASuP,EAAUxD,QACA,IAAXA,IAAqBA,EAAS,CAAE3Q,MAAO,EAAGC,OAAQ,IACtD,IAAI0L,EAAQ/G,EAAOzM,KAAKsD,KAAMkV,IAAWlV,KAIzC,OAHAkQ,EAAMgE,WAAY,EAClBhE,EAAMkD,QAAU,IAAI0F,EAAUnY,WAAWuP,GACzCA,EAAMiK,QAAQjF,EAAO3Q,MAAO2Q,EAAO1Q,QAC5B0L,EAEX,OATAnQ,EAAU2Y,EAAWvP,GASduP,EAVK,CAWdE,GACF9Y,EAAQ4Y,UAAYA","file":"js/chunk-vendors~b5906859.de360b69.js","sourcesContent":["'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HitContext = exports.SceneContext = exports.Context = void 0;\nvar Util_1 = require(\"./Util\");\nvar Global_1 = require(\"./Global\");\nvar COMMA = ',', OPEN_PAREN = '(', CLOSE_PAREN = ')', OPEN_PAREN_BRACKET = '([', CLOSE_BRACKET_PAREN = '])', SEMICOLON = ';', DOUBLE_PAREN = '()', EQUALS = '=', CONTEXT_METHODS = [\n 'arc',\n 'arcTo',\n 'beginPath',\n 'bezierCurveTo',\n 'clearRect',\n 'clip',\n 'closePath',\n 'createLinearGradient',\n 'createPattern',\n 'createRadialGradient',\n 'drawImage',\n 'ellipse',\n 'fill',\n 'fillText',\n 'getImageData',\n 'createImageData',\n 'lineTo',\n 'moveTo',\n 'putImageData',\n 'quadraticCurveTo',\n 'rect',\n 'restore',\n 'rotate',\n 'save',\n 'scale',\n 'setLineDash',\n 'setTransform',\n 'stroke',\n 'strokeText',\n 'transform',\n 'translate',\n];\nvar CONTEXT_PROPERTIES = [\n 'fillStyle',\n 'strokeStyle',\n 'shadowColor',\n 'shadowBlur',\n 'shadowOffsetX',\n 'shadowOffsetY',\n 'lineCap',\n 'lineDashOffset',\n 'lineJoin',\n 'lineWidth',\n 'miterLimit',\n 'font',\n 'textAlign',\n 'textBaseline',\n 'globalAlpha',\n 'globalCompositeOperation',\n 'imageSmoothingEnabled',\n];\nvar traceArrMax = 100;\nvar Context = (function () {\n function Context(canvas) {\n this.canvas = canvas;\n this._context = canvas._canvas.getContext('2d');\n if (Global_1.Konva.enableTrace) {\n this.traceArr = [];\n this._enableTrace();\n }\n }\n Context.prototype.fillShape = function (shape) {\n if (shape.fillEnabled()) {\n this._fill(shape);\n }\n };\n Context.prototype._fill = function (shape) {\n };\n Context.prototype.strokeShape = function (shape) {\n if (shape.hasStroke()) {\n this._stroke(shape);\n }\n };\n Context.prototype._stroke = function (shape) {\n };\n Context.prototype.fillStrokeShape = function (shape) {\n if (shape.attrs.fillAfterStrokeEnabled) {\n this.strokeShape(shape);\n this.fillShape(shape);\n }\n else {\n this.fillShape(shape);\n this.strokeShape(shape);\n }\n };\n Context.prototype.getTrace = function (relaxed) {\n var traceArr = this.traceArr, len = traceArr.length, str = '', n, trace, method, args;\n for (n = 0; n < len; n++) {\n trace = traceArr[n];\n method = trace.method;\n if (method) {\n args = trace.args;\n str += method;\n if (relaxed) {\n str += DOUBLE_PAREN;\n }\n else {\n if (Util_1.Util._isArray(args[0])) {\n str += OPEN_PAREN_BRACKET + args.join(COMMA) + CLOSE_BRACKET_PAREN;\n }\n else {\n str += OPEN_PAREN + args.join(COMMA) + CLOSE_PAREN;\n }\n }\n }\n else {\n str += trace.property;\n if (!relaxed) {\n str += EQUALS + trace.val;\n }\n }\n str += SEMICOLON;\n }\n return str;\n };\n Context.prototype.clearTrace = function () {\n this.traceArr = [];\n };\n Context.prototype._trace = function (str) {\n var traceArr = this.traceArr, len;\n traceArr.push(str);\n len = traceArr.length;\n if (len >= traceArrMax) {\n traceArr.shift();\n }\n };\n Context.prototype.reset = function () {\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(1 * pixelRatio, 0, 0, 1 * pixelRatio, 0, 0);\n };\n Context.prototype.getCanvas = function () {\n return this.canvas;\n };\n Context.prototype.clear = function (bounds) {\n var canvas = this.getCanvas();\n if (bounds) {\n this.clearRect(bounds.x || 0, bounds.y || 0, bounds.width || 0, bounds.height || 0);\n }\n else {\n this.clearRect(0, 0, canvas.getWidth() / canvas.pixelRatio, canvas.getHeight() / canvas.pixelRatio);\n }\n };\n Context.prototype._applyLineCap = function (shape) {\n var lineCap = shape.getLineCap();\n if (lineCap) {\n this.setAttr('lineCap', lineCap);\n }\n };\n Context.prototype._applyOpacity = function (shape) {\n var absOpacity = shape.getAbsoluteOpacity();\n if (absOpacity !== 1) {\n this.setAttr('globalAlpha', absOpacity);\n }\n };\n Context.prototype._applyLineJoin = function (shape) {\n var lineJoin = shape.attrs.lineJoin;\n if (lineJoin) {\n this.setAttr('lineJoin', lineJoin);\n }\n };\n Context.prototype.setAttr = function (attr, val) {\n this._context[attr] = val;\n };\n Context.prototype.arc = function (a0, a1, a2, a3, a4, a5) {\n this._context.arc(a0, a1, a2, a3, a4, a5);\n };\n Context.prototype.arcTo = function (a0, a1, a2, a3, a4) {\n this._context.arcTo(a0, a1, a2, a3, a4);\n };\n Context.prototype.beginPath = function () {\n this._context.beginPath();\n };\n Context.prototype.bezierCurveTo = function (a0, a1, a2, a3, a4, a5) {\n this._context.bezierCurveTo(a0, a1, a2, a3, a4, a5);\n };\n Context.prototype.clearRect = function (a0, a1, a2, a3) {\n this._context.clearRect(a0, a1, a2, a3);\n };\n Context.prototype.clip = function () {\n this._context.clip();\n };\n Context.prototype.closePath = function () {\n this._context.closePath();\n };\n Context.prototype.createImageData = function (a0, a1) {\n var a = arguments;\n if (a.length === 2) {\n return this._context.createImageData(a0, a1);\n }\n else if (a.length === 1) {\n return this._context.createImageData(a0);\n }\n };\n Context.prototype.createLinearGradient = function (a0, a1, a2, a3) {\n return this._context.createLinearGradient(a0, a1, a2, a3);\n };\n Context.prototype.createPattern = function (a0, a1) {\n return this._context.createPattern(a0, a1);\n };\n Context.prototype.createRadialGradient = function (a0, a1, a2, a3, a4, a5) {\n return this._context.createRadialGradient(a0, a1, a2, a3, a4, a5);\n };\n Context.prototype.drawImage = function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n var a = arguments, _context = this._context;\n if (a.length === 3) {\n _context.drawImage(a0, a1, a2);\n }\n else if (a.length === 5) {\n _context.drawImage(a0, a1, a2, a3, a4);\n }\n else if (a.length === 9) {\n _context.drawImage(a0, a1, a2, a3, a4, a5, a6, a7, a8);\n }\n };\n Context.prototype.ellipse = function (a0, a1, a2, a3, a4, a5, a6, a7) {\n this._context.ellipse(a0, a1, a2, a3, a4, a5, a6, a7);\n };\n Context.prototype.isPointInPath = function (x, y) {\n return this._context.isPointInPath(x, y);\n };\n Context.prototype.fill = function () {\n this._context.fill();\n };\n Context.prototype.fillRect = function (x, y, width, height) {\n this._context.fillRect(x, y, width, height);\n };\n Context.prototype.strokeRect = function (x, y, width, height) {\n this._context.strokeRect(x, y, width, height);\n };\n Context.prototype.fillText = function (a0, a1, a2) {\n this._context.fillText(a0, a1, a2);\n };\n Context.prototype.measureText = function (text) {\n return this._context.measureText(text);\n };\n Context.prototype.getImageData = function (a0, a1, a2, a3) {\n return this._context.getImageData(a0, a1, a2, a3);\n };\n Context.prototype.lineTo = function (a0, a1) {\n this._context.lineTo(a0, a1);\n };\n Context.prototype.moveTo = function (a0, a1) {\n this._context.moveTo(a0, a1);\n };\n Context.prototype.rect = function (a0, a1, a2, a3) {\n this._context.rect(a0, a1, a2, a3);\n };\n Context.prototype.putImageData = function (a0, a1, a2) {\n this._context.putImageData(a0, a1, a2);\n };\n Context.prototype.quadraticCurveTo = function (a0, a1, a2, a3) {\n this._context.quadraticCurveTo(a0, a1, a2, a3);\n };\n Context.prototype.restore = function () {\n this._context.restore();\n };\n Context.prototype.rotate = function (a0) {\n this._context.rotate(a0);\n };\n Context.prototype.save = function () {\n this._context.save();\n };\n Context.prototype.scale = function (a0, a1) {\n this._context.scale(a0, a1);\n };\n Context.prototype.setLineDash = function (a0) {\n if (this._context.setLineDash) {\n this._context.setLineDash(a0);\n }\n else if ('mozDash' in this._context) {\n this._context['mozDash'] = a0;\n }\n else if ('webkitLineDash' in this._context) {\n this._context['webkitLineDash'] = a0;\n }\n };\n Context.prototype.getLineDash = function () {\n return this._context.getLineDash();\n };\n Context.prototype.setTransform = function (a0, a1, a2, a3, a4, a5) {\n this._context.setTransform(a0, a1, a2, a3, a4, a5);\n };\n Context.prototype.stroke = function () {\n this._context.stroke();\n };\n Context.prototype.strokeText = function (a0, a1, a2, a3) {\n this._context.strokeText(a0, a1, a2, a3);\n };\n Context.prototype.transform = function (a0, a1, a2, a3, a4, a5) {\n this._context.transform(a0, a1, a2, a3, a4, a5);\n };\n Context.prototype.translate = function (a0, a1) {\n this._context.translate(a0, a1);\n };\n Context.prototype._enableTrace = function () {\n var that = this, len = CONTEXT_METHODS.length, _simplifyArray = Util_1.Util._simplifyArray, origSetter = this.setAttr, n, args;\n var func = function (methodName) {\n var origMethod = that[methodName], ret;\n that[methodName] = function () {\n args = _simplifyArray(Array.prototype.slice.call(arguments, 0));\n ret = origMethod.apply(that, arguments);\n that._trace({\n method: methodName,\n args: args,\n });\n return ret;\n };\n };\n for (n = 0; n < len; n++) {\n func(CONTEXT_METHODS[n]);\n }\n that.setAttr = function () {\n origSetter.apply(that, arguments);\n var prop = arguments[0];\n var val = arguments[1];\n if (prop === 'shadowOffsetX' ||\n prop === 'shadowOffsetY' ||\n prop === 'shadowBlur') {\n val = val / this.canvas.getPixelRatio();\n }\n that._trace({\n property: prop,\n val: val,\n });\n };\n };\n Context.prototype._applyGlobalCompositeOperation = function (node) {\n var globalCompositeOperation = node.getGlobalCompositeOperation();\n if (globalCompositeOperation !== 'source-over') {\n this.setAttr('globalCompositeOperation', globalCompositeOperation);\n }\n };\n return Context;\n}());\nexports.Context = Context;\nCONTEXT_PROPERTIES.forEach(function (prop) {\n Object.defineProperty(Context.prototype, prop, {\n get: function () {\n return this._context[prop];\n },\n set: function (val) {\n this._context[prop] = val;\n },\n });\n});\nvar SceneContext = (function (_super) {\n __extends(SceneContext, _super);\n function SceneContext() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SceneContext.prototype._fillColor = function (shape) {\n var fill = shape.fill();\n this.setAttr('fillStyle', fill);\n shape._fillFunc(this);\n };\n SceneContext.prototype._fillPattern = function (shape) {\n var fillPatternX = shape.getFillPatternX(), fillPatternY = shape.getFillPatternY(), fillPatternRotation = Global_1.Konva.getAngle(shape.getFillPatternRotation()), fillPatternOffsetX = shape.getFillPatternOffsetX(), fillPatternOffsetY = shape.getFillPatternOffsetY(), fillPatternScaleX = shape.getFillPatternScaleX(), fillPatternScaleY = shape.getFillPatternScaleY();\n if (fillPatternX || fillPatternY) {\n this.translate(fillPatternX || 0, fillPatternY || 0);\n }\n if (fillPatternRotation) {\n this.rotate(fillPatternRotation);\n }\n if (fillPatternScaleX || fillPatternScaleY) {\n }\n if (fillPatternOffsetX || fillPatternOffsetY) {\n this.translate(-1 * fillPatternOffsetX, -1 * fillPatternOffsetY);\n }\n this.setAttr('fillStyle', shape._getFillPattern());\n shape._fillFunc(this);\n };\n SceneContext.prototype._fillLinearGradient = function (shape) {\n var grd = shape._getLinearGradient();\n if (grd) {\n this.setAttr('fillStyle', grd);\n shape._fillFunc(this);\n }\n };\n SceneContext.prototype._fillRadialGradient = function (shape) {\n var grd = shape._getRadialGradient();\n if (grd) {\n this.setAttr('fillStyle', grd);\n shape._fillFunc(this);\n }\n };\n SceneContext.prototype._fill = function (shape) {\n var hasColor = shape.fill(), fillPriority = shape.getFillPriority();\n if (hasColor && fillPriority === 'color') {\n this._fillColor(shape);\n return;\n }\n var hasPattern = shape.getFillPatternImage();\n if (hasPattern && fillPriority === 'pattern') {\n this._fillPattern(shape);\n return;\n }\n var hasLinearGradient = shape.getFillLinearGradientColorStops();\n if (hasLinearGradient && fillPriority === 'linear-gradient') {\n this._fillLinearGradient(shape);\n return;\n }\n var hasRadialGradient = shape.getFillRadialGradientColorStops();\n if (hasRadialGradient && fillPriority === 'radial-gradient') {\n this._fillRadialGradient(shape);\n return;\n }\n if (hasColor) {\n this._fillColor(shape);\n }\n else if (hasPattern) {\n this._fillPattern(shape);\n }\n else if (hasLinearGradient) {\n this._fillLinearGradient(shape);\n }\n else if (hasRadialGradient) {\n this._fillRadialGradient(shape);\n }\n };\n SceneContext.prototype._strokeLinearGradient = function (shape) {\n var start = shape.getStrokeLinearGradientStartPoint(), end = shape.getStrokeLinearGradientEndPoint(), colorStops = shape.getStrokeLinearGradientColorStops(), grd = this.createLinearGradient(start.x, start.y, end.x, end.y);\n if (colorStops) {\n for (var n = 0; n < colorStops.length; n += 2) {\n grd.addColorStop(colorStops[n], colorStops[n + 1]);\n }\n this.setAttr('strokeStyle', grd);\n }\n };\n SceneContext.prototype._stroke = function (shape) {\n var dash = shape.dash(), strokeScaleEnabled = shape.getStrokeScaleEnabled();\n if (shape.hasStroke()) {\n if (!strokeScaleEnabled) {\n this.save();\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n }\n this._applyLineCap(shape);\n if (dash && shape.dashEnabled()) {\n this.setLineDash(dash);\n this.setAttr('lineDashOffset', shape.dashOffset());\n }\n this.setAttr('lineWidth', shape.strokeWidth());\n if (!shape.getShadowForStrokeEnabled()) {\n this.setAttr('shadowColor', 'rgba(0,0,0,0)');\n }\n var hasLinearGradient = shape.getStrokeLinearGradientColorStops();\n if (hasLinearGradient) {\n this._strokeLinearGradient(shape);\n }\n else {\n this.setAttr('strokeStyle', shape.stroke());\n }\n shape._strokeFunc(this);\n if (!strokeScaleEnabled) {\n this.restore();\n }\n }\n };\n SceneContext.prototype._applyShadow = function (shape) {\n var util = Util_1.Util, color = util.get(shape.getShadowRGBA(), 'black'), blur = util.get(shape.getShadowBlur(), 5), offset = util.get(shape.getShadowOffset(), {\n x: 0,\n y: 0,\n }), scale = shape.getAbsoluteScale(), ratio = this.canvas.getPixelRatio(), scaleX = scale.x * ratio, scaleY = scale.y * ratio;\n this.setAttr('shadowColor', color);\n this.setAttr('shadowBlur', blur * Math.min(Math.abs(scaleX), Math.abs(scaleY)));\n this.setAttr('shadowOffsetX', offset.x * scaleX);\n this.setAttr('shadowOffsetY', offset.y * scaleY);\n };\n return SceneContext;\n}(Context));\nexports.SceneContext = SceneContext;\nvar HitContext = (function (_super) {\n __extends(HitContext, _super);\n function HitContext() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HitContext.prototype._fill = function (shape) {\n this.save();\n this.setAttr('fillStyle', shape.colorKey);\n shape._fillFuncHit(this);\n this.restore();\n };\n HitContext.prototype.strokeShape = function (shape) {\n if (shape.hasHitStroke()) {\n this._stroke(shape);\n }\n };\n HitContext.prototype._stroke = function (shape) {\n if (shape.hasHitStroke()) {\n var strokeScaleEnabled = shape.getStrokeScaleEnabled();\n if (!strokeScaleEnabled) {\n this.save();\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n }\n this._applyLineCap(shape);\n var hitStrokeWidth = shape.hitStrokeWidth();\n var strokeWidth = hitStrokeWidth === 'auto' ? shape.strokeWidth() : hitStrokeWidth;\n this.setAttr('lineWidth', strokeWidth);\n this.setAttr('strokeStyle', shape.colorKey);\n shape._strokeFuncHit(this);\n if (!strokeScaleEnabled) {\n this.restore();\n }\n }\n };\n return HitContext;\n}(Context));\nexports.HitContext = HitContext;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DD = void 0;\nvar Global_1 = require(\"./Global\");\nvar Util_1 = require(\"./Util\");\nexports.DD = {\n get isDragging() {\n var flag = false;\n exports.DD._dragElements.forEach(function (elem) {\n if (elem.dragStatus === 'dragging') {\n flag = true;\n }\n });\n return flag;\n },\n justDragged: false,\n get node() {\n var node;\n exports.DD._dragElements.forEach(function (elem) {\n node = elem.node;\n });\n return node;\n },\n _dragElements: new Map(),\n _drag: function (evt) {\n var nodesToFireEvents = [];\n exports.DD._dragElements.forEach(function (elem, key) {\n var node = elem.node;\n var stage = node.getStage();\n stage.setPointersPositions(evt);\n if (elem.pointerId === undefined) {\n elem.pointerId = Util_1.Util._getFirstPointerId(evt);\n }\n var pos = stage._changedPointerPositions.find(function (pos) { return pos.id === elem.pointerId; });\n if (!pos) {\n return;\n }\n if (elem.dragStatus !== 'dragging') {\n var dragDistance = node.dragDistance();\n var distance = Math.max(Math.abs(pos.x - elem.startPointerPos.x), Math.abs(pos.y - elem.startPointerPos.y));\n if (distance < dragDistance) {\n return;\n }\n node.startDrag({ evt: evt });\n if (!node.isDragging()) {\n return;\n }\n }\n node._setDragPosition(evt, elem);\n nodesToFireEvents.push(node);\n });\n nodesToFireEvents.forEach(function (node) {\n node.fire('dragmove', {\n type: 'dragmove',\n target: node,\n evt: evt,\n }, true);\n });\n },\n _endDragBefore: function (evt) {\n exports.DD._dragElements.forEach(function (elem, key) {\n var node = elem.node;\n var stage = node.getStage();\n if (evt) {\n stage.setPointersPositions(evt);\n }\n var pos = stage._changedPointerPositions.find(function (pos) { return pos.id === elem.pointerId; });\n if (!pos) {\n return;\n }\n if (elem.dragStatus === 'dragging' || elem.dragStatus === 'stopped') {\n exports.DD.justDragged = true;\n Global_1.Konva.listenClickTap = false;\n elem.dragStatus = 'stopped';\n }\n var drawNode = elem.node.getLayer() ||\n (elem.node instanceof Global_1.Konva['Stage'] && elem.node);\n if (drawNode) {\n drawNode.batchDraw();\n }\n });\n },\n _endDragAfter: function (evt) {\n exports.DD._dragElements.forEach(function (elem, key) {\n if (elem.dragStatus === 'stopped') {\n elem.node.fire('dragend', {\n type: 'dragend',\n target: elem.node,\n evt: evt,\n }, true);\n }\n if (elem.dragStatus !== 'dragging') {\n exports.DD._dragElements.delete(key);\n }\n });\n },\n};\nif (Global_1.Konva.isBrowser) {\n window.addEventListener('mouseup', exports.DD._endDragBefore, true);\n window.addEventListener('touchend', exports.DD._endDragBefore, true);\n window.addEventListener('mousemove', exports.DD._drag);\n window.addEventListener('touchmove', exports.DD._drag);\n window.addEventListener('mouseup', exports.DD._endDragAfter, false);\n window.addEventListener('touchend', exports.DD._endDragAfter, false);\n}\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Container = void 0;\nvar Util_1 = require(\"./Util\");\nvar Factory_1 = require(\"./Factory\");\nvar Node_1 = require(\"./Node\");\nvar Validators_1 = require(\"./Validators\");\nvar Container = (function (_super) {\n __extends(Container, _super);\n function Container() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.children = new Util_1.Collection();\n return _this;\n }\n Container.prototype.getChildren = function (filterFunc) {\n if (!filterFunc) {\n return this.children;\n }\n var results = new Util_1.Collection();\n this.children.each(function (child) {\n if (filterFunc(child)) {\n results.push(child);\n }\n });\n return results;\n };\n Container.prototype.hasChildren = function () {\n return this.getChildren().length > 0;\n };\n Container.prototype.removeChildren = function () {\n var child;\n for (var i = 0; i < this.children.length; i++) {\n child = this.children[i];\n child.parent = null;\n child.index = 0;\n child.remove();\n }\n this.children = new Util_1.Collection();\n return this;\n };\n Container.prototype.destroyChildren = function () {\n var child;\n for (var i = 0; i < this.children.length; i++) {\n child = this.children[i];\n child.parent = null;\n child.index = 0;\n child.destroy();\n }\n this.children = new Util_1.Collection();\n return this;\n };\n Container.prototype.add = function () {\n var children = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n children[_i] = arguments[_i];\n }\n if (arguments.length > 1) {\n for (var i = 0; i < arguments.length; i++) {\n this.add(arguments[i]);\n }\n return this;\n }\n var child = children[0];\n if (child.getParent()) {\n child.moveTo(this);\n return this;\n }\n var _children = this.children;\n this._validateAdd(child);\n child._clearCaches();\n child.index = _children.length;\n child.parent = this;\n _children.push(child);\n this._fire('add', {\n child: child,\n });\n return this;\n };\n Container.prototype.destroy = function () {\n if (this.hasChildren()) {\n this.destroyChildren();\n }\n _super.prototype.destroy.call(this);\n return this;\n };\n Container.prototype.find = function (selector) {\n return this._generalFind(selector, false);\n };\n Container.prototype.get = function (selector) {\n Util_1.Util.warn('collection.get() method is deprecated. Please use collection.find() instead.');\n return this.find(selector);\n };\n Container.prototype.findOne = function (selector) {\n var result = this._generalFind(selector, true);\n return result.length > 0 ? result[0] : undefined;\n };\n Container.prototype._generalFind = function (selector, findOne) {\n var retArr = [];\n this._descendants(function (node) {\n var valid = node._isMatch(selector);\n if (valid) {\n retArr.push(node);\n }\n if (valid && findOne) {\n return true;\n }\n return false;\n });\n return Util_1.Collection.toCollection(retArr);\n };\n Container.prototype._descendants = function (fn) {\n var shouldStop = false;\n for (var i = 0; i < this.children.length; i++) {\n var child = this.children[i];\n shouldStop = fn(child);\n if (shouldStop) {\n return true;\n }\n if (!child.hasChildren()) {\n continue;\n }\n shouldStop = child._descendants(fn);\n if (shouldStop) {\n return true;\n }\n }\n return false;\n };\n Container.prototype.toObject = function () {\n var obj = Node_1.Node.prototype.toObject.call(this);\n obj.children = [];\n var children = this.getChildren();\n var len = children.length;\n for (var n = 0; n < len; n++) {\n var child = children[n];\n obj.children.push(child.toObject());\n }\n return obj;\n };\n Container.prototype.isAncestorOf = function (node) {\n var parent = node.getParent();\n while (parent) {\n if (parent._id === this._id) {\n return true;\n }\n parent = parent.getParent();\n }\n return false;\n };\n Container.prototype.clone = function (obj) {\n var node = Node_1.Node.prototype.clone.call(this, obj);\n this.getChildren().each(function (no) {\n node.add(no.clone());\n });\n return node;\n };\n Container.prototype.getAllIntersections = function (pos) {\n var arr = [];\n this.find('Shape').each(function (shape) {\n if (shape.isVisible() && shape.intersects(pos)) {\n arr.push(shape);\n }\n });\n return arr;\n };\n Container.prototype._setChildrenIndices = function () {\n this.children.each(function (child, n) {\n child.index = n;\n });\n };\n Container.prototype.drawScene = function (can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas()), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedSceneCanvas = cachedCanvas && cachedCanvas.scene;\n var caching = canvas && canvas.isCache;\n if (!this.isVisible() && !caching) {\n return this;\n }\n if (cachedSceneCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedSceneCanvas(context);\n context.restore();\n }\n else {\n this._drawChildren('drawScene', canvas, top);\n }\n return this;\n };\n Container.prototype.drawHit = function (can, top) {\n if (!this.shouldDrawHit(top)) {\n return this;\n }\n var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;\n if (cachedHitCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedHitCanvas(context);\n context.restore();\n }\n else {\n this._drawChildren('drawHit', canvas, top);\n }\n return this;\n };\n Container.prototype._drawChildren = function (drawMethod, canvas, top) {\n var context = canvas && canvas.getContext(), clipWidth = this.clipWidth(), clipHeight = this.clipHeight(), clipFunc = this.clipFunc(), hasClip = (clipWidth && clipHeight) || clipFunc;\n var selfCache = top === this;\n if (hasClip) {\n context.save();\n var transform = this.getAbsoluteTransform(top);\n var m = transform.getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n context.beginPath();\n if (clipFunc) {\n clipFunc.call(this, context, this);\n }\n else {\n var clipX = this.clipX();\n var clipY = this.clipY();\n context.rect(clipX, clipY, clipWidth, clipHeight);\n }\n context.clip();\n m = transform.copy().invert().getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n }\n var hasComposition = !selfCache &&\n this.globalCompositeOperation() !== 'source-over' &&\n drawMethod === 'drawScene';\n if (hasComposition) {\n context.save();\n context._applyGlobalCompositeOperation(this);\n }\n this.children.each(function (child) {\n child[drawMethod](canvas, top);\n });\n if (hasComposition) {\n context.restore();\n }\n if (hasClip) {\n context.restore();\n }\n };\n Container.prototype.getClientRect = function (config) {\n config = config || {};\n var skipTransform = config.skipTransform;\n var relativeTo = config.relativeTo;\n var minX, minY, maxX, maxY;\n var selfRect = {\n x: Infinity,\n y: Infinity,\n width: 0,\n height: 0,\n };\n var that = this;\n this.children.each(function (child) {\n if (!child.visible()) {\n return;\n }\n var rect = child.getClientRect({\n relativeTo: that,\n skipShadow: config.skipShadow,\n skipStroke: config.skipStroke,\n });\n if (rect.width === 0 && rect.height === 0) {\n return;\n }\n if (minX === undefined) {\n minX = rect.x;\n minY = rect.y;\n maxX = rect.x + rect.width;\n maxY = rect.y + rect.height;\n }\n else {\n minX = Math.min(minX, rect.x);\n minY = Math.min(minY, rect.y);\n maxX = Math.max(maxX, rect.x + rect.width);\n maxY = Math.max(maxY, rect.y + rect.height);\n }\n });\n var shapes = this.find('Shape');\n var hasVisible = false;\n for (var i = 0; i < shapes.length; i++) {\n var shape = shapes[i];\n if (shape._isVisible(this)) {\n hasVisible = true;\n break;\n }\n }\n if (hasVisible && minX !== undefined) {\n selfRect = {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n else {\n selfRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n if (!skipTransform) {\n return this._transformedRect(selfRect, relativeTo);\n }\n return selfRect;\n };\n return Container;\n}(Node_1.Node));\nexports.Container = Container;\nFactory_1.Factory.addComponentsGetterSetter(Container, 'clip', [\n 'x',\n 'y',\n 'width',\n 'height',\n]);\nFactory_1.Factory.addGetterSetter(Container, 'clipX', undefined, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Container, 'clipY', undefined, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Container, 'clipWidth', undefined, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Container, 'clipHeight', undefined, Validators_1.getNumberValidator());\nFactory_1.Factory.addGetterSetter(Container, 'clipFunc');\nUtil_1.Collection.mapMethods(Container);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Animation = void 0;\nvar Global_1 = require(\"./Global\");\nvar now = (function () {\n if (Global_1.glob.performance && Global_1.glob.performance.now) {\n return function () {\n return Global_1.glob.performance.now();\n };\n }\n return function () {\n return new Date().getTime();\n };\n})();\nvar Animation = (function () {\n function Animation(func, layers) {\n this.id = Animation.animIdCounter++;\n this.frame = {\n time: 0,\n timeDiff: 0,\n lastTime: now(),\n frameRate: 0\n };\n this.func = func;\n this.setLayers(layers);\n }\n Animation.prototype.setLayers = function (layers) {\n var lays = [];\n if (!layers) {\n lays = [];\n }\n else if (layers.length > 0) {\n lays = layers;\n }\n else {\n lays = [layers];\n }\n this.layers = lays;\n return this;\n };\n Animation.prototype.getLayers = function () {\n return this.layers;\n };\n Animation.prototype.addLayer = function (layer) {\n var layers = this.layers, len = layers.length, n;\n for (n = 0; n < len; n++) {\n if (layers[n]._id === layer._id) {\n return false;\n }\n }\n this.layers.push(layer);\n return true;\n };\n Animation.prototype.isRunning = function () {\n var a = Animation, animations = a.animations, len = animations.length, n;\n for (n = 0; n < len; n++) {\n if (animations[n].id === this.id) {\n return true;\n }\n }\n return false;\n };\n Animation.prototype.start = function () {\n this.stop();\n this.frame.timeDiff = 0;\n this.frame.lastTime = now();\n Animation._addAnimation(this);\n return this;\n };\n Animation.prototype.stop = function () {\n Animation._removeAnimation(this);\n return this;\n };\n Animation.prototype._updateFrameObject = function (time) {\n this.frame.timeDiff = time - this.frame.lastTime;\n this.frame.lastTime = time;\n this.frame.time += this.frame.timeDiff;\n this.frame.frameRate = 1000 / this.frame.timeDiff;\n };\n Animation._addAnimation = function (anim) {\n this.animations.push(anim);\n this._handleAnimation();\n };\n Animation._removeAnimation = function (anim) {\n var id = anim.id, animations = this.animations, len = animations.length, n;\n for (n = 0; n < len; n++) {\n if (animations[n].id === id) {\n this.animations.splice(n, 1);\n break;\n }\n }\n };\n Animation._runFrames = function () {\n var layerHash = {}, animations = this.animations, anim, layers, func, n, i, layersLen, layer, key, needRedraw;\n for (n = 0; n < animations.length; n++) {\n anim = animations[n];\n layers = anim.layers;\n func = anim.func;\n anim._updateFrameObject(now());\n layersLen = layers.length;\n if (func) {\n needRedraw = func.call(anim, anim.frame) !== false;\n }\n else {\n needRedraw = true;\n }\n if (!needRedraw) {\n continue;\n }\n for (i = 0; i < layersLen; i++) {\n layer = layers[i];\n if (layer._id !== undefined) {\n layerHash[layer._id] = layer;\n }\n }\n }\n for (key in layerHash) {\n if (!layerHash.hasOwnProperty(key)) {\n continue;\n }\n layerHash[key].draw();\n }\n };\n Animation._animationLoop = function () {\n var Anim = Animation;\n if (Anim.animations.length) {\n Anim._runFrames();\n requestAnimationFrame(Anim._animationLoop);\n }\n else {\n Anim.animRunning = false;\n }\n };\n Animation._handleAnimation = function () {\n if (!this.animRunning) {\n this.animRunning = true;\n requestAnimationFrame(this._animationLoop);\n }\n };\n Animation.animations = [];\n Animation.animIdCounter = 0;\n Animation.animRunning = false;\n return Animation;\n}());\nexports.Animation = Animation;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HitCanvas = exports.SceneCanvas = exports.Canvas = void 0;\nvar Util_1 = require(\"./Util\");\nvar Context_1 = require(\"./Context\");\nvar Global_1 = require(\"./Global\");\nvar Factory_1 = require(\"./Factory\");\nvar Validators_1 = require(\"./Validators\");\nvar _pixelRatio;\nfunction getDevicePixelRatio() {\n if (_pixelRatio) {\n return _pixelRatio;\n }\n var canvas = Util_1.Util.createCanvasElement();\n var context = canvas.getContext('2d');\n _pixelRatio = (function () {\n var devicePixelRatio = Global_1.Konva._global.devicePixelRatio || 1, backingStoreRatio = context.webkitBackingStorePixelRatio ||\n context.mozBackingStorePixelRatio ||\n context.msBackingStorePixelRatio ||\n context.oBackingStorePixelRatio ||\n context.backingStorePixelRatio ||\n 1;\n return devicePixelRatio / backingStoreRatio;\n })();\n return _pixelRatio;\n}\nvar Canvas = (function () {\n function Canvas(config) {\n this.pixelRatio = 1;\n this.width = 0;\n this.height = 0;\n this.isCache = false;\n var conf = config || {};\n var pixelRatio = conf.pixelRatio || Global_1.Konva.pixelRatio || getDevicePixelRatio();\n this.pixelRatio = pixelRatio;\n this._canvas = Util_1.Util.createCanvasElement();\n this._canvas.style.padding = '0';\n this._canvas.style.margin = '0';\n this._canvas.style.border = '0';\n this._canvas.style.background = 'transparent';\n this._canvas.style.position = 'absolute';\n this._canvas.style.top = '0';\n this._canvas.style.left = '0';\n }\n Canvas.prototype.getContext = function () {\n return this.context;\n };\n Canvas.prototype.getPixelRatio = function () {\n return this.pixelRatio;\n };\n Canvas.prototype.setPixelRatio = function (pixelRatio) {\n var previousRatio = this.pixelRatio;\n this.pixelRatio = pixelRatio;\n this.setSize(this.getWidth() / previousRatio, this.getHeight() / previousRatio);\n };\n Canvas.prototype.setWidth = function (width) {\n this.width = this._canvas.width = width * this.pixelRatio;\n this._canvas.style.width = width + 'px';\n var pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n _context.scale(pixelRatio, pixelRatio);\n };\n Canvas.prototype.setHeight = function (height) {\n this.height = this._canvas.height = height * this.pixelRatio;\n this._canvas.style.height = height + 'px';\n var pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n _context.scale(pixelRatio, pixelRatio);\n };\n Canvas.prototype.getWidth = function () {\n return this.width;\n };\n Canvas.prototype.getHeight = function () {\n return this.height;\n };\n Canvas.prototype.setSize = function (width, height) {\n this.setWidth(width || 0);\n this.setHeight(height || 0);\n };\n Canvas.prototype.toDataURL = function (mimeType, quality) {\n try {\n return this._canvas.toDataURL(mimeType, quality);\n }\n catch (e) {\n try {\n return this._canvas.toDataURL();\n }\n catch (err) {\n Util_1.Util.error('Unable to get data URL. ' +\n err.message +\n ' For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.');\n return '';\n }\n }\n };\n return Canvas;\n}());\nexports.Canvas = Canvas;\nFactory_1.Factory.addGetterSetter(Canvas, 'pixelRatio', undefined, Validators_1.getNumberValidator());\nvar SceneCanvas = (function (_super) {\n __extends(SceneCanvas, _super);\n function SceneCanvas(config) {\n if (config === void 0) { config = { width: 0, height: 0 }; }\n var _this = _super.call(this, config) || this;\n _this.context = new Context_1.SceneContext(_this);\n _this.setSize(config.width, config.height);\n return _this;\n }\n return SceneCanvas;\n}(Canvas));\nexports.SceneCanvas = SceneCanvas;\nvar HitCanvas = (function (_super) {\n __extends(HitCanvas, _super);\n function HitCanvas(config) {\n if (config === void 0) { config = { width: 0, height: 0 }; }\n var _this = _super.call(this, config) || this;\n _this.hitCanvas = true;\n _this.context = new Context_1.HitContext(_this);\n _this.setSize(config.width, config.height);\n return _this;\n }\n return HitCanvas;\n}(Canvas));\nexports.HitCanvas = HitCanvas;\n"],"sourceRoot":""}