luo-image-annotator 0.0.15 → 0.0.17

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,19 +1,19 @@
1
1
  var ae = Object.defineProperty;
2
- var le = (w, t, n) => t in w ? ae(w, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : w[t] = n;
3
- var T = (w, t, n) => le(w, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as ct, ref as M, watchEffect as ce, openBlock as v, createElementBlock as m, normalizeClass as X, computed as V, onMounted as kt, nextTick as at, watch as K, createElementVNode as h, toDisplayString as z, Fragment as N, renderList as J, normalizeStyle as U, createCommentVNode as B, createVNode as R, withModifiers as It, createBlock as vt, withDirectives as ft, vModelText as mt, createTextVNode as lt } from "vue";
5
- const pt = (w, t) => Math.sqrt(Math.pow(w.x - t.x, 2) + Math.pow(w.y - t.y, 2)), re = (w, t) => {
2
+ var le = (x, t, n) => t in x ? ae(x, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : x[t] = n;
3
+ var T = (x, t, n) => le(x, typeof t != "symbol" ? t + "" : t, n);
4
+ import { defineComponent as ct, ref as M, watchEffect as ce, openBlock as v, createElementBlock as m, normalizeClass as X, computed as V, onMounted as yt, nextTick as at, watch as K, createElementVNode as h, toDisplayString as z, Fragment as N, renderList as J, normalizeStyle as U, createCommentVNode as B, createVNode as R, withModifiers as It, createBlock as vt, withDirectives as ft, vModelText as mt, createTextVNode as lt } from "vue";
5
+ const pt = (x, t) => Math.sqrt(Math.pow(x.x - t.x, 2) + Math.pow(x.y - t.y, 2)), re = (x, t) => {
6
6
  let n = !1;
7
- for (let e = 0, l = t.length - 1; e < t.length; l = e++) {
8
- const o = t[e].x, c = t[e].y, g = t[l].x, u = t[l].y;
9
- c > w.y != u > w.y && w.x < (g - o) * (w.y - c) / (u - c) + o && (n = !n);
7
+ for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
8
+ const o = t[e].x, c = t[e].y, g = t[a].x, u = t[a].y;
9
+ c > x.y != u > x.y && x.x < (g - o) * (x.y - c) / (u - c) + o && (n = !n);
10
10
  }
11
11
  return n;
12
- }, At = (w, t, n) => {
13
- const e = n * (Math.PI / 180), l = Math.cos(e), o = Math.sin(e), c = w.x - t.x, g = w.y - t.y;
12
+ }, At = (x, t, n) => {
13
+ const e = n * (Math.PI / 180), a = Math.cos(e), o = Math.sin(e), c = x.x - t.x, g = x.y - t.y;
14
14
  return {
15
- x: t.x + (c * l - g * o),
16
- y: t.y + (c * o + g * l)
15
+ x: t.x + (c * a - g * o),
16
+ y: t.y + (c * o + g * a)
17
17
  };
18
18
  };
19
19
  class he {
@@ -89,8 +89,8 @@ class he {
89
89
  zoom(t) {
90
90
  const e = t > 0 ? this.scale * 1.1 : this.scale / 1.1;
91
91
  if (e < 0.1 || e > 10) return;
92
- const l = this.canvas.width / 2, o = this.canvas.height / 2, c = this.toImageCoords(l, o);
93
- this.scale = e, this.offset.x = l - c.x * this.scale, this.offset.y = o - c.y * this.scale, this.clampViewportOffset(), this.render();
92
+ const a = this.canvas.width / 2, o = this.canvas.height / 2, c = this.toImageCoords(a, o);
93
+ this.scale = e, this.offset.x = a - c.x * this.scale, this.offset.y = o - c.y * this.scale, this.clampViewportOffset(), this.render();
94
94
  }
95
95
  resize() {
96
96
  this.fitImageToCanvas(), this.render();
@@ -120,18 +120,18 @@ class he {
120
120
  if (this.img.width === 0 || this.img.height === 0) return;
121
121
  const t = this.img.width * this.scale, n = this.img.height * this.scale, e = 100;
122
122
  if (t <= this.canvas.width) {
123
- const l = -t + e, o = this.canvas.width - e;
124
- this.offset.x = Math.min(o, Math.max(l, this.offset.x));
123
+ const a = -t + e, o = this.canvas.width - e;
124
+ this.offset.x = Math.min(o, Math.max(a, this.offset.x));
125
125
  } else {
126
- const l = this.canvas.width - t - e, o = e;
127
- this.offset.x = Math.min(o, Math.max(l, this.offset.x));
126
+ const a = this.canvas.width - t - e, o = e;
127
+ this.offset.x = Math.min(o, Math.max(a, this.offset.x));
128
128
  }
129
129
  if (n <= this.canvas.height) {
130
- const l = -n + e, o = this.canvas.height - e;
131
- this.offset.y = Math.min(o, Math.max(l, this.offset.y));
130
+ const a = -n + e, o = this.canvas.height - e;
131
+ this.offset.y = Math.min(o, Math.max(a, this.offset.y));
132
132
  } else {
133
- const l = this.canvas.height - n - e, o = e;
134
- this.offset.y = Math.min(o, Math.max(l, this.offset.y));
133
+ const a = this.canvas.height - n - e, o = e;
134
+ this.offset.y = Math.min(o, Math.max(a, this.offset.y));
135
135
  }
136
136
  }
137
137
  // --- 事件处理 ---
@@ -153,19 +153,19 @@ class he {
153
153
  }
154
154
  }
155
155
  handleMouseDown(t) {
156
- const n = this.canvas.getBoundingClientRect(), e = t.clientX - n.left, l = t.clientY - n.top, o = this.toImageCoords(e, l);
156
+ const n = this.canvas.getBoundingClientRect(), e = t.clientX - n.left, a = t.clientY - n.top, o = this.toImageCoords(e, a);
157
157
  if (this.interactionMode === "pan") {
158
- this.isPanning = !0, this.panStartPoint = { x: e, y: l }, this.canvas.style.cursor = "grabbing";
158
+ this.isPanning = !0, this.panStartPoint = { x: e, y: a }, this.canvas.style.cursor = "grabbing";
159
159
  return;
160
160
  }
161
161
  if (this.interactionMode === "select" && this.activeAnnotation) {
162
- const u = this.getHitHandle(e, l, this.activeAnnotation);
162
+ const u = this.getHitHandle(e, a, this.activeAnnotation);
163
163
  if (u !== -100) {
164
164
  this.isDragging = !0, this.dragStartPoint = o, this.selectedHandleIndex = u, this.dragStartAnnotation = JSON.parse(JSON.stringify(this.activeAnnotation));
165
165
  return;
166
166
  }
167
167
  }
168
- const c = this.interactionMode === "select" ? this.getHitCategory(e, l) : null;
168
+ const c = this.interactionMode === "select" ? this.getHitCategory(e, a) : null;
169
169
  if (c) {
170
170
  this.activeAnnotation = c, this.isDragging = !1, this.selectedHandleIndex = -1, this.emit("annotationChange", { action: "select", changedItem: c, imageUrl: this.imageUrl }), this.render();
171
171
  return;
@@ -203,10 +203,10 @@ class he {
203
203
  this.activeAnnotation = null, this.render();
204
204
  }
205
205
  handleMouseMove(t) {
206
- const n = this.canvas.getBoundingClientRect(), e = t.clientX - n.left, l = t.clientY - n.top, o = this.toImageCoords(e, l);
206
+ const n = this.canvas.getBoundingClientRect(), e = t.clientX - n.left, a = t.clientY - n.top, o = this.toImageCoords(e, a);
207
207
  if (this.isPanning && this.panStartPoint) {
208
- const c = e - this.panStartPoint.x, g = l - this.panStartPoint.y;
209
- this.offset.x += c, this.offset.y += g, this.clampViewportOffset(), this.panStartPoint = { x: e, y: l }, this.render();
208
+ const c = e - this.panStartPoint.x, g = a - this.panStartPoint.y;
209
+ this.offset.x += c, this.offset.y += g, this.clampViewportOffset(), this.panStartPoint = { x: e, y: a }, this.render();
210
210
  return;
211
211
  }
212
212
  if (this.lastMouseMovePoint = o, this.isDrawing) {
@@ -219,7 +219,7 @@ class he {
219
219
  this.isHoveringStartPoint = !1;
220
220
  }
221
221
  this.updateDrawing(o);
222
- } else this.isDragging && this.activeAnnotation && this.dragStartPoint ? this.updateDragging(o) : this.checkHover(e, l, o);
222
+ } else this.isDragging && this.activeAnnotation && this.dragStartPoint ? this.updateDragging(o) : this.checkHover(e, a, o);
223
223
  this.render();
224
224
  }
225
225
  handleMouseUp(t) {
@@ -244,8 +244,8 @@ class he {
244
244
  // 辅助函数:将 hex 转换为 rgba
245
245
  hexToRgba(t, n) {
246
246
  if (!t.startsWith("#")) return t;
247
- const e = parseInt(t.slice(1, 3), 16), l = parseInt(t.slice(3, 5), 16), o = parseInt(t.slice(5, 7), 16);
248
- return `rgba(${e}, ${l}, ${o}, ${n})`;
247
+ const e = parseInt(t.slice(1, 3), 16), a = parseInt(t.slice(3, 5), 16), o = parseInt(t.slice(5, 7), 16);
248
+ return `rgba(${e}, ${a}, ${o}, ${n})`;
249
249
  }
250
250
  startDrawing(t) {
251
251
  if (!this.currentTool) return;
@@ -300,8 +300,8 @@ class he {
300
300
  const n = this.activeAnnotation.coordinates;
301
301
  n.x2 = t.x, n.y2 = t.y;
302
302
  } else if (this.activeAnnotation.type === "rotatedRect" && this.dragStartPoint) {
303
- const n = this.activeAnnotation.coordinates, e = Math.abs(t.x - this.dragStartPoint.x), l = Math.abs(t.y - this.dragStartPoint.y);
304
- n.width = e * 2, n.height = l * 2;
303
+ const n = this.activeAnnotation.coordinates, e = Math.abs(t.x - this.dragStartPoint.x), a = Math.abs(t.y - this.dragStartPoint.y);
304
+ n.width = e * 2, n.height = a * 2;
305
305
  } else this.activeAnnotation.type;
306
306
  }
307
307
  finishDrawing() {
@@ -312,8 +312,8 @@ class he {
312
312
  this.activeAnnotation = null, this.isDrawing = !1;
313
313
  return;
314
314
  }
315
- const n = Math.min(t.x1, t.x2), e = Math.max(t.x1, t.x2), l = Math.min(t.y1, t.y2), o = Math.max(t.y1, t.y2);
316
- t.x1 = n, t.x2 = e, t.y1 = l, t.y2 = o, this.annotations.push(this.activeAnnotation), this.emit("annotationChange", { action: "add", changedItem: this.activeAnnotation, imageUrl: this.imageUrl });
315
+ const n = Math.min(t.x1, t.x2), e = Math.max(t.x1, t.x2), a = Math.min(t.y1, t.y2), o = Math.max(t.y1, t.y2);
316
+ t.x1 = n, t.x2 = e, t.y1 = a, t.y2 = o, this.annotations.push(this.activeAnnotation), this.emit("annotationChange", { action: "add", changedItem: this.activeAnnotation, imageUrl: this.imageUrl });
317
317
  } else if (this.activeAnnotation.type === "polygon") {
318
318
  if (this.activeAnnotation.coordinates.points.length < 3) {
319
319
  this.activeAnnotation = null, this.isDrawing = !1;
@@ -337,43 +337,43 @@ class he {
337
337
  const n = t.x - this.dragStartPoint.x, e = t.y - this.dragStartPoint.y;
338
338
  this.selectedHandleIndex === -1 ? this.moveAnnotation(this.activeAnnotation, this.dragStartAnnotation, n, e) : this.resizeAnnotation(this.activeAnnotation, this.dragStartAnnotation, this.selectedHandleIndex, t);
339
339
  }
340
- moveAnnotation(t, n, e, l) {
340
+ moveAnnotation(t, n, e, a) {
341
341
  if (t.type === "rectangle") {
342
342
  const o = n.coordinates, c = t.coordinates;
343
- c.x1 = o.x1 + e, c.x2 = o.x2 + e, c.y1 = o.y1 + l, c.y2 = o.y2 + l;
343
+ c.x1 = o.x1 + e, c.x2 = o.x2 + e, c.y1 = o.y1 + a, c.y2 = o.y2 + a;
344
344
  } else if (t.type === "point") {
345
345
  const o = n.coordinates, c = t.coordinates;
346
- c.points = o.points.map((g) => ({ x: g.x + e, y: g.y + l }));
346
+ c.points = o.points.map((g) => ({ x: g.x + e, y: g.y + a }));
347
347
  } else if (t.type === "rotatedRect") {
348
348
  const o = n.coordinates, c = t.coordinates;
349
- c.x = o.x + e, c.y = o.y + l;
349
+ c.x = o.x + e, c.y = o.y + a;
350
350
  } else if (t.type === "polygon") {
351
351
  const o = n.coordinates, c = t.coordinates;
352
- c.points = o.points.map((g) => ({ x: g.x + e, y: g.y + l }));
352
+ c.points = o.points.map((g) => ({ x: g.x + e, y: g.y + a }));
353
353
  } else if (t.type === "category") {
354
354
  const o = n.coordinates, c = t.coordinates;
355
- o && c && (c.x = o.x + e, c.y = o.y + l);
355
+ o && c && (c.x = o.x + e, c.y = o.y + a);
356
356
  }
357
357
  }
358
- resizeAnnotation(t, n, e, l) {
358
+ resizeAnnotation(t, n, e, a) {
359
359
  if (t.type === "rectangle") {
360
360
  const o = t.coordinates;
361
- e === 0 && (o.x1 = l.x, o.y1 = l.y), e === 1 && (o.x2 = l.x, o.y1 = l.y), e === 2 && (o.x2 = l.x, o.y2 = l.y), e === 3 && (o.x1 = l.x, o.y2 = l.y);
361
+ e === 0 && (o.x1 = a.x, o.y1 = a.y), e === 1 && (o.x2 = a.x, o.y1 = a.y), e === 2 && (o.x2 = a.x, o.y2 = a.y), e === 3 && (o.x1 = a.x, o.y2 = a.y);
362
362
  } else if (t.type === "polygon") {
363
363
  const o = t.coordinates;
364
- e >= 0 && e < o.points.length && (o.points[e] = l);
364
+ e >= 0 && e < o.points.length && (o.points[e] = a);
365
365
  } else if (t.type === "point") {
366
366
  const o = t.coordinates;
367
- e >= 0 && e < o.points.length && (o.points[e] = l);
367
+ e >= 0 && e < o.points.length && (o.points[e] = a);
368
368
  } else if (t.type === "rotatedRect") {
369
369
  const o = t.coordinates;
370
370
  if (e === -2) {
371
- const c = o.x, g = o.y, u = l.x - c, r = l.y - g;
371
+ const c = o.x, g = o.y, u = a.x - c, r = a.y - g;
372
372
  let k = Math.atan2(r, u) * 180 / Math.PI;
373
373
  k += 90, o.angle = k;
374
374
  } else {
375
- const c = o.angle * Math.PI / 180, g = Math.cos(-c), u = Math.sin(-c), r = l.x - o.x, k = l.y - o.y, x = r * g - k * u, D = r * u + k * g;
376
- (e === 0 || e === 3) && (o.width / 2, o.width = Math.abs(x) * 2), (e === 1 || e === 2) && (o.width = Math.abs(x) * 2), (e === 0 || e === 1) && (o.height = Math.abs(D) * 2), (e === 2 || e === 3) && (o.height = Math.abs(D) * 2);
375
+ const c = o.angle * Math.PI / 180, g = Math.cos(-c), u = Math.sin(-c), r = a.x - o.x, k = a.y - o.y, w = r * g - k * u, D = r * u + k * g;
376
+ (e === 0 || e === 3) && (o.width / 2, o.width = Math.abs(w) * 2), (e === 1 || e === 2) && (o.width = Math.abs(w) * 2), (e === 0 || e === 1) && (o.height = Math.abs(D) * 2), (e === 2 || e === 3) && (o.height = Math.abs(D) * 2);
377
377
  }
378
378
  }
379
379
  }
@@ -394,16 +394,16 @@ class he {
394
394
  const e = n.coordinates;
395
395
  return re(t, e.points);
396
396
  } else if (n.type === "rotatedRect") {
397
- const e = n.coordinates, l = At(t, { x: e.x, y: e.y }, -e.angle), o = e.width / 2, c = e.height / 2;
398
- return l.x >= e.x - o && l.x <= e.x + o && l.y >= e.y - c && l.y <= e.y + c;
397
+ const e = n.coordinates, a = At(t, { x: e.x, y: e.y }, -e.angle), o = e.width / 2, c = e.height / 2;
398
+ return a.x >= e.x - o && a.x <= e.x + o && a.y >= e.y - c && a.y <= e.y + c;
399
399
  } else if (n.type === "point")
400
- return n.coordinates.points.some((l) => pt(t, l) < 10 / this.scale);
400
+ return n.coordinates.points.some((a) => pt(t, a) < 10 / this.scale);
401
401
  return !1;
402
402
  }
403
403
  getHitHandle(t, n, e) {
404
- const l = this.getAnnotationHandles(e), o = 6;
405
- for (let c = 0; c < l.length; c++) {
406
- const g = l[c], u = this.toScreenCoords(g.x, g.y);
404
+ const a = this.getAnnotationHandles(e), o = 6;
405
+ for (let c = 0; c < a.length; c++) {
406
+ const g = a[c], u = this.toScreenCoords(g.x, g.y);
407
407
  if (Math.abs(t - u.x) < o && Math.abs(n - u.y) < o)
408
408
  return e.type === "rotatedRect" && c === 4 ? -2 : c;
409
409
  }
@@ -428,16 +428,16 @@ class he {
428
428
  if (t.type === "point")
429
429
  return t.coordinates.points;
430
430
  if (t.type === "rotatedRect") {
431
- const n = t.coordinates, e = { x: n.x, y: n.y }, l = n.width / 2, o = n.height / 2, c = { x: n.x - l, y: n.y - o }, g = { x: n.x + l, y: n.y - o }, u = { x: n.x + l, y: n.y + o }, r = { x: n.x - l, y: n.y + o }, k = { x: n.x, y: n.y - o - 20 / this.scale };
432
- return [c, g, u, r, k].map((x) => At(x, e, n.angle));
431
+ const n = t.coordinates, e = { x: n.x, y: n.y }, a = n.width / 2, o = n.height / 2, c = { x: n.x - a, y: n.y - o }, g = { x: n.x + a, y: n.y - o }, u = { x: n.x + a, y: n.y + o }, r = { x: n.x - a, y: n.y + o }, k = { x: n.x, y: n.y - o - 20 / this.scale };
432
+ return [c, g, u, r, k].map((w) => At(w, e, n.angle));
433
433
  }
434
434
  }
435
435
  return [];
436
436
  }
437
437
  checkHover(t, n, e) {
438
- const l = this.getHitCategory(t, n);
439
- if (l) {
440
- this.canvas.style.cursor = "pointer", this.hoverAnnotation = l;
438
+ const a = this.getHitCategory(t, n);
439
+ if (a) {
440
+ this.canvas.style.cursor = "pointer", this.hoverAnnotation = a;
441
441
  return;
442
442
  }
443
443
  if (this.activeAnnotation && this.getHitHandle(t, n, this.activeAnnotation) !== -100) {
@@ -448,7 +448,11 @@ class he {
448
448
  o ? (this.canvas.style.cursor = "move", this.hoverAnnotation = o) : (this.canvas.style.cursor = "default", this.hoverAnnotation = null);
449
449
  }
450
450
  render() {
451
- this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), this.img.complete && this.img.width > 0 && this.ctx.drawImage(this.img, this.offset.x, this.offset.y, this.img.width * this.scale, this.img.height * this.scale), this.annotations.forEach((t) => {
451
+ if (this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), !this.img.complete || this.img.width === 0) {
452
+ this.ctx.save(), this.ctx.fillStyle = "#999", this.ctx.font = "14px sans-serif", this.ctx.textAlign = "center", this.ctx.textBaseline = "middle", this.ctx.fillText("Loading image...", this.canvas.width / 2, this.canvas.height / 2), this.ctx.restore();
453
+ return;
454
+ }
455
+ this.ctx.drawImage(this.img, this.offset.x, this.offset.y, this.img.width * this.scale, this.img.height * this.scale), this.annotations.forEach((t) => {
452
456
  t !== this.activeAnnotation && this.drawItem(t, !1);
453
457
  }), this.activeAnnotation && this.drawItem(this.activeAnnotation, !0), this.renderCategories();
454
458
  }
@@ -459,24 +463,24 @@ class he {
459
463
  const n = 12;
460
464
  t.forEach((e) => {
461
465
  var _;
462
- const l = e.label || "未命名分类", o = this.ctx.measureText(l).width + n * 2, c = 28, g = this.activeAnnotation === e, u = this.hoverAnnotation === e;
466
+ const a = e.label || "未命名分类", o = this.ctx.measureText(a).width + n * 2, c = 28, g = this.activeAnnotation === e, u = this.hoverAnnotation === e;
463
467
  let r = { x: 20, y: 20 };
464
468
  e.coordinates && typeof e.coordinates.x == "number" && typeof e.coordinates.y == "number" && (r = this.toScreenCoords(e.coordinates.x, e.coordinates.y));
465
- const k = r.x - o / 2, x = r.y - c / 2, D = ((_ = e.style) == null ? void 0 : _.strokeColor) || "#2196F3";
466
- this.ctx.fillStyle = g ? D : this.hexToRgba(D, 0.85), u && !g && (this.ctx.fillStyle = D), g ? (this.ctx.strokeStyle = "#ffffff", this.ctx.lineWidth = 2) : (this.ctx.strokeStyle = "transparent", this.ctx.lineWidth = 0), this.ctx.beginPath(), this.ctx.roundRect(k, x, o, c, 6), this.ctx.fill(), g && (this.ctx.stroke(), this.ctx.save(), this.ctx.strokeStyle = D, this.ctx.lineWidth = 2, this.ctx.strokeRect(k - 3, x - 3, o + 6, c + 6), this.ctx.restore()), this.ctx.fillStyle = "#ffffff", this.ctx.fillText(l, r.x, r.y);
469
+ const k = r.x - o / 2, w = r.y - c / 2, D = ((_ = e.style) == null ? void 0 : _.strokeColor) || "#2196F3";
470
+ this.ctx.fillStyle = g ? D : this.hexToRgba(D, 0.85), u && !g && (this.ctx.fillStyle = D), g ? (this.ctx.strokeStyle = "#ffffff", this.ctx.lineWidth = 2) : (this.ctx.strokeStyle = "transparent", this.ctx.lineWidth = 0), this.ctx.beginPath(), this.ctx.roundRect(k, w, o, c, 6), this.ctx.fill(), g && (this.ctx.stroke(), this.ctx.save(), this.ctx.strokeStyle = D, this.ctx.lineWidth = 2, this.ctx.strokeRect(k - 3, w - 3, o + 6, c + 6), this.ctx.restore()), this.ctx.fillStyle = "#ffffff", this.ctx.fillText(a, r.x, r.y);
467
471
  }), this.ctx.restore();
468
472
  }
469
473
  getHitCategory(t, n) {
470
474
  const e = this.annotations.filter((g) => g.type === "category");
471
475
  if (e.length === 0) return null;
472
476
  this.ctx.save(), this.ctx.font = "14px sans-serif";
473
- const l = 12, o = 28;
477
+ const a = 12, o = 28;
474
478
  let c = null;
475
479
  for (let g = e.length - 1; g >= 0; g--) {
476
- const u = e[g], r = u.label || "未命名分类", k = this.ctx.measureText(r).width + l * 2;
477
- let x = { x: 20, y: 20 };
478
- u.coordinates && typeof u.coordinates.x == "number" && typeof u.coordinates.y == "number" && (x = this.toScreenCoords(u.coordinates.x, u.coordinates.y));
479
- const D = x.x - k / 2, _ = x.y - o / 2;
480
+ const u = e[g], r = u.label || "未命名分类", k = this.ctx.measureText(r).width + a * 2;
481
+ let w = { x: 20, y: 20 };
482
+ u.coordinates && typeof u.coordinates.x == "number" && typeof u.coordinates.y == "number" && (w = this.toScreenCoords(u.coordinates.x, u.coordinates.y));
483
+ const D = w.x - k / 2, _ = w.y - o / 2;
480
484
  if (t >= D && t <= D + k && n >= _ && n <= _ + o) {
481
485
  c = u;
482
486
  break;
@@ -489,10 +493,10 @@ class he {
489
493
  if (this.visibleLabels.size > 0 && !this.visibleLabels.has(t.label) && !n)
490
494
  return;
491
495
  this.ctx.save();
492
- const e = ((o = t.style) == null ? void 0 : o.strokeColor) || "#FF4081", l = n ? "#00E5FF" : e;
493
- if (this.ctx.strokeStyle = l, this.ctx.lineWidth = 2, t.type === "rectangle") {
494
- const c = t.coordinates, g = this.toScreenCoords(c.x1, c.y1), u = this.toScreenCoords(c.x2, c.y2), r = Math.min(g.x, u.x), k = Math.min(g.y, u.y), x = Math.abs(g.x - u.x), D = Math.abs(g.y - u.y);
495
- this.ctx.strokeRect(r, k, x, D), n && this.drawHandles(this.getAnnotationHandles(t));
496
+ const e = ((o = t.style) == null ? void 0 : o.strokeColor) || "#FF4081", a = n ? "#00E5FF" : e;
497
+ if (this.ctx.strokeStyle = a, this.ctx.lineWidth = 2, t.type === "rectangle") {
498
+ const c = t.coordinates, g = this.toScreenCoords(c.x1, c.y1), u = this.toScreenCoords(c.x2, c.y2), r = Math.min(g.x, u.x), k = Math.min(g.y, u.y), w = Math.abs(g.x - u.x), D = Math.abs(g.y - u.y);
499
+ this.ctx.strokeRect(r, k, w, D), n && this.drawHandles(this.getAnnotationHandles(t));
496
500
  } else if (t.type === "polygon") {
497
501
  const c = t.coordinates;
498
502
  if (c.points.length === 0) {
@@ -537,26 +541,26 @@ class he {
537
541
  });
538
542
  }
539
543
  }
540
- const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032114659" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21132" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 391.68c-66.56 0-120.32 54.187-120.32 120.32 0 66.56 53.76 120.32 120.32 120.32 66.133 0 120.32-53.76 120.32-120.32A120.747 120.747 0 0 0 512 391.68z" p-id="21133" fill="#515151"></path><path d="M512 113.493c-219.733 0-398.507 178.774-398.507 398.507S292.267 910.507 512 910.507 910.507 731.733 910.507 512 731.733 113.493 512 113.493z m0 720.214c-177.493 0-321.707-144.214-321.707-321.707S334.507 190.293 512 190.293 833.707 334.507 833.707 512 689.493 833.707 512 833.707z" p-id="21134" fill="#515151"></path></svg>', ge = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M15.7 4.3c.4.4.4 1 0 1.4L9.4 12l6.3 6.3c.4.4.4 1 0 1.4-.4.4-1 .4-1.4 0l-7-7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0z"/></svg>', ue = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032015085" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16560" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M911.872 972.629333l-2.645333-1.621333-209.92-208.554667-91.306667 193.194667-147.029333-494.933333 486.4 179.968-177.834667 68.266666 201.472 200.362667a9.898667 9.898667 0 0 1 2.133333 4.608 10.069333 10.069333 0 0 1-1.024 4.778667l-2.389333 3.157333-47.786667 47.530667a9.813333 9.813333 0 0 1-4.522666 2.901333 12.544 12.544 0 0 1-2.56 0z m-657.066667-12.970666L0.256 501.248l97.109333-175.445333 64.256-115.456L254.805333 42.581333h510.208l259.328 466.858667h-100.608L714.325333 132.778667H305.322667l-204.8 368.384 204.8 368.725333H418.133333v90.026667z" fill="#515151" p-id="16561"></path></svg>', ve = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032973956" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6763" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M613.6 960H97.2c-17.7 0-32-14.3-32-32V98.5c0-17.7 14.3-32 32-32h829.5c17.7 0 32 14.3 32 32v518.2c0 17.7-14.3 32-32 32s-32-14.3-32-32V130.5H129.2V896h484.4c17.7 0 32 14.3 32 32s-14.3 32-32 32z" fill="#515151" p-id="6764"></path><path d="M711.3 694.9l120.3 46.9-100.7 80.7z" fill="#515151" p-id="6765"></path><path d="M707.6 882.1L671.3 645l223.6 87.1-187.3 150z m43.7-137.3l2.8 18 14.2-11.4-17-6.6z" fill="#515151" p-id="6766"></path><path d="M927 957.9c-8.2 0-16.4-3.1-22.6-9.4L723.2 767.2c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l181.2 181.2c12.5 12.5 12.5 32.8 0 45.3-6.3 6.3-14.5 9.5-22.7 9.5z" fill="#515151" p-id="6767"></path></svg>', fe = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M19 6h-4V5c0-1.1-.9-2-2-2h-2c-1.1 0-2 .9-2 2v1H5c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1zM10 5h4v1h-4V5z"/><path fill="currentColor" d="M6 9v10c0 1.7 1.3 3 3 3h6c1.7 0 3-1.3 3-3V9H6zm4 9c0 .6-.4 1-1 1s-1-.4-1-1v-5c0-.6.4-1 1-1s1 .4 1 1v5zm4 0c0 .6-.4 1-1 1s-1-.4-1-1v-5c0-.6.4-1 1-1s1 .4 1 1v5z"/></svg>', me = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M19 15v4c0 1.1-.9 2-2 2H7c-1.1 0-2-.9-2-2v-4c0-.6.4-1 1-1s1 .4 1 1v4h10v-4c0-.6.4-1 1-1s1 .4 1 1zm-7.7 1.3c.2.2.4.3.7.3s.5-.1.7-.3l4.6-4.6c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0l-2.9 2.9V3c0-.6-.4-1-1-1s-1 .4-1 1v8.3l-2.9-2.9c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4l4.6 4.6z"/></svg>', pe = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M3 17.2v4.3c0 .3.2.5.5.5h4.3c.1 0 .3-.1.4-.2l11.1-11.1-5.1-5.1L3.1 16.8c-.1.1-.1.3-.1.4zm18.8-10.9c.4-.4.4-1 0-1.4l-3.7-3.7c-.4-.4-1-.4-1.4 0l-2.3 2.3 5.1 5.1 2.3-2.3z"/></svg>', ye = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M18.7 4.3c.4.4.4 1 0 1.4L12.4 12l6.3 6.3c.4.4.4 1 0 1.4-.4.4-1 .4-1.4 0l-7-7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0z"/><path fill="currentColor" d="M10.7 4.3c.4.4.4 1 0 1.4L4.4 12l6.3 6.3c.4.4.4 1 0 1.4-.4.4-1 .4-1.4 0l-7-7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0z"/></svg>', we = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032412624" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3527" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M870.2976 144.0256l51.2 51.2-122.88 122.88a514.304 514.304 0 0 1 170.7264 193.8688C885.0432 679.04 711.8848 793.6 512 793.6c-56.832 0-111.488-9.2672-162.56-26.3424L197.4016 919.296l-51.2-51.2L870.2976 144.0256z m-127.1552 229.5296l-76.6208 76.6208a166.4 166.4 0 0 1-216.32 216.3712l-38.6048 38.5792c29.5168 6.9632 60.032 10.9312 91.1872 11.5712L512 716.8c150.6816 0 287.488-77.2096 366.464-200.3456l2.816-4.48-2.816-4.48a435.8144 435.8144 0 0 0-135.3216-133.9392zM512 230.4c49.664 0 97.664 7.0656 143.0528 20.2496l-63.8208 63.7696a436.4032 436.4032 0 0 0-70.016-7.1168L512 307.2a434.8928 434.8928 0 0 0-366.464 200.3456l-2.816 4.48 2.816 4.48a435.84 435.84 0 0 0 119.8848 123.776l-55.0912 55.04a514.2528 514.2528 0 0 1-155.648-183.296C138.9312 344.96 312.0896 230.4 512 230.4z m89.5488 284.8l-86.3744 86.2976 1.7408-0.0256a89.6 89.6 0 0 0 84.6336-86.272zM512 345.6a166.656 166.656 0 0 1 42.5728 5.504l-79.0272 79.0272a89.9328 89.9328 0 0 0-45.4144 45.4144l-79.0272 79.0272A166.4 166.4 0 0 1 512 345.6z" p-id="3528" fill="#515151"></path></svg>', xe = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M5.3 19.7c-.4-.4-.4-1 0-1.4l6.3-6.3-6.3-6.3c-.4-.4-.4-1 0-1.4.4-.4 1-.4 1.4 0l7 7c.4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0z"/><path fill="currentColor" d="M13.3 19.7c-.4-.4-.4-1 0-1.4l6.3-6.3-6.3-6.3c-.4-.4-.4-1 0-1.4.4-.4 1-.4 1.4 0l7 7c.4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0z"/></svg>', be = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775031871732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12257" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M174.63 78.98c0.03-12.61 16.41-19.91 25.81-11.5l328.72 293.98 318.27 284.63c10.51 9.4 0.4 26.75-14.25 24.46L435.7 608.43c-6.23-0.97-12.72 1.92-16.16 7.2L199.96 952.72c-8.09 12.42-27.76 8.34-27.72-5.76l1.17-426.97 1.22-441.01z" fill="#515151" p-id="12258"></path></svg>', Ce = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032210611" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23146" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M543.487882 0.00128a161.919393 161.919393 0 0 0-114.55957 47.359822L47.553742 428.991671a162.111392 162.111392 0 0 0 0 229.119141l318.270806 318.398806a161.983393 161.983393 0 0 0 229.119141 0l381.630569-381.694569A162.111392 162.111392 0 0 0 1023.99808 480.255479V161.920673A161.919393 161.919393 0 0 0 861.886688 0.00128H543.487882z m0 90.55966l318.462806 0.064a71.295733 71.295733 0 0 1 71.487732 71.295733v318.270806c0 18.943929-7.615971 37.119861-21.055921 50.559811l-381.56657 381.758568a71.423732 71.423732 0 0 1-101.055621 0L111.489502 594.111052a71.487732 71.487732 0 0 1 0-101.119621l381.566569-381.566569c13.37595-13.37595 31.551882-20.863922 50.431811-20.863922z m112.447578 124.159535a153.023426 153.023426 0 1 0 0 306.046852 153.023426 153.023426 0 0 0 0-306.046852z m57.727784 129.151515a62.463766 62.463766 0 1 1-115.455567 47.807821 62.463766 62.463766 0 0 1 115.455567-47.807821z" p-id="23147" fill="#515151"></path></svg>', _e = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775096284335" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4580" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M308.377435 102.251961C318.982967 47.176334 372.449479 0 448.66303 0c39.496466 0 68.314257 20.040799 85.063685 46.07921 11.995223 18.577967 17.919693 39.935315 20.040799 60.341823 13.384913-4.388496 27.35496-6.582744 41.398147-6.655886 38.911333 0 68.021691 19.455666 85.72196 44.616378 16.822569 23.990446 23.551596 53.100804 23.551596 79.724347v29.988058c0.146283 98.960589 0.292566 197.921178 0.658274 296.954909-0.073142 13.165489 1.097124 26.47726 3.510797 39.569608 8.484426-7.533585 16.237436-15.213453 24.795004-23.69788l13.165488-13.019205c13.970046-13.604338 30.353765-28.598367 49.809432-41.178723 42.056422-27.208676 93.694394-39.642749 162.813209-22.600755 27.574384 6.802169 44.982086 25.380136 54.344211 44.543236 8.776992 18.285401 11.117524 38.545625 10.386108 56.392176-1.38969 33.864562-14.920887 75.26271-43.738679 101.447404l-1.755398 1.755398c-37.375359 36.424518-75.335851 72.263904-113.881477 107.518157-31.450889 28.964075-63.486912 57.050451-96.327491 84.478552-29.037217 24.063587-58.293858 46.51806-80.967755 58.952132A491.511574 491.511574 0 0 1 421.527495 1023.982446a45.567219 45.567219 0 0 1-46.810626-44.25067c0-24.795004 20.699074-44.835803 46.225493-44.762661a395.403507 395.403507 0 0 0 215.036314-64.072045 49.955715 49.955715 0 0 1 4.022788-2.340531c13.458055-7.167877 37.009651-24.502437 67.363417-49.590007 31.597173-26.47726 62.609212-53.612795 92.889836-81.552888a5027.973235 5027.973235 0 0 0 111.687228-105.470192l1.755399-1.755398 0.585133-0.511991 1.682257-1.535974a42.056422 42.056422 0 0 0 9.362125-15.140312c3.291372-8.118718 5.119912-16.749427 5.631903-25.453278a46.07921 46.07921 0 0 0-1.023982-12.580356c-39.715891-8.557568-62.536071-0.658274-81.479746 11.556374a234.126272 234.126272 0 0 0-35.473678 29.841774l-10.386108 10.239824c-9.800975 9.654692-20.845357 20.699074-31.96288 30.500049l-0.146283 0.146283c-19.016817 16.603144-42.787838 31.597173-70.435364 32.182306a74.897002 74.897002 0 0 1-65.096027-35.54682 141.602144 141.602144 0 0 1-18.870534-51.930538 302.074822 302.074822 0 0 1-4.169071-50.613989c-0.365708-99.033731-0.511991-198.213745-0.511992-297.247476v-29.988058c0-13.311772-3.65708-24.136729-7.826151-30.13434a13.896905 13.896905 0 0 0-4.388496-4.388496 7.679868 7.679868 0 0 0-4.022789-0.804558 46.956909 46.956909 0 0 0-28.232658 10.532391 30.719473 30.719473 0 0 0-12.214648 24.721862v232.736582a45.567219 45.567219 0 0 1-46.591201 44.543236 45.567219 45.567219 0 0 1-46.51806-44.616378V124.340726c0-14.628321-3.364514-25.745844-7.094736-31.45089a10.093541 10.093541 0 0 0-2.925664-3.364514 1.901682 1.901682 0 0 0-0.511991-0.292566 9.435267 9.435267 0 0 0-2.340531-0.146283c-38.618767 0-49.443724 23.697879-49.078016 33.791421v1.682256l-0.292567 77.822666v3.876505l-1.023982 253.508797a45.567219 45.567219 0 0 1-46.810626 44.323812 45.567219 45.567219 0 0 1-46.298635-44.68952l1.023983-250.656274a32.036022 32.036022 0 0 0-7.75301-15.140312c-1.82854-1.682257-5.851328-4.827346-17.188277-4.827346a41.178723 41.178723 0 0 0-26.477261 9.069559c-5.558762 4.754204-10.678674 12.580356-10.678674 26.257835v296.589202a45.567219 45.567219 0 0 1-46.518059 44.543236 45.567219 45.567219 0 0 1-46.51806-44.616378v-169.688519a31.158323 31.158323 0 0 0-4.607921-5.705045 11.84894 11.84894 0 0 0-5.193054-3.218231c-1.023982-0.292566-4.681063-1.023982-12.653497 1.462832-17.700268 5.705045-26.111552 14.994029-30.792615 27.208676-5.48562 14.189471-6.582744 35.10797-1.097124 61.438947 42.202705 201.139409 64.949744 301.123981 83.162003 350.34828 16.091153 43.372971 47.615184 81.918596 90.915013 109.566122a43.372971 43.372971 0 0 1 12.872922 61.804654 47.834609 47.834609 0 0 1-64.510894 12.28779c-59.171557-37.741067-103.934218-91.500146-127.046965-153.963075C71.179216 755.406479 46.896203 647.449472 5.571197 449.601435-1.889246 414.127758-3.059512 375.216425 10.471685 340.108455 24.734297 302.806238 54.210364 273.330171 99.265591 258.921276c16.603144-5.558762 34.376554-7.460444 51.784255-5.631904v-29.256641c0-81.18718 67.655983-124.340726 130.265196-124.340726 9.435267 0 18.431684 0.877699 27.062393 2.486815z" p-id="4581" fill="#515151"></path></svg>', ke = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775033156525" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3463" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M694.4 960H195.2C131.7 960 80 908.4 80 845.1V462c0-63.4 51.7-114.9 115.2-114.9h499.2c63.5 0 115.2 51.6 115.2 114.9v383.1c0 63.3-51.7 114.9-115.2 114.9zM195.2 423.7c-21.2 0-38.4 17.2-38.4 38.3v383.1c0 21.1 17.2 38.3 38.4 38.3h499.2c21.2 0 38.4-17.2 38.4-38.3V462c0-21.1-17.2-38.3-38.4-38.3H195.2z" fill="#515151" p-id="3464"></path><path d="M905.6 450.3c-14.8 0-28.9-8.6-35.2-23C788.6 240.8 592.7 213 483.2 213c-21.2 0-38.4-17.2-38.4-38.3s17.2-38.3 38.4-38.3c218.2 0 385 94.9 457.6 260.3 8.5 19.4-0.4 42-19.8 50.5-5 2.1-10.3 3.1-15.4 3.1z" fill="#515151" p-id="3465"></path><path d="M473.6 285.4c-9.8 0-19.7-3.7-27.2-11.2l-72.5-72.4c-15-15-15-39.2 0-54.2l72.5-72.4c15-15 39.3-15 54.3 0s15 39.2 0 54.2l-45.4 45.3 45.4 45.3c15 15 15 39.2 0 54.2-7.4 7.4-17.3 11.2-27.1 11.2z" fill="#515151" p-id="3466"></path></svg>', Ie = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M8.3 19.7c-.4-.4-.4-1 0-1.4l6.3-6.3-6.3-6.3c-.4-.4-.4-1 0-1.4.4-.4 1-.4 1.4 0l7 7c.4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0z"/></svg>', Ae = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032400373" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3314" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 230.4c199.8848 0 373.0176 114.5344 457.344 281.5744C885.0432 679.04 711.8848 793.6 512 793.6c-199.8848 0-373.0176-114.5344-457.344-281.5744C138.9568 344.96 312.1152 230.4 512 230.4z m0 76.8a434.8928 434.8928 0 0 0-366.464 200.3456l-2.816 4.48 2.816 4.48a434.944 434.944 0 0 0 357.248 200.192L512 716.8c150.6816 0 287.488-77.2096 366.464-200.3456l2.816-4.48-2.816-4.48a434.944 434.944 0 0 0-357.248-200.192L512 307.2z m0 38.4a166.4 166.4 0 1 1 0 332.8 166.4 166.4 0 0 1 0-332.8z m0 76.8a89.6 89.6 0 1 0 0 179.2 89.6 89.6 0 0 0 0-179.2z" p-id="3315" fill="#515151"></path></svg>', Se = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032548251" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4695" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M849.7664 778.1376c1.9968 1.4848 3.84 3.072 5.632 4.864l72.3968 72.3968a51.2 51.2 0 1 1-72.3968 72.3968l-72.3968-72.3968a51.6096 51.6096 0 0 1-4.864-5.632 448 448 0 1 1 71.68-71.68zM460.8 460.8V358.4a51.2 51.2 0 1 1 102.4 0v102.4h102.4a51.2 51.2 0 0 1 0 102.4h-102.4v102.4a51.2 51.2 0 0 1-102.4 0v-102.4H358.4a51.2 51.2 0 0 1 0-102.4h102.4z m38.4 384a345.6 345.6 0 1 0 0-691.2 345.6 345.6 0 0 0 0 691.2z" fill="#515151" p-id="4696"></path></svg>', Me = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032629657" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1933" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M849.7664 778.1376c1.9968 1.4848 3.84 3.072 5.632 4.864l72.3968 72.3968a51.2 51.2 0 1 1-72.3968 72.3968l-72.3968-72.3968a51.6096 51.6096 0 0 1-4.864-5.632 448 448 0 1 1 71.68-71.68zM499.2 844.8a345.6 345.6 0 1 0 0-691.2 345.6 345.6 0 0 0 0 691.2zM358.4 563.2a51.2 51.2 0 0 1 0-102.4h307.2a51.2 51.2 0 0 1 0 102.4H358.4z" fill="#666666" p-id="1934"></path></svg>', Te = ["innerHTML"], De = /* @__PURE__ */ ct({
544
+ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032114659" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21132" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 391.68c-66.56 0-120.32 54.187-120.32 120.32 0 66.56 53.76 120.32 120.32 120.32 66.133 0 120.32-53.76 120.32-120.32A120.747 120.747 0 0 0 512 391.68z" p-id="21133" fill="#515151"></path><path d="M512 113.493c-219.733 0-398.507 178.774-398.507 398.507S292.267 910.507 512 910.507 910.507 731.733 910.507 512 731.733 113.493 512 113.493z m0 720.214c-177.493 0-321.707-144.214-321.707-321.707S334.507 190.293 512 190.293 833.707 334.507 833.707 512 689.493 833.707 512 833.707z" p-id="21134" fill="#515151"></path></svg>', ge = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M15.7 4.3c.4.4.4 1 0 1.4L9.4 12l6.3 6.3c.4.4.4 1 0 1.4-.4.4-1 .4-1.4 0l-7-7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0z"/></svg>', ue = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032015085" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16560" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M911.872 972.629333l-2.645333-1.621333-209.92-208.554667-91.306667 193.194667-147.029333-494.933333 486.4 179.968-177.834667 68.266666 201.472 200.362667a9.898667 9.898667 0 0 1 2.133333 4.608 10.069333 10.069333 0 0 1-1.024 4.778667l-2.389333 3.157333-47.786667 47.530667a9.813333 9.813333 0 0 1-4.522666 2.901333 12.544 12.544 0 0 1-2.56 0z m-657.066667-12.970666L0.256 501.248l97.109333-175.445333 64.256-115.456L254.805333 42.581333h510.208l259.328 466.858667h-100.608L714.325333 132.778667H305.322667l-204.8 368.384 204.8 368.725333H418.133333v90.026667z" fill="#515151" p-id="16561"></path></svg>', ve = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032973956" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6763" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M613.6 960H97.2c-17.7 0-32-14.3-32-32V98.5c0-17.7 14.3-32 32-32h829.5c17.7 0 32 14.3 32 32v518.2c0 17.7-14.3 32-32 32s-32-14.3-32-32V130.5H129.2V896h484.4c17.7 0 32 14.3 32 32s-14.3 32-32 32z" fill="#515151" p-id="6764"></path><path d="M711.3 694.9l120.3 46.9-100.7 80.7z" fill="#515151" p-id="6765"></path><path d="M707.6 882.1L671.3 645l223.6 87.1-187.3 150z m43.7-137.3l2.8 18 14.2-11.4-17-6.6z" fill="#515151" p-id="6766"></path><path d="M927 957.9c-8.2 0-16.4-3.1-22.6-9.4L723.2 767.2c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l181.2 181.2c12.5 12.5 12.5 32.8 0 45.3-6.3 6.3-14.5 9.5-22.7 9.5z" fill="#515151" p-id="6767"></path></svg>', fe = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M19 6h-4V5c0-1.1-.9-2-2-2h-2c-1.1 0-2 .9-2 2v1H5c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1zM10 5h4v1h-4V5z"/><path fill="currentColor" d="M6 9v10c0 1.7 1.3 3 3 3h6c1.7 0 3-1.3 3-3V9H6zm4 9c0 .6-.4 1-1 1s-1-.4-1-1v-5c0-.6.4-1 1-1s1 .4 1 1v5zm4 0c0 .6-.4 1-1 1s-1-.4-1-1v-5c0-.6.4-1 1-1s1 .4 1 1v5z"/></svg>', me = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M19 15v4c0 1.1-.9 2-2 2H7c-1.1 0-2-.9-2-2v-4c0-.6.4-1 1-1s1 .4 1 1v4h10v-4c0-.6.4-1 1-1s1 .4 1 1zm-7.7 1.3c.2.2.4.3.7.3s.5-.1.7-.3l4.6-4.6c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0l-2.9 2.9V3c0-.6-.4-1-1-1s-1 .4-1 1v8.3l-2.9-2.9c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4l4.6 4.6z"/></svg>', pe = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M3 17.2v4.3c0 .3.2.5.5.5h4.3c.1 0 .3-.1.4-.2l11.1-11.1-5.1-5.1L3.1 16.8c-.1.1-.1.3-.1.4zm18.8-10.9c.4-.4.4-1 0-1.4l-3.7-3.7c-.4-.4-1-.4-1.4 0l-2.3 2.3 5.1 5.1 2.3-2.3z"/></svg>', ye = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M18.7 4.3c.4.4.4 1 0 1.4L12.4 12l6.3 6.3c.4.4.4 1 0 1.4-.4.4-1 .4-1.4 0l-7-7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0z"/><path fill="currentColor" d="M10.7 4.3c.4.4.4 1 0 1.4L4.4 12l6.3 6.3c.4.4.4 1 0 1.4-.4.4-1 .4-1.4 0l-7-7c-.4-.4-.4-1 0-1.4l7-7c.4-.4 1-.4 1.4 0z"/></svg>', xe = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032412624" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3527" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M870.2976 144.0256l51.2 51.2-122.88 122.88a514.304 514.304 0 0 1 170.7264 193.8688C885.0432 679.04 711.8848 793.6 512 793.6c-56.832 0-111.488-9.2672-162.56-26.3424L197.4016 919.296l-51.2-51.2L870.2976 144.0256z m-127.1552 229.5296l-76.6208 76.6208a166.4 166.4 0 0 1-216.32 216.3712l-38.6048 38.5792c29.5168 6.9632 60.032 10.9312 91.1872 11.5712L512 716.8c150.6816 0 287.488-77.2096 366.464-200.3456l2.816-4.48-2.816-4.48a435.8144 435.8144 0 0 0-135.3216-133.9392zM512 230.4c49.664 0 97.664 7.0656 143.0528 20.2496l-63.8208 63.7696a436.4032 436.4032 0 0 0-70.016-7.1168L512 307.2a434.8928 434.8928 0 0 0-366.464 200.3456l-2.816 4.48 2.816 4.48a435.84 435.84 0 0 0 119.8848 123.776l-55.0912 55.04a514.2528 514.2528 0 0 1-155.648-183.296C138.9312 344.96 312.0896 230.4 512 230.4z m89.5488 284.8l-86.3744 86.2976 1.7408-0.0256a89.6 89.6 0 0 0 84.6336-86.272zM512 345.6a166.656 166.656 0 0 1 42.5728 5.504l-79.0272 79.0272a89.9328 89.9328 0 0 0-45.4144 45.4144l-79.0272 79.0272A166.4 166.4 0 0 1 512 345.6z" p-id="3528" fill="#515151"></path></svg>', we = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M5.3 19.7c-.4-.4-.4-1 0-1.4l6.3-6.3-6.3-6.3c-.4-.4-.4-1 0-1.4.4-.4 1-.4 1.4 0l7 7c.4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0z"/><path fill="currentColor" d="M13.3 19.7c-.4-.4-.4-1 0-1.4l6.3-6.3-6.3-6.3c-.4-.4-.4-1 0-1.4.4-.4 1-.4 1.4 0l7 7c.4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0z"/></svg>', be = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775031871732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="12257" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M174.63 78.98c0.03-12.61 16.41-19.91 25.81-11.5l328.72 293.98 318.27 284.63c10.51 9.4 0.4 26.75-14.25 24.46L435.7 608.43c-6.23-0.97-12.72 1.92-16.16 7.2L199.96 952.72c-8.09 12.42-27.76 8.34-27.72-5.76l1.17-426.97 1.22-441.01z" fill="#515151" p-id="12258"></path></svg>', Ce = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032210611" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23146" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M543.487882 0.00128a161.919393 161.919393 0 0 0-114.55957 47.359822L47.553742 428.991671a162.111392 162.111392 0 0 0 0 229.119141l318.270806 318.398806a161.983393 161.983393 0 0 0 229.119141 0l381.630569-381.694569A162.111392 162.111392 0 0 0 1023.99808 480.255479V161.920673A161.919393 161.919393 0 0 0 861.886688 0.00128H543.487882z m0 90.55966l318.462806 0.064a71.295733 71.295733 0 0 1 71.487732 71.295733v318.270806c0 18.943929-7.615971 37.119861-21.055921 50.559811l-381.56657 381.758568a71.423732 71.423732 0 0 1-101.055621 0L111.489502 594.111052a71.487732 71.487732 0 0 1 0-101.119621l381.566569-381.566569c13.37595-13.37595 31.551882-20.863922 50.431811-20.863922z m112.447578 124.159535a153.023426 153.023426 0 1 0 0 306.046852 153.023426 153.023426 0 0 0 0-306.046852z m57.727784 129.151515a62.463766 62.463766 0 1 1-115.455567 47.807821 62.463766 62.463766 0 0 1 115.455567-47.807821z" p-id="23147" fill="#515151"></path></svg>', _e = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775096284335" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4580" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M308.377435 102.251961C318.982967 47.176334 372.449479 0 448.66303 0c39.496466 0 68.314257 20.040799 85.063685 46.07921 11.995223 18.577967 17.919693 39.935315 20.040799 60.341823 13.384913-4.388496 27.35496-6.582744 41.398147-6.655886 38.911333 0 68.021691 19.455666 85.72196 44.616378 16.822569 23.990446 23.551596 53.100804 23.551596 79.724347v29.988058c0.146283 98.960589 0.292566 197.921178 0.658274 296.954909-0.073142 13.165489 1.097124 26.47726 3.510797 39.569608 8.484426-7.533585 16.237436-15.213453 24.795004-23.69788l13.165488-13.019205c13.970046-13.604338 30.353765-28.598367 49.809432-41.178723 42.056422-27.208676 93.694394-39.642749 162.813209-22.600755 27.574384 6.802169 44.982086 25.380136 54.344211 44.543236 8.776992 18.285401 11.117524 38.545625 10.386108 56.392176-1.38969 33.864562-14.920887 75.26271-43.738679 101.447404l-1.755398 1.755398c-37.375359 36.424518-75.335851 72.263904-113.881477 107.518157-31.450889 28.964075-63.486912 57.050451-96.327491 84.478552-29.037217 24.063587-58.293858 46.51806-80.967755 58.952132A491.511574 491.511574 0 0 1 421.527495 1023.982446a45.567219 45.567219 0 0 1-46.810626-44.25067c0-24.795004 20.699074-44.835803 46.225493-44.762661a395.403507 395.403507 0 0 0 215.036314-64.072045 49.955715 49.955715 0 0 1 4.022788-2.340531c13.458055-7.167877 37.009651-24.502437 67.363417-49.590007 31.597173-26.47726 62.609212-53.612795 92.889836-81.552888a5027.973235 5027.973235 0 0 0 111.687228-105.470192l1.755399-1.755398 0.585133-0.511991 1.682257-1.535974a42.056422 42.056422 0 0 0 9.362125-15.140312c3.291372-8.118718 5.119912-16.749427 5.631903-25.453278a46.07921 46.07921 0 0 0-1.023982-12.580356c-39.715891-8.557568-62.536071-0.658274-81.479746 11.556374a234.126272 234.126272 0 0 0-35.473678 29.841774l-10.386108 10.239824c-9.800975 9.654692-20.845357 20.699074-31.96288 30.500049l-0.146283 0.146283c-19.016817 16.603144-42.787838 31.597173-70.435364 32.182306a74.897002 74.897002 0 0 1-65.096027-35.54682 141.602144 141.602144 0 0 1-18.870534-51.930538 302.074822 302.074822 0 0 1-4.169071-50.613989c-0.365708-99.033731-0.511991-198.213745-0.511992-297.247476v-29.988058c0-13.311772-3.65708-24.136729-7.826151-30.13434a13.896905 13.896905 0 0 0-4.388496-4.388496 7.679868 7.679868 0 0 0-4.022789-0.804558 46.956909 46.956909 0 0 0-28.232658 10.532391 30.719473 30.719473 0 0 0-12.214648 24.721862v232.736582a45.567219 45.567219 0 0 1-46.591201 44.543236 45.567219 45.567219 0 0 1-46.51806-44.616378V124.340726c0-14.628321-3.364514-25.745844-7.094736-31.45089a10.093541 10.093541 0 0 0-2.925664-3.364514 1.901682 1.901682 0 0 0-0.511991-0.292566 9.435267 9.435267 0 0 0-2.340531-0.146283c-38.618767 0-49.443724 23.697879-49.078016 33.791421v1.682256l-0.292567 77.822666v3.876505l-1.023982 253.508797a45.567219 45.567219 0 0 1-46.810626 44.323812 45.567219 45.567219 0 0 1-46.298635-44.68952l1.023983-250.656274a32.036022 32.036022 0 0 0-7.75301-15.140312c-1.82854-1.682257-5.851328-4.827346-17.188277-4.827346a41.178723 41.178723 0 0 0-26.477261 9.069559c-5.558762 4.754204-10.678674 12.580356-10.678674 26.257835v296.589202a45.567219 45.567219 0 0 1-46.518059 44.543236 45.567219 45.567219 0 0 1-46.51806-44.616378v-169.688519a31.158323 31.158323 0 0 0-4.607921-5.705045 11.84894 11.84894 0 0 0-5.193054-3.218231c-1.023982-0.292566-4.681063-1.023982-12.653497 1.462832-17.700268 5.705045-26.111552 14.994029-30.792615 27.208676-5.48562 14.189471-6.582744 35.10797-1.097124 61.438947 42.202705 201.139409 64.949744 301.123981 83.162003 350.34828 16.091153 43.372971 47.615184 81.918596 90.915013 109.566122a43.372971 43.372971 0 0 1 12.872922 61.804654 47.834609 47.834609 0 0 1-64.510894 12.28779c-59.171557-37.741067-103.934218-91.500146-127.046965-153.963075C71.179216 755.406479 46.896203 647.449472 5.571197 449.601435-1.889246 414.127758-3.059512 375.216425 10.471685 340.108455 24.734297 302.806238 54.210364 273.330171 99.265591 258.921276c16.603144-5.558762 34.376554-7.460444 51.784255-5.631904v-29.256641c0-81.18718 67.655983-124.340726 130.265196-124.340726 9.435267 0 18.431684 0.877699 27.062393 2.486815z" p-id="4581" fill="#515151"></path></svg>', ke = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775033156525" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3463" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M694.4 960H195.2C131.7 960 80 908.4 80 845.1V462c0-63.4 51.7-114.9 115.2-114.9h499.2c63.5 0 115.2 51.6 115.2 114.9v383.1c0 63.3-51.7 114.9-115.2 114.9zM195.2 423.7c-21.2 0-38.4 17.2-38.4 38.3v383.1c0 21.1 17.2 38.3 38.4 38.3h499.2c21.2 0 38.4-17.2 38.4-38.3V462c0-21.1-17.2-38.3-38.4-38.3H195.2z" fill="#515151" p-id="3464"></path><path d="M905.6 450.3c-14.8 0-28.9-8.6-35.2-23C788.6 240.8 592.7 213 483.2 213c-21.2 0-38.4-17.2-38.4-38.3s17.2-38.3 38.4-38.3c218.2 0 385 94.9 457.6 260.3 8.5 19.4-0.4 42-19.8 50.5-5 2.1-10.3 3.1-15.4 3.1z" fill="#515151" p-id="3465"></path><path d="M473.6 285.4c-9.8 0-19.7-3.7-27.2-11.2l-72.5-72.4c-15-15-15-39.2 0-54.2l72.5-72.4c15-15 39.3-15 54.3 0s15 39.2 0 54.2l-45.4 45.3 45.4 45.3c15 15 15 39.2 0 54.2-7.4 7.4-17.3 11.2-27.1 11.2z" fill="#515151" p-id="3466"></path></svg>', Ie = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M8.3 19.7c-.4-.4-.4-1 0-1.4l6.3-6.3-6.3-6.3c-.4-.4-.4-1 0-1.4.4-.4 1-.4 1.4 0l7 7c.4.4.4 1 0 1.4l-7 7c-.4.4-1 .4-1.4 0z"/></svg>', Ae = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032400373" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3314" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 230.4c199.8848 0 373.0176 114.5344 457.344 281.5744C885.0432 679.04 711.8848 793.6 512 793.6c-199.8848 0-373.0176-114.5344-457.344-281.5744C138.9568 344.96 312.1152 230.4 512 230.4z m0 76.8a434.8928 434.8928 0 0 0-366.464 200.3456l-2.816 4.48 2.816 4.48a434.944 434.944 0 0 0 357.248 200.192L512 716.8c150.6816 0 287.488-77.2096 366.464-200.3456l2.816-4.48-2.816-4.48a434.944 434.944 0 0 0-357.248-200.192L512 307.2z m0 38.4a166.4 166.4 0 1 1 0 332.8 166.4 166.4 0 0 1 0-332.8z m0 76.8a89.6 89.6 0 1 0 0 179.2 89.6 89.6 0 0 0 0-179.2z" p-id="3315" fill="#515151"></path></svg>', Se = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032548251" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4695" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M849.7664 778.1376c1.9968 1.4848 3.84 3.072 5.632 4.864l72.3968 72.3968a51.2 51.2 0 1 1-72.3968 72.3968l-72.3968-72.3968a51.6096 51.6096 0 0 1-4.864-5.632 448 448 0 1 1 71.68-71.68zM460.8 460.8V358.4a51.2 51.2 0 1 1 102.4 0v102.4h102.4a51.2 51.2 0 0 1 0 102.4h-102.4v102.4a51.2 51.2 0 0 1-102.4 0v-102.4H358.4a51.2 51.2 0 0 1 0-102.4h102.4z m38.4 384a345.6 345.6 0 1 0 0-691.2 345.6 345.6 0 0 0 0 691.2z" fill="#515151" p-id="4696"></path></svg>', Me = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1775032629657" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1933" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M849.7664 778.1376c1.9968 1.4848 3.84 3.072 5.632 4.864l72.3968 72.3968a51.2 51.2 0 1 1-72.3968 72.3968l-72.3968-72.3968a51.6096 51.6096 0 0 1-4.864-5.632 448 448 0 1 1 71.68-71.68zM499.2 844.8a345.6 345.6 0 1 0 0-691.2 345.6 345.6 0 0 0 0 691.2zM358.4 563.2a51.2 51.2 0 0 1 0-102.4h307.2a51.2 51.2 0 0 1 0 102.4H358.4z" fill="#666666" p-id="1934"></path></svg>', Te = ["innerHTML"], De = /* @__PURE__ */ ct({
541
545
  __name: "SvgIcon",
542
546
  props: {
543
547
  name: {},
544
548
  size: {}
545
549
  },
546
- setup(w) {
547
- const t = w, n = M(""), e = /* @__PURE__ */ Object.assign({ "../assets/svg/aim.svg": de, "../assets/svg/back.svg": ge, "../assets/svg/connection.svg": ue, "../assets/svg/crop.svg": ve, "../assets/svg/delete.svg": fe, "../assets/svg/download.svg": me, "../assets/svg/edit.svg": pe, "../assets/svg/first.svg": ye, "../assets/svg/hide.svg": we, "../assets/svg/last.svg": xe, "../assets/svg/pointer.svg": be, "../assets/svg/price-tag.svg": Ce, "../assets/svg/rank.svg": _e, "../assets/svg/refresh-right.svg": ke, "../assets/svg/right.svg": Ie, "../assets/svg/view.svg": Ae, "../assets/svg/zoom-in.svg": Se, "../assets/svg/zoom-out.svg": Me });
550
+ setup(x) {
551
+ const t = x, n = M(""), e = /* @__PURE__ */ Object.assign({ "../assets/svg/aim.svg": de, "../assets/svg/back.svg": ge, "../assets/svg/connection.svg": ue, "../assets/svg/crop.svg": ve, "../assets/svg/delete.svg": fe, "../assets/svg/download.svg": me, "../assets/svg/edit.svg": pe, "../assets/svg/first.svg": ye, "../assets/svg/hide.svg": xe, "../assets/svg/last.svg": we, "../assets/svg/pointer.svg": be, "../assets/svg/price-tag.svg": Ce, "../assets/svg/rank.svg": _e, "../assets/svg/refresh-right.svg": ke, "../assets/svg/right.svg": Ie, "../assets/svg/view.svg": Ae, "../assets/svg/zoom-in.svg": Se, "../assets/svg/zoom-out.svg": Me });
548
552
  return ce(() => {
549
- const l = `../assets/svg/${t.name}.svg`, o = e[l];
550
- o ? n.value = o : (console.warn(`Icon ${t.name} not found at path ${l}`), n.value = "");
551
- }), (l, o) => (v(), m("i", {
552
- class: X(["svg-icon", [w.size ? `size-${w.size}` : ""]]),
553
+ const a = `../assets/svg/${t.name}.svg`, o = e[a];
554
+ o ? n.value = o : (console.warn(`Icon ${t.name} not found at path ${a}`), n.value = "");
555
+ }), (a, o) => (v(), m("i", {
556
+ class: X(["svg-icon", [x.size ? `size-${x.size}` : ""]]),
553
557
  innerHTML: n.value
554
558
  }, null, 10, Te));
555
559
  }
556
- }), rt = (w, t) => {
557
- const n = w.__vccOpts || w;
558
- for (const [e, l] of t)
559
- n[e] = l;
560
+ }), rt = (x, t) => {
561
+ const n = x.__vccOpts || x;
562
+ for (const [e, a] of t)
563
+ n[e] = a;
560
564
  return n;
561
565
  }, L = /* @__PURE__ */ rt(De, [["__scopeId", "data-v-3928607b"]]), Pe = {
562
566
  key: 0,
@@ -596,7 +600,7 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
596
600
  }, ts = ["disabled"], es = ["disabled"], ss = ["disabled"], is = ["disabled"], ns = {
597
601
  key: 1,
598
602
  class: "right-sidebar"
599
- }, os = { class: "label-list" }, as = { class: "label-row" }, ls = ["onUpdate:modelValue", "onChange"], cs = ["title"], rs = ["onClick"], hs = { class: "action-icon more-actions" }, ds = ["onClick"], gs = { class: "modal-content" }, us = { class: "modal-body" }, vs = { class: "form-group" }, fs = { class: "form-group" }, ms = { class: "color-input-wrapper" }, ps = { class: "color-value" }, ys = { class: "modal-actions" }, ws = ["disabled"], xs = /* @__PURE__ */ ct({
603
+ }, os = { class: "label-list" }, as = { class: "label-row" }, ls = ["onUpdate:modelValue", "onChange"], cs = ["title"], rs = ["onClick"], hs = { class: "action-icon more-actions" }, ds = ["onClick"], gs = { class: "modal-content" }, us = { class: "modal-body" }, vs = { class: "form-group" }, fs = { class: "form-group" }, ms = { class: "color-input-wrapper" }, ps = { class: "color-value" }, ys = { class: "modal-actions" }, xs = ["disabled"], ws = /* @__PURE__ */ ct({
600
604
  __name: "ImageAnnotator",
601
605
  props: {
602
606
  annotationTypes: { default: () => ["rectangle", "polygon", "point", "rotatedRect", "category"] },
@@ -613,13 +617,13 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
613
617
  maxZoom: {}
614
618
  },
615
619
  emits: ["annotationChange", "batchChange", "labelChange", "ready", "error", "tool:change", "viewport:change", "annotation:add", "annotation:update", "annotation:delete", "annotation:select", "prediction:loaded", "prediction:apply", "prediction:reject"],
616
- setup(w, { expose: t, emit: n }) {
617
- const e = w, l = n, o = M(null), c = M(null), g = M(null), u = M([]), r = M(null), k = M(null), x = M(0), D = M(""), _ = M([]), $ = M(""), q = M(!1), C = M({ name: "", color: "#FF0000" }), S = M("none"), p = M([]), H = M({}), O = V(() => k.value === "select" && !!D.value), G = M(!1), Z = V(() => _.value.find((s) => s.id === $.value)), yt = (s) => {
620
+ setup(x, { expose: t, emit: n }) {
621
+ const e = x, a = n, o = M(null), c = M(null), g = M(null), u = M([]), r = M(null), k = M(null), w = M(0), D = M(""), _ = M([]), $ = M(""), q = M(!1), C = M({ name: "", color: "#FF0000" }), S = M("none"), p = M([]), H = M({}), O = V(() => k.value === "select" && !!D.value), G = M(!1), Z = V(() => _.value.find((s) => s.id === $.value)), xt = (s) => {
618
622
  s.stopPropagation(), G.value = !G.value;
619
623
  }, wt = (s) => {
620
624
  tt(s), G.value = !1;
621
625
  };
622
- kt(() => {
626
+ yt(() => {
623
627
  document.addEventListener("click", (s) => {
624
628
  s.target.closest(".floating-label-selector") || (G.value = !1);
625
629
  });
@@ -628,10 +632,10 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
628
632
  if (!s || H.value[s]) return;
629
633
  const i = new Image();
630
634
  i.onload = () => {
631
- const a = i.naturalWidth || 1, d = i.naturalHeight || 1;
635
+ const l = i.naturalWidth || 1, d = i.naturalHeight || 1;
632
636
  H.value = {
633
637
  ...H.value,
634
- [s]: { width: a, height: d }
638
+ [s]: { width: l, height: d }
635
639
  };
636
640
  }, i.src = s;
637
641
  }, nt = () => {
@@ -640,10 +644,10 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
640
644
  });
641
645
  }, ht = (s, i) => {
642
646
  u.value[i] = s;
643
- }, Q = (s = x.value) => {
644
- const i = g.value, a = u.value[s];
645
- if (!i || !a) return;
646
- const d = i.scrollTop, f = d + i.clientHeight, A = a.offsetTop, P = A + a.offsetHeight;
647
+ }, Q = (s = w.value) => {
648
+ const i = g.value, l = u.value[s];
649
+ if (!i || !l) return;
650
+ const d = i.scrollTop, f = d + i.clientHeight, A = l.offsetTop, P = A + l.offsetHeight;
647
651
  if (A < d) {
648
652
  i.scrollTo({
649
653
  top: Math.max(A - 8, 0),
@@ -656,8 +660,8 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
656
660
  behavior: "smooth"
657
661
  });
658
662
  }, j = () => {
659
- var a, d, f, A;
660
- const s = e.batchImages[x.value], i = (s == null ? void 0 : s.imageUrl) || ((a = e.image) == null ? void 0 : a.url);
663
+ var l, d, f, A;
664
+ const s = e.batchImages[w.value], i = (s == null ? void 0 : s.imageUrl) || ((l = e.image) == null ? void 0 : l.url);
661
665
  return {
662
666
  eventId: `${Date.now()}-${Math.random().toString(36).slice(2, 10)}`,
663
667
  timestamp: Date.now(),
@@ -670,13 +674,13 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
670
674
  var d;
671
675
  const i = s == null ? void 0 : s.action;
672
676
  if (!i) return;
673
- const a = {
677
+ const l = {
674
678
  meta: j(),
675
679
  action: i,
676
680
  current: s == null ? void 0 : s.changedItem,
677
681
  source: (d = s == null ? void 0 : s.changedItem) != null && d.predictionId ? "prediction" : "manual"
678
682
  };
679
- i === "add" && l("annotation:add", a), i === "update" && l("annotation:update", a), i === "delete" && l("annotation:delete", a), i === "select" && l("annotation:select", a);
683
+ i === "add" && a("annotation:add", l), i === "update" && a("annotation:update", l), i === "delete" && a("annotation:delete", l), i === "select" && a("annotation:select", l);
680
684
  }, b = V(() => e.annotationTypes), I = (s) => ({
681
685
  rectangle: "crop",
682
686
  polygon: "connection",
@@ -690,28 +694,28 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
690
694
  rotatedRect: "旋转矩形",
691
695
  category: "分类标签"
692
696
  })[s] || s;
693
- kt(() => {
697
+ yt(() => {
694
698
  if (nt(), o.value) {
695
699
  r.value = new he(o.value), r.value.on("annotationChange", (i) => {
696
- var a, d;
700
+ var l, d;
697
701
  if (i.action === "add" && i.changedItem) {
698
702
  const f = _.value.find((A) => A.id === $.value);
699
703
  f && (i.changedItem.label = f.name, i.changedItem.labelId = f.id);
700
704
  }
701
- i.action === "select" ? D.value = ((a = i.changedItem) == null ? void 0 : a.id) || "" : i.action === "delete" && ((d = i.changedItem) == null ? void 0 : d.id) === D.value && (D.value = ""), l("annotationChange", i), y(i);
705
+ i.action === "select" ? D.value = ((l = i.changedItem) == null ? void 0 : l.id) || "" : i.action === "delete" && ((d = i.changedItem) == null ? void 0 : d.id) === D.value && (D.value = ""), a("annotationChange", i), y(i);
702
706
  }), W(), E();
703
707
  const s = new ResizeObserver(() => {
704
708
  var i;
705
709
  (i = r.value) == null || i.resize();
706
710
  });
707
- c.value && s.observe(c.value), e.defaultActiveType && Y(e.defaultActiveType), at(() => Q()), l("ready", { meta: j() });
711
+ c.value && s.observe(c.value), e.defaultActiveType && Y(e.defaultActiveType), at(() => Q()), a("ready", { meta: j() });
708
712
  }
709
713
  });
710
714
  const E = () => {
711
715
  if (!r.value) return;
712
- const s = _.value.find((a) => a.id === $.value);
716
+ const s = _.value.find((l) => l.id === $.value);
713
717
  s && r.value.setLabelStyle(s.color);
714
- const i = _.value.filter((a) => a.visible).map((a) => a.name);
718
+ const i = _.value.filter((l) => l.visible).map((l) => l.name);
715
719
  r.value.setVisibleLabels(i);
716
720
  }, W = () => {
717
721
  var s;
@@ -720,31 +724,31 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
720
724
  var i;
721
725
  (i = r.value) == null || i.resize();
722
726
  }), e.batchImages.length > 0) {
723
- const i = e.batchImages[x.value];
727
+ const i = e.batchImages[w.value];
724
728
  r.value.loadImage(i.imageUrl), i.annotations ? r.value.setAnnotations(i.annotations) : r.value.setAnnotations([]);
725
729
  } else (s = e.image) != null && s.url && r.value.loadImage(e.image.url);
726
730
  }, Y = (s) => {
727
- var i, a;
731
+ var i, l;
728
732
  if (k.value = s, D.value = "", s !== "pan" && s !== "select" && _.value.length === 0) {
729
733
  alert("请先创建标签!");
730
734
  return;
731
735
  }
732
- s === "pan" || s === "select" ? (i = r.value) == null || i.setTool(s) : (a = r.value) == null || a.setTool(s), l("tool:change", { meta: j(), tool: s });
736
+ s === "pan" || s === "select" ? (i = r.value) == null || i.setTool(s) : (l = r.value) == null || l.setTool(s), a("tool:change", { meta: j(), tool: s });
733
737
  }, St = () => {
734
738
  var s;
735
739
  (s = r.value) != null && s.activeAnnotation && r.value.deleteAnnotation(r.value.activeAnnotation.id);
736
- }, xt = () => {
737
- r.value && l("viewport:change", {
740
+ }, bt = () => {
741
+ r.value && a("viewport:change", {
738
742
  meta: j(),
739
743
  scale: r.value.scale,
740
744
  offset: { ...r.value.offset }
741
745
  });
742
746
  }, Mt = () => {
743
747
  var s;
744
- (s = r.value) == null || s.zoom(1), xt();
748
+ (s = r.value) == null || s.zoom(1), bt();
745
749
  }, Tt = () => {
746
750
  var s;
747
- (s = r.value) == null || s.zoom(-1), xt();
751
+ (s = r.value) == null || s.zoom(-1), bt();
748
752
  }, Dt = () => {
749
753
  C.value = { name: "", color: "#2196F3" }, q.value = !0;
750
754
  }, dt = () => {
@@ -760,65 +764,65 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
760
764
  color: C.value.color,
761
765
  visible: !0
762
766
  };
763
- _.value.push(i), l("labelChange", _.value), E(), _.value.length === 1 && tt(i), dt();
767
+ _.value.push(i), a("labelChange", _.value), E(), _.value.length === 1 && tt(i), dt();
764
768
  }, tt = (s) => {
765
769
  var i;
766
770
  $.value = s.id, (i = r.value) == null || i.setLabelStyle(s.color);
767
771
  }, zt = (s, i) => {
768
772
  if (!s.startsWith("#")) return s;
769
- let a = 0, d = 0, f = 0;
770
- return s.length === 4 ? (a = parseInt(s[1] + s[1], 16), d = parseInt(s[2] + s[2], 16), f = parseInt(s[3] + s[3], 16)) : s.length === 7 && (a = parseInt(s.slice(1, 3), 16), d = parseInt(s.slice(3, 5), 16), f = parseInt(s.slice(5, 7), 16)), `rgba(${a}, ${d}, ${f}, ${i})`;
773
+ let l = 0, d = 0, f = 0;
774
+ return s.length === 4 ? (l = parseInt(s[1] + s[1], 16), d = parseInt(s[2] + s[2], 16), f = parseInt(s[3] + s[3], 16)) : s.length === 7 && (l = parseInt(s.slice(1, 3), 16), d = parseInt(s.slice(3, 5), 16), f = parseInt(s.slice(5, 7), 16)), `rgba(${l}, ${d}, ${f}, ${i})`;
771
775
  }, $t = (s) => {
772
776
  var i;
773
777
  if (s.id === $.value && ((i = r.value) == null || i.setLabelStyle(s.color)), r.value) {
774
- const a = r.value.getAnnotations();
778
+ const l = r.value.getAnnotations();
775
779
  let d = !1;
776
- a.forEach((f) => {
780
+ l.forEach((f) => {
777
781
  f.label === s.name && (f.style || (f.style = {}), f.style.strokeColor = s.color, f.style.fillColor = zt(s.color, 0.2), d = !0);
778
782
  }), d && r.value.render();
779
783
  }
780
- l("labelChange", _.value), E();
784
+ a("labelChange", _.value), E();
781
785
  }, Lt = (s) => {
782
786
  s.visible = !s.visible, E();
783
787
  }, Bt = (s) => {
784
- const i = _.value.findIndex((a) => a.id === s);
785
- i > -1 && (_.value.splice(i, 1), l("labelChange", _.value), $.value === s && ($.value = _.value.length > 0 ? _.value[0].id : "", $.value && tt(_.value[0])), E());
788
+ const i = _.value.findIndex((l) => l.id === s);
789
+ i > -1 && (_.value.splice(i, 1), a("labelChange", _.value), $.value === s && ($.value = _.value.length > 0 ? _.value[0].id : "", $.value && tt(_.value[0])), E());
786
790
  };
787
791
  K(() => e.labels, (s) => {
788
792
  const i = JSON.parse(JSON.stringify(s || []));
789
793
  if (_.value = i, _.value.length > 0)
790
- if (!$.value || !_.value.find((a) => a.id === $.value))
794
+ if (!$.value || !_.value.find((l) => l.id === $.value))
791
795
  tt(_.value[0]);
792
796
  else {
793
- const a = _.value.find((d) => d.id === $.value);
794
- a && tt(a);
797
+ const l = _.value.find((d) => d.id === $.value);
798
+ l && tt(l);
795
799
  }
796
800
  else
797
801
  $.value = "";
798
802
  E();
799
803
  }, { immediate: !0, deep: !0 });
800
804
  const Rt = () => {
801
- x.value > 0 && (gt(), x.value--, W(), ut());
805
+ w.value > 0 && (gt(), w.value--, W(), ut());
802
806
  }, Ht = () => {
803
- x.value < e.batchImages.length - 1 && (gt(), x.value++, W(), ut());
807
+ w.value < e.batchImages.length - 1 && (gt(), w.value++, W(), ut());
804
808
  }, Et = () => {
805
- x.value > 0 && ot(0);
809
+ w.value > 0 && ot(0);
806
810
  }, Ut = () => {
807
- x.value < e.batchImages.length - 1 && ot(e.batchImages.length - 1);
811
+ w.value < e.batchImages.length - 1 && ot(e.batchImages.length - 1);
808
812
  }, gt = () => {
809
813
  if (r.value) {
810
814
  const s = r.value.getAnnotations();
811
- e.batchImages[x.value].annotations = s;
815
+ e.batchImages[w.value].annotations = s;
812
816
  }
813
817
  }, ut = () => {
814
- const s = e.batchImages[x.value];
815
- l("batchChange", {
816
- currentIndex: x.value,
818
+ const s = e.batchImages[w.value];
819
+ a("batchChange", {
820
+ currentIndex: w.value,
817
821
  total: e.batchImages.length,
818
822
  currentImageUrl: s.imageUrl,
819
823
  currentAnnotations: s.annotations || []
820
824
  });
821
- }, bt = (s = []) => {
825
+ }, Ct = (s = []) => {
822
826
  var f;
823
827
  if (!r.value) return;
824
828
  if (p.value = JSON.parse(JSON.stringify(s)), p.value.length === 0) {
@@ -826,11 +830,11 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
826
830
  return;
827
831
  }
828
832
  S.value = "loaded";
829
- const a = (r.value.getAnnotations() || []).filter((A) => !A.predictionId), d = p.value.map((A) => {
833
+ const l = (r.value.getAnnotations() || []).filter((A) => !A.predictionId), d = p.value.map((A) => {
830
834
  const P = JSON.parse(JSON.stringify(A.annotation));
831
835
  return P.id = P.id || `pred-${A.id}`, P.predictionId = A.id, P.modelRunId = A.modelRunId || P.modelRunId, P.confidence = A.confidence ?? P.confidence, P.reviewStatus = P.reviewStatus || "draft", P;
832
836
  });
833
- r.value.setAnnotations([...a, ...d]), l("prediction:loaded", {
837
+ r.value.setAnnotations([...l, ...d]), a("prediction:loaded", {
834
838
  meta: j(),
835
839
  modelRunId: (f = p.value[0]) == null ? void 0 : f.modelRunId,
836
840
  candidates: p.value
@@ -842,7 +846,7 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
842
846
  const d = (r.value.getAnnotations() || []).filter((A) => A.predictionId && s.includes(A.predictionId));
843
847
  return d.forEach((A) => {
844
848
  A.reviewStatus = "accepted";
845
- }), S.value = "applied", l("prediction:apply", {
849
+ }), S.value = "applied", a("prediction:apply", {
846
850
  meta: j(),
847
851
  modelRunId: (f = d[0]) == null ? void 0 : f.modelRunId,
848
852
  candidateIds: s,
@@ -852,10 +856,10 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
852
856
  }, Ot = (s, i) => {
853
857
  var f;
854
858
  if (!r.value) return;
855
- const a = r.value.getAnnotations() || [], d = a.filter((A) => !(A.predictionId && s.includes(A.predictionId)));
856
- r.value.setAnnotations(d), l("prediction:reject", {
859
+ const l = r.value.getAnnotations() || [], d = l.filter((A) => !(A.predictionId && s.includes(A.predictionId)));
860
+ r.value.setAnnotations(d), a("prediction:reject", {
857
861
  meta: j(),
858
- modelRunId: (f = a.find((A) => A.predictionId && s.includes(A.predictionId))) == null ? void 0 : f.modelRunId,
862
+ modelRunId: (f = l.find((A) => A.predictionId && s.includes(A.predictionId))) == null ? void 0 : f.modelRunId,
859
863
  candidateIds: s,
860
864
  reason: i
861
865
  });
@@ -864,40 +868,40 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
864
868
  }, Nt = (s) => {
865
869
  var i;
866
870
  (i = r.value) == null || i.setAnnotations(s);
867
- }, Ct = () => {
871
+ }, _t = () => {
868
872
  var s;
869
873
  return ((s = r.value) == null ? void 0 : s.getAnnotations()) || [];
870
874
  }, Wt = (s = "json") => {
871
- var a, d;
872
- const i = Ct();
875
+ var l, d;
876
+ const i = _t();
873
877
  return {
874
878
  format: s,
875
- image: ((a = e.batchImages[x.value]) == null ? void 0 : a.imageUrl) || ((d = e.image) == null ? void 0 : d.url) || "",
879
+ image: ((l = e.batchImages[w.value]) == null ? void 0 : l.imageUrl) || ((d = e.image) == null ? void 0 : d.url) || "",
876
880
  annotations: i
877
881
  };
878
882
  }, ot = (s) => {
879
- s >= 0 && s < e.batchImages.length && (gt(), x.value = s, W(), ut());
883
+ s >= 0 && s < e.batchImages.length && (gt(), w.value = s, W(), ut());
880
884
  }, Gt = (s) => {
881
885
  var i;
882
- return s === x.value && r.value ? r.value.getAnnotations() || [] : ((i = e.batchImages[s]) == null ? void 0 : i.annotations) || [];
886
+ return s === w.value && r.value ? r.value.getAnnotations() || [] : ((i = e.batchImages[s]) == null ? void 0 : i.annotations) || [];
883
887
  }, Yt = (s) => s.type === "rectangle", Jt = (s) => s.type === "polygon", jt = (s) => s.type === "point", Xt = (s) => s.type === "rotatedRect", qt = (s) => s.type === "category", et = (s) => {
884
- var a, d;
885
- const i = (a = _.value.find((f) => f.name === s.label)) == null ? void 0 : a.color;
888
+ var l, d;
889
+ const i = (l = _.value.find((f) => f.name === s.label)) == null ? void 0 : l.color;
886
890
  return ((d = s.style) == null ? void 0 : d.strokeColor) || i || "#409eff";
887
- }, _t = (s) => {
891
+ }, kt = (s) => {
888
892
  const i = s.coordinates;
889
893
  return (i == null ? void 0 : i.points) || [];
890
894
  }, st = (s) => {
891
895
  const i = e.batchImages[s];
892
896
  if (i != null && i.width && (i != null && i.height))
893
897
  return { width: i.width, height: i.height };
894
- const a = i != null && i.imageUrl ? H.value[i.imageUrl] : void 0;
895
- return a || (i != null && i.imageUrl && it(i.imageUrl), { width: 1, height: 1 });
898
+ const l = i != null && i.imageUrl ? H.value[i.imageUrl] : void 0;
899
+ return l || (i != null && i.imageUrl && it(i.imageUrl), { width: 1, height: 1 });
896
900
  }, Kt = (s) => {
897
901
  const i = e.batchImages[s];
898
902
  return i != null && i.width && (i != null && i.height) ? !0 : i != null && i.imageUrl ? !!H.value[i.imageUrl] : !1;
899
903
  }, Zt = (s, i) => {
900
- const a = i.coordinates, d = st(s), f = et(i), A = Math.min(a.x1, a.x2), P = Math.min(a.y1, a.y2), ne = Math.max(a.x1, a.x2), oe = Math.max(a.y1, a.y2);
904
+ const l = i.coordinates, d = st(s), f = et(i), A = Math.min(l.x1, l.x2), P = Math.min(l.y1, l.y2), ne = Math.max(l.x1, l.x2), oe = Math.max(l.y1, l.y2);
901
905
  return {
902
906
  left: `${A / d.width * 100}%`,
903
907
  top: `${P / d.height * 100}%`,
@@ -907,8 +911,8 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
907
911
  backgroundColor: `${f}22`
908
912
  };
909
913
  }, Qt = (s, i) => {
910
- const a = st(s);
911
- return _t(i).map((d) => `${d.x / a.width * 100},${d.y / a.height * 100}`).join(" ");
914
+ const l = st(s);
915
+ return kt(i).map((d) => `${d.x / l.width * 100},${d.y / l.height * 100}`).join(" ");
912
916
  }, te = (s) => {
913
917
  const i = et(s);
914
918
  return {
@@ -916,29 +920,29 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
916
920
  stroke: i,
917
921
  strokeWidth: "1.4"
918
922
  };
919
- }, ee = (s, i, a) => {
920
- const d = st(s), f = et(a);
923
+ }, ee = (s, i, l) => {
924
+ const d = st(s), f = et(l);
921
925
  return {
922
926
  left: `${i.x / d.width * 100}%`,
923
927
  top: `${i.y / d.height * 100}%`,
924
928
  backgroundColor: f
925
929
  };
926
930
  }, se = (s, i) => {
927
- const a = i.coordinates, d = st(s), f = et(i), A = Math.abs(a.width), P = Math.abs(a.height);
931
+ const l = i.coordinates, d = st(s), f = et(i), A = Math.abs(l.width), P = Math.abs(l.height);
928
932
  return {
929
- left: `${(a.x - A / 2) / d.width * 100}%`,
930
- top: `${(a.y - P / 2) / d.height * 100}%`,
933
+ left: `${(l.x - A / 2) / d.width * 100}%`,
934
+ top: `${(l.y - P / 2) / d.height * 100}%`,
931
935
  width: `${A / d.width * 100}%`,
932
936
  height: `${P / d.height * 100}%`,
933
- transform: `rotate(${a.angle || 0}deg)`,
937
+ transform: `rotate(${l.angle || 0}deg)`,
934
938
  borderColor: f,
935
939
  backgroundColor: `${f}22`
936
940
  };
937
941
  }, ie = (s, i) => {
938
- const a = i.coordinates, d = st(s), f = et(i);
942
+ const l = i.coordinates, d = st(s), f = et(i);
939
943
  return {
940
- left: `${a.x / d.width * 100}%`,
941
- top: `${a.y / d.height * 100}%`,
944
+ left: `${l.x / d.width * 100}%`,
945
+ top: `${l.y / d.height * 100}%`,
942
946
  backgroundColor: `${f}d9`
943
947
  // ~85% opacity
944
948
  };
@@ -947,9 +951,9 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
947
951
  jumpTo: ot,
948
952
  setImage: Ft,
949
953
  setAnnotations: Nt,
950
- getAnnotations: Ct,
954
+ getAnnotations: _t,
951
955
  selectTool: Y,
952
- loadPredictionCandidates: bt,
956
+ loadPredictionCandidates: Ct,
953
957
  applyPredictions: Vt,
954
958
  rejectPredictions: Ot,
955
959
  exportAnnotations: Wt,
@@ -961,10 +965,10 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
961
965
  }];
962
966
  },
963
967
  getCurrentAnnotation: () => {
964
- var s, i, a;
968
+ var s, i, l;
965
969
  return {
966
- imageUrl: ((s = e.batchImages[x.value]) == null ? void 0 : s.imageUrl) || ((i = e.image) == null ? void 0 : i.url) || "",
967
- annotations: ((a = r.value) == null ? void 0 : a.getAnnotations()) || []
970
+ imageUrl: ((s = e.batchImages[w.value]) == null ? void 0 : s.imageUrl) || ((i = e.image) == null ? void 0 : i.url) || "",
971
+ annotations: ((l = r.value) == null ? void 0 : l.getAnnotations()) || []
968
972
  };
969
973
  }
970
974
  }), K(() => {
@@ -974,7 +978,7 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
974
978
  var s;
975
979
  e.batchImages.length === 0 && ((s = e.image) != null && s.url) && W();
976
980
  }), K(() => e.predictionCandidates, (s) => {
977
- s && bt(s);
981
+ s && Ct(s);
978
982
  }, { immediate: !0, deep: !0 }), K(
979
983
  () => e.batchImages.map((s) => `${s.imageUrl}:${s.width || ""}x${s.height || ""}`),
980
984
  () => {
@@ -982,30 +986,30 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
982
986
  },
983
987
  { immediate: !0 }
984
988
  ), K(
985
- () => x.value,
989
+ () => w.value,
986
990
  () => {
987
991
  at(() => Q());
988
992
  }
989
993
  ), (s, i) => (v(), m("div", {
990
- class: X(["annotation-container", w.theme])
994
+ class: X(["annotation-container", x.theme])
991
995
  }, [
992
- w.batchImages && w.batchImages.length > 0 ? (v(), m("div", Pe, [
993
- h("div", ze, "共 " + z(w.batchImages.length) + " 张", 1),
996
+ x.batchImages && x.batchImages.length > 0 ? (v(), m("div", Pe, [
997
+ h("div", ze, "共 " + z(x.batchImages.length) + " 张", 1),
994
998
  h("div", {
995
999
  ref_key: "imageListScrollRef",
996
1000
  ref: g,
997
1001
  class: "image-list-scroll"
998
1002
  }, [
999
- (v(!0), m(N, null, J(w.batchImages, (a, d) => (v(), m("button", {
1000
- key: `${a.imageUrl}-${d}`,
1003
+ (v(!0), m(N, null, J(x.batchImages, (l, d) => (v(), m("button", {
1004
+ key: `${l.imageUrl}-${d}`,
1001
1005
  ref_for: !0,
1002
1006
  ref: (f) => ht(f, d),
1003
- class: X(["image-list-item", { active: d === x.value }]),
1007
+ class: X(["image-list-item", { active: d === w.value }]),
1004
1008
  onClick: (f) => ot(d)
1005
1009
  }, [
1006
1010
  h("div", Le, [
1007
1011
  h("img", {
1008
- src: a.imageUrl,
1012
+ src: l.imageUrl,
1009
1013
  alt: `第${d + 1}张`,
1010
1014
  class: "image-list-thumb"
1011
1015
  }, null, 8, Be),
@@ -1022,7 +1026,7 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1022
1026
  points: Qt(d, f),
1023
1027
  style: U(te(f))
1024
1028
  }, null, 12, Ee)
1025
- ])) : jt(f) ? (v(!0), m(N, { key: 2 }, J(_t(f), (A, P) => (v(), m("div", {
1029
+ ])) : jt(f) ? (v(!0), m(N, { key: 2 }, J(kt(f), (A, P) => (v(), m("div", {
1026
1030
  key: `${f.id}-${P}`,
1027
1031
  class: "thumb-overlay-point",
1028
1032
  style: U(ee(d, A, f))
@@ -1043,30 +1047,30 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1043
1047
  ], 512)
1044
1048
  ])) : B("", !0),
1045
1049
  h("div", Ve, [
1046
- w.readOnly ? B("", !0) : (v(), m("div", Oe, [
1050
+ x.readOnly ? B("", !0) : (v(), m("div", Oe, [
1047
1051
  h("div", {
1048
1052
  class: X(["tool-btn", { active: k.value === "pan" }]),
1049
- onClick: i[0] || (i[0] = (a) => Y("pan")),
1053
+ onClick: i[0] || (i[0] = (l) => Y("pan")),
1050
1054
  title: "拖动"
1051
1055
  }, [
1052
1056
  R(L, { name: "rank" })
1053
1057
  ], 2),
1054
1058
  h("div", {
1055
1059
  class: X(["tool-btn", { active: k.value === "select" }]),
1056
- onClick: i[1] || (i[1] = (a) => Y("select")),
1060
+ onClick: i[1] || (i[1] = (l) => Y("select")),
1057
1061
  title: "选择"
1058
1062
  }, [
1059
1063
  R(L, { name: "pointer" })
1060
1064
  ], 2),
1061
1065
  i[5] || (i[5] = h("div", { class: "divider" }, null, -1)),
1062
- (v(!0), m(N, null, J(b.value, (a) => (v(), m("div", {
1063
- key: a,
1064
- class: X(["tool-btn", { active: k.value === a }]),
1065
- onClick: (d) => Y(a),
1066
- title: F(a)
1066
+ (v(!0), m(N, null, J(b.value, (l) => (v(), m("div", {
1067
+ key: l,
1068
+ class: X(["tool-btn", { active: k.value === l }]),
1069
+ onClick: (d) => Y(l),
1070
+ title: F(l)
1067
1071
  }, [
1068
1072
  R(L, {
1069
- name: I(a)
1073
+ name: I(l)
1070
1074
  }, null, 8, ["name"])
1071
1075
  ], 10, Fe))), 128)),
1072
1076
  i[6] || (i[6] = h("div", { class: "divider" }, null, -1)),
@@ -1107,10 +1111,10 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1107
1111
  ref_key: "canvasRef",
1108
1112
  ref: o
1109
1113
  }, null, 512),
1110
- w.readOnly ? B("", !0) : (v(), m("div", Ge, [
1114
+ x.readOnly ? B("", !0) : (v(), m("div", Ge, [
1111
1115
  h("div", {
1112
1116
  class: "selector-trigger",
1113
- onClick: yt
1117
+ onClick: xt
1114
1118
  }, [
1115
1119
  Z.value ? (v(), m("div", Ye, [
1116
1120
  h("span", {
@@ -1127,17 +1131,17 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1127
1131
  }, null, 8, ["class"])
1128
1132
  ]),
1129
1133
  G.value ? (v(), m("div", Xe, [
1130
- _.value.length === 0 ? (v(), m("div", qe, "请在右侧创建标签")) : (v(!0), m(N, { key: 1 }, J(_.value, (a) => (v(), m("div", {
1131
- key: a.id,
1132
- class: X(["dropdown-item", { active: $.value === a.id }]),
1133
- onClick: (d) => wt(a)
1134
+ _.value.length === 0 ? (v(), m("div", qe, "请在右侧创建标签")) : (v(!0), m(N, { key: 1 }, J(_.value, (l) => (v(), m("div", {
1135
+ key: l.id,
1136
+ class: X(["dropdown-item", { active: $.value === l.id }]),
1137
+ onClick: (d) => wt(l)
1134
1138
  }, [
1135
1139
  h("span", {
1136
1140
  class: "color-dot",
1137
- style: U({ backgroundColor: a.color })
1141
+ style: U({ backgroundColor: l.color })
1138
1142
  }, null, 4),
1139
- h("span", Ze, z(a.name), 1),
1140
- $.value === a.id ? (v(), vt(L, {
1143
+ h("span", Ze, z(l.name), 1),
1144
+ $.value === l.id ? (v(), vt(L, {
1141
1145
  key: 0,
1142
1146
  name: "aim",
1143
1147
  class: "check-icon"
@@ -1146,11 +1150,11 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1146
1150
  ])) : B("", !0)
1147
1151
  ]))
1148
1152
  ], 544),
1149
- w.batchImages && w.batchImages.length > 0 ? (v(), m("div", Qe, [
1153
+ x.batchImages && x.batchImages.length > 0 ? (v(), m("div", Qe, [
1150
1154
  h("button", {
1151
1155
  class: "icon-btn",
1152
1156
  onClick: Et,
1153
- disabled: x.value <= 0,
1157
+ disabled: w.value <= 0,
1154
1158
  title: "第一张"
1155
1159
  }, [
1156
1160
  R(L, { name: "first" })
@@ -1158,16 +1162,16 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1158
1162
  h("button", {
1159
1163
  class: "icon-btn",
1160
1164
  onClick: Rt,
1161
- disabled: x.value <= 0,
1165
+ disabled: w.value <= 0,
1162
1166
  title: "上一张"
1163
1167
  }, [
1164
1168
  R(L, { name: "back" })
1165
1169
  ], 8, es),
1166
- h("span", null, z(x.value + 1) + " / " + z(w.batchImages.length), 1),
1170
+ h("span", null, z(w.value + 1) + " / " + z(x.batchImages.length), 1),
1167
1171
  h("button", {
1168
1172
  class: "icon-btn",
1169
1173
  onClick: Ht,
1170
- disabled: x.value >= w.batchImages.length - 1,
1174
+ disabled: w.value >= x.batchImages.length - 1,
1171
1175
  title: "下一张"
1172
1176
  }, [
1173
1177
  R(L, { name: "right" })
@@ -1175,14 +1179,14 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1175
1179
  h("button", {
1176
1180
  class: "icon-btn",
1177
1181
  onClick: Ut,
1178
- disabled: x.value >= w.batchImages.length - 1,
1182
+ disabled: w.value >= x.batchImages.length - 1,
1179
1183
  title: "最后一张"
1180
1184
  }, [
1181
1185
  R(L, { name: "last" })
1182
1186
  ], 8, is)
1183
1187
  ])) : B("", !0)
1184
1188
  ]),
1185
- w.readOnly ? B("", !0) : (v(), m("div", ns, [
1189
+ x.readOnly ? B("", !0) : (v(), m("div", ns, [
1186
1190
  h("div", { class: "sidebar-header" }, [
1187
1191
  i[8] || (i[8] = h("h3", null, "标签", -1)),
1188
1192
  h("button", {
@@ -1191,34 +1195,34 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1191
1195
  }, "添加标签")
1192
1196
  ]),
1193
1197
  h("div", os, [
1194
- (v(!0), m(N, null, J(_.value, (a) => (v(), m("div", {
1195
- key: a.id,
1198
+ (v(!0), m(N, null, J(_.value, (l) => (v(), m("div", {
1199
+ key: l.id,
1196
1200
  class: "label-item",
1197
- style: U({ backgroundColor: a.color + "1A", color: a.color })
1201
+ style: U({ backgroundColor: l.color + "1A", color: l.color })
1198
1202
  }, [
1199
1203
  h("div", as, [
1200
1204
  h("label", {
1201
1205
  class: "color-wrapper",
1202
- style: U({ backgroundColor: a.color })
1206
+ style: U({ backgroundColor: l.color })
1203
1207
  }, [
1204
1208
  ft(h("input", {
1205
1209
  type: "color",
1206
- "onUpdate:modelValue": (d) => a.color = d,
1207
- onChange: (d) => $t(a),
1210
+ "onUpdate:modelValue": (d) => l.color = d,
1211
+ onChange: (d) => $t(l),
1208
1212
  style: { visibility: "hidden", width: "0", height: "0" }
1209
1213
  }, null, 40, ls), [
1210
- [mt, a.color]
1214
+ [mt, l.color]
1211
1215
  ])
1212
1216
  ], 4),
1213
1217
  h("span", {
1214
1218
  class: "label-name",
1215
- title: a.name
1216
- }, z(a.name), 9, cs),
1219
+ title: l.name
1220
+ }, z(l.name), 9, cs),
1217
1221
  h("span", {
1218
1222
  class: "action-icon eye",
1219
- onClick: (d) => Lt(a)
1223
+ onClick: (d) => Lt(l)
1220
1224
  }, [
1221
- a.visible ? (v(), vt(L, {
1225
+ l.visible ? (v(), vt(L, {
1222
1226
  key: 0,
1223
1227
  name: "view"
1224
1228
  })) : (v(), vt(L, {
@@ -1230,7 +1234,7 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1230
1234
  i[9] || (i[9] = h("span", { class: "dots" }, "•••", -1)),
1231
1235
  h("span", {
1232
1236
  class: "delete-btn",
1233
- onClick: (d) => Bt(a.id),
1237
+ onClick: (d) => Bt(l.id),
1234
1238
  title: "删除"
1235
1239
  }, [
1236
1240
  R(L, { name: "delete" })
@@ -1256,7 +1260,7 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1256
1260
  h("span", { class: "required" }, "*")
1257
1261
  ], -1)),
1258
1262
  ft(h("input", {
1259
- "onUpdate:modelValue": i[3] || (i[3] = (a) => C.value.name = a),
1263
+ "onUpdate:modelValue": i[3] || (i[3] = (l) => C.value.name = l),
1260
1264
  placeholder: "请输入标签名称",
1261
1265
  class: "modal-input",
1262
1266
  autofocus: ""
@@ -1273,7 +1277,7 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1273
1277
  }, [
1274
1278
  ft(h("input", {
1275
1279
  type: "color",
1276
- "onUpdate:modelValue": i[4] || (i[4] = (a) => C.value.color = a),
1280
+ "onUpdate:modelValue": i[4] || (i[4] = (l) => C.value.color = l),
1277
1281
  class: "modal-color-picker"
1278
1282
  }, null, 512), [
1279
1283
  [mt, C.value.color]
@@ -1292,13 +1296,13 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1292
1296
  onClick: Pt,
1293
1297
  class: "confirm-btn",
1294
1298
  disabled: !C.value.name.trim()
1295
- }, "确认", 8, ws)
1299
+ }, "确认", 8, xs)
1296
1300
  ])
1297
1301
  ])
1298
1302
  ])) : B("", !0)
1299
1303
  ], 2));
1300
1304
  }
1301
- }), bs = /* @__PURE__ */ rt(xs, [["__scopeId", "data-v-914fe07d"]]), Cs = {
1305
+ }), bs = /* @__PURE__ */ rt(ws, [["__scopeId", "data-v-914fe07d"]]), Cs = {
1302
1306
  class: "thumbnail-wrapper",
1303
1307
  ref: "wrapper"
1304
1308
  }, _s = ["src", "alt"], ks = ["viewBox", "preserveAspectRatio"], Is = ["x", "y", "width", "height", "stroke", "stroke-width"], As = ["points", "stroke", "stroke-width"], Ss = ["transform"], Ms = ["x", "y", "width", "height", "stroke", "stroke-width"], Ts = { key: 3 }, Ds = ["cx", "cy", "r", "fill", "stroke-width"], Ps = ["x", "y", "width", "height", "fill"], zs = ["x", "y", "fill", "font-size", "font-weight", "text-anchor", "dominant-baseline"], $s = {
@@ -1315,9 +1319,9 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1315
1319
  strokeWidth: {},
1316
1320
  fontSize: {}
1317
1321
  },
1318
- setup(w) {
1319
- const t = w, n = M(null), e = M(!1), l = M(0), o = M(0), c = () => {
1320
- n.value && (l.value = n.value.naturalWidth, o.value = n.value.naturalHeight, e.value = !0);
1322
+ setup(x) {
1323
+ const t = x, n = M(null), e = M(!1), a = M(0), o = M(0), c = () => {
1324
+ n.value && (a.value = n.value.naturalWidth, o.value = n.value.naturalHeight, e.value = !0);
1321
1325
  }, g = V(() => t.fit === "contain" ? "xMidYMid meet" : "xMidYMid slice"), u = V(() => t.strokeWidth ?? 10), r = V(() => t.fontSize ?? 30), k = (C) => {
1322
1326
  var S;
1323
1327
  if ((S = C.style) != null && S.strokeColor) return C.style.strokeColor;
@@ -1326,12 +1330,12 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1326
1330
  if (p) return p.color;
1327
1331
  }
1328
1332
  return "#FF0000";
1329
- }, x = (C) => {
1333
+ }, w = (C) => {
1330
1334
  const S = C.coordinates, p = Math.min(S.x1, S.x2), H = Math.min(S.y1, S.y2), O = Math.abs(S.x1 - S.x2), G = Math.abs(S.y1 - S.y2);
1331
1335
  return { x: p, y: H, width: O, height: G };
1332
1336
  }, D = (C) => C.coordinates.points.map((p) => `${p.x},${p.y}`).join(" "), _ = (C) => {
1333
1337
  if (C.type === "rectangle") {
1334
- const S = x(C);
1338
+ const S = w(C);
1335
1339
  return { x: S.x, y: S.y - 5 };
1336
1340
  } else if (C.type === "polygon") {
1337
1341
  const S = C.coordinates.points;
@@ -1354,27 +1358,27 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1354
1358
  h("img", {
1355
1359
  ref_key: "img",
1356
1360
  ref: n,
1357
- src: w.src,
1361
+ src: x.src,
1358
1362
  class: "thumbnail-image",
1359
- style: U({ objectFit: w.fit }),
1363
+ style: U({ objectFit: x.fit }),
1360
1364
  onLoad: c,
1361
- alt: w.alt
1365
+ alt: x.alt
1362
1366
  }, null, 44, _s),
1363
1367
  e.value ? (v(), m("svg", {
1364
1368
  key: 0,
1365
1369
  class: "annotation-overlay",
1366
- viewBox: `0 0 ${l.value} ${o.value}`,
1370
+ viewBox: `0 0 ${a.value} ${o.value}`,
1367
1371
  preserveAspectRatio: g.value
1368
1372
  }, [
1369
- (v(!0), m(N, null, J(w.annotations, (p) => (v(), m(N, {
1373
+ (v(!0), m(N, null, J(x.annotations, (p) => (v(), m(N, {
1370
1374
  key: p.id
1371
1375
  }, [
1372
1376
  p.type === "rectangle" ? (v(), m("rect", {
1373
1377
  key: 0,
1374
- x: x(p).x,
1375
- y: x(p).y,
1376
- width: x(p).width,
1377
- height: x(p).height,
1378
+ x: w(p).x,
1379
+ y: w(p).y,
1380
+ width: w(p).width,
1381
+ height: w(p).height,
1378
1382
  stroke: k(p),
1379
1383
  "stroke-width": u.value,
1380
1384
  fill: "transparent"
@@ -1453,8 +1457,8 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1453
1457
  thumbFontSize: {}
1454
1458
  },
1455
1459
  emits: ["export", "update:images", "imageClick", "update:labels", "pageChange"],
1456
- setup(w, { expose: t, emit: n }) {
1457
- const e = w, l = n, o = M("gallery"), c = M([]), g = M([]), u = M(0), r = M(null), k = M(null), x = M(null), D = V(() => {
1460
+ setup(x, { expose: t, emit: n }) {
1461
+ const e = x, a = n, o = M("gallery"), c = M([]), g = M([]), u = M(0), r = M(null), k = M(null), w = M(null), D = V(() => {
1458
1462
  var y, b;
1459
1463
  return ((b = (y = e.actionBar) == null ? void 0 : y.annotateButton) == null ? void 0 : b.show) === !0;
1460
1464
  }), _ = V(() => {
@@ -1495,13 +1499,15 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1495
1499
  backgroundColor: y.color + "1A"
1496
1500
  // 1A represents ~10% opacity in hex
1497
1501
  });
1498
- K(() => e.images, (y) => {
1502
+ yt(() => {
1503
+ a("pageChange", { nowPage: "listPage" });
1504
+ }), K(() => e.images, (y) => {
1499
1505
  c.value = JSON.parse(JSON.stringify(y));
1500
1506
  }, { immediate: !0, deep: !0 }), K(() => e.labels, (y) => {
1501
1507
  g.value = JSON.parse(JSON.stringify(y || []));
1502
1508
  }, { immediate: !0, deep: !0 });
1503
1509
  const O = (y) => {
1504
- u.value = y, o.value = "editor", l("pageChange", { nowPage: "editPage" }), x.value && (x.value.scrollTop = 0), at(() => {
1510
+ u.value = y, o.value = "editor", a("pageChange", { nowPage: "editPage" }), w.value && (w.value.scrollTop = 0), at(() => {
1505
1511
  k.value && (k.value.scrollTop = 0), window.scrollTo(0, 0), requestAnimationFrame(() => {
1506
1512
  var b, I;
1507
1513
  (I = (b = r.value) == null ? void 0 : b.jumpTo) == null || I.call(b, y);
@@ -1512,7 +1518,7 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1512
1518
  O(y);
1513
1519
  return;
1514
1520
  }
1515
- l("imageClick", { index: y, imageId: b.id, image: b });
1521
+ a("imageClick", { index: y, imageId: b.id, image: b });
1516
1522
  }, Z = (y) => c.value.findIndex((b) => b.id === y);
1517
1523
  t({
1518
1524
  openImageById: (y) => {
@@ -1524,7 +1530,7 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1524
1530
  if (b < 0)
1525
1531
  return !1;
1526
1532
  const I = c.value[b];
1527
- return I ? (l("imageClick", { index: b, imageId: I.id, image: I }), !0) : !1;
1533
+ return I ? (a("imageClick", { index: b, imageId: I.id, image: I }), !0) : !1;
1528
1534
  },
1529
1535
  getFinalData: () => ({
1530
1536
  images: JSON.parse(JSON.stringify(c.value)),
@@ -1536,18 +1542,18 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1536
1542
  const y = r.value.getCurrentAnnotation();
1537
1543
  c.value[u.value] && (c.value[u.value].annotations = y.annotations);
1538
1544
  }
1539
- o.value = "gallery", l("pageChange", { nowPage: "listPage" });
1545
+ o.value = "gallery", a("pageChange", { nowPage: "listPage" });
1540
1546
  }, nt = () => {
1541
- l("export", c.value);
1547
+ a("export", c.value);
1542
1548
  }, ht = (y) => {
1543
1549
  u.value = y.currentIndex, c.value[y.currentIndex] && (c.value[y.currentIndex].annotations = y.currentAnnotations);
1544
1550
  }, Q = (y) => {
1545
1551
  if (r.value && r.value.getCurrentAnnotation) {
1546
1552
  const b = r.value.getCurrentAnnotation();
1547
- c.value[u.value] && (c.value[u.value].annotations = b.annotations, l("update:images", c.value));
1553
+ c.value[u.value] && (c.value[u.value].annotations = b.annotations, a("update:images", c.value));
1548
1554
  }
1549
1555
  }, j = (y) => {
1550
- g.value = JSON.parse(JSON.stringify(y || [])), l("update:labels", g.value);
1556
+ g.value = JSON.parse(JSON.stringify(y || [])), a("update:labels", g.value);
1551
1557
  };
1552
1558
  return (y, b) => (v(), m("div", {
1553
1559
  ref_key: "batchRootRef",
@@ -1594,7 +1600,7 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1594
1600
  h("div", Fs, [
1595
1601
  h("div", {
1596
1602
  ref_key: "galleryGridRef",
1597
- ref: x,
1603
+ ref: w,
1598
1604
  class: "gallery-grid"
1599
1605
  }, [
1600
1606
  (v(!0), m(N, null, J(c.value, (I, F) => (v(), m("div", {
@@ -1670,7 +1676,7 @@ const de = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//D
1670
1676
  ]))
1671
1677
  ], 512));
1672
1678
  }
1673
- }), ii = /* @__PURE__ */ rt(ti, [["__scopeId", "data-v-701c81a6"]]);
1679
+ }), ii = /* @__PURE__ */ rt(ti, [["__scopeId", "data-v-5bb1d03b"]]);
1674
1680
  export {
1675
1681
  ii as BatchAnnotator,
1676
1682
  bs as ImageAnnotator,