@linkurious/ogma-annotations-react 1.1.14 → 1.1.16
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.js +15 -15
- package/dist/index.mjs +754 -728
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Cr, { createContext as Or, useContext as qr, useReducer as Yr, useState as Nt, useEffect as er } from "react";
|
|
2
|
-
import { useOgma as
|
|
3
|
-
var or = { exports: {} },
|
|
2
|
+
import { useOgma as Gr } from "@linkurious/ogma-react";
|
|
3
|
+
var or = { exports: {} }, he = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.min.js
|
|
@@ -11,22 +11,22 @@ var or = { exports: {} }, ue = {};
|
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
13
|
var dr;
|
|
14
|
-
function
|
|
14
|
+
function Xr() {
|
|
15
15
|
if (dr)
|
|
16
|
-
return
|
|
16
|
+
return he;
|
|
17
17
|
dr = 1;
|
|
18
|
-
var
|
|
19
|
-
function f(
|
|
18
|
+
var u = Cr, e = Symbol.for("react.element"), o = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, l = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
19
|
+
function f(g, d, v) {
|
|
20
20
|
var y, _ = {}, C = null, E = null;
|
|
21
21
|
v !== void 0 && (C = "" + v), d.key !== void 0 && (C = "" + d.key), d.ref !== void 0 && (E = d.ref);
|
|
22
22
|
for (y in d)
|
|
23
23
|
i.call(d, y) && !c.hasOwnProperty(y) && (_[y] = d[y]);
|
|
24
|
-
if (
|
|
25
|
-
for (y in d =
|
|
24
|
+
if (g && g.defaultProps)
|
|
25
|
+
for (y in d = g.defaultProps, d)
|
|
26
26
|
_[y] === void 0 && (_[y] = d[y]);
|
|
27
|
-
return { $$typeof: e, type:
|
|
27
|
+
return { $$typeof: e, type: g, key: C, ref: E, props: _, _owner: l.current };
|
|
28
28
|
}
|
|
29
|
-
return
|
|
29
|
+
return he.Fragment = o, he.jsx = f, he.jsxs = f, he;
|
|
30
30
|
}
|
|
31
31
|
var ce = {};
|
|
32
32
|
/**
|
|
@@ -41,48 +41,48 @@ var ce = {};
|
|
|
41
41
|
var fr;
|
|
42
42
|
function Jr() {
|
|
43
43
|
return fr || (fr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
44
|
-
var
|
|
44
|
+
var u = Cr, e = Symbol.for("react.element"), o = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), g = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), E = Symbol.for("react.offscreen"), P = Symbol.iterator, S = "@@iterator";
|
|
45
45
|
function $(t) {
|
|
46
46
|
if (t === null || typeof t != "object")
|
|
47
47
|
return null;
|
|
48
|
-
var
|
|
49
|
-
return typeof
|
|
48
|
+
var s = P && t[P] || t[S];
|
|
49
|
+
return typeof s == "function" ? s : null;
|
|
50
50
|
}
|
|
51
|
-
var L =
|
|
51
|
+
var L = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
52
52
|
function T(t) {
|
|
53
53
|
{
|
|
54
|
-
for (var
|
|
55
|
-
|
|
56
|
-
B("error", t,
|
|
54
|
+
for (var s = arguments.length, h = new Array(s > 1 ? s - 1 : 0), p = 1; p < s; p++)
|
|
55
|
+
h[p - 1] = arguments[p];
|
|
56
|
+
B("error", t, h);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function B(t,
|
|
59
|
+
function B(t, s, h) {
|
|
60
60
|
{
|
|
61
|
-
var
|
|
62
|
-
m !== "" && (
|
|
63
|
-
var w =
|
|
61
|
+
var p = L.ReactDebugCurrentFrame, m = p.getStackAddendum();
|
|
62
|
+
m !== "" && (s += "%s", h = h.concat([m]));
|
|
63
|
+
var w = h.map(function(b) {
|
|
64
64
|
return String(b);
|
|
65
65
|
});
|
|
66
|
-
w.unshift("Warning: " +
|
|
66
|
+
w.unshift("Warning: " + s), Function.prototype.apply.call(console[t], console, w);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
var N = !1, it = !1, xt = !1, qt = !1, Yt = !1, pe;
|
|
70
70
|
pe = Symbol.for("react.module.reference");
|
|
71
71
|
function Ot(t) {
|
|
72
|
-
return !!(typeof t == "string" || typeof t == "function" || t === i || t === c || Yt || t === l || t === v || t === y || qt || t === E || N || it || xt || typeof t == "object" && t !== null && (t.$$typeof === C || t.$$typeof === _ || t.$$typeof === f || t.$$typeof ===
|
|
72
|
+
return !!(typeof t == "string" || typeof t == "function" || t === i || t === c || Yt || t === l || t === v || t === y || qt || t === E || N || it || xt || typeof t == "object" && t !== null && (t.$$typeof === C || t.$$typeof === _ || t.$$typeof === f || t.$$typeof === g || t.$$typeof === d || // This needs to include all possible module reference object
|
|
73
73
|
// types supported by any Flight configuration anywhere since
|
|
74
74
|
// we don't know which Flight build this will end up being used
|
|
75
75
|
// with.
|
|
76
76
|
t.$$typeof === pe || t.getModuleId !== void 0));
|
|
77
77
|
}
|
|
78
|
-
function Pt(t,
|
|
79
|
-
var
|
|
80
|
-
if (
|
|
81
|
-
return
|
|
82
|
-
var m =
|
|
83
|
-
return m !== "" ?
|
|
78
|
+
function Pt(t, s, h) {
|
|
79
|
+
var p = t.displayName;
|
|
80
|
+
if (p)
|
|
81
|
+
return p;
|
|
82
|
+
var m = s.displayName || s.name || "";
|
|
83
|
+
return m !== "" ? h + "(" + m + ")" : h;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Gt(t) {
|
|
86
86
|
return t.displayName || "Context";
|
|
87
87
|
}
|
|
88
88
|
function tt(t) {
|
|
@@ -95,7 +95,7 @@ function Jr() {
|
|
|
95
95
|
switch (t) {
|
|
96
96
|
case i:
|
|
97
97
|
return "Fragment";
|
|
98
|
-
case
|
|
98
|
+
case o:
|
|
99
99
|
return "Portal";
|
|
100
100
|
case c:
|
|
101
101
|
return "Profiler";
|
|
@@ -108,17 +108,17 @@ function Jr() {
|
|
|
108
108
|
}
|
|
109
109
|
if (typeof t == "object")
|
|
110
110
|
switch (t.$$typeof) {
|
|
111
|
-
case
|
|
112
|
-
var
|
|
113
|
-
return
|
|
111
|
+
case g:
|
|
112
|
+
var s = t;
|
|
113
|
+
return Gt(s) + ".Consumer";
|
|
114
114
|
case f:
|
|
115
|
-
var
|
|
116
|
-
return
|
|
115
|
+
var h = t;
|
|
116
|
+
return Gt(h._context) + ".Provider";
|
|
117
117
|
case d:
|
|
118
118
|
return Pt(t, t.render, "ForwardRef");
|
|
119
119
|
case _:
|
|
120
|
-
var
|
|
121
|
-
return
|
|
120
|
+
var p = t.displayName || null;
|
|
121
|
+
return p !== null ? p : tt(t.type) || "Memo";
|
|
122
122
|
case C: {
|
|
123
123
|
var m = t, w = m._payload, b = m._init;
|
|
124
124
|
try {
|
|
@@ -130,14 +130,14 @@ function Jr() {
|
|
|
130
130
|
}
|
|
131
131
|
return null;
|
|
132
132
|
}
|
|
133
|
-
var D = Object.assign,
|
|
133
|
+
var D = Object.assign, lt = 0, G, ut, Rt, ye, Xt, ve, me;
|
|
134
134
|
function At() {
|
|
135
135
|
}
|
|
136
136
|
At.__reactDisabledLog = !0;
|
|
137
137
|
function be() {
|
|
138
138
|
{
|
|
139
|
-
if (
|
|
140
|
-
|
|
139
|
+
if (lt === 0) {
|
|
140
|
+
G = console.log, ut = console.info, Rt = console.warn, ye = console.error, Xt = console.group, ve = console.groupCollapsed, me = console.groupEnd;
|
|
141
141
|
var t = {
|
|
142
142
|
configurable: !0,
|
|
143
143
|
enumerable: !0,
|
|
@@ -154,12 +154,12 @@ function Jr() {
|
|
|
154
154
|
groupEnd: t
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
|
|
157
|
+
lt++;
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
function Ne() {
|
|
161
161
|
{
|
|
162
|
-
if (
|
|
162
|
+
if (lt--, lt === 0) {
|
|
163
163
|
var t = {
|
|
164
164
|
configurable: !0,
|
|
165
165
|
enumerable: !0,
|
|
@@ -167,10 +167,10 @@ function Jr() {
|
|
|
167
167
|
};
|
|
168
168
|
Object.defineProperties(console, {
|
|
169
169
|
log: D({}, t, {
|
|
170
|
-
value:
|
|
170
|
+
value: G
|
|
171
171
|
}),
|
|
172
172
|
info: D({}, t, {
|
|
173
|
-
value:
|
|
173
|
+
value: ut
|
|
174
174
|
}),
|
|
175
175
|
warn: D({}, t, {
|
|
176
176
|
value: Rt
|
|
@@ -179,7 +179,7 @@ function Jr() {
|
|
|
179
179
|
value: ye
|
|
180
180
|
}),
|
|
181
181
|
group: D({}, t, {
|
|
182
|
-
value:
|
|
182
|
+
value: Xt
|
|
183
183
|
}),
|
|
184
184
|
groupCollapsed: D({}, t, {
|
|
185
185
|
value: ve
|
|
@@ -189,18 +189,18 @@ function Jr() {
|
|
|
189
189
|
})
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
lt < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
var Jt = L.ReactCurrentDispatcher, Zt;
|
|
196
|
-
function It(t,
|
|
196
|
+
function It(t, s, h) {
|
|
197
197
|
{
|
|
198
198
|
if (Zt === void 0)
|
|
199
199
|
try {
|
|
200
200
|
throw Error();
|
|
201
201
|
} catch (m) {
|
|
202
|
-
var
|
|
203
|
-
Zt =
|
|
202
|
+
var p = m.stack.trim().match(/\n( *(at )?)/);
|
|
203
|
+
Zt = p && p[1] || "";
|
|
204
204
|
}
|
|
205
205
|
return `
|
|
206
206
|
` + Zt + t;
|
|
@@ -211,22 +211,22 @@ function Jr() {
|
|
|
211
211
|
var Be = typeof WeakMap == "function" ? WeakMap : Map;
|
|
212
212
|
Et = new Be();
|
|
213
213
|
}
|
|
214
|
-
function Qt(t,
|
|
214
|
+
function Qt(t, s) {
|
|
215
215
|
if (!t || Kt)
|
|
216
216
|
return "";
|
|
217
217
|
{
|
|
218
|
-
var
|
|
219
|
-
if (
|
|
220
|
-
return
|
|
218
|
+
var h = Et.get(t);
|
|
219
|
+
if (h !== void 0)
|
|
220
|
+
return h;
|
|
221
221
|
}
|
|
222
|
-
var
|
|
222
|
+
var p;
|
|
223
223
|
Kt = !0;
|
|
224
224
|
var m = Error.prepareStackTrace;
|
|
225
225
|
Error.prepareStackTrace = void 0;
|
|
226
226
|
var w;
|
|
227
227
|
w = Jt.current, Jt.current = null, be();
|
|
228
228
|
try {
|
|
229
|
-
if (
|
|
229
|
+
if (s) {
|
|
230
230
|
var b = function() {
|
|
231
231
|
throw Error();
|
|
232
232
|
};
|
|
@@ -238,14 +238,14 @@ function Jr() {
|
|
|
238
238
|
try {
|
|
239
239
|
Reflect.construct(b, []);
|
|
240
240
|
} catch (I) {
|
|
241
|
-
|
|
241
|
+
p = I;
|
|
242
242
|
}
|
|
243
243
|
Reflect.construct(t, [], b);
|
|
244
244
|
} else {
|
|
245
245
|
try {
|
|
246
246
|
b.call();
|
|
247
247
|
} catch (I) {
|
|
248
|
-
|
|
248
|
+
p = I;
|
|
249
249
|
}
|
|
250
250
|
t.call(b.prototype);
|
|
251
251
|
}
|
|
@@ -253,14 +253,14 @@ function Jr() {
|
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
255
|
} catch (I) {
|
|
256
|
-
|
|
256
|
+
p = I;
|
|
257
257
|
}
|
|
258
258
|
t();
|
|
259
259
|
}
|
|
260
260
|
} catch (I) {
|
|
261
|
-
if (I &&
|
|
261
|
+
if (I && p && typeof I.stack == "string") {
|
|
262
262
|
for (var A = I.stack.split(`
|
|
263
|
-
`), R =
|
|
263
|
+
`), R = p.stack.split(`
|
|
264
264
|
`), k = A.length - 1, O = R.length - 1; k >= 1 && O >= 0 && A[k] !== R[O]; )
|
|
265
265
|
O--;
|
|
266
266
|
for (; k >= 1 && O >= 0; k--, O--)
|
|
@@ -279,21 +279,21 @@ function Jr() {
|
|
|
279
279
|
} finally {
|
|
280
280
|
Kt = !1, Jt.current = w, Ne(), Error.prepareStackTrace = m;
|
|
281
281
|
}
|
|
282
|
-
var
|
|
282
|
+
var U = t ? t.displayName || t.name : "", M = U ? It(U) : "";
|
|
283
283
|
return typeof t == "function" && Et.set(t, M), M;
|
|
284
284
|
}
|
|
285
|
-
function He(t,
|
|
285
|
+
function He(t, s, h) {
|
|
286
286
|
return Qt(t, !1);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
289
|
-
var
|
|
290
|
-
return !!(
|
|
288
|
+
function Ue(t) {
|
|
289
|
+
var s = t.prototype;
|
|
290
|
+
return !!(s && s.isReactComponent);
|
|
291
291
|
}
|
|
292
|
-
function Lt(t,
|
|
292
|
+
function Lt(t, s, h) {
|
|
293
293
|
if (t == null)
|
|
294
294
|
return "";
|
|
295
295
|
if (typeof t == "function")
|
|
296
|
-
return Qt(t,
|
|
296
|
+
return Qt(t, Ue(t));
|
|
297
297
|
if (typeof t == "string")
|
|
298
298
|
return It(t);
|
|
299
299
|
switch (t) {
|
|
@@ -307,11 +307,11 @@ function Jr() {
|
|
|
307
307
|
case d:
|
|
308
308
|
return He(t.render);
|
|
309
309
|
case _:
|
|
310
|
-
return Lt(t.type,
|
|
310
|
+
return Lt(t.type, s, h);
|
|
311
311
|
case C: {
|
|
312
|
-
var
|
|
312
|
+
var p = t, m = p._payload, w = p._init;
|
|
313
313
|
try {
|
|
314
|
-
return Lt(w(m),
|
|
314
|
+
return Lt(w(m), s, h);
|
|
315
315
|
} catch {
|
|
316
316
|
}
|
|
317
317
|
}
|
|
@@ -321,12 +321,12 @@ function Jr() {
|
|
|
321
321
|
var _t = Object.prototype.hasOwnProperty, we = {}, xe = L.ReactDebugCurrentFrame;
|
|
322
322
|
function Ft(t) {
|
|
323
323
|
if (t) {
|
|
324
|
-
var
|
|
325
|
-
xe.setExtraStackFrame(
|
|
324
|
+
var s = t._owner, h = Lt(t.type, t._source, s ? s.type : null);
|
|
325
|
+
xe.setExtraStackFrame(h);
|
|
326
326
|
} else
|
|
327
327
|
xe.setExtraStackFrame(null);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function We(t, s, h, p, m) {
|
|
330
330
|
{
|
|
331
331
|
var w = Function.call.bind(_t);
|
|
332
332
|
for (var b in t)
|
|
@@ -334,14 +334,14 @@ function Jr() {
|
|
|
334
334
|
var A = void 0;
|
|
335
335
|
try {
|
|
336
336
|
if (typeof t[b] != "function") {
|
|
337
|
-
var R = Error((
|
|
337
|
+
var R = Error((p || "React class") + ": " + h + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
338
338
|
throw R.name = "Invariant Violation", R;
|
|
339
339
|
}
|
|
340
|
-
A = t[b](
|
|
340
|
+
A = t[b](s, b, p, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
341
341
|
} catch (k) {
|
|
342
342
|
A = k;
|
|
343
343
|
}
|
|
344
|
-
A && !(A instanceof Error) && (Ft(m), T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",
|
|
344
|
+
A && !(A instanceof Error) && (Ft(m), T("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", p || "React class", h, b, typeof A), Ft(null)), A instanceof Error && !(A.message in we) && (we[A.message] = !0, Ft(m), T("Failed %s type: %s", h, A.message), Ft(null));
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
}
|
|
@@ -351,8 +351,8 @@ function Jr() {
|
|
|
351
351
|
}
|
|
352
352
|
function H(t) {
|
|
353
353
|
{
|
|
354
|
-
var
|
|
355
|
-
return
|
|
354
|
+
var s = typeof Symbol == "function" && Symbol.toStringTag, h = s && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
355
|
+
return h;
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
function qe(t) {
|
|
@@ -378,56 +378,56 @@ function Jr() {
|
|
|
378
378
|
re = {};
|
|
379
379
|
function ne(t) {
|
|
380
380
|
if (_t.call(t, "ref")) {
|
|
381
|
-
var
|
|
382
|
-
if (
|
|
381
|
+
var s = Object.getOwnPropertyDescriptor(t, "ref").get;
|
|
382
|
+
if (s && s.isReactWarning)
|
|
383
383
|
return !1;
|
|
384
384
|
}
|
|
385
385
|
return t.ref !== void 0;
|
|
386
386
|
}
|
|
387
387
|
function Ye(t) {
|
|
388
388
|
if (_t.call(t, "key")) {
|
|
389
|
-
var
|
|
390
|
-
if (
|
|
389
|
+
var s = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
390
|
+
if (s && s.isReactWarning)
|
|
391
391
|
return !1;
|
|
392
392
|
}
|
|
393
393
|
return t.key !== void 0;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
if (typeof t.ref == "string" && ot.current &&
|
|
397
|
-
var
|
|
398
|
-
re[
|
|
395
|
+
function Ge(t, s) {
|
|
396
|
+
if (typeof t.ref == "string" && ot.current && s && ot.current.stateNode !== s) {
|
|
397
|
+
var h = tt(ot.current.type);
|
|
398
|
+
re[h] || (T('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', tt(ot.current.type), t.ref), re[h] = !0);
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function Xe(t, s) {
|
|
402
402
|
{
|
|
403
|
-
var
|
|
404
|
-
$t || ($t = !0, T("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",
|
|
403
|
+
var h = function() {
|
|
404
|
+
$t || ($t = !0, T("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s));
|
|
405
405
|
};
|
|
406
|
-
|
|
407
|
-
get:
|
|
406
|
+
h.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
407
|
+
get: h,
|
|
408
408
|
configurable: !0
|
|
409
409
|
});
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
function ie(t,
|
|
412
|
+
function ie(t, s) {
|
|
413
413
|
{
|
|
414
|
-
var
|
|
415
|
-
_e || (_e = !0, T("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",
|
|
414
|
+
var h = function() {
|
|
415
|
+
_e || (_e = !0, T("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", s));
|
|
416
416
|
};
|
|
417
|
-
|
|
418
|
-
get:
|
|
417
|
+
h.isReactWarning = !0, Object.defineProperty(t, "ref", {
|
|
418
|
+
get: h,
|
|
419
419
|
configurable: !0
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
var ke = function(t,
|
|
423
|
+
var ke = function(t, s, h, p, m, w, b) {
|
|
424
424
|
var A = {
|
|
425
425
|
// This tag allows us to uniquely identify this as a React Element
|
|
426
426
|
$$typeof: e,
|
|
427
427
|
// Built-in properties that belong on the element
|
|
428
428
|
type: t,
|
|
429
|
-
key:
|
|
430
|
-
ref:
|
|
429
|
+
key: s,
|
|
430
|
+
ref: h,
|
|
431
431
|
props: b,
|
|
432
432
|
// Record the component responsible for creating this element.
|
|
433
433
|
_owner: w
|
|
@@ -441,7 +441,7 @@ function Jr() {
|
|
|
441
441
|
configurable: !1,
|
|
442
442
|
enumerable: !1,
|
|
443
443
|
writable: !1,
|
|
444
|
-
value:
|
|
444
|
+
value: p
|
|
445
445
|
}), Object.defineProperty(A, "_source", {
|
|
446
446
|
configurable: !1,
|
|
447
447
|
enumerable: !1,
|
|
@@ -449,12 +449,12 @@ function Jr() {
|
|
|
449
449
|
value: m
|
|
450
450
|
}), Object.freeze && (Object.freeze(A.props), Object.freeze(A)), A;
|
|
451
451
|
};
|
|
452
|
-
function kt(t,
|
|
452
|
+
function kt(t, s, h, p, m) {
|
|
453
453
|
{
|
|
454
454
|
var w, b = {}, A = null, R = null;
|
|
455
|
-
|
|
456
|
-
for (w in
|
|
457
|
-
_t.call(
|
|
455
|
+
h !== void 0 && (ee(h), A = "" + h), Ye(s) && (ee(s.key), A = "" + s.key), ne(s) && (R = s.ref, Ge(s, m));
|
|
456
|
+
for (w in s)
|
|
457
|
+
_t.call(s, w) && !Ee.hasOwnProperty(w) && (b[w] = s[w]);
|
|
458
458
|
if (t && t.defaultProps) {
|
|
459
459
|
var k = t.defaultProps;
|
|
460
460
|
for (w in k)
|
|
@@ -462,21 +462,21 @@ function Jr() {
|
|
|
462
462
|
}
|
|
463
463
|
if (A || R) {
|
|
464
464
|
var O = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
|
|
465
|
-
A &&
|
|
465
|
+
A && Xe(b, O), R && ie(b, O);
|
|
466
466
|
}
|
|
467
|
-
return ke(t, A, R, m,
|
|
467
|
+
return ke(t, A, R, m, p, ot.current, b);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
var oe = L.ReactCurrentOwner, Te = L.ReactDebugCurrentFrame;
|
|
471
|
-
function
|
|
471
|
+
function ht(t) {
|
|
472
472
|
if (t) {
|
|
473
|
-
var
|
|
474
|
-
Te.setExtraStackFrame(
|
|
473
|
+
var s = t._owner, h = Lt(t.type, t._source, s ? s.type : null);
|
|
474
|
+
Te.setExtraStackFrame(h);
|
|
475
475
|
} else
|
|
476
476
|
Te.setExtraStackFrame(null);
|
|
477
477
|
}
|
|
478
|
-
var
|
|
479
|
-
|
|
478
|
+
var X;
|
|
479
|
+
X = !1;
|
|
480
480
|
function dt(t) {
|
|
481
481
|
return typeof t == "object" && t !== null && t.$$typeof === e;
|
|
482
482
|
}
|
|
@@ -495,10 +495,10 @@ Check the render method of \`` + t + "`.";
|
|
|
495
495
|
function Je(t) {
|
|
496
496
|
{
|
|
497
497
|
if (t !== void 0) {
|
|
498
|
-
var
|
|
498
|
+
var s = t.fileName.replace(/^.*[\\\/]/, ""), h = t.lineNumber;
|
|
499
499
|
return `
|
|
500
500
|
|
|
501
|
-
Check your code at ` +
|
|
501
|
+
Check your code at ` + s + ":" + h + ".";
|
|
502
502
|
}
|
|
503
503
|
return "";
|
|
504
504
|
}
|
|
@@ -506,37 +506,37 @@ Check your code at ` + o + ":" + u + ".";
|
|
|
506
506
|
var se = {};
|
|
507
507
|
function Se(t) {
|
|
508
508
|
{
|
|
509
|
-
var
|
|
510
|
-
if (!
|
|
511
|
-
var
|
|
512
|
-
|
|
509
|
+
var s = jt();
|
|
510
|
+
if (!s) {
|
|
511
|
+
var h = typeof t == "string" ? t : t.displayName || t.name;
|
|
512
|
+
h && (s = `
|
|
513
513
|
|
|
514
|
-
Check the top-level render call using <` +
|
|
514
|
+
Check the top-level render call using <` + h + ">.");
|
|
515
515
|
}
|
|
516
|
-
return
|
|
516
|
+
return s;
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
function Ce(t,
|
|
519
|
+
function Ce(t, s) {
|
|
520
520
|
{
|
|
521
521
|
if (!t._store || t._store.validated || t.key != null)
|
|
522
522
|
return;
|
|
523
523
|
t._store.validated = !0;
|
|
524
|
-
var
|
|
525
|
-
if (se[
|
|
524
|
+
var h = Se(s);
|
|
525
|
+
if (se[h])
|
|
526
526
|
return;
|
|
527
|
-
se[
|
|
528
|
-
var
|
|
529
|
-
t && t._owner && t._owner !== oe.current && (
|
|
527
|
+
se[h] = !0;
|
|
528
|
+
var p = "";
|
|
529
|
+
t && t._owner && t._owner !== oe.current && (p = " It was passed a child from " + tt(t._owner.type) + "."), ht(t), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', h, p), ht(null);
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
function Dt(t,
|
|
532
|
+
function Dt(t, s) {
|
|
533
533
|
{
|
|
534
534
|
if (typeof t != "object")
|
|
535
535
|
return;
|
|
536
536
|
if (te(t))
|
|
537
|
-
for (var
|
|
538
|
-
var
|
|
539
|
-
dt(
|
|
537
|
+
for (var h = 0; h < t.length; h++) {
|
|
538
|
+
var p = t[h];
|
|
539
|
+
dt(p) && Ce(p, s);
|
|
540
540
|
}
|
|
541
541
|
else if (dt(t))
|
|
542
542
|
t._store && (t._store.validated = !0);
|
|
@@ -544,48 +544,48 @@ Check the top-level render call using <` + u + ">.");
|
|
|
544
544
|
var m = $(t);
|
|
545
545
|
if (typeof m == "function" && m !== t.entries)
|
|
546
546
|
for (var w = m.call(t), b; !(b = w.next()).done; )
|
|
547
|
-
dt(b.value) && Ce(b.value,
|
|
547
|
+
dt(b.value) && Ce(b.value, s);
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
551
|
function Ze(t) {
|
|
552
552
|
{
|
|
553
|
-
var
|
|
554
|
-
if (
|
|
553
|
+
var s = t.type;
|
|
554
|
+
if (s == null || typeof s == "string")
|
|
555
555
|
return;
|
|
556
|
-
var
|
|
557
|
-
if (typeof
|
|
558
|
-
|
|
559
|
-
else if (typeof
|
|
556
|
+
var h;
|
|
557
|
+
if (typeof s == "function")
|
|
558
|
+
h = s.propTypes;
|
|
559
|
+
else if (typeof s == "object" && (s.$$typeof === d || // Note: Memo only checks outer props here.
|
|
560
560
|
// Inner props are checked in the reconciler.
|
|
561
|
-
|
|
562
|
-
|
|
561
|
+
s.$$typeof === _))
|
|
562
|
+
h = s.propTypes;
|
|
563
563
|
else
|
|
564
564
|
return;
|
|
565
|
-
if (
|
|
566
|
-
var
|
|
567
|
-
|
|
568
|
-
} else if (
|
|
569
|
-
|
|
570
|
-
var m = tt(
|
|
565
|
+
if (h) {
|
|
566
|
+
var p = tt(s);
|
|
567
|
+
We(h, t.props, "prop", p, t);
|
|
568
|
+
} else if (s.PropTypes !== void 0 && !X) {
|
|
569
|
+
X = !0;
|
|
570
|
+
var m = tt(s);
|
|
571
571
|
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown");
|
|
572
572
|
}
|
|
573
|
-
typeof
|
|
573
|
+
typeof s.getDefaultProps == "function" && !s.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
function Oe(t) {
|
|
577
577
|
{
|
|
578
|
-
for (var
|
|
579
|
-
var
|
|
580
|
-
if (
|
|
581
|
-
|
|
578
|
+
for (var s = Object.keys(t.props), h = 0; h < s.length; h++) {
|
|
579
|
+
var p = s[h];
|
|
580
|
+
if (p !== "children" && p !== "key") {
|
|
581
|
+
ht(t), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), ht(null);
|
|
582
582
|
break;
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
|
-
t.ref !== null && (
|
|
585
|
+
t.ref !== null && (ht(t), T("Invalid attribute `ref` supplied to `React.Fragment`."), ht(null));
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
function ae(t,
|
|
588
|
+
function ae(t, s, h, p, m, w) {
|
|
589
589
|
{
|
|
590
590
|
var b = Ot(t);
|
|
591
591
|
if (!b) {
|
|
@@ -596,16 +596,16 @@ Check the top-level render call using <` + u + ">.");
|
|
|
596
596
|
var k;
|
|
597
597
|
t === null ? k = "null" : te(t) ? k = "array" : t !== void 0 && t.$$typeof === e ? (k = "<" + (tt(t.type) || "Unknown") + " />", A = " Did you accidentally export a JSX literal instead of a component?") : k = typeof t, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", k, A);
|
|
598
598
|
}
|
|
599
|
-
var O = kt(t,
|
|
599
|
+
var O = kt(t, s, h, m, w);
|
|
600
600
|
if (O == null)
|
|
601
601
|
return O;
|
|
602
602
|
if (b) {
|
|
603
|
-
var j =
|
|
603
|
+
var j = s.children;
|
|
604
604
|
if (j !== void 0)
|
|
605
|
-
if (
|
|
605
|
+
if (p)
|
|
606
606
|
if (te(j)) {
|
|
607
|
-
for (var
|
|
608
|
-
Dt(j[
|
|
607
|
+
for (var U = 0; U < j.length; U++)
|
|
608
|
+
Dt(j[U], t);
|
|
609
609
|
Object.freeze && Object.freeze(j);
|
|
610
610
|
} else
|
|
611
611
|
T("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
@@ -615,19 +615,19 @@ Check the top-level render call using <` + u + ">.");
|
|
|
615
615
|
return t === i ? Oe(O) : Ze(O), O;
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
function Ke(t,
|
|
619
|
-
return ae(t,
|
|
618
|
+
function Ke(t, s, h) {
|
|
619
|
+
return ae(t, s, h, !0);
|
|
620
620
|
}
|
|
621
|
-
function r(t,
|
|
622
|
-
return ae(t,
|
|
621
|
+
function r(t, s, h) {
|
|
622
|
+
return ae(t, s, h, !1);
|
|
623
623
|
}
|
|
624
624
|
var n = r, a = Ke;
|
|
625
625
|
ce.Fragment = i, ce.jsx = n, ce.jsxs = a;
|
|
626
626
|
}()), ce;
|
|
627
627
|
}
|
|
628
|
-
process.env.NODE_ENV === "production" ? or.exports =
|
|
629
|
-
var Zr = or.exports, Kr = Object.defineProperty, Qr = (
|
|
630
|
-
let ze = (
|
|
628
|
+
process.env.NODE_ENV === "production" ? or.exports = Xr() : or.exports = Jr();
|
|
629
|
+
var Zr = or.exports, Kr = Object.defineProperty, Qr = (u, e, o) => e in u ? Kr(u, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : u[e] = o, x = (u, e, o) => (Qr(u, typeof e != "symbol" ? e + "" : e, o), o);
|
|
630
|
+
let ze = (u = 21) => crypto.getRandomValues(new Uint8Array(u)).reduce((e, o) => (o &= 63, o < 36 ? e += o.toString(36) : o < 62 ? e += (o - 26).toString(36).toUpperCase() : o > 62 ? e += "-" : e += "_", e), "");
|
|
631
631
|
const ge = {
|
|
632
632
|
strokeType: "plain",
|
|
633
633
|
strokeColor: "black",
|
|
@@ -660,7 +660,7 @@ const ge = {
|
|
|
660
660
|
// tail: 'arrow-plain',
|
|
661
661
|
// start: { x: 0, y: 0 },
|
|
662
662
|
// end: { x: 100, y: 100 }
|
|
663
|
-
}, tn = (
|
|
663
|
+
}, tn = (u = 0, e = 0, o = 0, i = 0, l = { ...ge }) => ({
|
|
664
664
|
id: ze(),
|
|
665
665
|
type: "Feature",
|
|
666
666
|
properties: {
|
|
@@ -673,170 +673,186 @@ const ge = {
|
|
|
673
673
|
geometry: {
|
|
674
674
|
type: "LineString",
|
|
675
675
|
coordinates: [
|
|
676
|
-
[
|
|
677
|
-
[
|
|
676
|
+
[u, e],
|
|
677
|
+
[o, i]
|
|
678
678
|
]
|
|
679
679
|
}
|
|
680
680
|
}), en = "http://www.w3.org/2000/svg";
|
|
681
|
-
function de(
|
|
682
|
-
return document.createElementNS(en,
|
|
681
|
+
function de(u) {
|
|
682
|
+
return document.createElementNS(en, u);
|
|
683
683
|
}
|
|
684
|
-
function Pr(
|
|
685
|
-
return
|
|
684
|
+
function Pr(u) {
|
|
685
|
+
return u.geometry.bbox || rn(u), u.geometry.bbox;
|
|
686
686
|
}
|
|
687
|
-
function
|
|
688
|
-
const e = Pr(
|
|
687
|
+
function mt(u) {
|
|
688
|
+
const e = Pr(u);
|
|
689
689
|
return {
|
|
690
690
|
width: e[2] - e[0],
|
|
691
691
|
height: e[3] - e[1]
|
|
692
692
|
};
|
|
693
693
|
}
|
|
694
|
-
function
|
|
695
|
-
const e = Pr(
|
|
694
|
+
function vt(u) {
|
|
695
|
+
const e = Pr(u);
|
|
696
696
|
return { x: e[0], y: e[1] };
|
|
697
697
|
}
|
|
698
|
-
function rn(
|
|
699
|
-
const [e,
|
|
700
|
-
|
|
698
|
+
function rn(u) {
|
|
699
|
+
const [e, o] = u.geometry.coordinates[0][0], [i, l] = u.geometry.coordinates[0][2];
|
|
700
|
+
u.geometry.bbox = [e, o, i, l];
|
|
701
701
|
}
|
|
702
|
-
function nn(
|
|
703
|
-
|
|
702
|
+
function nn(u, e, o, i, l) {
|
|
703
|
+
u.geometry.bbox = [e, o, e + i, o + l], u.geometry.coordinates = [
|
|
704
704
|
[
|
|
705
|
-
[e,
|
|
706
|
-
[e + i,
|
|
707
|
-
[e + i,
|
|
708
|
-
[e,
|
|
709
|
-
[e,
|
|
705
|
+
[e, o],
|
|
706
|
+
[e + i, o],
|
|
707
|
+
[e + i, o + l],
|
|
708
|
+
[e, o + l],
|
|
709
|
+
[e, o]
|
|
710
710
|
]
|
|
711
711
|
];
|
|
712
712
|
}
|
|
713
|
-
function fe(
|
|
714
|
-
const [e,
|
|
715
|
-
return { x: e, y:
|
|
713
|
+
function fe(u) {
|
|
714
|
+
const [e, o] = u.geometry.coordinates[0];
|
|
715
|
+
return { x: e, y: o };
|
|
716
716
|
}
|
|
717
|
-
function Ie(
|
|
718
|
-
const [
|
|
719
|
-
return { x:
|
|
717
|
+
function Ie(u, e) {
|
|
718
|
+
const [o, i] = u.geometry.coordinates[e === "start" ? 0 : 1];
|
|
719
|
+
return { x: o, y: i };
|
|
720
720
|
}
|
|
721
|
-
function $e(
|
|
722
|
-
const [e,
|
|
723
|
-
return { x: e, y:
|
|
721
|
+
function $e(u) {
|
|
722
|
+
const [e, o] = u.geometry.coordinates[1];
|
|
723
|
+
return { x: e, y: o };
|
|
724
724
|
}
|
|
725
|
-
function Rr(
|
|
726
|
-
|
|
725
|
+
function Rr(u, e, o) {
|
|
726
|
+
u.geometry.coordinates[0] = [e, o];
|
|
727
727
|
}
|
|
728
|
-
function Ir(
|
|
729
|
-
|
|
728
|
+
function Ir(u, e, o) {
|
|
729
|
+
u.geometry.coordinates[1] = [e, o];
|
|
730
730
|
}
|
|
731
|
-
function je(
|
|
732
|
-
return { start: fe(
|
|
731
|
+
function je(u) {
|
|
732
|
+
return { start: fe(u), end: $e(u) };
|
|
733
733
|
}
|
|
734
|
-
function Bt(
|
|
735
|
-
e === "start" ? Rr(
|
|
734
|
+
function Bt(u, e, o, i) {
|
|
735
|
+
e === "start" ? Rr(u, o, i) : Ir(u, o, i);
|
|
736
736
|
}
|
|
737
|
-
const Lr = (
|
|
738
|
-
function
|
|
739
|
-
|
|
737
|
+
const Lr = (u) => parseInt(u.getAttribute("data-handle-id") || "-1");
|
|
738
|
+
function on(u) {
|
|
739
|
+
return Array.isArray(u) && u.length === 2 && u.every(isFinite);
|
|
740
|
+
}
|
|
741
|
+
function sn(u, e, o, i) {
|
|
742
|
+
for (let l = 0; l < u.coordinates.length; l++) {
|
|
743
|
+
const c = u.coordinates[l];
|
|
744
|
+
if (on(c))
|
|
745
|
+
c[0] = o + (c[0] - o) * e, c[1] = i + (c[1] - i) * e;
|
|
746
|
+
else
|
|
747
|
+
for (let f = 0; f < c.length; f++) {
|
|
748
|
+
const g = c[f];
|
|
749
|
+
g[0] = o + (g[0] - o) * e, g[1] = i + (g[1] - i) * e;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
return u;
|
|
753
|
+
}
|
|
754
|
+
function Le(u, e, o) {
|
|
755
|
+
const i = Math.atan2(u.y - e.y, u.x - e.x);
|
|
740
756
|
return {
|
|
741
|
-
x: e.x +
|
|
742
|
-
y: e.y +
|
|
757
|
+
x: e.x + o * Math.cos(i),
|
|
758
|
+
y: e.y + o * Math.sin(i)
|
|
743
759
|
};
|
|
744
760
|
}
|
|
745
|
-
function sr(
|
|
761
|
+
function sr(u, e) {
|
|
746
762
|
if (!e)
|
|
747
|
-
return { x:
|
|
748
|
-
const
|
|
763
|
+
return { x: u.clientX, y: u.clientY };
|
|
764
|
+
const o = e.getBoundingClientRect();
|
|
749
765
|
return {
|
|
750
|
-
x:
|
|
751
|
-
y:
|
|
766
|
+
x: u.clientX - o.left - e.clientLeft,
|
|
767
|
+
y: u.clientY - o.top - e.clientTop
|
|
752
768
|
};
|
|
753
769
|
}
|
|
754
|
-
const Ct = (
|
|
755
|
-
x:
|
|
756
|
-
y:
|
|
757
|
-
}),
|
|
758
|
-
x: -
|
|
759
|
-
y: -
|
|
760
|
-
}), $r = (
|
|
761
|
-
const e =
|
|
770
|
+
const Ct = (u, e) => ({
|
|
771
|
+
x: u.x - e.x,
|
|
772
|
+
y: u.y - e.y
|
|
773
|
+
}), Ut = (u) => Math.sqrt(u.x * u.x + u.y * u.y), Fr = (u) => ({
|
|
774
|
+
x: -u.x,
|
|
775
|
+
y: -u.y
|
|
776
|
+
}), $r = (u) => {
|
|
777
|
+
const e = Ut(u);
|
|
762
778
|
return e === 0 ? { x: 0, y: 0 } : {
|
|
763
|
-
x:
|
|
764
|
-
y:
|
|
779
|
+
x: u.x / e,
|
|
780
|
+
y: u.y / e
|
|
765
781
|
};
|
|
766
|
-
}, Ht = (
|
|
767
|
-
x:
|
|
768
|
-
y:
|
|
769
|
-
}), jr = (
|
|
770
|
-
x:
|
|
771
|
-
y:
|
|
772
|
-
}), Fe = (
|
|
773
|
-
x:
|
|
774
|
-
y:
|
|
775
|
-
}),
|
|
776
|
-
const
|
|
782
|
+
}, Ht = (u, e) => ({
|
|
783
|
+
x: u.x + e.x,
|
|
784
|
+
y: u.y + e.y
|
|
785
|
+
}), jr = (u, e) => ({
|
|
786
|
+
x: u.x * e,
|
|
787
|
+
y: u.y * e
|
|
788
|
+
}), Fe = (u, e) => ({
|
|
789
|
+
x: u.x * e.x,
|
|
790
|
+
y: u.y * e.y
|
|
791
|
+
}), at = (u, e) => {
|
|
792
|
+
const o = Math.sin(e), i = Math.cos(e);
|
|
777
793
|
return {
|
|
778
|
-
x:
|
|
779
|
-
y:
|
|
794
|
+
x: u.x * i - u.y * o,
|
|
795
|
+
y: u.x * o + u.y * i
|
|
780
796
|
};
|
|
781
|
-
},
|
|
782
|
-
x:
|
|
783
|
-
y:
|
|
784
|
-
}), pr = (
|
|
785
|
-
function Dr(
|
|
797
|
+
}, an = (u, e) => ({
|
|
798
|
+
x: u.x / e,
|
|
799
|
+
y: u.y / e
|
|
800
|
+
}), pr = (u, e) => u.x * e.x + u.y * e.y;
|
|
801
|
+
function Dr(u, e = 5, o = 30) {
|
|
786
802
|
var i;
|
|
787
|
-
const { start: l, end: c } = je(
|
|
788
|
-
return Math.min(
|
|
803
|
+
const { start: l, end: c } = je(u), f = Ct(c, l), g = u.properties.style && u.properties.style.strokeWidth ? (i = u.properties.style) == null ? void 0 : i.strokeWidth : 0;
|
|
804
|
+
return Math.min(o, Math.max(3 * g, Ut(f) * 0.1, e));
|
|
789
805
|
}
|
|
790
|
-
function yr(
|
|
806
|
+
function yr(u, e, o, i) {
|
|
791
807
|
const l = jr(Fr($r(e)), i);
|
|
792
|
-
if (!
|
|
808
|
+
if (!o || o === "none")
|
|
793
809
|
return "";
|
|
794
|
-
const c = Ht(
|
|
795
|
-
return `M ${c.x} ${c.y} L ${
|
|
810
|
+
const c = Ht(u, at(l, Math.PI / 8)), f = Ht(u, at(l, -Math.PI / 8)), g = `${u.x} ${u.y}`;
|
|
811
|
+
return `M ${c.x} ${c.y} L ${g} ${f.x} ${f.y} ${o === "arrow" ? "" : `${c.x} ${c.y}`}`;
|
|
796
812
|
}
|
|
797
|
-
function
|
|
798
|
-
const { start: c, end: f } = je(
|
|
799
|
-
E.setAttribute("data-annotation", `${
|
|
800
|
-
const P = d === "arrow-plain" ||
|
|
813
|
+
function ln(u, e, o, i, l) {
|
|
814
|
+
const { start: c, end: f } = je(u), { tail: g, head: d, strokeColor: v, strokeWidth: y } = u.properties.style || o, _ = Ct(f, c), C = Dr(u, i, l), E = de("path");
|
|
815
|
+
E.setAttribute("data-annotation", `${u.id}`), E.setAttribute("data-annotation-type", "arrow");
|
|
816
|
+
const P = d === "arrow-plain" || g === "arrow";
|
|
801
817
|
E.setAttribute("stroke", v || "none"), E.setAttribute("stroke-width", `${y}`), E.setAttribute("fill", P ? v || "" : "none"), E.setAttribute("stroke-linecap", "round"), E.setAttribute("stroke-linejoin", "round");
|
|
802
|
-
const S = yr(c, Fr(_),
|
|
818
|
+
const S = yr(c, Fr(_), g, C), $ = yr(f, _, d, C), L = S + `M ${c.x} ${c.y} ${f.x} ${f.y}` + $;
|
|
803
819
|
E.setAttribute("d", L), e.appendChild(E);
|
|
804
820
|
}
|
|
805
|
-
const Y = -1, De = "dragging", Me = "dragstart", Vt = "dragend", ar = "select", lr = "unselect",
|
|
806
|
-
var
|
|
807
|
-
function Mr(
|
|
808
|
-
return
|
|
821
|
+
const Y = -1, De = "dragging", Me = "dragstart", Vt = "dragend", ar = "select", lr = "unselect", un = "hover", hn = "unhover", ur = "remove", hr = "add", cn = "cancelDrawing", cr = "update", dn = "link";
|
|
822
|
+
var fn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
823
|
+
function Mr(u) {
|
|
824
|
+
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
809
825
|
}
|
|
810
826
|
var zr = { exports: {} };
|
|
811
|
-
(function(
|
|
812
|
-
var e = Object.prototype.hasOwnProperty,
|
|
827
|
+
(function(u) {
|
|
828
|
+
var e = Object.prototype.hasOwnProperty, o = "~";
|
|
813
829
|
function i() {
|
|
814
830
|
}
|
|
815
|
-
Object.create && (i.prototype = /* @__PURE__ */ Object.create(null), new i().__proto__ || (
|
|
831
|
+
Object.create && (i.prototype = /* @__PURE__ */ Object.create(null), new i().__proto__ || (o = !1));
|
|
816
832
|
function l(d, v, y) {
|
|
817
833
|
this.fn = d, this.context = v, this.once = y || !1;
|
|
818
834
|
}
|
|
819
835
|
function c(d, v, y, _, C) {
|
|
820
836
|
if (typeof y != "function")
|
|
821
837
|
throw new TypeError("The listener must be a function");
|
|
822
|
-
var E = new l(y, _ || d, C), P =
|
|
838
|
+
var E = new l(y, _ || d, C), P = o ? o + v : v;
|
|
823
839
|
return d._events[P] ? d._events[P].fn ? d._events[P] = [d._events[P], E] : d._events[P].push(E) : (d._events[P] = E, d._eventsCount++), d;
|
|
824
840
|
}
|
|
825
841
|
function f(d, v) {
|
|
826
842
|
--d._eventsCount === 0 ? d._events = new i() : delete d._events[v];
|
|
827
843
|
}
|
|
828
|
-
function
|
|
844
|
+
function g() {
|
|
829
845
|
this._events = new i(), this._eventsCount = 0;
|
|
830
846
|
}
|
|
831
|
-
|
|
847
|
+
g.prototype.eventNames = function() {
|
|
832
848
|
var d = [], v, y;
|
|
833
849
|
if (this._eventsCount === 0)
|
|
834
850
|
return d;
|
|
835
851
|
for (y in v = this._events)
|
|
836
|
-
e.call(v, y) && d.push(
|
|
852
|
+
e.call(v, y) && d.push(o ? y.slice(1) : y);
|
|
837
853
|
return Object.getOwnPropertySymbols ? d.concat(Object.getOwnPropertySymbols(v)) : d;
|
|
838
|
-
},
|
|
839
|
-
var v =
|
|
854
|
+
}, g.prototype.listeners = function(d) {
|
|
855
|
+
var v = o ? o + d : d, y = this._events[v];
|
|
840
856
|
if (!y)
|
|
841
857
|
return [];
|
|
842
858
|
if (y.fn)
|
|
@@ -844,11 +860,11 @@ var zr = { exports: {} };
|
|
|
844
860
|
for (var _ = 0, C = y.length, E = new Array(C); _ < C; _++)
|
|
845
861
|
E[_] = y[_].fn;
|
|
846
862
|
return E;
|
|
847
|
-
},
|
|
848
|
-
var v =
|
|
863
|
+
}, g.prototype.listenerCount = function(d) {
|
|
864
|
+
var v = o ? o + d : d, y = this._events[v];
|
|
849
865
|
return y ? y.fn ? 1 : y.length : 0;
|
|
850
|
-
},
|
|
851
|
-
var P =
|
|
866
|
+
}, g.prototype.emit = function(d, v, y, _, C, E) {
|
|
867
|
+
var P = o ? o + d : d;
|
|
852
868
|
if (!this._events[P])
|
|
853
869
|
return !1;
|
|
854
870
|
var S = this._events[P], $ = arguments.length, L, T;
|
|
@@ -894,12 +910,12 @@ var zr = { exports: {} };
|
|
|
894
910
|
}
|
|
895
911
|
}
|
|
896
912
|
return !0;
|
|
897
|
-
},
|
|
913
|
+
}, g.prototype.on = function(d, v, y) {
|
|
898
914
|
return c(this, d, v, y, !1);
|
|
899
|
-
},
|
|
915
|
+
}, g.prototype.once = function(d, v, y) {
|
|
900
916
|
return c(this, d, v, y, !0);
|
|
901
|
-
},
|
|
902
|
-
var C =
|
|
917
|
+
}, g.prototype.removeListener = function(d, v, y, _) {
|
|
918
|
+
var C = o ? o + d : d;
|
|
903
919
|
if (!this._events[C])
|
|
904
920
|
return this;
|
|
905
921
|
if (!v)
|
|
@@ -913,15 +929,15 @@ var zr = { exports: {} };
|
|
|
913
929
|
S.length ? this._events[C] = S.length === 1 ? S[0] : S : f(this, C);
|
|
914
930
|
}
|
|
915
931
|
return this;
|
|
916
|
-
},
|
|
932
|
+
}, g.prototype.removeAllListeners = function(d) {
|
|
917
933
|
var v;
|
|
918
|
-
return d ? (v =
|
|
919
|
-
},
|
|
934
|
+
return d ? (v = o ? o + d : d, this._events[v] && f(this, v)) : (this._events = new i(), this._eventsCount = 0), this;
|
|
935
|
+
}, g.prototype.off = g.prototype.removeListener, g.prototype.addListener = g.prototype.on, g.prefixed = o, g.EventEmitter = g, u.exports = g;
|
|
920
936
|
})(zr);
|
|
921
|
-
var
|
|
922
|
-
const Nr = /* @__PURE__ */ Mr(
|
|
937
|
+
var gn = zr.exports;
|
|
938
|
+
const Nr = /* @__PURE__ */ Mr(gn);
|
|
923
939
|
class Br extends Nr {
|
|
924
|
-
constructor(e,
|
|
940
|
+
constructor(e, o) {
|
|
925
941
|
super(), x(this, "ogma"), x(this, "elements"), x(this, "layer"), x(this, "editor"), x(this, "selectedId", Y), x(this, "hoveredId", Y), x(this, "ogmaOptions"), x(this, "shouldDetect"), x(this, "isDragging"), x(this, "showeditorOnHover"), x(this, "_onKeyUp", (i) => {
|
|
926
942
|
i.code === 27 && this.selectedId !== Y ? this.unselect() : (i.code === 46 || i.code === 8) && this.selectedId !== Y && this._canRemove() && this.remove(this.selectedId);
|
|
927
943
|
}), x(this, "_onClickMouseMove", (i) => {
|
|
@@ -933,7 +949,7 @@ class Br extends Nr {
|
|
|
933
949
|
this.refreshEditor(), this.refreshDrawing();
|
|
934
950
|
}), this.layer = e.layers.addSVGLayer({
|
|
935
951
|
draw: (i) => this.draw(i)
|
|
936
|
-
}), this.layer.moveToTop(), this.editor = e.layers.addLayer(
|
|
952
|
+
}), this.layer.moveToTop(), this.editor = e.layers.addLayer(o), this.editor.hide();
|
|
937
953
|
}
|
|
938
954
|
_canRemove() {
|
|
939
955
|
return !0;
|
|
@@ -944,52 +960,58 @@ class Br extends Nr {
|
|
|
944
960
|
* @returns the added annotation
|
|
945
961
|
*/
|
|
946
962
|
add(e) {
|
|
947
|
-
const
|
|
963
|
+
const o = this.getDefaultOptions(), i = Object.assign(e, {
|
|
948
964
|
id: e.id === void 0 ? ze() : e.id,
|
|
949
965
|
type: e.type,
|
|
950
966
|
properties: {
|
|
951
|
-
...
|
|
967
|
+
...o.properties,
|
|
952
968
|
...e.properties || {},
|
|
953
969
|
// styles need to be merged
|
|
954
|
-
style: { ...
|
|
970
|
+
style: { ...o.properties.style, ...e.properties.style || {} }
|
|
955
971
|
},
|
|
956
972
|
geometry: {
|
|
957
|
-
...
|
|
973
|
+
...o.geometry,
|
|
958
974
|
...e.geometry
|
|
959
975
|
}
|
|
960
976
|
});
|
|
961
|
-
return this.elements.push(i), this.layer.refresh(), this.emit(
|
|
977
|
+
return this.elements.push(i), this.layer.refresh(), this.emit(hr, i), i;
|
|
962
978
|
}
|
|
963
|
-
updateStyle(e,
|
|
979
|
+
updateStyle(e, o) {
|
|
964
980
|
this.updateAnnotation(e, {
|
|
965
981
|
properties: {
|
|
966
|
-
style:
|
|
982
|
+
style: o
|
|
967
983
|
}
|
|
968
984
|
});
|
|
969
985
|
}
|
|
970
|
-
updateGeometry(e,
|
|
986
|
+
updateGeometry(e, o) {
|
|
971
987
|
this.updateAnnotation(e, {
|
|
972
|
-
geometry:
|
|
988
|
+
geometry: o
|
|
973
989
|
});
|
|
974
990
|
}
|
|
991
|
+
scale(e, o, i, l) {
|
|
992
|
+
this.updateGeometry(
|
|
993
|
+
e,
|
|
994
|
+
sn(e.geometry, o, i, l)
|
|
995
|
+
);
|
|
996
|
+
}
|
|
975
997
|
/**
|
|
976
998
|
* @method update
|
|
977
999
|
* Updates an annotation (position, color etc)
|
|
978
1000
|
* @param id Id of the annotation to update
|
|
979
1001
|
* @param element params of the annotation
|
|
980
1002
|
*/
|
|
981
|
-
update(e,
|
|
1003
|
+
update(e, o) {
|
|
982
1004
|
const i = this.getById(e);
|
|
983
|
-
this.updateAnnotation(i,
|
|
1005
|
+
this.updateAnnotation(i, o);
|
|
984
1006
|
}
|
|
985
|
-
updateAnnotation(e,
|
|
1007
|
+
updateAnnotation(e, o) {
|
|
986
1008
|
if (!e)
|
|
987
1009
|
return;
|
|
988
1010
|
const i = e.id;
|
|
989
|
-
Object.keys(
|
|
1011
|
+
Object.keys(o).forEach((l) => {
|
|
990
1012
|
if (l !== "id")
|
|
991
1013
|
if (l === "properties") {
|
|
992
|
-
const c =
|
|
1014
|
+
const c = o.properties || { style: {} };
|
|
993
1015
|
e.properties = {
|
|
994
1016
|
...e.properties || {},
|
|
995
1017
|
...c || {},
|
|
@@ -1001,15 +1023,15 @@ class Br extends Nr {
|
|
|
1001
1023
|
} else
|
|
1002
1024
|
l === "geometry" ? e.geometry = {
|
|
1003
1025
|
...e.geometry,
|
|
1004
|
-
...
|
|
1005
|
-
} : e[l] =
|
|
1026
|
+
...o.geometry
|
|
1027
|
+
} : e[l] = o[l];
|
|
1006
1028
|
}), i === this.selectedId && this.refreshEditor(), this.layer.refresh();
|
|
1007
1029
|
}
|
|
1008
1030
|
getById(e) {
|
|
1009
|
-
const
|
|
1031
|
+
const o = Number(e);
|
|
1010
1032
|
for (let i = 0; i < this.elements.length; i++) {
|
|
1011
1033
|
const l = this.elements[i];
|
|
1012
|
-
if (!(l.id !== e && l.id !==
|
|
1034
|
+
if (!(l.id !== e && l.id !== o))
|
|
1013
1035
|
return l;
|
|
1014
1036
|
}
|
|
1015
1037
|
}
|
|
@@ -1019,12 +1041,12 @@ class Br extends Nr {
|
|
|
1019
1041
|
* Select element, show editor, disable Ogma dragging and fire event
|
|
1020
1042
|
*/
|
|
1021
1043
|
select(e) {
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1044
|
+
const o = this.getById(e);
|
|
1045
|
+
o && (this.editor.show(), this.selectedId = e, this.refreshEditor(), this.layer.refresh(), this.emit(ar, o));
|
|
1024
1046
|
}
|
|
1025
1047
|
hover(e) {
|
|
1026
|
-
const
|
|
1027
|
-
|
|
1048
|
+
const o = this.getById(e);
|
|
1049
|
+
o && (this.showeditorOnHover && this.editor.show(), this.hoveredId = e, this.refreshEditor(), this.layer.refresh(), this.emit(un, o));
|
|
1028
1050
|
}
|
|
1029
1051
|
getSelectedFeature() {
|
|
1030
1052
|
return this.selectedId === Y ? null : this.getById(this.selectedId);
|
|
@@ -1035,7 +1057,7 @@ class Br extends Nr {
|
|
|
1035
1057
|
}
|
|
1036
1058
|
unhover() {
|
|
1037
1059
|
const e = this.getById(this.hoveredId);
|
|
1038
|
-
return this.emit(
|
|
1060
|
+
return this.emit(hn, e), this.hoveredId = Y, this.selectedId === Y && this.editor.hide(), this.layer.refresh(), this;
|
|
1039
1061
|
}
|
|
1040
1062
|
/**
|
|
1041
1063
|
* @method remove
|
|
@@ -1043,8 +1065,8 @@ class Br extends Nr {
|
|
|
1043
1065
|
* Removes annotation with the given id
|
|
1044
1066
|
*/
|
|
1045
1067
|
remove(e) {
|
|
1046
|
-
const
|
|
1047
|
-
e === this.hoveredId && this.unhover(), e === this.selectedId && this.unselect(), this.elements = this.elements.filter((i) => i.id !== e),
|
|
1068
|
+
const o = this.getById(e);
|
|
1069
|
+
e === this.hoveredId && this.unhover(), e === this.selectedId && this.unselect(), this.elements = this.elements.filter((i) => i.id !== e), o && this.emit(ur, o), this.layer.refresh();
|
|
1048
1070
|
}
|
|
1049
1071
|
/**
|
|
1050
1072
|
* @method disableDragging
|
|
@@ -1095,8 +1117,8 @@ class Br extends Nr {
|
|
|
1095
1117
|
}
|
|
1096
1118
|
}
|
|
1097
1119
|
const vr = "handle-line", mr = "handle-start", br = "handle-end";
|
|
1098
|
-
class
|
|
1099
|
-
constructor(e,
|
|
1120
|
+
class pn extends Br {
|
|
1121
|
+
constructor(e, o = {}) {
|
|
1100
1122
|
super(
|
|
1101
1123
|
e,
|
|
1102
1124
|
`
|
|
@@ -1117,19 +1139,19 @@ class fn extends Br {
|
|
|
1117
1139
|
}), x(this, "onMouseMove", (i) => {
|
|
1118
1140
|
if (!this.isDragging || this.draggedHandle === Y)
|
|
1119
1141
|
return;
|
|
1120
|
-
const l = this.handles[this.draggedHandle], c = this.ogma.view.getAngle(), { x: f, y:
|
|
1121
|
-
|
|
1142
|
+
const l = this.handles[this.draggedHandle], c = this.ogma.view.getAngle(), { x: f, y: g } = at(
|
|
1143
|
+
an(
|
|
1122
1144
|
{ x: i.clientX - this.startX, y: i.clientY - this.startY },
|
|
1123
1145
|
this.ogma.view.getZoom()
|
|
1124
1146
|
),
|
|
1125
1147
|
c
|
|
1126
1148
|
), d = l.id === vr, v = l.id === mr, y = l.id === br;
|
|
1127
|
-
(d || v) && Rr(this.arrow, this.start.x + f, this.start.y +
|
|
1149
|
+
(d || v) && Rr(this.arrow, this.start.x + f, this.start.y + g), (d || y) && Ir(this.arrow, this.end.x + f, this.end.y + g), this.emit(
|
|
1128
1150
|
De,
|
|
1129
1151
|
this.arrow,
|
|
1130
1152
|
d ? "line" : v ? "start" : "end"
|
|
1131
1153
|
), this.refreshEditor(), this.layer.refresh();
|
|
1132
|
-
}), this.minArrowHeight =
|
|
1154
|
+
}), this.minArrowHeight = o.minArrowHeight || 0, this.maxArrowHeight = o.maxArrowHeight || 1e6, this.handles = Array.prototype.slice.call(
|
|
1133
1155
|
this.editor.element.querySelectorAll(".arrow-handle>.handle")
|
|
1134
1156
|
), this.handles.forEach(
|
|
1135
1157
|
(i) => i.addEventListener("mousedown", this.onHandleMouseDown)
|
|
@@ -1141,10 +1163,10 @@ class fn extends Br {
|
|
|
1141
1163
|
* @param y
|
|
1142
1164
|
* @param arrow
|
|
1143
1165
|
*/
|
|
1144
|
-
startDrawing(e,
|
|
1166
|
+
startDrawing(e, o, i = tn(e, o, e, o, ge)) {
|
|
1145
1167
|
var l;
|
|
1146
1168
|
this.disableDragging(), this.add(i), this.hoveredId = i.id;
|
|
1147
|
-
const c = this.ogma.view.graphToScreenCoordinates({ x: e, y:
|
|
1169
|
+
const c = this.ogma.view.graphToScreenCoordinates({ x: e, y: o }), f = ((l = this.ogma.getContainer()) == null ? void 0 : l.getBoundingClientRect()) || {
|
|
1148
1170
|
left: 0,
|
|
1149
1171
|
top: 0
|
|
1150
1172
|
};
|
|
@@ -1157,44 +1179,44 @@ class fn extends Br {
|
|
|
1157
1179
|
cancelDrawing() {
|
|
1158
1180
|
this.isDragging && (this.remove(this.arrow.id), this.emit(Vt, this.arrow), this.restoreDragging(), this.isDragging = !1, this.draggedHandle = Y);
|
|
1159
1181
|
}
|
|
1160
|
-
startDragging(e,
|
|
1161
|
-
this.selectedId !== e.id && this.select(this.hoveredId), this.arrow = e, this.startX =
|
|
1182
|
+
startDragging(e, o, i) {
|
|
1183
|
+
this.selectedId !== e.id && this.select(this.hoveredId), this.arrow = e, this.startX = o, this.startY = i, this.start = fe(this.arrow), this.end = $e(this.arrow), this.disableDragging(), this.emit(Me, this.arrow), this.isDragging = !0;
|
|
1162
1184
|
}
|
|
1163
|
-
detect(e,
|
|
1185
|
+
detect(e, o = 0) {
|
|
1164
1186
|
return this.elements.find((i) => {
|
|
1165
1187
|
const { start: l, end: c } = je(i), f = Ct(e, {
|
|
1166
1188
|
x: (l.x + c.x) / 2,
|
|
1167
1189
|
y: (l.y + c.y) / 2
|
|
1168
|
-
}),
|
|
1169
|
-
return Math.abs(pr(v, f)) < d / 2 +
|
|
1190
|
+
}), g = Ct(c, l), d = Ut(g), v = $r(g), y = Dr(i);
|
|
1191
|
+
return Math.abs(pr(v, f)) < d / 2 + o && Math.abs(pr(at(v, Math.PI / 2), f)) < y / 2 + o;
|
|
1170
1192
|
});
|
|
1171
1193
|
}
|
|
1172
1194
|
refreshEditor() {
|
|
1173
1195
|
if (+this.selectedId < 0 && +this.hoveredId < 0)
|
|
1174
1196
|
return;
|
|
1175
|
-
const e = this.selectedId !== Y ? this.getById(this.selectedId) : this.getById(this.hoveredId),
|
|
1197
|
+
const e = this.selectedId !== Y ? this.getById(this.selectedId) : this.getById(this.hoveredId), o = je(e), i = this.ogma.view.graphToScreenCoordinates(o.start), l = this.ogma.view.graphToScreenCoordinates(o.end), [c, f, g] = Array.prototype.slice.call(
|
|
1176
1198
|
this.editor.element.querySelectorAll(".handle")
|
|
1177
1199
|
);
|
|
1178
|
-
f.style.transform = `translate(${i.x}px, ${i.y}px) translate(-50%, -50%)`,
|
|
1200
|
+
f.style.transform = `translate(${i.x}px, ${i.y}px) translate(-50%, -50%)`, g.style.transform = `translate(${l.x}px, ${l.y}px) translate(-50%, -50%)`;
|
|
1179
1201
|
const d = {
|
|
1180
1202
|
x: (l.x + i.x) / 2,
|
|
1181
1203
|
y: (l.y + i.y) / 2
|
|
1182
|
-
}, v = Ct(l, i), y = jr(v, 1 /
|
|
1183
|
-
c.style.width = `${
|
|
1204
|
+
}, v = Ct(l, i), y = jr(v, 1 / Ut(v)), _ = Math.atan2(y.y, y.x);
|
|
1205
|
+
c.style.width = `${Ut(v)}px`, c.style.left = `${d.x}px`, c.style.top = `${d.y}px`, c.style.transform = `translate(-50%, -50%) rotate(${_}rad)`;
|
|
1184
1206
|
}
|
|
1185
1207
|
getDefaultOptions() {
|
|
1186
1208
|
return gr;
|
|
1187
1209
|
}
|
|
1188
1210
|
draw(e) {
|
|
1189
1211
|
e.innerHTML = "";
|
|
1190
|
-
const
|
|
1191
|
-
|
|
1192
|
-
(l) =>
|
|
1193
|
-
), e.appendChild(
|
|
1212
|
+
const o = de("g"), i = this.ogma.view.getAngle();
|
|
1213
|
+
o.setAttribute("transform", `rotate(${-i * (180 / Math.PI)})`), this.elements.forEach(
|
|
1214
|
+
(l) => ln(l, o, ge, this.minArrowHeight, this.maxArrowHeight)
|
|
1215
|
+
), e.appendChild(o);
|
|
1194
1216
|
}
|
|
1195
1217
|
refreshDrawing() {
|
|
1196
1218
|
const e = this.ogma.view.getAngle();
|
|
1197
|
-
this.layer.element.children[0].setAttribute(
|
|
1219
|
+
this.layer.element !== null && this.layer.element.children[0].setAttribute(
|
|
1198
1220
|
"transform",
|
|
1199
1221
|
`rotate(${-e * (180 / Math.PI)})`
|
|
1200
1222
|
);
|
|
@@ -1203,7 +1225,7 @@ class fn extends Br {
|
|
|
1203
1225
|
super.destroy(), document.removeEventListener("mousemove", this.onMouseMove, !0), document.removeEventListener("mouseup", this.onMouseUp);
|
|
1204
1226
|
}
|
|
1205
1227
|
}
|
|
1206
|
-
const
|
|
1228
|
+
const Wt = {
|
|
1207
1229
|
font: "sans-serif",
|
|
1208
1230
|
fontSize: 12,
|
|
1209
1231
|
color: "black",
|
|
@@ -1217,7 +1239,7 @@ const Ut = {
|
|
|
1217
1239
|
properties: {
|
|
1218
1240
|
type: "text",
|
|
1219
1241
|
content: "",
|
|
1220
|
-
style: { ...
|
|
1242
|
+
style: { ...Wt }
|
|
1221
1243
|
},
|
|
1222
1244
|
geometry: {
|
|
1223
1245
|
type: "Polygon",
|
|
@@ -1236,35 +1258,35 @@ const Ut = {
|
|
|
1236
1258
|
}, wr = {
|
|
1237
1259
|
handleSize: 3.5,
|
|
1238
1260
|
placeholder: "Your text..."
|
|
1239
|
-
},
|
|
1261
|
+
}, yn = (u = 0, e = 0, o = 100, i = 50, l = "", c = { ...Wt }) => ({
|
|
1240
1262
|
id: ze(),
|
|
1241
1263
|
type: "Feature",
|
|
1242
1264
|
properties: {
|
|
1243
1265
|
type: "text",
|
|
1244
1266
|
content: l,
|
|
1245
|
-
style: { ...
|
|
1267
|
+
style: { ...Wt, ...c }
|
|
1246
1268
|
},
|
|
1247
1269
|
geometry: {
|
|
1248
1270
|
type: "Polygon",
|
|
1249
1271
|
coordinates: [
|
|
1250
1272
|
[
|
|
1251
|
-
[
|
|
1252
|
-
[
|
|
1253
|
-
[
|
|
1254
|
-
[
|
|
1255
|
-
[
|
|
1273
|
+
[u, e],
|
|
1274
|
+
[u + o, e],
|
|
1275
|
+
[u + o, e + i],
|
|
1276
|
+
[u, e + i],
|
|
1277
|
+
[u, e]
|
|
1256
1278
|
]
|
|
1257
1279
|
]
|
|
1258
1280
|
}
|
|
1259
1281
|
});
|
|
1260
1282
|
var Hr = { exports: {} };
|
|
1261
|
-
(function(
|
|
1262
|
-
(function(
|
|
1263
|
-
|
|
1264
|
-
})(
|
|
1265
|
-
var
|
|
1283
|
+
(function(u, e) {
|
|
1284
|
+
(function(o, i) {
|
|
1285
|
+
u.exports = i();
|
|
1286
|
+
})(fn, () => (() => {
|
|
1287
|
+
var o = { d: (r, n) => {
|
|
1266
1288
|
for (var a in n)
|
|
1267
|
-
|
|
1289
|
+
o.o(n, a) && !o.o(r, a) && Object.defineProperty(r, a, { enumerable: !0, get: n[a] });
|
|
1268
1290
|
}, o: (r, n) => Object.prototype.hasOwnProperty.call(r, n) }, i = {};
|
|
1269
1291
|
function l(r) {
|
|
1270
1292
|
return l = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
@@ -1273,8 +1295,8 @@ var Hr = { exports: {} };
|
|
|
1273
1295
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
1274
1296
|
}, l(r);
|
|
1275
1297
|
}
|
|
1276
|
-
|
|
1277
|
-
var c = /^((?:[a-z\d-]+\s+)*)([\d.]+(%|em|px)|(?:x+-)?large|(?:x+-)?small|medium)(?:\s*\/\s*(normal|[\d.]+(%|px|em)?))?(\s.+)?$/, f = /\bsmall-caps\b/,
|
|
1298
|
+
o.d(i, { default: () => Ke });
|
|
1299
|
+
var c = /^((?:[a-z\d-]+\s+)*)([\d.]+(%|em|px)|(?:x+-)?large|(?:x+-)?small|medium)(?:\s*\/\s*(normal|[\d.]+(%|px|em)?))?(\s.+)?$/, f = /\bsmall-caps\b/, g = /\b(?:italic|oblique)\b/, d = /\bbold(?:er)?\b/, v = 13.3333333, y = { "xx-small": 9, "x-small": 10, smaller: 13.3333, small: 13, medium: 16, large: 18, larger: 19.2, "x-large": 24, "xx-large": 32 };
|
|
1278
1300
|
function _(r) {
|
|
1279
1301
|
var n = "", a = this;
|
|
1280
1302
|
return a.style && a.style !== "normal" && (n += a.style), a.variant && a.variant !== "normal" && (n += (n ? " " : "") + a.variant), a.weight && a.weight !== "normal" && (n += (n ? " " : "") + a.weight), a.size && (n += (n ? " " : "") + a.size + "px", a.height !== a.size && (n += "/" + a.height + "px")), a.family && (n += (n ? " " : "") + a.family), r && (n += "::" + a.baseline), r && (n += "::" + a.color), n;
|
|
@@ -1285,28 +1307,28 @@ var Hr = { exports: {} };
|
|
|
1285
1307
|
n.family = (a[6] || "").trim();
|
|
1286
1308
|
var t = y[a[2]] || parseFloat(a[2]);
|
|
1287
1309
|
a[3] === "%" ? t *= 0.16 : a[3] === "em" ? t *= 16 : a[3] === "pt" && (t *= v), n.size = t;
|
|
1288
|
-
var
|
|
1289
|
-
if (
|
|
1310
|
+
var s = parseFloat(a[4]);
|
|
1311
|
+
if (s !== "normal" && s !== "inherit" && s ? a[5] && a[5] !== "em" ? a[5] === "pt" ? n.height = s * v : a[5] === "%" ? n.height = 0.01 * t : n.height = s : n.height = s * t : n.height = Math.round(t * (7 / 6)), f.test(a[1]) && (n.variant = "small-caps"), g.test(a[1]) && (n.style = "italic"), d.test(a[1]))
|
|
1290
1312
|
n.weight = "bold";
|
|
1291
1313
|
else {
|
|
1292
|
-
var
|
|
1293
|
-
|
|
1314
|
+
var h = parseInt(/\b(\d+)\b/.exec(a[1]), 10);
|
|
1315
|
+
h >= 100 && h !== 400 && (n.weight = h);
|
|
1294
1316
|
}
|
|
1295
1317
|
return n;
|
|
1296
1318
|
}
|
|
1297
1319
|
function P() {
|
|
1298
|
-
var r, n, a, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "12px/14px sans-serif",
|
|
1320
|
+
var r, n, a, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "12px/14px sans-serif", s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = 14, p = 12, m = null, w = null, b = "";
|
|
1299
1321
|
if (t && t.nodeType) {
|
|
1300
1322
|
var A = t && (t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView), R = A.getComputedStyle(t, null);
|
|
1301
|
-
r = R.getPropertyValue("font-family") || "",
|
|
1323
|
+
r = R.getPropertyValue("font-family") || "", p = parseFloat(R.getPropertyValue("font-size")), h = R.getPropertyValue("line-height"), m = R.getPropertyValue("font-weight"), w = R.getPropertyValue("font-style"), b = R.getPropertyValue("font-variant") || "";
|
|
1302
1324
|
} else if (typeof t == "string") {
|
|
1303
1325
|
var k = E(t);
|
|
1304
|
-
r = k.family,
|
|
1326
|
+
r = k.family, p = k.size, h = k.height, b = k.variant, w = k.style, m = k.weight;
|
|
1305
1327
|
} else
|
|
1306
|
-
l(t) === "object" && (r = t.family,
|
|
1307
|
-
|
|
1328
|
+
l(t) === "object" && (r = t.family, p = t.size, h = t.height, b = t.variant, m = t.weight, w = t.style, n = t.baseline, a = t.color);
|
|
1329
|
+
s.size && s.size < 3 && (p *= s.size), h = h !== "normal" && h ? parseFloat(h) : p * (7 / 6), s.height && s.height < 3 && (h *= s.height);
|
|
1308
1330
|
var O = Object.create(C);
|
|
1309
|
-
return O.family =
|
|
1331
|
+
return O.family = s.family || r || "sans-serif", O.height = h ?? 14, O.size = p ?? 12, O.variant = s.variant || b || "", O.style = s.style || w || "", O.weight = s.weight || m || "", O.baseline = n || 0, s.baseline != null && (O.baseline = s.baseline), O.color = s.color || a || "", O.id = _.call(O, !0), O;
|
|
1310
1332
|
}
|
|
1311
1333
|
const S = { "\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 };
|
|
1312
1334
|
var $, L = function(r) {
|
|
@@ -1314,8 +1336,8 @@ var Hr = { exports: {} };
|
|
|
1314
1336
|
if (n && n.getContext) {
|
|
1315
1337
|
var a = n.getContext("2d");
|
|
1316
1338
|
if (a && typeof a.measureText == "function")
|
|
1317
|
-
return function(t,
|
|
1318
|
-
return a.font = String(
|
|
1339
|
+
return function(t, s) {
|
|
1340
|
+
return a.font = String(s), a.measureText(t).width;
|
|
1319
1341
|
};
|
|
1320
1342
|
}
|
|
1321
1343
|
}(typeof document < "u" ? document : null) || ($ = {}, function(r, n) {
|
|
@@ -1326,14 +1348,14 @@ var Hr = { exports: {} };
|
|
|
1326
1348
|
return r.length * $[n].size;
|
|
1327
1349
|
}), T = {}, B = { trim: !0, collapse: !0 };
|
|
1328
1350
|
function N(r, n, a) {
|
|
1329
|
-
var t = Object.assign({}, B, a),
|
|
1330
|
-
if (!
|
|
1351
|
+
var t = Object.assign({}, B, a), s = String(r);
|
|
1352
|
+
if (!s)
|
|
1331
1353
|
return 0;
|
|
1332
|
-
if (
|
|
1333
|
-
var
|
|
1334
|
-
return
|
|
1354
|
+
if (s in S) {
|
|
1355
|
+
var h = n.id + "/" + s;
|
|
1356
|
+
return h in T || (T[h] = L("_".concat(s, "_"), n) - L("__", n)), T[h];
|
|
1335
1357
|
}
|
|
1336
|
-
return t.trim && t.collapse ? t.trim ?
|
|
1358
|
+
return t.trim && t.collapse ? t.trim ? s = s.trim() : t.collapse && (s = s.replace(/\s+/g, " ")) : s = s.replace(/\n/g, " "), L(s, n) + n.size * (r.tracking || 0);
|
|
1337
1359
|
}
|
|
1338
1360
|
function it(r) {
|
|
1339
1361
|
return it = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
@@ -1368,8 +1390,8 @@ var Hr = { exports: {} };
|
|
|
1368
1390
|
return function() {
|
|
1369
1391
|
var a, t = Ot(r);
|
|
1370
1392
|
if (n) {
|
|
1371
|
-
var
|
|
1372
|
-
a = Reflect.construct(t, arguments,
|
|
1393
|
+
var s = Ot(this).constructor;
|
|
1394
|
+
a = Reflect.construct(t, arguments, s);
|
|
1373
1395
|
} else
|
|
1374
1396
|
a = t.apply(this, arguments);
|
|
1375
1397
|
return pe(this, a);
|
|
@@ -1395,26 +1417,26 @@ var Hr = { exports: {} };
|
|
|
1395
1417
|
if (!(r instanceof n))
|
|
1396
1418
|
throw new TypeError("Cannot call a class as a function");
|
|
1397
1419
|
}
|
|
1398
|
-
function
|
|
1420
|
+
function Gt(r, n) {
|
|
1399
1421
|
for (var a = 0; a < n.length; a++) {
|
|
1400
1422
|
var t = n[a];
|
|
1401
|
-
t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(r, (
|
|
1402
|
-
if (it(
|
|
1403
|
-
return
|
|
1404
|
-
var m =
|
|
1423
|
+
t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(r, (s = function(h, p) {
|
|
1424
|
+
if (it(h) !== "object" || h === null)
|
|
1425
|
+
return h;
|
|
1426
|
+
var m = h[Symbol.toPrimitive];
|
|
1405
1427
|
if (m !== void 0) {
|
|
1406
|
-
var w = m.call(
|
|
1428
|
+
var w = m.call(h, p);
|
|
1407
1429
|
if (it(w) !== "object")
|
|
1408
1430
|
return w;
|
|
1409
1431
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1410
1432
|
}
|
|
1411
|
-
return String(
|
|
1412
|
-
}(t.key, "string"), it(
|
|
1433
|
+
return String(h);
|
|
1434
|
+
}(t.key, "string"), it(s) === "symbol" ? s : String(s)), t);
|
|
1413
1435
|
}
|
|
1414
|
-
var
|
|
1436
|
+
var s;
|
|
1415
1437
|
}
|
|
1416
1438
|
function tt(r, n, a) {
|
|
1417
|
-
return n &&
|
|
1439
|
+
return n && Gt(r.prototype, n), a && Gt(r, a), Object.defineProperty(r, "prototype", { writable: !1 }), r;
|
|
1418
1440
|
}
|
|
1419
1441
|
var D = function() {
|
|
1420
1442
|
function r() {
|
|
@@ -1429,40 +1451,40 @@ var Hr = { exports: {} };
|
|
|
1429
1451
|
} }, { key: "toString", value: function() {
|
|
1430
1452
|
return this.value;
|
|
1431
1453
|
} }]), r;
|
|
1432
|
-
}(),
|
|
1454
|
+
}(), lt = function(r) {
|
|
1433
1455
|
xt(a, r);
|
|
1434
1456
|
var n = Yt(a);
|
|
1435
1457
|
function a() {
|
|
1436
1458
|
return Pt(this, a), n.apply(this, arguments);
|
|
1437
1459
|
}
|
|
1438
1460
|
return tt(a);
|
|
1439
|
-
}(D),
|
|
1461
|
+
}(D), G = function(r) {
|
|
1440
1462
|
xt(a, r);
|
|
1441
1463
|
var n = Yt(a);
|
|
1442
1464
|
function a() {
|
|
1443
1465
|
return Pt(this, a), n.apply(this, arguments);
|
|
1444
1466
|
}
|
|
1445
1467
|
return tt(a);
|
|
1446
|
-
}(D),
|
|
1468
|
+
}(D), ut = function(r) {
|
|
1447
1469
|
xt(a, r);
|
|
1448
1470
|
var n = Yt(a);
|
|
1449
1471
|
function a() {
|
|
1450
1472
|
return Pt(this, a), n.apply(this, arguments);
|
|
1451
1473
|
}
|
|
1452
1474
|
return tt(a);
|
|
1453
|
-
}(D), Rt = /^[\n\r\t\x20\xA0\u2000-\u200B\u205F\u3000]/, ye = /^[^\n\r\t\u0020\u2000-\u200B\u205F\u3000]{2,}/,
|
|
1475
|
+
}(D), Rt = /^[\n\r\t\x20\xA0\u2000-\u200B\u205F\u3000]/, ye = /^[^\n\r\t\u0020\u2000-\u200B\u205F\u3000]{2,}/, Xt = /^[\xA0\u2011\u202F\u2060\uFEFF]/, ve = /^(?:[;\xAD%?…]|,(?!\d))/, me = /^[´±°¢£¤$¥\u2212]/;
|
|
1454
1476
|
function At(r, n) {
|
|
1455
1477
|
n !== !1 && (r = r.trim());
|
|
1456
|
-
for (var a, t,
|
|
1478
|
+
for (var a, t, s = [], h = r.charAt(0), p = 0, m = 1, w = r.length; m < w; m++) {
|
|
1457
1479
|
a = r.charAt(m), t = r.charAt(m + 1);
|
|
1458
|
-
var b = Rt.test(
|
|
1459
|
-
if ((me.test(a) && !
|
|
1460
|
-
var O = r.slice(
|
|
1461
|
-
/\u00AD$/.test(O) ? (
|
|
1480
|
+
var b = Rt.test(h), A = Rt.test(a), R = A || b, k = void 0;
|
|
1481
|
+
if ((me.test(a) && !Xt.test(h) || ve.test(h + t) && !Xt.test(a)) && (R = !0), h !== "-" && h !== "‐" && h !== "–" && h !== "—" || ((k = Rt.test(r.charAt(m - 2))) && !A && (R = !1), !k && ye.test(a + t) && (R = !0)), R) {
|
|
1482
|
+
var O = r.slice(p, m);
|
|
1483
|
+
/\u00AD$/.test(O) ? (s.push(new D(O.slice(0, -1))), s.push(new ut())) : (s.push(new D(O)), s.push(new lt())), p = m;
|
|
1462
1484
|
}
|
|
1463
|
-
|
|
1485
|
+
h = a;
|
|
1464
1486
|
}
|
|
1465
|
-
return
|
|
1487
|
+
return s.push(new D(r.slice(p))), s;
|
|
1466
1488
|
}
|
|
1467
1489
|
const be = { 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: "›" };
|
|
1468
1490
|
var Ne = /^[\n\r\x20\u2000-\u200B\u205F\u3000]/, Jt = /^<\/([a-zA-Z0-9]+)([^>]*)>/, Zt = /^<([a-zA-Z0-9]+)((?:\s[^=\s/]+(?:\s*=\s*(?:"[^"]+"|'[^']+'|[^>\\s]+))?)+)?\s*(\/?)>(\n*)/, It = /^<!--(.+?)-->/, Kt = /&(?:#(\d\d{2,})|#x([\da-fA-F]{2,})|([a-zA-Z][a-zA-Z1-4]{1,8}));/g, Et = { b: function(r) {
|
|
@@ -1493,23 +1515,23 @@ var Hr = { exports: {} };
|
|
|
1493
1515
|
r.sup = !0;
|
|
1494
1516
|
} }, Be = { 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 };
|
|
1495
1517
|
function Qt(r) {
|
|
1496
|
-
return r.replace(Kt, function(n, a, t,
|
|
1518
|
+
return r.replace(Kt, function(n, a, t, s) {
|
|
1497
1519
|
if (a || t) {
|
|
1498
|
-
var
|
|
1499
|
-
return String.fromCharCode(parseInt(a || t,
|
|
1520
|
+
var h = a ? 10 : 16;
|
|
1521
|
+
return String.fromCharCode(parseInt(a || t, h));
|
|
1500
1522
|
}
|
|
1501
|
-
return
|
|
1523
|
+
return s in be ? be[s] : n;
|
|
1502
1524
|
});
|
|
1503
1525
|
}
|
|
1504
1526
|
function He(r) {
|
|
1505
1527
|
return r && r.length > 1 && (r[0] === '"' && r[r.length - 1] === '"' || r[0] === "'" && r[r.length - 1] === "'") ? r.slice(1, -1) : r;
|
|
1506
1528
|
}
|
|
1507
|
-
var
|
|
1529
|
+
var Ue = /^\s*([^=\s&]+)(?:\s*=\s*("[^"]+"|'[^']+'|[^>\s]+))?/;
|
|
1508
1530
|
function Lt(r) {
|
|
1509
1531
|
var n, a = {};
|
|
1510
1532
|
if (r) {
|
|
1511
1533
|
do
|
|
1512
|
-
if (n =
|
|
1534
|
+
if (n = Ue.exec(r)) {
|
|
1513
1535
|
var t = Qt(He(n[2] || "")).replace(/[ \r\n\t]+/g, " ").trim();
|
|
1514
1536
|
if (a[n[1]] = t, (r = r.slice(n[0].length)).length && /^\S/.test(r[0]))
|
|
1515
1537
|
throw new Error("Attribute error");
|
|
@@ -1521,7 +1543,7 @@ var Hr = { exports: {} };
|
|
|
1521
1543
|
return a;
|
|
1522
1544
|
}
|
|
1523
1545
|
const _t = { 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: "Þ" };
|
|
1524
|
-
var we = /^(\^|_|\\[^#$%&~_^\\{}()\s]+)(\{)?/, xe = /^%[^\n]+(?:\n|$)/, Ft = /^[^#$%&~_^\\{}]+/,
|
|
1546
|
+
var we = /^(\^|_|\\[^#$%&~_^\\{}()\s]+)(\{)?/, xe = /^%[^\n]+(?:\n|$)/, Ft = /^[^#$%&~_^\\{}]+/, We = /^\\([&{}$%#_])/, Ve = /(?:\\[\\@,!:;-]|-{2,3}|[!?]`|``?|,,|''?|~|<<|>>)/g, te = { "---": "—", "--": "–", "!`": "¡", "?`": "¿", "``": "“", ",,": "„", "''": "”", "`": "‘", "'": "’", "<<": "«", ">>": "»", "~": " ", "\\-": "", "\\,": " ", "\\;": " ", "\\:": " ", "\\!": " ", "\\@": "\uFEFF", "\\\\": "\\newline{}" }, H = { bf: function(r) {
|
|
1525
1547
|
r.weight = "bold";
|
|
1526
1548
|
}, it: function(r) {
|
|
1527
1549
|
r.style = "italic";
|
|
@@ -1536,9 +1558,9 @@ var Hr = { exports: {} };
|
|
|
1536
1558
|
}, _: function(r) {
|
|
1537
1559
|
r.sub = !0;
|
|
1538
1560
|
}, par: function(r) {
|
|
1539
|
-
this.tokens.push(new
|
|
1561
|
+
this.tokens.push(new G(), new G());
|
|
1540
1562
|
}, newline: function(r) {
|
|
1541
|
-
this.tokens.push(new
|
|
1563
|
+
this.tokens.push(new G());
|
|
1542
1564
|
}, url: function(r, n) {
|
|
1543
1565
|
this.open_context().href = n, this.add_token(new D(n)), this.close_context();
|
|
1544
1566
|
} };
|
|
@@ -1550,9 +1572,9 @@ var Hr = { exports: {} };
|
|
|
1550
1572
|
return (r.style || r.weight || r.baseline || r.color || r.size || r.family) && (a = P(n, r)), a;
|
|
1551
1573
|
}
|
|
1552
1574
|
function ee(r, n, a) {
|
|
1553
|
-
for (var t,
|
|
1554
|
-
|
|
1555
|
-
r[r.length - 1] instanceof
|
|
1575
|
+
for (var t, s, h = r.width; h + a.width > n && r.length; )
|
|
1576
|
+
s = (t = r[r.length - 1]).width, t.width > a.width ? (t.value = t.value.slice(0, -1), t.width = N(t, t.font), h += t.width) : r.pop(), h -= s;
|
|
1577
|
+
r[r.length - 1] instanceof ut && r.pop(), t = r[r.length - 1] || t || {}, a.font = P(a.font, t.bold, t.italic, ""), a.href = r.length ? t.href : null, a.rel = r.length ? t.rel : null, a.target = r.length ? t.target : null, r.push(a);
|
|
1556
1578
|
}
|
|
1557
1579
|
function ot(r) {
|
|
1558
1580
|
return Math.round(1e6 * r) / 1e6;
|
|
@@ -1586,15 +1608,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1586
1608
|
return !r && !n || r === n;
|
|
1587
1609
|
};
|
|
1588
1610
|
function Ye(r, n) {
|
|
1589
|
-
var a = [], t = n.font(),
|
|
1611
|
+
var a = [], t = n.font(), s = t.size, h = t.family, p = n.align(), m = n.createElement();
|
|
1590
1612
|
if (r.length) {
|
|
1591
|
-
var w = t.height, b = n.valign(), A = n.height()(), R = n.width()(0), k = !isFinite(R) && r.length === 1, O = k ? null : n.x(), j = ot(w /
|
|
1613
|
+
var w = t.height, b = n.valign(), A = n.height()(), R = n.width()(0), k = !isFinite(R) && r.length === 1, O = k ? null : n.x(), j = ot(w / s), U = k ? null : ot(w / (1.15 * s + (w - s) / 2));
|
|
1592
1614
|
if (re[b] && isFinite(A)) {
|
|
1593
1615
|
var M = b === "bottom" ? 1 : 0.5;
|
|
1594
|
-
|
|
1616
|
+
U += (A * M - w * r.length * M) / s;
|
|
1595
1617
|
}
|
|
1596
|
-
var I =
|
|
1597
|
-
|
|
1618
|
+
var I = p === "justify", W = 0;
|
|
1619
|
+
p === "right" ? W = R : p === "center" && (W = R / 2);
|
|
1598
1620
|
for (var z = [], et = "tspan", J = null, V = "", F = function() {
|
|
1599
1621
|
if (V) {
|
|
1600
1622
|
var Tt = m(et, J, V);
|
|
@@ -1602,50 +1624,50 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1602
1624
|
}
|
|
1603
1625
|
et = "tspan", J = null, V = "";
|
|
1604
1626
|
}, nt = 0, rt = r.length; nt < rt; nt++) {
|
|
1605
|
-
var ft = "",
|
|
1627
|
+
var ft = "", bt = "", ct = 0, gt = r[nt];
|
|
1606
1628
|
if (gt.length) {
|
|
1607
1629
|
z = [];
|
|
1608
1630
|
for (var Mt = 0, le = 0, pt = void 0, Z = 0, Pe = gt.length; Z < Pe; Z++) {
|
|
1609
1631
|
var q = gt[Z], K = q.font;
|
|
1610
|
-
q.whitespace && Mt++, le += q.width, Z && !q.tracking && !ct && ne(K.id, ft) && ne(q.class,
|
|
1632
|
+
q.whitespace && Mt++, le += q.width, Z && !q.tracking && !ct && ne(K.id, ft) && ne(q.class, bt) && ne(pt, q.href) ? V += q.value : (F(), V = q.value, J = { fontFamily: K.family !== h ? K.family : null, fontSize: K.size !== s ? K.size : null, fontWeight: K.weight || null, fontStyle: K.style || null, fontVariant: K.variant !== "normal" && K.variant || null, fill: K.color || null, baselineShift: K.baseline ? 100 * K.baseline + "%" : null, className: q.class || null }, ct && (J.dx = ot(ct), ct = 0), q.tracking && (ct = K.size * q.tracking), q.href && !pt ? (pt = q.href, et = "a", J.href = pt, J.rel = q.rel, J.target = q.target) : pt = null, ft = K.id, bt = q.class);
|
|
1611
1633
|
}
|
|
1612
1634
|
if (F(), k)
|
|
1613
1635
|
a.push.apply(a, Ee(z));
|
|
1614
1636
|
else {
|
|
1615
|
-
var Re = null,
|
|
1616
|
-
I && gt.length > 1 && !
|
|
1637
|
+
var Re = null, ue = nt === rt - 1 || gt[gt.length - 1] instanceof G;
|
|
1638
|
+
I && gt.length > 1 && !ue && (Re = ot((R - le) / Mt)), a.push(m.apply(void 0, ["tspan", { wordSpacing: Re, x: O(nt) + W, dy: ot(nt ? j : U) + "em" }].concat(Ee(z))));
|
|
1617
1639
|
}
|
|
1618
1640
|
} else
|
|
1619
|
-
a.push(m("tspan", { x: O(nt), dy: ot(nt ? j :
|
|
1641
|
+
a.push(m("tspan", { x: O(nt), dy: ot(nt ? j : U) + "em" }, " "));
|
|
1620
1642
|
}
|
|
1621
1643
|
}
|
|
1622
|
-
return m.apply(void 0, ["text", { fontFamily:
|
|
1644
|
+
return m.apply(void 0, ["text", { fontFamily: h, fontSize: s, textAnchor: _e[p] || "start" }].concat(a));
|
|
1623
1645
|
}
|
|
1624
|
-
var
|
|
1625
|
-
function
|
|
1646
|
+
var Ge = { middle: 0.5, center: 0.5, bottom: 1, end: 1 };
|
|
1647
|
+
function Xe(r, n, a) {
|
|
1626
1648
|
if (r.length) {
|
|
1627
1649
|
a.textBaseline = "middle";
|
|
1628
|
-
var t = n.font(),
|
|
1650
|
+
var t = n.font(), s = t.height, h = t.size, p = n.valign(), m = n.height()(), w = n.width()(0), b = n.align(), A = b === "justify", R = 0.5 * s, k = Ge[p];
|
|
1629
1651
|
if (k && isFinite(m)) {
|
|
1630
|
-
var O = r.length *
|
|
1652
|
+
var O = r.length * s;
|
|
1631
1653
|
R += m * k - O * k;
|
|
1632
1654
|
}
|
|
1633
|
-
r.forEach(function(j,
|
|
1634
|
-
var M = n.x()(
|
|
1655
|
+
r.forEach(function(j, U) {
|
|
1656
|
+
var M = n.x()(U), I = U * s + R, W = 0, z = 0;
|
|
1635
1657
|
j.forEach(function(V) {
|
|
1636
|
-
V.whitespace &&
|
|
1658
|
+
V.whitespace && W++, z += V.width;
|
|
1637
1659
|
});
|
|
1638
|
-
var et = 0, J =
|
|
1639
|
-
A && j.length > 1 && !J && (et = (w - z) /
|
|
1660
|
+
var et = 0, J = U === r.length - 1 || j[j.length - 1] instanceof G;
|
|
1661
|
+
A && j.length > 1 && !J && (et = (w - z) / W), j.forEach(function(V) {
|
|
1640
1662
|
a.font = V.font;
|
|
1641
|
-
var F = V.font, nt = F.baseline ?
|
|
1642
|
-
a.fillStyle = function(
|
|
1643
|
-
return
|
|
1663
|
+
var F = V.font, nt = F.baseline ? h * -F.baseline + 0.15 * h : 0;
|
|
1664
|
+
a.fillStyle = function(bt, ct) {
|
|
1665
|
+
return bt.color ? bt.color : ct.href ? "#00C" : "#000";
|
|
1644
1666
|
}(F, V);
|
|
1645
1667
|
var rt = 0;
|
|
1646
|
-
if (b === "right" ? rt += w - z : b === "center" ? rt += w / 2 - z / 2 : b === "justify" && (V.whitespace || V instanceof
|
|
1668
|
+
if (b === "right" ? rt += w - z : b === "center" ? rt += w / 2 - z / 2 : b === "justify" && (V.whitespace || V instanceof G) && (M += et), a.fillText(V.value, M + rt, I + nt), V.href) {
|
|
1647
1669
|
a.beginPath(), a.strokeStyle = a.fillStyle;
|
|
1648
|
-
var ft = Math.floor(I + 0.45 *
|
|
1670
|
+
var ft = Math.floor(I + 0.45 * h) + 0.5;
|
|
1649
1671
|
a.moveTo(M + rt, ft), a.lineTo(M + rt + V.width, ft), a.stroke();
|
|
1650
1672
|
}
|
|
1651
1673
|
M += V.width;
|
|
@@ -1677,29 +1699,29 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1677
1699
|
function oe(r, n) {
|
|
1678
1700
|
for (var a = 0; a < n.length; a++) {
|
|
1679
1701
|
var t = n[a];
|
|
1680
|
-
t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(r, (
|
|
1681
|
-
if (kt(
|
|
1682
|
-
return
|
|
1683
|
-
var m =
|
|
1702
|
+
t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(r, (s = function(h, p) {
|
|
1703
|
+
if (kt(h) !== "object" || h === null)
|
|
1704
|
+
return h;
|
|
1705
|
+
var m = h[Symbol.toPrimitive];
|
|
1684
1706
|
if (m !== void 0) {
|
|
1685
|
-
var w = m.call(
|
|
1707
|
+
var w = m.call(h, p);
|
|
1686
1708
|
if (kt(w) !== "object")
|
|
1687
1709
|
return w;
|
|
1688
1710
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1689
1711
|
}
|
|
1690
|
-
return String(
|
|
1691
|
-
}(t.key, "string"), kt(
|
|
1712
|
+
return String(h);
|
|
1713
|
+
}(t.key, "string"), kt(s) === "symbol" ? s : String(s)), t);
|
|
1692
1714
|
}
|
|
1693
|
-
var
|
|
1715
|
+
var s;
|
|
1694
1716
|
}
|
|
1695
|
-
var Te = P(),
|
|
1717
|
+
var Te = P(), ht = function(r) {
|
|
1696
1718
|
return typeof r == "function" ? r : function() {
|
|
1697
1719
|
return r;
|
|
1698
1720
|
};
|
|
1699
|
-
},
|
|
1721
|
+
}, X = function() {
|
|
1700
1722
|
function r(t) {
|
|
1701
|
-
if (function(
|
|
1702
|
-
if (!(
|
|
1723
|
+
if (function(h, p) {
|
|
1724
|
+
if (!(h instanceof p))
|
|
1703
1725
|
throw new TypeError("Cannot call a class as a function");
|
|
1704
1726
|
}(this, r), this.props = { overflow: "ellipsis", lineclamp: null, align: "left", wordBreak: null, valign: "top", width: function() {
|
|
1705
1727
|
return 1 / 0;
|
|
@@ -1708,44 +1730,44 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1708
1730
|
}, x: function() {
|
|
1709
1731
|
return 0;
|
|
1710
1732
|
}, font: null, tAnchor: 0, parser: r.defaultparser }, t)
|
|
1711
|
-
for (var
|
|
1712
|
-
typeof this[
|
|
1733
|
+
for (var s in t)
|
|
1734
|
+
typeof this[s] == "function" && this[s](t[s]);
|
|
1713
1735
|
}
|
|
1714
1736
|
var n, a;
|
|
1715
1737
|
return n = r, a = [{ key: "linebreak", value: function(t) {
|
|
1716
|
-
var
|
|
1738
|
+
var s = this, h = this.props.parser(String(t)), p = this.font(), m = function(w, b, A) {
|
|
1717
1739
|
if (!w.length)
|
|
1718
1740
|
return [];
|
|
1719
|
-
var R = b.height(), k = b.width(), O = b.overflowLine(), j = b.overflowWrap(),
|
|
1741
|
+
var R = b.height(), k = b.width(), O = b.overflowLine(), j = b.overflowWrap(), U = P(A, !0, !1), M = isFinite(R()) ? Math.floor(R() / A.height) : 1 / 0;
|
|
1720
1742
|
if (!R() && !k(0) || !M)
|
|
1721
1743
|
return [];
|
|
1722
|
-
for (var I = 0,
|
|
1744
|
+
for (var I = 0, W = 0, z = 0, et = [], J = [], V = !1; I < w.length && W < M; ) {
|
|
1723
1745
|
var F = w[I], nt = Ae(F, A);
|
|
1724
|
-
if (F.width = N(F, nt), F.font = nt, F.line =
|
|
1725
|
-
if (F instanceof
|
|
1726
|
-
z = 0, J = [], et.push(I + 1),
|
|
1727
|
-
else if (F instanceof
|
|
1746
|
+
if (F.width = N(F, nt), F.font = nt, F.line = W, F.whitespace = F.value in S, F.value && (F.value = F.value.replace(qe, " ")), !(!z && F.whitespace || V && F.whitespace))
|
|
1747
|
+
if (F instanceof G)
|
|
1748
|
+
z = 0, J = [], et.push(I + 1), W++;
|
|
1749
|
+
else if (F instanceof lt || F instanceof ut)
|
|
1728
1750
|
J.push({ index: I, width: z });
|
|
1729
|
-
else if (F.whitespace || z + F.width < k(
|
|
1751
|
+
else if (F.whitespace || z + F.width < k(W))
|
|
1730
1752
|
z += F.width;
|
|
1731
1753
|
else if (J.length) {
|
|
1732
1754
|
var rt = void 0, ft = void 0;
|
|
1733
1755
|
do {
|
|
1734
1756
|
ft = !0, rt = J.pop();
|
|
1735
|
-
var
|
|
1736
|
-
|
|
1757
|
+
var bt = w[rt.index], ct = void 0;
|
|
1758
|
+
bt instanceof ut && (ct = N("-", bt.font), rt.width + ct > k(W) && (ft = !J.length));
|
|
1737
1759
|
} while (!ft);
|
|
1738
|
-
et.push(rt.index + 1), z = 0,
|
|
1760
|
+
et.push(rt.index + 1), z = 0, W++, I = rt.index, J = [];
|
|
1739
1761
|
} else if (j === "break-word") {
|
|
1740
|
-
var gt = k(
|
|
1762
|
+
var gt = k(W);
|
|
1741
1763
|
if (z + F.width > gt) {
|
|
1742
1764
|
var Mt = F.clone();
|
|
1743
1765
|
do
|
|
1744
1766
|
F.value = F.value.slice(0, -1), F.width = N(F, F.font), z += F.width;
|
|
1745
1767
|
while (F.value && F.width > gt);
|
|
1746
|
-
Mt.value = Mt.value.slice(F.value.length), w.splice(I + 1, 0, new
|
|
1768
|
+
Mt.value = Mt.value.slice(F.value.length), w.splice(I + 1, 0, new lt(), Mt);
|
|
1747
1769
|
}
|
|
1748
|
-
et.push(I + 1), z = 0,
|
|
1770
|
+
et.push(I + 1), z = 0, W++;
|
|
1749
1771
|
} else
|
|
1750
1772
|
z += F.width;
|
|
1751
1773
|
I++, V = F.whitespace;
|
|
@@ -1754,10 +1776,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1754
1776
|
var le = 0, pt = 0, Z = et.map(function(Tt) {
|
|
1755
1777
|
for (var Q, St = le; (Q = w[St]) && (Q.whitespace || !Q.value); )
|
|
1756
1778
|
St++;
|
|
1757
|
-
for (var
|
|
1758
|
-
Q instanceof
|
|
1759
|
-
Q instanceof
|
|
1760
|
-
var zt = w.slice(St,
|
|
1779
|
+
for (var wt = Tt, Qe = null; wt > St && (Q = w[wt - 1]) && (Q.whitespace || !(Q.value || Q instanceof ut)); )
|
|
1780
|
+
Q instanceof G && (Qe = Q), wt--;
|
|
1781
|
+
Q instanceof ut && (Q.value = "-", Q.width = N("-", Q.font)), le = Tt;
|
|
1782
|
+
var zt = w.slice(St, wt).filter(function(tr) {
|
|
1761
1783
|
return tr.value;
|
|
1762
1784
|
});
|
|
1763
1785
|
return Qe && zt.push(Qe), zt.width = zt.reduce(function(tr, Vr) {
|
|
@@ -1769,21 +1791,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1769
1791
|
Z.forEach(function(Tt, Q) {
|
|
1770
1792
|
var St = k(Q);
|
|
1771
1793
|
if (Tt.width > St) {
|
|
1772
|
-
var
|
|
1773
|
-
|
|
1794
|
+
var wt = new D(Pe);
|
|
1795
|
+
wt.font = A, wt.width = N(Pe, U), ee(Tt, St, wt), Z.hasLineOverflow = !0;
|
|
1774
1796
|
}
|
|
1775
1797
|
});
|
|
1776
1798
|
}
|
|
1777
1799
|
var q = b.overflow() === "ellipsis" ? "…" : b.overflow();
|
|
1778
1800
|
if (q && I !== w.length) {
|
|
1779
|
-
var K = k(Z.length - 1), Re = Z[Z.length - 1],
|
|
1780
|
-
|
|
1801
|
+
var K = k(Z.length - 1), Re = Z[Z.length - 1], ue = new D(q);
|
|
1802
|
+
ue.font = A, ue.width = N(q, U), ee(Re, K, ue), Z.hasOverflow = !0;
|
|
1781
1803
|
} else
|
|
1782
1804
|
Z.hasOverflow = !1;
|
|
1783
1805
|
return Z.font = A, Z.width = pt, Z;
|
|
1784
|
-
}(
|
|
1785
|
-
return m.height = m.length *
|
|
1786
|
-
return
|
|
1806
|
+
}(h, this, p);
|
|
1807
|
+
return m.height = m.length * p.height, m.render = function(w) {
|
|
1808
|
+
return s.render(m, w);
|
|
1787
1809
|
}, m.svg = m.render, m.draw = m.render, m;
|
|
1788
1810
|
} }, { key: "font", value: function(t) {
|
|
1789
1811
|
return arguments.length ? (this.props.font = P(t), this) : this.props.font || P(Te);
|
|
@@ -1796,25 +1818,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1796
1818
|
} }, { key: "align", value: function(t) {
|
|
1797
1819
|
if (!arguments.length)
|
|
1798
1820
|
return this.props.align;
|
|
1799
|
-
var
|
|
1800
|
-
return
|
|
1821
|
+
var s = String(t).toLowerCase();
|
|
1822
|
+
return s === "left" || s === "start" ? (this.props.align = "left", this.props.tAnchor = 0) : s === "center" || s === "middle" ? (this.props.align = "center", this.props.tAnchor = -0.5) : s === "end" || s === "right" ? (this.props.align = "right", this.props.tAnchor = -1) : s === "justify" && (this.props.align = t, this.props.tAnchor = 0), this;
|
|
1801
1823
|
} }, { key: "overflowWrap", value: function(t) {
|
|
1802
1824
|
if (!arguments.length)
|
|
1803
1825
|
return this.props.overflowWrap || "normal";
|
|
1804
|
-
var
|
|
1805
|
-
return
|
|
1826
|
+
var s = String(t).toLowerCase();
|
|
1827
|
+
return s === "break-word" ? this.props.overflowWrap = "break-word" : s !== "normal" && t != null || (this.props.overflowWrap = null), this;
|
|
1806
1828
|
} }, { key: "width", value: function(t) {
|
|
1807
|
-
return arguments.length ? (this.props.width =
|
|
1829
|
+
return arguments.length ? (this.props.width = ht(t), this) : this.props.width;
|
|
1808
1830
|
} }, { key: "height", value: function(t) {
|
|
1809
|
-
return arguments.length ? (this.props.height =
|
|
1831
|
+
return arguments.length ? (this.props.height = ht(t), this) : this.props.height;
|
|
1810
1832
|
} }, { key: "x", value: function(t) {
|
|
1811
|
-
return arguments.length ? (this.props.x =
|
|
1833
|
+
return arguments.length ? (this.props.x = ht(t), this) : this.props.x;
|
|
1812
1834
|
} }, { key: "parser", value: function(t) {
|
|
1813
1835
|
if (!arguments.length)
|
|
1814
1836
|
return this.props.parser;
|
|
1815
1837
|
if (typeof t == "string") {
|
|
1816
|
-
var
|
|
1817
|
-
typeof
|
|
1838
|
+
var s = r[t] || r[t + "parser"];
|
|
1839
|
+
typeof s == "function" && (t = s);
|
|
1818
1840
|
}
|
|
1819
1841
|
if (typeof t != "function")
|
|
1820
1842
|
throw new Error("Unknown parser: " + t);
|
|
@@ -1823,7 +1845,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1823
1845
|
return arguments.length ? (this.props.createElement = t, this) : this.props.createElement || r.createElement;
|
|
1824
1846
|
} }, { key: "render", value: function() {
|
|
1825
1847
|
var t = ke(arguments);
|
|
1826
|
-
return typeof t.text == "string" && (t.text = this.linebreak(t.text)), t.ctx ?
|
|
1848
|
+
return typeof t.text == "string" && (t.text = this.linebreak(t.text)), t.ctx ? Xe(t.text, this, t.ctx) : Ye(t.text, this);
|
|
1827
1849
|
} }], a && oe(n.prototype, a), Object.defineProperty(n, "prototype", { writable: !1 }), r;
|
|
1828
1850
|
}();
|
|
1829
1851
|
function dt(r) {
|
|
@@ -1842,20 +1864,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1842
1864
|
function Je(r, n) {
|
|
1843
1865
|
for (var a = 0; a < n.length; a++) {
|
|
1844
1866
|
var t = n[a];
|
|
1845
|
-
t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(r, (
|
|
1846
|
-
if (dt(
|
|
1847
|
-
return
|
|
1848
|
-
var m =
|
|
1867
|
+
t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(r, (s = function(h, p) {
|
|
1868
|
+
if (dt(h) !== "object" || h === null)
|
|
1869
|
+
return h;
|
|
1870
|
+
var m = h[Symbol.toPrimitive];
|
|
1849
1871
|
if (m !== void 0) {
|
|
1850
|
-
var w = m.call(
|
|
1872
|
+
var w = m.call(h, p);
|
|
1851
1873
|
if (dt(w) !== "object")
|
|
1852
1874
|
return w;
|
|
1853
1875
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1854
1876
|
}
|
|
1855
|
-
return String(
|
|
1856
|
-
}(t.key, "string"), dt(
|
|
1877
|
+
return String(h);
|
|
1878
|
+
}(t.key, "string"), dt(s) === "symbol" ? s : String(s)), t);
|
|
1857
1879
|
}
|
|
1858
|
-
var
|
|
1880
|
+
var s;
|
|
1859
1881
|
}
|
|
1860
1882
|
var se = function(r) {
|
|
1861
1883
|
return typeof r == "function" ? r : function() {
|
|
@@ -1863,23 +1885,23 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1863
1885
|
};
|
|
1864
1886
|
}, Se = function() {
|
|
1865
1887
|
function r(t) {
|
|
1866
|
-
if (function(
|
|
1867
|
-
if (!(
|
|
1888
|
+
if (function(h, p) {
|
|
1889
|
+
if (!(h instanceof p))
|
|
1868
1890
|
throw new TypeError("Cannot call a class as a function");
|
|
1869
1891
|
}(this, r), this.props = { width: function() {
|
|
1870
1892
|
return 1 / 0;
|
|
1871
1893
|
}, height: function() {
|
|
1872
1894
|
return 1 / 0;
|
|
1873
1895
|
}, rotation: 0, vAnchor: 0, hAnchor: 0 }, t)
|
|
1874
|
-
for (var
|
|
1875
|
-
typeof this[
|
|
1896
|
+
for (var s in t)
|
|
1897
|
+
typeof this[s] == "function" && this[s](t[s]);
|
|
1876
1898
|
this.render = this.render.bind(this);
|
|
1877
1899
|
}
|
|
1878
1900
|
var n, a;
|
|
1879
1901
|
return n = r, a = [{ key: "anchor", value: function(t) {
|
|
1880
|
-
var
|
|
1902
|
+
var s = this.props, h = s.hAnchor, p = s.vAnchor, m = s.width, w = s.height;
|
|
1881
1903
|
if (!arguments.length)
|
|
1882
|
-
return [
|
|
1904
|
+
return [h * m(0), p * w(0)];
|
|
1883
1905
|
if (typeof t == "string") {
|
|
1884
1906
|
var b = this.props;
|
|
1885
1907
|
t.toLowerCase().trim().split(/\s+/).forEach(function(A) {
|
|
@@ -1895,25 +1917,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1895
1917
|
return arguments.length ? (this.props.rotation = t, this) : this.props.rotation;
|
|
1896
1918
|
} }, { key: "createElement", value: function(t) {
|
|
1897
1919
|
return arguments.length ? (this.props.createElement = t, this) : this.props.createElement || r.createElement;
|
|
1898
|
-
} }, { key: "canvas", value: function(t,
|
|
1899
|
-
var
|
|
1900
|
-
return
|
|
1920
|
+
} }, { key: "canvas", value: function(t, s) {
|
|
1921
|
+
var h, p = t.getContext ? t.getContext("2d") : t;
|
|
1922
|
+
return p.save(), p.rotate(this.rotate() * Math.PI / 180), p.translate.apply(p, function(m) {
|
|
1901
1923
|
if (Array.isArray(m))
|
|
1902
1924
|
return jt(m);
|
|
1903
|
-
}(
|
|
1925
|
+
}(h = this.anchor()) || function(m) {
|
|
1904
1926
|
if (typeof Symbol < "u" && m[Symbol.iterator] != null || m["@@iterator"] != null)
|
|
1905
1927
|
return Array.from(m);
|
|
1906
|
-
}(
|
|
1928
|
+
}(h) || function(m, w) {
|
|
1907
1929
|
if (m) {
|
|
1908
1930
|
if (typeof m == "string")
|
|
1909
1931
|
return jt(m, w);
|
|
1910
1932
|
var b = Object.prototype.toString.call(m).slice(8, -1);
|
|
1911
1933
|
return b === "Object" && m.constructor && (b = m.constructor.name), b === "Map" || b === "Set" ? Array.from(m) : b === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b) ? jt(m, w) : void 0;
|
|
1912
1934
|
}
|
|
1913
|
-
}(
|
|
1935
|
+
}(h) || function() {
|
|
1914
1936
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1915
1937
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1916
|
-
}()),
|
|
1938
|
+
}()), s(p), p.restore(), p;
|
|
1917
1939
|
} }, { key: "render", value: function() {
|
|
1918
1940
|
var t = ke(arguments);
|
|
1919
1941
|
if (t.d3)
|
|
@@ -1921,8 +1943,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1921
1943
|
if (t.ctx)
|
|
1922
1944
|
return this.canvas(t.ctx, t.fn);
|
|
1923
1945
|
if (t.text) {
|
|
1924
|
-
var
|
|
1925
|
-
return this.createElement()("g", { transform: "rotate(".concat(this.rotate(), ") translate(").concat(this.anchor(), ")") },
|
|
1946
|
+
var s = typeof t.text.render == "function" ? t.text.render() : t.text;
|
|
1947
|
+
return this.createElement()("g", { transform: "rotate(".concat(this.rotate(), ") translate(").concat(this.anchor(), ")") }, s);
|
|
1926
1948
|
}
|
|
1927
1949
|
} }], a && Je(n.prototype, a), Object.defineProperty(n, "prototype", { writable: !1 }), r;
|
|
1928
1950
|
}(), Ce = Object.prototype.hasOwnProperty, Dt = {};
|
|
@@ -1944,80 +1966,80 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1944
1966
|
if (n && a.setAttribute)
|
|
1945
1967
|
for (var t in n)
|
|
1946
1968
|
Ce.call(n, t) && n[t] != null && a.setAttribute(t === "className" ? "class" : Ze(t), n[t]);
|
|
1947
|
-
for (var
|
|
1948
|
-
|
|
1949
|
-
return
|
|
1969
|
+
for (var s = arguments.length, h = new Array(s > 2 ? s - 2 : 0), p = 2; p < s; p++)
|
|
1970
|
+
h[p - 2] = arguments[p];
|
|
1971
|
+
return h != null && h.length && h.forEach(function(m) {
|
|
1950
1972
|
Oe(a, m);
|
|
1951
1973
|
}), a;
|
|
1952
1974
|
}
|
|
1953
1975
|
}
|
|
1954
|
-
|
|
1976
|
+
X.createElement = ae, X.textparser = At, X.defaultparser = At, X.htmlparser = function(r) {
|
|
1955
1977
|
r = String(r || "").trim();
|
|
1956
|
-
for (var n, a, t = { weight: null, style: null, sub: !1, sup: !1, href: null, color: null, rel: null, target: null },
|
|
1978
|
+
for (var n, a, t = { weight: null, style: null, sub: !1, sup: !1, href: null, color: null, rel: null, target: null }, s = [], h = [], p = function(R) {
|
|
1957
1979
|
for (var k in t)
|
|
1958
1980
|
t[k] && (R[k] = t[k]);
|
|
1959
|
-
|
|
1981
|
+
s.push(R);
|
|
1960
1982
|
}, m = function(R) {
|
|
1961
|
-
var k =
|
|
1983
|
+
var k = s.length, O = Be[R];
|
|
1962
1984
|
if (k && O) {
|
|
1963
|
-
for (var j = k - 1;
|
|
1985
|
+
for (var j = k - 1; s[j] && (s[j] instanceof lt || Ne.test(s[j].value)); )
|
|
1964
1986
|
j--;
|
|
1965
|
-
for (; O &&
|
|
1987
|
+
for (; O && s[j] && s[j] instanceof G; )
|
|
1966
1988
|
j--, O--;
|
|
1967
1989
|
for (; O-- > 0; )
|
|
1968
|
-
|
|
1990
|
+
s.push(new G());
|
|
1969
1991
|
}
|
|
1970
1992
|
}; r.length; ) {
|
|
1971
1993
|
if (n = /^[^<]+/.exec(r))
|
|
1972
|
-
At(Qt(n[0]), !1).forEach(
|
|
1994
|
+
At(Qt(n[0]), !1).forEach(p);
|
|
1973
1995
|
else if (!(n = It.exec(r)))
|
|
1974
1996
|
if (n = Jt.exec(r))
|
|
1975
|
-
|
|
1997
|
+
h.length && (t = h.pop()), m(n[1]);
|
|
1976
1998
|
else if (n = Zt.exec(r)) {
|
|
1977
1999
|
var w = n[1];
|
|
1978
|
-
m(w),
|
|
2000
|
+
m(w), h.push(t), t = Object.create(t), Et[w] && Et[w](t, "");
|
|
1979
2001
|
var b = Lt(n[2]);
|
|
1980
|
-
w === "a" && (b.href && (t.href = b.href), b.rel && (t.rel = b.rel), b.target && (t.target = b.target)), b.class && (t.class = t.class ? t.class + " " + b.class : b.class), b.style && (a = /(?:^|\s|;)color\s*:\s*([^;\s"']+)/.exec(b.style)) && a[1] && (t.color = a[1]), w === "br" &&
|
|
2002
|
+
w === "a" && (b.href && (t.href = b.href), b.rel && (t.rel = b.rel), b.target && (t.target = b.target)), b.class && (t.class = t.class ? t.class + " " + b.class : b.class), b.style && (a = /(?:^|\s|;)color\s*:\s*([^;\s"']+)/.exec(b.style)) && a[1] && (t.color = a[1]), w === "br" && s.push(new G());
|
|
1981
2003
|
} else
|
|
1982
|
-
n = [r.slice(0, 1)],
|
|
2004
|
+
n = [r.slice(0, 1)], p(new D(n[0]));
|
|
1983
2005
|
r = r.slice(n[0].length);
|
|
1984
2006
|
}
|
|
1985
|
-
for (var A =
|
|
1986
|
-
|
|
1987
|
-
return
|
|
1988
|
-
},
|
|
2007
|
+
for (var A = s[s.length - 1]; A instanceof G; )
|
|
2008
|
+
s.pop(), A = s[s.length - 1];
|
|
2009
|
+
return s;
|
|
2010
|
+
}, X.latexparser = function(r) {
|
|
1989
2011
|
r = String(r || "").trim();
|
|
1990
2012
|
var n = [0];
|
|
1991
2013
|
r = r.replace(/\\verb,(.*?),/, function(M, I) {
|
|
1992
2014
|
return n.push(I), "\\verb," + (n.length - 1) + ",";
|
|
1993
2015
|
}).replace(/\\\\\n/g, function() {
|
|
1994
2016
|
return "\\\\";
|
|
1995
|
-
}).replace(Ve, function(M, I,
|
|
1996
|
-
return
|
|
2017
|
+
}).replace(Ve, function(M, I, W) {
|
|
2018
|
+
return W.charAt(I - 1) === "\\" ? M : te[M];
|
|
1997
2019
|
}).replace(/\n\s+/g, function(M) {
|
|
1998
2020
|
return /\n/.test(M.slice(1)) ? "\\par " : M;
|
|
1999
|
-
}).replace(/\\symbol\{(\d+)\}/, function(M, I,
|
|
2000
|
-
return z.charAt(
|
|
2001
|
-
}).replace(/(^|[^\\])(\^|_)(\d|[^{]\S*)/g, function(M, I,
|
|
2002
|
-
return I +
|
|
2021
|
+
}).replace(/\\symbol\{(\d+)\}/, function(M, I, W, z) {
|
|
2022
|
+
return z.charAt(W - 1) === "\\" ? M : String.fromCharCode(1 * I);
|
|
2023
|
+
}).replace(/(^|[^\\])(\^|_)(\d|[^{]\S*)/g, function(M, I, W, z) {
|
|
2024
|
+
return I + W + "{" + z + "}";
|
|
2003
2025
|
}).replace(/\\verb,(.*?),/, function(M, I) {
|
|
2004
2026
|
return "\\verb,".concat(n[+I], ",");
|
|
2005
2027
|
});
|
|
2006
|
-
for (var a, t = { weight: null, italic: null, variant: null, sub: !1, sup: !1, href: null },
|
|
2028
|
+
for (var a, t = { weight: null, italic: null, variant: null, sub: !1, sup: !1, href: null }, s = [], h = [], p = function(M) {
|
|
2007
2029
|
for (var I in t)
|
|
2008
2030
|
t[I] && (M[I] = t[I]);
|
|
2009
|
-
return
|
|
2031
|
+
return s.push(M), M;
|
|
2010
2032
|
}, m = function() {
|
|
2011
|
-
|
|
2033
|
+
h.push(t), t = Object.create(t);
|
|
2012
2034
|
}, w = function() {
|
|
2013
|
-
if (!
|
|
2035
|
+
if (!h.length)
|
|
2014
2036
|
throw new Error("Unexpected }");
|
|
2015
|
-
t =
|
|
2016
|
-
}, b = { tokens:
|
|
2037
|
+
t = h.pop();
|
|
2038
|
+
}, b = { tokens: s, open_context: m, close_context: w, add_token: p }; r.length; ) {
|
|
2017
2039
|
if (a = Ft.exec(r))
|
|
2018
|
-
At(a[0], !1).forEach(
|
|
2019
|
-
else if (a =
|
|
2020
|
-
|
|
2040
|
+
At(a[0], !1).forEach(p);
|
|
2041
|
+
else if (a = We.exec(r))
|
|
2042
|
+
p(new D(a[1]));
|
|
2021
2043
|
else if (!(a = xe.exec(r))) {
|
|
2022
2044
|
if (a = /^\{/.exec(r))
|
|
2023
2045
|
m();
|
|
@@ -2025,57 +2047,57 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2025
2047
|
w();
|
|
2026
2048
|
else if (!(a = /^\$/.exec(r)))
|
|
2027
2049
|
if (a = /^\\verb,([^,]+),/.exec(r))
|
|
2028
|
-
|
|
2050
|
+
p(new D(a[1]));
|
|
2029
2051
|
else if (a = we.exec(r)) {
|
|
2030
2052
|
var A = a[1].slice(1) || a[1], R = !!a[2];
|
|
2031
2053
|
if (/^(La)?TeX$/i.test(A)) {
|
|
2032
2054
|
m(), t.family = "serif";
|
|
2033
2055
|
var k = void 0;
|
|
2034
|
-
A === "LaTeX" && ((k =
|
|
2056
|
+
A === "LaTeX" && ((k = p(new D("L"))).tracking = -0.25, (k = p(new D("A"))).size = 0.7, k.baseline = 0.3, k.tracking = -0.1), (k = p(new D("T"))).tracking = -0.17, (k = p(new D("E"))).baseline = -0.22, k.tracking = -0.13, k = p(new D("X")), w();
|
|
2035
2057
|
} else if (A in _t)
|
|
2036
|
-
|
|
2058
|
+
p(new D(_t[A])), R && m();
|
|
2037
2059
|
else if (A in H) {
|
|
2038
|
-
var O = [], j = H[A].length - 1,
|
|
2060
|
+
var O = [], j = H[A].length - 1, U = void 0;
|
|
2039
2061
|
if (j) {
|
|
2040
2062
|
for (R = !1, r = r.slice(a[0].length - 1); j--; ) {
|
|
2041
|
-
if (!(
|
|
2063
|
+
if (!(U = /^\{([^}]+)\}/.exec(r)))
|
|
2042
2064
|
throw new Error(A + " is missing an argument");
|
|
2043
|
-
O.push(
|
|
2065
|
+
O.push(U[1]), r = r.slice(U[0].length);
|
|
2044
2066
|
}
|
|
2045
2067
|
a[0] = /^\{/.exec(r) ? "{" : "", R = !!a[0];
|
|
2046
2068
|
}
|
|
2047
2069
|
R && m(), H[A].apply(b, [t].concat(O));
|
|
2048
2070
|
} else
|
|
2049
|
-
console.warn("unknown latex command", A),
|
|
2071
|
+
console.warn("unknown latex command", A), p(new D(a[1])), R && m();
|
|
2050
2072
|
} else
|
|
2051
|
-
a = [r.slice(0, 1)],
|
|
2073
|
+
a = [r.slice(0, 1)], p(new D(a[0]));
|
|
2052
2074
|
}
|
|
2053
2075
|
r = r.slice(a[0].length);
|
|
2054
2076
|
}
|
|
2055
|
-
return
|
|
2056
|
-
},
|
|
2077
|
+
return s;
|
|
2078
|
+
}, X.measureText = function(r, n, a) {
|
|
2057
2079
|
return N(r, P(n), a);
|
|
2058
|
-
},
|
|
2059
|
-
const Ke =
|
|
2080
|
+
}, X.Token = D, X.Break = lt, X.LineBreak = G, X.SoftHyphen = ut, X.Rotator = Se, Se.createElement = ae;
|
|
2081
|
+
const Ke = X;
|
|
2060
2082
|
return i.default;
|
|
2061
2083
|
})());
|
|
2062
2084
|
})(Hr);
|
|
2063
|
-
var
|
|
2064
|
-
const xr = /* @__PURE__ */ Mr(
|
|
2065
|
-
function nr(
|
|
2066
|
-
return
|
|
2085
|
+
var vn = Hr.exports;
|
|
2086
|
+
const xr = /* @__PURE__ */ Mr(vn);
|
|
2087
|
+
function nr(u) {
|
|
2088
|
+
return u.replace(/…$/, "");
|
|
2067
2089
|
}
|
|
2068
|
-
function ir(
|
|
2069
|
-
return
|
|
2090
|
+
function ir(u) {
|
|
2091
|
+
return u.children[0].innerHTML;
|
|
2070
2092
|
}
|
|
2071
|
-
function
|
|
2072
|
-
const
|
|
2073
|
-
if (
|
|
2093
|
+
function mn(u, e) {
|
|
2094
|
+
const o = mt(u), { fontSize: i, font: l, padding: c = 0 } = u.properties.style || {};
|
|
2095
|
+
if (o.width === o.height && o.width === 0)
|
|
2074
2096
|
return;
|
|
2075
2097
|
const f = new xr({
|
|
2076
2098
|
font: `${i}px/${i}px ${l}`.replace(/(px)+/g, "px"),
|
|
2077
|
-
width:
|
|
2078
|
-
height:
|
|
2099
|
+
width: o.width - c * 2,
|
|
2100
|
+
height: o.height - c * 2,
|
|
2079
2101
|
align: "left",
|
|
2080
2102
|
valign: "top",
|
|
2081
2103
|
x: 0,
|
|
@@ -2084,13 +2106,13 @@ function yn(h, e) {
|
|
|
2084
2106
|
createElement: xr.createElement
|
|
2085
2107
|
});
|
|
2086
2108
|
f.overflowWrap("break-word");
|
|
2087
|
-
const
|
|
2088
|
-
|
|
2109
|
+
const g = f.linebreak(
|
|
2110
|
+
u.properties.content.replaceAll(`
|
|
2089
2111
|
`, "<br>")
|
|
2090
|
-
).render(), d = [...
|
|
2112
|
+
).render(), d = [...g.children];
|
|
2091
2113
|
let v = 0;
|
|
2092
2114
|
const y = [];
|
|
2093
|
-
|
|
2115
|
+
u.properties.content.split(`
|
|
2094
2116
|
`).forEach((E) => {
|
|
2095
2117
|
let P = E;
|
|
2096
2118
|
for (; P.length && v < d.length; ) {
|
|
@@ -2102,9 +2124,9 @@ function yn(h, e) {
|
|
|
2102
2124
|
const S = nr(ir(d[v]));
|
|
2103
2125
|
P.startsWith(S) && (P = P.slice(S.length).trim()), v++;
|
|
2104
2126
|
}
|
|
2105
|
-
}), y.forEach((E) =>
|
|
2106
|
-
const _ =
|
|
2107
|
-
|
|
2127
|
+
}), y.forEach((E) => g.removeChild(d[E]));
|
|
2128
|
+
const _ = u.properties.content.match(/(https?:\/\/.*)/gm), C = _ ? _.map((E) => E.split(" ")[0]) : [];
|
|
2129
|
+
g.setAttribute("transform", `translate(${c}, ${c})`), C.forEach((E) => {
|
|
2108
2130
|
let P = E;
|
|
2109
2131
|
const S = [];
|
|
2110
2132
|
for (; P.length > 0; ) {
|
|
@@ -2121,11 +2143,11 @@ function yn(h, e) {
|
|
|
2121
2143
|
const L = document.createElementNS("http://www.w3.org/2000/svg", "a");
|
|
2122
2144
|
L.setAttribute("href", E), L.setAttribute("target", "_blank"), L.innerHTML = ir($), $.children[0].innerHTML = "", $.children[0].appendChild(L);
|
|
2123
2145
|
});
|
|
2124
|
-
}), e.appendChild(
|
|
2146
|
+
}), e.appendChild(g);
|
|
2125
2147
|
}
|
|
2126
2148
|
const Ar = 20;
|
|
2127
|
-
class
|
|
2128
|
-
constructor(e,
|
|
2149
|
+
class bn extends Br {
|
|
2150
|
+
constructor(e, o = {}) {
|
|
2129
2151
|
super(
|
|
2130
2152
|
e,
|
|
2131
2153
|
`
|
|
@@ -2145,36 +2167,36 @@ class vn extends Br {
|
|
|
2145
2167
|
this.textArea.value === this.placeholder && (this.textArea.value = ""), this.isFocused = !0;
|
|
2146
2168
|
}), x(this, "_onBlur", () => {
|
|
2147
2169
|
this.isFocused = !1;
|
|
2148
|
-
}), x(this, "startDrawing", (l, c, f =
|
|
2170
|
+
}), x(this, "startDrawing", (l, c, f = yn(l, c, 0, 0, "", Wt)) => {
|
|
2149
2171
|
this.add(f);
|
|
2150
|
-
const
|
|
2151
|
-
this.select(f.id), this.startDragging(this.getById(f.id),
|
|
2172
|
+
const g = this.ogma.view.graphToScreenCoordinates({ x: l, y: c });
|
|
2173
|
+
this.select(f.id), this.startDragging(this.getById(f.id), g.x, g.y), this.draggedHandle = 6;
|
|
2152
2174
|
}), x(this, "cancelDrawing", () => {
|
|
2153
2175
|
this.isDragging && (this.remove(this.annotation.id), this.annotation = { ...rr }, this.draggedHandle = Y, this.isDragging = !1, this.emit(Vt, this.annotation));
|
|
2154
2176
|
}), x(this, "startDragging", (l, c, f) => {
|
|
2155
2177
|
this.annotation = l;
|
|
2156
|
-
const
|
|
2157
|
-
this.rect.x =
|
|
2178
|
+
const g = vt(this.annotation), d = mt(this.annotation);
|
|
2179
|
+
this.rect.x = g.x, this.rect.y = g.y, this.rect.width = d.width, this.rect.height = d.height, this.startX = c, this.startY = f, this.disableDragging(), this.textArea.classList.add("noevents"), this.textArea.setAttribute("disabled", "disabled"), this.emit(Me, this.annotation), this.isDragging = !0;
|
|
2158
2180
|
}), x(this, "onHandleMouseDown", (l) => {
|
|
2159
2181
|
const c = this.getById(this.selectedId) || this.getById(this.hoveredId);
|
|
2160
2182
|
if (!c)
|
|
2161
2183
|
return;
|
|
2162
2184
|
this.selectedId !== c.id && this.select(this.hoveredId);
|
|
2163
|
-
const { x: f, y:
|
|
2164
|
-
this.startDragging(c, f,
|
|
2185
|
+
const { x: f, y: g } = sr(l, this.ogma.getContainer());
|
|
2186
|
+
this.startDragging(c, f, g), this.draggedHandle = Lr(l.target);
|
|
2165
2187
|
}), x(this, "onMouseMove", (l) => {
|
|
2166
2188
|
requestAnimationFrame(() => this._onMouseMove(l));
|
|
2167
2189
|
}), x(this, "_onMouseMove", (l) => {
|
|
2168
2190
|
if (!this.isDragging)
|
|
2169
2191
|
return;
|
|
2170
2192
|
l.stopPropagation(), l.preventDefault();
|
|
2171
|
-
const c = this.handles[this.draggedHandle], f = c.classList.contains("top"),
|
|
2193
|
+
const c = this.handles[this.draggedHandle], f = c.classList.contains("top"), g = c.classList.contains("left"), d = c.classList.contains("right"), v = c.classList.contains("bottom"), y = c.classList.contains("line-handle"), { x: _, y: C } = sr(
|
|
2172
2194
|
l,
|
|
2173
2195
|
this.ogma.getContainer()
|
|
2174
|
-
), E = this.ogma.view.getZoom(), P = (_ - this.startX) / E, S = (C - this.startY) / E, $ = this.ogma.view.getAngle(), L =
|
|
2175
|
-
(v &&
|
|
2176
|
-
const T =
|
|
2177
|
-
this.rect.width + P * (y ||
|
|
2196
|
+
), E = this.ogma.view.getZoom(), P = (_ - this.startX) / E, S = (C - this.startY) / E, $ = this.ogma.view.getAngle(), L = at({ x: P, y: S }, $);
|
|
2197
|
+
(v && g || f && d) && (L.y = 0, L.x = 0);
|
|
2198
|
+
const T = g || y ? this.rect.x + L.x : this.rect.x, B = f || y ? this.rect.y + L.y : this.rect.y, N = Math.max(
|
|
2199
|
+
this.rect.width + P * (y || g ? 0 : 1),
|
|
2178
2200
|
Ar
|
|
2179
2201
|
), it = Math.max(
|
|
2180
2202
|
this.rect.height + S * (y || f ? 0 : 1),
|
|
@@ -2202,18 +2224,18 @@ class vn extends Br {
|
|
|
2202
2224
|
_canRemove() {
|
|
2203
2225
|
return !this.isFocused;
|
|
2204
2226
|
}
|
|
2205
|
-
detect({ x: e, y:
|
|
2206
|
-
const l = { x: e, y:
|
|
2227
|
+
detect({ x: e, y: o }, i = 0) {
|
|
2228
|
+
const l = { x: e, y: o }, c = this.ogma.view.getAngle();
|
|
2207
2229
|
return this.elements.find((f) => {
|
|
2208
|
-
const { x:
|
|
2230
|
+
const { x: g, y: d } = vt(f), { width: v, height: y } = mt(f), _ = { x: g, y: d }, { x: C, y: E } = at(Ct(l, _), -c);
|
|
2209
2231
|
return C > -i && C < v + i && E > -i && E < y + i;
|
|
2210
2232
|
});
|
|
2211
2233
|
}
|
|
2212
2234
|
draw(e) {
|
|
2213
2235
|
e.innerHTML = "";
|
|
2214
|
-
const
|
|
2236
|
+
const o = "", i = this.ogma.view.getAngle();
|
|
2215
2237
|
this.elements.forEach((c, f) => {
|
|
2216
|
-
const
|
|
2238
|
+
const g = `class${f}`, d = mt(c), v = vt(c), y = c.id, {
|
|
2217
2239
|
color: _,
|
|
2218
2240
|
fontSize: C,
|
|
2219
2241
|
font: E,
|
|
@@ -2221,28 +2243,28 @@ class vn extends Br {
|
|
|
2221
2243
|
strokeWidth: S,
|
|
2222
2244
|
strokeType: $,
|
|
2223
2245
|
background: L
|
|
2224
|
-
} = c.properties.style ||
|
|
2246
|
+
} = c.properties.style || Wt;
|
|
2225
2247
|
if (y === this.selectedId)
|
|
2226
2248
|
return;
|
|
2227
2249
|
const T = de("g");
|
|
2228
2250
|
T.classList.add("annotation-text"), T.setAttribute("fill", `${_}`), T.setAttribute("font-size", `${C}px`), T.setAttribute("font-family", `${E}`);
|
|
2229
2251
|
const B = de("rect");
|
|
2230
2252
|
let N = !1;
|
|
2231
|
-
$ && $ !== "none" && (N = !0, B.setAttribute("stroke", P || "black"), B.setAttribute("stroke-width", `${S}`), $ === "dashed" && B.setAttribute("stroke-dasharray", "5,5")), (L && L.length || N) && (N = !0, B.setAttribute("fill", L || "transparent")), N && (B.setAttribute("width", `${d.width}`), B.setAttribute("height", `${d.height}`)), T.appendChild(B),
|
|
2232
|
-
const { x: it, y: xt } =
|
|
2233
|
-
T.setAttribute("transform", `translate(${it},${xt})`), T.classList.add(
|
|
2253
|
+
$ && $ !== "none" && (N = !0, B.setAttribute("stroke", P || "black"), B.setAttribute("stroke-width", `${S}`), $ === "dashed" && B.setAttribute("stroke-dasharray", "5,5")), (L && L.length || N) && (N = !0, B.setAttribute("fill", L || "transparent")), N && (B.setAttribute("width", `${d.width}`), B.setAttribute("height", `${d.height}`)), T.appendChild(B), mn(c, T);
|
|
2254
|
+
const { x: it, y: xt } = at(v, -i);
|
|
2255
|
+
T.setAttribute("transform", `translate(${it},${xt})`), T.classList.add(g), T.setAttribute("data-annotation", `${c.id}`), T.setAttribute("data-annotation-type", "text"), e.appendChild(T);
|
|
2234
2256
|
});
|
|
2235
2257
|
const l = de("style");
|
|
2236
|
-
l.innerHTML =
|
|
2258
|
+
l.innerHTML = o, e.firstChild && e.insertBefore(l, e.firstChild);
|
|
2237
2259
|
}
|
|
2238
2260
|
refreshDrawing() {
|
|
2239
2261
|
const e = this.ogma.view.getAngle();
|
|
2240
|
-
[...this.layer.element.children].forEach((
|
|
2241
|
-
const i =
|
|
2262
|
+
[...this.layer.element.children].forEach((o) => {
|
|
2263
|
+
const i = o.getAttribute("data-annotation");
|
|
2242
2264
|
if (!i)
|
|
2243
2265
|
return;
|
|
2244
|
-
const l =
|
|
2245
|
-
|
|
2266
|
+
const l = vt(this.getById(i)), { x: c, y: f } = at(l, -e);
|
|
2267
|
+
o.setAttribute("transform", `translate(${c},${f})`);
|
|
2246
2268
|
});
|
|
2247
2269
|
}
|
|
2248
2270
|
getDefaultOptions() {
|
|
@@ -2251,16 +2273,16 @@ class vn extends Br {
|
|
|
2251
2273
|
refreshEditor() {
|
|
2252
2274
|
if (+this.selectedId < 0 && +this.hoveredId < 0)
|
|
2253
2275
|
return;
|
|
2254
|
-
const e = this.getById(this.selectedId) || this.getById(this.hoveredId),
|
|
2255
|
-
|
|
2276
|
+
const e = this.getById(this.selectedId) || this.getById(this.hoveredId), o = mt(e), i = this.ogma.view.graphToScreenCoordinates(
|
|
2277
|
+
vt(e)
|
|
2256
2278
|
), l = this.ogma.view.getZoom(), {
|
|
2257
2279
|
font: c,
|
|
2258
2280
|
fontSize: f,
|
|
2259
|
-
color:
|
|
2281
|
+
color: g,
|
|
2260
2282
|
background: d,
|
|
2261
2283
|
padding: v = 0
|
|
2262
|
-
} = e.properties.style ||
|
|
2263
|
-
this.textArea.value = e.properties.content, this.editor.element.style.transform = `translate(${i.x}px, ${i.y}px)translate(-50%, -50%)translate(${
|
|
2284
|
+
} = e.properties.style || Wt, y = (f || 1) * l;
|
|
2285
|
+
this.textArea.value = e.properties.content, this.editor.element.style.transform = `translate(${i.x}px, ${i.y}px)translate(-50%, -50%)translate(${o.width / 2 * l}px, ${o.height / 2 * l}px)`, this.editor.element.style.width = `${o.width * l}px`, this.editor.element.style.height = `${o.height * l}px`, this.textArea.style.font = `${y} ${c}`, this.textArea.style.fontFamily = c || "sans-serif", this.textArea.style.fontSize = `${y}px`, this.textArea.style.padding = `${l * v}px`, this.textArea.style.lineHeight = `${y}px`, this.textArea.style.boxSizing = "border-box", this.textArea.style.color = g || "black", this.textArea.style.background = d || "transparent", this.textArea.placeholder = this.placeholder, this.layer.refresh();
|
|
2264
2286
|
}
|
|
2265
2287
|
select(e) {
|
|
2266
2288
|
super.select(e), this.textArea.focus();
|
|
@@ -2269,60 +2291,60 @@ class vn extends Br {
|
|
|
2269
2291
|
super.destroy(), document.removeEventListener("mouseup", this.onMouseUp), document.removeEventListener("mousemove", this.onMouseMove, !0), this.ogma.events.off(this.onViewChanged);
|
|
2270
2292
|
}
|
|
2271
2293
|
}
|
|
2272
|
-
class
|
|
2294
|
+
class wn {
|
|
2273
2295
|
constructor() {
|
|
2274
2296
|
x(this, "links", {}), x(this, "linksByTargetId", {}), x(this, "linksByArrowId", {});
|
|
2275
2297
|
}
|
|
2276
|
-
add(e,
|
|
2277
|
-
const f = ze(),
|
|
2298
|
+
add(e, o, i, l, c) {
|
|
2299
|
+
const f = ze(), g = e.id, d = {
|
|
2278
2300
|
id: f,
|
|
2279
|
-
arrow:
|
|
2301
|
+
arrow: g,
|
|
2280
2302
|
target: i,
|
|
2281
2303
|
targetType: l,
|
|
2282
2304
|
connectionPoint: c,
|
|
2283
|
-
side:
|
|
2305
|
+
side: o
|
|
2284
2306
|
};
|
|
2285
|
-
return this.links[f] = d, this.linksByTargetId[i] || (this.linksByTargetId[i] = []), this.linksByTargetId[i].push(f), this.linksByArrowId[
|
|
2307
|
+
return this.links[f] = d, this.linksByTargetId[i] || (this.linksByTargetId[i] = []), this.linksByTargetId[i].push(f), this.linksByArrowId[g] || (this.linksByArrowId[g] = {}), this.linksByArrowId[g][o] = f, e.properties.link = e.properties.link || {}, e.properties.link[o] = {
|
|
2286
2308
|
id: i,
|
|
2287
|
-
side:
|
|
2309
|
+
side: o,
|
|
2288
2310
|
type: l,
|
|
2289
2311
|
magnet: c
|
|
2290
2312
|
}, this;
|
|
2291
2313
|
}
|
|
2292
|
-
arrowIsLinked(e,
|
|
2314
|
+
arrowIsLinked(e, o) {
|
|
2293
2315
|
var i;
|
|
2294
|
-
return !!((i = this.linksByArrowId[e]) != null && i[
|
|
2316
|
+
return !!((i = this.linksByArrowId[e]) != null && i[o]);
|
|
2295
2317
|
}
|
|
2296
2318
|
// remove the link between the arrow and the target by arrow id and side
|
|
2297
|
-
remove(e,
|
|
2319
|
+
remove(e, o) {
|
|
2298
2320
|
var i, l;
|
|
2299
|
-
const c = e.id, f = (i = this.linksByArrowId[c]) == null ? void 0 : i[
|
|
2300
|
-
if ((l = e.properties.link) == null || delete l[
|
|
2321
|
+
const c = e.id, f = (i = this.linksByArrowId[c]) == null ? void 0 : i[o];
|
|
2322
|
+
if ((l = e.properties.link) == null || delete l[o], !f)
|
|
2301
2323
|
return this;
|
|
2302
|
-
const
|
|
2324
|
+
const g = this.links[f];
|
|
2303
2325
|
delete this.links[f];
|
|
2304
|
-
const d = this.linksByTargetId[
|
|
2326
|
+
const d = this.linksByTargetId[g.target];
|
|
2305
2327
|
for (let v = 0; v < d.length; v++)
|
|
2306
2328
|
if (d[v] === f) {
|
|
2307
2329
|
d.splice(v, 1);
|
|
2308
2330
|
break;
|
|
2309
2331
|
}
|
|
2310
|
-
return delete this.linksByArrowId[c][
|
|
2332
|
+
return delete this.linksByArrowId[c][o], this;
|
|
2311
2333
|
}
|
|
2312
|
-
getArrowLink(e,
|
|
2334
|
+
getArrowLink(e, o) {
|
|
2313
2335
|
var i;
|
|
2314
|
-
const l = (i = this.linksByArrowId[e]) == null ? void 0 : i[
|
|
2336
|
+
const l = (i = this.linksByArrowId[e]) == null ? void 0 : i[o];
|
|
2315
2337
|
return l ? this.links[l] : null;
|
|
2316
2338
|
}
|
|
2317
|
-
getTargetLinks(e,
|
|
2339
|
+
getTargetLinks(e, o) {
|
|
2318
2340
|
var i;
|
|
2319
|
-
return ((i = this.linksByTargetId[e]) == null ? void 0 : i.map((l) => this.links[l]).filter((l) => l.targetType ===
|
|
2341
|
+
return ((i = this.linksByTargetId[e]) == null ? void 0 : i.map((l) => this.links[l]).filter((l) => l.targetType === o)) ?? [];
|
|
2320
2342
|
}
|
|
2321
2343
|
forEach(e) {
|
|
2322
2344
|
Object.values(this.links).forEach(e);
|
|
2323
2345
|
}
|
|
2324
2346
|
}
|
|
2325
|
-
const
|
|
2347
|
+
const st = (u) => u.properties.type === "arrow", yt = (u) => u.properties.type === "text", Er = (u) => u.type === "FeatureCollection", xn = {
|
|
2326
2348
|
magnetColor: "#3e8",
|
|
2327
2349
|
detectMargin: 20,
|
|
2328
2350
|
magnetHandleRadius: 5,
|
|
@@ -2342,9 +2364,9 @@ const lt = (h) => h.properties.type === "arrow", wt = (h) => h.properties.type =
|
|
|
2342
2364
|
{ x: 0.5, y: 1 },
|
|
2343
2365
|
{ x: 1, y: 1 }
|
|
2344
2366
|
];
|
|
2345
|
-
class
|
|
2346
|
-
constructor(e,
|
|
2347
|
-
super(), x(this, "arrows"), x(this, "texts"), x(this, "links", new
|
|
2367
|
+
class An extends Nr {
|
|
2368
|
+
constructor(e, o = {}) {
|
|
2369
|
+
super(), x(this, "arrows"), x(this, "texts"), x(this, "links", new wn()), x(this, "layer"), x(this, "annotations"), x(this, "ogma"), x(this, "options"), x(this, "selected", null), x(this, "updateTimeout", 0), x(this, "hoveredNode", null), x(this, "dragged", null), x(this, "textToMagnet"), x(this, "activeLinks", []), x(this, "_render", (i) => {
|
|
2348
2370
|
if (!this.dragged || this.textToMagnet === void 0)
|
|
2349
2371
|
return;
|
|
2350
2372
|
i.beginPath(), i.fillStyle = "green";
|
|
@@ -2352,34 +2374,34 @@ class wn extends Nr {
|
|
|
2352
2374
|
kr.forEach((c) => {
|
|
2353
2375
|
if (!this.textToMagnet)
|
|
2354
2376
|
return;
|
|
2355
|
-
const f =
|
|
2377
|
+
const f = mt(this.textToMagnet), g = vt(this.textToMagnet), d = Fe(c, { x: f.width, y: f.height }), v = at(d, this.ogma.view.getAngle()), { x: y, y: _ } = Ht(v, g);
|
|
2356
2378
|
i.moveTo(y, _), i.arc(y, _, this.options.magnetHandleRadius / l, 0, Math.PI * 2);
|
|
2357
2379
|
}), i.fill(), i.closePath();
|
|
2358
2380
|
}), x(this, "_onFeatureDrag", (i, l) => {
|
|
2359
2381
|
const c = l;
|
|
2360
|
-
if (
|
|
2382
|
+
if (st(i) && c === "line")
|
|
2361
2383
|
["start", "end"].find((f) => {
|
|
2362
|
-
const
|
|
2363
|
-
return this._snapToText(i, c,
|
|
2384
|
+
const g = f === "start" ? fe(i) : $e(i);
|
|
2385
|
+
return this._snapToText(i, c, g) || this._findAndSnapToNode(i, f, g);
|
|
2364
2386
|
});
|
|
2365
|
-
else if (
|
|
2387
|
+
else if (st(i) && c !== "line") {
|
|
2366
2388
|
const f = c === "start" ? fe(i) : $e(i);
|
|
2367
2389
|
this._snapToText(i, c, f) || this._findAndSnapToNode(i, c, f);
|
|
2368
2390
|
} else
|
|
2369
|
-
|
|
2370
|
-
const v = this.getAnnotation(f), y =
|
|
2371
|
-
v.geometry.coordinates[
|
|
2391
|
+
yt(i) && (this.activeLinks.forEach(({ arrow: f, side: g, connectionPoint: d }) => {
|
|
2392
|
+
const v = this.getAnnotation(f), y = mt(i), _ = vt(i), C = Fe(d, { x: y.width, y: y.height }), E = at(C, this.ogma.view.getAngle()), P = Ht(E, _);
|
|
2393
|
+
v.geometry.coordinates[g === "start" ? 0 : 1] = [P.x, P.y];
|
|
2372
2394
|
}), this.activeLinks.length && this.arrows.refreshLayer());
|
|
2373
2395
|
this.layer.refresh(), this.emit(De, i, l);
|
|
2374
2396
|
}), x(this, "_onFeatureDragEnd", (i) => {
|
|
2375
|
-
this.dragged !== null &&
|
|
2376
|
-
this.links.getArrowLink(i.id, l) && this.emit(
|
|
2397
|
+
this.dragged !== null && st(i) && fe(this.dragged) && _r.forEach((l) => {
|
|
2398
|
+
this.links.getArrowLink(i.id, l) && this.emit(dn, {
|
|
2377
2399
|
arrow: i,
|
|
2378
2400
|
link: this.links.getArrowLink(i.id, l)
|
|
2379
2401
|
});
|
|
2380
|
-
}), (
|
|
2402
|
+
}), (yt(i) || st(i)) && this.onUpdate(i), this.dragged = null, this.activeLinks = [], this.textToMagnet = void 0, this.annotations.forEach((l) => l.enableDetection()), this.layer.refresh(), this.emit(Vt, i);
|
|
2381
2403
|
}), x(this, "_onFeatureDragStart", (i) => {
|
|
2382
|
-
this.textToMagnet = void 0,
|
|
2404
|
+
this.textToMagnet = void 0, st(i) ? this.dragged = i : yt(i) && this.activeLinks.push(...this.links.getTargetLinks(i.id, "text")), this.annotations.forEach((l) => {
|
|
2383
2405
|
const c = l.getSelectedFeature();
|
|
2384
2406
|
c && c !== i && l.unhover().unselect(), l.disableDetection();
|
|
2385
2407
|
}), this.emit(Me, i);
|
|
@@ -2391,17 +2413,17 @@ class wn extends Nr {
|
|
|
2391
2413
|
}), x(this, "_onLayoutEnd", (i) => {
|
|
2392
2414
|
i.ids.forEach((l, c) => {
|
|
2393
2415
|
this.links.getTargetLinks(l, "node").forEach((f) => {
|
|
2394
|
-
const
|
|
2395
|
-
|
|
2416
|
+
const g = this.getAnnotation(f.arrow), d = f.side, v = Ie(
|
|
2417
|
+
g,
|
|
2396
2418
|
d === "start" ? "end" : "start"
|
|
2397
2419
|
), y = i.positions.current[c], _ = this.ogma.getNode(l).getAttribute("radius"), C = Le(v, y, +_);
|
|
2398
|
-
Bt(
|
|
2420
|
+
Bt(g, d, C.x, C.y);
|
|
2399
2421
|
});
|
|
2400
2422
|
}), this.arrows.refreshLayer(), this.texts.refreshLayer();
|
|
2401
2423
|
}), x(this, "_onAdded", (i) => {
|
|
2402
|
-
this.emit(ur, i);
|
|
2403
|
-
}), x(this, "_onRemoved", (i) => {
|
|
2404
2424
|
this.emit(hr, i);
|
|
2425
|
+
}), x(this, "_onRemoved", (i) => {
|
|
2426
|
+
this.emit(ur, i);
|
|
2405
2427
|
}), x(this, "_onUnselect", (i) => {
|
|
2406
2428
|
this.selected = null, this.emit(lr, i);
|
|
2407
2429
|
}), x(this, "_onSelect", (i) => {
|
|
@@ -2412,58 +2434,58 @@ class wn extends Nr {
|
|
|
2412
2434
|
);
|
|
2413
2435
|
}), x(this, "_onUpdate", (i) => {
|
|
2414
2436
|
this.emit(cr, i);
|
|
2415
|
-
}), this.options = this.setOptions({ ...
|
|
2416
|
-
i.on(Me, this._onFeatureDragStart).on(De, this._onFeatureDrag).on(Vt, this._onFeatureDragEnd).on(cr, this.onUpdate).on(lr, this._onUnselect).on(ar, this._onSelect).on(
|
|
2437
|
+
}), this.options = this.setOptions({ ...xn, ...o }), this.ogma = e, this.arrows = new pn(e, this.options), this.texts = new bn(e, this.options), this.annotations = [this.arrows, this.texts], this.annotations.forEach((i) => {
|
|
2438
|
+
i.on(Me, this._onFeatureDragStart).on(De, this._onFeatureDrag).on(Vt, this._onFeatureDragEnd).on(cr, this.onUpdate).on(lr, this._onUnselect).on(ar, this._onSelect).on(hr, this._onAdded).on(ur, this._onRemoved);
|
|
2417
2439
|
}), this.ogma.events.on("nodesDragStart", this._onNodesDragStart).on("nodesDragProgress", this._onNodesDrag).on("layoutEnd", this._onLayoutEnd).on(["viewChanged", "rotate"], () => {
|
|
2418
2440
|
this.refreshTextLinks();
|
|
2419
2441
|
}), this.layer = e.layers.addCanvasLayer(this._render), this.layer.moveToBottom();
|
|
2420
2442
|
}
|
|
2421
|
-
_moveNodes(e,
|
|
2443
|
+
_moveNodes(e, o, i) {
|
|
2422
2444
|
e.forEach((l) => {
|
|
2423
2445
|
const c = this.links.getTargetLinks(l.getId(), "node"), f = l.getPosition();
|
|
2424
|
-
c.forEach((
|
|
2425
|
-
const d = this.getAnnotation(
|
|
2446
|
+
c.forEach((g) => {
|
|
2447
|
+
const d = this.getAnnotation(g.arrow), v = g.side, y = Ie(
|
|
2426
2448
|
d,
|
|
2427
2449
|
v === "start" ? "end" : "start"
|
|
2428
2450
|
);
|
|
2429
2451
|
let _ = f;
|
|
2430
2452
|
const C = +l.getAttribute("radius"), E = 1e-6;
|
|
2431
|
-
(
|
|
2453
|
+
(g.connectionPoint.x - (f.x - o) > E || g.connectionPoint.y - (f.y - i) > E) && (_ = Le(y, f, C)), Bt(d, v, _.x, _.y);
|
|
2432
2454
|
});
|
|
2433
2455
|
}), this.arrows.refreshLayer();
|
|
2434
2456
|
}
|
|
2435
|
-
_snapToText(e,
|
|
2457
|
+
_snapToText(e, o, i) {
|
|
2436
2458
|
const l = this.texts.detect(i, this.options.detectMargin);
|
|
2437
|
-
if (this.links.remove(e,
|
|
2459
|
+
if (this.links.remove(e, o), !l)
|
|
2438
2460
|
return !1;
|
|
2439
2461
|
this.textToMagnet = l;
|
|
2440
2462
|
const c = this.findMagnetPoint(kr, l, i);
|
|
2441
|
-
return c ? (Bt(e,
|
|
2463
|
+
return c ? (Bt(e, o, c.point.x, c.point.y), this.links.add(e, o, l.id, "text", c.magnet), !0) : !1;
|
|
2442
2464
|
}
|
|
2443
|
-
_findAndSnapToNode(e,
|
|
2465
|
+
_findAndSnapToNode(e, o, i) {
|
|
2444
2466
|
var l, c;
|
|
2445
|
-
const f = this.ogma.view.graphToScreenCoordinates(i),
|
|
2446
|
-
this.links.remove(e,
|
|
2467
|
+
const f = this.ogma.view.graphToScreenCoordinates(i), g = this.ogma.view.getElementAt(f);
|
|
2468
|
+
this.links.remove(e, o), g && g.isNode ? ((l = this.hoveredNode) == null || l.setSelected(!1), this.hoveredNode = g, g.setSelected(!0), this._snapToNode(e, o, g, f)) : ((c = this.hoveredNode) == null || c.setSelected(!1), this.hoveredNode = null);
|
|
2447
2469
|
}
|
|
2448
|
-
_snapToNode(e,
|
|
2449
|
-
const c = i.getPositionOnScreen(), f = +i.getAttribute("radius"),
|
|
2450
|
-
if (y <
|
|
2470
|
+
_snapToNode(e, o, i, l) {
|
|
2471
|
+
const c = i.getPositionOnScreen(), f = +i.getAttribute("radius"), g = f * this.ogma.view.getZoom(), d = l.x - c.x, v = l.y - c.y, y = Math.sqrt(d * d + v * v), _ = i.getPosition();
|
|
2472
|
+
if (y < g + this.options.detectMargin) {
|
|
2451
2473
|
let C = _;
|
|
2452
|
-
if (y >
|
|
2453
|
-
const E = Ie(e,
|
|
2474
|
+
if (y > g / 2) {
|
|
2475
|
+
const E = Ie(e, o === "end" ? "start" : "end");
|
|
2454
2476
|
C = Le(E, C, f);
|
|
2455
2477
|
}
|
|
2456
|
-
Bt(e,
|
|
2478
|
+
Bt(e, o, C.x, C.y), this.links.add(e, o, i.getId(), "node", C);
|
|
2457
2479
|
}
|
|
2458
2480
|
}
|
|
2459
2481
|
refreshTextLinks() {
|
|
2460
2482
|
let e = !1;
|
|
2461
2483
|
this.links.forEach(
|
|
2462
|
-
({ connectionPoint:
|
|
2484
|
+
({ connectionPoint: o, targetType: i, target: l, arrow: c, side: f }) => {
|
|
2463
2485
|
if (i !== "text")
|
|
2464
2486
|
return;
|
|
2465
2487
|
e = !0;
|
|
2466
|
-
const
|
|
2488
|
+
const g = this.getAnnotation(l), d = this.getAnnotation(c), v = mt(g), y = vt(g), _ = Fe(o, { x: v.width, y: v.height }), C = at(_, this.ogma.view.getAngle()), E = Ht(C, y);
|
|
2467
2489
|
Bt(d, f, E.x, E.y);
|
|
2468
2490
|
}
|
|
2469
2491
|
), e && this.arrows.refreshLayer();
|
|
@@ -2474,10 +2496,10 @@ class wn extends Nr {
|
|
|
2474
2496
|
getSelected() {
|
|
2475
2497
|
return this.selected;
|
|
2476
2498
|
}
|
|
2477
|
-
findMagnetPoint(e,
|
|
2499
|
+
findMagnetPoint(e, o, i) {
|
|
2478
2500
|
let l;
|
|
2479
2501
|
for (const c of e) {
|
|
2480
|
-
const f =
|
|
2502
|
+
const f = mt(o), g = vt(o), d = Fe(c, { x: f.width, y: f.height }), v = at(d, this.ogma.view.getAngle()), y = Ht(v, g), _ = Ut(Ct(y, i)), C = Math.min(
|
|
2481
2503
|
this.options.magnetRadius * this.ogma.view.getZoom(),
|
|
2482
2504
|
// when really zoomed in: avoid to snap on too far away magnets
|
|
2483
2505
|
f.width / 2,
|
|
@@ -2509,14 +2531,14 @@ class wn extends Nr {
|
|
|
2509
2531
|
* @param id the id of the annotation to select
|
|
2510
2532
|
*/
|
|
2511
2533
|
select(e) {
|
|
2512
|
-
const
|
|
2513
|
-
return
|
|
2534
|
+
const o = this.getAnnotations().features.find((i) => i.id === e);
|
|
2535
|
+
return o ? (st(o) ? this.arrows.select(o.id) : yt(o) && this.texts.select(o.id), this) : this;
|
|
2514
2536
|
}
|
|
2515
2537
|
/**
|
|
2516
2538
|
* Unselects the currently selected annotation
|
|
2517
2539
|
*/
|
|
2518
2540
|
unselect() {
|
|
2519
|
-
return this.selected ? (
|
|
2541
|
+
return this.selected ? (st(this.selected) ? this.arrows.unselect() : yt(this.selected) && this.texts.unselect(), this) : this;
|
|
2520
2542
|
}
|
|
2521
2543
|
/**
|
|
2522
2544
|
* Add an annotation to the controller
|
|
@@ -2524,11 +2546,11 @@ class wn extends Nr {
|
|
|
2524
2546
|
*/
|
|
2525
2547
|
add(e) {
|
|
2526
2548
|
if (Er(e)) {
|
|
2527
|
-
const [
|
|
2528
|
-
(l, c) => (
|
|
2549
|
+
const [o, i] = e.features.reduce(
|
|
2550
|
+
(l, c) => (st(c) ? l[1].push(c) : yt(c) && l[0].push(c), l),
|
|
2529
2551
|
[[], []]
|
|
2530
2552
|
);
|
|
2531
|
-
return
|
|
2553
|
+
return o.forEach((l) => this.add(l)), i.forEach((l) => this.add(l)), this.arrows.refreshLayer(), this;
|
|
2532
2554
|
}
|
|
2533
2555
|
switch (e.properties.type) {
|
|
2534
2556
|
case "text":
|
|
@@ -2546,28 +2568,28 @@ class wn extends Nr {
|
|
|
2546
2568
|
*/
|
|
2547
2569
|
remove(e) {
|
|
2548
2570
|
return Er(e) ? (e.features.forEach(
|
|
2549
|
-
(
|
|
2550
|
-
), this) : (
|
|
2571
|
+
(o) => this.remove(o)
|
|
2572
|
+
), this) : (st(e) ? (this.links.remove(e, "start"), this.links.remove(e, "end"), this.arrows.remove(e.id)) : this.texts.remove(e.id), this);
|
|
2551
2573
|
}
|
|
2552
2574
|
loadLink(e) {
|
|
2553
2575
|
if (e.properties.link)
|
|
2554
|
-
for (const
|
|
2555
|
-
const i = e.properties.link[
|
|
2576
|
+
for (const o of _r) {
|
|
2577
|
+
const i = e.properties.link[o];
|
|
2556
2578
|
if (!i)
|
|
2557
2579
|
continue;
|
|
2558
2580
|
const l = this.getAnnotation(i.id);
|
|
2559
2581
|
if (i.type === "text" && l)
|
|
2560
|
-
this.links.add(e,
|
|
2582
|
+
this.links.add(e, o, i.id, i.type, i.magnet);
|
|
2561
2583
|
else if (i.type === "node") {
|
|
2562
2584
|
const c = this.ogma.getNode(i.id);
|
|
2563
2585
|
if (!c)
|
|
2564
2586
|
continue;
|
|
2565
|
-
this.links.add(e,
|
|
2566
|
-
const f = c.getPosition(),
|
|
2587
|
+
this.links.add(e, o, i.id, i.type, i.magnet);
|
|
2588
|
+
const f = c.getPosition(), g = c.getAttribute("radius") || 0, d = Ie(
|
|
2567
2589
|
e,
|
|
2568
|
-
|
|
2569
|
-
), v = Le(d, f, +
|
|
2570
|
-
Bt(e,
|
|
2590
|
+
o === "start" ? "end" : "start"
|
|
2591
|
+
), v = Le(d, f, +g);
|
|
2592
|
+
Bt(e, o, v.x, v.y);
|
|
2571
2593
|
}
|
|
2572
2594
|
}
|
|
2573
2595
|
}
|
|
@@ -2577,8 +2599,8 @@ class wn extends Nr {
|
|
|
2577
2599
|
* @param y coord of the first point
|
|
2578
2600
|
* @param arrow The arrow to add
|
|
2579
2601
|
*/
|
|
2580
|
-
startArrow(e,
|
|
2581
|
-
this.cancelDrawing(), this.arrows.startDrawing(e,
|
|
2602
|
+
startArrow(e, o, i) {
|
|
2603
|
+
this.cancelDrawing(), this.arrows.startDrawing(e, o, i);
|
|
2582
2604
|
}
|
|
2583
2605
|
/**
|
|
2584
2606
|
* Start adding a text (add it, and give control to the user)
|
|
@@ -2586,23 +2608,27 @@ class wn extends Nr {
|
|
|
2586
2608
|
* @param y coord of the top left point
|
|
2587
2609
|
* @param text The text to add
|
|
2588
2610
|
*/
|
|
2589
|
-
startText(e,
|
|
2590
|
-
this.cancelDrawing(), this.texts.startDrawing(e,
|
|
2611
|
+
startText(e, o, i) {
|
|
2612
|
+
this.cancelDrawing(), this.texts.startDrawing(e, o, i);
|
|
2591
2613
|
}
|
|
2592
2614
|
/**
|
|
2593
2615
|
* Cancel drawing on the current frame
|
|
2594
2616
|
*/
|
|
2595
2617
|
cancelDrawing() {
|
|
2596
|
-
this.annotations.forEach((e) => e.cancelDrawing()), this.emit(
|
|
2618
|
+
this.annotations.forEach((e) => e.cancelDrawing()), this.emit(cn);
|
|
2597
2619
|
}
|
|
2598
2620
|
/**
|
|
2599
2621
|
* Update the style of the annotation with the given id
|
|
2600
2622
|
* @param id The id of the annotation to update
|
|
2601
2623
|
* @param style The new style
|
|
2602
2624
|
*/
|
|
2603
|
-
updateStyle(e,
|
|
2625
|
+
updateStyle(e, o) {
|
|
2604
2626
|
const i = this.getAnnotations().features.find((l) => l.id === e);
|
|
2605
|
-
return i ? (
|
|
2627
|
+
return i ? (st(i) ? this.arrows.updateStyle(i, o) : yt(i) && this.texts.updateStyle(i, o), this.onUpdate(i), this) : this;
|
|
2628
|
+
}
|
|
2629
|
+
setScale(e, o, i, l) {
|
|
2630
|
+
const c = this.getAnnotations().features.find((f) => f.id === e);
|
|
2631
|
+
return c ? (st(c) ? this.arrows.scale(c, o, i, l) : yt(c) && this.texts.scale(c, o, i, l), this.onUpdate(c), this) : this;
|
|
2606
2632
|
}
|
|
2607
2633
|
/**
|
|
2608
2634
|
*
|
|
@@ -2613,8 +2639,8 @@ class wn extends Nr {
|
|
|
2613
2639
|
type: "FeatureCollection",
|
|
2614
2640
|
features: []
|
|
2615
2641
|
};
|
|
2616
|
-
return this.annotations.forEach((
|
|
2617
|
-
e.features = [...e.features, ...
|
|
2642
|
+
return this.annotations.forEach((o) => {
|
|
2643
|
+
e.features = [...e.features, ...o.getElements()];
|
|
2618
2644
|
}), e;
|
|
2619
2645
|
}
|
|
2620
2646
|
/**
|
|
@@ -2623,7 +2649,7 @@ class wn extends Nr {
|
|
|
2623
2649
|
* @returns The annotation with the given id
|
|
2624
2650
|
*/
|
|
2625
2651
|
getAnnotation(e) {
|
|
2626
|
-
return this.getAnnotations().features.find((
|
|
2652
|
+
return this.getAnnotations().features.find((o) => o.id === e);
|
|
2627
2653
|
}
|
|
2628
2654
|
/**
|
|
2629
2655
|
* Destroy the controller and its elements
|
|
@@ -2632,7 +2658,7 @@ class wn extends Nr {
|
|
|
2632
2658
|
this.annotations.forEach((e) => e.destroy()), this.layer.destroy();
|
|
2633
2659
|
}
|
|
2634
2660
|
}
|
|
2635
|
-
const Tr = [8, 10, 12, 14, 16, 24, 32, 48, 64, 72], Sr = "none",
|
|
2661
|
+
const Tr = [8, 10, 12, 14, 16, 24, 32, 48, 64, 72], Sr = "none", Ur = "#333333", Pn = [
|
|
2636
2662
|
"#FFFFFF",
|
|
2637
2663
|
"#F44E3B",
|
|
2638
2664
|
"#FE9200",
|
|
@@ -2645,7 +2671,7 @@ const Tr = [8, 10, 12, 14, 16, 24, 32, 48, 64, 72], Sr = "none", Wr = "#333333",
|
|
|
2645
2671
|
"#333333",
|
|
2646
2672
|
"#808080",
|
|
2647
2673
|
"#cccccc"
|
|
2648
|
-
],
|
|
2674
|
+
], Rn = [
|
|
2649
2675
|
"Roboto",
|
|
2650
2676
|
"Helvetica Neue",
|
|
2651
2677
|
"Helvetica",
|
|
@@ -2657,72 +2683,72 @@ const Tr = [8, 10, 12, 14, 16, 24, 32, 48, 64, 72], Sr = "none", Wr = "#333333",
|
|
|
2657
2683
|
"Consolas",
|
|
2658
2684
|
"Courier New",
|
|
2659
2685
|
"monospace"
|
|
2660
|
-
].sort((
|
|
2686
|
+
].sort((u, e) => u.toLocaleLowerCase().localeCompare(e.toLocaleLowerCase())), En = {
|
|
2661
2687
|
head: "arrow",
|
|
2662
|
-
strokeColor:
|
|
2688
|
+
strokeColor: Ur,
|
|
2663
2689
|
strokeWidth: 5
|
|
2664
|
-
},
|
|
2690
|
+
}, _n = 0.25, kn = {
|
|
2665
2691
|
font: "Roboto",
|
|
2666
2692
|
fontSize: Tr[2],
|
|
2667
|
-
padding: Tr[2] *
|
|
2668
|
-
color:
|
|
2693
|
+
padding: Tr[2] * _n,
|
|
2694
|
+
color: Ur,
|
|
2669
2695
|
strokeType: Sr,
|
|
2670
2696
|
background: Sr
|
|
2671
2697
|
};
|
|
2672
|
-
function
|
|
2673
|
-
return
|
|
2698
|
+
function Tn(u) {
|
|
2699
|
+
return u.reduce((e, o) => e + o, 0) / u.length;
|
|
2674
2700
|
}
|
|
2675
|
-
function
|
|
2676
|
-
return e + (
|
|
2701
|
+
function In(u, e = 0, o = 1) {
|
|
2702
|
+
return e + (o - e) * u;
|
|
2677
2703
|
}
|
|
2678
|
-
function
|
|
2679
|
-
return (
|
|
2704
|
+
function Ln(u, e = 0, o = 1) {
|
|
2705
|
+
return (u - e) / (o - e);
|
|
2680
2706
|
}
|
|
2681
|
-
function
|
|
2707
|
+
function Fn() {
|
|
2682
2708
|
return Or(null);
|
|
2683
2709
|
}
|
|
2684
|
-
const
|
|
2710
|
+
const Wr = Or(
|
|
2685
2711
|
void 0
|
|
2686
|
-
),
|
|
2712
|
+
), $n = () => qr(Wr), Sn = (u, e) => {
|
|
2687
2713
|
switch (e.type) {
|
|
2688
2714
|
case "add":
|
|
2689
2715
|
return {
|
|
2690
|
-
...
|
|
2691
|
-
features: [...
|
|
2716
|
+
...u,
|
|
2717
|
+
features: [...u.features, e.payload]
|
|
2692
2718
|
};
|
|
2693
2719
|
case "remove":
|
|
2694
2720
|
return {
|
|
2695
|
-
...
|
|
2696
|
-
features:
|
|
2721
|
+
...u,
|
|
2722
|
+
features: u.features.filter((o) => o.id !== e.payload.id)
|
|
2697
2723
|
};
|
|
2698
2724
|
case "update":
|
|
2699
2725
|
return {
|
|
2700
|
-
...
|
|
2701
|
-
features:
|
|
2702
|
-
(
|
|
2726
|
+
...u,
|
|
2727
|
+
features: u.features.map(
|
|
2728
|
+
(o) => o.id === e.payload.id ? e.payload : o
|
|
2703
2729
|
)
|
|
2704
2730
|
};
|
|
2705
2731
|
default:
|
|
2706
|
-
return
|
|
2732
|
+
return u;
|
|
2707
2733
|
}
|
|
2708
|
-
},
|
|
2709
|
-
const e =
|
|
2734
|
+
}, jn = ({ children: u }) => {
|
|
2735
|
+
const e = Gr(), [o, i] = Yr(Sn, {
|
|
2710
2736
|
type: "FeatureCollection",
|
|
2711
2737
|
features: []
|
|
2712
|
-
}), [l, c] = Nt(null), [f,
|
|
2738
|
+
}), [l, c] = Nt(null), [f, g] = Nt(En), [d, v] = Nt(kn), [y, _] = Nt(), [C, E] = Nt(1), [P, S] = Nt(1);
|
|
2713
2739
|
return er(() => {
|
|
2714
2740
|
if (!e)
|
|
2715
2741
|
return;
|
|
2716
|
-
const $ = new
|
|
2742
|
+
const $ = new An(e, {
|
|
2717
2743
|
minArrowHeight: 1
|
|
2718
|
-
}), L =
|
|
2719
|
-
return
|
|
2744
|
+
}), L = Tn(e.getNodes().getAttribute("radius")) / 5, T = C;
|
|
2745
|
+
return g({
|
|
2720
2746
|
...f,
|
|
2721
2747
|
strokeWidth: (f.strokeWidth || 1) * T
|
|
2722
2748
|
}), E(T), S(L), $.on("select", (B) => {
|
|
2723
|
-
|
|
2749
|
+
st(B) ? g({
|
|
2724
2750
|
...B.properties.style || {}
|
|
2725
|
-
}) :
|
|
2751
|
+
}) : yt(B) && v({
|
|
2726
2752
|
...B.properties.style || {}
|
|
2727
2753
|
}), c(B);
|
|
2728
2754
|
}).on("unselect", () => {
|
|
@@ -2735,17 +2761,17 @@ const Ur = Or(
|
|
|
2735
2761
|
}, [y, f, l]), er(() => {
|
|
2736
2762
|
y && l && (l == null ? void 0 : l.properties.type) === "text" && y.updateStyle(l.id, d);
|
|
2737
2763
|
}, [y, d, l]), /* @__PURE__ */ Zr.jsx(
|
|
2738
|
-
|
|
2764
|
+
Wr.Provider,
|
|
2739
2765
|
{
|
|
2740
2766
|
value: {
|
|
2741
|
-
annotations:
|
|
2767
|
+
annotations: o,
|
|
2742
2768
|
updateAnnotations: i,
|
|
2743
2769
|
currentAnnotation: l,
|
|
2744
2770
|
setCurrentAnnotation: c,
|
|
2745
2771
|
textStyle: d,
|
|
2746
2772
|
setTextStyle: v,
|
|
2747
2773
|
arrowStyle: f,
|
|
2748
|
-
setArrowStyle:
|
|
2774
|
+
setArrowStyle: g,
|
|
2749
2775
|
arrowWidthFactor: C,
|
|
2750
2776
|
setArrowWidthFactor: E,
|
|
2751
2777
|
textSizeFactor: P,
|
|
@@ -2753,24 +2779,24 @@ const Ur = Or(
|
|
|
2753
2779
|
editor: y,
|
|
2754
2780
|
setEditor: _
|
|
2755
2781
|
},
|
|
2756
|
-
children:
|
|
2782
|
+
children: u
|
|
2757
2783
|
}
|
|
2758
2784
|
);
|
|
2759
2785
|
};
|
|
2760
2786
|
export {
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2787
|
+
Wr as AnnotationsContext,
|
|
2788
|
+
jn as AnnotationsContextProvider,
|
|
2789
|
+
Ur as BLACK,
|
|
2790
|
+
_n as RELATIVE_PADDING,
|
|
2765
2791
|
Sr as TRANSPARENT,
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2792
|
+
Fn as createAnnotationsContext,
|
|
2793
|
+
En as defaultArrowStyle,
|
|
2794
|
+
Pn as defaultColors,
|
|
2795
|
+
kn as defaultTextStyle,
|
|
2770
2796
|
Tr as fontSizes,
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2797
|
+
Rn as fonts,
|
|
2798
|
+
In as interpolate,
|
|
2799
|
+
Tn as mean,
|
|
2800
|
+
Ln as normalize,
|
|
2801
|
+
$n as useAnnotationsContext
|
|
2776
2802
|
};
|