@annotorious/annotorious 3.0.19 → 3.0.20
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/annotorious.es.js +1021 -1014
- package/dist/annotorious.es.js.map +1 -1
- package/dist/annotorious.js +1 -1
- package/dist/annotorious.js.map +1 -1
- package/package.json +2 -2
- package/src/Annotorious.ts +2 -4
- package/src/annotation/SVGAnnotationLayer.svelte +5 -1
- package/src/annotation/tools/polygon/RubberbandPolygon.svelte +1 -1
package/dist/annotorious.es.js
CHANGED
|
@@ -10,16 +10,16 @@ function ft(e, t) {
|
|
|
10
10
|
e
|
|
11
11
|
);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function qt(e) {
|
|
14
14
|
return e();
|
|
15
15
|
}
|
|
16
16
|
function wt() {
|
|
17
17
|
return /* @__PURE__ */ Object.create(null);
|
|
18
18
|
}
|
|
19
19
|
function ge(e) {
|
|
20
|
-
e.forEach(
|
|
20
|
+
e.forEach(qt);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function K(e) {
|
|
23
23
|
return typeof e == "function";
|
|
24
24
|
}
|
|
25
25
|
function Q(e, t) {
|
|
@@ -84,35 +84,35 @@ function bt(e) {
|
|
|
84
84
|
for (const n in e) n[0] !== "$" && (t[n] = e[n]);
|
|
85
85
|
return t;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function Ke(e) {
|
|
88
88
|
return e ?? "";
|
|
89
89
|
}
|
|
90
90
|
function he(e, t) {
|
|
91
91
|
e.appendChild(t);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function B(e, t, n) {
|
|
94
94
|
e.insertBefore(t, n || null);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function I(e) {
|
|
97
97
|
e.parentNode && e.parentNode.removeChild(e);
|
|
98
98
|
}
|
|
99
99
|
function gt(e, t) {
|
|
100
100
|
for (let n = 0; n < e.length; n += 1)
|
|
101
101
|
e[n] && e[n].d(t);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function C(e) {
|
|
104
104
|
return document.createElementNS("http://www.w3.org/2000/svg", e);
|
|
105
105
|
}
|
|
106
106
|
function Zt(e) {
|
|
107
107
|
return document.createTextNode(e);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function se() {
|
|
110
110
|
return Zt(" ");
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function ae() {
|
|
113
113
|
return Zt("");
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function z(e, t, n, o) {
|
|
116
116
|
return e.addEventListener(t, n, o), () => e.removeEventListener(t, n, o);
|
|
117
117
|
}
|
|
118
118
|
function d(e, t, n) {
|
|
@@ -121,24 +121,24 @@ function d(e, t, n) {
|
|
|
121
121
|
function bn(e) {
|
|
122
122
|
return Array.from(e.childNodes);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function ye(e, t, n) {
|
|
125
125
|
e.classList.toggle(t, !!n);
|
|
126
126
|
}
|
|
127
127
|
function En(e, t, { bubbles: n = !1, cancelable: o = !1 } = {}) {
|
|
128
128
|
return new CustomEvent(e, { detail: t, bubbles: n, cancelable: o });
|
|
129
129
|
}
|
|
130
|
-
let
|
|
131
|
-
function
|
|
132
|
-
|
|
130
|
+
let Re;
|
|
131
|
+
function Ue(e) {
|
|
132
|
+
Re = e;
|
|
133
133
|
}
|
|
134
134
|
function xt() {
|
|
135
|
-
if (!
|
|
136
|
-
return
|
|
135
|
+
if (!Re) throw new Error("Function called outside component initialization");
|
|
136
|
+
return Re;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function Ne(e) {
|
|
139
139
|
xt().$$.on_mount.push(e);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Ie() {
|
|
142
142
|
const e = xt();
|
|
143
143
|
return (t, n, { cancelable: o = !1 } = {}) => {
|
|
144
144
|
const i = e.$$.callbacks[t];
|
|
@@ -160,41 +160,41 @@ function me(e, t) {
|
|
|
160
160
|
const n = e.$$.callbacks[t.type];
|
|
161
161
|
n && n.slice().forEach((o) => o.call(this, t));
|
|
162
162
|
}
|
|
163
|
-
const
|
|
164
|
-
let
|
|
163
|
+
const Me = [], We = [];
|
|
164
|
+
let Le = [];
|
|
165
165
|
const Et = [], An = /* @__PURE__ */ Promise.resolve();
|
|
166
166
|
let ut = !1;
|
|
167
167
|
function Sn() {
|
|
168
168
|
ut || (ut = !0, An.then($t));
|
|
169
169
|
}
|
|
170
170
|
function dt(e) {
|
|
171
|
-
|
|
171
|
+
Le.push(e);
|
|
172
172
|
}
|
|
173
173
|
const $e = /* @__PURE__ */ new Set();
|
|
174
|
-
let
|
|
174
|
+
let Ee = 0;
|
|
175
175
|
function $t() {
|
|
176
|
-
if (
|
|
176
|
+
if (Ee !== 0)
|
|
177
177
|
return;
|
|
178
|
-
const e =
|
|
178
|
+
const e = Re;
|
|
179
179
|
do {
|
|
180
180
|
try {
|
|
181
|
-
for (;
|
|
182
|
-
const t =
|
|
183
|
-
|
|
181
|
+
for (; Ee < Me.length; ) {
|
|
182
|
+
const t = Me[Ee];
|
|
183
|
+
Ee++, Ue(t), Tn(t.$$);
|
|
184
184
|
}
|
|
185
185
|
} catch (t) {
|
|
186
|
-
throw
|
|
186
|
+
throw Me.length = 0, Ee = 0, t;
|
|
187
187
|
}
|
|
188
|
-
for (
|
|
189
|
-
for (let t = 0; t <
|
|
190
|
-
const n =
|
|
188
|
+
for (Ue(null), Me.length = 0, Ee = 0; We.length; ) We.pop()();
|
|
189
|
+
for (let t = 0; t < Le.length; t += 1) {
|
|
190
|
+
const n = Le[t];
|
|
191
191
|
$e.has(n) || ($e.add(n), n());
|
|
192
192
|
}
|
|
193
|
-
|
|
194
|
-
} while (
|
|
193
|
+
Le.length = 0;
|
|
194
|
+
} while (Me.length);
|
|
195
195
|
for (; Et.length; )
|
|
196
196
|
Et.pop()();
|
|
197
|
-
ut = !1, $e.clear(),
|
|
197
|
+
ut = !1, $e.clear(), Ue(e);
|
|
198
198
|
}
|
|
199
199
|
function Tn(e) {
|
|
200
200
|
if (e.fragment !== null) {
|
|
@@ -205,55 +205,55 @@ function Tn(e) {
|
|
|
205
205
|
}
|
|
206
206
|
function Mn(e) {
|
|
207
207
|
const t = [], n = [];
|
|
208
|
-
|
|
208
|
+
Le.forEach((o) => e.indexOf(o) === -1 ? t.push(o) : n.push(o)), n.forEach((o) => o()), Le = t;
|
|
209
209
|
}
|
|
210
210
|
const He = /* @__PURE__ */ new Set();
|
|
211
|
-
let
|
|
212
|
-
function
|
|
213
|
-
|
|
211
|
+
let be;
|
|
212
|
+
function re() {
|
|
213
|
+
be = {
|
|
214
214
|
r: 0,
|
|
215
215
|
c: [],
|
|
216
|
-
p:
|
|
216
|
+
p: be
|
|
217
217
|
// parent group
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
|
|
220
|
+
function le() {
|
|
221
|
+
be.r || ge(be.c), be = be.p;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function O(e, t) {
|
|
224
224
|
e && e.i && (He.delete(e), e.i(t));
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function P(e, t, n, o) {
|
|
227
227
|
if (e && e.o) {
|
|
228
228
|
if (He.has(e)) return;
|
|
229
|
-
He.add(e),
|
|
229
|
+
He.add(e), be.c.push(() => {
|
|
230
230
|
He.delete(e), o && (n && e.d(1), o());
|
|
231
231
|
}), e.o(t);
|
|
232
232
|
} else o && o();
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function ke(e) {
|
|
235
235
|
return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function ne(e) {
|
|
238
238
|
e && e.c();
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function ee(e, t, n) {
|
|
241
241
|
const { fragment: o, after_update: i } = e.$$;
|
|
242
242
|
o && o.m(t, n), dt(() => {
|
|
243
|
-
const s = e.$$.on_mount.map(
|
|
243
|
+
const s = e.$$.on_mount.map(qt).filter(K);
|
|
244
244
|
e.$$.on_destroy ? e.$$.on_destroy.push(...s) : ge(s), e.$$.on_mount = [];
|
|
245
245
|
}), i.forEach(dt);
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function te(e, t) {
|
|
248
248
|
const n = e.$$;
|
|
249
249
|
n.fragment !== null && (Mn(n.after_update), ge(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
|
|
250
250
|
}
|
|
251
251
|
function vn(e, t) {
|
|
252
|
-
e.$$.dirty[0] === -1 && (
|
|
252
|
+
e.$$.dirty[0] === -1 && (Me.push(e), Sn(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
const a =
|
|
256
|
-
|
|
254
|
+
function oe(e, t, n, o, i, s, r = null, l = [-1]) {
|
|
255
|
+
const a = Re;
|
|
256
|
+
Ue(e);
|
|
257
257
|
const c = e.$$ = {
|
|
258
258
|
fragment: null,
|
|
259
259
|
ctx: [],
|
|
@@ -277,20 +277,20 @@ function te(e, t, n, o, i, s, r = null, l = [-1]) {
|
|
|
277
277
|
};
|
|
278
278
|
r && r(c.root);
|
|
279
279
|
let u = !1;
|
|
280
|
-
if (c.ctx = n ? n(e, t.props || {}, (f, h, ...
|
|
281
|
-
const g =
|
|
280
|
+
if (c.ctx = n ? n(e, t.props || {}, (f, h, ...y) => {
|
|
281
|
+
const g = y.length ? y[0] : h;
|
|
282
282
|
return c.ctx && i(c.ctx[f], c.ctx[f] = g) && (!c.skip_bound && c.bound[f] && c.bound[f](g), u && vn(e, f)), h;
|
|
283
283
|
}) : [], c.update(), u = !0, ge(c.before_update), c.fragment = o ? o(c.ctx) : !1, t.target) {
|
|
284
284
|
if (t.hydrate) {
|
|
285
285
|
const f = bn(t.target);
|
|
286
|
-
c.fragment && c.fragment.l(f), f.forEach(
|
|
286
|
+
c.fragment && c.fragment.l(f), f.forEach(I);
|
|
287
287
|
} else
|
|
288
288
|
c.fragment && c.fragment.c();
|
|
289
|
-
t.intro &&
|
|
289
|
+
t.intro && O(e.$$.fragment), ee(e, t.target, t.anchor), $t();
|
|
290
290
|
}
|
|
291
|
-
|
|
291
|
+
Ue(a);
|
|
292
292
|
}
|
|
293
|
-
class
|
|
293
|
+
class ie {
|
|
294
294
|
constructor() {
|
|
295
295
|
/**
|
|
296
296
|
* ### PRIVATE API
|
|
@@ -311,7 +311,7 @@ class ne {
|
|
|
311
311
|
}
|
|
312
312
|
/** @returns {void} */
|
|
313
313
|
$destroy() {
|
|
314
|
-
|
|
314
|
+
te(this, 1), this.$destroy = j;
|
|
315
315
|
}
|
|
316
316
|
/**
|
|
317
317
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -320,7 +320,7 @@ class ne {
|
|
|
320
320
|
* @returns {() => void}
|
|
321
321
|
*/
|
|
322
322
|
$on(t, n) {
|
|
323
|
-
if (!
|
|
323
|
+
if (!K(n))
|
|
324
324
|
return j;
|
|
325
325
|
const o = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
|
|
326
326
|
return o.push(n), () => {
|
|
@@ -339,7 +339,7 @@ class ne {
|
|
|
339
339
|
const Ln = "4";
|
|
340
340
|
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Ln);
|
|
341
341
|
var F = /* @__PURE__ */ ((e) => (e.ELLIPSE = "ELLIPSE", e.POLYGON = "POLYGON", e.RECTANGLE = "RECTANGLE", e))(F || {});
|
|
342
|
-
const mt = {}, pt = (e, t) => mt[e] = t, ht = (e) => mt[e.type].area(e), kn = (e, t, n) => mt[e.type].intersects(e, t, n),
|
|
342
|
+
const mt = {}, pt = (e, t) => mt[e] = t, ht = (e) => mt[e.type].area(e), kn = (e, t, n) => mt[e.type].intersects(e, t, n), qe = (e) => {
|
|
343
343
|
let t = 1 / 0, n = 1 / 0, o = -1 / 0, i = -1 / 0;
|
|
344
344
|
return e.forEach(([s, r]) => {
|
|
345
345
|
t = Math.min(t, s), n = Math.min(n, r), o = Math.max(o, s), i = Math.max(i, r);
|
|
@@ -347,8 +347,8 @@ const mt = {}, pt = (e, t) => mt[e] = t, ht = (e) => mt[e.type].area(e), kn = (e
|
|
|
347
347
|
}, In = {
|
|
348
348
|
area: (e) => Math.PI * e.geometry.rx * e.geometry.ry,
|
|
349
349
|
intersects: (e, t, n) => {
|
|
350
|
-
const { cx: o, cy: i, rx: s, ry: r } = e.geometry, l = 0, a = Math.cos(l), c = Math.sin(l), u = t - o, f = n - i, h = a * u + c * f,
|
|
351
|
-
return h * h / (s * s) +
|
|
350
|
+
const { cx: o, cy: i, rx: s, ry: r } = e.geometry, l = 0, a = Math.cos(l), c = Math.sin(l), u = t - o, f = n - i, h = a * u + c * f, y = c * u - a * f;
|
|
351
|
+
return h * h / (s * s) + y * y / (r * r) <= 1;
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
354
|
pt(F.ELLIPSE, In);
|
|
@@ -383,19 +383,19 @@ const Je = (e) => Fe(e.target), Fe = (e) => {
|
|
|
383
383
|
const n = typeof e == "string" ? e : e.value, o = /^(xywh)=(pixel|percent)?:?(.+?),(.+?),(.+?),(.+)*/g, i = [...n.matchAll(o)][0], [s, r, l, a, c, u, f] = i;
|
|
384
384
|
if (r !== "xywh") throw new Error("Unsupported MediaFragment: " + n);
|
|
385
385
|
if (l && l !== "pixel") throw new Error(`Unsupported MediaFragment unit: ${l}`);
|
|
386
|
-
const [h,
|
|
386
|
+
const [h, y, g, m] = [a, c, u, f].map(parseFloat);
|
|
387
387
|
return {
|
|
388
388
|
type: F.RECTANGLE,
|
|
389
389
|
geometry: {
|
|
390
390
|
x: h,
|
|
391
|
-
y
|
|
391
|
+
y,
|
|
392
392
|
w: g,
|
|
393
|
-
h:
|
|
393
|
+
h: m,
|
|
394
394
|
bounds: {
|
|
395
395
|
minX: h,
|
|
396
|
-
minY: t ?
|
|
396
|
+
minY: t ? y - m : y,
|
|
397
397
|
maxX: h + g,
|
|
398
|
-
maxY: t ?
|
|
398
|
+
maxY: t ? y : y + m
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
};
|
|
@@ -425,7 +425,7 @@ const Je = (e) => Fe(e.target), Fe = (e) => {
|
|
|
425
425
|
type: F.POLYGON,
|
|
426
426
|
geometry: {
|
|
427
427
|
points: i,
|
|
428
|
-
bounds:
|
|
428
|
+
bounds: qe(i)
|
|
429
429
|
}
|
|
430
430
|
};
|
|
431
431
|
}, Un = (e) => {
|
|
@@ -464,11 +464,11 @@ const Je = (e) => Fe(e.target), Fe = (e) => {
|
|
|
464
464
|
if (t)
|
|
465
465
|
return { type: "SvgSelector", value: t };
|
|
466
466
|
throw `Unsupported shape type: ${e.type}`;
|
|
467
|
-
},
|
|
467
|
+
}, W = [];
|
|
468
468
|
for (let e = 0; e < 256; ++e)
|
|
469
|
-
|
|
469
|
+
W.push((e + 256).toString(16).slice(1));
|
|
470
470
|
function Vn(e, t = 0) {
|
|
471
|
-
return (
|
|
471
|
+
return (W[e[t + 0]] + W[e[t + 1]] + W[e[t + 2]] + W[e[t + 3]] + "-" + W[e[t + 4]] + W[e[t + 5]] + "-" + W[e[t + 6]] + W[e[t + 7]] + "-" + W[e[t + 8]] + W[e[t + 9]] + "-" + W[e[t + 10]] + W[e[t + 11]] + W[e[t + 12]] + W[e[t + 13]] + W[e[t + 14]] + W[e[t + 15]]).toLowerCase();
|
|
472
472
|
}
|
|
473
473
|
let et;
|
|
474
474
|
const Gn = new Uint8Array(16);
|
|
@@ -489,7 +489,7 @@ function tn(e, t, n) {
|
|
|
489
489
|
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, Vn(o);
|
|
490
490
|
}
|
|
491
491
|
var Tt = Object.prototype.hasOwnProperty;
|
|
492
|
-
function
|
|
492
|
+
function _e(e, t) {
|
|
493
493
|
var n, o;
|
|
494
494
|
if (e === t) return !0;
|
|
495
495
|
if (e && t && (n = e.constructor) === t.constructor) {
|
|
@@ -497,13 +497,13 @@ function ye(e, t) {
|
|
|
497
497
|
if (n === RegExp) return e.toString() === t.toString();
|
|
498
498
|
if (n === Array) {
|
|
499
499
|
if ((o = e.length) === t.length)
|
|
500
|
-
for (; o-- &&
|
|
500
|
+
for (; o-- && _e(e[o], t[o]); ) ;
|
|
501
501
|
return o === -1;
|
|
502
502
|
}
|
|
503
503
|
if (!n || typeof e == "object") {
|
|
504
504
|
o = 0;
|
|
505
505
|
for (n in e)
|
|
506
|
-
if (Tt.call(e, n) && ++o && !Tt.call(t, n) || !(n in t) || !
|
|
506
|
+
if (Tt.call(e, n) && ++o && !Tt.call(t, n) || !(n in t) || !_e(e[n], t[n])) return !1;
|
|
507
507
|
return Object.keys(t).length === o;
|
|
508
508
|
}
|
|
509
509
|
}
|
|
@@ -514,19 +514,19 @@ function tt() {
|
|
|
514
514
|
function Hn(e, t) {
|
|
515
515
|
return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
|
|
516
516
|
}
|
|
517
|
-
const
|
|
517
|
+
const Ae = [];
|
|
518
518
|
function yt(e, t = tt) {
|
|
519
519
|
let n;
|
|
520
520
|
const o = /* @__PURE__ */ new Set();
|
|
521
521
|
function i(l) {
|
|
522
522
|
if (Hn(e, l) && (e = l, n)) {
|
|
523
|
-
const a = !
|
|
523
|
+
const a = !Ae.length;
|
|
524
524
|
for (const c of o)
|
|
525
|
-
c[1](),
|
|
525
|
+
c[1](), Ae.push(c, e);
|
|
526
526
|
if (a) {
|
|
527
|
-
for (let c = 0; c <
|
|
528
|
-
|
|
529
|
-
|
|
527
|
+
for (let c = 0; c < Ae.length; c += 2)
|
|
528
|
+
Ae[c][0](Ae[c + 1]);
|
|
529
|
+
Ae.length = 0;
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
532
|
}
|
|
@@ -559,56 +559,58 @@ const Fn = (e) => {
|
|
|
559
559
|
};
|
|
560
560
|
};
|
|
561
561
|
var nn = /* @__PURE__ */ ((e) => (e.EDIT = "EDIT", e.SELECT = "SELECT", e.NONE = "NONE", e))(nn || {});
|
|
562
|
-
const Ge = { selected: [] },
|
|
562
|
+
const Ge = { selected: [] }, Kn = (e, t, n) => {
|
|
563
563
|
const { subscribe: o, set: i } = yt(Ge);
|
|
564
564
|
let s = t, r = Ge;
|
|
565
565
|
o((g) => r = g);
|
|
566
566
|
const l = () => {
|
|
567
|
-
|
|
567
|
+
_e(r, Ge) || i(Ge);
|
|
568
568
|
}, a = () => {
|
|
569
569
|
var g;
|
|
570
570
|
return ((g = r.selected) == null ? void 0 : g.length) === 0;
|
|
571
571
|
}, c = (g) => {
|
|
572
572
|
if (a())
|
|
573
573
|
return !1;
|
|
574
|
-
const
|
|
575
|
-
return r.selected.some((A) => A.id ===
|
|
576
|
-
}, u = (g,
|
|
574
|
+
const m = typeof g == "string" ? g : g.id;
|
|
575
|
+
return r.selected.some((A) => A.id === m);
|
|
576
|
+
}, u = (g, m) => {
|
|
577
577
|
let A;
|
|
578
578
|
if (Array.isArray(g)) {
|
|
579
|
-
if (A = g.map((
|
|
580
|
-
console.warn("Invalid selection: " + g.filter((
|
|
579
|
+
if (A = g.map((_) => e.getAnnotation(_)).filter(Boolean), A.length < g.length) {
|
|
580
|
+
console.warn("Invalid selection: " + g.filter((_) => !A.some((w) => w.id === _)));
|
|
581
581
|
return;
|
|
582
582
|
}
|
|
583
583
|
} else {
|
|
584
|
-
const
|
|
585
|
-
if (!
|
|
584
|
+
const _ = e.getAnnotation(g);
|
|
585
|
+
if (!_) {
|
|
586
586
|
console.warn("Invalid selection: " + g);
|
|
587
587
|
return;
|
|
588
588
|
}
|
|
589
|
-
A = [
|
|
589
|
+
A = [_];
|
|
590
590
|
}
|
|
591
|
-
const
|
|
591
|
+
const p = A.reduce((_, w) => {
|
|
592
592
|
const E = Mt(w, s, n);
|
|
593
|
-
return E === "EDIT" ? [...
|
|
593
|
+
return E === "EDIT" ? [..._, { id: w.id, editable: !0 }] : E === "SELECT" ? [..._, { id: w.id }] : _;
|
|
594
594
|
}, []);
|
|
595
|
-
i({ selected:
|
|
596
|
-
}, f = (g,
|
|
597
|
-
const A = Array.isArray(g) ? g : [g],
|
|
595
|
+
i({ selected: p, event: m });
|
|
596
|
+
}, f = (g, m) => {
|
|
597
|
+
const A = Array.isArray(g) ? g : [g], p = A.map((_) => e.getAnnotation(_)).filter((_) => !!_);
|
|
598
598
|
i({
|
|
599
|
-
selected:
|
|
600
|
-
const w =
|
|
601
|
-
return { id:
|
|
599
|
+
selected: p.map((_) => {
|
|
600
|
+
const w = m === void 0 ? Mt(_, s, n) === "EDIT" : m;
|
|
601
|
+
return { id: _.id, editable: w };
|
|
602
602
|
})
|
|
603
|
-
}),
|
|
603
|
+
}), p.length !== A.length && console.warn("Invalid selection", g);
|
|
604
604
|
}, h = (g) => {
|
|
605
605
|
if (a())
|
|
606
606
|
return !1;
|
|
607
|
-
const { selected:
|
|
608
|
-
|
|
609
|
-
},
|
|
607
|
+
const { selected: m } = r;
|
|
608
|
+
m.some(({ id: A }) => g.includes(A)) && i({ selected: m.filter(({ id: A }) => !g.includes(A)) });
|
|
609
|
+
}, y = (g) => {
|
|
610
|
+
s = g, f(r.selected.map(({ id: m }) => m));
|
|
611
|
+
};
|
|
610
612
|
return e.observe(
|
|
611
|
-
({ changes: g }) => h((g.deleted || []).map((
|
|
613
|
+
({ changes: g }) => h((g.deleted || []).map((m) => m.id))
|
|
612
614
|
), {
|
|
613
615
|
get event() {
|
|
614
616
|
return r ? r.event : null;
|
|
@@ -623,28 +625,28 @@ const Ge = { selected: [] }, Wn = (e, t, n) => {
|
|
|
623
625
|
isEmpty: a,
|
|
624
626
|
isSelected: c,
|
|
625
627
|
setSelected: f,
|
|
626
|
-
setUserSelectAction:
|
|
628
|
+
setUserSelectAction: y,
|
|
627
629
|
subscribe: o,
|
|
628
630
|
userSelect: u
|
|
629
631
|
};
|
|
630
632
|
}, Mt = (e, t, n) => {
|
|
631
633
|
const o = n ? n.serialize(e) : e;
|
|
632
634
|
return typeof t == "function" ? t(o) : t || "EDIT";
|
|
633
|
-
},
|
|
635
|
+
}, q = [];
|
|
634
636
|
for (let e = 0; e < 256; ++e)
|
|
635
|
-
|
|
636
|
-
function
|
|
637
|
-
return (
|
|
637
|
+
q.push((e + 256).toString(16).slice(1));
|
|
638
|
+
function Wn(e, t = 0) {
|
|
639
|
+
return (q[e[t + 0]] + q[e[t + 1]] + q[e[t + 2]] + q[e[t + 3]] + "-" + q[e[t + 4]] + q[e[t + 5]] + "-" + q[e[t + 6]] + q[e[t + 7]] + "-" + q[e[t + 8]] + q[e[t + 9]] + "-" + q[e[t + 10]] + q[e[t + 11]] + q[e[t + 12]] + q[e[t + 13]] + q[e[t + 14]] + q[e[t + 15]]).toLowerCase();
|
|
638
640
|
}
|
|
639
641
|
let nt;
|
|
640
|
-
const
|
|
642
|
+
const qn = new Uint8Array(16);
|
|
641
643
|
function Jn() {
|
|
642
644
|
if (!nt) {
|
|
643
645
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
644
646
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
645
647
|
nt = crypto.getRandomValues.bind(crypto);
|
|
646
648
|
}
|
|
647
|
-
return nt(
|
|
649
|
+
return nt(qn);
|
|
648
650
|
}
|
|
649
651
|
const Qn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), vt = { randomUUID: Qn };
|
|
650
652
|
function on(e, t, n) {
|
|
@@ -652,7 +654,7 @@ function on(e, t, n) {
|
|
|
652
654
|
return vt.randomUUID();
|
|
653
655
|
e = e || {};
|
|
654
656
|
const o = e.random || (e.rng || Jn)();
|
|
655
|
-
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128,
|
|
657
|
+
return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, Wn(o);
|
|
656
658
|
}
|
|
657
659
|
const ot = (e) => {
|
|
658
660
|
const t = (n) => {
|
|
@@ -678,8 +680,8 @@ const ot = (e) => {
|
|
|
678
680
|
return e.bodies.filter((o) => !n.has(o.id));
|
|
679
681
|
}, $n = (e, t) => t.bodies.map((n) => {
|
|
680
682
|
const o = e.bodies.find((i) => i.id === n.id);
|
|
681
|
-
return { newBody: n, oldBody: o && !
|
|
682
|
-
}).filter(({ oldBody: n }) => n).map(({ oldBody: n, newBody: o }) => ({ oldBody: n, newBody: o })), eo = (e, t) => !
|
|
683
|
+
return { newBody: n, oldBody: o && !_e(o, n) ? o : void 0 };
|
|
684
|
+
}).filter(({ oldBody: n }) => n).map(({ oldBody: n, newBody: o }) => ({ oldBody: n, newBody: o })), eo = (e, t) => !_e(e.target, t.target), sn = (e, t) => {
|
|
683
685
|
const n = Zn(e, t), o = xn(e, t), i = $n(e, t);
|
|
684
686
|
return {
|
|
685
687
|
oldValue: e,
|
|
@@ -722,9 +724,9 @@ const to = (e, t) => {
|
|
|
722
724
|
...(t.deleted || []).filter((f) => !n.has(f.id))
|
|
723
725
|
], u = [
|
|
724
726
|
...(e.updated || []).filter(({ newValue: f }) => !s.has(f.id)).map((f) => {
|
|
725
|
-
const { oldValue: h, newValue:
|
|
726
|
-
if (r.has(
|
|
727
|
-
const g = t.updated.find((
|
|
727
|
+
const { oldValue: h, newValue: y } = f;
|
|
728
|
+
if (r.has(y.id)) {
|
|
729
|
+
const g = t.updated.find((m) => m.oldValue.id === y.id).newValue;
|
|
728
730
|
return sn(h, g);
|
|
729
731
|
} else
|
|
730
732
|
return f;
|
|
@@ -747,170 +749,170 @@ const to = (e, t) => {
|
|
|
747
749
|
}
|
|
748
750
|
};
|
|
749
751
|
}, oo = (e) => e.id !== void 0, io = () => {
|
|
750
|
-
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = [], o = (S,
|
|
751
|
-
n.push({ onChange: S, options:
|
|
752
|
+
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = [], o = (S, v = {}) => {
|
|
753
|
+
n.push({ onChange: S, options: v });
|
|
752
754
|
}, i = (S) => {
|
|
753
|
-
const
|
|
754
|
-
|
|
755
|
-
}, s = (S,
|
|
755
|
+
const v = n.findIndex((b) => b.onChange == S);
|
|
756
|
+
v > -1 && n.splice(v, 1);
|
|
757
|
+
}, s = (S, v) => {
|
|
756
758
|
const b = {
|
|
757
759
|
origin: S,
|
|
758
760
|
changes: {
|
|
759
|
-
created:
|
|
760
|
-
updated:
|
|
761
|
-
deleted:
|
|
761
|
+
created: v.created || [],
|
|
762
|
+
updated: v.updated || [],
|
|
763
|
+
deleted: v.deleted || []
|
|
762
764
|
},
|
|
763
765
|
state: [...e.values()]
|
|
764
766
|
};
|
|
765
|
-
n.forEach((
|
|
766
|
-
to(
|
|
767
|
+
n.forEach((T) => {
|
|
768
|
+
to(T, b) && T.onChange(b);
|
|
767
769
|
});
|
|
768
|
-
}, r = (S,
|
|
770
|
+
}, r = (S, v = G.LOCAL) => {
|
|
769
771
|
if (S.id && e.get(S.id))
|
|
770
772
|
throw Error(`Cannot add annotation ${S.id} - exists already`);
|
|
771
773
|
{
|
|
772
774
|
const b = it(S);
|
|
773
|
-
e.set(b.id, b), b.bodies.forEach((
|
|
775
|
+
e.set(b.id, b), b.bodies.forEach((T) => t.set(T.id, b.id)), s(v, { created: [b] });
|
|
774
776
|
}
|
|
775
|
-
}, l = (S,
|
|
776
|
-
const b = it(typeof S == "string" ?
|
|
777
|
-
if (
|
|
778
|
-
const D = sn(
|
|
779
|
-
return
|
|
777
|
+
}, l = (S, v) => {
|
|
778
|
+
const b = it(typeof S == "string" ? v : S), T = typeof S == "string" ? S : S.id, Y = T && e.get(T);
|
|
779
|
+
if (Y) {
|
|
780
|
+
const D = sn(Y, b);
|
|
781
|
+
return T === b.id ? e.set(T, b) : (e.delete(T), e.set(b.id, b)), Y.bodies.forEach((H) => t.delete(H.id)), b.bodies.forEach((H) => t.set(H.id, b.id)), D;
|
|
780
782
|
} else
|
|
781
|
-
console.warn(`Cannot update annotation ${
|
|
782
|
-
}, a = (S,
|
|
783
|
-
const
|
|
784
|
-
|
|
785
|
-
}, c = (S,
|
|
786
|
-
const b = S.reduce((
|
|
787
|
-
const D = l(
|
|
788
|
-
return D ? [...
|
|
783
|
+
console.warn(`Cannot update annotation ${T} - does not exist`);
|
|
784
|
+
}, a = (S, v = G.LOCAL, b = G.LOCAL) => {
|
|
785
|
+
const T = oo(v) ? b : v, Y = l(S, v);
|
|
786
|
+
Y && s(T, { updated: [Y] });
|
|
787
|
+
}, c = (S, v = G.LOCAL) => {
|
|
788
|
+
const b = S.reduce((T, Y) => {
|
|
789
|
+
const D = l(Y);
|
|
790
|
+
return D ? [...T, D] : T;
|
|
789
791
|
}, []);
|
|
790
|
-
b.length > 0 && s(
|
|
791
|
-
}, u = (S,
|
|
792
|
+
b.length > 0 && s(v, { updated: b });
|
|
793
|
+
}, u = (S, v = G.LOCAL) => {
|
|
792
794
|
const b = e.get(S.annotation);
|
|
793
795
|
if (b) {
|
|
794
|
-
const
|
|
796
|
+
const T = {
|
|
795
797
|
...b,
|
|
796
798
|
bodies: [...b.bodies, S]
|
|
797
799
|
};
|
|
798
|
-
e.set(b.id,
|
|
800
|
+
e.set(b.id, T), t.set(S.id, T.id), s(v, { updated: [{
|
|
799
801
|
oldValue: b,
|
|
800
|
-
newValue:
|
|
802
|
+
newValue: T,
|
|
801
803
|
bodiesCreated: [S]
|
|
802
804
|
}] });
|
|
803
805
|
} else
|
|
804
806
|
console.warn(`Attempt to add body to missing annotation: ${S.annotation}`);
|
|
805
807
|
}, f = () => [...e.values()], h = (S = G.LOCAL) => {
|
|
806
|
-
const
|
|
807
|
-
e.clear(), t.clear(), s(S, { deleted:
|
|
808
|
-
},
|
|
809
|
-
const
|
|
810
|
-
if (
|
|
811
|
-
const
|
|
812
|
-
e.clear(), t.clear(),
|
|
813
|
-
e.set(D.id, D), D.bodies.forEach((
|
|
814
|
-
}), s(b, { created:
|
|
808
|
+
const v = [...e.values()];
|
|
809
|
+
e.clear(), t.clear(), s(S, { deleted: v });
|
|
810
|
+
}, y = (S, v = !0, b = G.LOCAL) => {
|
|
811
|
+
const T = S.map(it);
|
|
812
|
+
if (v) {
|
|
813
|
+
const Y = [...e.values()];
|
|
814
|
+
e.clear(), t.clear(), T.forEach((D) => {
|
|
815
|
+
e.set(D.id, D), D.bodies.forEach((H) => t.set(H.id, D.id));
|
|
816
|
+
}), s(b, { created: T, deleted: Y });
|
|
815
817
|
} else {
|
|
816
|
-
const
|
|
817
|
-
const
|
|
818
|
-
return
|
|
818
|
+
const Y = S.reduce((D, H) => {
|
|
819
|
+
const J = H.id && e.get(H.id);
|
|
820
|
+
return J ? [...D, J] : D;
|
|
819
821
|
}, []);
|
|
820
|
-
if (
|
|
821
|
-
throw Error(`Bulk insert would overwrite the following annotations: ${
|
|
822
|
-
|
|
823
|
-
e.set(D.id, D), D.bodies.forEach((
|
|
824
|
-
}), s(b, { created:
|
|
822
|
+
if (Y.length > 0)
|
|
823
|
+
throw Error(`Bulk insert would overwrite the following annotations: ${Y.map((D) => D.id).join(", ")}`);
|
|
824
|
+
T.forEach((D) => {
|
|
825
|
+
e.set(D.id, D), D.bodies.forEach((H) => t.set(H.id, D.id));
|
|
826
|
+
}), s(b, { created: T });
|
|
825
827
|
}
|
|
826
828
|
}, g = (S) => {
|
|
827
|
-
const
|
|
829
|
+
const v = typeof S == "string" ? S : S.id, b = e.get(v);
|
|
828
830
|
if (b)
|
|
829
|
-
return e.delete(
|
|
830
|
-
console.warn(`Attempt to delete missing annotation: ${
|
|
831
|
-
},
|
|
831
|
+
return e.delete(v), b.bodies.forEach((T) => t.delete(T.id)), b;
|
|
832
|
+
console.warn(`Attempt to delete missing annotation: ${v}`);
|
|
833
|
+
}, m = (S, v = G.LOCAL) => {
|
|
832
834
|
const b = g(S);
|
|
833
|
-
b && s(
|
|
834
|
-
}, A = (S,
|
|
835
|
-
const b = S.reduce((
|
|
836
|
-
const D = g(
|
|
837
|
-
return D ? [...
|
|
835
|
+
b && s(v, { deleted: [b] });
|
|
836
|
+
}, A = (S, v = G.LOCAL) => {
|
|
837
|
+
const b = S.reduce((T, Y) => {
|
|
838
|
+
const D = g(Y);
|
|
839
|
+
return D ? [...T, D] : T;
|
|
838
840
|
}, []);
|
|
839
|
-
b.length > 0 && s(
|
|
840
|
-
},
|
|
841
|
-
const
|
|
842
|
-
if (
|
|
843
|
-
const b =
|
|
841
|
+
b.length > 0 && s(v, { deleted: b });
|
|
842
|
+
}, p = (S) => {
|
|
843
|
+
const v = e.get(S.annotation);
|
|
844
|
+
if (v) {
|
|
845
|
+
const b = v.bodies.find((T) => T.id === S.id);
|
|
844
846
|
if (b) {
|
|
845
847
|
t.delete(b.id);
|
|
846
|
-
const
|
|
847
|
-
...
|
|
848
|
-
bodies:
|
|
848
|
+
const T = {
|
|
849
|
+
...v,
|
|
850
|
+
bodies: v.bodies.filter((Y) => Y.id !== S.id)
|
|
849
851
|
};
|
|
850
|
-
return e.set(
|
|
851
|
-
oldValue:
|
|
852
|
-
newValue:
|
|
852
|
+
return e.set(v.id, T), {
|
|
853
|
+
oldValue: v,
|
|
854
|
+
newValue: T,
|
|
853
855
|
bodiesDeleted: [b]
|
|
854
856
|
};
|
|
855
857
|
} else
|
|
856
858
|
console.warn(`Attempt to delete missing body ${S.id} from annotation ${S.annotation}`);
|
|
857
859
|
} else
|
|
858
860
|
console.warn(`Attempt to delete body from missing annotation ${S.annotation}`);
|
|
859
|
-
},
|
|
860
|
-
const b =
|
|
861
|
-
b && s(
|
|
862
|
-
}, w = (S,
|
|
863
|
-
const b = S.map((
|
|
864
|
-
b.length > 0 && s(
|
|
861
|
+
}, _ = (S, v = G.LOCAL) => {
|
|
862
|
+
const b = p(S);
|
|
863
|
+
b && s(v, { updated: [b] });
|
|
864
|
+
}, w = (S, v = G.LOCAL) => {
|
|
865
|
+
const b = S.map((T) => p(T)).filter(Boolean);
|
|
866
|
+
b.length > 0 && s(v, { updated: b });
|
|
865
867
|
}, E = (S) => {
|
|
866
|
-
const
|
|
867
|
-
return
|
|
868
|
-
},
|
|
869
|
-
const
|
|
870
|
-
if (
|
|
871
|
-
const b = E(
|
|
868
|
+
const v = e.get(S);
|
|
869
|
+
return v ? { ...v } : void 0;
|
|
870
|
+
}, k = (S) => {
|
|
871
|
+
const v = t.get(S);
|
|
872
|
+
if (v) {
|
|
873
|
+
const b = E(v).bodies.find((T) => T.id === S);
|
|
872
874
|
if (b)
|
|
873
875
|
return b;
|
|
874
876
|
console.error(`Store integrity error: body ${S} in index, but not in annotation`);
|
|
875
877
|
} else
|
|
876
878
|
console.warn(`Attempt to retrieve missing body: ${S}`);
|
|
877
|
-
},
|
|
878
|
-
if (S.annotation !==
|
|
879
|
+
}, X = (S, v) => {
|
|
880
|
+
if (S.annotation !== v.annotation)
|
|
879
881
|
throw "Annotation integrity violation: annotation ID must be the same when updating bodies";
|
|
880
882
|
const b = e.get(S.annotation);
|
|
881
883
|
if (b) {
|
|
882
|
-
const
|
|
884
|
+
const T = b.bodies.find((D) => D.id === S.id), Y = {
|
|
883
885
|
...b,
|
|
884
|
-
bodies: b.bodies.map((D) => D.id ===
|
|
886
|
+
bodies: b.bodies.map((D) => D.id === T.id ? v : D)
|
|
885
887
|
};
|
|
886
|
-
return e.set(b.id,
|
|
888
|
+
return e.set(b.id, Y), T.id !== v.id && (t.delete(T.id), t.set(v.id, Y.id)), {
|
|
887
889
|
oldValue: b,
|
|
888
|
-
newValue:
|
|
889
|
-
bodiesUpdated: [{ oldBody:
|
|
890
|
+
newValue: Y,
|
|
891
|
+
bodiesUpdated: [{ oldBody: T, newBody: v }]
|
|
890
892
|
};
|
|
891
893
|
} else
|
|
892
894
|
console.warn(`Attempt to add body to missing annotation ${S.annotation}`);
|
|
893
|
-
},
|
|
894
|
-
const
|
|
895
|
-
|
|
896
|
-
}, V = (S,
|
|
897
|
-
const b = S.map((
|
|
898
|
-
s(
|
|
895
|
+
}, R = (S, v, b = G.LOCAL) => {
|
|
896
|
+
const T = X(S, v);
|
|
897
|
+
T && s(b, { updated: [T] });
|
|
898
|
+
}, V = (S, v = G.LOCAL) => {
|
|
899
|
+
const b = S.map((T) => X({ id: T.id, annotation: T.annotation }, T)).filter(Boolean);
|
|
900
|
+
s(v, { updated: b });
|
|
899
901
|
}, Z = (S) => {
|
|
900
|
-
const
|
|
901
|
-
if (
|
|
902
|
+
const v = e.get(S.annotation);
|
|
903
|
+
if (v) {
|
|
902
904
|
const b = {
|
|
903
|
-
...
|
|
905
|
+
...v,
|
|
904
906
|
target: {
|
|
905
|
-
...
|
|
907
|
+
...v.target,
|
|
906
908
|
...S
|
|
907
909
|
}
|
|
908
910
|
};
|
|
909
|
-
return e.set(
|
|
910
|
-
oldValue:
|
|
911
|
+
return e.set(v.id, b), {
|
|
912
|
+
oldValue: v,
|
|
911
913
|
newValue: b,
|
|
912
914
|
targetUpdated: {
|
|
913
|
-
oldTarget:
|
|
915
|
+
oldTarget: v.target,
|
|
914
916
|
newTarget: S
|
|
915
917
|
}
|
|
916
918
|
};
|
|
@@ -921,27 +923,27 @@ const to = (e, t) => {
|
|
|
921
923
|
addAnnotation: r,
|
|
922
924
|
addBody: u,
|
|
923
925
|
all: f,
|
|
924
|
-
bulkAddAnnotation:
|
|
926
|
+
bulkAddAnnotation: y,
|
|
925
927
|
bulkDeleteAnnotation: A,
|
|
926
928
|
bulkDeleteBodies: w,
|
|
927
929
|
bulkUpdateAnnotation: c,
|
|
928
930
|
bulkUpdateBodies: V,
|
|
929
|
-
bulkUpdateTargets: (S,
|
|
930
|
-
const b = S.map((
|
|
931
|
-
b.length > 0 && s(
|
|
931
|
+
bulkUpdateTargets: (S, v = G.LOCAL) => {
|
|
932
|
+
const b = S.map((T) => Z(T)).filter(Boolean);
|
|
933
|
+
b.length > 0 && s(v, { updated: b });
|
|
932
934
|
},
|
|
933
935
|
clear: h,
|
|
934
|
-
deleteAnnotation:
|
|
935
|
-
deleteBody:
|
|
936
|
+
deleteAnnotation: m,
|
|
937
|
+
deleteBody: _,
|
|
936
938
|
getAnnotation: E,
|
|
937
|
-
getBody:
|
|
939
|
+
getBody: k,
|
|
938
940
|
observe: o,
|
|
939
941
|
unobserve: i,
|
|
940
942
|
updateAnnotation: a,
|
|
941
|
-
updateBody:
|
|
942
|
-
updateTarget: (S,
|
|
943
|
+
updateBody: R,
|
|
944
|
+
updateTarget: (S, v = G.LOCAL) => {
|
|
943
945
|
const b = Z(S);
|
|
944
|
-
b && s(
|
|
946
|
+
b && s(v, { updated: [b] });
|
|
945
947
|
}
|
|
946
948
|
};
|
|
947
949
|
}, so = (e) => ({
|
|
@@ -970,37 +972,37 @@ const lo = 250, ao = (e, t) => {
|
|
|
970
972
|
let i = t ? t.pointer : -1, s = !1, r = 0;
|
|
971
973
|
const l = (g) => {
|
|
972
974
|
if (!s) {
|
|
973
|
-
const { changes:
|
|
975
|
+
const { changes: m } = g, A = performance.now();
|
|
974
976
|
if (A - r > lo)
|
|
975
|
-
o.splice(i + 1), o.push(
|
|
977
|
+
o.splice(i + 1), o.push(m), i = o.length - 1;
|
|
976
978
|
else {
|
|
977
|
-
const
|
|
978
|
-
o[
|
|
979
|
+
const p = o.length - 1;
|
|
980
|
+
o[p] = no(o[p], m);
|
|
979
981
|
}
|
|
980
982
|
r = A;
|
|
981
983
|
}
|
|
982
984
|
s = !1;
|
|
983
985
|
};
|
|
984
986
|
e.observe(l, { origin: G.LOCAL });
|
|
985
|
-
const a = (g) => g && g.length > 0 && e.bulkDeleteAnnotation(g), c = (g) => g && g.length > 0 && e.bulkAddAnnotation(g, !1), u = (g) => g && g.length > 0 && e.bulkUpdateAnnotation(g.map(({ oldValue:
|
|
987
|
+
const a = (g) => g && g.length > 0 && e.bulkDeleteAnnotation(g), c = (g) => g && g.length > 0 && e.bulkAddAnnotation(g, !1), u = (g) => g && g.length > 0 && e.bulkUpdateAnnotation(g.map(({ oldValue: m }) => m)), f = (g) => g && g.length > 0 && e.bulkUpdateAnnotation(g.map(({ newValue: m }) => m)), h = (g) => g && g.length > 0 && e.bulkAddAnnotation(g, !1), y = (g) => g && g.length > 0 && e.bulkDeleteAnnotation(g);
|
|
986
988
|
return {
|
|
987
989
|
canRedo: () => o.length - 1 > i,
|
|
988
990
|
canUndo: () => i > -1,
|
|
989
991
|
destroy: () => e.unobserve(l),
|
|
990
992
|
getHistory: () => ({ changes: [...o], pointer: i }),
|
|
991
|
-
on: (g,
|
|
993
|
+
on: (g, m) => n.on(g, m),
|
|
992
994
|
redo: () => {
|
|
993
995
|
if (o.length - 1 > i) {
|
|
994
996
|
s = !0;
|
|
995
|
-
const { created: g, updated:
|
|
996
|
-
c(g), f(
|
|
997
|
+
const { created: g, updated: m, deleted: A } = o[i + 1];
|
|
998
|
+
c(g), f(m), y(A), n.emit("redo", o[i + 1]), i += 1;
|
|
997
999
|
}
|
|
998
1000
|
},
|
|
999
1001
|
undo: () => {
|
|
1000
1002
|
if (i > -1) {
|
|
1001
1003
|
s = !0;
|
|
1002
|
-
const { created: g, updated:
|
|
1003
|
-
a(g), u(
|
|
1004
|
+
const { created: g, updated: m, deleted: A } = o[i];
|
|
1005
|
+
a(g), u(m), h(A), n.emit("undo", o[i]), i -= 1;
|
|
1004
1006
|
}
|
|
1005
1007
|
}
|
|
1006
1008
|
};
|
|
@@ -1013,78 +1015,78 @@ const lo = 250, ao = (e, t) => {
|
|
|
1013
1015
|
}, fo = (e, t, n, o) => {
|
|
1014
1016
|
const { hover: i, selection: s, store: r, viewport: l } = e, a = /* @__PURE__ */ new Map();
|
|
1015
1017
|
let c = [], u, f;
|
|
1016
|
-
const h = (
|
|
1017
|
-
a.has(
|
|
1018
|
-
},
|
|
1019
|
-
const w = a.get(
|
|
1018
|
+
const h = (p, _) => {
|
|
1019
|
+
a.has(p) ? a.get(p).push(_) : a.set(p, [_]);
|
|
1020
|
+
}, y = (p, _) => {
|
|
1021
|
+
const w = a.get(p);
|
|
1020
1022
|
if (w) {
|
|
1021
|
-
const E = w.indexOf(
|
|
1023
|
+
const E = w.indexOf(_);
|
|
1022
1024
|
E !== -1 && w.splice(E, 1);
|
|
1023
1025
|
}
|
|
1024
|
-
}, g = (
|
|
1025
|
-
a.has(
|
|
1026
|
-
a.get(
|
|
1026
|
+
}, g = (p, _, w) => {
|
|
1027
|
+
a.has(p) && setTimeout(() => {
|
|
1028
|
+
a.get(p).forEach((E) => {
|
|
1027
1029
|
if (n) {
|
|
1028
|
-
const
|
|
1029
|
-
E(
|
|
1030
|
+
const k = Array.isArray(_) ? _.map((R) => n.serialize(R)) : n.serialize(_), X = w ? w instanceof PointerEvent ? w : n.serialize(w) : void 0;
|
|
1031
|
+
E(k, X);
|
|
1030
1032
|
} else
|
|
1031
|
-
E(
|
|
1033
|
+
E(_, w);
|
|
1032
1034
|
});
|
|
1033
1035
|
}, 1);
|
|
1034
|
-
},
|
|
1035
|
-
const { selected:
|
|
1036
|
-
|
|
1037
|
-
const E = c.find((
|
|
1038
|
-
(!E || !
|
|
1039
|
-
}), c = c.map((w) =>
|
|
1036
|
+
}, m = () => {
|
|
1037
|
+
const { selected: p } = s, _ = (p || []).map(({ id: w }) => r.getAnnotation(w));
|
|
1038
|
+
_.forEach((w) => {
|
|
1039
|
+
const E = c.find((k) => k.id === w.id);
|
|
1040
|
+
(!E || !_e(E, w)) && g("updateAnnotation", w, E);
|
|
1041
|
+
}), c = c.map((w) => _.find(({ id: k }) => k === w.id) || w);
|
|
1040
1042
|
};
|
|
1041
|
-
s.subscribe(({ selected:
|
|
1042
|
-
if (!(c.length === 0 &&
|
|
1043
|
-
if (c.length === 0 &&
|
|
1044
|
-
c =
|
|
1045
|
-
else if (c.length > 0 &&
|
|
1046
|
-
c.forEach((
|
|
1047
|
-
const w = r.getAnnotation(
|
|
1048
|
-
w && !
|
|
1043
|
+
s.subscribe(({ selected: p }) => {
|
|
1044
|
+
if (!(c.length === 0 && p.length === 0)) {
|
|
1045
|
+
if (c.length === 0 && p.length > 0)
|
|
1046
|
+
c = p.map(({ id: _ }) => r.getAnnotation(_));
|
|
1047
|
+
else if (c.length > 0 && p.length === 0)
|
|
1048
|
+
c.forEach((_) => {
|
|
1049
|
+
const w = r.getAnnotation(_.id);
|
|
1050
|
+
w && !_e(w, _) && g("updateAnnotation", w, _);
|
|
1049
1051
|
}), c = [];
|
|
1050
1052
|
else {
|
|
1051
|
-
const
|
|
1053
|
+
const _ = new Set(c.map((E) => E.id)), w = new Set(p.map(({ id: E }) => E));
|
|
1052
1054
|
c.filter((E) => !w.has(E.id)).forEach((E) => {
|
|
1053
|
-
const
|
|
1054
|
-
|
|
1055
|
+
const k = r.getAnnotation(E.id);
|
|
1056
|
+
k && !_e(k, E) && g("updateAnnotation", k, E);
|
|
1055
1057
|
}), c = [
|
|
1056
1058
|
// Remove annotations that were deselected
|
|
1057
1059
|
...c.filter((E) => w.has(E.id)),
|
|
1058
1060
|
// Add editable annotations that were selected
|
|
1059
|
-
...
|
|
1061
|
+
...p.filter(({ id: E }) => !_.has(E)).map(({ id: E }) => r.getAnnotation(E))
|
|
1060
1062
|
];
|
|
1061
1063
|
}
|
|
1062
1064
|
g("selectionChanged", c);
|
|
1063
1065
|
}
|
|
1064
|
-
}), i.subscribe((
|
|
1065
|
-
!u &&
|
|
1066
|
-
}), l == null || l.subscribe((
|
|
1067
|
-
o && (f && clearTimeout(f), f = setTimeout(
|
|
1068
|
-
const { created:
|
|
1069
|
-
(
|
|
1066
|
+
}), i.subscribe((p) => {
|
|
1067
|
+
!u && p ? g("mouseEnterAnnotation", r.getAnnotation(p)) : u && !p ? g("mouseLeaveAnnotation", r.getAnnotation(u)) : u && p && (g("mouseLeaveAnnotation", r.getAnnotation(u)), g("mouseEnterAnnotation", r.getAnnotation(p))), u = p;
|
|
1068
|
+
}), l == null || l.subscribe((p) => g("viewportIntersect", p.map((_) => r.getAnnotation(_)))), r.observe((p) => {
|
|
1069
|
+
o && (f && clearTimeout(f), f = setTimeout(m, 1e3));
|
|
1070
|
+
const { created: _, deleted: w } = p.changes;
|
|
1071
|
+
(_ || []).forEach((E) => g("createAnnotation", E)), (w || []).forEach((E) => g("deleteAnnotation", E)), (p.changes.updated || []).filter((E) => [
|
|
1070
1072
|
...E.bodiesCreated || [],
|
|
1071
1073
|
...E.bodiesDeleted || [],
|
|
1072
1074
|
...E.bodiesUpdated || []
|
|
1073
|
-
].length > 0).forEach(({ oldValue: E, newValue:
|
|
1074
|
-
const
|
|
1075
|
-
c = c.map((
|
|
1075
|
+
].length > 0).forEach(({ oldValue: E, newValue: k }) => {
|
|
1076
|
+
const X = c.find((R) => R.id === E.id) || E;
|
|
1077
|
+
c = c.map((R) => R.id === E.id ? k : R), g("updateAnnotation", k, X);
|
|
1076
1078
|
});
|
|
1077
|
-
}, { origin: G.LOCAL }), r.observe((
|
|
1079
|
+
}, { origin: G.LOCAL }), r.observe((p) => {
|
|
1078
1080
|
if (c) {
|
|
1079
|
-
const
|
|
1080
|
-
w.length > 0 && (c = c.map((E) => w.find((
|
|
1081
|
+
const _ = new Set(c.map((E) => E.id)), w = (p.changes.updated || []).filter(({ newValue: E }) => _.has(E.id)).map(({ newValue: E }) => E);
|
|
1082
|
+
w.length > 0 && (c = c.map((E) => w.find((X) => X.id === E.id) || E));
|
|
1081
1083
|
}
|
|
1082
1084
|
}, { origin: G.REMOTE });
|
|
1083
|
-
const A = (
|
|
1084
|
-
const { updated: w } =
|
|
1085
|
-
|
|
1085
|
+
const A = (p) => (_) => {
|
|
1086
|
+
const { updated: w } = _;
|
|
1087
|
+
p ? (w || []).forEach((E) => g("updateAnnotation", E.oldValue, E.newValue)) : (w || []).forEach((E) => g("updateAnnotation", E.newValue, E.oldValue));
|
|
1086
1088
|
};
|
|
1087
|
-
return t.on("undo", A(!0)), t.on("redo", A(!1)), { on: h, off:
|
|
1089
|
+
return t.on("undo", A(!0)), t.on("redo", A(!1)), { on: h, off: y, emit: g };
|
|
1088
1090
|
}, uo = (e) => (t) => t.reduce((n, o) => {
|
|
1089
1091
|
const { parsed: i, error: s } = e.parse(o);
|
|
1090
1092
|
return s ? {
|
|
@@ -1097,46 +1099,46 @@ const lo = 250, ao = (e, t) => {
|
|
|
1097
1099
|
...n
|
|
1098
1100
|
};
|
|
1099
1101
|
}, { parsed: [], failed: [] }), ho = (e, t, n) => {
|
|
1100
|
-
const { store: o, selection: i } = e, s = (
|
|
1102
|
+
const { store: o, selection: i } = e, s = (p) => {
|
|
1101
1103
|
if (n) {
|
|
1102
|
-
const { parsed:
|
|
1103
|
-
|
|
1104
|
+
const { parsed: _, error: w } = n.parse(p);
|
|
1105
|
+
_ ? o.addAnnotation(_, G.REMOTE) : console.error(w);
|
|
1104
1106
|
} else
|
|
1105
|
-
o.addAnnotation(ot(
|
|
1106
|
-
}, r = () => i.clear(), l = () => o.clear(), a = (
|
|
1107
|
-
const
|
|
1108
|
-
return n &&
|
|
1107
|
+
o.addAnnotation(ot(p), G.REMOTE);
|
|
1108
|
+
}, r = () => i.clear(), l = () => o.clear(), a = (p) => {
|
|
1109
|
+
const _ = o.getAnnotation(p);
|
|
1110
|
+
return n && _ ? n.serialize(_) : _;
|
|
1109
1111
|
}, c = () => n ? o.all().map(n.serialize) : o.all(), u = () => {
|
|
1110
|
-
var
|
|
1111
|
-
const
|
|
1112
|
-
return n ?
|
|
1113
|
-
}, f = (
|
|
1114
|
-
if (typeof
|
|
1115
|
-
const
|
|
1116
|
-
if (o.deleteAnnotation(
|
|
1117
|
-
return n ? n.serialize(
|
|
1112
|
+
var p;
|
|
1113
|
+
const _ = (((p = i.selected) == null ? void 0 : p.map((w) => w.id)) || []).map((w) => o.getAnnotation(w)).filter(Boolean);
|
|
1114
|
+
return n ? _.map(n.serialize) : _;
|
|
1115
|
+
}, f = (p, _ = !0) => fetch(p).then((w) => w.json()).then((w) => (y(w, _), w)), h = (p) => {
|
|
1116
|
+
if (typeof p == "string") {
|
|
1117
|
+
const _ = o.getAnnotation(p);
|
|
1118
|
+
if (o.deleteAnnotation(p), _)
|
|
1119
|
+
return n ? n.serialize(_) : _;
|
|
1118
1120
|
} else {
|
|
1119
|
-
const
|
|
1120
|
-
if (
|
|
1121
|
-
return o.deleteAnnotation(
|
|
1121
|
+
const _ = n ? n.parse(p).parsed : p;
|
|
1122
|
+
if (_)
|
|
1123
|
+
return o.deleteAnnotation(_), p;
|
|
1122
1124
|
}
|
|
1123
|
-
},
|
|
1125
|
+
}, y = (p, _ = !0) => {
|
|
1124
1126
|
if (n) {
|
|
1125
|
-
const w = n.parseAll || uo(n), { parsed: E, failed:
|
|
1126
|
-
|
|
1127
|
+
const w = n.parseAll || uo(n), { parsed: E, failed: k } = w(p);
|
|
1128
|
+
k.length > 0 && console.warn(`Discarded ${k.length} invalid annotations`, k), o.bulkAddAnnotation(E, _, G.REMOTE);
|
|
1127
1129
|
} else
|
|
1128
|
-
o.bulkAddAnnotation(
|
|
1129
|
-
}, g = (
|
|
1130
|
-
|
|
1131
|
-
},
|
|
1132
|
-
i.clear(), i.setUserSelectAction(
|
|
1133
|
-
}, A = (
|
|
1130
|
+
o.bulkAddAnnotation(p.map(ot), _, G.REMOTE);
|
|
1131
|
+
}, g = (p, _) => {
|
|
1132
|
+
p ? i.setSelected(p, _) : i.clear();
|
|
1133
|
+
}, m = (p) => {
|
|
1134
|
+
i.clear(), i.setUserSelectAction(p);
|
|
1135
|
+
}, A = (p) => {
|
|
1134
1136
|
if (n) {
|
|
1135
|
-
const
|
|
1136
|
-
return o.updateAnnotation(
|
|
1137
|
+
const _ = n.parse(p).parsed, w = n.serialize(o.getAnnotation(_.id));
|
|
1138
|
+
return o.updateAnnotation(_), w;
|
|
1137
1139
|
} else {
|
|
1138
|
-
const
|
|
1139
|
-
return o.updateAnnotation(ot(
|
|
1140
|
+
const _ = o.getAnnotation(p.id);
|
|
1141
|
+
return o.updateAnnotation(ot(p)), _;
|
|
1140
1142
|
}
|
|
1141
1143
|
};
|
|
1142
1144
|
return {
|
|
@@ -1152,9 +1154,9 @@ const lo = 250, ao = (e, t) => {
|
|
|
1152
1154
|
loadAnnotations: f,
|
|
1153
1155
|
redo: t.redo,
|
|
1154
1156
|
removeAnnotation: h,
|
|
1155
|
-
setAnnotations:
|
|
1157
|
+
setAnnotations: y,
|
|
1156
1158
|
setSelected: g,
|
|
1157
|
-
setUserSelectAction:
|
|
1159
|
+
setUserSelectAction: m,
|
|
1158
1160
|
undo: t.undo,
|
|
1159
1161
|
updateAnnotation: A
|
|
1160
1162
|
};
|
|
@@ -1232,7 +1234,7 @@ const wo = () => ({ isGuest: !0, id: yo("1234567890abcdefghijklmnopqrstuvwxyzABC
|
|
|
1232
1234
|
// cyan
|
|
1233
1235
|
"#023eff"
|
|
1234
1236
|
// blue
|
|
1235
|
-
],
|
|
1237
|
+
], Ki = () => {
|
|
1236
1238
|
const e = [...So];
|
|
1237
1239
|
return { assignRandomColor: () => {
|
|
1238
1240
|
const t = Math.floor(Math.random() * e.length), n = e[t];
|
|
@@ -1240,7 +1242,7 @@ const wo = () => ({ isGuest: !0, id: yo("1234567890abcdefghijklmnopqrstuvwxyzABC
|
|
|
1240
1242
|
}, releaseColor: (t) => e.push(t) };
|
|
1241
1243
|
};
|
|
1242
1244
|
_o();
|
|
1243
|
-
const
|
|
1245
|
+
const Wi = (e, t = { strict: !0, invertY: !1 }) => ({ parse: (i) => To(i, t), serialize: (i) => Mo(i, e, t) }), To = (e, t = { strict: !0, invertY: !1 }) => {
|
|
1244
1246
|
const n = e.id || tn(), {
|
|
1245
1247
|
creator: o,
|
|
1246
1248
|
created: i,
|
|
@@ -1306,7 +1308,7 @@ function Lt(e, t, n) {
|
|
|
1306
1308
|
}
|
|
1307
1309
|
function kt(e) {
|
|
1308
1310
|
let t, n;
|
|
1309
|
-
return t = new
|
|
1311
|
+
return t = new Pe({
|
|
1310
1312
|
props: {
|
|
1311
1313
|
x: (
|
|
1312
1314
|
/*point*/
|
|
@@ -1322,7 +1324,7 @@ function kt(e) {
|
|
|
1322
1324
|
)
|
|
1323
1325
|
}
|
|
1324
1326
|
}), t.$on("pointerdown", function() {
|
|
1325
|
-
|
|
1327
|
+
K(
|
|
1326
1328
|
/*grab*/
|
|
1327
1329
|
e[9](`HANDLE-${/*idx*/
|
|
1328
1330
|
e[12]}`)
|
|
@@ -1330,10 +1332,10 @@ function kt(e) {
|
|
|
1330
1332
|
e[12]}`).apply(this, arguments);
|
|
1331
1333
|
}), {
|
|
1332
1334
|
c() {
|
|
1333
|
-
|
|
1335
|
+
ne(t.$$.fragment);
|
|
1334
1336
|
},
|
|
1335
1337
|
m(o, i) {
|
|
1336
|
-
|
|
1338
|
+
ee(t, o, i), n = !0;
|
|
1337
1339
|
},
|
|
1338
1340
|
p(o, i) {
|
|
1339
1341
|
e = o;
|
|
@@ -1347,32 +1349,32 @@ function kt(e) {
|
|
|
1347
1349
|
e[3]), t.$set(s);
|
|
1348
1350
|
},
|
|
1349
1351
|
i(o) {
|
|
1350
|
-
n || (
|
|
1352
|
+
n || (O(t.$$.fragment, o), n = !0);
|
|
1351
1353
|
},
|
|
1352
1354
|
o(o) {
|
|
1353
|
-
|
|
1355
|
+
P(t.$$.fragment, o), n = !1;
|
|
1354
1356
|
},
|
|
1355
1357
|
d(o) {
|
|
1356
|
-
|
|
1358
|
+
te(t, o);
|
|
1357
1359
|
}
|
|
1358
1360
|
};
|
|
1359
1361
|
}
|
|
1360
1362
|
function vo(e) {
|
|
1361
|
-
let t, n, o, i, s, r, l, a, c, u, f, h =
|
|
1363
|
+
let t, n, o, i, s, r, l, a, c, u, f, h = ke(
|
|
1362
1364
|
/*geom*/
|
|
1363
1365
|
e[4].points
|
|
1364
|
-
),
|
|
1365
|
-
for (let
|
|
1366
|
-
|
|
1367
|
-
const g = (
|
|
1368
|
-
|
|
1366
|
+
), y = [];
|
|
1367
|
+
for (let m = 0; m < h.length; m += 1)
|
|
1368
|
+
y[m] = kt(Lt(e, h, m));
|
|
1369
|
+
const g = (m) => P(y[m], 1, 1, () => {
|
|
1370
|
+
y[m] = null;
|
|
1369
1371
|
});
|
|
1370
1372
|
return {
|
|
1371
1373
|
c() {
|
|
1372
|
-
t =
|
|
1373
|
-
for (let
|
|
1374
|
-
|
|
1375
|
-
a =
|
|
1374
|
+
t = C("polygon"), i = se(), s = C("polygon"), l = se();
|
|
1375
|
+
for (let m = 0; m < y.length; m += 1)
|
|
1376
|
+
y[m].c();
|
|
1377
|
+
a = ae(), d(t, "class", "a9s-outer"), d(t, "style", n = /*computedStyle*/
|
|
1376
1378
|
e[1] ? "display:none;" : void 0), d(t, "points", o = /*geom*/
|
|
1377
1379
|
e[4].points.map(It).join(" ")), d(s, "class", "a9s-inner a9s-shape-handle"), d(
|
|
1378
1380
|
s,
|
|
@@ -1382,27 +1384,27 @@ function vo(e) {
|
|
|
1382
1384
|
), d(s, "points", r = /*geom*/
|
|
1383
1385
|
e[4].points.map(Bt).join(" "));
|
|
1384
1386
|
},
|
|
1385
|
-
m(
|
|
1386
|
-
|
|
1387
|
-
for (let
|
|
1388
|
-
p
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1387
|
+
m(m, A) {
|
|
1388
|
+
B(m, t, A), B(m, i, A), B(m, s, A), B(m, l, A);
|
|
1389
|
+
for (let p = 0; p < y.length; p += 1)
|
|
1390
|
+
y[p] && y[p].m(m, A);
|
|
1391
|
+
B(m, a, A), c = !0, u || (f = [
|
|
1392
|
+
z(t, "pointerdown", function() {
|
|
1393
|
+
K(
|
|
1392
1394
|
/*grab*/
|
|
1393
1395
|
e[9]("SHAPE")
|
|
1394
1396
|
) && e[9]("SHAPE").apply(this, arguments);
|
|
1395
1397
|
}),
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
+
z(s, "pointerdown", function() {
|
|
1399
|
+
K(
|
|
1398
1400
|
/*grab*/
|
|
1399
1401
|
e[9]("SHAPE")
|
|
1400
1402
|
) && e[9]("SHAPE").apply(this, arguments);
|
|
1401
1403
|
})
|
|
1402
1404
|
], u = !0);
|
|
1403
1405
|
},
|
|
1404
|
-
p(
|
|
1405
|
-
if (e =
|
|
1406
|
+
p(m, A) {
|
|
1407
|
+
if (e = m, (!c || A & /*computedStyle*/
|
|
1406
1408
|
2 && n !== (n = /*computedStyle*/
|
|
1407
1409
|
e[1] ? "display:none;" : void 0)) && d(t, "style", n), (!c || A & /*geom*/
|
|
1408
1410
|
16 && o !== (o = /*geom*/
|
|
@@ -1416,35 +1418,35 @@ function vo(e) {
|
|
|
1416
1418
|
16 && r !== (r = /*geom*/
|
|
1417
1419
|
e[4].points.map(Bt).join(" "))) && d(s, "points", r), A & /*geom, viewportScale, grab*/
|
|
1418
1420
|
536) {
|
|
1419
|
-
h =
|
|
1421
|
+
h = ke(
|
|
1420
1422
|
/*geom*/
|
|
1421
1423
|
e[4].points
|
|
1422
1424
|
);
|
|
1423
|
-
let
|
|
1424
|
-
for (
|
|
1425
|
-
const
|
|
1426
|
-
p
|
|
1425
|
+
let p;
|
|
1426
|
+
for (p = 0; p < h.length; p += 1) {
|
|
1427
|
+
const _ = Lt(e, h, p);
|
|
1428
|
+
y[p] ? (y[p].p(_, A), O(y[p], 1)) : (y[p] = kt(_), y[p].c(), O(y[p], 1), y[p].m(a.parentNode, a));
|
|
1427
1429
|
}
|
|
1428
|
-
for (
|
|
1429
|
-
g(
|
|
1430
|
-
|
|
1430
|
+
for (re(), p = h.length; p < y.length; p += 1)
|
|
1431
|
+
g(p);
|
|
1432
|
+
le();
|
|
1431
1433
|
}
|
|
1432
1434
|
},
|
|
1433
|
-
i(
|
|
1435
|
+
i(m) {
|
|
1434
1436
|
if (!c) {
|
|
1435
1437
|
for (let A = 0; A < h.length; A += 1)
|
|
1436
|
-
|
|
1438
|
+
O(y[A]);
|
|
1437
1439
|
c = !0;
|
|
1438
1440
|
}
|
|
1439
1441
|
},
|
|
1440
|
-
o(
|
|
1441
|
-
|
|
1442
|
-
for (let A = 0; A <
|
|
1443
|
-
|
|
1442
|
+
o(m) {
|
|
1443
|
+
y = y.filter(Boolean);
|
|
1444
|
+
for (let A = 0; A < y.length; A += 1)
|
|
1445
|
+
P(y[A]);
|
|
1444
1446
|
c = !1;
|
|
1445
1447
|
},
|
|
1446
|
-
d(
|
|
1447
|
-
|
|
1448
|
+
d(m) {
|
|
1449
|
+
m && (I(t), I(i), I(s), I(l), I(a)), gt(y, m), u = !1, ge(f);
|
|
1448
1450
|
}
|
|
1449
1451
|
};
|
|
1450
1452
|
}
|
|
@@ -1487,10 +1489,10 @@ function Lo(e) {
|
|
|
1487
1489
|
e[8]
|
|
1488
1490
|
), {
|
|
1489
1491
|
c() {
|
|
1490
|
-
|
|
1492
|
+
ne(t.$$.fragment);
|
|
1491
1493
|
},
|
|
1492
1494
|
m(o, i) {
|
|
1493
|
-
|
|
1495
|
+
ee(t, o, i), n = !0;
|
|
1494
1496
|
},
|
|
1495
1497
|
p(o, [i]) {
|
|
1496
1498
|
const s = {};
|
|
@@ -1502,25 +1504,25 @@ function Lo(e) {
|
|
|
1502
1504
|
8730 && (s.$$scope = { dirty: i, ctx: o }), t.$set(s);
|
|
1503
1505
|
},
|
|
1504
1506
|
i(o) {
|
|
1505
|
-
n || (
|
|
1507
|
+
n || (O(t.$$.fragment, o), n = !0);
|
|
1506
1508
|
},
|
|
1507
1509
|
o(o) {
|
|
1508
|
-
|
|
1510
|
+
P(t.$$.fragment, o), n = !1;
|
|
1509
1511
|
},
|
|
1510
1512
|
d(o) {
|
|
1511
|
-
|
|
1513
|
+
te(t, o);
|
|
1512
1514
|
}
|
|
1513
1515
|
};
|
|
1514
1516
|
}
|
|
1515
1517
|
const It = (e) => e.join(","), Bt = (e) => e.join(",");
|
|
1516
1518
|
function ko(e, t, n) {
|
|
1517
1519
|
let o, { shape: i } = t, { computedStyle: s } = t, { transform: r } = t, { viewportScale: l = 1 } = t;
|
|
1518
|
-
const a = (h,
|
|
1519
|
-
let
|
|
1520
|
+
const a = (h, y, g) => {
|
|
1521
|
+
let m;
|
|
1520
1522
|
const A = h.geometry;
|
|
1521
|
-
|
|
1522
|
-
const
|
|
1523
|
-
return { ...h, geometry: { points:
|
|
1523
|
+
y === "SHAPE" ? m = A.points.map(([_, w]) => [_ + g[0], w + g[1]]) : m = A.points.map(([_, w], E) => y === `HANDLE-${E}` ? [_ + g[0], w + g[1]] : [_, w]);
|
|
1524
|
+
const p = qe(m);
|
|
1525
|
+
return { ...h, geometry: { points: m, bounds: p } };
|
|
1524
1526
|
};
|
|
1525
1527
|
function c(h) {
|
|
1526
1528
|
me.call(this, e, h);
|
|
@@ -1548,9 +1550,9 @@ function ko(e, t, n) {
|
|
|
1548
1550
|
f
|
|
1549
1551
|
];
|
|
1550
1552
|
}
|
|
1551
|
-
class Io extends
|
|
1553
|
+
class Io extends ie {
|
|
1552
1554
|
constructor(t) {
|
|
1553
|
-
super(),
|
|
1555
|
+
super(), oe(this, t, ko, Lo, Q, {
|
|
1554
1556
|
shape: 0,
|
|
1555
1557
|
computedStyle: 1,
|
|
1556
1558
|
transform: 2,
|
|
@@ -1561,19 +1563,19 @@ class Io extends ne {
|
|
|
1561
1563
|
const st = (e, t) => {
|
|
1562
1564
|
const n = Math.abs(t[0] - e[0]), o = Math.abs(t[1] - e[1]);
|
|
1563
1565
|
return Math.sqrt(Math.pow(n, 2) + Math.pow(o, 2));
|
|
1564
|
-
},
|
|
1566
|
+
}, Se = [];
|
|
1565
1567
|
function Bo(e, t = j) {
|
|
1566
1568
|
let n;
|
|
1567
1569
|
const o = /* @__PURE__ */ new Set();
|
|
1568
1570
|
function i(l) {
|
|
1569
1571
|
if (Q(e, l) && (e = l, n)) {
|
|
1570
|
-
const a = !
|
|
1572
|
+
const a = !Se.length;
|
|
1571
1573
|
for (const c of o)
|
|
1572
|
-
c[1](),
|
|
1574
|
+
c[1](), Se.push(c, e);
|
|
1573
1575
|
if (a) {
|
|
1574
|
-
for (let c = 0; c <
|
|
1575
|
-
|
|
1576
|
-
|
|
1576
|
+
for (let c = 0; c < Se.length; c += 2)
|
|
1577
|
+
Se[c][0](Se[c + 1]);
|
|
1578
|
+
Se.length = 0;
|
|
1577
1579
|
}
|
|
1578
1580
|
}
|
|
1579
1581
|
}
|
|
@@ -1617,7 +1619,7 @@ function Po(e) {
|
|
|
1617
1619
|
let t, n, o, i, s, r;
|
|
1618
1620
|
return {
|
|
1619
1621
|
c() {
|
|
1620
|
-
t =
|
|
1622
|
+
t = C("rect"), d(t, "class", n = Ke(`a9s-handle ${/*$$props*/
|
|
1621
1623
|
e[8].class || ""}`.trim()) + " svelte-1sgkh33"), d(t, "x", o = /*x*/
|
|
1622
1624
|
e[0] - /*handleSize*/
|
|
1623
1625
|
e[5] / 2), d(t, "y", i = /*y*/
|
|
@@ -1635,7 +1637,7 @@ function Po(e) {
|
|
|
1635
1637
|
);
|
|
1636
1638
|
},
|
|
1637
1639
|
m(l, a) {
|
|
1638
|
-
|
|
1640
|
+
B(l, t, a), s || (r = z(
|
|
1639
1641
|
t,
|
|
1640
1642
|
"pointerdown",
|
|
1641
1643
|
/*pointerdown_handler_2*/
|
|
@@ -1644,7 +1646,7 @@ function Po(e) {
|
|
|
1644
1646
|
},
|
|
1645
1647
|
p(l, a) {
|
|
1646
1648
|
a & /*$$props*/
|
|
1647
|
-
256 && n !== (n =
|
|
1649
|
+
256 && n !== (n = Ke(`a9s-handle ${/*$$props*/
|
|
1648
1650
|
l[8].class || ""}`.trim()) + " svelte-1sgkh33") && d(t, "class", n), a & /*x, handleSize*/
|
|
1649
1651
|
33 && o !== (o = /*x*/
|
|
1650
1652
|
l[0] - /*handleSize*/
|
|
@@ -1666,7 +1668,7 @@ function Po(e) {
|
|
|
1666
1668
|
);
|
|
1667
1669
|
},
|
|
1668
1670
|
d(l) {
|
|
1669
|
-
l &&
|
|
1671
|
+
l && I(t), s = !1, r();
|
|
1670
1672
|
}
|
|
1671
1673
|
};
|
|
1672
1674
|
}
|
|
@@ -1674,7 +1676,7 @@ function Co(e) {
|
|
|
1674
1676
|
let t, n, o, i, s, r, l, a, c;
|
|
1675
1677
|
return {
|
|
1676
1678
|
c() {
|
|
1677
|
-
t =
|
|
1679
|
+
t = C("g"), n = C("circle"), i = C("rect"), d(
|
|
1678
1680
|
n,
|
|
1679
1681
|
"cx",
|
|
1680
1682
|
/*x*/
|
|
@@ -1686,12 +1688,12 @@ function Co(e) {
|
|
|
1686
1688
|
e[1]
|
|
1687
1689
|
), d(n, "r", o = /*radius*/
|
|
1688
1690
|
e[3] / /*scale*/
|
|
1689
|
-
e[2]), d(n, "class", "a9s-touch-halo svelte-1sgkh33"),
|
|
1691
|
+
e[2]), d(n, "class", "a9s-touch-halo svelte-1sgkh33"), ye(
|
|
1690
1692
|
n,
|
|
1691
1693
|
"touched",
|
|
1692
1694
|
/*touched*/
|
|
1693
1695
|
e[4]
|
|
1694
|
-
), d(i, "class", s =
|
|
1696
|
+
), d(i, "class", s = Ke(`a9s-handle ${/*$$props*/
|
|
1695
1697
|
e[8].class || ""}`.trim()) + " svelte-1sgkh33"), d(i, "x", r = /*x*/
|
|
1696
1698
|
e[0] - /*handleSize*/
|
|
1697
1699
|
e[5] / 2), d(i, "y", l = /*y*/
|
|
@@ -1709,38 +1711,38 @@ function Co(e) {
|
|
|
1709
1711
|
), d(t, "class", "a9s-touch-handle");
|
|
1710
1712
|
},
|
|
1711
1713
|
m(u, f) {
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
+
B(u, t, f), he(t, n), he(t, i), a || (c = [
|
|
1715
|
+
z(
|
|
1714
1716
|
n,
|
|
1715
1717
|
"pointerdown",
|
|
1716
1718
|
/*pointerdown_handler*/
|
|
1717
1719
|
e[10]
|
|
1718
1720
|
),
|
|
1719
|
-
|
|
1721
|
+
z(
|
|
1720
1722
|
n,
|
|
1721
1723
|
"pointerdown",
|
|
1722
1724
|
/*onPointerDown*/
|
|
1723
1725
|
e[6]
|
|
1724
1726
|
),
|
|
1725
|
-
|
|
1727
|
+
z(
|
|
1726
1728
|
n,
|
|
1727
1729
|
"pointerup",
|
|
1728
1730
|
/*onPointerUp*/
|
|
1729
1731
|
e[7]
|
|
1730
1732
|
),
|
|
1731
|
-
|
|
1733
|
+
z(
|
|
1732
1734
|
i,
|
|
1733
1735
|
"pointerdown",
|
|
1734
1736
|
/*pointerdown_handler_1*/
|
|
1735
1737
|
e[9]
|
|
1736
1738
|
),
|
|
1737
|
-
|
|
1739
|
+
z(
|
|
1738
1740
|
i,
|
|
1739
1741
|
"pointerdown",
|
|
1740
1742
|
/*onPointerDown*/
|
|
1741
1743
|
e[6]
|
|
1742
1744
|
),
|
|
1743
|
-
|
|
1745
|
+
z(
|
|
1744
1746
|
i,
|
|
1745
1747
|
"pointerup",
|
|
1746
1748
|
/*onPointerUp*/
|
|
@@ -1765,13 +1767,13 @@ function Co(e) {
|
|
|
1765
1767
|
12 && o !== (o = /*radius*/
|
|
1766
1768
|
u[3] / /*scale*/
|
|
1767
1769
|
u[2]) && d(n, "r", o), f & /*touched*/
|
|
1768
|
-
16 &&
|
|
1770
|
+
16 && ye(
|
|
1769
1771
|
n,
|
|
1770
1772
|
"touched",
|
|
1771
1773
|
/*touched*/
|
|
1772
1774
|
u[4]
|
|
1773
1775
|
), f & /*$$props*/
|
|
1774
|
-
256 && s !== (s =
|
|
1776
|
+
256 && s !== (s = Ke(`a9s-handle ${/*$$props*/
|
|
1775
1777
|
u[8].class || ""}`.trim()) + " svelte-1sgkh33") && d(i, "class", s), f & /*x, handleSize*/
|
|
1776
1778
|
33 && r !== (r = /*x*/
|
|
1777
1779
|
u[0] - /*handleSize*/
|
|
@@ -1793,7 +1795,7 @@ function Co(e) {
|
|
|
1793
1795
|
);
|
|
1794
1796
|
},
|
|
1795
1797
|
d(u) {
|
|
1796
|
-
u &&
|
|
1798
|
+
u && I(t), a = !1, ge(c);
|
|
1797
1799
|
}
|
|
1798
1800
|
};
|
|
1799
1801
|
}
|
|
@@ -1805,10 +1807,10 @@ function Xo(e) {
|
|
|
1805
1807
|
let i = n()(e);
|
|
1806
1808
|
return {
|
|
1807
1809
|
c() {
|
|
1808
|
-
i.c(), t =
|
|
1810
|
+
i.c(), t = ae();
|
|
1809
1811
|
},
|
|
1810
1812
|
m(s, r) {
|
|
1811
|
-
i.m(s, r),
|
|
1813
|
+
i.m(s, r), B(s, t, r);
|
|
1812
1814
|
},
|
|
1813
1815
|
p(s, [r]) {
|
|
1814
1816
|
i.p(s, r);
|
|
@@ -1816,7 +1818,7 @@ function Xo(e) {
|
|
|
1816
1818
|
i: j,
|
|
1817
1819
|
o: j,
|
|
1818
1820
|
d(s) {
|
|
1819
|
-
s &&
|
|
1821
|
+
s && I(t), i.d(s);
|
|
1820
1822
|
}
|
|
1821
1823
|
};
|
|
1822
1824
|
}
|
|
@@ -1831,7 +1833,7 @@ function Uo(e, t, n) {
|
|
|
1831
1833
|
function h(g) {
|
|
1832
1834
|
me.call(this, e, g);
|
|
1833
1835
|
}
|
|
1834
|
-
function
|
|
1836
|
+
function y(g) {
|
|
1835
1837
|
me.call(this, e, g);
|
|
1836
1838
|
}
|
|
1837
1839
|
return e.$$set = (g) => {
|
|
@@ -1851,17 +1853,17 @@ function Uo(e, t, n) {
|
|
|
1851
1853
|
t,
|
|
1852
1854
|
f,
|
|
1853
1855
|
h,
|
|
1854
|
-
|
|
1856
|
+
y
|
|
1855
1857
|
];
|
|
1856
1858
|
}
|
|
1857
|
-
class
|
|
1859
|
+
class Pe extends ie {
|
|
1858
1860
|
constructor(t) {
|
|
1859
|
-
super(),
|
|
1861
|
+
super(), oe(this, t, Uo, Xo, Q, { x: 0, y: 1, scale: 2, radius: 3 });
|
|
1860
1862
|
}
|
|
1861
1863
|
}
|
|
1862
1864
|
function Ro(e) {
|
|
1863
|
-
let t, n, o, i, s, r, l, a, c, u, f, h,
|
|
1864
|
-
return
|
|
1865
|
+
let t, n, o, i, s, r, l, a, c, u, f, h, y, g, m, A, p, _, w, E, k, X, R, V, Z, S, v, b, T, Y, D, H, J, $, pe, ce, Be, fe, Oe, ue, U, De, Ve;
|
|
1866
|
+
return $ = new Pe({
|
|
1865
1867
|
props: {
|
|
1866
1868
|
class: "a9s-corner-handle-topleft",
|
|
1867
1869
|
x: (
|
|
@@ -1877,12 +1879,12 @@ function Ro(e) {
|
|
|
1877
1879
|
e[3]
|
|
1878
1880
|
)
|
|
1879
1881
|
}
|
|
1880
|
-
}),
|
|
1881
|
-
|
|
1882
|
+
}), $.$on("pointerdown", function() {
|
|
1883
|
+
K(
|
|
1882
1884
|
/*grab*/
|
|
1883
1885
|
e[9]("TOP_LEFT")
|
|
1884
1886
|
) && e[9]("TOP_LEFT").apply(this, arguments);
|
|
1885
|
-
}), ce = new
|
|
1887
|
+
}), ce = new Pe({
|
|
1886
1888
|
props: {
|
|
1887
1889
|
class: "a9s-corner-handle-topright",
|
|
1888
1890
|
x: (
|
|
@@ -1900,11 +1902,11 @@ function Ro(e) {
|
|
|
1900
1902
|
)
|
|
1901
1903
|
}
|
|
1902
1904
|
}), ce.$on("pointerdown", function() {
|
|
1903
|
-
|
|
1905
|
+
K(
|
|
1904
1906
|
/*grab*/
|
|
1905
1907
|
e[9]("TOP_RIGHT")
|
|
1906
1908
|
) && e[9]("TOP_RIGHT").apply(this, arguments);
|
|
1907
|
-
}), fe = new
|
|
1909
|
+
}), fe = new Pe({
|
|
1908
1910
|
props: {
|
|
1909
1911
|
class: "a9s-corner-handle-bottomright",
|
|
1910
1912
|
x: (
|
|
@@ -1923,11 +1925,11 @@ function Ro(e) {
|
|
|
1923
1925
|
)
|
|
1924
1926
|
}
|
|
1925
1927
|
}), fe.$on("pointerdown", function() {
|
|
1926
|
-
|
|
1928
|
+
K(
|
|
1927
1929
|
/*grab*/
|
|
1928
1930
|
e[9]("BOTTOM_RIGHT")
|
|
1929
1931
|
) && e[9]("BOTTOM_RIGHT").apply(this, arguments);
|
|
1930
|
-
}), ue = new
|
|
1932
|
+
}), ue = new Pe({
|
|
1931
1933
|
props: {
|
|
1932
1934
|
class: "a9s-corner-handle-bottomleft",
|
|
1933
1935
|
x: (
|
|
@@ -1945,13 +1947,13 @@ function Ro(e) {
|
|
|
1945
1947
|
)
|
|
1946
1948
|
}
|
|
1947
1949
|
}), ue.$on("pointerdown", function() {
|
|
1948
|
-
|
|
1950
|
+
K(
|
|
1949
1951
|
/*grab*/
|
|
1950
1952
|
e[9]("BOTTOM_LEFT")
|
|
1951
1953
|
) && e[9]("BOTTOM_LEFT").apply(this, arguments);
|
|
1952
1954
|
}), {
|
|
1953
1955
|
c() {
|
|
1954
|
-
t =
|
|
1956
|
+
t = C("rect"), l = se(), a = C("rect"), y = se(), g = C("rect"), _ = se(), w = C("rect"), R = se(), V = C("rect"), b = se(), T = C("rect"), J = se(), ne($.$$.fragment), pe = se(), ne(ce.$$.fragment), Be = se(), ne(fe.$$.fragment), Oe = se(), ne(ue.$$.fragment), d(t, "class", "a9s-outer"), d(t, "style", n = /*computedStyle*/
|
|
1955
1957
|
e[1] ? "display:none;" : void 0), d(t, "x", o = /*geom*/
|
|
1956
1958
|
e[4].x), d(t, "y", i = /*geom*/
|
|
1957
1959
|
e[4].y), d(t, "width", s = /*geom*/
|
|
@@ -1965,159 +1967,159 @@ function Ro(e) {
|
|
|
1965
1967
|
e[4].x), d(a, "y", u = /*geom*/
|
|
1966
1968
|
e[4].y), d(a, "width", f = /*geom*/
|
|
1967
1969
|
e[4].w), d(a, "height", h = /*geom*/
|
|
1968
|
-
e[4].h), d(g, "class", "a9s-edge-handle a9s-edge-handle-top"), d(g, "x",
|
|
1970
|
+
e[4].h), d(g, "class", "a9s-edge-handle a9s-edge-handle-top"), d(g, "x", m = /*geom*/
|
|
1969
1971
|
e[4].x), d(g, "y", A = /*geom*/
|
|
1970
|
-
e[4].y), d(g, "height", 1), d(g, "width",
|
|
1972
|
+
e[4].y), d(g, "height", 1), d(g, "width", p = /*geom*/
|
|
1971
1973
|
e[4].w), d(w, "class", "a9s-edge-handle a9s-edge-handle-right"), d(w, "x", E = /*geom*/
|
|
1972
1974
|
e[4].x + /*geom*/
|
|
1973
|
-
e[4].w), d(w, "y",
|
|
1974
|
-
e[4].y), d(w, "height",
|
|
1975
|
+
e[4].w), d(w, "y", k = /*geom*/
|
|
1976
|
+
e[4].y), d(w, "height", X = /*geom*/
|
|
1975
1977
|
e[4].h), d(w, "width", 1), d(V, "class", "a9s-edge-handle a9s-edge-handle-bottom"), d(V, "x", Z = /*geom*/
|
|
1976
1978
|
e[4].x), d(V, "y", S = /*geom*/
|
|
1977
1979
|
e[4].y + /*geom*/
|
|
1978
|
-
e[4].h), d(V, "height", 1), d(V, "width",
|
|
1979
|
-
e[4].w), d(
|
|
1980
|
-
e[4].x), d(
|
|
1981
|
-
e[4].y), d(
|
|
1982
|
-
e[4].h), d(
|
|
1983
|
-
},
|
|
1984
|
-
m(
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1980
|
+
e[4].h), d(V, "height", 1), d(V, "width", v = /*geom*/
|
|
1981
|
+
e[4].w), d(T, "class", "a9s-edge-handle a9s-edge-handle-left"), d(T, "x", Y = /*geom*/
|
|
1982
|
+
e[4].x), d(T, "y", D = /*geom*/
|
|
1983
|
+
e[4].y), d(T, "height", H = /*geom*/
|
|
1984
|
+
e[4].h), d(T, "width", 1);
|
|
1985
|
+
},
|
|
1986
|
+
m(M, L) {
|
|
1987
|
+
B(M, t, L), B(M, l, L), B(M, a, L), B(M, y, L), B(M, g, L), B(M, _, L), B(M, w, L), B(M, R, L), B(M, V, L), B(M, b, L), B(M, T, L), B(M, J, L), ee($, M, L), B(M, pe, L), ee(ce, M, L), B(M, Be, L), ee(fe, M, L), B(M, Oe, L), ee(ue, M, L), U = !0, De || (Ve = [
|
|
1988
|
+
z(t, "pointerdown", function() {
|
|
1989
|
+
K(
|
|
1988
1990
|
/*grab*/
|
|
1989
1991
|
e[9]("SHAPE")
|
|
1990
1992
|
) && e[9]("SHAPE").apply(this, arguments);
|
|
1991
1993
|
}),
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
+
z(a, "pointerdown", function() {
|
|
1995
|
+
K(
|
|
1994
1996
|
/*grab*/
|
|
1995
1997
|
e[9]("SHAPE")
|
|
1996
1998
|
) && e[9]("SHAPE").apply(this, arguments);
|
|
1997
1999
|
}),
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
+
z(g, "pointerdown", function() {
|
|
2001
|
+
K(
|
|
2000
2002
|
/*grab*/
|
|
2001
2003
|
e[9]("TOP")
|
|
2002
2004
|
) && e[9]("TOP").apply(this, arguments);
|
|
2003
2005
|
}),
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
+
z(w, "pointerdown", function() {
|
|
2007
|
+
K(
|
|
2006
2008
|
/*grab*/
|
|
2007
2009
|
e[9]("RIGHT")
|
|
2008
2010
|
) && e[9]("RIGHT").apply(this, arguments);
|
|
2009
2011
|
}),
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
+
z(V, "pointerdown", function() {
|
|
2013
|
+
K(
|
|
2012
2014
|
/*grab*/
|
|
2013
2015
|
e[9]("BOTTOM")
|
|
2014
2016
|
) && e[9]("BOTTOM").apply(this, arguments);
|
|
2015
2017
|
}),
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
+
z(T, "pointerdown", function() {
|
|
2019
|
+
K(
|
|
2018
2020
|
/*grab*/
|
|
2019
2021
|
e[9]("LEFT")
|
|
2020
2022
|
) && e[9]("LEFT").apply(this, arguments);
|
|
2021
2023
|
})
|
|
2022
|
-
],
|
|
2024
|
+
], De = !0);
|
|
2023
2025
|
},
|
|
2024
|
-
p(
|
|
2025
|
-
e =
|
|
2026
|
+
p(M, L) {
|
|
2027
|
+
e = M, (!U || L & /*computedStyle*/
|
|
2026
2028
|
2 && n !== (n = /*computedStyle*/
|
|
2027
|
-
e[1] ? "display:none;" : void 0)) && d(t, "style", n), (!
|
|
2029
|
+
e[1] ? "display:none;" : void 0)) && d(t, "style", n), (!U || L & /*geom*/
|
|
2028
2030
|
16 && o !== (o = /*geom*/
|
|
2029
|
-
e[4].x)) && d(t, "x", o), (!
|
|
2031
|
+
e[4].x)) && d(t, "x", o), (!U || L & /*geom*/
|
|
2030
2032
|
16 && i !== (i = /*geom*/
|
|
2031
|
-
e[4].y)) && d(t, "y", i), (!
|
|
2033
|
+
e[4].y)) && d(t, "y", i), (!U || L & /*geom*/
|
|
2032
2034
|
16 && s !== (s = /*geom*/
|
|
2033
|
-
e[4].w)) && d(t, "width", s), (!
|
|
2035
|
+
e[4].w)) && d(t, "width", s), (!U || L & /*geom*/
|
|
2034
2036
|
16 && r !== (r = /*geom*/
|
|
2035
|
-
e[4].h)) && d(t, "height", r), (!
|
|
2037
|
+
e[4].h)) && d(t, "height", r), (!U || L & /*computedStyle*/
|
|
2036
2038
|
2) && d(
|
|
2037
2039
|
a,
|
|
2038
2040
|
"style",
|
|
2039
2041
|
/*computedStyle*/
|
|
2040
2042
|
e[1]
|
|
2041
|
-
), (!
|
|
2043
|
+
), (!U || L & /*geom*/
|
|
2042
2044
|
16 && c !== (c = /*geom*/
|
|
2043
|
-
e[4].x)) && d(a, "x", c), (!
|
|
2045
|
+
e[4].x)) && d(a, "x", c), (!U || L & /*geom*/
|
|
2044
2046
|
16 && u !== (u = /*geom*/
|
|
2045
|
-
e[4].y)) && d(a, "y", u), (!
|
|
2047
|
+
e[4].y)) && d(a, "y", u), (!U || L & /*geom*/
|
|
2046
2048
|
16 && f !== (f = /*geom*/
|
|
2047
|
-
e[4].w)) && d(a, "width", f), (!
|
|
2049
|
+
e[4].w)) && d(a, "width", f), (!U || L & /*geom*/
|
|
2048
2050
|
16 && h !== (h = /*geom*/
|
|
2049
|
-
e[4].h)) && d(a, "height", h), (!
|
|
2050
|
-
16 && _ !== (_ = /*geom*/
|
|
2051
|
-
e[4].x)) && d(g, "x", _), (!R || v & /*geom*/
|
|
2052
|
-
16 && A !== (A = /*geom*/
|
|
2053
|
-
e[4].y)) && d(g, "y", A), (!R || v & /*geom*/
|
|
2051
|
+
e[4].h)) && d(a, "height", h), (!U || L & /*geom*/
|
|
2054
2052
|
16 && m !== (m = /*geom*/
|
|
2055
|
-
e[4].
|
|
2053
|
+
e[4].x)) && d(g, "x", m), (!U || L & /*geom*/
|
|
2054
|
+
16 && A !== (A = /*geom*/
|
|
2055
|
+
e[4].y)) && d(g, "y", A), (!U || L & /*geom*/
|
|
2056
|
+
16 && p !== (p = /*geom*/
|
|
2057
|
+
e[4].w)) && d(g, "width", p), (!U || L & /*geom*/
|
|
2056
2058
|
16 && E !== (E = /*geom*/
|
|
2057
2059
|
e[4].x + /*geom*/
|
|
2058
|
-
e[4].w)) && d(w, "x", E), (!
|
|
2059
|
-
16 &&
|
|
2060
|
-
e[4].y)) && d(w, "y",
|
|
2061
|
-
16 &&
|
|
2062
|
-
e[4].h)) && d(w, "height",
|
|
2060
|
+
e[4].w)) && d(w, "x", E), (!U || L & /*geom*/
|
|
2061
|
+
16 && k !== (k = /*geom*/
|
|
2062
|
+
e[4].y)) && d(w, "y", k), (!U || L & /*geom*/
|
|
2063
|
+
16 && X !== (X = /*geom*/
|
|
2064
|
+
e[4].h)) && d(w, "height", X), (!U || L & /*geom*/
|
|
2063
2065
|
16 && Z !== (Z = /*geom*/
|
|
2064
|
-
e[4].x)) && d(V, "x", Z), (!
|
|
2066
|
+
e[4].x)) && d(V, "x", Z), (!U || L & /*geom*/
|
|
2065
2067
|
16 && S !== (S = /*geom*/
|
|
2066
2068
|
e[4].y + /*geom*/
|
|
2067
|
-
e[4].h)) && d(V, "y", S), (!
|
|
2068
|
-
16 &&
|
|
2069
|
-
e[4].w)) && d(V, "width",
|
|
2070
|
-
16 &&
|
|
2071
|
-
e[4].x)) && d(
|
|
2069
|
+
e[4].h)) && d(V, "y", S), (!U || L & /*geom*/
|
|
2070
|
+
16 && v !== (v = /*geom*/
|
|
2071
|
+
e[4].w)) && d(V, "width", v), (!U || L & /*geom*/
|
|
2072
|
+
16 && Y !== (Y = /*geom*/
|
|
2073
|
+
e[4].x)) && d(T, "x", Y), (!U || L & /*geom*/
|
|
2072
2074
|
16 && D !== (D = /*geom*/
|
|
2073
|
-
e[4].y)) && d(
|
|
2074
|
-
16 &&
|
|
2075
|
-
e[4].h)) && d(
|
|
2075
|
+
e[4].y)) && d(T, "y", D), (!U || L & /*geom*/
|
|
2076
|
+
16 && H !== (H = /*geom*/
|
|
2077
|
+
e[4].h)) && d(T, "height", H);
|
|
2078
|
+
const N = {};
|
|
2079
|
+
L & /*geom*/
|
|
2080
|
+
16 && (N.x = /*geom*/
|
|
2081
|
+
e[4].x), L & /*geom*/
|
|
2082
|
+
16 && (N.y = /*geom*/
|
|
2083
|
+
e[4].y), L & /*viewportScale*/
|
|
2084
|
+
8 && (N.scale = /*viewportScale*/
|
|
2085
|
+
e[3]), $.$set(N);
|
|
2086
|
+
const x = {};
|
|
2087
|
+
L & /*geom*/
|
|
2088
|
+
16 && (x.x = /*geom*/
|
|
2089
|
+
e[4].x + /*geom*/
|
|
2090
|
+
e[4].w), L & /*geom*/
|
|
2091
|
+
16 && (x.y = /*geom*/
|
|
2092
|
+
e[4].y), L & /*viewportScale*/
|
|
2093
|
+
8 && (x.scale = /*viewportScale*/
|
|
2094
|
+
e[3]), ce.$set(x);
|
|
2076
2095
|
const de = {};
|
|
2077
|
-
|
|
2096
|
+
L & /*geom*/
|
|
2078
2097
|
16 && (de.x = /*geom*/
|
|
2079
|
-
e[4].x), v & /*geom*/
|
|
2080
|
-
16 && (de.y = /*geom*/
|
|
2081
|
-
e[4].y), v & /*viewportScale*/
|
|
2082
|
-
8 && (de.scale = /*viewportScale*/
|
|
2083
|
-
e[3]), ae.$set(de);
|
|
2084
|
-
const _e = {};
|
|
2085
|
-
v & /*geom*/
|
|
2086
|
-
16 && (_e.x = /*geom*/
|
|
2087
|
-
e[4].x + /*geom*/
|
|
2088
|
-
e[4].w), v & /*geom*/
|
|
2089
|
-
16 && (_e.y = /*geom*/
|
|
2090
|
-
e[4].y), v & /*viewportScale*/
|
|
2091
|
-
8 && (_e.scale = /*viewportScale*/
|
|
2092
|
-
e[3]), ce.$set(_e);
|
|
2093
|
-
const Ne = {};
|
|
2094
|
-
v & /*geom*/
|
|
2095
|
-
16 && (Ne.x = /*geom*/
|
|
2096
2098
|
e[4].x + /*geom*/
|
|
2097
|
-
e[4].w),
|
|
2098
|
-
16 && (
|
|
2099
|
+
e[4].w), L & /*geom*/
|
|
2100
|
+
16 && (de.y = /*geom*/
|
|
2099
2101
|
e[4].y + /*geom*/
|
|
2100
|
-
e[4].h),
|
|
2101
|
-
8 && (
|
|
2102
|
-
e[3]), fe.$set(
|
|
2103
|
-
const
|
|
2104
|
-
|
|
2105
|
-
16 && (
|
|
2106
|
-
e[4].x),
|
|
2107
|
-
16 && (
|
|
2102
|
+
e[4].h), L & /*viewportScale*/
|
|
2103
|
+
8 && (de.scale = /*viewportScale*/
|
|
2104
|
+
e[3]), fe.$set(de);
|
|
2105
|
+
const we = {};
|
|
2106
|
+
L & /*geom*/
|
|
2107
|
+
16 && (we.x = /*geom*/
|
|
2108
|
+
e[4].x), L & /*geom*/
|
|
2109
|
+
16 && (we.y = /*geom*/
|
|
2108
2110
|
e[4].y + /*geom*/
|
|
2109
|
-
e[4].h),
|
|
2110
|
-
8 && (
|
|
2111
|
-
e[3]), ue.$set(
|
|
2111
|
+
e[4].h), L & /*viewportScale*/
|
|
2112
|
+
8 && (we.scale = /*viewportScale*/
|
|
2113
|
+
e[3]), ue.$set(we);
|
|
2112
2114
|
},
|
|
2113
|
-
i(
|
|
2114
|
-
|
|
2115
|
+
i(M) {
|
|
2116
|
+
U || (O($.$$.fragment, M), O(ce.$$.fragment, M), O(fe.$$.fragment, M), O(ue.$$.fragment, M), U = !0);
|
|
2115
2117
|
},
|
|
2116
|
-
o(
|
|
2117
|
-
|
|
2118
|
+
o(M) {
|
|
2119
|
+
P($.$$.fragment, M), P(ce.$$.fragment, M), P(fe.$$.fragment, M), P(ue.$$.fragment, M), U = !1;
|
|
2118
2120
|
},
|
|
2119
|
-
d(
|
|
2120
|
-
|
|
2121
|
+
d(M) {
|
|
2122
|
+
M && (I(t), I(l), I(a), I(y), I(g), I(_), I(w), I(R), I(V), I(b), I(T), I(J), I(pe), I(Be), I(Oe)), te($, M), te(ce, M), te(fe, M), te(ue, M), De = !1, ge(Ve);
|
|
2121
2123
|
}
|
|
2122
2124
|
};
|
|
2123
2125
|
}
|
|
@@ -2160,10 +2162,10 @@ function No(e) {
|
|
|
2160
2162
|
e[8]
|
|
2161
2163
|
), {
|
|
2162
2164
|
c() {
|
|
2163
|
-
|
|
2165
|
+
ne(t.$$.fragment);
|
|
2164
2166
|
},
|
|
2165
2167
|
m(o, i) {
|
|
2166
|
-
|
|
2168
|
+
ee(t, o, i), n = !0;
|
|
2167
2169
|
},
|
|
2168
2170
|
p(o, [i]) {
|
|
2169
2171
|
const s = {};
|
|
@@ -2175,40 +2177,40 @@ function No(e) {
|
|
|
2175
2177
|
1562 && (s.$$scope = { dirty: i, ctx: o }), t.$set(s);
|
|
2176
2178
|
},
|
|
2177
2179
|
i(o) {
|
|
2178
|
-
n || (
|
|
2180
|
+
n || (O(t.$$.fragment, o), n = !0);
|
|
2179
2181
|
},
|
|
2180
2182
|
o(o) {
|
|
2181
|
-
|
|
2183
|
+
P(t.$$.fragment, o), n = !1;
|
|
2182
2184
|
},
|
|
2183
2185
|
d(o) {
|
|
2184
|
-
|
|
2186
|
+
te(t, o);
|
|
2185
2187
|
}
|
|
2186
2188
|
};
|
|
2187
2189
|
}
|
|
2188
2190
|
function Vo(e, t, n) {
|
|
2189
2191
|
let o, { shape: i } = t, { computedStyle: s } = t, { transform: r } = t, { viewportScale: l = 1 } = t;
|
|
2190
|
-
const a = (h,
|
|
2191
|
-
const
|
|
2192
|
-
let [A,
|
|
2193
|
-
const [E,
|
|
2194
|
-
if (
|
|
2195
|
-
A += E,
|
|
2192
|
+
const a = (h, y, g) => {
|
|
2193
|
+
const m = h.geometry.bounds;
|
|
2194
|
+
let [A, p] = [m.minX, m.minY], [_, w] = [m.maxX, m.maxY];
|
|
2195
|
+
const [E, k] = g;
|
|
2196
|
+
if (y === "SHAPE")
|
|
2197
|
+
A += E, _ += E, p += k, w += k;
|
|
2196
2198
|
else {
|
|
2197
|
-
switch (
|
|
2199
|
+
switch (y) {
|
|
2198
2200
|
case "TOP":
|
|
2199
2201
|
case "TOP_LEFT":
|
|
2200
2202
|
case "TOP_RIGHT": {
|
|
2201
|
-
|
|
2203
|
+
p += k;
|
|
2202
2204
|
break;
|
|
2203
2205
|
}
|
|
2204
2206
|
case "BOTTOM":
|
|
2205
2207
|
case "BOTTOM_LEFT":
|
|
2206
2208
|
case "BOTTOM_RIGHT": {
|
|
2207
|
-
w +=
|
|
2209
|
+
w += k;
|
|
2208
2210
|
break;
|
|
2209
2211
|
}
|
|
2210
2212
|
}
|
|
2211
|
-
switch (
|
|
2213
|
+
switch (y) {
|
|
2212
2214
|
case "LEFT":
|
|
2213
2215
|
case "TOP_LEFT":
|
|
2214
2216
|
case "BOTTOM_LEFT": {
|
|
@@ -2218,24 +2220,24 @@ function Vo(e, t, n) {
|
|
|
2218
2220
|
case "RIGHT":
|
|
2219
2221
|
case "TOP_RIGHT":
|
|
2220
2222
|
case "BOTTOM_RIGHT": {
|
|
2221
|
-
|
|
2223
|
+
_ += E;
|
|
2222
2224
|
break;
|
|
2223
2225
|
}
|
|
2224
2226
|
}
|
|
2225
2227
|
}
|
|
2226
|
-
const
|
|
2228
|
+
const X = Math.min(A, _), R = Math.min(p, w), V = Math.abs(_ - A), Z = Math.abs(w - p);
|
|
2227
2229
|
return {
|
|
2228
2230
|
...h,
|
|
2229
2231
|
geometry: {
|
|
2230
|
-
x:
|
|
2231
|
-
y:
|
|
2232
|
+
x: X,
|
|
2233
|
+
y: R,
|
|
2232
2234
|
w: V,
|
|
2233
2235
|
h: Z,
|
|
2234
2236
|
bounds: {
|
|
2235
|
-
minX:
|
|
2236
|
-
minY:
|
|
2237
|
-
maxX:
|
|
2238
|
-
maxY:
|
|
2237
|
+
minX: X,
|
|
2238
|
+
minY: R,
|
|
2239
|
+
maxX: X + V,
|
|
2240
|
+
maxY: R + Z
|
|
2239
2241
|
}
|
|
2240
2242
|
}
|
|
2241
2243
|
};
|
|
@@ -2266,9 +2268,9 @@ function Vo(e, t, n) {
|
|
|
2266
2268
|
f
|
|
2267
2269
|
];
|
|
2268
2270
|
}
|
|
2269
|
-
class Go extends
|
|
2271
|
+
class Go extends ie {
|
|
2270
2272
|
constructor(t) {
|
|
2271
|
-
super(),
|
|
2273
|
+
super(), oe(this, t, Vo, No, Q, {
|
|
2272
2274
|
shape: 0,
|
|
2273
2275
|
computedStyle: 1,
|
|
2274
2276
|
transform: 2,
|
|
@@ -2297,17 +2299,17 @@ function Fo(e) {
|
|
|
2297
2299
|
);
|
|
2298
2300
|
return {
|
|
2299
2301
|
c() {
|
|
2300
|
-
t =
|
|
2302
|
+
t = C("g"), r && r.c(), d(t, "class", "a9s-annotation selected");
|
|
2301
2303
|
},
|
|
2302
2304
|
m(l, a) {
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
+
B(l, t, a), r && r.m(t, null), n = !0, o || (i = [
|
|
2306
|
+
z(
|
|
2305
2307
|
t,
|
|
2306
2308
|
"pointerup",
|
|
2307
2309
|
/*onRelease*/
|
|
2308
2310
|
e[2]
|
|
2309
2311
|
),
|
|
2310
|
-
|
|
2312
|
+
z(
|
|
2311
2313
|
t,
|
|
2312
2314
|
"pointermove",
|
|
2313
2315
|
/*onPointerMove*/
|
|
@@ -2337,37 +2339,37 @@ function Fo(e) {
|
|
|
2337
2339
|
);
|
|
2338
2340
|
},
|
|
2339
2341
|
i(l) {
|
|
2340
|
-
n || (
|
|
2342
|
+
n || (O(r, l), n = !0);
|
|
2341
2343
|
},
|
|
2342
2344
|
o(l) {
|
|
2343
|
-
|
|
2345
|
+
P(r, l), n = !1;
|
|
2344
2346
|
},
|
|
2345
2347
|
d(l) {
|
|
2346
|
-
l &&
|
|
2348
|
+
l && I(t), r && r.d(l), o = !1, ge(i);
|
|
2347
2349
|
}
|
|
2348
2350
|
};
|
|
2349
2351
|
}
|
|
2350
|
-
function
|
|
2352
|
+
function Ko(e, t, n) {
|
|
2351
2353
|
let { $$slots: o = {}, $$scope: i } = t;
|
|
2352
|
-
const s =
|
|
2354
|
+
const s = Ie();
|
|
2353
2355
|
let { shape: r } = t, { editor: l } = t, { transform: a } = t, c, u, f;
|
|
2354
|
-
const h = (
|
|
2355
|
-
c =
|
|
2356
|
-
},
|
|
2356
|
+
const h = (m) => (A) => {
|
|
2357
|
+
c = m, u = a.elementToImage(A.offsetX, A.offsetY), f = r, A.target.setPointerCapture(A.pointerId), s("grab", A);
|
|
2358
|
+
}, y = (m) => {
|
|
2357
2359
|
if (c) {
|
|
2358
|
-
const [A,
|
|
2359
|
-
n(3, r = l(f, c,
|
|
2360
|
+
const [A, p] = a.elementToImage(m.offsetX, m.offsetY), _ = [A - u[0], p - u[1]];
|
|
2361
|
+
n(3, r = l(f, c, _)), s("change", r);
|
|
2360
2362
|
}
|
|
2361
|
-
}, g = (
|
|
2362
|
-
|
|
2363
|
+
}, g = (m) => {
|
|
2364
|
+
m.target.releasePointerCapture(m.pointerId), c = void 0, f = r, s("release", m);
|
|
2363
2365
|
};
|
|
2364
|
-
return e.$$set = (
|
|
2365
|
-
"shape" in
|
|
2366
|
-
}, [h,
|
|
2366
|
+
return e.$$set = (m) => {
|
|
2367
|
+
"shape" in m && n(3, r = m.shape), "editor" in m && n(4, l = m.editor), "transform" in m && n(5, a = m.transform), "$$scope" in m && n(6, i = m.$$scope);
|
|
2368
|
+
}, [h, y, g, r, l, a, i, o];
|
|
2367
2369
|
}
|
|
2368
|
-
class an extends
|
|
2370
|
+
class an extends ie {
|
|
2369
2371
|
constructor(t) {
|
|
2370
|
-
super(),
|
|
2372
|
+
super(), oe(this, t, Ko, Fo, Q, { shape: 3, editor: 4, transform: 5 });
|
|
2371
2373
|
}
|
|
2372
2374
|
}
|
|
2373
2375
|
const Qe = (e, t) => {
|
|
@@ -2378,11 +2380,11 @@ const Qe = (e, t) => {
|
|
|
2378
2380
|
return o && (a += `fill:${o};`, a += `fill-opacity:${i || "0.25"};`), s && (a += `stroke:${s};`, a += `stroke-width:${r || "1"};`, a += `stroke-opacity:${l || "1"};`), a;
|
|
2379
2381
|
}
|
|
2380
2382
|
};
|
|
2381
|
-
function
|
|
2383
|
+
function Wo(e, t, n) {
|
|
2382
2384
|
let o;
|
|
2383
|
-
const i =
|
|
2385
|
+
const i = Ie();
|
|
2384
2386
|
let { annotation: s } = t, { editor: r } = t, { style: l } = t, { target: a } = t, { transform: c } = t, { viewportScale: u } = t, f;
|
|
2385
|
-
return
|
|
2387
|
+
return Ne(() => (n(6, f = new r({
|
|
2386
2388
|
target: a,
|
|
2387
2389
|
props: {
|
|
2388
2390
|
shape: s.target.selector,
|
|
@@ -2414,9 +2416,9 @@ function qo(e, t, n) {
|
|
|
2414
2416
|
o
|
|
2415
2417
|
];
|
|
2416
2418
|
}
|
|
2417
|
-
class
|
|
2419
|
+
class qo extends ie {
|
|
2418
2420
|
constructor(t) {
|
|
2419
|
-
super(),
|
|
2421
|
+
super(), oe(this, t, Wo, null, Q, {
|
|
2420
2422
|
annotation: 0,
|
|
2421
2423
|
editor: 1,
|
|
2422
2424
|
style: 2,
|
|
@@ -2427,11 +2429,11 @@ class Ko extends ne {
|
|
|
2427
2429
|
}
|
|
2428
2430
|
}
|
|
2429
2431
|
function Jo(e, t, n) {
|
|
2430
|
-
const o =
|
|
2432
|
+
const o = Ie();
|
|
2431
2433
|
let { drawingMode: i } = t, { target: s } = t, { tool: r } = t, { transform: l } = t, { viewportScale: a } = t, c;
|
|
2432
|
-
return
|
|
2433
|
-
const u = s.closest("svg"), f = [], h = (
|
|
2434
|
-
u == null || u.addEventListener(
|
|
2434
|
+
return Ne(() => {
|
|
2435
|
+
const u = s.closest("svg"), f = [], h = (y, g, m) => {
|
|
2436
|
+
u == null || u.addEventListener(y, g, m), f.push(() => u == null ? void 0 : u.removeEventListener(y, g, m));
|
|
2435
2437
|
};
|
|
2436
2438
|
return n(5, c = new r({
|
|
2437
2439
|
target: s,
|
|
@@ -2441,8 +2443,8 @@ function Jo(e, t, n) {
|
|
|
2441
2443
|
transform: l,
|
|
2442
2444
|
viewportScale: a
|
|
2443
2445
|
}
|
|
2444
|
-
})), c.$on("create", (
|
|
2445
|
-
f.forEach((
|
|
2446
|
+
})), c.$on("create", (y) => o("create", y.detail)), () => {
|
|
2447
|
+
f.forEach((y) => y()), c.$destroy();
|
|
2446
2448
|
};
|
|
2447
2449
|
}), e.$$set = (u) => {
|
|
2448
2450
|
"drawingMode" in u && n(0, i = u.drawingMode), "target" in u && n(1, s = u.target), "tool" in u && n(2, r = u.tool), "transform" in u && n(3, l = u.transform), "viewportScale" in u && n(4, a = u.viewportScale);
|
|
@@ -2452,9 +2454,9 @@ function Jo(e, t, n) {
|
|
|
2452
2454
|
48 && c && c.$set({ viewportScale: a });
|
|
2453
2455
|
}, [i, s, r, l, a, c];
|
|
2454
2456
|
}
|
|
2455
|
-
class Qo extends
|
|
2457
|
+
class Qo extends ie {
|
|
2456
2458
|
constructor(t) {
|
|
2457
|
-
super(),
|
|
2459
|
+
super(), oe(this, t, Jo, null, Q, {
|
|
2458
2460
|
drawingMode: 0,
|
|
2459
2461
|
target: 1,
|
|
2460
2462
|
tool: 2,
|
|
@@ -2467,7 +2469,7 @@ function Dt(e) {
|
|
|
2467
2469
|
let t, n;
|
|
2468
2470
|
return {
|
|
2469
2471
|
c() {
|
|
2470
|
-
t =
|
|
2472
|
+
t = C("rect"), n = C("rect"), d(t, "class", "a9s-outer"), d(
|
|
2471
2473
|
t,
|
|
2472
2474
|
"x",
|
|
2473
2475
|
/*x*/
|
|
@@ -2510,7 +2512,7 @@ function Dt(e) {
|
|
|
2510
2512
|
);
|
|
2511
2513
|
},
|
|
2512
2514
|
m(o, i) {
|
|
2513
|
-
|
|
2515
|
+
B(o, t, i), B(o, n, i);
|
|
2514
2516
|
},
|
|
2515
2517
|
p(o, i) {
|
|
2516
2518
|
i & /*x*/
|
|
@@ -2564,7 +2566,7 @@ function Dt(e) {
|
|
|
2564
2566
|
);
|
|
2565
2567
|
},
|
|
2566
2568
|
d(o) {
|
|
2567
|
-
o && (
|
|
2569
|
+
o && (I(t), I(n));
|
|
2568
2570
|
}
|
|
2569
2571
|
};
|
|
2570
2572
|
}
|
|
@@ -2575,10 +2577,10 @@ function Zo(e) {
|
|
|
2575
2577
|
);
|
|
2576
2578
|
return {
|
|
2577
2579
|
c() {
|
|
2578
|
-
t =
|
|
2580
|
+
t = C("g"), n && n.c(), d(t, "class", "a9s-annotation a9s-rubberband");
|
|
2579
2581
|
},
|
|
2580
2582
|
m(o, i) {
|
|
2581
|
-
|
|
2583
|
+
B(o, t, i), n && n.m(t, null);
|
|
2582
2584
|
},
|
|
2583
2585
|
p(o, [i]) {
|
|
2584
2586
|
/*origin*/
|
|
@@ -2587,55 +2589,55 @@ function Zo(e) {
|
|
|
2587
2589
|
i: j,
|
|
2588
2590
|
o: j,
|
|
2589
2591
|
d(o) {
|
|
2590
|
-
o &&
|
|
2592
|
+
o && I(t), n && n.d();
|
|
2591
2593
|
}
|
|
2592
2594
|
};
|
|
2593
2595
|
}
|
|
2594
2596
|
function xo(e, t, n) {
|
|
2595
|
-
const o =
|
|
2596
|
-
let { addEventListener: i } = t, { drawingMode: s } = t, { transform: r } = t, l, a, c, u, f, h,
|
|
2597
|
-
const g = (
|
|
2598
|
-
const w =
|
|
2599
|
-
l = performance.now(), s === "drag" && (n(0, a = r.elementToImage(w.offsetX, w.offsetY)), c = a, n(1, u = a[0]), n(2, f = a[1]), n(3, h = 1), n(4,
|
|
2600
|
-
},
|
|
2601
|
-
const w =
|
|
2602
|
-
a && (c = r.elementToImage(w.offsetX, w.offsetY), n(1, u = Math.min(c[0], a[0])), n(2, f = Math.min(c[1], a[1])), n(3, h = Math.abs(c[0] - a[0])), n(4,
|
|
2603
|
-
}, A = (
|
|
2604
|
-
const w =
|
|
2597
|
+
const o = Ie();
|
|
2598
|
+
let { addEventListener: i } = t, { drawingMode: s } = t, { transform: r } = t, l, a, c, u, f, h, y;
|
|
2599
|
+
const g = (_) => {
|
|
2600
|
+
const w = _;
|
|
2601
|
+
l = performance.now(), s === "drag" && (n(0, a = r.elementToImage(w.offsetX, w.offsetY)), c = a, n(1, u = a[0]), n(2, f = a[1]), n(3, h = 1), n(4, y = 1));
|
|
2602
|
+
}, m = (_) => {
|
|
2603
|
+
const w = _;
|
|
2604
|
+
a && (c = r.elementToImage(w.offsetX, w.offsetY), n(1, u = Math.min(c[0], a[0])), n(2, f = Math.min(c[1], a[1])), n(3, h = Math.abs(c[0] - a[0])), n(4, y = Math.abs(c[1] - a[1])));
|
|
2605
|
+
}, A = (_) => {
|
|
2606
|
+
const w = _, E = performance.now() - l;
|
|
2605
2607
|
if (s === "click") {
|
|
2606
2608
|
if (E > 300) return;
|
|
2607
|
-
a ?
|
|
2608
|
-
} else a && (E > 300 || h *
|
|
2609
|
-
},
|
|
2610
|
-
if (h *
|
|
2611
|
-
const
|
|
2609
|
+
a ? p() : (n(0, a = r.elementToImage(w.offsetX, w.offsetY)), c = a, n(1, u = a[0]), n(2, f = a[1]), n(3, h = 1), n(4, y = 1));
|
|
2610
|
+
} else a && (E > 300 || h * y > 100 ? (w.stopPropagation(), p()) : (n(0, a = void 0), c = void 0));
|
|
2611
|
+
}, p = () => {
|
|
2612
|
+
if (h * y > 15) {
|
|
2613
|
+
const _ = {
|
|
2612
2614
|
type: F.RECTANGLE,
|
|
2613
2615
|
geometry: {
|
|
2614
2616
|
bounds: {
|
|
2615
2617
|
minX: u,
|
|
2616
2618
|
minY: f,
|
|
2617
2619
|
maxX: u + h,
|
|
2618
|
-
maxY: f +
|
|
2620
|
+
maxY: f + y
|
|
2619
2621
|
},
|
|
2620
2622
|
x: u,
|
|
2621
2623
|
y: f,
|
|
2622
2624
|
w: h,
|
|
2623
|
-
h:
|
|
2625
|
+
h: y
|
|
2624
2626
|
}
|
|
2625
2627
|
};
|
|
2626
|
-
o("create",
|
|
2628
|
+
o("create", _);
|
|
2627
2629
|
}
|
|
2628
2630
|
n(0, a = void 0), c = void 0;
|
|
2629
2631
|
};
|
|
2630
|
-
return
|
|
2631
|
-
i("pointerdown", g), i("pointermove",
|
|
2632
|
-
}), e.$$set = (
|
|
2633
|
-
"addEventListener" in
|
|
2634
|
-
}, [a, u, f, h,
|
|
2632
|
+
return Ne(() => {
|
|
2633
|
+
i("pointerdown", g), i("pointermove", m), i("pointerup", A, !0);
|
|
2634
|
+
}), e.$$set = (_) => {
|
|
2635
|
+
"addEventListener" in _ && n(5, i = _.addEventListener), "drawingMode" in _ && n(6, s = _.drawingMode), "transform" in _ && n(7, r = _.transform);
|
|
2636
|
+
}, [a, u, f, h, y, i, s, r];
|
|
2635
2637
|
}
|
|
2636
|
-
class $o extends
|
|
2638
|
+
class $o extends ie {
|
|
2637
2639
|
constructor(t) {
|
|
2638
|
-
super(),
|
|
2640
|
+
super(), oe(this, t, xo, Zo, Q, {
|
|
2639
2641
|
addEventListener: 5,
|
|
2640
2642
|
drawingMode: 6,
|
|
2641
2643
|
transform: 7
|
|
@@ -2664,12 +2666,12 @@ function Yt(e) {
|
|
|
2664
2666
|
);
|
|
2665
2667
|
return {
|
|
2666
2668
|
c() {
|
|
2667
|
-
t =
|
|
2669
|
+
t = C("polygon"), o = C("polygon"), r && r.c(), s = ae(), d(t, "class", "a9s-outer"), d(t, "points", n = /*coords*/
|
|
2668
2670
|
e[16]), d(o, "class", "a9s-inner"), d(o, "points", i = /*coords*/
|
|
2669
2671
|
e[16]);
|
|
2670
2672
|
},
|
|
2671
2673
|
m(l, a) {
|
|
2672
|
-
|
|
2674
|
+
B(l, t, a), B(l, o, a), r && r.m(l, a), B(l, s, a);
|
|
2673
2675
|
},
|
|
2674
2676
|
p(l, a) {
|
|
2675
2677
|
a & /*isClosable, points, cursor*/
|
|
@@ -2680,7 +2682,7 @@ function Yt(e) {
|
|
|
2680
2682
|
l[2] ? r ? r.p(l, a) : (r = Pt(l), r.c(), r.m(s.parentNode, s)) : r && (r.d(1), r = null);
|
|
2681
2683
|
},
|
|
2682
2684
|
d(l) {
|
|
2683
|
-
l && (
|
|
2685
|
+
l && (I(t), I(o), I(s)), r && r.d(l);
|
|
2684
2686
|
}
|
|
2685
2687
|
};
|
|
2686
2688
|
}
|
|
@@ -2688,7 +2690,7 @@ function Pt(e) {
|
|
|
2688
2690
|
let t, n, o;
|
|
2689
2691
|
return {
|
|
2690
2692
|
c() {
|
|
2691
|
-
t =
|
|
2693
|
+
t = C("rect"), d(t, "class", "a9s-handle"), d(t, "x", n = /*points*/
|
|
2692
2694
|
e[0][0][0] - /*handleSize*/
|
|
2693
2695
|
e[3] / 2), d(t, "y", o = /*points*/
|
|
2694
2696
|
e[0][0][1] - /*handleSize*/
|
|
@@ -2705,7 +2707,7 @@ function Pt(e) {
|
|
|
2705
2707
|
);
|
|
2706
2708
|
},
|
|
2707
2709
|
m(i, s) {
|
|
2708
|
-
|
|
2710
|
+
B(i, t, s);
|
|
2709
2711
|
},
|
|
2710
2712
|
p(i, s) {
|
|
2711
2713
|
s & /*points, handleSize*/
|
|
@@ -2729,7 +2731,7 @@ function Pt(e) {
|
|
|
2729
2731
|
);
|
|
2730
2732
|
},
|
|
2731
2733
|
d(i) {
|
|
2732
|
-
i &&
|
|
2734
|
+
i && I(t);
|
|
2733
2735
|
}
|
|
2734
2736
|
};
|
|
2735
2737
|
}
|
|
@@ -2740,10 +2742,10 @@ function ei(e) {
|
|
|
2740
2742
|
);
|
|
2741
2743
|
return {
|
|
2742
2744
|
c() {
|
|
2743
|
-
t =
|
|
2745
|
+
t = C("g"), n && n.c(), d(t, "class", "a9s-annotation a9s-rubberband");
|
|
2744
2746
|
},
|
|
2745
2747
|
m(o, i) {
|
|
2746
|
-
|
|
2748
|
+
B(o, t, i), n && n.m(t, null);
|
|
2747
2749
|
},
|
|
2748
2750
|
p(o, [i]) {
|
|
2749
2751
|
/*cursor*/
|
|
@@ -2752,31 +2754,31 @@ function ei(e) {
|
|
|
2752
2754
|
i: j,
|
|
2753
2755
|
o: j,
|
|
2754
2756
|
d(o) {
|
|
2755
|
-
o &&
|
|
2757
|
+
o && I(t), n && n.d();
|
|
2756
2758
|
}
|
|
2757
2759
|
};
|
|
2758
2760
|
}
|
|
2759
2761
|
const ti = 20, ni = 1500;
|
|
2760
2762
|
function oi(e, t, n) {
|
|
2761
2763
|
let o;
|
|
2762
|
-
const i =
|
|
2763
|
-
let { addEventListener: s } = t, { drawingMode: r } = t, { transform: l } = t, { viewportScale: a = 1 } = t, c, u = [], f, h,
|
|
2764
|
+
const i = Ie();
|
|
2765
|
+
let { addEventListener: s } = t, { drawingMode: r } = t, { transform: l } = t, { viewportScale: a = 1 } = t, c, u = [], f, h, y = !1;
|
|
2764
2766
|
const g = (w) => {
|
|
2765
|
-
const E = w, { timeStamp:
|
|
2766
|
-
if (c = { timeStamp:
|
|
2767
|
+
const E = w, { timeStamp: k, offsetX: X, offsetY: R } = E;
|
|
2768
|
+
if (c = { timeStamp: k, offsetX: X, offsetY: R }, r === "drag" && u.length === 0) {
|
|
2767
2769
|
const V = l.elementToImage(E.offsetX, E.offsetY);
|
|
2768
2770
|
u.push(V), n(1, f = V);
|
|
2769
2771
|
}
|
|
2770
|
-
},
|
|
2772
|
+
}, m = (w) => {
|
|
2771
2773
|
const E = w;
|
|
2772
2774
|
if (h && clearTimeout(h), u.length > 0) {
|
|
2773
2775
|
if (n(1, f = l.elementToImage(E.offsetX, E.offsetY)), u.length > 2) {
|
|
2774
|
-
const
|
|
2775
|
-
n(2,
|
|
2776
|
+
const k = st(f, u[0]) * a;
|
|
2777
|
+
n(2, y = k < ti);
|
|
2776
2778
|
}
|
|
2777
2779
|
E.pointerType === "touch" && (h = setTimeout(
|
|
2778
2780
|
() => {
|
|
2779
|
-
|
|
2781
|
+
p();
|
|
2780
2782
|
},
|
|
2781
2783
|
ni
|
|
2782
2784
|
));
|
|
@@ -2784,13 +2786,13 @@ function oi(e, t, n) {
|
|
|
2784
2786
|
}, A = (w) => {
|
|
2785
2787
|
const E = w;
|
|
2786
2788
|
if (h && clearTimeout(h), r === "click") {
|
|
2787
|
-
const
|
|
2788
|
-
if (
|
|
2789
|
-
if (
|
|
2790
|
-
|
|
2789
|
+
const k = E.timeStamp - c.timeStamp, X = st([c.offsetX, c.offsetY], [E.offsetX, E.offsetY]);
|
|
2790
|
+
if (k > 300 || X > 15) return;
|
|
2791
|
+
if (y)
|
|
2792
|
+
_();
|
|
2791
2793
|
else if (u.length === 0) {
|
|
2792
|
-
const
|
|
2793
|
-
u.push(
|
|
2794
|
+
const R = l.elementToImage(E.offsetX, E.offsetY);
|
|
2795
|
+
u.push(R), n(1, f = R);
|
|
2794
2796
|
} else
|
|
2795
2797
|
u.push(f);
|
|
2796
2798
|
} else {
|
|
@@ -2798,27 +2800,27 @@ function oi(e, t, n) {
|
|
|
2798
2800
|
n(0, u = []), n(1, f = void 0);
|
|
2799
2801
|
return;
|
|
2800
2802
|
}
|
|
2801
|
-
E.stopImmediatePropagation(),
|
|
2803
|
+
E.stopImmediatePropagation(), y ? _() : u.push(f);
|
|
2802
2804
|
}
|
|
2803
|
-
},
|
|
2805
|
+
}, p = () => {
|
|
2804
2806
|
if (!f) return;
|
|
2805
2807
|
const w = [...u, f], E = {
|
|
2806
2808
|
type: F.POLYGON,
|
|
2807
|
-
geometry: { bounds:
|
|
2809
|
+
geometry: { bounds: qe(w), points: w }
|
|
2808
2810
|
};
|
|
2809
2811
|
ht(E) > 4 && (n(0, u = []), n(1, f = void 0), i("create", E));
|
|
2810
|
-
},
|
|
2812
|
+
}, _ = () => {
|
|
2811
2813
|
const w = {
|
|
2812
2814
|
type: F.POLYGON,
|
|
2813
2815
|
geometry: {
|
|
2814
|
-
bounds:
|
|
2816
|
+
bounds: qe(u),
|
|
2815
2817
|
points: [...u]
|
|
2816
2818
|
}
|
|
2817
2819
|
};
|
|
2818
2820
|
n(0, u = []), n(1, f = void 0), i("create", w);
|
|
2819
2821
|
};
|
|
2820
|
-
return
|
|
2821
|
-
s("pointerdown", g, !0), s("pointermove",
|
|
2822
|
+
return Ne(() => {
|
|
2823
|
+
s("pointerdown", g, !0), s("pointermove", m), s("pointerup", A, !0), s("dblclick", p, !0);
|
|
2822
2824
|
}), e.$$set = (w) => {
|
|
2823
2825
|
"addEventListener" in w && n(4, s = w.addEventListener), "drawingMode" in w && n(5, r = w.drawingMode), "transform" in w && n(6, l = w.transform), "viewportScale" in w && n(7, a = w.viewportScale);
|
|
2824
2826
|
}, e.$$.update = () => {
|
|
@@ -2827,7 +2829,7 @@ function oi(e, t, n) {
|
|
|
2827
2829
|
}, [
|
|
2828
2830
|
u,
|
|
2829
2831
|
f,
|
|
2830
|
-
|
|
2832
|
+
y,
|
|
2831
2833
|
o,
|
|
2832
2834
|
s,
|
|
2833
2835
|
r,
|
|
@@ -2835,9 +2837,9 @@ function oi(e, t, n) {
|
|
|
2835
2837
|
a
|
|
2836
2838
|
];
|
|
2837
2839
|
}
|
|
2838
|
-
class ii extends
|
|
2840
|
+
class ii extends ie {
|
|
2839
2841
|
constructor(t) {
|
|
2840
|
-
super(),
|
|
2842
|
+
super(), oe(this, t, oi, ei, Q, {
|
|
2841
2843
|
addEventListener: 4,
|
|
2842
2844
|
drawingMode: 5,
|
|
2843
2845
|
transform: 6,
|
|
@@ -2853,7 +2855,7 @@ function ri(e) {
|
|
|
2853
2855
|
let t, n, o, i, s;
|
|
2854
2856
|
return {
|
|
2855
2857
|
c() {
|
|
2856
|
-
t =
|
|
2858
|
+
t = C("g"), n = C("ellipse"), i = C("ellipse"), d(n, "class", "a9s-outer"), d(n, "style", o = /*computedStyle*/
|
|
2857
2859
|
e[1] ? "display:none;" : void 0), d(
|
|
2858
2860
|
n,
|
|
2859
2861
|
"cx",
|
|
@@ -2903,7 +2905,7 @@ function ri(e) {
|
|
|
2903
2905
|
e[0].id);
|
|
2904
2906
|
},
|
|
2905
2907
|
m(r, l) {
|
|
2906
|
-
|
|
2908
|
+
B(r, t, l), he(t, n), he(t, i);
|
|
2907
2909
|
},
|
|
2908
2910
|
p(r, [l]) {
|
|
2909
2911
|
l & /*computedStyle*/
|
|
@@ -2921,7 +2923,7 @@ function ri(e) {
|
|
|
2921
2923
|
i: j,
|
|
2922
2924
|
o: j,
|
|
2923
2925
|
d(r) {
|
|
2924
|
-
r &&
|
|
2926
|
+
r && I(t);
|
|
2925
2927
|
}
|
|
2926
2928
|
};
|
|
2927
2929
|
}
|
|
@@ -2935,16 +2937,16 @@ function li(e, t, n) {
|
|
|
2935
2937
|
129 && n(1, o = Qe(i, r));
|
|
2936
2938
|
}, [i, o, l, a, c, u, s, r];
|
|
2937
2939
|
}
|
|
2938
|
-
class ai extends
|
|
2940
|
+
class ai extends ie {
|
|
2939
2941
|
constructor(t) {
|
|
2940
|
-
super(),
|
|
2942
|
+
super(), oe(this, t, li, ri, Q, { annotation: 0, geom: 6, style: 7 });
|
|
2941
2943
|
}
|
|
2942
2944
|
}
|
|
2943
2945
|
function ci(e) {
|
|
2944
2946
|
let t, n, o, i, s;
|
|
2945
2947
|
return {
|
|
2946
2948
|
c() {
|
|
2947
|
-
t =
|
|
2949
|
+
t = C("g"), n = C("polygon"), i = C("polygon"), d(n, "class", "a9s-outer"), d(n, "style", o = /*computedStyle*/
|
|
2948
2950
|
e[1] ? "display:none;" : void 0), d(
|
|
2949
2951
|
n,
|
|
2950
2952
|
"points",
|
|
@@ -2964,7 +2966,7 @@ function ci(e) {
|
|
|
2964
2966
|
e[0].id);
|
|
2965
2967
|
},
|
|
2966
2968
|
m(r, l) {
|
|
2967
|
-
|
|
2969
|
+
B(r, t, l), he(t, n), he(t, i);
|
|
2968
2970
|
},
|
|
2969
2971
|
p(r, [l]) {
|
|
2970
2972
|
l & /*computedStyle*/
|
|
@@ -2982,7 +2984,7 @@ function ci(e) {
|
|
|
2982
2984
|
i: j,
|
|
2983
2985
|
o: j,
|
|
2984
2986
|
d(r) {
|
|
2985
|
-
r &&
|
|
2987
|
+
r && I(t);
|
|
2986
2988
|
}
|
|
2987
2989
|
};
|
|
2988
2990
|
}
|
|
@@ -2997,16 +2999,16 @@ function di(e, t, n) {
|
|
|
2997
2999
|
17 && n(1, o = Qe(i, r));
|
|
2998
3000
|
}, [i, o, l, s, r];
|
|
2999
3001
|
}
|
|
3000
|
-
class hi extends
|
|
3002
|
+
class hi extends ie {
|
|
3001
3003
|
constructor(t) {
|
|
3002
|
-
super(),
|
|
3004
|
+
super(), oe(this, t, di, ci, Q, { annotation: 0, geom: 3, style: 4 });
|
|
3003
3005
|
}
|
|
3004
3006
|
}
|
|
3005
3007
|
function gi(e) {
|
|
3006
3008
|
let t, n, o, i, s;
|
|
3007
3009
|
return {
|
|
3008
3010
|
c() {
|
|
3009
|
-
t =
|
|
3011
|
+
t = C("g"), n = C("rect"), i = C("rect"), d(n, "class", "a9s-outer"), d(n, "style", o = /*computedStyle*/
|
|
3010
3012
|
e[5] ? "display:none;" : void 0), d(
|
|
3011
3013
|
n,
|
|
3012
3014
|
"x",
|
|
@@ -3056,7 +3058,7 @@ function gi(e) {
|
|
|
3056
3058
|
e[0].id);
|
|
3057
3059
|
},
|
|
3058
3060
|
m(r, l) {
|
|
3059
|
-
|
|
3061
|
+
B(r, t, l), he(t, n), he(t, i);
|
|
3060
3062
|
},
|
|
3061
3063
|
p(r, [l]) {
|
|
3062
3064
|
l & /*computedStyle*/
|
|
@@ -3122,7 +3124,7 @@ function gi(e) {
|
|
|
3122
3124
|
i: j,
|
|
3123
3125
|
o: j,
|
|
3124
3126
|
d(r) {
|
|
3125
|
-
r &&
|
|
3127
|
+
r && I(t);
|
|
3126
3128
|
}
|
|
3127
3129
|
};
|
|
3128
3130
|
}
|
|
@@ -3136,12 +3138,12 @@ function mi(e, t, n) {
|
|
|
3136
3138
|
64 && n(4, { x: i, y: s, w: r, h: l } = c, i, (n(3, s), n(6, c)), (n(2, r), n(6, c)), (n(1, l), n(6, c)));
|
|
3137
3139
|
}, [a, l, r, s, i, o, c, u];
|
|
3138
3140
|
}
|
|
3139
|
-
class pi extends
|
|
3141
|
+
class pi extends ie {
|
|
3140
3142
|
constructor(t) {
|
|
3141
|
-
super(),
|
|
3143
|
+
super(), oe(this, t, mi, gi, Q, { annotation: 0, geom: 6, style: 7 });
|
|
3142
3144
|
}
|
|
3143
3145
|
}
|
|
3144
|
-
const
|
|
3146
|
+
const qi = {
|
|
3145
3147
|
elementToImage: (e, t) => [e, t]
|
|
3146
3148
|
}, yi = (e) => ({
|
|
3147
3149
|
elementToImage: (t, n) => {
|
|
@@ -3151,7 +3153,7 @@ const Ki = {
|
|
|
3151
3153
|
return [s, r];
|
|
3152
3154
|
}
|
|
3153
3155
|
}), _i = 250, wi = (e, t) => {
|
|
3154
|
-
const n =
|
|
3156
|
+
const n = Ie();
|
|
3155
3157
|
let o;
|
|
3156
3158
|
return { onPointerDown: () => o = performance.now(), onPointerUp: (r) => {
|
|
3157
3159
|
if (performance.now() - o < _i) {
|
|
@@ -3165,52 +3167,52 @@ const Ki = {
|
|
|
3165
3167
|
};
|
|
3166
3168
|
function Ct(e, t, n) {
|
|
3167
3169
|
const o = e.slice();
|
|
3168
|
-
o[
|
|
3170
|
+
o[39] = t[n];
|
|
3169
3171
|
const i = (
|
|
3170
3172
|
/*getEditor*/
|
|
3171
|
-
o[
|
|
3173
|
+
o[24](
|
|
3172
3174
|
/*editable*/
|
|
3173
|
-
o[
|
|
3175
|
+
o[39].target.selector
|
|
3174
3176
|
)
|
|
3175
3177
|
);
|
|
3176
|
-
return o[
|
|
3178
|
+
return o[40] = i, o;
|
|
3177
3179
|
}
|
|
3178
3180
|
function Xt(e, t, n) {
|
|
3179
3181
|
const o = e.slice();
|
|
3180
|
-
return o[
|
|
3182
|
+
return o[43] = t[n], o;
|
|
3181
3183
|
}
|
|
3182
3184
|
function lt(e) {
|
|
3183
3185
|
const t = e.slice(), n = (
|
|
3184
3186
|
/*annotation*/
|
|
3185
|
-
t[
|
|
3187
|
+
t[43].target.selector
|
|
3186
3188
|
);
|
|
3187
|
-
return t[
|
|
3189
|
+
return t[46] = n, t;
|
|
3188
3190
|
}
|
|
3189
3191
|
function Ut(e) {
|
|
3190
3192
|
let t = (
|
|
3191
3193
|
/*annotation*/
|
|
3192
|
-
e[
|
|
3194
|
+
e[43].id
|
|
3193
3195
|
), n, o, i = Rt(e);
|
|
3194
3196
|
return {
|
|
3195
3197
|
c() {
|
|
3196
|
-
i.c(), n =
|
|
3198
|
+
i.c(), n = ae();
|
|
3197
3199
|
},
|
|
3198
3200
|
m(s, r) {
|
|
3199
|
-
i.m(s, r),
|
|
3201
|
+
i.m(s, r), B(s, n, r), o = !0;
|
|
3200
3202
|
},
|
|
3201
3203
|
p(s, r) {
|
|
3202
3204
|
r[0] & /*$store*/
|
|
3203
|
-
|
|
3204
|
-
s[
|
|
3205
|
+
65536 && Q(t, t = /*annotation*/
|
|
3206
|
+
s[43].id) ? (re(), P(i, 1, 1, j), le(), i = Rt(s), i.c(), O(i, 1), i.m(n.parentNode, n)) : i.p(s, r);
|
|
3205
3207
|
},
|
|
3206
3208
|
i(s) {
|
|
3207
|
-
o || (
|
|
3209
|
+
o || (O(i), o = !0);
|
|
3208
3210
|
},
|
|
3209
3211
|
o(s) {
|
|
3210
|
-
|
|
3212
|
+
P(i), o = !1;
|
|
3211
3213
|
},
|
|
3212
3214
|
d(s) {
|
|
3213
|
-
s &&
|
|
3215
|
+
s && I(n), i.d(s);
|
|
3214
3216
|
}
|
|
3215
3217
|
};
|
|
3216
3218
|
}
|
|
@@ -3220,11 +3222,11 @@ function bi(e) {
|
|
|
3220
3222
|
props: {
|
|
3221
3223
|
annotation: (
|
|
3222
3224
|
/*annotation*/
|
|
3223
|
-
e[
|
|
3225
|
+
e[43]
|
|
3224
3226
|
),
|
|
3225
3227
|
geom: (
|
|
3226
3228
|
/*selector*/
|
|
3227
|
-
e[
|
|
3229
|
+
e[46].geometry
|
|
3228
3230
|
),
|
|
3229
3231
|
style: (
|
|
3230
3232
|
/*style*/
|
|
@@ -3233,29 +3235,29 @@ function bi(e) {
|
|
|
3233
3235
|
}
|
|
3234
3236
|
}), {
|
|
3235
3237
|
c() {
|
|
3236
|
-
|
|
3238
|
+
ne(t.$$.fragment);
|
|
3237
3239
|
},
|
|
3238
3240
|
m(o, i) {
|
|
3239
|
-
|
|
3241
|
+
ee(t, o, i), n = !0;
|
|
3240
3242
|
},
|
|
3241
3243
|
p(o, i) {
|
|
3242
3244
|
const s = {};
|
|
3243
3245
|
i[0] & /*$store*/
|
|
3244
|
-
|
|
3245
|
-
o[
|
|
3246
|
-
|
|
3247
|
-
o[
|
|
3246
|
+
65536 && (s.annotation = /*annotation*/
|
|
3247
|
+
o[43]), i[0] & /*$store*/
|
|
3248
|
+
65536 && (s.geom = /*selector*/
|
|
3249
|
+
o[46].geometry), i[0] & /*style*/
|
|
3248
3250
|
2 && (s.style = /*style*/
|
|
3249
3251
|
o[1]), t.$set(s);
|
|
3250
3252
|
},
|
|
3251
3253
|
i(o) {
|
|
3252
|
-
n || (
|
|
3254
|
+
n || (O(t.$$.fragment, o), n = !0);
|
|
3253
3255
|
},
|
|
3254
3256
|
o(o) {
|
|
3255
|
-
|
|
3257
|
+
P(t.$$.fragment, o), n = !1;
|
|
3256
3258
|
},
|
|
3257
3259
|
d(o) {
|
|
3258
|
-
|
|
3260
|
+
te(t, o);
|
|
3259
3261
|
}
|
|
3260
3262
|
};
|
|
3261
3263
|
}
|
|
@@ -3265,11 +3267,11 @@ function Ei(e) {
|
|
|
3265
3267
|
props: {
|
|
3266
3268
|
annotation: (
|
|
3267
3269
|
/*annotation*/
|
|
3268
|
-
e[
|
|
3270
|
+
e[43]
|
|
3269
3271
|
),
|
|
3270
3272
|
geom: (
|
|
3271
3273
|
/*selector*/
|
|
3272
|
-
e[
|
|
3274
|
+
e[46].geometry
|
|
3273
3275
|
),
|
|
3274
3276
|
style: (
|
|
3275
3277
|
/*style*/
|
|
@@ -3278,29 +3280,29 @@ function Ei(e) {
|
|
|
3278
3280
|
}
|
|
3279
3281
|
}), {
|
|
3280
3282
|
c() {
|
|
3281
|
-
|
|
3283
|
+
ne(t.$$.fragment);
|
|
3282
3284
|
},
|
|
3283
3285
|
m(o, i) {
|
|
3284
|
-
|
|
3286
|
+
ee(t, o, i), n = !0;
|
|
3285
3287
|
},
|
|
3286
3288
|
p(o, i) {
|
|
3287
3289
|
const s = {};
|
|
3288
3290
|
i[0] & /*$store*/
|
|
3289
|
-
|
|
3290
|
-
o[
|
|
3291
|
-
|
|
3292
|
-
o[
|
|
3291
|
+
65536 && (s.annotation = /*annotation*/
|
|
3292
|
+
o[43]), i[0] & /*$store*/
|
|
3293
|
+
65536 && (s.geom = /*selector*/
|
|
3294
|
+
o[46].geometry), i[0] & /*style*/
|
|
3293
3295
|
2 && (s.style = /*style*/
|
|
3294
3296
|
o[1]), t.$set(s);
|
|
3295
3297
|
},
|
|
3296
3298
|
i(o) {
|
|
3297
|
-
n || (
|
|
3299
|
+
n || (O(t.$$.fragment, o), n = !0);
|
|
3298
3300
|
},
|
|
3299
3301
|
o(o) {
|
|
3300
|
-
|
|
3302
|
+
P(t.$$.fragment, o), n = !1;
|
|
3301
3303
|
},
|
|
3302
3304
|
d(o) {
|
|
3303
|
-
|
|
3305
|
+
te(t, o);
|
|
3304
3306
|
}
|
|
3305
3307
|
};
|
|
3306
3308
|
}
|
|
@@ -3311,11 +3313,11 @@ function Ai(e) {
|
|
|
3311
3313
|
props: {
|
|
3312
3314
|
annotation: (
|
|
3313
3315
|
/*annotation*/
|
|
3314
|
-
e[
|
|
3316
|
+
e[43]
|
|
3315
3317
|
),
|
|
3316
3318
|
geom: (
|
|
3317
3319
|
/*selector*/
|
|
3318
|
-
(o = e[
|
|
3320
|
+
(o = e[46]) == null ? void 0 : o.geometry
|
|
3319
3321
|
),
|
|
3320
3322
|
style: (
|
|
3321
3323
|
/*style*/
|
|
@@ -3324,30 +3326,30 @@ function Ai(e) {
|
|
|
3324
3326
|
}
|
|
3325
3327
|
}), {
|
|
3326
3328
|
c() {
|
|
3327
|
-
|
|
3329
|
+
ne(t.$$.fragment);
|
|
3328
3330
|
},
|
|
3329
3331
|
m(i, s) {
|
|
3330
|
-
|
|
3332
|
+
ee(t, i, s), n = !0;
|
|
3331
3333
|
},
|
|
3332
3334
|
p(i, s) {
|
|
3333
3335
|
var l;
|
|
3334
3336
|
const r = {};
|
|
3335
3337
|
s[0] & /*$store*/
|
|
3336
|
-
|
|
3337
|
-
i[
|
|
3338
|
-
|
|
3339
|
-
(l = i[
|
|
3338
|
+
65536 && (r.annotation = /*annotation*/
|
|
3339
|
+
i[43]), s[0] & /*$store*/
|
|
3340
|
+
65536 && (r.geom = /*selector*/
|
|
3341
|
+
(l = i[46]) == null ? void 0 : l.geometry), s[0] & /*style*/
|
|
3340
3342
|
2 && (r.style = /*style*/
|
|
3341
3343
|
i[1]), t.$set(r);
|
|
3342
3344
|
},
|
|
3343
3345
|
i(i) {
|
|
3344
|
-
n || (
|
|
3346
|
+
n || (O(t.$$.fragment, i), n = !0);
|
|
3345
3347
|
},
|
|
3346
3348
|
o(i) {
|
|
3347
|
-
|
|
3349
|
+
P(t.$$.fragment, i), n = !1;
|
|
3348
3350
|
},
|
|
3349
3351
|
d(i) {
|
|
3350
|
-
|
|
3352
|
+
te(t, i);
|
|
3351
3353
|
}
|
|
3352
3354
|
};
|
|
3353
3355
|
}
|
|
@@ -3358,77 +3360,77 @@ function Rt(e) {
|
|
|
3358
3360
|
var u, f, h;
|
|
3359
3361
|
return (
|
|
3360
3362
|
/*selector*/
|
|
3361
|
-
((u = a[
|
|
3363
|
+
((u = a[46]) == null ? void 0 : u.type) === F.ELLIPSE ? 0 : (
|
|
3362
3364
|
/*selector*/
|
|
3363
|
-
((f = a[
|
|
3365
|
+
((f = a[46]) == null ? void 0 : f.type) === F.RECTANGLE ? 1 : (
|
|
3364
3366
|
/*selector*/
|
|
3365
|
-
((h = a[
|
|
3367
|
+
((h = a[46]) == null ? void 0 : h.type) === F.POLYGON ? 2 : -1
|
|
3366
3368
|
)
|
|
3367
3369
|
)
|
|
3368
3370
|
);
|
|
3369
3371
|
}
|
|
3370
3372
|
return ~(t = l(e)) && (n = r[t] = s[t](e)), {
|
|
3371
3373
|
c() {
|
|
3372
|
-
n && n.c(), o =
|
|
3374
|
+
n && n.c(), o = ae();
|
|
3373
3375
|
},
|
|
3374
3376
|
m(a, c) {
|
|
3375
|
-
~t && r[t].m(a, c),
|
|
3377
|
+
~t && r[t].m(a, c), B(a, o, c), i = !0;
|
|
3376
3378
|
},
|
|
3377
3379
|
p(a, c) {
|
|
3378
3380
|
let u = t;
|
|
3379
|
-
t = l(a), t === u ? ~t && r[t].p(a, c) : (n && (
|
|
3381
|
+
t = l(a), t === u ? ~t && r[t].p(a, c) : (n && (re(), P(r[u], 1, 1, () => {
|
|
3380
3382
|
r[u] = null;
|
|
3381
|
-
}),
|
|
3383
|
+
}), le()), ~t ? (n = r[t], n ? n.p(a, c) : (n = r[t] = s[t](a), n.c()), O(n, 1), n.m(o.parentNode, o)) : n = null);
|
|
3382
3384
|
},
|
|
3383
3385
|
i(a) {
|
|
3384
|
-
i || (
|
|
3386
|
+
i || (O(n), i = !0);
|
|
3385
3387
|
},
|
|
3386
3388
|
o(a) {
|
|
3387
|
-
|
|
3389
|
+
P(n), i = !1;
|
|
3388
3390
|
},
|
|
3389
3391
|
d(a) {
|
|
3390
|
-
a &&
|
|
3392
|
+
a && I(o), ~t && r[t].d(a);
|
|
3391
3393
|
}
|
|
3392
3394
|
};
|
|
3393
3395
|
}
|
|
3394
3396
|
function Nt(e) {
|
|
3395
3397
|
let t = Je(
|
|
3396
3398
|
/*annotation*/
|
|
3397
|
-
e[
|
|
3399
|
+
e[43]
|
|
3398
3400
|
) && !/*isEditable*/
|
|
3399
|
-
e[
|
|
3401
|
+
e[9](
|
|
3400
3402
|
/*annotation*/
|
|
3401
|
-
e[
|
|
3403
|
+
e[43]
|
|
3402
3404
|
), n, o, i = t && Ut(lt(e));
|
|
3403
3405
|
return {
|
|
3404
3406
|
c() {
|
|
3405
|
-
i && i.c(), n =
|
|
3407
|
+
i && i.c(), n = ae();
|
|
3406
3408
|
},
|
|
3407
3409
|
m(s, r) {
|
|
3408
|
-
i && i.m(s, r),
|
|
3410
|
+
i && i.m(s, r), B(s, n, r), o = !0;
|
|
3409
3411
|
},
|
|
3410
3412
|
p(s, r) {
|
|
3411
3413
|
r[0] & /*$store, isEditable*/
|
|
3412
|
-
|
|
3414
|
+
66048 && (t = Je(
|
|
3413
3415
|
/*annotation*/
|
|
3414
|
-
s[
|
|
3416
|
+
s[43]
|
|
3415
3417
|
) && !/*isEditable*/
|
|
3416
|
-
s[
|
|
3418
|
+
s[9](
|
|
3417
3419
|
/*annotation*/
|
|
3418
|
-
s[
|
|
3420
|
+
s[43]
|
|
3419
3421
|
)), t ? i ? (i.p(lt(s), r), r[0] & /*$store, isEditable*/
|
|
3420
|
-
|
|
3422
|
+
66048 && O(i, 1)) : (i = Ut(lt(s)), i.c(), O(i, 1), i.m(n.parentNode, n)) : i && (re(), P(i, 1, 1, () => {
|
|
3421
3423
|
i = null;
|
|
3422
|
-
}),
|
|
3424
|
+
}), le());
|
|
3423
3425
|
},
|
|
3424
3426
|
i(s) {
|
|
3425
|
-
o || (
|
|
3427
|
+
o || (O(i), o = !0);
|
|
3426
3428
|
},
|
|
3427
3429
|
o(s) {
|
|
3428
|
-
|
|
3430
|
+
P(i), o = !1;
|
|
3429
3431
|
},
|
|
3430
3432
|
d(s) {
|
|
3431
|
-
s &&
|
|
3433
|
+
s && I(n), i && i.d(s);
|
|
3432
3434
|
}
|
|
3433
3435
|
};
|
|
3434
3436
|
}
|
|
@@ -3438,118 +3440,118 @@ function Vt(e) {
|
|
|
3438
3440
|
function l(a, c) {
|
|
3439
3441
|
return (
|
|
3440
3442
|
/*editableAnnotations*/
|
|
3441
|
-
a[
|
|
3443
|
+
a[8] ? 0 : (
|
|
3442
3444
|
/*tool*/
|
|
3443
|
-
a[
|
|
3445
|
+
a[14] && /*drawingEnabled*/
|
|
3444
3446
|
a[0] ? 1 : -1
|
|
3445
3447
|
)
|
|
3446
3448
|
);
|
|
3447
3449
|
}
|
|
3448
3450
|
return ~(t = l(e)) && (n = r[t] = s[t](e)), {
|
|
3449
3451
|
c() {
|
|
3450
|
-
n && n.c(), o =
|
|
3452
|
+
n && n.c(), o = ae();
|
|
3451
3453
|
},
|
|
3452
3454
|
m(a, c) {
|
|
3453
|
-
~t && r[t].m(a, c),
|
|
3455
|
+
~t && r[t].m(a, c), B(a, o, c), i = !0;
|
|
3454
3456
|
},
|
|
3455
3457
|
p(a, c) {
|
|
3456
3458
|
let u = t;
|
|
3457
|
-
t = l(a), t === u ? ~t && r[t].p(a, c) : (n && (
|
|
3459
|
+
t = l(a), t === u ? ~t && r[t].p(a, c) : (n && (re(), P(r[u], 1, 1, () => {
|
|
3458
3460
|
r[u] = null;
|
|
3459
|
-
}),
|
|
3461
|
+
}), le()), ~t ? (n = r[t], n ? n.p(a, c) : (n = r[t] = s[t](a), n.c()), O(n, 1), n.m(o.parentNode, o)) : n = null);
|
|
3460
3462
|
},
|
|
3461
3463
|
i(a) {
|
|
3462
|
-
i || (
|
|
3464
|
+
i || (O(n), i = !0);
|
|
3463
3465
|
},
|
|
3464
3466
|
o(a) {
|
|
3465
|
-
|
|
3467
|
+
P(n), i = !1;
|
|
3466
3468
|
},
|
|
3467
3469
|
d(a) {
|
|
3468
|
-
a &&
|
|
3470
|
+
a && I(o), ~t && r[t].d(a);
|
|
3469
3471
|
}
|
|
3470
3472
|
};
|
|
3471
3473
|
}
|
|
3472
3474
|
function Si(e) {
|
|
3473
|
-
let t =
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
), n, o, i = Gt(e);
|
|
3475
|
+
let t = `${/*toolName*/
|
|
3476
|
+
e[2]}-${/*toolMountKey*/
|
|
3477
|
+
e[5]}`, n, o, i = Gt(e);
|
|
3477
3478
|
return {
|
|
3478
3479
|
c() {
|
|
3479
|
-
i.c(), n =
|
|
3480
|
+
i.c(), n = ae();
|
|
3480
3481
|
},
|
|
3481
3482
|
m(s, r) {
|
|
3482
|
-
i.m(s, r),
|
|
3483
|
+
i.m(s, r), B(s, n, r), o = !0;
|
|
3483
3484
|
},
|
|
3484
3485
|
p(s, r) {
|
|
3485
|
-
r[0] & /*toolName*/
|
|
3486
|
-
|
|
3487
|
-
s[2]
|
|
3486
|
+
r[0] & /*toolName, toolMountKey*/
|
|
3487
|
+
36 && Q(t, t = `${/*toolName*/
|
|
3488
|
+
s[2]}-${/*toolMountKey*/
|
|
3489
|
+
s[5]}`) ? (re(), P(i, 1, 1, j), le(), i = Gt(s), i.c(), O(i, 1), i.m(n.parentNode, n)) : i.p(s, r);
|
|
3488
3490
|
},
|
|
3489
3491
|
i(s) {
|
|
3490
|
-
o || (
|
|
3492
|
+
o || (O(i), o = !0);
|
|
3491
3493
|
},
|
|
3492
3494
|
o(s) {
|
|
3493
|
-
|
|
3495
|
+
P(i), o = !1;
|
|
3494
3496
|
},
|
|
3495
3497
|
d(s) {
|
|
3496
|
-
s &&
|
|
3498
|
+
s && I(n), i.d(s);
|
|
3497
3499
|
}
|
|
3498
3500
|
};
|
|
3499
3501
|
}
|
|
3500
3502
|
function Ti(e) {
|
|
3501
|
-
let t, n, o =
|
|
3503
|
+
let t, n, o = ke(
|
|
3502
3504
|
/*editableAnnotations*/
|
|
3503
|
-
e[
|
|
3505
|
+
e[8]
|
|
3504
3506
|
), i = [];
|
|
3505
3507
|
for (let r = 0; r < o.length; r += 1)
|
|
3506
3508
|
i[r] = Ht(Ct(e, o, r));
|
|
3507
|
-
const s = (r) =>
|
|
3509
|
+
const s = (r) => P(i[r], 1, 1, () => {
|
|
3508
3510
|
i[r] = null;
|
|
3509
3511
|
});
|
|
3510
3512
|
return {
|
|
3511
3513
|
c() {
|
|
3512
3514
|
for (let r = 0; r < i.length; r += 1)
|
|
3513
3515
|
i[r].c();
|
|
3514
|
-
t =
|
|
3516
|
+
t = ae();
|
|
3515
3517
|
},
|
|
3516
3518
|
m(r, l) {
|
|
3517
3519
|
for (let a = 0; a < i.length; a += 1)
|
|
3518
3520
|
i[a] && i[a].m(r, l);
|
|
3519
|
-
|
|
3521
|
+
B(r, t, l), n = !0;
|
|
3520
3522
|
},
|
|
3521
3523
|
p(r, l) {
|
|
3522
3524
|
if (l[0] & /*editableAnnotations, drawingEl, getEditor, style, transform, $scale, onChangeSelected*/
|
|
3523
|
-
|
|
3524
|
-
o =
|
|
3525
|
+
21107010) {
|
|
3526
|
+
o = ke(
|
|
3525
3527
|
/*editableAnnotations*/
|
|
3526
|
-
r[
|
|
3528
|
+
r[8]
|
|
3527
3529
|
);
|
|
3528
3530
|
let a;
|
|
3529
3531
|
for (a = 0; a < o.length; a += 1) {
|
|
3530
3532
|
const c = Ct(r, o, a);
|
|
3531
|
-
i[a] ? (i[a].p(c, l),
|
|
3533
|
+
i[a] ? (i[a].p(c, l), O(i[a], 1)) : (i[a] = Ht(c), i[a].c(), O(i[a], 1), i[a].m(t.parentNode, t));
|
|
3532
3534
|
}
|
|
3533
|
-
for (
|
|
3535
|
+
for (re(), a = o.length; a < i.length; a += 1)
|
|
3534
3536
|
s(a);
|
|
3535
|
-
|
|
3537
|
+
le();
|
|
3536
3538
|
}
|
|
3537
3539
|
},
|
|
3538
3540
|
i(r) {
|
|
3539
3541
|
if (!n) {
|
|
3540
3542
|
for (let l = 0; l < o.length; l += 1)
|
|
3541
|
-
|
|
3543
|
+
O(i[l]);
|
|
3542
3544
|
n = !0;
|
|
3543
3545
|
}
|
|
3544
3546
|
},
|
|
3545
3547
|
o(r) {
|
|
3546
3548
|
i = i.filter(Boolean);
|
|
3547
3549
|
for (let l = 0; l < i.length; l += 1)
|
|
3548
|
-
|
|
3550
|
+
P(i[l]);
|
|
3549
3551
|
n = !1;
|
|
3550
3552
|
},
|
|
3551
3553
|
d(r) {
|
|
3552
|
-
r &&
|
|
3554
|
+
r && I(t), gt(i, r);
|
|
3553
3555
|
}
|
|
3554
3556
|
};
|
|
3555
3557
|
}
|
|
@@ -3559,107 +3561,107 @@ function Gt(e) {
|
|
|
3559
3561
|
props: {
|
|
3560
3562
|
target: (
|
|
3561
3563
|
/*drawingEl*/
|
|
3562
|
-
e[
|
|
3564
|
+
e[6]
|
|
3563
3565
|
),
|
|
3564
3566
|
tool: (
|
|
3565
3567
|
/*tool*/
|
|
3566
|
-
e[
|
|
3568
|
+
e[14]
|
|
3567
3569
|
),
|
|
3568
3570
|
drawingMode: (
|
|
3569
3571
|
/*drawingMode*/
|
|
3570
|
-
e[
|
|
3572
|
+
e[13]
|
|
3571
3573
|
),
|
|
3572
3574
|
transform: (
|
|
3573
3575
|
/*transform*/
|
|
3574
|
-
e[
|
|
3576
|
+
e[12]
|
|
3575
3577
|
),
|
|
3576
3578
|
viewportScale: (
|
|
3577
3579
|
/*$scale*/
|
|
3578
|
-
e[
|
|
3580
|
+
e[17]
|
|
3579
3581
|
)
|
|
3580
3582
|
}
|
|
3581
3583
|
}), t.$on(
|
|
3582
3584
|
"create",
|
|
3583
3585
|
/*onSelectionCreated*/
|
|
3584
|
-
e[
|
|
3586
|
+
e[21]
|
|
3585
3587
|
), {
|
|
3586
3588
|
c() {
|
|
3587
|
-
|
|
3589
|
+
ne(t.$$.fragment);
|
|
3588
3590
|
},
|
|
3589
3591
|
m(o, i) {
|
|
3590
|
-
|
|
3592
|
+
ee(t, o, i), n = !0;
|
|
3591
3593
|
},
|
|
3592
3594
|
p(o, i) {
|
|
3593
3595
|
const s = {};
|
|
3594
3596
|
i[0] & /*drawingEl*/
|
|
3595
|
-
|
|
3596
|
-
o[
|
|
3597
|
-
|
|
3598
|
-
o[
|
|
3599
|
-
|
|
3600
|
-
o[
|
|
3601
|
-
|
|
3602
|
-
o[
|
|
3603
|
-
|
|
3604
|
-
o[
|
|
3597
|
+
64 && (s.target = /*drawingEl*/
|
|
3598
|
+
o[6]), i[0] & /*tool*/
|
|
3599
|
+
16384 && (s.tool = /*tool*/
|
|
3600
|
+
o[14]), i[0] & /*drawingMode*/
|
|
3601
|
+
8192 && (s.drawingMode = /*drawingMode*/
|
|
3602
|
+
o[13]), i[0] & /*transform*/
|
|
3603
|
+
4096 && (s.transform = /*transform*/
|
|
3604
|
+
o[12]), i[0] & /*$scale*/
|
|
3605
|
+
131072 && (s.viewportScale = /*$scale*/
|
|
3606
|
+
o[17]), t.$set(s);
|
|
3605
3607
|
},
|
|
3606
3608
|
i(o) {
|
|
3607
|
-
n || (
|
|
3609
|
+
n || (O(t.$$.fragment, o), n = !0);
|
|
3608
3610
|
},
|
|
3609
3611
|
o(o) {
|
|
3610
|
-
|
|
3612
|
+
P(t.$$.fragment, o), n = !1;
|
|
3611
3613
|
},
|
|
3612
3614
|
d(o) {
|
|
3613
|
-
|
|
3615
|
+
te(t, o);
|
|
3614
3616
|
}
|
|
3615
3617
|
};
|
|
3616
3618
|
}
|
|
3617
3619
|
function jt(e) {
|
|
3618
3620
|
let t = (
|
|
3619
3621
|
/*editable*/
|
|
3620
|
-
e[
|
|
3622
|
+
e[39].id
|
|
3621
3623
|
), n, o, i = zt(e);
|
|
3622
3624
|
return {
|
|
3623
3625
|
c() {
|
|
3624
|
-
i.c(), n =
|
|
3626
|
+
i.c(), n = ae();
|
|
3625
3627
|
},
|
|
3626
3628
|
m(s, r) {
|
|
3627
|
-
i.m(s, r),
|
|
3629
|
+
i.m(s, r), B(s, n, r), o = !0;
|
|
3628
3630
|
},
|
|
3629
3631
|
p(s, r) {
|
|
3630
3632
|
r[0] & /*editableAnnotations*/
|
|
3631
|
-
|
|
3632
|
-
s[
|
|
3633
|
+
256 && Q(t, t = /*editable*/
|
|
3634
|
+
s[39].id) ? (re(), P(i, 1, 1, j), le(), i = zt(s), i.c(), O(i, 1), i.m(n.parentNode, n)) : i.p(s, r);
|
|
3633
3635
|
},
|
|
3634
3636
|
i(s) {
|
|
3635
|
-
o || (
|
|
3637
|
+
o || (O(i), o = !0);
|
|
3636
3638
|
},
|
|
3637
3639
|
o(s) {
|
|
3638
|
-
|
|
3640
|
+
P(i), o = !1;
|
|
3639
3641
|
},
|
|
3640
3642
|
d(s) {
|
|
3641
|
-
s &&
|
|
3643
|
+
s && I(n), i.d(s);
|
|
3642
3644
|
}
|
|
3643
3645
|
};
|
|
3644
3646
|
}
|
|
3645
3647
|
function zt(e) {
|
|
3646
3648
|
let t, n;
|
|
3647
|
-
return t = new
|
|
3649
|
+
return t = new qo({
|
|
3648
3650
|
props: {
|
|
3649
3651
|
target: (
|
|
3650
3652
|
/*drawingEl*/
|
|
3651
|
-
e[
|
|
3653
|
+
e[6]
|
|
3652
3654
|
),
|
|
3653
3655
|
editor: (
|
|
3654
3656
|
/*getEditor*/
|
|
3655
|
-
e[
|
|
3657
|
+
e[24](
|
|
3656
3658
|
/*editable*/
|
|
3657
|
-
e[
|
|
3659
|
+
e[39].target.selector
|
|
3658
3660
|
)
|
|
3659
3661
|
),
|
|
3660
3662
|
annotation: (
|
|
3661
3663
|
/*editable*/
|
|
3662
|
-
e[
|
|
3664
|
+
e[39]
|
|
3663
3665
|
),
|
|
3664
3666
|
style: (
|
|
3665
3667
|
/*style*/
|
|
@@ -3667,281 +3669,283 @@ function zt(e) {
|
|
|
3667
3669
|
),
|
|
3668
3670
|
transform: (
|
|
3669
3671
|
/*transform*/
|
|
3670
|
-
e[
|
|
3672
|
+
e[12]
|
|
3671
3673
|
),
|
|
3672
3674
|
viewportScale: (
|
|
3673
3675
|
/*$scale*/
|
|
3674
|
-
e[
|
|
3676
|
+
e[17]
|
|
3675
3677
|
)
|
|
3676
3678
|
}
|
|
3677
3679
|
}), t.$on("change", function() {
|
|
3678
|
-
|
|
3680
|
+
K(
|
|
3679
3681
|
/*onChangeSelected*/
|
|
3680
|
-
e[
|
|
3682
|
+
e[22](
|
|
3681
3683
|
/*editable*/
|
|
3682
|
-
e[
|
|
3684
|
+
e[39]
|
|
3683
3685
|
)
|
|
3684
|
-
) && e[
|
|
3686
|
+
) && e[22](
|
|
3685
3687
|
/*editable*/
|
|
3686
|
-
e[
|
|
3688
|
+
e[39]
|
|
3687
3689
|
).apply(this, arguments);
|
|
3688
3690
|
}), {
|
|
3689
3691
|
c() {
|
|
3690
|
-
|
|
3692
|
+
ne(t.$$.fragment);
|
|
3691
3693
|
},
|
|
3692
3694
|
m(o, i) {
|
|
3693
|
-
|
|
3695
|
+
ee(t, o, i), n = !0;
|
|
3694
3696
|
},
|
|
3695
3697
|
p(o, i) {
|
|
3696
3698
|
e = o;
|
|
3697
3699
|
const s = {};
|
|
3698
3700
|
i[0] & /*drawingEl*/
|
|
3699
|
-
|
|
3700
|
-
e[
|
|
3701
|
-
|
|
3702
|
-
e[
|
|
3701
|
+
64 && (s.target = /*drawingEl*/
|
|
3702
|
+
e[6]), i[0] & /*editableAnnotations*/
|
|
3703
|
+
256 && (s.editor = /*getEditor*/
|
|
3704
|
+
e[24](
|
|
3703
3705
|
/*editable*/
|
|
3704
|
-
e[
|
|
3706
|
+
e[39].target.selector
|
|
3705
3707
|
)), i[0] & /*editableAnnotations*/
|
|
3706
|
-
|
|
3707
|
-
e[
|
|
3708
|
+
256 && (s.annotation = /*editable*/
|
|
3709
|
+
e[39]), i[0] & /*style*/
|
|
3708
3710
|
2 && (s.style = /*style*/
|
|
3709
3711
|
e[1]), i[0] & /*transform*/
|
|
3710
|
-
|
|
3711
|
-
e[
|
|
3712
|
-
|
|
3713
|
-
e[
|
|
3712
|
+
4096 && (s.transform = /*transform*/
|
|
3713
|
+
e[12]), i[0] & /*$scale*/
|
|
3714
|
+
131072 && (s.viewportScale = /*$scale*/
|
|
3715
|
+
e[17]), t.$set(s);
|
|
3714
3716
|
},
|
|
3715
3717
|
i(o) {
|
|
3716
|
-
n || (
|
|
3718
|
+
n || (O(t.$$.fragment, o), n = !0);
|
|
3717
3719
|
},
|
|
3718
3720
|
o(o) {
|
|
3719
|
-
|
|
3721
|
+
P(t.$$.fragment, o), n = !1;
|
|
3720
3722
|
},
|
|
3721
3723
|
d(o) {
|
|
3722
|
-
|
|
3724
|
+
te(t, o);
|
|
3723
3725
|
}
|
|
3724
3726
|
};
|
|
3725
3727
|
}
|
|
3726
3728
|
function Ht(e) {
|
|
3727
3729
|
let t, n, o = (
|
|
3728
3730
|
/*editor*/
|
|
3729
|
-
e[
|
|
3731
|
+
e[40] && jt(e)
|
|
3730
3732
|
);
|
|
3731
3733
|
return {
|
|
3732
3734
|
c() {
|
|
3733
|
-
o && o.c(), t =
|
|
3735
|
+
o && o.c(), t = ae();
|
|
3734
3736
|
},
|
|
3735
3737
|
m(i, s) {
|
|
3736
|
-
o && o.m(i, s),
|
|
3738
|
+
o && o.m(i, s), B(i, t, s), n = !0;
|
|
3737
3739
|
},
|
|
3738
3740
|
p(i, s) {
|
|
3739
3741
|
/*editor*/
|
|
3740
|
-
i[
|
|
3741
|
-
|
|
3742
|
+
i[40] ? o ? (o.p(i, s), s[0] & /*editableAnnotations*/
|
|
3743
|
+
256 && O(o, 1)) : (o = jt(i), o.c(), O(o, 1), o.m(t.parentNode, t)) : o && (re(), P(o, 1, 1, () => {
|
|
3742
3744
|
o = null;
|
|
3743
|
-
}),
|
|
3745
|
+
}), le());
|
|
3744
3746
|
},
|
|
3745
3747
|
i(i) {
|
|
3746
|
-
n || (
|
|
3748
|
+
n || (O(o), n = !0);
|
|
3747
3749
|
},
|
|
3748
3750
|
o(i) {
|
|
3749
|
-
|
|
3751
|
+
P(o), n = !1;
|
|
3750
3752
|
},
|
|
3751
3753
|
d(i) {
|
|
3752
|
-
i &&
|
|
3754
|
+
i && I(t), o && o.d(i);
|
|
3753
3755
|
}
|
|
3754
3756
|
};
|
|
3755
3757
|
}
|
|
3756
3758
|
function Mi(e) {
|
|
3757
|
-
let t, n, o, i, s, r, l =
|
|
3759
|
+
let t, n, o, i, s, r, l = ke(
|
|
3758
3760
|
/*$store*/
|
|
3759
|
-
e[
|
|
3761
|
+
e[16].filter(
|
|
3760
3762
|
/*func*/
|
|
3761
|
-
e[
|
|
3763
|
+
e[34]
|
|
3762
3764
|
)
|
|
3763
3765
|
), a = [];
|
|
3764
3766
|
for (let f = 0; f < l.length; f += 1)
|
|
3765
3767
|
a[f] = Nt(Xt(e, l, f));
|
|
3766
|
-
const c = (f) =>
|
|
3768
|
+
const c = (f) => P(a[f], 1, 1, () => {
|
|
3767
3769
|
a[f] = null;
|
|
3768
3770
|
});
|
|
3769
3771
|
let u = (
|
|
3770
3772
|
/*drawingEl*/
|
|
3771
|
-
e[
|
|
3773
|
+
e[6] && Vt(e)
|
|
3772
3774
|
);
|
|
3773
3775
|
return {
|
|
3774
3776
|
c() {
|
|
3775
|
-
t =
|
|
3777
|
+
t = C("svg"), n = C("g");
|
|
3776
3778
|
for (let f = 0; f < a.length; f += 1)
|
|
3777
3779
|
a[f].c();
|
|
3778
|
-
o =
|
|
3780
|
+
o = C("g"), u && u.c(), d(o, "class", "drawing"), d(t, "class", "a9s-annotationlayer"), ye(
|
|
3779
3781
|
t,
|
|
3780
3782
|
"drawing",
|
|
3781
3783
|
/*tool*/
|
|
3782
|
-
e[
|
|
3783
|
-
),
|
|
3784
|
-
e[3]),
|
|
3784
|
+
e[14]
|
|
3785
|
+
), ye(t, "hidden", !/*visible*/
|
|
3786
|
+
e[3]), ye(
|
|
3785
3787
|
t,
|
|
3786
3788
|
"hover",
|
|
3787
3789
|
/*$hover*/
|
|
3788
|
-
e[
|
|
3790
|
+
e[15]
|
|
3789
3791
|
);
|
|
3790
3792
|
},
|
|
3791
3793
|
m(f, h) {
|
|
3792
|
-
|
|
3793
|
-
for (let
|
|
3794
|
-
a[
|
|
3795
|
-
he(t, o), u && u.m(o, null), e[
|
|
3796
|
-
|
|
3797
|
-
|
|
3794
|
+
B(f, t, h), he(t, n);
|
|
3795
|
+
for (let y = 0; y < a.length; y += 1)
|
|
3796
|
+
a[y] && a[y].m(n, null);
|
|
3797
|
+
he(t, o), u && u.m(o, null), e[35](o), e[36](t), i = !0, s || (r = [
|
|
3798
|
+
z(t, "pointerup", function() {
|
|
3799
|
+
K(
|
|
3798
3800
|
/*onPointerUp*/
|
|
3799
|
-
e[9]
|
|
3800
|
-
) && e[9].apply(this, arguments);
|
|
3801
|
-
}),
|
|
3802
|
-
H(t, "pointerdown", function() {
|
|
3803
|
-
W(
|
|
3804
|
-
/*onPointerDown*/
|
|
3805
3801
|
e[10]
|
|
3806
3802
|
) && e[10].apply(this, arguments);
|
|
3807
3803
|
}),
|
|
3808
|
-
|
|
3804
|
+
z(t, "pointerdown", function() {
|
|
3805
|
+
K(
|
|
3806
|
+
/*onPointerDown*/
|
|
3807
|
+
e[11]
|
|
3808
|
+
) && e[11].apply(this, arguments);
|
|
3809
|
+
}),
|
|
3810
|
+
z(
|
|
3809
3811
|
t,
|
|
3810
3812
|
"pointermove",
|
|
3811
3813
|
/*onPointerMove*/
|
|
3812
|
-
e[
|
|
3814
|
+
e[23]
|
|
3813
3815
|
)
|
|
3814
3816
|
], s = !0);
|
|
3815
3817
|
},
|
|
3816
3818
|
p(f, h) {
|
|
3817
3819
|
if (e = f, h[0] & /*$store, style, isEditable*/
|
|
3818
|
-
|
|
3819
|
-
l =
|
|
3820
|
+
66050) {
|
|
3821
|
+
l = ke(
|
|
3820
3822
|
/*$store*/
|
|
3821
|
-
e[
|
|
3823
|
+
e[16].filter(
|
|
3822
3824
|
/*func*/
|
|
3823
|
-
e[
|
|
3825
|
+
e[34]
|
|
3824
3826
|
)
|
|
3825
3827
|
);
|
|
3826
|
-
let
|
|
3827
|
-
for (
|
|
3828
|
-
const g = Xt(e, l,
|
|
3829
|
-
a[
|
|
3828
|
+
let y;
|
|
3829
|
+
for (y = 0; y < l.length; y += 1) {
|
|
3830
|
+
const g = Xt(e, l, y);
|
|
3831
|
+
a[y] ? (a[y].p(g, h), O(a[y], 1)) : (a[y] = Nt(g), a[y].c(), O(a[y], 1), a[y].m(n, null));
|
|
3830
3832
|
}
|
|
3831
|
-
for (
|
|
3832
|
-
c(
|
|
3833
|
-
|
|
3833
|
+
for (re(), y = l.length; y < a.length; y += 1)
|
|
3834
|
+
c(y);
|
|
3835
|
+
le();
|
|
3834
3836
|
}
|
|
3835
3837
|
/*drawingEl*/
|
|
3836
|
-
e[
|
|
3837
|
-
|
|
3838
|
+
e[6] ? u ? (u.p(e, h), h[0] & /*drawingEl*/
|
|
3839
|
+
64 && O(u, 1)) : (u = Vt(e), u.c(), O(u, 1), u.m(o, null)) : u && (re(), P(u, 1, 1, () => {
|
|
3838
3840
|
u = null;
|
|
3839
|
-
}),
|
|
3840
|
-
|
|
3841
|
+
}), le()), (!i || h[0] & /*tool*/
|
|
3842
|
+
16384) && ye(
|
|
3841
3843
|
t,
|
|
3842
3844
|
"drawing",
|
|
3843
3845
|
/*tool*/
|
|
3844
|
-
e[
|
|
3846
|
+
e[14]
|
|
3845
3847
|
), (!i || h[0] & /*visible*/
|
|
3846
|
-
8) &&
|
|
3848
|
+
8) && ye(t, "hidden", !/*visible*/
|
|
3847
3849
|
e[3]), (!i || h[0] & /*$hover*/
|
|
3848
|
-
|
|
3850
|
+
32768) && ye(
|
|
3849
3851
|
t,
|
|
3850
3852
|
"hover",
|
|
3851
3853
|
/*$hover*/
|
|
3852
|
-
e[
|
|
3854
|
+
e[15]
|
|
3853
3855
|
);
|
|
3854
3856
|
},
|
|
3855
3857
|
i(f) {
|
|
3856
3858
|
if (!i) {
|
|
3857
3859
|
for (let h = 0; h < l.length; h += 1)
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
+
O(a[h]);
|
|
3861
|
+
O(u), i = !0;
|
|
3860
3862
|
}
|
|
3861
3863
|
},
|
|
3862
3864
|
o(f) {
|
|
3863
3865
|
a = a.filter(Boolean);
|
|
3864
3866
|
for (let h = 0; h < a.length; h += 1)
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
+
P(a[h]);
|
|
3868
|
+
P(u), i = !1;
|
|
3867
3869
|
},
|
|
3868
3870
|
d(f) {
|
|
3869
|
-
f &&
|
|
3871
|
+
f && I(t), gt(a, f), u && u.d(), e[35](null), e[36](null), s = !1, ge(r);
|
|
3870
3872
|
}
|
|
3871
3873
|
};
|
|
3872
3874
|
}
|
|
3873
3875
|
function vi(e, t, n) {
|
|
3874
|
-
let o, i, s, r, l, a, c, u, f, h,
|
|
3876
|
+
let o, i, s, r, l, a, c, u, f, h, y, g = j, m = () => (g(), g = Jt(Y, (M) => n(17, y = M)), Y);
|
|
3875
3877
|
e.$$.on_destroy.push(() => g());
|
|
3876
|
-
let { drawingEnabled: A } = t, { image:
|
|
3877
|
-
const V = () =>
|
|
3878
|
-
let
|
|
3879
|
-
|
|
3880
|
-
const { hover:
|
|
3881
|
-
xe(e,
|
|
3882
|
-
let
|
|
3883
|
-
const
|
|
3884
|
-
|
|
3885
|
-
const
|
|
3886
|
-
|
|
3887
|
-
const { updated:
|
|
3888
|
-
n(
|
|
3889
|
-
},
|
|
3890
|
-
},
|
|
3891
|
-
const
|
|
3892
|
-
id:
|
|
3878
|
+
let { drawingEnabled: A } = t, { image: p } = t, { preferredDrawingMode: _ } = t, { state: w } = t, { style: E = void 0 } = t, { toolName: k = cn()[0] } = t, { user: X } = t, { visible: R = !0 } = t, V = 0;
|
|
3879
|
+
const Z = () => n(5, V += 1), S = () => k, v = () => A;
|
|
3880
|
+
let b, T, Y;
|
|
3881
|
+
Ne(() => m(n(7, Y = Do(p, T))));
|
|
3882
|
+
const { hover: D, selection: H, store: J } = w;
|
|
3883
|
+
xe(e, D, (M) => n(15, u = M)), xe(e, H, (M) => n(33, f = M)), xe(e, J, (M) => n(16, h = M));
|
|
3884
|
+
let $, pe;
|
|
3885
|
+
const ce = (M) => {
|
|
3886
|
+
$ && J.unobserve($);
|
|
3887
|
+
const L = M.filter(({ editable: N }) => N).map(({ id: N }) => N);
|
|
3888
|
+
L.length > 0 ? (n(8, pe = L.map((N) => J.getAnnotation(N)).filter((N) => N && Je(N))), $ = (N) => {
|
|
3889
|
+
const { updated: x } = N.changes;
|
|
3890
|
+
n(8, pe = x == null ? void 0 : x.map((de) => de.newValue));
|
|
3891
|
+
}, J.observe($, { annotations: L })) : n(8, pe = void 0);
|
|
3892
|
+
}, Be = (M) => {
|
|
3893
|
+
const L = tn(), N = {
|
|
3894
|
+
id: L,
|
|
3893
3895
|
bodies: [],
|
|
3894
3896
|
target: {
|
|
3895
|
-
annotation:
|
|
3896
|
-
selector:
|
|
3897
|
-
creator:
|
|
3897
|
+
annotation: L,
|
|
3898
|
+
selector: M.detail,
|
|
3899
|
+
creator: X,
|
|
3898
3900
|
created: /* @__PURE__ */ new Date()
|
|
3899
3901
|
}
|
|
3900
3902
|
};
|
|
3901
|
-
|
|
3902
|
-
},
|
|
3903
|
-
var
|
|
3904
|
-
const { target:
|
|
3905
|
-
|
|
3906
|
-
...
|
|
3907
|
-
selector:
|
|
3908
|
-
created: de ?
|
|
3903
|
+
J.addAnnotation(N), H.setSelected(N.id);
|
|
3904
|
+
}, fe = (M) => (L) => {
|
|
3905
|
+
var we;
|
|
3906
|
+
const { target: N } = M, x = 10 * 60 * 1e3, de = ((we = N.creator) == null ? void 0 : we.id) !== X.id || !N.created || (/* @__PURE__ */ new Date()).getTime() - N.created.getTime() > x;
|
|
3907
|
+
J.updateTarget({
|
|
3908
|
+
...N,
|
|
3909
|
+
selector: L.detail,
|
|
3910
|
+
created: de ? N.created : /* @__PURE__ */ new Date(),
|
|
3909
3911
|
updated: de ? /* @__PURE__ */ new Date() : void 0,
|
|
3910
|
-
updatedBy: de ?
|
|
3912
|
+
updatedBy: de ? X : void 0
|
|
3911
3913
|
});
|
|
3912
|
-
},
|
|
3913
|
-
const { x:
|
|
3914
|
-
|
|
3915
|
-
},
|
|
3916
|
-
function
|
|
3917
|
-
|
|
3918
|
-
|
|
3914
|
+
}, Oe = (M) => {
|
|
3915
|
+
const { x: L, y: N } = un(M, T), x = J.getAt(L, N);
|
|
3916
|
+
x ? u !== x.id && D.set(x.id) : D.set(void 0);
|
|
3917
|
+
}, ue = (M) => jo(M), U = (M) => Je(M);
|
|
3918
|
+
function De(M) {
|
|
3919
|
+
We[M ? "unshift" : "push"](() => {
|
|
3920
|
+
b = M, n(6, b);
|
|
3919
3921
|
});
|
|
3920
3922
|
}
|
|
3921
|
-
function
|
|
3922
|
-
|
|
3923
|
-
T =
|
|
3923
|
+
function Ve(M) {
|
|
3924
|
+
We[M ? "unshift" : "push"](() => {
|
|
3925
|
+
T = M, n(4, T);
|
|
3924
3926
|
});
|
|
3925
3927
|
}
|
|
3926
|
-
return e.$$set = (
|
|
3927
|
-
"drawingEnabled" in
|
|
3928
|
+
return e.$$set = (M) => {
|
|
3929
|
+
"drawingEnabled" in M && n(0, A = M.drawingEnabled), "image" in M && n(25, p = M.image), "preferredDrawingMode" in M && n(26, _ = M.preferredDrawingMode), "state" in M && n(27, w = M.state), "style" in M && n(1, E = M.style), "toolName" in M && n(2, k = M.toolName), "user" in M && n(28, X = M.user), "visible" in M && n(3, R = M.visible);
|
|
3928
3930
|
}, e.$$.update = () => {
|
|
3929
3931
|
e.$$.dirty[0] & /*toolName*/
|
|
3930
|
-
4 && n(
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
16 && n(
|
|
3934
|
-
|
|
3935
|
-
|
|
3932
|
+
4 && n(14, { tool: o, opts: i } = fn(k) || { tool: void 0, opts: void 0 }, o, (n(32, i), n(2, k))), e.$$.dirty[0] & /*preferredDrawingMode*/
|
|
3933
|
+
67108864 | e.$$.dirty[1] & /*opts*/
|
|
3934
|
+
2 && n(13, s = (i == null ? void 0 : i.drawingMode) || _), e.$$.dirty[0] & /*svgEl*/
|
|
3935
|
+
16 && n(12, r = yi(T)), e.$$.dirty[0] & /*svgEl*/
|
|
3936
|
+
16 && n(11, { onPointerDown: l, onPointerUp: a } = wi(T, J), l, (n(10, a), n(4, T))), e.$$.dirty[1] & /*$selection*/
|
|
3937
|
+
4 && n(9, c = (M) => f.selected.find((L) => L.id === M.id && L.editable)), e.$$.dirty[1] & /*$selection*/
|
|
3938
|
+
4 && ce(f.selected);
|
|
3936
3939
|
}, [
|
|
3937
3940
|
A,
|
|
3938
3941
|
E,
|
|
3939
|
-
|
|
3940
|
-
|
|
3942
|
+
k,
|
|
3943
|
+
R,
|
|
3941
3944
|
T,
|
|
3942
|
-
|
|
3945
|
+
V,
|
|
3943
3946
|
b,
|
|
3944
|
-
|
|
3947
|
+
Y,
|
|
3948
|
+
pe,
|
|
3945
3949
|
c,
|
|
3946
3950
|
a,
|
|
3947
3951
|
l,
|
|
@@ -3950,30 +3954,31 @@ function vi(e, t, n) {
|
|
|
3950
3954
|
o,
|
|
3951
3955
|
u,
|
|
3952
3956
|
h,
|
|
3953
|
-
|
|
3954
|
-
M,
|
|
3955
|
-
P,
|
|
3957
|
+
y,
|
|
3956
3958
|
D,
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
+
H,
|
|
3960
|
+
J,
|
|
3959
3961
|
Be,
|
|
3960
3962
|
fe,
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
+
Oe,
|
|
3964
|
+
ue,
|
|
3965
|
+
p,
|
|
3966
|
+
_,
|
|
3963
3967
|
w,
|
|
3964
|
-
|
|
3965
|
-
V,
|
|
3968
|
+
X,
|
|
3966
3969
|
Z,
|
|
3970
|
+
S,
|
|
3971
|
+
v,
|
|
3967
3972
|
i,
|
|
3968
3973
|
f,
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3974
|
+
U,
|
|
3975
|
+
De,
|
|
3976
|
+
Ve
|
|
3972
3977
|
];
|
|
3973
3978
|
}
|
|
3974
|
-
class Li extends
|
|
3979
|
+
class Li extends ie {
|
|
3975
3980
|
constructor(t) {
|
|
3976
|
-
super(),
|
|
3981
|
+
super(), oe(
|
|
3977
3982
|
this,
|
|
3978
3983
|
t,
|
|
3979
3984
|
vi,
|
|
@@ -3981,43 +3986,47 @@ class Li extends ne {
|
|
|
3981
3986
|
Q,
|
|
3982
3987
|
{
|
|
3983
3988
|
drawingEnabled: 0,
|
|
3984
|
-
image:
|
|
3985
|
-
preferredDrawingMode:
|
|
3986
|
-
state:
|
|
3989
|
+
image: 25,
|
|
3990
|
+
preferredDrawingMode: 26,
|
|
3991
|
+
state: 27,
|
|
3987
3992
|
style: 1,
|
|
3988
3993
|
toolName: 2,
|
|
3989
|
-
user:
|
|
3994
|
+
user: 28,
|
|
3990
3995
|
visible: 3,
|
|
3991
|
-
|
|
3992
|
-
|
|
3996
|
+
cancelDrawing: 29,
|
|
3997
|
+
getDrawingTool: 30,
|
|
3998
|
+
isDrawingEnabled: 31
|
|
3993
3999
|
},
|
|
3994
4000
|
null,
|
|
3995
4001
|
[-1, -1]
|
|
3996
4002
|
);
|
|
3997
4003
|
}
|
|
4004
|
+
get cancelDrawing() {
|
|
4005
|
+
return this.$$.ctx[29];
|
|
4006
|
+
}
|
|
3998
4007
|
get getDrawingTool() {
|
|
3999
|
-
return this.$$.ctx[
|
|
4008
|
+
return this.$$.ctx[30];
|
|
4000
4009
|
}
|
|
4001
4010
|
get isDrawingEnabled() {
|
|
4002
|
-
return this.$$.ctx[
|
|
4011
|
+
return this.$$.ctx[31];
|
|
4003
4012
|
}
|
|
4004
4013
|
}
|
|
4005
4014
|
function dn(e, t, n = 0, o = e.length - 1, i = ki) {
|
|
4006
4015
|
for (; o > n; ) {
|
|
4007
4016
|
if (o - n > 600) {
|
|
4008
|
-
const a = o - n + 1, c = t - n + 1, u = Math.log(a), f = 0.5 * Math.exp(2 * u / 3), h = 0.5 * Math.sqrt(u * f * (a - f) / a) * (c - a / 2 < 0 ? -1 : 1),
|
|
4009
|
-
dn(e, t,
|
|
4017
|
+
const a = o - n + 1, c = t - n + 1, u = Math.log(a), f = 0.5 * Math.exp(2 * u / 3), h = 0.5 * Math.sqrt(u * f * (a - f) / a) * (c - a / 2 < 0 ? -1 : 1), y = Math.max(n, Math.floor(t - c * f / a + h)), g = Math.min(o, Math.floor(t + (a - c) * f / a + h));
|
|
4018
|
+
dn(e, t, y, g, i);
|
|
4010
4019
|
}
|
|
4011
4020
|
const s = e[t];
|
|
4012
4021
|
let r = n, l = o;
|
|
4013
|
-
for (
|
|
4014
|
-
for (
|
|
4022
|
+
for (Ye(e, n, t), i(e[o], s) > 0 && Ye(e, n, o); r < l; ) {
|
|
4023
|
+
for (Ye(e, r, l), r++, l--; i(e[r], s) < 0; ) r++;
|
|
4015
4024
|
for (; i(e[l], s) > 0; ) l--;
|
|
4016
4025
|
}
|
|
4017
|
-
i(e[n], s) === 0 ?
|
|
4026
|
+
i(e[n], s) === 0 ? Ye(e, n, l) : (l++, Ye(e, l, o)), l <= t && (n = l + 1), t <= l && (o = l - 1);
|
|
4018
4027
|
}
|
|
4019
4028
|
}
|
|
4020
|
-
function
|
|
4029
|
+
function Ye(e, t, n) {
|
|
4021
4030
|
const o = e[t];
|
|
4022
4031
|
e[t] = e[n], e[n] = o;
|
|
4023
4032
|
}
|
|
@@ -4086,7 +4095,7 @@ class Ii {
|
|
|
4086
4095
|
return t && this._insert(t, this.data.height - 1), this;
|
|
4087
4096
|
}
|
|
4088
4097
|
clear() {
|
|
4089
|
-
return this.data =
|
|
4098
|
+
return this.data = ve([]), this;
|
|
4090
4099
|
}
|
|
4091
4100
|
remove(t, n) {
|
|
4092
4101
|
if (!t) return this;
|
|
@@ -4128,19 +4137,19 @@ class Ii {
|
|
|
4128
4137
|
const s = o - n + 1;
|
|
4129
4138
|
let r = this._maxEntries, l;
|
|
4130
4139
|
if (s <= r)
|
|
4131
|
-
return l =
|
|
4132
|
-
i || (i = Math.ceil(Math.log(s) / Math.log(r)), r = Math.ceil(s / Math.pow(r, i - 1))), l =
|
|
4140
|
+
return l = ve(t.slice(n, o + 1)), Te(l, this.toBBox), l;
|
|
4141
|
+
i || (i = Math.ceil(Math.log(s) / Math.log(r)), r = Math.ceil(s / Math.pow(r, i - 1))), l = ve([]), l.leaf = !1, l.height = i;
|
|
4133
4142
|
const a = Math.ceil(s / r), c = a * Math.ceil(Math.sqrt(r));
|
|
4134
4143
|
Ft(t, n, o, c, this.compareMinX);
|
|
4135
4144
|
for (let u = n; u <= o; u += c) {
|
|
4136
4145
|
const f = Math.min(u + c - 1, o);
|
|
4137
4146
|
Ft(t, u, f, a, this.compareMinY);
|
|
4138
4147
|
for (let h = u; h <= f; h += a) {
|
|
4139
|
-
const
|
|
4140
|
-
l.children.push(this._build(t, h,
|
|
4148
|
+
const y = Math.min(h + a - 1, f);
|
|
4149
|
+
l.children.push(this._build(t, h, y, i - 1));
|
|
4141
4150
|
}
|
|
4142
4151
|
}
|
|
4143
|
-
return
|
|
4152
|
+
return Te(l, this.toBBox), l;
|
|
4144
4153
|
}
|
|
4145
4154
|
_chooseSubtree(t, n, o, i) {
|
|
4146
4155
|
for (; i.push(n), !(n.leaf || i.length - 1 === o); ) {
|
|
@@ -4155,7 +4164,7 @@ class Ii {
|
|
|
4155
4164
|
}
|
|
4156
4165
|
_insert(t, n, o) {
|
|
4157
4166
|
const i = o ? t : this.toBBox(t), s = [], r = this._chooseSubtree(i, this.data, n, s);
|
|
4158
|
-
for (r.children.push(t),
|
|
4167
|
+
for (r.children.push(t), Xe(r, i); n >= 0 && s[n].children.length > this._maxEntries; )
|
|
4159
4168
|
this._split(s, n), n--;
|
|
4160
4169
|
this._adjustParentBBoxes(i, s, n);
|
|
4161
4170
|
}
|
|
@@ -4163,16 +4172,16 @@ class Ii {
|
|
|
4163
4172
|
_split(t, n) {
|
|
4164
4173
|
const o = t[n], i = o.children.length, s = this._minEntries;
|
|
4165
4174
|
this._chooseSplitAxis(o, s, i);
|
|
4166
|
-
const r = this._chooseSplitIndex(o, s, i), l =
|
|
4167
|
-
l.height = o.height, l.leaf = o.leaf,
|
|
4175
|
+
const r = this._chooseSplitIndex(o, s, i), l = ve(o.children.splice(r, o.children.length - r));
|
|
4176
|
+
l.height = o.height, l.leaf = o.leaf, Te(o, this.toBBox), Te(l, this.toBBox), n ? t[n - 1].children.push(l) : this._splitRoot(o, l);
|
|
4168
4177
|
}
|
|
4169
4178
|
_splitRoot(t, n) {
|
|
4170
|
-
this.data =
|
|
4179
|
+
this.data = ve([t, n]), this.data.height = t.height + 1, this.data.leaf = !1, Te(this.data, this.toBBox);
|
|
4171
4180
|
}
|
|
4172
4181
|
_chooseSplitIndex(t, n, o) {
|
|
4173
4182
|
let i, s = 1 / 0, r = 1 / 0;
|
|
4174
4183
|
for (let l = n; l <= o - n; l++) {
|
|
4175
|
-
const a =
|
|
4184
|
+
const a = Ce(t, 0, l, this.toBBox), c = Ce(t, l, o, this.toBBox), u = Pi(a, c), f = at(a) + at(c);
|
|
4176
4185
|
u < s ? (s = u, i = l, r = f < r ? f : r) : u === s && f < r && (r = f, i = l);
|
|
4177
4186
|
}
|
|
4178
4187
|
return i || o - n;
|
|
@@ -4185,25 +4194,25 @@ class Ii {
|
|
|
4185
4194
|
// total margin of all possible split distributions where each node is at least m full
|
|
4186
4195
|
_allDistMargin(t, n, o, i) {
|
|
4187
4196
|
t.children.sort(i);
|
|
4188
|
-
const s = this.toBBox, r =
|
|
4197
|
+
const s = this.toBBox, r = Ce(t, 0, n, s), l = Ce(t, o - n, o, s);
|
|
4189
4198
|
let a = je(r) + je(l);
|
|
4190
4199
|
for (let c = n; c < o - n; c++) {
|
|
4191
4200
|
const u = t.children[c];
|
|
4192
|
-
|
|
4201
|
+
Xe(r, t.leaf ? s(u) : u), a += je(r);
|
|
4193
4202
|
}
|
|
4194
4203
|
for (let c = o - n - 1; c >= n; c--) {
|
|
4195
4204
|
const u = t.children[c];
|
|
4196
|
-
|
|
4205
|
+
Xe(l, t.leaf ? s(u) : u), a += je(l);
|
|
4197
4206
|
}
|
|
4198
4207
|
return a;
|
|
4199
4208
|
}
|
|
4200
4209
|
_adjustParentBBoxes(t, n, o) {
|
|
4201
4210
|
for (let i = o; i >= 0; i--)
|
|
4202
|
-
|
|
4211
|
+
Xe(n[i], t);
|
|
4203
4212
|
}
|
|
4204
4213
|
_condense(t) {
|
|
4205
4214
|
for (let n = t.length - 1, o; n >= 0; n--)
|
|
4206
|
-
t[n].children.length === 0 ? n > 0 ? (o = t[n - 1].children, o.splice(o.indexOf(t[n]), 1)) : this.clear() :
|
|
4215
|
+
t[n].children.length === 0 ? n > 0 ? (o = t[n - 1].children, o.splice(o.indexOf(t[n]), 1)) : this.clear() : Te(t[n], this.toBBox);
|
|
4207
4216
|
}
|
|
4208
4217
|
}
|
|
4209
4218
|
function Bi(e, t, n) {
|
|
@@ -4212,18 +4221,18 @@ function Bi(e, t, n) {
|
|
|
4212
4221
|
if (n(e, t[o])) return o;
|
|
4213
4222
|
return -1;
|
|
4214
4223
|
}
|
|
4215
|
-
function
|
|
4216
|
-
|
|
4224
|
+
function Te(e, t) {
|
|
4225
|
+
Ce(e, 0, e.children.length, t, e);
|
|
4217
4226
|
}
|
|
4218
|
-
function
|
|
4219
|
-
i || (i =
|
|
4227
|
+
function Ce(e, t, n, o, i) {
|
|
4228
|
+
i || (i = ve(null)), i.minX = 1 / 0, i.minY = 1 / 0, i.maxX = -1 / 0, i.maxY = -1 / 0;
|
|
4220
4229
|
for (let s = t; s < n; s++) {
|
|
4221
4230
|
const r = e.children[s];
|
|
4222
|
-
|
|
4231
|
+
Xe(i, e.leaf ? o(r) : r);
|
|
4223
4232
|
}
|
|
4224
4233
|
return i;
|
|
4225
4234
|
}
|
|
4226
|
-
function
|
|
4235
|
+
function Xe(e, t) {
|
|
4227
4236
|
return e.minX = Math.min(e.minX, t.minX), e.minY = Math.min(e.minY, t.minY), e.maxX = Math.max(e.maxX, t.maxX), e.maxY = Math.max(e.maxY, t.maxY), e;
|
|
4228
4237
|
}
|
|
4229
4238
|
function Oi(e, t) {
|
|
@@ -4251,7 +4260,7 @@ function ct(e, t) {
|
|
|
4251
4260
|
function ze(e, t) {
|
|
4252
4261
|
return t.minX <= e.maxX && t.minY <= e.maxY && t.maxX >= e.minX && t.maxY >= e.minY;
|
|
4253
4262
|
}
|
|
4254
|
-
function
|
|
4263
|
+
function ve(e) {
|
|
4255
4264
|
return {
|
|
4256
4265
|
children: e,
|
|
4257
4266
|
height: 1,
|
|
@@ -4275,7 +4284,7 @@ const Ci = () => {
|
|
|
4275
4284
|
e.clear(), t.clear();
|
|
4276
4285
|
}, i = (f) => {
|
|
4277
4286
|
if (!Fe(f)) return;
|
|
4278
|
-
const { minX: h, minY:
|
|
4287
|
+
const { minX: h, minY: y, maxX: g, maxY: m } = f.selector.geometry.bounds, A = { minX: h, minY: y, maxX: g, maxY: m, target: f };
|
|
4279
4288
|
e.insert(A), t.set(f.annotation, A);
|
|
4280
4289
|
}, s = (f) => {
|
|
4281
4290
|
if (!Fe(f)) return;
|
|
@@ -4291,28 +4300,28 @@ const Ci = () => {
|
|
|
4291
4300
|
minY: h,
|
|
4292
4301
|
maxX: f,
|
|
4293
4302
|
maxY: h
|
|
4294
|
-
}).map((
|
|
4303
|
+
}).map((m) => m.target).filter((m) => m.selector.type === F.RECTANGLE || kn(m.selector, f, h));
|
|
4295
4304
|
if (g.length > 0)
|
|
4296
|
-
return g.sort((
|
|
4305
|
+
return g.sort((m, A) => ht(m.selector) - ht(A.selector)), g[0];
|
|
4297
4306
|
},
|
|
4298
|
-
getIntersecting: (f, h,
|
|
4307
|
+
getIntersecting: (f, h, y, g) => e.search({
|
|
4299
4308
|
minX: f,
|
|
4300
4309
|
minY: h,
|
|
4301
|
-
maxX: f +
|
|
4310
|
+
maxX: f + y,
|
|
4302
4311
|
maxY: h + g
|
|
4303
|
-
}).map((
|
|
4312
|
+
}).map((m) => m.target),
|
|
4304
4313
|
insert: i,
|
|
4305
4314
|
remove: s,
|
|
4306
4315
|
set: (f, h = !0) => {
|
|
4307
4316
|
h && o();
|
|
4308
|
-
const
|
|
4309
|
-
if (Fe(
|
|
4310
|
-
const { minX: A, minY:
|
|
4311
|
-
return [...g, { minX: A, minY:
|
|
4317
|
+
const y = f.reduce((g, m) => {
|
|
4318
|
+
if (Fe(m)) {
|
|
4319
|
+
const { minX: A, minY: p, maxX: _, maxY: w } = m.selector.geometry.bounds;
|
|
4320
|
+
return [...g, { minX: A, minY: p, maxX: _, maxY: w, target: m }];
|
|
4312
4321
|
} else
|
|
4313
4322
|
return g;
|
|
4314
4323
|
}, []);
|
|
4315
|
-
|
|
4324
|
+
y.forEach((g) => t.set(g.target.annotation, g)), e.load(y);
|
|
4316
4325
|
},
|
|
4317
4326
|
size: () => e.all().length,
|
|
4318
4327
|
update: (f, h) => {
|
|
@@ -4320,7 +4329,7 @@ const Ci = () => {
|
|
|
4320
4329
|
}
|
|
4321
4330
|
};
|
|
4322
4331
|
}, Xi = (e) => {
|
|
4323
|
-
const t = io(), n = Ci(), o =
|
|
4332
|
+
const t = io(), n = Ci(), o = Kn(t, e.userSelectAction, e.adapter), i = Fn(t), s = co();
|
|
4324
4333
|
return t.observe(({ changes: a }) => {
|
|
4325
4334
|
n.set((a.created || []).map((c) => c.target), !1), (a.deleted || []).forEach((c) => n.remove(c.target)), (a.updated || []).forEach(({ oldValue: c, newValue: u }) => n.update(c.target, u.target));
|
|
4326
4335
|
}), {
|
|
@@ -4360,13 +4369,13 @@ const Ci = () => {
|
|
|
4360
4369
|
}, Ni = (e) => {
|
|
4361
4370
|
const t = Ri(e), n = t > 0.6 ? "dark" : "light";
|
|
4362
4371
|
return console.log(`[Annotorious] Image brightness: ${t.toFixed(1)}. Setting ${n} theme.`), n;
|
|
4363
|
-
},
|
|
4372
|
+
}, Kt = (e, t, n) => t.setAttribute("data-theme", n === "auto" ? Ni(e) : n), Vi = (e, t) => ({
|
|
4364
4373
|
...e,
|
|
4365
4374
|
drawingEnabled: e.drawingEnabled === void 0 ? t.drawingEnabled : e.drawingEnabled,
|
|
4366
4375
|
drawingMode: e.drawingMode || t.drawingMode,
|
|
4367
4376
|
userSelectAction: e.userSelectAction || t.userSelectAction,
|
|
4368
4377
|
theme: e.theme || t.theme
|
|
4369
|
-
}),
|
|
4378
|
+
}), Wt = typeof navigator > "u" ? !1 : navigator.userAgent.indexOf("Mac OS X") !== -1, Gi = (e, t) => {
|
|
4370
4379
|
const n = t || document, o = (r) => {
|
|
4371
4380
|
const l = r;
|
|
4372
4381
|
l.key === "z" && l.ctrlKey ? e.undo() : l.key === "y" && l.ctrlKey && e.redo();
|
|
@@ -4374,9 +4383,9 @@ const Ci = () => {
|
|
|
4374
4383
|
const l = r;
|
|
4375
4384
|
l.key === "z" && l.metaKey && (l.shiftKey ? e.redo() : e.undo());
|
|
4376
4385
|
}, s = () => {
|
|
4377
|
-
|
|
4386
|
+
Wt ? n.removeEventListener("keydown", i) : n.removeEventListener("keydown", o);
|
|
4378
4387
|
};
|
|
4379
|
-
return
|
|
4388
|
+
return Wt ? n.addEventListener("keydown", i) : n.addEventListener("keydown", o), {
|
|
4380
4389
|
destroy: s
|
|
4381
4390
|
};
|
|
4382
4391
|
}, Ji = (e, t = {}) => {
|
|
@@ -4396,7 +4405,7 @@ const Ci = () => {
|
|
|
4396
4405
|
c.style.position = "relative", c.style.display = "inline-block", n.style.display = "block", n.parentNode.insertBefore(c, n), c.appendChild(n);
|
|
4397
4406
|
const u = Gi(l);
|
|
4398
4407
|
let f = wo();
|
|
4399
|
-
|
|
4408
|
+
Kt(n, c, o.theme);
|
|
4400
4409
|
const h = new Li({
|
|
4401
4410
|
target: c,
|
|
4402
4411
|
props: {
|
|
@@ -4409,53 +4418,51 @@ const Ci = () => {
|
|
|
4409
4418
|
}
|
|
4410
4419
|
});
|
|
4411
4420
|
h.$on("click", (b) => {
|
|
4412
|
-
const { originalEvent:
|
|
4413
|
-
|
|
4421
|
+
const { originalEvent: T, annotation: Y } = b.detail;
|
|
4422
|
+
Y ? s.userSelect(Y.id, T) : s.isEmpty() || s.clear();
|
|
4414
4423
|
});
|
|
4415
|
-
const
|
|
4416
|
-
h.$set({ drawingEnabled: !1 }), setTimeout(() => h.$set({ drawingEnabled: !0 }), 1);
|
|
4417
|
-
}, _ = () => {
|
|
4424
|
+
const y = ho(i, l, o.adapter), g = () => h.cancelDrawing(), m = () => {
|
|
4418
4425
|
h.$destroy(), c.parentNode.insertBefore(n, c), c.parentNode.removeChild(c), u.destroy(), l.destroy();
|
|
4419
|
-
}, A = () => h.getDrawingTool(),
|
|
4426
|
+
}, A = () => h.getDrawingTool(), p = () => f, _ = () => h.isDrawingEnabled(), w = (b, T, Y) => si(b, T, Y), E = (b, T) => zo(b, T), k = (b) => {
|
|
4420
4427
|
if (!fn(b))
|
|
4421
4428
|
throw `No drawing tool named ${b}`;
|
|
4422
4429
|
h.$set({ toolName: b });
|
|
4423
|
-
},
|
|
4430
|
+
}, X = (b) => h.$set({ drawingEnabled: b }), R = (b) => {
|
|
4424
4431
|
console.warn("Filter not implemented yet");
|
|
4425
|
-
}, V = (b) => h.$set({ style: b }), Z = (b) =>
|
|
4432
|
+
}, V = (b) => h.$set({ style: b }), Z = (b) => Kt(n, c, b), S = (b) => {
|
|
4426
4433
|
f = b, h.$set({ user: b });
|
|
4427
|
-
},
|
|
4434
|
+
}, v = (b) => (
|
|
4428
4435
|
// @ts-ignore
|
|
4429
4436
|
h.$set({ visible: b })
|
|
4430
4437
|
);
|
|
4431
4438
|
return {
|
|
4432
|
-
...
|
|
4439
|
+
...y,
|
|
4433
4440
|
cancelDrawing: g,
|
|
4434
|
-
destroy:
|
|
4441
|
+
destroy: m,
|
|
4435
4442
|
getDrawingTool: A,
|
|
4436
|
-
getUser:
|
|
4437
|
-
isDrawingEnabled:
|
|
4443
|
+
getUser: p,
|
|
4444
|
+
isDrawingEnabled: _,
|
|
4438
4445
|
listDrawingTools: cn,
|
|
4439
4446
|
on: a.on,
|
|
4440
4447
|
off: a.off,
|
|
4441
4448
|
registerDrawingTool: w,
|
|
4442
4449
|
registerShapeEditor: E,
|
|
4443
|
-
setDrawingEnabled:
|
|
4444
|
-
setDrawingTool:
|
|
4445
|
-
setFilter:
|
|
4450
|
+
setDrawingEnabled: X,
|
|
4451
|
+
setDrawingTool: k,
|
|
4452
|
+
setFilter: R,
|
|
4446
4453
|
setStyle: V,
|
|
4447
4454
|
setTheme: Z,
|
|
4448
4455
|
setUser: S,
|
|
4449
|
-
setVisible:
|
|
4456
|
+
setVisible: v,
|
|
4450
4457
|
element: c,
|
|
4451
4458
|
state: i
|
|
4452
4459
|
};
|
|
4453
4460
|
};
|
|
4454
4461
|
export {
|
|
4455
4462
|
an as Editor,
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4463
|
+
qo as EditorMount,
|
|
4464
|
+
Pe as Handle,
|
|
4465
|
+
qi as IdentityTransform,
|
|
4459
4466
|
Io as PolygonEditor,
|
|
4460
4467
|
Go as RectangleEditor,
|
|
4461
4468
|
On as RectangleUtil,
|
|
@@ -4464,9 +4471,9 @@ export {
|
|
|
4464
4471
|
F as ShapeType,
|
|
4465
4472
|
Qo as ToolMount,
|
|
4466
4473
|
nn as UserSelectAction,
|
|
4467
|
-
|
|
4474
|
+
Wi as W3CImageFormat,
|
|
4468
4475
|
wi as addEventListeners,
|
|
4469
|
-
|
|
4476
|
+
qe as boundsFromPoints,
|
|
4470
4477
|
Fi as chainStyles,
|
|
4471
4478
|
ht as computeArea,
|
|
4472
4479
|
Hi as computeStyle,
|
|
@@ -4475,7 +4482,7 @@ export {
|
|
|
4475
4482
|
Xi as createImageAnnotatorState,
|
|
4476
4483
|
yi as createSVGTransform,
|
|
4477
4484
|
Ui as createSvelteImageAnnotatorState,
|
|
4478
|
-
|
|
4485
|
+
Ki as defaultColorProvider,
|
|
4479
4486
|
Ni as detectTheme,
|
|
4480
4487
|
st as distance,
|
|
4481
4488
|
Do as enableResponsive,
|
|
@@ -4487,7 +4494,7 @@ export {
|
|
|
4487
4494
|
kn as intersects,
|
|
4488
4495
|
Je as isImageAnnotation,
|
|
4489
4496
|
Fe as isImageAnnotationTarget,
|
|
4490
|
-
|
|
4497
|
+
Wt as isMac,
|
|
4491
4498
|
Yo as isTouch,
|
|
4492
4499
|
cn as listDrawingTools,
|
|
4493
4500
|
Dn as parseFragmentSelector,
|
|
@@ -4500,6 +4507,6 @@ export {
|
|
|
4500
4507
|
Yn as serializeFragmentSelector,
|
|
4501
4508
|
Nn as serializeSVGSelector,
|
|
4502
4509
|
Mo as serializeW3CImageAnnotation,
|
|
4503
|
-
|
|
4510
|
+
Kt as setTheme
|
|
4504
4511
|
};
|
|
4505
4512
|
//# sourceMappingURL=annotorious.es.js.map
|