@netless/forge-whiteboard 0.1.20 → 1.0.0
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.
- package/dist/Camera.d.ts +1 -1
- package/dist/Camera.d.ts.map +1 -1
- package/dist/WhiteboardApplication.d.ts +24 -3
- package/dist/WhiteboardApplication.d.ts.map +1 -1
- package/dist/edit/TextEditor.d.ts.map +1 -1
- package/dist/model/RenderableModel.d.ts +1 -1
- package/dist/model/RenderableModel.d.ts.map +1 -1
- package/dist/model/TrashedElementsModel.d.ts +1 -1
- package/dist/model/TrashedElementsModel.d.ts.map +1 -1
- package/dist/model/renderable/CurveModel.d.ts.map +1 -1
- package/dist/utils/async.d.ts.map +1 -1
- package/dist/whiteboard.esm.js +480 -167
- package/dist/whiteboard.esm.js.map +4 -4
- package/dist/whiteboard.js +480 -167
- package/dist/whiteboard.js.map +4 -4
- package/package.json +2 -2
package/dist/whiteboard.esm.js
CHANGED
|
@@ -30,23 +30,23 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
mod
|
|
31
31
|
));
|
|
32
32
|
|
|
33
|
-
// (disabled):../../node_modules/.pnpm/paper@0.12.
|
|
33
|
+
// (disabled):../../node_modules/.pnpm/paper@0.12.18/node_modules/paper/dist/node/self.js
|
|
34
34
|
var require_self = __commonJS({
|
|
35
|
-
"(disabled):../../node_modules/.pnpm/paper@0.12.
|
|
35
|
+
"(disabled):../../node_modules/.pnpm/paper@0.12.18/node_modules/paper/dist/node/self.js"() {
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
// ../../node_modules/.pnpm/acorn@8.
|
|
39
|
+
// ../../node_modules/.pnpm/acorn@8.15.0/node_modules/acorn/dist/acorn.js
|
|
40
40
|
var require_acorn = __commonJS({
|
|
41
|
-
"../../node_modules/.pnpm/acorn@8.
|
|
41
|
+
"../../node_modules/.pnpm/acorn@8.15.0/node_modules/acorn/dist/acorn.js"(exports, module) {
|
|
42
42
|
(function(global2, factory) {
|
|
43
43
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.acorn = {}));
|
|
44
44
|
})(exports, function(exports2) {
|
|
45
45
|
"use strict";
|
|
46
|
-
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9,
|
|
47
|
-
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1,
|
|
48
|
-
var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\
|
|
49
|
-
var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\
|
|
46
|
+
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
47
|
+
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
|
|
48
|
+
var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
|
|
49
|
+
var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
50
50
|
var reservedWords = {
|
|
51
51
|
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
|
|
52
52
|
5: "class enum extends super const export import",
|
|
@@ -452,7 +452,7 @@ var require_acorn = __commonJS({
|
|
|
452
452
|
array.push(comment);
|
|
453
453
|
};
|
|
454
454
|
}
|
|
455
|
-
var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
|
|
455
|
+
var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_CLASS_FIELD_INIT = 512, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK;
|
|
456
456
|
function functionFlags(async, generator) {
|
|
457
457
|
return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
|
|
458
458
|
}
|
|
@@ -515,19 +515,20 @@ var require_acorn = __commonJS({
|
|
|
515
515
|
return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
|
|
516
516
|
};
|
|
517
517
|
prototypeAccessors.inGenerator.get = function() {
|
|
518
|
-
return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0
|
|
518
|
+
return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0;
|
|
519
519
|
};
|
|
520
520
|
prototypeAccessors.inAsync.get = function() {
|
|
521
|
-
return (this.currentVarScope().flags & SCOPE_ASYNC) > 0
|
|
521
|
+
return (this.currentVarScope().flags & SCOPE_ASYNC) > 0;
|
|
522
522
|
};
|
|
523
523
|
prototypeAccessors.canAwait.get = function() {
|
|
524
524
|
for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) {
|
|
525
|
-
var
|
|
526
|
-
|
|
525
|
+
var ref2 = this.scopeStack[i2];
|
|
526
|
+
var flags = ref2.flags;
|
|
527
|
+
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT)) {
|
|
527
528
|
return false;
|
|
528
529
|
}
|
|
529
|
-
if (
|
|
530
|
-
return (
|
|
530
|
+
if (flags & SCOPE_FUNCTION) {
|
|
531
|
+
return (flags & SCOPE_ASYNC) > 0;
|
|
531
532
|
}
|
|
532
533
|
}
|
|
533
534
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
@@ -535,8 +536,7 @@ var require_acorn = __commonJS({
|
|
|
535
536
|
prototypeAccessors.allowSuper.get = function() {
|
|
536
537
|
var ref2 = this.currentThisScope();
|
|
537
538
|
var flags = ref2.flags;
|
|
538
|
-
|
|
539
|
-
return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod;
|
|
539
|
+
return (flags & SCOPE_SUPER) > 0 || this.options.allowSuperOutsideMethod;
|
|
540
540
|
};
|
|
541
541
|
prototypeAccessors.allowDirectSuper.get = function() {
|
|
542
542
|
return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
|
|
@@ -545,10 +545,14 @@ var require_acorn = __commonJS({
|
|
|
545
545
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
546
546
|
};
|
|
547
547
|
prototypeAccessors.allowNewDotTarget.get = function() {
|
|
548
|
-
var
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
548
|
+
for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) {
|
|
549
|
+
var ref2 = this.scopeStack[i2];
|
|
550
|
+
var flags = ref2.flags;
|
|
551
|
+
if (flags & (SCOPE_CLASS_STATIC_BLOCK | SCOPE_CLASS_FIELD_INIT) || flags & SCOPE_FUNCTION && !(flags & SCOPE_ARROW)) {
|
|
552
|
+
return true;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
return false;
|
|
552
556
|
};
|
|
553
557
|
prototypeAccessors.inClassStaticBlock.get = function() {
|
|
554
558
|
return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0;
|
|
@@ -575,7 +579,7 @@ var require_acorn = __commonJS({
|
|
|
575
579
|
};
|
|
576
580
|
Object.defineProperties(Parser.prototype, prototypeAccessors);
|
|
577
581
|
var pp$9 = Parser.prototype;
|
|
578
|
-
var literal = /^(?:'((
|
|
582
|
+
var literal = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
579
583
|
pp$9.strictDirective = function(start) {
|
|
580
584
|
if (this.options.ecmaVersion < 5) {
|
|
581
585
|
return false;
|
|
@@ -764,6 +768,44 @@ var require_acorn = __commonJS({
|
|
|
764
768
|
var next = this.pos + skip[0].length, after;
|
|
765
769
|
return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
|
|
766
770
|
};
|
|
771
|
+
pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
|
|
772
|
+
if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using")) {
|
|
773
|
+
return false;
|
|
774
|
+
}
|
|
775
|
+
skipWhiteSpace.lastIndex = this.pos;
|
|
776
|
+
var skip = skipWhiteSpace.exec(this.input);
|
|
777
|
+
var next = this.pos + skip[0].length;
|
|
778
|
+
if (lineBreak.test(this.input.slice(this.pos, next))) {
|
|
779
|
+
return false;
|
|
780
|
+
}
|
|
781
|
+
if (isAwaitUsing) {
|
|
782
|
+
var awaitEndPos = next + 5, after;
|
|
783
|
+
if (this.input.slice(next, awaitEndPos) !== "using" || awaitEndPos === this.input.length || isIdentifierChar(after = this.input.charCodeAt(awaitEndPos)) || after > 55295 && after < 56320) {
|
|
784
|
+
return false;
|
|
785
|
+
}
|
|
786
|
+
skipWhiteSpace.lastIndex = awaitEndPos;
|
|
787
|
+
var skipAfterUsing = skipWhiteSpace.exec(this.input);
|
|
788
|
+
if (skipAfterUsing && lineBreak.test(this.input.slice(awaitEndPos, awaitEndPos + skipAfterUsing[0].length))) {
|
|
789
|
+
return false;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
if (isFor) {
|
|
793
|
+
var ofEndPos = next + 2, after$1;
|
|
794
|
+
if (this.input.slice(next, ofEndPos) === "of") {
|
|
795
|
+
if (ofEndPos === this.input.length || !isIdentifierChar(after$1 = this.input.charCodeAt(ofEndPos)) && !(after$1 > 55295 && after$1 < 56320)) {
|
|
796
|
+
return false;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
var ch = this.input.charCodeAt(next);
|
|
801
|
+
return isIdentifierStart(ch, true) || ch === 92;
|
|
802
|
+
};
|
|
803
|
+
pp$8.isAwaitUsing = function(isFor) {
|
|
804
|
+
return this.isUsingKeyword(true, isFor);
|
|
805
|
+
};
|
|
806
|
+
pp$8.isUsing = function(isFor) {
|
|
807
|
+
return this.isUsingKeyword(false, isFor);
|
|
808
|
+
};
|
|
767
809
|
pp$8.parseStatement = function(context, topLevel, exports3) {
|
|
768
810
|
var starttype = this.type, node = this.startNode(), kind;
|
|
769
811
|
if (this.isLet(context)) {
|
|
@@ -842,6 +884,22 @@ var require_acorn = __commonJS({
|
|
|
842
884
|
this.next();
|
|
843
885
|
return this.parseFunctionStatement(node, true, !context);
|
|
844
886
|
}
|
|
887
|
+
var usingKind = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
|
|
888
|
+
if (usingKind) {
|
|
889
|
+
if (topLevel && this.options.sourceType === "script") {
|
|
890
|
+
this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`");
|
|
891
|
+
}
|
|
892
|
+
if (usingKind === "await using") {
|
|
893
|
+
if (!this.canAwait) {
|
|
894
|
+
this.raise(this.start, "Await using cannot appear outside of async function");
|
|
895
|
+
}
|
|
896
|
+
this.next();
|
|
897
|
+
}
|
|
898
|
+
this.next();
|
|
899
|
+
this.parseVar(node, false, usingKind);
|
|
900
|
+
this.semicolon();
|
|
901
|
+
return this.finishNode(node, "VariableDeclaration");
|
|
902
|
+
}
|
|
845
903
|
var maybeName = this.value, expr = this.parseExpression();
|
|
846
904
|
if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) {
|
|
847
905
|
return this.parseLabeledStatement(node, maybeName, expr, context);
|
|
@@ -915,34 +973,35 @@ var require_acorn = __commonJS({
|
|
|
915
973
|
this.next();
|
|
916
974
|
this.parseVar(init$1, true, kind);
|
|
917
975
|
this.finishNode(init$1, "VariableDeclaration");
|
|
918
|
-
|
|
919
|
-
if (this.options.ecmaVersion >= 9) {
|
|
920
|
-
if (this.type === types$1._in) {
|
|
921
|
-
if (awaitAt > -1) {
|
|
922
|
-
this.unexpected(awaitAt);
|
|
923
|
-
}
|
|
924
|
-
} else {
|
|
925
|
-
node.await = awaitAt > -1;
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
return this.parseForIn(node, init$1);
|
|
929
|
-
}
|
|
930
|
-
if (awaitAt > -1) {
|
|
931
|
-
this.unexpected(awaitAt);
|
|
932
|
-
}
|
|
933
|
-
return this.parseFor(node, init$1);
|
|
976
|
+
return this.parseForAfterInit(node, init$1, awaitAt);
|
|
934
977
|
}
|
|
935
978
|
var startsWithLet = this.isContextual("let"), isForOf = false;
|
|
979
|
+
var usingKind = this.isUsing(true) ? "using" : this.isAwaitUsing(true) ? "await using" : null;
|
|
980
|
+
if (usingKind) {
|
|
981
|
+
var init$2 = this.startNode();
|
|
982
|
+
this.next();
|
|
983
|
+
if (usingKind === "await using") {
|
|
984
|
+
this.next();
|
|
985
|
+
}
|
|
986
|
+
this.parseVar(init$2, true, usingKind);
|
|
987
|
+
this.finishNode(init$2, "VariableDeclaration");
|
|
988
|
+
return this.parseForAfterInit(node, init$2, awaitAt);
|
|
989
|
+
}
|
|
990
|
+
var containsEsc = this.containsEsc;
|
|
936
991
|
var refDestructuringErrors = new DestructuringErrors();
|
|
937
|
-
var
|
|
992
|
+
var initPos = this.start;
|
|
993
|
+
var init = awaitAt > -1 ? this.parseExprSubscripts(refDestructuringErrors, "await") : this.parseExpression(true, refDestructuringErrors);
|
|
938
994
|
if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
|
|
939
|
-
if (
|
|
995
|
+
if (awaitAt > -1) {
|
|
940
996
|
if (this.type === types$1._in) {
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
997
|
+
this.unexpected(awaitAt);
|
|
998
|
+
}
|
|
999
|
+
node.await = true;
|
|
1000
|
+
} else if (isForOf && this.options.ecmaVersion >= 8) {
|
|
1001
|
+
if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") {
|
|
1002
|
+
this.unexpected();
|
|
1003
|
+
} else if (this.options.ecmaVersion >= 9) {
|
|
1004
|
+
node.await = false;
|
|
946
1005
|
}
|
|
947
1006
|
}
|
|
948
1007
|
if (startsWithLet && isForOf) {
|
|
@@ -959,6 +1018,24 @@ var require_acorn = __commonJS({
|
|
|
959
1018
|
}
|
|
960
1019
|
return this.parseFor(node, init);
|
|
961
1020
|
};
|
|
1021
|
+
pp$8.parseForAfterInit = function(node, init, awaitAt) {
|
|
1022
|
+
if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init.declarations.length === 1) {
|
|
1023
|
+
if (this.options.ecmaVersion >= 9) {
|
|
1024
|
+
if (this.type === types$1._in) {
|
|
1025
|
+
if (awaitAt > -1) {
|
|
1026
|
+
this.unexpected(awaitAt);
|
|
1027
|
+
}
|
|
1028
|
+
} else {
|
|
1029
|
+
node.await = awaitAt > -1;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
return this.parseForIn(node, init);
|
|
1033
|
+
}
|
|
1034
|
+
if (awaitAt > -1) {
|
|
1035
|
+
this.unexpected(awaitAt);
|
|
1036
|
+
}
|
|
1037
|
+
return this.parseFor(node, init);
|
|
1038
|
+
};
|
|
962
1039
|
pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {
|
|
963
1040
|
this.next();
|
|
964
1041
|
return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync);
|
|
@@ -1184,6 +1261,8 @@ var require_acorn = __commonJS({
|
|
|
1184
1261
|
decl.init = this.parseMaybeAssign(isFor);
|
|
1185
1262
|
} else if (!allowMissingInitializer && kind === "const" && !(this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
|
|
1186
1263
|
this.unexpected();
|
|
1264
|
+
} else if (!allowMissingInitializer && (kind === "using" || kind === "await using") && this.options.ecmaVersion >= 17 && this.type !== types$1._in && !this.isContextual("of")) {
|
|
1265
|
+
this.raise(this.lastTokEnd, "Missing initializer in " + kind + " declaration");
|
|
1187
1266
|
} else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) {
|
|
1188
1267
|
this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
|
|
1189
1268
|
} else {
|
|
@@ -1197,7 +1276,7 @@ var require_acorn = __commonJS({
|
|
|
1197
1276
|
return node;
|
|
1198
1277
|
};
|
|
1199
1278
|
pp$8.parseVarId = function(decl, kind) {
|
|
1200
|
-
decl.id = this.parseBindingAtom();
|
|
1279
|
+
decl.id = kind === "using" || kind === "await using" ? this.parseIdent() : this.parseBindingAtom();
|
|
1201
1280
|
this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
|
|
1202
1281
|
};
|
|
1203
1282
|
var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4;
|
|
@@ -1378,11 +1457,9 @@ var require_acorn = __commonJS({
|
|
|
1378
1457
|
this.raise(field.key.start, "Classes can't have a static field named 'prototype'");
|
|
1379
1458
|
}
|
|
1380
1459
|
if (this.eat(types$1.eq)) {
|
|
1381
|
-
|
|
1382
|
-
var inClassFieldInit = scope.inClassFieldInit;
|
|
1383
|
-
scope.inClassFieldInit = true;
|
|
1460
|
+
this.enterScope(SCOPE_CLASS_FIELD_INIT | SCOPE_SUPER);
|
|
1384
1461
|
field.value = this.parseMaybeAssign();
|
|
1385
|
-
|
|
1462
|
+
this.exitScope();
|
|
1386
1463
|
} else {
|
|
1387
1464
|
field.value = null;
|
|
1388
1465
|
}
|
|
@@ -1480,6 +1557,9 @@ var require_acorn = __commonJS({
|
|
|
1480
1557
|
this.unexpected();
|
|
1481
1558
|
}
|
|
1482
1559
|
node.source = this.parseExprAtom();
|
|
1560
|
+
if (this.options.ecmaVersion >= 16) {
|
|
1561
|
+
node.attributes = this.parseWithClause();
|
|
1562
|
+
}
|
|
1483
1563
|
this.semicolon();
|
|
1484
1564
|
return this.finishNode(node, "ExportAllDeclaration");
|
|
1485
1565
|
};
|
|
@@ -1502,6 +1582,9 @@ var require_acorn = __commonJS({
|
|
|
1502
1582
|
}
|
|
1503
1583
|
node.specifiers = [];
|
|
1504
1584
|
node.source = null;
|
|
1585
|
+
if (this.options.ecmaVersion >= 16) {
|
|
1586
|
+
node.attributes = [];
|
|
1587
|
+
}
|
|
1505
1588
|
} else {
|
|
1506
1589
|
node.declaration = null;
|
|
1507
1590
|
node.specifiers = this.parseExportSpecifiers(exports3);
|
|
@@ -1510,6 +1593,9 @@ var require_acorn = __commonJS({
|
|
|
1510
1593
|
this.unexpected();
|
|
1511
1594
|
}
|
|
1512
1595
|
node.source = this.parseExprAtom();
|
|
1596
|
+
if (this.options.ecmaVersion >= 16) {
|
|
1597
|
+
node.attributes = this.parseWithClause();
|
|
1598
|
+
}
|
|
1513
1599
|
} else {
|
|
1514
1600
|
for (var i2 = 0, list2 = node.specifiers; i2 < list2.length; i2 += 1) {
|
|
1515
1601
|
var spec = list2[i2];
|
|
@@ -1520,6 +1606,9 @@ var require_acorn = __commonJS({
|
|
|
1520
1606
|
}
|
|
1521
1607
|
}
|
|
1522
1608
|
node.source = null;
|
|
1609
|
+
if (this.options.ecmaVersion >= 16) {
|
|
1610
|
+
node.attributes = [];
|
|
1611
|
+
}
|
|
1523
1612
|
}
|
|
1524
1613
|
this.semicolon();
|
|
1525
1614
|
}
|
|
@@ -1631,6 +1720,9 @@ var require_acorn = __commonJS({
|
|
|
1631
1720
|
this.expectContextual("from");
|
|
1632
1721
|
node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected();
|
|
1633
1722
|
}
|
|
1723
|
+
if (this.options.ecmaVersion >= 16) {
|
|
1724
|
+
node.attributes = this.parseWithClause();
|
|
1725
|
+
}
|
|
1634
1726
|
this.semicolon();
|
|
1635
1727
|
return this.finishNode(node, "ImportDeclaration");
|
|
1636
1728
|
};
|
|
@@ -1686,6 +1778,43 @@ var require_acorn = __commonJS({
|
|
|
1686
1778
|
}
|
|
1687
1779
|
return nodes;
|
|
1688
1780
|
};
|
|
1781
|
+
pp$8.parseWithClause = function() {
|
|
1782
|
+
var nodes = [];
|
|
1783
|
+
if (!this.eat(types$1._with)) {
|
|
1784
|
+
return nodes;
|
|
1785
|
+
}
|
|
1786
|
+
this.expect(types$1.braceL);
|
|
1787
|
+
var attributeKeys = {};
|
|
1788
|
+
var first = true;
|
|
1789
|
+
while (!this.eat(types$1.braceR)) {
|
|
1790
|
+
if (!first) {
|
|
1791
|
+
this.expect(types$1.comma);
|
|
1792
|
+
if (this.afterTrailingComma(types$1.braceR)) {
|
|
1793
|
+
break;
|
|
1794
|
+
}
|
|
1795
|
+
} else {
|
|
1796
|
+
first = false;
|
|
1797
|
+
}
|
|
1798
|
+
var attr = this.parseImportAttribute();
|
|
1799
|
+
var keyName = attr.key.type === "Identifier" ? attr.key.name : attr.key.value;
|
|
1800
|
+
if (hasOwn(attributeKeys, keyName)) {
|
|
1801
|
+
this.raiseRecoverable(attr.key.start, "Duplicate attribute key '" + keyName + "'");
|
|
1802
|
+
}
|
|
1803
|
+
attributeKeys[keyName] = true;
|
|
1804
|
+
nodes.push(attr);
|
|
1805
|
+
}
|
|
1806
|
+
return nodes;
|
|
1807
|
+
};
|
|
1808
|
+
pp$8.parseImportAttribute = function() {
|
|
1809
|
+
var node = this.startNode();
|
|
1810
|
+
node.key = this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never");
|
|
1811
|
+
this.expect(types$1.colon);
|
|
1812
|
+
if (this.type !== types$1.string) {
|
|
1813
|
+
this.unexpected();
|
|
1814
|
+
}
|
|
1815
|
+
node.value = this.parseExprAtom();
|
|
1816
|
+
return this.finishNode(node, "ImportAttribute");
|
|
1817
|
+
};
|
|
1689
1818
|
pp$8.parseModuleExportName = function() {
|
|
1690
1819
|
if (this.options.ecmaVersion >= 13 && this.type === types$1.string) {
|
|
1691
1820
|
var stringLiteral = this.parseLiteral(this.value);
|
|
@@ -2291,7 +2420,7 @@ var require_acorn = __commonJS({
|
|
|
2291
2420
|
this.checkExpressionErrors(refDestructuringErrors, true);
|
|
2292
2421
|
if (update) {
|
|
2293
2422
|
this.checkLValSimple(node.argument);
|
|
2294
|
-
} else if (this.strict && node.operator === "delete" && node.argument
|
|
2423
|
+
} else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument)) {
|
|
2295
2424
|
this.raiseRecoverable(node.start, "Deleting local variable in strict mode");
|
|
2296
2425
|
} else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) {
|
|
2297
2426
|
this.raiseRecoverable(node.start, "Private fields can not be deleted");
|
|
@@ -2332,8 +2461,11 @@ var require_acorn = __commonJS({
|
|
|
2332
2461
|
return expr;
|
|
2333
2462
|
}
|
|
2334
2463
|
};
|
|
2464
|
+
function isLocalVariableAccess(node) {
|
|
2465
|
+
return node.type === "Identifier" || node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression);
|
|
2466
|
+
}
|
|
2335
2467
|
function isPrivateFieldAccess(node) {
|
|
2336
|
-
return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess(node.expression);
|
|
2468
|
+
return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) || node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression);
|
|
2337
2469
|
}
|
|
2338
2470
|
pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) {
|
|
2339
2471
|
var startPos = this.start, startLoc = this.startLoc;
|
|
@@ -2563,12 +2695,31 @@ var require_acorn = __commonJS({
|
|
|
2563
2695
|
pp$5.parseDynamicImport = function(node) {
|
|
2564
2696
|
this.next();
|
|
2565
2697
|
node.source = this.parseMaybeAssign();
|
|
2566
|
-
if (
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
this.
|
|
2698
|
+
if (this.options.ecmaVersion >= 16) {
|
|
2699
|
+
if (!this.eat(types$1.parenR)) {
|
|
2700
|
+
this.expect(types$1.comma);
|
|
2701
|
+
if (!this.afterTrailingComma(types$1.parenR)) {
|
|
2702
|
+
node.options = this.parseMaybeAssign();
|
|
2703
|
+
if (!this.eat(types$1.parenR)) {
|
|
2704
|
+
this.expect(types$1.comma);
|
|
2705
|
+
if (!this.afterTrailingComma(types$1.parenR)) {
|
|
2706
|
+
this.unexpected();
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
} else {
|
|
2710
|
+
node.options = null;
|
|
2711
|
+
}
|
|
2570
2712
|
} else {
|
|
2571
|
-
|
|
2713
|
+
node.options = null;
|
|
2714
|
+
}
|
|
2715
|
+
} else {
|
|
2716
|
+
if (!this.eat(types$1.parenR)) {
|
|
2717
|
+
var errorPos = this.start;
|
|
2718
|
+
if (this.eat(types$1.comma) && this.eat(types$1.parenR)) {
|
|
2719
|
+
this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()");
|
|
2720
|
+
} else {
|
|
2721
|
+
this.unexpected(errorPos);
|
|
2722
|
+
}
|
|
2572
2723
|
}
|
|
2573
2724
|
}
|
|
2574
2725
|
return this.finishNode(node, "ImportExpression");
|
|
@@ -2593,7 +2744,7 @@ var require_acorn = __commonJS({
|
|
|
2593
2744
|
node.value = value;
|
|
2594
2745
|
node.raw = this.input.slice(this.start, this.end);
|
|
2595
2746
|
if (node.raw.charCodeAt(node.raw.length - 1) === 110) {
|
|
2596
|
-
node.bigint = node.raw.slice(0, -1).replace(/_/g, "");
|
|
2747
|
+
node.bigint = node.value != null ? node.value.toString() : node.raw.slice(0, -1).replace(/_/g, "");
|
|
2597
2748
|
}
|
|
2598
2749
|
this.next();
|
|
2599
2750
|
return this.finishNode(node, "Literal");
|
|
@@ -2719,7 +2870,7 @@ var require_acorn = __commonJS({
|
|
|
2719
2870
|
this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
|
|
2720
2871
|
}
|
|
2721
2872
|
elem.value = {
|
|
2722
|
-
raw: this.value,
|
|
2873
|
+
raw: this.value.replace(/\r\n?/g, "\n"),
|
|
2723
2874
|
cooked: null
|
|
2724
2875
|
};
|
|
2725
2876
|
} else {
|
|
@@ -2817,9 +2968,10 @@ var require_acorn = __commonJS({
|
|
|
2817
2968
|
return this.finishNode(prop, "Property");
|
|
2818
2969
|
};
|
|
2819
2970
|
pp$5.parseGetterSetter = function(prop) {
|
|
2820
|
-
|
|
2971
|
+
var kind = prop.key.name;
|
|
2821
2972
|
this.parsePropertyName(prop);
|
|
2822
2973
|
prop.value = this.parseMethod(false);
|
|
2974
|
+
prop.kind = kind;
|
|
2823
2975
|
var paramCount = prop.kind === "get" ? 0 : 1;
|
|
2824
2976
|
if (prop.value.params.length !== paramCount) {
|
|
2825
2977
|
var start = prop.value.start;
|
|
@@ -2845,9 +2997,9 @@ var require_acorn = __commonJS({
|
|
|
2845
2997
|
if (isPattern) {
|
|
2846
2998
|
this.unexpected();
|
|
2847
2999
|
}
|
|
2848
|
-
prop.kind = "init";
|
|
2849
3000
|
prop.method = true;
|
|
2850
3001
|
prop.value = this.parseMethod(isGenerator, isAsync);
|
|
3002
|
+
prop.kind = "init";
|
|
2851
3003
|
} else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) {
|
|
2852
3004
|
if (isGenerator || isAsync) {
|
|
2853
3005
|
this.unexpected();
|
|
@@ -2861,7 +3013,6 @@ var require_acorn = __commonJS({
|
|
|
2861
3013
|
if (prop.key.name === "await" && !this.awaitIdentPos) {
|
|
2862
3014
|
this.awaitIdentPos = startPos;
|
|
2863
3015
|
}
|
|
2864
|
-
prop.kind = "init";
|
|
2865
3016
|
if (isPattern) {
|
|
2866
3017
|
prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key));
|
|
2867
3018
|
} else if (this.type === types$1.eq && refDestructuringErrors) {
|
|
@@ -2872,6 +3023,7 @@ var require_acorn = __commonJS({
|
|
|
2872
3023
|
} else {
|
|
2873
3024
|
prop.value = this.copyNode(prop.key);
|
|
2874
3025
|
}
|
|
3026
|
+
prop.kind = "init";
|
|
2875
3027
|
prop.shorthand = true;
|
|
2876
3028
|
} else {
|
|
2877
3029
|
this.unexpected();
|
|
@@ -3021,7 +3173,7 @@ var require_acorn = __commonJS({
|
|
|
3021
3173
|
if (this.inAsync && name === "await") {
|
|
3022
3174
|
this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function");
|
|
3023
3175
|
}
|
|
3024
|
-
if (this.currentThisScope().
|
|
3176
|
+
if (!(this.currentThisScope().flags & SCOPE_VAR) && name === "arguments") {
|
|
3025
3177
|
this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer");
|
|
3026
3178
|
}
|
|
3027
3179
|
if (this.inClassStaticBlock && (name === "arguments" || name === "await")) {
|
|
@@ -3114,6 +3266,9 @@ var require_acorn = __commonJS({
|
|
|
3114
3266
|
pp$4.raise = function(pos, message) {
|
|
3115
3267
|
var loc = getLineInfo(this.input, pos);
|
|
3116
3268
|
message += " (" + loc.line + ":" + loc.column + ")";
|
|
3269
|
+
if (this.sourceFile) {
|
|
3270
|
+
message += " in " + this.sourceFile;
|
|
3271
|
+
}
|
|
3117
3272
|
var err = new SyntaxError(message);
|
|
3118
3273
|
err.pos = pos;
|
|
3119
3274
|
err.loc = loc;
|
|
@@ -3132,7 +3287,6 @@ var require_acorn = __commonJS({
|
|
|
3132
3287
|
this.var = [];
|
|
3133
3288
|
this.lexical = [];
|
|
3134
3289
|
this.functions = [];
|
|
3135
|
-
this.inClassFieldInit = false;
|
|
3136
3290
|
};
|
|
3137
3291
|
pp$3.enterScope = function(flags) {
|
|
3138
3292
|
this.scopeStack.push(new Scope(flags));
|
|
@@ -3194,7 +3348,7 @@ var require_acorn = __commonJS({
|
|
|
3194
3348
|
pp$3.currentVarScope = function() {
|
|
3195
3349
|
for (var i2 = this.scopeStack.length - 1; ; i2--) {
|
|
3196
3350
|
var scope = this.scopeStack[i2];
|
|
3197
|
-
if (scope.flags & SCOPE_VAR) {
|
|
3351
|
+
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK)) {
|
|
3198
3352
|
return scope;
|
|
3199
3353
|
}
|
|
3200
3354
|
}
|
|
@@ -3202,7 +3356,7 @@ var require_acorn = __commonJS({
|
|
|
3202
3356
|
pp$3.currentThisScope = function() {
|
|
3203
3357
|
for (var i2 = this.scopeStack.length - 1; ; i2--) {
|
|
3204
3358
|
var scope = this.scopeStack[i2];
|
|
3205
|
-
if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) {
|
|
3359
|
+
if (scope.flags & (SCOPE_VAR | SCOPE_CLASS_FIELD_INIT | SCOPE_CLASS_STATIC_BLOCK) && !(scope.flags & SCOPE_ARROW)) {
|
|
3206
3360
|
return scope;
|
|
3207
3361
|
}
|
|
3208
3362
|
}
|
|
@@ -3252,6 +3406,7 @@ var require_acorn = __commonJS({
|
|
|
3252
3406
|
}
|
|
3253
3407
|
return newNode;
|
|
3254
3408
|
};
|
|
3409
|
+
var scriptValuesAddedInUnicode = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz";
|
|
3255
3410
|
var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";
|
|
3256
3411
|
var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic";
|
|
3257
3412
|
var ecma11BinaryProperties = ecma10BinaryProperties;
|
|
@@ -3281,7 +3436,7 @@ var require_acorn = __commonJS({
|
|
|
3281
3436
|
var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";
|
|
3282
3437
|
var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";
|
|
3283
3438
|
var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";
|
|
3284
|
-
var ecma14ScriptValues = ecma13ScriptValues + "
|
|
3439
|
+
var ecma14ScriptValues = ecma13ScriptValues + " " + scriptValuesAddedInUnicode;
|
|
3285
3440
|
var unicodeScriptValues = {
|
|
3286
3441
|
9: ecma9ScriptValues,
|
|
3287
3442
|
10: ecma10ScriptValues,
|
|
@@ -3310,6 +3465,23 @@ var require_acorn = __commonJS({
|
|
|
3310
3465
|
buildUnicodeData(ecmaVersion);
|
|
3311
3466
|
}
|
|
3312
3467
|
var pp$1 = Parser.prototype;
|
|
3468
|
+
var BranchID = function BranchID2(parent, base) {
|
|
3469
|
+
this.parent = parent;
|
|
3470
|
+
this.base = base || this;
|
|
3471
|
+
};
|
|
3472
|
+
BranchID.prototype.separatedFrom = function separatedFrom(alt) {
|
|
3473
|
+
for (var self2 = this; self2; self2 = self2.parent) {
|
|
3474
|
+
for (var other = alt; other; other = other.parent) {
|
|
3475
|
+
if (self2.base === other.base && self2 !== other) {
|
|
3476
|
+
return true;
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3479
|
+
}
|
|
3480
|
+
return false;
|
|
3481
|
+
};
|
|
3482
|
+
BranchID.prototype.sibling = function sibling() {
|
|
3483
|
+
return new BranchID(this.parent, this.base);
|
|
3484
|
+
};
|
|
3313
3485
|
var RegExpValidationState = function RegExpValidationState2(parser) {
|
|
3314
3486
|
this.parser = parser;
|
|
3315
3487
|
this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : "");
|
|
@@ -3326,8 +3498,9 @@ var require_acorn = __commonJS({
|
|
|
3326
3498
|
this.lastAssertionIsQuantifiable = false;
|
|
3327
3499
|
this.numCapturingParens = 0;
|
|
3328
3500
|
this.maxBackReference = 0;
|
|
3329
|
-
this.groupNames =
|
|
3501
|
+
this.groupNames = /* @__PURE__ */ Object.create(null);
|
|
3330
3502
|
this.backReferenceNames = [];
|
|
3503
|
+
this.branchID = null;
|
|
3331
3504
|
};
|
|
3332
3505
|
RegExpValidationState.prototype.reset = function reset(start, pattern, flags) {
|
|
3333
3506
|
var unicodeSets = flags.indexOf("v") !== -1;
|
|
@@ -3433,9 +3606,15 @@ var require_acorn = __commonJS({
|
|
|
3433
3606
|
this.raise(state.start, "Invalid regular expression flag");
|
|
3434
3607
|
}
|
|
3435
3608
|
};
|
|
3609
|
+
function hasProp(obj) {
|
|
3610
|
+
for (var _ in obj) {
|
|
3611
|
+
return true;
|
|
3612
|
+
}
|
|
3613
|
+
return false;
|
|
3614
|
+
}
|
|
3436
3615
|
pp$1.validateRegExpPattern = function(state) {
|
|
3437
3616
|
this.regexp_pattern(state);
|
|
3438
|
-
if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames
|
|
3617
|
+
if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
|
|
3439
3618
|
state.switchN = true;
|
|
3440
3619
|
this.regexp_pattern(state);
|
|
3441
3620
|
}
|
|
@@ -3447,8 +3626,9 @@ var require_acorn = __commonJS({
|
|
|
3447
3626
|
state.lastAssertionIsQuantifiable = false;
|
|
3448
3627
|
state.numCapturingParens = 0;
|
|
3449
3628
|
state.maxBackReference = 0;
|
|
3450
|
-
state.groupNames
|
|
3629
|
+
state.groupNames = /* @__PURE__ */ Object.create(null);
|
|
3451
3630
|
state.backReferenceNames.length = 0;
|
|
3631
|
+
state.branchID = null;
|
|
3452
3632
|
this.regexp_disjunction(state);
|
|
3453
3633
|
if (state.pos !== state.source.length) {
|
|
3454
3634
|
if (state.eat(
|
|
@@ -3472,19 +3652,29 @@ var require_acorn = __commonJS({
|
|
|
3472
3652
|
}
|
|
3473
3653
|
for (var i2 = 0, list2 = state.backReferenceNames; i2 < list2.length; i2 += 1) {
|
|
3474
3654
|
var name = list2[i2];
|
|
3475
|
-
if (state.groupNames
|
|
3655
|
+
if (!state.groupNames[name]) {
|
|
3476
3656
|
state.raise("Invalid named capture referenced");
|
|
3477
3657
|
}
|
|
3478
3658
|
}
|
|
3479
3659
|
};
|
|
3480
3660
|
pp$1.regexp_disjunction = function(state) {
|
|
3661
|
+
var trackDisjunction = this.options.ecmaVersion >= 16;
|
|
3662
|
+
if (trackDisjunction) {
|
|
3663
|
+
state.branchID = new BranchID(state.branchID, null);
|
|
3664
|
+
}
|
|
3481
3665
|
this.regexp_alternative(state);
|
|
3482
3666
|
while (state.eat(
|
|
3483
3667
|
124
|
|
3484
3668
|
/* | */
|
|
3485
3669
|
)) {
|
|
3670
|
+
if (trackDisjunction) {
|
|
3671
|
+
state.branchID = state.branchID.sibling();
|
|
3672
|
+
}
|
|
3486
3673
|
this.regexp_alternative(state);
|
|
3487
3674
|
}
|
|
3675
|
+
if (trackDisjunction) {
|
|
3676
|
+
state.branchID = state.branchID.parent;
|
|
3677
|
+
}
|
|
3488
3678
|
if (this.regexp_eatQuantifier(state, true)) {
|
|
3489
3679
|
state.raise("Nothing to repeat");
|
|
3490
3680
|
}
|
|
@@ -3659,18 +3849,47 @@ var require_acorn = __commonJS({
|
|
|
3659
3849
|
if (state.eat(
|
|
3660
3850
|
63
|
|
3661
3851
|
/* ? */
|
|
3662
|
-
) && state.eat(
|
|
3663
|
-
58
|
|
3664
|
-
/* : */
|
|
3665
3852
|
)) {
|
|
3666
|
-
this.
|
|
3853
|
+
if (this.options.ecmaVersion >= 16) {
|
|
3854
|
+
var addModifiers = this.regexp_eatModifiers(state);
|
|
3855
|
+
var hasHyphen = state.eat(
|
|
3856
|
+
45
|
|
3857
|
+
/* - */
|
|
3858
|
+
);
|
|
3859
|
+
if (addModifiers || hasHyphen) {
|
|
3860
|
+
for (var i2 = 0; i2 < addModifiers.length; i2++) {
|
|
3861
|
+
var modifier = addModifiers.charAt(i2);
|
|
3862
|
+
if (addModifiers.indexOf(modifier, i2 + 1) > -1) {
|
|
3863
|
+
state.raise("Duplicate regular expression modifiers");
|
|
3864
|
+
}
|
|
3865
|
+
}
|
|
3866
|
+
if (hasHyphen) {
|
|
3867
|
+
var removeModifiers = this.regexp_eatModifiers(state);
|
|
3868
|
+
if (!addModifiers && !removeModifiers && state.current() === 58) {
|
|
3869
|
+
state.raise("Invalid regular expression modifiers");
|
|
3870
|
+
}
|
|
3871
|
+
for (var i$1 = 0; i$1 < removeModifiers.length; i$1++) {
|
|
3872
|
+
var modifier$1 = removeModifiers.charAt(i$1);
|
|
3873
|
+
if (removeModifiers.indexOf(modifier$1, i$1 + 1) > -1 || addModifiers.indexOf(modifier$1) > -1) {
|
|
3874
|
+
state.raise("Duplicate regular expression modifiers");
|
|
3875
|
+
}
|
|
3876
|
+
}
|
|
3877
|
+
}
|
|
3878
|
+
}
|
|
3879
|
+
}
|
|
3667
3880
|
if (state.eat(
|
|
3668
|
-
|
|
3669
|
-
/*
|
|
3881
|
+
58
|
|
3882
|
+
/* : */
|
|
3670
3883
|
)) {
|
|
3671
|
-
|
|
3884
|
+
this.regexp_disjunction(state);
|
|
3885
|
+
if (state.eat(
|
|
3886
|
+
41
|
|
3887
|
+
/* ) */
|
|
3888
|
+
)) {
|
|
3889
|
+
return true;
|
|
3890
|
+
}
|
|
3891
|
+
state.raise("Unterminated group");
|
|
3672
3892
|
}
|
|
3673
|
-
state.raise("Unterminated group");
|
|
3674
3893
|
}
|
|
3675
3894
|
state.pos = start;
|
|
3676
3895
|
}
|
|
@@ -3698,6 +3917,18 @@ var require_acorn = __commonJS({
|
|
|
3698
3917
|
}
|
|
3699
3918
|
return false;
|
|
3700
3919
|
};
|
|
3920
|
+
pp$1.regexp_eatModifiers = function(state) {
|
|
3921
|
+
var modifiers = "";
|
|
3922
|
+
var ch = 0;
|
|
3923
|
+
while ((ch = state.current()) !== -1 && isRegularExpressionModifier(ch)) {
|
|
3924
|
+
modifiers += codePointToString(ch);
|
|
3925
|
+
state.advance();
|
|
3926
|
+
}
|
|
3927
|
+
return modifiers;
|
|
3928
|
+
};
|
|
3929
|
+
function isRegularExpressionModifier(ch) {
|
|
3930
|
+
return ch === 105 || ch === 109 || ch === 115;
|
|
3931
|
+
}
|
|
3701
3932
|
pp$1.regexp_eatExtendedAtom = function(state) {
|
|
3702
3933
|
return state.eat(
|
|
3703
3934
|
46
|
|
@@ -3743,14 +3974,28 @@ var require_acorn = __commonJS({
|
|
|
3743
3974
|
63
|
|
3744
3975
|
/* ? */
|
|
3745
3976
|
)) {
|
|
3746
|
-
if (this.regexp_eatGroupName(state)) {
|
|
3747
|
-
|
|
3977
|
+
if (!this.regexp_eatGroupName(state)) {
|
|
3978
|
+
state.raise("Invalid group");
|
|
3979
|
+
}
|
|
3980
|
+
var trackDisjunction = this.options.ecmaVersion >= 16;
|
|
3981
|
+
var known = state.groupNames[state.lastStringValue];
|
|
3982
|
+
if (known) {
|
|
3983
|
+
if (trackDisjunction) {
|
|
3984
|
+
for (var i2 = 0, list2 = known; i2 < list2.length; i2 += 1) {
|
|
3985
|
+
var altID = list2[i2];
|
|
3986
|
+
if (!altID.separatedFrom(state.branchID)) {
|
|
3987
|
+
state.raise("Duplicate capture group name");
|
|
3988
|
+
}
|
|
3989
|
+
}
|
|
3990
|
+
} else {
|
|
3748
3991
|
state.raise("Duplicate capture group name");
|
|
3749
3992
|
}
|
|
3750
|
-
state.groupNames.push(state.lastStringValue);
|
|
3751
|
-
return;
|
|
3752
3993
|
}
|
|
3753
|
-
|
|
3994
|
+
if (trackDisjunction) {
|
|
3995
|
+
(known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID);
|
|
3996
|
+
} else {
|
|
3997
|
+
state.groupNames[state.lastStringValue] = true;
|
|
3998
|
+
}
|
|
3754
3999
|
}
|
|
3755
4000
|
};
|
|
3756
4001
|
pp$1.regexp_eatGroupName = function(state) {
|
|
@@ -5203,6 +5448,16 @@ var require_acorn = __commonJS({
|
|
|
5203
5448
|
}
|
|
5204
5449
|
case "`":
|
|
5205
5450
|
return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos));
|
|
5451
|
+
case "\r":
|
|
5452
|
+
if (this.input[this.pos + 1] === "\n") {
|
|
5453
|
+
++this.pos;
|
|
5454
|
+
}
|
|
5455
|
+
case "\n":
|
|
5456
|
+
case "\u2028":
|
|
5457
|
+
case "\u2029":
|
|
5458
|
+
++this.curLine;
|
|
5459
|
+
this.lineStart = this.pos + 1;
|
|
5460
|
+
break;
|
|
5206
5461
|
}
|
|
5207
5462
|
}
|
|
5208
5463
|
this.raise(this.start, "Unterminated template");
|
|
@@ -5271,6 +5526,10 @@ var require_acorn = __commonJS({
|
|
|
5271
5526
|
return String.fromCharCode(octal);
|
|
5272
5527
|
}
|
|
5273
5528
|
if (isNewLine(ch)) {
|
|
5529
|
+
if (this.options.locations) {
|
|
5530
|
+
this.lineStart = this.pos;
|
|
5531
|
+
++this.curLine;
|
|
5532
|
+
}
|
|
5274
5533
|
return "";
|
|
5275
5534
|
}
|
|
5276
5535
|
return String.fromCharCode(ch);
|
|
@@ -5321,7 +5580,7 @@ var require_acorn = __commonJS({
|
|
|
5321
5580
|
}
|
|
5322
5581
|
return this.finishToken(type, word);
|
|
5323
5582
|
};
|
|
5324
|
-
var version = "8.
|
|
5583
|
+
var version = "8.15.0";
|
|
5325
5584
|
Parser.acorn = {
|
|
5326
5585
|
Parser,
|
|
5327
5586
|
version,
|
|
@@ -5378,15 +5637,15 @@ var require_acorn = __commonJS({
|
|
|
5378
5637
|
}
|
|
5379
5638
|
});
|
|
5380
5639
|
|
|
5381
|
-
// (disabled):../../node_modules/.pnpm/paper@0.12.
|
|
5640
|
+
// (disabled):../../node_modules/.pnpm/paper@0.12.18/node_modules/paper/dist/node/extend.js
|
|
5382
5641
|
var require_extend = __commonJS({
|
|
5383
|
-
"(disabled):../../node_modules/.pnpm/paper@0.12.
|
|
5642
|
+
"(disabled):../../node_modules/.pnpm/paper@0.12.18/node_modules/paper/dist/node/extend.js"() {
|
|
5384
5643
|
}
|
|
5385
5644
|
});
|
|
5386
5645
|
|
|
5387
|
-
// ../../node_modules/.pnpm/paper@0.12.
|
|
5646
|
+
// ../../node_modules/.pnpm/paper@0.12.18/node_modules/paper/dist/paper-full.js
|
|
5388
5647
|
var require_paper_full = __commonJS({
|
|
5389
|
-
"../../node_modules/.pnpm/paper@0.12.
|
|
5648
|
+
"../../node_modules/.pnpm/paper@0.12.18/node_modules/paper/dist/paper-full.js"(exports, module) {
|
|
5390
5649
|
var paper2 = function(self2, undefined2) {
|
|
5391
5650
|
self2 = self2 || require_self();
|
|
5392
5651
|
var window2 = self2.window, document2 = self2.document;
|
|
@@ -6034,7 +6293,7 @@ var require_paper_full = __commonJS({
|
|
|
6034
6293
|
delete agent.chrome;
|
|
6035
6294
|
}
|
|
6036
6295
|
},
|
|
6037
|
-
version: "0.12.
|
|
6296
|
+
version: "0.12.18",
|
|
6038
6297
|
getView: function() {
|
|
6039
6298
|
var project = this.project;
|
|
6040
6299
|
return project && project._view;
|
|
@@ -8535,6 +8794,15 @@ var require_paper_full = __commonJS({
|
|
|
8535
8794
|
getIndex: function() {
|
|
8536
8795
|
return this._index;
|
|
8537
8796
|
},
|
|
8797
|
+
setIndex: function(index) {
|
|
8798
|
+
var parent = this._parent, children = parent && parent._children;
|
|
8799
|
+
if (children) {
|
|
8800
|
+
parent.insertChildren(
|
|
8801
|
+
index in children ? index : undefined2,
|
|
8802
|
+
[this]
|
|
8803
|
+
);
|
|
8804
|
+
}
|
|
8805
|
+
},
|
|
8538
8806
|
equals: function(item) {
|
|
8539
8807
|
return item === this || item && this._class === item._class && this._style.equals(item._style) && this._matrix.equals(item._matrix) && this._locked === item._locked && this._visible === item._visible && this._blendMode === item._blendMode && this._opacity === item._opacity && this._clipMask === item._clipMask && this._guide === item._guide && this._equals(item) || false;
|
|
8540
8808
|
},
|
|
@@ -16812,20 +17080,20 @@ var require_paper_full = __commonJS({
|
|
|
16812
17080
|
paper3 = this._scope;
|
|
16813
17081
|
if (mouse.drag && !this.responds(type))
|
|
16814
17082
|
type = "mousemove";
|
|
16815
|
-
var move = mouse.move || mouse.drag, responds = this.responds(type),
|
|
16816
|
-
function update(
|
|
17083
|
+
var move = mouse.move || mouse.drag, responds = this.responds(type), called = false, tool = this;
|
|
17084
|
+
function update(minDistance, maxDistance) {
|
|
16817
17085
|
var pt = point, toolPoint = move ? tool._point : tool._downPoint || pt;
|
|
16818
17086
|
if (move) {
|
|
16819
17087
|
if (tool._moveCount >= 0 && pt.equals(toolPoint)) {
|
|
16820
17088
|
return false;
|
|
16821
17089
|
}
|
|
16822
|
-
if (toolPoint && (
|
|
17090
|
+
if (toolPoint && (minDistance != null || maxDistance != null)) {
|
|
16823
17091
|
var vector = pt.subtract(toolPoint), distance = vector.getLength();
|
|
16824
|
-
if (distance < (
|
|
17092
|
+
if (distance < (minDistance || 0))
|
|
16825
17093
|
return false;
|
|
16826
|
-
if (
|
|
17094
|
+
if (maxDistance) {
|
|
16827
17095
|
pt = toolPoint.add(vector.normalize(
|
|
16828
|
-
Math.min(distance,
|
|
17096
|
+
Math.min(distance, maxDistance)
|
|
16829
17097
|
));
|
|
16830
17098
|
}
|
|
16831
17099
|
}
|
|
@@ -16849,10 +17117,10 @@ var require_paper_full = __commonJS({
|
|
|
16849
17117
|
update();
|
|
16850
17118
|
emit();
|
|
16851
17119
|
} else if (mouse.up) {
|
|
16852
|
-
update(null,
|
|
17120
|
+
update(null, this._maxDistance);
|
|
16853
17121
|
emit();
|
|
16854
17122
|
} else if (responds) {
|
|
16855
|
-
while (update(
|
|
17123
|
+
while (update(this._minDistance, this._maxDistance))
|
|
16856
17124
|
emit();
|
|
16857
17125
|
}
|
|
16858
17126
|
return called;
|
|
@@ -17612,13 +17880,13 @@ var require_paper_full = __commonJS({
|
|
|
17612
17880
|
SymbolItem: exportSymbolItem,
|
|
17613
17881
|
PointText: exportText
|
|
17614
17882
|
};
|
|
17615
|
-
function applyStyle(item, node, isRoot) {
|
|
17883
|
+
function applyStyle(item, node, options, isRoot) {
|
|
17616
17884
|
var attrs = {}, parent = !isRoot && item.getParent(), style = [];
|
|
17617
17885
|
if (item._name != null)
|
|
17618
17886
|
attrs.id = item._name;
|
|
17619
17887
|
Base.each(SvgStyles, function(entry) {
|
|
17620
17888
|
var get = entry.get, type = entry.type, value = item[get]();
|
|
17621
|
-
if (entry.exportFilter ? entry.exportFilter(item, value) : !parent || !Base.equals(parent[get](), value)) {
|
|
17889
|
+
if (entry.exportFilter ? entry.exportFilter(item, value) : options.reduceAttributes == false || !parent || !Base.equals(parent[get](), value)) {
|
|
17622
17890
|
if (type === "color" && value != null) {
|
|
17623
17891
|
var alpha = value.getAlpha();
|
|
17624
17892
|
if (alpha < 1)
|
|
@@ -17683,7 +17951,7 @@ var require_paper_full = __commonJS({
|
|
|
17683
17951
|
if (data && data !== "{}" && data !== "null")
|
|
17684
17952
|
node.setAttribute("data-paper-data", data);
|
|
17685
17953
|
}
|
|
17686
|
-
return node && applyStyle(item, node, isRoot);
|
|
17954
|
+
return node && applyStyle(item, node, options, isRoot);
|
|
17687
17955
|
}
|
|
17688
17956
|
function setOptions(options) {
|
|
17689
17957
|
if (!options)
|
|
@@ -17927,7 +18195,7 @@ var require_paper_full = __commonJS({
|
|
|
17927
18195
|
var transform = transforms[i];
|
|
17928
18196
|
if (!transform)
|
|
17929
18197
|
break;
|
|
17930
|
-
var parts = transform.split(/\(\s*/), command = parts[0], v = parts[1].split(/[\s,]+/g);
|
|
18198
|
+
var parts = transform.split(/\(\s*/), command = parts[0].trim(), v = parts[1].split(/[\s,]+/g);
|
|
17931
18199
|
for (var j = 0, m = v.length; j < m; j++)
|
|
17932
18200
|
v[j] = parseFloat(v[j]);
|
|
17933
18201
|
switch (command) {
|
|
@@ -25812,8 +26080,7 @@ var CurveModel = class extends ElementModel {
|
|
|
25812
26080
|
return (a2 + b2) / 2;
|
|
25813
26081
|
}
|
|
25814
26082
|
parsePoints(points) {
|
|
25815
|
-
|
|
25816
|
-
return ae(groupPoints, {
|
|
26083
|
+
return ae(points, {
|
|
25817
26084
|
size: this.strokeWidth,
|
|
25818
26085
|
smoothing: 0.5,
|
|
25819
26086
|
thinning: -0.5,
|
|
@@ -25830,15 +26097,15 @@ var CurveModel = class extends ElementModel {
|
|
|
25830
26097
|
});
|
|
25831
26098
|
}
|
|
25832
26099
|
matrixedPoints() {
|
|
25833
|
-
const
|
|
25834
|
-
|
|
25835
|
-
|
|
25836
|
-
|
|
25837
|
-
|
|
25838
|
-
|
|
25839
|
-
|
|
25840
|
-
|
|
25841
|
-
|
|
26100
|
+
const points = this.points;
|
|
26101
|
+
const matrix = new this.scope.Matrix(this.pointsMatrix);
|
|
26102
|
+
const output = [];
|
|
26103
|
+
for (let i = 0, len = points.length; i < len; i += 2) {
|
|
26104
|
+
const p = new this.scope.Point(points[i], points[i + 1]);
|
|
26105
|
+
const tp = p.transform(matrix);
|
|
26106
|
+
output.push([tp.x, tp.y]);
|
|
26107
|
+
}
|
|
26108
|
+
return output;
|
|
25842
26109
|
}
|
|
25843
26110
|
createPath(points) {
|
|
25844
26111
|
const path = new this.scope.Path();
|
|
@@ -27869,9 +28136,11 @@ var RenderableModel = class extends EventEmitter {
|
|
|
27869
28136
|
removeIds.forEach((id) => this.elements.delete(id));
|
|
27870
28137
|
});
|
|
27871
28138
|
}
|
|
27872
|
-
dispose() {
|
|
28139
|
+
dispose(clearElements) {
|
|
27873
28140
|
removeObserver2(this.elements, this.onElementsChange);
|
|
27874
|
-
|
|
28141
|
+
if (clearElements) {
|
|
28142
|
+
this.elements.clear();
|
|
28143
|
+
}
|
|
27875
28144
|
Array.from(this.elementModels.values()).forEach((model) => {
|
|
27876
28145
|
model.dispose();
|
|
27877
28146
|
});
|
|
@@ -28674,7 +28943,7 @@ var TextEditor = class extends EventEmitter4 {
|
|
|
28674
28943
|
});
|
|
28675
28944
|
this.camera = camera;
|
|
28676
28945
|
this.rootView = document.createElement("div");
|
|
28677
|
-
this.rootView.style.cssText = "position:absolute;width:100%;height:100%;top:0;left:0;overflow:
|
|
28946
|
+
this.rootView.style.cssText = "position:absolute;width:100%;height:100%;top:0;left:0;overflow:clip;";
|
|
28678
28947
|
this.content = document.createElement("div");
|
|
28679
28948
|
this.content.setAttribute("spellcheck", "false");
|
|
28680
28949
|
this.content.textContent = "";
|
|
@@ -28716,6 +28985,7 @@ var TextEditor = class extends EventEmitter4 {
|
|
|
28716
28985
|
}
|
|
28717
28986
|
updateMatrixStyle() {
|
|
28718
28987
|
const viewPoint = this.camera.scope.project.view.projectToView([this.originX, this.originY]);
|
|
28988
|
+
console.log("updateMatrixStyle", this.originX, this.originY, viewPoint);
|
|
28719
28989
|
this.content.style.top = `${viewPoint.y}px`;
|
|
28720
28990
|
this.content.style.left = `${viewPoint.x}px`;
|
|
28721
28991
|
this.content.style.transform = `rotate(${this.rotation}deg) scale(${this.scale})`;
|
|
@@ -29411,7 +29681,6 @@ var TextTool = class extends WhiteboardTool {
|
|
|
29411
29681
|
editor.setFontFamily(this.toolbarModel.fontFamily);
|
|
29412
29682
|
this.camera.triggerZoom();
|
|
29413
29683
|
editor.on("caretOutRight", () => {
|
|
29414
|
-
console.log("caretOutRight");
|
|
29415
29684
|
});
|
|
29416
29685
|
editor.on("change", (content) => {
|
|
29417
29686
|
if (this.elementModel) {
|
|
@@ -29629,7 +29898,7 @@ var Camera = class extends EventEmitter7 {
|
|
|
29629
29898
|
}
|
|
29630
29899
|
} else if (key === WhiteboardKeys.cameraMode) {
|
|
29631
29900
|
if (value.action === "update" || value.action === "add") {
|
|
29632
|
-
this.emit("userViewModeChange", userId, this.requestUserMap(userId).get(WhiteboardKeys.cameraMode));
|
|
29901
|
+
this.emit("userViewModeChange", userId, this.requestUserMap(userId).get(WhiteboardKeys.cameraMode), value.oldValue);
|
|
29633
29902
|
}
|
|
29634
29903
|
}
|
|
29635
29904
|
}
|
|
@@ -30276,9 +30545,7 @@ var TrashedElementsModel = class extends EventEmitter9 {
|
|
|
30276
30545
|
}
|
|
30277
30546
|
removeAllTrashedElementsForSelf() {
|
|
30278
30547
|
const ids = this.requestUserMap(this.userManager.selfId).get("trashedElements");
|
|
30279
|
-
|
|
30280
|
-
this.emit("removeElementForSelf", this.userManager.selfId, entry[0]);
|
|
30281
|
-
}
|
|
30548
|
+
this.emit("removeElementForSelf", this.userManager.selfId, Array.from(ids.keys()));
|
|
30282
30549
|
ids.doc?.transact(() => {
|
|
30283
30550
|
ids.clear();
|
|
30284
30551
|
ids.set("inner-map-id", "trashedElements");
|
|
@@ -31235,6 +31502,21 @@ function _toPrimitive43(t, r) {
|
|
|
31235
31502
|
return ("string" === r ? String : Number)(t);
|
|
31236
31503
|
}
|
|
31237
31504
|
var WHITEBOARD_APP_NAME = "whiteboard";
|
|
31505
|
+
var AsyncMap = class {
|
|
31506
|
+
constructor() {
|
|
31507
|
+
_defineProperty43(this, "map", void 0);
|
|
31508
|
+
this.map = /* @__PURE__ */ new Map();
|
|
31509
|
+
}
|
|
31510
|
+
get(key) {
|
|
31511
|
+
return Promise.resolve(this.map.get(key));
|
|
31512
|
+
}
|
|
31513
|
+
set(key, value) {
|
|
31514
|
+
this.map.set(key, value);
|
|
31515
|
+
}
|
|
31516
|
+
};
|
|
31517
|
+
if (!window.__forge_gl_wb_status__) {
|
|
31518
|
+
window.__forge_gl_wb_status__ = new AsyncMap();
|
|
31519
|
+
}
|
|
31238
31520
|
var WhiteboardApplication = class extends AbstractApplication {
|
|
31239
31521
|
get undoManager() {
|
|
31240
31522
|
const page = this.pageModel.getCurrentPage(this.userId);
|
|
@@ -31290,9 +31572,24 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
31290
31572
|
_defineProperty43(this, "disableViewModelUpdate", false);
|
|
31291
31573
|
_defineProperty43(this, "internalResizeObserver", true);
|
|
31292
31574
|
_defineProperty43(this, "sequenceExecutor", new SequenceExecutor());
|
|
31293
|
-
_defineProperty43(this, "
|
|
31575
|
+
_defineProperty43(this, "linkWhiteboardId", null);
|
|
31294
31576
|
_defineProperty43(this, "liveCursor", void 0);
|
|
31295
31577
|
_defineProperty43(this, "delayTranslateOut", -1);
|
|
31578
|
+
_defineProperty43(this, "addWhiteboardStatus", (evt) => {
|
|
31579
|
+
if (evt.detail.whiteboardAppId && evt.detail.status) {
|
|
31580
|
+
if (this.linkWhiteboardId === evt.detail.whiteboardAppId) {
|
|
31581
|
+
this.toolbarModel.currentTool = evt.detail.status.currentTool;
|
|
31582
|
+
this.toolbarModel.strokeColor = evt.detail.status.strokeColor;
|
|
31583
|
+
this.toolbarModel.fillColor = evt.detail.status.fillColor;
|
|
31584
|
+
this.toolbarModel.fontSize = evt.detail.status.fontSize;
|
|
31585
|
+
this.toolbarModel.fontFamily = evt.detail.status.fontFamily;
|
|
31586
|
+
this.toolbarModel.strokeWidth = evt.detail.status.strokeWidth;
|
|
31587
|
+
this.toolbarModel.dashArray = evt.detail.status.dashArray;
|
|
31588
|
+
this.permissions.removePermission(WhiteboardPermissionFlag.all);
|
|
31589
|
+
this.permissions.addPermission(evt.detail.status.permission);
|
|
31590
|
+
}
|
|
31591
|
+
}
|
|
31592
|
+
});
|
|
31296
31593
|
_defineProperty43(this, "enableToolEvent", () => {
|
|
31297
31594
|
return !(this.inputType === "pen" && !this.isPenEvent);
|
|
31298
31595
|
});
|
|
@@ -31412,7 +31709,7 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
31412
31709
|
const renderableModel = this.layers.get(entry[0]);
|
|
31413
31710
|
this.layers.delete(entry[0]);
|
|
31414
31711
|
if (renderableModel) {
|
|
31415
|
-
renderableModel.dispose();
|
|
31712
|
+
renderableModel.dispose(true);
|
|
31416
31713
|
}
|
|
31417
31714
|
const cameraMode = this.userMap(this.userId).get(WhiteboardKeys.cameraMode);
|
|
31418
31715
|
const currentPage = this.userMap(this.userId).get(WhiteboardKeys.currentPage);
|
|
@@ -31431,6 +31728,7 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
31431
31728
|
return this.layers.get(layerId);
|
|
31432
31729
|
});
|
|
31433
31730
|
_defineProperty43(this, "handleElementClear", () => {
|
|
31731
|
+
this.shadowScope.project.activeLayer.removeChildren();
|
|
31434
31732
|
this.paperScope.project.activeLayer.removeChildren();
|
|
31435
31733
|
});
|
|
31436
31734
|
_defineProperty43(this, "handleElementInsert", (elements) => {
|
|
@@ -31456,9 +31754,13 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
31456
31754
|
}
|
|
31457
31755
|
layerModel.elementModels.delete(elementId);
|
|
31458
31756
|
});
|
|
31459
|
-
_defineProperty43(this, "handleRemoveTrashedElementForSelf", (userId,
|
|
31460
|
-
|
|
31461
|
-
|
|
31757
|
+
_defineProperty43(this, "handleRemoveTrashedElementForSelf", (userId, elementIds) => {
|
|
31758
|
+
this.appDoc.transact(() => {
|
|
31759
|
+
const selfLayerId = this.userMap(this.userId).get(WhiteboardKeys.currentPage);
|
|
31760
|
+
for (const elementId of elementIds) {
|
|
31761
|
+
this.layers.get(selfLayerId)?.removeElementItem(elementId);
|
|
31762
|
+
}
|
|
31763
|
+
}, elementsUndoOrigin);
|
|
31462
31764
|
});
|
|
31463
31765
|
_defineProperty43(this, "handleElementsTrash", (userId, elements) => {
|
|
31464
31766
|
const targetLayerId = this.userMap(userId).get(WhiteboardKeys.currentPage);
|
|
@@ -31516,24 +31818,32 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
31516
31818
|
this.emitter.emit("elementDeselected", userId);
|
|
31517
31819
|
}
|
|
31518
31820
|
});
|
|
31519
|
-
_defineProperty43(this, "
|
|
31520
|
-
|
|
31521
|
-
|
|
31522
|
-
|
|
31523
|
-
|
|
31524
|
-
|
|
31525
|
-
|
|
31526
|
-
|
|
31527
|
-
|
|
31528
|
-
|
|
31529
|
-
|
|
31530
|
-
|
|
31531
|
-
|
|
31532
|
-
|
|
31533
|
-
|
|
31821
|
+
_defineProperty43(this, "handleSyncedWhiteboardStatusChange", (evt) => {
|
|
31822
|
+
if ([TOOLBAR_KEYS.tool, TOOLBAR_KEYS.strokeColor, TOOLBAR_KEYS.fillColor, TOOLBAR_KEYS.fontSize, TOOLBAR_KEYS.fontFamily, TOOLBAR_KEYS.strokeWidth, TOOLBAR_KEYS.dashArray, "permission"].some((key) => evt.keysChanged.has(key))) {
|
|
31823
|
+
const nextState = {
|
|
31824
|
+
currentTool: evt.target.get(TOOLBAR_KEYS.tool),
|
|
31825
|
+
strokeColor: evt.target.get(TOOLBAR_KEYS.strokeColor),
|
|
31826
|
+
fillColor: evt.target.get(TOOLBAR_KEYS.fillColor),
|
|
31827
|
+
fontSize: evt.target.get(TOOLBAR_KEYS.fontSize),
|
|
31828
|
+
fontFamily: evt.target.get(TOOLBAR_KEYS.fontFamily),
|
|
31829
|
+
strokeWidth: evt.target.get(TOOLBAR_KEYS.strokeWidth),
|
|
31830
|
+
dashArray: evt.target.get(TOOLBAR_KEYS.dashArray),
|
|
31831
|
+
permission: evt.target.get("permission")
|
|
31832
|
+
};
|
|
31833
|
+
window.__forge_gl_wb_status__.set(this.appId, nextState);
|
|
31834
|
+
window.dispatchEvent(new CustomEvent("forge-whiteboard-synced-status", {
|
|
31835
|
+
detail: {
|
|
31836
|
+
whiteboardAppId: this.appId,
|
|
31837
|
+
status: nextState,
|
|
31838
|
+
userId: this.userId
|
|
31839
|
+
}
|
|
31840
|
+
}));
|
|
31534
31841
|
}
|
|
31535
31842
|
});
|
|
31536
31843
|
_defineProperty43(this, "adjustByOutFrame", (frameWidth, frameHeight) => {
|
|
31844
|
+
if (!this.paperScope.project.view || !this.shadowScope.project.view) {
|
|
31845
|
+
return;
|
|
31846
|
+
}
|
|
31537
31847
|
const viewportWidth = this.viewportWidth;
|
|
31538
31848
|
const viewportHeight = this.viewportHeight;
|
|
31539
31849
|
if (viewportWidth > 0 && viewportHeight > 0) {
|
|
@@ -31551,7 +31861,6 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
31551
31861
|
this.camera.triggerZoom();
|
|
31552
31862
|
}
|
|
31553
31863
|
});
|
|
31554
|
-
window._wb = this;
|
|
31555
31864
|
requestAnimationFrameHook(this.paperScope);
|
|
31556
31865
|
requestAnimationFrameHook(this.shadowScope);
|
|
31557
31866
|
const that = this;
|
|
@@ -31858,6 +32167,7 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
31858
32167
|
that.camera.enableBoundaryHighlight = value;
|
|
31859
32168
|
}
|
|
31860
32169
|
});
|
|
32170
|
+
window.addEventListener("forge-whiteboard-synced-status", this.addWhiteboardStatus);
|
|
31861
32171
|
}
|
|
31862
32172
|
userMap(userId) {
|
|
31863
32173
|
return this.getMap(`user/${userId}`);
|
|
@@ -31882,6 +32192,7 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
31882
32192
|
}
|
|
31883
32193
|
}
|
|
31884
32194
|
this.userMap(this.userId).set(WhiteboardKeys.themeColor, "#009688");
|
|
32195
|
+
this.userMap(this.userId).observe(this.handleSyncedWhiteboardStatusChange);
|
|
31885
32196
|
this.shadowEmitter = new ShadowEmitter(this.userMap(this.userId));
|
|
31886
32197
|
this.pageModel = new PageModel(this.getMap("attrs"), this.userManager, (userId) => {
|
|
31887
32198
|
return this.userMap(userId);
|
|
@@ -31909,7 +32220,10 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
31909
32220
|
this.camera.on("userPageChange", (userId, pageId) => {
|
|
31910
32221
|
this.emitter.emit("activePageChange", userId, pageId);
|
|
31911
32222
|
});
|
|
31912
|
-
this.camera.on("userViewModeChange", (userId, mode) => {
|
|
32223
|
+
this.camera.on("userViewModeChange", (userId, mode, oldMode) => {
|
|
32224
|
+
if (oldMode !== "main" && mode === "main") {
|
|
32225
|
+
this.emitter.setViewModeToMain(userId);
|
|
32226
|
+
}
|
|
31913
32227
|
this.emitter.emit("userViewModeChange", userId, mode);
|
|
31914
32228
|
});
|
|
31915
32229
|
this.rootElement.style.position = "relative";
|
|
@@ -32177,28 +32491,23 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
32177
32491
|
this.disableViewModelUpdate = true;
|
|
32178
32492
|
}
|
|
32179
32493
|
linkToWhiteboard(targetId) {
|
|
32180
|
-
|
|
32181
|
-
|
|
32182
|
-
|
|
32183
|
-
|
|
32184
|
-
|
|
32185
|
-
|
|
32186
|
-
|
|
32187
|
-
|
|
32188
|
-
|
|
32189
|
-
|
|
32190
|
-
|
|
32191
|
-
|
|
32192
|
-
|
|
32193
|
-
|
|
32194
|
-
this.permissions.addPermission(this.linkTarget.get("permission"), this.userId);
|
|
32195
|
-
this.linkTarget.observe(this.handleLinkedMapChange);
|
|
32196
|
-
}
|
|
32494
|
+
this.linkWhiteboardId = targetId;
|
|
32495
|
+
window.__forge_gl_wb_status__.get(targetId).then((currentStatus) => {
|
|
32496
|
+
if (currentStatus) {
|
|
32497
|
+
this.toolbarModel.currentTool = currentStatus.currentTool;
|
|
32498
|
+
this.toolbarModel.strokeColor = currentStatus.strokeColor;
|
|
32499
|
+
this.toolbarModel.fillColor = currentStatus.fillColor;
|
|
32500
|
+
this.toolbarModel.fontSize = currentStatus.fontSize;
|
|
32501
|
+
this.toolbarModel.fontFamily = currentStatus.fontFamily;
|
|
32502
|
+
this.toolbarModel.strokeWidth = currentStatus.strokeWidth;
|
|
32503
|
+
this.toolbarModel.dashArray = currentStatus.dashArray;
|
|
32504
|
+
this.permissions.removePermission(WhiteboardPermissionFlag.all);
|
|
32505
|
+
this.permissions.addPermission(currentStatus.permission);
|
|
32506
|
+
}
|
|
32507
|
+
});
|
|
32197
32508
|
}
|
|
32198
32509
|
unlink() {
|
|
32199
|
-
|
|
32200
|
-
removeObserver7(this.linkTarget, this.handleLinkedMapChange);
|
|
32201
|
-
}
|
|
32510
|
+
this.linkWhiteboardId = null;
|
|
32202
32511
|
}
|
|
32203
32512
|
setViewSize(width, height) {
|
|
32204
32513
|
this.paperScope.project.view.viewSize = new this.paperScope.Size(width, height);
|
|
@@ -32219,7 +32528,10 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
32219
32528
|
this.getMap("attrs").set("viewportHeight", height);
|
|
32220
32529
|
this.camera.updateInitSize(new import_paper.default.Size(width, height));
|
|
32221
32530
|
}
|
|
32222
|
-
async dispose() {
|
|
32531
|
+
async dispose(removeSubDoc) {
|
|
32532
|
+
if (removeSubDoc) {
|
|
32533
|
+
this.deleteSubDoc(this.appId);
|
|
32534
|
+
}
|
|
32223
32535
|
this.selectElementsModel.dispose();
|
|
32224
32536
|
this.trashedElementsModel.dispose();
|
|
32225
32537
|
this.paperScope.view.remove();
|
|
@@ -32236,7 +32548,7 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
32236
32548
|
entry[1].off("stack-item-popped", this.handleStackItemPopped);
|
|
32237
32549
|
}
|
|
32238
32550
|
for (const entry of this.layers.entries()) {
|
|
32239
|
-
entry[1].dispose();
|
|
32551
|
+
entry[1].dispose(removeSubDoc);
|
|
32240
32552
|
entry[1].removeAllListeners();
|
|
32241
32553
|
}
|
|
32242
32554
|
this.camera.dispose();
|
|
@@ -32248,6 +32560,7 @@ var WhiteboardApplication = class extends AbstractApplication {
|
|
|
32248
32560
|
this.toolbarModel.dispose();
|
|
32249
32561
|
this.emitter.indexedNavigation.dispose();
|
|
32250
32562
|
this.permissions.dispose();
|
|
32563
|
+
removeObserver7(this.userMap(this.userId), this.handleSyncedWhiteboardStatusChange);
|
|
32251
32564
|
}
|
|
32252
32565
|
};
|
|
32253
32566
|
_defineProperty43(WhiteboardApplication, "applicationName", WHITEBOARD_APP_NAME);
|
|
@@ -32261,7 +32574,7 @@ export {
|
|
|
32261
32574
|
|
|
32262
32575
|
paper/dist/paper-full.js:
|
|
32263
32576
|
(*!
|
|
32264
|
-
* Paper.js v0.12.
|
|
32577
|
+
* Paper.js v0.12.18 - The Swiss Army Knife of Vector Graphics Scripting.
|
|
32265
32578
|
* http://paperjs.org/
|
|
32266
32579
|
*
|
|
32267
32580
|
* Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
|
|
@@ -32271,7 +32584,7 @@ paper/dist/paper-full.js:
|
|
|
32271
32584
|
*
|
|
32272
32585
|
* All rights reserved.
|
|
32273
32586
|
*
|
|
32274
|
-
* Date:
|
|
32587
|
+
* Date: Wed Jul 17 14:57:24 2024 +0200
|
|
32275
32588
|
*
|
|
32276
32589
|
***
|
|
32277
32590
|
*
|