@annotorious/svelte 3.0.21 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { toSvelteStore as
|
|
5
|
-
import { Origin as
|
|
6
|
-
import { ShapeType as
|
|
7
|
-
import { createOSDAnnotator as
|
|
8
|
-
import
|
|
9
|
-
function
|
|
10
|
-
}
|
|
11
|
-
function
|
|
1
|
+
var it = Object.defineProperty;
|
|
2
|
+
var st = (e, t, n) => t in e ? it(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var pe = (e, t, n) => st(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { toSvelteStore as lt } from "@annotorious/core";
|
|
5
|
+
import { Origin as Vt, UserSelectAction as qt, createAnonymousGuest as zt, createBody as Wt, defaultColorProvider as $t } from "@annotorious/core";
|
|
6
|
+
import { ShapeType as Gt, W3CImageFormat as Jt, createImageAnnotator as Kt } from "@annotorious/annotorious";
|
|
7
|
+
import { createOSDAnnotator as at } from "@annotorious/openseadragon";
|
|
8
|
+
import Pe from "openseadragon";
|
|
9
|
+
function j() {
|
|
10
|
+
}
|
|
11
|
+
function ut(e, t) {
|
|
12
12
|
for (const n in t) e[n] = t[n];
|
|
13
13
|
return (
|
|
14
14
|
/** @type {T & S} */
|
|
15
15
|
e
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function ze(e) {
|
|
19
19
|
return e();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Oe() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
e.forEach(
|
|
24
|
+
function H(e) {
|
|
25
|
+
e.forEach(ze);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function te(e) {
|
|
28
28
|
return typeof e == "function";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function we(e, t) {
|
|
31
31
|
return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function ft(e) {
|
|
34
34
|
return Object.keys(e).length === 0;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function ct(e, ...t) {
|
|
37
37
|
if (e == null) {
|
|
38
38
|
for (const o of t)
|
|
39
39
|
o(void 0);
|
|
40
|
-
return
|
|
40
|
+
return j;
|
|
41
41
|
}
|
|
42
42
|
const n = e.subscribe(...t);
|
|
43
43
|
return n.unsubscribe ? () => n.unsubscribe() : n;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
e.$$.on_destroy.push(
|
|
45
|
+
function We(e, t, n) {
|
|
46
|
+
e.$$.on_destroy.push(ct(t, n));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function $e(e, t, n, o) {
|
|
49
49
|
if (e) {
|
|
50
|
-
const r =
|
|
50
|
+
const r = Fe(e, t, n, o);
|
|
51
51
|
return e[0](r);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
return e[1] && o ?
|
|
54
|
+
function Fe(e, t, n, o) {
|
|
55
|
+
return e[1] && o ? ut(n.ctx.slice(), e[1](o(t))) : n.ctx;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Ge(e, t, n, o) {
|
|
58
58
|
if (e[2] && o) {
|
|
59
59
|
const r = e[2](o(n));
|
|
60
60
|
if (t.dirty === void 0)
|
|
61
61
|
return r;
|
|
62
62
|
if (typeof r == "object") {
|
|
63
|
-
const i = [],
|
|
64
|
-
for (let a = 0; a <
|
|
63
|
+
const i = [], s = Math.max(t.dirty.length, r.length);
|
|
64
|
+
for (let a = 0; a < s; a += 1)
|
|
65
65
|
i[a] = t.dirty[a] | r[a];
|
|
66
66
|
return i;
|
|
67
67
|
}
|
|
@@ -69,13 +69,13 @@ function tt(e, t, n, o) {
|
|
|
69
69
|
}
|
|
70
70
|
return t.dirty;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Je(e, t, n, o, r, i) {
|
|
73
73
|
if (r) {
|
|
74
|
-
const
|
|
75
|
-
e.p(
|
|
74
|
+
const s = Fe(t, n, o, i);
|
|
75
|
+
e.p(s, r);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Ke(e) {
|
|
79
79
|
if (e.ctx.length > 32) {
|
|
80
80
|
const t = [], n = e.ctx.length / 32;
|
|
81
81
|
for (let o = 0; o < n; o++)
|
|
@@ -84,182 +84,182 @@ function ot(e) {
|
|
|
84
84
|
}
|
|
85
85
|
return -1;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
return e &&
|
|
87
|
+
function dt(e) {
|
|
88
|
+
return e && te(e.destroy) ? e.destroy : j;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function pt(e, t) {
|
|
91
91
|
e.appendChild(t);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function F(e, t, n) {
|
|
94
94
|
e.insertBefore(t, n || null);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function U(e) {
|
|
97
97
|
e.parentNode && e.parentNode.removeChild(e);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Qe(e) {
|
|
100
100
|
return document.createElement(e);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Ze(e) {
|
|
103
103
|
return document.createTextNode(e);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return
|
|
105
|
+
function Ee() {
|
|
106
|
+
return Ze("");
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Be(e, t, n, o) {
|
|
109
109
|
return e.addEventListener(t, n, o), () => e.removeEventListener(t, n, o);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Z(e, t, n) {
|
|
112
112
|
n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function gt(e) {
|
|
115
115
|
return Array.from(e.childNodes);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function ht(e, t) {
|
|
118
118
|
t = "" + t, e.data !== t && (e.data = /** @type {string} */
|
|
119
119
|
t);
|
|
120
120
|
}
|
|
121
|
-
let
|
|
122
|
-
function
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
function Pe() {
|
|
126
|
-
if (!J) throw new Error("Function called outside component initialization");
|
|
127
|
-
return J;
|
|
128
|
-
}
|
|
129
|
-
function st(e) {
|
|
130
|
-
Pe().$$.on_mount.push(e);
|
|
131
|
-
}
|
|
132
|
-
function He(e, t) {
|
|
133
|
-
return Pe().$$.context.set(e, t), t;
|
|
121
|
+
let $;
|
|
122
|
+
function W(e) {
|
|
123
|
+
$ = e;
|
|
134
124
|
}
|
|
135
|
-
function
|
|
136
|
-
|
|
125
|
+
function Se() {
|
|
126
|
+
if (!$) throw new Error("Function called outside component initialization");
|
|
127
|
+
return $;
|
|
137
128
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
const qe = [], St = /* @__PURE__ */ Promise.resolve();
|
|
141
|
-
let Ae = !1;
|
|
142
|
-
function xt() {
|
|
143
|
-
Ae || (Ae = !0, St.then(lt));
|
|
129
|
+
function et(e) {
|
|
130
|
+
Se().$$.on_mount.push(e);
|
|
144
131
|
}
|
|
145
|
-
function
|
|
146
|
-
|
|
132
|
+
function je(e, t) {
|
|
133
|
+
return Se().$$.context.set(e, t), t;
|
|
147
134
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
135
|
+
function mt(e) {
|
|
136
|
+
return Se().$$.context.get(e);
|
|
137
|
+
}
|
|
138
|
+
const R = [], Te = [];
|
|
139
|
+
let X = [];
|
|
140
|
+
const Ie = [], _t = /* @__PURE__ */ Promise.resolve();
|
|
141
|
+
let ye = !1;
|
|
142
|
+
function yt() {
|
|
143
|
+
ye || (ye = !0, _t.then(tt));
|
|
144
|
+
}
|
|
145
|
+
function be(e) {
|
|
146
|
+
X.push(e);
|
|
147
|
+
}
|
|
148
|
+
const ge = /* @__PURE__ */ new Set();
|
|
149
|
+
let I = 0;
|
|
150
|
+
function tt() {
|
|
151
|
+
if (I !== 0)
|
|
152
152
|
return;
|
|
153
|
-
const e =
|
|
153
|
+
const e = $;
|
|
154
154
|
do {
|
|
155
155
|
try {
|
|
156
|
-
for (;
|
|
157
|
-
const t =
|
|
158
|
-
|
|
156
|
+
for (; I < R.length; ) {
|
|
157
|
+
const t = R[I];
|
|
158
|
+
I++, W(t), bt(t.$$);
|
|
159
159
|
}
|
|
160
160
|
} catch (t) {
|
|
161
|
-
throw
|
|
161
|
+
throw R.length = 0, I = 0, t;
|
|
162
162
|
}
|
|
163
|
-
for (
|
|
164
|
-
for (let t = 0; t <
|
|
165
|
-
const n =
|
|
166
|
-
|
|
163
|
+
for (W(null), R.length = 0, I = 0; Te.length; ) Te.pop()();
|
|
164
|
+
for (let t = 0; t < X.length; t += 1) {
|
|
165
|
+
const n = X[t];
|
|
166
|
+
ge.has(n) || (ge.add(n), n());
|
|
167
167
|
}
|
|
168
|
-
|
|
169
|
-
} while (
|
|
170
|
-
for (;
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
X.length = 0;
|
|
169
|
+
} while (R.length);
|
|
170
|
+
for (; Ie.length; )
|
|
171
|
+
Ie.pop()();
|
|
172
|
+
ye = !1, ge.clear(), W(e);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function bt(e) {
|
|
175
175
|
if (e.fragment !== null) {
|
|
176
|
-
e.update(),
|
|
176
|
+
e.update(), H(e.before_update);
|
|
177
177
|
const t = e.dirty;
|
|
178
|
-
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(
|
|
178
|
+
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(be);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function vt(e) {
|
|
182
182
|
const t = [], n = [];
|
|
183
|
-
|
|
183
|
+
X.forEach((o) => e.indexOf(o) === -1 ? t.push(o) : n.push(o)), n.forEach((o) => o()), X = t;
|
|
184
184
|
}
|
|
185
|
-
const
|
|
186
|
-
let
|
|
187
|
-
function
|
|
188
|
-
|
|
185
|
+
const ee = /* @__PURE__ */ new Set();
|
|
186
|
+
let B;
|
|
187
|
+
function nt() {
|
|
188
|
+
B = {
|
|
189
189
|
r: 0,
|
|
190
190
|
c: [],
|
|
191
|
-
p:
|
|
191
|
+
p: B
|
|
192
192
|
// parent group
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
|
|
195
|
+
function ot() {
|
|
196
|
+
B.r || H(B.c), B = B.p;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
e && e.i && (
|
|
198
|
+
function D(e, t) {
|
|
199
|
+
e && e.i && (ee.delete(e), e.i(t));
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function Y(e, t, n, o) {
|
|
202
202
|
if (e && e.o) {
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
if (ee.has(e)) return;
|
|
204
|
+
ee.add(e), B.c.push(() => {
|
|
205
|
+
ee.delete(e), o && (n && e.d(1), o());
|
|
206
206
|
}), e.o(t);
|
|
207
207
|
} else o && o();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function wt(e, t, n) {
|
|
210
210
|
const { fragment: o, after_update: r } = e.$$;
|
|
211
|
-
o && o.m(t, n),
|
|
212
|
-
const i = e.$$.on_mount.map(
|
|
213
|
-
e.$$.on_destroy ? e.$$.on_destroy.push(...i) :
|
|
214
|
-
}), r.forEach(
|
|
211
|
+
o && o.m(t, n), be(() => {
|
|
212
|
+
const i = e.$$.on_mount.map(ze).filter(te);
|
|
213
|
+
e.$$.on_destroy ? e.$$.on_destroy.push(...i) : H(i), e.$$.on_mount = [];
|
|
214
|
+
}), r.forEach(be);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function Et(e, t) {
|
|
217
217
|
const n = e.$$;
|
|
218
|
-
n.fragment !== null && (
|
|
218
|
+
n.fragment !== null && (vt(n.after_update), H(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
e.$$.dirty[0] === -1 && (
|
|
220
|
+
function St(e, t) {
|
|
221
|
+
e.$$.dirty[0] === -1 && (R.push(e), yt(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
const
|
|
225
|
-
|
|
223
|
+
function xe(e, t, n, o, r, i, s = null, a = [-1]) {
|
|
224
|
+
const d = $;
|
|
225
|
+
W(e);
|
|
226
226
|
const u = e.$$ = {
|
|
227
227
|
fragment: null,
|
|
228
228
|
ctx: [],
|
|
229
229
|
// state
|
|
230
230
|
props: i,
|
|
231
|
-
update:
|
|
231
|
+
update: j,
|
|
232
232
|
not_equal: r,
|
|
233
|
-
bound:
|
|
233
|
+
bound: Oe(),
|
|
234
234
|
// lifecycle
|
|
235
235
|
on_mount: [],
|
|
236
236
|
on_destroy: [],
|
|
237
237
|
on_disconnect: [],
|
|
238
238
|
before_update: [],
|
|
239
239
|
after_update: [],
|
|
240
|
-
context: new Map(t.context || (
|
|
240
|
+
context: new Map(t.context || (d ? d.$$.context : [])),
|
|
241
241
|
// everything else
|
|
242
|
-
callbacks:
|
|
242
|
+
callbacks: Oe(),
|
|
243
243
|
dirty: a,
|
|
244
244
|
skip_bound: !1,
|
|
245
|
-
root: t.target ||
|
|
245
|
+
root: t.target || d.$$.root
|
|
246
246
|
};
|
|
247
|
-
|
|
248
|
-
let
|
|
249
|
-
if (u.ctx = n ? n(e, t.props || {}, (
|
|
250
|
-
const
|
|
251
|
-
return u.ctx && r(u.ctx[
|
|
252
|
-
}) : [], u.update(),
|
|
247
|
+
s && s(u.root);
|
|
248
|
+
let y = !1;
|
|
249
|
+
if (u.ctx = n ? n(e, t.props || {}, (g, m, ...v) => {
|
|
250
|
+
const f = v.length ? v[0] : m;
|
|
251
|
+
return u.ctx && r(u.ctx[g], u.ctx[g] = f) && (!u.skip_bound && u.bound[g] && u.bound[g](f), y && St(e, g)), m;
|
|
252
|
+
}) : [], u.update(), y = !0, H(u.before_update), u.fragment = o ? o(u.ctx) : !1, t.target) {
|
|
253
253
|
if (t.hydrate) {
|
|
254
|
-
const
|
|
255
|
-
u.fragment && u.fragment.l(
|
|
254
|
+
const g = gt(t.target);
|
|
255
|
+
u.fragment && u.fragment.l(g), g.forEach(U);
|
|
256
256
|
} else
|
|
257
257
|
u.fragment && u.fragment.c();
|
|
258
|
-
t.intro &&
|
|
258
|
+
t.intro && D(e.$$.fragment), wt(e, t.target, t.anchor), tt();
|
|
259
259
|
}
|
|
260
|
-
|
|
260
|
+
W(d);
|
|
261
261
|
}
|
|
262
|
-
class
|
|
262
|
+
class Ae {
|
|
263
263
|
constructor() {
|
|
264
264
|
/**
|
|
265
265
|
* ### PRIVATE API
|
|
@@ -268,7 +268,7 @@ class Oe {
|
|
|
268
268
|
*
|
|
269
269
|
* @type {any}
|
|
270
270
|
*/
|
|
271
|
-
|
|
271
|
+
pe(this, "$$");
|
|
272
272
|
/**
|
|
273
273
|
* ### PRIVATE API
|
|
274
274
|
*
|
|
@@ -276,11 +276,11 @@ class Oe {
|
|
|
276
276
|
*
|
|
277
277
|
* @type {any}
|
|
278
278
|
*/
|
|
279
|
-
|
|
279
|
+
pe(this, "$$set");
|
|
280
280
|
}
|
|
281
281
|
/** @returns {void} */
|
|
282
282
|
$destroy() {
|
|
283
|
-
|
|
283
|
+
Et(this, 1), this.$destroy = j;
|
|
284
284
|
}
|
|
285
285
|
/**
|
|
286
286
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -289,8 +289,8 @@ class Oe {
|
|
|
289
289
|
* @returns {() => void}
|
|
290
290
|
*/
|
|
291
291
|
$on(t, n) {
|
|
292
|
-
if (!
|
|
293
|
-
return
|
|
292
|
+
if (!te(n))
|
|
293
|
+
return j;
|
|
294
294
|
const o = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
|
|
295
295
|
return o.push(n), () => {
|
|
296
296
|
const r = o.indexOf(n);
|
|
@@ -302,17 +302,17 @@ class Oe {
|
|
|
302
302
|
* @returns {void}
|
|
303
303
|
*/
|
|
304
304
|
$set(t) {
|
|
305
|
-
this.$$set && !
|
|
305
|
+
this.$$set && !ft(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
const
|
|
309
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
310
|
-
function
|
|
308
|
+
const xt = "4";
|
|
309
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(xt);
|
|
310
|
+
function Re(e) {
|
|
311
311
|
let t;
|
|
312
312
|
const n = (
|
|
313
313
|
/*#slots*/
|
|
314
314
|
e[4].default
|
|
315
|
-
), o =
|
|
315
|
+
), o = $e(
|
|
316
316
|
n,
|
|
317
317
|
e,
|
|
318
318
|
/*$$scope*/
|
|
@@ -328,19 +328,19 @@ function Ve(e) {
|
|
|
328
328
|
},
|
|
329
329
|
p(r, i) {
|
|
330
330
|
o && o.p && (!t || i & /*$$scope*/
|
|
331
|
-
8) &&
|
|
331
|
+
8) && Je(
|
|
332
332
|
o,
|
|
333
333
|
n,
|
|
334
334
|
r,
|
|
335
335
|
/*$$scope*/
|
|
336
336
|
r[3],
|
|
337
|
-
t ?
|
|
337
|
+
t ? Ge(
|
|
338
338
|
n,
|
|
339
339
|
/*$$scope*/
|
|
340
340
|
r[3],
|
|
341
341
|
i,
|
|
342
342
|
null
|
|
343
|
-
) :
|
|
343
|
+
) : Ke(
|
|
344
344
|
/*$$scope*/
|
|
345
345
|
r[3]
|
|
346
346
|
),
|
|
@@ -348,191 +348,183 @@ function Ve(e) {
|
|
|
348
348
|
);
|
|
349
349
|
},
|
|
350
350
|
i(r) {
|
|
351
|
-
t || (
|
|
351
|
+
t || (D(o, r), t = !0);
|
|
352
352
|
},
|
|
353
353
|
o(r) {
|
|
354
|
-
|
|
354
|
+
Y(o, r), t = !1;
|
|
355
355
|
},
|
|
356
356
|
d(r) {
|
|
357
357
|
o && o.d(r);
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function At(e) {
|
|
362
362
|
let t, n, o = (
|
|
363
363
|
/*viewer*/
|
|
364
|
-
e[0] &&
|
|
364
|
+
e[0] && Re(e)
|
|
365
365
|
);
|
|
366
366
|
return {
|
|
367
367
|
c() {
|
|
368
|
-
o && o.c(), t =
|
|
368
|
+
o && o.c(), t = Ee();
|
|
369
369
|
},
|
|
370
370
|
m(r, i) {
|
|
371
|
-
o && o.m(r, i),
|
|
371
|
+
o && o.m(r, i), F(r, t, i), n = !0;
|
|
372
372
|
},
|
|
373
373
|
p(r, [i]) {
|
|
374
374
|
/*viewer*/
|
|
375
375
|
r[0] ? o ? (o.p(r, i), i & /*viewer*/
|
|
376
|
-
1 &&
|
|
376
|
+
1 && D(o, 1)) : (o = Re(r), o.c(), D(o, 1), o.m(t.parentNode, t)) : o && (nt(), Y(o, 1, 1, () => {
|
|
377
377
|
o = null;
|
|
378
|
-
}),
|
|
378
|
+
}), ot());
|
|
379
379
|
},
|
|
380
380
|
i(r) {
|
|
381
|
-
n || (
|
|
381
|
+
n || (D(o), n = !0);
|
|
382
382
|
},
|
|
383
383
|
o(r) {
|
|
384
|
-
|
|
384
|
+
Y(o), n = !1;
|
|
385
385
|
},
|
|
386
386
|
d(r) {
|
|
387
|
-
r &&
|
|
387
|
+
r && U(t), o && o.d(r);
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
let { $$slots: o = {}, $$scope: r } = t, { viewer: i } = t, { opts:
|
|
393
|
-
const
|
|
391
|
+
function Ct(e, t, n) {
|
|
392
|
+
let { $$slots: o = {}, $$scope: r } = t, { viewer: i } = t, { opts: s = {} } = t, { anno: a = void 0 } = t;
|
|
393
|
+
const d = (u) => {
|
|
394
394
|
if (u) {
|
|
395
|
-
const
|
|
396
|
-
...
|
|
397
|
-
state: { ...
|
|
395
|
+
const y = at(u, s), g = lt(y.state.store), m = {
|
|
396
|
+
...y,
|
|
397
|
+
state: { ...y.state, store: g }
|
|
398
398
|
};
|
|
399
|
-
|
|
399
|
+
je("anno", m), je("viewer", u), n(1, a = m);
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
return e.$$set = (u) => {
|
|
403
|
-
"viewer" in u && n(0, i = u.viewer), "opts" in u && n(2,
|
|
403
|
+
"viewer" in u && n(0, i = u.viewer), "opts" in u && n(2, s = u.opts), "anno" in u && n(1, a = u.anno), "$$scope" in u && n(3, r = u.$$scope);
|
|
404
404
|
}, e.$$.update = () => {
|
|
405
405
|
e.$$.dirty & /*viewer*/
|
|
406
|
-
1 &&
|
|
407
|
-
}, [i, a,
|
|
406
|
+
1 && d(i);
|
|
407
|
+
}, [i, a, s, r, o];
|
|
408
408
|
}
|
|
409
|
-
class
|
|
409
|
+
class Rt extends Ae {
|
|
410
410
|
constructor(t) {
|
|
411
|
-
super(),
|
|
411
|
+
super(), xe(this, t, Ct, At, we, { viewer: 0, opts: 2, anno: 1 });
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var
|
|
415
|
-
const r = (i,
|
|
414
|
+
var he = { dragStart: !0 }, Xe = (e, t, n) => Math.min(Math.max(e, t), n), me = (e) => typeof e == "string", Nt = ([e, t], n, o) => {
|
|
415
|
+
const r = (i, s) => s === 0 ? 0 : Math.ceil(i / s) * s;
|
|
416
416
|
return [r(n, e), r(o, t)];
|
|
417
|
-
},
|
|
418
|
-
function
|
|
417
|
+
}, Ye = (e, t) => e.some((n) => t.some((o) => n.contains(o)));
|
|
418
|
+
function _e(e, t) {
|
|
419
419
|
if (e === void 0) return;
|
|
420
|
-
if (
|
|
420
|
+
if (ve(e)) return e.getBoundingClientRect();
|
|
421
421
|
if (typeof e == "object") {
|
|
422
|
-
const { top: o = 0, left: r = 0, right: i = 0, bottom:
|
|
423
|
-
return { top: o, right: window.innerWidth - i, bottom: window.innerHeight -
|
|
422
|
+
const { top: o = 0, left: r = 0, right: i = 0, bottom: s = 0 } = e;
|
|
423
|
+
return { top: o, right: window.innerWidth - i, bottom: window.innerHeight - s, left: r };
|
|
424
424
|
}
|
|
425
425
|
if (e === "parent") return t.parentNode.getBoundingClientRect();
|
|
426
426
|
const n = document.querySelector(e);
|
|
427
427
|
if (n === null) throw new Error("The selector provided for bound doesn't exists in the document.");
|
|
428
428
|
return n.getBoundingClientRect();
|
|
429
429
|
}
|
|
430
|
-
var
|
|
431
|
-
let n, o, { bounds: r, axis: i = "both", gpuAcceleration:
|
|
432
|
-
|
|
433
|
-
let
|
|
434
|
-
m = { ...
|
|
435
|
-
let
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
}(s), M.add(P), u && (je = he.userSelect, he.userSelect = "none"));
|
|
440
|
-
}
|
|
441
|
-
const he = document.body.style, M = e.classList;
|
|
442
|
-
function me(s = B, f = j) {
|
|
443
|
-
if (!g) {
|
|
430
|
+
var Q = (e, t, n) => e.style.setProperty(t, n), ve = (e) => e instanceof HTMLElement, kt = (e, t = {}) => {
|
|
431
|
+
let n, o, { bounds: r, axis: i = "both", gpuAcceleration: s = !0, legacyTranslate: a = !0, transform: d, applyUserSelectHack: u = !0, disabled: y = !1, ignoreMultitouch: g = !1, recomputeBounds: m = he, grid: v, position: f, cancel: A, handle: w, defaultClass: c = "neodrag", defaultClassDragging: x = "neodrag-dragging", defaultClassDragged: C = "neodrag-dragged", defaultPosition: ne = { x: 0, y: 0 }, onDragStart: oe, onDrag: re, onDragEnd: ie } = t, T = !1, N = 0, k = 0, V = 0, q = 0, se = 0, le = 0, { x: G, y: J } = f ? { x: (f == null ? void 0 : f.x) ?? 0, y: (f == null ? void 0 : f.y) ?? 0 } : ne;
|
|
432
|
+
fe(G, J);
|
|
433
|
+
let L, O, z, ae, Ce, Ne = "", rt = !!f;
|
|
434
|
+
m = { ...he, ...m };
|
|
435
|
+
let K = /* @__PURE__ */ new Set();
|
|
436
|
+
const ue = document.body.style, P = e.classList;
|
|
437
|
+
function fe(l = N, h = k) {
|
|
438
|
+
if (!d) {
|
|
444
439
|
if (a) {
|
|
445
|
-
let
|
|
446
|
-
return
|
|
440
|
+
let b = `${+l}px, ${+h}px`;
|
|
441
|
+
return Q(e, "transform", s ? `translate3d(${b}, 0)` : `translate(${b})`);
|
|
447
442
|
}
|
|
448
|
-
return
|
|
443
|
+
return Q(e, "translate", `${+l}px ${+h}px ${s ? "1px" : ""}`);
|
|
449
444
|
}
|
|
450
|
-
const _ =
|
|
451
|
-
|
|
445
|
+
const _ = d({ offsetX: l, offsetY: h, rootNode: e });
|
|
446
|
+
me(_) && Q(e, "transform", _);
|
|
452
447
|
}
|
|
453
|
-
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
448
|
+
const ce = (l, h) => {
|
|
449
|
+
const _ = { offsetX: N, offsetY: k, rootNode: e, currentNode: Ce };
|
|
450
|
+
e.dispatchEvent(new CustomEvent(l, { detail: _ })), h == null || h(_);
|
|
451
|
+
}, de = addEventListener;
|
|
452
|
+
de("pointerdown", Le, !1), de("pointerup", Me, !1), de("pointermove", De, !1), Q(e, "touch-action", "none");
|
|
453
|
+
const ke = () => {
|
|
454
|
+
let l = e.offsetWidth / O.width;
|
|
455
|
+
return isNaN(l) && (l = 1), l;
|
|
456
|
+
};
|
|
457
|
+
function Le(l) {
|
|
458
|
+
if (y || l.button === 2) return;
|
|
459
|
+
if (K.add(l.pointerId), g && K.size > 1) return l.preventDefault();
|
|
460
|
+
if (m.dragStart && (L = _e(r, e)), me(w) && me(A) && w === A) throw new Error("`handle` selector can't be same as `cancel` selector");
|
|
461
|
+
if (P.add(c), z = function(p, S) {
|
|
462
|
+
if (!p) return [S];
|
|
463
|
+
if (ve(p)) return [p];
|
|
464
|
+
if (Array.isArray(p)) return p;
|
|
465
|
+
const M = S.querySelectorAll(p);
|
|
466
|
+
if (M === null) throw new Error("Selector passed for `handle` option should be child of the element on which the action is applied");
|
|
467
|
+
return Array.from(M.values());
|
|
468
|
+
}(w, e), ae = function(p, S) {
|
|
469
|
+
if (!p) return [];
|
|
470
|
+
if (ve(p)) return [p];
|
|
471
|
+
if (Array.isArray(p)) return p;
|
|
472
|
+
const M = S.querySelectorAll(p);
|
|
473
|
+
if (M === null) throw new Error("Selector passed for `cancel` option should be child of the element on which the action is applied");
|
|
474
|
+
return Array.from(M.values());
|
|
475
|
+
}(A, e), n = /(both|x)/.test(i), o = /(both|y)/.test(i), Ye(ae, z)) throw new Error("Element being dragged can't be a child of the element on which `cancel` is applied");
|
|
476
|
+
const h = l.composedPath()[0];
|
|
477
|
+
if (!z.some((p) => {
|
|
478
|
+
var S;
|
|
479
|
+
return p.contains(h) || ((S = p.shadowRoot) == null ? void 0 : S.contains(h));
|
|
480
|
+
}) || Ye(ae, [h])) return;
|
|
481
|
+
Ce = z.length === 1 ? e : z.find((p) => p.contains(h)), T = !0, O = e.getBoundingClientRect(), u && (Ne = ue.userSelect, ue.userSelect = "none"), ce("neodrag:start", oe);
|
|
482
|
+
const { clientX: _, clientY: b } = l, E = ke();
|
|
483
|
+
n && (V = _ - G / E), o && (q = b - J / E), L && (se = _ - O.left, le = b - O.top);
|
|
458
484
|
}
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
let s = e.offsetWidth / T.width;
|
|
462
|
-
return isNaN(s) && (s = 1), s;
|
|
485
|
+
function Me(l) {
|
|
486
|
+
K.delete(l.pointerId), T && (m.dragEnd && (L = _e(r, e)), P.remove(x), P.add(C), u && (ue.userSelect = Ne), ce("neodrag:end", ie), n && (V = N), o && (q = k), T = !1);
|
|
463
487
|
}
|
|
464
|
-
|
|
465
|
-
if (
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
const N = C.querySelectorAll(c);
|
|
473
|
-
if (N === null) throw new Error("Selector passed for `handle` option should be child of the element on which the action is applied");
|
|
474
|
-
return Array.from(N.values());
|
|
475
|
-
}(d, e), ge = function(c, C) {
|
|
476
|
-
if (!c) return [];
|
|
477
|
-
if (ke(c)) return [c];
|
|
478
|
-
if (Array.isArray(c)) return c;
|
|
479
|
-
const N = C.querySelectorAll(c);
|
|
480
|
-
if (N === null) throw new Error("Selector passed for `cancel` option should be child of the element on which the action is applied");
|
|
481
|
-
return Array.from(N.values());
|
|
482
|
-
}(S, e), n = /(both|x)/.test(i), o = /(both|y)/.test(i), We(ge, G)) throw new Error("Element being dragged can't be a child of the element on which `cancel` is applied");
|
|
483
|
-
const f = s.composedPath()[0];
|
|
484
|
-
if (!G.some((c) => {
|
|
485
|
-
var C;
|
|
486
|
-
return c.contains(f) || ((C = c.shadowRoot) == null ? void 0 : C.contains(f));
|
|
487
|
-
}) || We(ge, [f])) return;
|
|
488
|
-
pe = G.length === 1 ? e : G.find((c) => c.contains(f)), O = !0, Be = Date.now(), h.delay || (F = !0), T = e.getBoundingClientRect();
|
|
489
|
-
const { clientX: _, clientY: y } = s, v = Ie();
|
|
490
|
-
n && (X = _ - Z / v), o && (Y = y - ee / v), A && (ce = _ - T.left, de = y - T.top);
|
|
491
|
-
}, be), ne("pointermove", (s) => {
|
|
492
|
-
if (!O || p && te.size > 1) return;
|
|
493
|
-
if (!D) {
|
|
494
|
-
if (F || Date.now() - Be >= h.delay && (F = !0, Te(s)), !Q) {
|
|
495
|
-
const v = s.clientX - X, c = s.clientY - Y;
|
|
496
|
-
Math.sqrt(v ** 2 + c ** 2) >= h.distance && (Q = !0, Te(s));
|
|
497
|
-
}
|
|
498
|
-
if (!D) return;
|
|
499
|
-
}
|
|
500
|
-
m.drag && (A = Ce(r, e)), s.preventDefault(), T = e.getBoundingClientRect();
|
|
501
|
-
let f = s.clientX, _ = s.clientY;
|
|
502
|
-
const y = Ie();
|
|
503
|
-
if (A) {
|
|
504
|
-
const v = { left: A.left + ce, top: A.top + de, right: A.right + ce - T.width, bottom: A.bottom + de - T.height };
|
|
505
|
-
f = ze(f, v.left, v.right), _ = ze(_, v.top, v.bottom);
|
|
488
|
+
function De(l) {
|
|
489
|
+
if (!T || g && K.size > 1) return;
|
|
490
|
+
m.drag && (L = _e(r, e)), P.add(x), l.preventDefault(), O = e.getBoundingClientRect();
|
|
491
|
+
let h = l.clientX, _ = l.clientY;
|
|
492
|
+
const b = ke();
|
|
493
|
+
if (L) {
|
|
494
|
+
const E = { left: L.left + se, top: L.top + le, right: L.right + se - O.width, bottom: L.bottom + le - O.height };
|
|
495
|
+
h = Xe(h, E.left, E.right), _ = Xe(_, E.top, E.bottom);
|
|
506
496
|
}
|
|
507
|
-
if (Array.isArray(
|
|
508
|
-
let [
|
|
509
|
-
if (isNaN(+
|
|
510
|
-
if (isNaN(+
|
|
511
|
-
let
|
|
512
|
-
[
|
|
497
|
+
if (Array.isArray(v)) {
|
|
498
|
+
let [E, p] = v;
|
|
499
|
+
if (isNaN(+E) || E < 0) throw new Error("1st argument of `grid` must be a valid positive number");
|
|
500
|
+
if (isNaN(+p) || p < 0) throw new Error("2nd argument of `grid` must be a valid positive number");
|
|
501
|
+
let S = h - V, M = _ - q;
|
|
502
|
+
[S, M] = Nt([E / b, p / b], S, M), h = V + S, _ = q + M;
|
|
513
503
|
}
|
|
514
|
-
n && (
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
504
|
+
n && (N = Math.round((h - V) * b)), o && (k = Math.round((_ - q) * b)), G = N, J = k, ce("neodrag", re), fe();
|
|
505
|
+
}
|
|
506
|
+
return { destroy: () => {
|
|
507
|
+
const l = removeEventListener;
|
|
508
|
+
l("pointerdown", Le, !1), l("pointerup", Me, !1), l("pointermove", De, !1);
|
|
509
|
+
}, update: (l) => {
|
|
510
|
+
var _, b;
|
|
511
|
+
i = l.axis || "both", y = l.disabled ?? !1, g = l.ignoreMultitouch ?? !1, w = l.handle, r = l.bounds, m = l.recomputeBounds ?? he, A = l.cancel, u = l.applyUserSelectHack ?? !0, v = l.grid, s = l.gpuAcceleration ?? !0, a = l.legacyTranslate ?? !0, d = l.transform;
|
|
512
|
+
const h = P.contains(C);
|
|
513
|
+
P.remove(c, C), c = l.defaultClass ?? "neodrag", x = l.defaultClassDragging ?? "neodrag-dragging", C = l.defaultClassDragged ?? "neodrag-dragged", P.add(c), h && P.add(C), rt && (G = N = ((_ = l.position) == null ? void 0 : _.x) ?? N, J = k = ((b = l.position) == null ? void 0 : b.y) ?? k, fe());
|
|
522
514
|
} };
|
|
523
515
|
};
|
|
524
|
-
function
|
|
516
|
+
function He(e) {
|
|
525
517
|
let t, n = (
|
|
526
518
|
/*$selection*/
|
|
527
|
-
e[0].selected.map(
|
|
528
|
-
), o, r, i,
|
|
519
|
+
e[0].selected.map(Ue).join(", ") + ""
|
|
520
|
+
), o, r, i, s;
|
|
529
521
|
return {
|
|
530
522
|
c() {
|
|
531
|
-
t =
|
|
523
|
+
t = Qe("div"), o = Ze(n), Z(t, "class", "a9s-popup a9s-osd-popup svelte-1xuxeat");
|
|
532
524
|
},
|
|
533
|
-
m(a,
|
|
534
|
-
|
|
535
|
-
|
|
525
|
+
m(a, d) {
|
|
526
|
+
F(a, t, d), pt(t, o), i || (s = [
|
|
527
|
+
dt(r = kt.call(null, t, {
|
|
536
528
|
position: { x: (
|
|
537
529
|
/*left*/
|
|
538
530
|
e[1]
|
|
@@ -541,13 +533,13 @@ function Fe(e) {
|
|
|
541
533
|
e[2]
|
|
542
534
|
) }
|
|
543
535
|
})),
|
|
544
|
-
|
|
536
|
+
Be(
|
|
545
537
|
t,
|
|
546
538
|
"neodrag:start",
|
|
547
539
|
/*onDragStart*/
|
|
548
540
|
e[4]
|
|
549
541
|
),
|
|
550
|
-
|
|
542
|
+
Be(
|
|
551
543
|
t,
|
|
552
544
|
"neodrag:end",
|
|
553
545
|
/*onDragEnd*/
|
|
@@ -555,10 +547,10 @@ function Fe(e) {
|
|
|
555
547
|
)
|
|
556
548
|
], i = !0);
|
|
557
549
|
},
|
|
558
|
-
p(a,
|
|
559
|
-
|
|
550
|
+
p(a, d) {
|
|
551
|
+
d & /*$selection*/
|
|
560
552
|
1 && n !== (n = /*$selection*/
|
|
561
|
-
a[0].selected.map(
|
|
553
|
+
a[0].selected.map(Ue).join(", ") + "") && ht(o, n), r && te(r.update) && d & /*left, top*/
|
|
562
554
|
6 && r.update.call(null, {
|
|
563
555
|
position: { x: (
|
|
564
556
|
/*left*/
|
|
@@ -570,207 +562,207 @@ function Fe(e) {
|
|
|
570
562
|
});
|
|
571
563
|
},
|
|
572
564
|
d(a) {
|
|
573
|
-
a &&
|
|
565
|
+
a && U(t), i = !1, H(s);
|
|
574
566
|
}
|
|
575
567
|
};
|
|
576
568
|
}
|
|
577
|
-
function
|
|
569
|
+
function Lt(e) {
|
|
578
570
|
let t, n = (
|
|
579
571
|
/*$selection*/
|
|
580
|
-
e[0] &&
|
|
572
|
+
e[0] && He(e)
|
|
581
573
|
);
|
|
582
574
|
return {
|
|
583
575
|
c() {
|
|
584
|
-
n && n.c(), t =
|
|
576
|
+
n && n.c(), t = Ee();
|
|
585
577
|
},
|
|
586
578
|
m(o, r) {
|
|
587
|
-
n && n.m(o, r),
|
|
579
|
+
n && n.m(o, r), F(o, t, r);
|
|
588
580
|
},
|
|
589
581
|
p(o, [r]) {
|
|
590
582
|
/*$selection*/
|
|
591
|
-
o[0] ? n ? n.p(o, r) : (n =
|
|
583
|
+
o[0] ? n ? n.p(o, r) : (n = He(o), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
|
|
592
584
|
},
|
|
593
|
-
i:
|
|
594
|
-
o:
|
|
585
|
+
i: j,
|
|
586
|
+
o: j,
|
|
595
587
|
d(o) {
|
|
596
|
-
o &&
|
|
588
|
+
o && U(t), n && n.d(o);
|
|
597
589
|
}
|
|
598
590
|
};
|
|
599
591
|
}
|
|
600
|
-
const
|
|
601
|
-
function
|
|
602
|
-
let o, { state: r } = t, { viewer: i } = t,
|
|
603
|
-
const { selection:
|
|
604
|
-
|
|
605
|
-
const m = (
|
|
592
|
+
const Ue = (e) => e.id;
|
|
593
|
+
function Mt(e, t, n) {
|
|
594
|
+
let o, { state: r } = t, { viewer: i } = t, s, a, d = !1, u;
|
|
595
|
+
const { selection: y, store: g } = r;
|
|
596
|
+
We(e, y, (c) => n(0, o = c));
|
|
597
|
+
const m = (c) => {
|
|
606
598
|
var x;
|
|
607
|
-
return ((x =
|
|
608
|
-
},
|
|
609
|
-
|
|
610
|
-
},
|
|
599
|
+
return ((x = c.selected) == null ? void 0 : x.length) > 0;
|
|
600
|
+
}, v = () => {
|
|
601
|
+
d = !0, i.setMouseNavEnabled(!1);
|
|
602
|
+
}, f = () => {
|
|
611
603
|
i.setMouseNavEnabled(!0);
|
|
612
|
-
},
|
|
613
|
-
u &&
|
|
614
|
-
|
|
615
|
-
},
|
|
616
|
-
annotations: o.selected.map((
|
|
604
|
+
}, A = () => {
|
|
605
|
+
u && g.unobserve(u), m(o) && (d = !1, w(o), u = (c) => {
|
|
606
|
+
d || w(o);
|
|
607
|
+
}, g.observe(u, {
|
|
608
|
+
annotations: o.selected.map((c) => c.id)
|
|
617
609
|
}));
|
|
618
|
-
},
|
|
619
|
-
const x =
|
|
620
|
-
n(1,
|
|
610
|
+
}, w = (c) => {
|
|
611
|
+
const x = c.selected[0].id, C = g.getAnnotation(x), { minX: ne, minY: oe, maxX: re, maxY: ie } = C.target.selector.geometry.bounds, T = 14, N = i.viewport.imageToViewerElementCoordinates(new Pe.Point(ne, oe)), k = i.viewport.imageToViewerElementCoordinates(new Pe.Point(re, ie));
|
|
612
|
+
n(1, s = k.x + T), n(2, a = N.y);
|
|
621
613
|
};
|
|
622
|
-
return
|
|
623
|
-
const
|
|
624
|
-
m(o) && !
|
|
614
|
+
return et(() => {
|
|
615
|
+
const c = () => {
|
|
616
|
+
m(o) && !d && w(o);
|
|
625
617
|
};
|
|
626
|
-
return i.addHandler("update-viewport",
|
|
627
|
-
i.removeHandler("update-viewport",
|
|
618
|
+
return i.addHandler("update-viewport", c), () => {
|
|
619
|
+
i.removeHandler("update-viewport", c);
|
|
628
620
|
};
|
|
629
|
-
}), e.$$set = (
|
|
630
|
-
"state" in
|
|
621
|
+
}), e.$$set = (c) => {
|
|
622
|
+
"state" in c && n(6, r = c.state), "viewer" in c && n(7, i = c.viewer);
|
|
631
623
|
}, e.$$.update = () => {
|
|
632
624
|
e.$$.dirty & /*$selection*/
|
|
633
|
-
1 &&
|
|
634
|
-
}, [o,
|
|
625
|
+
1 && A();
|
|
626
|
+
}, [o, s, a, y, v, f, r, i];
|
|
635
627
|
}
|
|
636
|
-
class
|
|
628
|
+
class Xt extends Ae {
|
|
637
629
|
constructor(t) {
|
|
638
|
-
super(),
|
|
630
|
+
super(), xe(this, t, Mt, Lt, we, { state: 6, viewer: 7 });
|
|
639
631
|
}
|
|
640
632
|
}
|
|
641
|
-
const
|
|
642
|
-
16 }),
|
|
633
|
+
const Dt = (e) => ({ hovered: e & /*hovered*/
|
|
634
|
+
16 }), Ve = (e) => ({ hovered: (
|
|
643
635
|
/*hovered*/
|
|
644
636
|
e[4]
|
|
645
637
|
) });
|
|
646
|
-
function
|
|
638
|
+
function qe(e) {
|
|
647
639
|
let t, n, o;
|
|
648
640
|
const r = (
|
|
649
641
|
/*#slots*/
|
|
650
642
|
e[8].default
|
|
651
|
-
), i =
|
|
643
|
+
), i = $e(
|
|
652
644
|
r,
|
|
653
645
|
e,
|
|
654
646
|
/*$$scope*/
|
|
655
647
|
e[7],
|
|
656
|
-
|
|
648
|
+
Ve
|
|
657
649
|
);
|
|
658
650
|
return {
|
|
659
651
|
c() {
|
|
660
|
-
t =
|
|
652
|
+
t = Qe("div"), i && i.c(), Z(t, "class", "a9s-tooltip svelte-14kj0as"), Z(t, "style", n = `left:${/*left*/
|
|
661
653
|
e[2]}px; top:${/*top*/
|
|
662
654
|
e[1]}px; position: absolute;`);
|
|
663
655
|
},
|
|
664
|
-
m(
|
|
665
|
-
|
|
656
|
+
m(s, a) {
|
|
657
|
+
F(s, t, a), i && i.m(t, null), o = !0;
|
|
666
658
|
},
|
|
667
|
-
p(
|
|
659
|
+
p(s, a) {
|
|
668
660
|
i && i.p && (!o || a & /*$$scope, hovered*/
|
|
669
|
-
144) &&
|
|
661
|
+
144) && Je(
|
|
670
662
|
i,
|
|
671
663
|
r,
|
|
672
|
-
|
|
664
|
+
s,
|
|
673
665
|
/*$$scope*/
|
|
674
|
-
|
|
675
|
-
o ?
|
|
666
|
+
s[7],
|
|
667
|
+
o ? Ge(
|
|
676
668
|
r,
|
|
677
669
|
/*$$scope*/
|
|
678
|
-
|
|
670
|
+
s[7],
|
|
679
671
|
a,
|
|
680
|
-
|
|
681
|
-
) :
|
|
672
|
+
Dt
|
|
673
|
+
) : Ke(
|
|
682
674
|
/*$$scope*/
|
|
683
|
-
|
|
675
|
+
s[7]
|
|
684
676
|
),
|
|
685
|
-
|
|
677
|
+
Ve
|
|
686
678
|
), (!o || a & /*left, top*/
|
|
687
679
|
6 && n !== (n = `left:${/*left*/
|
|
688
|
-
|
|
689
|
-
|
|
680
|
+
s[2]}px; top:${/*top*/
|
|
681
|
+
s[1]}px; position: absolute;`)) && Z(t, "style", n);
|
|
690
682
|
},
|
|
691
|
-
i(
|
|
692
|
-
o || (
|
|
683
|
+
i(s) {
|
|
684
|
+
o || (D(i, s), o = !0);
|
|
693
685
|
},
|
|
694
|
-
o(
|
|
695
|
-
|
|
686
|
+
o(s) {
|
|
687
|
+
Y(i, s), o = !1;
|
|
696
688
|
},
|
|
697
|
-
d(
|
|
698
|
-
|
|
689
|
+
d(s) {
|
|
690
|
+
s && U(t), i && i.d(s);
|
|
699
691
|
}
|
|
700
692
|
};
|
|
701
693
|
}
|
|
702
|
-
function
|
|
694
|
+
function Pt(e) {
|
|
703
695
|
let t, n, o = (
|
|
704
696
|
/*$hover*/
|
|
705
697
|
e[0] && /*show*/
|
|
706
|
-
e[3] &&
|
|
698
|
+
e[3] && qe(e)
|
|
707
699
|
);
|
|
708
700
|
return {
|
|
709
701
|
c() {
|
|
710
|
-
o && o.c(), t =
|
|
702
|
+
o && o.c(), t = Ee();
|
|
711
703
|
},
|
|
712
704
|
m(r, i) {
|
|
713
|
-
o && o.m(r, i),
|
|
705
|
+
o && o.m(r, i), F(r, t, i), n = !0;
|
|
714
706
|
},
|
|
715
707
|
p(r, [i]) {
|
|
716
708
|
/*$hover*/
|
|
717
709
|
r[0] && /*show*/
|
|
718
710
|
r[3] ? o ? (o.p(r, i), i & /*$hover, show*/
|
|
719
|
-
9 &&
|
|
711
|
+
9 && D(o, 1)) : (o = qe(r), o.c(), D(o, 1), o.m(t.parentNode, t)) : o && (nt(), Y(o, 1, 1, () => {
|
|
720
712
|
o = null;
|
|
721
|
-
}),
|
|
713
|
+
}), ot());
|
|
722
714
|
},
|
|
723
715
|
i(r) {
|
|
724
|
-
n || (
|
|
716
|
+
n || (D(o), n = !0);
|
|
725
717
|
},
|
|
726
718
|
o(r) {
|
|
727
|
-
|
|
719
|
+
Y(o), n = !1;
|
|
728
720
|
},
|
|
729
721
|
d(r) {
|
|
730
|
-
r &&
|
|
722
|
+
r && U(t), o && o.d(r);
|
|
731
723
|
}
|
|
732
724
|
};
|
|
733
725
|
}
|
|
734
|
-
function
|
|
735
|
-
let o, r, { $$slots: i = {}, $$scope:
|
|
736
|
-
const
|
|
737
|
-
|
|
738
|
-
let
|
|
739
|
-
return
|
|
740
|
-
const
|
|
741
|
-
n(3,
|
|
742
|
-
},
|
|
743
|
-
const { offsetX: x, offsetY:
|
|
744
|
-
n(2, m = x), n(1,
|
|
745
|
-
},
|
|
746
|
-
n(3,
|
|
726
|
+
function Ot(e, t, n) {
|
|
727
|
+
let o, r, { $$slots: i = {}, $$scope: s } = t, { container: a } = t;
|
|
728
|
+
const d = mt("anno"), { store: u, hover: y } = d.state;
|
|
729
|
+
We(e, y, (f) => n(0, r = f));
|
|
730
|
+
let g, m, v = !0;
|
|
731
|
+
return et(() => {
|
|
732
|
+
const f = () => {
|
|
733
|
+
n(3, v = !0);
|
|
734
|
+
}, A = (c) => {
|
|
735
|
+
const { offsetX: x, offsetY: C } = c;
|
|
736
|
+
n(2, m = x), n(1, g = C);
|
|
737
|
+
}, w = () => {
|
|
738
|
+
n(3, v = !1);
|
|
747
739
|
};
|
|
748
|
-
return a.addEventListener("pointerenter",
|
|
749
|
-
a.removeEventListener("pointerenter",
|
|
740
|
+
return a.addEventListener("pointerenter", f), a.addEventListener("pointermove", A), a.addEventListener("pointerleave", w), () => {
|
|
741
|
+
a.removeEventListener("pointerenter", f), a.removeEventListener("pointermove", A), a.removeEventListener("pointerleave", w);
|
|
750
742
|
};
|
|
751
|
-
}), e.$$set = (
|
|
752
|
-
"container" in
|
|
743
|
+
}), e.$$set = (f) => {
|
|
744
|
+
"container" in f && n(6, a = f.container), "$$scope" in f && n(7, s = f.$$scope);
|
|
753
745
|
}, e.$$.update = () => {
|
|
754
746
|
e.$$.dirty & /*$hover*/
|
|
755
747
|
1 && n(4, o = r ? u.getAnnotation(r) : void 0);
|
|
756
|
-
}, [r,
|
|
748
|
+
}, [r, g, m, v, o, y, a, s, i];
|
|
757
749
|
}
|
|
758
|
-
class
|
|
750
|
+
class Yt extends Ae {
|
|
759
751
|
constructor(t) {
|
|
760
|
-
super(),
|
|
752
|
+
super(), xe(this, t, Ot, Pt, we, { container: 6 });
|
|
761
753
|
}
|
|
762
754
|
}
|
|
763
755
|
export {
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
756
|
+
Yt as MouseOverTooltip,
|
|
757
|
+
Rt as OpenSeadragonAnnotator,
|
|
758
|
+
Xt as OpenSeadragonPopup,
|
|
759
|
+
Vt as Origin,
|
|
760
|
+
Gt as ShapeType,
|
|
761
|
+
qt as UserSelectAction,
|
|
762
|
+
Jt as W3CImageFormat,
|
|
763
|
+
zt as createAnonymousGuest,
|
|
764
|
+
Wt as createBody,
|
|
765
|
+
Kt as createImageAnnotator,
|
|
766
|
+
$t as defaultColorProvider
|
|
775
767
|
};
|
|
776
768
|
//# sourceMappingURL=annotorious-svelte.es.js.map
|