@linkurious/ogma-annotations 1.0.5 → 1.0.10
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/index.mjs +919 -901
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +18 -18
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Control.d.ts +6 -0
- package/dist/types/Editor/base.d.ts +1 -0
- package/package.json +30 -18
package/dist/index.mjs
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
return
|
|
1
|
+
var kn = Object.defineProperty;
|
|
2
|
+
var Tn = (c, l, t) => l in c ? kn(c, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[l] = t;
|
|
3
|
+
var v = (c, l, t) => (Tn(c, typeof l != "symbol" ? l + "" : l, t), t);
|
|
4
|
+
var In = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
|
+
function le(c) {
|
|
6
|
+
return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
9
|
-
(function(
|
|
8
|
+
var $e = { exports: {} };
|
|
9
|
+
(function(c) {
|
|
10
10
|
(function(l, t) {
|
|
11
|
-
|
|
11
|
+
c.exports = t();
|
|
12
12
|
})("Vector", function() {
|
|
13
13
|
var l = function() {
|
|
14
|
-
var t = Math.PI * 2,
|
|
15
|
-
function
|
|
16
|
-
return Math.round(
|
|
14
|
+
var t = Math.PI * 2, r = 180 / Math.PI, a = Math.PI / 180;
|
|
15
|
+
function u(s) {
|
|
16
|
+
return Math.round(s * 1e8) / 1e8;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
return Math.sqrt(
|
|
18
|
+
function p(s, d) {
|
|
19
|
+
var m = d.x - s.x, A = d.y - s.y;
|
|
20
|
+
return Math.sqrt(m * m + A * A);
|
|
21
21
|
}
|
|
22
|
-
function y(
|
|
23
|
-
var
|
|
24
|
-
if (
|
|
25
|
-
for (;
|
|
26
|
-
|
|
27
|
-
return
|
|
22
|
+
function y(s, d, m) {
|
|
23
|
+
var A = d.y - s.y, I = d.x - s.x, k = Math.atan2(A, I);
|
|
24
|
+
if (m)
|
|
25
|
+
for (; k < 0; )
|
|
26
|
+
k += t;
|
|
27
|
+
return k;
|
|
28
28
|
}
|
|
29
|
-
function f(
|
|
30
|
-
this.x =
|
|
29
|
+
function f(s, d) {
|
|
30
|
+
this.x = s !== void 0 ? s : 0, this.y = d !== void 0 ? d : 0;
|
|
31
31
|
}
|
|
32
|
-
return f.fromRadians = function(
|
|
33
|
-
var d = Math.cos(
|
|
34
|
-
return new f(d,
|
|
35
|
-
}, f.fromDegrees = function(
|
|
36
|
-
var d =
|
|
32
|
+
return f.fromRadians = function(s) {
|
|
33
|
+
var d = Math.cos(s), m = Math.sin(s);
|
|
34
|
+
return new f(d, m);
|
|
35
|
+
}, f.fromDegrees = function(s) {
|
|
36
|
+
var d = s * (Math.PI / 180);
|
|
37
37
|
return f.fromRadians(d);
|
|
38
|
-
}, f.fromString = function(
|
|
39
|
-
var d =
|
|
38
|
+
}, f.fromString = function(s) {
|
|
39
|
+
var d = s.split(",");
|
|
40
40
|
return new f(parseFloat(d[0]), parseFloat(d[1]));
|
|
41
|
-
}, f.fromArray = function(
|
|
42
|
-
return new f(
|
|
41
|
+
}, f.fromArray = function(s) {
|
|
42
|
+
return new f(s[0], s[1]);
|
|
43
43
|
}, f.prototype = {
|
|
44
44
|
// version
|
|
45
45
|
version: "2.0.1",
|
|
@@ -55,30 +55,30 @@ var Pe = { exports: {} };
|
|
|
55
55
|
// Get if equal to another vector
|
|
56
56
|
// @param vector - other vector to compare with.
|
|
57
57
|
// @return if vectors are equal.
|
|
58
|
-
equals: function(
|
|
59
|
-
return this.prototype ===
|
|
58
|
+
equals: function(s) {
|
|
59
|
+
return this.prototype === s.prototype && this.x === s.x && this.y === s.y;
|
|
60
60
|
},
|
|
61
61
|
// [API]
|
|
62
62
|
// [chainable, changeSelf]
|
|
63
63
|
// set values from another vector. this changes value of self.
|
|
64
64
|
// @param vector - other vector to get values from.
|
|
65
65
|
// @return self.
|
|
66
|
-
copy: function(
|
|
67
|
-
return this.x =
|
|
66
|
+
copy: function(s) {
|
|
67
|
+
return this.x = s.x, this.y = s.y, this;
|
|
68
68
|
},
|
|
69
69
|
// [API]
|
|
70
70
|
// [chainable, changeSelf]
|
|
71
71
|
// set only the x component from another vector.
|
|
72
72
|
// @return self.
|
|
73
|
-
copyX: function(
|
|
74
|
-
return this.x =
|
|
73
|
+
copyX: function(s) {
|
|
74
|
+
return this.x = s.x, this;
|
|
75
75
|
},
|
|
76
76
|
// [API]
|
|
77
77
|
// [chainable, changeSelf]
|
|
78
78
|
// set only the y component from another vector.
|
|
79
79
|
// @return self.
|
|
80
|
-
copyY: function(
|
|
81
|
-
return this.y =
|
|
80
|
+
copyY: function(s) {
|
|
81
|
+
return this.y = s.y, this;
|
|
82
82
|
},
|
|
83
83
|
// [API]
|
|
84
84
|
// []
|
|
@@ -100,8 +100,8 @@ var Pe = { exports: {} };
|
|
|
100
100
|
// @param x - optional x component to set.
|
|
101
101
|
// @param y - optional y component to set.
|
|
102
102
|
// @return self.
|
|
103
|
-
set: function(
|
|
104
|
-
return
|
|
103
|
+
set: function(s, d) {
|
|
104
|
+
return s !== void 0 && (this.x = s), d !== void 0 && (this.y = d), this;
|
|
105
105
|
},
|
|
106
106
|
// [API]
|
|
107
107
|
// [chainable, clone]
|
|
@@ -136,29 +136,29 @@ var Pe = { exports: {} };
|
|
|
136
136
|
// get the distance from another vector.
|
|
137
137
|
// @param other - vector to get distance from.
|
|
138
138
|
// @return distance between vectors.
|
|
139
|
-
distanceFrom: function(
|
|
140
|
-
return
|
|
139
|
+
distanceFrom: function(s) {
|
|
140
|
+
return p(this, s);
|
|
141
141
|
},
|
|
142
142
|
// [API]
|
|
143
143
|
// []
|
|
144
144
|
// get angle from another vector in radians.
|
|
145
145
|
// @return angle in radians from this to other.
|
|
146
|
-
radiansTo: function(
|
|
147
|
-
return y(this,
|
|
146
|
+
radiansTo: function(s) {
|
|
147
|
+
return y(this, s, !0);
|
|
148
148
|
},
|
|
149
149
|
// [API]
|
|
150
150
|
// []
|
|
151
151
|
// get degrees from another vector in degrees.
|
|
152
152
|
// @return angle in degrees from this to other.
|
|
153
|
-
degreesTo: function(
|
|
154
|
-
return y(this,
|
|
153
|
+
degreesTo: function(s) {
|
|
154
|
+
return y(this, s, !0) * r;
|
|
155
155
|
},
|
|
156
156
|
// [API]
|
|
157
157
|
// []
|
|
158
158
|
// convert this vector to a radian angle.
|
|
159
159
|
// this is equivalent to doing Vector.zero.radiansTo(this).
|
|
160
160
|
// @return angle in radians.
|
|
161
|
-
toRadians: function(
|
|
161
|
+
toRadians: function(s) {
|
|
162
162
|
return y(f.zero, this, !0);
|
|
163
163
|
},
|
|
164
164
|
// [API]
|
|
@@ -166,41 +166,41 @@ var Pe = { exports: {} };
|
|
|
166
166
|
// convert this vector to degree.
|
|
167
167
|
// this is equivalent to doing Vector.zero.degreeTo(this).
|
|
168
168
|
// @return angle in degrees (0-360).
|
|
169
|
-
toDegrees: function(
|
|
170
|
-
return this.toRadians() *
|
|
169
|
+
toDegrees: function(s) {
|
|
170
|
+
return this.toRadians() * r;
|
|
171
171
|
},
|
|
172
172
|
// [API]
|
|
173
173
|
// [chainable, changeSelf]
|
|
174
174
|
// rotate this vector by a given degree.
|
|
175
175
|
// @param degrees - degrees to rotate this vector by (can be positive or negative).
|
|
176
176
|
// @return self.
|
|
177
|
-
rotateDegreesSelf: function(
|
|
178
|
-
return this.rotateRadiansSelf(
|
|
177
|
+
rotateDegreesSelf: function(s) {
|
|
178
|
+
return this.rotateRadiansSelf(s * a);
|
|
179
179
|
},
|
|
180
180
|
// [API]
|
|
181
181
|
// [chainable]
|
|
182
182
|
// clone and rotate the vector by a given degree.
|
|
183
183
|
// @param degrees - degree to rotate this vector by (can be positive or negative).
|
|
184
184
|
// @return cloned rotated vector.
|
|
185
|
-
rotateDegrees: function(
|
|
186
|
-
return this.clone().rotateDegreesSelf(
|
|
185
|
+
rotateDegrees: function(s) {
|
|
186
|
+
return this.clone().rotateDegreesSelf(s);
|
|
187
187
|
},
|
|
188
188
|
// [API]
|
|
189
189
|
// [chainable, changeSelf]
|
|
190
190
|
// rotate this vector by a given radian.
|
|
191
191
|
// @param radians - radians to rotate this vector by (can be positive or negative).
|
|
192
192
|
// @return self.
|
|
193
|
-
rotateRadiansSelf: function(
|
|
194
|
-
var d = Math.cos(
|
|
195
|
-
return this.x =
|
|
193
|
+
rotateRadiansSelf: function(s) {
|
|
194
|
+
var d = Math.cos(s), m = Math.sin(s), A = this.x * d - this.y * m, I = this.x * m + this.y * d;
|
|
195
|
+
return this.x = u(A), this.y = u(I), this;
|
|
196
196
|
},
|
|
197
197
|
// [API]
|
|
198
198
|
// [chainable]
|
|
199
199
|
// clone and rotate the vector by a given degree.
|
|
200
200
|
// @param radians - radians to rotate this vector by (can be positive or negative).
|
|
201
201
|
// @return cloned rotated vector.
|
|
202
|
-
rotateRadians: function(
|
|
203
|
-
return this.clone().rotateRadiansSelf(
|
|
202
|
+
rotateRadians: function(s) {
|
|
203
|
+
return this.clone().rotateRadiansSelf(s);
|
|
204
204
|
},
|
|
205
205
|
// [API]
|
|
206
206
|
// []
|
|
@@ -214,8 +214,8 @@ var Pe = { exports: {} };
|
|
|
214
214
|
// normalize this vector, eg make length equal 1.
|
|
215
215
|
// @return self.
|
|
216
216
|
normalizeSelf: function() {
|
|
217
|
-
var
|
|
218
|
-
return
|
|
217
|
+
var s = Math.sqrt(this.x * this.x + this.y * this.y);
|
|
218
|
+
return s === 0 ? this : (this.x /= s, this.y /= s, this);
|
|
219
219
|
},
|
|
220
220
|
// [API]
|
|
221
221
|
// [chainable, clone]
|
|
@@ -230,8 +230,8 @@ var Pe = { exports: {} };
|
|
|
230
230
|
// for example, v(10, 11) + v(5, 6) = v(15, 17).
|
|
231
231
|
// @param other - vector to add components to self.
|
|
232
232
|
// @return self.
|
|
233
|
-
addSelf: function(
|
|
234
|
-
return typeof
|
|
233
|
+
addSelf: function(s) {
|
|
234
|
+
return typeof s == "number" ? this.addScalarSelf(s) : (this.x += s.x, this.y += s.y, this);
|
|
235
235
|
},
|
|
236
236
|
// [API]
|
|
237
237
|
// [chainable, changeSelf]
|
|
@@ -239,8 +239,8 @@ var Pe = { exports: {} };
|
|
|
239
239
|
// for example, v(10, 10) - v(2, 3) = v(8, 7).
|
|
240
240
|
// @param other - vector to subtract components from self.
|
|
241
241
|
// @return self.
|
|
242
|
-
subSelf: function(
|
|
243
|
-
return typeof
|
|
242
|
+
subSelf: function(s) {
|
|
243
|
+
return typeof s == "number" ? this.subScalarSelf(s) : (this.x -= s.x, this.y -= s.y, this);
|
|
244
244
|
},
|
|
245
245
|
// [API]
|
|
246
246
|
// [chainable, changeSelf]
|
|
@@ -248,8 +248,8 @@ var Pe = { exports: {} };
|
|
|
248
248
|
// for example, v(10, 20) / v(2, 5) = v(5, 4).
|
|
249
249
|
// @param other - vector to divide components from self.
|
|
250
250
|
// @return self.
|
|
251
|
-
divSelf: function(
|
|
252
|
-
return typeof
|
|
251
|
+
divSelf: function(s) {
|
|
252
|
+
return typeof s == "number" ? this.divScalarSelf(s) : (this.x /= s.x, this.y /= s.y, this);
|
|
253
253
|
},
|
|
254
254
|
// [API]
|
|
255
255
|
// [chainable, changeSelf]
|
|
@@ -257,8 +257,8 @@ var Pe = { exports: {} };
|
|
|
257
257
|
// for example, v(2, 3) * v(3, 4) = v(6, 12).
|
|
258
258
|
// @param other - vector to multiply components with self.
|
|
259
259
|
// @return self.
|
|
260
|
-
mulSelf: function(
|
|
261
|
-
return typeof
|
|
260
|
+
mulSelf: function(s) {
|
|
261
|
+
return typeof s == "number" ? this.mulScalarSelf(s) : (this.x *= s.x, this.y *= s.y, this);
|
|
262
262
|
},
|
|
263
263
|
// [API]
|
|
264
264
|
// [chainable, changeSelf]
|
|
@@ -266,8 +266,8 @@ var Pe = { exports: {} };
|
|
|
266
266
|
// for example, v(2, 3) + 5 = v(7, 8).
|
|
267
267
|
// @param val - value to add to components.
|
|
268
268
|
// @return self.
|
|
269
|
-
addScalarSelf: function(
|
|
270
|
-
return this.x +=
|
|
269
|
+
addScalarSelf: function(s) {
|
|
270
|
+
return this.x += s, this.y += s, this;
|
|
271
271
|
},
|
|
272
272
|
// [API]
|
|
273
273
|
// [chainable, changeSelf]
|
|
@@ -275,8 +275,8 @@ var Pe = { exports: {} };
|
|
|
275
275
|
// for example, v(7, 9) - 5 = v(3, 4).
|
|
276
276
|
// @param val - value to subtract from components.
|
|
277
277
|
// @return self.
|
|
278
|
-
subScalarSelf: function(
|
|
279
|
-
return this.x -=
|
|
278
|
+
subScalarSelf: function(s) {
|
|
279
|
+
return this.x -= s, this.y -= s, this;
|
|
280
280
|
},
|
|
281
281
|
// [API]
|
|
282
282
|
// [chainable, changeSelf]
|
|
@@ -284,8 +284,8 @@ var Pe = { exports: {} };
|
|
|
284
284
|
// for example, v(6, 8) / 5 = v(3, 4).
|
|
285
285
|
// @param val - value to divide components by.
|
|
286
286
|
// @return self.
|
|
287
|
-
divScalarSelf: function(
|
|
288
|
-
return this.x /=
|
|
287
|
+
divScalarSelf: function(s) {
|
|
288
|
+
return this.x /= s, this.y /= s, this;
|
|
289
289
|
},
|
|
290
290
|
// [API]
|
|
291
291
|
// [chainable, changeSelf]
|
|
@@ -293,32 +293,32 @@ var Pe = { exports: {} };
|
|
|
293
293
|
// for example, v(2, 3) * 2 = v(4, 6).
|
|
294
294
|
// @param val - value to multiply components with.
|
|
295
295
|
// @return self.
|
|
296
|
-
mulScalarSelf: function(
|
|
297
|
-
return this.x *=
|
|
296
|
+
mulScalarSelf: function(s) {
|
|
297
|
+
return this.x *= s, this.y *= s, this;
|
|
298
298
|
},
|
|
299
299
|
// [API]
|
|
300
300
|
// [chainable, clone]
|
|
301
301
|
// clone self and add other vector to it.
|
|
302
302
|
// @param other - vector to add with.
|
|
303
303
|
// @return cloned vector.
|
|
304
|
-
add: function(
|
|
305
|
-
return this.clone().addSelf(
|
|
304
|
+
add: function(s) {
|
|
305
|
+
return this.clone().addSelf(s);
|
|
306
306
|
},
|
|
307
307
|
// [API]
|
|
308
308
|
// [chainable, clone]
|
|
309
309
|
// clone self and subtract other vector from it.
|
|
310
310
|
// @param other - vector to subtract with.
|
|
311
311
|
// @return cloned vector.
|
|
312
|
-
sub: function(
|
|
313
|
-
return this.clone().subSelf(
|
|
312
|
+
sub: function(s) {
|
|
313
|
+
return this.clone().subSelf(s);
|
|
314
314
|
},
|
|
315
315
|
// [API]
|
|
316
316
|
// [chainable, clone]
|
|
317
317
|
// clone self and multiply by other vector.
|
|
318
318
|
// @param other - vector to multiply with.
|
|
319
319
|
// @return cloned vector.
|
|
320
|
-
mul: function(
|
|
321
|
-
return this.clone().mulSelf(
|
|
320
|
+
mul: function(s) {
|
|
321
|
+
return this.clone().mulSelf(s);
|
|
322
322
|
},
|
|
323
323
|
// [API]
|
|
324
324
|
// [chainable, clone]
|
|
@@ -326,40 +326,40 @@ var Pe = { exports: {} };
|
|
|
326
326
|
// @param other - vector to divide with.
|
|
327
327
|
// @param scalar - value to divide by.
|
|
328
328
|
// @return cloned vector.
|
|
329
|
-
div: function(
|
|
330
|
-
return this.clone().divSelf(
|
|
329
|
+
div: function(s) {
|
|
330
|
+
return this.clone().divSelf(s);
|
|
331
331
|
},
|
|
332
332
|
// [API]
|
|
333
333
|
// [chainable, clone]
|
|
334
334
|
// clone self and add scalar to it.
|
|
335
335
|
// @param scalar - value to add.
|
|
336
336
|
// @return cloned vector.
|
|
337
|
-
addScalar: function(
|
|
338
|
-
return this.clone().addScalarSelf(
|
|
337
|
+
addScalar: function(s) {
|
|
338
|
+
return this.clone().addScalarSelf(s);
|
|
339
339
|
},
|
|
340
340
|
// [API]
|
|
341
341
|
// [chainable, clone]
|
|
342
342
|
// clone self and substract scalar from it.
|
|
343
343
|
// @param scalar - value to subtract.
|
|
344
344
|
// @return cloned vector.
|
|
345
|
-
subScalar: function(
|
|
346
|
-
return this.clone().subScalarSelf(
|
|
345
|
+
subScalar: function(s) {
|
|
346
|
+
return this.clone().subScalarSelf(s);
|
|
347
347
|
},
|
|
348
348
|
// [API]
|
|
349
349
|
// [chainable, clone]
|
|
350
350
|
// clone self and multiply by scalar.
|
|
351
351
|
// @param scalar - value to multiply with.
|
|
352
352
|
// @return cloned vector.
|
|
353
|
-
mulScalar: function(
|
|
354
|
-
return this.clone().mulScalarSelf(
|
|
353
|
+
mulScalar: function(s) {
|
|
354
|
+
return this.clone().mulScalarSelf(s);
|
|
355
355
|
},
|
|
356
356
|
// [API]
|
|
357
357
|
// [chainable, clone]
|
|
358
358
|
// clone self and divide by scalar.
|
|
359
359
|
// @param scalar - value to divide by.
|
|
360
360
|
// @return cloned vector.
|
|
361
|
-
divScalar: function(
|
|
362
|
-
return this.clone().divScalarSelf(
|
|
361
|
+
divScalar: function(s) {
|
|
362
|
+
return this.clone().divScalarSelf(s);
|
|
363
363
|
},
|
|
364
364
|
// [API]
|
|
365
365
|
// [chainable, changeSelf]
|
|
@@ -368,8 +368,8 @@ var Pe = { exports: {} };
|
|
|
368
368
|
// @param min - min value for x, y components.
|
|
369
369
|
// @param max - max value for x, y components.
|
|
370
370
|
// @return self.
|
|
371
|
-
clampSelf: function(
|
|
372
|
-
return this.x <
|
|
371
|
+
clampSelf: function(s, d) {
|
|
372
|
+
return this.x < s.x && (this.x = s.x), this.y < s.y && (this.y = s.y), this.x > d.x && (this.x = d.x), this.y > d.y && (this.y = d.y), this;
|
|
373
373
|
},
|
|
374
374
|
// [API]
|
|
375
375
|
// [chainable, clone]
|
|
@@ -378,8 +378,8 @@ var Pe = { exports: {} };
|
|
|
378
378
|
// @param min - min value for x, y components.
|
|
379
379
|
// @param max - max value for x, y components.
|
|
380
380
|
// @return cloned vector in range.
|
|
381
|
-
clamp: function(
|
|
382
|
-
return this.clone().clampSelf(
|
|
381
|
+
clamp: function(s, d) {
|
|
382
|
+
return this.clone().clampSelf(s, d);
|
|
383
383
|
},
|
|
384
384
|
// [API]
|
|
385
385
|
// [chainable, changeSelf]
|
|
@@ -387,8 +387,8 @@ var Pe = { exports: {} };
|
|
|
387
387
|
// for example, you can use Math.round to round the vector x, y values.
|
|
388
388
|
// @param func - function to apply on components.
|
|
389
389
|
// @return self.
|
|
390
|
-
applySelf: function(
|
|
391
|
-
return this.x =
|
|
390
|
+
applySelf: function(s) {
|
|
391
|
+
return this.x = s(this.x), this.y = s(this.y), this;
|
|
392
392
|
},
|
|
393
393
|
// [API]
|
|
394
394
|
// [chainable, clone]
|
|
@@ -396,8 +396,8 @@ var Pe = { exports: {} };
|
|
|
396
396
|
// for example, you can use Math.round to round the vector x, y values.
|
|
397
397
|
// @param func - function to apply on components.
|
|
398
398
|
// @return cloned vector.
|
|
399
|
-
apply: function(
|
|
400
|
-
return this.clone().applySelf(
|
|
399
|
+
apply: function(s) {
|
|
400
|
+
return this.clone().applySelf(s);
|
|
401
401
|
},
|
|
402
402
|
// [API]
|
|
403
403
|
// [chainable, changeSelf]
|
|
@@ -432,16 +432,16 @@ var Pe = { exports: {} };
|
|
|
432
432
|
// calculate dot-product of this vector with another vector.
|
|
433
433
|
// @param other - other vector to calculate dot-product with.
|
|
434
434
|
// @return dot product.
|
|
435
|
-
dot: function(
|
|
436
|
-
return this.x *
|
|
435
|
+
dot: function(s) {
|
|
436
|
+
return this.x * s.x + this.y * s.y;
|
|
437
437
|
},
|
|
438
438
|
// [API]
|
|
439
439
|
// []
|
|
440
440
|
// calculate cross-product of this vector with another vector.
|
|
441
441
|
// @param other - other vector to calculate cross-product with.
|
|
442
442
|
// @return dot product.
|
|
443
|
-
cross: function(
|
|
444
|
-
return this.x *
|
|
443
|
+
cross: function(s) {
|
|
444
|
+
return this.x * s.y - this.y * s.x;
|
|
445
445
|
},
|
|
446
446
|
// [API]
|
|
447
447
|
// [chainable, changeSelf]
|
|
@@ -450,8 +450,8 @@ var Pe = { exports: {} };
|
|
|
450
450
|
// @param x - default value for x if undefined (0 if not defined).
|
|
451
451
|
// @param y - default value for y if undefined (0 if not defined).
|
|
452
452
|
// @return self.
|
|
453
|
-
repairSelf: function(
|
|
454
|
-
return (typeof this.x != "number" || isNaN(this.x + 1)) && (this.x =
|
|
453
|
+
repairSelf: function(s, d) {
|
|
454
|
+
return (typeof this.x != "number" || isNaN(this.x + 1)) && (this.x = s || 0), (typeof this.y != "number" || isNaN(this.y + 1)) && (this.y = d || 0), this;
|
|
455
455
|
},
|
|
456
456
|
// [API]
|
|
457
457
|
// [chainable, clone]
|
|
@@ -460,8 +460,8 @@ var Pe = { exports: {} };
|
|
|
460
460
|
// @param x - default value for x if undefined (0 if not defined).
|
|
461
461
|
// @param y - default value for y if undefined (0 if not defined).
|
|
462
462
|
// @return repaired clone.
|
|
463
|
-
repair: function(
|
|
464
|
-
return this.clone().repairSelf(
|
|
463
|
+
repair: function(s, d) {
|
|
464
|
+
return this.clone().repairSelf(s, d);
|
|
465
465
|
},
|
|
466
466
|
// [API]
|
|
467
467
|
// []
|
|
@@ -475,24 +475,24 @@ var Pe = { exports: {} };
|
|
|
475
475
|
// convert to a string with a given format.
|
|
476
476
|
// @param format - a string in which %x and %y will be replaced with the vector values.
|
|
477
477
|
// @return formatted string representing the vector.
|
|
478
|
-
format: function(
|
|
479
|
-
return
|
|
478
|
+
format: function(s) {
|
|
479
|
+
return s = s || "%x,%y", s = s.replace(new RegExp("%x", "g"), this.x), s = s.replace(new RegExp("%y", "g"), this.y), s;
|
|
480
480
|
}
|
|
481
481
|
}, f;
|
|
482
482
|
}();
|
|
483
483
|
return l.zero = new l(0, 0), l.one = new l(1, 1), l.up = new l(0, -1), l.down = new l(0, 1), l.left = new l(-1, 0), l.right = new l(1, 0), l.upLeft = new l(-1, -1), l.downLeft = new l(-1, 1), l.upRight = new l(1, -1), l.downRight = new l(1, 1), l.prototype.magnitude = l.prototype.length, Object.freeze && (Object.freeze(l.zero), Object.freeze(l.one), Object.freeze(l.up), Object.freeze(l.down), Object.freeze(l.left), Object.freeze(l.right), Object.freeze(l.upLeft), Object.freeze(l.downLeft), Object.freeze(l.upRight), Object.freeze(l.downRight)), l;
|
|
484
484
|
});
|
|
485
|
-
})(
|
|
486
|
-
var
|
|
487
|
-
const rt = /* @__PURE__ */
|
|
488
|
-
let jt = (
|
|
485
|
+
})($e);
|
|
486
|
+
var _n = $e.exports;
|
|
487
|
+
const rt = /* @__PURE__ */ le(_n);
|
|
488
|
+
let jt = (c = 21) => crypto.getRandomValues(new Uint8Array(c)).reduce((l, t) => (t &= 63, t < 36 ? l += t.toString(36) : t < 62 ? l += (t - 26).toString(36).toUpperCase() : t > 62 ? l += "-" : l += "_", l), "");
|
|
489
489
|
const Dt = {
|
|
490
490
|
strokeType: "plain",
|
|
491
491
|
strokeColor: "black",
|
|
492
492
|
strokeWidth: 1,
|
|
493
493
|
head: "none",
|
|
494
494
|
tail: "none"
|
|
495
|
-
},
|
|
495
|
+
}, Ee = {
|
|
496
496
|
id: 0,
|
|
497
497
|
type: "Feature",
|
|
498
498
|
properties: {
|
|
@@ -518,7 +518,7 @@ const Dt = {
|
|
|
518
518
|
// tail: 'arrow-plain',
|
|
519
519
|
// start: { x: 0, y: 0 },
|
|
520
520
|
// end: { x: 100, y: 100 }
|
|
521
|
-
},
|
|
521
|
+
}, Dn = (c = 0, l = 0, t = 0, r = 0, a = { ...Dt }) => ({
|
|
522
522
|
id: jt(),
|
|
523
523
|
type: "Feature",
|
|
524
524
|
properties: {
|
|
@@ -531,70 +531,70 @@ const Dt = {
|
|
|
531
531
|
geometry: {
|
|
532
532
|
type: "LineString",
|
|
533
533
|
coordinates: [
|
|
534
|
-
[
|
|
535
|
-
[t,
|
|
534
|
+
[c, l],
|
|
535
|
+
[t, r]
|
|
536
536
|
]
|
|
537
537
|
}
|
|
538
|
-
}),
|
|
539
|
-
function It(
|
|
540
|
-
return document.createElementNS(
|
|
538
|
+
}), Mn = "http://www.w3.org/2000/svg";
|
|
539
|
+
function It(c) {
|
|
540
|
+
return document.createElementNS(Mn, c);
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
return
|
|
542
|
+
function Pe(c) {
|
|
543
|
+
return c.geometry.bbox || On(c), c.geometry.bbox;
|
|
544
544
|
}
|
|
545
|
-
function dt(
|
|
546
|
-
const l =
|
|
545
|
+
function dt(c) {
|
|
546
|
+
const l = Pe(c);
|
|
547
547
|
return {
|
|
548
548
|
width: l[2] - l[0],
|
|
549
549
|
height: l[3] - l[1]
|
|
550
550
|
};
|
|
551
551
|
}
|
|
552
|
-
function yt(
|
|
553
|
-
const l =
|
|
552
|
+
function yt(c) {
|
|
553
|
+
const l = Pe(c);
|
|
554
554
|
return { x: l[0], y: l[1] };
|
|
555
555
|
}
|
|
556
|
-
function On(
|
|
557
|
-
const [l, t] =
|
|
558
|
-
|
|
556
|
+
function On(c) {
|
|
557
|
+
const [l, t] = c.geometry.coordinates[0][0], [r, a] = c.geometry.coordinates[0][2];
|
|
558
|
+
c.geometry.bbox = [l, t, r, a];
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
|
|
560
|
+
function zn(c, l, t, r, a) {
|
|
561
|
+
c.geometry.bbox = [l, t, l + r, t + a], c.geometry.coordinates = [
|
|
562
562
|
[
|
|
563
563
|
[l, t],
|
|
564
|
-
[l +
|
|
565
|
-
[l +
|
|
564
|
+
[l + r, t],
|
|
565
|
+
[l + r, t + a],
|
|
566
566
|
[l, t + a],
|
|
567
567
|
[l, t]
|
|
568
568
|
]
|
|
569
569
|
];
|
|
570
570
|
}
|
|
571
|
-
function _t(
|
|
572
|
-
const [l, t] =
|
|
571
|
+
function _t(c) {
|
|
572
|
+
const [l, t] = c.geometry.coordinates[0];
|
|
573
573
|
return { x: l, y: t };
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
const [t,
|
|
577
|
-
return { x: t, y:
|
|
575
|
+
function te(c, l) {
|
|
576
|
+
const [t, r] = c.geometry.coordinates[l === "start" ? 0 : 1];
|
|
577
|
+
return { x: t, y: r };
|
|
578
578
|
}
|
|
579
|
-
function
|
|
580
|
-
const [l, t] =
|
|
579
|
+
function Rt(c) {
|
|
580
|
+
const [l, t] = c.geometry.coordinates[1];
|
|
581
581
|
return { x: l, y: t };
|
|
582
582
|
}
|
|
583
|
-
function Ne(
|
|
584
|
-
|
|
583
|
+
function Ne(c, l, t) {
|
|
584
|
+
c.geometry.coordinates[0] = [l, t];
|
|
585
585
|
}
|
|
586
|
-
function
|
|
587
|
-
|
|
586
|
+
function He(c, l, t) {
|
|
587
|
+
c.geometry.coordinates[1] = [l, t];
|
|
588
588
|
}
|
|
589
|
-
function
|
|
590
|
-
return { start: _t(
|
|
589
|
+
function Ft(c) {
|
|
590
|
+
return { start: _t(c), end: Rt(c) };
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
l === "start" ? Ne(
|
|
592
|
+
function Nt(c, l, t, r) {
|
|
593
|
+
l === "start" ? Ne(c, t, r) : He(c, t, r);
|
|
594
594
|
}
|
|
595
|
-
const
|
|
596
|
-
function Xn(
|
|
597
|
-
return
|
|
595
|
+
const Re = (c) => parseInt(c.getAttribute("data-handle-id") || "-1");
|
|
596
|
+
function Xn(c) {
|
|
597
|
+
return Ht(c).reduce(
|
|
598
598
|
(l, t) => (l[0] = Math.min(t[0], l[0]), l[1] = Math.min(t[1], l[1]), l[2] = Math.max(t[0], l[2]), l[3] = Math.max(t[1], l[3]), l),
|
|
599
599
|
[
|
|
600
600
|
Number.POSITIVE_INFINITY,
|
|
@@ -604,192 +604,191 @@ function Xn(u) {
|
|
|
604
604
|
]
|
|
605
605
|
);
|
|
606
606
|
}
|
|
607
|
-
function
|
|
607
|
+
function Ht(c) {
|
|
608
608
|
let l = [];
|
|
609
|
-
return
|
|
610
|
-
return t.concat(
|
|
611
|
-
}, []) :
|
|
612
|
-
(t,
|
|
609
|
+
return c.type == "Point" ? l = [c.coordinates] : c.type == "LineString" || c.type == "MultiPoint" ? l = c.coordinates : c.type == "Polygon" || c.type == "MultiLineString" ? l = c.coordinates.reduce(function(t, r) {
|
|
610
|
+
return t.concat(r);
|
|
611
|
+
}, []) : c.type == "MultiPolygon" ? l = c.coordinates.reduce(
|
|
612
|
+
(t, r) => t.concat(r.reduce((a, u) => a.concat(u), [])),
|
|
613
613
|
[]
|
|
614
|
-
) :
|
|
615
|
-
(t,
|
|
614
|
+
) : c.type == "Feature" ? l = Ht(c.geometry) : c.type == "GeometryCollection" ? l = c.geometries.reduce(
|
|
615
|
+
(t, r) => t.concat(Ht(r)),
|
|
616
616
|
[]
|
|
617
|
-
) :
|
|
618
|
-
(t,
|
|
617
|
+
) : c.type == "FeatureCollection" && (l = c.features.reduce(
|
|
618
|
+
(t, r) => t.concat(Ht(r)),
|
|
619
619
|
[]
|
|
620
620
|
)), l;
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
const
|
|
622
|
+
function ee(c, l, t) {
|
|
623
|
+
const r = Math.atan2(c.y - l.y, c.x - l.x);
|
|
624
624
|
return {
|
|
625
|
-
x: l.x + t * Math.cos(
|
|
626
|
-
y: l.y + t * Math.sin(
|
|
625
|
+
x: l.x + t * Math.cos(r),
|
|
626
|
+
y: l.y + t * Math.sin(r)
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
var
|
|
631
|
-
const { start:
|
|
629
|
+
function Fe(c, l = 5, t = 30) {
|
|
630
|
+
var s;
|
|
631
|
+
const { start: r, end: a } = Ft(c), u = new rt(r.x, r.y), y = new rt(a.x, a.y).sub(u), f = c.properties.style && c.properties.style.strokeWidth ? (s = c.properties.style) == null ? void 0 : s.strokeWidth : 0;
|
|
632
632
|
return Math.min(t, Math.max(3 * f, y.length() * 0.1, l));
|
|
633
633
|
}
|
|
634
|
-
function ke(
|
|
635
|
-
const a = l.clone().normalize().invert().mul(
|
|
634
|
+
function ke(c, l, t, r) {
|
|
635
|
+
const a = l.clone().normalize().invert().mul(r);
|
|
636
636
|
if (!t || t === "none")
|
|
637
637
|
return "";
|
|
638
|
-
const
|
|
639
|
-
return `M ${
|
|
638
|
+
const u = c.clone().add(a.rotateRadians(Math.PI / 8)), p = c.clone().add(a.rotateRadians(-Math.PI / 8)), y = `${c.x} ${c.y}`;
|
|
639
|
+
return `M ${u.x} ${u.y} L ${y} ${p.x} ${p.y} ${t === "arrow" ? "" : `${u.x} ${u.y}`}`;
|
|
640
640
|
}
|
|
641
|
-
function
|
|
642
|
-
const { start:
|
|
643
|
-
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
const U = ke(
|
|
647
|
-
|
|
641
|
+
function Ln(c, l, t, r, a) {
|
|
642
|
+
const { start: u, end: p } = Ft(c), { tail: y, head: f, strokeColor: s, strokeWidth: d } = c.properties.style || t, m = new rt(u.x, u.y), A = new rt(p.x, p.y), I = A.clone().sub(m), k = Fe(c, r, a), C = It("path");
|
|
643
|
+
C.setAttribute("data-annotation", `${c.id}`), C.setAttribute("data-annotation-type", "arrow");
|
|
644
|
+
const E = f === "arrow-plain" || y === "arrow";
|
|
645
|
+
C.setAttribute("stroke", s || "none"), C.setAttribute("stroke-width", `${d}`), C.setAttribute("fill", E ? s || "" : "none"), C.setAttribute("stroke-linecap", "round"), C.setAttribute("stroke-linejoin", "round");
|
|
646
|
+
const U = ke(m, I.clone().invert(), y, k), P = ke(A, I, f, k), z = U + `M ${m.x} ${m.y} ${A.x} ${A.y}` + P;
|
|
647
|
+
C.setAttribute("d", z), l.appendChild(C);
|
|
648
648
|
}
|
|
649
|
-
const B = -1,
|
|
649
|
+
const B = -1, he = "dragging", ce = "dragstart", Mt = "dragend", ie = "select", re = "unselect", Cn = "hover", $n = "unhover", se = "remove", oe = "add", Pn = "cancelDrawing", ae = "update", Nn = "link";
|
|
650
650
|
var je = { exports: {} };
|
|
651
|
-
(function(
|
|
651
|
+
(function(c) {
|
|
652
652
|
var l = Object.prototype.hasOwnProperty, t = "~";
|
|
653
|
-
function
|
|
653
|
+
function r() {
|
|
654
654
|
}
|
|
655
|
-
Object.create && (
|
|
656
|
-
function a(f,
|
|
657
|
-
this.fn = f, this.context =
|
|
655
|
+
Object.create && (r.prototype = /* @__PURE__ */ Object.create(null), new r().__proto__ || (t = !1));
|
|
656
|
+
function a(f, s, d) {
|
|
657
|
+
this.fn = f, this.context = s, this.once = d || !1;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function u(f, s, d, m, A) {
|
|
660
660
|
if (typeof d != "function")
|
|
661
661
|
throw new TypeError("The listener must be a function");
|
|
662
|
-
var
|
|
663
|
-
return f._events[
|
|
662
|
+
var I = new a(d, m || f, A), k = t ? t + s : s;
|
|
663
|
+
return f._events[k] ? f._events[k].fn ? f._events[k] = [f._events[k], I] : f._events[k].push(I) : (f._events[k] = I, f._eventsCount++), f;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
666
|
-
--f._eventsCount === 0 ? f._events = new
|
|
665
|
+
function p(f, s) {
|
|
666
|
+
--f._eventsCount === 0 ? f._events = new r() : delete f._events[s];
|
|
667
667
|
}
|
|
668
668
|
function y() {
|
|
669
|
-
this._events = new
|
|
669
|
+
this._events = new r(), this._eventsCount = 0;
|
|
670
670
|
}
|
|
671
671
|
y.prototype.eventNames = function() {
|
|
672
|
-
var
|
|
672
|
+
var s = [], d, m;
|
|
673
673
|
if (this._eventsCount === 0)
|
|
674
|
-
return
|
|
675
|
-
for (
|
|
676
|
-
l.call(d,
|
|
677
|
-
return Object.getOwnPropertySymbols ?
|
|
678
|
-
}, y.prototype.listeners = function(
|
|
679
|
-
var d = t ? t +
|
|
680
|
-
if (!
|
|
674
|
+
return s;
|
|
675
|
+
for (m in d = this._events)
|
|
676
|
+
l.call(d, m) && s.push(t ? m.slice(1) : m);
|
|
677
|
+
return Object.getOwnPropertySymbols ? s.concat(Object.getOwnPropertySymbols(d)) : s;
|
|
678
|
+
}, y.prototype.listeners = function(s) {
|
|
679
|
+
var d = t ? t + s : s, m = this._events[d];
|
|
680
|
+
if (!m)
|
|
681
681
|
return [];
|
|
682
|
-
if (
|
|
683
|
-
return [
|
|
684
|
-
for (var
|
|
685
|
-
|
|
686
|
-
return
|
|
687
|
-
}, y.prototype.listenerCount = function(
|
|
688
|
-
var d = t ? t +
|
|
689
|
-
return
|
|
690
|
-
}, y.prototype.emit = function(
|
|
691
|
-
var
|
|
692
|
-
if (!this._events[
|
|
682
|
+
if (m.fn)
|
|
683
|
+
return [m.fn];
|
|
684
|
+
for (var A = 0, I = m.length, k = new Array(I); A < I; A++)
|
|
685
|
+
k[A] = m[A].fn;
|
|
686
|
+
return k;
|
|
687
|
+
}, y.prototype.listenerCount = function(s) {
|
|
688
|
+
var d = t ? t + s : s, m = this._events[d];
|
|
689
|
+
return m ? m.fn ? 1 : m.length : 0;
|
|
690
|
+
}, y.prototype.emit = function(s, d, m, A, I, k) {
|
|
691
|
+
var C = t ? t + s : s;
|
|
692
|
+
if (!this._events[C])
|
|
693
693
|
return !1;
|
|
694
|
-
var
|
|
695
|
-
if (
|
|
696
|
-
switch (
|
|
694
|
+
var E = this._events[C], U = arguments.length, P, z;
|
|
695
|
+
if (E.fn) {
|
|
696
|
+
switch (E.once && this.removeListener(s, E.fn, void 0, !0), U) {
|
|
697
697
|
case 1:
|
|
698
|
-
return
|
|
698
|
+
return E.fn.call(E.context), !0;
|
|
699
699
|
case 2:
|
|
700
|
-
return
|
|
700
|
+
return E.fn.call(E.context, d), !0;
|
|
701
701
|
case 3:
|
|
702
|
-
return
|
|
702
|
+
return E.fn.call(E.context, d, m), !0;
|
|
703
703
|
case 4:
|
|
704
|
-
return
|
|
704
|
+
return E.fn.call(E.context, d, m, A), !0;
|
|
705
705
|
case 5:
|
|
706
|
-
return
|
|
706
|
+
return E.fn.call(E.context, d, m, A, I), !0;
|
|
707
707
|
case 6:
|
|
708
|
-
return
|
|
708
|
+
return E.fn.call(E.context, d, m, A, I, k), !0;
|
|
709
709
|
}
|
|
710
|
-
for (z = 1,
|
|
711
|
-
|
|
712
|
-
|
|
710
|
+
for (z = 1, P = new Array(U - 1); z < U; z++)
|
|
711
|
+
P[z - 1] = arguments[z];
|
|
712
|
+
E.fn.apply(E.context, P);
|
|
713
713
|
} else {
|
|
714
|
-
var
|
|
715
|
-
for (z = 0; z <
|
|
716
|
-
switch (
|
|
714
|
+
var Z = E.length, nt;
|
|
715
|
+
for (z = 0; z < Z; z++)
|
|
716
|
+
switch (E[z].once && this.removeListener(s, E[z].fn, void 0, !0), U) {
|
|
717
717
|
case 1:
|
|
718
|
-
|
|
718
|
+
E[z].fn.call(E[z].context);
|
|
719
719
|
break;
|
|
720
720
|
case 2:
|
|
721
|
-
|
|
721
|
+
E[z].fn.call(E[z].context, d);
|
|
722
722
|
break;
|
|
723
723
|
case 3:
|
|
724
|
-
|
|
724
|
+
E[z].fn.call(E[z].context, d, m);
|
|
725
725
|
break;
|
|
726
726
|
case 4:
|
|
727
|
-
|
|
727
|
+
E[z].fn.call(E[z].context, d, m, A);
|
|
728
728
|
break;
|
|
729
729
|
default:
|
|
730
|
-
if (!
|
|
731
|
-
for (nt = 1,
|
|
732
|
-
|
|
733
|
-
|
|
730
|
+
if (!P)
|
|
731
|
+
for (nt = 1, P = new Array(U - 1); nt < U; nt++)
|
|
732
|
+
P[nt - 1] = arguments[nt];
|
|
733
|
+
E[z].fn.apply(E[z].context, P);
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
736
|
return !0;
|
|
737
|
-
}, y.prototype.on = function(
|
|
738
|
-
return
|
|
739
|
-
}, y.prototype.once = function(
|
|
740
|
-
return
|
|
741
|
-
}, y.prototype.removeListener = function(
|
|
742
|
-
var
|
|
743
|
-
if (!this._events[
|
|
737
|
+
}, y.prototype.on = function(s, d, m) {
|
|
738
|
+
return u(this, s, d, m, !1);
|
|
739
|
+
}, y.prototype.once = function(s, d, m) {
|
|
740
|
+
return u(this, s, d, m, !0);
|
|
741
|
+
}, y.prototype.removeListener = function(s, d, m, A) {
|
|
742
|
+
var I = t ? t + s : s;
|
|
743
|
+
if (!this._events[I])
|
|
744
744
|
return this;
|
|
745
745
|
if (!d)
|
|
746
|
-
return
|
|
747
|
-
var
|
|
748
|
-
if (
|
|
749
|
-
|
|
746
|
+
return p(this, I), this;
|
|
747
|
+
var k = this._events[I];
|
|
748
|
+
if (k.fn)
|
|
749
|
+
k.fn === d && (!A || k.once) && (!m || k.context === m) && p(this, I);
|
|
750
750
|
else {
|
|
751
|
-
for (var
|
|
752
|
-
(
|
|
753
|
-
|
|
751
|
+
for (var C = 0, E = [], U = k.length; C < U; C++)
|
|
752
|
+
(k[C].fn !== d || A && !k[C].once || m && k[C].context !== m) && E.push(k[C]);
|
|
753
|
+
E.length ? this._events[I] = E.length === 1 ? E[0] : E : p(this, I);
|
|
754
754
|
}
|
|
755
755
|
return this;
|
|
756
|
-
}, y.prototype.removeAllListeners = function(
|
|
756
|
+
}, y.prototype.removeAllListeners = function(s) {
|
|
757
757
|
var d;
|
|
758
|
-
return
|
|
759
|
-
}, y.prototype.off = y.prototype.removeListener, y.prototype.addListener = y.prototype.on, y.prefixed = t, y.EventEmitter = y,
|
|
758
|
+
return s ? (d = t ? t + s : s, this._events[d] && p(this, d)) : (this._events = new r(), this._eventsCount = 0), this;
|
|
759
|
+
}, y.prototype.off = y.prototype.removeListener, y.prototype.addListener = y.prototype.on, y.prefixed = t, y.EventEmitter = y, c.exports = y;
|
|
760
760
|
})(je);
|
|
761
|
-
var
|
|
762
|
-
const
|
|
763
|
-
class
|
|
764
|
-
constructor(t,
|
|
761
|
+
var Hn = je.exports;
|
|
762
|
+
const qe = /* @__PURE__ */ le(Hn);
|
|
763
|
+
class Be extends qe {
|
|
764
|
+
constructor(t, r) {
|
|
765
765
|
super();
|
|
766
|
-
|
|
767
|
-
|
|
766
|
+
v(this, "ogma");
|
|
767
|
+
v(this, "elements");
|
|
768
768
|
// layer to draw elements
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
769
|
+
v(this, "layer");
|
|
770
|
+
v(this, "editor");
|
|
771
|
+
v(this, "selectedId", B);
|
|
772
|
+
v(this, "hoveredId", B);
|
|
773
773
|
// used to remember ogma options before we change them
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
774
|
+
v(this, "ogmaOptions");
|
|
775
|
+
v(this, "shouldDetect");
|
|
776
|
+
v(this, "isDragging");
|
|
777
|
+
v(this, "maxHandleScale", 1.5);
|
|
778
|
+
v(this, "_onKeyUp", (t) => {
|
|
778
779
|
t.code === 27 && this.selectedId !== B ? this.unselect() : (t.code === 46 || t.code === 8) && this.selectedId !== B && this._canRemove() && this.remove(this.selectedId);
|
|
779
780
|
});
|
|
780
|
-
|
|
781
|
+
v(this, "_onClickMouseMove", (t) => {
|
|
781
782
|
if (!t.domEvent || this.isDragging || !this.shouldDetect)
|
|
782
783
|
return;
|
|
783
|
-
const
|
|
784
|
+
const r = this.ogma.view.screenToGraphCoordinates(t), a = this.shouldDetect || !this.shouldDetect && +this.selectedId > -1 ? this.detect(r, 0) : void 0;
|
|
784
785
|
t.domEvent.type === "mousemove" ? a ? this.hover(a.id) : this.hoveredId !== B && this.unhover() : a ? this.select(a.id) : this.selectedId !== B && this.unselect();
|
|
785
786
|
});
|
|
786
|
-
this.ogma = t, this.elements = [], this.shouldDetect = !0, this.isDragging = !1, this.ogmaOptions = t.getOptions(), t.events.on(["click", "mousemove"], this._onClickMouseMove).on("keyup", this._onKeyUp),
|
|
787
|
+
this.ogma = t, this.elements = [], this.shouldDetect = !0, this.isDragging = !1, this.ogmaOptions = t.getOptions(), t.events.on(["click", "mousemove"], this._onClickMouseMove).on("keyup", this._onKeyUp).on("newFrame", () => {
|
|
788
|
+
this.refreshEditor();
|
|
789
|
+
}), this.layer = t.layers.addSVGLayer({
|
|
787
790
|
draw: (a) => this.draw(a)
|
|
788
|
-
}), this.layer.moveToTop(), this.editor = t.layers.
|
|
789
|
-
element: s,
|
|
790
|
-
position: { x: 0, y: 0 },
|
|
791
|
-
size: { width: 0, height: 0 }
|
|
792
|
-
}), this.editor.hide();
|
|
791
|
+
}), this.layer.moveToTop(), this.editor = t.layers.addLayer(r), this.editor.hide();
|
|
793
792
|
}
|
|
794
793
|
_canRemove() {
|
|
795
794
|
return !0;
|
|
@@ -800,32 +799,32 @@ class qe extends Fe {
|
|
|
800
799
|
* @returns the added annotation
|
|
801
800
|
*/
|
|
802
801
|
add(t) {
|
|
803
|
-
const
|
|
802
|
+
const r = this.getDefaultOptions(), a = Object.assign(t, {
|
|
804
803
|
id: t.id === void 0 ? jt() : t.id,
|
|
805
804
|
type: t.type,
|
|
806
805
|
properties: {
|
|
807
|
-
...
|
|
806
|
+
...r.properties,
|
|
808
807
|
...t.properties || {},
|
|
809
808
|
// styles need to be merged
|
|
810
|
-
style: { ...
|
|
809
|
+
style: { ...r.properties.style, ...t.properties.style || {} }
|
|
811
810
|
},
|
|
812
811
|
geometry: {
|
|
813
|
-
...
|
|
812
|
+
...r.geometry,
|
|
814
813
|
...t.geometry
|
|
815
814
|
}
|
|
816
815
|
});
|
|
817
|
-
return this.elements.push(a), this.layer.refresh(), this.emit(
|
|
816
|
+
return this.elements.push(a), this.layer.refresh(), this.emit(oe, a), a;
|
|
818
817
|
}
|
|
819
|
-
updateStyle(t,
|
|
818
|
+
updateStyle(t, r) {
|
|
820
819
|
this.updateAnnotation(t, {
|
|
821
820
|
properties: {
|
|
822
|
-
style:
|
|
821
|
+
style: r
|
|
823
822
|
}
|
|
824
823
|
});
|
|
825
824
|
}
|
|
826
|
-
updateGeometry(t,
|
|
825
|
+
updateGeometry(t, r) {
|
|
827
826
|
this.updateAnnotation(t, {
|
|
828
|
-
geometry:
|
|
827
|
+
geometry: r
|
|
829
828
|
});
|
|
830
829
|
}
|
|
831
830
|
/**
|
|
@@ -834,36 +833,36 @@ class qe extends Fe {
|
|
|
834
833
|
* @param id Id of the annotation to update
|
|
835
834
|
* @param new params of the annotation
|
|
836
835
|
*/
|
|
837
|
-
update(t,
|
|
836
|
+
update(t, r) {
|
|
838
837
|
const a = this.getById(t);
|
|
839
|
-
this.updateAnnotation(a,
|
|
838
|
+
this.updateAnnotation(a, r);
|
|
840
839
|
}
|
|
841
|
-
updateAnnotation(t,
|
|
840
|
+
updateAnnotation(t, r) {
|
|
842
841
|
if (!t)
|
|
843
842
|
return;
|
|
844
843
|
const a = t.id;
|
|
845
|
-
Object.keys(
|
|
846
|
-
if (
|
|
847
|
-
if (
|
|
848
|
-
const
|
|
844
|
+
Object.keys(r).forEach((u) => {
|
|
845
|
+
if (u !== "id")
|
|
846
|
+
if (u === "properties") {
|
|
847
|
+
const p = r.properties || { style: {} };
|
|
849
848
|
t.properties = {
|
|
850
849
|
...t.properties || {},
|
|
851
|
-
...
|
|
850
|
+
...p || {},
|
|
852
851
|
style: {
|
|
853
852
|
...t.properties.style || {},
|
|
854
|
-
...
|
|
853
|
+
...p.style || {}
|
|
855
854
|
}
|
|
856
855
|
};
|
|
857
856
|
} else
|
|
858
|
-
|
|
857
|
+
u === "geometry" ? t.geometry = {
|
|
859
858
|
...t.geometry,
|
|
860
|
-
...
|
|
861
|
-
} : t[
|
|
859
|
+
...r.geometry
|
|
860
|
+
} : t[u] = r[u];
|
|
862
861
|
}), a === this.selectedId && this.refreshEditor(), this.layer.refresh();
|
|
863
862
|
}
|
|
864
863
|
getById(t) {
|
|
865
|
-
for (let
|
|
866
|
-
const a = this.elements[
|
|
864
|
+
for (let r = 0; r < this.elements.length; r++) {
|
|
865
|
+
const a = this.elements[r];
|
|
867
866
|
if (a.id === t)
|
|
868
867
|
return a;
|
|
869
868
|
}
|
|
@@ -874,23 +873,23 @@ class qe extends Fe {
|
|
|
874
873
|
* Select element, show editor, disable Ogma dragging and fire event
|
|
875
874
|
*/
|
|
876
875
|
select(t) {
|
|
877
|
-
const
|
|
878
|
-
|
|
876
|
+
const r = this.getById(t);
|
|
877
|
+
r && (this.editor.show(), this.selectedId = t, this.refreshEditor(), this.layer.refresh(), this.emit(ie, r));
|
|
879
878
|
}
|
|
880
879
|
hover(t) {
|
|
881
|
-
const
|
|
882
|
-
|
|
880
|
+
const r = this.getById(t);
|
|
881
|
+
r && (this.editor.show(), this.hoveredId = t, this.refreshEditor(), this.layer.refresh(), this.emit(Cn, r));
|
|
883
882
|
}
|
|
884
883
|
getSelectedFeature() {
|
|
885
884
|
return this.selectedId === B ? null : this.getById(this.selectedId);
|
|
886
885
|
}
|
|
887
886
|
unselect() {
|
|
888
887
|
const t = this.getById(this.selectedId);
|
|
889
|
-
return t && this.emit(
|
|
888
|
+
return t && this.emit(re, t), this.selectedId = B, this.hoveredId === B && this.editor.hide(), this.layer.refresh(), this;
|
|
890
889
|
}
|
|
891
890
|
unhover() {
|
|
892
891
|
const t = this.getById(this.hoveredId);
|
|
893
|
-
return this.emit(
|
|
892
|
+
return this.emit($n, t), this.hoveredId = B, this.selectedId === B && this.editor.hide(), this.layer.refresh(), this;
|
|
894
893
|
}
|
|
895
894
|
/**
|
|
896
895
|
* @method remove
|
|
@@ -898,8 +897,8 @@ class qe extends Fe {
|
|
|
898
897
|
* Removes annotation with the given id
|
|
899
898
|
*/
|
|
900
899
|
remove(t) {
|
|
901
|
-
const
|
|
902
|
-
t === this.hoveredId && this.unhover(), t === this.selectedId && this.unselect(), this.elements = this.elements.filter((a) => a.id !== t),
|
|
900
|
+
const r = this.getById(t);
|
|
901
|
+
t === this.hoveredId && this.unhover(), t === this.selectedId && this.unselect(), this.elements = this.elements.filter((a) => a.id !== t), r && this.emit(se, r), this.layer.refresh();
|
|
903
902
|
}
|
|
904
903
|
/**
|
|
905
904
|
* @method disableDragging
|
|
@@ -948,8 +947,8 @@ class qe extends Fe {
|
|
|
948
947
|
}
|
|
949
948
|
}
|
|
950
949
|
const Te = "handle-line", Ie = "handle-start", _e = "handle-end";
|
|
951
|
-
class
|
|
952
|
-
constructor(t,
|
|
950
|
+
class Rn extends Be {
|
|
951
|
+
constructor(t, r = {}) {
|
|
953
952
|
super(
|
|
954
953
|
t,
|
|
955
954
|
`
|
|
@@ -961,33 +960,33 @@ class Hn extends qe {
|
|
|
961
960
|
`
|
|
962
961
|
);
|
|
963
962
|
// active handle id
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
const
|
|
975
|
-
|
|
963
|
+
v(this, "draggedHandle", B);
|
|
964
|
+
v(this, "start", { x: 0, y: 0 });
|
|
965
|
+
v(this, "end", { x: 0, y: 0 });
|
|
966
|
+
v(this, "arrow", { ...Ee });
|
|
967
|
+
v(this, "startX", 0);
|
|
968
|
+
v(this, "startY", 0);
|
|
969
|
+
v(this, "minArrowHeight", 0);
|
|
970
|
+
v(this, "maxArrowHeight", 0);
|
|
971
|
+
v(this, "handles", []);
|
|
972
|
+
v(this, "onHandleMouseDown", (t) => {
|
|
973
|
+
const r = this.getById(this.selectedId) || this.getById(this.hoveredId);
|
|
974
|
+
r && (this.startDragging(r, t.clientX, t.clientY), this.draggedHandle = Re(t.target));
|
|
976
975
|
});
|
|
977
|
-
|
|
978
|
-
this.draggedHandle !== -1 && (this.restoreDragging(), this.isDragging = !1, this.draggedHandle = B, this.emit(
|
|
976
|
+
v(this, "onMouseUp", () => {
|
|
977
|
+
this.draggedHandle !== -1 && (this.restoreDragging(), this.isDragging = !1, this.draggedHandle = B, this.emit(Mt, this.arrow));
|
|
979
978
|
});
|
|
980
|
-
|
|
979
|
+
v(this, "onMouseMove", (t) => {
|
|
981
980
|
if (!this.isDragging || this.draggedHandle === B)
|
|
982
981
|
return;
|
|
983
|
-
const
|
|
984
|
-
(y || f) && Ne(this.arrow, this.start.x +
|
|
985
|
-
|
|
982
|
+
const r = this.handles[this.draggedHandle], a = this.ogma.view.getZoom(), u = (t.clientX - this.startX) / a, p = (t.clientY - this.startY) / a, y = r.id === Te, f = r.id === Ie, s = r.id === _e;
|
|
983
|
+
(y || f) && Ne(this.arrow, this.start.x + u, this.start.y + p), (y || s) && He(this.arrow, this.end.x + u, this.end.y + p), this.emit(
|
|
984
|
+
he,
|
|
986
985
|
this.arrow,
|
|
987
986
|
y ? "line" : f ? "start" : "end"
|
|
988
987
|
), this.refreshEditor(), this.layer.refresh();
|
|
989
988
|
});
|
|
990
|
-
this.minArrowHeight =
|
|
989
|
+
this.minArrowHeight = r.minArrowHeight || 0, this.maxArrowHeight = r.maxArrowHeight || 1e6, this.handles = Array.prototype.slice.call(
|
|
991
990
|
this.editor.element.querySelectorAll(".arrow-handle>.handle")
|
|
992
991
|
), this.handles.forEach(
|
|
993
992
|
(a) => a.addEventListener("mousedown", this.onHandleMouseDown)
|
|
@@ -999,49 +998,48 @@ class Hn extends qe {
|
|
|
999
998
|
* @param y
|
|
1000
999
|
* @param arrow
|
|
1001
1000
|
*/
|
|
1002
|
-
startDrawing(t,
|
|
1001
|
+
startDrawing(t, r, a = Dn(t, r, t, r, Dt)) {
|
|
1002
|
+
var y;
|
|
1003
1003
|
this.add(a), this.hoveredId = a.id;
|
|
1004
|
-
const
|
|
1005
|
-
this.startDragging(this.getById(a.id),
|
|
1004
|
+
const u = this.ogma.view.graphToScreenCoordinates({ x: t, y: r }), p = ((y = this.ogma.getContainer()) == null ? void 0 : y.getBoundingClientRect()) || { left: 0, top: 0 };
|
|
1005
|
+
this.startDragging(this.getById(a.id), u.x + (p == null ? void 0 : p.left), u.y + p.top), this.draggedHandle = 2;
|
|
1006
1006
|
}
|
|
1007
1007
|
cancelDrawing() {
|
|
1008
|
-
this.isDragging && (this.remove(this.arrow.id), this.emit(
|
|
1008
|
+
this.isDragging && (this.remove(this.arrow.id), this.emit(Mt, this.arrow), this.restoreDragging(), this.isDragging = !1, this.draggedHandle = B);
|
|
1009
1009
|
}
|
|
1010
|
-
startDragging(t,
|
|
1011
|
-
this.selectedId !== t.id && this.select(this.hoveredId), this.arrow = t, this.startX =
|
|
1010
|
+
startDragging(t, r, a) {
|
|
1011
|
+
this.selectedId !== t.id && this.select(this.hoveredId), this.arrow = t, this.startX = r, this.startY = a, this.start = _t(this.arrow), this.end = Rt(this.arrow), this.disableDragging(), this.emit(ce, this.arrow), this.isDragging = !0;
|
|
1012
1012
|
}
|
|
1013
|
-
detect(t,
|
|
1013
|
+
detect(t, r = 0) {
|
|
1014
1014
|
return this.elements.find((a) => {
|
|
1015
|
-
const { start:
|
|
1016
|
-
new rt((
|
|
1017
|
-
), f = new rt(
|
|
1018
|
-
return Math.abs(d.dot(y)) <
|
|
1015
|
+
const { start: u, end: p } = Ft(a), y = new rt(t.x, t.y).sub(
|
|
1016
|
+
new rt((u.x + p.x) / 2, (u.y + p.y) / 2)
|
|
1017
|
+
), f = new rt(p.x, p.y).sub(new rt(u.x, u.y)), s = f.length(), d = f.normalize(), m = Fe(a);
|
|
1018
|
+
return Math.abs(d.dot(y)) < s / 2 + r && Math.abs(d.rotateRadians(Math.PI / 2).dot(y)) < m / 2 + r;
|
|
1019
1019
|
});
|
|
1020
1020
|
}
|
|
1021
1021
|
refreshEditor() {
|
|
1022
1022
|
if (+this.selectedId < 0 && +this.hoveredId < 0)
|
|
1023
1023
|
return;
|
|
1024
|
-
const t = this.selectedId !== B ? this.getById(this.selectedId) : this.getById(this.hoveredId),
|
|
1025
|
-
this.editor.setPosition({ x: 0, y: 0 }).setSize({ width: "100%", height: "100%" });
|
|
1026
|
-
const [c, g, y] = Array.prototype.slice.call(
|
|
1024
|
+
const t = this.selectedId !== B ? this.getById(this.selectedId) : this.getById(this.hoveredId), r = Ft(t), a = this.ogma.view.graphToScreenCoordinates(r.start), u = this.ogma.view.graphToScreenCoordinates(r.end), p = Math.min(this.ogma.view.getZoom(), this.maxHandleScale), [y, f, s] = Array.prototype.slice.call(
|
|
1027
1025
|
this.editor.element.querySelectorAll(".handle")
|
|
1028
1026
|
);
|
|
1029
|
-
|
|
1030
|
-
const
|
|
1031
|
-
x: (
|
|
1032
|
-
y: (
|
|
1033
|
-
},
|
|
1034
|
-
|
|
1027
|
+
f.style.transform = `translate(${a.x}px, ${a.y}px) translate(-50%, -50%) scale(${p})`, s.style.transform = `translate(${u.x}px, ${u.y}px) translate(-50%, -50%) scale(${p}`;
|
|
1028
|
+
const d = {
|
|
1029
|
+
x: (u.x + a.x) / 2,
|
|
1030
|
+
y: (u.y + a.y) / 2
|
|
1031
|
+
}, m = new rt(u.x - a.x, u.y - a.y), A = m.mul(1 / m.length()), I = Math.atan2(A.y, A.x);
|
|
1032
|
+
y.style.width = `${m.length() / p}px`, y.style.left = `${d.x}px`, y.style.top = `${d.y}px`, y.style.transform = `translate(-50%, -50%) rotate(${I}rad) scale(${p}) `;
|
|
1035
1033
|
}
|
|
1036
1034
|
getDefaultOptions() {
|
|
1037
|
-
return
|
|
1035
|
+
return Ee;
|
|
1038
1036
|
}
|
|
1039
1037
|
draw(t) {
|
|
1040
1038
|
t.innerHTML = "";
|
|
1041
|
-
const
|
|
1039
|
+
const r = It("g");
|
|
1042
1040
|
this.elements.forEach(
|
|
1043
|
-
(a) =>
|
|
1044
|
-
), t.appendChild(
|
|
1041
|
+
(a) => Ln(a, r, Dt, this.minArrowHeight, this.maxArrowHeight)
|
|
1042
|
+
), t.appendChild(r);
|
|
1045
1043
|
}
|
|
1046
1044
|
destroy() {
|
|
1047
1045
|
super.destroy(), document.removeEventListener("mousemove", this.onMouseMove, !0), document.removeEventListener("mouseup", this.onMouseUp);
|
|
@@ -1055,7 +1053,7 @@ const bt = {
|
|
|
1055
1053
|
strokeWidth: 1,
|
|
1056
1054
|
strokeColor: "#000",
|
|
1057
1055
|
strokeType: "plain"
|
|
1058
|
-
},
|
|
1056
|
+
}, ne = {
|
|
1059
1057
|
id: 0,
|
|
1060
1058
|
type: "Feature",
|
|
1061
1059
|
properties: {
|
|
@@ -1080,36 +1078,36 @@ const bt = {
|
|
|
1080
1078
|
}, De = {
|
|
1081
1079
|
handleSize: 3.5,
|
|
1082
1080
|
placeholder: "Your text..."
|
|
1083
|
-
},
|
|
1081
|
+
}, Fn = (c = 0, l = 0, t = 100, r = 50, a = "", u = { ...bt }) => ({
|
|
1084
1082
|
id: jt(),
|
|
1085
1083
|
type: "Feature",
|
|
1086
1084
|
properties: {
|
|
1087
1085
|
type: "text",
|
|
1088
1086
|
content: a,
|
|
1089
|
-
style: { ...bt, ...
|
|
1087
|
+
style: { ...bt, ...u }
|
|
1090
1088
|
},
|
|
1091
1089
|
geometry: {
|
|
1092
1090
|
type: "Polygon",
|
|
1093
1091
|
coordinates: [
|
|
1094
1092
|
[
|
|
1095
|
-
[
|
|
1096
|
-
[
|
|
1097
|
-
[
|
|
1098
|
-
[
|
|
1099
|
-
[
|
|
1093
|
+
[c, l],
|
|
1094
|
+
[c + t, l],
|
|
1095
|
+
[c + t, l + r],
|
|
1096
|
+
[c, l + r],
|
|
1097
|
+
[c, l]
|
|
1100
1098
|
]
|
|
1101
1099
|
]
|
|
1102
1100
|
}
|
|
1103
1101
|
});
|
|
1104
|
-
var
|
|
1105
|
-
(function(
|
|
1106
|
-
(function(t,
|
|
1107
|
-
|
|
1108
|
-
})(
|
|
1102
|
+
var Ve = { exports: {} };
|
|
1103
|
+
(function(c, l) {
|
|
1104
|
+
(function(t, r) {
|
|
1105
|
+
c.exports = r();
|
|
1106
|
+
})(In, () => (() => {
|
|
1109
1107
|
var t = { d: (e, n) => {
|
|
1110
1108
|
for (var o in n)
|
|
1111
1109
|
t.o(n, o) && !t.o(e, o) && Object.defineProperty(e, o, { enumerable: !0, get: n[o] });
|
|
1112
|
-
}, o: (e, n) => Object.prototype.hasOwnProperty.call(e, n) },
|
|
1110
|
+
}, o: (e, n) => Object.prototype.hasOwnProperty.call(e, n) }, r = {};
|
|
1113
1111
|
function a(e) {
|
|
1114
1112
|
return a = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
1115
1113
|
return typeof n;
|
|
@@ -1117,43 +1115,43 @@ var Be = { exports: {} };
|
|
|
1117
1115
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
1118
1116
|
}, a(e);
|
|
1119
1117
|
}
|
|
1120
|
-
t.d(
|
|
1121
|
-
var
|
|
1122
|
-
function
|
|
1118
|
+
t.d(r, { default: () => An });
|
|
1119
|
+
var u = /^((?:[a-z\d-]+\s+)*)([\d.]+(%|em|px)|(?:x+-)?large|(?:x+-)?small|medium)(?:\s*\/\s*(normal|[\d.]+(%|px|em)?))?(\s.+)?$/, p = /\bsmall-caps\b/, y = /\b(?:italic|oblique)\b/, f = /\bbold(?:er)?\b/, s = 13.3333333, d = { "xx-small": 9, "x-small": 10, smaller: 13.3333, small: 13, medium: 16, large: 18, larger: 19.2, "x-large": 24, "xx-large": 32 };
|
|
1120
|
+
function m(e) {
|
|
1123
1121
|
var n = "", o = this;
|
|
1124
1122
|
return o.style && o.style !== "normal" && (n += o.style), o.variant && o.variant !== "normal" && (n += (n ? " " : "") + o.variant), o.weight && o.weight !== "normal" && (n += (n ? " " : "") + o.weight), o.size && (n += (n ? " " : "") + o.size + "px", o.height !== o.size && (n += "/" + o.height + "px")), o.family && (n += (n ? " " : "") + o.family), e && (n += "::" + o.baseline), e && (n += "::" + o.color), n;
|
|
1125
1123
|
}
|
|
1126
|
-
var
|
|
1127
|
-
function
|
|
1128
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o =
|
|
1124
|
+
var A = { id: "", family: "sans-serif", height: 14, size: 12, variant: "", style: "", weight: "", baseline: "", color: null, toString: m, valueOf: m };
|
|
1125
|
+
function I(e) {
|
|
1126
|
+
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = u.exec(e);
|
|
1129
1127
|
n.family = (o[6] || "").trim();
|
|
1130
1128
|
var i = d[o[2]] || parseFloat(o[2]);
|
|
1131
|
-
o[3] === "%" ? i *= 0.16 : o[3] === "em" ? i *= 16 : o[3] === "pt" && (i *=
|
|
1129
|
+
o[3] === "%" ? i *= 0.16 : o[3] === "em" ? i *= 16 : o[3] === "pt" && (i *= s), n.size = i;
|
|
1132
1130
|
var h = parseFloat(o[4]);
|
|
1133
|
-
if (h !== "normal" && h !== "inherit" && h ? o[5] && o[5] !== "em" ? o[5] === "pt" ? n.height = h *
|
|
1131
|
+
if (h !== "normal" && h !== "inherit" && h ? o[5] && o[5] !== "em" ? o[5] === "pt" ? n.height = h * s : o[5] === "%" ? n.height = 0.01 * i : n.height = h : n.height = h * i : n.height = Math.round(i * (7 / 6)), p.test(o[1]) && (n.variant = "small-caps"), y.test(o[1]) && (n.style = "italic"), f.test(o[1]))
|
|
1134
1132
|
n.weight = "bold";
|
|
1135
1133
|
else {
|
|
1136
|
-
var
|
|
1137
|
-
|
|
1134
|
+
var g = parseInt(/\b(\d+)\b/.exec(o[1]), 10);
|
|
1135
|
+
g >= 100 && g !== 400 && (n.weight = g);
|
|
1138
1136
|
}
|
|
1139
1137
|
return n;
|
|
1140
1138
|
}
|
|
1141
|
-
function
|
|
1142
|
-
var e, n, o, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "12px/14px sans-serif", h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
1139
|
+
function k() {
|
|
1140
|
+
var e, n, o, i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "12px/14px sans-serif", h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = 14, w = 12, x = null, b = null, S = "";
|
|
1143
1141
|
if (i && i.nodeType) {
|
|
1144
|
-
var D = i && (i.ownerDocument && i.ownerDocument.defaultView || i.document && i || i.defaultView),
|
|
1145
|
-
e =
|
|
1142
|
+
var D = i && (i.ownerDocument && i.ownerDocument.defaultView || i.document && i || i.defaultView), M = D.getComputedStyle(i, null);
|
|
1143
|
+
e = M.getPropertyValue("font-family") || "", w = parseFloat(M.getPropertyValue("font-size")), g = M.getPropertyValue("line-height"), x = M.getPropertyValue("font-weight"), b = M.getPropertyValue("font-style"), S = M.getPropertyValue("font-variant") || "";
|
|
1146
1144
|
} else if (typeof i == "string") {
|
|
1147
|
-
var
|
|
1148
|
-
e =
|
|
1145
|
+
var T = I(i);
|
|
1146
|
+
e = T.family, w = T.size, g = T.height, S = T.variant, b = T.style, x = T.weight;
|
|
1149
1147
|
} else
|
|
1150
|
-
a(i) === "object" && (e = i.family, w = i.size,
|
|
1151
|
-
h.size && h.size < 3 && (w *= h.size),
|
|
1152
|
-
var
|
|
1153
|
-
return
|
|
1148
|
+
a(i) === "object" && (e = i.family, w = i.size, g = i.height, S = i.variant, x = i.weight, b = i.style, n = i.baseline, o = i.color);
|
|
1149
|
+
h.size && h.size < 3 && (w *= h.size), g = g !== "normal" && g ? parseFloat(g) : w * (7 / 6), h.height && h.height < 3 && (g *= h.height);
|
|
1150
|
+
var O = Object.create(A);
|
|
1151
|
+
return O.family = h.family || e || "sans-serif", O.height = g ?? 14, O.size = w ?? 12, O.variant = h.variant || S || "", O.style = h.style || b || "", O.weight = h.weight || x || "", O.baseline = n || 0, h.baseline != null && (O.baseline = h.baseline), O.color = h.color || o || "", O.id = m.call(O, !0), O;
|
|
1154
1152
|
}
|
|
1155
|
-
const
|
|
1156
|
-
var
|
|
1153
|
+
const C = { "\n": 0.28, "\r": 0.28, " ": 0.28, " ": 0.28, " ": 0.28, "": 0, " ": 0.5, " ": 1, " ": 0.5, " ": 1, " ": 0.33, " ": 0.25, " ": 0.16, " ": 0.56, " ": 0.28, " ": 0.2, " ": 0.15, "": 0, " ": 0.16, " ": 0.22, " ": 1, "\uFEFF": 0 };
|
|
1154
|
+
var E, U = function(e) {
|
|
1157
1155
|
var n = typeof OffscreenCanvas < "u" && new OffscreenCanvas(100, 100) || e && e.createElement("canvas");
|
|
1158
1156
|
if (n && n.getContext) {
|
|
1159
1157
|
var o = n.getContext("2d");
|
|
@@ -1162,20 +1160,20 @@ var Be = { exports: {} };
|
|
|
1162
1160
|
return o.font = String(h), o.measureText(i).width;
|
|
1163
1161
|
};
|
|
1164
1162
|
}
|
|
1165
|
-
}(typeof document < "u" ? document : null) || (
|
|
1166
|
-
if (!
|
|
1167
|
-
var o =
|
|
1168
|
-
|
|
1163
|
+
}(typeof document < "u" ? document : null) || (E = {}, function(e, n) {
|
|
1164
|
+
if (!E[n]) {
|
|
1165
|
+
var o = k(n);
|
|
1166
|
+
E[n] = o, /\bmonospace\b/.test(o.family) ? o.size *= 0.6 : (o.size *= 0.45, o.weight && (o.size *= 1.18));
|
|
1169
1167
|
}
|
|
1170
|
-
return e.length *
|
|
1171
|
-
}),
|
|
1172
|
-
function
|
|
1168
|
+
return e.length * E[n].size;
|
|
1169
|
+
}), P = {}, z = { trim: !0, collapse: !0 };
|
|
1170
|
+
function Z(e, n, o) {
|
|
1173
1171
|
var i = Object.assign({}, z, o), h = String(e);
|
|
1174
1172
|
if (!h)
|
|
1175
1173
|
return 0;
|
|
1176
|
-
if (h in
|
|
1177
|
-
var
|
|
1178
|
-
return
|
|
1174
|
+
if (h in C) {
|
|
1175
|
+
var g = n.id + "/" + h;
|
|
1176
|
+
return g in P || (P[g] = U("_".concat(h, "_"), n) - U("__", n)), P[g];
|
|
1179
1177
|
}
|
|
1180
1178
|
return i.trim && i.collapse ? i.trim ? h = h.trim() : i.collapse && (h = h.replace(/\s+/g, " ")) : h = h.replace(/\n/g, " "), U(h, n) + n.size * (e.tracking || 0);
|
|
1181
1179
|
}
|
|
@@ -1186,17 +1184,17 @@ var Be = { exports: {} };
|
|
|
1186
1184
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
1187
1185
|
}, nt(e);
|
|
1188
1186
|
}
|
|
1189
|
-
function
|
|
1187
|
+
function qt(e, n) {
|
|
1190
1188
|
if (typeof n != "function" && n !== null)
|
|
1191
1189
|
throw new TypeError("Super expression must either be null or a function");
|
|
1192
|
-
e.prototype = Object.create(n && n.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), n &&
|
|
1190
|
+
e.prototype = Object.create(n && n.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), n && Bt(e, n);
|
|
1193
1191
|
}
|
|
1194
|
-
function
|
|
1195
|
-
return
|
|
1192
|
+
function Bt(e, n) {
|
|
1193
|
+
return Bt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(o, i) {
|
|
1196
1194
|
return o.__proto__ = i, o;
|
|
1197
|
-
},
|
|
1195
|
+
}, Bt(e, n);
|
|
1198
1196
|
}
|
|
1199
|
-
function
|
|
1197
|
+
function Vt(e) {
|
|
1200
1198
|
var n = function() {
|
|
1201
1199
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
1202
1200
|
return !1;
|
|
@@ -1210,16 +1208,16 @@ var Be = { exports: {} };
|
|
|
1210
1208
|
}
|
|
1211
1209
|
}();
|
|
1212
1210
|
return function() {
|
|
1213
|
-
var o, i =
|
|
1211
|
+
var o, i = Ot(e);
|
|
1214
1212
|
if (n) {
|
|
1215
|
-
var h =
|
|
1213
|
+
var h = Ot(this).constructor;
|
|
1216
1214
|
o = Reflect.construct(i, arguments, h);
|
|
1217
1215
|
} else
|
|
1218
1216
|
o = i.apply(this, arguments);
|
|
1219
|
-
return
|
|
1217
|
+
return Ue(this, o);
|
|
1220
1218
|
};
|
|
1221
1219
|
}
|
|
1222
|
-
function
|
|
1220
|
+
function Ue(e, n) {
|
|
1223
1221
|
if (n && (nt(n) === "object" || typeof n == "function"))
|
|
1224
1222
|
return n;
|
|
1225
1223
|
if (n !== void 0)
|
|
@@ -1230,35 +1228,35 @@ var Be = { exports: {} };
|
|
|
1230
1228
|
return o;
|
|
1231
1229
|
}(e);
|
|
1232
1230
|
}
|
|
1233
|
-
function
|
|
1234
|
-
return
|
|
1231
|
+
function Ot(e) {
|
|
1232
|
+
return Ot = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
|
|
1235
1233
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
1236
|
-
},
|
|
1234
|
+
}, Ot(e);
|
|
1237
1235
|
}
|
|
1238
1236
|
function zt(e, n) {
|
|
1239
1237
|
if (!(e instanceof n))
|
|
1240
1238
|
throw new TypeError("Cannot call a class as a function");
|
|
1241
1239
|
}
|
|
1242
|
-
function
|
|
1240
|
+
function ue(e, n) {
|
|
1243
1241
|
for (var o = 0; o < n.length; o++) {
|
|
1244
1242
|
var i = n[o];
|
|
1245
|
-
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, (h = function(
|
|
1246
|
-
if (nt(
|
|
1247
|
-
return
|
|
1248
|
-
var x =
|
|
1243
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, (h = function(g, w) {
|
|
1244
|
+
if (nt(g) !== "object" || g === null)
|
|
1245
|
+
return g;
|
|
1246
|
+
var x = g[Symbol.toPrimitive];
|
|
1249
1247
|
if (x !== void 0) {
|
|
1250
|
-
var b = x.call(
|
|
1248
|
+
var b = x.call(g, w);
|
|
1251
1249
|
if (nt(b) !== "object")
|
|
1252
1250
|
return b;
|
|
1253
1251
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1254
1252
|
}
|
|
1255
|
-
return String(
|
|
1253
|
+
return String(g);
|
|
1256
1254
|
}(i.key, "string"), nt(h) === "symbol" ? h : String(h)), i);
|
|
1257
1255
|
}
|
|
1258
1256
|
var h;
|
|
1259
1257
|
}
|
|
1260
1258
|
function Lt(e, n, o) {
|
|
1261
|
-
return n &&
|
|
1259
|
+
return n && ue(e.prototype, n), o && ue(e, o), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
1262
1260
|
}
|
|
1263
1261
|
var H = function() {
|
|
1264
1262
|
function e() {
|
|
@@ -1274,42 +1272,42 @@ var Be = { exports: {} };
|
|
|
1274
1272
|
return this.value;
|
|
1275
1273
|
} }]), e;
|
|
1276
1274
|
}(), St = function(e) {
|
|
1277
|
-
|
|
1278
|
-
var n =
|
|
1275
|
+
qt(o, e);
|
|
1276
|
+
var n = Vt(o);
|
|
1279
1277
|
function o() {
|
|
1280
1278
|
return zt(this, o), n.apply(this, arguments);
|
|
1281
1279
|
}
|
|
1282
1280
|
return Lt(o);
|
|
1283
1281
|
}(H), tt = function(e) {
|
|
1284
|
-
|
|
1285
|
-
var n =
|
|
1282
|
+
qt(o, e);
|
|
1283
|
+
var n = Vt(o);
|
|
1286
1284
|
function o() {
|
|
1287
1285
|
return zt(this, o), n.apply(this, arguments);
|
|
1288
1286
|
}
|
|
1289
1287
|
return Lt(o);
|
|
1290
1288
|
}(H), ft = function(e) {
|
|
1291
|
-
|
|
1292
|
-
var n =
|
|
1289
|
+
qt(o, e);
|
|
1290
|
+
var n = Vt(o);
|
|
1293
1291
|
function o() {
|
|
1294
1292
|
return zt(this, o), n.apply(this, arguments);
|
|
1295
1293
|
}
|
|
1296
1294
|
return Lt(o);
|
|
1297
|
-
}(H),
|
|
1298
|
-
function
|
|
1295
|
+
}(H), Ut = /^[\n\r\t\x20\xA0\u2000-\u200B\u205F\u3000]/, Ye = /^[^\n\r\t\u0020\u2000-\u200B\u205F\u3000]{2,}/, de = /^[\xA0\u2011\u202F\u2060\uFEFF]/, Xe = /^(?:[;\xAD%?…]|,(?!\d))/, Ge = /^[´±°¢£¤$¥\u2212]/;
|
|
1296
|
+
function Ct(e, n) {
|
|
1299
1297
|
n !== !1 && (e = e.trim());
|
|
1300
|
-
for (var o, i, h = [],
|
|
1298
|
+
for (var o, i, h = [], g = e.charAt(0), w = 0, x = 1, b = e.length; x < b; x++) {
|
|
1301
1299
|
o = e.charAt(x), i = e.charAt(x + 1);
|
|
1302
|
-
var S =
|
|
1303
|
-
if ((
|
|
1304
|
-
var
|
|
1305
|
-
/\u00AD$/.test(
|
|
1300
|
+
var S = Ut.test(g), D = Ut.test(o), M = D || S, T = void 0;
|
|
1301
|
+
if ((Ge.test(o) && !de.test(g) || Xe.test(g + i) && !de.test(o)) && (M = !0), g !== "-" && g !== "‐" && g !== "–" && g !== "—" || ((T = Ut.test(e.charAt(x - 2))) && !D && (M = !1), !T && Ye.test(o + i) && (M = !0)), M) {
|
|
1302
|
+
var O = e.slice(w, x);
|
|
1303
|
+
/\u00AD$/.test(O) ? (h.push(new H(O.slice(0, -1))), h.push(new ft())) : (h.push(new H(O)), h.push(new St())), w = x;
|
|
1306
1304
|
}
|
|
1307
|
-
|
|
1305
|
+
g = o;
|
|
1308
1306
|
}
|
|
1309
1307
|
return h.push(new H(e.slice(w))), h;
|
|
1310
1308
|
}
|
|
1311
|
-
const
|
|
1312
|
-
var
|
|
1309
|
+
const fe = { nbsp: " ", iexcl: "¡", cent: "¢", pound: "£", curren: "¤", yen: "¥", brvbar: "¦", sect: "§", uml: "¨", copy: "©", ordf: "ª", laquo: "«", not: "¬", shy: "", reg: "®", macr: "¯", deg: "°", plusmn: "±", sup2: "²", sup3: "³", acute: "´", micro: "µ", para: "¶", middot: "·", cedil: "¸", sup1: "¹", ordm: "º", raquo: "»", frac14: "¼", frac12: "½", frac34: "¾", iquest: "¿", Agrave: "À", Aacute: "Á", Acirc: "Â", Atilde: "Ã", Auml: "Ä", Aring: "Å", AElig: "Æ", Ccedil: "Ç", Egrave: "È", Eacute: "É", Ecirc: "Ê", Euml: "Ë", Igrave: "Ì", Iacute: "Í", Icirc: "Î", Iuml: "Ï", ETH: "Ð", Ntilde: "Ñ", Ograve: "Ò", Oacute: "Ó", Ocirc: "Ô", Otilde: "Õ", Ouml: "Ö", times: "×", Oslash: "Ø", Ugrave: "Ù", Uacute: "Ú", Ucirc: "Û", Uuml: "Ü", Yacute: "Ý", THORN: "Þ", szlig: "ß", agrave: "à", aacute: "á", acirc: "â", atilde: "ã", auml: "ä", aring: "å", aelig: "æ", ccedil: "ç", egrave: "è", eacute: "é", ecirc: "ê", euml: "ë", igrave: "ì", iacute: "í", icirc: "î", iuml: "ï", eth: "ð", ntilde: "ñ", ograve: "ò", oacute: "ó", ocirc: "ô", otilde: "õ", ouml: "ö", divide: "÷", oslash: "ø", ugrave: "ù", uacute: "ú", ucirc: "û", uuml: "ü", yacute: "ý", thorn: "þ", yuml: "ÿ", fnof: "ƒ", Alpha: "Α", Beta: "Β", Gamma: "Γ", Delta: "Δ", Epsilon: "Ε", Zeta: "Ζ", Eta: "Η", Theta: "Θ", Iota: "Ι", Kappa: "Κ", Lambda: "Λ", Mu: "Μ", Nu: "Ν", Xi: "Ξ", Omicron: "Ο", Pi: "Π", Rho: "Ρ", Sigma: "Σ", Tau: "Τ", Upsilon: "Υ", Phi: "Φ", Chi: "Χ", Psi: "Ψ", Omega: "Ω", alpha: "α", beta: "β", gamma: "γ", delta: "δ", epsilon: "ε", zeta: "ζ", eta: "η", theta: "θ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", xi: "ξ", omicron: "ο", pi: "π", rho: "ρ", sigmaf: "ς", sigma: "σ", tau: "τ", upsilon: "υ", phi: "φ", chi: "χ", psi: "ψ", omega: "ω", thetasym: "ϑ", upsih: "ϒ", piv: "ϖ", bull: "•", hellip: "…", prime: "′", Prime: "″", oline: "‾", frasl: "⁄", weierp: "℘", image: "ℑ", real: "ℜ", trade: "™", alefsym: "ℵ", larr: "←", uarr: "↑", rarr: "→", darr: "↓", harr: "↔", crarr: "↵", lArr: "⇐", uArr: "⇑", rArr: "⇒", dArr: "⇓", hArr: "⇔", forall: "∀", part: "∂", exist: "∃", empty: "∅", nabla: "∇", isin: "∈", notin: "∉", ni: "∋", prod: "∏", sum: "∑", minus: "−", lowast: "∗", radic: "√", prop: "∝", infin: "∞", ang: "∠", and: "⊥", or: "⊦", cap: "∩", cup: "∪", int: "∫", there4: "∴", sim: "∼", cong: "≅", asymp: "≈", ne: "≠", equiv: "≡", le: "≤", ge: "≥", sub: "⊂", sup: "⊃", nsub: "⊄", sube: "⊆", supe: "⊇", oplus: "⊕", otimes: "⊗", perp: "⊥", sdot: "⋅", lceil: "⌈", rceil: "⌉", lfloor: "⌊", rfloor: "⌋", lang: "〈", rang: "〉", loz: "◊", spades: "♠", clubs: "♣", hearts: "♥", diams: "♦", quot: '"', amp: "&", lt: "<", gt: ">", OElig: "Œ", oelig: "œ", Scaron: "Š", scaron: "š", Yuml: "Ÿ", circ: "ˆ", tilde: "˜", ensp: " ", emsp: " ", thinsp: " ", zwnj: "", zwj: "", lrm: "", rlm: "", ndash: "–", mdash: "—", lsquo: "‘", rsquo: "’", sbquo: "‚", ldquo: "“", rdquo: "”", bdquo: "„", dagger: "†", Dagger: "‡", permil: "‰", lsaquo: "‹", rsaquo: "›" };
|
|
1310
|
+
var Ze = /^[\n\r\x20\u2000-\u200B\u205F\u3000]/, We = /^<\/([a-zA-Z0-9]+)([^>]*)>/, Ke = /^<([a-zA-Z0-9]+)((?:\s[^=\s/]+(?:\s*=\s*(?:"[^"]+"|'[^']+'|[^>\\s]+))?)+)?\s*(\/?)>(\n*)/, Je = /^<!--(.+?)-->/, Qe = /&(?:#(\d\d{2,})|#x([\da-fA-F]{2,})|([a-zA-Z][a-zA-Z1-4]{1,8}));/g, pe = { b: function(e) {
|
|
1313
1311
|
e.weight = "bold";
|
|
1314
1312
|
}, strong: function(e) {
|
|
1315
1313
|
e.weight = "bold";
|
|
@@ -1335,26 +1333,26 @@ var Be = { exports: {} };
|
|
|
1335
1333
|
e.sub = !0;
|
|
1336
1334
|
}, sup: function(e) {
|
|
1337
1335
|
e.sup = !0;
|
|
1338
|
-
} },
|
|
1339
|
-
function
|
|
1340
|
-
return e.replace(
|
|
1336
|
+
} }, tn = { div: 1, li: 1, blockquote: 2, h1: 2, h2: 2, h3: 2, h4: 2, h5: 2, h6: 2, ul: 2, ol: 2, hr: 2, p: 2 };
|
|
1337
|
+
function ge(e) {
|
|
1338
|
+
return e.replace(Qe, function(n, o, i, h) {
|
|
1341
1339
|
if (o || i) {
|
|
1342
|
-
var
|
|
1343
|
-
return String.fromCharCode(parseInt(o || i,
|
|
1340
|
+
var g = o ? 10 : 16;
|
|
1341
|
+
return String.fromCharCode(parseInt(o || i, g));
|
|
1344
1342
|
}
|
|
1345
|
-
return h in
|
|
1343
|
+
return h in fe ? fe[h] : n;
|
|
1346
1344
|
});
|
|
1347
1345
|
}
|
|
1348
|
-
function
|
|
1346
|
+
function en(e) {
|
|
1349
1347
|
return e && e.length > 1 && (e[0] === '"' && e[e.length - 1] === '"' || e[0] === "'" && e[e.length - 1] === "'") ? e.slice(1, -1) : e;
|
|
1350
1348
|
}
|
|
1351
|
-
var
|
|
1352
|
-
function
|
|
1349
|
+
var nn = /^\s*([^=\s&]+)(?:\s*=\s*("[^"]+"|'[^']+'|[^>\s]+))?/;
|
|
1350
|
+
function rn(e) {
|
|
1353
1351
|
var n, o = {};
|
|
1354
1352
|
if (e) {
|
|
1355
1353
|
do
|
|
1356
|
-
if (n =
|
|
1357
|
-
var i =
|
|
1354
|
+
if (n = nn.exec(e)) {
|
|
1355
|
+
var i = ge(en(n[2] || "")).replace(/[ \r\n\t]+/g, " ").trim();
|
|
1358
1356
|
if (o[n[1]] = i, (e = e.slice(n[0].length)).length && /^\S/.test(e[0]))
|
|
1359
1357
|
throw new Error("Attribute error");
|
|
1360
1358
|
}
|
|
@@ -1364,8 +1362,8 @@ var Be = { exports: {} };
|
|
|
1364
1362
|
}
|
|
1365
1363
|
return o;
|
|
1366
1364
|
}
|
|
1367
|
-
const
|
|
1368
|
-
var
|
|
1365
|
+
const ye = { copyright: "©", textcopyright: "©", dag: "†", textdagger: "†", ddag: "‡", textdaggerdbl: "‡", guillemotleft: "«", guillemotright: "»", guilsinglleft: "‹", guilsinglright: "›", ldots: "…", dots: "…", textellipsis: "…", lq: "‘", P: "¶", textparagraph: "¶", pounds: "£", textsterling: "£", quotedblbase: "„", quotesinglbase: "‚", rq: "’", S: "§", sim: "~", textasciicircum: "^", textasciitilde: "˜", texttildelow: "~", textasteriskcentered: "*", textbackslash: "'", textbar: "|", textbardbl: "╎", textbigcircle: "◯", textbraceleft: "{", textbraceright: "}", textbullet: "•", textdollar: "$", textemdash: "—", textendash: "—", texteuro: "€", eurosym: "€", euro: "€", textexclamdown: "¡", textgreater: ">", textless: "<", textordfeminine: "ª", textordmasculine: "º", textperiodcentered: "·", cdot: "·", textquestiondown: "¿", textquotedblleft: "“", textquotedblright: "”", textquoteleft: "‘", textquoteright: "’", textquotestraightbase: "‚", textquotestraightdblbase: "„", textregistered: "®", textthreequartersemdash: "-", texttrademark: "™", texttwelveudash: "-", textunderscore: "_", textvisiblespace: "␣", gets: "←", textleftarrow: "←", to: "→", textrightarrow: "→", textdegree: "°", infty: "∞", triangle: "△", triangledown: "▽", blacktriangle: "▲", blacktriangledown: "▼", angle: "∠", sphericalangle: "∢", aleph: "ℵ", hbar: "ħ", imath: "𝚤", jmath: "𝚥", ell: "ℓ", wp: "℘", Re: "ℜ", Im: "ℑ", mho: "℧", prime: "′", emptyset: "∅", nabla: "∇", surd: "√", partial: "∂", top: "⟙", bot: "⟂", vdash: "⟝", dashv: "⟞", forall: "∀", exists: "∃", nexists: "∄", neg: "¬", lnot: "¬", flat: "♭", natural: "♮", sharp: "♯", backslash: "\\", Box: "□", Diamond: "♢", clubsuit: "♣", diamondsuit: "♦", heartsuit: "♥", spadesuit: "♠", Join: "⨝", blacksquare: "■", bigstar: "★", diagdown: "╲", diagup: "╱", blacklozenge: "⧫", rfloor: "⌋", lfloor: "⌊", rceil: "⌉", lceil: "⌈", rangle: "⟩", langle: "⟨", sum: "∑", int: "∫", oint: "∮", prod: "∏", coprod: "∏", bigcap: "∩", bigcup: "∪", bigsqcup: "⊔", bigvee: "∨", bigwedge: "∧", bigodot: "⊙", bigotimes: "⊗", bigoplus: "⊕", biguplus: "⊎", alpha: "α", beta: "β", chi: "χ", delta: "δ", epsilon: "ε", eta: "η", gamma: "γ", iota: "ι", kappa: "κ", lambda: "λ", mu: "μ", nu: "ν", omega: "ω", phi: "φ", pi: "π", psi: "ψ", rho: "ρ", sigma: "σ", tau: "τ", theta: "θ", upsilon: "υ", xi: "ξ", zeta: "ζ", Alpha: "Α", Beta: "Β", Chi: "Χ", Delta: "Δ", Epsilon: "Ε", Eta: "Η", Gamma: "Γ", Iota: "Ι", Kappa: "Κ", Lambda: "Λ", Mu: "Μ", Nu: "Ν", Omega: "Ω", Phi: "Φ", Pi: "Π", Psi: "Ψ", Rho: "Ρ", Sigma: "Σ", Tau: "Τ", Theta: "Θ", Upsilon: "Υ", Xi: "Ξ", Zeta: "Ζ", aa: "å", AA: "Å", ae: "æ", AE: "Æ", dh: "ð", DH: "Ð", dj: "đ", DJ: "Đ", ij: "ij", IJ: "IJ", l: "ł", L: "Ł", ng: "ŋ", NG: "Ŋ", o: "ø", O: "Ø", oe: "œ", OE: "Œ", ss: "ß", SS: "SS", th: "þ", TH: "Þ" };
|
|
1366
|
+
var sn = /^(\^|_|\\[^#$%&~_^\\{}()\s]+)(\{)?/, on = /^%[^\n]+(?:\n|$)/, an = /^[^#$%&~_^\\{}]+/, ln = /^\\([&{}$%#_])/, hn = /(?:\\[\\@,!:;-]|-{2,3}|[!?]`|``?|,,|''?|~|<<|>>)/g, cn = { "---": "—", "--": "–", "!`": "¡", "?`": "¿", "``": "“", ",,": "„", "''": "”", "`": "‘", "'": "’", "<<": "«", ">>": "»", "~": " ", "\\-": "", "\\,": " ", "\\;": " ", "\\:": " ", "\\!": " ", "\\@": "\uFEFF", "\\\\": "\\newline{}" }, V = { bf: function(e) {
|
|
1369
1367
|
e.weight = "bold";
|
|
1370
1368
|
}, it: function(e) {
|
|
1371
1369
|
e.style = "italic";
|
|
@@ -1388,126 +1386,126 @@ var Be = { exports: {} };
|
|
|
1388
1386
|
} };
|
|
1389
1387
|
V.textsuperscript = V["^"], V.textsubscript = V._, V.textsl = V.sl, V.mathbf = V.bf, V.mathit = V.it, V.textbf = V.bf, V.textit = V.it, V.textcolor = V.color;
|
|
1390
1388
|
var un = /[\r\n\xA0]+/g;
|
|
1391
|
-
function
|
|
1389
|
+
function dn(e, n) {
|
|
1392
1390
|
e.sup && (e.baseline = 0.45, e.size = 0.7), e.sub && (e.baseline = -0.3, e.size = 0.7);
|
|
1393
1391
|
var o = n;
|
|
1394
|
-
return (e.style || e.weight || e.baseline || e.color || e.size || e.family) && (o =
|
|
1392
|
+
return (e.style || e.weight || e.baseline || e.color || e.size || e.family) && (o = k(n, e)), o;
|
|
1395
1393
|
}
|
|
1396
|
-
function
|
|
1397
|
-
for (var i, h,
|
|
1398
|
-
h = (i = e[e.length - 1]).width, i.width > o.width ? (i.value = i.value.slice(0, -1), i.width =
|
|
1399
|
-
e[e.length - 1] instanceof ft && e.pop(), i = e[e.length - 1] || i || {}, o.font =
|
|
1394
|
+
function me(e, n, o) {
|
|
1395
|
+
for (var i, h, g = e.width; g + o.width > n && e.length; )
|
|
1396
|
+
h = (i = e[e.length - 1]).width, i.width > o.width ? (i.value = i.value.slice(0, -1), i.width = Z(i, i.font), g += i.width) : e.pop(), g -= h;
|
|
1397
|
+
e[e.length - 1] instanceof ft && e.pop(), i = e[e.length - 1] || i || {}, o.font = k(o.font, i.bold, i.italic, ""), o.href = e.length ? i.href : null, o.rel = e.length ? i.rel : null, o.target = e.length ? i.target : null, e.push(o);
|
|
1400
1398
|
}
|
|
1401
1399
|
function mt(e) {
|
|
1402
1400
|
return Math.round(1e6 * e) / 1e6;
|
|
1403
1401
|
}
|
|
1404
|
-
function
|
|
1402
|
+
function ve(e) {
|
|
1405
1403
|
return function(n) {
|
|
1406
1404
|
if (Array.isArray(n))
|
|
1407
|
-
return
|
|
1405
|
+
return Yt(n);
|
|
1408
1406
|
}(e) || function(n) {
|
|
1409
1407
|
if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null)
|
|
1410
1408
|
return Array.from(n);
|
|
1411
1409
|
}(e) || function(n, o) {
|
|
1412
1410
|
if (n) {
|
|
1413
1411
|
if (typeof n == "string")
|
|
1414
|
-
return
|
|
1412
|
+
return Yt(n, o);
|
|
1415
1413
|
var i = Object.prototype.toString.call(n).slice(8, -1);
|
|
1416
|
-
return i === "Object" && n.constructor && (i = n.constructor.name), i === "Map" || i === "Set" ? Array.from(n) : i === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i) ?
|
|
1414
|
+
return i === "Object" && n.constructor && (i = n.constructor.name), i === "Map" || i === "Set" ? Array.from(n) : i === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i) ? Yt(n, o) : void 0;
|
|
1417
1415
|
}
|
|
1418
1416
|
}(e) || function() {
|
|
1419
1417
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1420
1418
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1421
1419
|
}();
|
|
1422
1420
|
}
|
|
1423
|
-
function
|
|
1421
|
+
function Yt(e, n) {
|
|
1424
1422
|
(n == null || n > e.length) && (n = e.length);
|
|
1425
1423
|
for (var o = 0, i = new Array(n); o < n; o++)
|
|
1426
1424
|
i[o] = e[o];
|
|
1427
1425
|
return i;
|
|
1428
1426
|
}
|
|
1429
|
-
var
|
|
1427
|
+
var fn = { center: "middle", right: "end" }, pn = { middle: 0.5, center: 0.5, bottom: 1, end: 1 }, Xt = function(e, n) {
|
|
1430
1428
|
return !e && !n || e === n;
|
|
1431
1429
|
};
|
|
1432
|
-
function
|
|
1433
|
-
var o = [], i = n.font(), h = i.size,
|
|
1430
|
+
function gn(e, n) {
|
|
1431
|
+
var o = [], i = n.font(), h = i.size, g = i.family, w = n.align(), x = n.createElement();
|
|
1434
1432
|
if (e.length) {
|
|
1435
|
-
var b = i.height, S = n.valign(), D = n.height()(),
|
|
1436
|
-
if (
|
|
1437
|
-
var
|
|
1438
|
-
K += (D *
|
|
1433
|
+
var b = i.height, S = n.valign(), D = n.height()(), M = n.width()(0), T = !isFinite(M) && e.length === 1, O = T ? null : n.x(), R = mt(b / h), K = T ? null : mt(b / (1.15 * h + (b - h) / 2));
|
|
1434
|
+
if (pn[S] && isFinite(D)) {
|
|
1435
|
+
var $ = S === "bottom" ? 1 : 0.5;
|
|
1436
|
+
K += (D * $ - b * e.length * $) / h;
|
|
1439
1437
|
}
|
|
1440
|
-
var L = w === "justify",
|
|
1441
|
-
w === "right" ?
|
|
1442
|
-
for (var
|
|
1443
|
-
if (
|
|
1444
|
-
var pt = x(J, Y,
|
|
1445
|
-
|
|
1438
|
+
var L = w === "justify", F = 0;
|
|
1439
|
+
w === "right" ? F = M : w === "center" && (F = M / 2);
|
|
1440
|
+
for (var N = [], J = "tspan", Y = null, j = "", _ = function() {
|
|
1441
|
+
if (j) {
|
|
1442
|
+
var pt = x(J, Y, j);
|
|
1443
|
+
N.push(pt);
|
|
1446
1444
|
}
|
|
1447
|
-
J = "tspan", Y = null,
|
|
1445
|
+
J = "tspan", Y = null, j = "";
|
|
1448
1446
|
}, et = 0, Q = e.length; et < Q; et++) {
|
|
1449
|
-
var ot = "",
|
|
1447
|
+
var ot = "", ct = "", st = 0, at = e[et];
|
|
1450
1448
|
if (at.length) {
|
|
1451
|
-
|
|
1452
|
-
for (var vt = 0, kt = 0, lt = void 0, X = 0,
|
|
1449
|
+
N = [];
|
|
1450
|
+
for (var vt = 0, kt = 0, lt = void 0, X = 0, $t = at.length; X < $t; X++) {
|
|
1453
1451
|
var q = at[X], G = q.font;
|
|
1454
|
-
q.whitespace && vt++, kt += q.width, X && !q.tracking && !st &&
|
|
1452
|
+
q.whitespace && vt++, kt += q.width, X && !q.tracking && !st && Xt(G.id, ot) && Xt(q.class, ct) && Xt(lt, q.href) ? j += q.value : (_(), j = q.value, Y = { fontFamily: G.family !== g ? G.family : null, fontSize: G.size !== h ? G.size : null, fontWeight: G.weight || null, fontStyle: G.style || null, fontVariant: G.variant !== "normal" && G.variant || null, fill: G.color || null, baselineShift: G.baseline ? 100 * G.baseline + "%" : null, className: q.class || null }, st && (Y.dx = mt(st), st = 0), q.tracking && (st = G.size * q.tracking), q.href && !lt ? (lt = q.href, J = "a", Y.href = lt, Y.rel = q.rel, Y.target = q.target) : lt = null, ot = G.id, ct = q.class);
|
|
1455
1453
|
}
|
|
1456
|
-
if (
|
|
1457
|
-
o.push.apply(o,
|
|
1454
|
+
if (_(), T)
|
|
1455
|
+
o.push.apply(o, ve(N));
|
|
1458
1456
|
else {
|
|
1459
|
-
var
|
|
1460
|
-
L && at.length > 1 && !Tt && (
|
|
1457
|
+
var Pt = null, Tt = et === Q - 1 || at[at.length - 1] instanceof tt;
|
|
1458
|
+
L && at.length > 1 && !Tt && (Pt = mt((M - kt) / vt)), o.push(x.apply(void 0, ["tspan", { wordSpacing: Pt, x: O(et) + F, dy: mt(et ? R : K) + "em" }].concat(ve(N))));
|
|
1461
1459
|
}
|
|
1462
1460
|
} else
|
|
1463
|
-
o.push(x("tspan", { x:
|
|
1461
|
+
o.push(x("tspan", { x: O(et), dy: mt(et ? R : K) + "em" }, " "));
|
|
1464
1462
|
}
|
|
1465
1463
|
}
|
|
1466
|
-
return x.apply(void 0, ["text", { fontFamily:
|
|
1464
|
+
return x.apply(void 0, ["text", { fontFamily: g, fontSize: h, textAnchor: fn[w] || "start" }].concat(o));
|
|
1467
1465
|
}
|
|
1468
|
-
var
|
|
1469
|
-
function
|
|
1466
|
+
var yn = { middle: 0.5, center: 0.5, bottom: 1, end: 1 };
|
|
1467
|
+
function mn(e, n, o) {
|
|
1470
1468
|
if (e.length) {
|
|
1471
1469
|
o.textBaseline = "middle";
|
|
1472
|
-
var i = n.font(), h = i.height,
|
|
1473
|
-
if (
|
|
1474
|
-
var
|
|
1475
|
-
|
|
1470
|
+
var i = n.font(), h = i.height, g = i.size, w = n.valign(), x = n.height()(), b = n.width()(0), S = n.align(), D = S === "justify", M = 0.5 * h, T = yn[w];
|
|
1471
|
+
if (T && isFinite(x)) {
|
|
1472
|
+
var O = e.length * h;
|
|
1473
|
+
M += x * T - O * T;
|
|
1476
1474
|
}
|
|
1477
1475
|
e.forEach(function(R, K) {
|
|
1478
|
-
var
|
|
1479
|
-
R.forEach(function(
|
|
1480
|
-
|
|
1476
|
+
var $ = n.x()(K), L = K * h + M, F = 0, N = 0;
|
|
1477
|
+
R.forEach(function(j) {
|
|
1478
|
+
j.whitespace && F++, N += j.width;
|
|
1481
1479
|
});
|
|
1482
1480
|
var J = 0, Y = K === e.length - 1 || R[R.length - 1] instanceof tt;
|
|
1483
|
-
D && R.length > 1 && !Y && (J = (b -
|
|
1484
|
-
o.font =
|
|
1485
|
-
var
|
|
1486
|
-
o.fillStyle = function(
|
|
1487
|
-
return
|
|
1488
|
-
}(
|
|
1481
|
+
D && R.length > 1 && !Y && (J = (b - N) / F), R.forEach(function(j) {
|
|
1482
|
+
o.font = j.font;
|
|
1483
|
+
var _ = j.font, et = _.baseline ? g * -_.baseline + 0.15 * g : 0;
|
|
1484
|
+
o.fillStyle = function(ct, st) {
|
|
1485
|
+
return ct.color ? ct.color : st.href ? "#00C" : "#000";
|
|
1486
|
+
}(_, j);
|
|
1489
1487
|
var Q = 0;
|
|
1490
|
-
if (S === "right" ? Q += b -
|
|
1488
|
+
if (S === "right" ? Q += b - N : S === "center" ? Q += b / 2 - N / 2 : S === "justify" && (j.whitespace || j instanceof tt) && ($ += J), o.fillText(j.value, $ + Q, L + et), j.href) {
|
|
1491
1489
|
o.beginPath(), o.strokeStyle = o.fillStyle;
|
|
1492
|
-
var ot = Math.floor(L + 0.45 *
|
|
1493
|
-
o.moveTo(
|
|
1490
|
+
var ot = Math.floor(L + 0.45 * g) + 0.5;
|
|
1491
|
+
o.moveTo($ + Q, ot), o.lineTo($ + Q + j.width, ot), o.stroke();
|
|
1494
1492
|
}
|
|
1495
|
-
|
|
1493
|
+
$ += j.width;
|
|
1496
1494
|
});
|
|
1497
1495
|
});
|
|
1498
1496
|
}
|
|
1499
1497
|
}
|
|
1500
|
-
function
|
|
1501
|
-
return
|
|
1498
|
+
function Gt(e) {
|
|
1499
|
+
return Gt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
1502
1500
|
return typeof n;
|
|
1503
1501
|
} : function(n) {
|
|
1504
1502
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
1505
|
-
},
|
|
1503
|
+
}, Gt(e);
|
|
1506
1504
|
}
|
|
1507
|
-
function
|
|
1505
|
+
function xe(e) {
|
|
1508
1506
|
for (var n = {}, o = 0; o < e.length; o++) {
|
|
1509
1507
|
var i = e[o];
|
|
1510
|
-
typeof i != "number" && i != null && (typeof i == "string" ? n.text = i : typeof i == "function" ? n.fn = i :
|
|
1508
|
+
typeof i != "number" && i != null && (typeof i == "string" ? n.text = i : typeof i == "function" ? n.fn = i : Gt(i) === "object" && i._groups ? n.d3 = i : i && i.nodeType && i.getContext ? n.ctx = i.getContext("2d") : i && i.fillText && i.beginPath ? n.ctx = i : i && (n.text = i));
|
|
1511
1509
|
}
|
|
1512
1510
|
return n;
|
|
1513
1511
|
}
|
|
@@ -1518,32 +1516,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1518
1516
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
1519
1517
|
}, At(e);
|
|
1520
1518
|
}
|
|
1521
|
-
function
|
|
1519
|
+
function vn(e, n) {
|
|
1522
1520
|
for (var o = 0; o < n.length; o++) {
|
|
1523
1521
|
var i = n[o];
|
|
1524
|
-
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, (h = function(
|
|
1525
|
-
if (At(
|
|
1526
|
-
return
|
|
1527
|
-
var x =
|
|
1522
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, (h = function(g, w) {
|
|
1523
|
+
if (At(g) !== "object" || g === null)
|
|
1524
|
+
return g;
|
|
1525
|
+
var x = g[Symbol.toPrimitive];
|
|
1528
1526
|
if (x !== void 0) {
|
|
1529
|
-
var b = x.call(
|
|
1527
|
+
var b = x.call(g, w);
|
|
1530
1528
|
if (At(b) !== "object")
|
|
1531
1529
|
return b;
|
|
1532
1530
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1533
1531
|
}
|
|
1534
|
-
return String(
|
|
1532
|
+
return String(g);
|
|
1535
1533
|
}(i.key, "string"), At(h) === "symbol" ? h : String(h)), i);
|
|
1536
1534
|
}
|
|
1537
1535
|
var h;
|
|
1538
1536
|
}
|
|
1539
|
-
var
|
|
1537
|
+
var xn = k(), Zt = function(e) {
|
|
1540
1538
|
return typeof e == "function" ? e : function() {
|
|
1541
1539
|
return e;
|
|
1542
1540
|
};
|
|
1543
1541
|
}, it = function() {
|
|
1544
1542
|
function e(i) {
|
|
1545
|
-
if (function(
|
|
1546
|
-
if (!(
|
|
1543
|
+
if (function(g, w) {
|
|
1544
|
+
if (!(g instanceof w))
|
|
1547
1545
|
throw new TypeError("Cannot call a class as a function");
|
|
1548
1546
|
}(this, e), this.props = { overflow: "ellipsis", lineclamp: null, align: "left", wordBreak: null, valign: "top", width: function() {
|
|
1549
1547
|
return 1 / 0;
|
|
@@ -1557,80 +1555,80 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1557
1555
|
}
|
|
1558
1556
|
var n, o;
|
|
1559
1557
|
return n = e, o = [{ key: "linebreak", value: function(i) {
|
|
1560
|
-
var h = this,
|
|
1558
|
+
var h = this, g = this.props.parser(String(i)), w = this.font(), x = function(b, S, D) {
|
|
1561
1559
|
if (!b.length)
|
|
1562
1560
|
return [];
|
|
1563
|
-
var
|
|
1564
|
-
if (!
|
|
1561
|
+
var M = S.height(), T = S.width(), O = S.overflowLine(), R = S.overflowWrap(), K = k(D, !0, !1), $ = isFinite(M()) ? Math.floor(M() / D.height) : 1 / 0;
|
|
1562
|
+
if (!M() && !T(0) || !$)
|
|
1565
1563
|
return [];
|
|
1566
|
-
for (var L = 0,
|
|
1567
|
-
var
|
|
1568
|
-
if (
|
|
1569
|
-
if (
|
|
1570
|
-
|
|
1571
|
-
else if (
|
|
1572
|
-
Y.push({ index: L, width:
|
|
1573
|
-
else if (
|
|
1574
|
-
|
|
1564
|
+
for (var L = 0, F = 0, N = 0, J = [], Y = [], j = !1; L < b.length && F < $; ) {
|
|
1565
|
+
var _ = b[L], et = dn(_, D);
|
|
1566
|
+
if (_.width = Z(_, et), _.font = et, _.line = F, _.whitespace = _.value in C, _.value && (_.value = _.value.replace(un, " ")), !(!N && _.whitespace || j && _.whitespace))
|
|
1567
|
+
if (_ instanceof tt)
|
|
1568
|
+
N = 0, Y = [], J.push(L + 1), F++;
|
|
1569
|
+
else if (_ instanceof St || _ instanceof ft)
|
|
1570
|
+
Y.push({ index: L, width: N });
|
|
1571
|
+
else if (_.whitespace || N + _.width < T(F))
|
|
1572
|
+
N += _.width;
|
|
1575
1573
|
else if (Y.length) {
|
|
1576
1574
|
var Q = void 0, ot = void 0;
|
|
1577
1575
|
do {
|
|
1578
1576
|
ot = !0, Q = Y.pop();
|
|
1579
|
-
var
|
|
1580
|
-
|
|
1577
|
+
var ct = b[Q.index], st = void 0;
|
|
1578
|
+
ct instanceof ft && (st = Z("-", ct.font), Q.width + st > T(F) && (ot = !Y.length));
|
|
1581
1579
|
} while (!ot);
|
|
1582
|
-
J.push(Q.index + 1),
|
|
1580
|
+
J.push(Q.index + 1), N = 0, F++, L = Q.index, Y = [];
|
|
1583
1581
|
} else if (R === "break-word") {
|
|
1584
|
-
var at =
|
|
1585
|
-
if (
|
|
1586
|
-
var vt =
|
|
1582
|
+
var at = T(F);
|
|
1583
|
+
if (N + _.width > at) {
|
|
1584
|
+
var vt = _.clone();
|
|
1587
1585
|
do
|
|
1588
|
-
|
|
1589
|
-
while (
|
|
1590
|
-
vt.value = vt.value.slice(
|
|
1586
|
+
_.value = _.value.slice(0, -1), _.width = Z(_, _.font), N += _.width;
|
|
1587
|
+
while (_.value && _.width > at);
|
|
1588
|
+
vt.value = vt.value.slice(_.value.length), b.splice(L + 1, 0, new St(), vt);
|
|
1591
1589
|
}
|
|
1592
|
-
J.push(L + 1),
|
|
1590
|
+
J.push(L + 1), N = 0, F++;
|
|
1593
1591
|
} else
|
|
1594
|
-
|
|
1595
|
-
L++,
|
|
1592
|
+
N += _.width;
|
|
1593
|
+
L++, j = _.whitespace;
|
|
1596
1594
|
}
|
|
1597
1595
|
L !== J[J.length - 1] && J.push(L);
|
|
1598
1596
|
var kt = 0, lt = 0, X = J.map(function(pt) {
|
|
1599
|
-
for (var
|
|
1597
|
+
for (var W, gt = kt; (W = b[gt]) && (W.whitespace || !W.value); )
|
|
1600
1598
|
gt++;
|
|
1601
|
-
for (var ut = pt,
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
var xt = b.slice(gt, ut).filter(function(
|
|
1605
|
-
return
|
|
1599
|
+
for (var ut = pt, Jt = null; ut > gt && (W = b[ut - 1]) && (W.whitespace || !(W.value || W instanceof ft)); )
|
|
1600
|
+
W instanceof tt && (Jt = W), ut--;
|
|
1601
|
+
W instanceof ft && (W.value = "-", W.width = Z("-", W.font)), kt = pt;
|
|
1602
|
+
var xt = b.slice(gt, ut).filter(function(Qt) {
|
|
1603
|
+
return Qt.value;
|
|
1606
1604
|
});
|
|
1607
|
-
return
|
|
1608
|
-
return
|
|
1605
|
+
return Jt && xt.push(Jt), xt.width = xt.reduce(function(Qt, En) {
|
|
1606
|
+
return Qt + En.width;
|
|
1609
1607
|
}, 0), xt.width > lt && (lt = xt.width), xt;
|
|
1610
1608
|
});
|
|
1611
|
-
if (X.hasLineOverflow = !1,
|
|
1612
|
-
var
|
|
1613
|
-
X.forEach(function(pt,
|
|
1614
|
-
var gt =
|
|
1609
|
+
if (X.hasLineOverflow = !1, O) {
|
|
1610
|
+
var $t = O === "ellipsis" ? "…" : O;
|
|
1611
|
+
X.forEach(function(pt, W) {
|
|
1612
|
+
var gt = T(W);
|
|
1615
1613
|
if (pt.width > gt) {
|
|
1616
|
-
var ut = new H(
|
|
1617
|
-
ut.font = D, ut.width =
|
|
1614
|
+
var ut = new H($t);
|
|
1615
|
+
ut.font = D, ut.width = Z($t, K), me(pt, gt, ut), X.hasLineOverflow = !0;
|
|
1618
1616
|
}
|
|
1619
1617
|
});
|
|
1620
1618
|
}
|
|
1621
1619
|
var q = S.overflow() === "ellipsis" ? "…" : S.overflow();
|
|
1622
1620
|
if (q && L !== b.length) {
|
|
1623
|
-
var G =
|
|
1624
|
-
Tt.font = D, Tt.width =
|
|
1621
|
+
var G = T(X.length - 1), Pt = X[X.length - 1], Tt = new H(q);
|
|
1622
|
+
Tt.font = D, Tt.width = Z(q, K), me(Pt, G, Tt), X.hasOverflow = !0;
|
|
1625
1623
|
} else
|
|
1626
1624
|
X.hasOverflow = !1;
|
|
1627
1625
|
return X.font = D, X.width = lt, X;
|
|
1628
|
-
}(
|
|
1626
|
+
}(g, this, w);
|
|
1629
1627
|
return x.height = x.length * w.height, x.render = function(b) {
|
|
1630
1628
|
return h.render(x, b);
|
|
1631
1629
|
}, x.svg = x.render, x.draw = x.render, x;
|
|
1632
1630
|
} }, { key: "font", value: function(i) {
|
|
1633
|
-
return arguments.length ? (this.props.font =
|
|
1631
|
+
return arguments.length ? (this.props.font = k(i), this) : this.props.font || k(xn);
|
|
1634
1632
|
} }, { key: "overflow", value: function(i) {
|
|
1635
1633
|
return arguments.length ? (this.props.overflow = String(i), this) : this.props.overflow;
|
|
1636
1634
|
} }, { key: "overflowLine", value: function(i) {
|
|
@@ -1648,11 +1646,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1648
1646
|
var h = String(i).toLowerCase();
|
|
1649
1647
|
return h === "break-word" ? this.props.overflowWrap = "break-word" : h !== "normal" && i != null || (this.props.overflowWrap = null), this;
|
|
1650
1648
|
} }, { key: "width", value: function(i) {
|
|
1651
|
-
return arguments.length ? (this.props.width =
|
|
1649
|
+
return arguments.length ? (this.props.width = Zt(i), this) : this.props.width;
|
|
1652
1650
|
} }, { key: "height", value: function(i) {
|
|
1653
|
-
return arguments.length ? (this.props.height =
|
|
1651
|
+
return arguments.length ? (this.props.height = Zt(i), this) : this.props.height;
|
|
1654
1652
|
} }, { key: "x", value: function(i) {
|
|
1655
|
-
return arguments.length ? (this.props.x =
|
|
1653
|
+
return arguments.length ? (this.props.x = Zt(i), this) : this.props.x;
|
|
1656
1654
|
} }, { key: "parser", value: function(i) {
|
|
1657
1655
|
if (!arguments.length)
|
|
1658
1656
|
return this.props.parser;
|
|
@@ -1666,9 +1664,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1666
1664
|
} }, { key: "createElement", value: function(i) {
|
|
1667
1665
|
return arguments.length ? (this.props.createElement = i, this) : this.props.createElement || e.createElement;
|
|
1668
1666
|
} }, { key: "render", value: function() {
|
|
1669
|
-
var i =
|
|
1670
|
-
return typeof i.text == "string" && (i.text = this.linebreak(i.text)), i.ctx ?
|
|
1671
|
-
} }], o &&
|
|
1667
|
+
var i = xe(arguments);
|
|
1668
|
+
return typeof i.text == "string" && (i.text = this.linebreak(i.text)), i.ctx ? mn(i.text, this, i.ctx) : gn(i.text, this);
|
|
1669
|
+
} }], o && vn(n.prototype, o), Object.defineProperty(n, "prototype", { writable: !1 }), e;
|
|
1672
1670
|
}();
|
|
1673
1671
|
function Et(e) {
|
|
1674
1672
|
return Et = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
@@ -1683,32 +1681,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1683
1681
|
i[o] = e[o];
|
|
1684
1682
|
return i;
|
|
1685
1683
|
}
|
|
1686
|
-
function
|
|
1684
|
+
function wn(e, n) {
|
|
1687
1685
|
for (var o = 0; o < n.length; o++) {
|
|
1688
1686
|
var i = n[o];
|
|
1689
|
-
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, (h = function(
|
|
1690
|
-
if (Et(
|
|
1691
|
-
return
|
|
1692
|
-
var x =
|
|
1687
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, (h = function(g, w) {
|
|
1688
|
+
if (Et(g) !== "object" || g === null)
|
|
1689
|
+
return g;
|
|
1690
|
+
var x = g[Symbol.toPrimitive];
|
|
1693
1691
|
if (x !== void 0) {
|
|
1694
|
-
var b = x.call(
|
|
1692
|
+
var b = x.call(g, w);
|
|
1695
1693
|
if (Et(b) !== "object")
|
|
1696
1694
|
return b;
|
|
1697
1695
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1698
1696
|
}
|
|
1699
|
-
return String(
|
|
1697
|
+
return String(g);
|
|
1700
1698
|
}(i.key, "string"), Et(h) === "symbol" ? h : String(h)), i);
|
|
1701
1699
|
}
|
|
1702
1700
|
var h;
|
|
1703
1701
|
}
|
|
1704
|
-
var
|
|
1702
|
+
var we = function(e) {
|
|
1705
1703
|
return typeof e == "function" ? e : function() {
|
|
1706
1704
|
return e;
|
|
1707
1705
|
};
|
|
1708
|
-
},
|
|
1706
|
+
}, be = function() {
|
|
1709
1707
|
function e(i) {
|
|
1710
|
-
if (function(
|
|
1711
|
-
if (!(
|
|
1708
|
+
if (function(g, w) {
|
|
1709
|
+
if (!(g instanceof w))
|
|
1712
1710
|
throw new TypeError("Cannot call a class as a function");
|
|
1713
1711
|
}(this, e), this.props = { width: function() {
|
|
1714
1712
|
return 1 / 0;
|
|
@@ -1721,9 +1719,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1721
1719
|
}
|
|
1722
1720
|
var n, o;
|
|
1723
1721
|
return n = e, o = [{ key: "anchor", value: function(i) {
|
|
1724
|
-
var h = this.props,
|
|
1722
|
+
var h = this.props, g = h.hAnchor, w = h.vAnchor, x = h.width, b = h.height;
|
|
1725
1723
|
if (!arguments.length)
|
|
1726
|
-
return [
|
|
1724
|
+
return [g * x(0), w * b(0)];
|
|
1727
1725
|
if (typeof i == "string") {
|
|
1728
1726
|
var S = this.props;
|
|
1729
1727
|
i.toLowerCase().trim().split(/\s+/).forEach(function(D) {
|
|
@@ -1732,34 +1730,34 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1732
1730
|
}
|
|
1733
1731
|
return this;
|
|
1734
1732
|
} }, { key: "width", value: function(i) {
|
|
1735
|
-
return arguments.length ? (this.props.width =
|
|
1733
|
+
return arguments.length ? (this.props.width = we(i), this) : this.props.width;
|
|
1736
1734
|
} }, { key: "height", value: function(i) {
|
|
1737
|
-
return arguments.length ? (this.props.height =
|
|
1735
|
+
return arguments.length ? (this.props.height = we(i), this) : this.props.height;
|
|
1738
1736
|
} }, { key: "rotate", value: function(i) {
|
|
1739
1737
|
return arguments.length ? (this.props.rotation = i, this) : this.props.rotation;
|
|
1740
1738
|
} }, { key: "createElement", value: function(i) {
|
|
1741
1739
|
return arguments.length ? (this.props.createElement = i, this) : this.props.createElement || e.createElement;
|
|
1742
1740
|
} }, { key: "canvas", value: function(i, h) {
|
|
1743
|
-
var
|
|
1741
|
+
var g, w = i.getContext ? i.getContext("2d") : i;
|
|
1744
1742
|
return w.save(), w.rotate(this.rotate() * Math.PI / 180), w.translate.apply(w, function(x) {
|
|
1745
1743
|
if (Array.isArray(x))
|
|
1746
1744
|
return Wt(x);
|
|
1747
|
-
}(
|
|
1745
|
+
}(g = this.anchor()) || function(x) {
|
|
1748
1746
|
if (typeof Symbol < "u" && x[Symbol.iterator] != null || x["@@iterator"] != null)
|
|
1749
1747
|
return Array.from(x);
|
|
1750
|
-
}(
|
|
1748
|
+
}(g) || function(x, b) {
|
|
1751
1749
|
if (x) {
|
|
1752
1750
|
if (typeof x == "string")
|
|
1753
1751
|
return Wt(x, b);
|
|
1754
1752
|
var S = Object.prototype.toString.call(x).slice(8, -1);
|
|
1755
1753
|
return S === "Object" && x.constructor && (S = x.constructor.name), S === "Map" || S === "Set" ? Array.from(x) : S === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S) ? Wt(x, b) : void 0;
|
|
1756
1754
|
}
|
|
1757
|
-
}(
|
|
1755
|
+
}(g) || function() {
|
|
1758
1756
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1759
1757
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1760
1758
|
}()), h(w), w.restore(), w;
|
|
1761
1759
|
} }, { key: "render", value: function() {
|
|
1762
|
-
var i =
|
|
1760
|
+
var i = xe(arguments);
|
|
1763
1761
|
if (i.d3)
|
|
1764
1762
|
return i.d3.attr("transform", "rotate(".concat(this.rotate(), ") translate(").concat(this.anchor(), ")"));
|
|
1765
1763
|
if (i.ctx)
|
|
@@ -1768,59 +1766,59 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1768
1766
|
var h = typeof i.text.render == "function" ? i.text.render() : i.text;
|
|
1769
1767
|
return this.createElement()("g", { transform: "rotate(".concat(this.rotate(), ") translate(").concat(this.anchor(), ")") }, h);
|
|
1770
1768
|
}
|
|
1771
|
-
} }], o &&
|
|
1772
|
-
}(),
|
|
1773
|
-
function
|
|
1774
|
-
return
|
|
1769
|
+
} }], o && wn(n.prototype, o), Object.defineProperty(n, "prototype", { writable: !1 }), e;
|
|
1770
|
+
}(), bn = Object.prototype.hasOwnProperty, Kt = {};
|
|
1771
|
+
function Sn(e) {
|
|
1772
|
+
return Kt[e] || (Kt[e] = e.replace(/([a-z])([A-Z])/g, function(n, o, i) {
|
|
1775
1773
|
return o + "-" + i.toLowerCase();
|
|
1776
|
-
})),
|
|
1774
|
+
})), Kt[e];
|
|
1777
1775
|
}
|
|
1778
|
-
function
|
|
1776
|
+
function Se(e, n) {
|
|
1779
1777
|
if (Array.isArray(n))
|
|
1780
1778
|
return n.forEach(function(o) {
|
|
1781
|
-
return
|
|
1779
|
+
return Se(e, o);
|
|
1782
1780
|
});
|
|
1783
1781
|
typeof n == "string" && (n = document.createTextNode(n)), e.appendChild(n);
|
|
1784
1782
|
}
|
|
1785
|
-
function
|
|
1783
|
+
function Ae(e, n) {
|
|
1786
1784
|
if (typeof document < "u") {
|
|
1787
1785
|
var o = typeof e == "string" ? document.createElementNS("http://www.w3.org/2000/svg", e) : e;
|
|
1788
1786
|
if (n && o.setAttribute)
|
|
1789
1787
|
for (var i in n)
|
|
1790
|
-
|
|
1791
|
-
for (var h = arguments.length,
|
|
1792
|
-
|
|
1793
|
-
return
|
|
1794
|
-
|
|
1788
|
+
bn.call(n, i) && n[i] != null && o.setAttribute(i === "className" ? "class" : Sn(i), n[i]);
|
|
1789
|
+
for (var h = arguments.length, g = new Array(h > 2 ? h - 2 : 0), w = 2; w < h; w++)
|
|
1790
|
+
g[w - 2] = arguments[w];
|
|
1791
|
+
return g != null && g.length && g.forEach(function(x) {
|
|
1792
|
+
Se(o, x);
|
|
1795
1793
|
}), o;
|
|
1796
1794
|
}
|
|
1797
1795
|
}
|
|
1798
|
-
it.createElement =
|
|
1796
|
+
it.createElement = Ae, it.textparser = Ct, it.defaultparser = Ct, it.htmlparser = function(e) {
|
|
1799
1797
|
e = String(e || "").trim();
|
|
1800
|
-
for (var n, o, i = { weight: null, style: null, sub: !1, sup: !1, href: null, color: null, rel: null, target: null }, h = [],
|
|
1801
|
-
for (var
|
|
1802
|
-
i[
|
|
1803
|
-
h.push(
|
|
1804
|
-
}, x = function(
|
|
1805
|
-
var
|
|
1806
|
-
if (
|
|
1807
|
-
for (var R =
|
|
1798
|
+
for (var n, o, i = { weight: null, style: null, sub: !1, sup: !1, href: null, color: null, rel: null, target: null }, h = [], g = [], w = function(M) {
|
|
1799
|
+
for (var T in i)
|
|
1800
|
+
i[T] && (M[T] = i[T]);
|
|
1801
|
+
h.push(M);
|
|
1802
|
+
}, x = function(M) {
|
|
1803
|
+
var T = h.length, O = tn[M];
|
|
1804
|
+
if (T && O) {
|
|
1805
|
+
for (var R = T - 1; h[R] && (h[R] instanceof St || Ze.test(h[R].value)); )
|
|
1808
1806
|
R--;
|
|
1809
|
-
for (;
|
|
1810
|
-
R--,
|
|
1811
|
-
for (;
|
|
1807
|
+
for (; O && h[R] && h[R] instanceof tt; )
|
|
1808
|
+
R--, O--;
|
|
1809
|
+
for (; O-- > 0; )
|
|
1812
1810
|
h.push(new tt());
|
|
1813
1811
|
}
|
|
1814
1812
|
}; e.length; ) {
|
|
1815
1813
|
if (n = /^[^<]+/.exec(e))
|
|
1816
|
-
|
|
1817
|
-
else if (!(n =
|
|
1814
|
+
Ct(ge(n[0]), !1).forEach(w);
|
|
1815
|
+
else if (!(n = Je.exec(e)))
|
|
1818
1816
|
if (n = We.exec(e))
|
|
1819
|
-
|
|
1820
|
-
else if (n =
|
|
1817
|
+
g.length && (i = g.pop()), x(n[1]);
|
|
1818
|
+
else if (n = Ke.exec(e)) {
|
|
1821
1819
|
var b = n[1];
|
|
1822
|
-
x(b),
|
|
1823
|
-
var S =
|
|
1820
|
+
x(b), g.push(i), i = Object.create(i), pe[b] && pe[b](i, "");
|
|
1821
|
+
var S = rn(n[2]);
|
|
1824
1822
|
b === "a" && (S.href && (i.href = S.href), S.rel && (i.rel = S.rel), S.target && (i.target = S.target)), S.class && (i.class = i.class ? i.class + " " + S.class : S.class), S.style && (o = /(?:^|\s|;)color\s*:\s*([^;\s"']+)/.exec(S.style)) && o[1] && (i.color = o[1]), b === "br" && h.push(new tt());
|
|
1825
1823
|
} else
|
|
1826
1824
|
n = [e.slice(0, 1)], w(new H(n[0]));
|
|
@@ -1832,37 +1830,37 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1832
1830
|
}, it.latexparser = function(e) {
|
|
1833
1831
|
e = String(e || "").trim();
|
|
1834
1832
|
var n = [0];
|
|
1835
|
-
e = e.replace(/\\verb,(.*?),/, function(
|
|
1833
|
+
e = e.replace(/\\verb,(.*?),/, function($, L) {
|
|
1836
1834
|
return n.push(L), "\\verb," + (n.length - 1) + ",";
|
|
1837
1835
|
}).replace(/\\\\\n/g, function() {
|
|
1838
1836
|
return "\\\\";
|
|
1839
|
-
}).replace(
|
|
1840
|
-
return
|
|
1841
|
-
}).replace(/\n\s+/g, function(
|
|
1842
|
-
return /\n/.test(
|
|
1843
|
-
}).replace(/\\symbol\{(\d+)\}/, function(
|
|
1844
|
-
return
|
|
1845
|
-
}).replace(/(^|[^\\])(\^|_)(\d|[^{]\S*)/g, function(
|
|
1846
|
-
return L +
|
|
1847
|
-
}).replace(/\\verb,(.*?),/, function(
|
|
1837
|
+
}).replace(hn, function($, L, F) {
|
|
1838
|
+
return F.charAt(L - 1) === "\\" ? $ : cn[$];
|
|
1839
|
+
}).replace(/\n\s+/g, function($) {
|
|
1840
|
+
return /\n/.test($.slice(1)) ? "\\par " : $;
|
|
1841
|
+
}).replace(/\\symbol\{(\d+)\}/, function($, L, F, N) {
|
|
1842
|
+
return N.charAt(F - 1) === "\\" ? $ : String.fromCharCode(1 * L);
|
|
1843
|
+
}).replace(/(^|[^\\])(\^|_)(\d|[^{]\S*)/g, function($, L, F, N) {
|
|
1844
|
+
return L + F + "{" + N + "}";
|
|
1845
|
+
}).replace(/\\verb,(.*?),/, function($, L) {
|
|
1848
1846
|
return "\\verb,".concat(n[+L], ",");
|
|
1849
1847
|
});
|
|
1850
|
-
for (var o, i = { weight: null, italic: null, variant: null, sub: !1, sup: !1, href: null }, h = [],
|
|
1848
|
+
for (var o, i = { weight: null, italic: null, variant: null, sub: !1, sup: !1, href: null }, h = [], g = [], w = function($) {
|
|
1851
1849
|
for (var L in i)
|
|
1852
|
-
i[L] && (
|
|
1853
|
-
return h.push(
|
|
1850
|
+
i[L] && ($[L] = i[L]);
|
|
1851
|
+
return h.push($), $;
|
|
1854
1852
|
}, x = function() {
|
|
1855
|
-
|
|
1853
|
+
g.push(i), i = Object.create(i);
|
|
1856
1854
|
}, b = function() {
|
|
1857
|
-
if (!
|
|
1855
|
+
if (!g.length)
|
|
1858
1856
|
throw new Error("Unexpected }");
|
|
1859
|
-
i =
|
|
1857
|
+
i = g.pop();
|
|
1860
1858
|
}, S = { tokens: h, open_context: x, close_context: b, add_token: w }; e.length; ) {
|
|
1861
|
-
if (o =
|
|
1862
|
-
|
|
1863
|
-
else if (o =
|
|
1859
|
+
if (o = an.exec(e))
|
|
1860
|
+
Ct(o[0], !1).forEach(w);
|
|
1861
|
+
else if (o = ln.exec(e))
|
|
1864
1862
|
w(new H(o[1]));
|
|
1865
|
-
else if (!(o =
|
|
1863
|
+
else if (!(o = on.exec(e))) {
|
|
1866
1864
|
if (o = /^\{/.exec(e))
|
|
1867
1865
|
x();
|
|
1868
1866
|
else if (o = /^\}/.exec(e))
|
|
@@ -1870,27 +1868,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1870
1868
|
else if (!(o = /^\$/.exec(e)))
|
|
1871
1869
|
if (o = /^\\verb,([^,]+),/.exec(e))
|
|
1872
1870
|
w(new H(o[1]));
|
|
1873
|
-
else if (o =
|
|
1874
|
-
var D = o[1].slice(1) || o[1],
|
|
1871
|
+
else if (o = sn.exec(e)) {
|
|
1872
|
+
var D = o[1].slice(1) || o[1], M = !!o[2];
|
|
1875
1873
|
if (/^(La)?TeX$/i.test(D)) {
|
|
1876
1874
|
x(), i.family = "serif";
|
|
1877
|
-
var
|
|
1878
|
-
D === "LaTeX" && ((
|
|
1879
|
-
} else if (D in
|
|
1880
|
-
w(new H(
|
|
1875
|
+
var T = void 0;
|
|
1876
|
+
D === "LaTeX" && ((T = w(new H("L"))).tracking = -0.25, (T = w(new H("A"))).size = 0.7, T.baseline = 0.3, T.tracking = -0.1), (T = w(new H("T"))).tracking = -0.17, (T = w(new H("E"))).baseline = -0.22, T.tracking = -0.13, T = w(new H("X")), b();
|
|
1877
|
+
} else if (D in ye)
|
|
1878
|
+
w(new H(ye[D])), M && x();
|
|
1881
1879
|
else if (D in V) {
|
|
1882
|
-
var
|
|
1880
|
+
var O = [], R = V[D].length - 1, K = void 0;
|
|
1883
1881
|
if (R) {
|
|
1884
|
-
for (
|
|
1882
|
+
for (M = !1, e = e.slice(o[0].length - 1); R--; ) {
|
|
1885
1883
|
if (!(K = /^\{([^}]+)\}/.exec(e)))
|
|
1886
1884
|
throw new Error(D + " is missing an argument");
|
|
1887
|
-
|
|
1885
|
+
O.push(K[1]), e = e.slice(K[0].length);
|
|
1888
1886
|
}
|
|
1889
|
-
o[0] = /^\{/.exec(e) ? "{" : "",
|
|
1887
|
+
o[0] = /^\{/.exec(e) ? "{" : "", M = !!o[0];
|
|
1890
1888
|
}
|
|
1891
|
-
|
|
1889
|
+
M && x(), V[D].apply(S, [i].concat(O));
|
|
1892
1890
|
} else
|
|
1893
|
-
console.warn("unknown latex command", D), w(new H(o[1])),
|
|
1891
|
+
console.warn("unknown latex command", D), w(new H(o[1])), M && x();
|
|
1894
1892
|
} else
|
|
1895
1893
|
o = [e.slice(0, 1)], w(new H(o[0]));
|
|
1896
1894
|
}
|
|
@@ -1898,168 +1896,168 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1898
1896
|
}
|
|
1899
1897
|
return h;
|
|
1900
1898
|
}, it.measureText = function(e, n, o) {
|
|
1901
|
-
return
|
|
1902
|
-
}, it.Token = H, it.Break = St, it.LineBreak = tt, it.SoftHyphen = ft, it.Rotator =
|
|
1903
|
-
const
|
|
1904
|
-
return
|
|
1899
|
+
return Z(e, k(n), o);
|
|
1900
|
+
}, it.Token = H, it.Break = St, it.LineBreak = tt, it.SoftHyphen = ft, it.Rotator = be, be.createElement = Ae;
|
|
1901
|
+
const An = it;
|
|
1902
|
+
return r.default;
|
|
1905
1903
|
})());
|
|
1906
|
-
})(
|
|
1907
|
-
var jn =
|
|
1908
|
-
const
|
|
1909
|
-
function
|
|
1910
|
-
const t = dt(
|
|
1904
|
+
})(Ve);
|
|
1905
|
+
var jn = Ve.exports;
|
|
1906
|
+
const Me = /* @__PURE__ */ le(jn);
|
|
1907
|
+
function qn(c, l) {
|
|
1908
|
+
const t = dt(c), { fontSize: r, font: a, padding: u = 0 } = c.properties.style || {};
|
|
1911
1909
|
if (t.width === t.height && t.width === 0)
|
|
1912
1910
|
return;
|
|
1913
|
-
const f = new
|
|
1914
|
-
font: `${
|
|
1915
|
-
width: t.width -
|
|
1916
|
-
height: t.height -
|
|
1911
|
+
const f = new Me({
|
|
1912
|
+
font: `${r}px/${r}px ${a}`.replace(/(px)+/g, "px"),
|
|
1913
|
+
width: t.width - u * 2,
|
|
1914
|
+
height: t.height - u * 2,
|
|
1917
1915
|
align: "left",
|
|
1918
1916
|
valign: "top",
|
|
1919
1917
|
x: 0,
|
|
1920
1918
|
overflow: "ellipsis",
|
|
1921
1919
|
parser: "html",
|
|
1922
|
-
createElement:
|
|
1920
|
+
createElement: Me.createElement
|
|
1923
1921
|
}).linebreak(
|
|
1924
|
-
|
|
1922
|
+
c.properties.content.replaceAll(`
|
|
1925
1923
|
`, "<br>")
|
|
1926
1924
|
).render();
|
|
1927
|
-
f.setAttribute("transform", `translate(${
|
|
1925
|
+
f.setAttribute("transform", `translate(${u}, ${u})`), l.appendChild(f);
|
|
1928
1926
|
}
|
|
1929
|
-
const
|
|
1930
|
-
class
|
|
1931
|
-
constructor(t,
|
|
1927
|
+
const Oe = 20;
|
|
1928
|
+
class Bn extends Be {
|
|
1929
|
+
constructor(t, r = {}) {
|
|
1932
1930
|
super(
|
|
1933
1931
|
t,
|
|
1934
1932
|
`
|
|
1935
1933
|
<div class="annotation-text-handle">
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1934
|
+
<span class="handle line-handle top" data-handle-id="0"></span>
|
|
1935
|
+
<span class="handle line-handle bottom" data-handle-id="1"></span>
|
|
1936
|
+
<span class="handle line-handle left" data-handle-id="2"></span>
|
|
1937
|
+
<span class="handle line-handle right" data-handle-id="3"></span>
|
|
1938
|
+
<span class="handle top right point-handle top-right" data-handle-id="4"></span>
|
|
1939
|
+
<span class="handle left top point-handle top-left" data-handle-id="5"></span>
|
|
1940
|
+
<span class="handle bottom right point-handle bottom-right" data-handle-id="6"></span>
|
|
1941
|
+
<span class="handle left bottom left-handle point-handle bottom-left" data-handle-id="7"></span>
|
|
1942
|
+
<textarea wrap="off"></textarea>
|
|
1945
1943
|
</div>
|
|
1946
1944
|
`
|
|
1947
1945
|
);
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1946
|
+
v(this, "textArea");
|
|
1947
|
+
v(this, "handleSize");
|
|
1948
|
+
v(this, "rect", { x: 0, y: 0, width: 0, height: 0 });
|
|
1949
|
+
v(this, "annotation", { ...ne });
|
|
1950
|
+
v(this, "startX", 0);
|
|
1951
|
+
v(this, "startY", 0);
|
|
1952
|
+
v(this, "handles", []);
|
|
1953
|
+
v(this, "draggedHandle", B);
|
|
1954
|
+
v(this, "isFocused", !1);
|
|
1955
|
+
v(this, "placeholder", "Type your text here...");
|
|
1956
|
+
v(this, "_onFocus", () => {
|
|
1959
1957
|
this.textArea.value === this.placeholder && (this.textArea.value = ""), this.isFocused = !0;
|
|
1960
1958
|
});
|
|
1961
|
-
|
|
1959
|
+
v(this, "_onBlur", () => {
|
|
1962
1960
|
this.isFocused = !1;
|
|
1963
1961
|
});
|
|
1964
|
-
|
|
1962
|
+
v(this, "startDrawing", (t, r, a = Fn(t, r, 0, 0, "", bt)) => {
|
|
1965
1963
|
this.add(a);
|
|
1966
|
-
const
|
|
1967
|
-
this.select(a.id), this.startDragging(this.getById(a.id),
|
|
1964
|
+
const u = this.ogma.view.graphToScreenCoordinates({ x: t, y: r });
|
|
1965
|
+
this.select(a.id), this.startDragging(this.getById(a.id), u.x, u.y), this.draggedHandle = 6;
|
|
1968
1966
|
});
|
|
1969
|
-
|
|
1970
|
-
this.isDragging && (this.remove(this.annotation.id), this.annotation = { ...
|
|
1967
|
+
v(this, "cancelDrawing", () => {
|
|
1968
|
+
this.isDragging && (this.remove(this.annotation.id), this.annotation = { ...ne }, this.draggedHandle = B, this.isDragging = !1, this.emit(Mt, this.annotation));
|
|
1971
1969
|
});
|
|
1972
|
-
|
|
1970
|
+
v(this, "startDragging", (t, r, a) => {
|
|
1973
1971
|
this.annotation = t;
|
|
1974
|
-
const
|
|
1975
|
-
this.rect.x =
|
|
1972
|
+
const u = yt(this.annotation), p = dt(this.annotation);
|
|
1973
|
+
this.rect.x = u.x, this.rect.y = u.y, this.rect.width = p.width, this.rect.height = p.height, this.startX = r, this.startY = a, this.disableDragging(), this.textArea.classList.add("noevents"), this.textArea.setAttribute("disabled", "disabled"), this.emit(ce, this.annotation), this.isDragging = !0;
|
|
1976
1974
|
});
|
|
1977
|
-
|
|
1978
|
-
const
|
|
1979
|
-
|
|
1975
|
+
v(this, "onHandleMouseDown", (t) => {
|
|
1976
|
+
const r = this.getById(this.selectedId) || this.getById(this.hoveredId);
|
|
1977
|
+
r && (this.selectedId !== r.id && this.select(this.hoveredId), this.startDragging(r, t.clientX, t.clientY), this.draggedHandle = Re(t.target));
|
|
1980
1978
|
});
|
|
1981
|
-
|
|
1979
|
+
v(this, "onMouseMove", (t) => {
|
|
1982
1980
|
requestAnimationFrame(() => this._onMouseMove(t));
|
|
1983
1981
|
});
|
|
1984
|
-
|
|
1982
|
+
v(this, "_onMouseMove", (t) => {
|
|
1985
1983
|
if (!this.isDragging)
|
|
1986
1984
|
return;
|
|
1987
1985
|
t.stopPropagation(), t.preventDefault();
|
|
1988
|
-
const
|
|
1989
|
-
this.rect.width + d * (f ? 0 :
|
|
1990
|
-
|
|
1991
|
-
),
|
|
1992
|
-
this.rect.height +
|
|
1993
|
-
|
|
1986
|
+
const r = this.handles[this.draggedHandle], a = r.classList.contains("top"), u = r.classList.contains("left"), p = r.classList.contains("right"), y = r.classList.contains("bottom"), f = r.classList.contains("line-handle"), s = this.ogma.view.getZoom(), d = (t.clientX - this.startX) / s, m = (t.clientY - this.startY) / s, A = u || f ? this.rect.x + d : this.rect.x, I = a || f ? this.rect.y + m : this.rect.y, k = Math.max(
|
|
1987
|
+
this.rect.width + d * (f ? 0 : u ? -1 : p ? 1 : 0),
|
|
1988
|
+
Oe
|
|
1989
|
+
), C = Math.max(
|
|
1990
|
+
this.rect.height + m * (f ? 0 : a ? -1 : y ? 1 : 0),
|
|
1991
|
+
Oe
|
|
1994
1992
|
);
|
|
1995
|
-
|
|
1993
|
+
zn(this.annotation, A, I, k, C), this.emit(he, this.annotation, "text"), this.refreshEditor(), this.layer.refresh();
|
|
1996
1994
|
});
|
|
1997
|
-
|
|
1998
|
-
!this.isDragging || this.draggedHandle === B || (this.restoreDragging(), this.textArea.classList.remove("noevents"), this.textArea.removeAttribute("disabled"), this.emit(
|
|
1995
|
+
v(this, "onMouseUp", () => {
|
|
1996
|
+
!this.isDragging || this.draggedHandle === B || (this.restoreDragging(), this.textArea.classList.remove("noevents"), this.textArea.removeAttribute("disabled"), this.emit(Mt, this.annotation), this.isDragging = !1, this.draggedHandle = B);
|
|
1999
1997
|
});
|
|
2000
|
-
|
|
1998
|
+
v(this, "onViewChanged", () => {
|
|
2001
1999
|
const t = Math.max(2, this.handleSize / this.ogma.view.getZoom());
|
|
2002
2000
|
document.documentElement.style.setProperty("--handle-width", `${t}px`);
|
|
2003
2001
|
});
|
|
2004
|
-
|
|
2002
|
+
v(this, "_onInput", () => {
|
|
2005
2003
|
const t = this.getById(this.selectedId);
|
|
2006
|
-
t && (this.textArea.value = this.textArea.value.replace(/ +(?= )/g, ""), this.textArea.focus(), t.properties.content = this.textArea.value, this.emit(
|
|
2004
|
+
t && (this.textArea.value = this.textArea.value.replace(/ +(?= )/g, ""), this.textArea.focus(), t.properties.content = this.textArea.value, this.emit(ae, t), this.layer.refresh());
|
|
2007
2005
|
});
|
|
2008
|
-
this.handleSize = De.handleSize ||
|
|
2006
|
+
this.handleSize = De.handleSize || r.textHandleSize, this.placeholder = De.placeholder || r.textPlaceholder || "";
|
|
2009
2007
|
const a = this.textArea = this.editor.element.querySelector("textarea");
|
|
2010
2008
|
a.addEventListener("input", this._onInput), a.addEventListener("focus", this._onFocus), a.addEventListener("blur", this._onBlur), a.spellcheck = !1, this.handles = Array.prototype.slice.call(
|
|
2011
2009
|
this.editor.element.querySelectorAll(".annotation-text-handle > .handle")
|
|
2012
2010
|
), this.handles.forEach(
|
|
2013
|
-
(
|
|
2011
|
+
(u) => u.addEventListener("mousedown", this.onHandleMouseDown)
|
|
2014
2012
|
), document.addEventListener("mouseup", this.onMouseUp), document.addEventListener("mousemove", this.onMouseMove, !0), t.events.on(["viewChanged", "zoom"], this.onViewChanged);
|
|
2015
2013
|
}
|
|
2016
2014
|
_canRemove() {
|
|
2017
2015
|
return !this.isFocused;
|
|
2018
2016
|
}
|
|
2019
|
-
detect({ x: t, y:
|
|
2020
|
-
return this.elements.find((
|
|
2021
|
-
const { x:
|
|
2022
|
-
return
|
|
2017
|
+
detect({ x: t, y: r }, a = 0) {
|
|
2018
|
+
return this.elements.find((u) => {
|
|
2019
|
+
const { x: p, y } = yt(u), { width: f, height: s } = dt(u);
|
|
2020
|
+
return p - a < t && y - a < r && p + f + a > t && y + s + a > r;
|
|
2023
2021
|
});
|
|
2024
2022
|
}
|
|
2025
2023
|
draw(t) {
|
|
2026
2024
|
t.innerHTML = "";
|
|
2027
|
-
const
|
|
2028
|
-
this.elements.forEach((
|
|
2029
|
-
const y = `class${
|
|
2030
|
-
color:
|
|
2031
|
-
fontSize:
|
|
2032
|
-
font:
|
|
2033
|
-
strokeColor:
|
|
2034
|
-
strokeWidth:
|
|
2035
|
-
strokeType:
|
|
2025
|
+
const r = "";
|
|
2026
|
+
this.elements.forEach((u, p) => {
|
|
2027
|
+
const y = `class${p}`, f = dt(u), s = yt(u), d = u.id, {
|
|
2028
|
+
color: m,
|
|
2029
|
+
fontSize: A,
|
|
2030
|
+
font: I,
|
|
2031
|
+
strokeColor: k,
|
|
2032
|
+
strokeWidth: C,
|
|
2033
|
+
strokeType: E,
|
|
2036
2034
|
background: U
|
|
2037
|
-
} =
|
|
2035
|
+
} = u.properties.style || bt;
|
|
2038
2036
|
if (d === this.selectedId || this.selectedId === -1 && d === this.hoveredId)
|
|
2039
2037
|
return;
|
|
2040
|
-
const
|
|
2041
|
-
|
|
2038
|
+
const P = It("g");
|
|
2039
|
+
P.setAttribute("fill", `${m}`), P.setAttribute("font-size", `${A}`), P.setAttribute("font-family", `${I}`);
|
|
2042
2040
|
const z = It("rect");
|
|
2043
|
-
let
|
|
2044
|
-
|
|
2041
|
+
let Z = !1;
|
|
2042
|
+
E && E !== "none" && (Z = !0, z.setAttribute("stroke", k || "black"), z.setAttribute("stroke-width", `${C}`), E === "dashed" && z.setAttribute("stroke-dasharray", "5,5")), (U && U.length || Z) && (Z = !0, z.setAttribute("fill", U || "transparent")), Z && (z.setAttribute("width", `${f.width}`), z.setAttribute("height", `${f.height}`)), P.appendChild(z), qn(u, P), P.setAttribute("transform", `translate(${s.x},${s.y})`), P.classList.add(y), P.setAttribute("data-annotation", `${u.id}`), P.setAttribute("data-annotation-type", "text"), t.appendChild(P);
|
|
2045
2043
|
});
|
|
2046
2044
|
const a = It("style");
|
|
2047
|
-
a.innerHTML =
|
|
2045
|
+
a.innerHTML = r, t.firstChild && t.insertBefore(a, t.firstChild);
|
|
2048
2046
|
}
|
|
2049
2047
|
getDefaultOptions() {
|
|
2050
|
-
return
|
|
2048
|
+
return ne;
|
|
2051
2049
|
}
|
|
2052
2050
|
refreshEditor() {
|
|
2053
2051
|
if (+this.selectedId < 0 && +this.hoveredId < 0)
|
|
2054
2052
|
return;
|
|
2055
|
-
const t = this.getById(this.selectedId) || this.getById(this.hoveredId),
|
|
2056
|
-
font:
|
|
2057
|
-
fontSize:
|
|
2058
|
-
color:
|
|
2059
|
-
background:
|
|
2060
|
-
padding:
|
|
2061
|
-
} = t.properties.style || bt;
|
|
2062
|
-
this.textArea.value = t.properties.content, this.editor.
|
|
2053
|
+
const t = this.getById(this.selectedId) || this.getById(this.hoveredId), r = dt(t), a = this.ogma.view.graphToScreenCoordinates(yt(t)), u = this.ogma.view.getZoom(), p = Math.min(u, this.maxHandleScale), {
|
|
2054
|
+
font: y,
|
|
2055
|
+
fontSize: f,
|
|
2056
|
+
color: s,
|
|
2057
|
+
background: d,
|
|
2058
|
+
padding: m = 0
|
|
2059
|
+
} = t.properties.style || bt, A = f;
|
|
2060
|
+
this.textArea.value = t.properties.content, this.editor.element.style.transform = `translate(${a.x}px, ${a.y}px)translate(-50%, -50%)translate(${r.width / 2 * u}px, ${r.height / 2 * u}px)scale(${p})`, this.editor.element.style.width = `${r.width}px`, this.editor.element.style.height = `${r.height}px`, this.textArea.style.font = `${A} ${y}`, this.textArea.style.fontFamily = y || "sans-serif", this.textArea.style.fontSize = `${A}px`, this.textArea.style.padding = `${m}px`, this.textArea.style.lineHeight = `${A}px`, this.textArea.style.boxSizing = "border-box", this.textArea.style.color = s || "black", this.textArea.style.background = d || "transparent", this.textArea.placeholder = this.placeholder, this.layer.refresh();
|
|
2063
2061
|
}
|
|
2064
2062
|
select(t) {
|
|
2065
2063
|
super.select(t), this.textArea.focus();
|
|
@@ -2068,59 +2066,59 @@ class qn extends qe {
|
|
|
2068
2066
|
super.destroy(), document.removeEventListener("mouseup", this.onMouseUp), document.removeEventListener("mousemove", this.onMouseMove, !0), this.ogma.events.off(this.onViewChanged);
|
|
2069
2067
|
}
|
|
2070
2068
|
}
|
|
2071
|
-
class
|
|
2069
|
+
class Vn {
|
|
2072
2070
|
constructor() {
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2071
|
+
v(this, "links", {});
|
|
2072
|
+
v(this, "linksByTargetId", {});
|
|
2073
|
+
v(this, "linksByArrowId", {});
|
|
2076
2074
|
}
|
|
2077
|
-
add(l, t,
|
|
2078
|
-
const
|
|
2079
|
-
id:
|
|
2075
|
+
add(l, t, r, a, u) {
|
|
2076
|
+
const p = jt(), y = l.id, f = {
|
|
2077
|
+
id: p,
|
|
2080
2078
|
arrow: y,
|
|
2081
|
-
target:
|
|
2079
|
+
target: r,
|
|
2082
2080
|
targetType: a,
|
|
2083
|
-
connectionPoint:
|
|
2081
|
+
connectionPoint: u,
|
|
2084
2082
|
side: t
|
|
2085
2083
|
};
|
|
2086
|
-
return this.links[
|
|
2087
|
-
id:
|
|
2084
|
+
return this.links[p] = f, this.linksByTargetId[r] || (this.linksByTargetId[r] = []), this.linksByTargetId[r].push(p), this.linksByArrowId[y] || (this.linksByArrowId[y] = {}), this.linksByArrowId[y][t] = p, l.properties.link = l.properties.link || {}, l.properties.link[t] = {
|
|
2085
|
+
id: r,
|
|
2088
2086
|
side: t,
|
|
2089
2087
|
type: a,
|
|
2090
|
-
magnet:
|
|
2088
|
+
magnet: u
|
|
2091
2089
|
}, this;
|
|
2092
2090
|
}
|
|
2093
2091
|
arrowIsLinked(l, t) {
|
|
2094
|
-
var
|
|
2095
|
-
return !!((
|
|
2092
|
+
var r;
|
|
2093
|
+
return !!((r = this.linksByArrowId[l]) != null && r[t]);
|
|
2096
2094
|
}
|
|
2097
2095
|
// remove the link between the arrow and the target by arrow id and side
|
|
2098
2096
|
remove(l, t) {
|
|
2099
2097
|
var y, f;
|
|
2100
|
-
const
|
|
2098
|
+
const r = l.id, a = (y = this.linksByArrowId[r]) == null ? void 0 : y[t];
|
|
2101
2099
|
if ((f = l.properties.link) == null || delete f[t], !a)
|
|
2102
2100
|
return this;
|
|
2103
|
-
const
|
|
2101
|
+
const u = this.links[a];
|
|
2104
2102
|
delete this.links[a];
|
|
2105
|
-
const
|
|
2106
|
-
for (let
|
|
2107
|
-
if (
|
|
2108
|
-
|
|
2103
|
+
const p = this.linksByTargetId[u.target];
|
|
2104
|
+
for (let s = 0; s < p.length; s++)
|
|
2105
|
+
if (p[s] === a) {
|
|
2106
|
+
p.splice(s, 1);
|
|
2109
2107
|
break;
|
|
2110
2108
|
}
|
|
2111
|
-
return delete this.linksByArrowId[
|
|
2109
|
+
return delete this.linksByArrowId[r][t], this;
|
|
2112
2110
|
}
|
|
2113
2111
|
getArrowLink(l, t) {
|
|
2114
2112
|
var a;
|
|
2115
|
-
const
|
|
2116
|
-
return
|
|
2113
|
+
const r = (a = this.linksByArrowId[l]) == null ? void 0 : a[t];
|
|
2114
|
+
return r ? this.links[r] : null;
|
|
2117
2115
|
}
|
|
2118
2116
|
getTargetLinks(l) {
|
|
2119
2117
|
var t;
|
|
2120
|
-
return ((t = this.linksByTargetId[l]) == null ? void 0 : t.map((
|
|
2118
|
+
return ((t = this.linksByTargetId[l]) == null ? void 0 : t.map((r) => this.links[r])) ?? [];
|
|
2121
2119
|
}
|
|
2122
2120
|
}
|
|
2123
|
-
const
|
|
2121
|
+
const ht = (c) => c.properties.type === "arrow", wt = (c) => c.properties.type === "text", ze = (c) => c.type === "FeatureCollection", Un = {
|
|
2124
2122
|
magnetColor: "#3e8",
|
|
2125
2123
|
detectMargin: 20,
|
|
2126
2124
|
magnetHandleRadius: 5,
|
|
@@ -2130,7 +2128,7 @@ const ct = (u) => u.properties.type === "arrow", wt = (u) => u.properties.type =
|
|
|
2130
2128
|
textHandleSize: 3.5,
|
|
2131
2129
|
minArrowHeight: 20,
|
|
2132
2130
|
maxArrowHeight: 30
|
|
2133
|
-
},
|
|
2131
|
+
}, Le = ["start", "end"], Ce = [
|
|
2134
2132
|
{ x: 0, y: 0 },
|
|
2135
2133
|
{ x: 0.5, y: 0 },
|
|
2136
2134
|
{ x: 1, y: 0 },
|
|
@@ -2140,135 +2138,146 @@ const ct = (u) => u.properties.type === "arrow", wt = (u) => u.properties.type =
|
|
|
2140
2138
|
{ x: 0.5, y: 1 },
|
|
2141
2139
|
{ x: 1, y: 1 }
|
|
2142
2140
|
];
|
|
2143
|
-
class Gn extends
|
|
2144
|
-
constructor(t,
|
|
2141
|
+
class Gn extends qe {
|
|
2142
|
+
constructor(t, r = {}) {
|
|
2145
2143
|
super();
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2144
|
+
v(this, "arrows");
|
|
2145
|
+
v(this, "texts");
|
|
2146
|
+
v(this, "links", new Vn());
|
|
2147
|
+
v(this, "layer");
|
|
2148
|
+
v(this, "annotations");
|
|
2149
|
+
v(this, "ogma");
|
|
2150
|
+
v(this, "options");
|
|
2151
|
+
v(this, "selected", null);
|
|
2152
|
+
v(this, "updateTimeout", 0);
|
|
2153
|
+
v(this, "hoveredNode", null);
|
|
2154
|
+
v(this, "dragged", null);
|
|
2155
|
+
v(this, "textToMagnet");
|
|
2156
|
+
v(this, "activeLinks", []);
|
|
2157
|
+
v(this, "_render", (t) => {
|
|
2160
2158
|
if (!this.dragged || this.textToMagnet === void 0)
|
|
2161
2159
|
return;
|
|
2162
2160
|
t.beginPath(), t.fillStyle = "green";
|
|
2163
|
-
const
|
|
2164
|
-
|
|
2161
|
+
const r = this.ogma.view.getZoom();
|
|
2162
|
+
Ce.forEach((a) => {
|
|
2165
2163
|
if (!this.textToMagnet)
|
|
2166
2164
|
return;
|
|
2167
|
-
const
|
|
2168
|
-
t.moveTo(y, f), t.arc(y, f, this.options.magnetHandleRadius /
|
|
2165
|
+
const u = dt(this.textToMagnet), p = yt(this.textToMagnet), { x: y, y: f } = new rt(a.x, a.y).mul({ x: u.width, y: u.height }).add(p);
|
|
2166
|
+
t.moveTo(y, f), t.arc(y, f, this.options.magnetHandleRadius / r, 0, Math.PI * 2);
|
|
2169
2167
|
}), t.fill(), t.closePath();
|
|
2170
2168
|
});
|
|
2171
|
-
|
|
2172
|
-
const a =
|
|
2173
|
-
if (
|
|
2174
|
-
["start", "end"].find((
|
|
2175
|
-
const
|
|
2176
|
-
return this._snapToText(t, a,
|
|
2169
|
+
v(this, "_onFeatureDrag", (t, r) => {
|
|
2170
|
+
const a = r;
|
|
2171
|
+
if (ht(t) && a === "line")
|
|
2172
|
+
["start", "end"].find((u) => {
|
|
2173
|
+
const p = u === "start" ? _t(t) : Rt(t);
|
|
2174
|
+
return this._snapToText(t, a, p) || this._findAndSnapToNode(t, u, p);
|
|
2177
2175
|
});
|
|
2178
|
-
else if (
|
|
2179
|
-
const
|
|
2180
|
-
this._snapToText(t, a,
|
|
2176
|
+
else if (ht(t) && a !== "line") {
|
|
2177
|
+
const u = a === "start" ? _t(t) : Rt(t);
|
|
2178
|
+
this._snapToText(t, a, u) || this._findAndSnapToNode(t, a, u);
|
|
2181
2179
|
} else
|
|
2182
|
-
wt(t) && (this.activeLinks.forEach(({ arrow:
|
|
2183
|
-
const f = this.getAnnotation(
|
|
2184
|
-
f.geometry.coordinates[
|
|
2180
|
+
wt(t) && (this.activeLinks.forEach(({ arrow: u, side: p, connectionPoint: y }) => {
|
|
2181
|
+
const f = this.getAnnotation(u), s = dt(t), d = yt(t), m = new rt(y.x, y.y).mul({ x: s.width, y: s.height }).add(d);
|
|
2182
|
+
f.geometry.coordinates[p === "start" ? 0 : 1] = [m.x, m.y];
|
|
2185
2183
|
}), this.activeLinks.length && this.arrows.refreshLayer());
|
|
2186
2184
|
this.layer.refresh();
|
|
2187
2185
|
});
|
|
2188
|
-
|
|
2189
|
-
this.dragged !== null &&
|
|
2190
|
-
this.links.getArrowLink(t.id,
|
|
2186
|
+
v(this, "_onFeatureDragEnd", (t) => {
|
|
2187
|
+
this.dragged !== null && ht(t) && _t(this.dragged) && Le.forEach((r) => {
|
|
2188
|
+
this.links.getArrowLink(t.id, r) && this.emit(Nn, {
|
|
2191
2189
|
arrow: t,
|
|
2192
|
-
link: this.links.getArrowLink(t.id,
|
|
2190
|
+
link: this.links.getArrowLink(t.id, r)
|
|
2193
2191
|
});
|
|
2194
|
-
}), (wt(t) ||
|
|
2192
|
+
}), (wt(t) || ht(t)) && this.onUpdate(t), this.dragged = null, this.activeLinks = [], this.textToMagnet = void 0, this.annotations.forEach((r) => r.enableDetection()), this.layer.refresh();
|
|
2195
2193
|
});
|
|
2196
|
-
|
|
2197
|
-
this.textToMagnet = void 0,
|
|
2198
|
-
const a =
|
|
2199
|
-
a && a !== t &&
|
|
2194
|
+
v(this, "_onFeatureDragStart", (t) => {
|
|
2195
|
+
this.textToMagnet = void 0, ht(t) ? this.dragged = t : wt(t) && this.activeLinks.push(...this.links.getTargetLinks(t.id)), this.annotations.forEach((r) => {
|
|
2196
|
+
const a = r.getSelectedFeature();
|
|
2197
|
+
a && a !== t && r.unhover().unselect(), r.disableDetection();
|
|
2200
2198
|
});
|
|
2201
2199
|
});
|
|
2202
|
-
|
|
2200
|
+
v(this, "_onNodesDragStart", () => {
|
|
2203
2201
|
this.arrows.unhover().unselect(), this.texts.unhover().unselect();
|
|
2204
2202
|
});
|
|
2205
|
-
|
|
2206
|
-
const { dx:
|
|
2207
|
-
this._moveNodes(t.nodes,
|
|
2203
|
+
v(this, "_onNodesDrag", (t) => {
|
|
2204
|
+
const { dx: r, dy: a } = t;
|
|
2205
|
+
this._moveNodes(t.nodes, r, a);
|
|
2208
2206
|
});
|
|
2209
|
-
|
|
2210
|
-
|
|
2207
|
+
v(this, "_onLayoutEnd", (t) => {
|
|
2208
|
+
t.ids.forEach((r, a) => {
|
|
2209
|
+
this.links.getTargetLinks(r).forEach((p) => {
|
|
2210
|
+
const y = this.getAnnotation(p.arrow), f = p.side, s = te(
|
|
2211
|
+
y,
|
|
2212
|
+
f === "start" ? "end" : "start"
|
|
2213
|
+
), d = t.positions.current[a], m = this.ogma.getNode(r).getAttribute("radius"), A = ee(s, d, +m);
|
|
2214
|
+
Nt(y, f, A.x, A.y);
|
|
2215
|
+
});
|
|
2216
|
+
}), this.arrows.refreshLayer(), this.texts.refreshLayer();
|
|
2211
2217
|
});
|
|
2212
|
-
|
|
2213
|
-
this.emit(
|
|
2218
|
+
v(this, "_onAdded", (t) => {
|
|
2219
|
+
this.emit(oe, t);
|
|
2220
|
+
});
|
|
2221
|
+
v(this, "_onRemoved", (t) => {
|
|
2222
|
+
this.emit(se, t);
|
|
2214
2223
|
});
|
|
2215
|
-
|
|
2216
|
-
this.selected = null, this.emit(
|
|
2224
|
+
v(this, "_onUnselect", (t) => {
|
|
2225
|
+
this.selected = null, this.emit(re, t);
|
|
2217
2226
|
});
|
|
2218
|
-
|
|
2219
|
-
this.selected !== t && (this.selected = t, this.emit(
|
|
2227
|
+
v(this, "_onSelect", (t) => {
|
|
2228
|
+
this.selected !== t && (this.selected = t, this.emit(ie, this.selected));
|
|
2220
2229
|
});
|
|
2221
2230
|
/**
|
|
2222
2231
|
* Triggers the update event on the annotation
|
|
2223
2232
|
* @param annotation The annotation updated
|
|
2224
2233
|
*/
|
|
2225
|
-
|
|
2234
|
+
v(this, "onUpdate", (t) => {
|
|
2226
2235
|
cancelAnimationFrame(this.updateTimeout), this.updateTimeout = requestAnimationFrame(
|
|
2227
2236
|
() => this._onUpdate(t)
|
|
2228
2237
|
);
|
|
2229
2238
|
});
|
|
2230
|
-
|
|
2231
|
-
this.emit(
|
|
2239
|
+
v(this, "_onUpdate", (t) => {
|
|
2240
|
+
this.emit(ae, t);
|
|
2232
2241
|
});
|
|
2233
|
-
this.options = this.setOptions({ ...Un, ...
|
|
2234
|
-
a.on(
|
|
2235
|
-
}), this.ogma.events.on("nodesDragStart", this._onNodesDragStart).on("nodesDragProgress", this._onNodesDrag), this.layer = t.layers.addCanvasLayer(this._render), this.layer.moveToBottom();
|
|
2236
|
-
}
|
|
2237
|
-
_moveNodes(t,
|
|
2238
|
-
t.forEach((
|
|
2239
|
-
const
|
|
2240
|
-
|
|
2241
|
-
const
|
|
2242
|
-
|
|
2242
|
+
this.options = this.setOptions({ ...Un, ...r }), this.ogma = t, this.arrows = new Rn(t, this.options), this.texts = new Bn(t, this.options), this.annotations = [this.arrows, this.texts], this.annotations.forEach((a) => {
|
|
2243
|
+
a.on(ce, this._onFeatureDragStart).on(he, this._onFeatureDrag).on(Mt, this._onFeatureDragEnd).on(ae, this.onUpdate).on(re, this._onUnselect).on(ie, this._onSelect).on(oe, this._onAdded).on(se, this._onRemoved);
|
|
2244
|
+
}), this.ogma.events.on("nodesDragStart", this._onNodesDragStart).on("nodesDragProgress", this._onNodesDrag).on("layoutEnd", this._onLayoutEnd), this.layer = t.layers.addCanvasLayer(this._render), this.layer.moveToBottom();
|
|
2245
|
+
}
|
|
2246
|
+
_moveNodes(t, r, a) {
|
|
2247
|
+
t.forEach((u) => {
|
|
2248
|
+
const p = this.links.getTargetLinks(u.getId()), y = u.getPosition();
|
|
2249
|
+
p.forEach((f) => {
|
|
2250
|
+
const s = this.getAnnotation(f.arrow), d = f.side, m = te(
|
|
2251
|
+
s,
|
|
2243
2252
|
d === "start" ? "end" : "start"
|
|
2244
2253
|
);
|
|
2245
|
-
let
|
|
2246
|
-
const
|
|
2247
|
-
(f.connectionPoint.x - (y.x -
|
|
2254
|
+
let A = y;
|
|
2255
|
+
const I = +u.getAttribute("radius"), k = 1e-6;
|
|
2256
|
+
(f.connectionPoint.x - (y.x - r) > k || f.connectionPoint.y - (y.y - a) > k) && (A = ee(m, y, I)), Nt(s, d, A.x, A.y);
|
|
2248
2257
|
});
|
|
2249
2258
|
}), this.arrows.refreshLayer();
|
|
2250
2259
|
}
|
|
2251
|
-
_snapToText(t,
|
|
2252
|
-
const
|
|
2253
|
-
if (this.links.remove(t,
|
|
2260
|
+
_snapToText(t, r, a) {
|
|
2261
|
+
const u = this.texts.detect(a, this.options.detectMargin);
|
|
2262
|
+
if (this.links.remove(t, r), !u)
|
|
2254
2263
|
return !1;
|
|
2255
|
-
this.textToMagnet =
|
|
2256
|
-
const
|
|
2257
|
-
return
|
|
2258
|
-
}
|
|
2259
|
-
_findAndSnapToNode(t,
|
|
2260
|
-
const
|
|
2261
|
-
this.links.remove(t,
|
|
2262
|
-
}
|
|
2263
|
-
_snapToNode(t,
|
|
2264
|
-
const
|
|
2265
|
-
if (
|
|
2266
|
-
let
|
|
2267
|
-
if (
|
|
2268
|
-
const
|
|
2269
|
-
|
|
2264
|
+
this.textToMagnet = u;
|
|
2265
|
+
const p = this.findMagnetPoint(Ce, u, a);
|
|
2266
|
+
return p ? (Nt(t, r, p.point.x, p.point.y), this.links.add(t, r, u.id, "text", p.magnet), !0) : !1;
|
|
2267
|
+
}
|
|
2268
|
+
_findAndSnapToNode(t, r, a) {
|
|
2269
|
+
const u = this.ogma.view.graphToScreenCoordinates(a), p = this.ogma.view.getElementAt(u);
|
|
2270
|
+
this.links.remove(t, r), p && p.isNode ? (this.hoveredNode = p, this.hoveredNode.setSelected(!0), this._snapToNode(t, r, p, u)) : (this.hoveredNode && this.hoveredNode.setSelected(!1), this.hoveredNode = null);
|
|
2271
|
+
}
|
|
2272
|
+
_snapToNode(t, r, a, u) {
|
|
2273
|
+
const p = a.getPositionOnScreen(), y = +a.getAttribute("radius"), f = y * this.ogma.view.getZoom(), s = u.x - p.x, d = u.y - p.y, m = Math.sqrt(s * s + d * d), A = a.getPosition();
|
|
2274
|
+
if (m < f + this.options.detectMargin) {
|
|
2275
|
+
let I = A;
|
|
2276
|
+
if (m > f / 2) {
|
|
2277
|
+
const k = te(t, r === "end" ? "start" : "end");
|
|
2278
|
+
I = ee(k, I, y);
|
|
2270
2279
|
}
|
|
2271
|
-
|
|
2280
|
+
Nt(t, r, I.x, I.y), this.links.add(t, r, a.getId(), "node", I);
|
|
2272
2281
|
}
|
|
2273
2282
|
}
|
|
2274
2283
|
/**
|
|
@@ -2277,19 +2286,19 @@ class Gn extends Fe {
|
|
|
2277
2286
|
getSelected() {
|
|
2278
2287
|
return this.selected;
|
|
2279
2288
|
}
|
|
2280
|
-
findMagnetPoint(t,
|
|
2281
|
-
let
|
|
2282
|
-
for (const
|
|
2283
|
-
const y = dt(
|
|
2284
|
-
if (d < Math.max(
|
|
2285
|
-
|
|
2286
|
-
point:
|
|
2287
|
-
magnet:
|
|
2289
|
+
findMagnetPoint(t, r, a) {
|
|
2290
|
+
let u;
|
|
2291
|
+
for (const p of t) {
|
|
2292
|
+
const y = dt(r), f = yt(r), s = new rt(p.x, p.y).mul({ x: y.width, y: y.height }).add(f), d = s.sub(a).length(), m = this.options.magnetRadius * this.ogma.view.getZoom();
|
|
2293
|
+
if (d < Math.max(m, this.options.magnetHandleRadius)) {
|
|
2294
|
+
u = {
|
|
2295
|
+
point: s,
|
|
2296
|
+
magnet: p
|
|
2288
2297
|
};
|
|
2289
2298
|
break;
|
|
2290
2299
|
}
|
|
2291
2300
|
}
|
|
2292
|
-
return
|
|
2301
|
+
return u;
|
|
2293
2302
|
}
|
|
2294
2303
|
/**
|
|
2295
2304
|
* Set the options for the controller
|
|
@@ -2307,23 +2316,23 @@ class Gn extends Fe {
|
|
|
2307
2316
|
* @param id the id of the annotation to select
|
|
2308
2317
|
*/
|
|
2309
2318
|
select(t) {
|
|
2310
|
-
const
|
|
2311
|
-
return
|
|
2319
|
+
const r = this.getAnnotations().features.find((a) => a.id === t);
|
|
2320
|
+
return r ? (ht(r) ? this.arrows.select(r.id) : wt(r) && this.texts.select(r.id), this) : this;
|
|
2312
2321
|
}
|
|
2313
2322
|
/**
|
|
2314
2323
|
* Unselects the currently selected annotation
|
|
2315
2324
|
*/
|
|
2316
2325
|
unselect() {
|
|
2317
|
-
return this.selected ? (
|
|
2326
|
+
return this.selected ? (ht(this.selected) ? this.arrows.unselect() : wt(this.selected) && this.texts.unselect(), this) : this;
|
|
2318
2327
|
}
|
|
2319
2328
|
/**
|
|
2320
2329
|
* Add an annotation to the controller
|
|
2321
2330
|
* @param annotation The annotation to add
|
|
2322
2331
|
*/
|
|
2323
2332
|
add(t) {
|
|
2324
|
-
if (
|
|
2333
|
+
if (ze(t))
|
|
2325
2334
|
return t.features.forEach(
|
|
2326
|
-
(
|
|
2335
|
+
(r) => this.add(r)
|
|
2327
2336
|
), this;
|
|
2328
2337
|
switch (t.properties.type) {
|
|
2329
2338
|
case "text":
|
|
@@ -2335,18 +2344,27 @@ class Gn extends Fe {
|
|
|
2335
2344
|
}
|
|
2336
2345
|
return this;
|
|
2337
2346
|
}
|
|
2347
|
+
/**
|
|
2348
|
+
* Remove an annotation or an array of annotations from the controller
|
|
2349
|
+
* @param annotation The annotation(s) to remove
|
|
2350
|
+
*/
|
|
2351
|
+
remove(t) {
|
|
2352
|
+
return ze(t) ? (t.features.forEach(
|
|
2353
|
+
(r) => this.remove(r)
|
|
2354
|
+
), this) : (ht(t) ? (this.links.remove(t, "start"), this.links.remove(t, "end"), this.arrows.remove(t.id)) : this.texts.remove(t.id), this);
|
|
2355
|
+
}
|
|
2338
2356
|
loadLink(t) {
|
|
2339
2357
|
if (t.properties.link)
|
|
2340
|
-
for (const
|
|
2341
|
-
const a = t.properties.link[
|
|
2358
|
+
for (const r of Le) {
|
|
2359
|
+
const a = t.properties.link[r];
|
|
2342
2360
|
if (!a)
|
|
2343
2361
|
continue;
|
|
2344
2362
|
if (this.getAnnotation(a.id))
|
|
2345
|
-
this.links.add(t,
|
|
2363
|
+
this.links.add(t, r, a.id, a.type, a.magnet);
|
|
2346
2364
|
else {
|
|
2347
2365
|
if (!this.ogma.getNode(a.id))
|
|
2348
2366
|
continue;
|
|
2349
|
-
this.links.add(t,
|
|
2367
|
+
this.links.add(t, r, a.id, a.type, a.magnet);
|
|
2350
2368
|
}
|
|
2351
2369
|
}
|
|
2352
2370
|
}
|
|
@@ -2356,8 +2374,8 @@ class Gn extends Fe {
|
|
|
2356
2374
|
* @param y coord of the first point
|
|
2357
2375
|
* @param arrow The arrow to add
|
|
2358
2376
|
*/
|
|
2359
|
-
startArrow(t,
|
|
2360
|
-
this.cancelDrawing(), this.arrows.startDrawing(t,
|
|
2377
|
+
startArrow(t, r, a) {
|
|
2378
|
+
this.cancelDrawing(), this.arrows.startDrawing(t, r, a);
|
|
2361
2379
|
}
|
|
2362
2380
|
/**
|
|
2363
2381
|
* Start adding a text (add it, and give control to the user)
|
|
@@ -2365,23 +2383,23 @@ class Gn extends Fe {
|
|
|
2365
2383
|
* @param y coord of the top left point
|
|
2366
2384
|
* @param text The text to add
|
|
2367
2385
|
*/
|
|
2368
|
-
startText(t,
|
|
2369
|
-
this.cancelDrawing(), this.texts.startDrawing(t,
|
|
2386
|
+
startText(t, r, a) {
|
|
2387
|
+
this.cancelDrawing(), this.texts.startDrawing(t, r, a);
|
|
2370
2388
|
}
|
|
2371
2389
|
/**
|
|
2372
2390
|
* Cancel drawing on the current frame
|
|
2373
2391
|
*/
|
|
2374
2392
|
cancelDrawing() {
|
|
2375
|
-
this.annotations.forEach((t) => t.cancelDrawing()), this.emit(
|
|
2393
|
+
this.annotations.forEach((t) => t.cancelDrawing()), this.emit(Pn);
|
|
2376
2394
|
}
|
|
2377
2395
|
/**
|
|
2378
2396
|
* Update the style of the annotation with the given id
|
|
2379
2397
|
* @param id The id of the annotation to update
|
|
2380
2398
|
* @param style The new style
|
|
2381
2399
|
*/
|
|
2382
|
-
updateStyle(t,
|
|
2383
|
-
const a = this.getAnnotations().features.find((
|
|
2384
|
-
return a ? (
|
|
2400
|
+
updateStyle(t, r) {
|
|
2401
|
+
const a = this.getAnnotations().features.find((u) => u.id === t);
|
|
2402
|
+
return a ? (ht(a) ? this.arrows.updateStyle(a, r) : wt(a) && this.texts.updateStyle(a, r), this.onUpdate(a), this) : this;
|
|
2385
2403
|
}
|
|
2386
2404
|
/**
|
|
2387
2405
|
*
|
|
@@ -2392,8 +2410,8 @@ class Gn extends Fe {
|
|
|
2392
2410
|
type: "FeatureCollection",
|
|
2393
2411
|
features: []
|
|
2394
2412
|
};
|
|
2395
|
-
return this.annotations.forEach((
|
|
2396
|
-
t.features = [...t.features, ...
|
|
2413
|
+
return this.annotations.forEach((r) => {
|
|
2414
|
+
t.features = [...t.features, ...r.getElements()];
|
|
2397
2415
|
}), t;
|
|
2398
2416
|
}
|
|
2399
2417
|
/**
|
|
@@ -2402,7 +2420,7 @@ class Gn extends Fe {
|
|
|
2402
2420
|
* @returns The annotation with the given id
|
|
2403
2421
|
*/
|
|
2404
2422
|
getAnnotation(t) {
|
|
2405
|
-
return this.getAnnotations().features.find((
|
|
2423
|
+
return this.getAnnotations().features.find((r) => r.id === t);
|
|
2406
2424
|
}
|
|
2407
2425
|
/**
|
|
2408
2426
|
* Destroy the controller and its elements
|
|
@@ -2412,34 +2430,34 @@ class Gn extends Fe {
|
|
|
2412
2430
|
}
|
|
2413
2431
|
}
|
|
2414
2432
|
export {
|
|
2415
|
-
|
|
2433
|
+
Rn as Arrows,
|
|
2416
2434
|
Gn as Control,
|
|
2417
|
-
|
|
2418
|
-
|
|
2435
|
+
Bn as Texts,
|
|
2436
|
+
Dn as createArrow,
|
|
2419
2437
|
It as createSVGElement,
|
|
2420
|
-
|
|
2421
|
-
|
|
2438
|
+
Fn as createText,
|
|
2439
|
+
Ee as defaultArrowOptions,
|
|
2422
2440
|
Dt as defaultArrowStyle,
|
|
2423
2441
|
De as defaultControllerOptions,
|
|
2424
|
-
|
|
2442
|
+
ne as defaultTextOptions,
|
|
2425
2443
|
bt as defaultTextStyle,
|
|
2426
2444
|
Xn as getAnnotationsBounds,
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2445
|
+
Rt as getArrowEnd,
|
|
2446
|
+
Ft as getArrowEndPoints,
|
|
2447
|
+
te as getArrowSide,
|
|
2430
2448
|
_t as getArrowStart,
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2449
|
+
ee as getAttachmentPointOnNode,
|
|
2450
|
+
Re as getHandleId,
|
|
2451
|
+
Pe as getTextBbox,
|
|
2434
2452
|
yt as getTextPosition,
|
|
2435
2453
|
dt as getTextSize,
|
|
2436
|
-
|
|
2437
|
-
|
|
2454
|
+
ze as isAnnotationCollection,
|
|
2455
|
+
ht as isArrow,
|
|
2438
2456
|
wt as isText,
|
|
2439
|
-
|
|
2440
|
-
|
|
2457
|
+
He as setArrowEnd,
|
|
2458
|
+
Nt as setArrowEndPoint,
|
|
2441
2459
|
Ne as setArrowStart,
|
|
2442
|
-
|
|
2460
|
+
zn as setTextBbox,
|
|
2443
2461
|
On as updateTextBbox
|
|
2444
2462
|
};
|
|
2445
2463
|
//# sourceMappingURL=index.mjs.map
|