@zsviczian/excalidraw 0.17.1-obsidian-14 → 0.17.1-obsidian-15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,17 +30,6 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
30
30
 
31
31
  /***/ }),
32
32
 
33
- /***/ "../../node_modules/@excalidraw/laser-pointer/dist/esm.js":
34
- /*!****************************************************************!*\
35
- !*** ../../node_modules/@excalidraw/laser-pointer/dist/esm.js ***!
36
- \****************************************************************/
37
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
38
-
39
- "use strict";
40
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LaserPointer\": () => (/* binding */ $94cfa2cfccc8cc22$export$6531021b3bf36eae)\n/* harmony export */ });\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\nvar $94cfa2cfccc8cc22$exports = {};\n\n$parcel$export($94cfa2cfccc8cc22$exports, \"LaserPointer\", () => $94cfa2cfccc8cc22$export$6531021b3bf36eae);\nfunction $8cd7efb5af385306$export$e16d8520af44a096([ax, ay, ar], [bx, by, br]) {\n return [\n ax + bx,\n ay + by,\n ar + br\n ];\n}\nfunction $8cd7efb5af385306$export$f93b5905241a7cca([ax, ay, ar], [bx, by, br]) {\n return [\n ax - bx,\n ay - by,\n ar - br\n ];\n}\nfunction $8cd7efb5af385306$export$1c8884ee32bdf443([x, y, r], s) {\n return [\n x * s,\n y * s,\n r * s\n ];\n}\nfunction $8cd7efb5af385306$export$1991ecd29cc92c6b([x, y, r]) {\n return [\n x / Math.sqrt(x ** 2 + y ** 2),\n y / Math.sqrt(x ** 2 + y ** 2),\n r\n ];\n}\nfunction $8cd7efb5af385306$export$855df823ceb9b81b([x, y, r], rad) {\n return [\n Math.cos(rad) * x - Math.sin(rad) * y,\n Math.sin(rad) * x + Math.cos(rad) * y,\n r\n ];\n}\nfunction $8cd7efb5af385306$export$92d8e23769117a5e(a, b, t) {\n return $8cd7efb5af385306$export$e16d8520af44a096(a, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$f93b5905241a7cca(b, a), t));\n}\nfunction $8cd7efb5af385306$export$3a89f8d6f6bf6c9f(a, b, t) {\n return a + (b - a) * t;\n}\nfunction $8cd7efb5af385306$export$944b09d2ad10b378(p, p1, p2) {\n return Math.atan2(p2[1] - p[1], p2[0] - p[0]) - Math.atan2(p1[1] - p[1], p1[0] - p[0]);\n}\nfunction $8cd7efb5af385306$export$3c05aaf71f141f73(a) {\n return Math.atan2(Math.sin(a), Math.cos(a));\n}\nfunction $8cd7efb5af385306$export$1b9bab504faa9305([x, y]) {\n return Math.sqrt(x ** 2 + y ** 2);\n}\nfunction $8cd7efb5af385306$export$6c4a311cc157c764([ax, ay], [bx, by]) {\n return Math.sqrt((bx - ax) ** 2 + (by - ay) ** 2);\n}\nfunction $8cd7efb5af385306$export$46f6d3e1b4bd7c8b(point, direction, radius) {\n return [\n $8cd7efb5af385306$export$e16d8520af44a096(point, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$855df823ceb9b81b(direction, Math.PI / 2)), radius)),\n $8cd7efb5af385306$export$e16d8520af44a096(point, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$855df823ceb9b81b(direction, -Math.PI / 2)), radius))\n ];\n}\nfunction $8cd7efb5af385306$export$ccb1b4dfbd3f36a7(ps) {\n if (ps.length < 2) return 0;\n let len = 0;\n for(let i = 1; i <= ps.length - 1; i++)len += $8cd7efb5af385306$export$6c4a311cc157c764(ps[i - 1], ps[i]);\n len += $8cd7efb5af385306$export$6c4a311cc157c764(ps[ps.length - 2], ps[ps.length - 1]);\n return len;\n}\nconst $8cd7efb5af385306$export$7d15b64cf5a3a4c4 = (v, min, max)=>Math.max(min, Math.min(max, v));\nfunction $8cd7efb5af385306$export$548cc43590159af6(p3, p1, p2) {\n const sMag = $8cd7efb5af385306$export$6c4a311cc157c764(p1, p2);\n if (sMag === 0) return $8cd7efb5af385306$export$6c4a311cc157c764(p3, p1);\n const u = $8cd7efb5af385306$export$7d15b64cf5a3a4c4(((p3[0] - p1[0]) * (p2[0] - p1[0]) + (p3[1] - p1[1]) * (p2[1] - p1[1])) / sMag ** 2, 0, 1);\n const pi = [\n p1[0] + u * (p2[0] - p1[0]),\n p1[1] + u * (p2[1] - p1[1]),\n p3[2]\n ];\n return $8cd7efb5af385306$export$6c4a311cc157c764(pi, p3);\n}\n\n\n\nfunction $34bab0059f842ce6$export$ef693d1572e64fb8(points, epsilon) {\n if (epsilon === 0) return points;\n if (points.length <= 2) return points;\n const first = points[0];\n const last = points[points.length - 1];\n const [maxDistance, maxIndex] = points.reduce(([maxDistance, maxIndex], point, index)=>{\n const distance = (0, $8cd7efb5af385306$export$548cc43590159af6)(point, first, last);\n return distance > maxDistance ? [\n distance,\n index\n ] : [\n maxDistance,\n maxIndex\n ];\n }, [\n 0,\n -1\n ]);\n if (maxDistance >= epsilon) {\n const maxIndexPoint = points[maxIndex];\n return [\n ...$34bab0059f842ce6$export$ef693d1572e64fb8([\n first,\n ...points.slice(1, maxIndex),\n maxIndexPoint\n ], epsilon).slice(0, -1),\n maxIndexPoint,\n ...$34bab0059f842ce6$export$ef693d1572e64fb8([\n maxIndexPoint,\n ...points.slice(maxIndex, -1),\n last\n ], epsilon).slice(1)\n ];\n } else return [\n first,\n last\n ];\n}\n\n\nclass $94cfa2cfccc8cc22$export$6531021b3bf36eae {\n static{\n this.defaults = {\n size: 2,\n streamline: 0.45,\n simplify: 0.1,\n simplifyPhase: \"output\",\n keepHead: false,\n sizeMapping: ()=>1\n };\n }\n static{\n this.constants = {\n cornerDetectionMaxAngle: 75,\n cornerDetectionVariance: (s)=>s > 35 ? 0.5 : 1,\n maxTailLength: 50\n };\n }\n constructor(options){\n this.originalPoints = [];\n this.stablePoints = [];\n this.tailPoints = [];\n this.isFresh = true;\n this.options = Object.assign({}, $94cfa2cfccc8cc22$export$6531021b3bf36eae.defaults, options);\n }\n get lastPoint() {\n return this.tailPoints[this.tailPoints.length - 1] ?? this.stablePoints[this.stablePoints.length - 1];\n }\n addPoint(point) {\n const lastPoint = this.originalPoints[this.originalPoints.length - 1];\n if (lastPoint && lastPoint[0] === point[0] && lastPoint[1] === point[1]) return;\n this.originalPoints.push(point);\n if (this.isFresh) {\n this.isFresh = false;\n this.stablePoints.push(point);\n return;\n }\n if (this.options.streamline > 0) point = $8cd7efb5af385306$export$92d8e23769117a5e(this.lastPoint, point, 1 - this.options.streamline);\n this.tailPoints.push(point);\n if ($8cd7efb5af385306$export$ccb1b4dfbd3f36a7(this.tailPoints) > $94cfa2cfccc8cc22$export$6531021b3bf36eae.constants.maxTailLength) this.stabilizeTail();\n }\n close() {\n this.stabilizeTail();\n }\n stabilizeTail() {\n if (this.options.simplify > 0 && this.options.simplifyPhase == \"tail\") throw new Error(\"Not implemented yet\");\n else {\n this.stablePoints.push(...this.tailPoints);\n this.tailPoints = [];\n }\n }\n getSize(sizeOverride, pressure, index, totalLength, runningLength) {\n return (sizeOverride ?? this.options.size) * this.options.sizeMapping({\n pressure: pressure,\n runningLength: runningLength,\n currentIndex: index,\n totalLength: totalLength\n });\n }\n getStrokeOutline(sizeOverride) {\n if (this.isFresh) return [];\n let points = [\n ...this.stablePoints,\n ...this.tailPoints\n ];\n if (this.options.simplify > 0 && this.options.simplifyPhase === \"input\") points = (0, $34bab0059f842ce6$export$ef693d1572e64fb8)(points, this.options.simplify);\n const len = points.length;\n if (len === 0) return [];\n if (len === 1) {\n const c = points[0];\n const size = this.getSize(sizeOverride, c[2], 0, len, 0);\n if (size < 0.5) return [];\n const ps = [];\n for(let theta = 0; theta <= Math.PI * 2; theta += Math.PI / 16)ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$855df823ceb9b81b([\n 1,\n 0,\n 0\n ], theta), size)));\n ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443([\n 1,\n 0,\n 0\n ], this.getSize(sizeOverride, c[2], 0, len, 0))));\n return ps;\n }\n if (len === 2) {\n const c = points[0];\n const n = points[1];\n const cSize = this.getSize(sizeOverride, c[2], 0, len, 0);\n const nSize = this.getSize(sizeOverride, n[2], 0, len, 0);\n if (cSize < 0.5 || nSize < 0.5) return [];\n const ps = [];\n const pAngle = $8cd7efb5af385306$export$944b09d2ad10b378(c, [\n c[0],\n c[1] - 100,\n c[2]\n ], n);\n for(let theta = pAngle; theta <= Math.PI + pAngle; theta += Math.PI / 16)ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$855df823ceb9b81b([\n 1,\n 0,\n 0\n ], theta), cSize)));\n for(let theta = Math.PI + pAngle; theta <= Math.PI * 2 + pAngle; theta += Math.PI / 16)ps.push($8cd7efb5af385306$export$e16d8520af44a096(n, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$855df823ceb9b81b([\n 1,\n 0,\n 0\n ], theta), nSize)));\n ps.push(ps[0]);\n return ps;\n }\n const forwardPoints = [];\n const backwardPoints = [];\n let speed = 0;\n let prevSpeed = 0;\n let visibleStartIndex = 0;\n let runningLength = 0;\n for(let i = 1; i < len - 1; i++){\n const p = points[i - 1], c = points[i], n = points[i + 1];\n let pressure = c[2];\n const d = $8cd7efb5af385306$export$6c4a311cc157c764(p, c);\n runningLength += d;\n speed = prevSpeed + (d - prevSpeed) * 0.2;\n const cSize = this.getSize(sizeOverride, pressure, i, len, runningLength);\n if (cSize === 0) {\n visibleStartIndex = i + 1;\n continue;\n }\n const dirPC = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(p, c));\n const dirNC = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(n, c));\n const p1dirPC = $8cd7efb5af385306$export$855df823ceb9b81b(dirPC, Math.PI / 2);\n const p2dirPC = $8cd7efb5af385306$export$855df823ceb9b81b(dirPC, -Math.PI / 2);\n const p1dirNC = $8cd7efb5af385306$export$855df823ceb9b81b(dirNC, Math.PI / 2);\n const p2dirNC = $8cd7efb5af385306$export$855df823ceb9b81b(dirNC, -Math.PI / 2);\n const p1PC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, cSize));\n const p2PC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p2dirPC, cSize));\n const p1NC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p1dirNC, cSize));\n const p2NC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p2dirNC, cSize));\n const ftdir = $8cd7efb5af385306$export$e16d8520af44a096(p1dirPC, p2dirNC);\n const btdir = $8cd7efb5af385306$export$e16d8520af44a096(p2dirPC, p1dirNC);\n const paPC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1b9bab504faa9305(ftdir) === 0 ? dirPC : $8cd7efb5af385306$export$1991ecd29cc92c6b(ftdir), cSize));\n const paNC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1b9bab504faa9305(btdir) === 0 ? dirNC : $8cd7efb5af385306$export$1991ecd29cc92c6b(btdir), cSize));\n const cAngle = $8cd7efb5af385306$export$3c05aaf71f141f73($8cd7efb5af385306$export$944b09d2ad10b378(c, p, n));\n const D_ANGLE = $94cfa2cfccc8cc22$export$6531021b3bf36eae.constants.cornerDetectionMaxAngle / 180 * Math.PI * $94cfa2cfccc8cc22$export$6531021b3bf36eae.constants.cornerDetectionVariance(speed);\n if (Math.abs(cAngle) < D_ANGLE) {\n const tAngle = Math.abs($8cd7efb5af385306$export$3c05aaf71f141f73(Math.PI - cAngle)) // turn angle\n ;\n if (tAngle === 0) continue;\n if (cAngle < 0) {\n backwardPoints.push(p2PC, paNC);\n for(let theta = 0; theta <= tAngle; theta += tAngle / 4)forwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, cSize), theta)));\n for(let theta = tAngle; theta >= 0; theta -= tAngle / 4)backwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, cSize), theta)));\n backwardPoints.push(paNC, p1NC);\n } else {\n forwardPoints.push(p1PC, paPC);\n for(let theta = 0; theta <= tAngle; theta += tAngle / 4)backwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, -cSize), -theta)));\n for(let theta = tAngle; theta >= 0; theta -= tAngle / 4)forwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, -cSize), -theta)));\n forwardPoints.push(paPC, p2NC);\n }\n } else {\n forwardPoints.push(paPC);\n backwardPoints.push(paNC);\n }\n prevSpeed = speed;\n }\n if (visibleStartIndex >= len - 2) {\n if (this.options.keepHead) {\n const c = points[len - 1];\n const ps = [];\n for(let theta = 0; theta <= Math.PI * 2; theta += Math.PI / 16)ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$855df823ceb9b81b([\n 1,\n 0,\n 0\n ], theta), this.options.size)));\n ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443([\n 1,\n 0,\n 0\n ], this.options.size)));\n return ps;\n } else return [];\n }\n const first = points[visibleStartIndex];\n const second = points[visibleStartIndex + 1];\n const penultimate = points[len - 2];\n const ultimate = points[len - 1];\n const dirFS = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(second, first));\n const dirPU = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(penultimate, ultimate));\n const ppdirFS = $8cd7efb5af385306$export$855df823ceb9b81b(dirFS, -Math.PI / 2);\n const ppdirPU = $8cd7efb5af385306$export$855df823ceb9b81b(dirPU, Math.PI / 2);\n const startCapSize = this.getSize(sizeOverride, first[2], 0, len, 0);\n const startCap = [];\n const endCapSize = this.options.keepHead ? this.options.size : this.getSize(sizeOverride, penultimate[2], len - 2, len, runningLength);\n const endCap = [];\n if (startCapSize > 1) {\n for(let theta = 0; theta <= Math.PI; theta += Math.PI / 16)startCap.unshift($8cd7efb5af385306$export$e16d8520af44a096(first, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(ppdirFS, startCapSize), -theta)));\n startCap.unshift($8cd7efb5af385306$export$e16d8520af44a096(first, $8cd7efb5af385306$export$1c8884ee32bdf443(ppdirFS, -startCapSize)));\n } else startCap.push(first);\n for(let theta = 0; theta <= Math.PI * 3; theta += Math.PI / 16)endCap.push($8cd7efb5af385306$export$e16d8520af44a096(ultimate, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(ppdirPU, -endCapSize), -theta)));\n const strokeOutline = [\n ...startCap,\n ...forwardPoints,\n ...endCap.reverse(),\n ...backwardPoints.reverse()\n ];\n if (startCap.length > 0) strokeOutline.push(startCap[0]);\n if (this.options.simplify > 0 && this.options.simplifyPhase === \"output\") return (0, $34bab0059f842ce6$export$ef693d1572e64fb8)(strokeOutline, this.options.simplify);\n return strokeOutline;\n }\n}\n\n\n\n\n\n//# sourceMappingURL=esm.js.map\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@excalidraw/laser-pointer/dist/esm.js?");
41
-
42
- /***/ }),
43
-
44
33
  /***/ "../../node_modules/@excalidraw/markdown-to-text/dist/index.js":
45
34
  /*!*********************************************************************!*\
46
35
  !*** ../../node_modules/@excalidraw/markdown-to-text/dist/index.js ***!
@@ -316,6 +305,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
316
305
 
317
306
  /***/ }),
318
307
 
308
+ /***/ "../../node_modules/@zsviczian/laser-pointer/dist/esm.js":
309
+ /*!***************************************************************!*\
310
+ !*** ../../node_modules/@zsviczian/laser-pointer/dist/esm.js ***!
311
+ \***************************************************************/
312
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
313
+
314
+ "use strict";
315
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"LaserPointer\": () => (/* binding */ $94cfa2cfccc8cc22$export$6531021b3bf36eae)\n/* harmony export */ });\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\nvar $94cfa2cfccc8cc22$exports = {};\n\n$parcel$export($94cfa2cfccc8cc22$exports, \"LaserPointer\", () => $94cfa2cfccc8cc22$export$6531021b3bf36eae);\nfunction $8cd7efb5af385306$export$e16d8520af44a096([ax, ay, ar], [bx, by, br]) {\n return [\n ax + bx,\n ay + by,\n ar + br\n ];\n}\nfunction $8cd7efb5af385306$export$f93b5905241a7cca([ax, ay, ar], [bx, by, br]) {\n return [\n ax - bx,\n ay - by,\n ar - br\n ];\n}\nfunction $8cd7efb5af385306$export$1c8884ee32bdf443([x, y, r], s) {\n return [\n x * s,\n y * s,\n r * s\n ];\n}\nfunction $8cd7efb5af385306$export$1991ecd29cc92c6b([x, y, r]) {\n return [\n x / Math.sqrt(x ** 2 + y ** 2),\n y / Math.sqrt(x ** 2 + y ** 2),\n r\n ];\n}\nfunction $8cd7efb5af385306$export$855df823ceb9b81b([x, y, r], rad) {\n return [\n Math.cos(rad) * x - Math.sin(rad) * y,\n Math.sin(rad) * x + Math.cos(rad) * y,\n r\n ];\n}\nfunction $8cd7efb5af385306$export$92d8e23769117a5e(a, b, t) {\n return $8cd7efb5af385306$export$e16d8520af44a096(a, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$f93b5905241a7cca(b, a), t));\n}\nfunction $8cd7efb5af385306$export$3a89f8d6f6bf6c9f(a, b, t) {\n return a + (b - a) * t;\n}\nfunction $8cd7efb5af385306$export$944b09d2ad10b378(p, p1, p2) {\n return Math.atan2(p2[1] - p[1], p2[0] - p[0]) - Math.atan2(p1[1] - p[1], p1[0] - p[0]);\n}\nfunction $8cd7efb5af385306$export$3c05aaf71f141f73(a) {\n return Math.atan2(Math.sin(a), Math.cos(a));\n}\nfunction $8cd7efb5af385306$export$1b9bab504faa9305([x, y]) {\n return Math.sqrt(x ** 2 + y ** 2);\n}\nfunction $8cd7efb5af385306$export$6c4a311cc157c764([ax, ay], [bx, by]) {\n return Math.sqrt((bx - ax) ** 2 + (by - ay) ** 2);\n}\nfunction $8cd7efb5af385306$export$46f6d3e1b4bd7c8b(point, direction, radius) {\n return [\n $8cd7efb5af385306$export$e16d8520af44a096(point, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$855df823ceb9b81b(direction, Math.PI / 2)), radius)),\n $8cd7efb5af385306$export$e16d8520af44a096(point, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$855df823ceb9b81b(direction, -Math.PI / 2)), radius))\n ];\n}\nfunction $8cd7efb5af385306$export$ccb1b4dfbd3f36a7(ps) {\n if (ps.length < 2) return 0;\n let len = 0;\n for(let i = 1; i <= ps.length - 1; i++)len += $8cd7efb5af385306$export$6c4a311cc157c764(ps[i - 1], ps[i]);\n len += $8cd7efb5af385306$export$6c4a311cc157c764(ps[ps.length - 2], ps[ps.length - 1]);\n return len;\n}\nconst $8cd7efb5af385306$export$7d15b64cf5a3a4c4 = (v, min, max)=>Math.max(min, Math.min(max, v));\nfunction $8cd7efb5af385306$export$548cc43590159af6(p3, p1, p2) {\n const sMag = $8cd7efb5af385306$export$6c4a311cc157c764(p1, p2);\n if (sMag === 0) return $8cd7efb5af385306$export$6c4a311cc157c764(p3, p1);\n const u = $8cd7efb5af385306$export$7d15b64cf5a3a4c4(((p3[0] - p1[0]) * (p2[0] - p1[0]) + (p3[1] - p1[1]) * (p2[1] - p1[1])) / sMag ** 2, 0, 1);\n const pi = [\n p1[0] + u * (p2[0] - p1[0]),\n p1[1] + u * (p2[1] - p1[1]),\n p3[2]\n ];\n return $8cd7efb5af385306$export$6c4a311cc157c764(pi, p3);\n}\n\n\n\nfunction $34bab0059f842ce6$export$ef693d1572e64fb8(points, epsilon) {\n if (epsilon === 0) return points;\n if (points.length <= 2) return points;\n const first = points[0];\n const last = points[points.length - 1];\n const [maxDistance, maxIndex] = points.reduce(([maxDistance, maxIndex], point, index)=>{\n const distance = (0, $8cd7efb5af385306$export$548cc43590159af6)(point, first, last);\n return distance > maxDistance ? [\n distance,\n index\n ] : [\n maxDistance,\n maxIndex\n ];\n }, [\n 0,\n -1\n ]);\n if (maxDistance >= epsilon) {\n const maxIndexPoint = points[maxIndex];\n return [\n ...$34bab0059f842ce6$export$ef693d1572e64fb8([\n first,\n ...points.slice(1, maxIndex),\n maxIndexPoint\n ], epsilon).slice(0, -1),\n maxIndexPoint,\n ...$34bab0059f842ce6$export$ef693d1572e64fb8([\n maxIndexPoint,\n ...points.slice(maxIndex, -1),\n last\n ], epsilon).slice(1)\n ];\n } else return [\n first,\n last\n ];\n}\n\n\nfunction $94cfa2cfccc8cc22$var$_defineProperty(obj, key, value) {\n key = $94cfa2cfccc8cc22$var$_toPropertyKey(key);\n if (key in obj) Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n else obj[key] = value;\n return obj;\n}\nfunction $94cfa2cfccc8cc22$var$_toPropertyKey(t) {\n var i = $94cfa2cfccc8cc22$var$_toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : String(i);\n}\nfunction $94cfa2cfccc8cc22$var$_toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nclass $94cfa2cfccc8cc22$export$6531021b3bf36eae {\n constructor(options){\n $94cfa2cfccc8cc22$var$_defineProperty(this, \"options\", void 0);\n $94cfa2cfccc8cc22$var$_defineProperty(this, \"originalPoints\", []);\n $94cfa2cfccc8cc22$var$_defineProperty(this, \"stablePoints\", []);\n $94cfa2cfccc8cc22$var$_defineProperty(this, \"tailPoints\", []);\n $94cfa2cfccc8cc22$var$_defineProperty(this, \"isFresh\", true);\n this.options = Object.assign({}, $94cfa2cfccc8cc22$export$6531021b3bf36eae.defaults, options);\n }\n get lastPoint() {\n return this.tailPoints[this.tailPoints.length - 1] ?? this.stablePoints[this.stablePoints.length - 1];\n }\n addPoint(point) {\n const lastPoint = this.originalPoints[this.originalPoints.length - 1];\n if (lastPoint && lastPoint[0] === point[0] && lastPoint[1] === point[1]) return;\n this.originalPoints.push(point);\n if (this.isFresh) {\n this.isFresh = false;\n this.stablePoints.push(point);\n return;\n }\n if (this.options.streamline > 0) point = $8cd7efb5af385306$export$92d8e23769117a5e(this.lastPoint, point, 1 - this.options.streamline);\n this.tailPoints.push(point);\n if ($8cd7efb5af385306$export$ccb1b4dfbd3f36a7(this.tailPoints) > $94cfa2cfccc8cc22$export$6531021b3bf36eae.constants.maxTailLength) this.stabilizeTail();\n }\n close() {\n this.stabilizeTail();\n }\n stabilizeTail() {\n if (this.options.simplify > 0 && this.options.simplifyPhase == \"tail\") throw new Error(\"Not implemented yet\");\n else {\n this.stablePoints.push(...this.tailPoints);\n this.tailPoints = [];\n }\n }\n getSize(sizeOverride, pressure, index, totalLength, runningLength) {\n return (sizeOverride ?? this.options.size) * this.options.sizeMapping({\n pressure: pressure,\n runningLength: runningLength,\n currentIndex: index,\n totalLength: totalLength\n });\n }\n getStrokeOutline(sizeOverride) {\n if (this.isFresh) return [];\n let points = [\n ...this.stablePoints,\n ...this.tailPoints\n ];\n if (this.options.simplify > 0 && this.options.simplifyPhase === \"input\") points = (0, $34bab0059f842ce6$export$ef693d1572e64fb8)(points, this.options.simplify);\n const len = points.length;\n if (len === 0) return [];\n if (len === 1) {\n const c = points[0];\n const size = this.getSize(sizeOverride, c[2], 0, len, 0);\n if (size < 0.5) return [];\n const ps = [];\n for(let theta = 0; theta <= Math.PI * 2; theta += Math.PI / 16)ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$855df823ceb9b81b([\n 1,\n 0,\n 0\n ], theta), size)));\n ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443([\n 1,\n 0,\n 0\n ], this.getSize(sizeOverride, c[2], 0, len, 0))));\n return ps;\n }\n if (len === 2) {\n const c = points[0];\n const n = points[1];\n const cSize = this.getSize(sizeOverride, c[2], 0, len, 0);\n const nSize = this.getSize(sizeOverride, n[2], 0, len, 0);\n if (cSize < 0.5 || nSize < 0.5) return [];\n const ps = [];\n const pAngle = $8cd7efb5af385306$export$944b09d2ad10b378(c, [\n c[0],\n c[1] - 100,\n c[2]\n ], n);\n for(let theta = pAngle; theta <= Math.PI + pAngle; theta += Math.PI / 16)ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$855df823ceb9b81b([\n 1,\n 0,\n 0\n ], theta), cSize)));\n for(let theta = Math.PI + pAngle; theta <= Math.PI * 2 + pAngle; theta += Math.PI / 16)ps.push($8cd7efb5af385306$export$e16d8520af44a096(n, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$855df823ceb9b81b([\n 1,\n 0,\n 0\n ], theta), nSize)));\n ps.push(ps[0]);\n return ps;\n }\n const forwardPoints = [];\n const backwardPoints = [];\n let speed = 0;\n let prevSpeed = 0;\n let visibleStartIndex = 0;\n let runningLength = 0;\n for(let i = 1; i < len - 1; i++){\n const p = points[i - 1], c = points[i], n = points[i + 1];\n let pressure = c[2];\n const d = $8cd7efb5af385306$export$6c4a311cc157c764(p, c);\n runningLength += d;\n speed = prevSpeed + (d - prevSpeed) * 0.2;\n const cSize = this.getSize(sizeOverride, pressure, i, len, runningLength);\n if (cSize === 0) {\n visibleStartIndex = i + 1;\n continue;\n }\n const dirPC = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(p, c));\n const dirNC = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(n, c));\n const p1dirPC = $8cd7efb5af385306$export$855df823ceb9b81b(dirPC, Math.PI / 2);\n const p2dirPC = $8cd7efb5af385306$export$855df823ceb9b81b(dirPC, -Math.PI / 2);\n const p1dirNC = $8cd7efb5af385306$export$855df823ceb9b81b(dirNC, Math.PI / 2);\n const p2dirNC = $8cd7efb5af385306$export$855df823ceb9b81b(dirNC, -Math.PI / 2);\n const p1PC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, cSize));\n const p2PC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p2dirPC, cSize));\n const p1NC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p1dirNC, cSize));\n const p2NC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443(p2dirNC, cSize));\n const ftdir = $8cd7efb5af385306$export$e16d8520af44a096(p1dirPC, p2dirNC);\n const btdir = $8cd7efb5af385306$export$e16d8520af44a096(p2dirPC, p1dirNC);\n const paPC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1b9bab504faa9305(ftdir) === 0 ? dirPC : $8cd7efb5af385306$export$1991ecd29cc92c6b(ftdir), cSize));\n const paNC = $8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$1b9bab504faa9305(btdir) === 0 ? dirNC : $8cd7efb5af385306$export$1991ecd29cc92c6b(btdir), cSize));\n const cAngle = $8cd7efb5af385306$export$3c05aaf71f141f73($8cd7efb5af385306$export$944b09d2ad10b378(c, p, n));\n const D_ANGLE = $94cfa2cfccc8cc22$export$6531021b3bf36eae.constants.cornerDetectionMaxAngle / 180 * Math.PI * $94cfa2cfccc8cc22$export$6531021b3bf36eae.constants.cornerDetectionVariance(speed);\n if (Math.abs(cAngle) < D_ANGLE) {\n const tAngle = Math.abs($8cd7efb5af385306$export$3c05aaf71f141f73(Math.PI - cAngle)); // turn angle\n if (tAngle === 0) continue;\n if (cAngle < 0) {\n backwardPoints.push(p2PC, paNC);\n for(let theta = 0; theta <= tAngle; theta += tAngle / 4)forwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, cSize), theta)));\n for(let theta = tAngle; theta >= 0; theta -= tAngle / 4)backwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, cSize), theta)));\n backwardPoints.push(paNC, p1NC);\n } else {\n forwardPoints.push(p1PC, paPC);\n for(let theta = 0; theta <= tAngle; theta += tAngle / 4)backwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, -cSize), -theta)));\n for(let theta = tAngle; theta >= 0; theta -= tAngle / 4)forwardPoints.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(p1dirPC, -cSize), -theta)));\n forwardPoints.push(paPC, p2NC);\n }\n } else {\n forwardPoints.push(paPC);\n backwardPoints.push(paNC);\n }\n prevSpeed = speed;\n }\n if (visibleStartIndex >= len - 2) {\n if (this.options.keepHead) {\n const c = points[len - 1];\n const ps = [];\n for(let theta = 0; theta <= Math.PI * 2; theta += Math.PI / 16)ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443($8cd7efb5af385306$export$855df823ceb9b81b([\n 1,\n 0,\n 0\n ], theta), this.options.size)));\n ps.push($8cd7efb5af385306$export$e16d8520af44a096(c, $8cd7efb5af385306$export$1c8884ee32bdf443([\n 1,\n 0,\n 0\n ], this.options.size)));\n return ps;\n } else return [];\n }\n const first = points[visibleStartIndex];\n const second = points[visibleStartIndex + 1];\n const penultimate = points[len - 2];\n const ultimate = points[len - 1];\n const dirFS = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(second, first));\n const dirPU = $8cd7efb5af385306$export$1991ecd29cc92c6b($8cd7efb5af385306$export$f93b5905241a7cca(penultimate, ultimate));\n const ppdirFS = $8cd7efb5af385306$export$855df823ceb9b81b(dirFS, -Math.PI / 2);\n const ppdirPU = $8cd7efb5af385306$export$855df823ceb9b81b(dirPU, Math.PI / 2);\n const startCapSize = this.getSize(sizeOverride, first[2], 0, len, 0);\n const startCap = [];\n const endCapSize = this.options.keepHead ? this.options.size : this.getSize(sizeOverride, penultimate[2], len - 2, len, runningLength);\n const endCap = [];\n if (startCapSize > 1) {\n for(let theta = 0; theta <= Math.PI; theta += Math.PI / 16)startCap.unshift($8cd7efb5af385306$export$e16d8520af44a096(first, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(ppdirFS, startCapSize), -theta)));\n startCap.unshift($8cd7efb5af385306$export$e16d8520af44a096(first, $8cd7efb5af385306$export$1c8884ee32bdf443(ppdirFS, -startCapSize)));\n } else startCap.push(first);\n for(let theta = 0; theta <= Math.PI * 3; theta += Math.PI / 16)endCap.push($8cd7efb5af385306$export$e16d8520af44a096(ultimate, $8cd7efb5af385306$export$855df823ceb9b81b($8cd7efb5af385306$export$1c8884ee32bdf443(ppdirPU, -endCapSize), -theta)));\n const strokeOutline = [\n ...startCap,\n ...forwardPoints,\n ...endCap.reverse(),\n ...backwardPoints.reverse()\n ];\n if (startCap.length > 0) strokeOutline.push(startCap[0]);\n if (this.options.simplify > 0 && this.options.simplifyPhase === \"output\") return (0, $34bab0059f842ce6$export$ef693d1572e64fb8)(strokeOutline, this.options.simplify);\n return strokeOutline;\n }\n}\n$94cfa2cfccc8cc22$var$_defineProperty($94cfa2cfccc8cc22$export$6531021b3bf36eae, \"defaults\", {\n size: 2,\n streamline: 0.45,\n simplify: 0.1,\n simplifyPhase: \"output\",\n keepHead: false,\n sizeMapping: ()=>1\n});\n$94cfa2cfccc8cc22$var$_defineProperty($94cfa2cfccc8cc22$export$6531021b3bf36eae, \"constants\", {\n cornerDetectionMaxAngle: 75,\n cornerDetectionVariance: (s)=>s > 35 ? 0.5 : 1,\n maxTailLength: 50\n});\n\n\n\n\n\n//# sourceMappingURL=esm.js.map\n\n\n//# sourceURL=webpack://ExcalidrawLib/../../node_modules/@zsviczian/laser-pointer/dist/esm.js?");
316
+
317
+ /***/ }),
318
+
319
319
  /***/ "../../node_modules/aria-hidden/dist/es2015/index.js":
320
320
  /*!***********************************************************!*\
321
321
  !*** ../../node_modules/aria-hidden/dist/es2015/index.js ***!
@@ -728,7 +728,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
728
728
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
729
729
 
730
730
  "use strict";
731
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"trackEvent\": () => (/* binding */ trackEvent)\n/* harmony export */ });\n// place here categories that you want to track. We want to track just a\n// small subset of categories at a given time.\nconst ALLOWED_CATEGORIES_TO_TRACK = [\"ai\"];\nconst trackEvent = (category, action, label, value) => {\n try {\n // prettier-ignore\n if (typeof window === \"undefined\" || ({\"VITE_APP_BACKEND_V2_GET_URL\":\"https://json-dev.excalidraw.com/api/v2/\",\"VITE_APP_BACKEND_V2_POST_URL\":\"https://json-dev.excalidraw.com/api/v2/post/\",\"VITE_APP_LIBRARY_URL\":\"https://libraries.excalidraw.com\",\"VITE_APP_LIBRARY_BACKEND\":\"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries\",\"VITE_APP_WS_SERVER_URL\":\"http://localhost:3002\",\"VITE_APP_PLUS_LP\":\"https://plus.excalidraw.com\",\"VITE_APP_PLUS_APP\":\"https://app.excalidraw.com\",\"VITE_APP_AI_BACKEND\":\"http://localhost:3015\",\"VITE_APP_FIREBASE_CONFIG\":\"{\\\"apiKey\\\":\\\"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8\\\",\\\"authDomain\\\":\\\"excalidraw-oss-dev.firebaseapp.com\\\",\\\"projectId\\\":\\\"excalidraw-oss-dev\\\",\\\"storageBucket\\\":\\\"excalidraw-oss-dev.appspot.com\\\",\\\"messagingSenderId\\\":\\\"664559512677\\\",\\\"appId\\\":\\\"1:664559512677:web:a385181f2928d328a7aa8c\\\"}\",\"VITE_APP_DEV_ENABLE_SW\":\"\",\"VITE_APP_DEV_DISABLE_LIVE_RELOAD\":\"\",\"VITE_APP_DISABLE_TRACKING\":\"true\",\"FAST_REFRESH\":\"false\",\"VITE_APP_PORT\":\"3000\",\"VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX\":\"\",\"VITE_APP_COLLAPSE_OVERLAY\":\"true\",\"VITE_APP_ENABLE_ESLINT\":\"true\",\"VITE_PKG_NAME\":\"@zsviczian/excalidraw\",\"VITE_PKG_VERSION\":\"0.17.1-obsidian-13\",\"VITE_IS_EXCALIDRAW_NPM_PACKAGE\":true}).VITE_WORKER_ID // comment out to debug locally\n || \"development\" === \"production\") {\n return;\n }\n\n if (!ALLOWED_CATEGORIES_TO_TRACK.includes(category)) {\n return;\n }\n\n if (true) {\n console.info(\"trackEvent\", {\n category,\n action,\n label,\n value\n });\n }\n\n if (window.sa_event) {\n window.sa_event(action, {\n category,\n label,\n value\n });\n }\n } catch (error) {\n console.error(\"error during analytics\", error);\n }\n};\n\n//# sourceURL=webpack://ExcalidrawLib/./analytics.ts?");
731
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"trackEvent\": () => (/* binding */ trackEvent)\n/* harmony export */ });\n// place here categories that you want to track. We want to track just a\n// small subset of categories at a given time.\nconst ALLOWED_CATEGORIES_TO_TRACK = [\"ai\"];\nconst trackEvent = (category, action, label, value) => {\n try {\n // prettier-ignore\n if (typeof window === \"undefined\" || ({\"VITE_APP_BACKEND_V2_GET_URL\":\"https://json-dev.excalidraw.com/api/v2/\",\"VITE_APP_BACKEND_V2_POST_URL\":\"https://json-dev.excalidraw.com/api/v2/post/\",\"VITE_APP_LIBRARY_URL\":\"https://libraries.excalidraw.com\",\"VITE_APP_LIBRARY_BACKEND\":\"https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries\",\"VITE_APP_WS_SERVER_URL\":\"http://localhost:3002\",\"VITE_APP_PLUS_LP\":\"https://plus.excalidraw.com\",\"VITE_APP_PLUS_APP\":\"https://app.excalidraw.com\",\"VITE_APP_AI_BACKEND\":\"http://localhost:3015\",\"VITE_APP_FIREBASE_CONFIG\":\"{\\\"apiKey\\\":\\\"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8\\\",\\\"authDomain\\\":\\\"excalidraw-oss-dev.firebaseapp.com\\\",\\\"projectId\\\":\\\"excalidraw-oss-dev\\\",\\\"storageBucket\\\":\\\"excalidraw-oss-dev.appspot.com\\\",\\\"messagingSenderId\\\":\\\"664559512677\\\",\\\"appId\\\":\\\"1:664559512677:web:a385181f2928d328a7aa8c\\\"}\",\"VITE_APP_DEV_ENABLE_SW\":\"\",\"VITE_APP_DEV_DISABLE_LIVE_RELOAD\":\"\",\"VITE_APP_DISABLE_TRACKING\":\"true\",\"FAST_REFRESH\":\"false\",\"VITE_APP_PORT\":\"3000\",\"VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX\":\"\",\"VITE_APP_COLLAPSE_OVERLAY\":\"true\",\"VITE_APP_ENABLE_ESLINT\":\"true\",\"VITE_PKG_NAME\":\"@zsviczian/excalidraw\",\"VITE_PKG_VERSION\":\"0.17.1-obsidian-14\",\"VITE_IS_EXCALIDRAW_NPM_PACKAGE\":true}).VITE_WORKER_ID // comment out to debug locally\n || \"development\" === \"production\") {\n return;\n }\n\n if (!ALLOWED_CATEGORIES_TO_TRACK.includes(category)) {\n return;\n }\n\n if (true) {\n console.info(\"trackEvent\", {\n category,\n action,\n label,\n value\n });\n }\n\n if (window.sa_event) {\n window.sa_event(action, {\n category,\n label,\n value\n });\n }\n } catch (error) {\n console.error(\"error during analytics\", error);\n }\n};\n\n//# sourceURL=webpack://ExcalidrawLib/./analytics.ts?");
732
732
 
733
733
  /***/ }),
734
734
 
@@ -739,7 +739,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
739
739
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
740
740
 
741
741
  "use strict";
742
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AnimatedTrail\": () => (/* binding */ AnimatedTrail)\n/* harmony export */ });\n/* harmony import */ var _excalidraw_laser_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @excalidraw/laser-pointer */ \"../../node_modules/@excalidraw/laser-pointer/dist/esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./utils.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ \"./constants.ts\");\n\n\n\nclass AnimatedTrail {\n constructor(animationFrameHandler, app, options) {\n this.animationFrameHandler = animationFrameHandler;\n this.app = app;\n this.options = options;\n this.pastTrails = [];\n this.animationFrameHandler.register(this, this.onFrame.bind(this));\n this.trailElement = document.createElementNS(_constants__WEBPACK_IMPORTED_MODULE_2__.SVG_NS, \"path\");\n }\n\n get hasCurrentTrail() {\n return !!this.currentTrail;\n }\n\n hasLastPoint(x, y) {\n if (this.currentTrail) {\n const len = this.currentTrail.originalPoints.length;\n return this.currentTrail.originalPoints[len - 1][0] === x && this.currentTrail.originalPoints[len - 1][1] === y;\n }\n\n return false;\n }\n\n start(container) {\n if (container) {\n this.container = container;\n }\n\n if (this.trailElement.parentNode !== this.container && this.container) {\n this.container.appendChild(this.trailElement);\n }\n\n this.animationFrameHandler.start(this);\n }\n\n stop() {\n var _a;\n\n this.animationFrameHandler.stop(this);\n\n if (this.trailElement.parentNode === this.container) {\n (_a = this.container) === null || _a === void 0 ? void 0 : _a.removeChild(this.trailElement);\n }\n }\n\n startPath(x, y) {\n //zsviczian (fix offset)\n if (this.container) {\n this.container.style.top = \"0px\";\n this.container.style.left = \"0px\";\n const {\n x,\n y\n } = this.container.getBoundingClientRect();\n this.container.style.top = `${-y}px`;\n this.container.style.left = `${-x}px`;\n }\n\n this.currentTrail = new _excalidraw_laser_pointer__WEBPACK_IMPORTED_MODULE_0__.LaserPointer(this.options);\n this.currentTrail.addPoint([x, y, performance.now()]);\n this.update();\n }\n\n addPointToPath(x, y) {\n if (this.currentTrail) {\n this.currentTrail.addPoint([x, y, performance.now()]);\n this.update();\n }\n }\n\n endPath() {\n if (this.currentTrail) {\n this.currentTrail.close();\n this.currentTrail.options.keepHead = false;\n this.pastTrails.push(this.currentTrail);\n this.currentTrail = undefined;\n this.update();\n }\n }\n\n update() {\n this.start();\n }\n\n onFrame() {\n var _a;\n\n const paths = [];\n\n for (const trail of this.pastTrails) {\n paths.push(this.drawTrail(trail, this.app.state));\n }\n\n if (this.currentTrail) {\n const currentPath = this.drawTrail(this.currentTrail, this.app.state);\n paths.push(currentPath);\n }\n\n this.pastTrails = this.pastTrails.filter(trail => {\n return trail.getStrokeOutline().length !== 0;\n });\n\n if (paths.length === 0) {\n this.stop();\n }\n\n const svgPaths = paths.join(\" \").trim();\n this.trailElement.setAttribute(\"d\", svgPaths);\n this.trailElement.setAttribute(\"fill\", ((_a = this.options.fill) !== null && _a !== void 0 ? _a : () => \"black\")(this));\n }\n\n drawTrail(trail, state) {\n const stroke = trail.getStrokeOutline(trail.options.size / state.zoom.value).map(([x, y]) => {\n const result = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.sceneCoordsToViewportCoords)({\n sceneX: x,\n sceneY: y\n }, state);\n return [result.x, result.y];\n });\n return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.getSvgPathFromStroke)(stroke, true);\n }\n\n}\n\n//# sourceURL=webpack://ExcalidrawLib/./animated-trail.ts?");
742
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AnimatedTrail\": () => (/* binding */ AnimatedTrail)\n/* harmony export */ });\n/* harmony import */ var _zsviczian_laser_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @zsviczian/laser-pointer */ \"../../node_modules/@zsviczian/laser-pointer/dist/esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./utils.ts\");\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ \"./constants.ts\");\n\n\n\nclass AnimatedTrail {\n constructor(animationFrameHandler, app, options) {\n this.animationFrameHandler = animationFrameHandler;\n this.app = app;\n this.options = options;\n this.pastTrails = [];\n this.animationFrameHandler.register(this, this.onFrame.bind(this));\n this.trailElement = document.createElementNS(_constants__WEBPACK_IMPORTED_MODULE_2__.SVG_NS, \"path\");\n }\n\n get hasCurrentTrail() {\n return !!this.currentTrail;\n }\n\n hasLastPoint(x, y) {\n if (this.currentTrail) {\n const len = this.currentTrail.originalPoints.length;\n return this.currentTrail.originalPoints[len - 1][0] === x && this.currentTrail.originalPoints[len - 1][1] === y;\n }\n\n return false;\n }\n\n start(container) {\n if (container) {\n this.container = container;\n }\n\n if (this.trailElement.parentNode !== this.container && this.container) {\n this.container.appendChild(this.trailElement);\n }\n\n this.animationFrameHandler.start(this);\n }\n\n stop() {\n var _a;\n\n this.animationFrameHandler.stop(this);\n\n if (this.trailElement.parentNode === this.container) {\n (_a = this.container) === null || _a === void 0 ? void 0 : _a.removeChild(this.trailElement);\n }\n }\n\n startPath(x, y) {\n //zsviczian (fix offset)\n if (this.container) {\n this.container.style.top = \"0px\";\n this.container.style.left = \"0px\";\n const {\n x,\n y\n } = this.container.getBoundingClientRect();\n this.container.style.top = `${-y}px`;\n this.container.style.left = `${-x}px`;\n }\n\n this.currentTrail = new _zsviczian_laser_pointer__WEBPACK_IMPORTED_MODULE_0__.LaserPointer(this.options);\n this.currentTrail.addPoint([x, y, performance.now()]);\n this.update();\n }\n\n addPointToPath(x, y) {\n if (this.currentTrail) {\n this.currentTrail.addPoint([x, y, performance.now()]);\n this.update();\n }\n }\n\n endPath() {\n if (this.currentTrail) {\n this.currentTrail.close();\n this.currentTrail.options.keepHead = false;\n this.pastTrails.push(this.currentTrail);\n this.currentTrail = undefined;\n this.update();\n }\n }\n\n update() {\n this.start();\n }\n\n onFrame() {\n var _a;\n\n const paths = [];\n\n for (const trail of this.pastTrails) {\n paths.push(this.drawTrail(trail, this.app.state));\n }\n\n if (this.currentTrail) {\n const currentPath = this.drawTrail(this.currentTrail, this.app.state);\n paths.push(currentPath);\n }\n\n this.pastTrails = this.pastTrails.filter(trail => {\n return trail.getStrokeOutline().length !== 0;\n });\n\n if (paths.length === 0) {\n this.stop();\n }\n\n const svgPaths = paths.join(\" \").trim();\n this.trailElement.setAttribute(\"d\", svgPaths);\n this.trailElement.setAttribute(\"fill\", ((_a = this.options.fill) !== null && _a !== void 0 ? _a : () => \"black\")(this));\n }\n\n drawTrail(trail, state) {\n const stroke = trail.getStrokeOutline(trail.options.size / state.zoom.value).map(([x, y]) => {\n const result = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.sceneCoordsToViewportCoords)({\n sceneX: x,\n sceneY: y\n }, state);\n return [result.x, result.y];\n });\n return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.getSvgPathFromStroke)(stroke, true);\n }\n\n}\n\n//# sourceURL=webpack://ExcalidrawLib/./animated-trail.ts?");
743
743
 
744
744
  /***/ }),
745
745
 
@@ -2906,7 +2906,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
2906
2906
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2907
2907
 
2908
2908
  "use strict";
2909
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getAreaLimit\": () => (/* binding */ getAreaLimit),\n/* harmony export */ \"getWidthHeightLimit\": () => (/* binding */ getWidthHeightLimit),\n/* harmony export */ \"isExcaliBrainView\": () => (/* binding */ isExcaliBrainView)\n/* harmony export */ });\n//zsviczian, my dirty little secrets. These are hacks I am not proud of...\nlet OBSIDIAN_PLUGIN;\nlet EXCALIDRAW_CONFIG;\n\nconst setObsidianPlugin = () => {\n var _a, _b; //@ts-ignore\n\n\n OBSIDIAN_PLUGIN = (_b = (_a = app === null || app === void 0 ? void 0 : app.plugins) === null || _a === void 0 ? void 0 : _a.plugins) === null || _b === void 0 ? void 0 : _b[\"obsidian-excalidraw-plugin\"];\n EXCALIDRAW_CONFIG = OBSIDIAN_PLUGIN === null || OBSIDIAN_PLUGIN === void 0 ? void 0 : OBSIDIAN_PLUGIN.excalidrawConfig;\n};\n\nconst getAreaLimit = () => {\n var _a;\n\n if (!OBSIDIAN_PLUGIN) {\n setObsidianPlugin();\n }\n\n return (_a = EXCALIDRAW_CONFIG === null || EXCALIDRAW_CONFIG === void 0 ? void 0 : EXCALIDRAW_CONFIG.areaLimit) !== null && _a !== void 0 ? _a : 16777216;\n};\nconst getWidthHeightLimit = () => {\n var _a;\n\n if (!OBSIDIAN_PLUGIN) {\n setObsidianPlugin();\n }\n\n return (_a = EXCALIDRAW_CONFIG === null || EXCALIDRAW_CONFIG === void 0 ? void 0 : EXCALIDRAW_CONFIG.widthHeightLimit) !== null && _a !== void 0 ? _a : 32767;\n};\nconst isExcaliBrainView = () => {\n if (!OBSIDIAN_PLUGIN) {\n setObsidianPlugin();\n }\n\n const excalidrawView = OBSIDIAN_PLUGIN.activeExcalidrawView;\n if (!excalidrawView) return false;\n return excalidrawView.linksAlwaysOpenInANewPane && excalidrawView.allowFrameButtonsInViewMode;\n};\n\n//# sourceURL=webpack://ExcalidrawLib/./obsidianUtils.ts?");
2909
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getAreaLimit\": () => (/* binding */ getAreaLimit),\n/* harmony export */ \"getWidthHeightLimit\": () => (/* binding */ getWidthHeightLimit),\n/* harmony export */ \"isExcaliBrainView\": () => (/* binding */ isExcaliBrainView)\n/* harmony export */ });\n//zsviczian, my dirty little secrets. These are hacks I am not proud of...\nlet OBSIDIAN_PLUGIN;\nlet EXCALIDRAW_CONFIG;\n\nconst setObsidianPlugin = () => {\n var _a, _b; //@ts-ignore\n\n\n OBSIDIAN_PLUGIN = (_b = (_a = app === null || app === void 0 ? void 0 : app.plugins) === null || _a === void 0 ? void 0 : _a.plugins) === null || _b === void 0 ? void 0 : _b[\"obsidian-excalidraw-plugin\"];\n EXCALIDRAW_CONFIG = OBSIDIAN_PLUGIN === null || OBSIDIAN_PLUGIN === void 0 ? void 0 : OBSIDIAN_PLUGIN.excalidrawConfig;\n};\n\nconst getAreaLimit = () => {\n var _a;\n\n if (!OBSIDIAN_PLUGIN) {\n setObsidianPlugin();\n }\n\n return (_a = EXCALIDRAW_CONFIG === null || EXCALIDRAW_CONFIG === void 0 ? void 0 : EXCALIDRAW_CONFIG.areaLimit) !== null && _a !== void 0 ? _a : 16777216;\n};\nconst getWidthHeightLimit = () => {\n var _a;\n\n if (!OBSIDIAN_PLUGIN) {\n setObsidianPlugin();\n }\n\n return (_a = EXCALIDRAW_CONFIG === null || EXCALIDRAW_CONFIG === void 0 ? void 0 : EXCALIDRAW_CONFIG.widthHeightLimit) !== null && _a !== void 0 ? _a : 32767;\n};\nconst isExcaliBrainView = () => {\n if (!OBSIDIAN_PLUGIN) {\n setObsidianPlugin();\n }\n\n const excalidrawView = OBSIDIAN_PLUGIN === null || OBSIDIAN_PLUGIN === void 0 ? void 0 : OBSIDIAN_PLUGIN.activeExcalidrawView;\n if (!excalidrawView) return false;\n return excalidrawView.linksAlwaysOpenInANewPane && excalidrawView.allowFrameButtonsInViewMode;\n};\n\n//# sourceURL=webpack://ExcalidrawLib/./obsidianUtils.ts?");
2910
2910
 
2911
2911
  /***/ }),
2912
2912
 
@@ -2939,7 +2939,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
2939
2939
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2940
2940
 
2941
2941
  "use strict";
2942
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ \"./constants.ts\");\n\n\nif (\"development\" !== _constants__WEBPACK_IMPORTED_MODULE_0__.ENV.TEST) {\n /* eslint-disable */\n\n /* global __webpack_public_path__:writable */\n __webpack_require__.p = window.EXCALIDRAW_ASSET_PATH || `https://unpkg.com/${\"@zsviczian/excalidraw\"}@${\"0.17.1-obsidian-13\"}/dist/`;\n}\n\n//# sourceURL=webpack://ExcalidrawLib/./publicPath.js?");
2942
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ \"./constants.ts\");\n\n\nif (\"development\" !== _constants__WEBPACK_IMPORTED_MODULE_0__.ENV.TEST) {\n /* eslint-disable */\n\n /* global __webpack_public_path__:writable */\n __webpack_require__.p = window.EXCALIDRAW_ASSET_PATH || `https://unpkg.com/${\"@zsviczian/excalidraw\"}@${\"0.17.1-obsidian-14\"}/dist/`;\n}\n\n//# sourceURL=webpack://ExcalidrawLib/./publicPath.js?");
2943
2943
 
2944
2944
  /***/ }),
2945
2945