@annotorious/annotorious 3.7.19 → 3.7.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/annotorious.es.js
CHANGED
|
@@ -600,8 +600,8 @@ We(x.RECTANGLE, Xo);
|
|
|
600
600
|
const yt = (e) => ht(e.target), ht = (e) => {
|
|
601
601
|
var t, n;
|
|
602
602
|
return (e == null ? void 0 : e.annotation) !== void 0 && ((n = (t = e == null ? void 0 : e.selector) == null ? void 0 : t.geometry) == null ? void 0 : n.bounds) !== void 0;
|
|
603
|
-
}, Ho = (e) => (e == null ? void 0 : e.type) === "FragmentSelector" ? !0 : typeof e == "string" ? e.indexOf("#") < 0 ? !1 :
|
|
604
|
-
const n = typeof e == "string" ? e : e.value, o = /(xywh)=(pixel|percent)?:?(.+?),(.+?),(.+?),(.+)*/g, i = [...n.matchAll(o)][0];
|
|
603
|
+
}, Ho = (e) => (e == null ? void 0 : e.type) === "FragmentSelector" ? !0 : typeof e == "string" ? e.indexOf("#") < 0 ? !1 : /#xywh(?:=(?:pixel:|percent:)?)\s*\d+(\.\d*)?,\s*\d+(\.\d*)?,\s*\d+(\.\d*)?,\s*\d+(\.\d*)?$/i.test(e) : !1, Go = (e, t = !1) => {
|
|
604
|
+
const n = typeof e == "string" ? e : e.value, o = /(xywh)=(?:(pixel|percent):)?:?(.+?),(.+?),(.+?),(.+)*/g, i = [...n.matchAll(o)][0];
|
|
605
605
|
if (!i) throw new Error("Not a MediaFragment: " + n);
|
|
606
606
|
const [s, r, l, a, u, d, f] = i;
|
|
607
607
|
if (r !== "xywh") throw new Error("Unsupported MediaFragment: " + n);
|
|
@@ -891,8 +891,7 @@ function De(e, t) {
|
|
|
891
891
|
return e !== e && t !== t;
|
|
892
892
|
}
|
|
893
893
|
let li = Symbol("clean"), Me = [], Oe = 0;
|
|
894
|
-
const rt = 4
|
|
895
|
-
let qt = (e) => {
|
|
894
|
+
const rt = 4, qt = /* @__NO_SIDE_EFFECTS__ */ (e) => {
|
|
896
895
|
let t = [], n = {
|
|
897
896
|
get() {
|
|
898
897
|
return n.lc || n.listen(() => {
|
|
@@ -938,9 +937,8 @@ let qt = (e) => {
|
|
|
938
937
|
return process.env.NODE_ENV !== "production" && (n[li] = () => {
|
|
939
938
|
t = [], n.lc = 0, n.off();
|
|
940
939
|
}), n;
|
|
941
|
-
}
|
|
942
|
-
const
|
|
943
|
-
const t = qt(null);
|
|
940
|
+
}, ai = (e) => {
|
|
941
|
+
const t = /* @__PURE__ */ qt(null);
|
|
944
942
|
return e.observe(({ changes: n }) => {
|
|
945
943
|
const o = t.get();
|
|
946
944
|
if (o) {
|
|
@@ -958,7 +956,7 @@ const ai = (e) => {
|
|
|
958
956
|
};
|
|
959
957
|
var io = /* @__PURE__ */ ((e) => (e.EDIT = "EDIT", e.SELECT = "SELECT", e.NONE = "NONE", e))(io || {});
|
|
960
958
|
const Mt = { selected: [] }, ci = (e, t, n) => {
|
|
961
|
-
const o = qt(Mt);
|
|
959
|
+
const o = /* @__PURE__ */ qt(Mt);
|
|
962
960
|
let i = t;
|
|
963
961
|
const s = () => {
|
|
964
962
|
De(o.get(), Mt) || o.set(Mt);
|
|
@@ -1414,7 +1412,7 @@ const ki = 250, Mi = (e, t) => {
|
|
|
1414
1412
|
}
|
|
1415
1413
|
};
|
|
1416
1414
|
}, Ti = () => {
|
|
1417
|
-
const e = qt([]);
|
|
1415
|
+
const e = /* @__PURE__ */ qt([]);
|
|
1418
1416
|
return {
|
|
1419
1417
|
subscribe: e.subscribe.bind(e),
|
|
1420
1418
|
set: e.set.bind(e)
|