UNPKG

mirador

Version:

An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.

40,392 lines • 1.42 MB
import { $ as e, A as t, C as n, D as r, G as i, H as a, I as o, J as s, K as c, L as l, M as u, N as d, P as f, Q as p, R as m, S as h, U as g, V as _, W as v, _ as y, a as b, at as x, c as S, ct as C, d as w, dt as T, et as E, f as ee, ft as D, g as te, h as ne, i as re, it as ie, j as ae, k as oe, l as se, lt as O, m as ce, mt as k, n as le, nt as ue, o as de, ot as fe, p as pe, pt as me, q as he, r as ge, rt as _e, s as ve, st as ye, t as be, tt as xe, u as Se, ut as Ce, v as A, w as we, x as Te, y as Ee } from "./getters-H0mV17lW.js";
import { $ as De, A as Oe, At as ke, B as Ae, Bt as je, C as Me, Ct as Ne, D as Pe, Dt as Fe, E as Ie, Et as Le, F as Re, Ft as ze, G as Be, Gt as Ve, H as He, Ht as Ue, I as We, It as Ge, J as Ke, Jt as qe, K as Je, Kt as Ye, L as Xe, Lt as Ze, M as Qe, Mt as $e, N as et, Nt as tt, O as nt, Ot as rt, P as it, Pt as at, Q as ot, Qt as st, R as ct, Rt as lt, S as ut, St as dt, T as ft, Tt as pt, U as mt, Ut as ht, V as gt, Vt as _t, W as vt, Wt as yt, X as bt, Xt as xt, Y as St, Yt as Ct, Z as wt, _ as Tt, _t as Et, a as Dt, an as Ot, at as kt, b as At, bt as jt, c as Mt, cn as Nt, ct as Pt, d as Ft, dn as It, dt as Lt, et as Rt, f as zt, fn as Bt, ft as Vt, g as Ht, gt as Ut, h as Wt, ht as Gt, i as Kt, in as qt, it as Jt, j as Yt, jt as Xt, k as Zt, kt as Qt, l as $t, ln as en, lt as tn, m as nn, mt as rn, n as an, nn as on, nt as sn, o as cn, on as ln, ot as un, p as dn, pn as fn, pt as pn, q as mn, qt as hn, r as gn, rn as _n, rt as vn, s as yn, sn as bn, st as xn, t as Sn, tn as Cn, tt as wn, u as Tn, un as En, ut as Dn, v as On, vt as kn, w as An, wt as jn, x as Mn, xt as Nn, y as Pn, yt as Fn, z as In, zt as Ln } from "./canvases-CWytFm4k.js";
import { t as j } from "./action-types-DjIbTE-A.js";
import { A as Rn, C as zn, D as Bn, E as Vn, F as Hn, M as Un, N as Wn, O as Gn, P as Kn, S as qn, T as Jn, _ as Yn, a as Xn, b as Zn, c as Qn, d as $n, f as er, g as tr, h as nr, i as rr, j as ir, k as ar, l as or, m as sr, n as cr, o as lr, p as ur, r as dr, s as fr, t as pr, u as mr, v as hr, w as gr, x as _r, y as vr } from "./FailedImageContext-BVU9xFk0.js";
import { a as yr, c as br, d as xr, f as Sr, i as Cr, l as wr, n as Tr, o as Er, r as Dr, s as Or, t as kr, u as Ar } from "./index.module-8PXj8htN.js";
import { a as jr, c as Mr, d as Nr, f as Pr, i as Fr, l as Ir, n as Lr, o as Rr, r as zr, s as Br, t as Vr, u as Hr } from "./window-DpC-GJkt.js";
import { a as Ur, i as Wr, n as Gr, r as Kr, t as M } from "./css-ns-D71I6kc_.js";
import { n as qr, r as Jr, t as Yr } from "./PluginHook-D2fBf7Jn.js";
import { a as Xr, i as Zr, n as Qr, o as $r, r as ei, s as ti, t as ni } from "./CommentSharp-DglfFOa-.js";
import { t as N } from "./createSvgIcon-Cwt8YPfm.js";
import { a as ri, i as ii, n as ai, o as oi, r as si, t as ci } from "./visuallyHidden-ClS3et6J.js";
import { t as li } from "./react-error-boundary.esm-ByHqCaxk.js";
import { t as ui } from "./OpenSeadragonViewerContext-9z-1VHqt.js";
import { a as di, c as fi, i as pi, l as mi, n as hi, o as gi, r as _i, s as vi, t as yi } from "./WindowCanvasNavigationControls-DCJUThcV.js";
import { createRoot as bi } from "react-dom/client";
import * as P from "react";
import F, { Children as xi, Fragment as Si, PureComponent as Ci, Suspense as wi, cloneElement as Ti, createContext as Ei, createElement as Di, createRef as Oi, forwardRef as ki, isValidElement as Ai, lazy as ji, memo as Mi, useCallback as I, useContext as Ni, useEffect as L, useId as Pi, useImperativeHandle as Fi, useLayoutEffect as Ii, useMemo as Li, useReducer as Ri, useRef as R, useState as zi } from "react";
import { Fragment as Bi, jsx as z, jsxs as B } from "react/jsx-runtime";
import Vi from "@mui/material/Paper";
import { I18nextProvider as Hi, initReactI18next as Ui, useTranslation as Wi, useTranslation as V, withTranslation as Gi } from "react-i18next";
import { StyledEngineProvider as Ki, ThemeProvider as qi, alpha as Ji, createTheme as Yi, darken as Xi, lighten as Zi, styled as H, styled as Qi, useTheme as $i, useThemeProps as ea } from "@mui/material/styles";
import U from "@mui/material/Typography";
import { createSvgIcon as ta } from "@mui/material/utils";
import na from "@mui/material/Badge";
import ra from "@mui/material/IconButton";
import ia from "@mui/material/Tooltip";
import aa from "@mui/material/Chip";
import oa from "@mui/material/MenuList";
import sa from "@mui/material/MenuItem";
import ca from "@mui/material/ListItemText";
import la from "@mui/material/Toolbar";
import ua, { flushSync as da } from "react-dom";
import fa from "@mui/material/Accordion";
import pa from "@mui/material/AccordionDetails";
import ma from "@mui/material/AccordionSummary";
import ha from "@mui/material/InputLabel";
import ga from "@mui/material/FormControl";
import _a from "@mui/material/Select";
import va from "@mui/material/Button";
import ya from "@mui/material/Link";
import ba from "@mui/material/Tabs";
import xa from "@mui/material/Tab";
import { useRtl as Sa } from "@mui/system/RtlProvider";
import Ca from "@mui/material/CircularProgress";
import wa from "@mui/material/Collapse";
import Ta from "@mui/material/Checkbox";
import { shouldForwardProp as Ea } from "@mui/system/createStyled";
import Da from "@mui/material/Skeleton";
import Oa from "@mui/material/Autocomplete";
import ka from "@mui/material/TextField";
import Aa from "@mui/material/InputAdornment";
import ja from "@mui/material/List";
import Ma from "@mui/material/ListItem";
import Na from "@mui/material/ListItemButton";
import Pa from "@mui/material/Input";
import Fa from "@mui/material/Slider";
import Ia from "@mui/material/ListItemIcon";
import { CacheProvider as La } from "@emotion/react";
import Ra from "@mui/material/AppBar";
import za from "@mui/material/ListSubheader";
import Ba from "@mui/material/Popover";
import Va from "@mui/material/FormControlLabel";
import Ha from "@mui/material/SvgIcon";
import Ua from "@mui/material/Menu";
import Wa from "@mui/material/Drawer";
import Ga from "@mui/material/Slide";
import Ka from "@mui/material/Stack";
import qa from "@mui/material/Alert";
import { Button as Ja, Card as Ya, CardContent as Xa, Chip as Za, Dialog as Qa, DialogActions as $a, DialogContent as eo, DialogContentText as to, DialogTitle as no, Link as ro, ListItemIcon as io, ListItemText as ao, MenuItem as oo, MenuList as so, TextField as co, Typography as lo } from "@mui/material";
import uo from "@mui/material/DialogContent";
import fo from "@mui/material/DialogActions";
import po from "@mui/material/Dialog";
import mo from "@mui/material/DialogTitle";
import ho from "@mui/material/Backdrop";
import { grey as go } from "@mui/material/colors";
import _o from "@mui/material/Box";
import vo from "@mui/material/Grid";
import yo from "@mui/material/ButtonBase";
import bo from "@mui/material/GlobalStyles";
import xo from "@mui/material/Fab";
import So from "@mui/material/useMediaQuery";
import Co from "@mui/material/Snackbar";
//#region node_modules/lodash/_assignValue.js
var wo = /* @__PURE__ */ D(((e, t) => {
	var n = ln(), r = fn(), i = Object.prototype.hasOwnProperty;
	function a(e, t, a) {
		var o = e[t];
		(!(i.call(e, t) && r(o, a)) || a === void 0 && !(t in e)) && n(e, t, a);
	}
	t.exports = a;
})), To = /* @__PURE__ */ D(((t, n) => {
	var r = wo(), i = en(), a = s(), o = e(), c = Nt();
	function l(e, t, n, s) {
		if (!o(e)) return e;
		t = i(t, e);
		for (var l = -1, u = t.length, d = u - 1, f = e; f != null && ++l < u;) {
			var p = c(t[l]), m = n;
			if (p === "__proto__" || p === "constructor" || p === "prototype") return e;
			if (l != d) {
				var h = f[p];
				m = s ? s(h, p, f) : void 0, m === void 0 && (m = o(h) ? h : a(t[l + 1]) ? [] : {});
			}
			r(f, p, m), f = f[p];
		}
		return e;
	}
	n.exports = l;
})), Eo = /* @__PURE__ */ D(((e, t) => {
	var n = bn(), r = To();
	function i(e, t, i, a) {
		return r(e, t, i(n(e, t)), a);
	}
	t.exports = i;
})), Do = /* @__PURE__ */ D(((e, t) => {
	var n = he();
	function r(e) {
		return typeof e == "function" ? e : n;
	}
	t.exports = r;
})), Oo = /* @__PURE__ */ D(((e, t) => {
	var n = Eo(), r = Do();
	function i(e, t, i) {
		return e == null ? e : n(e, t, r(i));
	}
	t.exports = i;
})), ko = /* @__PURE__ */ D(((e, t) => {
	var n = Sr(), r = Ar(), i = wr(), a = br();
	t.exports = r(function(e) {
		return i(n(e, 1, a, !0));
	});
})), Ao = /* @__PURE__ */ D(((e, t) => {
	var n = Or(), r = Ar(), i = br();
	t.exports = r(function(e, t) {
		return i(e) ? n(e, t) : [];
	});
})), W = /* @__PURE__ */ k(ye(), 1), jo = /* @__PURE__ */ k(Oo(), 1), Mo = /* @__PURE__ */ k(ko(), 1), No = /* @__PURE__ */ k(Ao(), 1), Po = Ue();
function Fo(e, t) {
	let n = e.getCanvasIds();
	for (let e = 0; e < n.length; e += 1) if (Po.Utils.normalisedUrlsMatch(n[e], t)) return !0;
	return !1;
}
function Io(e) {
	return e.parentNode === void 0 ? [] : e.parentNode.parentNode === void 0 ? [e.parentNode.id] : [...Io(e.parentNode), e.parentNode.id];
}
function Lo(e, t) {
	return e.reduce((e, n) => {
		let r = [];
		r.push(...e);
		let i = t.reduce((e, t) => e || Fo(n.data, t), !1), a = n.nodes.length > 0 ? Lo(n.nodes, t) : [];
		return r.push(...a), (i || a.length > 0) && r.push({
			containsVisibleCanvas: i,
			descendantsContainVisibleCanvas: a.length > 0,
			id: n.id,
			leaf: n.nodes.length === 0,
			parentIds: Io(n)
		}), r;
	}, []);
}
var Ro = ce([We, dn], (e, t) => t.length === 0 || !e ? [] : Lo(e.nodes, t)), zo = ce([Ro], (e) => e.map((e) => e.id)), Bo = ce([Ro], (e) => e.reduce((e, t) => t.leaf || !t.descendantsContainVisibleCanvas ? e : [...e, t.id], [])), Vo = ce([Ro], (e) => e.reduce((e, t) => t.containsVisibleCanvas ? [...e, t] : e, []));
function Ho(e, { companionWindowId: t }, n) {
	let r = Fe(e, { companionWindowId: t });
	return r.tocNodes ? Object.keys(r.tocNodes).reduce((e, t) => r.tocNodes[t].expanded === n ? [...e, t] : e, []) : [];
}
function Uo(e, { companionWindowId: t, windowId: n }) {
	let r = Bo(e, {
		companionWindowId: t,
		windowId: n
	}), i = Ho(e, { companionWindowId: t }, !0), a = Ho(e, { companionWindowId: t }, !1);
	return (0, No.default)((0, Mo.default)(i, r), ...a);
}
function Wo(e, { ...t }) {
	let n = Vo(e, { ...t }), r = Ho(e, t, !1);
	if (n && n.length > 0) {
		for (let e = 0; e < n[0].parentIds.length; e += 1) if (r.indexOf(n[0].parentIds[e]) !== -1) return n[0].parentIds[e];
		return n[0].id;
	}
	return null;
}
var Go = ce([We], (e) => e && e.nodes && e.nodes.length > 0 ? "tableOfContents" : "item"), Ko = ce([Gt], ({ auth: { serviceProfiles: e = [] } = {} }) => e), qo = (e) => ee(e).accessTokens || w, Jo = (e) => ee(e).auth || w, Yo = ce([
	Tt,
	Pn,
	Ko,
	Jo,
	Ze,
	(e, { iiifResources: t }) => t
], (e, t = {}, n, r, i, a) => {
	let o = a;
	if (!o && e && (o = e.flatMap((e) => i(e).iiifImageResources.map((e) => {
		let n = _t(e), r = t[n.id];
		return r && r.json ? {
			...r.json,
			options: {}
		} : n;
	}))), !o || o.length === 0) return Se;
	let s = o.map((e) => {
		let t, i = Po.Utils.getServices(e);
		for (let e of n) {
			let n = i.filter((t) => e.profile === t.getProfile());
			for (let e of n) if (t = e, !r[e.id] || r[e.id].isFetching || r[e.id].ok) return e;
		}
		return t;
	});
	return Object.values(s.reduce((e, t) => (t && !e[t.id] && (e[t.id] = t), e), {}));
}), Xo = "text/plain", Zo = "us-ascii", Qo = "%(?:3A|2F|3F|23|5B|5D|40|21|24|26|27|28|29|2A|2B|2C|3B|3D)", $o = "__normalize_url_encoded_reserved__", es = /__normalize_url_encoded_reserved__(\d+)__/g, ts = new RegExp(Qo, "i"), ns = new RegExp(Qo, "gi"), rs = (e, t) => Array.isArray(t) && t.some((t) => t instanceof RegExp ? t.flags.includes("g") || t.flags.includes("y") ? new RegExp(t.source, t.flags.replaceAll(/[gy]/g, "")).test(e) : t.test(e) : t === e), is = /* @__PURE__ */ new Set([
	"https:",
	"http:",
	"file:"
]), as = (e) => {
	if (typeof e != "string") return;
	let t = e.trim().toLowerCase().replace(/:$/, "");
	return t === "" ? void 0 : `${t}:`;
}, os = (e) => {
	try {
		let { protocol: t } = new URL(e), n = e.slice(0, t.length + 2).toLowerCase() === `${t}//`;
		if (t === "localhost:" && !n && /^\d{1,5}([/?#]|$)/.test(e.slice(t.length))) return;
		if (t.endsWith(":") && (!t.includes(".") || n) && !is.has(t)) return t;
	} catch {}
}, ss = (e) => {
	try {
		return decodeURIComponent(e.replaceAll("+", "%20"));
	} catch {
		return new URLSearchParams(`${e}=`).keys().next().value;
	}
}, cs = (e) => {
	let t = /* @__PURE__ */ new Set();
	if (!e) return t;
	for (let n of e.slice(1).split("&")) n && !n.includes("=") && t.add(ss(n));
	return t;
}, ls = (e) => {
	let t = e;
	try {
		t = decodeURIComponent(e);
	} catch {
		t = new URLSearchParams(e).toString();
	}
	let n = (e) => {
		let t = /* @__PURE__ */ new Set();
		for (let n of e.matchAll(es)) t.add(Number.parseInt(n[1], 10));
		return t;
	}, r = n(e);
	for (let e of n(t)) r.add(e);
	let i = 0;
	for (; r.has(i);) i++;
	return `${$o}${i}__`;
}, us = (e, t) => {
	if (!t) return e.sort(), e.toString();
	let n = (e) => e.replace(t, (e, t) => String.fromCodePoint(Number.parseInt(t, 16))), r = [...e.entries()];
	return r.sort(([e], [t]) => {
		let r = n(e), i = n(t);
		return r < i ? -1 : +(r > i);
	}), new URLSearchParams(r).toString();
}, ds = (e, t) => t ? e.replace(t, (e, t) => String.fromCodePoint(Number.parseInt(t, 16))) : e, fs = (e, t, n) => {
	let r = t === "always", i = t === "never", a = r || i ? void 0 : cs(n), o = (e) => e.replaceAll("+", "%20"), s = (e) => r ? `${e}=` : i || a.has(ss(e)) ? e : `${e}=`, c = (e) => {
		let t = e.indexOf("=");
		if (t === -1) return s(o(e));
		let n = e.slice(0, t), r = e.slice(t + 1);
		return r === "" ? n === "" ? "=" : s(o(n)) : `${o(n)}=${r}`;
	}, l = e.slice(1).split("&").filter(Boolean);
	return l.length === 0 ? "" : `?${l.map((e) => c(e)).join("&")}`;
}, ps = (e, { stripHash: t }) => {
	let n = /^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(e);
	if (!n) throw Error(`Invalid URL: ${e}`);
	let { type: r, data: i, hash: a } = n.groups, o = r.split(";"), s = o.at(-1) === "base64";
	s && o.pop();
	let c = o.shift().toLowerCase(), l = [...o.map((e) => {
		let [t, n = ""] = e.split("=").map((e) => e.trim());
		return t === "charset" && (n = n.toLowerCase(), n === Zo) ? "" : `${t}${n ? `=${n}` : ""}`;
	}).filter(Boolean)];
	s && l.push("base64"), (l.length > 0 || c && c !== Xo) && l.unshift(c);
	let u = t || !a ? "" : `#${a}`;
	return `data:${l.join(";")},${s ? i.trim() : i}${u}`;
};
function ms(e, t) {
	if (t = {
		defaultProtocol: "http",
		normalizeProtocol: !0,
		forceHttp: !1,
		forceHttps: !1,
		stripAuthentication: !0,
		stripHash: !1,
		stripTextFragment: !0,
		stripWWW: !0,
		removeQueryParameters: [/^utm_\w+/i],
		removeTrailingSlash: !0,
		removeSingleSlash: !0,
		removeDirectoryIndex: !1,
		removeExplicitPort: !1,
		sortQueryParameters: !0,
		removePath: !1,
		transformPath: !1,
		emptyQueryValue: "preserve",
		...t
	}, typeof t.defaultProtocol == "string" && !t.defaultProtocol.endsWith(":") && (t.defaultProtocol = `${t.defaultProtocol}:`), e = e.trim(), /^data:/i.test(e)) return ps(e, t);
	let n = Array.isArray(t.customProtocols) ? t.customProtocols : [], r = new Set(n.map((e) => as(e)).filter(Boolean)), i = os(e);
	if (i && !r.has(i)) return e;
	let a = e.startsWith("//");
	!(!a && /^\.*\//.test(e)) && !i && (e = e.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, t.defaultProtocol));
	let o = new URL(e);
	if (t.forceHttp && t.forceHttps) throw Error("The `forceHttp` and `forceHttps` options cannot be used together");
	if (t.forceHttp && o.protocol === "https:" && (o.protocol = "http:"), t.forceHttps && o.protocol === "http:" && (o.protocol = "https:"), t.stripAuthentication && (o.username = "", o.password = ""), t.stripHash ? o.hash = "" : t.stripTextFragment && (o.hash = o.hash.replace(/#?:~:text.*?$/i, "")), o.pathname) {
		let e = /\b[a-z][a-z\d+\-.]{1,50}:\/\//g, t = 0, n = "";
		for (;;) {
			let r = e.exec(o.pathname);
			if (!r) break;
			let i = r[0], a = r.index, s = o.pathname.slice(t, a);
			n += s.replaceAll(/\/{2,}/g, "/"), n += i, t = a + i.length;
		}
		let r = o.pathname.slice(t);
		n += r.replaceAll(/\/{2,}/g, "/"), o.pathname = n;
	}
	if (o.pathname) try {
		o.pathname = decodeURI(o.pathname).replaceAll("\\", "%5C");
	} catch {}
	if (t.removeDirectoryIndex === !0 && (t.removeDirectoryIndex = [/^index\.[a-z]+$/]), Array.isArray(t.removeDirectoryIndex) && t.removeDirectoryIndex.length > 0) {
		let e = o.pathname.split("/").filter(Boolean), n = e.at(-1);
		n && rs(n, t.removeDirectoryIndex) && (e.pop(), o.pathname = e.length > 0 ? `/${e.join("/")}/` : "/");
	}
	if (t.removePath && (o.pathname = "/"), t.transformPath && typeof t.transformPath == "function") {
		let e = o.pathname.split("/").filter(Boolean), n = t.transformPath(e);
		o.pathname = n?.length > 0 ? `/${n.join("/")}` : "/";
	}
	o.hostname && (o.hostname = o.hostname.replace(/\.$/, ""), t.stripWWW && /^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(o.hostname) && (o.hostname = o.hostname.replace(/^www\./, "")));
	let s = o.search, c;
	if (t.sortQueryParameters && ts.test(s)) {
		let e = ls(s);
		o.search = s.replaceAll(ns, (t) => `${e}${t.slice(1).toUpperCase()}`), c = RegExp(`${e}([0-9A-F]{2})`, "g");
	}
	let l = Array.isArray(t.keepQueryParameters), { searchParams: u } = o;
	if (!l && Array.isArray(t.removeQueryParameters) && t.removeQueryParameters.length > 0) for (let e of [...u.keys()]) rs(ds(e, c), t.removeQueryParameters) && u.delete(e);
	if (!l && t.removeQueryParameters === !0 && (o.search = ""), l && t.keepQueryParameters.length > 0) for (let e of [...u.keys()]) rs(ds(e, c), t.keepQueryParameters) || u.delete(e);
	else l && (o.search = "");
	t.sortQueryParameters && (o.search = us(o.searchParams, c), o.search = decodeURIComponent(o.search.replaceAll(/%(?:26|23|3f|25|2b)/gi, (e) => `%25${e.slice(1)}`)), c && (o.search = o.search.replace(c, "%$1"))), o.search = fs(o.search, t.emptyQueryValue, s), t.removeTrailingSlash && (o.pathname = o.pathname.replace(/\/$/, "")), t.removeExplicitPort && o.port && (o.port = "");
	let d = e;
	return e = o.toString(), !t.removeSingleSlash && o.pathname === "/" && !d.endsWith("/") && o.hash === "" && (e = e.replace(/\/$/, "")), (t.removeTrailingSlash || o.pathname === "/") && o.hash === "" && t.removeSingleSlash && (e = e.replace(/\/$/, "")), a && !t.normalizeProtocol && (e = e.replace(/^http:\/\//, "//")), t.stripProtocol && (e = e.replace(/^(?:https?:)?\/\//, "")), e;
}
//#endregion
//#region src/lib/CanvasWorld.js
var hs = class {
	constructor(e, t, n = "left-to-right") {
		this.canvases = e, this.layers = t, this.viewingDirection = n, this._canvasDimensions = null;
	}
	get canvasIds() {
		return this.canvases.map((e) => e.id);
	}
	get canvasDimensions() {
		if (this._canvasDimensions) return this._canvasDimensions;
		let [e, t] = this.canvasDirection, n = Math.min(...t === 0 ? this.canvases.map((e) => e.getHeight()) : this.canvases.map((e) => e.getWidth())), r = 0, i = 0, a = this.canvases.reduce((a, o) => {
			let s = 0, c = 0;
			return Number.isNaN(o.aspectRatio) || (t === 0 ? (s = n, c = Math.max(1, Math.floor(n * o.aspectRatio))) : (c = n, s = Math.max(1, Math.floor(n * (1 / o.aspectRatio))))), a.push({
				canvas: o,
				height: s,
				width: c,
				x: r,
				y: i
			}), r += e * c, i += t * s, a;
		}, []), o = t === 0 ? n : Math.abs(i), s = e === 0 ? n : Math.abs(r);
		return this._canvasDimensions = a.reduce((n, r) => (n.push({
			...r,
			x: e === -1 ? r.x + s - r.width : r.x,
			y: t === -1 ? r.y + o - r.height : r.y
		}), n), []), this._canvasDimensions;
	}
	contentResourceToWorldCoordinates(e) {
		let t = this.canvases.findIndex((t) => t.imageResources.find((t) => t.id === e.id)), n = this.canvases[t];
		if (!n) return [];
		let [r, i, a, o] = this.canvasToWorldCoordinates(n.id), s = n.onFragment(e.id);
		return s ? [
			r + s[0],
			i + s[1],
			s[2],
			s[3]
		] : [
			r,
			i,
			a,
			o
		];
	}
	canvasToWorldCoordinates(e) {
		let t = this.canvasDimensions.find((t) => t.canvas.id === e);
		return [
			t.x,
			t.y,
			t.width,
			t.height
		];
	}
	canvasScale(e) {
		let t = this.canvasDimensions.find((t) => t.canvas.id === e);
		if (!t) return 1;
		let n = t.canvas.getWidth();
		return !n || !t.width ? 1 : t.width / n;
	}
	get canvasDirection() {
		switch (this.viewingDirection) {
			case "left-to-right": return [1, 0];
			case "right-to-left": return [-1, 0];
			case "top-to-bottom": return [0, 1];
			case "bottom-to-top": return [0, -1];
			default: return [1, 0];
		}
	}
	contentResource(e) {
		let t = this.canvases.find((t) => t.imageServiceIds.some((t) => t && e && ms(t, { stripAuthentication: !1 }) === ms(e, { stripAuthentication: !1 })));
		if (t) return t.imageResources.find((t) => ms(_t(t).id, { stripAuthentication: !1 }) === ms(e, { stripAuthentication: !1 }));
	}
	getLayerMetadata(e) {
		let t = this.canvases.find((t) => t.imageResources.find((t) => t.id === e.id));
		if (!t) return;
		let n = t.imageResources.findIndex((t) => t.id === e.id), r = t.imageResources.find((t) => t.id === e.id), i = this.layers && this.layers[t.canvas.id], a = i && i[e.id] || {};
		return {
			index: n,
			opacity: 1,
			total: t.imageResources.length,
			visibility: !!r.preferred,
			...a
		};
	}
	layerOpacityOfImageResource(e) {
		let t = this.getLayerMetadata(e);
		return t ? t.visibility ? t.opacity : 0 : 1;
	}
	layerIndexOfImageResource(e) {
		let t = this.getLayerMetadata(e);
		if (t) return t.index;
	}
	offsetByCanvas(e) {
		let t = this.canvasToWorldCoordinates(e);
		return {
			x: t[0],
			y: t[1]
		};
	}
	hasDimensions() {
		return this.canvasDimensions.length > 0;
	}
	worldBounds() {
		return [
			0,
			0,
			Math.max(0, ...this.canvasDimensions.map((e) => e.x + e.width)),
			Math.max(0, ...this.canvasDimensions.map((e) => e.y + e.height))
		];
	}
	canvasAtPoint(e) {
		let t = this.canvasDimensions.find((t) => t.x <= e.x && e.x <= t.x + t.width && t.y <= e.y && e.y <= t.y + t.height);
		return t && t.canvas;
	}
}, gs = ce([
	Tt,
	Cr,
	Xe,
	Ze
], (e, t, n, r) => new hs(e.map(r), t, n)), _s = /* @__PURE__ */ me({
	EMPTY_ARRAY: () => Se,
	EMPTY_OBJECT: () => w,
	getAccessTokens: () => qo,
	getAllowedWindowViewTypes: () => At,
	getAnnotationResourcesByMotivation: () => gr,
	getAnnotationResourcesByMotivationForCanvas: () => Jn,
	getAnnotationResourcesDataForCanvas: () => Vn,
	getAnnotations: () => Bn,
	getAuth: () => Jo,
	getAuthProfiles: () => Ko,
	getCanvas: () => Sn,
	getCanvasDescription: () => an,
	getCanvasForAnnotation: () => mr,
	getCanvasGrouping: () => gn,
	getCanvasGroupings: () => Kt,
	getCanvasIndex: () => Qe,
	getCanvasLabel: () => Dt,
	getCanvasLayers: () => Tr,
	getCanvasMetadata: () => cn,
	getCanvases: () => yn,
	getCatalog: () => be,
	getCompanionAreaVisibility: () => Le,
	getCompanionWindow: () => Fe,
	getCompanionWindowIdsForPosition: () => rt,
	getCompanionWindowLocale: () => Qt,
	getCompanionWindows: () => ke,
	getCompanionWindowsForContent: () => Xt,
	getCompanionWindowsForPosition: () => $e,
	getConfig: () => Gt,
	getContainerId: () => Ut,
	getCurrentCanvas: () => Mt,
	getCurrentCanvasWorld: () => gs,
	getDefaultSidebarVariant: () => Go,
	getDestructuredMetadata: () => Ae,
	getElasticLayout: () => Ie,
	getExpandedNodeIds: () => Uo,
	getExportableState: () => Et,
	getFocusedWindowId: () => Pe,
	getFullScreenEnabled: () => nt,
	getIiifThumbnailOpts: () => Lt,
	getLanguagesFromConfigWithCurrent: () => kn,
	getLatestError: () => Zt,
	getLayers: () => Dr,
	getLayersForVisibleCanvases: () => Cr,
	getLayersForWindow: () => yr,
	getLocale: () => gt,
	getLocalizedSequenceTreeStructure: () => et,
	getManifest: () => le,
	getManifestAutocompleteService: () => He,
	getManifestDescription: () => mt,
	getManifestError: () => vt,
	getManifestHomepage: () => Be,
	getManifestLocale: () => Je,
	getManifestLogo: () => mn,
	getManifestMetadata: () => Ke,
	getManifestProviderName: () => St,
	getManifestRelated: () => bt,
	getManifestRelatedContent: () => wt,
	getManifestRenderings: () => ot,
	getManifestSearchService: () => De,
	getManifestSeeAlso: () => Rt,
	getManifestStatus: () => wn,
	getManifestSummary: () => sn,
	getManifestThumbnail: () => vn,
	getManifestTitle: () => Jt,
	getManifestUrl: () => kt,
	getManifestoInstance: () => un,
	getManifests: () => ge,
	getManuallyExpandedNodeIds: () => Ho,
	getMaximizedWindowsIds: () => Mn,
	getMetadataLocales: () => xn,
	getMiradorCanvasWrapper: () => Ze,
	getMiradorManifestWrapper: () => lt,
	getNextCanvasGrouping: () => $t,
	getNextSearchId: () => $n,
	getNodeIdToScrollTo: () => Wo,
	getPresentAnnotationsOnSelectedCanvases: () => Gn,
	getPreviousCanvasGrouping: () => Tn,
	getProviderLogo: () => Pt,
	getRequestsConfig: () => Fn,
	getRequiredStatement: () => tn,
	getResourceAnnotationForSearchHit: () => er,
	getResourceAnnotationLabel: () => ur,
	getRights: () => Dn,
	getSearchAnnotationsForCompanionWindow: () => sr,
	getSearchAnnotationsForWindow: () => nr,
	getSearchForWindow: () => tr,
	getSearchIsFetching: () => Yn,
	getSearchNumTotal: () => hr,
	getSearchQuery: () => vr,
	getSelectedAnnotationId: () => ar,
	getSelectedAnnotationsOnCanvases: () => Rn,
	getSelectedContentSearchAnnotationIds: () => Zn,
	getSequence: () => it,
	getSequenceBehaviors: () => Re,
	getSequenceTreeStructure: () => We,
	getSequenceViewingDirection: () => Xe,
	getSequenceViewingHint: () => ct,
	getSequences: () => In,
	getShowZoomControlsConfig: () => jt,
	getSortedLayers: () => Er,
	getSortedSearchAnnotationsForCompanionWindow: () => _r,
	getSortedSearchHitsForCompanionWindow: () => qn,
	getTheme: () => Nn,
	getThemeDirection: () => dt,
	getThemeIds: () => Ne,
	getThumbnailFactory: () => Vt,
	getThumbnailNavigationPosition: () => tt,
	getThumbnailsConfig: () => jn,
	getViewer: () => re,
	getVisibleCanvasAudioResources: () => Ft,
	getVisibleCanvasCaptions: () => zt,
	getVisibleCanvasIds: () => dn,
	getVisibleCanvasNonTiledResources: () => nn,
	getVisibleCanvasTextResources: () => Wt,
	getVisibleCanvasVideoResources: () => Ht,
	getVisibleCanvases: () => Tt,
	getVisibleNodeIds: () => zo,
	getWindow: () => b,
	getWindowConfig: () => ut,
	getWindowDraggability: () => Me,
	getWindowIds: () => de,
	getWindowManifests: () => ve,
	getWindowTitles: () => An,
	getWindowViewType: () => ft,
	getWindows: () => S,
	getWorkspace: () => se,
	getWorkspaceType: () => Oe,
	isFocused: () => Yt,
	miradorSlice: () => ee,
	selectCompanionWindowDimensions: () => at,
	selectCurrentAuthServices: () => Yo,
	selectInfoResponse: () => On,
	selectInfoResponses: () => Pn,
	sortSearchAnnotationsByCanvasOrder: () => zn
}), vs = {
	content: null,
	position: null
};
function ys(e, t, n = vs) {
	let r = `cw-${y()}`;
	return {
		id: r,
		payload: {
			...n,
			...t,
			id: r,
			windowId: e
		},
		type: j.ADD_COMPANION_WINDOW,
		windowId: e
	};
}
function bs(e, t, n = vs) {
	return (r, i) => {
		let a = i(), { position: o } = t, s = o === "left" && rt(a, {
			position: o,
			windowId: e
		})[0];
		r(s ? xs(e, s, t) : ys(e, t, n));
	};
}
function xs(e, t, n) {
	return {
		id: t,
		payload: n,
		type: j.UPDATE_COMPANION_WINDOW,
		windowId: e
	};
}
function Ss(e, t) {
	return {
		id: t,
		type: j.REMOVE_COMPANION_WINDOW,
		windowId: e
	};
}
function Cs(e, t, n) {
	return (r, i) => {
		let a = i(), o = Ho(a, { companionWindowId: t }, !1), s = Ho(a, { companionWindowId: t }, !0), c = zo(a, {
			id: t,
			windowId: e
		}), l = o.indexOf(n) !== -1 || s.indexOf(n) === -1 && c.indexOf(n) === -1;
		return r({
			id: t,
			payload: { [n]: { expanded: l } },
			type: j.TOGGLE_TOC_NODE,
			windowId: e
		});
	};
}
function ws(e, t, n) {
	return (r, i) => {
		let a = Ho(i(), { companionWindowId: t }, !0), o = {};
		return a.forEach((e) => {
			o[e] = { expanded: !1 };
		}), n.forEach((e) => {
			o[e] = { expanded: !0 };
		}), r({
			id: t,
			payload: o,
			type: j.TOGGLE_TOC_NODE,
			windowId: e
		});
	};
}
//#endregion
//#region src/state/actions/config.js
function Ts(e) {
	return {
		config: e,
		type: j.IMPORT_CONFIG
	};
}
function Es(e) {
	return {
		config: e,
		type: j.SET_CONFIG
	};
}
function Ds(e) {
	return {
		config: e,
		type: j.UPDATE_CONFIG
	};
}
function Os(e) {
	return {
		state: {
			...e,
			workspace: {
				...e.workspace,
				id: y()
			}
		},
		type: j.IMPORT_MIRADOR_STATE
	};
}
//#endregion
//#region src/state/actions/errors.js
function ks(e) {
	return {
		id: `error-${y()}`,
		message: e,
		type: j.ADD_ERROR
	};
}
function As(e) {
	return {
		id: e,
		type: j.REMOVE_ERROR
	};
}
//#endregion
//#region src/state/actions/manifest.js
function js(e, t) {
	return {
		manifestId: e,
		properties: t,
		type: j.REQUEST_MANIFEST
	};
}
function Ms(e, t) {
	return {
		manifestId: e,
		manifestJson: t,
		type: j.RECEIVE_MANIFEST
	};
}
function Ns(e, t) {
	return {
		error: t,
		manifestId: e,
		type: j.RECEIVE_MANIFEST_FAILURE
	};
}
function Ps(e, t) {
	return js(e, {
		...t,
		isFetching: !0
	});
}
function Fs(e) {
	return {
		manifestId: e,
		type: j.REMOVE_MANIFEST
	};
}
//#endregion
//#region src/state/actions/infoResponse.js
function Is(e, t, n) {
	return {
		imageResource: t,
		infoId: e,
		type: j.REQUEST_INFO_RESPONSE,
		windowId: n
	};
}
function Ls(e, t, n, r) {
	return {
		infoId: e,
		infoJson: t,
		ok: n,
		tokenServiceId: r,
		type: j.RECEIVE_INFO_RESPONSE
	};
}
function Rs(e, t, n, r, i) {
	return {
		infoId: e,
		infoJson: t,
		ok: n,
		tokenServiceId: r,
		type: j.RECEIVE_DEGRADED_INFO_RESPONSE,
		windowId: i
	};
}
function zs(e, t, n) {
	return {
		error: t,
		infoId: e,
		tokenServiceId: n,
		type: j.RECEIVE_INFO_RESPONSE_FAILURE
	};
}
function Bs({ imageId: e, imageResource: t, windowId: n }) {
	let r = t && _t(t);
	return Is(e || r.id, r, n);
}
function Vs(e) {
	return {
		infoId: e,
		type: j.REMOVE_INFO_RESPONSE
	};
}
//#endregion
//#region src/state/actions/workspace.js
function Hs(e) {
	return {
		config: e,
		type: j.UPDATE_WORKSPACE
	};
}
function Us(e) {
	return {
		showZoomControls: e,
		type: j.TOGGLE_ZOOM_CONTROLS
	};
}
function Ws(e) {
	return {
		layout: e,
		type: j.UPDATE_WORKSPACE_MOSAIC_LAYOUT
	};
}
function Gs(e) {
	return {
		isWorkspaceAddVisible: e,
		type: j.SET_WORKSPACE_ADD_VISIBILITY
	};
}
function Ks({ x: e, y: t }) {
	return {
		payload: { position: {
			x: e,
			y: t
		} },
		type: j.SET_WORKSPACE_VIEWPORT_POSITION
	};
}
function qs({ width: e, height: t }) {
	return {
		payload: { position: {
			height: t,
			width: e
		} },
		type: j.SET_WORKSPACE_VIEWPORT_POSITION
	};
}
function Js() {
	return { type: j.TOGGLE_DRAGGING };
}
//#endregion
//#region src/state/actions/auth.js
function Ys(e, t, n = void 0) {
	return {
		id: t,
		profile: n,
		type: j.ADD_AUTHENTICATION_REQUEST,
		windowId: e
	};
}
function Xs(e, t, n) {
	return {
		id: e,
		tokenServiceId: t,
		type: j.RESOLVE_AUTHENTICATION_REQUEST,
		...n
	};
}
function Zs(e, t) {
	return {
		authId: t,
		serviceId: e,
		type: j.REQUEST_ACCESS_TOKEN
	};
}
function Qs(e, t, n) {
	return {
		authId: e,
		json: n,
		serviceId: t,
		type: j.RECEIVE_ACCESS_TOKEN
	};
}
function $s(e, t, n) {
	return {
		authId: e,
		error: n,
		serviceId: t,
		type: j.RECEIVE_ACCESS_TOKEN_FAILURE
	};
}
function ec(e, t, n) {
	return n.accessToken ? Qs(e, t, n) : $s(e, t, n);
}
function tc({ authServiceId: e, tokenServiceId: t }) {
	return {
		id: e,
		tokenServiceId: t,
		type: j.RESET_AUTHENTICATION_STATE
	};
}
//#endregion
//#region src/state/actions/elasticLayout.js
function nc(e, t) {
	return {
		payload: t,
		type: j.UPDATE_ELASTIC_WINDOW_LAYOUT,
		windowId: e
	};
}
//#endregion
//#region src/state/actions/search.js
function rc(e, t, n, r) {
	return {
		companionWindowId: t,
		query: r,
		searchId: n,
		type: j.REQUEST_SEARCH,
		windowId: e
	};
}
function ic(e, t, n, r) {
	return {
		companionWindowId: t,
		searchId: n,
		searchJson: r,
		type: j.RECEIVE_SEARCH,
		windowId: e
	};
}
function ac(e, t, n, r) {
	return {
		companionWindowId: t,
		error: r,
		searchId: n,
		type: j.RECEIVE_SEARCH_FAILURE,
		windowId: e
	};
}
function oc(e, t) {
	return {
		companionWindowId: t,
		type: j.REMOVE_SEARCH,
		windowId: e
	};
}
function sc(e, t, n, r) {
	return rc(e, t, n, r);
}
function cc(e, t, n) {
	return {
		annotationIds: n,
		companionWindowId: t,
		type: j.SET_CONTENT_SEARCH_CURRENT_ANNOTATIONS,
		windowId: e
	};
}
//#endregion
//#region src/state/actions/layers.js
function lc(e, t, n) {
	return {
		canvasId: t,
		payload: n,
		type: j.UPDATE_LAYERS,
		windowId: e
	};
}
//#endregion
//#region src/state/actions/catalog.js
function uc(e, t = void 0, n) {
	return {
		manifestId: e,
		manifestJson: t,
		payload: n,
		type: j.ADD_RESOURCE
	};
}
function dc(e) {
	return {
		manifestId: e,
		type: j.REMOVE_RESOURCE
	};
}
//#endregion
//#region src/state/actions/index.js
var fc = /* @__PURE__ */ me({
	ActionTypes: () => j,
	addAuthenticationRequest: () => Ys,
	addCompanionWindow: () => ys,
	addError: () => ks,
	addOrUpdateCompanionWindow: () => bs,
	addResource: () => uc,
	addWindow: () => Vr,
	deselectAnnotation: () => cr,
	expandNodes: () => ws,
	fetchInfoResponse: () => Bs,
	fetchManifest: () => Ps,
	fetchSearch: () => sc,
	focusWindow: () => Lr,
	hideCollectionDialog: () => zr,
	hoverAnnotation: () => dr,
	importConfig: () => Ts,
	importMiradorState: () => Os,
	maximizeWindow: () => Fr,
	minimizeWindow: () => jr,
	receiveAccessToken: () => Qs,
	receiveAccessTokenFailure: () => $s,
	receiveAnnotation: () => rr,
	receiveAnnotationFailure: () => Xn,
	receiveDegradedInfoResponse: () => Rs,
	receiveInfoResponse: () => Ls,
	receiveInfoResponseFailure: () => zs,
	receiveManifest: () => Ms,
	receiveManifestFailure: () => Ns,
	receiveSearch: () => ic,
	receiveSearchFailure: () => ac,
	removeCompanionWindow: () => Ss,
	removeError: () => As,
	removeInfoResponse: () => Vs,
	removeManifest: () => Fs,
	removeResource: () => dc,
	removeSearch: () => oc,
	removeWindow: () => Rr,
	requestAccessToken: () => Zs,
	requestAnnotation: () => lr,
	requestCanvasAnnotations: () => fr,
	requestInfoResponse: () => Is,
	requestManifest: () => js,
	requestSearch: () => rc,
	resetAuthenticationState: () => tc,
	resolveAccessTokenRequest: () => ec,
	resolveAuthenticationRequest: () => Xs,
	selectAnnotation: () => Qn,
	setCanvas: () => Gr,
	setCompanionAreaOpen: () => Br,
	setConfig: () => Es,
	setContentSearchCurrentAnnotation: () => cc,
	setNextCanvas: () => Kr,
	setPreviousCanvas: () => Wr,
	setWindowThumbnailPosition: () => Mr,
	setWindowViewType: () => Ir,
	setWorkspaceAddVisibility: () => Gs,
	setWorkspaceViewportDimensions: () => qs,
	setWorkspaceViewportPosition: () => Ks,
	showCollectionDialog: () => Hr,
	toggleAnnotationDisplay: () => or,
	toggleDraggingEnabled: () => Js,
	toggleNode: () => Cs,
	toggleWindowSideBar: () => Nr,
	toggleZoomControls: () => Us,
	updateCompanionWindow: () => xs,
	updateConfig: () => Ds,
	updateElasticWindowLayout: () => nc,
	updateLayers: () => lc,
	updateViewport: () => Ur,
	updateWindow: () => Pr,
	updateWorkspace: () => Hs,
	updateWorkspaceMosaicLayout: () => Ws
});
//#endregion
//#region node_modules/react-window/dist/react-window.js
function pc(e) {
	let t = e;
	for (; t;) {
		if (t.dir) return t.dir === "rtl";
		t = t.parentElement;
	}
	return !1;
}
function mc(e, t) {
	let [n, r] = zi(t === "rtl");
	return Ii(() => {
		e && (t || r(pc(e)));
	}, [t, e]), n;
}
var hc = typeof window < "u" ? Ii : L;
function gc(e) {
	if (e !== void 0) switch (typeof e) {
		case "number": return e;
		case "string":
			if (e.endsWith("px")) return parseFloat(e);
			break;
	}
}
function _c({ box: e, defaultHeight: t, defaultWidth: n, disabled: r, element: i, mode: a, style: o }) {
	let { styleHeight: s, styleWidth: c } = Li(() => ({
		styleHeight: gc(o?.height),
		styleWidth: gc(o?.width)
	}), [o?.height, o?.width]), [l, u] = zi({
		height: t,
		width: n
	}), d = r || a === "only-height" && s !== void 0 || a === "only-width" && c !== void 0 || s !== void 0 && c !== void 0;
	return hc(() => {
		if (i === null || d) return;
		let t = new ResizeObserver((e) => {
			for (let t of e) {
				let { contentRect: e, target: n } = t;
				i === n && u((t) => t.height === e.height && t.width === e.width ? t : {
					height: e.height,
					width: e.width
				});
			}
		});
		return t.observe(i, { box: e }), () => {
			t?.unobserve(i);
		};
	}, [
		e,
		d,
		i,
		s,
		c
	]), Li(() => ({
		height: s ?? l.height,
		width: c ?? l.width
	}), [
		l,
		s,
		c
	]);
}
function vc(e) {
	let t = R(() => {
		throw Error("Cannot call an event handler while rendering.");
	});
	return hc(() => {
		t.current = e;
	}, [e]), I((...e) => t.current?.(...e), [t]);
}
var yc = null;
function bc(e = !1) {
	if (yc === null || e) {
		let e = document.createElement("div"), t = e.style;
		t.width = "50px", t.height = "50px", t.overflow = "scroll", t.direction = "rtl";
		let n = document.createElement("div"), r = n.style;
		return r.width = "100px", r.height = "100px", e.appendChild(n), document.body.appendChild(e), e.scrollLeft > 0 ? yc = "positive-descending" : (e.scrollLeft = 1, yc = e.scrollLeft === 0 ? "negative" : "positive-ascending"), document.body.removeChild(e), yc;
	}
	return yc;
}
function xc({ containerElement: e, direction: t, isRtl: n, scrollOffset: r }) {
	if (t === "horizontal" && n) switch (bc()) {
		case "negative": return -r;
		case "positive-descending":
			if (e) {
				let { clientWidth: t, scrollLeft: n, scrollWidth: r } = e;
				return r - t - n;
			}
			break;
	}
	return r;
}
function Sc(e, t = "Assertion error") {
	if (!e) throw console.error(t), Error(t);
}
function Cc(e, t) {
	if (e === t) return !0;
	if (!!e != !!t || (Sc(e !== void 0), Sc(t !== void 0), Object.keys(e).length !== Object.keys(t).length)) return !1;
	for (let n in e) if (!Object.is(t[n], e[n])) return !1;
	return !0;
}
function wc({ cachedBounds: e, itemCount: t, itemSize: n }) {
	if (t === 0) return 0;
	if (typeof n == "number") return t * n;
	{
		let n = e.get(e.size === 0 ? 0 : e.size - 1);
		return Sc(n !== void 0, "Unexpected bounds cache miss"), t * ((n.scrollOffset + n.size) / e.size);
	}
}
function Tc({ align: e, cachedBounds: t, index: n, itemCount: r, itemSize: i, containerScrollOffset: a, containerSize: o }) {
	if (n < 0 || n >= r) throw RangeError(`Invalid index specified: ${n}`, { cause: `Index ${n} is not within the range of 0 - ${r - 1}` });
	let s = wc({
		cachedBounds: t,
		itemCount: r,
		itemSize: i
	}), c = t.get(n), l = Math.max(0, Math.min(s - o, c.scrollOffset)), u = Math.max(0, c.scrollOffset - o + c.size);
	switch (e === "smart" && (e = a >= u && a <= l ? "auto" : "center"), e) {
		case "start": return l;
		case "end": return u;
		case "center": return c.scrollOffset <= o / 2 ? 0 : c.scrollOffset + c.size / 2 >= s - o / 2 ? s - o : c.scrollOffset + c.size / 2 - o / 2;
		default: return a >= u && a <= l ? a : a < u ? u : l;
	}
}
function Ec({ cachedBounds: e, containerScrollOffset: t, containerSize: n, itemCount: r, overscanCount: i }) {
	let a = r - 1, o = 0, s = -1, c = 0, l = -1, u = 0;
	for (; u < a;) {
		let n = e.get(u);
		if (n.scrollOffset + n.size > t) break;
		u++;
	}
	for (o = u, c = Math.max(0, o - i); u < a;) {
		let r = e.get(u);
		if (r.scrollOffset + r.size >= t + n) break;
		u++;
	}
	return s = Math.min(a, u), l = Math.min(r - 1, s + i), o < 0 && (o = 0, s = -1, c = 0, l = -1), {
		startIndexVisible: o,
		stopIndexVisible: s,
		startIndexOverscan: c,
		stopIndexOverscan: l
	};
}
function Dc({ itemCount: e, itemProps: t, itemSize: n }) {
	let r = /* @__PURE__ */ new Map();
	return {
		get(i) {
			for (Sc(i < e, `Invalid index ${i}`); r.size - 1 < i;) {
				let e = r.size, a;
				switch (typeof n) {
					case "function":
						a = n(e, t);
						break;
					case "number": a = n;
				}
				if (e === 0) r.set(e, {
					size: a,
					scrollOffset: 0
				});
				else {
					let t = r.get(e - 1);
					Sc(t !== void 0, `Unexpected bounds cache miss for index ${i}`), r.set(e, {
						scrollOffset: t.scrollOffset + t.size,
						size: a
					});
				}
			}
			let a = r.get(i);
			return Sc(a !== void 0, `Unexpected bounds cache miss for index ${i}`), a;
		},
		set(e, t) {
			r.set(e, t);
		},
		get size() {
			return r.size;
		}
	};
}
function Oc({ itemCount: e, itemProps: t, itemSize: n }) {
	return Li(() => Dc({
		itemCount: e,
		itemProps: t,
		itemSize: n
	}), [
		e,
		t,
		n
	]);
}
function kc({ containerSize: e, itemSize: t }) {
	let n;
	switch (typeof t) {
		case "string":
			Sc(t.endsWith("%"), `Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`), Sc(e !== void 0, "Container size must be defined if a percentage item size is specified"), n = e * parseInt(t) / 100;
			break;
		default: n = t;
	}
	return n;
}
function Ac({ containerElement: e, containerStyle: t, defaultContainerSize: n = 0, direction: r, isRtl: i = !1, itemCount: a, itemProps: o, itemSize: s, onResize: c, overscanCount: l }) {
	let { height: u = n, width: d = n } = _c({
		defaultHeight: r === "vertical" ? n : void 0,
		defaultWidth: r === "horizontal" ? n : void 0,
		element: e,
		mode: r === "vertical" ? "only-height" : "only-width",
		style: t
	}), f = R({
		height: 0,
		width: 0
	}), p = r === "vertical" ? u : d, m = kc({
		containerSize: p,
		itemSize: s
	});
	Ii(() => {
		if (typeof c == "function") {
			let e = f.current;
			(e.height !== u || e.width !== d) && (c({
				height: u,
				width: d
			}, { ...e }), e.height = u, e.width = d);
		}
	}, [
		u,
		c,
		d
	]);
	let h = Oc({
		itemCount: a,
		itemProps: o,
		itemSize: m
	}), g = I((e) => h.get(e), [h]), [_, v] = zi(() => Ec({
		cachedBounds: h,
		containerScrollOffset: 0,
		containerSize: p,
		itemCount: a,
		overscanCount: l
	})), { startIndexVisible: y, startIndexOverscan: b, stopIndexVisible: x, stopIndexOverscan: S } = {
		startIndexVisible: Math.min(a - 1, _.startIndexVisible),
		startIndexOverscan: Math.min(a - 1, _.startIndexOverscan),
		stopIndexVisible: Math.min(a - 1, _.stopIndexVisible),
		stopIndexOverscan: Math.min(a - 1, _.stopIndexOverscan)
	}, C = I(() => wc({
		cachedBounds: h,
		itemCount: a,
		itemSize: m
	}), [
		h,
		a,
		m
	]), w = I((t) => {
		let n = xc({
			containerElement: e,
			direction: r,
			isRtl: i,
			scrollOffset: t
		});
		return Ec({
			cachedBounds: h,
			containerScrollOffset: n,
			containerSize: p,
			itemCount: a,
			overscanCount: l
		});
	}, [
		h,
		e,
		p,
		r,
		i,
		a,
		l
	]);
	return hc(() => {
		let t = (r === "vertical" ? e?.scrollTop : e?.scrollLeft) ?? 0;
		v(w(t));
	}, [
		e,
		r,
		w
	]), hc(() => {
		if (!e) return;
		let t = () => {
			v((t) => {
				let { scrollLeft: n, scrollTop: o } = e, s = xc({
					containerElement: e,
					direction: r,
					isRtl: i,
					scrollOffset: r === "vertical" ? o : n
				}), c = Ec({
					cachedBounds: h,
					containerScrollOffset: s,
					containerSize: p,
					itemCount: a,
					overscanCount: l
				});
				return Cc(c, t) ? t : c;
			});
		};
		return e.addEventListener("scroll", t), () => {
			e.removeEventListener("scroll", t);
		};
	}, [
		h,
		e,
		p,
		r,
		a,
		l
	]), {
		getCellBounds: g,
		getEstimatedSize: C,
		scrollToIndex: vc(({ align: t = "auto", containerScrollOffset: n, index: o }) => {
			let s = Tc({
				align: t,
				cachedBounds: h,
				containerScrollOffset: n,
				containerSize: p,
				index: o,
				itemCount: a,
				itemSize: m
			});
			if (e) {
				if (s = xc({
					containerElement: e,
					direction: r,
					isRtl: i,
					scrollOffset: s
				}), typeof e.scrollTo != "function") {
					let e = w(s);
					Cc(_, e) || v(e);
				}
				return s;
			}
		}),
		startIndexOverscan: b,
		startIndexVisible: y,
		stopIndexOverscan: S,
		stopIndexVisible: x
	};
}
function jc(e) {
	return Li(() => e, Object.values(e));
}
function Mc(e, t) {
	let { ariaAttributes: n, style: r, ...i } = e, { ariaAttributes: a, style: o, ...s } = t;
	return Cc(n, a) && Cc(r, o) && Cc(i, s);
}
function Nc({ cellComponent: e, cellProps: t, children: n, className: r, columnCount: i, columnKey: a, columnWidth: o, defaultHeight: s = 0, defaultWidth: c = 0, dir: l, gridRef: u, onCellsRendered: d, onResize: f, overscanCount: p = 3, rowCount: m, rowHeight: h, rowKey: g, style: _, tagName: v = "div", ...y }) {
	let b = jc(t), x = Li(() => Mi(e, Mc), [e]), [S, C] = zi(null), w = mc(S, l), { getCellBounds: T, getEstimatedSize: E, startIndexOverscan: ee, startIndexVisible: D, scrollToIndex: te, stopIndexOverscan: ne, stopIndexVisible: re } = Ac({
		containerElement: S,
		containerStyle: _,
		defaultContainerSize: c,
		direction: "horizontal",
		isRtl: w,
		itemCount: i,
		itemProps: b,
		itemSize: o,
		onResize: f,
		overscanCount: p
	}), { getCellBounds: ie, getEstimatedSize: ae, startIndexOverscan: oe, startIndexVisible: se, scrollToIndex: O, stopIndexOverscan: ce, stopIndexVisible: k } = Ac({
		containerElement: S,
		containerStyle: _,
		defaultContainerSize: s,
		direction: "vertical",
		itemCount: m,
		itemProps: b,
		itemSize: h,
		onResize: f,
		overscanCount: p
	});
	Fi(u, () => ({
		get element() {
			return S;
		},
		scrollToCell({ behavior: e = "auto", columnAlign: t = "auto", columnIndex: n, rowAlign: r = "auto", rowIndex: i }) {
			let a = te({
				align: t,
				containerScrollOffset: S?.scrollLeft ?? 0,
				index: n
			}), o = O({
				align: r,
				containerScrollOffset: S?.scrollTop ?? 0,
				index: i
			});
			typeof S?.scrollTo == "function" && S.scrollTo({
				behavior: e,
				left: a,
				top: o
			});
		},
		scrollToColumn({ align: e = "auto", behavior: t = "auto", index: n }) {
			let r = te({
				align: e,
				containerScrollOffset: S?.scrollLeft ?? 0,
				index: n
			});
			typeof S?.scrollTo == "function" && S.scrollTo({
				behavior: t,
				left: r
			});
		},
		scrollToRow({ align: e = "auto", behavior: t = "auto", index: n }) {
			let r = O({
				align: e,
				containerScrollOffset: S?.scrollTop ?? 0,
				index: n
			});
			typeof S?.scrollTo == "function" && S.scrollTo({
				behavior: t,
				top: r
			});
		}
	}), [
		S,
		te,
		O
	]), L(() => {
		ee >= 0 && ne >= 0 && oe >= 0 && ce >= 0 && d && d({
			columnStartIndex: D,
			columnStopIndex: re,
			rowStartIndex: se,
			rowStopIndex: k
		}, {
			columnStartIndex: ee,
			columnStopIndex: ne,
			rowStartIndex: oe,
			rowStopIndex: ce
		});
	}, [
		d,
		ee,
		D,
		ne,
		re,
		oe,
		se,
		ce,
		k
	]);
	let le = Li(() => {
		let e = [];
		if (i > 0 && m > 0) for (let t = oe; t <= ce; t++) {
			let n = ie(t), r = [];
			for (let e = ee; e <= ne; e++) {
				let i = T(e);
				r.push(/* @__PURE__ */ Di(x, {
					...b,
					ariaAttributes: {
						"aria-colindex": e + 1,
						role: "gridcell"
					},
					columnIndex: e,
					key: a ? a({
						columnIndex: e,
						data: b,
						rowIndex: t
					}) : e,
					rowIndex: t,
					style: {
						position: "absolute",
						left: w ? void 0 : 0,
						right: w ? 0 : void 0,
						transform: `translate(${w ? -i.scrollOffset : i.scrollOffset}px, ${n.scrollOffset}px)`,
						height: n.size,
						width: i.size
					}
				}));
			}
			e.push(/* @__PURE__ */ z("div", {
				role: "row",
				"aria-rowindex": t + 1,
				children: r
			}, g ? g({
				data: b,
				rowIndex: t
			}) : t));
		}
		return e;
	}, [
		x,
		b,
		i,
		a,
		ee,
		ne,
		T,
		ie,
		w,
		m,
		g,
		oe,
		ce
	]), ue = /* @__PURE__ */ z("div", {
		"aria-hidden": !0,
		style: {
			height: ae(),
			width: E(),
			zIndex: -1
		}
	});
	return Di(v, {
		"aria-colcount": i,
		"aria-rowcount": m,
		role: "grid",
		...y,
		className: r,
		dir: l,
		ref: C,
		style: {
			position: "relative",
			maxHeight: "100%",
			maxWidth: "100%",
			flexGrow: 1,
			overflow: "auto",
			..._
		}
	}, le, n, ue);
}
function Pc(e) {
	return typeof e == "object" && !!e && "getAverageRowHeight" in e && typeof e.getAverageRowHeight == "function";
}
var Fc = "data-react-window-index";
function Ic({ children: e, className: t, defaultHeight: n = 0, listRef: r, onResize: i, onRowsRendered: a, overscanCount: o = 3, rowComponent: s, rowCount: c, rowHeight: l, rowKey: u, rowProps: d, tagName: f = "div", style: p, ...m }) {
	let h = jc(d), g = Li(() => Mi(s, Mc), [s]), [_, v] = zi(null), y = Pc(l), { getCellBounds: b, getEstimatedSize: x, scrollToIndex: S, startIndexOverscan: C, startIndexVisible: w, stopIndexOverscan: T, stopIndexVisible: E } = Ac({
		containerElement: _,
		containerStyle: p,
		defaultContainerSize: n,
		direction: "vertical",
		itemCount: c,
		itemProps: h,
		itemSize: Li(() => y ? (e) => l.getRowHeight(e) ?? l.getAverageRowHeight() : l, [y, l]),
		onResize: i,
		overscanCount: o
	});
	Fi(r, () => ({
		get element() {
			return _;
		},
		scrollToRow({ align: e = "auto", behavior: t = "auto", index: n }) {
			let r = S({
				align: e,
				containerScrollOffset: _?.scrollTop ?? 0,
				index: n
			});
			typeof _?.scrollTo == "function" && _.scrollTo({
				behavior: t,
				top: r
			});
		}
	}), [_, S]), hc(() => {
		if (!_) return;
		let e = Array.from(_.children).filter((e, t) => {
			if (e.hasAttribute("aria-hidden")) return !1;
			let n = `${C + t}`;
			return e.setAttribute(Fc, n), !0;
		});
		if (y) return l.observeRowElements(e);
	}, [
		_,
		y,
		l,
		C,
		T
	]), L(() => {
		C >= 0 && T >= 0 && a && a({
			startIndex: w,
			stopIndex: E
		}, {
			startIndex: C,
			stopIndex: T
		});
	}, [
		a,
		C,
		w,
		T,
		E
	]);
	let ee = Li(() => {
		let e = [];
		if (c > 0) for (let t = C; t <= T; t++) {
			let n = b(t);
			e.push(/* @__PURE__ */ Di(g, {
				...h,
				ariaAttributes: {
					"aria-posinset": t + 1,
					"aria-setsize": c,
					role: "listitem"
				},
				key: u ? u(t, h) : t,
				index: t,
				style: {
					position: "absolute",
					left: 0,
					transform: `translateY(${n.scrollOffset}px)`,
					height: y ? void 0 : n.size,
					width: "100%"
				}
			}));
		}
		return e;
	}, [
		g,
		b,
		y,
		c,
		u,
		h,
		C,
		T
	]), D = /* @__PURE__ */ z("div", {
		"aria-hidden": !0,
		style: {
			height: x(),
			width: "100%",
			zIndex: -1
		}
	});
	return Di(f, {
		role: "list",
		...m,
		className: t,
		ref: v,
		style: {
			position: "relative",
			maxHeight: "100%",
			flexGrow: 1,
			overflowY: "auto",
			...p
		}
	}, ee, e, D);
}
//#endregion
//#region src/components/ThumbnailCanvasGrouping.jsx
var G = /* @__PURE__ */ k(Jr(), 1), Lc = H("div")(({ theme: e }) => ({
	boxSizing: "border-box",
	color: e.palette.common.white,
	cursor: "pointer",
	display: "inline-block",
	whiteSpace: "nowrap"
})), Rc = class extends Ci {
	constructor(e) {
		super(e), this.setCanvas = this.setCanvas.bind(this);
	}
	setCanvas(e) {
		let { setCanvas: t } = this.props;
		t(e.currentTarget.dataset.canvasId);
	}
	currentCanvasClass(e) {
		let { index: t } = this.props;
		return e.includes(t) ? "current-canvas-grouping" : "";
	}
	render() {
		let { index: e, columnIndex: t, style: n, canvasGroupings: r, position: i, currentCanvasId: a, showThumbnailLabels: o } = this.props, s = t === void 0 ? e : t, c = r[s], l = c.map((e) => e.id).includes(a);
		return /* @__PURE__ */ z("div", {
			style: {
				...n,
				boxSizing: "border-box",
				height: Number.isInteger(n.height) ? n.height - 12 : null,
				left: Number.isInteger(n.left) ? n.left + 6 : null,
				padding: 6,
				top: Number.isInteger(n.top) ? n.top + 6 : null,
				width: Number.isInteger(n.width) ? n.width - 12 : null
			},
			className: M("thumbnail-nav-container"),
			role: "gridcell",
			"aria-selected": l,
			"aria-colindex": s + 1,
			children: /* @__PURE__ */ z(Lc, {
				role: "button",
				"data-canvas-id": c[0].id,
				"data-canvas-index": c[0].index,
				onClick: this.setCanvas,
				tabIndex: -1,
				sx: (e) => ({
					"&:not(:hover)": {
						outline: l ? `2px solid ${e.palette.primary.main}` : 0,
						...l && { outlineOffset: "3px" }
					},
					"&:hover": {
						outline: l ? `2px solid ${e.palette.primary.main}` : `2px solid ${e.palette.action.hover}`,
						outlineOffset: l ? "3px" : "-2px"
					},
					height: i === "far-right" ? "auto" : `${n.height}px`,
					width: i === "far-bottom" ? "auto" : `${n.width}px`
				}),
				className: (0, G.default)(M([
					"thumbnail-nav-canvas",
					`thumbnail-nav-canvas-${s}`,
					this.currentCanvasClass(c.map((e) => e.index))
				])),
				children: c.map((e, t) => /* @__PURE__ */ z(ei, {
					resource: e,
					labelled: o,
					maxHeight: i === "far-right" ? n.height - 12 : n.height,
					variant: "inside"
				}, e.id))
			})
		});
	}
};
Rc.propTypes = {
	canvasGroupings: W.default.array.isRequired,
	columnIndex: W.default.number,
	currentCanvasId: W.default.string.isRequired,
	index: W.default.number,
	position: W.default.string.isRequired,
	setCanvas: W.default.func.isRequired,
	showThumbnailLabels: W.default.bool.isRequired,
	style: W.default.object.isRequired
}, Rc.defaultProps = {
	columnIndex: void 0,
	index: void 0
};
var zc = i(O((e, { windowId: t }) => ({
	currentCanvasId: (Mt(e, { windowId: t }) || {}).id,
	showThumbnailLabels: Gt(e).thumbnailNavigation.showThumbnailLabels
}), (e, { windowId: t }) => ({ setCanvas: (...n) => e(Gr(t, ...n)) })), A("ThumbnailCanvasGrouping"))(Rc);
//#endregion
//#region src/components/ThumbnailNavigation.jsx
function Bc({ canvasGroupings: e, canvasIndex: t, hasNextCanvas: n = !1, hasPreviousCanvas: r = !1, position: i, setNextCanvas: a = () => {}, setPreviousCanvas: o = () => {}, thumbnailNavigation: s, view: c = void 0, viewingDirection: l = "", windowId: u }) {
	let { t: d } = V(), f = R(), p = R(c);
	L(() => {
		p.current !== c && i !== "off" && (p.current = c);
	}, [c, i]), L(() => {
		let n = t;
		c === "book" && (n = Math.ceil(n / 2)), f.current && n >= 0 && n < e.length && (i === "far-bottom" ? f.current.scrollToCell({
			columnIndex: n,
			rowIndex: 0,
			columnAlign: "center",
			rowAlign: "center"
		}) : f.current.scrollToRow({
			index: n,
			align: "center"
		}));
	}, [
		t,
		c,
		e.length,
		i
	]);
	let m = R(null);
	L(() => {
		m.current && document.activeElement !== m.current && m.current.focus({ preventScroll: !0 });
	}, [t]);
	let h = (e) => {
		let t = "ArrowRight", n = "ArrowLeft";
		switch (i === "far-right" && (t = "ArrowDown", n = "ArrowUp"), e.key) {
			case t:
				b();
				break;
			case n: x();
		}
	}, g = (e) => e.getWidth() / e.getHeight(), _ = (t) => {
		let n = e[t];
		if (!n) return s.width + 12;
		let r = s.height - 12 - 6, i = Math.ceil(n.reduce((e, t) => e + r * g(t), 0));
		return Number.isInteger(i) ? i + 12 : s.width + 12;
	}, v = (t) => {
		let n = e[t];
		if (!n) return s.height + 12;
		let r = s.width - 12 - 6, i = n.reduce((e, t) => e + g(t), 0), a = Math.ceil(r * n.length / i);
		return Number.isInteger(a) ? Math.max(a, Math.round(s.height / 3)) + 12 : s.height + 12;
	}, y = I(() => {
		let e = c === "book" ? s.width * 2 : s.width;
		switch (i) {
			case "far-right": return { width: `${e}px` };
			default: return { width: "100%" };
		}
	}, [
		i,
		s,
		c
	]), b = () => {
		n && a();
	}, x = () => {
		r && o();
	};
	if (i === "off") return null;
	let S = l === "right-to-left" ? "rtl" : "ltr", C = {
		canvasGroupings: e,
		position: i,
		windowId: u
	};
	return /* @__PURE__ */ B(Vi, {
		className: (0, G.default)(M("thumb-navigation")),
		sx: {
			"&:focus": {
				boxShadow: 0,
				outline: 0
			},
			scrollbarGutter: "stable"
		},
		"aria-label": d("thumbnailNavigation"),
		square: !0,
		elevation: 0,
		style: y(),
		tabIndex: 0,
		onKeyDown: h,
		ref: m,
		children: [e.length > 0 && i === "far-bottom" && /* @__PURE__ */ z(Nc, {
			columnCount: e.length,
			columnWidth: _,
			rowCount: 1,
			rowHeight: s.height - 12 - 6,
			style: {
				direction: S === "rtl" ? "rtl" : "ltr",
				height: s.height
			},
			cellProps: C,
			gridRef: f,
			cellComponent: zc
		}), e.length > 0 && i === "far-right" && /* @__PURE__ */ z(Ic, {
			defaultHeight: 100,
			rowCount: e.length,
			rowHeight: v,
			style: {
				paddingBottom: 12,
				direction: S === "rtl" ? "rtl" : "ltr"
			},
			rowProps: C,
			listRef: f,
			rowComponent: zc
		})]
	});
}
Bc.propTypes = {
	canvasGroupings: W.default.array.isRequired,
	canvasIndex: W.default.number.isRequired,
	hasNextCanvas: W.default.bool,
	hasPreviousCanvas: W.default.bool,
	position: W.default.string.isRequired,
	setNextCanvas: W.default.func,
	setPreviousCanvas: W.default.func,
	thumbnailNavigation: W.default.object.isRequired,
	view: W.default.string,
	viewingDirection: W.default.string,
	windowId: W.default.string.isRequired
};
var Vc = i(O((e, { windowId: t }) => ({
	canvasGroupings: Kt(e, { windowId: t }),
	canvasIndex: Qe(e, { windowId: t }),
	hasNextCanvas: !!$t(e, { windowId: t }),
	hasPreviousCanvas: !!Tn(e, { windowId: t }),
	position: Fe(e, { companionWindowId: b(e, { windowId: t }).thumbnailNavigationId }).position,
	thumbnailNavigation: Gt(e).thumbnailNavigation,
	view: ft(e, { windowId: t }),
	viewingDirection: Xe(e, { windowId: t })
}), (e, { windowId: t }) => ({
	setNextCanvas: (...n) => e(Kr(t)),
	setPreviousCanvas: (...n) => e(Wr(t))
})), A("ThumbnailNavigation"))(Bc), Hc = N(/*#__PURE__*/ z("path", { d: "M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3" }), "VisibilitySharp"), Uc = N(/*#__PURE__*/ z("path", { d: "M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24M3.42 2.45 2.01 3.87l2.68 2.68C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l3.43 3.43 1.41-1.41zM12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5m2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64z" }), "VisibilityOffSharp");
//#endregion
//#region src/components/AnnotationSettings.jsx
function Wc({ displayAll: e, displayAllDisabled: t, toggleAnnotationDisplay: n }) {
	let { t: r } = V();
	return /* @__PURE__ */ z(ii, {
		"aria-label": r(e ? "displayNoAnnotations" : "highlightAllAnnotations"),
		onClick: n,
		disabled: t,
		size: "small",
		children: z(e ? Hc : Uc, {})
	});
}
Wc.propTypes = {
	displayAll: W.default.bool.isRequired,
	displayAllDisabled: W.default.bool.isRequired,
	toggleAnnotationDisplay: W.default.func.isRequired,
	windowId: W.default.string.isRequired
};
var Gc = i(O((e, { windowId: t }) => ({
	displayAll: b(e, { windowId: t }).highlightAllAnnotations,
	displayAllDisabled: gr(e, { windowId: t }).length < 1
}), (e, { windowId: t }) => ({ toggleAnnotationDisplay: () => {
	e(or(t));
} })), A("AnnotationSettings"))(Wc);
//#endregion
//#region node_modules/dompurify/dist/purify.es.mjs
function Kc(e, t) {
	this.v = e, this.k = t;
}
function qc(e, t) {
	(t == null || t > e.length) && (t = e.length);
	for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
	return r;
}
function Jc(e) {
	if (Array.isArray(e)) return e;
}
function Yc(e, t) {
	var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
	if (n != null) {
		var r, i, a, o, s = [], c = !0, l = !1;
		try {
			if (a = (n = n.call(e)).next, t === 0) {
				if (Object(n) !== n) return;
				c = !1;
			} else for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
		} catch (e) {
			l = !0, i = e;
		} finally {
			try {
				if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
			} finally {
				if (l) throw i;
			}
		}
		return s;
	}
}
function Xc() {
	throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function Zc(e, t) {
	return Jc(e) || Yc(e, t) || Qc(e, t) || Xc();
}
function Qc(e, t) {
	if (e) {
		if (typeof e == "string") return qc(e, t);
		var n = {}.toString.call(e).slice(8, -1);
		return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? qc(e, t) : void 0;
	}
}
function $c(e) {
	var t, n;
	function r(t, n) {
		try {
			var a = e[t](n), o = a.value, s = o instanceof Kc;
			Promise.resolve(s ? o.v : o).then(function(n) {
				if (s) {
					var c = t === "return" && o.k ? t : "next";
					if (!o.k || n.done) return r(c, n);
					n = e[c](n).value;
				}
				i(!!a.done, n);
			}, function(e) {
				r("throw", e);
			});
		} catch (e) {
			i(2, e);
		}
	}
	function i(e, i) {
		e === 2 ? t.reject(i) : t.resolve({
			value: i,
			done: e
		}), (t = t.next) ? r(t.key, t.arg) : n = null;
	}
	this._invoke = function(e, i) {
		return new Promise(function(a, o) {
			var s = {
				key: e,
				arg: i,
				resolve: a,
				reject: o,
				next: null
			};
			n ? n = n.next = s : (t = n = s, r(e, i));
		});
	}, typeof e.return != "function" && (this.return = void 0);
}
$c.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
	return this;
}, $c.prototype.next = function(e) {
	return this._invoke("next", e);
}, $c.prototype.throw = function(e) {
	return this._invoke("throw", e);
}, $c.prototype.return = function(e) {
	return this._invoke("return", e);
};
var el = Object.entries, tl = Object.setPrototypeOf, nl = Object.isFrozen, rl = Object.getPrototypeOf, il = Object.getOwnPropertyDescriptor, al = Object.freeze, ol = Object.seal, sl = Object.create, cl = typeof Reflect < "u" && Reflect, ll = cl.apply, ul = cl.construct;
al ||= function(e) {
	return e;
}, ol ||= function(e) {
	return e;
}, ll ||= function(e, t) {
	var n = [...arguments].slice(2);
	return e.apply(t, n);
}, ul ||= function(e) {
	return new e(...[...arguments].slice(1));
};
var dl = jl(Array.prototype.forEach);
Array.prototype.indexOf;
var fl = jl(Array.prototype.lastIndexOf), pl = jl(Array.prototype.pop), ml = jl(Array.prototype.push);
Array.prototype.slice;
var hl = jl(Array.prototype.splice), gl = Array.isArray, _l = jl(String.prototype.toLowerCase), vl = jl(String.prototype.toString), yl = jl(String.prototype.match), bl = jl(String.prototype.replace), xl = jl(String.prototype.indexOf), Sl = jl(String.prototype.trim), Cl = jl(Number.prototype.toString), wl = jl(Boolean.prototype.toString), Tl = typeof BigInt > "u" ? null : jl(BigInt.prototype.toString), El = typeof Symbol > "u" ? null : jl(Symbol.prototype.toString), Dl = jl(Object.prototype.hasOwnProperty), Ol = jl(Object.prototype.toString), kl = jl(RegExp.prototype.test), Al = Ml(TypeError);
function jl(e) {
	return function(t) {
		t instanceof RegExp && (t.lastIndex = 0);
		var n = [...arguments].slice(1);
		return ll(e, t, n);
	};
}
function Ml(e) {
	return function() {
		return ul(e, [...arguments]);
	};
}
function Nl(e, t) {
	let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : _l;
	if (tl && tl(e, null), !gl(t)) return e;
	let r = t.length;
	for (; r--;) {
		let i = t[r];
		if (typeof i == "string") {
			let e = n(i);
			e !== i && (nl(t) || (t[r] = e), i = e);
		}
		e[i] = !0;
	}
	return e;
}
function Pl(e) {
	for (let t = 0; t < e.length; t++) Dl(e, t) || (e[t] = null);
	return e;
}
function Fl(e) {
	let t = sl(null);
	for (let r of el(e)) {
		var n = Zc(r, 2);
		let i = n[0], a = n[1];
		Dl(e, i) && (t[i] = gl(a) ? Pl(a) : a && typeof a == "object" && a.constructor === Object ? Fl(a) : a);
	}
	return t;
}
function Il(e) {
	switch (typeof e) {
		case "string": return e;
		case "number": return Cl(e);
		case "boolean": return wl(e);
		case "bigint": return Tl ? Tl(e) : "0";
		case "symbol": return El ? El(e) : "Symbol()";
		case "undefined": return Ol(e);
		case "function":
		case "object": {
			if (e === null) return Ol(e);
			let t = e, n = Ll(t, "toString");
			if (typeof n == "function") {
				let e = n(t);
				return typeof e == "string" ? e : Ol(e);
			}
			return Ol(e);
		}
		default: return Ol(e);
	}
}
function Ll(e, t) {
	for (; e !== null;) {
		let n = il(e, t);
		if (n) {
			if (n.get) return jl(n.get);
			if (typeof n.value == "function") return jl(n.value);
		}
		e = rl(e);
	}
	function n() {
		return null;
	}
	return n;
}
function Rl(e) {
	try {
		return kl(e, ""), !0;
	} catch {
		return !1;
	}
}
var zl = al(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Bl = al(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Vl = al([
	"feBlend",
	"feColorMatrix",
	"feComponentTransfer",
	"feComposite",
	"feConvolveMatrix",
	"feDiffuseLighting",
	"feDisplacementMap",
	"feDistantLight",
	"feDropShadow",
	"feFlood",
	"feFuncA",
	"feFuncB",
	"feFuncG",
	"feFuncR",
	"feGaussianBlur",
	"feImage",
	"feMerge",
	"feMergeNode",
	"feMorphology",
	"feOffset",
	"fePointLight",
	"feSpecularLighting",
	"feSpotLight",
	"feTile",
	"feTurbulence"
]), Hl = al([
	"animate",
	"color-profile",
	"cursor",
	"discard",
	"font-face",
	"font-face-format",
	"font-face-name",
	"font-face-src",
	"font-face-uri",
	"foreignobject",
	"hatch",
	"hatchpath",
	"mesh",
	"meshgradient",
	"meshpatch",
	"meshrow",
	"missing-glyph",
	"script",
	"set",
	"solidcolor",
	"unknown",
	"use"
]), Ul = al(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Wl = al([
	"maction",
	"maligngroup",
	"malignmark",
	"mlongdiv",
	"mscarries",
	"mscarry",
	"msgroup",
	"mstack",
	"msline",
	"msrow",
	"semantics",
	"annotation",
	"annotation-xml",
	"mprescripts",
	"none"
]), Gl = al(["#text"]), Kl = al(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), ql = al(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Jl = al(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Yl = al([
	"xlink:href",
	"xml:id",
	"xlink:title",
	"xml:space",
	"xmlns:xlink"
]), Xl = ol(/{{[\w\W]*|^[\w\W]*}}/g), Zl = ol(/<%[\w\W]*|^[\w\W]*%>/g), Ql = ol(/\${[\w\W]*/g), $l = ol(/^data-[\-\w.\u00B7-\uFFFF]+$/), eu = ol(/^aria-[\-\w]+$/), tu = ol(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), nu = ol(/^(?:\w+script|data):/i), ru = ol(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), iu = ol(/^html$/i), au = ol(/^[a-z][.\w]*(-[.\w]+)+$/i), ou = ol(/<[/\w!]/g), su = ol(/<[/\w]/g), cu = ol(/<\/no(script|embed|frames)/i), lu = ol(/\/>/i), uu = {
	element: 1,
	attribute: 2,
	text: 3,
	cdataSection: 4,
	entityReference: 5,
	entityNode: 6,
	processingInstruction: 7,
	comment: 8,
	document: 9,
	documentType: 10,
	documentFragment: 11,
	notation: 12
}, du = [
	"style",
	"script",
	"xmp",
	"iframe",
	"noembed",
	"noframes",
	"plaintext",
	"noscript"
], fu = al(Nl({}, du)), pu = function() {
	let e = {};
	return dl(du, (t) => {
		e[t] = ol(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
	}), al(e);
}(), mu = function() {
	return typeof window > "u" ? null : window;
}, hu = function(e, t) {
	if (typeof e != "object" || typeof e.createPolicy != "function") return null;
	let n = null, r = "data-tt-policy-suffix";
	t && t.hasAttribute(r) && (n = t.getAttribute(r));
	let i = "dompurify" + (n ? "#" + n : "");
	try {
		return e.createPolicy(i, {
			createHTML(e) {
				return e;
			},
			createScriptURL(e) {
				return e;
			}
		});
	} catch {
		return console.warn("TrustedTypes policy " + i + " could not be created."), null;
	}
}, gu = function() {
	return {
		afterSanitizeAttributes: [],
		afterSanitizeElements: [],
		afterSanitizeShadowDOM: [],
		beforeSanitizeAttributes: [],
		beforeSanitizeElements: [],
		beforeSanitizeShadowDOM: [],
		uponSanitizeAttribute: [],
		uponSanitizeElement: [],
		uponSanitizeShadowNode: []
	};
}, _u = function(e, t, n, r) {
	return Dl(e, t) && gl(e[t]) ? Nl(r.base ? Fl(r.base) : {}, e[t], r.transform) : n;
}, vu = function(e, t, n) {
	let r = Dl(e, t) ? e[t] : void 0;
	return r && typeof r == "object" ? Fl(r) : n();
};
function yu() {
	let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : mu(), t = (e) => yu(e);
	if (t.version = "3.4.16", t.removed = [], !e || !e.document || e.document.nodeType !== uu.document || !e.Element) return t.isSupported = !1, t;
	let n = e.document, r = n, i = r.currentScript;
	e.DocumentFragment;
	let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
	e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
	let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Ll(d, "cloneNode"), p = Ll(d, "remove"), m = Ll(d, "removeAttributeNode"), h = Ll(d, "nextSibling"), g = Ll(d, "childNodes"), _ = Ll(d, "parentNode"), v = Ll(d, "shadowRoot"), y = Ll(d, "attributes"), b = o && o.prototype ? Ll(o.prototype, "nodeType") : null, x = o && o.prototype ? Ll(o.prototype, "nodeName") : null, S = o && o.prototype ? Ll(o.prototype, "ownerDocument") : null, C = function(e) {
		return b ? b(e) : e.nodeType;
	}, w = function(e) {
		return x ? x(e) : e.nodeName;
	};
	if (typeof a == "function") {
		let e = n.createElement("template");
		e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
	}
	let T, E = "", ee, D = !1, te = 0, ne = function() {
		if (te > 0) throw Al("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
	}, re = function(e) {
		ne(), te++;
		try {
			return T.createHTML(e);
		} finally {
			te--;
		}
	}, ie = function(e) {
		ne(), te++;
		try {
			return T.createScriptURL(e);
		} finally {
			te--;
		}
	}, ae = function() {
		return D ||= (ee = hu(u, i), !0), ee;
	}, oe = n, se = oe.implementation, O = oe.createNodeIterator, ce = oe.createDocumentFragment, k = oe.getElementsByTagName, le = r.importNode, ue = gu();
	t.isSupported = typeof el == "function" && typeof _ == "function" && se && se.createHTMLDocument !== void 0;
	let de = Xl, fe = Zl, pe = Ql, me = $l, he = eu, ge = nu, _e = ru, ve = au, ye = tu, be = null, xe = Nl({}, [
		...zl,
		...Bl,
		...Vl,
		...Ul,
		...Gl
	]), Se = null, Ce = Nl({}, [
		...Kl,
		...ql,
		...Jl,
		...Yl
	]), A = Object.seal(sl(null, {
		tagNameCheck: {
			writable: !0,
			configurable: !1,
			enumerable: !0,
			value: null
		},
		attributeNameCheck: {
			writable: !0,
			configurable: !1,
			enumerable: !0,
			value: null
		},
		allowCustomizedBuiltInElements: {
			writable: !0,
			configurable: !1,
			enumerable: !0,
			value: !1
		}
	})), we = null, Te = null, Ee = Object.seal(sl(null, {
		tagCheck: {
			writable: !0,
			configurable: !1,
			enumerable: !0,
			value: null
		},
		attributeCheck: {
			writable: !0,
			configurable: !1,
			enumerable: !0,
			value: null
		}
	})), De = !0, Oe = !0, ke = !1, Ae = !0, je = !1, Me = !0, Ne = !1, Pe = !1, Fe = null, Ie = null, Le = !1, Re = !1, ze = !1, Be = !1, Ve = !0, He = !1, Ue = "user-content-", We = !0, Ge = !1, Ke = {}, qe = null, Je = Nl({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ye = null, Xe = Nl({}, [
		"audio",
		"video",
		"img",
		"source",
		"image",
		"track"
	]), Ze = null, Qe = Nl({}, [
		"alt",
		"class",
		"for",
		"id",
		"label",
		"name",
		"pattern",
		"placeholder",
		"role",
		"summary",
		"title",
		"value",
		"style",
		"xmlns"
	]), $e = "http://www.w3.org/1998/Math/MathML", et = "http://www.w3.org/2000/svg", tt = "http://www.w3.org/1999/xhtml", nt = tt, rt = !1, it = null, at = Nl({}, [
		$e,
		et,
		tt
	], vl), ot = al([
		"mi",
		"mo",
		"mn",
		"ms",
		"mtext"
	]), st = Nl({}, ot), ct = al(["annotation-xml"]), lt = Nl({}, ct), ut = Nl({}, [
		"title",
		"style",
		"font",
		"a",
		"script"
	]), dt = null, ft = ["application/xhtml+xml", "text/html"], pt = null, mt = null, ht = n.createElement("form"), gt = function(e) {
		return e instanceof RegExp || e instanceof Function;
	}, _t = function() {
		let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
		if (mt && mt === e) return;
		(!e || typeof e != "object") && (e = {}), e = Fl(e), dt = ft.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, pt = dt === "application/xhtml+xml" ? vl : _l, be = _u(e, "ALLOWED_TAGS", xe, { transform: pt }), Se = _u(e, "ALLOWED_ATTR", Ce, { transform: pt }), it = _u(e, "ALLOWED_NAMESPACES", at, { transform: vl }), Ze = _u(e, "ADD_URI_SAFE_ATTR", Qe, {
			transform: pt,
			base: Qe
		}), Ye = _u(e, "ADD_DATA_URI_TAGS", Xe, {
			transform: pt,
			base: Xe
		}), qe = _u(e, "FORBID_CONTENTS", Je, { transform: pt }), we = _u(e, "FORBID_TAGS", Fl({}), { transform: pt }), Te = _u(e, "FORBID_ATTR", Fl({}), { transform: pt }), Ke = Dl(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Fl(e.USE_PROFILES) : e.USE_PROFILES : !1, De = e.ALLOW_ARIA_ATTR !== !1, Oe = e.ALLOW_DATA_ATTR !== !1, ke = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ae = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, je = e.SAFE_FOR_TEMPLATES || !1, Me = e.SAFE_FOR_XML !== !1, Ne = e.WHOLE_DOCUMENT || !1, Re = e.RETURN_DOM || !1, ze = e.RETURN_DOM_FRAGMENT || !1, Be = e.RETURN_TRUSTED_TYPE || !1, Le = e.FORCE_BODY || !1, Ve = e.SANITIZE_DOM !== !1, He = e.SANITIZE_NAMED_PROPS || !1, We = e.KEEP_CONTENT !== !1, Ge = e.IN_PLACE || !1, ye = Rl(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : tu, nt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : tt, st = vu(e, "MATHML_TEXT_INTEGRATION_POINTS", () => Nl({}, ot)), lt = vu(e, "HTML_INTEGRATION_POINTS", () => Nl({}, ct));
		let t = vu(e, "CUSTOM_ELEMENT_HANDLING", () => sl(null));
		if (A = sl(null), Dl(t, "tagNameCheck") && gt(t.tagNameCheck) && (A.tagNameCheck = t.tagNameCheck), Dl(t, "attributeNameCheck") && gt(t.attributeNameCheck) && (A.attributeNameCheck = t.attributeNameCheck), Dl(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (A.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), ol(A), je && (Oe = !1), ze && (Re = !0), Ke && (be = Nl({}, Gl), Se = sl(null), Ke.html === !0 && (Nl(be, zl), Nl(Se, Kl)), Ke.svg === !0 && (Nl(be, Bl), Nl(Se, ql), Nl(Se, Yl)), Ke.svgFilters === !0 && (Nl(be, Vl), Nl(Se, ql), Nl(Se, Yl)), Ke.mathMl === !0 && (Nl(be, Ul), Nl(Se, Jl), Nl(Se, Yl))), Ee.tagCheck = null, Ee.attributeCheck = null, Dl(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Ee.tagCheck = e.ADD_TAGS : gl(e.ADD_TAGS) && (be === xe && (be = Fl(be)), Nl(be, e.ADD_TAGS, pt))), Dl(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Ee.attributeCheck = e.ADD_ATTR : gl(e.ADD_ATTR) && (Se === Ce && (Se = Fl(Se)), Nl(Se, e.ADD_ATTR, pt))), Dl(e, "ADD_FORBID_CONTENTS") && gl(e.ADD_FORBID_CONTENTS) && (qe === Je && (qe = Fl(qe)), Nl(qe, e.ADD_FORBID_CONTENTS, pt)), We && (be["#text"] = !0), Ne && Nl(be, [
			"html",
			"head",
			"body"
		]), be.table && (Nl(be, ["tbody"]), delete we.tbody), e.TRUSTED_TYPES_POLICY) {
			if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Al("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
			if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Al("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
			let t = T;
			T = e.TRUSTED_TYPES_POLICY;
			try {
				E = re("");
			} catch (e) {
				throw T = t, e;
			}
		} else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, E = "") : (T === void 0 && (T = ae()), T && typeof E == "string" && (E = re("")));
		al && al(e), mt = e;
	}, vt = Nl({}, [
		...Bl,
		...Vl,
		...Hl
	]), yt = Nl({}, [...Ul, ...Wl]), bt = function(e, t, n) {
		return t.namespaceURI === tt ? e === "svg" : t.namespaceURI === $e ? e === "svg" && (n === "annotation-xml" || st[n]) : !!vt[e];
	}, xt = function(e, t, n) {
		return t.namespaceURI === tt ? e === "math" : t.namespaceURI === et ? e === "math" && lt[n] : !!yt[e];
	}, St = function(e, t, n) {
		return t.namespaceURI === et && !lt[n] || t.namespaceURI === $e && !st[n] ? !1 : !yt[e] && (ut[e] || !vt[e]);
	}, Ct = function(e) {
		let t = _(e);
		(!t || !t.tagName) && (t = {
			namespaceURI: nt,
			tagName: "template"
		});
		let n = _l(e.tagName), r = _l(t.tagName);
		return it[e.namespaceURI] ? e.namespaceURI === et ? bt(n, t, r) : e.namespaceURI === $e ? xt(n, t, r) : e.namespaceURI === tt ? St(n, t, r) : !!(dt === "application/xhtml+xml" && it[e.namespaceURI]) : !1;
	}, wt = function(e) {
		ml(t.removed, { element: e });
		try {
			_(e).removeChild(e);
		} catch {
			if (p(e), !_(e)) throw Al("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
		}
	}, Tt = function(e, t, n) {
		try {
			m(e, t);
		} catch {
			try {
				e.removeAttribute(n);
			} catch {}
		}
	}, Et = function(e) {
		kt(e);
		let t = g(e);
		if (t) {
			let e = [];
			dl(t, (t) => {
				ml(e, t);
			}), dl(e, (e) => {
				try {
					p(e);
				} catch {}
			});
		}
		let n = y(e);
		if (n) for (let t = n.length - 1; t >= 0; --t) {
			let r = n[t], i = r && r.name;
			typeof i == "string" && Tt(e, r, i);
		}
	}, Dt = function(e, n, r) {
		if (!r) try {
			r = n.getAttributeNode(e);
		} catch {
			r = null;
		}
		ml(t.removed, {
			attribute: r || null,
			from: n
		});
		try {
			r ? m(n, r) : n.removeAttribute(e);
		} catch {
			try {
				n.removeAttribute(e);
			} catch {}
		}
		if (e === "is") {
			if (Re || ze) try {
				wt(n);
			} catch {}
			else try {
				n.setAttribute(e, "");
			} catch {}
		}
	}, Ot = function(e) {
		let t = y(e);
		if (t) for (let n = t.length - 1; n >= 0; --n) {
			let r = t[n], i = r && r.name;
			typeof i != "string" || Se[pt(i)] || Tt(e, r, i);
		}
	}, kt = function(e) {
		let t = [e];
		for (; t.length > 0;) {
			let e = t.pop();
			C(e) === uu.element && Ot(e);
			let n = g(e);
			if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
		}
	}, At = function(e, t) {
		return Me ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
	}, jt = function(e) {
		if (!Me) return;
		let t = [e];
		for (; t.length > 0;) {
			let e = t.pop(), n = C(e);
			if (n === uu.processingInstruction || n === uu.comment && kl(su, e.data)) {
				try {
					p(e);
				} catch {}
				continue;
			}
			if (n === uu.element) {
				let t = e, n = pt(w(e));
				try {
					t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && At("for", n) && t.removeAttribute("for");
				} catch {}
			}
			let r = g(e);
			if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
		}
	}, Mt = function(e) {
		let t = null, r = null;
		if (Le) e = "<remove></remove>" + e;
		else {
			let t = yl(e, /^[\r\n\t ]+/);
			r = t && t[0];
		}
		dt === "application/xhtml+xml" && nt === tt && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
		let i = T ? re(e) : e;
		if (nt === tt) try {
			t = new l().parseFromString(i, dt);
		} catch {}
		if (!t || !t.documentElement) {
			t = se.createDocument(nt, "template", null);
			try {
				t.documentElement.innerHTML = rt ? E : i;
			} catch {}
		}
		let a = t.body || t.documentElement;
		return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), nt === tt ? k.call(t, Ne ? "html" : "body")[0] : Ne ? t.documentElement : a;
	}, Nt = function(e) {
		let t = S ? S(e) : e.ownerDocument;
		return O.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
	}, Pt = function(e) {
		return e = bl(e, de, " "), e = bl(e, fe, " "), e = bl(e, pe, " "), e;
	}, Ft = function(e) {
		e.normalize();
		let t = S ? S(e) : e.ownerDocument, n = O.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
		for (; r;) r.data = Pt(r.data), r = n.nextNode();
		let i = e.querySelectorAll?.call(e, "template");
		i && dl(i, (e) => {
			Lt(e.content) && Ft(e.content);
		});
	}, It = function(e) {
		let t = x ? x(e) : null;
		return typeof t != "string" || pt(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== y(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== b(e) || e.childNodes !== g(e);
	}, Lt = function(e) {
		if (!b || typeof e != "object" || !e) return !1;
		try {
			return b(e) === uu.documentFragment;
		} catch {
			return !1;
		}
	}, Rt = function(e) {
		if (!b || typeof e != "object" || !e) return !1;
		try {
			return typeof b(e) == "number";
		} catch {
			return !1;
		}
	};
	function zt(e, n, r) {
		e.length !== 0 && dl(e, (e) => {
			e.call(t, n, r, mt);
		});
	}
	let Bt = function(e, t) {
		return !!(Me && e.hasChildNodes() && !Rt(e.firstElementChild) && kl(ou, e.textContent) && kl(ou, e.innerHTML) || Me && e.namespaceURI === tt && fu[t] && (Rt(e.firstElementChild) || typeof e.textContent == "string" && kl(pu[t], e.textContent)) || e.nodeType === uu.processingInstruction || Me && e.nodeType === uu.comment && kl(su, e.data));
	}, Vt = function(e, t) {
		return e instanceof RegExp ? kl(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
	}, Ht = function(e, t, n) {
		if (!we[t] && Jt(t) && Vt(A.tagNameCheck, t)) return !1;
		if (We && !qe[t]) {
			let t = _(e), r = g(e);
			if (r && t) {
				let i = r.length;
				for (let a = i - 1; a >= 0; --a) {
					let i = e === n ? f(r[a], !0) : r[a];
					t.insertBefore(i, h(e));
				}
			}
		}
		return wt(e), !0;
	}, Ut = function(e, t, n, r) {
		return e.length === 0 ? t : t === n || t === r ? Fl(t) : t;
	}, Wt = function(e, t) {
		return e === t || _(e) !== null ? !1 : (Ge && kt(e), !0);
	}, Gt = function(e, n) {
		if (zt(ue.beforeSanitizeElements, e, null), Wt(e, n)) return !0;
		if (It(e)) return wt(e), !0;
		let r = pt(w(e));
		if (be = Ut(ue.uponSanitizeElement, be, xe, Fe), zt(ue.uponSanitizeElement, e, {
			tagName: r,
			allowedTags: be
		}), Wt(e, n)) return !0;
		if (Bt(e, r)) return wt(e), !0;
		if (we[r] || !(Ee.tagCheck instanceof Function && Ee.tagCheck(r)) && !be[r]) {
			let t = Ht(e, r, n);
			return t === !1 && (zt(ue.afterSanitizeElements, e, null), Wt(e, n)) ? !0 : t;
		}
		if (C(e) === uu.element && !Ct(e) || (r === "noscript" || r === "noembed" || r === "noframes") && kl(cu, e.innerHTML)) return wt(e), !0;
		if (je && e.nodeType === uu.text) {
			let n = Pt(e.textContent);
			e.textContent !== n && (ml(t.removed, { element: e.cloneNode() }), e.textContent = n);
		}
		return zt(ue.afterSanitizeElements, e, null), Wt(e, n);
	}, Kt = function(e, t, r) {
		if (Te[t] || At(t, e) || Ve && (t === "id" || t === "name") && (r in n || r in ht)) return !1;
		let i = Se[t] || Ee.attributeCheck instanceof Function && Ee.attributeCheck(t, e);
		return Oe && kl(me, t) || De && kl(he, t) ? !0 : i ? Ze[t] || kl(ye, bl(r, _e, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && xl(r, "data:") === 0 && Ye[e] || ke && !kl(ge, bl(r, _e, "")) ? !0 : !r : Jt(e) && Vt(A.tagNameCheck, e) && Vt(A.attributeNameCheck, t, e) || t === "is" && A.allowCustomizedBuiltInElements && Vt(A.tagNameCheck, r);
	}, qt = Nl({}, [
		"annotation-xml",
		"color-profile",
		"font-face",
		"font-face-format",
		"font-face-name",
		"font-face-src",
		"font-face-uri",
		"missing-glyph"
	]), Jt = function(e) {
		return !qt[_l(e)] && kl(ve, e);
	}, Yt = function(e, t, n, r) {
		if (T && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
			case "TrustedHTML": return re(r);
			case "TrustedScriptURL": return ie(r);
		}
		return r;
	}, Xt = function(e, t, n, r) {
		try {
			return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !It(e) || (wt(e), !1);
		} catch {
			return Dt(t, e), !1;
		}
	}, Zt = function(e, n) {
		if (zt(ue.beforeSanitizeAttributes, e, null), Wt(e, n)) return;
		let r = e.attributes;
		if (!r || It(e)) return;
		Se = Ut(ue.uponSanitizeAttribute, Se, Ce, Ie);
		let i = {
			attrName: "",
			attrValue: "",
			keepAttr: !0,
			allowedAttributes: Se,
			forceKeepAttr: void 0
		}, a = r.length, o = pt(e.nodeName);
		for (; a--;) {
			let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = pt(s), d = l, f = s === "value" ? d : Sl(d), p = !1;
			if (i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, zt(ue.uponSanitizeAttribute, e, i), f = i.attrValue, He && (u === "id" || u === "name") && xl(f, Ue) !== 0 && (Dt(s, e, n), f = Ue + f, p = !0), Me && kl(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
				Dt(s, e, n);
				continue;
			}
			if (u === "attributename" && yl(f, "href")) {
				Dt(s, e, n);
				continue;
			}
			if (!i.forceKeepAttr) {
				if (!i.keepAttr) {
					Dt(s, e, n);
					continue;
				}
				if (!Ae && kl(lu, f)) {
					Dt(s, e, n);
					continue;
				}
				if (je && (f = Pt(f)), !Kt(o, u, f)) {
					Dt(s, e, n);
					continue;
				}
				f = Yt(o, u, c, f), f !== d && Xt(e, s, c, f) && p && pl(t.removed);
			}
		}
		zt(ue.afterSanitizeAttributes, e, null), Wt(e, n);
	}, Qt = function(e) {
		let t = null, n = Nt(e);
		for (zt(ue.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (zt(ue.uponSanitizeShadowNode, t, null), Gt(t, e), Zt(t, e), Lt(t.content) && Qt(t.content), C(t) === uu.element) {
			let e = v(t);
			Lt(e) && ($t(e), Qt(e));
		}
		zt(ue.afterSanitizeShadowDOM, e, null);
	}, $t = function(e) {
		let t = [{
			node: e,
			shadow: null
		}];
		for (; t.length > 0;) {
			let e = t.pop();
			if (e.shadow) {
				Qt(e.shadow);
				continue;
			}
			let n = e.node, r = C(n) === uu.element, i = g(n);
			if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
				node: i[e],
				shadow: null
			});
			if (r) {
				let e = x ? x(n) : null;
				if (typeof e == "string" && pt(e) === "template") {
					let e = n.content;
					Lt(e) && t.push({
						node: e,
						shadow: null
					});
				}
			}
			if (r) {
				let e = v(n);
				Lt(e) && t.push({
					node: null,
					shadow: e
				}, {
					node: e,
					shadow: null
				});
			}
		}
	};
	return t.sanitize = function(e) {
		let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
		if (rt = !e, rt && (e = "<!-->"), typeof e != "string" && !Rt(e) && (e = Il(e), typeof e != "string")) throw Al("dirty is not a string, aborting");
		if (!t.isSupported) return e;
		Pe ? (be = Fe, Se = Ie) : _t(n), (ue.uponSanitizeElement.length > 0 || ue.uponSanitizeAttribute.length > 0) && (be = Fl(be)), ue.uponSanitizeAttribute.length > 0 && (Se = Fl(Se)), t.removed = [];
		let c = Ge && typeof e != "string" && Rt(e);
		if (c) {
			jt(e);
			let t = w(e);
			if (typeof t == "string") {
				let n = pt(t);
				if (!be[n] || we[n]) throw Et(e), Al("root node is forbidden and cannot be sanitized in-place");
			}
			if (It(e)) throw Et(e), Al("root node is clobbered and cannot be sanitized in-place");
			try {
				$t(e);
			} catch (t) {
				throw Et(e), t;
			}
		} else if (Rt(e)) i = Mt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === uu.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), $t(i);
		else {
			if (!Re && !je && !Ne && e.indexOf("<") === -1) return T && Be ? re(e) : e;
			if (i = Mt(e), !i) return Re ? null : Be ? E : "";
		}
		i && Le && wt(i.firstChild);
		let l = c ? e : i;
		try {
			let e = Nt(l);
			for (; o = e.nextNode();) Gt(o, l), Zt(o, l), Lt(o.content) && Qt(o.content);
		} catch (n) {
			throw c && (Et(e), dl(t.removed, (e) => {
				e.element && kt(e.element);
			})), n;
		}
		if (c) {
			let n = !1;
			if (dl(t.removed, (t) => {
				t.element && (t.element === e && (n = !0), kt(t.element));
			}), n) throw Al("a node selected for removal could not be safely returned; refusing to sanitize in place");
			return je && Ft(e), e;
		}
		if (Re) {
			if (je && Ft(i), ze) for (s = ce.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
			else s = i;
			return (Se.shadowroot || Se.shadowrootmode) && (s = le.call(r, s, !0)), s;
		}
		let u = Ne ? i.outerHTML : i.innerHTML;
		return Ne && be["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && kl(iu, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), je && (u = Pt(u)), T && Be ? re(u) : u;
	}, t.setConfig = function() {
		let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
		_t(e), Pe = !0, Fe = be, Ie = Se;
	}, t.clearConfig = function() {
		mt = null, Pe = !1, Fe = null, Ie = null, T = ee, E = "";
	}, t.isValidAttribute = function(e, t, n) {
		mt || _t({});
		let r = pt(e), i = pt(t);
		return Kt(r, i, n);
	}, t.addHook = function(e, t) {
		typeof t == "function" && Dl(ue, e) && ml(ue[e], t);
	}, t.removeHook = function(e, t) {
		if (Dl(ue, e)) {
			if (t !== void 0) {
				let n = fl(ue[e], t);
				return n === -1 ? void 0 : hl(ue[e], n, 1)[0];
			}
			return pl(ue[e]);
		}
	}, t.removeHooks = function(e) {
		Dl(ue, e) && (ue[e] = []);
	}, t.removeAllHooks = function() {
		ue = gu();
	}, t;
}
var bu = yu(), xu = {
	iiif: {
		ALLOWED_ATTR: [
			"href",
			"src",
			"alt"
		],
		ALLOWED_TAGS: [
			"a",
			"b",
			"br",
			"i",
			"img",
			"p",
			"span"
		]
	},
	liberal: {},
	mirador2: {
		ALLOWED_ATTR: [
			"href",
			"target",
			"src",
			"alt",
			"dir"
		],
		ALLOWED_TAGS: [
			"a",
			"b",
			"br",
			"i",
			"img",
			"p",
			"span",
			"strong",
			"em",
			"ul",
			"ol",
			"li"
		]
	},
	noHtml: { ALLOWED_TAGS: [] }
}, Su = H("span", {
	name: "IIIFHtmlContent",
	slot: "root"
})({});
bu.addHook("afterSanitizeAttributes", (e) => {
	"target" in e && (e.setAttribute("target", "_blank"), e.setAttribute("rel", "noopener noreferrer"));
});
function Cu({ classes: e = {}, htmlString: t, ruleSet: n, ...r }) {
	return /* @__PURE__ */ z(Su, {
		className: [M("third-party-html"), e.root].join(" "),
		dangerouslySetInnerHTML: { __html: bu.sanitize(t, xu[n]) },
		...r
	});
}
Cu.propTypes = {
	classes: W.default.objectOf(W.default.string),
	htmlString: W.default.string.isRequired,
	ruleSet: W.default.string.isRequired
};
//#endregion
//#region src/containers/SanitizedHtml.js
var wu = Cu, Tu = /* @__PURE__ */ k(Ee(), 1);
function Eu(e) {
	let t = R();
	return L(() => {
		t.current = e;
	}, [e]), t.current;
}
function Du({ children: e, containerRef: t, offsetTop: n = 0, scrollTo: r, ...i }) {
	let a = R(), o = Eu(r);
	return L(() => {
		if (!r || r === o) return;
		let e = a?.current;
		if (!e) return;
		let i = t?.current?.querySelector(`.${M("scrollto-scrollable")}`);
		if (!i) return;
		let s = t?.current?.getBoundingClientRect() || {}, c = e?.getBoundingClientRect() || {};
		if (!(c.top < s.top + n || c.bottom > s.bottom)) return;
		let l = e.offsetTop - s.height / 2 + n;
		i.scrollTo(0, l);
	}, [
		t,
		a,
		r,
		o,
		n
	]), !r && (0, Tu.default)(i) ? e : Ti(e, {
		ref: a,
		...i
	});
}
Du.propTypes = {
	children: W.default.node.isRequired,
	containerRef: W.default.oneOfType([W.default.func, W.default.shape({ current: W.default.instanceOf(Element) })]).isRequired,
	offsetTop: W.default.number,
	scrollTo: W.default.bool.isRequired
};
//#endregion
//#region src/components/CanvasAnnotations.jsx
function Ou({ annotations: e = [], index: t, label: n, selectedAnnotationId: r = void 0, totalSize: i, listContainerComponent: a = "li", htmlSanitizationRuleSet: o = "iiif", hoveredAnnotationIds: s = [], containerRef: c = void 0, deselectAnnotation: l, selectAnnotation: u, windowId: d, hoverAnnotation: f }) {
	let { t: p } = V(), m = I((e, t) => {
		window.getSelection()?.toString() || (r === t.id ? l(d, t.id) : u(d, t.id));
	}, [
		d,
		l,
		u,
		r
	]), h = I((e) => {
		f(d, [e.id]);
	}, [f, d]), g = I(() => {
		f(d, []);
	}, [f, d]);
	return e.length === 0 ? null : /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(U, {
		sx: {
			paddingLeft: 2,
			paddingRight: 1,
			paddingTop: 2
		},
		variant: "overline",
		children: p("annotationCanvasLabel", {
			context: `${t + 1}/${i}`,
			label: n
		})
	}), /* @__PURE__ */ z(oa, {
		autoFocusItem: !0,
		variant: "selectedMenu",
		children: e.map((e) => /* @__PURE__ */ z(Du, {
			containerRef: c,
			offsetTop: 96,
			scrollTo: r === e.id,
			selected: r === e.id,
			children: /* @__PURE__ */ z(sa, {
				component: a,
				variant: "multiline",
				divider: !0,
				sx: {
					"&:hover,&:focus": { backgroundColor: "action.hover" },
					backgroundColor: s.includes(e.id) ? "action.hover" : "",
					userSelect: "text"
				},
				annotationid: e.id,
				onClick: (t) => m(t, e),
				onFocus: () => h(e),
				onBlur: g,
				onMouseEnter: () => h(e),
				onMouseLeave: g,
				children: /* @__PURE__ */ z(ca, {
					primary: /* @__PURE__ */ z(wu, {
						ruleSet: o,
						htmlString: e.content
					}),
					secondary: e.tags.map((e) => /* @__PURE__ */ z(aa, {
						component: "span",
						size: "small",
						variant: "outlined",
						label: e,
						id: e
					}, e?.toString())),
					slotProps: { primary: { variant: "body2" } }
				})
			}, e.id)
		}, `${e.id}-scroll`))
	})] });
}
Ou.propTypes = {
	annotations: W.default.arrayOf(W.default.shape({
		content: W.default.string.isRequired,
		id: W.default.string.isRequired
	})),
	containerRef: W.default.oneOfType([W.default.func, W.default.shape({ current: W.default.instanceOf(Element) })]),
	deselectAnnotation: W.default.func.isRequired,
	hoverAnnotation: W.default.func.isRequired,
	hoveredAnnotationIds: W.default.arrayOf(W.default.string),
	htmlSanitizationRuleSet: W.default.string,
	index: W.default.number.isRequired,
	label: W.default.string.isRequired,
	listContainerComponent: W.default.elementType,
	selectAnnotation: W.default.func.isRequired,
	selectedAnnotationId: W.default.string,
	totalSize: W.default.number.isRequired,
	windowId: W.default.string.isRequired
};
var ku = i(O((e, { canvasId: t, windowId: n }) => ({
	annotations: Vn(e, {
		canvasId: t,
		windowId: n
	}),
	htmlSanitizationRuleSet: Gt(e).annotations.htmlSanitizationRuleSet,
	label: Dt(e, {
		canvasId: t,
		windowId: n
	}),
	selectedAnnotationId: ar(e, { windowId: n })
}), {
	deselectAnnotation: cr,
	hoverAnnotation: dr,
	selectAnnotation: Qn
}), A("CanvasAnnotations"))(Ou), Au = N(/*#__PURE__*/ z("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "CloseSharp"), ju = N(/*#__PURE__*/ z("path", { d: "M19 19H5V5h7V3H3v18h18v-9h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z" }), "OpenInNewSharp"), Mu = N(/*#__PURE__*/ z("path", { d: "M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "DragIndicatorSharp");
//#endregion
//#region node_modules/clsx/dist/clsx.mjs
function Nu(e) {
	var t, n, r = "";
	if (typeof e == "string" || typeof e == "number") r += e;
	else if (typeof e == "object") {
		if (Array.isArray(e)) {
			var i = e.length;
			for (t = 0; t < i; t++) e[t] && (n = Nu(e[t])) && (r && (r += " "), r += n);
		} else for (n in e) e[n] && (r && (r += " "), r += n);
	}
	return r;
}
function Pu() {
	for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = Nu(e)) && (r && (r += " "), r += t);
	return r;
}
//#endregion
//#region node_modules/react-draggable/build/cjs/chunk-ACOTSM7X.mjs
function Fu(e, t) {
	for (let n = 0, r = e.length; n < r; n++) if (t.apply(t, [
		e[n],
		n,
		e
	])) return e[n];
}
function Iu(e) {
	return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
}
function Lu(e) {
	return typeof e == "number" && !isNaN(e);
}
function Ru(e) {
	return parseInt(e, 10);
}
function zu(e, t, n) {
	if (e[t]) return /* @__PURE__ */ Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`);
}
var Bu = [
	"Moz",
	"Webkit",
	"O",
	"ms"
];
function Vu(e = "transform") {
	if (typeof window > "u") return "";
	let t = window.document?.documentElement?.style;
	if (!t || e in t) return "";
	for (let n = 0; n < Bu.length; n++) if (Hu(e, Bu[n]) in t) return Bu[n];
	return "";
}
function Hu(e, t) {
	return t ? `${t}${Uu(e)}` : e;
}
function Uu(e) {
	let t = "", n = !0;
	for (let r = 0; r < e.length; r++) n ? (t += e[r].toUpperCase(), n = !1) : e[r] === "-" ? n = !0 : t += e[r];
	return t;
}
var Wu = Vu(), Gu = "";
function Ku(e, t) {
	Gu ||= Fu([
		"matches",
		"webkitMatchesSelector",
		"mozMatchesSelector",
		"msMatchesSelector",
		"oMatchesSelector"
	], function(t) {
		return Iu(e[t]);
	}) ?? "";
	let n = e[Gu];
	return Iu(n) ? !!n.call(e, t) : !1;
}
function qu(e, t, n) {
	let r = e;
	do {
		if (Ku(r, t)) return !0;
		if (r === n) return !1;
		r = r.parentNode;
	} while (r);
	return !1;
}
function Ju(e, t, n, r) {
	if (!e) return;
	let i = {
		capture: !0,
		...r
	}, a = n;
	e.addEventListener ? e.addEventListener(t, a, i) : e.attachEvent ? e.attachEvent("on" + t, a) : e["on" + t] = a;
}
function Yu(e, t, n, r) {
	if (!e) return;
	let i = {
		capture: !0,
		...r
	}, a = n;
	e.removeEventListener ? e.removeEventListener(t, a, i) : e.detachEvent ? e.detachEvent("on" + t, a) : e["on" + t] = null;
}
function Xu(e) {
	let t = e.clientHeight, n = e.ownerDocument.defaultView.getComputedStyle(e);
	return t += Ru(n.borderTopWidth), t += Ru(n.borderBottomWidth), t;
}
function Zu(e) {
	let t = e.clientWidth, n = e.ownerDocument.defaultView.getComputedStyle(e);
	return t += Ru(n.borderLeftWidth), t += Ru(n.borderRightWidth), t;
}
function Qu(e) {
	let t = e.clientHeight, n = e.ownerDocument.defaultView.getComputedStyle(e);
	return t -= Ru(n.paddingTop), t -= Ru(n.paddingBottom), t;
}
function $u(e) {
	let t = e.clientWidth, n = e.ownerDocument.defaultView.getComputedStyle(e);
	return t -= Ru(n.paddingLeft), t -= Ru(n.paddingRight), t;
}
function ed(e, t, n) {
	let r = t === t.ownerDocument.body ? {
		left: 0,
		top: 0
	} : t.getBoundingClientRect();
	return {
		x: (e.clientX + t.scrollLeft - r.left) / n,
		y: (e.clientY + t.scrollTop - r.top) / n
	};
}
function td(e, t) {
	let n = rd(e, t, "px");
	return { [Hu("transform", Wu)]: n };
}
function nd(e, t) {
	return rd(e, t, "");
}
function rd({ x: e, y: t }, n, r) {
	let i = `translate(${e}${r},${t}${r})`;
	return n && (i = `translate(${`${typeof n.x == "string" ? n.x : n.x + r}`}, ${`${typeof n.y == "string" ? n.y : n.y + r}`})` + i), i;
}
function id(e, t) {
	return e.targetTouches && Fu(e.targetTouches, (e) => t === e.identifier) || e.changedTouches && Fu(e.changedTouches, (e) => t === e.identifier);
}
function ad(e) {
	if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;
	if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;
}
function od() {
	return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
}
function sd(e, t) {
	if (!e) return;
	let n = e.getElementById("react-draggable-style-el");
	if (!n) {
		n = e.createElement("style"), n.type = "text/css", n.id = "react-draggable-style-el";
		let r = t ?? od();
		r && n.setAttribute("nonce", r), n.innerHTML = ".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n", n.innerHTML += ".react-draggable-transparent-selection *::selection {all: inherit;}\n", e.getElementsByTagName("head")[0].appendChild(n);
	}
	e.body && ud(e.body, "react-draggable-transparent-selection");
}
function cd(e) {
	window.requestAnimationFrame ? window.requestAnimationFrame(() => {
		ld(e);
	}) : ld(e);
}
function ld(e) {
	if (e) try {
		e.body && dd(e.body, "react-draggable-transparent-selection");
		let t = e.selection;
		if (t) t.empty();
		else {
			let t = (e.defaultView || window).getSelection();
			t && t.type !== "Caret" && t.removeAllRanges();
		}
	} catch {}
}
function ud(e, t) {
	e.classList ? e.classList.add(t) : e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`)) || (e.className += ` ${t}`);
}
function dd(e, t) {
	e.classList ? e.classList.remove(t) : e.className = e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`, "g"), "");
}
function fd(e, t, n) {
	if (!e.props.bounds) return [t, n];
	let { bounds: r } = e.props;
	r = typeof r == "string" ? r : yd(r);
	let i = bd(e);
	if (typeof r == "string") {
		let { ownerDocument: e } = i, t = e.defaultView;
		if (!t) throw Error("Cannot resolve the owner window of the draggable node.");
		let n;
		if (n = r === "parent" ? i.parentNode : i.getRootNode().querySelector(r), !(n instanceof t.HTMLElement)) throw Error("Bounds selector \"" + r + "\" could not find an element.");
		let a = n, o = t.getComputedStyle(i), s = t.getComputedStyle(a);
		r = {
			left: -i.offsetLeft + Ru(s.paddingLeft) + Ru(o.marginLeft),
			top: -i.offsetTop + Ru(s.paddingTop) + Ru(o.marginTop),
			right: $u(a) - Zu(i) - i.offsetLeft + Ru(s.paddingRight) - Ru(o.marginRight),
			bottom: Qu(a) - Xu(i) - i.offsetTop + Ru(s.paddingBottom) - Ru(o.marginBottom)
		};
	}
	return Lu(r.right) && (t = Math.min(t, r.right)), Lu(r.bottom) && (n = Math.min(n, r.bottom)), Lu(r.left) && (t = Math.max(t, r.left)), Lu(r.top) && (n = Math.max(n, r.top)), [t, n];
}
function pd(e, t, n) {
	return [Math.round(t / e[0]) * e[0], Math.round(n / e[1]) * e[1]];
}
function md(e) {
	return e.props.axis === "both" || e.props.axis === "x";
}
function hd(e) {
	return e.props.axis === "both" || e.props.axis === "y";
}
function gd(e, t, n) {
	let r = typeof t == "number" ? id(e, t) : null;
	if (typeof t == "number" && !r) return null;
	let i = bd(n), a = n.props.offsetParent || i.offsetParent || i.ownerDocument.body;
	return ed(r || e, a, n.props.scale);
}
function _d(e, t, n) {
	let r = !Lu(e.lastX), i = bd(e);
	return r ? {
		node: i,
		deltaX: 0,
		deltaY: 0,
		lastX: t,
		lastY: n,
		x: t,
		y: n
	} : {
		node: i,
		deltaX: t - e.lastX,
		deltaY: n - e.lastY,
		lastX: e.lastX,
		lastY: e.lastY,
		x: t,
		y: n
	};
}
function vd(e, t) {
	let n = e.props.scale;
	return {
		node: t.node,
		x: e.state.x + t.deltaX / n,
		y: e.state.y + t.deltaY / n,
		deltaX: t.deltaX / n,
		deltaY: t.deltaY / n,
		lastX: e.state.x,
		lastY: e.state.y
	};
}
function yd(e) {
	return {
		left: e.left,
		top: e.top,
		right: e.right,
		bottom: e.bottom
	};
}
function bd(e) {
	let t = e.findDOMNode();
	if (!t) throw Error("<DraggableCore>: Unmounted during event!");
	return t;
}
var xd = typeof process < "u" && {}.DRAGGABLE_DEBUG ? console.log.bind(console) : function() {}, Sd = {
	touch: {
		start: "touchstart",
		move: "touchmove",
		stop: "touchend"
	},
	mouse: {
		start: "mousedown",
		move: "mousemove",
		stop: "mouseup"
	}
}, Cd = Sd.mouse, wd = class extends P.Component {
	constructor() {
		super(...arguments), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, this.touchIdentifier = null, this.mounted = !1, this.handleDragStart = (e) => {
			if (this.props.onMouseDown(e), !this.props.allowAnyClick && (typeof e.button == "number" && e.button !== 0 || e.ctrlKey)) return !1;
			let t = this.findDOMNode();
			if (!t || !t.ownerDocument || !t.ownerDocument.body) throw Error("<DraggableCore> not mounted on DragStart!");
			let { ownerDocument: n } = t;
			if (this.props.disabled || !(e.target instanceof n.defaultView.Node) || this.props.handle && !qu(e.target, this.props.handle, t) || this.props.cancel && qu(e.target, this.props.cancel, t)) return;
			e.type === "touchstart" && !this.props.allowMobileScroll && e.preventDefault();
			let r = ad(e);
			this.touchIdentifier = r;
			let i = gd(e, r, this);
			if (i == null) return;
			let { x: a, y: o } = i, s = _d(this, a, o);
			xd("DraggableCore: handleDragStart: %j", s), xd("calling", this.props.onStart), this.props.onStart(e, s) !== !1 && this.mounted !== !1 && (this.props.enableUserSelectHack && sd(n, this.props.nonce), this.dragging = !0, this.lastX = a, this.lastY = o, Ju(n, Cd.move, this.handleDrag), Ju(n, Cd.stop, this.handleDragStop));
		}, this.handleDrag = (e) => {
			let t = gd(e, this.touchIdentifier, this);
			if (t == null) return;
			let { x: n, y: r } = t;
			if (Array.isArray(this.props.grid)) {
				let e = n - this.lastX, t = r - this.lastY;
				if ([e, t] = pd(this.props.grid, e, t), !e && !t) return;
				n = this.lastX + e, r = this.lastY + t;
			}
			let i = _d(this, n, r);
			if (xd("DraggableCore: handleDrag: %j", i), this.props.onDrag(e, i) === !1 || this.mounted === !1) {
				try {
					this.handleDragStop(new MouseEvent("mouseup"));
				} catch {
					let e = document.createEvent("MouseEvents");
					e.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(e);
				}
				return;
			}
			this.lastX = n, this.lastY = r;
		}, this.handleDragStop = (e) => {
			if (!this.dragging) return;
			let t = gd(e, this.touchIdentifier, this);
			if (t == null) return;
			let { x: n, y: r } = t;
			if (Array.isArray(this.props.grid)) {
				let e = n - this.lastX || 0, t = r - this.lastY || 0;
				[e, t] = pd(this.props.grid, e, t), n = this.lastX + e, r = this.lastY + t;
			}
			let i = _d(this, n, r);
			if (this.props.onStop(e, i) === !1 || this.mounted === !1) return !1;
			let a = this.findDOMNode();
			a && this.props.enableUserSelectHack && cd(a.ownerDocument), xd("DraggableCore: handleDragStop: %j", i), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, a && (xd("DraggableCore: Removing handlers"), Yu(a.ownerDocument, Cd.move, this.handleDrag), Yu(a.ownerDocument, Cd.stop, this.handleDragStop));
		}, this.onMouseDown = (e) => (Cd = Sd.mouse, this.handleDragStart(e)), this.onMouseUp = (e) => (Cd = Sd.mouse, this.handleDragStop(e)), this.onTouchStart = (e) => (Cd = Sd.touch, this.handleDragStart(e)), this.onTouchEnd = (e) => (Cd = Sd.touch, this.handleDragStop(e));
	}
	componentDidMount() {
		this.mounted = !0;
		let e = this.findDOMNode();
		e && Ju(e, Sd.touch.start, this.onTouchStart, { passive: !1 });
	}
	componentWillUnmount() {
		this.mounted = !1;
		let e = this.findDOMNode();
		if (e) {
			let { ownerDocument: t } = e;
			Yu(t, Sd.mouse.move, this.handleDrag), Yu(t, Sd.touch.move, this.handleDrag), Yu(t, Sd.mouse.stop, this.handleDragStop), Yu(t, Sd.touch.stop, this.handleDragStop), Yu(e, Sd.touch.start, this.onTouchStart, { passive: !1 }), this.props.enableUserSelectHack && cd(t);
		}
	}
	findDOMNode() {
		if (this.props?.nodeRef) return this.props.nodeRef.current;
		let e = ua;
		return typeof e.findDOMNode == "function" ? e.findDOMNode(this) : (xd("react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef"), null);
	}
	render() {
		return P.cloneElement(P.Children.only(this.props.children), {
			onMouseDown: this.onMouseDown,
			onMouseUp: this.onMouseUp,
			onTouchEnd: this.onTouchEnd
		});
	}
};
wd.displayName = "DraggableCore", wd.propTypes = {
	allowAnyClick: W.default.bool,
	allowMobileScroll: W.default.bool,
	children: W.default.node.isRequired,
	disabled: W.default.bool,
	enableUserSelectHack: W.default.bool,
	offsetParent: function(e, t) {
		if (e[t] && e[t].nodeType !== 1) throw Error("Draggable's offsetParent must be a DOM Node.");
	},
	grid: W.default.arrayOf(W.default.number),
	handle: W.default.string,
	cancel: W.default.string,
	nodeRef: W.default.object,
	nonce: W.default.string,
	onStart: W.default.func,
	onDrag: W.default.func,
	onStop: W.default.func,
	onMouseDown: W.default.func,
	scale: W.default.number,
	className: zu,
	style: zu,
	transform: zu
}, wd.defaultProps = {
	allowAnyClick: !1,
	allowMobileScroll: !1,
	disabled: !1,
	enableUserSelectHack: !0,
	onStart: function() {},
	onDrag: function() {},
	onStop: function() {},
	onMouseDown: function() {},
	scale: 1
};
var Td = class extends P.Component {
	constructor(e) {
		super(e), this.onDragStart = (e, t) => {
			if (xd("Draggable: onDragStart: %j", t), this.props.onStart(e, vd(this, t)) === !1) return !1;
			this.setState({
				dragging: !0,
				dragged: !0
			});
		}, this.onDrag = (e, t) => {
			if (!this.state.dragging) return !1;
			xd("Draggable: onDrag: %j", t);
			let n = vd(this, t), r = {
				x: n.x,
				y: n.y,
				slackX: 0,
				slackY: 0
			};
			if (this.props.bounds) {
				let { x: e, y: t } = r;
				r.x += this.state.slackX, r.y += this.state.slackY;
				let [i, a] = fd(this, r.x, r.y);
				r.x = i, r.y = a, r.slackX = this.state.slackX + (e - r.x), r.slackY = this.state.slackY + (t - r.y), n.x = r.x, n.y = r.y, n.deltaX = r.x - this.state.x, n.deltaY = r.y - this.state.y;
			}
			if (this.props.onDrag(e, n) === !1) return !1;
			this.setState(r);
		}, this.onDragStop = (e, t) => {
			if (!this.state.dragging || this.props.onStop(e, vd(this, t)) === !1) return !1;
			xd("Draggable: onDragStop: %j", t);
			let n = {
				dragging: !1,
				slackX: 0,
				slackY: 0
			};
			if (this.props.position) {
				let { x: e, y: t } = this.props.position;
				n.x = e, n.y = t;
			}
			this.setState(n);
		}, this.state = {
			dragging: !1,
			dragged: !1,
			x: e.position ? e.position.x : e.defaultPosition.x,
			y: e.position ? e.position.y : e.defaultPosition.y,
			prevPropsPosition: { ...e.position },
			slackX: 0,
			slackY: 0,
			isElementSVG: !1
		}, e.position && !(e.onDrag || e.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
	}
	static getDerivedStateFromProps({ position: e }, { prevPropsPosition: t }) {
		return e && (!t || e.x !== t.x || e.y !== t.y) ? (xd("Draggable: getDerivedStateFromProps %j", {
			position: e,
			prevPropsPosition: t
		}), {
			x: e.x,
			y: e.y,
			prevPropsPosition: { ...e }
		}) : null;
	}
	componentDidMount() {
		window.SVGElement !== void 0 && this.findDOMNode() instanceof window.SVGElement && this.setState({ isElementSVG: !0 });
	}
	componentWillUnmount() {
		this.state.dragging && this.setState({ dragging: !1 });
	}
	findDOMNode() {
		if (this.props?.nodeRef) return this.props.nodeRef.current;
		let e = ua;
		return typeof e.findDOMNode == "function" ? e.findDOMNode(this) : null;
	}
	render() {
		let { axis: e, bounds: t, children: n, defaultPosition: r, defaultClassName: i, defaultClassNameDragging: a, defaultClassNameDragged: o, position: s, positionOffset: c, scale: l, ...u } = this.props, d = {}, f = null, p = !s || this.state.dragging, m = s || r, h = {
			x: md(this) && p ? this.state.x : m.x,
			y: hd(this) && p ? this.state.y : m.y
		};
		this.state.isElementSVG ? f = nd(h, c) : d = td(h, c);
		let g = P.Children.only(n), _ = Pu(g.props.className || "", i, {
			[a]: this.state.dragging,
			[o]: this.state.dragged
		});
		return /* @__PURE__ */ P.createElement(wd, {
			...u,
			onStart: this.onDragStart,
			onDrag: this.onDrag,
			onStop: this.onDragStop
		}, P.cloneElement(g, {
			className: _,
			style: {
				...g.props.style,
				...d
			},
			transform: f
		}));
	}
};
Td.displayName = "Draggable", Td.propTypes = {
	...wd.propTypes,
	axis: W.default.oneOf([
		"both",
		"x",
		"y",
		"none"
	]),
	bounds: W.default.oneOfType([
		W.default.shape({
			left: W.default.number,
			right: W.default.number,
			top: W.default.number,
			bottom: W.default.number
		}),
		W.default.string,
		W.default.oneOf([!1])
	]),
	defaultClassName: W.default.string,
	defaultClassNameDragging: W.default.string,
	defaultClassNameDragged: W.default.string,
	defaultPosition: W.default.shape({
		x: W.default.number,
		y: W.default.number
	}),
	positionOffset: W.default.shape({
		x: W.default.oneOfType([W.default.number, W.default.string]),
		y: W.default.oneOfType([W.default.number, W.default.string])
	}),
	position: W.default.shape({
		x: W.default.number,
		y: W.default.number
	}),
	className: zu,
	style: zu,
	transform: zu
}, Td.defaultProps = {
	...wd.defaultProps,
	axis: "both",
	bounds: !1,
	defaultClassName: "react-draggable",
	defaultClassNameDragging: "react-draggable-dragging",
	defaultClassNameDragged: "react-draggable-dragged",
	defaultPosition: {
		x: 0,
		y: 0
	},
	scale: 1
};
//#endregion
//#region node_modules/react-draggable/build/cjs/cjs.mjs
var Ed = Td, Dd = function() {
	return Dd = Object.assign || function(e) {
		for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
		return e;
	}, Dd.apply(this, arguments);
}, Od = {
	width: "100%",
	height: "10px",
	top: "0px",
	left: "0px",
	cursor: "row-resize"
}, kd = {
	width: "10px",
	height: "100%",
	top: "0px",
	left: "0px",
	cursor: "col-resize"
}, Ad = {
	width: "20px",
	height: "20px",
	position: "absolute",
	zIndex: 1
}, jd = {
	top: Dd(Dd({}, Od), { top: "-5px" }),
	right: Dd(Dd({}, kd), {
		left: void 0,
		right: "-5px"
	}),
	bottom: Dd(Dd({}, Od), {
		top: void 0,
		bottom: "-5px"
	}),
	left: Dd(Dd({}, kd), { left: "-5px" }),
	topRight: Dd(Dd({}, Ad), {
		right: "-10px",
		top: "-10px",
		cursor: "ne-resize"
	}),
	bottomRight: Dd(Dd({}, Ad), {
		right: "-10px",
		bottom: "-10px",
		cursor: "se-resize"
	}),
	bottomLeft: Dd(Dd({}, Ad), {
		left: "-10px",
		bottom: "-10px",
		cursor: "sw-resize"
	}),
	topLeft: Dd(Dd({}, Ad), {
		left: "-10px",
		top: "-10px",
		cursor: "nw-resize"
	})
}, Md = Mi(function(e) {
	var t = e.onResizeStart, n = e.direction, r = e.children, i = e.replaceStyles, a = e.className, o = I(function(e) {
		t(e, n);
	}, [t, n]), s = I(function(e) {
		t(e, n);
	}, [t, n]), c = Li(function() {
		return Dd(Dd({
			position: "absolute",
			userSelect: "none"
		}, jd[n]), i ?? {});
	}, [i, n]);
	return z("div", {
		className: a || void 0,
		style: c,
		onMouseDown: o,
		onTouchStart: s,
		children: r
	});
}), Nd = (function() {
	var e = function(t, n) {
		return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
			e.__proto__ = t;
		} || function(e, t) {
			for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
		}, e(t, n);
	};
	return function(t, n) {
		if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
		e(t, n);
		function r() {
			this.constructor = t;
		}
		t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
	};
})(), Pd = function() {
	return Pd = Object.assign || function(e) {
		for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
		return e;
	}, Pd.apply(this, arguments);
}, Fd = {
	width: "auto",
	height: "auto"
}, Id = function(e, t, n) {
	return Math.max(Math.min(e, n), t);
}, Ld = function(e, t, n) {
	var r = Math.round(e / t);
	return r * t + n * (r - 1);
}, Rd = function(e, t) {
	return new RegExp(e, "i").test(t);
}, zd = function(e) {
	return !!(e.touches && e.touches.length);
}, Bd = function(e) {
	return !!((e.clientX || e.clientX === 0) && (e.clientY || e.clientY === 0));
}, Vd = function(e, t, n) {
	n === void 0 && (n = 0);
	var r = t.reduce(function(n, r, i) {
		return Math.abs(r - e) < Math.abs(t[n] - e) ? i : n;
	}, 0), i = Math.abs(t[r] - e);
	return n === 0 || i < n ? t[r] : e;
}, Hd = function(e) {
	return e = e.toString(), e === "auto" || e.endsWith("px") || e.endsWith("%") || e.endsWith("vh") || e.endsWith("vw") || e.endsWith("vmax") || e.endsWith("vmin") ? e : `${e}px`;
}, Ud = function(e, t, n, r) {
	if (e && typeof e == "string") {
		if (e.endsWith("px")) return Number(e.replace("px", ""));
		if (e.endsWith("%")) {
			var i = Number(e.replace("%", "")) / 100;
			return t * i;
		}
		if (e.endsWith("vw")) {
			var i = Number(e.replace("vw", "")) / 100;
			return n * i;
		}
		if (e.endsWith("vh")) {
			var i = Number(e.replace("vh", "")) / 100;
			return r * i;
		}
	}
	return e;
}, Wd = function(e, t, n, r, i, a, o) {
	return r = Ud(r, e.width, t, n), i = Ud(i, e.height, t, n), a = Ud(a, e.width, t, n), o = Ud(o, e.height, t, n), {
		maxWidth: r === void 0 ? void 0 : Number(r),
		maxHeight: i === void 0 ? void 0 : Number(i),
		minWidth: a === void 0 ? void 0 : Number(a),
		minHeight: o === void 0 ? void 0 : Number(o)
	};
}, Gd = function(e) {
	return Array.isArray(e) ? e : [e, e];
}, Kd = /* @__PURE__ */ "as.ref.style.className.grid.gridGap.snap.bounds.boundsByDirection.size.defaultSize.minWidth.minHeight.maxWidth.maxHeight.lockAspectRatio.lockAspectRatioExtraWidth.lockAspectRatioExtraHeight.enable.handleStyles.handleClasses.handleWrapperStyle.handleWrapperClass.children.onResizeStart.onResize.onResizeStop.handleComponent.scale.resizeRatio.snapGap".split("."), qd = "__resizable_base__", Jd = function(e) {
	Nd(t, e);
	function t(t) {
		var n = e.call(this, t) || this;
		return n.ratio = 1, n.resizable = null, n.parentLeft = 0, n.parentTop = 0, n.resizableLeft = 0, n.resizableRight = 0, n.resizableTop = 0, n.resizableBottom = 0, n.targetLeft = 0, n.targetTop = 0, n.delta = {
			width: 0,
			height: 0
		}, n.appendBase = function() {
			if (!n.resizable || !n.window) return null;
			var e = n.parentNode;
			if (!e) return null;
			var t = n.window.document.createElement("div");
			return t.style.width = "100%", t.style.height = "100%", t.style.position = "absolute", t.style.transform = "scale(0, 0)", t.style.left = "0", t.style.flex = "0 0 100%", t.classList ? t.classList.add(qd) : t.className += qd, e.appendChild(t), t;
		}, n.removeBase = function(e) {
			var t = n.parentNode;
			t && t.removeChild(e);
		}, n.state = {
			isResizing: !1,
			width: n.propsSize?.width ?? "auto",
			height: n.propsSize?.height ?? "auto",
			direction: "right",
			original: {
				x: 0,
				y: 0,
				width: 0,
				height: 0
			},
			backgroundStyle: {
				height: "100%",
				width: "100%",
				backgroundColor: "rgba(0,0,0,0)",
				cursor: "auto",
				opacity: 0,
				position: "fixed",
				zIndex: 9999,
				top: "0",
				left: "0",
				bottom: "0",
				right: "0"
			},
			flexBasis: void 0
		}, n.onResizeStart = n.onResizeStart.bind(n), n.onMouseMove = n.onMouseMove.bind(n), n.onMouseUp = n.onMouseUp.bind(n), n;
	}
	return Object.defineProperty(t.prototype, "parentNode", {
		get: function() {
			return this.resizable ? this.resizable.parentNode : null;
		},
		enumerable: !1,
		configurable: !0
	}), Object.defineProperty(t.prototype, "window", {
		get: function() {
			return !this.resizable || !this.resizable.ownerDocument ? null : this.resizable.ownerDocument.defaultView;
		},
		enumerable: !1,
		configurable: !0
	}), Object.defineProperty(t.prototype, "propsSize", {
		get: function() {
			return this.props.size || this.props.defaultSize || Fd;
		},
		enumerable: !1,
		configurable: !0
	}), Object.defineProperty(t.prototype, "size", {
		get: function() {
			var e = 0, t = 0;
			if (this.resizable && this.window) {
				var n = this.resizable.offsetWidth, r = this.resizable.offsetHeight, i = this.resizable.style.position;
				i !== "relative" && (this.resizable.style.position = "relative"), e = this.resizable.style.width === "auto" ? n : this.resizable.offsetWidth, t = this.resizable.style.height === "auto" ? r : this.resizable.offsetHeight, this.resizable.style.position = i;
			}
			return {
				width: e,
				height: t
			};
		},
		enumerable: !1,
		configurable: !0
	}), Object.defineProperty(t.prototype, "sizeStyle", {
		get: function() {
			var e = this, t = this.props.size, n = function(t) {
				if (e.state[t] === void 0 || e.state[t] === "auto") return "auto";
				if (e.propsSize && e.propsSize[t] && e.propsSize[t]?.toString().endsWith("%")) {
					if (e.state[t].toString().endsWith("%")) return e.state[t].toString();
					var n = e.getParentSize();
					return `${Number(e.state[t].toString().replace("px", "")) / n[t] * 100}%`;
				}
				return Hd(e.state[t]);
			};
			return {
				width: t && t.width !== void 0 && !this.state.isResizing ? Hd(t.width) : n("width"),
				height: t && t.height !== void 0 && !this.state.isResizing ? Hd(t.height) : n("height")
			};
		},
		enumerable: !1,
		configurable: !0
	}), t.prototype.getParentSize = function() {
		if (!this.parentNode) return this.window ? {
			width: this.window.innerWidth,
			height: this.window.innerHeight
		} : {
			width: 0,
			height: 0
		};
		var e = this.appendBase();
		if (!e) return {
			width: 0,
			height: 0
		};
		var t = !1, n = this.parentNode.style.flexWrap;
		n !== "wrap" && (t = !0, this.parentNode.style.flexWrap = "wrap"), e.style.position = "relative", e.style.minWidth = "100%", e.style.minHeight = "100%";
		var r = {
			width: e.offsetWidth,
			height: e.offsetHeight
		};
		return t && (this.parentNode.style.flexWrap = n), this.removeBase(e), r;
	}, t.prototype.bindEvents = function() {
		this.window && (this.window.addEventListener("mouseup", this.onMouseUp), this.window.addEventListener("mousemove", this.onMouseMove), this.window.addEventListener("mouseleave", this.onMouseUp), this.window.addEventListener("touchmove", this.onMouseMove, {
			capture: !0,
			passive: !1
		}), this.window.addEventListener("touchend", this.onMouseUp));
	}, t.prototype.unbindEvents = function() {
		this.window && (this.window.removeEventListener("mouseup", this.onMouseUp), this.window.removeEventListener("mousemove", this.onMouseMove), this.window.removeEventListener("mouseleave", this.onMouseUp), this.window.removeEventListener("touchmove", this.onMouseMove, !0), this.window.removeEventListener("touchend", this.onMouseUp));
	}, t.prototype.componentDidMount = function() {
		if (!(!this.resizable || !this.window)) {
			var e = this.window.getComputedStyle(this.resizable);
			this.setState({
				width: this.state.width || this.size.width,
				height: this.state.height || this.size.height,
				flexBasis: e.flexBasis === "auto" ? void 0 : e.flexBasis
			});
		}
	}, t.prototype.componentWillUnmount = function() {
		this.window && this.unbindEvents();
	}, t.prototype.createSizeForCssProperty = function(e, t) {
		var n = this.propsSize && this.propsSize[t];
		return this.state[t] === "auto" && this.state.original[t] === e && (n === void 0 || n === "auto") ? "auto" : e;
	}, t.prototype.calculateNewMaxFromBoundary = function(e, t) {
		var n = this.props.boundsByDirection, r = this.state.direction, i = n && Rd("left", r), a = n && Rd("top", r), o, s;
		if (this.props.bounds === "parent") {
			var c = this.parentNode;
			c && (o = i ? this.resizableRight - this.parentLeft : c.offsetWidth + (this.parentLeft - this.resizableLeft), s = a ? this.resizableBottom - this.parentTop : c.offsetHeight + (this.parentTop - this.resizableTop));
		} else this.props.bounds === "window" ? this.window && (o = i ? this.resizableRight : this.window.innerWidth - this.resizableLeft, s = a ? this.resizableBottom : this.window.innerHeight - this.resizableTop) : this.props.bounds && (o = i ? this.resizableRight - this.targetLeft : this.props.bounds.offsetWidth + (this.targetLeft - this.resizableLeft), s = a ? this.resizableBottom - this.targetTop : this.props.bounds.offsetHeight + (this.targetTop - this.resizableTop));
		return o && Number.isFinite(o) && (e = e && e < o ? e : o), s && Number.isFinite(s) && (t = t && t < s ? t : s), {
			maxWidth: e,
			maxHeight: t
		};
	}, t.prototype.calculateNewSizeFromDirection = function(e, t) {
		var n = this.props.scale || 1, r = Gd(this.props.resizeRatio || 1), i = r[0], a = r[1], o = this.state, s = o.direction, c = o.original, l = this.props, u = l.lockAspectRatio, d = l.lockAspectRatioExtraHeight, f = l.lockAspectRatioExtraWidth, p = c.width, m = c.height, h = d || 0, g = f || 0;
		return Rd("right", s) && (p = c.width + (e - c.x) * i / n, u && (m = (p - g) / this.ratio + h)), Rd("left", s) && (p = c.width - (e - c.x) * i / n, u && (m = (p - g) / this.ratio + h)), Rd("bottom", s) && (m = c.height + (t - c.y) * a / n, u && (p = (m - h) * this.ratio + g)), Rd("top", s) && (m = c.height - (t - c.y) * a / n, u && (p = (m - h) * this.ratio + g)), {
			newWidth: p,
			newHeight: m
		};
	}, t.prototype.calculateNewSizeFromAspectRatio = function(e, t, n, r) {
		var i = this.props, a = i.lockAspectRatio, o = i.lockAspectRatioExtraHeight, s = i.lockAspectRatioExtraWidth, c = r.width === void 0 ? 10 : r.width, l = n.width === void 0 || n.width < 0 ? e : n.width, u = r.height === void 0 ? 10 : r.height, d = n.height === void 0 || n.height < 0 ? t : n.height, f = o || 0, p = s || 0;
		if (a) {
			var m = (u - f) * this.ratio + p, h = (d - f) * this.ratio + p, g = (c - p) / this.ratio + f, _ = (l - p) / this.ratio + f, v = Math.max(c, m), y = Math.min(l, h), b = Math.max(u, g), x = Math.min(d, _);
			e = Id(e, v, y), t = Id(t, b, x);
		} else e = Id(e, c, l), t = Id(t, u, d);
		return {
			newWidth: e,
			newHeight: t
		};
	}, t.prototype.setBoundingClientRect = function() {
		var e = 1 / (this.props.scale || 1);
		if (this.props.bounds === "parent") {
			var t = this.parentNode;
			if (t) {
				var n = t.getBoundingClientRect();
				this.parentLeft = n.left * e, this.parentTop = n.top * e;
			}
		}
		if (this.props.bounds && typeof this.props.bounds != "string") {
			var r = this.props.bounds.getBoundingClientRect();
			this.targetLeft = r.left * e, this.targetTop = r.top * e;
		}
		if (this.resizable) {
			var i = this.resizable.getBoundingClientRect(), a = i.left, o = i.top, s = i.right, c = i.bottom;
			this.resizableLeft = a * e, this.resizableRight = s * e, this.resizableTop = o * e, this.resizableBottom = c * e;
		}
	}, t.prototype.onResizeStart = function(e, t) {
		if (!(!this.resizable || !this.window)) {
			var n = 0, r = 0;
			if (e.nativeEvent && Bd(e.nativeEvent) ? (n = e.nativeEvent.clientX, r = e.nativeEvent.clientY) : e.nativeEvent && zd(e.nativeEvent) && (n = e.nativeEvent.touches[0].clientX, r = e.nativeEvent.touches[0].clientY), !(this.props.onResizeStart && this.resizable && this.props.onResizeStart(e, t, this.resizable) === !1)) {
				this.props.size && (this.props.size.height !== void 0 && this.props.size.height !== this.state.height && this.setState({ height: this.props.size.height }), this.props.size.width !== void 0 && this.props.size.width !== this.state.width && this.setState({ width: this.props.size.width })), this.ratio = typeof this.props.lockAspectRatio == "number" ? this.props.lockAspectRatio : this.size.width / this.size.height;
				var i, a = this.window.getComputedStyle(this.resizable);
				if (a.flexBasis !== "auto") {
					var o = this.parentNode;
					if (o) {
						var s = this.window.getComputedStyle(o).flexDirection;
						this.flexDir = s.startsWith("row") ? "row" : "column", i = a.flexBasis;
					}
				}
				this.setBoundingClientRect(), this.bindEvents();
				var c = {
					original: {
						x: n,
						y: r,
						width: this.size.width,
						height: this.size.height
					},
					isResizing: !0,
					backgroundStyle: Pd(Pd({}, this.state.backgroundStyle), { cursor: this.window.getComputedStyle(e.target).cursor || "auto" }),
					direction: t,
					flexBasis: i
				};
				this.setState(c);
			}
		}
	}, t.prototype.onMouseMove = function(e) {
		var t = this;
		if (!(!this.state.isResizing || !this.resizable || !this.window)) {
			if (this.window.TouchEvent && zd(e)) try {
				e.preventDefault(), e.stopPropagation();
			} catch {}
			var n = this.props, r = n.maxWidth, i = n.maxHeight, a = n.minWidth, o = n.minHeight, s = zd(e) ? e.touches[0].clientX : e.clientX, c = zd(e) ? e.touches[0].clientY : e.clientY, l = this.state, u = l.direction, d = l.original, f = l.width, p = l.height, m = this.getParentSize(), h = Wd(m, this.window.innerWidth, this.window.innerHeight, r, i, a, o);
			r = h.maxWidth, i = h.maxHeight, a = h.minWidth, o = h.minHeight;
			var g = this.calculateNewSizeFromDirection(s, c), _ = g.newHeight, v = g.newWidth, y = this.calculateNewMaxFromBoundary(r, i);
			this.props.snap && this.props.snap.x && (v = Vd(v, this.props.snap.x, this.props.snapGap)), this.props.snap && this.props.snap.y && (_ = Vd(_, this.props.snap.y, this.props.snapGap));
			var b = this.calculateNewSizeFromAspectRatio(v, _, {
				width: y.maxWidth,
				height: y.maxHeight
			}, {
				width: a,
				height: o
			});
			if (v = b.newWidth, _ = b.newHeight, this.props.grid) {
				var x = Ld(v, this.props.grid[0], this.props.gridGap ? this.props.gridGap[0] : 0), S = Ld(_, this.props.grid[1], this.props.gridGap ? this.props.gridGap[1] : 0), C = this.props.snapGap || 0, w = C === 0 || Math.abs(x - v) <= C ? x : v, T = C === 0 || Math.abs(S - _) <= C ? S : _;
				v = w, _ = T;
			}
			var E = {
				width: v - d.width,
				height: _ - d.height
			};
			if (this.delta = E, f && typeof f == "string") {
				if (f.endsWith("%")) {
					var ee = v / m.width * 100;
					v = `${ee}%`;
				} else if (f.endsWith("vw")) {
					var D = v / this.window.innerWidth * 100;
					v = `${D}vw`;
				} else if (f.endsWith("vh")) {
					var te = v / this.window.innerHeight * 100;
					v = `${te}vh`;
				}
			}
			if (p && typeof p == "string") {
				if (p.endsWith("%")) {
					var ee = _ / m.height * 100;
					_ = `${ee}%`;
				} else if (p.endsWith("vw")) {
					var D = _ / this.window.innerWidth * 100;
					_ = `${D}vw`;
				} else if (p.endsWith("vh")) {
					var te = _ / this.window.innerHeight * 100;
					_ = `${te}vh`;
				}
			}
			var ne = {
				width: this.createSizeForCssProperty(v, "width"),
				height: this.createSizeForCssProperty(_, "height")
			};
			this.flexDir === "row" ? ne.flexBasis = ne.width : this.flexDir === "column" && (ne.flexBasis = ne.height);
			var re = this.state.width !== ne.width, ie = this.state.height !== ne.height, ae = this.state.flexBasis !== ne.flexBasis, oe = re || ie || ae;
			oe && da(function() {
				t.setState(ne);
			}), this.props.onResize && oe && this.props.onResize(e, u, this.resizable, E);
		}
	}, t.prototype.onMouseUp = function(e) {
		var t = this.state, n = t.isResizing, r = t.direction;
		t.original, !(!n || !this.resizable) && (this.props.onResizeStop && this.props.onResizeStop(e, r, this.resizable, this.delta), this.props.size && this.setState({
			width: this.props.size.width ?? "auto",
			height: this.props.size.height ?? "auto"
		}), this.unbindEvents(), this.setState({
			isResizing: !1,
			backgroundStyle: Pd(Pd({}, this.state.backgroundStyle), { cursor: "auto" })
		}));
	}, t.prototype.updateSize = function(e) {
		this.setState({
			width: e.width ?? "auto",
			height: e.height ?? "auto"
		});
	}, t.prototype.renderResizer = function() {
		var e = this, t = this.props, n = t.enable, r = t.handleStyles, i = t.handleClasses, a = t.handleWrapperStyle, o = t.handleWrapperClass, s = t.handleComponent;
		if (!n) return null;
		var c = Object.keys(n).map(function(t) {
			return n[t] === !1 ? null : z(Md, {
				direction: t,
				onResizeStart: e.onResizeStart,
				replaceStyles: r && r[t],
				className: i && i[t],
				children: s && s[t] ? s[t] : null
			}, t);
		});
		return z("div", {
			className: o,
			style: a,
			children: c
		});
	}, t.prototype.render = function() {
		var e = this, t = Object.keys(this.props).reduce(function(t, n) {
			return Kd.indexOf(n) === -1 && (t[n] = e.props[n]), t;
		}, {}), n = Pd(Pd(Pd({
			position: "relative",
			userSelect: this.state.isResizing ? "none" : "auto"
		}, this.props.style), this.sizeStyle), {
			maxWidth: this.props.maxWidth,
			maxHeight: this.props.maxHeight,
			minWidth: this.props.minWidth,
			minHeight: this.props.minHeight,
			boxSizing: "border-box",
			flexShrink: 0
		});
		this.state.flexBasis && (n.flexBasis = this.state.flexBasis);
		var r = this.props.as || "div";
		return B(r, Pd({
			style: n,
			className: this.props.className
		}, t, {
			ref: function(t) {
				t && (e.resizable = t);
			},
			children: [
				this.state.isResizing && z("div", { style: this.state.backgroundStyle }),
				this.props.children,
				this.renderResizer()
			]
		}));
	}, t.defaultProps = {
		as: "div",
		onResizeStart: function() {},
		onResize: function() {},
		onResizeStop: function() {},
		enable: {
			top: !0,
			right: !0,
			bottom: !0,
			left: !0,
			topRight: !0,
			bottomRight: !0,
			bottomLeft: !0,
			topLeft: !0
		},
		style: {},
		grid: [1, 1],
		gridGap: [0, 0],
		lockAspectRatio: !1,
		lockAspectRatioExtraWidth: 0,
		lockAspectRatioExtraHeight: 0,
		scale: 1,
		resizeRatio: 1,
		snapGap: 0
	}, t;
}(Ci), Yd = function(e, t) {
	return Yd = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
		e.__proto__ = t;
	} || function(e, t) {
		for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
	}, Yd(e, t);
};
function Xd(e, t) {
	Yd(e, t);
	function n() {
		this.constructor = e;
	}
	e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
}
var Zd = function() {
	return Zd = Object.assign || function(e) {
		for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
		return e;
	}, Zd.apply(this, arguments);
};
function Qd(e, t) {
	var n = {};
	for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
	if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
	return n;
}
var $d = {
	width: "auto",
	height: "auto",
	display: "inline-block",
	position: "absolute",
	top: 0,
	left: 0
}, ef = function(e) {
	return {
		bottom: e,
		bottomLeft: e,
		bottomRight: e,
		left: e,
		right: e,
		top: e,
		topLeft: e,
		topRight: e
	};
}, tf = function(e) {
	Xd(t, e);
	function t(t) {
		var n = e.call(this, t) || this;
		return n.resizingPosition = {
			x: 0,
			y: 0
		}, n.offsetFromParent = {
			left: 0,
			top: 0
		}, n.resizableElement = { current: null }, n.originalPosition = {
			x: 0,
			y: 0
		}, n.state = {
			resizing: !1,
			bounds: {
				top: 0,
				right: 0,
				bottom: 0,
				left: 0
			},
			maxWidth: t.maxWidth,
			maxHeight: t.maxHeight
		}, n.onResizeStart = n.onResizeStart.bind(n), n.onResize = n.onResize.bind(n), n.onResizeStop = n.onResizeStop.bind(n), n.onDragStart = n.onDragStart.bind(n), n.onDrag = n.onDrag.bind(n), n.onDragStop = n.onDragStop.bind(n), n.getMaxSizesFromProps = n.getMaxSizesFromProps.bind(n), n;
	}
	return t.prototype.componentDidMount = function() {
		this.updateOffsetFromParent();
		var e = this.offsetFromParent, t = e.left, n = e.top, r = this.getDraggablePosition(), i = r.x, a = r.y;
		this.draggable.setState({
			x: i - t,
			y: a - n
		}), this.forceUpdate();
	}, t.prototype.getDraggablePosition = function() {
		var e = this.draggable.state;
		return {
			x: e.x,
			y: e.y
		};
	}, t.prototype.getParent = function() {
		return this.resizable && this.resizable.parentNode;
	}, t.prototype.getParentSize = function() {
		return this.resizable.getParentSize();
	}, t.prototype.getMaxSizesFromProps = function() {
		return {
			maxWidth: this.props.maxWidth === void 0 ? 2 ** 53 - 1 : this.props.maxWidth,
			maxHeight: this.props.maxHeight === void 0 ? 2 ** 53 - 1 : this.props.maxHeight
		};
	}, t.prototype.getSelfElement = function() {
		return this.resizable && this.resizable.resizable;
	}, t.prototype.getOffsetHeight = function(e) {
		var t = this.props.scale;
		switch (this.props.bounds) {
			case "window": return window.innerHeight / t;
			case "body": return document.body.offsetHeight / t;
			default: return e.offsetHeight;
		}
	}, t.prototype.getOffsetWidth = function(e) {
		var t = this.props.scale;
		switch (this.props.bounds) {
			case "window": return window.innerWidth / t;
			case "body": return document.body.offsetWidth / t;
			default: return e.offsetWidth;
		}
	}, t.prototype.onDragStart = function(e, t) {
		if (this.props.onDragStart && this.props.onDragStart(e, t) === !1) return !1;
		var n = this.getDraggablePosition();
		if (this.originalPosition = n, this.props.bounds) {
			var r = this.getParent(), i = this.props.scale, a;
			if (this.props.bounds === "parent") a = r;
			else if (this.props.bounds === "body") {
				var o = r.getBoundingClientRect(), s = o.left, c = o.top, l = document.body.getBoundingClientRect(), u = -(s - r.offsetLeft * i - l.left) / i, d = -(c - r.offsetTop * i - l.top) / i, f = (document.body.offsetWidth - this.resizable.size.width * i) / i + u, p = (document.body.offsetHeight - this.resizable.size.height * i) / i + d;
				return this.setState({ bounds: {
					top: d,
					right: f,
					bottom: p,
					left: u
				} });
			} else if (this.props.bounds === "window") {
				if (!this.resizable) return;
				var m = r.getBoundingClientRect(), h = m.left, g = m.top, _ = -(h - r.offsetLeft * i) / i, v = -(g - r.offsetTop * i) / i, f = (window.innerWidth - this.resizable.size.width * i) / i + _, p = (window.innerHeight - this.resizable.size.height * i) / i + v;
				return this.setState({ bounds: {
					top: v,
					right: f,
					bottom: p,
					left: _
				} });
			} else typeof this.props.bounds == "string" ? a = document.querySelector(this.props.bounds) : this.props.bounds instanceof HTMLElement && (a = this.props.bounds);
			if (!(!(a instanceof HTMLElement) || !(r instanceof HTMLElement))) {
				var y = a.getBoundingClientRect(), b = y.left, x = y.top, S = r.getBoundingClientRect(), C = S.left, w = S.top, T = (b - C) / i, E = x - w;
				if (this.resizable) {
					this.updateOffsetFromParent();
					var ee = this.offsetFromParent;
					this.setState({ bounds: {
						top: E - ee.top,
						right: T + (a.offsetWidth - this.resizable.size.width) - ee.left / i,
						bottom: E + (a.offsetHeight - this.resizable.size.height) - ee.top,
						left: T - ee.left / i
					} });
				}
			}
		}
	}, t.prototype.onDrag = function(e, t) {
		if (this.props.onDrag) {
			var n = this.offsetFromParent, r = n.left, i = n.top;
			if (!this.props.dragAxis || this.props.dragAxis === "both") return this.props.onDrag(e, Zd(Zd({}, t), {
				x: t.x + r,
				y: t.y + i
			}));
			if (this.props.dragAxis === "x") return this.props.onDrag(e, Zd(Zd({}, t), {
				x: t.x + r,
				y: this.originalPosition.y + i,
				deltaY: 0
			}));
			if (this.props.dragAxis === "y") return this.props.onDrag(e, Zd(Zd({}, t), {
				x: this.originalPosition.x + r,
				y: t.y + i,
				deltaX: 0
			}));
		}
	}, t.prototype.onDragStop = function(e, t) {
		if (this.props.onDragStop) {
			var n = this.offsetFromParent, r = n.left, i = n.top;
			if (!this.props.dragAxis || this.props.dragAxis === "both") return this.props.onDragStop(e, Zd(Zd({}, t), {
				x: t.x + r,
				y: t.y + i
			}));
			if (this.props.dragAxis === "x") return this.props.onDragStop(e, Zd(Zd({}, t), {
				x: t.x + r,
				y: this.originalPosition.y + i,
				deltaY: 0
			}));
			if (this.props.dragAxis === "y") return this.props.onDragStop(e, Zd(Zd({}, t), {
				x: this.originalPosition.x + r,
				y: t.y + i,
				deltaX: 0
			}));
		}
	}, t.prototype.onResizeStart = function(e, t, n) {
		if (this.props.onResizeStart && this.props.onResizeStart(e, t, n) === !1) return !1;
		e.stopPropagation(), this.setState({ resizing: !0 });
		var r = this.props.scale, i = this.offsetFromParent, a = this.getDraggablePosition();
		if (this.resizingPosition = {
			x: a.x + i.left,
			y: a.y + i.top
		}, this.originalPosition = a, this.props.bounds) {
			var o = this.getParent(), s = void 0;
			this.props.bounds === "parent" ? s = o : this.props.bounds === "body" ? s = document.body : this.props.bounds === "window" ? s = window : typeof this.props.bounds == "string" ? s = document.querySelector(this.props.bounds) : this.props.bounds instanceof HTMLElement && (s = this.props.bounds);
			var c = this.getSelfElement();
			if (c instanceof Element && (s instanceof HTMLElement || s === window) && o instanceof HTMLElement) {
				var l = this.getMaxSizesFromProps(), u = l.maxWidth, d = l.maxHeight, f = this.getParentSize();
				if (u && typeof u == "string") {
					if (u.endsWith("%")) {
						var p = Number(u.replace("%", "")) / 100;
						u = f.width * p;
					} else u.endsWith("px") && (u = Number(u.replace("px", "")));
				}
				if (d && typeof d == "string") {
					if (d.endsWith("%")) {
						var p = Number(d.replace("%", "")) / 100;
						d = f.height * p;
					} else d.endsWith("px") && (d = Number(d.replace("px", "")));
				}
				var m = c.getBoundingClientRect(), h = m.left, g = m.top, _ = this.props.bounds === "window" ? {
					left: 0,
					top: 0
				} : s.getBoundingClientRect(), v = _.left, y = _.top, b = this.getOffsetWidth(s), x = this.getOffsetHeight(s), S = t.toLowerCase().endsWith("left"), C = t.toLowerCase().endsWith("right"), w = t.startsWith("top"), T = t.startsWith("bottom");
				if ((S || w) && this.resizable) {
					var E = (h - v) / r + this.resizable.size.width;
					this.setState({ maxWidth: E > Number(u) ? u : E });
				}
				if (C || this.props.lockAspectRatio && !S && !w) {
					var E = b + (v - h) / r;
					this.setState({ maxWidth: E > Number(u) ? u : E });
				}
				if ((w || S) && this.resizable) {
					var E = (g - y) / r + this.resizable.size.height;
					this.setState({ maxHeight: E > Number(d) ? d : E });
				}
				if (T || this.props.lockAspectRatio && !w && !S) {
					var E = x + (y - g) / r;
					this.setState({ maxHeight: E > Number(d) ? d : E });
				}
			}
		} else this.setState({
			maxWidth: this.props.maxWidth,
			maxHeight: this.props.maxHeight
		});
	}, t.prototype.onResize = function(e, t, n, r) {
		var i = this, a = {
			x: this.originalPosition.x,
			y: this.originalPosition.y
		}, o = -r.width, s = -r.height;
		[
			"top",
			"left",
			"topLeft",
			"bottomLeft",
			"topRight"
		].includes(t) && (t === "bottomLeft" ? a.x += o : (t === "topRight" || (a.x += o), a.y += s));
		var c = this.draggable.state;
		(a.x !== c.x || a.y !== c.y) && da(function() {
			i.draggable.setState(a);
		}), this.updateOffsetFromParent();
		var l = this.offsetFromParent, u = this.getDraggablePosition().x + l.left, d = this.getDraggablePosition().y + l.top;
		this.resizingPosition = {
			x: u,
			y: d
		}, this.props.onResize && this.props.onResize(e, t, n, r, {
			x: u,
			y: d
		});
	}, t.prototype.onResizeStop = function(e, t, n, r) {
		this.setState({ resizing: !1 });
		var i = this.getMaxSizesFromProps(), a = i.maxWidth, o = i.maxHeight;
		this.setState({
			maxWidth: a,
			maxHeight: o
		}), this.props.onResizeStop && this.props.onResizeStop(e, t, n, r, this.resizingPosition);
	}, t.prototype.updateSize = function(e) {
		this.resizable && this.resizable.updateSize({
			width: e.width,
			height: e.height
		});
	}, t.prototype.updatePosition = function(e) {
		this.draggable.setState(e);
	}, t.prototype.updateOffsetFromParent = function() {
		var e = this.props.scale, t = this.getParent(), n = this.getSelfElement();
		if (!t || n === null) return {
			top: 0,
			left: 0
		};
		var r = t.getBoundingClientRect(), i = r.left, a = r.top, o = n.getBoundingClientRect(), s = this.getDraggablePosition(), c = t.scrollLeft, l = t.scrollTop;
		this.offsetFromParent = {
			left: o.left - i + c - s.x * e,
			top: o.top - a + l - s.y * e
		};
	}, t.prototype.render = function() {
		var e = this, t = this.props, n = t.disableDragging, r = t.style, i = t.dragHandleClassName, a = t.position, o = t.onMouseDown, s = t.onMouseUp, c = t.dragAxis, l = t.dragGrid, u = t.bounds, d = t.enableUserSelectHack, f = t.cancel, p = t.children;
		t.onResizeStart, t.onResize, t.onResizeStop, t.onDragStart, t.onDrag, t.onDragStop;
		var m = t.resizeHandleStyles, h = t.resizeHandleClasses, g = t.resizeHandleComponent, _ = t.enableResizing, v = t.resizeGrid, y = t.resizeHandleWrapperClass, b = t.resizeHandleWrapperStyle, x = t.scale, S = t.allowAnyClick, C = t.dragPositionOffset, w = Qd(t, /* @__PURE__ */ "disableDragging.style.dragHandleClassName.position.onMouseDown.onMouseUp.dragAxis.dragGrid.bounds.enableUserSelectHack.cancel.children.onResizeStart.onResize.onResizeStop.onDragStart.onDrag.onDragStop.resizeHandleStyles.resizeHandleClasses.resizeHandleComponent.enableResizing.resizeGrid.resizeHandleWrapperClass.resizeHandleWrapperStyle.scale.allowAnyClick.dragPositionOffset".split(".")), T = this.props.default ? Zd({}, this.props.default) : void 0;
		delete w.default;
		var E = n || i ? { cursor: "auto" } : { cursor: "move" }, ee = Zd(Zd(Zd({}, $d), E), r), D = this.offsetFromParent, te = D.left, ne = D.top, re;
		a && (re = {
			x: a.x - te,
			y: a.y - ne
		});
		var ie = this.state.resizing ? void 0 : re, ae = this.state.resizing ? "both" : c;
		return Di(Ed, {
			ref: function(t) {
				t && (e.draggable = t);
			},
			handle: i ? `.${i}` : void 0,
			defaultPosition: T,
			onMouseDown: o,
			onMouseUp: s,
			onStart: this.onDragStart,
			onDrag: this.onDrag,
			onStop: this.onDragStop,
			axis: ae,
			disabled: n,
			grid: l,
			bounds: u ? this.state.bounds : void 0,
			position: ie,
			enableUserSelectHack: d,
			cancel: f,
			scale: x,
			allowAnyClick: S,
			nodeRef: this.resizableElement,
			positionOffset: C
		}, Di(Jd, Zd({}, w, {
			ref: function(t) {
				t && (e.resizable = t, e.resizableElement.current = t.resizable);
			},
			defaultSize: T,
			size: this.props.size,
			enable: typeof _ == "boolean" ? ef(_) : _,
			onResizeStart: this.onResizeStart,
			onResize: this.onResize,
			onResizeStop: this.onResizeStop,
			style: ee,
			minWidth: this.props.minWidth,
			minHeight: this.props.minHeight,
			maxWidth: this.state.resizing ? this.state.maxWidth : this.props.maxWidth,
			maxHeight: this.state.resizing ? this.state.maxHeight : this.props.maxHeight,
			grid: v,
			handleWrapperClass: y,
			handleWrapperStyle: b,
			lockAspectRatio: this.props.lockAspectRatio,
			lockAspectRatioExtraWidth: this.props.lockAspectRatioExtraWidth,
			lockAspectRatioExtraHeight: this.props.lockAspectRatioExtraHeight,
			handleStyles: m,
			handleClasses: h,
			handleComponent: g,
			scale: this.props.scale
		}), p));
	}, t.defaultProps = {
		maxWidth: 2 ** 53 - 1,
		maxHeight: 2 ** 53 - 1,
		scale: 1,
		onResizeStart: function() {},
		onResize: function() {},
		onResizeStop: function() {},
		onDragStart: function() {},
		onDrag: function() {},
		onDragStop: function() {}
	}, t;
}(Ci), nf = si(), rf = H(Vi, {
	name: "CompanionWindow",
	slot: "root"
})({}), af = H(la, {
	name: "CompanionWindow",
	slot: "toolbar"
})({}), of = H(U, {
	name: "CompanionWindow",
	slot: "title"
})({}), sf = H("div", {
	name: "CompanionWindow",
	slot: "controls"
})({}), cf = H(Vi, {
	name: "CompanionWindow",
	slot: "contents"
})({}), lf = H(tf, {
	name: "CompanionWindow",
	slot: "resize"
})({}), uf = H(ii, {
	name: "CompanionWindow",
	slot: "positionButton"
})({}), df = H(ii, {
	name: "CompanionWindow",
	slot: "closeButton"
})({}), ff = ki((e, t) => {
	let { ariaLabel: n = void 0, classes: r = {}, direction: i, id: a, paperClassName: o = "", onCloseClick: s = () => {}, updateCompanionWindow: c = void 0, isDisplayed: l = !1, position: u = null, title: d = null, children: f = void 0, titleControls: p = null, defaultSidebarPanelWidth: m = 235, defaultSidebarPanelHeight: h = 201 } = e, [g, _] = (0, nf.useElementSize)(), { t: v } = V(), y = Ce((e) => Qt(e, { companionWindowId: a }), [a]), b = i === "rtl" ? { transform: "scale(-1, 1)" } : {}, x = (() => {
		let e = {
			ltr: {
				default: "left",
				opposite: "right"
			},
			rtl: {
				default: "right",
				opposite: "left"
			}
		}, t = {
			bottom: !1,
			bottomLeft: !1,
			bottomRight: !1,
			left: !1,
			right: !1,
			top: !1,
			topLeft: !1,
			topRight: !1
		};
		return u === "right" || u === "far-right" ? {
			...t,
			[e[i].default]: !0
		} : u === "left" ? {
			...t,
			[e[i].opposite]: !0
		} : u === "bottom" || u === "far-bottom" ? {
			...t,
			top: !0
		} : t;
	})(), S = u === "bottom" || u === "far-bottom", C = xi.map(f, (e) => e ? Ti(e, { parentactions: { closeCompanionWindow: s } }) : null);
	return /* @__PURE__ */ z(rf, {
		ownerState: e,
		ref: ai(t, g),
		style: {
			display: l ? null : "none",
			order: u === "left" ? -1 : null
		},
		className: [
			M(`companion-window-${u}`),
			o,
			u === "bottom" ? r.horizontal : r.vertical
		].join(" "),
		square: !0,
		component: "aside",
		role: "region",
		"aria-label": n || d,
		children: /* @__PURE__ */ z($r.Provider, {
			value: y,
			children: /* @__PURE__ */ B(lf, {
				style: {
					display: "inherit",
					position: "inherit"
				},
				ownerState: e,
				default: {
					height: S ? h : "100%",
					width: S ? "auto" : m
				},
				disableDragging: !0,
				enableResizing: x,
				minHeight: 50,
				minWidth: u === "left" ? 235 : 100,
				children: [/* @__PURE__ */ B(af, {
					variant: "dense",
					className: [M("companion-window-header"), _.width < 370 ? "test" : null].join(" "),
					disableGutters: !0,
					children: [
						/* @__PURE__ */ z(of, {
							variant: "h3",
							children: d
						}),
						u === "left" ? c && /* @__PURE__ */ z(ii, {
							"aria-label": v("openInCompanionWindow"),
							onClick: () => {
								c({ position: "right" });
							},
							children: /* @__PURE__ */ z(ju, { style: b })
						}) : /* @__PURE__ */ B(Bi, { children: [c && /* @__PURE__ */ z(uf, {
							"aria-label": v(u === "bottom" ? "moveCompanionWindowToRight" : "moveCompanionWindowToBottom"),
							onClick: () => {
								c({ position: u === "bottom" ? "right" : "bottom" });
							},
							children: /* @__PURE__ */ z(Mu, {})
						}), /* @__PURE__ */ z(df, {
							sx: { ..._.width < 370 && { order: "unset" } },
							"aria-label": v("closeCompanionWindow"),
							onClick: s,
							children: /* @__PURE__ */ z(Au, {})
						})] }),
						p && /* @__PURE__ */ z(sf, {
							ownerState: { position: u },
							sx: { order: S || _.width < 370 ? "unset" : 1e3 },
							className: M("companion-window-title-controls"),
							children: p
						})
					]
				}), /* @__PURE__ */ z(cf, {
					className: M("scrollto-scrollable"),
					elevation: 0,
					children: C
				})]
			})
		})
	});
});
ff.propTypes = {
	ariaLabel: W.default.string,
	children: W.default.node,
	classes: W.default.objectOf(W.default.string),
	defaultSidebarPanelHeight: W.default.number,
	defaultSidebarPanelWidth: W.default.number,
	direction: W.default.string.isRequired,
	id: W.default.string.isRequired,
	isDisplayed: W.default.bool,
	onCloseClick: W.default.func,
	paperClassName: W.default.string,
	position: W.default.string,
	size: W.default.shape({ width: W.default.number }),
	title: W.default.oneOfType([W.default.string, W.default.node]),
	titleControls: W.default.node,
	updateCompanionWindow: W.default.func
}, ff.displayName = "CompanionWindow";
var pf = i(O((e, { id: t, windowId: n }) => {
	let r = Fe(e, { companionWindowId: t }), { defaultSidebarPanelHeight: i, defaultSidebarPanelWidth: a } = ut(e, { windowId: n });
	return {
		...r,
		defaultSidebarPanelHeight: i,
		defaultSidebarPanelWidth: a,
		direction: dt(e),
		isDisplayed: r && r.content && r.content.length > 0
	};
}, (e, { windowId: t, id: n }) => ({
	onCloseClick: () => e(Ss(t, n)),
	updateCompanionWindow: (...r) => e(xs(t, n, ...r))
}), null, { forwardRef: !0 }), A("CompanionWindow"))(ff), mf = H("div", {
	name: "CompanionWindowSection",
	slot: "root"
})(({ theme: e }) => ({
	paddingBlockEnd: e.spacing(1),
	paddingBlockStart: e.spacing(2),
	paddingInlineEnd: e.spacing(1),
	paddingInlineStart: e.spacing(2)
}));
//#endregion
//#region src/components/WindowSideBarAnnotationsPanel.jsx
function hf({ annotationCount: e, canvasIds: t = [], windowId: n, id: r }) {
	let { t: i } = V(), a = Oi();
	return /* @__PURE__ */ B(pf, {
		title: i("annotations"),
		paperClassName: M("window-sidebar-annotation-panel"),
		windowId: n,
		id: r,
		ref: a,
		titleControls: /* @__PURE__ */ z(Gc, { windowId: n }),
		children: [/* @__PURE__ */ z(mf, { children: /* @__PURE__ */ z(U, {
			component: "p",
			variant: "subtitle2",
			children: i("showingNumAnnotations", {
				count: e,
				number: e
			})
		}) }), t.map((e, r) => /* @__PURE__ */ z(ku, {
			canvasId: e,
			containerRef: a,
			index: r,
			totalSize: t.length,
			windowId: n
		}, e))]
	});
}
hf.propTypes = {
	annotationCount: W.default.number.isRequired,
	canvasIds: W.default.arrayOf(W.default.string),
	id: W.default.string.isRequired,
	windowId: W.default.string.isRequired
};
var gf = i(O((e, { windowId: t }) => ({
	annotationCount: gr(e, { windowId: t }).length,
	canvasIds: dn(e, { windowId: t })
}), null), A("WindowSideBarAnnotationsPanel"))(hf), _f = N(/*#__PURE__*/ z("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore");
//#endregion
//#region src/components/CollapsibleSection.jsx
function vf({ children: e, id: t, label: n }) {
	let { t: r } = V(), [i, a] = zi(!0), o = I((e, t) => {
		a(t);
	}, [a]);
	return /* @__PURE__ */ B(fa, {
		slotProps: { heading: { component: "h4" } },
		id: t,
		elevation: 0,
		expanded: i,
		onChange: o,
		disableGutters: !0,
		square: !0,
		variant: "compact",
		children: [/* @__PURE__ */ z(ma, {
			id: `${t}-header`,
			"aria-controls": `${t}-content`,
			"aria-label": r(i ? "collapseSection" : "expandSection", { section: n }),
			expandIcon: /* @__PURE__ */ z(_f, {}),
			children: /* @__PURE__ */ z(U, {
				variant: "overline",
				children: n
			})
		}), /* @__PURE__ */ z(pa, { children: e })]
	});
}
vf.propTypes = {
	children: W.default.node.isRequired,
	id: W.default.string.isRequired,
	label: W.default.string.isRequired
};
//#endregion
//#region src/containers/CollapsibleSection.js
var yf = vf;
//#endregion
//#region src/components/LabelValueMetadata.jsx
function bf({ defaultLabel: e = void 0, labelValuePairs: t, labelValueJoiner: n = ", " }) {
	return t.length === 0 ? null : /* @__PURE__ */ z("dl", {
		className: M("label-value-metadata"),
		children: t.reduce((t, r, i) => t.concat([/* @__PURE__ */ z(U, {
			component: "dt",
			variant: "subtitle2",
			children: r.label || e
		}, `label-${i}`), /* @__PURE__ */ z(U, {
			style: {
				marginBottom: ".5em",
				marginLeft: "0px"
			},
			component: "dd",
			variant: "body1",
			children: /* @__PURE__ */ z(wu, {
				htmlString: r.values.join(n),
				ruleSet: "iiif"
			})
		}, `value-${i}`)]), [])
	});
}
bf.propTypes = {
	defaultLabel: W.default.string,
	labelValueJoiner: W.default.string,
	labelValuePairs: W.default.arrayOf(W.default.shape({
		label: W.default.string,
		values: W.default.arrayOf(W.default.string)
	})).isRequired
};
var xf = i(O((e) => ({ labelValueJoiner: Gt(e).labelValueJoiner })), A("LabelValueMetadata"))(bf);
//#endregion
//#region src/components/CanvasInfo.jsx
function Sf({ canvasDescription: e = null, canvasLabel: t = null, canvasMetadata: n = [], index: r = 1, totalSize: i = 1 }) {
	let { t: a } = V(), o = Pi(), s = Pi(), c = arguments[0];
	return /* @__PURE__ */ B(yf, {
		id: o,
		label: a("currentItem", { context: `${r + 1}/${i}` }),
		children: [
			t && /* @__PURE__ */ z(U, {
				"aria-labelledby": `${o} ${s}`,
				id: s,
				variant: "h4",
				component: "h5",
				children: t
			}),
			e && /* @__PURE__ */ z(U, {
				variant: "body1",
				children: /* @__PURE__ */ z(wu, {
					htmlString: e,
					ruleSet: "iiif"
				})
			}),
			n && n.length > 0 && /* @__PURE__ */ z(xf, { labelValuePairs: n }),
			/* @__PURE__ */ z(Yr, {
				targetName: "CanvasInfo",
				...c
			})
		]
	});
}
Sf.propTypes = {
	canvasDescription: W.default.string,
	canvasLabel: W.default.string,
	canvasMetadata: W.default.array,
	index: W.default.number,
	totalSize: W.default.number
};
var Cf = i(O((e, { canvasId: t, companionWindowId: n, windowId: r }) => ({
	canvasDescription: an(e, {
		canvasId: t,
		companionWindowId: n,
		windowId: r
	}),
	canvasLabel: Dt(e, {
		canvasId: t,
		companionWindowId: n,
		windowId: r
	}),
	canvasMetadata: cn(e, {
		canvasId: t,
		companionWindowId: n,
		windowId: r
	})
})), A("CanvasInfo"))(Sf), wf = /* @__PURE__ */ k((/* @__PURE__ */ D(((e, t) => {
	var n = ln();
	t.exports = ze()(function(e, t, r) {
		n(e, r, t);
	});
})))(), 1);
function Tf({ availableLocales: e = [], locale: t = "", setLocale: n = void 0 }) {
	let r = Ce((e) => kn(e)), { t: i } = V();
	if (!n || e.length < 2) return null;
	let a = e.indexOf(t) >= 0 ? t : e[0], o = (0, wf.default)(r, (e) => e.locale), s = (e) => {
		try {
			return new Intl.DisplayNames([a], { type: "language" }).of(e);
		} catch {
			return;
		}
	}, c = (e) => o[e]?.label || s(e) || e;
	return /* @__PURE__ */ B(ga, {
		variant: "standard",
		children: [/* @__PURE__ */ z(ha, { children: i("language") }), /* @__PURE__ */ z(_a, {
			MenuProps: { anchorOrigin: {
				horizontal: "left",
				vertical: "bottom"
			} },
			autoWidth: !0,
			displayEmpty: !0,
			value: a,
			onChange: (e) => {
				n(e.target.value);
			},
			name: "locale",
			children: e.map((e) => /* @__PURE__ */ z(sa, {
				value: e,
				children: /* @__PURE__ */ z(U, {
					variant: "body2",
					children: c(e)
				})
			}, e))
		})]
	});
}
Tf.propTypes = {
	availableLocales: W.default.arrayOf(W.default.string),
	locale: W.default.string,
	setLocale: W.default.func
};
//#endregion
//#region src/containers/LocalePicker.js
var Ef = Tf;
//#endregion
//#region src/components/ManifestInfo.jsx
function Df({ manifestLabel: e = null, manifestMetadata: t = [], manifestSummary: n = null, ...r }) {
	let { t: i } = V(), a = Pi(), o = {
		manifestLabel: e,
		manifestMetadata: t,
		manifestSummary: n,
		...r
	};
	return /* @__PURE__ */ B(yf, {
		id: `${a}-resource`,
		label: i("resource"),
		children: [
			e && /* @__PURE__ */ z(U, {
				"aria-labelledby": `${a}-resource ${a}-resource-heading`,
				id: `${a}-resource-heading`,
				className: M("manifest-label"),
				variant: "h4",
				component: "h5",
				children: e
			}),
			n && /* @__PURE__ */ z(U, {
				variant: "body1",
				children: /* @__PURE__ */ z(wu, {
					htmlString: n,
					ruleSet: "iiif"
				})
			}),
			t.length > 0 && /* @__PURE__ */ z(xf, { labelValuePairs: t }),
			/* @__PURE__ */ z(Yr, {
				targetName: "ManifestInfo",
				...o
			})
		]
	});
}
Df.propTypes = {
	manifestLabel: W.default.string,
	manifestMetadata: W.default.array,
	manifestSummary: W.default.string
};
var Of = i(O((e, { companionWindowId: t, manifestId: n, windowId: r }) => ({
	manifestLabel: Jt(e, {
		companionWindowId: t,
		manifestId: n,
		windowId: r
	}),
	manifestMetadata: Ke(e, {
		companionWindowId: t,
		manifestId: n,
		windowId: r
	}),
	manifestSummary: sn(e, {
		companionWindowId: t,
		manifestId: n,
		windowId: r
	})
})), A("ManifestInfo"))(Df), kf = N(/*#__PURE__*/ z("path", { d: "M3 14h4v-4H3zm0 5h4v-4H3zM3 9h4V5H3zm5 5h13v-4H8zm0 5h13v-4H8zM8 5v4h13V5z" }), "ViewListSharp");
//#endregion
//#region src/components/CollectionInfo.jsx
function Af({ collectionLabel: e = null, collectionPath: t = [], showCollectionDialog: n, windowId: r = null }) {
	let { t: i } = V(), a = Pi(), o = Pi();
	return t.length === 0 ? null : /* @__PURE__ */ B(yf, {
		id: a,
		label: i("collection"),
		children: [e && /* @__PURE__ */ z(U, {
			"aria-labelledby": `${a} ${o}`,
			id: o,
			variant: "h4",
			children: e
		}), /* @__PURE__ */ z(va, {
			color: "primary",
			onClick: () => {
				let e = t[t.length - 1];
				n(e, t.slice(0, -1), r);
			},
			startIcon: /* @__PURE__ */ z(kf, {}),
			children: i("showCollection")
		})]
	});
}
Af.propTypes = {
	collectionLabel: W.default.string,
	collectionPath: W.default.arrayOf(W.default.string),
	showCollectionDialog: W.default.func.isRequired,
	windowId: W.default.string
};
var jf = i(O((e, { windowId: t }) => {
	let { collectionPath: n } = b(e, { windowId: t }) || {}, r = n[n.length - 1];
	return {
		collectionLabel: Jt(e, { manifestId: r }),
		collectionPath: n
	};
}, { showCollectionDialog: Hr }), A("CollectionInfo"))(Af), Mf = H("dl")(({ theme: e }) => ({ "& dd": {
	marginBottom: ".5em",
	marginLeft: "0"
} }));
function Nf({ homepage: e = null, manifestUrl: t = null, related: n = null, renderings: r = null, seeAlso: i = null, ...a }) {
	let { t: o } = V(), s = Pi(), c = Pi(), l = {
		homepage: e,
		manifestUrl: t,
		related: n,
		renderings: r,
		seeAlso: i,
		t: o,
		...a
	};
	return /* @__PURE__ */ B(yf, {
		"aria-labelledby": c,
		id: s,
		label: o("related"),
		children: [
			/* @__PURE__ */ z(U, {
				"aria-labelledby": `${s} ${c}`,
				id: c,
				className: M("related-links-label"),
				variant: "h4",
				component: "h5",
				children: o("links")
			}),
			/* @__PURE__ */ B(Mf, {
				className: (0, G.default)(M("label-value-metadata")),
				children: [
					e && /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(U, {
						variant: "subtitle2",
						component: "dt",
						children: o("iiif_homepage")
					}), e.map((e) => /* @__PURE__ */ z(U, {
						variant: "body1",
						component: "dd",
						children: /* @__PURE__ */ z(ya, {
							target: "_blank",
							rel: "noopener noreferrer",
							href: e.value,
							children: e.label || e.value
						})
					}, e.value))] }),
					r && r.length > 0 && /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(U, {
						variant: "subtitle2",
						component: "dt",
						children: o("iiif_renderings")
					}), r.map((e) => /* @__PURE__ */ z(U, {
						variant: "body1",
						component: "dd",
						children: /* @__PURE__ */ z(ya, {
							target: "_blank",
							rel: "noopener noreferrer",
							href: e.value,
							children: e.label || e.value
						})
					}, e.value))] }),
					n && /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(U, {
						variant: "subtitle2",
						component: "dt",
						children: o("iiif_related")
					}), n.map((e) => /* @__PURE__ */ B(U, {
						variant: "body1",
						component: "dd",
						children: [/* @__PURE__ */ z(ya, {
							target: "_blank",
							rel: "noopener noreferrer",
							href: e.value,
							children: e.label || e.value
						}), e.format && /* @__PURE__ */ z(U, {
							component: "span",
							children: ` (${e.format})`
						})]
					}, e.value))] }),
					i && /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(U, {
						variant: "subtitle2",
						component: "dt",
						children: o("iiif_seeAlso")
					}), i.map((e) => /* @__PURE__ */ B(U, {
						variant: "body1",
						component: "dd",
						children: [/* @__PURE__ */ z(ya, {
							target: "_blank",
							rel: "noopener noreferrer",
							href: e.value,
							children: e.label || e.value
						}), e.format && /* @__PURE__ */ z(U, {
							component: "span",
							children: ` (${e.format})`
						})]
					}, e.value))] }),
					t && /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(U, {
						variant: "subtitle2",
						component: "dt",
						children: o("iiif_manifest")
					}), /* @__PURE__ */ z(U, {
						variant: "body1",
						component: "dd",
						children: /* @__PURE__ */ z(ya, {
							target: "_blank",
							rel: "noopener noreferrer",
							href: t,
							children: t
						})
					})] })
				]
			}),
			/* @__PURE__ */ z(Yr, {
				targetName: "ManifestRelatedLinks",
				...l
			})
		]
	});
}
Nf.propTypes = {
	homepage: W.default.arrayOf(W.default.shape({
		label: W.default.string,
		value: W.default.string
	})),
	manifestUrl: W.default.string,
	related: W.default.arrayOf(W.default.shape({
		format: W.default.string,
		label: W.default.string,
		value: W.default.string
	})),
	renderings: W.default.arrayOf(W.default.shape({
		label: W.default.string,
		value: W.default.string
	})),
	seeAlso: W.default.arrayOf(W.default.shape({
		format: W.default.string,
		label: W.default.string,
		value: W.default.string
	}))
};
var Pf = i(O((e, { companionWindowId: t, windowId: n }) => ({
	homepage: Be(e, { windowId: n }),
	manifestUrl: kt(e, { windowId: n }),
	related: bt(e, { windowId: n }),
	renderings: ot(e, { windowId: n }),
	seeAlso: Rt(e, { windowId: n })
})), A("ManifestRelatedLinks"))(Nf);
//#endregion
//#region src/components/WindowSideBarInfoPanel.jsx
function Ff({ windowId: e, id: t, canvasIds: n = [], collectionPath: r = [], locale: i = "", setLocale: a = void 0, availableLocales: o = [], showLocalePicker: s = !1 }) {
	let { t: c } = V();
	return /* @__PURE__ */ B(pf, {
		title: c("aboutThisItem"),
		paperClassName: M("window-sidebar-info-panel"),
		windowId: e,
		id: t,
		titleControls: s && /* @__PURE__ */ z(Ef, {
			locale: i,
			setLocale: a,
			availableLocales: o
		}),
		children: [
			n.map((r, i) => /* @__PURE__ */ z(mf, { children: /* @__PURE__ */ z(Cf, {
				canvasId: r,
				companionWindowId: t,
				index: i,
				totalSize: n.length,
				windowId: e
			}) }, r)),
			r.length > 0 && /* @__PURE__ */ z(mf, { children: /* @__PURE__ */ z(jf, {
				companionWindowId: t,
				windowId: e
			}) }),
			/* @__PURE__ */ z(mf, { children: /* @__PURE__ */ z(Of, {
				companionWindowId: t,
				windowId: e
			}) }),
			/* @__PURE__ */ z(mf, { children: /* @__PURE__ */ z(Pf, {
				companionWindowId: t,
				windowId: e
			}) })
		]
	});
}
Ff.propTypes = {
	availableLocales: W.default.arrayOf(W.default.string),
	canvasIds: W.default.arrayOf(W.default.string),
	collectionPath: W.default.arrayOf(W.default.string),
	id: W.default.string.isRequired,
	locale: W.default.string,
	setLocale: W.default.func,
	showLocalePicker: W.default.bool,
	windowId: W.default.string.isRequired
};
var If = i(O((e, { id: t, windowId: n }) => ({
	availableLocales: xn(e, {
		companionWindowId: t,
		windowId: n
	}),
	canvasIds: dn(e, { windowId: n }),
	collectionPath: (b(e, { windowId: n }) || {}).collectionPath,
	locale: Fe(e, { companionWindowId: t }).locale || Je(e, { windowId: n }),
	showLocalePicker: ut(e, { windowId: n }).showLocalePicker
}), (e, { windowId: t, id: n }) => ({ setLocale: (r) => e(xs(t, n, { locale: r })) })), A("WindowSideBarInfoPanel"))(Ff), Lf = N(/*#__PURE__*/ z("path", { d: "M3 15h18v-2H3zm0 4h18v-2H3zm0-8h18V9H3zm0-6v2h18V5z" }), "ReorderSharp"), Rf = N(/*#__PURE__*/ z("path", { d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z" }), "SortSharp"), zf = N(/*#__PURE__*/ z("path", { d: "m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z" }), "ArrowForwardSharp");
//#endregion
//#region src/components/SidebarIndexItem.jsx
function Bf({ label: e }) {
	return /* @__PURE__ */ z(U, {
		variant: "body1",
		children: e
	});
}
Bf.propTypes = { label: W.default.string.isRequired };
var Vf = i(O(null, null), A("SidebarIndexItem"))(Bf);
//#endregion
//#region src/components/SidebarIndexThumbnail.jsx
function Hf({ canvas: e, height: t = void 0, label: n, width: r = void 0 }) {
	return /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z("div", {
		style: { minWidth: 50 },
		children: /* @__PURE__ */ z(ei, {
			label: n,
			resource: e,
			maxHeight: t,
			maxWidth: r
		})
	}), /* @__PURE__ */ z(U, { children: n })] });
}
Hf.propTypes = {
	canvas: W.default.object.isRequired,
	height: W.default.number,
	label: W.default.string.isRequired,
	width: W.default.number
};
var Uf = i(O((e, { data: t }) => ({ ...Gt(e).canvasNavigation || {} }), null), A("SidebarIndexThumbnail"))(Hf), Wf = H(sa, {
	name: "SidebarIndexList",
	slot: "item"
})(({ theme: e }) => ({
	alignItems: "flex-start",
	gap: e.spacing(1),
	paddingLeft: e.spacing(2),
	paddingRight: e.spacing(1),
	position: "initial",
	whiteSpace: "normal"
}));
function Gf(e) {
	return e.map((e) => ({
		id: e.id,
		label: new je(e).getLabel()
	}));
}
function Kf({ canvases: e, containerRef: t, selectedCanvasIds: n = [], setCanvas: r, variant: i = "item", windowId: a }) {
	let o = Li(() => Gf(e), [e]), s;
	switch (i) {
		case "thumbnail":
			s = Uf;
			break;
		default: s = Vf;
	}
	return /* @__PURE__ */ z(oa, {
		variant: "selectedMenu",
		children: o.map((o, c) => /* @__PURE__ */ z(Du, {
			containerRef: t,
			offsetTop: 96,
			selected: n.includes(o.id),
			scrollTo: n.includes(o.id),
			children: /* @__PURE__ */ z(Wf, {
				divider: !0,
				onClick: () => {
					r(a, o.id);
				},
				component: "li",
				children: /* @__PURE__ */ z(s, {
					label: o.label,
					canvas: e[c]
				})
			}, o.id)
		}, `${o.id}-${i}`))
	});
}
Kf.propTypes = {
	canvases: W.default.array.isRequired,
	containerRef: W.default.oneOfType([W.default.func, W.default.shape({ current: W.default.instanceOf(Element) })]).isRequired,
	selectedCanvasIds: W.default.arrayOf(W.default.string),
	setCanvas: W.default.func.isRequired,
	variant: W.default.oneOf(["item", "thumbnail"]),
	windowId: W.default.string.isRequired
};
var qf = i(O((e, { id: t, windowId: n }) => ({
	canvases: yn(e, { windowId: n }),
	selectedCanvasIds: dn(e, { windowId: n }),
	variant: Fe(e, {
		companionWindowId: t,
		windowId: n
	}).variant
}), (e, { id: t, windowId: n }) => ({ setCanvas: (...t) => e(Gr(...t)) })), A("SidebarIndexList"))(Kf), Jf = /* @__PURE__ */ k(e(), 1);
function K() {
	return K = Object.assign ? Object.assign.bind() : function(e) {
		for (var t = 1; t < arguments.length; t++) {
			var n = arguments[t];
			for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
		}
		return e;
	}, K.apply(null, arguments);
}
//#endregion
//#region node_modules/@base-ui/utils/useRefWithInit.mjs
var Yf = {};
function Xf(e, t) {
	let n = P.useRef(Yf);
	return n.current === Yf && (n.current = e(t)), n;
}
//#endregion
//#region node_modules/@base-ui/utils/useMergedRefs.mjs
function Zf(e, t, n, r) {
	let i = Xf(Qf).current;
	return $f(i, e, t, n, r) && ep(i, [
		e,
		t,
		n,
		r
	]), i.callback;
}
function Qf() {
	return {
		callback: null,
		cleanup: null,
		refs: []
	};
}
function $f(e, t, n, r, i) {
	return e.refs[0] !== t || e.refs[1] !== n || e.refs[2] !== r || e.refs[3] !== i;
}
function ep(e, t) {
	if (e.refs = t, t.every((e) => e == null)) {
		e.callback = null;
		return;
	}
	e.callback = (n) => {
		if (e.cleanup &&= (e.cleanup(), null), n != null) {
			let r = Array(t.length).fill(null);
			for (let e = 0; e < t.length; e += 1) {
				let i = t[e];
				if (i != null) switch (typeof i) {
					case "function": {
						let t = i(n);
						typeof t == "function" && (r[e] = t);
						break;
					}
					case "object": i.current = n;
				}
			}
			e.cleanup = () => {
				for (let e = 0; e < t.length; e += 1) {
					let n = t[e];
					if (n != null) switch (typeof n) {
						case "function": {
							let t = r[e];
							typeof t == "function" ? t() : n(null);
							break;
						}
						case "object": n.current = null;
					}
				}
			};
		}
	};
}
//#endregion
//#region node_modules/@mui/utils/composeClasses/composeClasses.mjs
function tp(e, t, n = void 0) {
	let r = {};
	for (let i in e) {
		let a = e[i], o = "", s = !0;
		for (let e = 0; e < a.length; e += 1) {
			let r = a[e];
			r && (o += (s === !0 ? "" : " ") + t(r), s = !1, n && n[r] && (o += " " + n[r]));
		}
		r[i] = o;
	}
	return r;
}
//#endregion
//#region node_modules/@mui/utils/useForkRef/useForkRef.mjs
function np(...e) {
	let t = P.useRef(void 0), n = P.useCallback((t) => {
		let n = e.map((e) => {
			if (e == null) return null;
			if (typeof e == "function") {
				let n = e, r = n(t);
				return typeof r == "function" ? r : () => {
					n(null);
				};
			}
			return e.current = t, () => {
				e.current = null;
			};
		});
		return () => {
			n.forEach((e) => e?.());
		};
	}, e);
	return P.useMemo(() => e.every((e) => e == null) ? null : (e) => {
		t.current &&= (t.current(), void 0), e != null && (t.current = n(e));
	}, e);
}
//#endregion
//#region node_modules/@mui/utils/isHostComponent/isHostComponent.mjs
function rp(e) {
	return typeof e == "string";
}
//#endregion
//#region node_modules/@mui/utils/appendOwnerState/appendOwnerState.mjs
function ip(e, t, n) {
	return e === void 0 || rp(e) ? t : {
		...t,
		ownerState: {
			...t.ownerState,
			...n
		}
	};
}
//#endregion
//#region node_modules/@mui/utils/isEventHandler/isEventHandler.mjs
function ap(e, t) {
	let n = e.charCodeAt(2);
	return e[0] === "o" && e[1] === "n" && n >= 65 && n <= 90 && typeof t == "function";
}
//#endregion
//#region node_modules/@mui/utils/extractEventHandlers/extractEventHandlers.mjs
function op(e) {
	if (e === void 0) return {};
	let t = {};
	for (let n of Object.keys(e)) ap(n, e[n]) && (t[n] = e[n]);
	return t;
}
//#endregion
//#region node_modules/@mui/utils/omitEventHandlers/omitEventHandlers.mjs
function sp(e) {
	if (e === void 0) return {};
	let t = {};
	return Object.keys(e).filter((t) => !(t.match(/^on[A-Z]/) && typeof e[t] == "function")).forEach((n) => {
		t[n] = e[n];
	}), t;
}
//#endregion
//#region node_modules/@mui/utils/mergeSlotProps/mergeSlotProps.mjs
function cp(e) {
	let { getSlotProps: t, additionalProps: n, externalSlotProps: r, externalForwardedProps: i, className: a } = e;
	if (!t) {
		let e = Pu(n?.className, a, i?.className, r?.className), t = {
			...n?.style,
			...i?.style,
			...r?.style
		}, o = {
			...n,
			...i,
			...r
		};
		return e.length > 0 && (o.className = e), Object.keys(t).length > 0 && (o.style = t), {
			props: o,
			internalRef: void 0
		};
	}
	let o = op({
		...i,
		...r
	}), s = sp(r), c = sp(i), l = t(o), u = Pu(l?.className, n?.className, a, i?.className, r?.className), d = {
		...l?.style,
		...n?.style,
		...i?.style,
		...r?.style
	}, f = {
		...l,
		...n,
		...c,
		...s
	};
	return u.length > 0 && (f.className = u), Object.keys(d).length > 0 && (f.style = d), {
		props: f,
		internalRef: l.ref
	};
}
//#endregion
//#region node_modules/@mui/utils/resolveComponentProps/resolveComponentProps.mjs
function lp(e, t, n) {
	return typeof e == "function" ? e(t, n) : e;
}
//#endregion
//#region node_modules/@mui/utils/useSlotProps/useSlotProps.mjs
function up(e) {
	let { elementType: t, externalSlotProps: n, ownerState: r, skipResolvingSlotProps: i = !1, ...a } = e, o = i ? {} : lp(n, r), { props: s, internalRef: c } = cp({
		...a,
		externalSlotProps: o
	}), l = np(c, o?.ref, e.additionalProps?.ref);
	return ip(t, {
		...s,
		ref: l
	}, r);
}
//#endregion
//#region node_modules/@mui/x-tree-view/internals/zero-styled/index.mjs
function dp(e) {
	return ea;
}
//#endregion
//#region node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.mjs
var fp = (e) => e, pp = (() => {
	let e = fp;
	return {
		configure(t) {
			e = t;
		},
		generate(t) {
			return e(t);
		},
		reset() {
			e = fp;
		}
	};
})(), mp = {
	active: "active",
	checked: "checked",
	completed: "completed",
	disabled: "disabled",
	error: "error",
	expanded: "expanded",
	focused: "focused",
	focusVisible: "focusVisible",
	open: "open",
	readOnly: "readOnly",
	required: "required",
	selected: "selected"
};
function hp(e, t, n = "Mui") {
	let r = mp[t];
	return r ? `${n}-${r}` : `${pp.generate(e)}-${t}`;
}
//#endregion
//#region node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.mjs
function gp(e, t, n = "Mui") {
	let r = {};
	return t.forEach((t) => {
		r[t] = hp(e, t, n);
	}), r;
}
//#endregion
//#region node_modules/@mui/x-tree-view/SimpleTreeView/simpleTreeViewClasses.mjs
function _p(e) {
	return hp("MuiSimpleTreeView", e);
}
gp("MuiSimpleTreeView", [
	"root",
	"item",
	"itemContent",
	"itemGroupTransition",
	"itemIconContainer",
	"itemLabel",
	"itemCheckbox"
]);
//#endregion
//#region node_modules/@base-ui/utils/empty.mjs
var vp = Object.freeze([]), yp = Object.freeze({});
//#endregion
//#region node_modules/@mui/x-internals/formatErrorMessage/formatErrorMessage.mjs
function bp(e, ...t) {
	let n = new URL("https://mui.com/x/production-error");
	return n.searchParams.set("code", e.toString()), t.forEach((e) => n.searchParams.append("args[]", e)), `MUI X error #${e}; visit ${n} for the full message.`;
}
//#endregion
//#region node_modules/@mui/x-tree-view/internals/TreeViewProvider/TreeViewContext.mjs
var xp = /*#__PURE__*/ P.createContext(null), Sp = () => {
	let e = P.useContext(xp);
	if (e == null) throw Error(bp(190));
	return e;
}, Cp = /*#__PURE__*/ P.createContext({
	classes: {},
	slots: {},
	slotProps: {}
}), wp = () => P.useContext(Cp), Tp = (e) => {
	let { store: t, apiRef: n, rootRef: r } = e, i = Xf(() => t.buildPublicAPI()).current;
	Ep(i, n);
	let a = P.useCallback((e) => {
		let n = null, r = null, i = [], a = {};
		t.itemPluginManager.listPlugins().forEach((t) => {
			let o = t({
				props: e,
				rootRef: n,
				contentRef: r
			});
			o?.rootRef && (n = o.rootRef), o?.contentRef && (r = o.contentRef), o?.propsEnhancers && (i.push(o.propsEnhancers), Object.keys(o.propsEnhancers).forEach((e) => {
				a[e] = !0;
			}));
		});
		let o = (e) => (t) => {
			let n = {};
			return i.forEach((r) => {
				let i = r[e];
				i != null && Object.assign(n, i(t));
			}), n;
		}, s = Object.fromEntries(Object.keys(a).map((e) => [e, o(e)]));
		return {
			contentRef: r,
			rootRef: n,
			propsEnhancers: s
		};
	}, [t]), o = P.useCallback(({ itemId: e, children: n, idAttribute: r }) => {
		let i = n, a = t.itemPluginManager.listWrappers();
		for (let n = a.length - 1; n >= 0; --n) {
			let o = a[n];
			i = o({
				store: t,
				itemId: e,
				children: i,
				idAttribute: r
			});
		}
		return i;
	}, [t]);
	return P.useMemo(() => ({
		runItemPlugins: a,
		wrapItem: o,
		publicAPI: i,
		store: t,
		rootRef: r
	}), [
		a,
		o,
		i,
		t,
		r
	]);
};
function Ep(e, t) {
	t != null && t.current !== e && (t.current = e);
}
//#endregion
//#region node_modules/@mui/x-tree-view/internals/TreeViewProvider/TreeViewProvider.mjs
function Dp(e) {
	let { store: t, apiRef: n, rootRef: r, classes: i = yp, slots: a = yp, slotProps: o = yp, children: s } = e, c = Tp({
		store: t,
		apiRef: n,
		rootRef: r
	}), l = P.useMemo(() => ({
		classes: i,
		slots: {
			collapseIcon: a.collapseIcon,
			expandIcon: a.expandIcon,
			endIcon: a.endIcon
		},
		slotProps: {
			collapseIcon: o.collapseIcon,
			expandIcon: o.expandIcon,
			endIcon: o.endIcon
		}
	}), [
		i,
		a.collapseIcon,
		a.expandIcon,
		a.endIcon,
		o.collapseIcon,
		o.expandIcon,
		o.endIcon
	]);
	return /*#__PURE__*/ z(xp.Provider, {
		value: c,
		children: /*#__PURE__*/ z(Cp.Provider, {
			value: l,
			children: s
		})
	});
}
//#endregion
//#region node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
var Op = /* @__PURE__ */ k(p(), 1), kp = /* @__PURE__ */ k(pt(), 1);
function Ap(e, t) {
	if (e == null) return {};
	var n = {};
	for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
		if (t.indexOf(r) !== -1) continue;
		n[r] = e[r];
	}
	return n;
}
//#endregion
//#region node_modules/@mui/x-tree-view/SimpleTreeView/useExtractSimpleTreeViewParameters.mjs
var jp = [
	"apiRef",
	"slots",
	"slotProps",
	"disabledItemsFocusable",
	"onItemClick",
	"itemChildrenIndentation",
	"id",
	"expandedItems",
	"defaultExpandedItems",
	"onExpandedItemsChange",
	"onItemExpansionToggle",
	"expansionTrigger",
	"disableSelection",
	"selectedItems",
	"defaultSelectedItems",
	"multiSelect",
	"checkboxSelection",
	"selectionPropagation",
	"onSelectedItemsChange",
	"onItemSelectionToggle",
	"onItemFocus",
	"itemHeight"
];
function Mp(e) {
	let { apiRef: t, slots: n, slotProps: r, disabledItemsFocusable: i, onItemClick: a, itemChildrenIndentation: o, id: s, expandedItems: c, defaultExpandedItems: l, onExpandedItemsChange: u, onItemExpansionToggle: d, expansionTrigger: f, disableSelection: p, selectedItems: m, defaultSelectedItems: h, multiSelect: g, checkboxSelection: _, selectionPropagation: v, onSelectedItemsChange: y, onItemSelectionToggle: b, onItemFocus: x, itemHeight: S } = e, C = Ap(e, jp);
	return {
		apiRef: t,
		slots: n,
		slotProps: r,
		parameters: P.useMemo(() => ({
			disabledItemsFocusable: i,
			onItemClick: a,
			itemChildrenIndentation: o,
			id: s,
			expandedItems: c,
			defaultExpandedItems: l,
			onExpandedItemsChange: u,
			onItemExpansionToggle: d,
			expansionTrigger: f,
			disableSelection: p,
			selectedItems: m,
			defaultSelectedItems: h,
			multiSelect: g,
			checkboxSelection: _,
			selectionPropagation: v,
			onSelectedItemsChange: y,
			onItemSelectionToggle: b,
			onItemFocus: x,
			itemHeight: S
		}), [
			i,
			a,
			o,
			s,
			c,
			l,
			u,
			d,
			f,
			p,
			m,
			h,
			g,
			_,
			v,
			y,
			b,
			x,
			S
		]),
		forwardedProps: C
	};
}
//#endregion
//#region node_modules/@mui/x-internals/store/createSelector.mjs
var Np = ne({
	memoize: te,
	memoizeOptions: {
		maxSize: 1,
		equalityCheck: Object.is
	}
}), Pp = (e, t, n, r, i, a, o, s, ...c) => {
	if (c.length > 0) throw Error(bp(179));
	let l;
	if (e && t && n && r && i && a && o && s) l = (c, l, u, d) => s(e(c, l, u, d), t(c, l, u, d), n(c, l, u, d), r(c, l, u, d), i(c, l, u, d), a(c, l, u, d), o(c, l, u, d), l, u, d);
	else if (e && t && n && r && i && a && o) l = (s, c, l, u) => o(e(s, c, l, u), t(s, c, l, u), n(s, c, l, u), r(s, c, l, u), i(s, c, l, u), a(s, c, l, u), c, l, u);
	else if (e && t && n && r && i && a) l = (o, s, c, l) => a(e(o, s, c, l), t(o, s, c, l), n(o, s, c, l), r(o, s, c, l), i(o, s, c, l), s, c, l);
	else if (e && t && n && r && i) l = (a, o, s, c) => i(e(a, o, s, c), t(a, o, s, c), n(a, o, s, c), r(a, o, s, c), o, s, c);
	else if (e && t && n && r) l = (i, a, o, s) => r(e(i, a, o, s), t(i, a, o, s), n(i, a, o, s), a, o, s);
	else if (e && t && n) l = (r, i, a, o) => n(e(r, i, a, o), t(r, i, a, o), i, a, o);
	else if (e && t) l = (n, r, i, a) => t(e(n, r, i, a), r, i, a);
	else if (e) l = e;
	else throw Error(bp(180));
	return l;
}, Fp = ((e) => (...t) => {
	let n = /* @__PURE__ */ new WeakMap(), r = 1, i = t[t.length - 1], a = t.length - 1 || 1, o = Math.max(i.length - a, 0);
	if (o > 3) throw Error(bp(181));
	return (a, s, c, l) => {
		let u = a.__cacheKey__;
		u || (u = { id: r }, a.__cacheKey__ = u, r += 1);
		let d = n.get(u);
		if (!d) {
			let r = t.length === 1 ? [(e) => e, i] : t, a = t, s = [
				void 0,
				void 0,
				void 0
			];
			switch (o) {
				case 0: break;
				case 1:
					a = [
						...r.slice(0, -1),
						() => s[0],
						i
					];
					break;
				case 2:
					a = [
						...r.slice(0, -1),
						() => s[0],
						() => s[1],
						i
					];
					break;
				case 3:
					a = [
						...r.slice(0, -1),
						() => s[0],
						() => s[1],
						() => s[2],
						i
					];
					break;
				default: throw Error(bp(182));
			}
			e && (a = [...a, e]), d = Np(...a), d.selectorArgs = s, n.set(u, d);
		}
		switch (o) {
			case 3: d.selectorArgs[2] = l;
			case 2: d.selectorArgs[1] = c;
			case 1: d.selectorArgs[0] = s;
		}
		switch (o) {
			case 0: return d(a);
			case 1: return d(a, s);
			case 2: return d(a, s, c);
			case 3: return d(a, s, c, l);
			default: throw Error("unreachable");
		}
	};
})(), Ip = /* @__PURE__ */ D(((e) => {
	var t = T();
	function n(e, t) {
		return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
	}
	var r = typeof Object.is == "function" ? Object.is : n, i = t.useState, a = t.useEffect, o = t.useLayoutEffect, s = t.useDebugValue;
	function c(e, t) {
		var n = t(), r = i({ inst: {
			value: n,
			getSnapshot: t
		} }), c = r[0].inst, u = r[1];
		return o(function() {
			c.value = n, c.getSnapshot = t, l(c) && u({ inst: c });
		}, [
			e,
			n,
			t
		]), a(function() {
			return l(c) && u({ inst: c }), e(function() {
				l(c) && u({ inst: c });
			});
		}, [e]), s(n), n;
	}
	function l(e) {
		var t = e.getSnapshot;
		e = e.value;
		try {
			var n = t();
			return !r(e, n);
		} catch {
			return !0;
		}
	}
	function u(e, t) {
		return t();
	}
	var d = typeof window > "u" || window.document === void 0 || window.document.createElement === void 0 ? u : c;
	e.useSyncExternalStore = t.useSyncExternalStore === void 0 ? d : t.useSyncExternalStore;
})), Lp = /* @__PURE__ */ D(((e, t) => {
	t.exports = Ip();
})), Rp = /* @__PURE__ */ D(((e) => {
	var t = T(), n = Lp();
	function r(e, t) {
		return e === t && (e !== 0 || 1 / e == 1 / t) || e !== e && t !== t;
	}
	var i = typeof Object.is == "function" ? Object.is : r, a = n.useSyncExternalStore, o = t.useRef, s = t.useEffect, c = t.useMemo, l = t.useDebugValue;
	e.useSyncExternalStoreWithSelector = function(e, t, n, r, u) {
		var d = o(null);
		if (d.current === null) {
			var f = {
				hasValue: !1,
				value: null
			};
			d.current = f;
		} else f = d.current;
		d = c(function() {
			function e(e) {
				if (!a) {
					if (a = !0, o = e, e = r(e), u !== void 0 && f.hasValue) {
						var t = f.value;
						if (u(t, e)) return s = t;
					}
					return s = e;
				}
				if (t = s, i(o, e)) return t;
				var n = r(e);
				return u !== void 0 && u(t, n) ? (o = e, t) : (o = e, s = n);
			}
			var a = !1, o, s, c = n === void 0 ? null : n;
			return [function() {
				return e(t());
			}, c === null ? void 0 : function() {
				return e(c());
			}];
		}, [
			t,
			n,
			r,
			u
		]);
		var p = a(e, d[0], d[1]);
		return s(function() {
			f.hasValue = !0, f.value = p;
		}, [p]), l(p), p;
	};
})), zp = /* @__PURE__ */ D(((e, t) => {
	t.exports = Rp();
})), Bp = parseInt(P.version, 10), Vp = Lp(), Hp = zp(), Up = Bp >= 19 ? Gp : Kp;
function Wp(e, t, n, r, i) {
	return Up(e, t, n, r, i);
}
function Gp(e, t, n, r, i) {
	let a = P.useCallback(() => t(e.getSnapshot(), n, r, i), [
		e,
		t,
		n,
		r,
		i
	]);
	return (0, Vp.useSyncExternalStore)(e.subscribe, a, a);
}
function Kp(e, t, n, r, i) {
	return (0, Hp.useSyncExternalStoreWithSelector)(e.subscribe, e.getSnapshot, e.getSnapshot, (e) => t(e, n, r, i));
}
//#endregion
//#region node_modules/@mui/x-internals/store/Store.mjs
var qp = class e {
	static create(t) {
		return new e(t);
	}
	constructor(e) {
		this.state = e, this.listeners = /* @__PURE__ */ new Set(), this.updateTick = 0;
	}
	subscribe = (e) => (this.listeners.add(e), () => {
		this.listeners.delete(e);
	});
	getSnapshot = () => this.state;
	setState(e) {
		this.state = e, this.updateTick += 1;
		let t = this.updateTick, n = this.listeners.values(), r;
		for (; r = n.next(), !r.done;) {
			if (t !== this.updateTick) return;
			let n = r.value;
			n(e);
		}
	}
	update(e) {
		for (let t in e) if (!Object.is(this.state[t], e[t])) {
			this.setState(K({}, this.state, e));
			return;
		}
	}
	set(e, t) {
		Object.is(this.state[e], t) || this.setState(K({}, this.state, { [e]: t }));
	}
	use = (e, t, n, r) => Wp(this, e, t, n, r);
}, Jp = Pp((e) => e.providedTreeId ?? e.treeId), Yp = {
	treeId: Jp,
	treeItemIdAttribute: Pp(Jp, (e, t, n) => n ?? `${e ?? ""}-${t}`)
}, Xp = (e) => {
	let t = {};
	return e.forEach((e, n) => {
		t[e] = n;
	}), t;
}, Zp = (e, t) => {
	if (t == null) return !1;
	let n = e[t];
	if (!n) return !1;
	if (n.disabled) return !0;
	for (; n.parentId != null;) {
		if (n = e[n.parentId], !n) return !1;
		if (n.disabled) return !0;
	}
	return !1;
};
function Qp(e) {
	let { storeParameters: t, items: n, parentId: r, depth: i, isItemExpandable: a, otherItemsMetaLookup: o } = e, s = {}, c = {}, l = [], u = [], d = (e) => {
		let n = t.getItemId ? t.getItemId(e) : e.id;
		em({
			id: n,
			parentId: r,
			item: e,
			itemMetaLookup: o,
			siblingsMetaLookup: s
		});
		let d = t.getItemLabel ? t.getItemLabel(e) : e.label;
		if (d == null) throw Error(bp(192, JSON.stringify(e)));
		let f = (t.getItemChildren ? t.getItemChildren(e) : e.children) || [];
		u.push({
			id: n,
			children: f
		}), c[n] = e, s[n] = {
			id: n,
			label: d,
			parentId: r,
			idAttribute: void 0,
			expandable: a(e, f),
			disabled: t.isItemDisabled ? t.isItemDisabled(e) : !1,
			selectable: !t.isItemSelectionDisabled || !t.isItemSelectionDisabled(e),
			depth: i
		}, l.push(n);
	};
	for (let e of n) d(e);
	return {
		metaLookup: s,
		modelLookup: c,
		orderedChildrenIds: l,
		childrenIndexes: Xp(l),
		itemsChildren: u
	};
}
function $p(e) {
	let { storeParameters: t, items: n, parentId: r, depth: i, isItemExpandable: a, existingItemMetaLookup: o } = e, s = {}, c = {}, l = {}, u = {}, d = K({}, o), f = (e, n, r) => {
		let i = Qp({
			storeParameters: t,
			items: e,
			parentId: n,
			depth: r,
			isItemExpandable: a,
			otherItemsMetaLookup: d
		});
		Object.assign(s, i.metaLookup), Object.assign(d, i.metaLookup), Object.assign(c, i.modelLookup), l[n ?? "__TREE_VIEW_ROOT_PARENT_ID__"] = i.orderedChildrenIds, u[n ?? "__TREE_VIEW_ROOT_PARENT_ID__"] = i.childrenIndexes;
		for (let e of i.itemsChildren) f(e.children, e.id, r + 1);
	};
	return f(n, r, i), {
		itemMetaLookup: s,
		itemModelLookup: c,
		itemOrderedChildrenIdsLookup: l,
		itemChildrenIndexesLookup: u
	};
}
function em({ id: e, parentId: t, item: n, itemMetaLookup: r, siblingsMetaLookup: i }) {
	if (e == null) throw Error(bp(193, JSON.stringify(n)));
	if (i[e] != null || r[e] != null && r[e].parentId !== t) throw Error(bp(194, e));
}
//#endregion
//#region node_modules/@mui/x-tree-view/internals/plugins/items/selectors.mjs
var tm = [], q = {
	domStructure: Pp((e) => e.domStructure),
	disabledItemFocusable: Pp((e) => e.disabledItemsFocusable),
	itemMetaLookup: Pp((e) => e.itemMetaLookup),
	itemOrderedChildrenIdsLookup: Pp((e) => e.itemOrderedChildrenIdsLookup),
	itemMeta: Pp((e, t) => e.itemMetaLookup[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"] ?? null),
	itemOrderedChildrenIds: Pp((e, t) => e.itemOrderedChildrenIdsLookup[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"] ?? tm),
	itemModel: Pp((e, t) => e.itemModelLookup[t]),
	isItemDisabled: Pp((e, t) => Zp(e.itemMetaLookup, t)),
	itemIndex: Pp((e, t) => {
		let n = e.itemMetaLookup[t];
		return n == null ? -1 : e.itemChildrenIndexesLookup[n.parentId ?? "__TREE_VIEW_ROOT_PARENT_ID__"][n.id];
	}),
	itemParentId: Pp((e, t) => e.itemMetaLookup[t]?.parentId ?? null),
	itemDepth: Pp((e, t) => e.itemMetaLookup[t]?.depth ?? 0),
	canItemBeFocused: Pp((e, t) => e.disabledItemsFocusable || e.itemModelLookup[t] != null && !Zp(e.itemMetaLookup, t)),
	itemChildrenIndentation: Pp((e) => e.itemChildrenIndentation),
	itemHeight: Pp((e) => e.itemHeight)
}, nm = class {
	constructor(e) {
		this.store = e;
	}
	static shouldRebuildItemsState = (e, t) => [
		"items",
		"isItemDisabled",
		"isItemSelectionDisabled",
		"getItemId",
		"getItemLabel",
		"getItemChildren"
	].some((n) => {
		let r = n;
		return e[r] !== t[r];
	});
	static buildItemsStateIfNeeded = (e) => $p({
		storeParameters: e,
		items: e.items,
		parentId: null,
		depth: 0,
		isItemExpandable: (e, t) => !!t && t.length > 0
	});
	getItem = (e) => q.itemModel(this.store.state, e);
	getItemTree = () => {
		let e = (t) => {
			let n = q.itemModel(this.store.state, t), r = K({}, n), i = q.itemOrderedChildrenIds(this.store.state, t);
			return i.length > 0 ? r.children = i.map(e) : delete r.children, r;
		};
		return q.itemOrderedChildrenIds(this.store.state, null).map(e);
	};
	getItemOrderedChildrenIds = (e) => q.itemOrderedChildrenIds(this.store.state, e);
	getParentId = (e) => q.itemMeta(this.store.state, e)?.parentId || null;
	setIsItemDisabled = ({ itemId: e, shouldBeDisabled: t }) => {
		if (!this.store.state.itemMetaLookup[e]) return;
		let n = K({}, this.store.state.itemMetaLookup);
		n[e] = K({}, n[e], { disabled: t ?? !n[e].disabled }), this.store.set("itemMetaLookup", n);
	};
	addItems = ({ items: e, parentId: t = null, index: n }) => {
		if (e.length === 0) return;
		if (t != null && q.itemMeta(this.store.state, t) == null) throw Error(bp(295, t));
		let r = t == null ? -1 : q.itemDepth(this.store.state, t), i = this.store.parameters.dataSource, { itemMetaLookup: a, itemModelLookup: o, itemOrderedChildrenIdsLookup: s, itemChildrenIndexesLookup: c } = $p({
			storeParameters: this.store.parameters,
			items: e,
			parentId: t,
			depth: r + 1,
			isItemExpandable: (e, t) => t != null && t.length > 0 || i != null && i.getChildrenCount(e) !== 0,
			existingItemMetaLookup: this.store.state.itemMetaLookup
		});
		for (let e of Object.keys(a)) if (this.store.state.itemMetaLookup[e] != null) throw Error(bp(194, e));
		let l = t ?? "__TREE_VIEW_ROOT_PARENT_ID__", u = q.itemOrderedChildrenIds(this.store.state, t), d = n ?? u.length;
		if (d < 0 || d > u.length) throw Error(bp(296, d, u.length));
		let f = s[l], p = [...u];
		p.splice(d, 0, ...f), s[l] = p, c[l] = Xp(p);
		let m = K({}, this.store.state.itemMetaLookup, a);
		t != null && !m[t].expandable && (m[t] = K({}, m[t], { expandable: !0 })), this.store.update({
			itemMetaLookup: m,
			itemModelLookup: K({}, this.store.state.itemModelLookup, o),
			itemOrderedChildrenIdsLookup: K({}, this.store.state.itemOrderedChildrenIdsLookup, s),
			itemChildrenIndexesLookup: K({}, this.store.state.itemChildrenIndexesLookup, c)
		}), this.store.selection.propagateSelectionToNewItems(t, f);
	};
	buildPublicAPI = () => ({
		getItem: this.getItem,
		getItemDOMElement: this.getItemDOMElement,
		getItemOrderedChildrenIds: this.getItemOrderedChildrenIds,
		getItemTree: this.getItemTree,
		getParentId: this.getParentId,
		setIsItemDisabled: this.setIsItemDisabled
	});
	getItemDOMElement = (e) => {
		let t = q.itemMeta(this.store.state, e);
		if (t == null) return null;
		let n = Yp.treeItemIdAttribute(this.store.state, e, t.idAttribute);
		return document.getElementById(n);
	};
	setItemChildren = ({ items: e, parentId: t, getChildrenCount: n }) => {
		let r = t ?? "__TREE_VIEW_ROOT_PARENT_ID__", i = t == null ? -1 : q.itemDepth(this.store.state, t), { metaLookup: a, modelLookup: o, orderedChildrenIds: s, childrenIndexes: c } = Qp({
			storeParameters: this.store.parameters,
			items: e,
			parentId: t,
			depth: i + 1,
			isItemExpandable: n ? (e) => n(e) !== 0 : () => !1,
			otherItemsMetaLookup: q.itemMetaLookup(this.store.state)
		});
		this.store.update({
			itemModelLookup: K({}, this.store.state.itemModelLookup, o),
			itemMetaLookup: K({}, this.store.state.itemMetaLookup, a),
			itemOrderedChildrenIdsLookup: K({}, this.store.state.itemOrderedChildrenIdsLookup, { [r]: s }),
			itemChildrenIndexesLookup: K({}, this.store.state.itemChildrenIndexesLookup, { [r]: c })
		});
	};
	removeChildren = (e) => {
		let t = this.store.state.itemMetaLookup, n = Object.keys(t).reduce((n, r) => {
			let i = t[r];
			return i.parentId === e ? n : K({}, n, { [i.id]: i });
		}, {}), r = K({}, this.store.state.itemOrderedChildrenIdsLookup), i = K({}, this.store.state.itemChildrenIndexesLookup), a = e ?? "__TREE_VIEW_ROOT_PARENT_ID__";
		delete i[a], delete r[a], this.store.update({
			itemMetaLookup: n,
			itemOrderedChildrenIdsLookup: r,
			itemChildrenIndexesLookup: i
		});
	};
	handleItemClick = (e, t) => {
		this.store.parameters.onItemClick?.(e, t);
	};
}, rm = Fp((e) => e.selectedItems, (e) => Array.isArray(e) ? e : e == null ? [] : [e]), im = Fp(rm, (e) => {
	let t = /* @__PURE__ */ new Map();
	return e.forEach((e) => {
		t.set(e, !0);
	}), t;
}), am = Pp((e, t) => e.itemMetaLookup[t]?.selectable ?? !0), om = Pp(im, (e, t) => e.has(t)), sm = Pp(q.isItemDisabled, am, (e) => !e.disableSelection, (e, t, n, r) => n && !e && t), cm = Pp((e) => e.selectionPropagation), lm = Pp((e, t) => {
	if (om(e, t)) return "selected";
	if (q.itemOrderedChildrenIds(e, t).length === 0) return "unselected";
	let n = !1, r = !1, i = (a) => {
		a !== t && sm(e, a) && (om(e, a) ? n = !0 : r = !0), q.itemOrderedChildrenIds(e, a).forEach(i);
	};
	return i(t), cm(e).parents ? n && r ? "indeterminate" : n && !r ? "selected" : "unselected" : n ? "indeterminate" : "unselected";
}), J = {
	selectedItemsRaw: Pp((e) => e.selectedItems),
	selectedItems: rm,
	selectedItemsMap: im,
	enabled: Pp((e) => !e.disableSelection),
	isMultiSelectEnabled: Pp((e) => e.multiSelect),
	isCheckboxSelectionEnabled: Pp((e) => e.checkboxSelection),
	propagationRules: cm,
	isItemSelected: om,
	itemSelectionStatus: lm,
	isItemIndeterminate: Pp(lm, (e, t) => e === "indeterminate"),
	isFeatureEnabledForItem: Pp(am, (e) => !e.disableSelection, (e, t, n) => t && e),
	canItemBeSelected: sm,
	isItemSelectable: am
}, um = ({ props: e }) => {
	let { itemId: t } = e, { store: n } = Sp(), r = Wp(n, J.isCheckboxSelectionEnabled), i = Wp(n, J.isFeatureEnabledForItem, t), a = Wp(n, J.canItemBeSelected, t), o = Wp(n, q.isItemDisabled, t), s = Wp(n, J.isItemSelectable, t), c = Wp(n, J.itemSelectionStatus, t), l = o || !s;
	return { propsEnhancers: {
		root: () => {
			let e;
			return e = l ? void 0 : c === "selected" ? !0 : c === "indeterminate" ? "mixed" : !a && void 0, { "aria-checked": e };
		},
		checkbox: ({ externalEventHandlers: e, interactions: o }) => ({
			tabIndex: -1,
			onChange: (r) => {
				e.onChange?.(r), !r.defaultMuiPrevented && J.canItemBeSelected(n.state, t) && o.handleCheckboxSelection(r);
			},
			visible: r && i,
			disabled: !a,
			checked: c === "selected",
			indeterminate: c === "indeterminate"
		})
	} };
}, dm = Fp((e) => e.expandedItems, (e) => {
	let t = /* @__PURE__ */ new Map();
	return e.forEach((e) => {
		t.set(e, !0);
	}), t;
}), fm = {
	expandedItemsRaw: Pp((e) => e.expandedItems),
	expandedItemsMap: dm,
	flatList: Fp(q.itemOrderedChildrenIdsLookup, dm, (e, t) => {
		function n(r) {
			if (!t.has(r)) return [r];
			let i = [r], a = e[r] || [];
			for (let e of a) i.push(...n(e));
			return i;
		}
		return (e.__TREE_VIEW_ROOT_PARENT_ID__ ?? []).flatMap(n);
	}),
	triggerSlot: Pp((e) => e.expansionTrigger),
	isItemExpanded: Pp(dm, (e, t) => e.has(t)),
	isItemExpandable: Pp(q.itemMeta, (e, t) => e?.expandable ?? !1)
}, pm = (e, t) => {
	let n = t.length - 1;
	for (; n >= 0 && !q.canItemBeFocused(e, t[n]);) --n;
	if (n !== -1) return t[n];
}, mm = (e, t) => {
	let n = q.itemMeta(e, t);
	if (!n) return null;
	let r = q.itemOrderedChildrenIds(e, n.parentId), i = q.itemIndex(e, t);
	if (i === 0) return n.parentId;
	let a = i - 1;
	for (; !q.canItemBeFocused(e, r[a]) && a >= 0;) --a;
	if (a === -1) return n.parentId == null ? null : mm(e, n.parentId);
	let o = r[a], s = pm(e, q.itemOrderedChildrenIds(e, o));
	for (; fm.isItemExpanded(e, o) && s != null;) o = s, s = pm(e, q.itemOrderedChildrenIds(e, o));
	return o;
}, hm = (e, t) => {
	if (fm.isItemExpanded(e, t)) {
		let n = q.itemOrderedChildrenIds(e, t).find((t) => q.canItemBeFocused(e, t));
		if (n != null) return n;
	}
	let n = q.itemMeta(e, t);
	for (; n != null;) {
		let t = q.itemOrderedChildrenIds(e, n.parentId), r = q.itemIndex(e, n.id);
		if (r < t.length - 1) {
			let n = r + 1;
			for (; !q.canItemBeFocused(e, t[n]) && n < t.length - 1;) n += 1;
			if (q.canItemBeFocused(e, t[n])) return t[n];
		}
		n = q.itemMeta(e, n.parentId);
	}
	return null;
}, gm = (e) => {
	let t = null;
	for (; t == null || fm.isItemExpanded(e, t);) {
		let n = pm(e, q.itemOrderedChildrenIds(e, t));
		if (n == null) return t;
		t = n;
	}
	return t;
}, _m = (e) => q.itemOrderedChildrenIds(e, null).find((t) => q.canItemBeFocused(e, t)), vm = (e, t, n) => {
	if (t === n) return [t, n];
	let r = q.itemMeta(e, t), i = q.itemMeta(e, n);
	if (!r || !i) return [t, n];
	if (r.parentId === i.id || i.parentId === r.id) return i.parentId === r.id ? [r.id, i.id] : [i.id, r.id];
	let a = [r.id], o = [i.id], s = r.parentId, c = i.parentId, l = o.indexOf(s) !== -1, u = a.indexOf(c) !== -1, d = !0, f = !0;
	for (; !u && !l;) d && (a.push(s), l = o.indexOf(s) !== -1, d = s !== null, !l && d && (s = q.itemParentId(e, s))), f && !l && (o.push(c), u = a.indexOf(c) !== -1, f = c !== null, !u && f && (c = q.itemParentId(e, c)));
	let p = l ? s : c, m = q.itemOrderedChildrenIds(e, p), h = a[a.indexOf(p) - 1], g = o[o.indexOf(p) - 1];
	return m.indexOf(h) < m.indexOf(g) ? [t, n] : [n, t];
}, ym = (e, t, n) => {
	let r = (t) => {
		if (fm.isItemExpandable(e, t) && fm.isItemExpanded(e, t)) return q.itemOrderedChildrenIds(e, t)[0];
		let n = q.itemMeta(e, t);
		for (; n != null;) {
			let t = q.itemOrderedChildrenIds(e, n.parentId), r = q.itemIndex(e, n.id);
			if (r < t.length - 1) return t[r + 1];
			n = n.parentId ? q.itemMeta(e, n.parentId) : null;
		}
		throw Error(bp(191));
	}, [i, a] = vm(e, t, n), o = [i], s = i;
	for (; s !== a;) s = r(s), q.isItemDisabled(e, s) || o.push(s);
	return o;
}, bm = (e) => {
	let t = _m(e), n = [];
	for (; t != null;) n.push(t), t = hm(e, t);
	return n;
}, xm = (e, t) => t !== e.closest("*[role=\"treeitem\"]"), Sm = class {
	lastSelectedItem = null;
	lastSelectedRange = {};
	constructor(e) {
		this.store = e, e.itemPluginManager.register(um, null);
	}
	setSelectedItems = (e, t, n) => {
		let { selectionPropagation: r = yp, selectedItems: i, onItemSelectionToggle: a, onSelectedItemsChange: o } = this.store.parameters, s = J.selectedItemsRaw(this.store.state), c, l = J.isMultiSelectEnabled(this.store.state);
		if (c = l && (r.descendants || r.parents) ? Cm({
			store: this.store,
			selectionPropagation: r,
			newModel: t,
			oldModel: s,
			additionalItemsToPropagate: n
		}) : t, i === void 0 && this.store.set("selectedItems", c), a) {
			if (l) {
				let t = wm({
					newModel: c,
					oldModel: s
				});
				a && (t.added.forEach((t) => {
					a(e, t, !0);
				}), t.removed.forEach((t) => {
					a(e, t, !1);
				}));
			} else c !== s && (s != null && a(e, s, !1), c != null && a(e, c, !0));
		}
		o?.(e, c);
	};
	selectRange = (e, [t, n]) => {
		if (!J.isMultiSelectEnabled(this.store.state)) return;
		let r = J.selectedItems(this.store.state).slice();
		Object.keys(this.lastSelectedRange).length > 0 && (r = r.filter((e) => !this.lastSelectedRange[e]));
		let i = Tm(r), a = ym(this.store.state, t, n).filter((e) => J.isItemSelectable(this.store.state, e)), o = a.filter((e) => !i[e]);
		r = r.concat(o), this.setSelectedItems(e, r), this.lastSelectedRange = Tm(a);
	};
	getItemSelection = (e) => J.itemSelectionStatus(this.store.state, e);
	buildPublicAPI = () => ({
		getItemSelection: this.getItemSelection,
		setItemSelection: this.setItemSelection
	});
	propagateSelectionToNewItems = (e, t) => {
		let { selectionPropagation: n = yp } = this.store.parameters;
		if (e == null || t.length === 0 || !n.descendants || !J.isMultiSelectEnabled(this.store.state) || !J.isItemSelected(this.store.state, e)) return;
		let r = J.selectedItems(this.store.state).concat(t);
		this.setSelectedItems(null, r, t);
	};
	setItemSelection = ({ itemId: e, event: t = null, keepExistingSelection: n = !1, shouldBeSelected: r }) => {
		if (!J.enabled(this.store.state)) return;
		let i, a = J.isMultiSelectEnabled(this.store.state);
		if (n && a) {
			let t = J.selectedItems(this.store.state), n = J.isItemSelected(this.store.state, e);
			i = n && (r === !1 || r == null) ? t.filter((t) => t !== e) : !n && (r === !0 || r == null) ? [e].concat(t) : t;
		} else i = r === !1 || r == null && J.isItemSelected(this.store.state, e) ? a ? [] : null : a ? [e] : e;
		this.setSelectedItems(t, i, [e]), this.lastSelectedItem = e, this.lastSelectedRange = {};
	};
	selectAllNavigableItems = (e) => {
		if (!J.isMultiSelectEnabled(this.store.state)) return;
		let t = bm(this.store.state);
		this.setSelectedItems(e, t), this.lastSelectedRange = Tm(t);
	};
	expandSelectionRange = (e, t) => {
		if (this.lastSelectedItem != null) {
			let [n, r] = vm(this.store.state, t, this.lastSelectedItem);
			this.selectRange(e, [n, r]);
		}
	};
	selectRangeFromStartToItem = (e, t) => {
		this.selectRange(e, [_m(this.store.state), t]);
	};
	selectRangeFromItemToEnd = (e, t) => {
		this.selectRange(e, [t, gm(this.store.state)]);
	};
	selectItemFromArrowNavigation = (e, t, n) => {
		if (!J.isMultiSelectEnabled(this.store.state)) return;
		let r = J.selectedItems(this.store.state).slice();
		Object.keys(this.lastSelectedRange).length === 0 ? (J.isItemSelected(this.store.state, n) || r.push(n), this.lastSelectedRange = {
			[t]: !0,
			[n]: !0
		}) : (this.lastSelectedRange[t] || (this.lastSelectedRange = {}), this.lastSelectedRange[n] ? (r = r.filter((e) => e !== t), delete this.lastSelectedRange[t]) : (J.isItemSelected(this.store.state, n) || r.push(n), this.lastSelectedRange[n] = !0)), this.setSelectedItems(e, r);
	};
};
function Cm({ store: e, selectionPropagation: t, newModel: n, oldModel: r, additionalItemsToPropagate: i }) {
	if (!t.descendants && !t.parents) return n;
	let a = !1, o = Tm(n), s = wm({
		newModel: n,
		oldModel: r
	});
	return i?.forEach((e) => {
		o[e] ? s.added.includes(e) || s.added.push(e) : s.removed.includes(e) || s.removed.push(e);
	}), s.added.forEach((n) => {
		if (t.descendants) {
			let t = (r) => {
				r !== n && J.canItemBeSelected(e.state, r) && (a = !0, o[r] = !0), q.itemOrderedChildrenIds(e.state, r).forEach(t);
			};
			t(n);
		}
		if (t.parents) {
			let t = (n) => J.canItemBeSelected(e.state, n) ? o[n] ? q.itemOrderedChildrenIds(e.state, n).every(t) : !1 : q.itemOrderedChildrenIds(e.state, n).every(t), r = (n) => {
				let i = q.itemParentId(e.state, n);
				i != null && q.itemOrderedChildrenIds(e.state, i).every(t) && (J.canItemBeSelected(e.state, i) && (a = !0, o[i] = !0), r(i));
			};
			r(n);
		}
	}), s.removed.forEach((n) => {
		if (t.parents) {
			let t = q.itemParentId(e.state, n);
			for (; t != null;) o[t] && (a = !0, delete o[t]), t = q.itemParentId(e.state, t);
		}
		if (t.descendants) {
			let t = (r) => {
				r !== n && (a = !0, delete o[r]), q.itemOrderedChildrenIds(e.state, r).forEach(t);
			};
			t(n);
		}
	}), a ? Object.keys(o) : n;
}
function wm({ oldModel: e, newModel: t }) {
	let n = /* @__PURE__ */ new Map();
	t.forEach((e) => {
		n.set(e, !0);
	});
	let r = /* @__PURE__ */ new Map();
	return e.forEach((e) => {
		r.set(e, !0);
	}), {
		added: t.filter((e) => !r.has(e)),
		removed: e.filter((e) => !n.has(e))
	};
}
function Tm(e) {
	let t = {};
	return e.forEach((e) => {
		t[e] = !0;
	}), t;
}
//#endregion
//#region node_modules/@mui/x-tree-view/internals/hooks/useTreeViewRootProps.mjs
function Em(e, t, n) {
	let r = Wp(e, Yp.treeId), i = Wp(e, q.itemChildrenIndentation), a = Wp(e, J.isMultiSelectEnabled);
	return (o) => K({
		ref: n,
		role: "tree",
		id: r,
		"aria-multiselectable": a
	}, t, o, {
		style: K({}, t.style, { "--TreeView-itemChildrenIndentation": typeof i == "number" ? `${i}px` : i }),
		onFocus: (t) => {
			o.onFocus?.(t), e.focus.handleRootFocus(t);
		},
		onBlur: (t) => {
			o.onBlur?.(t), e.focus.handleRootBlur(t);
		}
	});
}
//#endregion
//#region node_modules/@mui/x-tree-view/internals/utils/utils.mjs
function Dm(e) {
	return e.replace(/["\\]/g, "\\$&");
}
//#endregion
//#region node_modules/@mui/x-tree-view/internals/TreeViewProvider/TreeViewChildrenItemProvider.mjs
var Om = /*#__PURE__*/ P.createContext(null);
function km(e) {
	let { children: t, itemId: n = null, idAttribute: r } = e, { store: i, rootRef: a } = Sp(), o = P.useRef(/* @__PURE__ */ new Map());
	P.useEffect(() => {
		if (!a.current) return;
		let e = q.itemOrderedChildrenIds(i.state, n ?? null) ?? [], t = Dm(r ?? a.current.id);
		if (n != null) {
			let e = a.current.querySelector(`*[id="${t}"][role="treeitem"]`);
			if (e && e.getAttribute("aria-expanded") === "false") return;
		}
		let s = a.current.querySelectorAll(`${n == null ? "" : `*[id="${t}"] `}[role="treeitem"]:not(*[id="${t}"] [role="treeitem"] [role="treeitem"])`), c = Array.from(s).map((e) => o.current.get(e.id));
		(c.length !== e.length || c.some((t, n) => t !== e[n])) && i.jsxItems.setJSXItemsOrderedChildrenIds(n ?? null, c);
	});
	let s = P.useMemo(() => ({
		registerChild: (e, t) => o.current.set(e, t),
		unregisterChild: (e) => o.current.delete(e),
		parentId: n
	}), [n]);
	return /*#__PURE__*/ z(Om.Provider, {
		value: s,
		children: t
	});
}
//#endregion
//#region node_modules/@mui/x-tree-view/internals/TreeViewItemDepthContext/TreeViewItemDepthContext.mjs
var Am = /*#__PURE__*/ P.createContext(() => -1), jm = typeof document < "u" ? P.useLayoutEffect : () => {};
//#endregion
//#region node_modules/@base-ui/utils/useOnMount.mjs
function Mm(e) {
	P.useEffect(e, vp);
}
//#endregion
//#region node_modules/@base-ui/utils/safeReact.mjs
var Nm = { ...P }, Pm = typeof Symbol.dispose == "symbol" ? Symbol.dispose : Symbol.for("Symbol.dispose"), Fm = typeof SuppressedError == "function" ? SuppressedError : void 0;
function Im(e, t) {
	return Fm ? new Fm(e, t) : Object.assign(/* @__PURE__ */ Error("An error was suppressed during disposal."), {
		name: "SuppressedError",
		error: e,
		suppressed: t
	});
}
function Lm(e) {
	if (e) throw ReferenceError("MUI X: The disposable stack is disposed.");
}
var Rm = class e {
	stack = [];
	isDisposed = !1;
	get disposed() {
		return this.isDisposed;
	}
	use(e) {
		if (Lm(this.isDisposed), e != null) {
			let t = e[Pm];
			if (typeof t != "function") throw TypeError("MUI X: The value is not disposable.");
			this.stack.push(() => t.call(e));
		}
		return e;
	}
	adopt(e, t) {
		return Lm(this.isDisposed), this.stack.push(() => t(e)), e;
	}
	defer(e) {
		Lm(this.isDisposed), this.stack.push(e);
	}
	move() {
		Lm(this.isDisposed);
		let t = new e();
		return t.stack = this.stack, this.stack = [], this.isDisposed = !0, t;
	}
	dispose() {
		if (this.isDisposed) return;
		this.isDisposed = !0;
		let e = !1, t;
		for (let n = this.stack.length - 1; n >= 0; --n) try {
			this.stack[n]();
		} catch (n) {
			t = e ? Im(n, t) : n, e = !0;
		}
		if (this.stack = [], e) throw t;
	}
	[Pm]() {
		this.dispose();
	}
}, zm = globalThis.DisposableStack ?? Rm;
globalThis.AsyncDisposableStack;
//#endregion
//#region node_modules/@mui/x-internals/useDisposable/useDisposable.mjs
var Bm = Nm;
Bm.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE ?? Bm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
var Vm = Symbol("useDisposable.mount"), Hm = Symbol();
function Um(e) {
	let t = P.useRef(Hm);
	if (t.current === Hm) {
		let n = e(), r = () => {
			n[Pm](), t.current = Hm;
		};
		n[Vm] = () => r, t.current = n;
	}
	return Mm(t.current[Vm]), t.current;
}
var Wm = Um;
//#endregion
//#region node_modules/@mui/x-tree-view/internals/hooks/useTreeViewStore.mjs
function Gm(e, t) {
	let n = Sa(), r = Wm(() => new e(K({}, t, { isRtl: n })));
	return jm(() => r.updateStateFromParameters(K({}, t, { isRtl: n })), [
		r,
		n,
		t
	]), Mm(r.mountEffect), r;
}
//#endregion
//#region node_modules/@mui/x-internals/EventManager/EventManager.mjs
var Km = class {
	maxListeners = 20;
	warnOnce = !1;
	events = {};
	on(e, t, n = {}) {
		let r = this.events[e];
		r || (r = {
			highPriority: /* @__PURE__ */ new Map(),
			regular: /* @__PURE__ */ new Map()
		}, this.events[e] = r), n.isFirst ? r.highPriority.set(t, !0) : r.regular.set(t, !0);
	}
	removeListener(e, t) {
		this.events[e] && (this.events[e].regular.delete(t), this.events[e].highPriority.delete(t));
	}
	removeAllListeners() {
		this.events = {};
	}
	emit(e, ...t) {
		let n = this.events[e];
		if (!n) return;
		let r = Array.from(n.highPriority.keys()), i = Array.from(n.regular.keys());
		for (let e = r.length - 1; e >= 0; --e) {
			let i = r[e];
			n.highPriority.has(i) && i.apply(this, t);
		}
		for (let e = 0; e < i.length; e += 1) {
			let r = i[e];
			n.regular.has(r) && r.apply(this, t);
		}
	}
	once(e, t) {
		let n = this;
		this.on(e, function r(...i) {
			n.removeListener(e, r), t.apply(n, i);
		});
	}
}, qm = ({ isItemEditable: e, expansionTrigger: t }) => t || (e ? "iconContainer" : "content");
//#endregion
//#region node_modules/@mui/x-tree-view/internals/MinimalTreeViewStore/MinimalTreeViewStore.utils.mjs
function Jm(e) {
	return {
		disabledItemsFocusable: e.disabledItemsFocusable ?? !1,
		itemChildrenIndentation: e.itemChildrenIndentation ?? "12px",
		providedTreeId: e.id,
		expansionTrigger: qm({
			isItemEditable: e.isItemEditable,
			expansionTrigger: e.expansionTrigger
		}),
		disableSelection: e.disableSelection ?? !1,
		multiSelect: e.multiSelect ?? !1,
		checkboxSelection: e.checkboxSelection ?? !1,
		selectionPropagation: e.selectionPropagation ?? yp,
		itemHeight: e.itemHeight ?? null
	};
}
function Ym(e, t, n) {
	return e === void 0 ? t === void 0 ? n : t : e;
}
function Xm(e) {
	return K({
		treeId: void 0,
		focusedItemId: null
	}, Jm(e), nm.buildItemsStateIfNeeded(e), {
		expandedItems: Ym(e.expandedItems, e.defaultExpandedItems, []),
		selectedItems: Ym(e.selectedItems, e.defaultSelectedItems, e.multiSelect ? vp : null)
	});
}
var Zm = 0, Qm = () => (Zm += 1, `mui-tree-view-${Zm}`), $m = class {
	timeoutIds = /* @__PURE__ */ new Map();
	intervalIds = /* @__PURE__ */ new Map();
	startTimeout = (e, t, n) => {
		this.clearTimeout(e);
		let r = setTimeout(() => {
			this.timeoutIds.delete(e), n();
		}, t);
		this.timeoutIds.set(e, r);
	};
	startInterval = (e, t, n) => {
		this.clearInterval(e);
		let r = setInterval(n, t);
		this.intervalIds.set(e, r);
	};
	clearTimeout = (e) => {
		let t = this.timeoutIds.get(e);
		t != null && (clearTimeout(t), this.timeoutIds.delete(e));
	};
	clearInterval = (e) => {
		let t = this.intervalIds.get(e);
		t != null && (clearInterval(t), this.intervalIds.delete(e));
	};
	clearAll = () => {
		this.timeoutIds.forEach(clearTimeout), this.timeoutIds.clear(), this.intervalIds.forEach(clearInterval), this.intervalIds.clear();
	};
}, eh = class {
	constructor(e) {
		this.store = e;
	}
	setExpandedItems = (e, t) => {
		this.store.parameters.expandedItems === void 0 && this.store.set("expandedItems", t), this.store.parameters.onExpandedItemsChange?.(e, t);
	};
	isItemExpanded = (e) => fm.isItemExpanded(this.store.state, e);
	buildPublicAPI = () => ({
		isItemExpanded: this.isItemExpanded,
		setItemExpansion: this.setItemExpansion
	});
	setItemExpansion = ({ itemId: e, event: t = null, shouldBeExpanded: n }) => {
		let r = fm.isItemExpanded(this.store.state, e), i = n ?? !r;
		if (r === i) return;
		let a = {
			isExpansionPrevented: !1,
			shouldBeExpanded: i,
			itemId: e
		};
		this.store.publishEvent("beforeItemToggleExpansion", a, t), !a.isExpansionPrevented && this.applyItemExpansion({
			itemId: e,
			event: t,
			shouldBeExpanded: i
		});
	};
	applyItemExpansion = ({ itemId: e, event: t, shouldBeExpanded: n }) => {
		let r = fm.expandedItemsRaw(this.store.state), i;
		i = n ? [e].concat(r) : r.filter((t) => t !== e), this.store.parameters.onItemExpansionToggle?.(t, e, n), this.setExpandedItems(t, i);
	};
	expandAllSiblings = (e, t) => {
		let n = q.itemMeta(this.store.state, t);
		if (n == null) return;
		let r = q.itemOrderedChildrenIds(this.store.state, n.parentId).filter((e) => fm.isItemExpandable(this.store.state, e) && !fm.isItemExpanded(this.store.state, e)), i = fm.expandedItemsRaw(this.store.state).concat(r);
		r.length > 0 && (this.store.parameters.onItemExpansionToggle && r.forEach((t) => {
			this.store.parameters.onItemExpansionToggle(e, t, !0);
		}), this.setExpandedItems(e, i));
	};
	addExpandableItems = (e) => {
		let t = K({}, this.store.state.itemMetaLookup);
		for (let n of e) t[n] = K({}, t[n], { expandable: !0 });
		this.store.set("itemMetaLookup", t);
	};
}, th = {
	isItemEditable: Pp((e) => e.isItemEditable, q.itemModel, (e, t, n) => !t || e == null ? !1 : typeof e == "boolean" ? e : e(t)),
	isItemBeingEdited: Pp((e, t) => t != null && e.editedItemId === t),
	isAnyItemBeingEdited: Pp((e) => !!e.editedItemId)
}, nh = 500, rh = class {
	typeaheadQuery = "";
	constructor(e) {
		this.store = e, this.labelMap = ah(q.itemMetaLookup(this.store.state)), this.store.registerStoreEffect(q.itemMetaLookup, (e, t) => {
			this.store.shouldIgnoreItemsStateUpdate() || (this.labelMap = ah(t));
		});
	}
	canToggleItemSelection = (e) => J.canItemBeSelected(this.store.state, e);
	canToggleItemExpansion = (e) => !q.isItemDisabled(this.store.state, e) && fm.isItemExpandable(this.store.state, e);
	getFirstItemMatchingTypeaheadQuery = (e, t) => {
		let n = (e) => {
			let t = hm(this.store.state, e);
			return t === null ? _m(this.store.state) : t;
		}, r = (t) => {
			let r = null, i = {}, a = t.length > 1 ? e : n(e);
			for (; r == null && !i[a];) this.labelMap[a]?.startsWith(t) ? r = a : (i[a] = !0, a = n(a));
			return r;
		}, i = t.toLowerCase(), a = `${this.typeaheadQuery}${i}`, o = r(a);
		if (o != null) return this.typeaheadQuery = a, o;
		let s = r(i);
		return s == null ? (this.typeaheadQuery = "", null) : (this.typeaheadQuery = i, s);
	};
	updateLabelMap = (e) => {
		this.labelMap = e(this.labelMap);
	};
	handleItemKeyDown = async (e, t) => {
		if (e.defaultMuiPrevented || e.altKey || xm(e.target, e.currentTarget)) return;
		let n = e.ctrlKey || e.metaKey, r = e.key, i = J.isMultiSelectEnabled(this.store.state);
		switch (!0) {
			case r === " " && this.canToggleItemSelection(t):
				e.preventDefault(), i && e.shiftKey ? this.store.selection.expandSelectionRange(e, t) : this.store.selection.setItemSelection({
					event: e,
					itemId: t,
					keepExistingSelection: i,
					shouldBeSelected: void 0
				});
				break;
			case r === "Enter":
				this.store.labelEditing?.setEditedItem && th.isItemEditable(this.store.state, t) && !th.isItemBeingEdited(this.store.state, t) ? this.store.labelEditing.setEditedItem(t) : this.canToggleItemExpansion(t) ? (this.store.expansion.setItemExpansion({
					event: e,
					itemId: t
				}), e.preventDefault()) : this.canToggleItemSelection(t) && (i ? (e.preventDefault(), this.store.selection.setItemSelection({
					event: e,
					itemId: t,
					keepExistingSelection: !0
				})) : J.isItemSelected(this.store.state, t) || (this.store.selection.setItemSelection({
					event: e,
					itemId: t
				}), e.preventDefault()));
				break;
			case r === "ArrowDown": {
				let n = hm(this.store.state, t);
				n && (e.preventDefault(), this.store.focus.focusItem(e, n), i && e.shiftKey && this.canToggleItemSelection(n) && this.store.selection.selectItemFromArrowNavigation(e, t, n));
				break;
			}
			case r === "ArrowUp": {
				let n = mm(this.store.state, t);
				n && (e.preventDefault(), this.store.focus.focusItem(e, n), i && e.shiftKey && this.canToggleItemSelection(n) && this.store.selection.selectItemFromArrowNavigation(e, t, n));
				break;
			}
			case r === "ArrowRight" && !this.store.parameters.isRtl || r === "ArrowLeft" && this.store.parameters.isRtl:
				if (n) return;
				if (fm.isItemExpanded(this.store.state, t)) {
					let n = hm(this.store.state, t);
					n && (this.store.focus.focusItem(e, n), e.preventDefault());
				} else this.canToggleItemExpansion(t) && (this.store.expansion.setItemExpansion({
					event: e,
					itemId: t
				}), e.preventDefault());
				break;
			case r === "ArrowLeft" && !this.store.parameters.isRtl || r === "ArrowRight" && this.store.parameters.isRtl:
				if (n) return;
				if (this.canToggleItemExpansion(t) && fm.isItemExpanded(this.store.state, t)) this.store.expansion.setItemExpansion({
					event: e,
					itemId: t
				}), e.preventDefault();
				else {
					let n = q.itemParentId(this.store.state, t);
					n && (this.store.focus.focusItem(e, n), e.preventDefault());
				}
				break;
			case r === "Home":
				this.canToggleItemSelection(t) && i && n && e.shiftKey ? this.store.selection.selectRangeFromStartToItem(e, t) : this.store.focus.focusItem(e, _m(this.store.state)), e.preventDefault();
				break;
			case r === "End":
				this.canToggleItemSelection(t) && i && n && e.shiftKey ? this.store.selection.selectRangeFromItemToEnd(e, t) : this.store.focus.focusItem(e, gm(this.store.state)), e.preventDefault();
				break;
			case r === "*":
				this.store.expansion.expandAllSiblings(e, t), e.preventDefault();
				break;
			case String.fromCharCode(e.keyCode) === "A" && n && i && J.enabled(this.store.state):
				this.store.selection.selectAllNavigableItems(e), e.preventDefault();
				break;
			case !n && !e.shiftKey && ih(r): {
				this.store.timeoutManager.clearTimeout("typeahead");
				let n = this.getFirstItemMatchingTypeaheadQuery(t, r);
				n == null ? this.typeaheadQuery = "" : (this.store.focus.focusItem(e, n), e.preventDefault()), this.store.timeoutManager.startTimeout("typeahead", nh, () => {
					this.typeaheadQuery = "";
				});
				break;
			}
		}
	};
};
function ih(e) {
	return !!e && e.length === 1 && !!e.match(/\S/);
}
function ah(e) {
	let t = {};
	return Object.values(e).forEach((e) => {
		t[e.id] = e.label.toLowerCase();
	}), t;
}
//#endregion
//#region node_modules/@mui/x-tree-view/internals/plugins/focus/selectors.mjs
var oh = Fp(J.selectedItems, fm.expandedItemsMap, q.itemMetaLookup, q.disabledItemFocusable, (e) => q.itemOrderedChildrenIds(e, null), (e, t, n, r, i) => e.find((e) => {
	if (!r && Zp(n, e)) return !1;
	let i = n[e];
	return i && (i.parentId == null || t.has(i.parentId));
}) ?? i.find((e) => r || !Zp(n, e)) ?? null), sh = {
	defaultFocusableItemId: oh,
	isItemTheDefaultFocusableItem: Pp(oh, (e, t) => e === t),
	focusedItemId: Pp((e) => e.focusedItemId),
	isItemFocused: Pp((e, t) => e.focusedItemId === t)
}, ch = class {
	constructor(e) {
		this.store = e;
		let t = e.state;
		this.store.disposables.defer(this.store.subscribe((e) => {
			if (e.itemMetaLookup === t.itemMetaLookup) {
				t = e;
				return;
			}
			let n = sh.focusedItemId(e);
			if (n == null || q.itemMeta(e, n)) {
				t = e;
				return;
			}
			let r = (t) => t == null || !q.itemMeta(e, t) ? null : t, i = r(hm(t, n)) ?? r(mm(t, n)) ?? _m(e);
			i == null ? this.setFocusedItemId(null) : this.applyItemFocus(null, i), t = e;
		}));
	}
	setFocusedItemId = (e) => {
		sh.focusedItemId(this.store.state) !== e && this.store.set("focusedItemId", e);
	};
	applyItemFocus = (e, t) => {
		this.store.items.getItemDOMElement(t)?.focus(), this.setFocusedItemId(t), this.store.parameters.onItemFocus?.(e, t);
	};
	buildPublicAPI = () => ({ focusItem: this.focusItem });
	focusItem = (e, t) => {
		let n = q.itemMeta(this.store.state, t);
		n && (n.parentId == null || fm.isItemExpanded(this.store.state, n.parentId)) && this.applyItemFocus(e, t);
	};
	removeFocusedItem = () => {
		let e = sh.focusedItemId(this.store.state);
		if (e != null) {
			if (q.itemMeta(this.store.state, e)) {
				let t = this.store.items.getItemDOMElement(e);
				t && t.blur();
			}
			this.setFocusedItemId(null);
		}
	};
	handleRootFocus = (e) => {
		if (e.defaultMuiPrevented) return;
		let t = sh.defaultFocusableItemId(this.store.state);
		e.target === e.currentTarget && t != null && this.applyItemFocus(e, t);
	};
	handleRootBlur = (e) => {
		e.defaultMuiPrevented || this.setFocusedItemId(null);
	};
}, lh = class {
	itemPlugins = [];
	itemWrappers = [];
	register = (e, t) => {
		this.itemPlugins.push(e), t && this.itemWrappers.push(t);
	};
	listPlugins = () => this.itemPlugins;
	listWrappers = () => this.itemWrappers;
}, uh = class extends qp {
	initialParameters = null;
	disposables = new zm();
	eventManager = this.disposables.adopt(new Km(), (e) => e.removeAllListeners());
	timeoutManager = this.disposables.adopt(new $m(), (e) => e.clearAll());
	itemPluginManager = new lh();
	constructor(e, t, n) {
		let r = Xm(e), i = n.getInitialState(r, e);
		super(i), this.parameters = e, this.instanceName = t, this.mapper = n, this.items = new nm(this), this.focus = new ch(this), this.expansion = new eh(this), this.selection = new Sm(this), this.keyboardNavigation = new rh(this);
	}
	buildPublicAPI() {
		return K({}, this.items.buildPublicAPI(), this.focus.buildPublicAPI(), this.expansion.buildPublicAPI(), this.selection.buildPublicAPI());
	}
	updateStateFromParameters(e) {
		let t = (t, n, r) => {
			e[n] !== void 0 && (t[n] = e[n]);
		}, n = Jm(e);
		t(n, "expandedItems", "defaultExpandedItems"), t(n, "selectedItems", "defaultSelectedItems"), (this.state.providedTreeId !== e.id || this.state.treeId === void 0) && (n.treeId = Qm()), !this.mapper.shouldIgnoreItemsStateUpdate(e) && nm.shouldRebuildItemsState(e, this.parameters) && Object.assign(n, nm.buildItemsStateIfNeeded(e));
		let r = this.mapper.updateStateFromParameters(n, e, t);
		this.update(r), this.parameters = e;
	}
	mountEffect = () => {};
	[Pm]() {
		if (!this.disposables.disposed) try {
			this.disposables.dispose();
		} catch {}
	}
	shouldIgnoreItemsStateUpdate = () => this.mapper.shouldIgnoreItemsStateUpdate(this.parameters);
	registerStoreEffect = (e, t) => {
		let n = e(this.state);
		this.disposables.defer(this.subscribe((r) => {
			let i = e(r);
			i !== n && (t(n, i), n = i);
		}));
	};
	publishEvent = (e, t, n) => {
		dh(n) && n.isPropagationStopped() || this.eventManager.emit(e, t, n);
	};
	subscribeEvent = (e, t) => {
		this.eventManager.on(e, t);
	};
};
function dh(e) {
	return e?.isPropagationStopped !== void 0;
}
//#endregion
//#region node_modules/@mui/x-tree-view/internals/plugins/lazyLoading/selectors.mjs
var fh = {
	isEmpty: Pp((e) => e.lazyLoadedItems == null || Object.keys(e.lazyLoadedItems.loading).length === 0 && Object.keys(e.lazyLoadedItems.errors).length === 0),
	isItemLoading: Pp((e, t) => e.lazyLoadedItems?.loading[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"] ?? !1),
	itemHasError: Pp((e, t) => !!e.lazyLoadedItems?.errors[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"]),
	itemError: Pp((e, t) => e.lazyLoadedItems?.errors[t ?? "__TREE_VIEW_ROOT_PARENT_ID__"])
}, ph = (e) => Array.isArray(e) ? e.length > 0 && e.some(ph) : !!e, mh = ({ itemId: e, children: t }) => {
	let { store: n, publicAPI: r } = Sp(), i = Wp(n, fm.isItemExpandable, e), a = Wp(n, fh.isItemLoading, e), o = Wp(n, fh.itemHasError, e), s = ph(t) || i, c = Wp(n, fm.isItemExpanded, e), l = Wp(n, sh.isItemFocused, e), u = Wp(n, J.isItemSelected, e), d = Wp(n, J.isItemIndeterminate, e), f = Wp(n, q.isItemDisabled, e), p = Wp(n, th.isItemBeingEdited, e), m = {
		expandable: s,
		expanded: c,
		focused: l,
		selected: u,
		indeterminate: d,
		disabled: f,
		editing: p,
		editable: Wp(n, th.isItemEditable, e),
		loading: a,
		error: o
	}, h = (t) => {
		if (m.disabled) return;
		m.focused || n.focus.focusItem(t, e);
		let r = J.isMultiSelectEnabled(n.state) && (t.shiftKey || t.ctrlKey || t.metaKey);
		m.expandable && !(r && fm.isItemExpanded(n.state, e)) && n.expansion.setItemExpansion({
			event: t,
			itemId: e
		});
	}, g = (t) => {
		J.canItemBeSelected(n.state, e) && (!m.focused && !m.editing && n.focus.focusItem(t, e), J.isMultiSelectEnabled(n.state) && (t.shiftKey || t.ctrlKey || t.metaKey) ? t.shiftKey ? n.selection.expandSelectionRange(t, e) : n.selection.setItemSelection({
			event: t,
			itemId: e,
			keepExistingSelection: !0
		}) : n.selection.setItemSelection({
			event: t,
			itemId: e,
			shouldBeSelected: !0
		}));
	}, _ = (t) => {
		let r = t.nativeEvent.shiftKey, i = J.isMultiSelectEnabled(n.state);
		i && r ? n.selection.expandSelectionRange(t, e) : n.selection.setItemSelection({
			event: t,
			itemId: e,
			keepExistingSelection: i,
			shouldBeSelected: t.target.checked
		});
	}, v = () => {
		n.labelEditing && (p ? n.labelEditing.setEditedItem(null) : n.labelEditing.setEditedItem(e));
	};
	return {
		interactions: {
			handleExpansion: h,
			handleSelection: g,
			handleCheckboxSelection: _,
			toggleItemEditing: v,
			handleSaveItemLabel: (t, r) => {
				n.labelEditing && th.isItemBeingEdited(n.state, e) && (n.labelEditing.updateItemLabel(e, r), v(), n.focus.focusItem(t, e));
			},
			handleCancelItemLabelEditing: (t) => {
				n.labelEditing && th.isItemBeingEdited(n.state, e) && (v(), n.focus.focusItem(t, e));
			}
		},
		status: m,
		publicAPI: r
	};
}, hh = ({ props: e, rootRef: t, contentRef: n }) => {
	let { store: r } = Sp(), { children: i, disabled: a = !1, disableSelection: o = !1, label: s, itemId: c, id: l } = e, u = P.useContext(Om);
	if (u == null) throw Error(bp(196));
	let { registerChild: d, unregisterChild: f, parentId: p } = u, m = ph(i), h = P.useRef(null), g = Zf(h, n), _ = Wp(r, Yp.treeItemIdAttribute, c, l), v = P.useRef(!0), y = Xf(Symbol);
	return jm(() => (d(_, c), () => {
		f(_), f(_);
	}), [
		r,
		d,
		f,
		_,
		c
	]), jm(() => (v.current = !0, () => {
		v.current = !1;
	}), []), jm(() => {
		let e = r.jsxItems.upsertJSXItem({
			id: c,
			idAttribute: l,
			parentId: p,
			expandable: m,
			disabled: a,
			selectable: !o
		}, y.current);
		return () => {
			v.current || e();
		};
	}, [
		r,
		p,
		c,
		m,
		a,
		o,
		l,
		y
	]), P.useEffect(() => {
		if (s) return r.jsxItems.mapLabelFromJSX(c, (h.current?.textContent ?? "").toLowerCase());
	}, [
		r,
		c,
		s
	]), {
		contentRef: g,
		rootRef: t
	};
}, gh = ({ children: e, itemId: t, idAttribute: n }) => {
	let r = P.useContext(Am);
	return /*#__PURE__*/ z(km, {
		itemId: t,
		idAttribute: n,
		children: /*#__PURE__*/ z(Am.Provider, {
			value: r + 1,
			children: e
		})
	});
}, _h = class {
	itemOwners = /* @__PURE__ */ new Map();
	constructor(e) {
		this.store = e, e.itemPluginManager.register(hh, gh);
	}
	upsertJSXItem = (e, t) => {
		let n = this.itemOwners.get(e.id);
		if (n != null && n !== t) throw Error(bp(195, e.id));
		this.itemOwners.set(e.id, t);
		let r = q.itemMeta(this.store.state, e.id);
		if (r != null) {
			let t = !1;
			for (let n of Object.keys(e)) if (r[n] !== e[n]) {
				t = !0;
				break;
			}
			t && this.store.update({ itemMetaLookup: K({}, this.store.state.itemMetaLookup, { [e.id]: K({}, r, e) }) });
		} else this.store.update({
			itemMetaLookup: K({}, this.store.state.itemMetaLookup, { [e.id]: e }),
			itemModelLookup: K({}, this.store.state.itemModelLookup, { [e.id]: {
				id: e.id,
				label: e.label ?? ""
			} })
		});
		return () => {
			this.itemOwners.delete(e.id);
			let t = K({}, this.store.state.itemMetaLookup), n = K({}, this.store.state.itemModelLookup);
			delete t[e.id], delete n[e.id], this.store.update({
				itemMetaLookup: t,
				itemModelLookup: n
			});
		};
	};
	mapLabelFromJSX = (e, t) => (this.store.keyboardNavigation.updateLabelMap((n) => (n[e] = t, n)), () => {
		this.store.keyboardNavigation.updateLabelMap((t) => {
			let n = K({}, t);
			return delete n[e], n;
		});
	});
	setJSXItemsOrderedChildrenIds = (e, t) => {
		let n = e ?? "__TREE_VIEW_ROOT_PARENT_ID__";
		this.store.update({
			itemOrderedChildrenIdsLookup: K({}, this.store.state.itemOrderedChildrenIdsLookup, { [n]: t }),
			itemChildrenIndexesLookup: K({}, this.store.state.itemChildrenIndexesLookup, { [n]: Xp(t) })
		}), e !== null && J.isMultiSelectEnabled(this.store.state) && J.propagationRules(this.store.state).descendants && J.isItemSelected(this.store.state, e) && this.store.selection.setItemSelection({
			itemId: e,
			shouldBeSelected: !0,
			keepExistingSelection: !0
		});
	};
}, vh = {
	getInitialState: (e) => e,
	updateStateFromParameters: (e) => e,
	shouldIgnoreItemsStateUpdate: () => !0
}, yh = class extends uh {
	jsxItems = new _h(this);
	constructor(e) {
		super(K({}, e, { items: vp }), "SimpleTreeView", vh);
	}
	updateStateFromParameters(e) {
		super.updateStateFromParameters(K({}, e, { items: vp }));
	}
}, bh = dp("MuiSimpleTreeView"), xh = (e) => {
	let { classes: t } = e;
	return P.useMemo(() => tp({
		root: ["root"],
		item: ["item"],
		itemContent: ["itemContent"],
		itemGroupTransition: ["itemGroupTransition"],
		itemIconContainer: ["itemIconContainer"],
		itemLabel: ["itemLabel"],
		itemCheckbox: ["itemCheckbox"]
	}, _p, t), [t]);
}, Sh = Qi("ul", {
	name: "MuiSimpleTreeView",
	slot: "Root"
})({
	padding: 0,
	margin: 0,
	listStyle: "none",
	outline: 0,
	position: "relative"
}), Ch = /*#__PURE__*/ P.forwardRef(function(e, t) {
	let n = bh({
		props: e,
		name: "MuiSimpleTreeView"
	}), { slots: r, slotProps: i, apiRef: a, parameters: o, forwardedProps: s } = Mp(n), c = Gm(yh, o), l = P.useRef(null), u = Em(c, s, Zf(t, l)), d = xh(n), f = r?.root ?? Sh, p = up({
		elementType: f,
		externalSlotProps: i?.root,
		className: d.root,
		getSlotProps: u,
		ownerState: n
	});
	return /*#__PURE__*/ z(Dp, {
		store: c,
		classes: d,
		slots: r,
		slotProps: i,
		apiRef: a,
		rootRef: l,
		children: /*#__PURE__*/ z(km, {
			itemId: null,
			idAttribute: null,
			children: /*#__PURE__*/ z(Am.Provider, {
				value: 0,
				children: /*#__PURE__*/ z(f, K({}, p))
			})
		})
	});
}), wh = (e, t, n) => typeof n == "function" ? n(e, t) : n, Th = (e) => {
	let { runItemPlugins: t, publicAPI: n, store: r } = Sp(), i = P.useContext(Am), a = Wp(r, wh, e.itemId, i), { id: o, itemId: s, label: c, children: l, rootRef: u } = e, { rootRef: d, contentRef: f, propsEnhancers: p } = t(e), { interactions: m, status: h } = mh({
		itemId: s,
		children: l
	}), g = P.useRef(null), _ = P.useRef(null), v = Zf(u, d, g), y = Zf(f, _), b = P.useRef(null), x = Wp(r, J.isCheckboxSelectionEnabled), S = Wp(r, Yp.treeItemIdAttribute, s, o), C = Wp(r, sh.isItemTheDefaultFocusableItem, s), w = Wp(r, q.itemHeight), T = {
		rootRefObject: g,
		contentRefObject: _,
		interactions: m
	}, E = (e) => (t) => {
		e.onFocus?.(t), !t.defaultMuiPrevented && !h.focused && q.canItemBeFocused(r.state, s) && t.currentTarget === t.target && r.focus.focusItem(t, s);
	}, ee = (e) => (t) => {
		if (e.onBlur?.(t), t.defaultMuiPrevented) return;
		let n = r.items.getItemDOMElement(s);
		h.editing || t.relatedTarget && xm(t.relatedTarget, n) && (t.target && t.target?.dataset?.element === "labelInput" && xm(t.target, n) || t.relatedTarget?.dataset?.element === "labelInput") || r.focus.removeFocusedItem();
	}, D = (e) => (t) => {
		e.onKeyDown?.(t), !(t.defaultMuiPrevented || t.target?.dataset?.element === "labelInput") && r.keyboardNavigation.handleItemKeyDown(t, s);
	}, te = (e) => (t) => {
		e.onDoubleClick?.(t), !t.defaultMuiPrevented && m.toggleItemEditing();
	}, ne = (e) => (t) => {
		e.onClick?.(t), r.items.handleItemClick(t, s), !(t.defaultMuiPrevented || b.current?.contains(t.target)) && (fm.triggerSlot(r.state) === "content" && m.handleExpansion(t), x || m.handleSelection(t));
	}, re = (e) => (t) => {
		e.onMouseDown?.(t), !t.defaultMuiPrevented && (t.shiftKey || t.ctrlKey || t.metaKey || h.disabled) && t.preventDefault();
	}, ie = (e) => (t) => {
		e.onClick?.(t), !t.defaultMuiPrevented && fm.triggerSlot(r.state) === "iconContainer" && m.handleExpansion(t);
	};
	return {
		getContextProviderProps: () => ({
			itemId: s,
			id: o
		}),
		getRootProps: (t = {}) => {
			let n = K({}, op(e), op(t)), r = K({}, n, {
				ref: v,
				role: "treeitem",
				tabIndex: C ? 0 : -1,
				id: S,
				"aria-expanded": h.expandable ? h.expanded : void 0,
				"aria-disabled": h.disabled || void 0
			}, t, {
				style: K({}, t.style ?? {}, { "--TreeView-itemDepth": a }, w == null ? {} : { "--TreeView-itemHeight": `${w}px` }),
				onFocus: E(n),
				onBlur: ee(n),
				onKeyDown: D(n)
			}), i = p.root?.(K({}, T, { externalEventHandlers: n })) ?? {};
			return K({}, r, i);
		},
		getContentProps: (e = {}) => {
			let t = op(e), n = K({}, t, e, {
				ref: y,
				onClick: ne(t),
				onMouseDown: re(t)
			});
			[
				"expanded",
				"selected",
				"focused",
				"disabled",
				"editing",
				"editable"
			].forEach((e) => {
				h[e] && (n[`data-${e}`] = "");
			});
			let r = p.content?.(K({}, T, { externalEventHandlers: t })) ?? {};
			return K({}, n, r);
		},
		getGroupTransitionProps: (e = {}) => {
			let t = op(e);
			return K({}, t, {
				unmountOnExit: !0,
				component: "ul",
				role: "group",
				in: h.expanded,
				children: l
			}, e);
		},
		getIconContainerProps: (e = {}) => {
			let t = op(e);
			return K({}, t, e, { onClick: ie(t) });
		},
		getCheckboxProps: (e = {}) => {
			let t = op(e), n = K({}, t, {
				ref: b,
				"aria-hidden": !0
			}, e), r = p.checkbox?.(K({}, T, { externalEventHandlers: t })) ?? {};
			return K({}, n, r);
		},
		getLabelProps: (e = {}) => {
			let t = K({}, op(e)), n = K({}, t, { children: c }, e, { onDoubleClick: te(t) }), r = p.label?.(K({}, T, { externalEventHandlers: t })) ?? {};
			return K({}, r, n);
		},
		getLabelInputProps: (e = {}) => {
			let t = op(e), n = p.labelInput?.(K({}, T, { externalEventHandlers: t })) ?? {};
			return K({}, e, n);
		},
		getDragAndDropOverlayProps: (e = {}) => {
			let t = op(e), n = p.dragAndDropOverlay?.(K({}, T, { externalEventHandlers: t })) ?? {};
			return K({}, e, n);
		},
		getErrorContainerProps: (e = {}) => {
			let t = op(e);
			return K({}, t, e);
		},
		getLoadingContainerProps: (e = {}) => {
			let t = op(e);
			return K({
				size: "12px",
				thickness: 6
			}, t, e);
		},
		rootRef: v,
		status: h,
		publicAPI: n
	};
};
//#endregion
//#region node_modules/@mui/x-tree-view/TreeItem/treeItemClasses.mjs
function Eh(e) {
	return hp("MuiTreeItem", e);
}
gp("MuiTreeItem", [
	"root",
	"content",
	"groupTransition",
	"iconContainer",
	"label",
	"checkbox",
	"labelInput",
	"dragAndDropOverlay",
	"errorIcon",
	"loadingIcon"
]);
//#endregion
//#region node_modules/@mui/x-tree-view/icons/icons.mjs
var Dh = ta(/*#__PURE__*/ z("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "TreeViewExpandIcon"), Oh = ta(/*#__PURE__*/ z("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "TreeViewCollapseIcon"), kh = ["ownerState"];
function Ah(e, t, n) {
	return e === void 0 ? t === void 0 ? n : t : e;
}
function jh(e) {
	let { slots: t, slotProps: n, status: r } = e, { slots: i, slotProps: a } = wp(), o = {
		collapseIcon: Ah(t?.collapseIcon, i.collapseIcon, Oh),
		expandIcon: Ah(t?.expandIcon, i.expandIcon, Dh),
		endIcon: Ah(t?.endIcon, i.endIcon),
		icon: t?.icon
	}, s;
	s = o?.icon ? "icon" : r.expandable ? r.expanded ? "collapseIcon" : "expandIcon" : "endIcon";
	let c = o[s], l = Ap(up({
		elementType: c,
		externalSlotProps: (e) => K({}, lp(a[s], e), lp(n?.[s], e)),
		ownerState: {}
	}), kh);
	return c ? /*#__PURE__*/ z(c, K({}, l)) : null;
}
//#endregion
//#region node_modules/@mui/x-tree-view/TreeItemDragAndDropOverlay/TreeItemDragAndDropOverlay.mjs
var Mh = Qi("div", {
	name: "MuiTreeItemDragAndDropOverlay",
	slot: "Root",
	shouldForwardProp: (e) => Ea(e) && e !== "action"
})(({ theme: e }) => ({
	position: "absolute",
	left: 0,
	display: "flex",
	top: 0,
	bottom: 0,
	right: 0,
	pointerEvents: "none",
	variants: [
		{
			props: { action: "make-child" },
			style: {
				marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
				borderRadius: e.shape.borderRadius,
				backgroundColor: e.alpha((e.vars || e).palette.primary.dark, (e.vars || e).palette.action.focusOpacity)
			}
		},
		{
			props: { action: "reorder-above" },
			style: {
				marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
				borderTop: `1px solid ${(e.vars || e).palette.action.active}`
			}
		},
		{
			props: { action: "reorder-below" },
			style: {
				marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
				borderBottom: `1px solid ${(e.vars || e).palette.action.active}`
			}
		},
		{
			props: { action: "move-to-parent" },
			style: {
				marginLeft: "calc(var(--TreeView-indentMultiplier) * calc(var(--TreeView-itemDepth) - 1))",
				borderBottom: `1px solid ${(e.vars || e).palette.action.active}`
			}
		}
	]
}));
function Nh(e) {
	return e.action == null ? null : /*#__PURE__*/ z(Mh, K({}, e));
}
//#endregion
//#region node_modules/@mui/x-tree-view/TreeItemProvider/TreeItemProvider.mjs
function Ph(e) {
	let { children: t, itemId: n, id: r } = e, { wrapItem: i, store: a } = Sp(), o = Wp(a, Yp.treeItemIdAttribute, n, r);
	return /*#__PURE__*/ z(P.Fragment, { children: i({
		children: t,
		itemId: n,
		store: a,
		idAttribute: o
	}) });
}
//#endregion
//#region node_modules/@mui/x-tree-view/TreeItemLabelInput/TreeItemLabelInput.mjs
var Fh = Qi("input", {
	name: "MuiTreeItem",
	slot: "LabelInput"
})(({ theme: e }) => K({}, e.typography.body1, {
	width: "100%",
	backgroundColor: (e.vars || e).palette.background.paper,
	borderRadius: e.shape.borderRadius,
	border: "none",
	padding: "0 2px",
	boxSizing: "border-box",
	"&:focus": { outline: `1px solid ${(e.vars || e).palette.primary.main}` }
})), Ih = ["visible"], Lh = [
	"id",
	"itemId",
	"label",
	"disabled",
	"disableSelection",
	"children",
	"slots",
	"slotProps",
	"classes"
], Rh = dp("MuiTreeItem"), zh = Qi("li", {
	name: "MuiTreeItem",
	slot: "Root"
})({
	listStyle: "none",
	margin: 0,
	padding: 0,
	outline: 0
}), Bh = Qi("div", {
	name: "MuiTreeItem",
	slot: "Content",
	shouldForwardProp: (e) => Ea(e) && e !== "status"
})(({ theme: e }) => ({
	padding: e.spacing(.5, 1),
	paddingLeft: `calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`,
	borderRadius: e.shape.borderRadius,
	width: "100%",
	height: "var(--TreeView-itemHeight, unset)",
	boxSizing: "border-box",
	position: "relative",
	display: "flex",
	alignItems: "center",
	gap: e.spacing(1),
	cursor: "pointer",
	WebkitTapHighlightColor: "transparent",
	"&:hover": {
		backgroundColor: (e.vars || e).palette.action.hover,
		"@media (hover: none)": { backgroundColor: "transparent" }
	},
	"&[data-disabled]": {
		opacity: (e.vars || e).palette.action.disabledOpacity,
		backgroundColor: "transparent",
		cursor: "auto"
	},
	"&[data-focused]": { backgroundColor: (e.vars || e).palette.action.focus },
	"&[data-selected]": {
		backgroundColor: e.alpha((e.vars || e).palette.primary.main, (e.vars || e).palette.action.selectedOpacity),
		"&:hover": {
			backgroundColor: e.alpha((e.vars || e).palette.primary.main, `${(e.vars || e).palette.action.selectedOpacity} + ${(e.vars || e).palette.action.hoverOpacity}`),
			"@media (hover: none)": { backgroundColor: e.alpha((e.vars || e).palette.primary.main, (e.vars || e).palette.action.selectedOpacity) }
		}
	},
	"&[data-selected][data-focused]": { backgroundColor: e.alpha((e.vars || e).palette.primary.main, `${(e.vars || e).palette.action.selectedOpacity} + ${(e.vars || e).palette.action.focusOpacity}`) }
})), Vh = Qi("div", {
	name: "MuiTreeItem",
	slot: "Label",
	shouldForwardProp: (e) => Ea(e) && e !== "editable"
})(({ theme: e }) => K({
	width: "100%",
	boxSizing: "border-box",
	minWidth: 0,
	position: "relative",
	overflow: "hidden"
}, e.typography.body1, { variants: [{
	props: ({ editable: e }) => e,
	style: { paddingLeft: "2px" }
}] })), Hh = Qi("div", {
	name: "MuiTreeItem",
	slot: "IconContainer"
})({
	width: 16,
	display: "flex",
	flexShrink: 0,
	justifyContent: "center",
	position: "relative",
	cursor: "inherit",
	"& svg": { fontSize: 18 }
}), Uh = Qi(wa, {
	name: "MuiTreeItem",
	slot: "GroupTransition",
	overridesResolver: (e, t) => t.groupTransition
})({
	margin: 0,
	padding: 0
}), Wh = Qi("div", {
	name: "MuiTreeItem",
	slot: "ErrorIcon"
})({
	position: "absolute",
	right: -3,
	width: 7,
	height: 7,
	borderRadius: "50%",
	backgroundColor: "red"
}), Gh = Qi(Ca, {
	name: "MuiTreeItem",
	slot: "LoadingIcon"
})({ color: "text.primary" }), Kh = Qi(/*#__PURE__*/ P.forwardRef((e, t) => {
	let { visible: n } = e, r = Ap(e, Ih);
	return n ? /*#__PURE__*/ z(Ta, K({}, r, { ref: t })) : null;
}), {
	name: "MuiTreeItem",
	slot: "Checkbox"
})({ padding: 0 }), qh = (e) => {
	let { classes: t } = wp();
	return tp({
		root: ["root"],
		content: ["content"],
		iconContainer: ["iconContainer"],
		checkbox: ["checkbox"],
		label: ["label"],
		groupTransition: ["groupTransition"],
		labelInput: ["labelInput"],
		dragAndDropOverlay: ["dragAndDropOverlay"],
		errorIcon: ["errorIcon"],
		loadingIcon: ["loadingIcon"]
	}, Eh, K({}, e, {
		root: Pu(e?.root, t.root),
		content: Pu(e?.content, t.itemContent),
		iconContainer: Pu(e?.iconContainer, t.itemIconContainer),
		checkbox: Pu(e?.checkbox, t.itemCheckbox),
		label: Pu(e?.label, t.itemLabel),
		groupTransition: Pu(e?.groupTransition, t.itemGroupTransition),
		labelInput: Pu(e?.labelInput, t.itemLabelInput),
		dragAndDropOverlay: Pu(e?.dragAndDropOverlay, t.itemDragAndDropOverlay),
		errorIcon: Pu(e?.errorIcon, t.itemErrorIcon),
		loadingIcon: Pu(e?.loadingIcon, t.itemLoadingIcon)
	}));
}, Jh = /*#__PURE__*/ P.forwardRef(function(e, t) {
	let n = Rh({
		props: e,
		name: "MuiTreeItem"
	}), { id: r, itemId: i, label: a, disabled: o, disableSelection: s, children: c, slots: l = {}, slotProps: u = {}, classes: d } = n, f = Ap(n, Lh), { getContextProviderProps: p, getRootProps: m, getContentProps: h, getIconContainerProps: g, getCheckboxProps: _, getLabelProps: v, getGroupTransitionProps: y, getLabelInputProps: b, getDragAndDropOverlayProps: x, getErrorContainerProps: S, getLoadingContainerProps: C, status: w } = Th({
		id: r,
		itemId: i,
		children: c,
		label: a,
		disabled: o,
		disableSelection: s
	}), T = qh(d), E = l.root ?? zh, ee = up({
		elementType: E,
		getSlotProps: m,
		externalForwardedProps: f,
		externalSlotProps: u.root,
		additionalProps: { ref: t },
		ownerState: {},
		className: T.root
	}), D = l.content ?? Bh, te = up({
		elementType: D,
		getSlotProps: h,
		externalSlotProps: u.content,
		ownerState: {},
		className: T.content
	}), ne = l.iconContainer ?? Hh, re = up({
		elementType: ne,
		getSlotProps: g,
		externalSlotProps: u.iconContainer,
		ownerState: {},
		className: T.iconContainer
	}), ie = l.label ?? Vh, ae = up({
		elementType: ie,
		getSlotProps: v,
		externalSlotProps: u.label,
		ownerState: {},
		className: T.label
	}), oe = l.checkbox ?? Kh, se = up({
		elementType: oe,
		getSlotProps: _,
		externalSlotProps: u.checkbox,
		ownerState: {},
		className: T.checkbox
	}), O = l.groupTransition ?? void 0, ce = up({
		elementType: O,
		getSlotProps: y,
		externalSlotProps: u.groupTransition,
		ownerState: {},
		className: T.groupTransition
	}), k = l.labelInput ?? Fh, le = up({
		elementType: k,
		getSlotProps: b,
		externalSlotProps: u.labelInput,
		ownerState: {},
		className: T.labelInput
	}), ue = l.dragAndDropOverlay ?? Nh, de = up({
		elementType: ue,
		getSlotProps: x,
		externalSlotProps: u.dragAndDropOverlay,
		ownerState: {},
		className: T.dragAndDropOverlay
	}), fe = l.errorIcon ?? Wh, pe = up({
		elementType: fe,
		getSlotProps: S,
		externalSlotProps: u.errorIcon,
		ownerState: {},
		className: T.errorIcon
	}), me = l.loadingIcon ?? Gh, he = up({
		elementType: me,
		getSlotProps: C,
		externalSlotProps: u.loadingIcon,
		ownerState: {},
		className: T.loadingIcon
	});
	return /*#__PURE__*/ z(Ph, K({}, p(), { children: /*#__PURE__*/ B(E, K({}, ee, { children: [/*#__PURE__*/ B(D, K({}, te, { children: [
		/*#__PURE__*/ B(ne, K({}, re, { children: [w.error && /*#__PURE__*/ z(fe, K({}, pe)), w.loading ? /*#__PURE__*/ z(me, K({}, he)) : /*#__PURE__*/ z(jh, {
			status: w,
			slots: l,
			slotProps: u
		})] })),
		/*#__PURE__*/ z(oe, K({}, se)),
		w.editing ? /*#__PURE__*/ z(k, K({}, le)) : /*#__PURE__*/ z(ie, K({}, ae)),
		/*#__PURE__*/ z(ue, K({}, de))
	] })), c && /*#__PURE__*/ z(Uh, K({ as: O }, ce))] })) }));
}), Yh = N(/*#__PURE__*/ z("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRight"), Xh = H("div")(() => ({}));
function Zh(e) {
	let t = e.data.__jsonld;
	if (t.startCanvas && typeof t.startCanvas == "string") return t.startCanvas;
	if (t.start) {
		if (t.start.type === "Canvas" && typeof t.start.id == "string") return t.start.id;
		if (t.start.type === "SpecificResource" && typeof t.start.source == "string") return t.start.source;
	}
	return e.data.getCanvasIds()[0];
}
function Qh(e, t) {
	if (e.id === t) return e;
	let n = null;
	if (e.nodes) for (let r = 0; n == null && r < e.nodes.length; r += 1) n = Qh(e.nodes[r], t);
	return n;
}
var $h = ({ children: e, itemId: t, ...n }) => /* @__PURE__ */ z(Du, {
	...n,
	children: e
});
$h.propTypes = {
	children: W.default.node.isRequired,
	itemId: W.default.string.isRequired
};
var eg = (e) => /* @__PURE__ */ z(_f, {
	...e,
	color: "action"
}), tg = (e) => /* @__PURE__ */ z(Yh, {
	...e,
	color: "action"
});
function ng({ toggleNode: e, expandNodes: t, setCanvas: n, windowId: r, treeStructure: i, visibleNodeIds: a, expandedNodeIds: o, containerRef: s, nodeIdToScrollTo: c }) {
	let l = (t, n) => {
		(t.key === " " || t.key === "Spacebar") && e(n), d(n);
	}, u = (e, n) => {
		t(n);
	}, d = (e) => {
		let t = Qh(i, e);
		if (!t.data.getCanvasIds() || t.data.getCanvasIds().length === 0 || t.nodes.length > 0) return;
		let a = Zh(t);
		n(r, a.indexOf("#") === -1 ? a : a.substr(0, a.indexOf("#")));
	};
	if (!i) return null;
	let f = (e) => /* @__PURE__ */ z($h, {
		containerRef: s,
		itemId: e.id,
		offsetTop: 96,
		scrollTo: c === e.id,
		children: /* @__PURE__ */ z(Jh, {
			itemId: e.id,
			label: /* @__PURE__ */ z(Xh, {
				sx: (t) => ({
					backgroundColor: a.indexOf(e.id) !== -1 && Ji(t.palette.highlights?.primary || t.palette.action.selected, .35),
					display: a.indexOf(e.id) !== -1 && "inline"
				}),
				children: e.label
			}),
			children: e.nodes && e.nodes.length > 0 ? e.nodes.map(f) : null
		})
	}, e.id);
	return /* @__PURE__ */ z(Ch, {
		sx: { flexGrow: 1 },
		slots: {
			collapseIcon: eg,
			endIcon: null,
			expandIcon: tg
		},
		onSelectedItemsChange: l,
		onExpandedItemsChange: u,
		expandedItems: o,
		children: Array.isArray(i.nodes) && i.nodes.length > 0 ? i.nodes.map((e) => f(e)) : /* @__PURE__ */ z("p", { children: "No items found" })
	});
}
ng.propTypes = {
	containerRef: W.default.oneOfType([W.default.func, W.default.shape({ current: W.default.instanceOf(Element) })]).isRequired,
	expandedNodeIds: W.default.arrayOf(W.default.string).isRequired,
	expandNodes: W.default.func.isRequired,
	nodeIdToScrollTo: W.default.string.isRequired,
	setCanvas: W.default.func.isRequired,
	toggleNode: W.default.func.isRequired,
	treeStructure: W.default.shape({
		id: W.default.string.isRequired,
		label: W.default.string.isRequired,
		nodes: W.default.arrayOf(W.default.shape({
			id: W.default.string.isRequired,
			label: W.default.string.isRequired,
			nodes: W.default.array
		}))
	}).isRequired,
	visibleNodeIds: W.default.arrayOf(W.default.string).isRequired,
	windowId: W.default.string.isRequired
};
var rg = i(O((e, { id: t, windowId: n }) => ({
	expandedNodeIds: Uo(e, {
		companionWindowId: t,
		windowId: n
	}),
	nodeIdToScrollTo: Wo(e, {
		companionWindowId: t,
		windowId: n
	}),
	treeStructure: et(e, { windowId: n }),
	visibleNodeIds: zo(e, {
		companionWindowId: t,
		windowId: n
	})
}), (e, { id: t, windowId: n }) => ({
	expandNodes: (r) => e(ws(n, t, r)),
	setCanvas: (...t) => e(Gr(...t)),
	toggleNode: (r) => e(Cs(n, t, r))
})), A("SidebarIndexTableOfContents"))(ng), ig = H("div")(() => ({
	flexBasis: "100%",
	height: 0
}));
function ag({ collection: e = null, id: t, showMultipart: n, sequenceId: r = null, sequences: i = [], variant: a, showToc: o = !1, updateSequence: s, updateVariant: c, windowId: l }) {
	let { t: u } = V(), d = R(), f = Pi(), p = (e) => {
		s(e.target.value);
	}, m = (e, t) => {
		c(t);
	}, h;
	return h = z(a === "tableOfContents" ? rg : qf, {
		id: t,
		containerRef: d,
		windowId: l
	}), /* @__PURE__ */ z(pf, {
		title: u("canvasIndex"),
		id: t,
		windowId: l,
		ref: d,
		titleControls: /* @__PURE__ */ B(Bi, { children: [
			i && i.length > 1 && /* @__PURE__ */ z(ga, { children: /* @__PURE__ */ z(_a, {
				MenuProps: { anchorOrigin: {
					horizontal: "left",
					vertical: "bottom"
				} },
				displayEmpty: !0,
				value: r,
				onChange: p,
				name: "sequenceId",
				sx: {
					"&.MuiSelect-select": { "&:focus": { backgroundColor: "background.paper" } },
					backgroundColor: "background.paper"
				},
				"data-testid": "sequence-select",
				children: i.map((e, t) => /* @__PURE__ */ z(sa, {
					value: e.id,
					children: /* @__PURE__ */ z(U, {
						variant: "body2",
						children: /* @__PURE__ */ z(Xr, { resource: e })
					})
				}, e.id))
			}) }),
			/* @__PURE__ */ z(ig, {}),
			/* @__PURE__ */ B(ba, {
				value: a,
				onChange: m,
				variant: "fullWidth",
				indicatorColor: "primary",
				textColor: "primary",
				children: [
					o && /* @__PURE__ */ z(ia, {
						title: u("tableOfContentsList"),
						value: "tableOfContents",
						children: /* @__PURE__ */ z(xa, {
							sx: { minWidth: "auto" },
							value: "tableOfContents",
							"aria-label": u("tableOfContentsList"),
							"aria-controls": f,
							icon: /* @__PURE__ */ z(Rf, { style: { transform: "scale(-1, 1)" } })
						})
					}),
					/* @__PURE__ */ z(ia, {
						title: u("itemList"),
						value: "item",
						children: /* @__PURE__ */ z(xa, {
							sx: { minWidth: "auto" },
							value: "item",
							"aria-label": u("itemList"),
							"aria-controls": f,
							icon: /* @__PURE__ */ z(Lf, {})
						})
					}),
					/* @__PURE__ */ z(ia, {
						title: u("thumbnailList"),
						value: "thumbnail",
						children: /* @__PURE__ */ z(xa, {
							sx: { minWidth: "auto" },
							value: "thumbnail",
							"aria-label": u("thumbnailList"),
							"aria-controls": f,
							icon: /* @__PURE__ */ z(kf, {})
						})
					})
				]
			})
		] }),
		children: /* @__PURE__ */ B("div", {
			id: f,
			children: [e && /* @__PURE__ */ z(va, {
				fullWidth: !0,
				onClick: n,
				endIcon: /* @__PURE__ */ z(zf, {}),
				children: /* @__PURE__ */ z(U, {
					sx: { textTransform: "none" },
					children: /* @__PURE__ */ z(Xr, { resource: e })
				})
			}), h]
		})
	});
}
ag.propTypes = {
	collection: W.default.object,
	id: W.default.string.isRequired,
	sequenceId: W.default.string,
	sequences: W.default.arrayOf(W.default.object),
	showMultipart: W.default.func.isRequired,
	showToc: W.default.bool,
	updateSequence: W.default.func.isRequired,
	updateVariant: W.default.func.isRequired,
	variant: W.default.oneOf([
		"item",
		"thumbnail",
		"tableOfContents"
	]).isRequired,
	windowId: W.default.string.isRequired
};
var og = i(O((e, { id: t, windowId: n }) => {
	let r = We(e, { windowId: n }), i = b(e, { windowId: n }), { config: a } = e, o = Fe(e, { companionWindowId: t }), s = i.collectionPath || [], c = s && s[s.length - 1], l = it(e, { windowId: n });
	return {
		collection: c && un(e, { manifestId: c }),
		config: a,
		sequenceId: l && l.id,
		sequences: In(e, { windowId: n }),
		showToc: r && r.nodes && r.nodes.length > 0,
		variant: o.variant || Go(e, { windowId: n })
	};
}, (e, { id: t, windowId: n }) => ({
	showMultipart: () => e(bs(n, {
		content: "collection",
		position: "right"
	})),
	updateSequence: (t) => e(Pr(n, { sequenceId: t })),
	updateVariant: (r) => e(xs(n, t, { variant: r }))
})), A("WindowSideBarCanvasPanel"))(ag);
//#endregion
//#region src/components/ImageWithFallback.jsx
function sg({ alt: e, fallback: t, src: n, ...r }) {
	let [i, a] = zi(!1), { notifyFailure: o } = Ni(pr);
	return L(() => {
		a(!1);
	}, [n]), i ? t : /* @__PURE__ */ z("img", {
		alt: e,
		src: n,
		onError: () => {
			a(!0), o(n);
		},
		...r
	});
}
sg.propTypes = {
	alt: W.default.string.isRequired,
	fallback: W.default.node.isRequired,
	src: W.default.string.isRequired
};
//#endregion
//#region src/components/AttributionPanel.jsx
var cg = H(sg)(() => ({ maxWidth: "100%" })), lg = H(Da)(({ theme: e }) => ({ backgroundColor: e.palette.grey[300] }));
function ug({ manifestLogo: e = null, requiredStatement: t = null, rights: n = null, windowId: r, id: i }) {
	let { t: a } = V(), o = arguments[0];
	return /* @__PURE__ */ B(pf, {
		title: a("attributionTitle"),
		paperClassName: M("attribution-panel"),
		windowId: r,
		id: i,
		children: [
			/* @__PURE__ */ B(mf, { children: [t && /* @__PURE__ */ z(xf, {
				labelValuePairs: t,
				defaultLabel: a("attribution")
			}), n && n.length > 0 && /* @__PURE__ */ B("dl", {
				className: M("label-value-metadata"),
				children: [/* @__PURE__ */ z(U, {
					variant: "subtitle2",
					component: "dt",
					children: a("rights")
				}), n.map((e) => /* @__PURE__ */ z(U, {
					variant: "body1",
					component: "dd",
					children: /* @__PURE__ */ z(ya, {
						target: "_blank",
						rel: "noopener noreferrer",
						href: e,
						children: e
					})
				}, e.toString()))]
			})] }),
			e && /* @__PURE__ */ z(mf, { children: /* @__PURE__ */ z(cg, {
				src: e,
				alt: "",
				role: "presentation",
				fallback: /* @__PURE__ */ z(lg, {
					variant: "rectangular",
					height: 60,
					width: 60
				})
			}) }),
			/* @__PURE__ */ z(Yr, {
				targetName: "AttributionPanel",
				...o
			})
		]
	});
}
ug.propTypes = {
	id: W.default.string.isRequired,
	manifestLogo: W.default.string,
	requiredStatement: W.default.arrayOf(W.default.shape({
		label: W.default.string,
		value: W.default.string
	})),
	rights: W.default.arrayOf(W.default.string),
	windowId: W.default.string.isRequired
};
var dg = i(O((e, { id: t, windowId: n }) => ({
	manifestLogo: mn(e, { windowId: n }),
	requiredStatement: tn(e, { windowId: n }),
	rights: Dn(e, { windowId: n })
})), A("AttributionPanel"))(ug), fg = /* @__PURE__ */ D(((e, t) => {
	function n(e) {
		return function(t) {
			return e?.[t];
		};
	}
	t.exports = n;
})), pg = /* @__PURE__ */ D(((e, t) => {
	t.exports = fg()({
		À: "A",
		Á: "A",
		Â: "A",
		Ã: "A",
		Ä: "A",
		Å: "A",
		à: "a",
		á: "a",
		â: "a",
		ã: "a",
		ä: "a",
		å: "a",
		Ç: "C",
		ç: "c",
		Ð: "D",
		ð: "d",
		È: "E",
		É: "E",
		Ê: "E",
		Ë: "E",
		è: "e",
		é: "e",
		ê: "e",
		ë: "e",
		Ì: "I",
		Í: "I",
		Î: "I",
		Ï: "I",
		ì: "i",
		í: "i",
		î: "i",
		ï: "i",
		Ñ: "N",
		ñ: "n",
		Ò: "O",
		Ó: "O",
		Ô: "O",
		Õ: "O",
		Ö: "O",
		Ø: "O",
		ò: "o",
		ó: "o",
		ô: "o",
		õ: "o",
		ö: "o",
		ø: "o",
		Ù: "U",
		Ú: "U",
		Û: "U",
		Ü: "U",
		ù: "u",
		ú: "u",
		û: "u",
		ü: "u",
		Ý: "Y",
		ý: "y",
		ÿ: "y",
		Æ: "Ae",
		æ: "ae",
		Þ: "Th",
		þ: "th",
		ß: "ss",
		Ā: "A",
		Ă: "A",
		Ą: "A",
		ā: "a",
		ă: "a",
		ą: "a",
		Ć: "C",
		Ĉ: "C",
		Ċ: "C",
		Č: "C",
		ć: "c",
		ĉ: "c",
		ċ: "c",
		č: "c",
		Ď: "D",
		Đ: "D",
		ď: "d",
		đ: "d",
		Ē: "E",
		Ĕ: "E",
		Ė: "E",
		Ę: "E",
		Ě: "E",
		ē: "e",
		ĕ: "e",
		ė: "e",
		ę: "e",
		ě: "e",
		Ĝ: "G",
		Ğ: "G",
		Ġ: "G",
		Ģ: "G",
		ĝ: "g",
		ğ: "g",
		ġ: "g",
		ģ: "g",
		Ĥ: "H",
		Ħ: "H",
		ĥ: "h",
		ħ: "h",
		Ĩ: "I",
		Ī: "I",
		Ĭ: "I",
		Į: "I",
		İ: "I",
		ĩ: "i",
		ī: "i",
		ĭ: "i",
		į: "i",
		ı: "i",
		Ĵ: "J",
		ĵ: "j",
		Ķ: "K",
		ķ: "k",
		ĸ: "k",
		Ĺ: "L",
		Ļ: "L",
		Ľ: "L",
		Ŀ: "L",
		Ł: "L",
		ĺ: "l",
		ļ: "l",
		ľ: "l",
		ŀ: "l",
		ł: "l",
		Ń: "N",
		Ņ: "N",
		Ň: "N",
		Ŋ: "N",
		ń: "n",
		ņ: "n",
		ň: "n",
		ŋ: "n",
		Ō: "O",
		Ŏ: "O",
		Ő: "O",
		ō: "o",
		ŏ: "o",
		ő: "o",
		Ŕ: "R",
		Ŗ: "R",
		Ř: "R",
		ŕ: "r",
		ŗ: "r",
		ř: "r",
		Ś: "S",
		Ŝ: "S",
		Ş: "S",
		Š: "S",
		ś: "s",
		ŝ: "s",
		ş: "s",
		š: "s",
		Ţ: "T",
		Ť: "T",
		Ŧ: "T",
		ţ: "t",
		ť: "t",
		ŧ: "t",
		Ũ: "U",
		Ū: "U",
		Ŭ: "U",
		Ů: "U",
		Ű: "U",
		Ų: "U",
		ũ: "u",
		ū: "u",
		ŭ: "u",
		ů: "u",
		ű: "u",
		ų: "u",
		Ŵ: "W",
		ŵ: "w",
		Ŷ: "Y",
		ŷ: "y",
		Ÿ: "Y",
		Ź: "Z",
		Ż: "Z",
		Ž: "Z",
		ź: "z",
		ż: "z",
		ž: "z",
		IJ: "IJ",
		ij: "ij",
		Œ: "Oe",
		œ: "oe",
		ʼn: "'n",
		ſ: "s"
	});
})), mg = /* @__PURE__ */ k((/* @__PURE__ */ D(((e, t) => {
	var n = pg(), r = En(), i = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, a = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g");
	function o(e) {
		return e = r(e), e && e.replace(i, n).replace(a, "");
	}
	t.exports = o;
})))(), 1), hg = N(/*#__PURE__*/ z("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }), "ChevronLeftSharp"), gg = N(/*#__PURE__*/ z("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }), "ChevronRightSharp");
//#endregion
//#region src/components/SearchPanelNavigation.jsx
function _g({ numTotal: e = void 0, searchHits: t = [], selectedContentSearchAnnotation: n, direction: r, selectAnnotation: i }) {
	let { t: a } = V(), o = (e) => {
		i(t[e + 1].annotations[0]);
	}, s = (e) => {
		i(t[e - 1].annotations[0]);
	}, c = (e) => t.length !== 0 && e < t.length - 1, l = (e) => t.length !== 0 && e > 0, u = r === "rtl" ? { transform: "rotate(180deg)" } : {}, d = t.findIndex((e) => e.annotations.includes(n[0])), f = t.length;
	return t.length < e && (f += "+"), t.length === 0 ? null : /* @__PURE__ */ B(U, {
		variant: "body2",
		align: "center",
		children: [
			/* @__PURE__ */ z(ii, {
				"aria-label": a("searchPreviousResult"),
				disabled: !l(d),
				onClick: () => s(d),
				children: /* @__PURE__ */ z(hg, { style: u })
			}),
			/* @__PURE__ */ z("span", {
				style: { unicodeBidi: "plaintext" },
				role: "status",
				children: a("pagination", {
					current: d + 1,
					total: f
				})
			}),
			/* @__PURE__ */ z(ii, {
				"aria-label": a("searchNextResult"),
				disabled: !c(d),
				onClick: () => o(d),
				children: /* @__PURE__ */ z(gg, { style: u })
			})
		]
	});
}
_g.propTypes = {
	direction: W.default.string.isRequired,
	numTotal: W.default.number,
	searchHits: W.default.arrayOf(W.default.object),
	selectAnnotation: W.default.func.isRequired,
	selectedContentSearchAnnotation: W.default.arrayOf(W.default.string).isRequired,
	windowId: W.default.string.isRequired
};
var vg = i(O((e, { companionWindowId: t, windowId: n }) => ({
	direction: dt(e),
	numTotal: hr(e, {
		companionWindowId: t,
		windowId: n
	}),
	searchHits: qn(e, {
		companionWindowId: t,
		windowId: n
	}),
	selectedContentSearchAnnotation: Zn(e, {
		companionWindowId: t,
		windowId: n
	})
}), (e, { windowId: t }) => ({ selectAnnotation: (...n) => e(Qn(t, ...n)) })), A("SearchPanelNavigation"))(_g), yg = H("form", {
	name: "SearchPanelControls",
	slot: "form"
})(({ theme: e }) => ({
	paddingBottom: e.spacing(1),
	paddingRight: e.spacing(1.5),
	width: "100%"
})), bg = (e) => (0, Jf.default)(e) ? e.match : e;
function xg({ autocompleteService: e = void 0, companionWindowId: t, fetchSearch: n, query: r = "", searchIsFetching: i = !1, searchService: a, windowId: o }) {
	let { t: s } = V(), [c, l] = zi(r), [u, d] = zi(r), [f, p] = zi([]);
	L(() => {
		l(r), d(r), p([]);
	}, [r]), L(() => {
		u && u !== "" && a && n(o, t, `${a.id}?${new URLSearchParams({ q: u })}`, u);
	}, [
		u,
		a,
		t,
		n,
		o
	]);
	let m = (e, t, n) => {
		n === "reset" && !t || (l(t), p([]), t && h(t));
	}, h = kr(I(() => {
		e && c && fetch(`${e.id}?${new URLSearchParams({ q: c })}`).then((e) => e.json()).then(g);
	}, [e, c]), 500), g = (e) => {
		p(e.terms);
	}, _ = (e) => {
		c && (e && e.preventDefault(), d(c));
	}, v = (e, t, n) => {
		t && bg(t) && d(bg(t));
	}, y = `search-${t}`;
	return /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(yg, {
		"aria-label": s("searchTitle"),
		onSubmit: _,
		children: /* @__PURE__ */ z(Oa, {
			id: y,
			inputValue: c,
			options: f,
			getOptionLabel: bg,
			isOptionEqualToValue: (e, t) => (0, mg.default)(bg(e).trim()).toLowerCase() === (0, mg.default)(bg(t).trim()).toLowerCase(),
			noOptionsText: "",
			onChange: v,
			onInputChange: m,
			freeSolo: !0,
			disableClearable: !0,
			renderInput: (e) => /* @__PURE__ */ z(ka, {
				...e,
				label: s("searchInputLabel"),
				variant: "standard",
				slotProps: {
					...e.slotProps,
					input: {
						...e.InputProps,
						...e.slotProps?.input,
						endAdornment: /* @__PURE__ */ B(Aa, {
							sx: { position: "relative" },
							position: "end",
							children: [/* @__PURE__ */ z(ii, {
								"aria-label": s("searchSubmitAria"),
								type: "submit",
								children: /* @__PURE__ */ z(Qr, {})
							}), !!i && /* @__PURE__ */ z(Ca, {
								sx: {
									left: "50%",
									marginLeft: "-25px",
									marginTop: "-25px",
									position: "absolute",
									top: "50%"
								},
								size: 50
							})]
						})
					}
				}
			})
		})
	}), /* @__PURE__ */ z(vg, {
		windowId: o,
		companionWindowId: t
	})] });
}
xg.propTypes = {
	autocompleteService: W.default.shape({ id: W.default.string }),
	companionWindowId: W.default.string.isRequired,
	fetchSearch: W.default.func.isRequired,
	query: W.default.string,
	searchIsFetching: W.default.bool,
	searchService: W.default.shape({ id: W.default.string }).isRequired,
	windowId: W.default.string.isRequired
};
var Sg = i(O((e, { companionWindowId: t, windowId: n }) => ({
	autocompleteService: He(e, { windowId: n }),
	query: vr(e, {
		companionWindowId: t,
		windowId: n
	}),
	searchIsFetching: Yn(e, {
		companionWindowId: t,
		windowId: n
	}),
	searchService: De(e, { windowId: n })
}), { fetchSearch: sc }), A("SearchPanelControls"))(xg), Cg = N(/*#__PURE__*/ z("path", { d: "M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z" }), "ArrowBackSharp"), wg = 7e3, Tg = null;
function Eg(e, t = "assertive", n = wg) {
	Tg ? Tg.announce(e, t, n) : (Tg = new Dg(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? Tg.announce(e, t, n) : setTimeout(() => {
		Tg?.isAttached() && Tg?.announce(e, t, n);
	}, 100));
}
var Dg = class {
	constructor() {
		this.node = null, this.assertiveLog = null, this.politeLog = null, typeof document < "u" && (this.node = document.createElement("div"), this.node.dataset.liveAnnouncer = "true", Object.assign(this.node.style, {
			border: 0,
			clip: "rect(0 0 0 0)",
			clipPath: "inset(50%)",
			height: "1px",
			margin: "-1px",
			overflow: "hidden",
			padding: 0,
			position: "absolute",
			width: "1px",
			whiteSpace: "nowrap"
		}), this.assertiveLog = this.createLog("assertive"), this.node.appendChild(this.assertiveLog), this.politeLog = this.createLog("polite"), this.node.appendChild(this.politeLog), document.body.prepend(this.node));
	}
	isAttached() {
		return this.node?.isConnected;
	}
	createLog(e) {
		let t = document.createElement("div");
		return t.setAttribute("role", "log"), t.setAttribute("aria-live", e), t.setAttribute("aria-relevant", "additions"), t;
	}
	destroy() {
		this.node &&= (document.body.removeChild(this.node), null);
	}
	announce(e, t = "assertive", n = wg) {
		if (!this.node) return;
		let r = document.createElement("div");
		typeof e == "object" ? (r.setAttribute("role", "img"), r.setAttribute("aria-labelledby", e["aria-labelledby"])) : r.textContent = e, t === "assertive" ? this.assertiveLog?.appendChild(r) : this.politeLog?.appendChild(r), e !== "" && setTimeout(() => {
			r.remove();
		}, n);
	}
	clear(e) {
		this.node && ((!e || e === "assertive") && this.assertiveLog && (this.assertiveLog.innerHTML = ""), (!e || e === "polite") && this.politeLog && (this.politeLog.innerHTML = ""));
	}
}, Og = F.createContext(!0);
function kg() {
	throw Error("A function wrapped in useEffectEvent can't be called during rendering.");
}
var Ag = "use" in F ? () => {
	try {
		return F.use(Og);
	} catch {
		return !1;
	}
} : () => !1;
function jg(e) {
	let t = F.useRef(kg);
	return F.useInsertionEffect(() => {
		t.current = e;
	}, [e]), (...e) => {
		Ag() && kg();
		let n = t.current;
		return n(...e);
	};
}
//#endregion
//#region src/lib/TruncatedHit.js
var Mg = class {
	constructor(e, t = void 0, { maxChars: n = 200, minimum: r = 20 } = {}) {
		this.hit = e, this.annotation = t, this.maxChars = n || 200, this.minimum = r || 20;
	}
	get match() {
		return this.hit.match || this.annotation && this.annotation.resource.resource.chars || "-";
	}
	get charsOnSide() {
		let e = (this.maxChars - this.match.length) / 2, t = [(this.hit.before || "").length, (this.hit.after || "").length].filter((e) => e > 0);
		return Math.max(Math.min(e, ...t), this.minimum);
	}
	get before() {
		return this.hit.before ? this.hit.before.substring(this.hit.before.length - this.charsOnSide, this.hit.before.length) : "";
	}
	get after() {
		return this.hit.after ? this.hit.after.substring(0, Math.min(this.hit.after.length, this.charsOnSide)) : "";
	}
}, Ng = H(Ma, {
	name: "SearchHit",
	slot: "root"
})(({ ownerState: e, theme: t }) => ({
	"&.Mui-focused": {
		"&:hover": { ...e.windowSelected && { backgroundColor: "inherit" } },
		...e.windowSelected && { backgroundColor: "inherit" }
	},
	paddingRight: t.spacing(1)
})), Pg = H("h4", {
	name: "SearchHit",
	slot: "canvasLabel"
})(({ theme: e }) => ({
	display: "inline",
	marginBottom: e.spacing(1.5)
})), Fg = H(aa, {
	name: "SearchHit",
	slot: "counter"
})(({ ownerState: e, theme: t }) => ({
	backgroundColor: t.palette.hitCounter.default,
	...e.windowSelected && { backgroundColor: t.palette.highlights.primary },
	...e.adjacent && !e.windowSelected && { backgroundColor: t.palette.highlights.secondary },
	height: 30,
	marginRight: t.spacing(1),
	typography: "subtitle2",
	verticalAlign: "inherit"
}));
function Ig({ adjacent: e = !1, annotation: t = void 0, annotationId: n = void 0, annotationLabel: r = void 0, announcer: i = void 0, canvasLabel: a = void 0, companionWindowId: o = void 0, containerRef: s = void 0, focused: c = !1, hit: l = void 0, index: u = void 0, selectAnnotation: d = () => {}, selected: f = !1, showDetails: p = () => {}, total: m = void 0, windowId: h, windowSelected: g = !1 }) {
	let { t: _ } = V();
	L(() => {
		f && b();
	}, [f]);
	let v = () => {
		t && n && d(n);
	}, y = Li(() => l && new Mg(l, t), [l, t]), b = jg(() => {
		!i || !y || i([
			_("pagination", {
				current: u + 1,
				total: m
			}),
			a,
			r,
			y.before,
			y.match,
			y.after
		].join(" "), "polite");
	}), x = Pi();
	if (c && !f) return null;
	let S = c ? l : l && y, C = l && (S.before !== l.before || S.after !== l.after), w = {
		adjacent: e,
		focused: c,
		selected: f,
		windowSelected: g
	}, T = /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(Fg, {
		component: "span",
		ownerState: w,
		label: u + 1
	}), /* @__PURE__ */ B(Pg, {
		id: x,
		children: [a, r && /* @__PURE__ */ z(U, {
			component: "span",
			sx: {
				display: "block",
				marginTop: 1
			},
			children: r
		})]
	})] });
	return /* @__PURE__ */ z(Du, {
		containerRef: s,
		offsetTop: 96,
		scrollTo: g && !c,
		children: /* @__PURE__ */ z(Ng, {
			ownerState: w,
			className: (0, G.default)(M("search-hit"), g ? "windowSelected" : ""),
			divider: !0,
			component: f ? "li" : Na,
			onClick: v,
			selected: f,
			children: /* @__PURE__ */ z(ca, {
				primary: T,
				secondary: /* @__PURE__ */ B(Bi, { children: [l && /* @__PURE__ */ B(Bi, { children: [
					/* @__PURE__ */ z(wu, {
						ruleSet: "iiif",
						htmlString: S.before
					}),
					" ",
					/* @__PURE__ */ z("strong", { children: /* @__PURE__ */ z(wu, {
						ruleSet: "iiif",
						htmlString: S.match
					}) }),
					" ",
					/* @__PURE__ */ z(wu, {
						ruleSet: "iiif",
						htmlString: S.after
					}),
					" ",
					C && !c && /* @__PURE__ */ z(va, {
						sx: {
							"& span": { lineHeight: "1.5em" },
							margin: 0,
							padding: 0,
							textTransform: "none"
						},
						onClick: p,
						color: "secondary",
						size: "small",
						"aria-describedby": x,
						children: _("more")
					})
				] }), !l && t && /* @__PURE__ */ z(wu, {
					ruleSet: "iiif",
					htmlString: t.chars
				})] }),
				slotProps: {
					primary: {
						component: "div",
						sx: { marginBottom: 1 },
						variant: "subtitle2"
					},
					secondary: { variant: "body1" }
				}
			})
		})
	});
}
Ig.propTypes = {
	adjacent: W.default.bool,
	annotation: W.default.shape({
		chars: W.default.string,
		targetId: W.default.string
	}),
	annotationId: W.default.string,
	annotationLabel: W.default.string,
	announcer: W.default.func,
	canvasLabel: W.default.string,
	companionWindowId: W.default.string,
	containerRef: W.default.oneOfType([W.default.func, W.default.shape({ current: W.default.instanceOf(Element) })]),
	focused: W.default.bool,
	hit: W.default.shape({
		after: W.default.string,
		before: W.default.string,
		match: W.default.string
	}),
	index: W.default.number,
	selectAnnotation: W.default.func,
	selected: W.default.bool,
	showDetails: W.default.func,
	total: W.default.number,
	windowId: W.default.string.isRequired,
	windowSelected: W.default.bool
};
var Lg = i(O((e, { annotationId: t, hit: n = { annotations: [] }, companionWindowId: r, windowId: i }) => {
	let a = t || n.annotations[0], o = er(e, {
		annotationUri: a,
		companionWindowId: r,
		windowId: i
	}), s = ur(e, {
		annotationUri: a,
		companionWindowId: r,
		windowId: i
	}), c = dn(e, { windowId: i }), l = Zn(e, {
		companionWindowId: r,
		windowId: i
	}), u = ar(e, { windowId: i }), d = [t, ...n.annotations];
	return {
		adjacent: c.includes(o?.targetId),
		annotation: o,
		annotationId: a,
		annotationLabel: s[0],
		canvasLabel: o && Dt(e, {
			canvasId: o.targetId,
			windowId: i
		}),
		selected: l[0] && d.includes(l[0]),
		windowSelected: u && d.includes(u)
	};
}, (e, { windowId: t }) => ({ selectAnnotation: (...n) => e(Qn(t, ...n)) })), A("SearchHit"))(Ig);
//#endregion
//#region src/components/SearchResults.jsx
function Rg({ companionWindowId: e, containerRef: t, searchAnnotations: n, searchHits: r, windowId: i, focused: a, toggleFocus: o }) {
	return r.length === 0 && n.length > 0 ? n.map((r, s) => /* @__PURE__ */ z(Lg, {
		announcer: Eg,
		annotationId: r.id,
		companionWindowId: e,
		containerRef: t,
		focused: a,
		index: s,
		total: n.length,
		windowId: i,
		showDetails: o
	}, r.id)) : r.map((n, s) => /* @__PURE__ */ z(Lg, {
		announcer: Eg,
		containerRef: t,
		companionWindowId: e,
		focused: a,
		hit: n,
		index: s,
		total: r.length,
		windowId: i,
		showDetails: o
	}, n.annotations[0]));
}
function zg({ companionWindowId: e, containerRef: t = void 0, isFetching: n = !1, fetchSearch: r, nextSearch: i = void 0, query: a = void 0, searchAnnotations: o = [], searchHits: s = [], searchNumTotal: c = void 0, windowId: l }) {
	let { t: u } = V(), [d, f] = zi(!1), p = I(() => {
		f(!d);
	}, [f, d]), m = a && !n && s.length === 0 && o.length === 0;
	return /* @__PURE__ */ B(Bi, { children: [
		d && /* @__PURE__ */ z(Du, {
			containerRef: t,
			offsetTop: 96,
			scrollTo: !0,
			children: /* @__PURE__ */ B(va, {
				onClick: p,
				sx: { textTransform: "none" },
				size: "small",
				children: [/* @__PURE__ */ z(Cg, {}), u("backToResults")]
			})
		}),
		m && /* @__PURE__ */ z(U, {
			sx: {
				padding: 2,
				typography: "h6"
			},
			children: u("searchNoResults")
		}),
		/* @__PURE__ */ z(ja, {
			disablePadding: !0,
			children: /* @__PURE__ */ z(Rg, {
				companionWindowId: e,
				containerRef: t,
				searchAnnotations: o,
				searchHits: s,
				windowId: l,
				focused: d,
				toggleFocus: p
			})
		}),
		i && /* @__PURE__ */ B(va, {
			sx: { width: "100%" },
			color: "secondary",
			onClick: () => r(l, e, i, a),
			children: [
				u("moreResults"),
				/* @__PURE__ */ z("br", {}),
				`(${u("searchResultsRemaining", { numLeft: c - s.length })})`
			]
		})
	] });
}
zg.propTypes = {
	companionWindowId: W.default.string.isRequired,
	containerRef: W.default.oneOfType([W.default.func, W.default.shape({ current: W.default.instanceOf(Element) })]),
	fetchSearch: W.default.func.isRequired,
	isFetching: W.default.bool,
	nextSearch: W.default.string,
	query: W.default.string,
	searchAnnotations: W.default.arrayOf(W.default.object),
	searchHits: W.default.arrayOf(W.default.object),
	searchNumTotal: W.default.number,
	windowId: W.default.string.isRequired
};
var Bg = i(O((e, { companionWindowId: t, windowId: n }) => ({
	isFetching: Yn(e, {
		companionWindowId: t,
		windowId: n
	}),
	nextSearch: $n(e, {
		companionWindowId: t,
		windowId: n
	}),
	query: vr(e, {
		companionWindowId: t,
		windowId: n
	}),
	searchAnnotations: _r(e, {
		companionWindowId: t,
		windowId: n
	}),
	searchHits: qn(e, {
		companionWindowId: t,
		windowId: n
	}),
	searchNumTotal: hr(e, {
		companionWindowId: t,
		windowId: n
	})
}), { fetchSearch: sc }), A("SearchResults"))(zg);
//#endregion
//#region src/components/SearchPanel.jsx
function Vg({ fetchSearch: e = void 0, id: t, query: n = "", removeSearch: r, searchService: i, suggestedSearches: a = [], windowId: o }) {
	let { t: s } = V(), c = R(null);
	return /* @__PURE__ */ B(pf, {
		ariaLabel: s("searchTitle"),
		title: /* @__PURE__ */ B(Bi, { children: [s("searchTitle"), n && n !== "" && /* @__PURE__ */ z(aa, {
			"aria-label": s("clearSearchAria"),
			role: "button",
			sx: { marginLeft: 1 },
			color: "secondary",
			label: s("clearSearch"),
			onClick: r,
			onDelete: r,
			size: "small",
			tabIndex: 0,
			variant: "outlined"
		})] }),
		windowId: o,
		id: t,
		titleControls: /* @__PURE__ */ z(Sg, {
			companionWindowId: t,
			windowId: o
		}),
		ref: c,
		children: [/* @__PURE__ */ z(Bg, {
			containerRef: c,
			companionWindowId: t,
			windowId: o
		}), e && a && n === "" && a.map((t) => /* @__PURE__ */ z(U, {
			component: "p",
			variant: "body1",
			sx: { margin: 2 },
			children: /* @__PURE__ */ z(va, {
				variant: "inlineText",
				color: "secondary",
				onClick: () => e(`${i.id}?${new URLSearchParams({ q: t })}`, t),
				children: s("suggestSearch", { query: t })
			})
		}, t))]
	});
}
Vg.propTypes = {
	fetchSearch: W.default.func,
	id: W.default.string.isRequired,
	query: W.default.string,
	removeSearch: W.default.func.isRequired,
	searchService: W.default.shape({ id: W.default.string }).isRequired,
	suggestedSearches: W.default.arrayOf(W.default.string),
	windowId: W.default.string.isRequired
};
var Hg = i(O((e, { id: t, windowId: n }) => ({
	query: vr(e, {
		companionWindowId: t,
		windowId: n
	}),
	searchService: De(e, { windowId: n }),
	suggestedSearches: b(e, { windowId: n }).suggestedSearches
}), (e, t) => ({
	fetchSearch: (n, r) => e(sc(t.windowId, t.id, n, r)),
	removeSearch: () => e(oc(t.windowId, t.id))
})), A("SearchPanel"))(Vg), Ug = N(/*#__PURE__*/ z("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandleSharp"), Wg = N(/*#__PURE__*/ z("path", { d: "M8 11h3v10h2V11h3l-4-4zM4 3v2h16V3z" }), "VerticalAlignTopSharp"), Gg = N(/*#__PURE__*/ z("path", { d: "M16 13h-3V3h-2v10H8l4 4zM4 19v2h16v-2z" }), "VerticalAlignBottomSharp"), Kg = N(/*#__PURE__*/ z("path", { d: "M17.66 8 12 2.35 6.34 8C4.78 9.56 4 11.64 4 13.64s.78 4.11 2.34 5.67 3.61 2.35 5.66 2.35 4.1-.79 5.66-2.35S20 15.64 20 13.64 19.22 9.56 17.66 8M6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14z" }), "OpacitySharp"), qg = "Invariant failed";
function Jg(e, t) {
	if (!e) throw Error(qg);
}
//#endregion
//#region node_modules/css-box-model/dist/css-box-model.esm.js
var Yg = function(e) {
	var t = e.top, n = e.right, r = e.bottom, i = e.left;
	return {
		top: t,
		right: n,
		bottom: r,
		left: i,
		width: n - i,
		height: r - t,
		x: i,
		y: t,
		center: {
			x: (n + i) / 2,
			y: (r + t) / 2
		}
	};
}, Xg = function(e, t) {
	return {
		top: e.top - t.top,
		left: e.left - t.left,
		bottom: e.bottom + t.bottom,
		right: e.right + t.right
	};
}, Zg = function(e, t) {
	return {
		top: e.top + t.top,
		left: e.left + t.left,
		bottom: e.bottom - t.bottom,
		right: e.right - t.right
	};
}, Qg = function(e, t) {
	return {
		top: e.top + t.y,
		left: e.left + t.x,
		bottom: e.bottom + t.y,
		right: e.right + t.x
	};
}, $g = {
	top: 0,
	right: 0,
	bottom: 0,
	left: 0
}, e_ = function(e) {
	var t = e.borderBox, n = e.margin, r = n === void 0 ? $g : n, i = e.border, a = i === void 0 ? $g : i, o = e.padding, s = o === void 0 ? $g : o, c = Yg(Xg(t, r)), l = Yg(Zg(t, a)), u = Yg(Zg(l, s));
	return {
		marginBox: c,
		borderBox: Yg(t),
		paddingBox: l,
		contentBox: u,
		margin: r,
		border: a,
		padding: s
	};
}, t_ = function(e) {
	var t = e.slice(0, -2);
	if (e.slice(-2) !== "px") return 0;
	var n = Number(t);
	return isNaN(n) && Jg(!1), n;
}, n_ = function() {
	return {
		x: window.pageXOffset,
		y: window.pageYOffset
	};
}, r_ = function(e, t) {
	var n = e.borderBox, r = e.border, i = e.margin, a = e.padding;
	return e_({
		borderBox: Qg(n, t),
		border: r,
		margin: i,
		padding: a
	});
}, i_ = function(e, t) {
	return t === void 0 && (t = n_()), r_(e, t);
}, a_ = function(e, t) {
	return e_({
		borderBox: e,
		margin: {
			top: t_(t.marginTop),
			right: t_(t.marginRight),
			bottom: t_(t.marginBottom),
			left: t_(t.marginLeft)
		},
		padding: {
			top: t_(t.paddingTop),
			right: t_(t.paddingRight),
			bottom: t_(t.paddingBottom),
			left: t_(t.paddingLeft)
		},
		border: {
			top: t_(t.borderTopWidth),
			right: t_(t.borderRightWidth),
			bottom: t_(t.borderBottomWidth),
			left: t_(t.borderLeftWidth)
		}
	});
}, o_ = function(e) {
	return a_(e.getBoundingClientRect(), window.getComputedStyle(e));
}, s_ = function(e) {
	var t = [], n = null, r = function() {
		t = [...arguments], !n && (n = requestAnimationFrame(function() {
			n = null, e.apply(void 0, t);
		}));
	};
	return r.cancel = function() {
		n &&= (cancelAnimationFrame(n), null);
	}, r;
};
//#endregion
//#region node_modules/@hello-pangea/dnd/dist/dnd.esm.js
function c_(e, t) {}
c_.bind(null, "warn"), c_.bind(null, "error");
function l_() {}
function u_(e, t) {
	return {
		...e,
		...t
	};
}
function d_(e, t, n) {
	let r = t.map((t) => {
		let r = u_(n, t.options);
		return e.addEventListener(t.eventName, t.fn, r), function() {
			e.removeEventListener(t.eventName, t.fn, r);
		};
	});
	return function() {
		r.forEach((e) => {
			e();
		});
	};
}
var f_ = "Invariant failed", p_ = class extends Error {};
p_.prototype.toString = function() {
	return this.message;
};
function Y(e, t) {
	throw new p_(f_);
}
var m_ = class extends F.Component {
	constructor(...e) {
		super(...e), this.callbacks = null, this.unbind = l_, this.onWindowError = (e) => {
			let t = this.getCallbacks();
			t.isDragging() && t.tryAbort(), e.error instanceof p_ && e.preventDefault();
		}, this.getCallbacks = () => {
			if (!this.callbacks) throw Error("Unable to find AppCallbacks in <ErrorBoundary/>");
			return this.callbacks;
		}, this.setCallbacks = (e) => {
			this.callbacks = e;
		};
	}
	componentDidMount() {
		this.unbind = d_(window, [{
			eventName: "error",
			fn: this.onWindowError
		}]);
	}
	componentDidCatch(e) {
		if (e instanceof p_) {
			this.setState({});
			return;
		}
		throw e;
	}
	componentWillUnmount() {
		this.unbind();
	}
	render() {
		return this.props.children(this.setCallbacks);
	}
}, h_ = "\n  Press space bar to start a drag.\n  When dragging you can use the arrow keys to move the item around and escape to cancel.\n  Some screen readers may require you to be in focus mode or to use your pass through key\n", g_ = (e) => e + 1, __ = (e) => `
  You have lifted an item in position ${g_(e.source.index)}
`, v_ = (e, t) => {
	let n = e.droppableId === t.droppableId, r = g_(e.index), i = g_(t.index);
	return n ? `
      You have moved the item from position ${r}
      to position ${i}
    ` : `
    You have moved the item from position ${r}
    in list ${e.droppableId}
    to list ${t.droppableId}
    in position ${i}
  `;
}, y_ = (e, t, n) => t.droppableId === n.droppableId ? `
      The item ${e}
      has been combined with ${n.draggableId}` : `
      The item ${e}
      in list ${t.droppableId}
      has been combined with ${n.draggableId}
      in list ${n.droppableId}
    `, b_ = (e) => {
	let t = e.destination;
	if (t) return v_(e.source, t);
	let n = e.combine;
	return n ? y_(e.draggableId, e.source, n) : "You are over an area that cannot be dropped on";
}, x_ = (e) => `
  The item has returned to its starting position
  of ${g_(e.index)}
`, S_ = {
	dragHandleUsageInstructions: h_,
	onDragStart: __,
	onDragUpdate: b_,
	onDragEnd: (e) => {
		if (e.reason === "CANCEL") return `
      Movement cancelled.
      ${x_(e.source)}
    `;
		let t = e.destination, n = e.combine;
		return t ? `
      You have dropped the item.
      ${v_(e.source, t)}
    ` : n ? `
      You have dropped the item.
      ${y_(e.draggableId, e.source, n)}
    ` : `
    The item has been dropped while not over a drop area.
    ${x_(e.source)}
  `;
	}
};
function C_(e, t) {
	return !!(e === t || Number.isNaN(e) && Number.isNaN(t));
}
function w_(e, t) {
	if (e.length !== t.length) return !1;
	for (let n = 0; n < e.length; n++) if (!C_(e[n], t[n])) return !1;
	return !0;
}
function T_(e, t) {
	let n = zi(() => ({
		inputs: t,
		result: e()
	}))[0], r = R(!0), i = R(n), a = r.current || t && i.current.inputs && w_(t, i.current.inputs) ? i.current : {
		inputs: t,
		result: e()
	};
	return L(() => {
		r.current = !1, i.current = a;
	}, [a]), a.result;
}
function X(e, t) {
	return T_(() => e, t);
}
var E_ = {
	x: 0,
	y: 0
}, D_ = (e, t) => ({
	x: e.x + t.x,
	y: e.y + t.y
}), O_ = (e, t) => ({
	x: e.x - t.x,
	y: e.y - t.y
}), k_ = (e, t) => e.x === t.x && e.y === t.y, A_ = (e) => ({
	x: e.x === 0 ? 0 : -e.x,
	y: e.y === 0 ? 0 : -e.y
}), j_ = (e, t, n = 0) => e === "x" ? {
	x: t,
	y: n
} : {
	x: n,
	y: t
}, M_ = (e, t) => Math.sqrt((t.x - e.x) ** 2 + (t.y - e.y) ** 2), N_ = (e, t) => Math.min(...t.map((t) => M_(e, t))), P_ = (e) => (t) => ({
	x: e(t.x),
	y: e(t.y)
}), F_ = (e, t) => {
	let n = Yg({
		top: Math.max(t.top, e.top),
		right: Math.min(t.right, e.right),
		bottom: Math.min(t.bottom, e.bottom),
		left: Math.max(t.left, e.left)
	});
	return n.width <= 0 || n.height <= 0 ? null : n;
}, I_ = (e, t) => ({
	top: e.top + t.y,
	left: e.left + t.x,
	bottom: e.bottom + t.y,
	right: e.right + t.x
}), L_ = (e) => [
	{
		x: e.left,
		y: e.top
	},
	{
		x: e.right,
		y: e.top
	},
	{
		x: e.left,
		y: e.bottom
	},
	{
		x: e.right,
		y: e.bottom
	}
], R_ = {
	top: 0,
	right: 0,
	bottom: 0,
	left: 0
}, z_ = (e, t) => t ? I_(e, t.scroll.diff.displacement) : e, B_ = (e, t, n) => n && n.increasedBy ? {
	...e,
	[t.end]: e[t.end] + n.increasedBy[t.line]
} : e, V_ = (e, t) => t && t.shouldClipSubject ? F_(t.pageMarginBox, e) : Yg(e), H_ = ({ page: e, withPlaceholder: t, axis: n, frame: r }) => ({
	page: e,
	withPlaceholder: t,
	active: V_(B_(z_(e.marginBox, r), n, t), r)
}), U_ = (e, t) => {
	!e.frame && Y();
	let n = e.frame, r = O_(t, n.scroll.initial), i = A_(r), a = {
		...n,
		scroll: {
			initial: n.scroll.initial,
			current: t,
			diff: {
				value: r,
				displacement: i
			},
			max: n.scroll.max
		}
	}, o = H_({
		page: e.subject.page,
		withPlaceholder: e.subject.withPlaceholder,
		axis: e.axis,
		frame: a
	});
	return {
		...e,
		frame: a,
		subject: o
	};
};
function W_(e, t = w_) {
	let n = null;
	function r(...r) {
		if (n && n.lastThis === this && t(r, n.lastArgs)) return n.lastResult;
		let i = e.apply(this, r);
		return n = {
			lastResult: i,
			lastArgs: r,
			lastThis: this
		}, i;
	}
	return r.clear = function() {
		n = null;
	}, r;
}
var G_ = W_((e) => e.reduce((e, t) => (e[t.descriptor.id] = t, e), {})), K_ = W_((e) => e.reduce((e, t) => (e[t.descriptor.id] = t, e), {})), q_ = W_((e) => Object.values(e)), J_ = W_((e) => Object.values(e)), Y_ = W_((e, t) => J_(t).filter((t) => e === t.descriptor.droppableId).sort((e, t) => e.descriptor.index - t.descriptor.index));
function X_(e) {
	return e.at && e.at.type === "REORDER" ? e.at.destination : null;
}
function Z_(e) {
	return e.at && e.at.type === "COMBINE" ? e.at.combine : null;
}
var Q_ = W_((e, t) => t.filter((t) => t.descriptor.id !== e.descriptor.id)), $_ = ({ isMovingForward: e, draggable: t, destination: n, insideDestination: r, previousImpact: i }) => {
	if (!n.isCombineEnabled || !X_(i)) return null;
	function a(e) {
		let t = {
			type: "COMBINE",
			combine: {
				draggableId: e,
				droppableId: n.descriptor.id
			}
		};
		return {
			...i,
			at: t
		};
	}
	let o = i.displaced.all, s = o.length ? o[0] : null;
	if (e) return s ? a(s) : null;
	let c = Q_(t, r);
	if (!s) {
		if (!c.length) return null;
		let e = c[c.length - 1];
		return a(e.descriptor.id);
	}
	let l = c.findIndex((e) => e.descriptor.id === s);
	l === -1 && Y();
	let u = l - 1;
	if (u < 0) return null;
	let d = c[u];
	return a(d.descriptor.id);
}, ev = (e, t) => e.descriptor.droppableId === t.descriptor.id, tv = {
	point: E_,
	value: 0
}, nv = {
	invisible: {},
	visible: {},
	all: []
}, rv = {
	displaced: nv,
	displacedBy: tv,
	at: null
}, iv = (e, t) => (n) => e <= n && n <= t, av = (e) => {
	let t = iv(e.top, e.bottom), n = iv(e.left, e.right);
	return (r) => {
		if (t(r.top) && t(r.bottom) && n(r.left) && n(r.right)) return !0;
		let i = t(r.top) || t(r.bottom), a = n(r.left) || n(r.right);
		if (i && a) return !0;
		let o = r.top < e.top && r.bottom > e.bottom, s = r.left < e.left && r.right > e.right;
		return o && s ? !0 : o && a || s && i;
	};
}, ov = (e) => {
	let t = iv(e.top, e.bottom), n = iv(e.left, e.right);
	return (e) => t(e.top) && t(e.bottom) && n(e.left) && n(e.right);
}, sv = {
	direction: "vertical",
	line: "y",
	crossAxisLine: "x",
	start: "top",
	end: "bottom",
	size: "height",
	crossAxisStart: "left",
	crossAxisEnd: "right",
	crossAxisSize: "width"
}, cv = {
	direction: "horizontal",
	line: "x",
	crossAxisLine: "y",
	start: "left",
	end: "right",
	size: "width",
	crossAxisStart: "top",
	crossAxisEnd: "bottom",
	crossAxisSize: "height"
}, lv = (e) => (t) => {
	let n = iv(t.top, t.bottom), r = iv(t.left, t.right);
	return (t) => e === sv ? n(t.top) && n(t.bottom) : r(t.left) && r(t.right);
}, uv = (e, t) => I_(e, t.frame ? t.frame.scroll.diff.displacement : E_), dv = (e, t, n) => t.subject.active ? n(t.subject.active)(e) : !1, fv = (e, t, n) => n(t)(e), pv = ({ target: e, destination: t, viewport: n, withDroppableDisplacement: r, isVisibleThroughFrameFn: i }) => {
	let a = r ? uv(e, t) : e;
	return dv(a, t, i) && fv(a, n, i);
}, mv = (e) => pv({
	...e,
	isVisibleThroughFrameFn: av
}), hv = (e) => pv({
	...e,
	isVisibleThroughFrameFn: ov
}), gv = (e) => pv({
	...e,
	isVisibleThroughFrameFn: lv(e.destination.axis)
}), _v = (e, t, n) => {
	if (typeof n == "boolean") return n;
	if (!t) return !0;
	let { invisible: r, visible: i } = t;
	if (r[e]) return !1;
	let a = i[e];
	return !a || a.shouldAnimate;
};
function vv(e, t) {
	let n = e.page.marginBox;
	return Yg(Xg(n, {
		top: t.point.y,
		right: 0,
		bottom: 0,
		left: t.point.x
	}));
}
function yv({ afterDragging: e, destination: t, displacedBy: n, viewport: r, forceShouldAnimate: i, last: a }) {
	return e.reduce(function(e, o) {
		let s = vv(o, n), c = o.descriptor.id;
		if (e.all.push(c), !mv({
			target: s,
			destination: t,
			viewport: r,
			withDroppableDisplacement: !0
		})) return e.invisible[o.descriptor.id] = !0, e;
		let l = {
			draggableId: c,
			shouldAnimate: _v(c, a, i)
		};
		return e.visible[c] = l, e;
	}, {
		all: [],
		visible: {},
		invisible: {}
	});
}
function bv(e, t) {
	if (!e.length) return 0;
	let n = e[e.length - 1].descriptor.index;
	return t.inHomeList ? n : n + 1;
}
function xv({ insideDestination: e, inHomeList: t, displacedBy: n, destination: r }) {
	let i = bv(e, { inHomeList: t });
	return {
		displaced: nv,
		displacedBy: n,
		at: {
			type: "REORDER",
			destination: {
				droppableId: r.descriptor.id,
				index: i
			}
		}
	};
}
function Sv({ draggable: e, insideDestination: t, destination: n, viewport: r, displacedBy: i, last: a, index: o, forceShouldAnimate: s }) {
	let c = ev(e, n);
	if (o == null) return xv({
		insideDestination: t,
		inHomeList: c,
		displacedBy: i,
		destination: n
	});
	let l = t.find((e) => e.descriptor.index === o);
	if (!l) return xv({
		insideDestination: t,
		inHomeList: c,
		displacedBy: i,
		destination: n
	});
	let u = Q_(e, t), d = t.indexOf(l);
	return {
		displaced: yv({
			afterDragging: u.slice(d),
			destination: n,
			displacedBy: i,
			last: a,
			viewport: r.frame,
			forceShouldAnimate: s
		}),
		displacedBy: i,
		at: {
			type: "REORDER",
			destination: {
				droppableId: n.descriptor.id,
				index: o
			}
		}
	};
}
function Cv(e, t) {
	return !!t.effected[e];
}
var wv = ({ isMovingForward: e, destination: t, draggables: n, combine: r, afterCritical: i }) => {
	if (!t.isCombineEnabled) return null;
	let a = r.draggableId, o = n[a].descriptor.index;
	return Cv(a, i) ? e ? o : o - 1 : e ? o + 1 : o;
}, Tv = ({ isMovingForward: e, isInHomeList: t, insideDestination: n, location: r }) => {
	if (!n.length) return null;
	let i = r.index, a = e ? i + 1 : i - 1, o = n[0].descriptor.index, s = n[n.length - 1].descriptor.index, c = t ? s : s + 1;
	return a < o || a > c ? null : a;
}, Ev = ({ isMovingForward: e, isInHomeList: t, draggable: n, draggables: r, destination: i, insideDestination: a, previousImpact: o, viewport: s, afterCritical: c }) => {
	let l = o.at;
	if (!l && Y(), l.type === "REORDER") {
		let r = Tv({
			isMovingForward: e,
			isInHomeList: t,
			location: l.destination,
			insideDestination: a
		});
		return r == null ? null : Sv({
			draggable: n,
			insideDestination: a,
			destination: i,
			viewport: s,
			last: o.displaced,
			displacedBy: o.displacedBy,
			index: r
		});
	}
	let u = wv({
		isMovingForward: e,
		destination: i,
		displaced: o.displaced,
		draggables: r,
		combine: l.combine,
		afterCritical: c
	});
	return u == null ? null : Sv({
		draggable: n,
		insideDestination: a,
		destination: i,
		viewport: s,
		last: o.displaced,
		displacedBy: o.displacedBy,
		index: u
	});
}, Dv = ({ displaced: e, afterCritical: t, combineWith: n, displacedBy: r }) => {
	let i = !!(e.visible[n] || e.invisible[n]);
	return Cv(n, t) ? i ? E_ : A_(r.point) : i ? r.point : E_;
}, Ov = ({ afterCritical: e, impact: t, draggables: n }) => {
	let r = Z_(t);
	!r && Y();
	let i = r.draggableId, a = n[i].page.borderBox.center;
	return D_(a, Dv({
		displaced: t.displaced,
		afterCritical: e,
		combineWith: i,
		displacedBy: t.displacedBy
	}));
}, kv = (e, t) => t.margin[e.start] + t.borderBox[e.size] / 2, Av = (e, t) => t.margin[e.end] + t.borderBox[e.size] / 2, jv = (e, t, n) => t[e.crossAxisStart] + n.margin[e.crossAxisStart] + n.borderBox[e.crossAxisSize] / 2, Mv = ({ axis: e, moveRelativeTo: t, isMoving: n }) => j_(e.line, t.marginBox[e.end] + kv(e, n), jv(e, t.marginBox, n)), Nv = ({ axis: e, moveRelativeTo: t, isMoving: n }) => j_(e.line, t.marginBox[e.start] - Av(e, n), jv(e, t.marginBox, n)), Pv = ({ axis: e, moveInto: t, isMoving: n }) => j_(e.line, t.contentBox[e.start] + kv(e, n), jv(e, t.contentBox, n)), Fv = ({ impact: e, draggable: t, draggables: n, droppable: r, afterCritical: i }) => {
	let a = Y_(r.descriptor.id, n), o = t.page, s = r.axis;
	if (!a.length) return Pv({
		axis: s,
		moveInto: r.page,
		isMoving: o
	});
	let { displaced: c, displacedBy: l } = e, u = c.all[0];
	if (u) {
		let e = n[u];
		return Cv(u, i) ? Nv({
			axis: s,
			moveRelativeTo: e.page,
			isMoving: o
		}) : Nv({
			axis: s,
			moveRelativeTo: r_(e.page, l.point),
			isMoving: o
		});
	}
	let d = a[a.length - 1];
	return d.descriptor.id === t.descriptor.id ? o.borderBox.center : Cv(d.descriptor.id, i) ? Mv({
		axis: s,
		moveRelativeTo: r_(d.page, A_(i.displacedBy.point)),
		isMoving: o
	}) : Mv({
		axis: s,
		moveRelativeTo: d.page,
		isMoving: o
	});
}, Iv = (e, t) => {
	let n = e.frame;
	return n ? D_(t, n.scroll.diff.displacement) : t;
}, Lv = ({ impact: e, draggable: t, droppable: n, draggables: r, afterCritical: i }) => {
	let a = t.page.borderBox.center, o = e.at;
	return !n || !o ? a : o.type === "REORDER" ? Fv({
		impact: e,
		draggable: t,
		draggables: r,
		droppable: n,
		afterCritical: i
	}) : Ov({
		impact: e,
		draggables: r,
		afterCritical: i
	});
}, Rv = (e) => {
	let t = Lv(e), n = e.droppable;
	return n ? Iv(n, t) : t;
}, zv = (e, t) => {
	let n = O_(t, e.scroll.initial), r = A_(n);
	return {
		frame: Yg({
			top: t.y,
			bottom: t.y + e.frame.height,
			left: t.x,
			right: t.x + e.frame.width
		}),
		scroll: {
			initial: e.scroll.initial,
			max: e.scroll.max,
			current: t,
			diff: {
				value: n,
				displacement: r
			}
		}
	};
};
function Bv(e, t) {
	return e.map((e) => t[e]);
}
function Vv(e, t) {
	for (let n = 0; n < t.length; n++) {
		let r = t[n].visible[e];
		if (r) return r;
	}
	return null;
}
var Hv = ({ impact: e, viewport: t, destination: n, draggables: r, maxScrollChange: i }) => {
	let a = zv(t, D_(t.scroll.current, i)), o = n.frame ? U_(n, D_(n.frame.scroll.current, i)) : n, s = e.displaced, c = yv({
		afterDragging: Bv(s.all, r),
		destination: n,
		displacedBy: e.displacedBy,
		viewport: a.frame,
		last: s,
		forceShouldAnimate: !1
	}), l = yv({
		afterDragging: Bv(s.all, r),
		destination: o,
		displacedBy: e.displacedBy,
		viewport: t.frame,
		last: s,
		forceShouldAnimate: !1
	}), u = {}, d = {}, f = [
		s,
		c,
		l
	];
	return s.all.forEach((e) => {
		let t = Vv(e, f);
		if (t) {
			d[e] = t;
			return;
		}
		u[e] = !0;
	}), {
		...e,
		displaced: {
			all: s.all,
			invisible: u,
			visible: d
		}
	};
}, Uv = (e, t) => D_(e.scroll.diff.displacement, t), Wv = ({ pageBorderBoxCenter: e, draggable: t, viewport: n }) => {
	let r = O_(Uv(n, e), t.page.borderBox.center);
	return D_(t.client.borderBox.center, r);
}, Gv = ({ draggable: e, destination: t, newPageBorderBoxCenter: n, viewport: r, withDroppableDisplacement: i, onlyOnMainAxis: a = !1 }) => {
	let o = O_(n, e.page.borderBox.center), s = {
		target: I_(e.page.borderBox, o),
		destination: t,
		withDroppableDisplacement: i,
		viewport: r
	};
	return a ? gv(s) : hv(s);
}, Kv = ({ isMovingForward: e, draggable: t, destination: n, draggables: r, previousImpact: i, viewport: a, previousPageBorderBoxCenter: o, previousClientSelection: s, afterCritical: c }) => {
	if (!n.isEnabled) return null;
	let l = Y_(n.descriptor.id, r), u = ev(t, n), d = $_({
		isMovingForward: e,
		draggable: t,
		destination: n,
		insideDestination: l,
		previousImpact: i
	}) || Ev({
		isMovingForward: e,
		isInHomeList: u,
		draggable: t,
		draggables: r,
		destination: n,
		insideDestination: l,
		previousImpact: i,
		viewport: a,
		afterCritical: c
	});
	if (!d) return null;
	let f = Rv({
		impact: d,
		draggable: t,
		droppable: n,
		draggables: r,
		afterCritical: c
	});
	if (Gv({
		draggable: t,
		destination: n,
		newPageBorderBoxCenter: f,
		viewport: a.frame,
		withDroppableDisplacement: !1,
		onlyOnMainAxis: !0
	})) return {
		clientSelection: Wv({
			pageBorderBoxCenter: f,
			draggable: t,
			viewport: a
		}),
		impact: d,
		scrollJumpRequest: null
	};
	let p = O_(f, o);
	return {
		clientSelection: s,
		impact: Hv({
			impact: d,
			viewport: a,
			destination: n,
			draggables: r,
			maxScrollChange: p
		}),
		scrollJumpRequest: p
	};
}, qv = (e) => {
	let t = e.subject.active;
	return !t && Y(), t;
}, Jv = ({ isMovingForward: e, pageBorderBoxCenter: t, source: n, droppables: r, viewport: i }) => {
	let a = n.subject.active;
	if (!a) return null;
	let o = n.axis, s = iv(a[o.start], a[o.end]), c = q_(r).filter((e) => e !== n).filter((e) => e.isEnabled).filter((e) => !!e.subject.active).filter((e) => av(i.frame)(qv(e))).filter((t) => {
		let n = qv(t);
		return e ? a[o.crossAxisEnd] < n[o.crossAxisEnd] : n[o.crossAxisStart] < a[o.crossAxisStart];
	}).filter((e) => {
		let t = qv(e), n = iv(t[o.start], t[o.end]);
		return s(t[o.start]) || s(t[o.end]) || n(a[o.start]) || n(a[o.end]);
	}).sort((t, n) => {
		let r = qv(t)[o.crossAxisStart], i = qv(n)[o.crossAxisStart];
		return e ? r - i : i - r;
	}).filter((e, t, n) => qv(e)[o.crossAxisStart] === qv(n[0])[o.crossAxisStart]);
	if (!c.length) return null;
	if (c.length === 1) return c[0];
	let l = c.filter((e) => iv(qv(e)[o.start], qv(e)[o.end])(t[o.line]));
	return l.length === 1 ? l[0] : l.length > 1 ? l.sort((e, t) => qv(e)[o.start] - qv(t)[o.start])[0] : c.sort((e, n) => {
		let r = N_(t, L_(qv(e))), i = N_(t, L_(qv(n)));
		return r === i ? qv(e)[o.start] - qv(n)[o.start] : r - i;
	})[0];
}, Yv = (e, t) => {
	let n = e.page.borderBox.center;
	return Cv(e.descriptor.id, t) ? O_(n, t.displacedBy.point) : n;
}, Xv = (e, t) => {
	let n = e.page.borderBox;
	return Cv(e.descriptor.id, t) ? I_(n, A_(t.displacedBy.point)) : n;
}, Zv = ({ pageBorderBoxCenter: e, viewport: t, destination: n, insideDestination: r, afterCritical: i }) => r.filter((e) => hv({
	target: Xv(e, i),
	destination: n,
	viewport: t.frame,
	withDroppableDisplacement: !0
})).sort((t, r) => {
	let a = M_(e, Iv(n, Yv(t, i))), o = M_(e, Iv(n, Yv(r, i)));
	return a < o ? -1 : o < a ? 1 : t.descriptor.index - r.descriptor.index;
})[0] || null, Qv = W_(function(e, t) {
	let n = t[e.line];
	return {
		value: n,
		point: j_(e.line, n)
	};
}), $v = (e, t, n) => {
	let r = e.axis;
	if (e.descriptor.mode === "virtual") return j_(r.line, t[r.line]);
	let i = e.subject.page.contentBox[r.size], a = Y_(e.descriptor.id, n).reduce((e, t) => e + t.client.marginBox[r.size], 0) + t[r.line] - i;
	return a <= 0 ? null : j_(r.line, a);
}, ey = (e, t) => ({
	...e,
	scroll: {
		...e.scroll,
		max: t
	}
}), ty = (e, t, n) => {
	let r = e.frame;
	ev(t, e) && Y(), e.subject.withPlaceholder && Y();
	let i = Qv(e.axis, t.displaceBy).point, a = $v(e, i, n), o = {
		placeholderSize: i,
		increasedBy: a,
		oldFrameMaxScroll: e.frame ? e.frame.scroll.max : null
	};
	if (!r) {
		let t = H_({
			page: e.subject.page,
			withPlaceholder: o,
			axis: e.axis,
			frame: e.frame
		});
		return {
			...e,
			subject: t
		};
	}
	let s = ey(r, a ? D_(r.scroll.max, a) : r.scroll.max), c = H_({
		page: e.subject.page,
		withPlaceholder: o,
		axis: e.axis,
		frame: s
	});
	return {
		...e,
		subject: c,
		frame: s
	};
}, ny = (e) => {
	let t = e.subject.withPlaceholder;
	!t && Y();
	let n = e.frame;
	if (!n) {
		let t = H_({
			page: e.subject.page,
			axis: e.axis,
			frame: null,
			withPlaceholder: null
		});
		return {
			...e,
			subject: t
		};
	}
	let r = t.oldFrameMaxScroll;
	!r && Y();
	let i = ey(n, r), a = H_({
		page: e.subject.page,
		axis: e.axis,
		frame: i,
		withPlaceholder: null
	});
	return {
		...e,
		subject: a,
		frame: i
	};
}, ry = ({ previousPageBorderBoxCenter: e, moveRelativeTo: t, insideDestination: n, draggable: r, draggables: i, destination: a, viewport: o, afterCritical: s }) => {
	if (!t) {
		if (n.length) return null;
		let e = {
			displaced: nv,
			displacedBy: tv,
			at: {
				type: "REORDER",
				destination: {
					droppableId: a.descriptor.id,
					index: 0
				}
			}
		}, t = Rv({
			impact: e,
			draggable: r,
			droppable: a,
			draggables: i,
			afterCritical: s
		});
		return Gv({
			draggable: r,
			destination: ev(r, a) ? a : ty(a, r, i),
			newPageBorderBoxCenter: t,
			viewport: o.frame,
			withDroppableDisplacement: !1,
			onlyOnMainAxis: !0
		}) ? e : null;
	}
	let c = e[a.axis.line] <= t.page.borderBox.center[a.axis.line], l = (() => {
		let e = t.descriptor.index;
		return t.descriptor.id === r.descriptor.id || c ? e : e + 1;
	})();
	return Sv({
		draggable: r,
		insideDestination: n,
		destination: a,
		viewport: o,
		displacedBy: Qv(a.axis, r.displaceBy),
		last: nv,
		index: l
	});
}, iy = ({ isMovingForward: e, previousPageBorderBoxCenter: t, draggable: n, isOver: r, draggables: i, droppables: a, viewport: o, afterCritical: s }) => {
	let c = Jv({
		isMovingForward: e,
		pageBorderBoxCenter: t,
		source: r,
		droppables: a,
		viewport: o
	});
	if (!c) return null;
	let l = Y_(c.descriptor.id, i), u = ry({
		previousPageBorderBoxCenter: t,
		destination: c,
		draggable: n,
		draggables: i,
		moveRelativeTo: Zv({
			pageBorderBoxCenter: t,
			viewport: o,
			destination: c,
			insideDestination: l,
			afterCritical: s
		}),
		insideDestination: l,
		viewport: o,
		afterCritical: s
	});
	return u ? {
		clientSelection: Wv({
			pageBorderBoxCenter: Rv({
				impact: u,
				draggable: n,
				droppable: c,
				draggables: i,
				afterCritical: s
			}),
			draggable: n,
			viewport: o
		}),
		impact: u,
		scrollJumpRequest: null
	} : null;
}, ay = (e) => {
	let t = e.at;
	return t ? t.type === "REORDER" ? t.destination.droppableId : t.combine.droppableId : null;
}, oy = (e, t) => {
	let n = ay(e);
	return n ? t[n] : null;
}, sy = ({ state: e, type: t }) => {
	let n = oy(e.impact, e.dimensions.droppables), r = !!n, i = e.dimensions.droppables[e.critical.droppable.id], a = n || i, o = a.axis.direction, s = o === "vertical" && (t === "MOVE_UP" || t === "MOVE_DOWN") || o === "horizontal" && (t === "MOVE_LEFT" || t === "MOVE_RIGHT");
	if (s && !r) return null;
	let c = t === "MOVE_DOWN" || t === "MOVE_RIGHT", l = e.dimensions.draggables[e.critical.draggable.id], u = e.current.page.borderBoxCenter, { draggables: d, droppables: f } = e.dimensions;
	return s ? Kv({
		isMovingForward: c,
		previousPageBorderBoxCenter: u,
		draggable: l,
		destination: a,
		draggables: d,
		viewport: e.viewport,
		previousClientSelection: e.current.client.selection,
		previousImpact: e.impact,
		afterCritical: e.afterCritical
	}) : iy({
		isMovingForward: c,
		previousPageBorderBoxCenter: u,
		draggable: l,
		isOver: a,
		draggables: d,
		droppables: f,
		viewport: e.viewport,
		afterCritical: e.afterCritical
	});
};
function cy(e) {
	return e.phase === "DRAGGING" || e.phase === "COLLECTING";
}
function ly(e) {
	let t = iv(e.top, e.bottom), n = iv(e.left, e.right);
	return function(e) {
		return t(e.y) && n(e.x);
	};
}
function uy(e, t) {
	return e.left < t.right && e.right > t.left && e.top < t.bottom && e.bottom > t.top;
}
function dy({ pageBorderBox: e, draggable: t, candidates: n }) {
	let r = t.page.borderBox.center, i = n.map((t) => {
		let n = t.axis, i = j_(t.axis.line, e.center[n.line], t.page.borderBox.center[n.crossAxisLine]);
		return {
			id: t.descriptor.id,
			distance: M_(r, i)
		};
	}).sort((e, t) => t.distance - e.distance);
	return i[0] ? i[0].id : null;
}
function fy({ pageBorderBox: e, draggable: t, droppables: n }) {
	let r = q_(n).filter((t) => {
		if (!t.isEnabled) return !1;
		let n = t.subject.active;
		if (!n || !uy(e, n)) return !1;
		if (ly(n)(e.center)) return !0;
		let r = t.axis, i = n.center[r.crossAxisLine], a = e[r.crossAxisStart], o = e[r.crossAxisEnd], s = iv(n[r.crossAxisStart], n[r.crossAxisEnd]), c = s(a), l = s(o);
		return !c && !l ? !0 : c ? a < i : o > i;
	});
	return r.length ? r.length === 1 ? r[0].descriptor.id : dy({
		pageBorderBox: e,
		draggable: t,
		candidates: r
	}) : null;
}
var py = (e, t) => Yg(I_(e, t)), my = (e, t) => {
	let n = e.frame;
	return n ? py(t, n.scroll.diff.value) : t;
};
function hy({ displaced: e, id: t }) {
	return !!(e.visible[t] || e.invisible[t]);
}
function gy({ draggable: e, closest: t, inHomeList: n }) {
	return t ? n && t.descriptor.index > e.descriptor.index ? t.descriptor.index - 1 : t.descriptor.index : null;
}
var _y = ({ pageBorderBoxWithDroppableScroll: e, draggable: t, destination: n, insideDestination: r, last: i, viewport: a, afterCritical: o }) => {
	let s = n.axis, c = Qv(n.axis, t.displaceBy), l = c.value, u = e[s.start], d = e[s.end];
	return Sv({
		draggable: t,
		insideDestination: r,
		destination: n,
		viewport: a,
		last: i,
		displacedBy: c,
		index: gy({
			draggable: t,
			closest: Q_(t, r).find((e) => {
				let t = e.descriptor.id, n = e.page.borderBox.center[s.line], r = Cv(t, o), a = hy({
					displaced: i,
					id: t
				});
				return r ? a ? d <= n : u < n - l : a ? d <= n + l : u < n;
			}) || null,
			inHomeList: ev(t, n)
		})
	});
}, vy = 4, yy = ({ draggable: e, pageBorderBoxWithDroppableScroll: t, previousImpact: n, destination: r, insideDestination: i, afterCritical: a }) => {
	if (!r.isCombineEnabled) return null;
	let o = r.axis, s = Qv(r.axis, e.displaceBy), c = s.value, l = t[o.start], u = t[o.end], d = Q_(e, i).find((e) => {
		let t = e.descriptor.id, r = e.page.borderBox, i = r[o.size] / vy, s = Cv(t, a), d = hy({
			displaced: n.displaced,
			id: t
		});
		return s ? d ? u > r[o.start] + i && u < r[o.end] - i : l > r[o.start] - c + i && l < r[o.end] - c - i : d ? u > r[o.start] + c + i && u < r[o.end] + c - i : l > r[o.start] + i && l < r[o.end] - i;
	});
	return d ? {
		displacedBy: s,
		displaced: n.displaced,
		at: {
			type: "COMBINE",
			combine: {
				draggableId: d.descriptor.id,
				droppableId: r.descriptor.id
			}
		}
	} : null;
}, by = ({ pageOffset: e, draggable: t, draggables: n, droppables: r, previousImpact: i, viewport: a, afterCritical: o }) => {
	let s = py(t.page.borderBox, e), c = fy({
		pageBorderBox: s,
		draggable: t,
		droppables: r
	});
	if (!c) return rv;
	let l = r[c], u = Y_(l.descriptor.id, n), d = my(l, s);
	return yy({
		pageBorderBoxWithDroppableScroll: d,
		draggable: t,
		previousImpact: i,
		destination: l,
		insideDestination: u,
		afterCritical: o
	}) || _y({
		pageBorderBoxWithDroppableScroll: d,
		draggable: t,
		destination: l,
		insideDestination: u,
		last: i.displaced,
		viewport: a,
		afterCritical: o
	});
}, xy = (e, t) => ({
	...e,
	[t.descriptor.id]: t
}), Sy = ({ previousImpact: e, impact: t, droppables: n }) => {
	let r = ay(e), i = ay(t);
	if (!r || r === i) return n;
	let a = n[r];
	return a.subject.withPlaceholder ? xy(n, ny(a)) : n;
}, Cy = ({ draggable: e, draggables: t, droppables: n, previousImpact: r, impact: i }) => {
	let a = Sy({
		previousImpact: r,
		impact: i,
		droppables: n
	}), o = ay(i);
	if (!o) return a;
	let s = n[o];
	return ev(e, s) || s.subject.withPlaceholder ? a : xy(a, ty(s, e, t));
}, wy = ({ state: e, clientSelection: t, dimensions: n, viewport: r, impact: i, scrollJumpRequest: a }) => {
	let o = r || e.viewport, s = n || e.dimensions, c = t || e.current.client.selection, l = O_(c, e.initial.client.selection), u = {
		offset: l,
		selection: c,
		borderBoxCenter: D_(e.initial.client.borderBoxCenter, l)
	}, d = {
		selection: D_(u.selection, o.scroll.current),
		borderBoxCenter: D_(u.borderBoxCenter, o.scroll.current),
		offset: D_(u.offset, o.scroll.diff.value)
	}, f = {
		client: u,
		page: d
	};
	if (e.phase === "COLLECTING") return {
		...e,
		dimensions: s,
		viewport: o,
		current: f
	};
	let p = s.draggables[e.critical.draggable.id], m = i || by({
		pageOffset: d.offset,
		draggable: p,
		draggables: s.draggables,
		droppables: s.droppables,
		previousImpact: e.impact,
		viewport: o,
		afterCritical: e.afterCritical
	}), h = Cy({
		draggable: p,
		impact: m,
		previousImpact: e.impact,
		draggables: s.draggables,
		droppables: s.droppables
	});
	return {
		...e,
		current: f,
		dimensions: {
			draggables: s.draggables,
			droppables: h
		},
		impact: m,
		viewport: o,
		scrollJumpRequest: a || null,
		forceShouldAnimate: !a && null
	};
};
function Ty(e, t) {
	return e.map((e) => t[e]);
}
var Ey = ({ impact: e, viewport: t, draggables: n, destination: r, forceShouldAnimate: i }) => {
	let a = e.displaced, o = yv({
		afterDragging: Ty(a.all, n),
		destination: r,
		displacedBy: e.displacedBy,
		viewport: t.frame,
		forceShouldAnimate: i,
		last: a
	});
	return {
		...e,
		displaced: o
	};
}, Dy = ({ impact: e, draggable: t, droppable: n, draggables: r, viewport: i, afterCritical: a }) => Wv({
	pageBorderBoxCenter: Rv({
		impact: e,
		draggable: t,
		draggables: r,
		droppable: n,
		afterCritical: a
	}),
	draggable: t,
	viewport: i
}), Oy = ({ state: e, dimensions: t, viewport: n }) => {
	e.movementMode !== "SNAP" && Y();
	let r = e.impact, i = n || e.viewport, a = t || e.dimensions, { draggables: o, droppables: s } = a, c = o[e.critical.draggable.id], l = ay(r);
	!l && Y();
	let u = s[l], d = Ey({
		impact: r,
		viewport: i,
		destination: u,
		draggables: o
	});
	return wy({
		impact: d,
		clientSelection: Dy({
			impact: d,
			draggable: c,
			droppable: u,
			draggables: o,
			viewport: i,
			afterCritical: e.afterCritical
		}),
		state: e,
		dimensions: a,
		viewport: i
	});
}, ky = (e) => ({
	index: e.index,
	droppableId: e.droppableId
}), Ay = ({ draggable: e, home: t, draggables: n, viewport: r }) => {
	let i = Qv(t.axis, e.displaceBy), a = Y_(t.descriptor.id, n), o = a.indexOf(e);
	o === -1 && Y();
	let s = a.slice(o + 1), c = s.reduce((e, t) => (e[t.descriptor.id] = !0, e), {}), l = {
		inVirtualList: t.descriptor.mode === "virtual",
		displacedBy: i,
		effected: c
	};
	return {
		impact: {
			displaced: yv({
				afterDragging: s,
				destination: t,
				displacedBy: i,
				last: null,
				viewport: r.frame,
				forceShouldAnimate: !1
			}),
			displacedBy: i,
			at: {
				type: "REORDER",
				destination: ky(e.descriptor)
			}
		},
		afterCritical: l
	};
}, jy = (e, t) => ({
	draggables: e.draggables,
	droppables: xy(e.droppables, t)
}), My = ({ draggable: e, offset: t, initialWindowScroll: n }) => {
	let r = r_(e.client, t), i = i_(r, n);
	return {
		...e,
		placeholder: {
			...e.placeholder,
			client: r
		},
		client: r,
		page: i
	};
}, Ny = (e) => {
	let t = e.frame;
	return !t && Y(), t;
}, Py = ({ additions: e, updatedDroppables: t, viewport: n }) => {
	let r = n.scroll.diff.value;
	return e.map((e) => {
		let i = t[e.descriptor.droppableId], a = Ny(i).scroll.diff.value;
		return My({
			draggable: e,
			offset: D_(r, a),
			initialWindowScroll: n.scroll.initial
		});
	});
}, Fy = ({ state: e, published: t }) => {
	let n = t.modified.map((t) => {
		let n = e.dimensions.droppables[t.droppableId];
		return U_(n, t.scroll);
	}), r = {
		...e.dimensions.droppables,
		...G_(n)
	}, i = K_(Py({
		additions: t.additions,
		updatedDroppables: r,
		viewport: e.viewport
	})), a = {
		...e.dimensions.draggables,
		...i
	};
	t.removals.forEach((e) => {
		delete a[e];
	});
	let o = {
		droppables: r,
		draggables: a
	}, s = ay(e.impact), c = s ? o.droppables[s] : null, l = o.draggables[e.critical.draggable.id], u = o.droppables[e.critical.droppable.id], { impact: d, afterCritical: f } = Ay({
		draggable: l,
		home: u,
		draggables: a,
		viewport: e.viewport
	}), p = c && c.isCombineEnabled ? e.impact : d, m = by({
		pageOffset: e.current.page.offset,
		draggable: o.draggables[e.critical.draggable.id],
		draggables: o.draggables,
		droppables: o.droppables,
		previousImpact: p,
		viewport: e.viewport,
		afterCritical: f
	}), h = {
		...e,
		phase: "DRAGGING",
		impact: m,
		onLiftImpact: d,
		dimensions: o,
		afterCritical: f,
		forceShouldAnimate: !1
	};
	return e.phase === "COLLECTING" ? h : {
		...h,
		phase: "DROP_PENDING",
		reason: e.reason,
		isWaiting: !1
	};
}, Iy = (e) => e.movementMode === "SNAP", Ly = (e, t, n) => {
	let r = jy(e.dimensions, t);
	return !Iy(e) || n ? wy({
		state: e,
		dimensions: r
	}) : Oy({
		state: e,
		dimensions: r
	});
};
function Ry(e) {
	return e.isDragging && e.movementMode === "SNAP" ? {
		...e,
		scrollJumpRequest: null
	} : e;
}
var zy = {
	phase: "IDLE",
	completed: null,
	shouldFlush: !1
}, By = (e = zy, t) => {
	if (t.type === "FLUSH") return {
		...zy,
		shouldFlush: !0
	};
	if (t.type === "INITIAL_PUBLISH") {
		e.phase !== "IDLE" && Y();
		let { critical: n, clientSelection: r, viewport: i, dimensions: a, movementMode: o } = t.payload, s = a.draggables[n.draggable.id], c = a.droppables[n.droppable.id], l = {
			selection: r,
			borderBoxCenter: s.client.borderBox.center,
			offset: E_
		}, u = {
			client: l,
			page: {
				selection: D_(l.selection, i.scroll.initial),
				borderBoxCenter: D_(l.selection, i.scroll.initial),
				offset: D_(l.selection, i.scroll.diff.value)
			}
		}, d = q_(a.droppables).every((e) => !e.isFixedOnPage), { impact: f, afterCritical: p } = Ay({
			draggable: s,
			home: c,
			draggables: a.draggables,
			viewport: i
		});
		return {
			phase: "DRAGGING",
			isDragging: !0,
			critical: n,
			movementMode: o,
			dimensions: a,
			initial: u,
			current: u,
			isWindowScrollAllowed: d,
			impact: f,
			afterCritical: p,
			onLiftImpact: f,
			viewport: i,
			scrollJumpRequest: null,
			forceShouldAnimate: null
		};
	}
	if (t.type === "COLLECTION_STARTING") return e.phase === "COLLECTING" || e.phase === "DROP_PENDING" ? e : (e.phase !== "DRAGGING" && Y(), {
		...e,
		phase: "COLLECTING"
	});
	if (t.type === "PUBLISH_WHILE_DRAGGING") return e.phase !== "COLLECTING" && e.phase !== "DROP_PENDING" && Y(), Fy({
		state: e,
		published: t.payload
	});
	if (t.type === "MOVE") {
		if (e.phase === "DROP_PENDING") return e;
		!cy(e) && Y();
		let { client: n } = t.payload;
		return k_(n, e.current.client.selection) ? e : wy({
			state: e,
			clientSelection: n,
			impact: Iy(e) ? e.impact : null
		});
	}
	if (t.type === "UPDATE_DROPPABLE_SCROLL") {
		if (e.phase === "DROP_PENDING" || e.phase === "COLLECTING") return Ry(e);
		!cy(e) && Y();
		let { id: n, newScroll: r } = t.payload, i = e.dimensions.droppables[n];
		return i ? Ly(e, U_(i, r), !1) : e;
	}
	if (t.type === "UPDATE_DROPPABLE_IS_ENABLED") {
		if (e.phase === "DROP_PENDING") return e;
		!cy(e) && Y();
		let { id: n, isEnabled: r } = t.payload, i = e.dimensions.droppables[n];
		return !i && Y(), i.isEnabled === r && Y(), Ly(e, {
			...i,
			isEnabled: r
		}, !0);
	}
	if (t.type === "UPDATE_DROPPABLE_IS_COMBINE_ENABLED") {
		if (e.phase === "DROP_PENDING") return e;
		!cy(e) && Y();
		let { id: n, isCombineEnabled: r } = t.payload, i = e.dimensions.droppables[n];
		return !i && Y(), i.isCombineEnabled === r && Y(), Ly(e, {
			...i,
			isCombineEnabled: r
		}, !0);
	}
	if (t.type === "MOVE_BY_WINDOW_SCROLL") {
		if (e.phase === "DROP_PENDING" || e.phase === "DROP_ANIMATING") return e;
		!cy(e) && Y(), !e.isWindowScrollAllowed && Y();
		let n = t.payload.newScroll;
		if (k_(e.viewport.scroll.current, n)) return Ry(e);
		let r = zv(e.viewport, n);
		return Iy(e) ? Oy({
			state: e,
			viewport: r
		}) : wy({
			state: e,
			viewport: r
		});
	}
	if (t.type === "UPDATE_VIEWPORT_MAX_SCROLL") {
		if (!cy(e)) return e;
		let n = t.payload.maxScroll;
		if (k_(n, e.viewport.scroll.max)) return e;
		let r = {
			...e.viewport,
			scroll: {
				...e.viewport.scroll,
				max: n
			}
		};
		return {
			...e,
			viewport: r
		};
	}
	if (t.type === "MOVE_UP" || t.type === "MOVE_DOWN" || t.type === "MOVE_LEFT" || t.type === "MOVE_RIGHT") {
		if (e.phase === "COLLECTING" || e.phase === "DROP_PENDING") return e;
		e.phase !== "DRAGGING" && Y();
		let n = sy({
			state: e,
			type: t.type
		});
		return n ? wy({
			state: e,
			impact: n.impact,
			clientSelection: n.clientSelection,
			scrollJumpRequest: n.scrollJumpRequest
		}) : e;
	}
	if (t.type === "DROP_PENDING") {
		let n = t.payload.reason;
		return e.phase !== "COLLECTING" && Y(), {
			...e,
			phase: "DROP_PENDING",
			isWaiting: !0,
			reason: n
		};
	}
	if (t.type === "DROP_ANIMATE") {
		let { completed: n, dropDuration: r, newHomeClientOffset: i } = t.payload;
		return e.phase !== "DRAGGING" && e.phase !== "DROP_PENDING" && Y(), {
			phase: "DROP_ANIMATING",
			completed: n,
			dropDuration: r,
			newHomeClientOffset: i,
			dimensions: e.dimensions
		};
	}
	if (t.type === "DROP_COMPLETE") {
		let { completed: e } = t.payload;
		return {
			phase: "IDLE",
			completed: e,
			shouldFlush: !1
		};
	}
	return e;
};
function Vy(e, t) {
	return e instanceof Object && "type" in e && e.type === t;
}
var Hy = (e) => ({
	type: "BEFORE_INITIAL_CAPTURE",
	payload: e
}), Uy = (e) => ({
	type: "LIFT",
	payload: e
}), Wy = (e) => ({
	type: "INITIAL_PUBLISH",
	payload: e
}), Gy = (e) => ({
	type: "PUBLISH_WHILE_DRAGGING",
	payload: e
}), Ky = () => ({
	type: "COLLECTION_STARTING",
	payload: null
}), qy = (e) => ({
	type: "UPDATE_DROPPABLE_SCROLL",
	payload: e
}), Jy = (e) => ({
	type: "UPDATE_DROPPABLE_IS_ENABLED",
	payload: e
}), Yy = (e) => ({
	type: "UPDATE_DROPPABLE_IS_COMBINE_ENABLED",
	payload: e
}), Xy = (e) => ({
	type: "MOVE",
	payload: e
}), Zy = (e) => ({
	type: "MOVE_BY_WINDOW_SCROLL",
	payload: e
}), Qy = (e) => ({
	type: "UPDATE_VIEWPORT_MAX_SCROLL",
	payload: e
}), $y = () => ({
	type: "MOVE_UP",
	payload: null
}), eb = () => ({
	type: "MOVE_DOWN",
	payload: null
}), tb = () => ({
	type: "MOVE_RIGHT",
	payload: null
}), nb = () => ({
	type: "MOVE_LEFT",
	payload: null
}), rb = () => ({
	type: "FLUSH",
	payload: null
}), ib = (e) => ({
	type: "DROP_ANIMATE",
	payload: e
}), ab = (e) => ({
	type: "DROP_COMPLETE",
	payload: e
}), ob = (e) => ({
	type: "DROP",
	payload: e
}), sb = (e) => ({
	type: "DROP_PENDING",
	payload: e
}), cb = () => ({
	type: "DROP_ANIMATION_FINISHED",
	payload: null
}), lb = (e) => ({ getState: t, dispatch: n }) => (r) => (i) => {
	if (!Vy(i, "LIFT")) {
		r(i);
		return;
	}
	let { id: a, clientSelection: o, movementMode: s } = i.payload, c = t();
	c.phase === "DROP_ANIMATING" && n(ab({ completed: c.completed })), t().phase !== "IDLE" && Y(), n(rb()), n(Hy({
		draggableId: a,
		movementMode: s
	}));
	let l = {
		draggableId: a,
		scrollOptions: { shouldPublishImmediately: s === "SNAP" }
	}, { critical: u, dimensions: d, viewport: f } = e.startPublishing(l);
	n(Wy({
		critical: u,
		dimensions: d,
		clientSelection: o,
		movementMode: s,
		viewport: f
	}));
}, ub = (e) => () => (t) => (n) => {
	Vy(n, "INITIAL_PUBLISH") && e.dragging(), Vy(n, "DROP_ANIMATE") && e.dropping(n.payload.completed.result.reason), (Vy(n, "FLUSH") || Vy(n, "DROP_COMPLETE")) && e.resting(), t(n);
}, db = {
	outOfTheWay: "cubic-bezier(0.2, 0, 0, 1)",
	drop: "cubic-bezier(.2,1,.1,1)"
}, fb = {
	opacity: {
		drop: 0,
		combining: .7
	},
	scale: { drop: .75 }
}, pb = {
	outOfTheWay: .2,
	minDropTime: .33,
	maxDropTime: .55
}, mb = `${pb.outOfTheWay}s ${db.outOfTheWay}`, hb = {
	fluid: `opacity ${mb}`,
	snap: `transform ${mb}, opacity ${mb}`,
	drop: (e) => {
		let t = `${e}s ${db.drop}`;
		return `transform ${t}, opacity ${t}`;
	},
	outOfTheWay: `transform ${mb}`,
	placeholder: `height ${mb}, width ${mb}, margin ${mb}`
}, gb = (e) => k_(e, E_) ? void 0 : `translate(${e.x}px, ${e.y}px)`, _b = {
	moveTo: gb,
	drop: (e, t) => {
		let n = gb(e);
		if (n) return t ? `${n} scale(${fb.scale.drop})` : n;
	}
}, { minDropTime: vb, maxDropTime: yb } = pb, bb = yb - vb, xb = 1500, Sb = .6, Cb = ({ current: e, destination: t, reason: n }) => {
	let r = M_(e, t);
	if (r <= 0) return vb;
	if (r >= xb) return yb;
	let i = vb + r / xb * bb, a = n === "CANCEL" ? i * Sb : i;
	return Number(a.toFixed(2));
}, wb = ({ impact: e, draggable: t, dimensions: n, viewport: r, afterCritical: i }) => {
	let { draggables: a, droppables: o } = n, s = ay(e), c = s ? o[s] : null, l = o[t.descriptor.droppableId];
	return O_(Dy({
		impact: e,
		draggable: t,
		draggables: a,
		afterCritical: i,
		droppable: c || l,
		viewport: r
	}), t.client.borderBox.center);
}, Tb = ({ draggables: e, reason: t, lastImpact: n, home: r, viewport: i, onLiftImpact: a }) => !n.at || t !== "DROP" ? {
	impact: Ey({
		draggables: e,
		impact: a,
		destination: r,
		viewport: i,
		forceShouldAnimate: !0
	}),
	didDropInsideDroppable: !1
} : n.at.type === "REORDER" ? {
	impact: n,
	didDropInsideDroppable: !0
} : {
	impact: {
		...n,
		displaced: nv
	},
	didDropInsideDroppable: !0
}, Eb = ({ getState: e, dispatch: t }) => (n) => (r) => {
	if (!Vy(r, "DROP")) {
		n(r);
		return;
	}
	let i = e(), a = r.payload.reason;
	if (i.phase === "COLLECTING") {
		t(sb({ reason: a }));
		return;
	}
	if (i.phase === "IDLE") return;
	i.phase === "DROP_PENDING" && i.isWaiting && Y(), i.phase !== "DRAGGING" && i.phase !== "DROP_PENDING" && Y();
	let o = i.critical, s = i.dimensions, c = s.draggables[i.critical.draggable.id], { impact: l, didDropInsideDroppable: u } = Tb({
		reason: a,
		lastImpact: i.impact,
		afterCritical: i.afterCritical,
		onLiftImpact: i.onLiftImpact,
		home: i.dimensions.droppables[i.critical.droppable.id],
		viewport: i.viewport,
		draggables: i.dimensions.draggables
	}), d = u ? X_(l) : null, f = u ? Z_(l) : null, p = {
		index: o.draggable.index,
		droppableId: o.droppable.id
	}, m = {
		draggableId: c.descriptor.id,
		type: c.descriptor.type,
		source: p,
		reason: a,
		mode: i.movementMode,
		destination: d,
		combine: f
	}, h = wb({
		impact: l,
		draggable: c,
		dimensions: s,
		viewport: i.viewport,
		afterCritical: i.afterCritical
	}), g = {
		critical: i.critical,
		afterCritical: i.afterCritical,
		result: m,
		impact: l
	};
	if (!(!k_(i.current.client.offset, h) || m.combine)) {
		t(ab({ completed: g }));
		return;
	}
	t(ib({
		newHomeClientOffset: h,
		dropDuration: Cb({
			current: i.current.client.offset,
			destination: h,
			reason: a
		}),
		completed: g
	}));
}, Db = () => ({
	x: window.pageXOffset,
	y: window.pageYOffset
});
function Ob(e) {
	return {
		eventName: "scroll",
		options: {
			passive: !0,
			capture: !1
		},
		fn: (t) => {
			(t.target === window || t.target === window.document) && e();
		}
	};
}
function kb({ onWindowScroll: e }) {
	function t() {
		e(Db());
	}
	let n = s_(t), r = Ob(n), i = l_;
	function a() {
		return i !== l_;
	}
	function o() {
		a() && Y(), i = d_(window, [r]);
	}
	function s() {
		!a() && Y(), n.cancel(), i(), i = l_;
	}
	return {
		start: o,
		stop: s,
		isActive: a
	};
}
var Ab = (e) => Vy(e, "DROP_COMPLETE") || Vy(e, "DROP_ANIMATE") || Vy(e, "FLUSH"), jb = (e) => {
	let t = kb({ onWindowScroll: (t) => {
		e.dispatch(Zy({ newScroll: t }));
	} });
	return (e) => (n) => {
		!t.isActive() && Vy(n, "INITIAL_PUBLISH") && t.start(), t.isActive() && Ab(n) && t.stop(), e(n);
	};
}, Mb = (e) => {
	let t = !1, n = !1, r = setTimeout(() => {
		n = !0;
	}), i = (i) => {
		t || n || (t = !0, e(i), clearTimeout(r));
	};
	return i.wasCalled = () => t, i;
}, Nb = () => {
	let e = [], t = (t) => {
		let n = e.findIndex((e) => e.timerId === t);
		n === -1 && Y();
		let [r] = e.splice(n, 1);
		r.callback();
	};
	return {
		add: (n) => {
			let r = setTimeout(() => t(r)), i = {
				timerId: r,
				callback: n
			};
			e.push(i);
		},
		flush: () => {
			if (!e.length) return;
			let t = [...e];
			e.length = 0, t.forEach((e) => {
				clearTimeout(e.timerId), e.callback();
			});
		}
	};
}, Pb = (e, t) => e == null && t == null ? !0 : e == null || t == null ? !1 : e.droppableId === t.droppableId && e.index === t.index, Fb = (e, t) => e == null && t == null ? !0 : e == null || t == null ? !1 : e.draggableId === t.draggableId && e.droppableId === t.droppableId, Ib = (e, t) => {
	if (e === t) return !0;
	let n = e.draggable.id === t.draggable.id && e.draggable.droppableId === t.draggable.droppableId && e.draggable.type === t.draggable.type && e.draggable.index === t.draggable.index, r = e.droppable.id === t.droppable.id && e.droppable.type === t.droppable.type;
	return n && r;
}, Lb = (e, t) => {
	t();
}, Rb = (e, t) => ({
	draggableId: e.draggable.id,
	type: e.droppable.type,
	source: {
		droppableId: e.droppable.id,
		index: e.draggable.index
	},
	mode: t
});
function zb(e, t, n, r) {
	if (!e) {
		n(r(t));
		return;
	}
	let i = Mb(n);
	e(t, { announce: i }), i.wasCalled() || n(r(t));
}
var Bb = (e, t) => {
	let n = Nb(), r = null, i = (t, n) => {
		r && Y(), Lb("onBeforeCapture", () => {
			let r = e().onBeforeCapture;
			r && r({
				draggableId: t,
				mode: n
			});
		});
	}, a = (t, n) => {
		r && Y(), Lb("onBeforeDragStart", () => {
			let r = e().onBeforeDragStart;
			r && r(Rb(t, n));
		});
	}, o = (i, a) => {
		r && Y();
		let o = Rb(i, a);
		r = {
			mode: a,
			lastCritical: i,
			lastLocation: o.source,
			lastCombine: null
		}, n.add(() => {
			Lb("onDragStart", () => zb(e().onDragStart, o, t, S_.onDragStart));
		});
	}, s = (i, a) => {
		let o = X_(a), s = Z_(a);
		!r && Y();
		let c = !Ib(i, r.lastCritical);
		c && (r.lastCritical = i);
		let l = !Pb(r.lastLocation, o);
		l && (r.lastLocation = o);
		let u = !Fb(r.lastCombine, s);
		if (u && (r.lastCombine = s), !c && !l && !u) return;
		let d = {
			...Rb(i, r.mode),
			combine: s,
			destination: o
		};
		n.add(() => {
			Lb("onDragUpdate", () => zb(e().onDragUpdate, d, t, S_.onDragUpdate));
		});
	}, c = () => {
		!r && Y(), n.flush();
	}, l = (n) => {
		!r && Y(), r = null, Lb("onDragEnd", () => zb(e().onDragEnd, n, t, S_.onDragEnd));
	};
	return {
		beforeCapture: i,
		beforeStart: a,
		start: o,
		update: s,
		flush: c,
		drop: l,
		abort: () => {
			if (!r) return;
			let e = {
				...Rb(r.lastCritical, r.mode),
				combine: null,
				destination: null,
				reason: "CANCEL"
			};
			l(e);
		}
	};
}, Vb = (e, t) => {
	let n = Bb(e, t);
	return (e) => (t) => (r) => {
		if (Vy(r, "BEFORE_INITIAL_CAPTURE")) {
			n.beforeCapture(r.payload.draggableId, r.payload.movementMode);
			return;
		}
		if (Vy(r, "INITIAL_PUBLISH")) {
			let e = r.payload.critical;
			n.beforeStart(e, r.payload.movementMode), t(r), n.start(e, r.payload.movementMode);
			return;
		}
		if (Vy(r, "DROP_COMPLETE")) {
			let e = r.payload.completed.result;
			n.flush(), t(r), n.drop(e);
			return;
		}
		if (t(r), Vy(r, "FLUSH")) {
			n.abort();
			return;
		}
		let i = e.getState();
		i.phase === "DRAGGING" && n.update(i.critical, i.impact);
	};
}, Hb = (e) => (t) => (n) => {
	if (!Vy(n, "DROP_ANIMATION_FINISHED")) {
		t(n);
		return;
	}
	let r = e.getState();
	r.phase !== "DROP_ANIMATING" && Y(), e.dispatch(ab({ completed: r.completed }));
}, Ub = (e) => {
	let t = null, n = null;
	function r() {
		n &&= (cancelAnimationFrame(n), null), t &&= (t(), null);
	}
	return (i) => (a) => {
		if ((Vy(a, "FLUSH") || Vy(a, "DROP_COMPLETE") || Vy(a, "DROP_ANIMATION_FINISHED")) && r(), i(a), !Vy(a, "DROP_ANIMATE")) return;
		let o = {
			eventName: "scroll",
			options: {
				capture: !0,
				passive: !1,
				once: !0
			},
			fn: function() {
				e.getState().phase === "DROP_ANIMATING" && e.dispatch(cb());
			}
		};
		n = requestAnimationFrame(() => {
			n = null, t = d_(window, [o]);
		});
	};
}, Wb = (e) => () => (t) => (n) => {
	(Vy(n, "DROP_COMPLETE") || Vy(n, "FLUSH") || Vy(n, "DROP_ANIMATE")) && e.stopPublishing(), t(n);
}, Gb = (e) => {
	let t = !1;
	return () => (n) => (r) => {
		if (Vy(r, "INITIAL_PUBLISH")) {
			t = !0, e.tryRecordFocus(r.payload.critical.draggable.id), n(r), e.tryRestoreFocusRecorded();
			return;
		}
		if (n(r), t) {
			if (Vy(r, "FLUSH")) {
				t = !1, e.tryRestoreFocusRecorded();
				return;
			}
			if (Vy(r, "DROP_COMPLETE")) {
				t = !1;
				let n = r.payload.completed.result;
				n.combine && e.tryShiftRecord(n.draggableId, n.combine.draggableId), e.tryRestoreFocusRecorded();
			}
		}
	};
}, Kb = (e) => Vy(e, "DROP_COMPLETE") || Vy(e, "DROP_ANIMATE") || Vy(e, "FLUSH"), qb = (e) => (t) => (n) => (r) => {
	if (Kb(r)) {
		e.stop(), n(r);
		return;
	}
	if (Vy(r, "INITIAL_PUBLISH")) {
		n(r);
		let i = t.getState();
		i.phase !== "DRAGGING" && Y(), e.start(i);
		return;
	}
	n(r), e.scroll(t.getState());
}, Jb = (e) => (t) => (n) => {
	if (t(n), !Vy(n, "PUBLISH_WHILE_DRAGGING")) return;
	let r = e.getState();
	r.phase === "DROP_PENDING" && (r.isWaiting || e.dispatch(ob({ reason: r.reason })));
}, Yb = i, Xb = ({ dimensionMarshal: e, focusMarshal: t, styleMarshal: n, getResponders: r, announce: i, autoScroller: o }) => c(By, Yb(a(ub(n), Wb(e), lb(e), Eb, Hb, Ub, Jb, qb(o), jb, Gb(t), Vb(r, i)))), Zb = () => ({
	additions: {},
	removals: {},
	modified: {}
});
function Qb({ registry: e, callbacks: t }) {
	let n = Zb(), r = null, i = () => {
		r ||= (t.collectionStarting(), requestAnimationFrame(() => {
			r = null;
			let { additions: i, removals: a, modified: o } = n, s = Object.keys(i).map((t) => e.draggable.getById(t).getDimension(E_)).sort((e, t) => e.descriptor.index - t.descriptor.index), c = Object.keys(o).map((t) => ({
				droppableId: t,
				scroll: e.droppable.getById(t).callbacks.getScrollWhileDragging()
			})), l = {
				additions: s,
				removals: Object.keys(a),
				modified: c
			};
			n = Zb(), t.publish(l);
		}));
	};
	return {
		add: (e) => {
			let t = e.descriptor.id;
			n.additions[t] = e, n.modified[e.descriptor.droppableId] = !0, n.removals[t] && delete n.removals[t], i();
		},
		remove: (e) => {
			let t = e.descriptor;
			n.removals[t.id] = !0, n.modified[t.droppableId] = !0, n.additions[t.id] && delete n.additions[t.id], i();
		},
		stop: () => {
			r && (cancelAnimationFrame(r), r = null, n = Zb());
		}
	};
}
var $b = ({ scrollHeight: e, scrollWidth: t, height: n, width: r }) => {
	let i = O_({
		x: t,
		y: e
	}, {
		x: r,
		y: n
	});
	return {
		x: Math.max(0, i.x),
		y: Math.max(0, i.y)
	};
}, ex = () => {
	let e = document.documentElement;
	return !e && Y(), e;
}, tx = () => {
	let e = ex();
	return $b({
		scrollHeight: e.scrollHeight,
		scrollWidth: e.scrollWidth,
		width: e.clientWidth,
		height: e.clientHeight
	});
}, nx = () => {
	let e = Db(), t = tx(), n = e.y, r = e.x, i = ex(), a = i.clientWidth, o = i.clientHeight;
	return {
		frame: Yg({
			top: n,
			left: r,
			right: r + a,
			bottom: n + o
		}),
		scroll: {
			initial: e,
			current: e,
			max: t,
			diff: {
				value: E_,
				displacement: E_
			}
		}
	};
}, rx = ({ critical: e, scrollOptions: t, registry: n }) => {
	let r = nx(), i = r.scroll.current, a = e.droppable, o = n.droppable.getAllByType(a.type).map((e) => e.callbacks.getDimensionAndWatchScroll(i, t));
	return {
		dimensions: {
			draggables: K_(n.draggable.getAllByType(e.draggable.type).map((e) => e.getDimension(i))),
			droppables: G_(o)
		},
		critical: e,
		viewport: r
	};
};
function ix(e, t, n) {
	return n.descriptor.id !== t.id && n.descriptor.type === t.type && e.droppable.getById(n.descriptor.droppableId).descriptor.mode === "virtual";
}
var ax = (e, t) => {
	let n = null, r = Qb({
		callbacks: {
			publish: t.publishWhileDragging,
			collectionStarting: t.collectionStarting
		},
		registry: e
	}), i = (r, i) => {
		!e.droppable.exists(r) && Y(), n && t.updateDroppableIsEnabled({
			id: r,
			isEnabled: i
		});
	}, a = (r, i) => {
		n && (!e.droppable.exists(r) && Y(), t.updateDroppableIsCombineEnabled({
			id: r,
			isCombineEnabled: i
		}));
	}, o = (r, i) => {
		n && (!e.droppable.exists(r) && Y(), t.updateDroppableScroll({
			id: r,
			newScroll: i
		}));
	}, s = (t, r) => {
		n && e.droppable.getById(t).callbacks.scroll(r);
	}, c = () => {
		if (!n) return;
		r.stop();
		let t = n.critical.droppable;
		e.droppable.getAllByType(t.type).forEach((e) => e.callbacks.dragStopped()), n.unsubscribe(), n = null;
	}, l = (t) => {
		!n && Y();
		let i = n.critical.draggable;
		t.type === "ADDITION" && ix(e, i, t.value) && r.add(t.value), t.type === "REMOVAL" && ix(e, i, t.value) && r.remove(t.value);
	};
	return {
		updateDroppableIsEnabled: i,
		updateDroppableIsCombineEnabled: a,
		scrollDroppable: s,
		updateDroppableScroll: o,
		startPublishing: (t) => {
			n && Y();
			let r = e.draggable.getById(t.draggableId), i = e.droppable.getById(r.descriptor.droppableId), a = {
				draggable: r.descriptor,
				droppable: i.descriptor
			};
			return n = {
				critical: a,
				unsubscribe: e.subscribe(l)
			}, rx({
				critical: a,
				registry: e,
				scrollOptions: t.scrollOptions
			});
		},
		stopPublishing: c
	};
}, ox = (e, t) => e.phase === "IDLE" ? !0 : e.phase !== "DROP_ANIMATING" || e.completed.result.draggableId === t ? !1 : e.completed.result.reason === "DROP", sx = (e) => {
	window.scrollBy(e.x, e.y);
}, cx = W_((e) => q_(e).filter((e) => !(!e.isEnabled || !e.frame))), lx = (e, t) => cx(t).find((t) => (!t.frame && Y(), ly(t.frame.pageMarginBox)(e))) || null, ux = ({ center: e, destination: t, droppables: n }) => {
	if (t) {
		let e = n[t];
		return e.frame ? e : null;
	}
	return lx(e, n);
}, dx = {
	startFromPercentage: .25,
	maxScrollAtPercentage: .05,
	maxPixelScroll: 28,
	ease: (e) => e ** 2,
	durationDampening: {
		stopDampeningAt: 1200,
		accelerateAt: 360
	},
	disabled: !1
}, fx = (e, t, n = () => dx) => {
	let r = n();
	return {
		startScrollingFrom: e[t.size] * r.startFromPercentage,
		maxScrollValueAt: e[t.size] * r.maxScrollAtPercentage
	};
}, px = ({ startOfRange: e, endOfRange: t, current: n }) => {
	let r = t - e;
	return r === 0 ? 0 : (n - e) / r;
}, mx = 1, hx = (e, t, n = () => dx) => {
	let r = n();
	if (e > t.startScrollingFrom) return 0;
	if (e <= t.maxScrollValueAt) return r.maxPixelScroll;
	if (e === t.startScrollingFrom) return mx;
	let i = 1 - px({
		startOfRange: t.maxScrollValueAt,
		endOfRange: t.startScrollingFrom,
		current: e
	}), a = r.maxPixelScroll * r.ease(i);
	return Math.ceil(a);
}, gx = (e, t, n) => {
	let r = n(), i = r.durationDampening.accelerateAt, a = r.durationDampening.stopDampeningAt, o = t, s = a, c = Date.now() - o;
	if (c >= a) return e;
	if (c < i) return mx;
	let l = px({
		startOfRange: i,
		endOfRange: s,
		current: c
	}), u = e * r.ease(l);
	return Math.ceil(u);
}, _x = ({ distanceToEdge: e, thresholds: t, dragStartTime: n, shouldUseTimeDampening: r, getAutoScrollerOptions: i }) => {
	let a = hx(e, t, i);
	return a === 0 ? 0 : r ? Math.max(gx(a, n, i), mx) : a;
}, vx = ({ container: e, distanceToEdges: t, dragStartTime: n, axis: r, shouldUseTimeDampening: i, getAutoScrollerOptions: a }) => {
	let o = fx(e, r, a);
	return t[r.end] < t[r.start] ? _x({
		distanceToEdge: t[r.end],
		thresholds: o,
		dragStartTime: n,
		shouldUseTimeDampening: i,
		getAutoScrollerOptions: a
	}) : -1 * _x({
		distanceToEdge: t[r.start],
		thresholds: o,
		dragStartTime: n,
		shouldUseTimeDampening: i,
		getAutoScrollerOptions: a
	});
}, yx = ({ container: e, subject: t, proposedScroll: n }) => {
	let r = t.height > e.height, i = t.width > e.width;
	return !i && !r ? n : i && r ? null : {
		x: i ? 0 : n.x,
		y: r ? 0 : n.y
	};
}, bx = P_((e) => e === 0 ? 0 : e), xx = ({ dragStartTime: e, container: t, subject: n, center: r, shouldUseTimeDampening: i, getAutoScrollerOptions: a }) => {
	let o = {
		top: r.y - t.top,
		right: t.right - r.x,
		bottom: t.bottom - r.y,
		left: r.x - t.left
	}, s = vx({
		container: t,
		distanceToEdges: o,
		dragStartTime: e,
		axis: sv,
		shouldUseTimeDampening: i,
		getAutoScrollerOptions: a
	}), c = bx({
		x: vx({
			container: t,
			distanceToEdges: o,
			dragStartTime: e,
			axis: cv,
			shouldUseTimeDampening: i,
			getAutoScrollerOptions: a
		}),
		y: s
	});
	if (k_(c, E_)) return null;
	let l = yx({
		container: t,
		subject: n,
		proposedScroll: c
	});
	return l ? k_(l, E_) ? null : l : null;
}, Sx = P_((e) => e === 0 ? 0 : e > 0 ? 1 : -1), Cx = (() => {
	let e = (e, t) => e < 0 ? e : e > t ? e - t : 0;
	return ({ current: t, max: n, change: r }) => {
		let i = D_(t, r), a = {
			x: e(i.x, n.x),
			y: e(i.y, n.y)
		};
		return k_(a, E_) ? null : a;
	};
})(), wx = ({ max: e, current: t, change: n }) => {
	let r = {
		x: Math.max(t.x, e.x),
		y: Math.max(t.y, e.y)
	}, i = Sx(n), a = Cx({
		max: r,
		current: t,
		change: i
	});
	return !a || i.x !== 0 && a.x === 0 || i.y !== 0 && a.y === 0;
}, Tx = (e, t) => wx({
	current: e.scroll.current,
	max: e.scroll.max,
	change: t
}), Ex = (e, t) => {
	if (!Tx(e, t)) return null;
	let n = e.scroll.max, r = e.scroll.current;
	return Cx({
		current: r,
		max: n,
		change: t
	});
}, Dx = (e, t) => {
	let n = e.frame;
	return n ? wx({
		current: n.scroll.current,
		max: n.scroll.max,
		change: t
	}) : !1;
}, Ox = (e, t) => {
	let n = e.frame;
	return !n || !Dx(e, t) ? null : Cx({
		current: n.scroll.current,
		max: n.scroll.max,
		change: t
	});
}, kx = ({ viewport: e, subject: t, center: n, dragStartTime: r, shouldUseTimeDampening: i, getAutoScrollerOptions: a }) => {
	let o = xx({
		dragStartTime: r,
		container: e.frame,
		subject: t,
		center: n,
		shouldUseTimeDampening: i,
		getAutoScrollerOptions: a
	});
	return o && Tx(e, o) ? o : null;
}, Ax = ({ droppable: e, subject: t, center: n, dragStartTime: r, shouldUseTimeDampening: i, getAutoScrollerOptions: a }) => {
	let o = e.frame;
	if (!o) return null;
	let s = xx({
		dragStartTime: r,
		container: o.pageMarginBox,
		subject: t,
		center: n,
		shouldUseTimeDampening: i,
		getAutoScrollerOptions: a
	});
	return s && Dx(e, s) ? s : null;
}, jx = ({ state: e, dragStartTime: t, shouldUseTimeDampening: n, scrollWindow: r, scrollDroppable: i, getAutoScrollerOptions: a }) => {
	let o = e.current.page.borderBoxCenter, s = e.dimensions.draggables[e.critical.draggable.id].page.marginBox;
	if (e.isWindowScrollAllowed) {
		let i = e.viewport, c = kx({
			dragStartTime: t,
			viewport: i,
			subject: s,
			center: o,
			shouldUseTimeDampening: n,
			getAutoScrollerOptions: a
		});
		if (c) {
			r(c);
			return;
		}
	}
	let c = ux({
		center: o,
		destination: ay(e.impact),
		droppables: e.dimensions.droppables
	});
	if (!c) return;
	let l = Ax({
		dragStartTime: t,
		droppable: c,
		subject: s,
		center: o,
		shouldUseTimeDampening: n,
		getAutoScrollerOptions: a
	});
	l && i(c.descriptor.id, l);
}, Mx = ({ scrollWindow: e, scrollDroppable: t, getAutoScrollerOptions: n = () => dx }) => {
	let r = s_(e), i = s_(t), a = null, o = (e) => {
		!a && Y();
		let { shouldUseTimeDampening: t, dragStartTime: o } = a;
		jx({
			state: e,
			scrollWindow: r,
			scrollDroppable: i,
			dragStartTime: o,
			shouldUseTimeDampening: t,
			getAutoScrollerOptions: n
		});
	};
	return {
		start: (e) => {
			a && Y();
			let t = Date.now(), r = !1, i = () => {
				r = !0;
			};
			jx({
				state: e,
				dragStartTime: 0,
				shouldUseTimeDampening: !1,
				scrollWindow: i,
				scrollDroppable: i,
				getAutoScrollerOptions: n
			}), a = {
				dragStartTime: t,
				shouldUseTimeDampening: r
			}, r && o(e);
		},
		stop: () => {
			a &&= (r.cancel(), i.cancel(), null);
		},
		scroll: o
	};
}, Nx = ({ move: e, scrollDroppable: t, scrollWindow: n }) => {
	let r = (t, n) => {
		e({ client: D_(t.current.client.selection, n) });
	}, i = (e, n) => {
		if (!Dx(e, n)) return n;
		let r = Ox(e, n);
		if (!r) return t(e.descriptor.id, n), null;
		let i = O_(n, r);
		return t(e.descriptor.id, i), O_(n, i);
	}, a = (e, t, r) => {
		if (!e || !Tx(t, r)) return r;
		let i = Ex(t, r);
		if (!i) return n(r), null;
		let a = O_(r, i);
		return n(a), O_(r, a);
	};
	return (e) => {
		let t = e.scrollJumpRequest;
		if (!t) return;
		let n = ay(e.impact);
		!n && Y();
		let o = i(e.dimensions.droppables[n], t);
		if (!o) return;
		let s = e.viewport, c = a(e.isWindowScrollAllowed, s, o);
		c && r(e, c);
	};
}, Px = ({ scrollDroppable: e, scrollWindow: t, move: n, getAutoScrollerOptions: r }) => {
	let i = Mx({
		scrollWindow: t,
		scrollDroppable: e,
		getAutoScrollerOptions: r
	}), a = Nx({
		move: n,
		scrollWindow: t,
		scrollDroppable: e
	});
	return {
		scroll: (e) => {
			if (!(r().disabled || e.phase !== "DRAGGING")) {
				if (e.movementMode === "FLUID") {
					i.scroll(e);
					return;
				}
				e.scrollJumpRequest && a(e);
			}
		},
		start: i.start,
		stop: i.stop
	};
}, Fx = "data-rfd", Ix = (() => {
	let e = `${Fx}-drag-handle`;
	return {
		base: e,
		draggableId: `${e}-draggable-id`,
		contextId: `${e}-context-id`
	};
})(), Lx = (() => {
	let e = `${Fx}-draggable`;
	return {
		base: e,
		contextId: `${e}-context-id`,
		id: `${e}-id`
	};
})(), Rx = (() => {
	let e = `${Fx}-droppable`;
	return {
		base: e,
		contextId: `${e}-context-id`,
		id: `${e}-id`
	};
})(), zx = { contextId: `${Fx}-scroll-container-context-id` }, Bx = (e) => (t) => `[${t}="${e}"]`, Vx = (e, t) => e.map((e) => {
	let n = e.styles[t];
	return n ? `${e.selector} { ${n} }` : "";
}).join(" "), Hx = "pointer-events: none;", Ux = (e) => {
	let t = Bx(e), n = (() => {
		let e = "\n      cursor: -webkit-grab;\n      cursor: grab;\n    ";
		return {
			selector: t(Ix.contextId),
			styles: {
				always: "\n          -webkit-touch-callout: none;\n          -webkit-tap-highlight-color: rgba(0,0,0,0);\n          touch-action: manipulation;\n        ",
				resting: e,
				dragging: Hx,
				dropAnimating: e
			}
		};
	})(), r = [
		(() => {
			let e = `
      transition: ${hb.outOfTheWay};
    `;
			return {
				selector: t(Lx.contextId),
				styles: {
					dragging: e,
					dropAnimating: e,
					userCancel: e
				}
			};
		})(),
		n,
		{
			selector: t(Rx.contextId),
			styles: { always: "overflow-anchor: none;" }
		},
		{
			selector: "body",
			styles: { dragging: "\n        cursor: grabbing;\n        cursor: -webkit-grabbing;\n        user-select: none;\n        -webkit-user-select: none;\n        -moz-user-select: none;\n        -ms-user-select: none;\n        overflow-anchor: none;\n      " }
		}
	];
	return {
		always: Vx(r, "always"),
		resting: Vx(r, "resting"),
		dragging: Vx(r, "dragging"),
		dropAnimating: Vx(r, "dropAnimating"),
		userCancel: Vx(r, "userCancel")
	};
}, Wx = typeof window < "u" && window.document !== void 0 && window.document.createElement !== void 0 ? Ii : L, Gx = () => {
	let e = document.querySelector("head");
	return !e && Y(), e;
}, Kx = (e) => {
	let t = document.createElement("style");
	return e && t.setAttribute("nonce", e), t.type = "text/css", t;
};
function qx(e, t) {
	let n = T_(() => Ux(e), [e]), r = R(null), i = R(null), a = X(W_((e) => {
		let t = i.current;
		!t && Y(), t.textContent = e;
	}), []), o = X((e) => {
		let t = r.current;
		!t && Y(), t.textContent = e;
	}, []);
	Wx(() => {
		!(!r.current && !i.current) && Y();
		let s = Kx(t), c = Kx(t);
		return r.current = s, i.current = c, s.setAttribute(`${Fx}-always`, e), c.setAttribute(`${Fx}-dynamic`, e), Gx().appendChild(s), Gx().appendChild(c), o(n.always), a(n.resting), () => {
			let e = (e) => {
				let t = e.current;
				!t && Y(), Gx().removeChild(t), e.current = null;
			};
			e(r), e(i);
		};
	}, [
		t,
		o,
		a,
		n.always,
		n.resting,
		e
	]);
	let s = X(() => a(n.dragging), [a, n.dragging]), c = X((e) => {
		if (e === "DROP") {
			a(n.dropAnimating);
			return;
		}
		a(n.userCancel);
	}, [
		a,
		n.dropAnimating,
		n.userCancel
	]), l = X(() => {
		i.current && a(n.resting);
	}, [a, n.resting]);
	return T_(() => ({
		dragging: s,
		dropping: c,
		resting: l
	}), [
		s,
		c,
		l
	]);
}
function Jx(e, t) {
	return Array.from(e.querySelectorAll(t));
}
var Yx = (e) => e && e.ownerDocument && e.ownerDocument.defaultView ? e.ownerDocument.defaultView : window;
function Xx(e) {
	return e instanceof Yx(e).HTMLElement;
}
function Zx(e, t) {
	let n = `[${Ix.contextId}="${e}"]`, r = Jx(document, n);
	if (!r.length) return null;
	let i = r.find((e) => e.getAttribute(Ix.draggableId) === t);
	return !i || !Xx(i) ? null : i;
}
function Qx(e) {
	let t = R({}), n = R(null), r = R(null), i = R(!1), a = X(function(e, n) {
		let r = {
			id: e,
			focus: n
		};
		return t.current[e] = r, function() {
			let n = t.current;
			n[e] !== r && delete n[e];
		};
	}, []), o = X(function(t) {
		let n = Zx(e, t);
		n && n !== document.activeElement && n.focus();
	}, [e]), s = X(function(e, t) {
		n.current === e && (n.current = t);
	}, []), c = X(function() {
		r.current || i.current && (r.current = requestAnimationFrame(() => {
			r.current = null;
			let e = n.current;
			e && o(e);
		}));
	}, [o]), l = X(function(e) {
		n.current = null;
		let t = document.activeElement;
		t && t.getAttribute(Ix.draggableId) === e && (n.current = e);
	}, []);
	return Wx(() => (i.current = !0, function() {
		i.current = !1;
		let e = r.current;
		e && cancelAnimationFrame(e);
	}), []), T_(() => ({
		register: a,
		tryRecordFocus: l,
		tryRestoreFocusRecorded: c,
		tryShiftRecord: s
	}), [
		a,
		l,
		c,
		s
	]);
}
function $x() {
	let e = {
		draggables: {},
		droppables: {}
	}, t = [];
	function n(e) {
		return t.push(e), function() {
			let n = t.indexOf(e);
			n !== -1 && t.splice(n, 1);
		};
	}
	function r(e) {
		t.length && t.forEach((t) => t(e));
	}
	function i(t) {
		return e.draggables[t] || null;
	}
	function a(e) {
		let t = i(e);
		return !t && Y(), t;
	}
	let o = {
		register: (t) => {
			e.draggables[t.descriptor.id] = t, r({
				type: "ADDITION",
				value: t
			});
		},
		update: (t, n) => {
			let r = e.draggables[n.descriptor.id];
			r && r.uniqueId === t.uniqueId && (delete e.draggables[n.descriptor.id], e.draggables[t.descriptor.id] = t);
		},
		unregister: (t) => {
			let n = t.descriptor.id, a = i(n);
			a && t.uniqueId === a.uniqueId && (delete e.draggables[n], e.droppables[t.descriptor.droppableId] && r({
				type: "REMOVAL",
				value: t
			}));
		},
		getById: a,
		findById: i,
		exists: (e) => !!i(e),
		getAllByType: (t) => Object.values(e.draggables).filter((e) => e.descriptor.type === t)
	};
	function s(t) {
		return e.droppables[t] || null;
	}
	function c(e) {
		let t = s(e);
		return !t && Y(), t;
	}
	let l = {
		register: (t) => {
			e.droppables[t.descriptor.id] = t;
		},
		unregister: (t) => {
			let n = s(t.descriptor.id);
			n && t.uniqueId === n.uniqueId && delete e.droppables[t.descriptor.id];
		},
		getById: c,
		findById: s,
		exists: (e) => !!s(e),
		getAllByType: (t) => Object.values(e.droppables).filter((e) => e.descriptor.type === t)
	};
	function u() {
		e.draggables = {}, e.droppables = {}, t.length = 0;
	}
	return {
		draggable: o,
		droppable: l,
		subscribe: n,
		clean: u
	};
}
function eS() {
	let e = T_($x, []);
	return L(() => function() {
		e.clean();
	}, [e]), e;
}
var tS = F.createContext(null), nS = () => {
	let e = document.body;
	return !e && Y(), e;
}, rS = {
	position: "absolute",
	width: "1px",
	height: "1px",
	margin: "-1px",
	border: "0",
	padding: "0",
	overflow: "hidden",
	clip: "rect(0 0 0 0)",
	"clip-path": "inset(100%)"
}, iS = (e) => `rfd-announcement-${e}`;
function aS(e) {
	let t = T_(() => iS(e), [e]), n = R(null);
	return L(function() {
		let e = document.createElement("div");
		return n.current = e, e.id = t, e.setAttribute("aria-live", "assertive"), e.setAttribute("aria-atomic", "true"), K(e.style, rS), nS().appendChild(e), function() {
			setTimeout(function() {
				let t = nS();
				t.contains(e) && t.removeChild(e), e === n.current && (n.current = null);
			});
		};
	}, [t]), X((e) => {
		let t = n.current;
		if (t) {
			t.textContent = e;
			return;
		}
	}, []);
}
var oS = { separator: "::" };
function sS(e, t = oS) {
	let n = F.useId();
	return T_(() => `${e}${t.separator}${n}`, [
		t.separator,
		e,
		n
	]);
}
function cS({ contextId: e, uniqueId: t }) {
	return `rfd-hidden-text-${e}-${t}`;
}
function lS({ contextId: e, text: t }) {
	let n = sS("hidden-text", { separator: "-" }), r = T_(() => cS({
		contextId: e,
		uniqueId: n
	}), [n, e]);
	return L(function() {
		let e = document.createElement("div");
		return e.id = r, e.textContent = t, e.style.display = "none", nS().appendChild(e), function() {
			let t = nS();
			t.contains(e) && t.removeChild(e);
		};
	}, [r, t]), r;
}
var uS = F.createContext(null);
function dS(e) {
	let t = R(e);
	return L(() => {
		t.current = e;
	}), t;
}
function fS() {
	let e = null;
	function t() {
		return !!e;
	}
	function n(t) {
		return t === e;
	}
	function r(t) {
		e && Y();
		let n = { abandon: t };
		return e = n, n;
	}
	function i() {
		!e && Y(), e = null;
	}
	function a() {
		e && (e.abandon(), i());
	}
	return {
		isClaimed: t,
		isActive: n,
		claim: r,
		release: i,
		tryAbandon: a
	};
}
function pS(e) {
	return e.phase === "IDLE" || e.phase === "DROP_ANIMATING" ? !1 : e.isDragging;
}
var mS = 9, hS = 13, gS = 27, _S = 32, vS = 33, yS = 34, bS = 35, xS = 36, SS = 37, CS = 38, wS = 39, TS = 40, ES = {
	[hS]: !0,
	[mS]: !0
}, DS = (e) => {
	ES[e.keyCode] && e.preventDefault();
}, OS = (() => {
	let e = "visibilitychange";
	return typeof document > "u" ? e : [
		e,
		`ms${e}`,
		`webkit${e}`,
		`moz${e}`,
		`o${e}`
	].find((e) => `on${e}` in document) || e;
})(), kS = 0, AS = 5;
function jS(e, t) {
	return Math.abs(t.x - e.x) >= AS || Math.abs(t.y - e.y) >= AS;
}
var MS = { type: "IDLE" };
function NS({ cancel: e, completed: t, getPhase: n, setPhase: r }) {
	return [
		{
			eventName: "mousemove",
			fn: (e) => {
				let { button: t, clientX: i, clientY: a } = e;
				if (t !== kS) return;
				let o = {
					x: i,
					y: a
				}, s = n();
				if (s.type === "DRAGGING") {
					e.preventDefault(), s.actions.move(o);
					return;
				}
				s.type !== "PENDING" && Y();
				let c = s.point;
				jS(c, o) && (e.preventDefault(), r({
					type: "DRAGGING",
					actions: s.actions.fluidLift(o)
				}));
			}
		},
		{
			eventName: "mouseup",
			fn: (r) => {
				let i = n();
				if (i.type !== "DRAGGING") {
					e();
					return;
				}
				r.preventDefault(), i.actions.drop({ shouldBlockNextClick: !0 }), t();
			}
		},
		{
			eventName: "mousedown",
			fn: (t) => {
				n().type === "DRAGGING" && t.preventDefault(), e();
			}
		},
		{
			eventName: "keydown",
			fn: (t) => {
				if (n().type === "PENDING") {
					e();
					return;
				}
				if (t.keyCode === gS) {
					t.preventDefault(), e();
					return;
				}
				DS(t);
			}
		},
		{
			eventName: "resize",
			fn: e
		},
		{
			eventName: "scroll",
			options: {
				passive: !0,
				capture: !1
			},
			fn: () => {
				n().type === "PENDING" && e();
			}
		},
		{
			eventName: "webkitmouseforcedown",
			fn: (t) => {
				let r = n();
				if (r.type === "IDLE" && Y(), r.actions.shouldRespectForcePress()) {
					e();
					return;
				}
				t.preventDefault();
			}
		},
		{
			eventName: OS,
			fn: e
		}
	];
}
function PS(e) {
	let t = R(MS), n = R(l_), r = T_(() => ({
		eventName: "mousedown",
		fn: function(t) {
			if (t.defaultPrevented || t.button !== kS || t.ctrlKey || t.metaKey || t.shiftKey || t.altKey) return;
			let r = e.findClosestDraggableId(t);
			if (!r) return;
			let i = e.tryGetLock(r, o, { sourceEvent: t });
			if (!i) return;
			t.preventDefault();
			let a = {
				x: t.clientX,
				y: t.clientY
			};
			n.current(), l(i, a);
		}
	}), [e]), i = T_(() => ({
		eventName: "webkitmouseforcewillbegin",
		fn: (t) => {
			if (t.defaultPrevented) return;
			let n = e.findClosestDraggableId(t);
			if (!n) return;
			let r = e.findOptionsForDraggable(n);
			r && (r.shouldRespectForcePress || e.canGetLock(n) && t.preventDefault());
		}
	}), [e]), a = X(function() {
		n.current = d_(window, [i, r], {
			passive: !1,
			capture: !0
		});
	}, [i, r]), o = X(() => {
		t.current.type !== "IDLE" && (t.current = MS, n.current(), a());
	}, [a]), s = X(() => {
		let e = t.current;
		o(), e.type === "DRAGGING" && e.actions.cancel({ shouldBlockNextClick: !0 }), e.type === "PENDING" && e.actions.abort();
	}, [o]), c = X(function() {
		let e = {
			capture: !0,
			passive: !1
		}, r = NS({
			cancel: s,
			completed: o,
			getPhase: () => t.current,
			setPhase: (e) => {
				t.current = e;
			}
		});
		n.current = d_(window, r, e);
	}, [s, o]), l = X(function(e, n) {
		t.current.type !== "IDLE" && Y(), t.current = {
			type: "PENDING",
			point: n,
			actions: e
		}, c();
	}, [c]);
	Wx(function() {
		return a(), function() {
			n.current();
		};
	}, [a]);
}
function FS() {}
var IS = {
	[yS]: !0,
	[vS]: !0,
	[xS]: !0,
	[bS]: !0
};
function LS(e, t) {
	function n() {
		t(), e.cancel();
	}
	function r() {
		t(), e.drop();
	}
	return [
		{
			eventName: "keydown",
			fn: (t) => {
				if (t.keyCode === gS) {
					t.preventDefault(), n();
					return;
				}
				if (t.keyCode === _S) {
					t.preventDefault(), r();
					return;
				}
				if (t.keyCode === TS) {
					t.preventDefault(), e.moveDown();
					return;
				}
				if (t.keyCode === CS) {
					t.preventDefault(), e.moveUp();
					return;
				}
				if (t.keyCode === wS) {
					t.preventDefault(), e.moveRight();
					return;
				}
				if (t.keyCode === SS) {
					t.preventDefault(), e.moveLeft();
					return;
				}
				if (IS[t.keyCode]) {
					t.preventDefault();
					return;
				}
				DS(t);
			}
		},
		{
			eventName: "mousedown",
			fn: n
		},
		{
			eventName: "mouseup",
			fn: n
		},
		{
			eventName: "click",
			fn: n
		},
		{
			eventName: "touchstart",
			fn: n
		},
		{
			eventName: "resize",
			fn: n
		},
		{
			eventName: "wheel",
			fn: n,
			options: { passive: !0 }
		},
		{
			eventName: OS,
			fn: n
		}
	];
}
function RS(e) {
	let t = R(FS), n = T_(() => ({
		eventName: "keydown",
		fn: function(n) {
			if (n.defaultPrevented || n.keyCode !== _S) return;
			let i = e.findClosestDraggableId(n);
			if (!i) return;
			let a = e.tryGetLock(i, c, { sourceEvent: n });
			if (!a) return;
			n.preventDefault();
			let o = !0, s = a.snapLift();
			t.current();
			function c() {
				!o && Y(), o = !1, t.current(), r();
			}
			t.current = d_(window, LS(s, c), {
				capture: !0,
				passive: !1
			});
		}
	}), [e]), r = X(function() {
		t.current = d_(window, [n], {
			passive: !1,
			capture: !0
		});
	}, [n]);
	Wx(function() {
		return r(), function() {
			t.current();
		};
	}, [r]);
}
var zS = { type: "IDLE" }, BS = 120, VS = .15;
function HS({ cancel: e, getPhase: t }) {
	return [
		{
			eventName: "orientationchange",
			fn: e
		},
		{
			eventName: "resize",
			fn: e
		},
		{
			eventName: "contextmenu",
			fn: (e) => {
				e.preventDefault();
			}
		},
		{
			eventName: "keydown",
			fn: (n) => {
				if (t().type !== "DRAGGING") {
					e();
					return;
				}
				n.keyCode === gS && n.preventDefault(), e();
			}
		},
		{
			eventName: OS,
			fn: e
		}
	];
}
function US({ cancel: e, completed: t, getPhase: n }) {
	return [
		{
			eventName: "touchmove",
			options: { capture: !1 },
			fn: (t) => {
				let r = n();
				if (r.type !== "DRAGGING") {
					e();
					return;
				}
				r.hasMoved = !0;
				let { clientX: i, clientY: a } = t.touches[0], o = {
					x: i,
					y: a
				};
				t.preventDefault(), r.actions.move(o);
			}
		},
		{
			eventName: "touchend",
			fn: (r) => {
				let i = n();
				if (i.type !== "DRAGGING") {
					e();
					return;
				}
				r.preventDefault(), i.actions.drop({ shouldBlockNextClick: !0 }), t();
			}
		},
		{
			eventName: "touchcancel",
			fn: (t) => {
				if (n().type !== "DRAGGING") {
					e();
					return;
				}
				t.preventDefault(), e();
			}
		},
		{
			eventName: "touchforcechange",
			fn: (t) => {
				let r = n();
				r.type === "IDLE" && Y();
				let i = t.touches[0];
				if (!i || !(i.force >= VS)) return;
				let a = r.actions.shouldRespectForcePress();
				if (r.type === "PENDING") {
					a && e();
					return;
				}
				if (a) {
					if (r.hasMoved) {
						t.preventDefault();
						return;
					}
					e();
					return;
				}
				t.preventDefault();
			}
		},
		{
			eventName: OS,
			fn: e
		}
	];
}
function WS(e) {
	let t = R(zS), n = R(l_), r = X(function() {
		return t.current;
	}, []), i = X(function(e) {
		t.current = e;
	}, []), a = T_(() => ({
		eventName: "touchstart",
		fn: function(t) {
			if (t.defaultPrevented) return;
			let r = e.findClosestDraggableId(t);
			if (!r) return;
			let i = e.tryGetLock(r, s, { sourceEvent: t });
			if (!i) return;
			let { clientX: a, clientY: o } = t.touches[0], c = {
				x: a,
				y: o
			};
			n.current(), d(i, c);
		}
	}), [e]), o = X(function() {
		n.current = d_(window, [a], {
			capture: !0,
			passive: !1
		});
	}, [a]), s = X(() => {
		let e = t.current;
		e.type !== "IDLE" && (e.type === "PENDING" && clearTimeout(e.longPressTimerId), i(zS), n.current(), o());
	}, [o, i]), c = X(() => {
		let e = t.current;
		s(), e.type === "DRAGGING" && e.actions.cancel({ shouldBlockNextClick: !0 }), e.type === "PENDING" && e.actions.abort();
	}, [s]), l = X(function() {
		let e = {
			capture: !0,
			passive: !1
		}, t = {
			cancel: c,
			completed: s,
			getPhase: r
		}, i = d_(window, US(t), e), a = d_(window, HS(t), e);
		n.current = function() {
			i(), a();
		};
	}, [
		c,
		r,
		s
	]), u = X(function() {
		let e = r();
		e.type !== "PENDING" && Y();
		let t = e.actions.fluidLift(e.point);
		i({
			type: "DRAGGING",
			actions: t,
			hasMoved: !1
		});
	}, [r, i]), d = X(function(e, t) {
		r().type !== "IDLE" && Y();
		let n = setTimeout(u, BS);
		i({
			type: "PENDING",
			point: t,
			actions: e,
			longPressTimerId: n
		}), l();
	}, [
		l,
		r,
		i,
		u
	]);
	Wx(function() {
		return o(), function() {
			n.current();
			let e = r();
			e.type === "PENDING" && (clearTimeout(e.longPressTimerId), i(zS));
		};
	}, [
		r,
		o,
		i
	]), Wx(function() {
		return d_(window, [{
			eventName: "touchmove",
			fn: () => {},
			options: {
				capture: !1,
				passive: !1
			}
		}]);
	}, []);
}
var GS = [
	"input",
	"button",
	"textarea",
	"select",
	"option",
	"optgroup",
	"video",
	"audio"
];
function KS(e, t) {
	if (t == null) return !1;
	if (GS.includes(t.tagName.toLowerCase())) return !0;
	let n = t.getAttribute("contenteditable");
	return n === "true" || n === "" || t !== e && KS(e, t.parentElement);
}
function qS(e, t) {
	let n = t.target;
	return Xx(n) ? KS(e, n) : !1;
}
var JS = (e) => Yg(e.getBoundingClientRect()).center;
function YS(e) {
	return e instanceof Yx(e).Element;
}
var XS = (() => {
	let e = "matches";
	return typeof document > "u" ? e : [
		e,
		"msMatchesSelector",
		"webkitMatchesSelector"
	].find((e) => e in Element.prototype) || e;
})();
function ZS(e, t) {
	return e == null ? null : e[XS](t) ? e : ZS(e.parentElement, t);
}
function QS(e, t) {
	return e.closest ? e.closest(t) : ZS(e, t);
}
function $S(e) {
	return `[${Ix.contextId}="${e}"]`;
}
function eC(e, t) {
	let n = t.target;
	if (!YS(n)) return null;
	let r = QS(n, $S(e));
	return !r || !Xx(r) ? null : r;
}
function tC(e, t) {
	let n = eC(e, t);
	return n ? n.getAttribute(Ix.draggableId) : null;
}
function nC(e, t) {
	let n = `[${Lx.contextId}="${e}"]`, r = Jx(document, n).find((e) => e.getAttribute(Lx.id) === t);
	return !r || !Xx(r) ? null : r;
}
function rC(e) {
	e.preventDefault();
}
function iC({ expected: e, phase: t, isLockActive: n, shouldWarn: r }) {
	return !(!n() || e !== t);
}
function aC({ lockAPI: e, store: t, registry: n, draggableId: r }) {
	if (e.isClaimed()) return !1;
	let i = n.draggable.findById(r);
	return !(!i || !i.options.isEnabled || !ox(t.getState(), r));
}
function oC({ lockAPI: e, contextId: t, store: n, registry: r, draggableId: i, forceSensorStop: a, sourceEvent: o }) {
	if (!aC({
		lockAPI: e,
		store: n,
		registry: r,
		draggableId: i
	})) return null;
	let s = r.draggable.getById(i), c = nC(t, s.descriptor.id);
	if (!c || o && !s.options.canDragInteractiveElements && qS(c, o)) return null;
	let l = e.claim(a || l_), u = "PRE_DRAG";
	function d() {
		return s.options.shouldRespectForcePress;
	}
	function f() {
		return e.isActive(l);
	}
	function p(e, t) {
		iC({
			expected: e,
			phase: u,
			isLockActive: f,
			shouldWarn: !0
		}) && n.dispatch(t());
	}
	let m = p.bind(null, "DRAGGING");
	function h(t) {
		function r() {
			e.release(), u = "COMPLETED";
		}
		u !== "PRE_DRAG" && (r(), Y()), n.dispatch(Uy(t.liftActionArgs)), u = "DRAGGING";
		function i(e, i = { shouldBlockNextClick: !1 }) {
			if (t.cleanup(), i.shouldBlockNextClick) {
				let e = d_(window, [{
					eventName: "click",
					fn: rC,
					options: {
						once: !0,
						passive: !1,
						capture: !0
					}
				}]);
				setTimeout(e);
			}
			r(), n.dispatch(ob({ reason: e }));
		}
		return {
			isActive: () => iC({
				expected: "DRAGGING",
				phase: u,
				isLockActive: f,
				shouldWarn: !1
			}),
			shouldRespectForcePress: d,
			drop: (e) => i("DROP", e),
			cancel: (e) => i("CANCEL", e),
			...t.actions
		};
	}
	function g(e) {
		let t = s_((e) => {
			m(() => Xy({ client: e }));
		});
		return {
			...h({
				liftActionArgs: {
					id: i,
					clientSelection: e,
					movementMode: "FLUID"
				},
				cleanup: () => t.cancel(),
				actions: { move: t }
			}),
			move: t
		};
	}
	function _() {
		return h({
			liftActionArgs: {
				id: i,
				clientSelection: JS(c),
				movementMode: "SNAP"
			},
			cleanup: l_,
			actions: {
				moveUp: () => m($y),
				moveRight: () => m(tb),
				moveDown: () => m(eb),
				moveLeft: () => m(nb)
			}
		});
	}
	function v() {
		iC({
			expected: "PRE_DRAG",
			phase: u,
			isLockActive: f,
			shouldWarn: !0
		}) && e.release();
	}
	return {
		isActive: () => iC({
			expected: "PRE_DRAG",
			phase: u,
			isLockActive: f,
			shouldWarn: !1
		}),
		shouldRespectForcePress: d,
		fluidLift: g,
		snapLift: _,
		abort: v
	};
}
var sC = [
	PS,
	RS,
	WS
];
function cC({ contextId: e, store: t, registry: n, customSensors: r, enableDefaultSensors: i }) {
	let a = [...i ? sC : [], ...r || []], o = zi(() => fS())[0], s = X(function(e, t) {
		pS(e) && !pS(t) && o.tryAbandon();
	}, [o]);
	Wx(function() {
		let e = t.getState();
		return t.subscribe(() => {
			let n = t.getState();
			s(e, n), e = n;
		});
	}, [
		o,
		t,
		s
	]), Wx(() => o.tryAbandon, [o.tryAbandon]);
	let c = X((e) => aC({
		lockAPI: o,
		registry: n,
		store: t,
		draggableId: e
	}), [
		o,
		n,
		t
	]), l = X((r, i, a) => oC({
		lockAPI: o,
		registry: n,
		contextId: e,
		store: t,
		draggableId: r,
		forceSensorStop: i || null,
		sourceEvent: a && a.sourceEvent ? a.sourceEvent : null
	}), [
		e,
		o,
		n,
		t
	]), u = X((t) => tC(e, t), [e]), d = X((e) => {
		let t = n.draggable.findById(e);
		return t ? t.options : null;
	}, [n.draggable]), f = X(function() {
		o.isClaimed() && (o.tryAbandon(), t.getState().phase !== "IDLE" && t.dispatch(rb()));
	}, [o, t]), p = X(() => o.isClaimed(), [o]), m = T_(() => ({
		canGetLock: c,
		tryGetLock: l,
		findClosestDraggableId: u,
		findOptionsForDraggable: d,
		tryReleaseLock: f,
		isLockClaimed: p
	}), [
		c,
		l,
		u,
		d,
		f,
		p
	]);
	for (let e = 0; e < a.length; e++) a[e](m);
}
var lC = (e) => ({
	onBeforeCapture: (t) => {
		da(() => {
			e.onBeforeCapture && e.onBeforeCapture(t);
		});
	},
	onBeforeDragStart: e.onBeforeDragStart,
	onDragStart: e.onDragStart,
	onDragEnd: e.onDragEnd,
	onDragUpdate: e.onDragUpdate
}), uC = (e) => ({
	...dx,
	...e.autoScrollerOptions,
	durationDampening: {
		...dx.durationDampening,
		...e.autoScrollerOptions
	}
});
function dC(e) {
	return !e.current && Y(), e.current;
}
function fC(e) {
	let { contextId: t, setCallbacks: n, sensors: r, nonce: i, dragHandleUsageInstructions: a } = e, o = R(null), s = dS(e), c = X(() => lC(s.current), [s]), l = X(() => uC(s.current), [s]), u = aS(t), d = lS({
		contextId: t,
		text: a
	}), f = qx(t, i), p = X((e) => {
		dC(o).dispatch(e);
	}, []), m = T_(() => g({
		publishWhileDragging: Gy,
		updateDroppableScroll: qy,
		updateDroppableIsEnabled: Jy,
		updateDroppableIsCombineEnabled: Yy,
		collectionStarting: Ky
	}, p), [p]), h = eS(), _ = T_(() => ax(h, m), [h, m]), v = T_(() => Px({
		scrollWindow: sx,
		scrollDroppable: _.scrollDroppable,
		getAutoScrollerOptions: l,
		...g({ move: Xy }, p)
	}), [
		_.scrollDroppable,
		p,
		l
	]), y = Qx(t), b = T_(() => Xb({
		announce: u,
		autoScroller: v,
		dimensionMarshal: _,
		focusMarshal: y,
		getResponders: c,
		styleMarshal: f
	}), [
		u,
		v,
		_,
		y,
		c,
		f
	]);
	o.current = b;
	let x = X(() => {
		let e = dC(o);
		e.getState().phase !== "IDLE" && e.dispatch(rb());
	}, []), S = X(() => {
		let e = dC(o).getState();
		return e.phase === "DROP_ANIMATING" || e.phase !== "IDLE" && e.isDragging;
	}, []);
	n(T_(() => ({
		isDragging: S,
		tryAbort: x
	}), [S, x]));
	let w = X((e) => ox(dC(o).getState(), e), []), T = X(() => cy(dC(o).getState()), []), E = T_(() => ({
		marshal: _,
		focus: y,
		contextId: t,
		canLift: w,
		isMovementAllowed: T,
		dragHandleUsageInstructionsId: d,
		registry: h
	}), [
		t,
		_,
		d,
		y,
		w,
		T,
		h
	]);
	return cC({
		contextId: t,
		store: b,
		registry: h,
		customSensors: r || null,
		enableDefaultSensors: e.enableDefaultSensors !== !1
	}), L(() => x, [x]), F.createElement(uS.Provider, { value: E }, F.createElement(C, {
		context: tS,
		store: b
	}, e.children));
}
function pC() {
	return F.useId();
}
function mC(e) {
	let t = pC(), n = e.dragHandleUsageInstructions || S_.dragHandleUsageInstructions;
	return F.createElement(m_, null, (r) => F.createElement(fC, {
		nonce: e.nonce,
		contextId: t,
		setCallbacks: r,
		dragHandleUsageInstructions: n,
		enableDefaultSensors: e.enableDefaultSensors,
		sensors: e.sensors,
		onBeforeCapture: e.onBeforeCapture,
		onBeforeDragStart: e.onBeforeDragStart,
		onDragStart: e.onDragStart,
		onDragUpdate: e.onDragUpdate,
		onDragEnd: e.onDragEnd,
		autoScrollerOptions: e.autoScrollerOptions
	}, e.children));
}
var hC = {
	dragging: 5e3,
	dropAnimating: 4500
}, gC = (e, t) => t ? hb.drop(t.duration) : e ? hb.snap : hb.fluid, _C = (e, t) => {
	if (e) return t ? fb.opacity.drop : fb.opacity.combining;
}, vC = (e) => e.forceShouldAnimate == null ? e.mode === "SNAP" : e.forceShouldAnimate;
function yC(e) {
	let t = e.dimension.client, { offset: n, combineWith: r, dropping: i } = e, a = !!r, o = vC(e), s = !!i, c = s ? _b.drop(n, a) : _b.moveTo(n);
	return {
		position: "fixed",
		top: t.marginBox.top,
		left: t.marginBox.left,
		boxSizing: "border-box",
		width: t.borderBox.width,
		height: t.borderBox.height,
		transition: gC(o, i),
		transform: c,
		opacity: _C(a, s),
		zIndex: s ? hC.dropAnimating : hC.dragging,
		pointerEvents: "none"
	};
}
function bC(e) {
	return {
		transform: _b.moveTo(e.offset),
		transition: e.shouldAnimateDisplacement ? void 0 : "none"
	};
}
function xC(e) {
	return e.type === "DRAGGING" ? yC(e) : bC(e);
}
function SC(e, t, n = E_) {
	let r = window.getComputedStyle(t), i = a_(t.getBoundingClientRect(), r), a = i_(i, n);
	return {
		descriptor: e,
		placeholder: {
			client: i,
			tagName: t.tagName.toLowerCase(),
			display: r.display
		},
		displaceBy: {
			x: i.marginBox.width,
			y: i.marginBox.height
		},
		client: i,
		page: a
	};
}
function CC(e) {
	let t = sS("draggable"), { descriptor: n, registry: r, getDraggableRef: i, canDragInteractiveElements: a, shouldRespectForcePress: o, isEnabled: s } = e, c = T_(() => ({
		canDragInteractiveElements: a,
		shouldRespectForcePress: o,
		isEnabled: s
	}), [
		a,
		s,
		o
	]), l = X((e) => {
		let t = i();
		return !t && Y(), SC(n, t, e);
	}, [n, i]), u = T_(() => ({
		uniqueId: t,
		descriptor: n,
		options: c,
		getDimension: l
	}), [
		n,
		l,
		c,
		t
	]), d = R(u), f = R(!0);
	Wx(() => (r.draggable.register(d.current), () => r.draggable.unregister(d.current)), [r.draggable]), Wx(() => {
		if (f.current) {
			f.current = !1;
			return;
		}
		let e = d.current;
		d.current = u, r.draggable.update(u, e);
	}, [u, r.draggable]);
}
var wC = F.createContext(null);
function TC(e) {
	let t = Ni(e);
	return !t && Y(), t;
}
function EC(e) {
	e.preventDefault();
}
var DC = (e) => {
	let t = R(null), n = X((e = null) => {
		t.current = e;
	}, []), r = X(() => t.current, []), { contextId: i, dragHandleUsageInstructionsId: a, registry: o } = TC(uS), { type: s, droppableId: c } = TC(wC), l = T_(() => ({
		id: e.draggableId,
		index: e.index,
		type: s,
		droppableId: c
	}), [
		e.draggableId,
		e.index,
		s,
		c
	]), { children: u, draggableId: d, isEnabled: f, shouldRespectForcePress: p, canDragInteractiveElements: m, isClone: h, mapped: g, dropAnimationFinished: _ } = e;
	h || CC(T_(() => ({
		descriptor: l,
		registry: o,
		getDraggableRef: r,
		canDragInteractiveElements: m,
		shouldRespectForcePress: p,
		isEnabled: f
	}), [
		l,
		o,
		r,
		m,
		p,
		f
	]));
	let v = T_(() => f ? {
		tabIndex: 0,
		role: "button",
		"aria-describedby": a,
		"data-rfd-drag-handle-draggable-id": d,
		"data-rfd-drag-handle-context-id": i,
		draggable: !1,
		onDragStart: EC
	} : null, [
		i,
		a,
		d,
		f
	]), y = X((e) => {
		g.type === "DRAGGING" && g.dropping && e.propertyName === "transform" && da(_);
	}, [_, g]), b = T_(() => {
		let e = xC(g), t = g.type === "DRAGGING" && g.dropping ? y : void 0;
		return {
			innerRef: n,
			draggableProps: {
				"data-rfd-draggable-context-id": i,
				"data-rfd-draggable-id": d,
				style: e,
				onTransitionEnd: t
			},
			dragHandleProps: v
		};
	}, [
		i,
		v,
		d,
		g,
		y,
		n
	]), x = T_(() => ({
		draggableId: l.id,
		type: l.type,
		source: {
			index: l.index,
			droppableId: l.droppableId
		}
	}), [
		l.droppableId,
		l.id,
		l.index,
		l.type
	]);
	return F.createElement(F.Fragment, null, u(b, g.snapshot, x));
}, OC = (e, t) => e === t, kC = (e) => {
	let { combine: t, destination: n } = e;
	return n ? n.droppableId : t ? t.droppableId : null;
}, AC = (e) => e.combine ? e.combine.draggableId : null, jC = (e) => e.at && e.at.type === "COMBINE" ? e.at.combine.draggableId : null;
function MC() {
	let e = W_((e, t) => ({
		x: e,
		y: t
	})), t = W_((e, t, n = null, r = null, i = null) => ({
		isDragging: !0,
		isClone: t,
		isDropAnimating: !!i,
		dropAnimation: i,
		mode: e,
		draggingOver: n,
		combineWith: r,
		combineTargetFor: null
	})), n = W_((e, n, r, i, a = null, o = null, s = null) => ({ mapped: {
		type: "DRAGGING",
		dropping: null,
		draggingOver: a,
		combineWith: o,
		mode: n,
		offset: e,
		dimension: r,
		forceShouldAnimate: s,
		snapshot: t(n, i, a, o, null)
	} }));
	return (r, i) => {
		if (pS(r)) {
			if (r.critical.draggable.id !== i.draggableId) return null;
			let t = r.current.client.offset, a = r.dimensions.draggables[i.draggableId], o = ay(r.impact), s = jC(r.impact), c = r.forceShouldAnimate;
			return n(e(t.x, t.y), r.movementMode, a, i.isClone, o, s, c);
		}
		if (r.phase === "DROP_ANIMATING") {
			let e = r.completed;
			if (e.result.draggableId !== i.draggableId) return null;
			let n = i.isClone, a = r.dimensions.draggables[i.draggableId], o = e.result, s = o.mode, c = kC(o), l = AC(o), u = {
				duration: r.dropDuration,
				curve: db.drop,
				moveTo: r.newHomeClientOffset,
				opacity: l ? fb.opacity.drop : null,
				scale: l ? fb.scale.drop : null
			};
			return { mapped: {
				type: "DRAGGING",
				offset: r.newHomeClientOffset,
				dimension: a,
				dropping: u,
				draggingOver: c,
				combineWith: l,
				mode: s,
				forceShouldAnimate: null,
				snapshot: t(s, n, c, l, u)
			} };
		}
		return null;
	};
}
function NC(e = null) {
	return {
		isDragging: !1,
		isDropAnimating: !1,
		isClone: !1,
		dropAnimation: null,
		mode: null,
		draggingOver: null,
		combineTargetFor: e,
		combineWith: null
	};
}
var PC = { mapped: {
	type: "SECONDARY",
	offset: E_,
	combineTargetFor: null,
	shouldAnimateDisplacement: !0,
	snapshot: NC(null)
} };
function FC() {
	let e = W_((e, t) => ({
		x: e,
		y: t
	})), t = W_(NC), n = W_((e, n = null, r) => ({ mapped: {
		type: "SECONDARY",
		offset: e,
		combineTargetFor: n,
		shouldAnimateDisplacement: r,
		snapshot: t(n)
	} })), r = (e) => e ? n(E_, e, !0) : null, i = (t, i, a, o) => {
		let s = a.displaced.visible[t], c = !!(o.inVirtualList && o.effected[t]), l = Z_(a), u = l && l.draggableId === t ? i : null;
		if (!s) {
			if (!c) return r(u);
			if (a.displaced.invisible[t]) return null;
			let i = A_(o.displacedBy.point), s = e(i.x, i.y);
			return n(s, u, !0);
		}
		if (c) return r(u);
		let d = a.displacedBy.point, f = e(d.x, d.y);
		return n(f, u, s.shouldAnimate);
	};
	return (e, t) => {
		if (pS(e)) return e.critical.draggable.id === t.draggableId ? null : i(t.draggableId, e.critical.draggable.id, e.impact, e.afterCritical);
		if (e.phase === "DROP_ANIMATING") {
			let n = e.completed;
			return n.result.draggableId === t.draggableId ? null : i(t.draggableId, n.result.draggableId, n.impact, n.afterCritical);
		}
		return null;
	};
}
var IC = O(() => {
	let e = MC(), t = FC();
	return (n, r) => e(n, r) || t(n, r) || PC;
}, { dropAnimationFinished: cb }, null, {
	context: tS,
	areStatePropsEqual: OC
})(DC);
function LC(e) {
	return TC(wC).isUsingCloneFor === e.draggableId && !e.isClone ? null : F.createElement(IC, e);
}
function RC(e) {
	let t = typeof e.isDragDisabled != "boolean" || !e.isDragDisabled, n = !!e.disableInteractiveElementBlocking, r = !!e.shouldRespectForcePress;
	return F.createElement(LC, K({}, e, {
		isClone: !1,
		isEnabled: t,
		canDragInteractiveElements: n,
		shouldRespectForcePress: r
	}));
}
var zC = (e) => (t) => e === t, BC = zC("scroll"), VC = zC("auto"), HC = (e, t) => t(e.overflowX) || t(e.overflowY), UC = (e) => {
	let t = window.getComputedStyle(e), n = {
		overflowX: t.overflowX,
		overflowY: t.overflowY
	};
	return HC(n, BC) || HC(n, VC);
}, WC = () => !1, GC = (e) => e == null ? null : e === document.body ? WC() ? e : null : e === document.documentElement ? null : UC(e) ? e : GC(e.parentElement), KC = (e) => ({
	x: e.scrollLeft,
	y: e.scrollTop
}), qC = (e) => e ? window.getComputedStyle(e).position === "fixed" || qC(e.parentElement) : !1, JC = (e) => ({
	closestScrollable: GC(e),
	isFixedOnPage: qC(e)
}), YC = ({ descriptor: e, isEnabled: t, isCombineEnabled: n, isFixedOnPage: r, direction: i, client: a, page: o, closest: s }) => {
	let c = (() => {
		if (!s) return null;
		let { scrollSize: e, client: t } = s, n = $b({
			scrollHeight: e.scrollHeight,
			scrollWidth: e.scrollWidth,
			height: t.paddingBox.height,
			width: t.paddingBox.width
		});
		return {
			pageMarginBox: s.page.marginBox,
			frameClient: t,
			scrollSize: e,
			shouldClipSubject: s.shouldClipSubject,
			scroll: {
				initial: s.scroll,
				current: s.scroll,
				max: n,
				diff: {
					value: E_,
					displacement: E_
				}
			}
		};
	})(), l = i === "vertical" ? sv : cv;
	return {
		descriptor: e,
		isCombineEnabled: n,
		isFixedOnPage: r,
		axis: l,
		isEnabled: t,
		client: a,
		page: o,
		frame: c,
		subject: H_({
			page: o,
			withPlaceholder: null,
			axis: l,
			frame: c
		})
	};
}, XC = (e, t) => {
	let n = o_(e);
	if (!t || e !== t) return n;
	let r = n.paddingBox.top - t.scrollTop, i = n.paddingBox.left - t.scrollLeft, a = r + t.scrollHeight;
	return e_({
		borderBox: Xg({
			top: r,
			right: i + t.scrollWidth,
			bottom: a,
			left: i
		}, n.border),
		margin: n.margin,
		border: n.border,
		padding: n.padding
	});
}, ZC = ({ ref: e, descriptor: t, env: n, windowScroll: r, direction: i, isDropDisabled: a, isCombineEnabled: o, shouldClipSubject: s }) => {
	let c = n.closestScrollable, l = XC(e, c), u = i_(l, r), d = (() => {
		if (!c) return null;
		let e = o_(c), t = {
			scrollHeight: c.scrollHeight,
			scrollWidth: c.scrollWidth
		};
		return {
			client: e,
			page: i_(e, r),
			scroll: KC(c),
			scrollSize: t,
			shouldClipSubject: s
		};
	})();
	return YC({
		descriptor: t,
		isEnabled: !a,
		isCombineEnabled: o,
		isFixedOnPage: n.isFixedOnPage,
		direction: i,
		client: l,
		page: u,
		closest: d
	});
}, QC = { passive: !1 }, $C = { passive: !0 }, ew = (e) => e.shouldPublishImmediately ? QC : $C, tw = (e) => e && e.env.closestScrollable || null;
function nw(e) {
	let t = R(null), n = TC(uS), r = sS("droppable"), { registry: i, marshal: a } = n, o = dS(e), s = T_(() => ({
		id: e.droppableId,
		type: e.type,
		mode: e.mode
	}), [
		e.droppableId,
		e.mode,
		e.type
	]), c = R(s), l = T_(() => W_((e, n) => {
		!t.current && Y();
		let r = {
			x: e,
			y: n
		};
		a.updateDroppableScroll(s.id, r);
	}), [s.id, a]), u = X(() => {
		let e = t.current;
		return !e || !e.env.closestScrollable ? E_ : KC(e.env.closestScrollable);
	}, []), d = X(() => {
		let e = u();
		l(e.x, e.y);
	}, [u, l]), f = T_(() => s_(d), [d]), p = X(() => {
		let e = t.current, n = tw(e);
		if (!(e && n) && Y(), e.scrollOptions.shouldPublishImmediately) {
			d();
			return;
		}
		f();
	}, [f, d]), m = X((e, r) => {
		t.current && Y();
		let i = o.current, a = i.getDroppableRef();
		!a && Y();
		let c = JC(a), l = {
			ref: a,
			descriptor: s,
			env: c,
			scrollOptions: r
		};
		t.current = l;
		let u = ZC({
			ref: a,
			descriptor: s,
			env: c,
			windowScroll: e,
			direction: i.direction,
			isDropDisabled: i.isDropDisabled,
			isCombineEnabled: i.isCombineEnabled,
			shouldClipSubject: !i.ignoreContainerClipping
		}), d = c.closestScrollable;
		return d && (d.setAttribute(zx.contextId, n.contextId), d.addEventListener("scroll", p, ew(l.scrollOptions))), u;
	}, [
		n.contextId,
		s,
		p,
		o
	]), h = X(() => {
		let e = t.current, n = tw(e);
		return !(e && n) && Y(), KC(n);
	}, []), g = X(() => {
		let e = t.current;
		!e && Y();
		let n = tw(e);
		t.current = null, n && (f.cancel(), n.removeAttribute(zx.contextId), n.removeEventListener("scroll", p, ew(e.scrollOptions)));
	}, [p, f]), _ = X((e) => {
		let n = t.current;
		!n && Y();
		let r = tw(n);
		!r && Y(), r.scrollTop += e.y, r.scrollLeft += e.x;
	}, []), v = T_(() => ({
		getDimensionAndWatchScroll: m,
		getScrollWhileDragging: h,
		dragStopped: g,
		scroll: _
	}), [
		g,
		m,
		h,
		_
	]), y = T_(() => ({
		uniqueId: r,
		descriptor: s,
		callbacks: v
	}), [
		v,
		s,
		r
	]);
	Wx(() => (c.current = y.descriptor, i.droppable.register(y), () => {
		t.current && g(), i.droppable.unregister(y);
	}), [
		v,
		s,
		g,
		y,
		a,
		i.droppable
	]), Wx(() => {
		t.current && a.updateDroppableIsEnabled(c.current.id, !e.isDropDisabled);
	}, [e.isDropDisabled, a]), Wx(() => {
		t.current && a.updateDroppableIsCombineEnabled(c.current.id, e.isCombineEnabled);
	}, [e.isCombineEnabled, a]);
}
function rw() {}
var iw = {
	width: 0,
	height: 0,
	margin: R_
}, aw = ({ isAnimatingOpenOnMount: e, placeholder: t, animate: n }) => e || n === "close" ? iw : {
	height: t.client.borderBox.height,
	width: t.client.borderBox.width,
	margin: t.client.margin
}, ow = ({ isAnimatingOpenOnMount: e, placeholder: t, animate: n }) => {
	let r = aw({
		isAnimatingOpenOnMount: e,
		placeholder: t,
		animate: n
	});
	return {
		display: t.display,
		boxSizing: "border-box",
		width: r.width,
		height: r.height,
		marginTop: r.margin.top,
		marginRight: r.margin.right,
		marginBottom: r.margin.bottom,
		marginLeft: r.margin.left,
		flexShrink: "0",
		flexGrow: "0",
		pointerEvents: "none",
		transition: n === "none" ? null : hb.placeholder
	};
}, sw = F.memo((e) => {
	let t = R(null), n = X(() => {
		t.current &&= (clearTimeout(t.current), null);
	}, []), { animate: r, onTransitionEnd: i, onClose: a, contextId: o } = e, [s, c] = zi(e.animate === "open");
	L(() => s ? r === "open" ? t.current ? rw : (t.current = setTimeout(() => {
		t.current = null, c(!1);
	}), n) : (n(), c(!1), rw) : rw, [
		r,
		s,
		n
	]);
	let l = X((e) => {
		e.propertyName === "height" && (i(), r === "close" && a());
	}, [
		r,
		a,
		i
	]), u = ow({
		isAnimatingOpenOnMount: s,
		animate: e.animate,
		placeholder: e.placeholder
	});
	return F.createElement(e.placeholder.tagName, {
		style: u,
		"data-rfd-placeholder-context-id": o,
		onTransitionEnd: l,
		ref: e.innerRef
	});
}), cw = class extends F.PureComponent {
	constructor(...e) {
		super(...e), this.state = {
			isVisible: !!this.props.on,
			data: this.props.on,
			animate: this.props.shouldAnimate && this.props.on ? "open" : "none"
		}, this.onClose = () => {
			this.state.animate === "close" && this.setState({ isVisible: !1 });
		};
	}
	static getDerivedStateFromProps(e, t) {
		return e.shouldAnimate ? e.on ? {
			isVisible: !0,
			data: e.on,
			animate: "open"
		} : t.isVisible ? {
			isVisible: !0,
			data: t.data,
			animate: "close"
		} : {
			isVisible: !1,
			animate: "close",
			data: null
		} : {
			isVisible: !!e.on,
			data: e.on,
			animate: "none"
		};
	}
	render() {
		if (!this.state.isVisible) return null;
		let e = {
			onClose: this.onClose,
			data: this.state.data,
			animate: this.state.animate
		};
		return this.props.children(e);
	}
}, lw = (e) => {
	let t = Ni(uS);
	!t && Y();
	let { contextId: n, isMovementAllowed: r } = t, i = R(null), a = R(null), { children: o, droppableId: s, type: c, mode: l, direction: u, ignoreContainerClipping: d, isDropDisabled: f, isCombineEnabled: p, snapshot: m, useClone: h, updateViewportMaxScroll: g, getContainerForClone: _ } = e, v = X(() => i.current, []), y = X((e = null) => {
		i.current = e;
	}, []);
	X(() => a.current, []);
	let b = X((e = null) => {
		a.current = e;
	}, []), x = X(() => {
		r() && g({ maxScroll: tx() });
	}, [r, g]);
	nw({
		droppableId: s,
		type: c,
		mode: l,
		direction: u,
		isDropDisabled: f,
		isCombineEnabled: p,
		ignoreContainerClipping: d,
		getDroppableRef: v
	});
	let S = T_(() => F.createElement(cw, {
		on: e.placeholder,
		shouldAnimate: e.shouldAnimatePlaceholder
	}, ({ onClose: e, data: t, animate: r }) => F.createElement(sw, {
		placeholder: t,
		onClose: e,
		innerRef: b,
		animate: r,
		contextId: n,
		onTransitionEnd: x
	})), [
		n,
		x,
		e.placeholder,
		e.shouldAnimatePlaceholder,
		b
	]), C = T_(() => ({
		innerRef: y,
		placeholder: S,
		droppableProps: {
			"data-rfd-droppable-id": s,
			"data-rfd-droppable-context-id": n
		}
	}), [
		n,
		s,
		S,
		y
	]), w = h ? h.dragging.draggableId : null, T = T_(() => ({
		droppableId: s,
		type: c,
		isUsingCloneFor: w
	}), [
		s,
		w,
		c
	]);
	function E() {
		if (!h) return null;
		let { dragging: e, render: t } = h, n = F.createElement(LC, {
			draggableId: e.draggableId,
			index: e.source.index,
			isClone: !0,
			isEnabled: !0,
			shouldRespectForcePress: !1,
			canDragInteractiveElements: !0
		}, (n, r) => t(n, r, e));
		return ua.createPortal(n, _());
	}
	return F.createElement(wC.Provider, { value: T }, o(C, m), E());
};
function uw() {
	return !document.body && Y(), document.body;
}
var dw = {
	mode: "standard",
	type: "DEFAULT",
	direction: "vertical",
	isDropDisabled: !1,
	isCombineEnabled: !1,
	ignoreContainerClipping: !1,
	renderClone: null,
	getContainerForClone: uw
}, fw = (e) => {
	let t = { ...e }, n;
	for (n in dw) e[n] === void 0 && (t = {
		...t,
		[n]: dw[n]
	});
	return t;
}, pw = (e, t) => e === t.droppable.type, mw = (e, t) => t.draggables[e.draggable.id], hw = O(() => {
	let e = {
		placeholder: null,
		shouldAnimatePlaceholder: !0,
		snapshot: {
			isDraggingOver: !1,
			draggingOverWith: null,
			draggingFromThisWith: null,
			isUsingPlaceholder: !1
		},
		useClone: null
	}, t = {
		...e,
		shouldAnimatePlaceholder: !1
	}, n = W_((e) => ({
		draggableId: e.id,
		type: e.type,
		source: {
			index: e.index,
			droppableId: e.droppableId
		}
	})), r = W_((r, i, a, o, s, c) => {
		let l = s.descriptor.id;
		if (s.descriptor.droppableId === r) {
			let e = c ? {
				render: c,
				dragging: n(s.descriptor)
			} : null, t = {
				isDraggingOver: a,
				draggingOverWith: a ? l : null,
				draggingFromThisWith: l,
				isUsingPlaceholder: !0
			};
			return {
				placeholder: s.placeholder,
				shouldAnimatePlaceholder: !1,
				snapshot: t,
				useClone: e
			};
		}
		if (!i) return t;
		if (!o) return e;
		let u = {
			isDraggingOver: a,
			draggingOverWith: l,
			draggingFromThisWith: null,
			isUsingPlaceholder: !0
		};
		return {
			placeholder: s.placeholder,
			shouldAnimatePlaceholder: !0,
			snapshot: u,
			useClone: null
		};
	});
	return (n, i) => {
		let a = fw(i), o = a.droppableId, s = a.type, c = !a.isDropDisabled, l = a.renderClone;
		if (pS(n)) {
			let e = n.critical;
			if (!pw(s, e)) return t;
			let i = mw(e, n.dimensions), a = ay(n.impact) === o;
			return r(o, c, a, a, i, l);
		}
		if (n.phase === "DROP_ANIMATING") {
			let e = n.completed;
			if (!pw(s, e.critical)) return t;
			let i = mw(e.critical, n.dimensions);
			return r(o, c, kC(e.result) === o, ay(e.impact) === o, i, l);
		}
		if (n.phase === "IDLE" && n.completed && !n.shouldFlush) {
			let r = n.completed;
			if (!pw(s, r.critical)) return t;
			let i = ay(r.impact) === o, a = !!(r.impact.at && r.impact.at.type === "COMBINE"), c = r.critical.droppable.id === o;
			return i ? a ? e : t : c ? e : t;
		}
		return t;
	};
}, { updateViewportMaxScroll: Qy }, (e, t, n) => ({
	...fw(n),
	...e,
	...t
}), {
	context: tS,
	areStatePropsEqual: OC
})(lw), gw = H("div")(({ theme: e }) => ({
	alignItems: "center",
	borderRight: `0.5px solid ${e.palette.divider}`,
	display: "flex",
	flex: 1,
	flexDirection: "row",
	marginBottom: e.spacing(-2),
	marginRight: e.spacing(1),
	marginTop: e.spacing(-2),
	maxWidth: e.spacing(3),
	width: e.spacing(3)
})), _w = (e, t, n) => {
	let r = Array.from(e), [i] = r.splice(t, 1);
	return r.splice(n, 0, i), r;
};
function vw({ resource: e, layerMetadata: t = {}, index: n, handleOpacityChange: r, setLayerVisibility: i, moveToBackground: a, moveToFront: o }) {
	let { t: s } = V(), { width: c, height: l } = {
		height: void 0,
		width: 40
	}, u = {
		opacity: 1,
		visibility: !!e.preferred,
		...t || {}
	};
	return /* @__PURE__ */ B("div", {
		style: { flex: 1 },
		children: [/* @__PURE__ */ B("div", {
			style: {
				alignItems: "flex-start",
				display: "flex"
			},
			children: [/* @__PURE__ */ z(ei, {
				maxHeight: l,
				maxWidth: c,
				resource: e,
				border: !0
			}), /* @__PURE__ */ B(U, {
				sx: { paddingLeft: 1 },
				component: "div",
				variant: "body1",
				children: [/* @__PURE__ */ z(Xr, {
					resource: e,
					fallback: n + 1
				}), /* @__PURE__ */ B("div", { children: [
					/* @__PURE__ */ z(ii, {
						"aria-label": s(u.visibility ? "layer_hide" : "layer_show"),
						edge: "start",
						size: "small",
						onClick: () => {
							i(e.id, !u.visibility);
						},
						children: u.visibility ? /* @__PURE__ */ z(Hc, {}) : /* @__PURE__ */ z(Uc, {})
					}),
					u.index !== 0 && /* @__PURE__ */ z(ii, {
						"aria-label": s("layer_moveToBackground"),
						size: "small",
						onClick: () => {
							a(e.id);
						},
						children: /* @__PURE__ */ z(Wg, {})
					}),
					u.index !== t && /* @__PURE__ */ z(ii, {
						"aria-label": s("layer_moveToFront"),
						size: "small",
						onClick: () => {
							o(e.id);
						},
						children: /* @__PURE__ */ z(Gg, {})
					})
				] })]
			})]
		}), /* @__PURE__ */ B("div", {
			style: {
				alignItems: "center",
				display: "flex"
			},
			children: [
				/* @__PURE__ */ z(ia, {
					title: s("layer_opacity"),
					children: /* @__PURE__ */ z(Kg, {
						sx: { marginRight: .5 },
						color: u.visibility ? "inherit" : "disabled",
						fontSize: "small"
					})
				}),
				/* @__PURE__ */ z(Pa, {
					sx: { "MuiInput-input": {
						"&::-webkit-outer-spin-button,&::-webkit-inner-spin-button": {
							margin: 0,
							WebkitAppearance: "none"
						},
						MozAppearance: "textfield",
						textAlign: "right",
						typography: "caption",
						width: "3ch"
					} },
					disabled: !u.visibility,
					value: Math.round(u.opacity * 100),
					type: "number",
					min: 0,
					max: 100,
					onChange: (t) => r(e.id, t.target.value),
					endAdornment: /* @__PURE__ */ z(Aa, {
						disableTypography: !0,
						position: "end",
						children: /* @__PURE__ */ z(U, {
							variant: "caption",
							children: "%"
						})
					}),
					inputProps: { "aria-label": s("layer_opacity") }
				}),
				/* @__PURE__ */ z(Fa, {
					sx: {
						marginLeft: 2,
						marginRight: 2,
						maxWidth: 150
					},
					disabled: !u.visibility,
					value: u.opacity * 100,
					onChange: (t, n) => r(e.id, n)
				})
			]
		})]
	});
}
vw.propTypes = {
	handleOpacityChange: W.default.func.isRequired,
	index: W.default.number.isRequired,
	layerMetadata: W.default.objectOf(W.default.shape({
		opacity: W.default.number,
		visibility: W.default.bool
	})),
	moveToBackground: W.default.func.isRequired,
	moveToFront: W.default.func.isRequired,
	resource: W.default.object.isRequired,
	setLayerVisibility: W.default.func.isRequired
};
function yw({ children: e, resource: t, index: n }) {
	let { t: r } = V();
	return /* @__PURE__ */ z(RC, {
		draggableId: t.id,
		index: n,
		children: (n, i) => /* @__PURE__ */ Di(Ma, {
			ref: n.innerRef,
			...n.draggableProps,
			component: "li",
			divider: !0,
			sx: {
				alignItems: "stretch",
				cursor: "pointer",
				paddingBottom: 2,
				paddingRight: 2,
				paddingTop: 2,
				...i.isDragging && { backgroundColor: "action.hover" }
			},
			disableGutters: !0,
			key: t.id
		}, /* @__PURE__ */ z(gw, {
			...n.dragHandleProps,
			sx: {
				"&:hover": { backgroundColor: i.isDragging ? "action.selected" : "action.hover" },
				backgroundColor: i.isDragging ? "action.selected" : "shades.light"
			},
			children: /* @__PURE__ */ z(ia, {
				title: r("layer_move"),
				children: /* @__PURE__ */ z(Ug, {})
			})
		}), e)
	});
}
yw.propTypes = {
	children: W.default.node.isRequired,
	index: W.default.number.isRequired,
	resource: W.default.object.isRequired
};
function bw({ canvasId: e, index: t, label: n, layers: r, layerMetadata: i = {}, totalSize: a, updateLayers: o, windowId: s }) {
	let { t: c } = V(), l = Pi(), u = I((t, n) => {
		o(s, e, { [t]: { opacity: n / 100 } });
	}, [
		e,
		o,
		s
	]), d = I((t) => {
		if (!t.destination || t.destination.droppableId !== l || t.source.droppableId !== l) return;
		let n = _w(r.map((e) => e.id), t.source.index, t.destination.index);
		o(s, e, r.reduce((e, t) => (e[t.id] = { index: n.indexOf(t.id) }, e), {}));
	}, [
		e,
		l,
		r,
		o,
		s
	]), f = I((t, n) => {
		o(s, e, { [t]: { visibility: n } });
	}, [
		e,
		o,
		s
	]), p = I((t) => {
		let n = _w(r.map((e) => e.id), r.findIndex((e) => e.id === t), 0);
		o(s, e, r.reduce((e, t) => (e[t.id] = { index: n.indexOf(t.id) }, e), {}));
	}, [
		e,
		r,
		o,
		s
	]), m = I((t) => {
		let n = _w(r.map((e) => e.id), r.findIndex((e) => e.id === t), r.length - 1);
		o(s, e, r.reduce((e, t) => (e[t.id] = { index: n.indexOf(t.id) }, e), {}));
	}, [
		e,
		r,
		o,
		s
	]);
	return /* @__PURE__ */ B(Bi, { children: [a > 1 && /* @__PURE__ */ z(U, {
		sx: {
			paddingLeft: 1,
			paddingRight: 1,
			paddingTop: 2
		},
		variant: "overline",
		children: c("annotationCanvasLabel", {
			context: `${t + 1}/${a}`,
			label: n
		})
	}), /* @__PURE__ */ z(mC, {
		onDragEnd: d,
		children: /* @__PURE__ */ z(hw, {
			droppableId: l,
			children: (e, t) => /* @__PURE__ */ B(ja, {
				sx: { paddingTop: 0 },
				...e.droppableProps,
				ref: e.innerRef,
				children: [r && r.map((e, t) => /* @__PURE__ */ z(yw, {
					resource: e,
					index: t,
					children: /* @__PURE__ */ z(vw, {
						resource: e,
						index: t,
						layerMetadata: (i || {})[e.id] || {},
						handleOpacityChange: u,
						setLayerVisibility: f,
						moveToBackground: p,
						moveToFront: m
					})
				}, e.id)), e.placeholder]
			})
		})
	})] });
}
bw.propTypes = {
	canvasId: W.default.string.isRequired,
	index: W.default.number.isRequired,
	label: W.default.string.isRequired,
	layerMetadata: W.default.objectOf(W.default.shape({ opacity: W.default.number })),
	layers: W.default.arrayOf(W.default.shape({})).isRequired,
	totalSize: W.default.number.isRequired,
	updateLayers: W.default.func.isRequired,
	windowId: W.default.string.isRequired
};
var xw = i(O((e, { canvasId: t, companionWindowId: n, windowId: r }) => ({
	label: Dt(e, {
		canvasId: t,
		companionWindowId: n,
		windowId: r
	}),
	layerMetadata: Dr(e, {
		canvasId: t,
		companionWindowId: n,
		windowId: r
	}),
	layers: Er(e, {
		canvasId: t,
		companionWindowId: n,
		windowId: r
	})
}), { updateLayers: lc }))(bw);
//#endregion
//#region src/components/LayersPanel.jsx
function Sw({ canvasIds: e = [], id: t, windowId: n }) {
	let { t: r } = V();
	return /* @__PURE__ */ z(pf, {
		title: r("layers"),
		id: t,
		windowId: n,
		children: e.map((t, r) => /* @__PURE__ */ z(xw, {
			canvasId: t,
			index: r,
			totalSize: e.length,
			windowId: n
		}, t))
	});
}
Sw.propTypes = {
	canvasIds: W.default.arrayOf(W.default.string),
	id: W.default.string.isRequired,
	windowId: W.default.string.isRequired
};
var Cw = i(O((e, { id: t, windowId: n }) => ({ canvasIds: dn(e, { windowId: n }) })), A("LayersPanel"))(Sw);
//#endregion
//#region src/components/CustomPanel.jsx
function ww({ id: e, children: t = null, title: n, windowId: r }) {
	let { t: i } = V();
	return /* @__PURE__ */ z(pf, {
		title: i(n),
		id: e,
		windowId: r,
		children: t
	});
}
ww.propTypes = {
	children: W.default.node,
	id: W.default.string.isRequired,
	title: W.default.string.isRequired,
	windowId: W.default.string.isRequired
};
var Tw = i(O((e, { id: t, windowId: n }) => ({})), A("CustomPanel"))(ww), Ew = N(/*#__PURE__*/ z("path", { d: "m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z" }), "ArrowUpwardSharp");
//#endregion
//#region src/components/WindowSideBarCollectionPanel.jsx
function Dw({ manifest: e, canvasNavigation: t, variant: n, ...r }) {
	return /* @__PURE__ */ B(sa, {
		divider: !0,
		component: "li",
		variant: "multiline",
		sx: {
			alignItems: "flex-start",
			paddingRight: 1
		},
		...r,
		children: [n === "thumbnail" && /* @__PURE__ */ z(Ia, { children: /* @__PURE__ */ z(ei, {
			resource: e,
			maxHeight: t.height,
			maxWidth: t.width
		}) }), /* @__PURE__ */ z(ca, { children: /* @__PURE__ */ z(Xr, { resource: e }) })]
	});
}
Dw.propTypes = {
	canvasNavigation: W.default.shape({
		height: W.default.number,
		width: W.default.number
	}).isRequired,
	manifest: W.default.object.isRequired,
	variant: W.default.string.isRequired
};
function Ow({ canvasNavigation: e, collectionPath: t = [], collection: n = null, id: r, isFetching: i = !1, manifestId: a, parentCollection: o = null, updateCompanionWindow: s, updateWindow: c, variant: l = null, windowId: u }) {
	let { t: d } = V(), f = (() => {
		if (!n) return !1;
		let e = n.getProperty("behavior");
		return e ? Array.isArray(e) ? e.includes("multi-part") : e === "multi-part" : !1;
	})();
	return /* @__PURE__ */ z(pf, {
		title: d(f ? "multipartCollection" : "collection"),
		windowId: u,
		id: r,
		titleControls: /* @__PURE__ */ B(Bi, { children: [o && /* @__PURE__ */ z(ja, { children: /* @__PURE__ */ B(Na, {
			onClick: () => s({ collectionPath: t.slice(0, -1) }),
			children: [/* @__PURE__ */ z(Ia, { children: /* @__PURE__ */ z(Ew, {}) }), /* @__PURE__ */ z(ca, {
				slotProps: { primary: { variant: "body1" } },
				children: /* @__PURE__ */ z(Xr, { resource: o })
			})]
		}) }), /* @__PURE__ */ B(U, {
			variant: "h6",
			children: [n && /* @__PURE__ */ z(Xr, { resource: n }), i && /* @__PURE__ */ z(Da, { variant: "text" })]
		})] }),
		children: /* @__PURE__ */ B(oa, { children: [
			i && /* @__PURE__ */ z(sa, { children: /* @__PURE__ */ B(ca, { children: [
				/* @__PURE__ */ z(Da, { variant: "text" }),
				/* @__PURE__ */ z(Da, { variant: "text" }),
				/* @__PURE__ */ z(Da, { variant: "text" })
			] }) }),
			n && n.getCollections().map((n) => /* @__PURE__ */ z(Dw, {
				onClick: () => {
					s({ collectionPath: [...t, n.id] });
				},
				canvasNavigation: e,
				manifest: n,
				variant: l,
				selected: a === n.id
			}, n.id)),
			n && n.getManifests().map((n) => /* @__PURE__ */ z(Dw, {
				onClick: () => {
					c({
						canvasId: null,
						collectionPath: t,
						manifestId: n.id
					}), s({ multipart: !1 });
				},
				canvasNavigation: e,
				manifest: n,
				variant: l,
				selected: a === n.id
			}, n.id))
		] })
	});
}
Ow.propTypes = {
	canvasNavigation: W.default.shape({
		height: W.default.number,
		width: W.default.number
	}).isRequired,
	collection: W.default.object,
	collectionPath: W.default.arrayOf(W.default.string),
	id: W.default.string.isRequired,
	isFetching: W.default.bool,
	manifestId: W.default.string.isRequired,
	parentCollection: W.default.object,
	updateCompanionWindow: W.default.func.isRequired,
	updateWindow: W.default.func.isRequired,
	variant: W.default.string,
	windowId: W.default.string.isRequired
};
var kw = i(O((e, { id: t, windowId: n }) => {
	let r = b(e, { windowId: n }), i = Fe(e, { companionWindowId: t }), { collectionPath: a } = i, o = a || r.collectionPath, s = o && o[o.length - 1], c = o && o[o.length - 2], l = s && le(e, { manifestId: s }), u = c && le(e, { manifestId: c }), d = le(e, { windowId: n });
	return {
		canvasNavigation: e.config.canvasNavigation,
		collection: l && un(e, { manifestId: l.id }),
		collectionId: s,
		collectionPath: o,
		error: l && l.error,
		isFetching: l && l.isFetching,
		manifestId: d && d.id,
		parentCollection: u && un(e, { manifestId: u.id }),
		ready: l && !!l.json,
		variant: i.variant || Go(e, { windowId: n })
	};
}, (e, { id: t, windowId: n }) => ({
	updateCompanionWindow: (...r) => e(xs(n, t, ...r)),
	updateWindow: (...t) => e(Pr(n, ...t))
})), A("WindowSideBarCollectionPanel"))(Ow), Aw = {
	annotations: gf,
	attribution: dg,
	canvas: og,
	collection: kw,
	custom: Tw,
	info: If,
	layers: Cw,
	search: Hg,
	thumbnailNavigation: Vc
};
//#endregion
//#region src/extend/pluginMapping.js
function jw(e) {
	return e.reduce((e, t) => (0, jo.default)(e, [t.target, t.mode], (e) => [...e || [], t]), {});
}
function Mw(e) {
	return e.map((e) => ({
		...e,
		component: Pw(e)
	}));
}
function Nw(e) {
	return e.filter((e) => e.companionWindowKey).forEach((e) => {
		Aw[e.companionWindowKey] = e.component;
	}), Aw;
}
function Pw(e) {
	return !e.mapStateToProps && !e.mapDispatchToProps ? e.component : O(e.mapStateToProps, e.mapDispatchToProps, ...e.connectOptions || [])(e.component);
}
//#endregion
//#region src/extend/PluginProvider.jsx
function Fw({ plugins: e = [], children: t = null }) {
	let [n, r] = zi({});
	return L(() => {
		let t = Mw(e);
		Nw(t), r(jw(t));
	}, [e]), /* @__PURE__ */ z(fe.Provider, {
		value: n,
		children: t
	});
}
Fw.propTypes = {
	children: W.default.node,
	plugins: W.default.array
};
//#endregion
//#region node_modules/react-dnd/dist/core/DndContext.js
var Iw = Ei({ dragDropManager: void 0 });
//#endregion
//#region node_modules/dnd-core/node_modules/redux/es/redux.js
function Lw(e) {
	return "Minified Redux error #" + e + "; visit https://redux.js.org/Errors?code=" + e + " for the full message or use the non-minified dev environment for full errors. ";
}
var Rw = (function() {
	return typeof Symbol == "function" && Symbol.observable || "@@observable";
})(), zw = function() {
	return Math.random().toString(36).substring(7).split("").join(".");
}, Bw = {
	INIT: "@@redux/INIT" + zw(),
	REPLACE: "@@redux/REPLACE" + zw(),
	PROBE_UNKNOWN_ACTION: function() {
		return "@@redux/PROBE_UNKNOWN_ACTION" + zw();
	}
};
function Vw(e) {
	if (typeof e != "object" || !e) return !1;
	for (var t = e; Object.getPrototypeOf(t) !== null;) t = Object.getPrototypeOf(t);
	return Object.getPrototypeOf(e) === t;
}
function Hw(e, t, n) {
	var r;
	if (typeof t == "function" && typeof n == "function" || typeof n == "function" && typeof arguments[3] == "function") throw Error(Lw(0));
	if (typeof t == "function" && n === void 0 && (n = t, t = void 0), n !== void 0) {
		if (typeof n != "function") throw Error(Lw(1));
		return n(Hw)(e, t);
	}
	if (typeof e != "function") throw Error(Lw(2));
	var i = e, a = t, o = [], s = o, c = !1;
	function l() {
		s === o && (s = o.slice());
	}
	function u() {
		if (c) throw Error(Lw(3));
		return a;
	}
	function d(e) {
		if (typeof e != "function") throw Error(Lw(4));
		if (c) throw Error(Lw(5));
		var t = !0;
		return l(), s.push(e), function() {
			if (t) {
				if (c) throw Error(Lw(6));
				t = !1, l();
				var n = s.indexOf(e);
				s.splice(n, 1), o = null;
			}
		};
	}
	function f(e) {
		if (!Vw(e)) throw Error(Lw(7));
		if (e.type === void 0) throw Error(Lw(8));
		if (c) throw Error(Lw(9));
		try {
			c = !0, a = i(a, e);
		} finally {
			c = !1;
		}
		for (var t = o = s, n = 0; n < t.length; n++) {
			var r = t[n];
			r();
		}
		return e;
	}
	function p(e) {
		if (typeof e != "function") throw Error(Lw(10));
		i = e, f({ type: Bw.REPLACE });
	}
	function m() {
		var e, t = d;
		return e = { subscribe: function(e) {
			if (typeof e != "object" || !e) throw Error(Lw(11));
			function n() {
				e.next && e.next(u());
			}
			return n(), { unsubscribe: t(n) };
		} }, e[Rw] = function() {
			return this;
		}, e;
	}
	return f({ type: Bw.INIT }), r = {
		dispatch: f,
		subscribe: d,
		getState: u,
		replaceReducer: p
	}, r[Rw] = m, r;
}
//#endregion
//#region node_modules/@react-dnd/invariant/dist/index.js
function Z(e, t, ...n) {
	if (Uw() && t === void 0) throw Error("invariant requires an error message argument");
	if (!e) {
		let e;
		if (t === void 0) e = /* @__PURE__ */ Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
		else {
			let r = 0;
			e = Error(t.replace(/%s/g, function() {
				return n[r++];
			})), e.name = "Invariant Violation";
		}
		throw e.framesToPop = 1, e;
	}
}
function Uw() {
	return typeof process < "u" && !0;
}
//#endregion
//#region node_modules/dnd-core/dist/utils/js_utils.js
function Ww(e, t, n) {
	return t.split(".").reduce((e, t) => e && e[t] ? e[t] : n || null, e);
}
function Gw(e, t) {
	return e.filter((e) => e !== t);
}
function Kw(e) {
	return typeof e == "object";
}
function qw(e, t) {
	let n = /* @__PURE__ */ new Map(), r = (e) => {
		n.set(e, n.has(e) ? n.get(e) + 1 : 1);
	};
	e.forEach(r), t.forEach(r);
	let i = [];
	return n.forEach((e, t) => {
		e === 1 && i.push(t);
	}), i;
}
function Jw(e, t) {
	return e.filter((e) => t.indexOf(e) > -1);
}
//#endregion
//#region node_modules/dnd-core/dist/actions/dragDrop/types.js
var Yw = "dnd-core/INIT_COORDS", Xw = "dnd-core/BEGIN_DRAG", Zw = "dnd-core/PUBLISH_DRAG_SOURCE", Qw = "dnd-core/HOVER", $w = "dnd-core/DROP", eT = "dnd-core/END_DRAG";
//#endregion
//#region node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js
function tT(e, t) {
	return {
		type: Yw,
		payload: {
			sourceClientOffset: t || null,
			clientOffset: e || null
		}
	};
}
//#endregion
//#region node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js
var nT = {
	type: Yw,
	payload: {
		clientOffset: null,
		sourceClientOffset: null
	}
};
function rT(e) {
	return function(t = [], n = { publishSource: !0 }) {
		let { publishSource: r = !0, clientOffset: i, getSourceClientOffset: a } = n, o = e.getMonitor(), s = e.getRegistry();
		e.dispatch(tT(i)), iT(t, o, s);
		let c = sT(t, o);
		if (c == null) {
			e.dispatch(nT);
			return;
		}
		let l = null;
		if (i) {
			if (!a) throw Error("getSourceClientOffset must be defined");
			aT(a), l = a(c);
		}
		e.dispatch(tT(i, l));
		let u = s.getSource(c).beginDrag(o, c);
		return u == null ? void 0 : (oT(u), s.pinSource(c), {
			type: Xw,
			payload: {
				itemType: s.getSourceType(c),
				item: u,
				sourceId: c,
				clientOffset: i || null,
				sourceClientOffset: l || null,
				isSourcePublic: !!r
			}
		});
	};
}
function iT(e, t, n) {
	Z(!t.isDragging(), "Cannot call beginDrag while dragging."), e.forEach(function(e) {
		Z(n.getSource(e), "Expected sourceIds to be registered.");
	});
}
function aT(e) {
	Z(typeof e == "function", "When clientOffset is provided, getSourceClientOffset must be a function.");
}
function oT(e) {
	Z(Kw(e), "Item must be an object.");
}
function sT(e, t) {
	let n = null;
	for (let r = e.length - 1; r >= 0; r--) if (t.canDragSource(e[r])) {
		n = e[r];
		break;
	}
	return n;
}
//#endregion
//#region node_modules/dnd-core/dist/actions/dragDrop/drop.js
function cT(e, t, n) {
	return t in e ? Object.defineProperty(e, t, {
		value: n,
		enumerable: !0,
		configurable: !0,
		writable: !0
	}) : e[t] = n, e;
}
function lT(e) {
	for (var t = 1; t < arguments.length; t++) {
		var n = arguments[t] == null ? {} : arguments[t], r = Object.keys(n);
		typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(e) {
			return Object.getOwnPropertyDescriptor(n, e).enumerable;
		}))), r.forEach(function(t) {
			cT(e, t, n[t]);
		});
	}
	return e;
}
function uT(e) {
	return function(t = {}) {
		let n = e.getMonitor(), r = e.getRegistry();
		dT(n), mT(n).forEach((i, a) => {
			let o = {
				type: $w,
				payload: { dropResult: lT({}, t, fT(i, a, r, n)) }
			};
			e.dispatch(o);
		});
	};
}
function dT(e) {
	Z(e.isDragging(), "Cannot call drop while not dragging."), Z(!e.didDrop(), "Cannot call drop twice during one drag operation.");
}
function fT(e, t, n, r) {
	let i = n.getTarget(e), a = i ? i.drop(r, e) : void 0;
	return pT(a), a === void 0 && (a = t === 0 ? {} : r.getDropResult()), a;
}
function pT(e) {
	Z(e === void 0 || Kw(e), "Drop result must either be an object or undefined.");
}
function mT(e) {
	let t = e.getTargetIds().filter(e.canDropOnTarget, e);
	return t.reverse(), t;
}
//#endregion
//#region node_modules/dnd-core/dist/actions/dragDrop/endDrag.js
function hT(e) {
	return function() {
		let t = e.getMonitor(), n = e.getRegistry();
		gT(t);
		let r = t.getSourceId();
		return r != null && (n.getSource(r, !0).endDrag(t, r), n.unpinSource()), { type: eT };
	};
}
function gT(e) {
	Z(e.isDragging(), "Cannot call endDrag while not dragging.");
}
//#endregion
//#region node_modules/dnd-core/dist/utils/matchesType.js
function _T(e, t) {
	return t === null ? e === null : Array.isArray(e) ? e.some((e) => e === t) : e === t;
}
//#endregion
//#region node_modules/dnd-core/dist/actions/dragDrop/hover.js
function vT(e) {
	return function(t, { clientOffset: n } = {}) {
		yT(t);
		let r = t.slice(0), i = e.getMonitor(), a = e.getRegistry();
		return xT(r, a, i.getItemType()), bT(r, i, a), ST(r, i, a), {
			type: Qw,
			payload: {
				targetIds: r,
				clientOffset: n || null
			}
		};
	};
}
function yT(e) {
	Z(Array.isArray(e), "Expected targetIds to be an array.");
}
function bT(e, t, n) {
	Z(t.isDragging(), "Cannot call hover while not dragging."), Z(!t.didDrop(), "Cannot call hover after drop.");
	for (let t = 0; t < e.length; t++) {
		let r = e[t];
		Z(e.lastIndexOf(r) === t, "Expected targetIds to be unique in the passed array."), Z(n.getTarget(r), "Expected targetIds to be registered.");
	}
}
function xT(e, t, n) {
	for (let r = e.length - 1; r >= 0; r--) {
		let i = e[r];
		_T(t.getTargetType(i), n) || e.splice(r, 1);
	}
}
function ST(e, t, n) {
	e.forEach(function(e) {
		n.getTarget(e).hover(t, e);
	});
}
//#endregion
//#region node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js
function CT(e) {
	return function() {
		if (e.getMonitor().isDragging()) return { type: Zw };
	};
}
//#endregion
//#region node_modules/dnd-core/dist/actions/dragDrop/index.js
function wT(e) {
	return {
		beginDrag: rT(e),
		publishDragSource: CT(e),
		hover: vT(e),
		drop: uT(e),
		endDrag: hT(e)
	};
}
//#endregion
//#region node_modules/dnd-core/dist/classes/DragDropManagerImpl.js
var TT = class {
	receiveBackend(e) {
		this.backend = e;
	}
	getMonitor() {
		return this.monitor;
	}
	getBackend() {
		return this.backend;
	}
	getRegistry() {
		return this.monitor.registry;
	}
	getActions() {
		let e = this, { dispatch: t } = this.store;
		function n(n) {
			return (...r) => {
				let i = n.apply(e, r);
				i !== void 0 && t(i);
			};
		}
		let r = wT(this);
		return Object.keys(r).reduce((e, t) => {
			let i = r[t];
			return e[t] = n(i), e;
		}, {});
	}
	dispatch(e) {
		this.store.dispatch(e);
	}
	constructor(e, t) {
		this.isSetUp = !1, this.handleRefCountChange = () => {
			let e = this.store.getState().refCount > 0;
			this.backend && (e && !this.isSetUp ? (this.backend.setup(), this.isSetUp = !0) : !e && this.isSetUp && (this.backend.teardown(), this.isSetUp = !1));
		}, this.store = e, this.monitor = t, e.subscribe(this.handleRefCountChange);
	}
};
//#endregion
//#region node_modules/dnd-core/dist/utils/coords.js
function ET(e, t) {
	return {
		x: e.x + t.x,
		y: e.y + t.y
	};
}
function DT(e, t) {
	return {
		x: e.x - t.x,
		y: e.y - t.y
	};
}
function OT(e) {
	let { clientOffset: t, initialClientOffset: n, initialSourceClientOffset: r } = e;
	return !t || !n || !r ? null : DT(ET(t, r), n);
}
function kT(e) {
	let { clientOffset: t, initialClientOffset: n } = e;
	return !t || !n ? null : DT(t, n);
}
//#endregion
//#region node_modules/dnd-core/dist/utils/dirtiness.js
var AT = [], jT = [];
AT.__IS_NONE__ = !0, jT.__IS_ALL__ = !0;
function MT(e, t) {
	return e === AT ? !1 : e === jT || t === void 0 || Jw(t, e).length > 0;
}
//#endregion
//#region node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js
var NT = class {
	subscribeToStateChange(e, t = {}) {
		let { handlerIds: n } = t;
		Z(typeof e == "function", "listener must be a function."), Z(n === void 0 || Array.isArray(n), "handlerIds, when specified, must be an array of strings.");
		let r = this.store.getState().stateId;
		return this.store.subscribe(() => {
			let t = this.store.getState(), i = t.stateId;
			try {
				i === r || i === r + 1 && !MT(t.dirtyHandlerIds, n) || e();
			} finally {
				r = i;
			}
		});
	}
	subscribeToOffsetChange(e) {
		Z(typeof e == "function", "listener must be a function.");
		let t = this.store.getState().dragOffset;
		return this.store.subscribe(() => {
			let n = this.store.getState().dragOffset;
			n !== t && (t = n, e());
		});
	}
	canDragSource(e) {
		if (!e) return !1;
		let t = this.registry.getSource(e);
		return Z(t, `Expected to find a valid source. sourceId=${e}`), !this.isDragging() && t.canDrag(this, e);
	}
	canDropOnTarget(e) {
		if (!e) return !1;
		let t = this.registry.getTarget(e);
		return Z(t, `Expected to find a valid target. targetId=${e}`), !this.isDragging() || this.didDrop() ? !1 : _T(this.registry.getTargetType(e), this.getItemType()) && t.canDrop(this, e);
	}
	isDragging() {
		return !!this.getItemType();
	}
	isDraggingSource(e) {
		if (!e) return !1;
		let t = this.registry.getSource(e, !0);
		return Z(t, `Expected to find a valid source. sourceId=${e}`), !this.isDragging() || !this.isSourcePublic() || this.registry.getSourceType(e) !== this.getItemType() ? !1 : t.isDragging(this, e);
	}
	isOverTarget(e, t = { shallow: !1 }) {
		if (!e) return !1;
		let { shallow: n } = t;
		if (!this.isDragging()) return !1;
		let r = this.registry.getTargetType(e), i = this.getItemType();
		if (i && !_T(r, i)) return !1;
		let a = this.getTargetIds();
		if (!a.length) return !1;
		let o = a.indexOf(e);
		return n ? o === a.length - 1 : o > -1;
	}
	getItemType() {
		return this.store.getState().dragOperation.itemType;
	}
	getItem() {
		return this.store.getState().dragOperation.item;
	}
	getSourceId() {
		return this.store.getState().dragOperation.sourceId;
	}
	getTargetIds() {
		return this.store.getState().dragOperation.targetIds;
	}
	getDropResult() {
		return this.store.getState().dragOperation.dropResult;
	}
	didDrop() {
		return this.store.getState().dragOperation.didDrop;
	}
	isSourcePublic() {
		return !!this.store.getState().dragOperation.isSourcePublic;
	}
	getInitialClientOffset() {
		return this.store.getState().dragOffset.initialClientOffset;
	}
	getInitialSourceClientOffset() {
		return this.store.getState().dragOffset.initialSourceClientOffset;
	}
	getClientOffset() {
		return this.store.getState().dragOffset.clientOffset;
	}
	getSourceClientOffset() {
		return OT(this.store.getState().dragOffset);
	}
	getDifferenceFromInitialOffset() {
		return kT(this.store.getState().dragOffset);
	}
	constructor(e, t) {
		this.store = e, this.registry = t;
	}
}, PT = typeof global < "u" ? global : self, FT = PT.MutationObserver || PT.WebKitMutationObserver;
function IT(e) {
	return function() {
		let t = setTimeout(r, 0), n = setInterval(r, 50);
		function r() {
			clearTimeout(t), clearInterval(n), e();
		}
	};
}
function LT(e) {
	let t = 1, n = new FT(e), r = document.createTextNode("");
	return n.observe(r, { characterData: !0 }), function() {
		t = -t, r.data = t;
	};
}
var RT = typeof FT == "function" ? LT : IT, zT = class {
	enqueueTask(e) {
		let { queue: t, requestFlush: n } = this;
		t.length || (n(), this.flushing = !0), t[t.length] = e;
	}
	constructor() {
		this.queue = [], this.pendingErrors = [], this.flushing = !1, this.index = 0, this.capacity = 1024, this.flush = () => {
			let { queue: e } = this;
			for (; this.index < e.length;) {
				let t = this.index;
				if (this.index++, e[t].call(), this.index > this.capacity) {
					for (let t = 0, n = e.length - this.index; t < n; t++) e[t] = e[t + this.index];
					e.length -= this.index, this.index = 0;
				}
			}
			e.length = 0, this.index = 0, this.flushing = !1;
		}, this.registerPendingError = (e) => {
			this.pendingErrors.push(e), this.requestErrorThrow();
		}, this.requestFlush = RT(this.flush), this.requestErrorThrow = IT(() => {
			if (this.pendingErrors.length) throw this.pendingErrors.shift();
		});
	}
}, BT = class {
	call() {
		try {
			this.task && this.task();
		} catch (e) {
			this.onError(e);
		} finally {
			this.task = null, this.release(this);
		}
	}
	constructor(e, t) {
		this.onError = e, this.release = t, this.task = null;
	}
}, VT = class {
	create(e) {
		let t = this.freeTasks, n = t.length ? t.pop() : new BT(this.onError, (e) => t[t.length] = e);
		return n.task = e, n;
	}
	constructor(e) {
		this.onError = e, this.freeTasks = [];
	}
}, HT = new zT(), UT = new VT(HT.registerPendingError);
function WT(e) {
	HT.enqueueTask(UT.create(e));
}
//#endregion
//#region node_modules/dnd-core/dist/actions/registry.js
var GT = "dnd-core/ADD_SOURCE", KT = "dnd-core/ADD_TARGET", qT = "dnd-core/REMOVE_SOURCE", JT = "dnd-core/REMOVE_TARGET";
function YT(e) {
	return {
		type: GT,
		payload: { sourceId: e }
	};
}
function XT(e) {
	return {
		type: KT,
		payload: { targetId: e }
	};
}
function ZT(e) {
	return {
		type: qT,
		payload: { sourceId: e }
	};
}
function QT(e) {
	return {
		type: JT,
		payload: { targetId: e }
	};
}
//#endregion
//#region node_modules/dnd-core/dist/contracts.js
function $T(e) {
	Z(typeof e.canDrag == "function", "Expected canDrag to be a function."), Z(typeof e.beginDrag == "function", "Expected beginDrag to be a function."), Z(typeof e.endDrag == "function", "Expected endDrag to be a function.");
}
function eE(e) {
	Z(typeof e.canDrop == "function", "Expected canDrop to be a function."), Z(typeof e.hover == "function", "Expected hover to be a function."), Z(typeof e.drop == "function", "Expected beginDrag to be a function.");
}
function tE(e, t) {
	if (t && Array.isArray(e)) {
		e.forEach((e) => tE(e, !1));
		return;
	}
	Z(typeof e == "string" || typeof e == "symbol", t ? "Type can only be a string, a symbol, or an array of either." : "Type can only be a string or a symbol.");
}
//#endregion
//#region node_modules/dnd-core/dist/interfaces.js
var nE;
(function(e) {
	e.SOURCE = "SOURCE", e.TARGET = "TARGET";
})(nE ||= {});
//#endregion
//#region node_modules/dnd-core/dist/utils/getNextUniqueId.js
var rE = 0;
function iE() {
	return rE++;
}
//#endregion
//#region node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js
function aE(e) {
	let t = iE().toString();
	switch (e) {
		case nE.SOURCE: return `S${t}`;
		case nE.TARGET: return `T${t}`;
		default: throw Error(`Unknown Handler Role: ${e}`);
	}
}
function oE(e) {
	switch (e[0]) {
		case "S": return nE.SOURCE;
		case "T": return nE.TARGET;
		default: throw Error(`Cannot parse handler ID: ${e}`);
	}
}
function sE(e, t) {
	let n = e.entries(), r = !1;
	do {
		let { done: e, value: [, i] } = n.next();
		if (i === t) return !0;
		r = !!e;
	} while (!r);
	return !1;
}
var cE = class {
	addSource(e, t) {
		tE(e), $T(t);
		let n = this.addHandler(nE.SOURCE, e, t);
		return this.store.dispatch(YT(n)), n;
	}
	addTarget(e, t) {
		tE(e, !0), eE(t);
		let n = this.addHandler(nE.TARGET, e, t);
		return this.store.dispatch(XT(n)), n;
	}
	containsHandler(e) {
		return sE(this.dragSources, e) || sE(this.dropTargets, e);
	}
	getSource(e, t = !1) {
		return Z(this.isSourceId(e), "Expected a valid source ID."), t && e === this.pinnedSourceId ? this.pinnedSource : this.dragSources.get(e);
	}
	getTarget(e) {
		return Z(this.isTargetId(e), "Expected a valid target ID."), this.dropTargets.get(e);
	}
	getSourceType(e) {
		return Z(this.isSourceId(e), "Expected a valid source ID."), this.types.get(e);
	}
	getTargetType(e) {
		return Z(this.isTargetId(e), "Expected a valid target ID."), this.types.get(e);
	}
	isSourceId(e) {
		return oE(e) === nE.SOURCE;
	}
	isTargetId(e) {
		return oE(e) === nE.TARGET;
	}
	removeSource(e) {
		Z(this.getSource(e), "Expected an existing source."), this.store.dispatch(ZT(e)), WT(() => {
			this.dragSources.delete(e), this.types.delete(e);
		});
	}
	removeTarget(e) {
		Z(this.getTarget(e), "Expected an existing target."), this.store.dispatch(QT(e)), this.dropTargets.delete(e), this.types.delete(e);
	}
	pinSource(e) {
		let t = this.getSource(e);
		Z(t, "Expected an existing source."), this.pinnedSourceId = e, this.pinnedSource = t;
	}
	unpinSource() {
		Z(this.pinnedSource, "No source is pinned at the time."), this.pinnedSourceId = null, this.pinnedSource = null;
	}
	addHandler(e, t, n) {
		let r = aE(e);
		return this.types.set(r, t), e === nE.SOURCE ? this.dragSources.set(r, n) : e === nE.TARGET && this.dropTargets.set(r, n), r;
	}
	constructor(e) {
		this.types = /* @__PURE__ */ new Map(), this.dragSources = /* @__PURE__ */ new Map(), this.dropTargets = /* @__PURE__ */ new Map(), this.pinnedSourceId = null, this.pinnedSource = null, this.store = e;
	}
}, lE = (e, t) => e === t;
function uE(e, t) {
	return !e && !t ? !0 : !e || !t ? !1 : e.x === t.x && e.y === t.y;
}
function dE(e, t, n = lE) {
	if (e.length !== t.length) return !1;
	for (let r = 0; r < e.length; ++r) if (!n(e[r], t[r])) return !1;
	return !0;
}
//#endregion
//#region node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js
function fE(e = AT, t) {
	switch (t.type) {
		case Qw: break;
		case GT:
		case KT:
		case JT:
		case qT: return AT;
		case Xw:
		case Zw:
		case eT:
		case $w:
		default: return jT;
	}
	let { targetIds: n = [], prevTargetIds: r = [] } = t.payload, i = qw(n, r);
	if (!(i.length > 0 || !dE(n, r))) return AT;
	let a = r[r.length - 1], o = n[n.length - 1];
	return a !== o && (a && i.push(a), o && i.push(o)), i;
}
//#endregion
//#region node_modules/dnd-core/dist/reducers/dragOffset.js
function pE(e, t, n) {
	return t in e ? Object.defineProperty(e, t, {
		value: n,
		enumerable: !0,
		configurable: !0,
		writable: !0
	}) : e[t] = n, e;
}
function mE(e) {
	for (var t = 1; t < arguments.length; t++) {
		var n = arguments[t] == null ? {} : arguments[t], r = Object.keys(n);
		typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(e) {
			return Object.getOwnPropertyDescriptor(n, e).enumerable;
		}))), r.forEach(function(t) {
			pE(e, t, n[t]);
		});
	}
	return e;
}
var hE = {
	initialSourceClientOffset: null,
	initialClientOffset: null,
	clientOffset: null
};
function gE(e = hE, t) {
	let { payload: n } = t;
	switch (t.type) {
		case Yw:
		case Xw: return {
			initialSourceClientOffset: n.sourceClientOffset,
			initialClientOffset: n.clientOffset,
			clientOffset: n.clientOffset
		};
		case Qw: return uE(e.clientOffset, n.clientOffset) ? e : mE({}, e, { clientOffset: n.clientOffset });
		case eT:
		case $w: return hE;
		default: return e;
	}
}
//#endregion
//#region node_modules/dnd-core/dist/reducers/dragOperation.js
function _E(e, t, n) {
	return t in e ? Object.defineProperty(e, t, {
		value: n,
		enumerable: !0,
		configurable: !0,
		writable: !0
	}) : e[t] = n, e;
}
function vE(e) {
	for (var t = 1; t < arguments.length; t++) {
		var n = arguments[t] == null ? {} : arguments[t], r = Object.keys(n);
		typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(e) {
			return Object.getOwnPropertyDescriptor(n, e).enumerable;
		}))), r.forEach(function(t) {
			_E(e, t, n[t]);
		});
	}
	return e;
}
var yE = {
	itemType: null,
	item: null,
	sourceId: null,
	targetIds: [],
	dropResult: null,
	didDrop: !1,
	isSourcePublic: null
};
function bE(e = yE, t) {
	let { payload: n } = t;
	switch (t.type) {
		case Xw: return vE({}, e, {
			itemType: n.itemType,
			item: n.item,
			sourceId: n.sourceId,
			isSourcePublic: n.isSourcePublic,
			dropResult: null,
			didDrop: !1
		});
		case Zw: return vE({}, e, { isSourcePublic: !0 });
		case Qw: return vE({}, e, { targetIds: n.targetIds });
		case JT: return e.targetIds.indexOf(n.targetId) === -1 ? e : vE({}, e, { targetIds: Gw(e.targetIds, n.targetId) });
		case $w: return vE({}, e, {
			dropResult: n.dropResult,
			didDrop: !0,
			targetIds: []
		});
		case eT: return vE({}, e, {
			itemType: null,
			item: null,
			sourceId: null,
			dropResult: null,
			didDrop: !1,
			isSourcePublic: null,
			targetIds: []
		});
		default: return e;
	}
}
//#endregion
//#region node_modules/dnd-core/dist/reducers/refCount.js
function xE(e = 0, t) {
	switch (t.type) {
		case GT:
		case KT: return e + 1;
		case qT:
		case JT: return e - 1;
		default: return e;
	}
}
//#endregion
//#region node_modules/dnd-core/dist/reducers/stateId.js
function SE(e = 0) {
	return e + 1;
}
//#endregion
//#region node_modules/dnd-core/dist/reducers/index.js
function CE(e, t, n) {
	return t in e ? Object.defineProperty(e, t, {
		value: n,
		enumerable: !0,
		configurable: !0,
		writable: !0
	}) : e[t] = n, e;
}
function wE(e) {
	for (var t = 1; t < arguments.length; t++) {
		var n = arguments[t] == null ? {} : arguments[t], r = Object.keys(n);
		typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(e) {
			return Object.getOwnPropertyDescriptor(n, e).enumerable;
		}))), r.forEach(function(t) {
			CE(e, t, n[t]);
		});
	}
	return e;
}
function TE(e = {}, t) {
	return {
		dirtyHandlerIds: fE(e.dirtyHandlerIds, {
			type: t.type,
			payload: wE({}, t.payload, { prevTargetIds: Ww(e, "dragOperation.targetIds", []) })
		}),
		dragOffset: gE(e.dragOffset, t),
		refCount: xE(e.refCount, t),
		dragOperation: bE(e.dragOperation, t),
		stateId: SE(e.stateId)
	};
}
//#endregion
//#region node_modules/dnd-core/dist/createDragDropManager.js
function EE(e, t = void 0, n = {}, r = !1) {
	let i = DE(r), a = new TT(i, new NT(i, new cE(i))), o = e(a, t, n);
	return a.receiveBackend(o), a;
}
function DE(e) {
	let t = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION__;
	return Hw(TE, e && t && t({
		name: "dnd-core",
		instanceId: "dnd-core"
	}));
}
//#endregion
//#region node_modules/react-dnd/dist/core/DndProvider.js
function OE(e, t) {
	if (e == null) return {};
	var n = kE(e, t), r, i;
	if (Object.getOwnPropertySymbols) {
		var a = Object.getOwnPropertySymbols(e);
		for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
	}
	return n;
}
function kE(e, t) {
	if (e == null) return {};
	var n = {}, r = Object.keys(e), i, a;
	for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
	return n;
}
var AE = 0, jE = Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"), ME = /*#__PURE__*/ Mi(function(e) {
	var { children: t } = e;
	let [n, r] = NE(OE(e, ["children"]));
	return L(() => {
		if (r) {
			let e = FE();
			return ++AE, () => {
				--AE === 0 && (e[jE] = null);
			};
		}
	}, []), /*#__PURE__*/ z(Iw.Provider, {
		value: n,
		children: t
	});
});
function NE(e) {
	return "manager" in e ? [{ dragDropManager: e.manager }, !1] : [PE(e.backend, e.context, e.options, e.debugMode), !e.context];
}
function PE(e, t = FE(), n, r) {
	let i = t;
	return i[jE] || (i[jE] = { dragDropManager: EE(e, t, n, r) }), i[jE];
}
function FE() {
	return typeof global < "u" ? global : window;
}
//#endregion
//#region node_modules/fast-deep-equal/index.js
var IE = /* @__PURE__ */ D(((e, t) => {
	t.exports = function e(t, n) {
		if (t === n) return !0;
		if (t && n && typeof t == "object" && typeof n == "object") {
			if (t.constructor !== n.constructor) return !1;
			var r, i, a;
			if (Array.isArray(t)) {
				if (r = t.length, r != n.length) return !1;
				for (i = r; i-- !== 0;) if (!e(t[i], n[i])) return !1;
				return !0;
			}
			if (t.constructor === RegExp) return t.source === n.source && t.flags === n.flags;
			if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === n.valueOf();
			if (t.toString !== Object.prototype.toString) return t.toString() === n.toString();
			if (a = Object.keys(t), r = a.length, r !== Object.keys(n).length) return !1;
			for (i = r; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(n, a[i])) return !1;
			for (i = r; i-- !== 0;) {
				var o = a[i];
				if (!e(t[o], n[o])) return !1;
			}
			return !0;
		}
		return t !== t && n !== n;
	};
})), LE = typeof window < "u" ? Ii : L, RE = /* @__PURE__ */ k(IE(), 1);
function zE(e, t, n) {
	let [r, i] = zi(() => t(e)), a = I(() => {
		let a = t(e);
		(0, RE.default)(r, a) || (i(a), n && n());
	}, [
		r,
		e,
		n
	]);
	return LE(a), [r, a];
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useMonitorOutput.js
function BE(e, t, n) {
	let [r, i] = zE(e, t, n);
	return LE(function() {
		let t = e.getHandlerId();
		if (t != null) return e.subscribeToStateChange(i, { handlerIds: [t] });
	}, [e, i]), r;
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useCollectedProps.js
function VE(e, t, n) {
	return BE(t, e || (() => ({})), () => n.reconnect());
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useOptionalFactory.js
function HE(e, t) {
	let n = [...t || []];
	return t == null && typeof e != "function" && n.push(e), Li(() => typeof e == "function" ? e() : e, n);
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrag/connectors.js
function UE(e) {
	return Li(() => e.hooks.dragSource(), [e]);
}
function WE(e) {
	return Li(() => e.hooks.dragPreview(), [e]);
}
//#endregion
//#region node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js
var GE = !1, KE = !1, qE = class {
	receiveHandlerId(e) {
		this.sourceId = e;
	}
	getHandlerId() {
		return this.sourceId;
	}
	canDrag() {
		Z(!GE, "You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");
		try {
			return GE = !0, this.internalMonitor.canDragSource(this.sourceId);
		} finally {
			GE = !1;
		}
	}
	isDragging() {
		if (!this.sourceId) return !1;
		Z(!KE, "You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");
		try {
			return KE = !0, this.internalMonitor.isDraggingSource(this.sourceId);
		} finally {
			KE = !1;
		}
	}
	subscribeToStateChange(e, t) {
		return this.internalMonitor.subscribeToStateChange(e, t);
	}
	isDraggingSource(e) {
		return this.internalMonitor.isDraggingSource(e);
	}
	isOverTarget(e, t) {
		return this.internalMonitor.isOverTarget(e, t);
	}
	getTargetIds() {
		return this.internalMonitor.getTargetIds();
	}
	isSourcePublic() {
		return this.internalMonitor.isSourcePublic();
	}
	getSourceId() {
		return this.internalMonitor.getSourceId();
	}
	subscribeToOffsetChange(e) {
		return this.internalMonitor.subscribeToOffsetChange(e);
	}
	canDragSource(e) {
		return this.internalMonitor.canDragSource(e);
	}
	canDropOnTarget(e) {
		return this.internalMonitor.canDropOnTarget(e);
	}
	getItemType() {
		return this.internalMonitor.getItemType();
	}
	getItem() {
		return this.internalMonitor.getItem();
	}
	getDropResult() {
		return this.internalMonitor.getDropResult();
	}
	didDrop() {
		return this.internalMonitor.didDrop();
	}
	getInitialClientOffset() {
		return this.internalMonitor.getInitialClientOffset();
	}
	getInitialSourceClientOffset() {
		return this.internalMonitor.getInitialSourceClientOffset();
	}
	getSourceClientOffset() {
		return this.internalMonitor.getSourceClientOffset();
	}
	getClientOffset() {
		return this.internalMonitor.getClientOffset();
	}
	getDifferenceFromInitialOffset() {
		return this.internalMonitor.getDifferenceFromInitialOffset();
	}
	constructor(e) {
		this.sourceId = null, this.internalMonitor = e.getMonitor();
	}
}, JE = !1, YE = class {
	receiveHandlerId(e) {
		this.targetId = e;
	}
	getHandlerId() {
		return this.targetId;
	}
	subscribeToStateChange(e, t) {
		return this.internalMonitor.subscribeToStateChange(e, t);
	}
	canDrop() {
		if (!this.targetId) return !1;
		Z(!JE, "You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");
		try {
			return JE = !0, this.internalMonitor.canDropOnTarget(this.targetId);
		} finally {
			JE = !1;
		}
	}
	isOver(e) {
		return this.targetId ? this.internalMonitor.isOverTarget(this.targetId, e) : !1;
	}
	getItemType() {
		return this.internalMonitor.getItemType();
	}
	getItem() {
		return this.internalMonitor.getItem();
	}
	getDropResult() {
		return this.internalMonitor.getDropResult();
	}
	didDrop() {
		return this.internalMonitor.didDrop();
	}
	getInitialClientOffset() {
		return this.internalMonitor.getInitialClientOffset();
	}
	getInitialSourceClientOffset() {
		return this.internalMonitor.getInitialSourceClientOffset();
	}
	getSourceClientOffset() {
		return this.internalMonitor.getSourceClientOffset();
	}
	getClientOffset() {
		return this.internalMonitor.getClientOffset();
	}
	getDifferenceFromInitialOffset() {
		return this.internalMonitor.getDifferenceFromInitialOffset();
	}
	constructor(e) {
		this.targetId = null, this.internalMonitor = e.getMonitor();
	}
};
//#endregion
//#region node_modules/react-dnd/dist/internals/registration.js
function XE(e, t, n) {
	let r = n.getRegistry(), i = r.addTarget(e, t);
	return [i, () => r.removeTarget(i)];
}
function ZE(e, t, n) {
	let r = n.getRegistry(), i = r.addSource(e, t);
	return [i, () => r.removeSource(i)];
}
//#endregion
//#region node_modules/@react-dnd/shallowequal/dist/index.js
function QE(e, t, n, r) {
	let i = n ? n.call(r, e, t) : void 0;
	if (i !== void 0) return !!i;
	if (e === t) return !0;
	if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
	let a = Object.keys(e), o = Object.keys(t);
	if (a.length !== o.length) return !1;
	let s = Object.prototype.hasOwnProperty.bind(t);
	for (let o = 0; o < a.length; o++) {
		let c = a[o];
		if (!s(c)) return !1;
		let l = e[c], u = t[c];
		if (i = n ? n.call(r, l, u, c) : void 0, i === !1 || i === void 0 && l !== u) return !1;
	}
	return !0;
}
//#endregion
//#region node_modules/react-dnd/dist/internals/isRef.js
function $E(e) {
	return typeof e == "object" && !!e && Object.prototype.hasOwnProperty.call(e, "current");
}
//#endregion
//#region node_modules/react-dnd/dist/internals/wrapConnectorHooks.js
function eD(e) {
	if (typeof e.type == "string") return;
	let t = e.type.displayName || e.type.name || "the component";
	throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`);
}
function tD(e) {
	return (t = null, n = null) => {
		if (!Ai(t)) {
			let r = t;
			return e(r, n), r;
		}
		let r = t;
		return eD(r), iD(r, n ? (t) => e(t, n) : e);
	};
}
function nD(e) {
	let t = {};
	return Object.keys(e).forEach((n) => {
		let r = e[n];
		if (n.endsWith("Ref")) t[n] = e[n];
		else {
			let e = tD(r);
			t[n] = () => e;
		}
	}), t;
}
function rD(e, t) {
	typeof e == "function" ? e(t) : e.current = t;
}
function iD(e, t) {
	let n = e.ref;
	return Z(typeof n != "string", "Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"), n ? Ti(e, { ref: (e) => {
		rD(n, e), rD(t, e);
	} }) : Ti(e, { ref: t });
}
//#endregion
//#region node_modules/react-dnd/dist/internals/SourceConnector.js
var aD = class {
	receiveHandlerId(e) {
		this.handlerId !== e && (this.handlerId = e, this.reconnect());
	}
	get connectTarget() {
		return this.dragSource;
	}
	get dragSourceOptions() {
		return this.dragSourceOptionsInternal;
	}
	set dragSourceOptions(e) {
		this.dragSourceOptionsInternal = e;
	}
	get dragPreviewOptions() {
		return this.dragPreviewOptionsInternal;
	}
	set dragPreviewOptions(e) {
		this.dragPreviewOptionsInternal = e;
	}
	reconnect() {
		let e = this.reconnectDragSource();
		this.reconnectDragPreview(e);
	}
	reconnectDragSource() {
		let e = this.dragSource, t = this.didHandlerIdChange() || this.didConnectedDragSourceChange() || this.didDragSourceOptionsChange();
		return t && this.disconnectDragSource(), this.handlerId ? e ? (t && (this.lastConnectedHandlerId = this.handlerId, this.lastConnectedDragSource = e, this.lastConnectedDragSourceOptions = this.dragSourceOptions, this.dragSourceUnsubscribe = this.backend.connectDragSource(this.handlerId, e, this.dragSourceOptions)), t) : (this.lastConnectedDragSource = e, t) : t;
	}
	reconnectDragPreview(e = !1) {
		let t = this.dragPreview, n = e || this.didHandlerIdChange() || this.didConnectedDragPreviewChange() || this.didDragPreviewOptionsChange();
		if (n && this.disconnectDragPreview(), this.handlerId) {
			if (!t) {
				this.lastConnectedDragPreview = t;
				return;
			}
			n && (this.lastConnectedHandlerId = this.handlerId, this.lastConnectedDragPreview = t, this.lastConnectedDragPreviewOptions = this.dragPreviewOptions, this.dragPreviewUnsubscribe = this.backend.connectDragPreview(this.handlerId, t, this.dragPreviewOptions));
		}
	}
	didHandlerIdChange() {
		return this.lastConnectedHandlerId !== this.handlerId;
	}
	didConnectedDragSourceChange() {
		return this.lastConnectedDragSource !== this.dragSource;
	}
	didConnectedDragPreviewChange() {
		return this.lastConnectedDragPreview !== this.dragPreview;
	}
	didDragSourceOptionsChange() {
		return !QE(this.lastConnectedDragSourceOptions, this.dragSourceOptions);
	}
	didDragPreviewOptionsChange() {
		return !QE(this.lastConnectedDragPreviewOptions, this.dragPreviewOptions);
	}
	disconnectDragSource() {
		this.dragSourceUnsubscribe &&= (this.dragSourceUnsubscribe(), void 0);
	}
	disconnectDragPreview() {
		this.dragPreviewUnsubscribe && (this.dragPreviewUnsubscribe(), this.dragPreviewUnsubscribe = void 0, this.dragPreviewNode = null, this.dragPreviewRef = null);
	}
	get dragSource() {
		return this.dragSourceNode || this.dragSourceRef && this.dragSourceRef.current;
	}
	get dragPreview() {
		return this.dragPreviewNode || this.dragPreviewRef && this.dragPreviewRef.current;
	}
	clearDragSource() {
		this.dragSourceNode = null, this.dragSourceRef = null;
	}
	clearDragPreview() {
		this.dragPreviewNode = null, this.dragPreviewRef = null;
	}
	constructor(e) {
		this.hooks = nD({
			dragSource: (e, t) => {
				this.clearDragSource(), this.dragSourceOptions = t || null, $E(e) ? this.dragSourceRef = e : this.dragSourceNode = e, this.reconnectDragSource();
			},
			dragPreview: (e, t) => {
				this.clearDragPreview(), this.dragPreviewOptions = t || null, $E(e) ? this.dragPreviewRef = e : this.dragPreviewNode = e, this.reconnectDragPreview();
			}
		}), this.handlerId = null, this.dragSourceRef = null, this.dragSourceOptionsInternal = null, this.dragPreviewRef = null, this.dragPreviewOptionsInternal = null, this.lastConnectedHandlerId = null, this.lastConnectedDragSource = null, this.lastConnectedDragSourceOptions = null, this.lastConnectedDragPreview = null, this.lastConnectedDragPreviewOptions = null, this.backend = e;
	}
}, oD = class {
	get connectTarget() {
		return this.dropTarget;
	}
	reconnect() {
		let e = this.didHandlerIdChange() || this.didDropTargetChange() || this.didOptionsChange();
		e && this.disconnectDropTarget();
		let t = this.dropTarget;
		if (this.handlerId) {
			if (!t) {
				this.lastConnectedDropTarget = t;
				return;
			}
			e && (this.lastConnectedHandlerId = this.handlerId, this.lastConnectedDropTarget = t, this.lastConnectedDropTargetOptions = this.dropTargetOptions, this.unsubscribeDropTarget = this.backend.connectDropTarget(this.handlerId, t, this.dropTargetOptions));
		}
	}
	receiveHandlerId(e) {
		e !== this.handlerId && (this.handlerId = e, this.reconnect());
	}
	get dropTargetOptions() {
		return this.dropTargetOptionsInternal;
	}
	set dropTargetOptions(e) {
		this.dropTargetOptionsInternal = e;
	}
	didHandlerIdChange() {
		return this.lastConnectedHandlerId !== this.handlerId;
	}
	didDropTargetChange() {
		return this.lastConnectedDropTarget !== this.dropTarget;
	}
	didOptionsChange() {
		return !QE(this.lastConnectedDropTargetOptions, this.dropTargetOptions);
	}
	disconnectDropTarget() {
		this.unsubscribeDropTarget &&= (this.unsubscribeDropTarget(), void 0);
	}
	get dropTarget() {
		return this.dropTargetNode || this.dropTargetRef && this.dropTargetRef.current;
	}
	clearDropTarget() {
		this.dropTargetRef = null, this.dropTargetNode = null;
	}
	constructor(e) {
		this.hooks = nD({ dropTarget: (e, t) => {
			this.clearDropTarget(), this.dropTargetOptions = t, $E(e) ? this.dropTargetRef = e : this.dropTargetNode = e, this.reconnect();
		} }), this.handlerId = null, this.dropTargetRef = null, this.dropTargetOptionsInternal = null, this.lastConnectedHandlerId = null, this.lastConnectedDropTarget = null, this.lastConnectedDropTargetOptions = null, this.backend = e;
	}
};
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDragDropManager.js
function sD() {
	let { dragDropManager: e } = Ni(Iw);
	return Z(e != null, "Expected drag drop context"), e;
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js
function cD(e, t) {
	let n = sD(), r = Li(() => new aD(n.getBackend()), [n]);
	return LE(() => (r.dragSourceOptions = e || null, r.reconnect(), () => r.disconnectDragSource()), [r, e]), LE(() => (r.dragPreviewOptions = t || null, r.reconnect(), () => r.disconnectDragPreview()), [r, t]), r;
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js
function lD() {
	let e = sD();
	return Li(() => new qE(e), [e]);
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js
var uD = class {
	beginDrag() {
		let e = this.spec, t = this.monitor, n = null;
		return n = typeof e.item == "object" ? e.item : typeof e.item == "function" ? e.item(t) : {}, n ?? null;
	}
	canDrag() {
		let e = this.spec, t = this.monitor;
		return typeof e.canDrag == "boolean" ? e.canDrag : typeof e.canDrag != "function" || e.canDrag(t);
	}
	isDragging(e, t) {
		let n = this.spec, r = this.monitor, { isDragging: i } = n;
		return i ? i(r) : t === e.getSourceId();
	}
	endDrag() {
		let e = this.spec, t = this.monitor, n = this.connector, { end: r } = e;
		r && r(t.getItem(), t), n.reconnect();
	}
	constructor(e, t, n) {
		this.spec = e, this.monitor = t, this.connector = n;
	}
};
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js
function dD(e, t, n) {
	let r = Li(() => new uD(e, t, n), [t, n]);
	return L(() => {
		r.spec = e;
	}, [e]), r;
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrag/useDragType.js
function fD(e) {
	return Li(() => {
		let t = e.type;
		return Z(t != null, "spec.type must be defined"), t;
	}, [e]);
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js
function pD(e, t, n) {
	let r = sD(), i = dD(e, t, n), a = fD(e);
	LE(function() {
		if (a != null) {
			let [e, o] = ZE(a, i, r);
			return t.receiveHandlerId(e), n.receiveHandlerId(e), o;
		}
	}, [
		r,
		t,
		n,
		i,
		a
	]);
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrag/useDrag.js
function mD(e, t) {
	let n = HE(e, t);
	Z(!n.begin, "useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");
	let r = lD(), i = cD(n.options, n.previewOptions);
	return pD(n, r, i), [
		VE(n.collect, r, i),
		UE(i),
		WE(i)
	];
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrop/connectors.js
function hD(e) {
	return Li(() => e.hooks.dropTarget(), [e]);
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js
function gD(e) {
	let t = sD(), n = Li(() => new oD(t.getBackend()), [t]);
	return LE(() => (n.dropTargetOptions = e || null, n.reconnect(), () => n.disconnectDropTarget()), [e]), n;
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js
function _D() {
	let e = sD();
	return Li(() => new YE(e), [e]);
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrop/useAccept.js
function vD(e) {
	let { accept: t } = e;
	return Li(() => (Z(e.accept != null, "accept must be defined"), Array.isArray(t) ? t : [t]), [t]);
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js
var yD = class {
	canDrop() {
		let e = this.spec, t = this.monitor;
		return !e.canDrop || e.canDrop(t.getItem(), t);
	}
	hover() {
		let e = this.spec, t = this.monitor;
		e.hover && e.hover(t.getItem(), t);
	}
	drop() {
		let e = this.spec, t = this.monitor;
		if (e.drop) return e.drop(t.getItem(), t);
	}
	constructor(e, t) {
		this.spec = e, this.monitor = t;
	}
};
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js
function bD(e, t) {
	let n = Li(() => new yD(e, t), [t]);
	return L(() => {
		n.spec = e;
	}, [e]), n;
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js
function xD(e, t, n) {
	let r = sD(), i = bD(e, t), a = vD(e);
	LE(function() {
		let [e, o] = XE(a, i, r);
		return t.receiveHandlerId(e), n.receiveHandlerId(e), o;
	}, [
		r,
		t,
		i,
		n,
		a.map((e) => e.toString()).join("|")
	]);
}
//#endregion
//#region node_modules/react-dnd/dist/hooks/useDrop/useDrop.js
function SD(e, t) {
	let n = HE(e, t), r = _D(), i = gD(n.options);
	return xD(n, r, i), [VE(n.collect, r, i), hD(i)];
}
//#endregion
//#region node_modules/dnd-multi-backend/dist/index.js
var CD = (e) => {
	throw TypeError(e);
}, wD = (e, t, n) => t.has(e) || CD("Cannot " + n), Q = (e, t, n) => (wD(e, t, "read from private field"), n ? n.call(e) : t.get(e)), TD = (e, t, n) => t.has(e) ? CD("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ED = (e, t, n, r) => (wD(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), DD, OD = class {
	constructor() {
		TD(this, DD), this.register = (e) => {
			Q(this, DD).push(e);
		}, this.unregister = (e) => {
			for (; Q(this, DD).indexOf(e) !== -1;) Q(this, DD).splice(Q(this, DD).indexOf(e), 1);
		}, this.backendChanged = (e) => {
			for (let t of Q(this, DD)) t.backendChanged(e);
		}, ED(this, DD, []);
	}
};
DD = /* @__PURE__ */ new WeakMap();
var kD, AD, jD, MD, ND, PD, FD, ID, LD, RD, zD, BD = class e {
	constructor(t, n, r) {
		if (TD(this, kD), TD(this, AD), TD(this, jD), TD(this, MD), TD(this, ND), TD(this, PD, (e, t, n) => {
			if (!n.backend) throw Error(`You must specify a 'backend' property in your Backend entry: ${JSON.stringify(n)}`);
			let r = n.backend(e, t, n.options), i = n.id, a = !n.id && r && r.constructor;
			if (a && (i = r.constructor.name), !i) throw Error(`You must specify an 'id' property in your Backend entry: ${JSON.stringify(n)}
        see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx`);
			if (a && console.warn("Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.\n        This might be unsupported in the future, please specify 'id' explicitely for every backend."), Q(this, jD)[i]) throw Error(`You must specify a unique 'id' property in your Backend entry:
        ${JSON.stringify(n)} (conflicts with: ${JSON.stringify(Q(this, jD)[i])})`);
			return {
				id: i,
				instance: r,
				preview: n.preview ?? !1,
				transition: n.transition,
				skipDispatchOnTransition: n.skipDispatchOnTransition ?? !1
			};
		}), this.setup = () => {
			if (!(typeof window > "u")) {
				if (e.isSetUp) throw Error("Cannot have two MultiBackends at the same time.");
				e.isSetUp = !0, Q(this, FD).call(this, window), Q(this, jD)[Q(this, kD)].instance.setup();
			}
		}, this.teardown = () => {
			typeof window > "u" || (e.isSetUp = !1, Q(this, ID).call(this, window), Q(this, jD)[Q(this, kD)].instance.teardown());
		}, this.connectDragSource = (e, t, n) => Q(this, zD).call(this, "connectDragSource", e, t, n), this.connectDragPreview = (e, t, n) => Q(this, zD).call(this, "connectDragPreview", e, t, n), this.connectDropTarget = (e, t, n) => Q(this, zD).call(this, "connectDropTarget", e, t, n), this.profile = () => Q(this, jD)[Q(this, kD)].instance.profile(), this.previewEnabled = () => Q(this, jD)[Q(this, kD)].preview, this.previewsList = () => Q(this, AD), this.backendsList = () => Q(this, MD), TD(this, FD, (e) => {
			for (let t of Q(this, MD)) t.transition && e.addEventListener(t.transition.event, Q(this, LD));
		}), TD(this, ID, (e) => {
			for (let t of Q(this, MD)) t.transition && e.removeEventListener(t.transition.event, Q(this, LD));
		}), TD(this, LD, (e) => {
			let t = Q(this, kD);
			if (Q(this, MD).some((t) => t.id !== Q(this, kD) && t.transition && t.transition.check(e) ? (ED(this, kD, t.id), !0) : !1), Q(this, kD) !== t) {
				Q(this, jD)[t].instance.teardown();
				for (let [e, t] of Object.entries(Q(this, ND))) t.unsubscribe(), t.unsubscribe = Q(this, RD).call(this, t.func, ...t.args);
				Q(this, AD).backendChanged(this);
				let n = Q(this, jD)[Q(this, kD)];
				if (n.instance.setup(), n.skipDispatchOnTransition) return;
				let r = e.constructor, i = new r(e.type, e);
				e.target?.dispatchEvent(i);
			}
		}), TD(this, RD, (e, t, n, r) => Q(this, jD)[Q(this, kD)].instance[e](t, n, r)), TD(this, zD, (e, t, n, r) => {
			let i = `${e}_${t}`, a = Q(this, RD).call(this, e, t, n, r);
			return Q(this, ND)[i] = {
				func: e,
				args: [
					t,
					n,
					r
				],
				unsubscribe: a
			}, () => {
				Q(this, ND)[i].unsubscribe(), delete Q(this, ND)[i];
			};
		}), !r || !r.backends || r.backends.length < 1) throw Error("You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)\n        see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx");
		ED(this, AD, new OD()), ED(this, jD, {}), ED(this, MD, []);
		for (let e of r.backends) {
			let r = Q(this, PD).call(this, t, n, e);
			Q(this, jD)[r.id] = r, Q(this, MD).push(r);
		}
		ED(this, kD, Q(this, MD)[0].id), ED(this, ND, {});
	}
};
kD = /* @__PURE__ */ new WeakMap(), AD = /* @__PURE__ */ new WeakMap(), jD = /* @__PURE__ */ new WeakMap(), MD = /* @__PURE__ */ new WeakMap(), ND = /* @__PURE__ */ new WeakMap(), PD = /* @__PURE__ */ new WeakMap(), FD = /* @__PURE__ */ new WeakMap(), ID = /* @__PURE__ */ new WeakMap(), LD = /* @__PURE__ */ new WeakMap(), RD = /* @__PURE__ */ new WeakMap(), zD = /* @__PURE__ */ new WeakMap(), BD.isSetUp = !1;
var VD = BD, HD = (e, t, n) => new VD(e, t, n), UD = (e, t) => ({
	event: e,
	check: t
}), WD = UD("touchstart", (e) => {
	let t = e;
	return t.touches !== null && t.touches !== void 0;
}), GD = UD("pointerdown", (e) => e.pointerType === "mouse");
//#endregion
//#region node_modules/react-dnd-html5-backend/dist/utils/js_utils.js
function KD(e) {
	let t = null;
	return () => (t ??= e(), t);
}
function qD(e, t) {
	return e.filter((e) => e !== t);
}
function JD(e, t) {
	let n = /* @__PURE__ */ new Set(), r = (e) => n.add(e);
	e.forEach(r), t.forEach(r);
	let i = [];
	return n.forEach((e) => i.push(e)), i;
}
//#endregion
//#region node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js
var YD = class {
	enter(e) {
		let t = this.entered.length, n = (t) => this.isNodeInDocument(t) && (!t.contains || t.contains(e));
		return this.entered = JD(this.entered.filter(n), [e]), t === 0 && this.entered.length > 0;
	}
	leave(e) {
		let t = this.entered.length;
		return this.entered = qD(this.entered.filter(this.isNodeInDocument), e), t > 0 && this.entered.length === 0;
	}
	reset() {
		this.entered = [];
	}
	constructor(e) {
		this.entered = [], this.isNodeInDocument = e;
	}
}, XD = class {
	initializeExposedProperties() {
		Object.keys(this.config.exposeProperties).forEach((e) => {
			Object.defineProperty(this.item, e, {
				configurable: !0,
				enumerable: !0,
				get() {
					return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`), null;
				}
			});
		});
	}
	loadDataTransfer(e) {
		if (e) {
			let t = {};
			Object.keys(this.config.exposeProperties).forEach((n) => {
				let r = this.config.exposeProperties[n];
				r != null && (t[n] = {
					value: r(e, this.config.matchesTypes),
					configurable: !0,
					enumerable: !0
				});
			}), Object.defineProperties(this.item, t);
		}
	}
	canDrag() {
		return !0;
	}
	beginDrag() {
		return this.item;
	}
	isDragging(e, t) {
		return t === e.getSourceId();
	}
	endDrag() {}
	constructor(e) {
		this.config = e, this.item = {}, this.initializeExposedProperties();
	}
}, ZD = /* @__PURE__ */ me({
	FILE: () => QD,
	HTML: () => tO,
	TEXT: () => eO,
	URL: () => $D
}), QD = "__NATIVE_FILE__", $D = "__NATIVE_URL__", eO = "__NATIVE_TEXT__", tO = "__NATIVE_HTML__";
//#endregion
//#region node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js
function nO(e, t, n) {
	return t.reduce((t, n) => t || e.getData(n), "") ?? n;
}
//#endregion
//#region node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js
var rO = {
	[QD]: {
		exposeProperties: {
			files: (e) => Array.prototype.slice.call(e.files),
			items: (e) => e.items,
			dataTransfer: (e) => e
		},
		matchesTypes: ["Files"]
	},
	[tO]: {
		exposeProperties: {
			html: (e, t) => nO(e, t, ""),
			dataTransfer: (e) => e
		},
		matchesTypes: ["Html", "text/html"]
	},
	[$D]: {
		exposeProperties: {
			urls: (e, t) => nO(e, t, "").split("\n"),
			dataTransfer: (e) => e
		},
		matchesTypes: ["Url", "text/uri-list"]
	},
	[eO]: {
		exposeProperties: {
			text: (e, t) => nO(e, t, ""),
			dataTransfer: (e) => e
		},
		matchesTypes: ["Text", "text/plain"]
	}
};
//#endregion
//#region node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js
function iO(e, t) {
	let n = rO[e];
	if (!n) throw Error(`native type ${e} has no configuration`);
	let r = new XD(n);
	return r.loadDataTransfer(t), r;
}
function aO(e) {
	if (!e) return null;
	let t = Array.prototype.slice.call(e.types || []);
	return Object.keys(rO).filter((e) => {
		let n = rO[e];
		return n?.matchesTypes ? n.matchesTypes.some((e) => t.indexOf(e) > -1) : !1;
	})[0] || null;
}
//#endregion
//#region node_modules/react-dnd-html5-backend/dist/BrowserDetector.js
var oO = KD(() => /firefox/i.test(navigator.userAgent)), sO = KD(() => !!window.safari), cO = class {
	interpolate(e) {
		let { xs: t, ys: n, c1s: r, c2s: i, c3s: a } = this, o = t.length - 1;
		if (e === t[o]) return n[o];
		let s = 0, c = a.length - 1, l;
		for (; s <= c;) {
			l = Math.floor(.5 * (s + c));
			let r = t[l];
			if (r < e) s = l + 1;
			else if (r > e) c = l - 1;
			else return n[l];
		}
		o = Math.max(0, c);
		let u = e - t[o], d = u * u;
		return n[o] + r[o] * u + i[o] * d + a[o] * u * d;
	}
	constructor(e, t) {
		let { length: n } = e, r = [];
		for (let e = 0; e < n; e++) r.push(e);
		r.sort((t, n) => e[t] < e[n] ? -1 : 1);
		let i = [], a = [], o = [], s, c;
		for (let r = 0; r < n - 1; r++) s = e[r + 1] - e[r], c = t[r + 1] - t[r], a.push(s), i.push(c), o.push(c / s);
		let l = [o[0]];
		for (let e = 0; e < a.length - 1; e++) {
			let t = o[e], n = o[e + 1];
			if (t * n <= 0) l.push(0);
			else {
				s = a[e];
				let r = a[e + 1], i = s + r;
				l.push(3 * i / ((i + r) / t + (i + s) / n));
			}
		}
		l.push(o[o.length - 1]);
		let u = [], d = [], f;
		for (let e = 0; e < l.length - 1; e++) {
			f = o[e];
			let t = l[e], n = 1 / a[e], r = t + l[e + 1] - f - f;
			u.push((f - t - r) * n), d.push(r * n * n);
		}
		this.xs = e, this.ys = t, this.c1s = l, this.c2s = u, this.c3s = d;
	}
}, lO = 1;
function uO(e) {
	let t = e.nodeType === lO ? e : e.parentElement;
	if (!t) return null;
	let { top: n, left: r } = t.getBoundingClientRect();
	return {
		x: r,
		y: n
	};
}
function dO(e) {
	return {
		x: e.clientX,
		y: e.clientY
	};
}
function fO(e) {
	return e.nodeName === "IMG" && (oO() || !document.documentElement?.contains(e));
}
function pO(e, t, n, r) {
	let i = e ? t.width : n, a = e ? t.height : r;
	return sO() && e && (a /= window.devicePixelRatio, i /= window.devicePixelRatio), {
		dragPreviewWidth: i,
		dragPreviewHeight: a
	};
}
function mO(e, t, n, r, i) {
	let a = fO(t), o = uO(a ? e : t), s = {
		x: n.x - o.x,
		y: n.y - o.y
	}, { offsetWidth: c, offsetHeight: l } = e, { anchorX: u, anchorY: d } = r, { dragPreviewWidth: f, dragPreviewHeight: p } = pO(a, t, c, l), m = () => {
		let e = new cO([
			0,
			.5,
			1
		], [
			s.y,
			s.y / l * p,
			s.y + p - l
		]).interpolate(d);
		return sO() && a && (e += (window.devicePixelRatio - 1) * p), e;
	}, h = () => new cO([
		0,
		.5,
		1
	], [
		s.x,
		s.x / c * f,
		s.x + f - c
	]).interpolate(u), { offsetX: g, offsetY: _ } = i, v = g === 0 || g, y = _ === 0 || _;
	return {
		x: v ? g : h(),
		y: y ? _ : m()
	};
}
//#endregion
//#region node_modules/react-dnd-html5-backend/dist/OptionsReader.js
var hO = class {
	get window() {
		if (this.globalContext) return this.globalContext;
		if (typeof window < "u") return window;
	}
	get document() {
		if (this.globalContext?.document) return this.globalContext.document;
		if (this.window) return this.window.document;
	}
	get rootElement() {
		return this.optionsArgs?.rootElement || this.window;
	}
	constructor(e, t) {
		this.ownerDocument = null, this.globalContext = e, this.optionsArgs = t;
	}
};
//#endregion
//#region node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js
function gO(e, t, n) {
	return t in e ? Object.defineProperty(e, t, {
		value: n,
		enumerable: !0,
		configurable: !0,
		writable: !0
	}) : e[t] = n, e;
}
function _O(e) {
	for (var t = 1; t < arguments.length; t++) {
		var n = arguments[t] == null ? {} : arguments[t], r = Object.keys(n);
		typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(e) {
			return Object.getOwnPropertyDescriptor(n, e).enumerable;
		}))), r.forEach(function(t) {
			gO(e, t, n[t]);
		});
	}
	return e;
}
var vO = class {
	profile() {
		return {
			sourcePreviewNodes: this.sourcePreviewNodes.size,
			sourcePreviewNodeOptions: this.sourcePreviewNodeOptions.size,
			sourceNodeOptions: this.sourceNodeOptions.size,
			sourceNodes: this.sourceNodes.size,
			dragStartSourceIds: this.dragStartSourceIds?.length || 0,
			dropTargetIds: this.dropTargetIds.length,
			dragEnterTargetIds: this.dragEnterTargetIds.length,
			dragOverTargetIds: this.dragOverTargetIds?.length || 0
		};
	}
	get window() {
		return this.options.window;
	}
	get document() {
		return this.options.document;
	}
	get rootElement() {
		return this.options.rootElement;
	}
	setup() {
		let e = this.rootElement;
		if (e !== void 0) {
			if (e.__isReactDndBackendSetUp) throw Error("Cannot have two HTML5 backends at the same time.");
			e.__isReactDndBackendSetUp = !0, this.addEventListeners(e);
		}
	}
	teardown() {
		let e = this.rootElement;
		if (e !== void 0 && (e.__isReactDndBackendSetUp = !1, this.removeEventListeners(this.rootElement), this.clearCurrentDragSourceNode(), this.asyncEndDragFrameId)) {
			var t;
			(t = this.window) == null || t.cancelAnimationFrame(this.asyncEndDragFrameId);
		}
	}
	connectDragPreview(e, t, n) {
		return this.sourcePreviewNodeOptions.set(e, n), this.sourcePreviewNodes.set(e, t), () => {
			this.sourcePreviewNodes.delete(e), this.sourcePreviewNodeOptions.delete(e);
		};
	}
	connectDragSource(e, t, n) {
		this.sourceNodes.set(e, t), this.sourceNodeOptions.set(e, n);
		let r = (t) => this.handleDragStart(t, e), i = (e) => this.handleSelectStart(e);
		return t.setAttribute("draggable", "true"), t.addEventListener("dragstart", r), t.addEventListener("selectstart", i), () => {
			this.sourceNodes.delete(e), this.sourceNodeOptions.delete(e), t.removeEventListener("dragstart", r), t.removeEventListener("selectstart", i), t.setAttribute("draggable", "false");
		};
	}
	connectDropTarget(e, t) {
		let n = (t) => this.handleDragEnter(t, e), r = (t) => this.handleDragOver(t, e), i = (t) => this.handleDrop(t, e);
		return t.addEventListener("dragenter", n), t.addEventListener("dragover", r), t.addEventListener("drop", i), () => {
			t.removeEventListener("dragenter", n), t.removeEventListener("dragover", r), t.removeEventListener("drop", i);
		};
	}
	addEventListeners(e) {
		e.addEventListener && (e.addEventListener("dragstart", this.handleTopDragStart), e.addEventListener("dragstart", this.handleTopDragStartCapture, !0), e.addEventListener("dragend", this.handleTopDragEndCapture, !0), e.addEventListener("dragenter", this.handleTopDragEnter), e.addEventListener("dragenter", this.handleTopDragEnterCapture, !0), e.addEventListener("dragleave", this.handleTopDragLeaveCapture, !0), e.addEventListener("dragover", this.handleTopDragOver), e.addEventListener("dragover", this.handleTopDragOverCapture, !0), e.addEventListener("drop", this.handleTopDrop), e.addEventListener("drop", this.handleTopDropCapture, !0));
	}
	removeEventListeners(e) {
		e.removeEventListener && (e.removeEventListener("dragstart", this.handleTopDragStart), e.removeEventListener("dragstart", this.handleTopDragStartCapture, !0), e.removeEventListener("dragend", this.handleTopDragEndCapture, !0), e.removeEventListener("dragenter", this.handleTopDragEnter), e.removeEventListener("dragenter", this.handleTopDragEnterCapture, !0), e.removeEventListener("dragleave", this.handleTopDragLeaveCapture, !0), e.removeEventListener("dragover", this.handleTopDragOver), e.removeEventListener("dragover", this.handleTopDragOverCapture, !0), e.removeEventListener("drop", this.handleTopDrop), e.removeEventListener("drop", this.handleTopDropCapture, !0));
	}
	getCurrentSourceNodeOptions() {
		let e = this.monitor.getSourceId(), t = this.sourceNodeOptions.get(e);
		return _O({ dropEffect: this.altKeyPressed ? "copy" : "move" }, t || {});
	}
	getCurrentDropEffect() {
		return this.isDraggingNativeItem() ? "copy" : this.getCurrentSourceNodeOptions().dropEffect;
	}
	getCurrentSourcePreviewNodeOptions() {
		let e = this.monitor.getSourceId();
		return _O({
			anchorX: .5,
			anchorY: .5,
			captureDraggingState: !1
		}, this.sourcePreviewNodeOptions.get(e) || {});
	}
	isDraggingNativeItem() {
		let e = this.monitor.getItemType();
		return Object.keys(ZD).some((t) => ZD[t] === e);
	}
	beginDragNativeItem(e, t) {
		this.clearCurrentDragSourceNode(), this.currentNativeSource = iO(e, t), this.currentNativeHandle = this.registry.addSource(e, this.currentNativeSource), this.actions.beginDrag([this.currentNativeHandle]);
	}
	setCurrentDragSourceNode(e) {
		this.clearCurrentDragSourceNode(), this.currentDragSourceNode = e, this.mouseMoveTimeoutTimer = setTimeout(() => this.rootElement?.addEventListener("mousemove", this.endDragIfSourceWasRemovedFromDOM, !0), 1e3);
	}
	clearCurrentDragSourceNode() {
		if (this.currentDragSourceNode) {
			if (this.currentDragSourceNode = null, this.rootElement) {
				var e;
				(e = this.window) == null || e.clearTimeout(this.mouseMoveTimeoutTimer || void 0), this.rootElement.removeEventListener("mousemove", this.endDragIfSourceWasRemovedFromDOM, !0);
			}
			return this.mouseMoveTimeoutTimer = null, !0;
		}
		return !1;
	}
	handleDragStart(e, t) {
		e.defaultPrevented || (this.dragStartSourceIds ||= [], this.dragStartSourceIds.unshift(t));
	}
	handleDragEnter(e, t) {
		this.dragEnterTargetIds.unshift(t);
	}
	handleDragOver(e, t) {
		this.dragOverTargetIds === null && (this.dragOverTargetIds = []), this.dragOverTargetIds.unshift(t);
	}
	handleDrop(e, t) {
		this.dropTargetIds.unshift(t);
	}
	constructor(e, t, n) {
		this.sourcePreviewNodes = /* @__PURE__ */ new Map(), this.sourcePreviewNodeOptions = /* @__PURE__ */ new Map(), this.sourceNodes = /* @__PURE__ */ new Map(), this.sourceNodeOptions = /* @__PURE__ */ new Map(), this.dragStartSourceIds = null, this.dropTargetIds = [], this.dragEnterTargetIds = [], this.currentNativeSource = null, this.currentNativeHandle = null, this.currentDragSourceNode = null, this.altKeyPressed = !1, this.mouseMoveTimeoutTimer = null, this.asyncEndDragFrameId = null, this.dragOverTargetIds = null, this.lastClientOffset = null, this.hoverRafId = null, this.getSourceClientOffset = (e) => {
			let t = this.sourceNodes.get(e);
			return t && uO(t) || null;
		}, this.endDragNativeItem = () => {
			this.isDraggingNativeItem() && (this.actions.endDrag(), this.currentNativeHandle && this.registry.removeSource(this.currentNativeHandle), this.currentNativeHandle = null, this.currentNativeSource = null);
		}, this.isNodeInDocument = (e) => !!(e && this.document && this.document.body && this.document.body.contains(e)), this.endDragIfSourceWasRemovedFromDOM = () => {
			let e = this.currentDragSourceNode;
			e == null || this.isNodeInDocument(e) || (this.clearCurrentDragSourceNode() && this.monitor.isDragging() && this.actions.endDrag(), this.cancelHover());
		}, this.scheduleHover = (e) => {
			this.hoverRafId === null && typeof requestAnimationFrame < "u" && (this.hoverRafId = requestAnimationFrame(() => {
				this.monitor.isDragging() && this.actions.hover(e || [], { clientOffset: this.lastClientOffset }), this.hoverRafId = null;
			}));
		}, this.cancelHover = () => {
			this.hoverRafId !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(this.hoverRafId), this.hoverRafId = null);
		}, this.handleTopDragStartCapture = () => {
			this.clearCurrentDragSourceNode(), this.dragStartSourceIds = [];
		}, this.handleTopDragStart = (e) => {
			if (e.defaultPrevented) return;
			let { dragStartSourceIds: t } = this;
			this.dragStartSourceIds = null;
			let n = dO(e);
			this.monitor.isDragging() && (this.actions.endDrag(), this.cancelHover()), this.actions.beginDrag(t || [], {
				publishSource: !1,
				getSourceClientOffset: this.getSourceClientOffset,
				clientOffset: n
			});
			let { dataTransfer: r } = e, i = aO(r);
			if (this.monitor.isDragging()) {
				if (r && typeof r.setDragImage == "function") {
					let e = this.monitor.getSourceId(), t = this.sourceNodes.get(e), i = this.sourcePreviewNodes.get(e) || t;
					if (i) {
						let { anchorX: e, anchorY: a, offsetX: o, offsetY: s } = this.getCurrentSourcePreviewNodeOptions(), c = mO(t, i, n, {
							anchorX: e,
							anchorY: a
						}, {
							offsetX: o,
							offsetY: s
						});
						r.setDragImage(i, c.x, c.y);
					}
				}
				try {
					r?.setData("application/json", {});
				} catch {}
				this.setCurrentDragSourceNode(e.target);
				let { captureDraggingState: t } = this.getCurrentSourcePreviewNodeOptions();
				t ? this.actions.publishDragSource() : setTimeout(() => this.actions.publishDragSource(), 0);
			} else if (i) this.beginDragNativeItem(i);
			else if (r && !r.types && (e.target && !e.target.hasAttribute || !e.target.hasAttribute("draggable"))) return;
			else e.preventDefault();
		}, this.handleTopDragEndCapture = () => {
			this.clearCurrentDragSourceNode() && this.monitor.isDragging() && this.actions.endDrag(), this.cancelHover();
		}, this.handleTopDragEnterCapture = (e) => {
			if (this.dragEnterTargetIds = [], this.isDraggingNativeItem()) {
				var t;
				(t = this.currentNativeSource) == null || t.loadDataTransfer(e.dataTransfer);
			}
			if (!this.enterLeaveCounter.enter(e.target) || this.monitor.isDragging()) return;
			let { dataTransfer: n } = e, r = aO(n);
			r && this.beginDragNativeItem(r, n);
		}, this.handleTopDragEnter = (e) => {
			let { dragEnterTargetIds: t } = this;
			this.dragEnterTargetIds = [], this.monitor.isDragging() && (this.altKeyPressed = e.altKey, t.length > 0 && this.actions.hover(t, { clientOffset: dO(e) }), t.some((e) => this.monitor.canDropOnTarget(e)) && (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = this.getCurrentDropEffect())));
		}, this.handleTopDragOverCapture = (e) => {
			if (this.dragOverTargetIds = [], this.isDraggingNativeItem()) {
				var t;
				(t = this.currentNativeSource) == null || t.loadDataTransfer(e.dataTransfer);
			}
		}, this.handleTopDragOver = (e) => {
			let { dragOverTargetIds: t } = this;
			if (this.dragOverTargetIds = [], !this.monitor.isDragging()) {
				e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "none");
				return;
			}
			this.altKeyPressed = e.altKey, this.lastClientOffset = dO(e), this.scheduleHover(t), (t || []).some((e) => this.monitor.canDropOnTarget(e)) ? (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = this.getCurrentDropEffect())) : this.isDraggingNativeItem() ? e.preventDefault() : (e.preventDefault(), e.dataTransfer && (e.dataTransfer.dropEffect = "none"));
		}, this.handleTopDragLeaveCapture = (e) => {
			this.isDraggingNativeItem() && e.preventDefault(), this.enterLeaveCounter.leave(e.target) && (this.isDraggingNativeItem() && setTimeout(() => this.endDragNativeItem(), 0), this.cancelHover());
		}, this.handleTopDropCapture = (e) => {
			if (this.dropTargetIds = [], this.isDraggingNativeItem()) {
				var t;
				e.preventDefault(), (t = this.currentNativeSource) == null || t.loadDataTransfer(e.dataTransfer);
			} else aO(e.dataTransfer) && e.preventDefault();
			this.enterLeaveCounter.reset();
		}, this.handleTopDrop = (e) => {
			let { dropTargetIds: t } = this;
			this.dropTargetIds = [], this.actions.hover(t, { clientOffset: dO(e) }), this.actions.drop({ dropEffect: this.getCurrentDropEffect() }), this.isDraggingNativeItem() ? this.endDragNativeItem() : this.monitor.isDragging() && this.actions.endDrag(), this.cancelHover();
		}, this.handleSelectStart = (e) => {
			let t = e.target;
			typeof t.dragDrop == "function" && (t.tagName === "INPUT" || t.tagName === "SELECT" || t.tagName === "TEXTAREA" || t.isContentEditable || (e.preventDefault(), t.dragDrop()));
		}, this.options = new hO(t, n), this.actions = e.getActions(), this.monitor = e.getMonitor(), this.registry = e.getRegistry(), this.enterLeaveCounter = new YD(this.isNodeInDocument);
	}
}, yO = function(e, t, n) {
	return new vO(e, t, n);
}, bO;
(function(e) {
	e.mouse = "mouse", e.touch = "touch", e.keyboard = "keyboard";
})(bO ||= {});
//#endregion
//#region node_modules/react-dnd-touch-backend/dist/OptionsReader.js
var xO = class {
	get delay() {
		return this.args.delay ?? 0;
	}
	get scrollAngleRanges() {
		return this.args.scrollAngleRanges;
	}
	get getDropTargetElementsAtPoint() {
		return this.args.getDropTargetElementsAtPoint;
	}
	get ignoreContextMenu() {
		return this.args.ignoreContextMenu ?? !1;
	}
	get enableHoverOutsideTarget() {
		return this.args.enableHoverOutsideTarget ?? !1;
	}
	get enableKeyboardEvents() {
		return this.args.enableKeyboardEvents ?? !1;
	}
	get enableMouseEvents() {
		return this.args.enableMouseEvents ?? !1;
	}
	get enableTouchEvents() {
		return this.args.enableTouchEvents ?? !0;
	}
	get touchSlop() {
		return this.args.touchSlop || 0;
	}
	get delayTouchStart() {
		return this.args?.delayTouchStart ?? this.args?.delay ?? 0;
	}
	get delayMouseStart() {
		return this.args?.delayMouseStart ?? this.args?.delay ?? 0;
	}
	get window() {
		if (this.context && this.context.window) return this.context.window;
		if (typeof window < "u") return window;
	}
	get document() {
		if (this.context?.document) return this.context.document;
		if (this.window) return this.window.document;
	}
	get rootElement() {
		return this.args?.rootElement || this.document;
	}
	constructor(e, t) {
		this.args = e, this.context = t;
	}
};
//#endregion
//#region node_modules/react-dnd-touch-backend/dist/utils/math.js
function SO(e, t, n, r) {
	return Math.sqrt(Math.abs(n - e) ** 2 + Math.abs(r - t) ** 2);
}
function CO(e, t, n, r, i) {
	if (!i) return !1;
	let a = Math.atan2(r - t, n - e) * 180 / Math.PI + 180;
	for (let e = 0; e < i.length; ++e) {
		let t = i[e];
		if (t && (t.start == null || a >= t.start) && (t.end == null || a <= t.end)) return !0;
	}
	return !1;
}
//#endregion
//#region node_modules/react-dnd-touch-backend/dist/utils/predicates.js
var wO = {
	Left: 1,
	Right: 2,
	Center: 4
}, TO = {
	Left: 0,
	Center: 1,
	Right: 2
};
function EO(e) {
	return e.button === void 0 || e.button === TO.Left;
}
function DO(e) {
	return e.buttons === void 0 || (e.buttons & wO.Left) === 0;
}
function OO(e) {
	return !!e.targetTouches;
}
//#endregion
//#region node_modules/react-dnd-touch-backend/dist/utils/offsets.js
var kO = 1;
function AO(e) {
	let t = e.nodeType === kO ? e : e.parentElement;
	if (!t) return;
	let { top: n, left: r } = t.getBoundingClientRect();
	return {
		x: r,
		y: n
	};
}
function jO(e, t) {
	if (e.targetTouches.length === 1) return MO(e.targetTouches[0]);
	if (t && e.touches.length === 1 && e.touches[0].target === t.target) return MO(e.touches[0]);
}
function MO(e, t) {
	return OO(e) ? jO(e, t) : {
		x: e.clientX,
		y: e.clientY
	};
}
//#endregion
//#region node_modules/react-dnd-touch-backend/dist/utils/supportsPassive.js
var NO = (() => {
	let e = !1;
	try {
		addEventListener("test", () => {}, Object.defineProperty({}, "passive", { get() {
			return e = !0, !0;
		} }));
	} catch {}
	return e;
})(), PO = {
	[bO.mouse]: {
		start: "mousedown",
		move: "mousemove",
		end: "mouseup",
		contextmenu: "contextmenu"
	},
	[bO.touch]: {
		start: "touchstart",
		move: "touchmove",
		end: "touchend"
	},
	[bO.keyboard]: { keydown: "keydown" }
}, FO = class e {
	profile() {
		return {
			sourceNodes: this.sourceNodes.size,
			sourcePreviewNodes: this.sourcePreviewNodes.size,
			sourcePreviewNodeOptions: this.sourcePreviewNodeOptions.size,
			targetNodes: this.targetNodes.size,
			dragOverTargetIds: this.dragOverTargetIds?.length || 0
		};
	}
	get document() {
		return this.options.document;
	}
	setup() {
		let t = this.options.rootElement;
		t && (Z(!e.isSetUp, "Cannot have two Touch backends at the same time."), e.isSetUp = !0, this.addEventListener(t, "start", this.getTopMoveStartHandler()), this.addEventListener(t, "start", this.handleTopMoveStartCapture, !0), this.addEventListener(t, "move", this.handleTopMove), this.addEventListener(t, "move", this.handleTopMoveCapture, !0), this.addEventListener(t, "end", this.handleTopMoveEndCapture, !0), this.options.enableMouseEvents && !this.options.ignoreContextMenu && this.addEventListener(t, "contextmenu", this.handleTopMoveEndCapture), this.options.enableKeyboardEvents && this.addEventListener(t, "keydown", this.handleCancelOnEscape, !0));
	}
	teardown() {
		let t = this.options.rootElement;
		t && (e.isSetUp = !1, this._mouseClientOffset = {}, this.removeEventListener(t, "start", this.handleTopMoveStartCapture, !0), this.removeEventListener(t, "start", this.handleTopMoveStart), this.removeEventListener(t, "move", this.handleTopMoveCapture, !0), this.removeEventListener(t, "move", this.handleTopMove), this.removeEventListener(t, "end", this.handleTopMoveEndCapture, !0), this.options.enableMouseEvents && !this.options.ignoreContextMenu && this.removeEventListener(t, "contextmenu", this.handleTopMoveEndCapture), this.options.enableKeyboardEvents && this.removeEventListener(t, "keydown", this.handleCancelOnEscape, !0), this.uninstallSourceNodeRemovalObserver());
	}
	addEventListener(e, t, n, r = !1) {
		let i = NO ? {
			capture: r,
			passive: !1
		} : r;
		this.listenerTypes.forEach(function(r) {
			let a = PO[r][t];
			a && e.addEventListener(a, n, i);
		});
	}
	removeEventListener(e, t, n, r = !1) {
		let i = NO ? {
			capture: r,
			passive: !1
		} : r;
		this.listenerTypes.forEach(function(r) {
			let a = PO[r][t];
			a && e.removeEventListener(a, n, i);
		});
	}
	connectDragSource(e, t) {
		let n = this.handleMoveStart.bind(this, e);
		return this.sourceNodes.set(e, t), this.addEventListener(t, "start", n), () => {
			this.sourceNodes.delete(e), this.removeEventListener(t, "start", n);
		};
	}
	connectDragPreview(e, t, n) {
		return this.sourcePreviewNodeOptions.set(e, n), this.sourcePreviewNodes.set(e, t), () => {
			this.sourcePreviewNodes.delete(e), this.sourcePreviewNodeOptions.delete(e);
		};
	}
	connectDropTarget(e, t) {
		let n = this.options.rootElement;
		if (!this.document || !n) return () => {};
		let r = (r) => {
			if (!this.document || !n || !this.monitor.isDragging()) return;
			let i;
			switch (r.type) {
				case PO.mouse.move:
					i = {
						x: r.clientX,
						y: r.clientY
					};
					break;
				case PO.touch.move: i = {
					x: r.touches[0]?.clientX || 0,
					y: r.touches[0]?.clientY || 0
				};
			}
			let a = i == null ? void 0 : this.document.elementFromPoint(i.x, i.y), o = a && t.contains(a);
			if (a === t || o) return this.handleMove(r, e);
		};
		return this.addEventListener(this.document.body, "move", r), this.targetNodes.set(e, t), () => {
			this.document && (this.targetNodes.delete(e), this.removeEventListener(this.document.body, "move", r));
		};
	}
	getTopMoveStartHandler() {
		return !this.options.delayTouchStart && !this.options.delayMouseStart ? this.handleTopMoveStart : this.handleTopMoveStartDelay;
	}
	installSourceNodeRemovalObserver(e) {
		this.uninstallSourceNodeRemovalObserver(), this.draggedSourceNode = e, this.draggedSourceNodeRemovalObserver = new MutationObserver(() => {
			e && !e.parentElement && (this.resurrectSourceNode(), this.uninstallSourceNodeRemovalObserver());
		}), !(!e || !e.parentElement) && this.draggedSourceNodeRemovalObserver.observe(e.parentElement, { childList: !0 });
	}
	resurrectSourceNode() {
		this.document && this.draggedSourceNode && (this.draggedSourceNode.style.display = "none", this.draggedSourceNode.removeAttribute("data-reactid"), this.document.body.appendChild(this.draggedSourceNode));
	}
	uninstallSourceNodeRemovalObserver() {
		this.draggedSourceNodeRemovalObserver && this.draggedSourceNodeRemovalObserver.disconnect(), this.draggedSourceNodeRemovalObserver = void 0, this.draggedSourceNode = void 0;
	}
	constructor(e, t, n) {
		this.getSourceClientOffset = (e) => {
			let t = this.sourceNodes.get(e);
			return t && AO(t);
		}, this.handleTopMoveStartCapture = (e) => {
			EO(e) && (this.moveStartSourceIds = []);
		}, this.handleMoveStart = (e) => {
			Array.isArray(this.moveStartSourceIds) && this.moveStartSourceIds.unshift(e);
		}, this.handleTopMoveStart = (e) => {
			if (!EO(e)) return;
			let t = MO(e);
			t && (OO(e) && (this.lastTargetTouchFallback = e.targetTouches[0]), this._mouseClientOffset = t), this.waitingForDelay = !1;
		}, this.handleTopMoveStartDelay = (e) => {
			if (!EO(e)) return;
			let t = e.type === PO.touch.start ? this.options.delayTouchStart : this.options.delayMouseStart;
			this.timeout = setTimeout(this.handleTopMoveStart.bind(this, e), t), this.waitingForDelay = !0;
		}, this.handleTopMoveCapture = () => {
			this.dragOverTargetIds = [];
		}, this.handleMove = (e, t) => {
			this.dragOverTargetIds && this.dragOverTargetIds.unshift(t);
		}, this.handleTopMove = (e) => {
			if (this.timeout && clearTimeout(this.timeout), !this.document || this.waitingForDelay) return;
			let { moveStartSourceIds: t, dragOverTargetIds: n } = this, r = this.options.enableHoverOutsideTarget, i = MO(e, this.lastTargetTouchFallback);
			if (!i) return;
			if (this._isScrolling || !this.monitor.isDragging() && CO(this._mouseClientOffset.x || 0, this._mouseClientOffset.y || 0, i.x, i.y, this.options.scrollAngleRanges)) {
				this._isScrolling = !0;
				return;
			}
			if (!this.monitor.isDragging() && this._mouseClientOffset.hasOwnProperty("x") && t && SO(this._mouseClientOffset.x || 0, this._mouseClientOffset.y || 0, i.x, i.y) > (this.options.touchSlop ? this.options.touchSlop : 0) && (this.moveStartSourceIds = void 0, this.actions.beginDrag(t, {
				clientOffset: this._mouseClientOffset,
				getSourceClientOffset: this.getSourceClientOffset,
				publishSource: !1
			})), !this.monitor.isDragging()) return;
			let a = this.sourceNodes.get(this.monitor.getSourceId());
			this.installSourceNodeRemovalObserver(a), this.actions.publishDragSource(), e.cancelable && e.preventDefault();
			let o = (n || []).map((e) => this.targetNodes.get(e)).filter((e) => !!e), s = this.options.getDropTargetElementsAtPoint ? this.options.getDropTargetElementsAtPoint(i.x, i.y, o) : this.document.elementsFromPoint(i.x, i.y), c = [];
			for (let e in s) {
				if (!s.hasOwnProperty(e)) continue;
				let t = s[e];
				for (t != null && c.push(t); t;) t = t.parentElement, t && c.indexOf(t) === -1 && c.push(t);
			}
			let l = c.filter((e) => o.indexOf(e) > -1).map((e) => this._getDropTargetId(e)).filter((e) => !!e).filter((e, t, n) => n.indexOf(e) === t);
			if (r) for (let e in this.targetNodes) {
				let t = this.targetNodes.get(e);
				if (a && t && t.contains(a) && l.indexOf(e) === -1) {
					l.unshift(e);
					break;
				}
			}
			l.reverse(), this.actions.hover(l, { clientOffset: i });
		}, this._getDropTargetId = (e) => {
			let t = this.targetNodes.keys(), n = t.next();
			for (; n.done === !1;) {
				let r = n.value;
				if (e === this.targetNodes.get(r)) return r;
				n = t.next();
			}
		}, this.handleTopMoveEndCapture = (e) => {
			if (this._isScrolling = !1, this.lastTargetTouchFallback = void 0, DO(e)) {
				if (!this.monitor.isDragging() || this.monitor.didDrop()) {
					this.moveStartSourceIds = void 0;
					return;
				}
				e.cancelable && e.preventDefault(), this._mouseClientOffset = {}, this.uninstallSourceNodeRemovalObserver(), this.actions.drop(), this.actions.endDrag();
			}
		}, this.handleCancelOnEscape = (e) => {
			e.key === "Escape" && this.monitor.isDragging() && (this._mouseClientOffset = {}, this.uninstallSourceNodeRemovalObserver(), this.actions.endDrag());
		}, this.options = new xO(n, t), this.actions = e.getActions(), this.monitor = e.getMonitor(), this.sourceNodes = /* @__PURE__ */ new Map(), this.sourcePreviewNodes = /* @__PURE__ */ new Map(), this.sourcePreviewNodeOptions = /* @__PURE__ */ new Map(), this.targetNodes = /* @__PURE__ */ new Map(), this.listenerTypes = [], this._mouseClientOffset = {}, this._isScrolling = !1, this.options.enableMouseEvents && this.listenerTypes.push(bO.mouse), this.options.enableTouchEvents && this.listenerTypes.push(bO.touch), this.options.enableKeyboardEvents && this.listenerTypes.push(bO.keyboard);
	}
}, IO = { backends: [{
	id: "html5",
	backend: yO,
	transition: GD
}, {
	id: "touch",
	backend: function(e, t = {}, n = {}) {
		return new FO(e, t, n);
	},
	options: { enableMouseEvents: !0 },
	preview: !0,
	transition: WD
}] }, LO = /* @__PURE__ */ D(((e, t) => {
	var n;
	function r(e, t) {
		var n = [], r = 0;
		function i(e) {
			return n.push(e), t;
		}
		function a() {
			return n[r++];
		}
		return {
			tokenize: function(t) {
				return t.replace(e, i);
			},
			detokenize: function(e) {
				return e.replace(RegExp("(" + t + ")", "g"), a);
			}
		};
	}
	function i() {
		var e = "`COMMENT`", t = "[^\\u0020-\\u007e]", n = "(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)", i = "(?:[0-9]*\\.[0-9]+|[0-9]+)", a = "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)", o = "direction\\s*:\\s*", s = "[!#$%&*-~]", c = "['\"]?\\s*", l = "(^|[^a-zA-Z])", u = "[^\\}]*?", d = "\\/\\*\\!?\\s*@noflip\\s*\\*\\/", f = "\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/", p = "(?:" + n + "|\\\\[^\\r\\n\\f0-9a-f])", m = "(?:[_a-z]|" + t + "|" + p + ")", h = "(?:[_a-z0-9-]|" + t + "|" + p + ")", g = "-?" + m + h + "*", _ = i + "(?:\\s*" + a + "|" + g + ")?", v = "((?:-?" + _ + ")|(?:inherit|auto))", y = "(?:calc\\((?:" + ("(?:(?:\\(|\\)|\\t| )|" + ("(?:-?" + i + "(?:\\s*" + a + ")?)") + "|(?:\\+|\\-|\\*|\\/)){3,}") + ")\\))", b = "((?:-?" + _ + ")|(?:inherit|auto)|" + y + ")", x = "((?:margin|padding|border-width)\\s*:\\s*)", S = "((?:-color|border-style)\\s*:\\s*)", C = "(#?" + h + "+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))", w = "(?:" + s + "|" + t + "|" + p + ")*?", T = "(?![a-zA-Z])", E = "(?!(" + h + "|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|" + e + ")*?{)", ee = "(?!" + w + c + "\\))", D = "(?=" + w + c + "\\))", te = "(\\s*(?:!important\\s*)?[;}])", ne = /`TMP`/g, re = /`TMPLTR`/g, ie = /`TMPRTL`/g, ae = new RegExp(f, "gi"), oe = RegExp("(" + d + E + "[^;}]+;?)", "gi"), se = RegExp("(" + d + u + "})", "gi"), O = RegExp("(" + o + ")ltr", "gi"), ce = RegExp("(" + o + ")rtl", "gi"), k = RegExp(l + "(left)" + T + ee + E, "gi"), le = RegExp(l + "(right)" + T + ee + E, "gi"), ue = RegExp(l + "(left)" + D, "gi"), de = RegExp(l + "(right)" + D, "gi"), fe = /(:dir\( *)ltr( *\))/g, pe = /(:dir\( *)rtl( *\))/g, me = RegExp(l + "(ltr)" + D, "gi"), he = RegExp(l + "(rtl)" + D, "gi"), ge = RegExp(l + "([ns]?)e-resize", "gi"), _e = RegExp(l + "([ns]?)w-resize", "gi"), ve = RegExp(x + b + "(\\s+)" + b + "(\\s+)" + b + "(\\s+)" + b + te, "gi"), ye = RegExp(S + C + "(\\s+)" + C + "(\\s+)" + C + "(\\s+)" + C + te, "gi"), be = RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)(" + _ + ")", "gi"), xe = RegExp("(background-position-x\\s*:\\s*)(-?" + i + "%)", "gi"), Se = RegExp("(border-radius\\s*:\\s*)" + v + "(?:(?:\\s+" + v + ")(?:\\s+" + v + ")?(?:\\s+" + v + ")?)?(?:(?:(?:\\s*\\/\\s*)" + v + ")(?:\\s+" + v + ")?(?:\\s+" + v + ")?(?:\\s+" + v + ")?)?" + te, "gi"), Ce = RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)" + v, "gi"), A = RegExp("(text-shadow\\s*:\\s*)" + v + "(\\s*)" + C, "gi"), we = RegExp("(text-shadow\\s*:\\s*)" + C + "(\\s*)" + v, "gi"), Te = RegExp("(text-shadow\\s*:\\s*)" + v, "gi"), Ee = RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)" + v + "(\\s*\\))", "gi"), De = RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)" + v + "((?:\\s*,\\s*" + v + "){0,2}\\s*\\))", "gi");
		function Oe(e, t, n) {
			var r, i;
			return t.split("(").length > t.split(")").length ? e : (n.slice(-1) === "%" && (r = n.indexOf("."), r === -1 ? n = 100 - parseFloat(n) + "%" : (i = n.length - r - 2, n = 100 - parseFloat(n), n = n.toFixed(i) + "%")), t + n);
		}
		function ke(e) {
			switch (e.length) {
				case 4:
					e = [
						e[1],
						e[0],
						e[3],
						e[2]
					];
					break;
				case 3:
					e = [
						e[1],
						e[0],
						e[1],
						e[2]
					];
					break;
				case 2:
					e = [e[1], e[0]];
					break;
				case 1: e = [e[0]];
			}
			return e.join(" ");
		}
		function Ae(e, t) {
			var n, r = [].slice.call(arguments), i = r.slice(2, 6).filter(function(e) {
				return e;
			}), a = r.slice(6, 10).filter(function(e) {
				return e;
			}), o = r[10] || "";
			return n = a.length ? ke(i) + " / " + ke(a) : ke(i), t + n + o;
		}
		function je(e) {
			return parseFloat(e) === 0 ? e : e[0] === "-" ? e.slice(1) : "-" + e;
		}
		function Me(e, t, n) {
			return t + je(n);
		}
		function Ne(e, t, n, r, i) {
			return t + n + je(r) + i;
		}
		function Pe(e, t, n, r, i) {
			return t + n + r + je(i);
		}
		return { transform: function(t, n) {
			var i = new r(oe, "`NOFLIP_SINGLE`"), a = new r(se, "`NOFLIP_CLASS`"), o = new r(ae, e);
			return t = o.tokenize(a.tokenize(i.tokenize(t.replace("`", "%60")))), n.transformDirInUrl && (t = t.replace(fe, "$1`TMPLTR`$2").replace(pe, "$1`TMPRTL`$2").replace(me, "$1`TMP`").replace(he, "$1ltr").replace(ne, "rtl").replace(re, "ltr").replace(ie, "rtl")), n.transformEdgeInUrl && (t = t.replace(ue, "$1`TMP`").replace(de, "$1left").replace(ne, "right")), t = t.replace(O, "$1`TMP`").replace(ce, "$1ltr").replace(ne, "rtl").replace(k, "$1`TMP`").replace(le, "$1left").replace(ne, "right").replace(ge, "$1$2`TMP`").replace(_e, "$1$2e-resize").replace(ne, "w-resize").replace(Se, Ae).replace(Ce, Me).replace(A, Pe).replace(we, Pe).replace(Te, Me).replace(Ee, Ne).replace(De, Ne).replace(ve, "$1$2$3$8$5$6$7$4$9").replace(ye, "$1$2$3$8$5$6$7$4$9").replace(be, Oe).replace(xe, Oe), t = i.detokenize(a.detokenize(o.detokenize(t))), t;
		} };
	}
	n = new i(), t !== void 0 && t.exports ? e.transform = function(e, t, r) {
		var i;
		return typeof t == "object" ? i = t : (i = {}, typeof t == "boolean" && (i.transformDirInUrl = t), typeof r == "boolean" && (i.transformEdgeInUrl = r)), n.transform(e, i);
	} : typeof window < "u" && (window.cssjanus = n);
})), RO = "-ms-", zO = "-moz-", BO = "-webkit-", VO = "comm", HO = "rule", UO = "decl", WO = "@import", GO = "@keyframes", KO = Math.abs, qO = String.fromCharCode, JO = Object.assign;
function YO(e, t) {
	return ek(e, 0) ^ 45 ? (((t << 2 ^ ek(e, 0)) << 2 ^ ek(e, 1)) << 2 ^ ek(e, 2)) << 2 ^ ek(e, 3) : 0;
}
function XO(e) {
	return e.trim();
}
function ZO(e, t) {
	return (e = t.exec(e)) ? e[0] : e;
}
function QO(e, t, n) {
	return e.replace(t, n);
}
function $O(e, t) {
	return e.indexOf(t);
}
function ek(e, t) {
	return e.charCodeAt(t) | 0;
}
function tk(e, t, n) {
	return e.slice(t, n);
}
function nk(e) {
	return e.length;
}
function rk(e) {
	return e.length;
}
function ik(e, t) {
	return t.push(e), e;
}
function ak(e, t) {
	return e.map(t).join("");
}
function ok(e, t) {
	return e.filter(function(e) {
		return !ZO(e, t);
	});
}
//#endregion
//#region node_modules/stylis/src/Tokenizer.js
var sk = 1, ck = 1, lk = 0, uk = 0, dk = 0, fk = "";
function pk(e, t, n, r, i, a, o, s) {
	return {
		value: e,
		root: t,
		parent: n,
		type: r,
		props: i,
		children: a,
		line: sk,
		column: ck,
		length: o,
		return: "",
		siblings: s
	};
}
function mk(e, t) {
	return JO(pk("", null, null, "", null, null, 0, e.siblings), e, { length: -e.length }, t);
}
function hk(e) {
	for (; e.root;) e = mk(e.root, { children: [e] });
	ik(e, e.siblings);
}
function gk() {
	return dk;
}
function _k() {
	return dk = uk > 0 ? ek(fk, --uk) : 0, ck--, dk === 10 && (ck = 1, sk--), dk;
}
function vk() {
	return dk = uk < lk ? ek(fk, uk++) : 0, ck++, dk === 10 && (ck = 1, sk++), dk;
}
function yk() {
	return ek(fk, uk);
}
function bk() {
	return uk;
}
function xk(e, t) {
	return tk(fk, e, t);
}
function Sk(e) {
	switch (e) {
		case 0:
		case 9:
		case 10:
		case 13:
		case 32: return 5;
		case 33:
		case 43:
		case 44:
		case 47:
		case 62:
		case 64:
		case 126:
		case 59:
		case 123:
		case 125: return 4;
		case 58: return 3;
		case 34:
		case 39:
		case 40:
		case 91: return 2;
		case 41:
		case 93: return 1;
	}
	return 0;
}
function Ck(e) {
	return sk = ck = 1, lk = nk(fk = e), uk = 0, [];
}
function wk(e) {
	return fk = "", e;
}
function Tk(e) {
	return XO(xk(uk - 1, Ok(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
}
function Ek(e) {
	for (; (dk = yk()) && dk < 33;) vk();
	return Sk(e) > 2 || Sk(dk) > 3 ? "" : " ";
}
function Dk(e, t) {
	for (; --t && vk() && !(dk < 48 || dk > 102 || dk > 57 && dk < 65 || dk > 70 && dk < 97););
	return xk(e, bk() + (t < 6 && yk() == 32 && vk() == 32));
}
function Ok(e) {
	for (; vk();) switch (dk) {
		case e: return uk;
		case 34:
		case 39:
			e !== 34 && e !== 39 && Ok(dk);
			break;
		case 40:
			e === 41 && Ok(e);
			break;
		case 92:
			vk();
			break;
	}
	return uk;
}
function kk(e, t) {
	for (; vk() && e + dk !== 57 && (e + dk !== 84 || yk() !== 47););
	return "/*" + xk(t, uk - 1) + "*" + qO(e === 47 ? e : vk());
}
function Ak(e) {
	for (; !Sk(yk());) vk();
	return xk(e, uk);
}
//#endregion
//#region node_modules/stylis/src/Parser.js
function jk(e) {
	return wk(Mk("", null, null, null, [""], e = Ck(e), 0, [0], e));
}
function Mk(e, t, n, r, i, a, o, s, c) {
	for (var l = 0, u = 0, d = o, f = 0, p = 0, m = 0, h = 1, g = 1, _ = 1, v = 0, y = 0, b = "", x = i, S = a, C = r, w = b; g;) switch (m = y, y = vk()) {
		case 40:
			m != 108 && ek(w, d - 1) == 58 ? (v++, w += "(") : w += Tk(y);
			break;
		case 41:
			v--, w += ")";
			break;
		case 34:
		case 39:
		case 91:
			w += Tk(y);
			break;
		case 9:
		case 10:
		case 13:
		case 32:
			if (v > 0) {
				w += qO(y);
				break;
			}
			w += Ek(m);
			break;
		case 92:
			w += Dk(bk() - 1, 7);
			continue;
		case 47:
			switch (yk()) {
				case 42:
				case 47:
					ik(Pk(kk(vk(), bk()), t, n, c), c), (Sk(m || 1) == 5 || Sk(yk() || 1) == 5) && nk(w) && tk(w, -1, void 0) !== " " && (w += " ");
					break;
				default: w += "/";
			}
			break;
		case 123 * h: s[l++] = nk(w) * _;
		case 125 * h:
		case 59:
		case 0:
			if (v > 0 && y) {
				w += qO(y);
				break;
			}
			switch (y) {
				case 0:
				case 125: g = 0;
				case 59 + u:
					_ == -1 && (w = QO(w, /\f/g, "")), p > 0 && (nk(w) - d || h === 0) && ik(p > 32 ? Fk(w + ";", r, n, d - 1, c) : Fk(QO(w, " ", "") + ";", r, n, d - 2, c), c);
					break;
				case 59: w += ";";
				default: if (ik(C = Nk(w, t, n, l, u, i, s, b, x = [], S = [], d, a), a), y === 123) {
					if (u === 0) Mk(w, t, C, C, x, a, d, s, S);
					else {
						switch (f) {
							case 99: if (ek(w, 3) === 110) break;
							case 108: if (ek(w, 2) === 97) break;
							default: u = 0;
							case 100:
							case 109:
							case 115:
						}
						u ? Mk(e, C, C, r && ik(Nk(e, C, C, 0, 0, i, s, b, i, x = [], d, S), S), i, S, d, s, r ? x : S) : Mk(w, C, C, C, [""], S, 0, s, S);
					}
				}
			}
			l = u = p = 0, h = _ = 1, b = w = "", d = o;
			break;
		case 58: d = 1 + nk(w), p = m;
		default:
			if (h < 1) {
				if (y == 123) --h;
				else if (y == 125 && h++ == 0 && _k() == 125) continue;
			}
			switch (w += qO(y), y * h) {
				case 38:
					_ = u > 0 ? 1 : (w += "\f", -1);
					break;
				case 44:
					if (v > 0) break;
					s[l++] = (nk(w) - 1) * _, _ = 1;
					break;
				case 64:
					yk() === 45 && (w += Tk(vk())), f = yk(), u = d = nk(b = w += Ak(bk())), y++;
					break;
				case 45: m === 45 && nk(w) == 2 && (h = 0);
			}
	}
	return a;
}
function Nk(e, t, n, r, i, a, o, s, c, l, u, d) {
	for (var f = i - 1, p = i === 0 ? a : [""], m = rk(p), h = 0, g = 0, _ = 0; h < r; ++h) for (var v = 0, y = tk(e, f + 1, f = KO(g = o[h])), b = e; v < m; ++v) (b = XO(g > 0 ? p[v] + " " + y : QO(y, /&\f/g, p[v]))) && (c[_++] = b);
	return pk(e, t, n, i === 0 ? HO : s, c, l, u, d);
}
function Pk(e, t, n, r) {
	return pk(e, t, n, VO, qO(gk()), tk(e, 2, -2), 0, r);
}
function Fk(e, t, n, r, i) {
	return pk(e, t, n, UO, tk(e, 0, r), tk(e, r + 1, -1), r, i);
}
//#endregion
//#region node_modules/stylis/src/Prefixer.js
function Ik(e, t, n) {
	switch (YO(e, t)) {
		case 5103: return BO + "print-" + e + e;
		case 5737:
		case 4201:
		case 3177:
		case 3433:
		case 1641:
		case 4457:
		case 2921:
		case 5572:
		case 6356:
		case 5844:
		case 3191:
		case 6645:
		case 3005:
		case 4215:
		case 6389:
		case 5109:
		case 5365:
		case 5621:
		case 3829:
		case 6391:
		case 5879:
		case 5623:
		case 6135:
		case 4599: return BO + e + e;
		case 4855: return BO + e.replace("add", "source-over").replace("substract", "source-out").replace("intersect", "source-in").replace("exclude", "xor") + e;
		case 4789: return zO + e + e;
		case 5349:
		case 4246:
		case 4810:
		case 6968:
		case 2756: return BO + e + zO + e + RO + e + e;
		case 5936: switch (ek(e, t + 11)) {
			case 114: return BO + e + RO + QO(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
			case 108: return BO + e + RO + QO(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
			case 45: return BO + e + RO + QO(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
		}
		case 6828:
		case 4268:
		case 2903: return BO + e + RO + e + e;
		case 6165: return BO + e + RO + "flex-" + e + e;
		case 5187: return BO + e + QO(e, /(\w+).+(:[^]+)/, BO + "box-$1$2" + RO + "flex-$1$2") + e;
		case 5443: return BO + e + RO + "flex-item-" + QO(e, /flex-|-self/g, "") + (ZO(e, /flex-|baseline/) ? "" : RO + "grid-row-" + QO(e, /flex-|-self/g, "")) + e;
		case 4675: return BO + e + RO + "flex-line-pack" + QO(e, /align-content|flex-|-self/g, "") + e;
		case 5548: return BO + e + RO + QO(e, "shrink", "negative") + e;
		case 5292: return BO + e + RO + QO(e, "basis", "preferred-size") + e;
		case 6060: return BO + "box-" + QO(e, "-grow", "") + BO + e + RO + QO(e, "grow", "positive") + e;
		case 4554: return BO + QO(e, /([^-])(transform)/g, "$1" + BO + "$2") + e;
		case 6187: return QO(QO(QO(e, /(zoom-|grab)/, BO + "$1"), /(image-set)/, BO + "$1"), e, "") + e;
		case 5495:
		case 3959: return QO(e, /(image-set\([^]*)/, BO + "$1$`$1");
		case 4968: return QO(QO(e, /(.+:)(flex-)?(.*)/, BO + "box-pack:$3" + RO + "flex-pack:$3"), /space-between/, "justify") + BO + e + e;
		case 4200:
			if (!ZO(e, /flex-|baseline/)) return RO + "grid-column-align" + tk(e, t) + e;
			break;
		case 2592:
		case 3360: return RO + QO(e, "template-", "") + e;
		case 4384:
		case 3616: return n && n.some(function(e, n) {
			return t = n, ZO(e.props, /grid-\w+-end/);
		}) ? ~$O(e + (n = n[t].value), "span") ? e : RO + QO(e, "-start", "") + e + RO + "grid-row-span:" + (~$O(n, "span") ? ZO(n, /\d+/) : ZO(n, /\d+/) - +ZO(e, /\d+/)) + ";" : RO + QO(e, "-start", "") + e;
		case 4896:
		case 4128: return n && n.some(function(e) {
			return ZO(e.props, /grid-\w+-start/);
		}) ? e : RO + QO(QO(e, "-end", "-span"), "span ", "") + e;
		case 4095:
		case 3583:
		case 4068:
		case 2532: return QO(e, /(.+)-inline(.+)/, BO + "$1$2") + e;
		case 8116:
		case 7059:
		case 5753:
		case 5535:
		case 5445:
		case 5701:
		case 4933:
		case 4677:
		case 5533:
		case 5789:
		case 5021:
		case 4765:
			if (nk(e) - 1 - t > 6) switch (ek(e, t + 1)) {
				case 109: if (ek(e, t + 4) !== 45) break;
				case 102: return QO(e, /(.+:)(.+)-([^]+)/, "$1" + BO + "$2-$3$1" + zO + (ek(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
				case 115: return ~$O(e, "stretch") ? Ik(QO(e, "stretch", "fill-available"), t, n) + e : e;
			}
			break;
		case 5152:
		case 5920: return QO(e, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function(t, n, r, i, a, o, s) {
			return RO + n + ":" + r + s + (i ? RO + n + "-span:" + (a ? o : o - +r) + s : "") + e;
		});
		case 4949:
			if (ek(e, t + 6) === 121) return QO(e, ":", ":" + BO) + e;
			break;
		case 6444:
			switch (ek(e, ek(e, 14) === 45 ? 18 : 11)) {
				case 120: return QO(e, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, "$1" + BO + (ek(e, 14) === 45 ? "inline-" : "") + "box$3$1" + BO + "$2$3$1" + RO + "$2box$3") + e;
				case 100: return QO(e, ":", ":" + RO) + e;
			}
			break;
		case 5719:
		case 2647:
		case 2135:
		case 3927:
		case 2391: return QO(e, "scroll-", "scroll-snap-") + e;
	}
	return e;
}
//#endregion
//#region node_modules/stylis/src/Serializer.js
function Lk(e, t) {
	for (var n = "", r = 0; r < e.length; r++) n += t(e[r], r, e, t) || "";
	return n;
}
//#endregion
//#region node_modules/stylis/src/Middleware.js
function Rk(e, t, n, r) {
	if (e.length > -1 && !e.return) switch (e.type) {
		case UO:
			e.return = Ik(e.value, e.length, n);
			return;
		case GO: return Lk([mk(e, { value: QO(e.value, "@", "@" + BO) })], r);
		case HO: if (e.length) return ak(n = e.props, function(t) {
			switch (ZO(t, r = /(::plac\w+|:read-\w+)/)) {
				case ":read-only":
				case ":read-write":
					hk(mk(e, { props: [QO(t, /:(read-\w+)/, ":" + zO + "$1")] })), hk(mk(e, { props: [t] })), JO(e, { props: ok(n, r) });
					break;
				case "::placeholder": hk(mk(e, { props: [QO(t, /:(plac\w+)/, ":" + BO + "input-$1")] })), hk(mk(e, { props: [QO(t, /:(plac\w+)/, ":" + zO + "$1")] })), hk(mk(e, { props: [QO(t, /:(plac\w+)/, RO + "input-$1")] })), hk(mk(e, { props: [t] })), JO(e, { props: ok(n, r) });
			}
			return "";
		});
	}
}
//#endregion
//#region node_modules/stylis-plugin-rtl/dist/stylis-rtl.js
var zk = /* @__PURE__ */ k(LO());
function Bk(e, t, n) {
	switch (e.type) {
		case WO:
		case UO:
		case VO: return e.return = e.return || e.value;
		case HO: e.value = Array.isArray(e.props) ? e.props.join(",") : e.props, Array.isArray(e.children) && e.children.forEach(function(e) {
			e.type === "comm" && (e.children = e.value);
		});
	}
	var r = Lk(Array.prototype.concat(e.children), Bk);
	return nk(r) ? e.return = e.value + "{" + r + "}" : "";
}
function Vk(e, t, n, r) {
	if (e.type === "@keyframes" || e.type === "@supports" || e.type === "rule" && (!e.parent || e.parent.type === "@media" || e.parent.type === "rule")) {
		var i = zk.transform(Bk(e, t, n));
		e.children = i ? jk(i)[0].children : [], e.return = "";
	}
}
Object.defineProperty(Vk, "name", { value: "stylisRTLPlugin" });
//#endregion
//#region node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
function Hk(e) {
	if (e.sheet) return e.sheet;
	/* istanbul ignore next */
	for (var t = 0; t < document.styleSheets.length; t++) if (document.styleSheets[t].ownerNode === e) return document.styleSheets[t];
}
function Uk(e) {
	var t = document.createElement("style");
	return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
}
var Wk = /*#__PURE__*/ function() {
	function e(e) {
		var t = this;
		this._insertTag = function(e) {
			var n = t.tags.length === 0 ? t.insertionPoint ? t.insertionPoint.nextSibling : t.prepend ? t.container.firstChild : t.before : t.tags[t.tags.length - 1].nextSibling;
			t.container.insertBefore(e, n), t.tags.push(e);
		}, this.isSpeedy = e.speedy === void 0 || e.speedy, this.tags = [], this.ctr = 0, this.nonce = e.nonce, this.key = e.key, this.container = e.container, this.prepend = e.prepend, this.insertionPoint = e.insertionPoint, this.before = null;
	}
	var t = e.prototype;
	return t.hydrate = function(e) {
		e.forEach(this._insertTag);
	}, t.insert = function(e) {
		this.ctr % (this.isSpeedy ? 65e3 : 1) == 0 && this._insertTag(Uk(this));
		var t = this.tags[this.tags.length - 1];
		if (this.isSpeedy) {
			var n = Hk(t);
			try {
				n.insertRule(e, n.cssRules.length);
			} catch {}
		} else t.appendChild(document.createTextNode(e));
		this.ctr++;
	}, t.flush = function() {
		this.tags.forEach(function(e) {
			return e.parentNode?.removeChild(e);
		}), this.tags = [], this.ctr = 0;
	}, e;
}(), Gk = "-ms-", Kk = "-moz-", qk = "-webkit-", Jk = "comm", Yk = "rule", Xk = "decl", Zk = "@import", Qk = "@keyframes", $k = "@layer", eA = Math.abs, tA = String.fromCharCode, nA = Object.assign;
function rA(e, t) {
	return cA(e, 0) ^ 45 ? (((t << 2 ^ cA(e, 0)) << 2 ^ cA(e, 1)) << 2 ^ cA(e, 2)) << 2 ^ cA(e, 3) : 0;
}
function iA(e) {
	return e.trim();
}
function aA(e, t) {
	return (e = t.exec(e)) ? e[0] : e;
}
function oA(e, t, n) {
	return e.replace(t, n);
}
function sA(e, t) {
	return e.indexOf(t);
}
function cA(e, t) {
	return e.charCodeAt(t) | 0;
}
function lA(e, t, n) {
	return e.slice(t, n);
}
function uA(e) {
	return e.length;
}
function dA(e) {
	return e.length;
}
function fA(e, t) {
	return t.push(e), e;
}
function pA(e, t) {
	return e.map(t).join("");
}
//#endregion
//#region node_modules/@emotion/cache/node_modules/stylis/src/Tokenizer.js
var mA = 1, hA = 1, gA = 0, _A = 0, vA = 0, yA = "";
function bA(e, t, n, r, i, a, o) {
	return {
		value: e,
		root: t,
		parent: n,
		type: r,
		props: i,
		children: a,
		line: mA,
		column: hA,
		length: o,
		return: ""
	};
}
function xA(e, t) {
	return nA(bA("", null, null, "", null, null, 0), e, { length: -e.length }, t);
}
function SA() {
	return vA;
}
function CA() {
	return vA = _A > 0 ? cA(yA, --_A) : 0, hA--, vA === 10 && (hA = 1, mA--), vA;
}
function wA() {
	return vA = _A < gA ? cA(yA, _A++) : 0, hA++, vA === 10 && (hA = 1, mA++), vA;
}
function TA() {
	return cA(yA, _A);
}
function EA() {
	return _A;
}
function DA(e, t) {
	return lA(yA, e, t);
}
function OA(e) {
	switch (e) {
		case 0:
		case 9:
		case 10:
		case 13:
		case 32: return 5;
		case 33:
		case 43:
		case 44:
		case 47:
		case 62:
		case 64:
		case 126:
		case 59:
		case 123:
		case 125: return 4;
		case 58: return 3;
		case 34:
		case 39:
		case 40:
		case 91: return 2;
		case 41:
		case 93: return 1;
	}
	return 0;
}
function kA(e) {
	return mA = hA = 1, gA = uA(yA = e), _A = 0, [];
}
function AA(e) {
	return yA = "", e;
}
function jA(e) {
	return iA(DA(_A - 1, PA(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
}
function MA(e) {
	for (; (vA = TA()) && vA < 33;) wA();
	return OA(e) > 2 || OA(vA) > 3 ? "" : " ";
}
function NA(e, t) {
	for (; --t && wA() && !(vA < 48 || vA > 102 || vA > 57 && vA < 65 || vA > 70 && vA < 97););
	return DA(e, EA() + (t < 6 && TA() == 32 && wA() == 32));
}
function PA(e) {
	for (; wA();) switch (vA) {
		case e: return _A;
		case 34:
		case 39:
			e !== 34 && e !== 39 && PA(vA);
			break;
		case 40:
			e === 41 && PA(e);
			break;
		case 92:
			wA();
			break;
	}
	return _A;
}
function FA(e, t) {
	for (; wA() && e + vA !== 57 && (e + vA !== 84 || TA() !== 47););
	return "/*" + DA(t, _A - 1) + "*" + tA(e === 47 ? e : wA());
}
function IA(e) {
	for (; !OA(TA());) wA();
	return DA(e, _A);
}
//#endregion
//#region node_modules/@emotion/cache/node_modules/stylis/src/Parser.js
function LA(e) {
	return AA(RA("", null, null, null, [""], e = kA(e), 0, [0], e));
}
function RA(e, t, n, r, i, a, o, s, c) {
	for (var l = 0, u = 0, d = o, f = 0, p = 0, m = 0, h = 1, g = 1, _ = 1, v = 0, y = "", b = i, x = a, S = r, C = y; g;) switch (m = v, v = wA()) {
		case 40: if (m != 108 && cA(C, d - 1) == 58) {
			sA(C += oA(jA(v), "&", "&\f"), "&\f") != -1 && (_ = -1);
			break;
		}
		case 34:
		case 39:
		case 91:
			C += jA(v);
			break;
		case 9:
		case 10:
		case 13:
		case 32:
			C += MA(m);
			break;
		case 92:
			C += NA(EA() - 1, 7);
			continue;
		case 47:
			switch (TA()) {
				case 42:
				case 47:
					fA(BA(FA(wA(), EA()), t, n), c);
					break;
				default: C += "/";
			}
			break;
		case 123 * h: s[l++] = uA(C) * _;
		case 125 * h:
		case 59:
		case 0:
			switch (v) {
				case 0:
				case 125: g = 0;
				case 59 + u:
					_ == -1 && (C = oA(C, /\f/g, "")), p > 0 && uA(C) - d && fA(p > 32 ? VA(C + ";", r, n, d - 1) : VA(oA(C, " ", "") + ";", r, n, d - 2), c);
					break;
				case 59: C += ";";
				default: if (fA(S = zA(C, t, n, l, u, i, s, y, b = [], x = [], d), a), v === 123) {
					if (u === 0) RA(C, t, S, S, b, a, d, s, x);
					else switch (f === 99 && cA(C, 3) === 110 ? 100 : f) {
						case 100:
						case 108:
						case 109:
						case 115:
							RA(e, S, S, r && fA(zA(e, S, S, 0, 0, i, s, y, i, b = [], d), x), i, x, d, s, r ? b : x);
							break;
						default: RA(C, S, S, S, [""], x, 0, s, x);
					}
				}
			}
			l = u = p = 0, h = _ = 1, y = C = "", d = o;
			break;
		case 58: d = 1 + uA(C), p = m;
		default:
			if (h < 1) {
				if (v == 123) --h;
				else if (v == 125 && h++ == 0 && CA() == 125) continue;
			}
			switch (C += tA(v), v * h) {
				case 38:
					_ = u > 0 ? 1 : (C += "\f", -1);
					break;
				case 44:
					s[l++] = (uA(C) - 1) * _, _ = 1;
					break;
				case 64:
					TA() === 45 && (C += jA(wA())), f = TA(), u = d = uA(y = C += IA(EA())), v++;
					break;
				case 45: m === 45 && uA(C) == 2 && (h = 0);
			}
	}
	return a;
}
function zA(e, t, n, r, i, a, o, s, c, l, u) {
	for (var d = i - 1, f = i === 0 ? a : [""], p = dA(f), m = 0, h = 0, g = 0; m < r; ++m) for (var _ = 0, v = lA(e, d + 1, d = eA(h = o[m])), y = e; _ < p; ++_) (y = iA(h > 0 ? f[_] + " " + v : oA(v, /&\f/g, f[_]))) && (c[g++] = y);
	return bA(e, t, n, i === 0 ? Yk : s, c, l, u);
}
function BA(e, t, n) {
	return bA(e, t, n, Jk, tA(SA()), lA(e, 2, -2), 0);
}
function VA(e, t, n, r) {
	return bA(e, t, n, Xk, lA(e, 0, r), lA(e, r + 1, -1), r);
}
//#endregion
//#region node_modules/@emotion/cache/node_modules/stylis/src/Serializer.js
function HA(e, t) {
	for (var n = "", r = dA(e), i = 0; i < r; i++) n += t(e[i], i, e, t) || "";
	return n;
}
function UA(e, t, n, r) {
	switch (e.type) {
		case $k: if (e.children.length) break;
		case Zk:
		case Xk: return e.return = e.return || e.value;
		case Jk: return "";
		case Qk: return e.return = e.value + "{" + HA(e.children, r) + "}";
		case Yk: e.value = e.props.join(",");
	}
	return uA(n = HA(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
}
//#endregion
//#region node_modules/@emotion/cache/node_modules/stylis/src/Middleware.js
function WA(e) {
	var t = dA(e);
	return function(n, r, i, a) {
		for (var o = "", s = 0; s < t; s++) o += e[s](n, r, i, a) || "";
		return o;
	};
}
function GA(e) {
	return function(t) {
		t.root || (t = t.return) && e(t);
	};
}
//#endregion
//#region node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js
var KA = function(e, t, n) {
	for (var r = 0, i = 0; r = i, i = TA(), r === 38 && i === 12 && (t[n] = 1), !OA(i);) wA();
	return DA(e, _A);
}, qA = function(e, t) {
	var n = -1, r = 44;
	do
		switch (OA(r)) {
			case 0:
				r === 38 && TA() === 12 && (t[n] = 1), e[n] += KA(_A - 1, t, n);
				break;
			case 2:
				e[n] += jA(r);
				break;
			case 4: if (r === 44) {
				e[++n] = TA() === 58 ? "&\f" : "", t[n] = e[n].length;
				break;
			}
			default: e[n] += tA(r);
		}
	while (r = wA());
	return e;
}, JA = function(e, t) {
	return AA(qA(kA(e), t));
}, YA = /* #__PURE__ */ new WeakMap(), XA = function(e) {
	if (!(e.type !== "rule" || !e.parent || e.length < 1)) {
		for (var t = e.value, n = e.parent, r = e.column === n.column && e.line === n.line; n.type !== "rule";) if (n = n.parent, !n) return;
		if (!(e.props.length === 1 && t.charCodeAt(0) !== 58 && !YA.get(n)) && !r) {
			YA.set(e, !0);
			for (var i = [], a = JA(t, i), o = n.props, s = 0, c = 0; s < a.length; s++) for (var l = 0; l < o.length; l++, c++) e.props[c] = i[s] ? a[s].replace(/&\f/g, o[l]) : o[l] + " " + a[s];
		}
	}
}, ZA = function(e) {
	if (e.type === "decl") {
		var t = e.value;
		t.charCodeAt(0) === 108 && t.charCodeAt(2) === 98 && (e.return = "", e.value = "");
	}
};
function QA(e, t) {
	switch (rA(e, t)) {
		case 5103: return qk + "print-" + e + e;
		case 5737:
		case 4201:
		case 3177:
		case 3433:
		case 1641:
		case 4457:
		case 2921:
		case 5572:
		case 6356:
		case 5844:
		case 3191:
		case 6645:
		case 3005:
		case 6391:
		case 5879:
		case 5623:
		case 6135:
		case 4599:
		case 4855:
		case 4215:
		case 6389:
		case 5109:
		case 5365:
		case 5621:
		case 3829: return qk + e + e;
		case 5349:
		case 4246:
		case 4810:
		case 6968:
		case 2756: return qk + e + Kk + e + Gk + e + e;
		case 6828:
		case 4268: return qk + e + Gk + e + e;
		case 6165: return qk + e + Gk + "flex-" + e + e;
		case 5187: return qk + e + oA(e, /(\w+).+(:[^]+)/, qk + "box-$1$2" + Gk + "flex-$1$2") + e;
		case 5443: return qk + e + Gk + "flex-item-" + oA(e, /flex-|-self/, "") + e;
		case 4675: return qk + e + Gk + "flex-line-pack" + oA(e, /align-content|flex-|-self/, "") + e;
		case 5548: return qk + e + Gk + oA(e, "shrink", "negative") + e;
		case 5292: return qk + e + Gk + oA(e, "basis", "preferred-size") + e;
		case 6060: return qk + "box-" + oA(e, "-grow", "") + qk + e + Gk + oA(e, "grow", "positive") + e;
		case 4554: return qk + oA(e, /([^-])(transform)/g, "$1" + qk + "$2") + e;
		case 6187: return oA(oA(oA(e, /(zoom-|grab)/, qk + "$1"), /(image-set)/, qk + "$1"), e, "") + e;
		case 5495:
		case 3959: return oA(e, /(image-set\([^]*)/, qk + "$1$`$1");
		case 4968: return oA(oA(e, /(.+:)(flex-)?(.*)/, qk + "box-pack:$3" + Gk + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + qk + e + e;
		case 4095:
		case 3583:
		case 4068:
		case 2532: return oA(e, /(.+)-inline(.+)/, qk + "$1$2") + e;
		case 8116:
		case 7059:
		case 5753:
		case 5535:
		case 5445:
		case 5701:
		case 4933:
		case 4677:
		case 5533:
		case 5789:
		case 5021:
		case 4765:
			if (uA(e) - 1 - t > 6) switch (cA(e, t + 1)) {
				case 109: if (cA(e, t + 4) !== 45) break;
				case 102: return oA(e, /(.+:)(.+)-([^]+)/, "$1" + qk + "$2-$3$1" + Kk + (cA(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
				case 115: return ~sA(e, "stretch") ? QA(oA(e, "stretch", "fill-available"), t) + e : e;
			}
			break;
		case 4949: if (cA(e, t + 1) !== 115) break;
		case 6444:
			switch (cA(e, uA(e) - 3 - (~sA(e, "!important") && 10))) {
				case 107: return oA(e, ":", ":" + qk) + e;
				case 101: return oA(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + qk + (cA(e, 14) === 45 ? "inline-" : "") + "box$3$1" + qk + "$2$3$1" + Gk + "$2box$3") + e;
			}
			break;
		case 5936:
			switch (cA(e, t + 11)) {
				case 114: return qk + e + Gk + oA(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
				case 108: return qk + e + Gk + oA(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
				case 45: return qk + e + Gk + oA(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
			}
			return qk + e + Gk + e + e;
	}
	return e;
}
var $A = [function(e, t, n, r) {
	if (e.length > -1 && !e.return) switch (e.type) {
		case Xk:
			e.return = QA(e.value, e.length);
			break;
		case Qk: return HA([xA(e, { value: oA(e.value, "@", "@" + qk) })], r);
		case Yk: if (e.length) return pA(e.props, function(t) {
			switch (aA(t, /(::plac\w+|:read-\w+)/)) {
				case ":read-only":
				case ":read-write": return HA([xA(e, { props: [oA(t, /:(read-\w+)/, ":" + Kk + "$1")] })], r);
				case "::placeholder": return HA([
					xA(e, { props: [oA(t, /:(plac\w+)/, ":" + qk + "input-$1")] }),
					xA(e, { props: [oA(t, /:(plac\w+)/, ":" + Kk + "$1")] }),
					xA(e, { props: [oA(t, /:(plac\w+)/, Gk + "input-$1")] })
				], r);
			}
			return "";
		});
	}
}], ej = function(e) {
	var t = e.key;
	if (t === "css") {
		var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
		Array.prototype.forEach.call(n, function(e) {
			e.getAttribute("data-emotion").indexOf(" ") !== -1 && (document.head.appendChild(e), e.setAttribute("data-s", ""));
		});
	}
	var r = e.stylisPlugins || $A, i = {}, a, o = [];
	a = e.container || document.head, Array.prototype.forEach.call(document.querySelectorAll("style[data-emotion^=\"" + t + " \"]"), function(e) {
		for (var t = e.getAttribute("data-emotion").split(" "), n = 1; n < t.length; n++) i[t[n]] = !0;
		o.push(e);
	});
	var s, c = [XA, ZA], l, u = [UA, GA(function(e) {
		l.insert(e);
	})], d = WA(c.concat(r, u)), f = function(e) {
		return HA(LA(e), d);
	};
	s = function(e, t, n, r) {
		l = n, f(e ? e + "{" + t.styles + "}" : t.styles), r && (p.inserted[t.name] = !0);
	};
	var p = {
		key: t,
		sheet: new Wk({
			key: t,
			container: a,
			nonce: e.nonce,
			speedy: e.speedy,
			prepend: e.prepend,
			insertionPoint: e.insertionPoint
		}),
		nonce: e.nonce,
		inserted: i,
		registered: {},
		insert: s
	};
	return p.sheet.hydrate(o), p;
}, $ = (e) => typeof e == "string", tj = () => {
	let e, t, n = new Promise((n, r) => {
		e = n, t = r;
	});
	return n.resolve = e, n.reject = t, n;
}, nj = (e) => e == null ? "" : String(e), rj = (e, t, n) => {
	e.forEach((e) => {
		t[e] && (n[e] = t[e]);
	});
}, ij = /###/g, aj = (e) => e && e.includes("###") ? e.replace(ij, ".") : e, oj = (e) => !e || $(e), sj = (e, t, n) => {
	let r = $(t) ? t.split(".") : t, i = 0;
	for (; i < r.length - 1;) {
		if (oj(e)) return {};
		let t = aj(r[i]);
		!e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
	}
	return oj(e) ? {} : {
		obj: e,
		k: aj(r[i])
	};
}, cj = (e, t, n) => {
	let { obj: r, k: i } = sj(e, t, Object);
	if (r !== void 0 || t.length === 1) {
		r[i] = n;
		return;
	}
	let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = sj(e, o, Object);
	for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = sj(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
	s.obj[`${s.k}.${a}`] = n;
}, lj = (e, t, n, r) => {
	let { obj: i, k: a } = sj(e, t, Object);
	i[a] = i[a] || [], i[a].push(n);
}, uj = (e, t) => {
	let { obj: n, k: r } = sj(e, t);
	if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
}, dj = (e, t, n) => {
	let r = uj(e, n);
	return r === void 0 ? uj(t, n) : r;
}, fj = (e, t, n) => {
	for (let r in t) r !== "__proto__" && r !== "constructor" && (Object.prototype.hasOwnProperty.call(e, r) ? $(e[r]) || e[r] instanceof String || $(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : fj(e[r], t[r], n) : e[r] = t[r]);
	return e;
}, pj = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), mj = {
	"&": "&amp;",
	"<": "&lt;",
	">": "&gt;",
	"\"": "&quot;",
	"'": "&#39;",
	"/": "&#x2F;"
}, hj = (e) => $(e) ? e.replace(/[&<>"'\/]/g, (e) => mj[e]) : e, gj = class {
	constructor(e) {
		this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
	}
	getRegExp(e) {
		let t = this.regExpMap.get(e);
		if (t !== void 0) return t;
		let n = new RegExp(e);
		return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
	}
}, _j = [
	" ",
	",",
	"?",
	"!",
	";"
], vj = new gj(20), yj = (e, t, n) => {
	t ||= "", n ||= "";
	let r = _j.filter((e) => !t.includes(e) && !n.includes(e));
	if (r.length === 0) return !0;
	let i = vj.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
	if (!a) {
		let t = e.indexOf(n);
		t > 0 && !i.test(e.substring(0, t)) && (a = !0);
	}
	return a;
}, bj = (e, t, n = ".") => {
	if (!e) return;
	if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
	let r = t.split(n), i = e;
	for (let e = 0; e < r.length;) {
		if (!i || typeof i != "object") return;
		let t, a = "";
		for (let o = e; o < r.length; ++o) if (o !== e && (a += n), a += r[o], t = i[a], t !== void 0) {
			if ([
				"string",
				"number",
				"boolean"
			].includes(typeof t) && o < r.length - 1) continue;
			e += o - e + 1;
			break;
		}
		i = t;
	}
	return i;
}, xj = (e) => e?.replace(/_/g, "-"), Sj = {
	type: "logger",
	log(e) {
		this.output("log", e);
	},
	warn(e) {
		this.output("warn", e);
	},
	error(e) {
		this.output("error", e);
	},
	output(e, t) {
		console?.[e]?.apply?.(console, t);
	}
}, Cj = new class e {
	constructor(e, t = {}) {
		this.init(e, t);
	}
	init(e, t = {}) {
		this.prefix = t.prefix || "i18next:", this.logger = e || Sj, this.options = t, this.debug = t.debug;
	}
	log(...e) {
		return this.forward(e, "log", "", !0);
	}
	warn(...e) {
		return this.forward(e, "warn", "", !0);
	}
	error(...e) {
		return this.forward(e, "error", "");
	}
	deprecate(...e) {
		return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
	}
	forward(e, t, n, r) {
		return r && !this.debug ? null : (e = e.map((e) => $(e) ? e.replace(/[\r\n\x00-\x1F\x7F]/g, " ") : e), $(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
	}
	create(t) {
		return new e(this.logger, {
			prefix: `${this.prefix}:${t}:`,
			...this.options
		});
	}
	clone(t) {
		return t ||= this.options, t.prefix = t.prefix || this.prefix, new e(this.logger, t);
	}
}(), wj = class {
	constructor() {
		this.observers = {};
	}
	on(e, t) {
		return e.split(" ").forEach((e) => {
			this.observers[e] || (this.observers[e] = /* @__PURE__ */ new Map());
			let n = this.observers[e].get(t) || 0;
			this.observers[e].set(t, n + 1);
		}), this;
	}
	off(e, t) {
		if (this.observers[e]) {
			if (!t) {
				delete this.observers[e];
				return;
			}
			this.observers[e].delete(t);
		}
	}
	once(e, t) {
		let n = (...r) => {
			t(...r), this.off(e, n);
		};
		return this.on(e, n), this;
	}
	emit(e, ...t) {
		this.observers[e] && Array.from(this.observers[e].entries()).forEach(([e, n]) => {
			for (let r = 0; r < n; r++) e(...t);
		}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([n, r]) => {
			for (let i = 0; i < r; i++) n(e, ...t);
		});
	}
}, Tj = class extends wj {
	constructor(e, t = {
		ns: ["translation"],
		defaultNS: "translation"
	}) {
		super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
	}
	addNamespaces(e) {
		this.options.ns.includes(e) || this.options.ns.push(e);
	}
	removeNamespaces(e) {
		let t = this.options.ns.indexOf(e);
		t > -1 && this.options.ns.splice(t, 1);
	}
	getResource(e, t, n, r = {}) {
		let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
		e.includes(".") ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : $(n) && i ? o.push(...n.split(i)) : o.push(n)));
		let s = uj(this.data, o);
		return !s && !t && !n && e.includes(".") && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !$(n) ? s : bj(this.data?.[e]?.[t], n, i);
	}
	addResource(e, t, n, r, i = { silent: !1 }) {
		let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
		n && (o = o.concat(a ? n.split(a) : n)), e.includes(".") && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), cj(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
	}
	addResources(e, t, n, r = { silent: !1 }) {
		for (let r in n) ($(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
		r.silent || this.emit("added", e, t, n);
	}
	addResourceBundle(e, t, n, r, i, a = {
		silent: !1,
		skipCopy: !1
	}) {
		let o = [e, t];
		e.includes(".") && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
		let s = uj(this.data, o) || {};
		a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? fj(s, n, i) : s = {
			...s,
			...n
		}, cj(this.data, o, s), a.silent || this.emit("added", e, t, n);
	}
	removeResourceBundle(e, t) {
		this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
	}
	hasResourceBundle(e, t) {
		return this.getResource(e, t) !== void 0;
	}
	getResourceBundle(e, t) {
		return t ||= this.options.defaultNS, this.getResource(e, t);
	}
	getDataByLanguage(e) {
		return this.data[e];
	}
	hasLanguageSomeTranslations(e) {
		let t = this.getDataByLanguage(e);
		return !!(t && Object.keys(t) || []).find((e) => t[e] && Object.keys(t[e]).length > 0);
	}
	toJSON() {
		return this.data;
	}
}, Ej = {
	processors: {},
	addPostProcessor(e) {
		this.processors[e.name] = e;
	},
	handle(e, t, n, r, i) {
		return e.forEach((e) => {
			t = this.processors[e]?.process(t, n, r, i) ?? t;
		}), t;
	}
}, Dj = Symbol("i18next/PATH_KEY");
function Oj() {
	let e = [], t = Object.create(null), n;
	return t.get = (r, i) => (n?.revoke?.(), i === Dj ? e : (e.push(i), n = Proxy.revocable(r, t), n.proxy)), Proxy.revocable(Object.create(null), t).proxy;
}
function kj(e, t) {
	let { [Dj]: n } = e(Oj()), r = t?.keySeparator ?? ".", i = t?.nsSeparator ?? ":", a = t?.enableSelector === "strict";
	if (n.length > 1 && i) {
		let e = t?.ns, o = a ? Array.isArray(e) ? e : e ? [e] : null : Array.isArray(e) ? e : null;
		if (o && (a ? o : o.length > 1 ? o.slice(1) : []).includes(n[0])) return `${n[0]}${i}${n.slice(1).join(r)}`;
	}
	return n.join(r);
}
var Aj = (e) => !$(e) && typeof e != "boolean" && typeof e != "number", jj = class e extends wj {
	constructor(e, t = {}) {
		super(), rj([
			"resourceStore",
			"languageUtils",
			"pluralResolver",
			"interpolator",
			"backendConnector",
			"i18nFormat",
			"utils"
		], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Cj.create("translator"), this.checkedLoadedFor = {};
	}
	changeLanguage(e) {
		e && (this.language = e);
	}
	exists(e, t = { interpolation: {} }) {
		let n = { ...t };
		if (e == null) return !1;
		let r = this.resolve(e, n);
		if (r?.res === void 0) return !1;
		let i = Aj(r.res);
		return !(n.returnObjects === !1 && i);
	}
	extractFromKey(e, t) {
		let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
		n === void 0 && (n = ":");
		let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.includes(n), o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !yj(e, n, r);
		if (a && !o) {
			let t = e.match(this.interpolator.nestingRegexp);
			if (t && t.length > 0) return {
				key: e,
				namespaces: $(i) ? [i] : i
			};
			let a = e.split(n);
			(n !== r || n === r && this.options.ns.includes(a[0])) && (i = a.shift()), e = a.join(r);
		}
		return {
			key: e,
			namespaces: $(i) ? [i] : i
		};
	}
	translate(t, n, r) {
		let i = typeof n == "object" ? { ...n } : n;
		if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = { ...i }), i ||= {}, t == null) return "";
		typeof t == "function" && (t = kj(t, {
			...this.options,
			...i
		})), Array.isArray(t) || (t = [String(t)]), t = t.map((e) => typeof e == "function" ? kj(e, {
			...this.options,
			...i
		}) : String(e));
		let a = i.returnDetails === void 0 ? this.options.returnDetails : i.returnDetails, o = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, { key: s, namespaces: c } = this.extractFromKey(t[t.length - 1], i), l = c[c.length - 1], u = i.nsSeparator === void 0 ? this.options.nsSeparator : i.nsSeparator;
		u === void 0 && (u = ":");
		let d = i.lng || this.language, f = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
		if (d?.toLowerCase() === "cimode") return f ? a ? {
			res: `${l}${u}${s}`,
			usedKey: s,
			exactUsedKey: s,
			usedLng: d,
			usedNS: l,
			usedParams: this.getUsedParamsDetails(i)
		} : `${l}${u}${s}` : a ? {
			res: s,
			usedKey: s,
			exactUsedKey: s,
			usedLng: d,
			usedNS: l,
			usedParams: this.getUsedParamsDetails(i)
		} : s;
		let p = this.resolve(t, i), m = p?.res, h = p?.usedKey || s, g = p?.exactUsedKey || s, _ = [
			"[object Number]",
			"[object Function]",
			"[object RegExp]"
		], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !$(i.count), x = e.hasDefaultValue(i), S = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", C = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", w = b && !i.ordinal && i.count === 0, T = w && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${C}`] || i.defaultValue, E = m;
		y && !m && x && (E = T);
		let ee = Aj(E), D = Object.prototype.toString.apply(E);
		if (y && E && ee && !_.includes(D) && !($(v) && Array.isArray(E))) {
			if (!i.returnObjects && !this.options.returnObjects) {
				this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
				let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, E, {
					...i,
					ns: c
				}) : `key '${s} (${this.language})' returned an object instead of string.`;
				return a ? (p.res = e, p.usedParams = this.getUsedParamsDetails(i), p) : e;
			}
			if (o) {
				let e = Array.isArray(E), t = e ? [] : {}, n = e ? g : h;
				for (let e in E) if (Object.prototype.hasOwnProperty.call(E, e)) {
					let r = `${n}${o}${e}`;
					t[e] = x && !m ? this.translate(r, {
						...i,
						defaultValue: Aj(T) ? T[e] : void 0,
						joinArrays: !1,
						ns: c
					}) : this.translate(r, {
						...i,
						joinArrays: !1,
						ns: c
					}), t[e] === r && (t[e] = E[e]);
				}
				m = t;
			}
		} else if (y && $(v) && Array.isArray(m)) m = m.join(v), m &&= this.extendTranslation(m, t, i, r);
		else {
			let e = !1, n = !1;
			!this.isValidLookup(m) && x && (e = !0, m = T), this.isValidLookup(m) || (n = !0, m = s);
			let a = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n ? void 0 : m, c = x && T !== m && this.options.updateMissing;
			if (n || e || c) {
				if (this.logger.log(c ? "updateKey" : "missingKey", d, l, b && !c ? `${s}${this.pluralResolver.getSuffix(d, i.count, i)}` : s, c ? T : m), o) {
					let e = this.resolve(s, {
						...i,
						keySeparator: !1
					});
					e && e.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
				}
				let e = [], t = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i.lng || this.language);
				if (this.options.saveMissingTo === "fallback" && t && t[0]) for (let n = 0; n < t.length; n++) e.push(t[n]);
				else this.options.saveMissingTo === "all" ? e = this.languageUtils.toResolveHierarchy(i.lng || this.language) : e.push(i.lng || this.language);
				let n = (e, t, n) => {
					let r = x && n !== m ? n : a;
					this.options.missingKeyHandler ? this.options.missingKeyHandler(e, l, t, r, c, i) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e, l, t, r, c, i), this.emit("missingKey", e, l, t, m);
				};
				this.options.saveMissing && (this.options.saveMissingPlurals && b ? e.forEach((e) => {
					let t = this.pluralResolver.getSuffixes(e, i);
					w && i[`defaultValue${this.options.pluralSeparator}zero`] && !t.includes(`${this.options.pluralSeparator}zero`) && t.push(`${this.options.pluralSeparator}zero`), t.forEach((t) => {
						n([e], s + t, i[`defaultValue${t}`] || T);
					});
				}) : n(e, s, T));
			}
			m = this.extendTranslation(m, t, i, p, r), n && m === s && this.options.appendNamespaceToMissingKey && (m = `${l}${u}${s}`), (n || e) && this.options.parseMissingKeyHandler && (m = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${u}${s}` : s, e ? m : void 0, i));
		}
		return a ? (p.res = m, p.usedParams = this.getUsedParamsDetails(i), p) : m;
	}
	extendTranslation(e, t, n, r, i) {
		if (this.i18nFormat?.parse) e = this.i18nFormat.parse(e, {
			...this.options.interpolation.defaultVariables,
			...n
		}, n.lng || this.language || r.usedLng, r.usedNS, r.usedKey, { resolved: r });
		else if (!n.skipInterpolation) {
			n.interpolation && this.interpolator.init({
				...n,
				interpolation: {
					...this.options.interpolation,
					...n.interpolation
				}
			});
			let a = $(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
			if (a) {
				let t = e.match(this.interpolator.nestingRegexp);
				o = t && t.length;
			}
			let s = n.replace && !$(n.replace) ? n.replace : n;
			if (this.options.interpolation.defaultVariables && (s = {
				...this.options.interpolation.defaultVariables,
				...s
			}), e = this.interpolator.interpolate(e, s, n.lng || this.language || r.usedLng, n), a) {
				let t = e.match(this.interpolator.nestingRegexp), r = t && t.length;
				o < r && (n.nest = !1);
			}
			!n.lng && r && r.res && (n.lng = this.language || r.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...e) => i?.[0] === e[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : this.translate(...e, t), n)), n.interpolation && this.interpolator.reset();
		}
		let a = n.postProcess || this.options.postProcess, o = $(a) ? [a] : a;
		return e != null && o?.length && n.applyPostProcessor !== !1 && (e = Ej.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
			i18nResolved: {
				...r,
				usedParams: this.getUsedParamsDetails(n)
			},
			...n
		} : n, this)), e;
	}
	resolve(e, t = {}) {
		let n, r, i, a, o;
		return $(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? kj(e, {
			...this.options,
			...t
		}) : e)), e.forEach((e) => {
			if (this.isValidLookup(n)) return;
			let s = this.extractFromKey(e, t), c = s.key;
			r = c;
			let l = s.namespaces;
			this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
			let u = t.count !== void 0 && !$(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && ($(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
			l.forEach((e) => {
				this.isValidLookup(n) || (o = e, !this.checkedLoadedFor[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (this.checkedLoadedFor[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((r) => {
					if (this.isValidLookup(n)) return;
					a = r;
					let o = [c];
					if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(o, c, r, e, t);
					else {
						let e;
						u && (e = this.pluralResolver.getSuffix(r, t.count, t));
						let n = `${this.options.pluralSeparator}zero`, i = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
						if (u && (t.ordinal && e.startsWith(i) && o.push(c + e.replace(i, this.options.pluralSeparator)), o.push(c + e), d && o.push(c + n)), f) {
							let r = `${c}${this.options.contextSeparator || "_"}${t.context}`;
							o.push(r), u && (t.ordinal && e.startsWith(i) && o.push(r + e.replace(i, this.options.pluralSeparator)), o.push(r + e), d && o.push(r + n));
						}
					}
					let s;
					for (; s = o.pop();) this.isValidLookup(n) || (i = s, n = this.getResource(r, e, s, t));
				}));
			});
		}), {
			res: n,
			usedKey: r,
			exactUsedKey: i,
			usedLng: a,
			usedNS: o
		};
	}
	isValidLookup(e) {
		return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
	}
	getResource(e, t, n, r = {}) {
		return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e, t, n, r) : this.resourceStore.getResource(e, t, n, r);
	}
	getUsedParamsDetails(e = {}) {
		let t = [
			"defaultValue",
			"ordinal",
			"context",
			"replace",
			"lng",
			"lngs",
			"fallbackLng",
			"ns",
			"keySeparator",
			"nsSeparator",
			"returnObjects",
			"returnDetails",
			"joinArrays",
			"postProcess",
			"interpolation"
		], n = e.replace && !$(e.replace), r = n ? e.replace : e;
		if (n && e.count !== void 0 && (r = {
			...r,
			count: e.count
		}), this.options.interpolation.defaultVariables && (r = {
			...this.options.interpolation.defaultVariables,
			...r
		}), !n) {
			r = { ...r };
			for (let e of t) delete r[e];
		}
		return r;
	}
	static hasDefaultValue(e) {
		for (let t in e) if (Object.prototype.hasOwnProperty.call(e, t) && t.startsWith("defaultValue") && e[t] !== void 0) return !0;
		return !1;
	}
}, Mj = class {
	constructor(e) {
		this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Cj.create("languageUtils"), this.resolveHierarchyCache = {};
	}
	clearCache() {
		this.resolveHierarchyCache = {};
	}
	getScriptPartFromCode(e) {
		if (e = xj(e), !e || !e.includes("-")) return null;
		let t = e.split("-");
		return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
	}
	getLanguagePartFromCode(e) {
		if (e = xj(e), !e || !e.includes("-")) return e;
		let t = e.split("-");
		return this.formatLanguageCode(t[0]);
	}
	formatLanguageCode(e) {
		if ($(e) && e.includes("-")) {
			let t;
			try {
				t = Intl.getCanonicalLocales(e)[0];
			} catch {}
			return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e);
		}
		return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
	}
	isSupportedCode(e) {
		return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(e);
	}
	getBestMatchFromCodes(e) {
		if (!e) return null;
		let t;
		return e.forEach((e) => {
			if (t) return;
			let n = this.formatLanguageCode(e);
			(!this.options.supportedLngs || this.isSupportedCode(n)) && (t = n);
		}), !t && this.options.supportedLngs && e.forEach((e) => {
			if (t) return;
			let n = this.getScriptPartFromCode(e);
			if (this.isSupportedCode(n)) return t = n;
			let r = this.getLanguagePartFromCode(e);
			if (this.isSupportedCode(r)) return t = r;
			t = this.options.supportedLngs.find((e) => e === r ? !0 : !e.includes("-") && !r.includes("-") ? !1 : !!(e.includes("-") && !r.includes("-") && e.slice(0, e.indexOf("-")) === r || e.startsWith(r) && r.length > 1));
		}), t ||= this.getFallbackCodes(this.options.fallbackLng)[0], t;
	}
	getFallbackCodes(e, t) {
		if (!e) return [];
		if (typeof e == "function" && (e = e(t)), $(e) && (e = [e]), Array.isArray(e)) return e;
		if (!t) return e.default || [];
		let n = e[t];
		return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
	}
	toResolveHierarchy(e, t) {
		let n = this.options.fallbackLng, r = Array.isArray(n) ? n.join("|") : n;
		r !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r);
		let i = t === void 0 || t === !1 || $(t), a = t === void 0 && typeof this.options.fallbackLng == "function", o = $(e) && i && !a, s = null;
		if (o) {
			let n;
			n = t === void 0 ? "undefined" : t === !1 ? "boolean:false" : `string:${t}`, s = `${e.length}:${e}|${n}`;
		}
		if (s !== null) {
			let e = this.resolveHierarchyCache[s];
			if (e !== void 0) return e.slice();
		}
		let c = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), l = [], u = (e) => {
			e && (this.isSupportedCode(e) ? l.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
		};
		return $(e) && (e.includes("-") || e.includes("_")) ? (this.options.load !== "languageOnly" && u(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && u(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && u(this.getLanguagePartFromCode(e))) : $(e) && u(this.formatLanguageCode(e)), c.forEach((e) => {
			l.includes(e) || u(this.formatLanguageCode(e));
		}), s === null ? l : (this.resolveHierarchyCache[s] = l, l.slice());
	}
}, Nj = {
	zero: 0,
	one: 1,
	two: 2,
	few: 3,
	many: 4,
	other: 5
}, Pj = {
	select: (e) => e === 1 ? "one" : "other",
	resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
}, Fj = class {
	constructor(e, t = {}) {
		this.languageUtils = e, this.options = t, this.logger = Cj.create("pluralResolver"), this.pluralRulesCache = {};
	}
	clearCache() {
		this.pluralRulesCache = {};
	}
	getRule(e, t = {}) {
		let n = xj(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
			cleanedCode: n,
			type: r
		});
		if (i in this.pluralRulesCache) return this.pluralRulesCache[i];
		let a;
		try {
			a = new Intl.PluralRules(n, { type: r });
		} catch {
			if (typeof Intl > "u") return this.logger.error("No Intl support, please use an Intl polyfill!"), Pj;
			if (!e.match(/-|_/)) return Pj;
			let n = this.languageUtils.getLanguagePartFromCode(e);
			a = this.getRule(n, t);
		}
		return this.pluralRulesCache[i] = a, a;
	}
	needsPlural(e, t = {}) {
		let n = this.getRule(e, t);
		return n ||= this.getRule("dev", t), n?.resolvedOptions().pluralCategories.length > 1;
	}
	getPluralFormsOfKey(e, t, n = {}) {
		return this.getSuffixes(e, n).map((e) => `${t}${e}`);
	}
	getSuffixes(e, t = {}) {
		let n = this.getRule(e, t);
		return n ||= this.getRule("dev", t), n ? n.resolvedOptions().pluralCategories.sort((e, t) => Nj[e] - Nj[t]).map((e) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${e}`) : [];
	}
	getSuffix(e, t, n = {}) {
		let r = this.getRule(e, n);
		return r ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
	}
}, Ij = (e, t, n, r = ".", i = !0) => {
	let a = dj(e, t, n);
	return !a && i && $(n) && (a = bj(e, n, r), a === void 0 && (a = bj(t, n, r))), a;
}, Lj = (e) => e.replace(/\$/g, "$$$$"), Rj = class {
	constructor(e = {}) {
		this.logger = Cj.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
	}
	init(e = {}) {
		e.interpolation ||= { escapeValue: !0 };
		let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
		this.escape = t === void 0 ? hj : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? pj(i) : a || "{{", this.suffix = o ? pj(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u ? pj(u) : "-", this.unescapeSuffix = this.unescapePrefix ? "" : l ? pj(l) : "", this.nestingPrefix = d ? pj(d) : f || pj("$t("), this.nestingSuffix = p ? pj(p) : m || pj(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ !== void 0 && _, this.resetRegExp();
	}
	reset() {
		this.options && this.init(this.options);
	}
	resetRegExp() {
		let e = (e, t) => e?.source === t ? (e.lastIndex = 0, e) : new RegExp(t, "g");
		this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
	}
	interpolate(e, t, n, r) {
		let i, a, o, s = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (e) => {
			if (!e.includes(this.formatSeparator)) {
				let i = Ij(t, s, e, this.options.keySeparator, this.options.ignoreJSONStructure);
				return this.alwaysFormat ? this.format(i, void 0, n, {
					...r,
					...t,
					interpolationkey: e
				}) : i;
			}
			let i = e.split(this.formatSeparator), a = i.shift().trim(), o = i.join(this.formatSeparator).trim();
			return this.format(Ij(t, s, a, this.options.keySeparator, this.options.ignoreJSONStructure), o, n, {
				...r,
				...t,
				interpolationkey: a
			});
		};
		this.resetRegExp(), !this.escapeValue && typeof e == "string" && /\$t\([^)]*\{[^}]*\{\{/.test(e) && this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");
		let l = r?.missingInterpolationHandler || this.options.missingInterpolationHandler, u = r?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r.interpolation.skipOnVariables;
		return [{
			regex: this.regexpUnescape,
			safeValue: (e) => e
		}, {
			regex: this.regexp,
			safeValue: (e) => this.escapeValue ? this.escape(e) : e
		}].forEach((t) => {
			for (o = 0; i = t.regex.exec(e);) {
				let n = i[1].trim();
				if (a = c(n), a === void 0) {
					if (typeof l == "function") {
						let t = l(e, i, r);
						a = $(t) ? t : "";
					} else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
					else if (u) {
						a = i[0];
						continue;
					} else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
				} else !$(a) && !this.useRawValueToEscape && (a = nj(a));
				let s = t.safeValue(a);
				if (e = e.replace(i[0], Lj(s)), u ? (t.regex.lastIndex += s.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
			}
		}), e;
	}
	nest(e, t, n = {}) {
		let r, i, a, o = (e, t) => {
			let n = this.nestingOptionsSeparator;
			if (!e.includes(n)) return e;
			let r = e.split(RegExp(`${pj(n)}[ ]*{`)), i = `{${r[1]}`;
			e = r[0], i = this.interpolate(i, a);
			let o = i.match(/'/g), s = i.match(/"/g);
			((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
			try {
				a = JSON.parse(i), t && (a = {
					...t,
					...a
				});
			} catch (t) {
				return this.logger.warn(`failed parsing options string in nesting for key ${e}`, t), `${e}${n}${i}`;
			}
			return a.defaultValue && a.defaultValue.includes(this.prefix) && delete a.defaultValue, e;
		};
		for (; r = this.nestingRegexp.exec(e);) {
			let s = [];
			a = { ...n }, a = a.replace && !$(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
			let c = /{.*}/s.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
			if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !$(i)) return i;
			$(i) || (i = nj(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
				...n,
				interpolationkey: r[1].trim()
			}), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
		}
		return e;
	}
}, zj = (e) => {
	let t = e.toLowerCase().trim(), n = {};
	if (e.includes("(")) {
		let r = e.split("(");
		t = r[0].toLowerCase().trim();
		let i = r[1].slice(0, -1);
		t === "currency" && !i.includes(":") ? n.currency ||= i.trim() : t === "relativetime" && !i.includes(":") ? n.range ||= i.trim() : i.split(";").forEach((e) => {
			if (e) {
				let [t, ...r] = e.split(":"), i = r.join(":").trim().replace(/^'+|'+$/g, ""), a = t.trim();
				n[a] || (n[a] = i), i === "false" && (n[a] = !1), i === "true" && (n[a] = !0), isNaN(i) || (n[a] = parseInt(i, 10));
			}
		});
	}
	return {
		formatName: t,
		formatOptions: n
	};
}, Bj = (e) => {
	let t = {};
	return (n, r, i) => {
		let a = i;
		i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (a = {
			...a,
			[i.interpolationkey]: void 0
		});
		let o = r + JSON.stringify(a), s = t[o];
		return s || (s = e(xj(r), i), t[o] = s), s(n);
	};
}, Vj = (e) => (t, n, r) => e(xj(n), r)(t), Hj = class {
	constructor(e = {}) {
		this.logger = Cj.create("formatter"), this.options = e, this.init(e);
	}
	init(e, t = { interpolation: {} }) {
		this.formatSeparator = t.interpolation.formatSeparator || ",";
		let n = t.cacheInBuiltFormats ? Bj : Vj;
		this.formats = {
			number: n((e, t) => {
				let n = new Intl.NumberFormat(e, { ...t });
				return (e) => n.format(e);
			}),
			currency: n((e, t) => {
				let n = new Intl.NumberFormat(e, {
					...t,
					style: "currency"
				});
				return (e) => n.format(e);
			}),
			datetime: n((e, t) => {
				let n = new Intl.DateTimeFormat(e, { ...t });
				return (e) => n.format(e);
			}),
			relativetime: n((e, t) => {
				let n = new Intl.RelativeTimeFormat(e, { ...t });
				return (e) => n.format(e, t.range || "day");
			}),
			list: n((e, t) => {
				let n = new Intl.ListFormat(e, { ...t });
				return (e) => n.format(e);
			})
		};
	}
	add(e, t) {
		this.formats[e.toLowerCase().trim()] = t;
	}
	addCached(e, t) {
		this.formats[e.toLowerCase().trim()] = Bj(t);
	}
	format(e, t, n, r = {}) {
		if (!t || e == null) return e;
		let i = t.split(this.formatSeparator), a = [];
		for (let e = 0; e < i.length; e++) {
			let t = i[e];
			for (; t.indexOf("(") > -1 && !t.includes(")") && e + 1 < i.length;) t = `${t}${this.formatSeparator}${i[++e]}`;
			a.push(t);
		}
		return a.reduce((e, t) => {
			let { formatName: i, formatOptions: a } = zj(t);
			if (this.formats[i]) {
				let t = e;
				try {
					let o = r?.formatParams?.[r.interpolationkey] || {}, s = o.locale || o.lng || r.locale || r.lng || n;
					t = this.formats[i](e, s, {
						...a,
						...r,
						...o
					});
				} catch (e) {
					this.logger.warn(e);
				}
				return t;
			}
			return this.logger.warn(`there was no format function for ${i}`), e;
		}, e);
	}
}, Uj = (e, t) => {
	e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
}, Wj = class extends wj {
	constructor(e, t, n, r = {}) {
		super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = Cj.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
	}
	queueLoad(e, t, n, r) {
		let i = {}, a = {}, o = {}, s = {};
		return e.forEach((e) => {
			let r = !0;
			t.forEach((t) => {
				let o = `${e}|${t}`;
				!n.reload && this.store.hasResourceBundle(e, t) ? this.state[o] = 2 : this.state[o] < 0 || (this.state[o] === 1 ? a[o] === void 0 && (a[o] = !0) : (this.state[o] = 1, r = !1, a[o] === void 0 && (a[o] = !0), i[o] === void 0 && (i[o] = !0), s[t] === void 0 && (s[t] = !0)));
			}), r || (o[e] = !0);
		}), (Object.keys(i).length || Object.keys(a).length) && this.queue.push({
			pending: a,
			pendingCount: Object.keys(a).length,
			loaded: {},
			errors: [],
			callback: r
		}), {
			toLoad: Object.keys(i),
			pending: Object.keys(a),
			toLoadLanguages: Object.keys(o),
			toLoadNamespaces: Object.keys(s)
		};
	}
	loaded(e, t, n) {
		let r = e.split("|"), i = r[0], a = r[1];
		t && this.emit("failedLoading", i, a, t), !t && n && this.store.addResourceBundle(i, a, n, void 0, void 0, { skipCopy: !0 }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
		let o = {};
		this.queue.forEach((n) => {
			lj(n.loaded, [i], a), Uj(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
				o[e] || (o[e] = {});
				let t = n.loaded[e];
				t.length && t.forEach((t) => {
					o[e][t] === void 0 && (o[e][t] = !0);
				});
			}), n.done = !0, n.errors.length ? n.callback(n.errors) : n.callback());
		}), this.emit("loaded", o), this.queue = this.queue.filter((e) => !e.done);
	}
	read(e, t, n, r = 0, i = this.retryTimeout, a) {
		if (!e.length) return a(null, {});
		if (this.readingCalls >= this.maxParallelReads) {
			this.waitingReads.push({
				lng: e,
				ns: t,
				fcName: n,
				tried: r,
				wait: i,
				callback: a
			});
			return;
		}
		this.readingCalls++;
		let o = (o, s) => {
			if (this.readingCalls--, this.waitingReads.length > 0) {
				let e = this.waitingReads.shift();
				this.read(e.lng, e.ns, e.fcName, e.tried, e.wait, e.callback);
			}
			if (o && s && r < this.maxRetries) {
				setTimeout(() => {
					this.read(e, t, n, r + 1, i * 2, a);
				}, i);
				return;
			}
			a(o, s);
		}, s = this.backend[n].bind(this.backend);
		if (s.length === 2) {
			try {
				let n = s(e, t);
				n && typeof n.then == "function" ? n.then((e) => o(null, e)).catch(o) : o(null, n);
			} catch (e) {
				o(e);
			}
			return;
		}
		return s(e, t, o);
	}
	prepareLoading(e, t, n = {}, r) {
		if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
		$(e) && (e = this.languageUtils.toResolveHierarchy(e)), $(t) && (t = [t]);
		let i = this.queueLoad(e, t, n, r);
		if (!i.toLoad.length) return i.pending.length || r(), null;
		i.toLoad.forEach((e) => {
			this.loadOne(e);
		});
	}
	load(e, t, n) {
		this.prepareLoading(e, t, {}, n);
	}
	reload(e, t, n) {
		this.prepareLoading(e, t, { reload: !0 }, n);
	}
	loadOne(e, t = "") {
		let n = e.split("|"), r = n[0], i = n[1];
		this.read(r, i, "read", void 0, void 0, (n, a) => {
			n && this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`, n), !n && a && this.logger.log(`${t}loaded namespace ${i} for language ${r}`, a), this.loaded(e, n, a);
		});
	}
	saveMissing(e, t, n, r, i, a = {}, o = () => {}) {
		if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t)) {
			this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
			return;
		}
		if (n != null && n !== "") {
			if (this.backend?.create) {
				let s = {
					...a,
					isUpdate: i
				}, c = this.backend.create.bind(this.backend);
				if (c.length < 6) try {
					let i;
					i = c.length === 5 ? c(e, t, n, r, s) : c(e, t, n, r), i && typeof i.then == "function" ? i.then((e) => o(null, e)).catch(o) : o(null, i);
				} catch (e) {
					o(e);
				}
				else c(e, t, n, r, o, s);
			}
			!e || !e[0] || this.store.addResource(e[0], t, n, r);
		}
	}
}, Gj = () => ({
	debug: !1,
	initAsync: !0,
	ns: ["translation"],
	defaultNS: ["translation"],
	fallbackLng: ["dev"],
	fallbackNS: !1,
	supportedLngs: !1,
	nonExplicitSupportedLngs: !1,
	load: "all",
	preload: !1,
	keySeparator: ".",
	nsSeparator: ":",
	pluralSeparator: "_",
	contextSeparator: "_",
	enableSelector: !1,
	partialBundledLanguages: !1,
	saveMissing: !1,
	updateMissing: !1,
	saveMissingTo: "fallback",
	saveMissingPlurals: !0,
	missingKeyHandler: !1,
	missingInterpolationHandler: !1,
	postProcess: !1,
	postProcessPassResolved: !1,
	returnNull: !1,
	returnEmptyString: !0,
	returnObjects: !1,
	joinArrays: !1,
	returnedObjectHandler: !1,
	parseMissingKeyHandler: !1,
	appendNamespaceToMissingKey: !1,
	appendNamespaceToCIMode: !1,
	overloadTranslationOptionHandler: (e) => {
		let t = {};
		if (typeof e[1] == "object" && (t = e[1]), $(e[1]) && (t.defaultValue = e[1]), $(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
			let n = e[3] || e[2];
			Object.keys(n).forEach((e) => {
				t[e] = n[e];
			});
		}
		return t;
	},
	interpolation: {
		escapeValue: !0,
		prefix: "{{",
		suffix: "}}",
		formatSeparator: ",",
		unescapePrefix: "-",
		nestingPrefix: "$t(",
		nestingSuffix: ")",
		nestingOptionsSeparator: ",",
		maxReplaces: 1e3,
		skipOnVariables: !0
	},
	cacheInBuiltFormats: !0
}), Kj = (e) => ($(e.ns) && (e.ns = [e.ns]), $(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), $(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs && !e.supportedLngs.includes("cimode") && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), e), qj = () => {}, Jj = (e) => {
	Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
		typeof e[t] == "function" && (e[t] = e[t].bind(e));
	});
}, Yj = class e extends wj {
	constructor(e = {}, t) {
		if (super(), this.options = Kj(e), this.services = {}, this.logger = Cj, this.modules = { external: [] }, Jj(this), t && !this.isInitialized && !e.isClone) {
			if (!this.options.initAsync) return this.init(e, t), this;
			setTimeout(() => {
				this.init(e, t);
			}, 0);
		}
	}
	init(e = {}, t) {
		this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && ($(e.ns) ? e.defaultNS = e.ns : e.ns.includes("translation") || (e.defaultNS = e.ns[0]));
		let n = Gj();
		this.options = {
			...n,
			...this.options,
			...Kj(e)
		}, this.options.interpolation = {
			...n.interpolation,
			...this.options.interpolation
		}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler);
		let r = (e) => e ? typeof e == "function" ? new e() : e : null;
		if (!this.options.isClone) {
			this.modules.logger ? Cj.init(r(this.modules.logger), this.options) : Cj.init(null, this.options);
			let e;
			e = this.modules.formatter ? this.modules.formatter : Hj;
			let t = new Mj(this.options);
			this.store = new Tj(this.options.resources, this.options);
			let n = this.services;
			n.logger = Cj, n.resourceStore = this.store, n.languageUtils = t, n.pluralResolver = new Fj(t, { prepend: this.options.pluralSeparator }), e && (n.formatter = r(e), n.formatter.init && n.formatter.init(n, this.options), this.options.interpolation.format = n.formatter.format.bind(n.formatter)), n.interpolator = new Rj(this.options), n.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n.backendConnector = new Wj(r(this.modules.backend), n.resourceStore, n, this.options), n.backendConnector.on("*", (e, ...t) => {
				this.emit(e, ...t);
			}), this.modules.languageDetector && (n.languageDetector = r(this.modules.languageDetector), n.languageDetector.init && n.languageDetector.init(n, this.options.detection, this.options)), this.modules.i18nFormat && (n.i18nFormat = r(this.modules.i18nFormat), n.i18nFormat.init && n.i18nFormat.init(this)), this.translator = new jj(this.services, this.options), this.translator.on("*", (e, ...t) => {
				this.emit(e, ...t);
			}), this.modules.external.forEach((e) => {
				e.init && e.init(this);
			});
		}
		if (this.format = this.options.interpolation.format, t ||= qj, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
			let e = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
			e.length > 0 && e[0] !== "dev" && (this.options.lng = e[0]);
		}
		!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), [
			"getResource",
			"hasResourceBundle",
			"getResourceBundle",
			"getDataByLanguage"
		].forEach((e) => {
			this[e] = (...t) => this.store[e](...t);
		}), [
			"addResource",
			"addResources",
			"addResourceBundle",
			"removeResourceBundle"
		].forEach((e) => {
			this[e] = (...t) => (this.store[e](...t), this);
		});
		let i = tj(), a = () => {
			let e = (e, n) => {
				this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), i.resolve(n), t(e, n);
			};
			if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return e(null, this.t.bind(this));
			this.changeLanguage(this.options.lng, e);
		};
		return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
	}
	loadResources(e, t = qj) {
		let n = t, r = $(e) ? e : this.language;
		if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
			if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
			let e = [], t = (t) => {
				t && t !== "cimode" && this.services.languageUtils.toResolveHierarchy(t).forEach((t) => {
					t !== "cimode" && (e.includes(t) || e.push(t));
				});
			};
			r ? t(r) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e) => t(e)), this.options.preload?.forEach?.((e) => t(e)), this.services.backendConnector.load(e, this.options.ns, (e) => {
				!e && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n(e);
			});
		} else n(null);
	}
	reloadResources(e, t, n) {
		let r = tj();
		return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= qj, this.services.backendConnector.reload(e, t, (e) => {
			r.resolve(), n(e);
		}), r;
	}
	use(e) {
		if (!e) throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
		if (!e.type) throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
		return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Ej.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
	}
	setResolvedLanguage(e) {
		if (!(!e || !this.languages) && !["cimode", "dev"].includes(e)) {
			for (let e = 0; e < this.languages.length; e++) {
				let t = this.languages[e];
				if (!["cimode", "dev"].includes(t) && this.store.hasLanguageSomeTranslations(t)) {
					this.resolvedLanguage = t;
					break;
				}
			}
			!this.resolvedLanguage && !this.languages.includes(e) && this.store.hasLanguageSomeTranslations(e) && (this.resolvedLanguage = e, this.languages.unshift(e));
		}
	}
	changeLanguage(e, t) {
		this.isLanguageChangingTo = e;
		let n = tj();
		this.emit("languageChanging", e);
		let r = (e) => {
			this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
		}, i = (i, a) => {
			a ? this.isLanguageChangingTo === e && (r(a), this.translator.changeLanguage(a), this.isLanguageChangingTo = void 0, this.emit("languageChanged", a), this.logger.log("languageChanged", a)) : this.isLanguageChangingTo = void 0, n.resolve((...e) => this.t(...e)), t && t(i, (...e) => this.t(...e));
		}, a = (t) => {
			!e && !t && this.services.languageDetector && (t = []);
			let n = $(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes($(t) ? [t] : t);
			a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
				i(e, a);
			});
		};
		return !e && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a) : this.services.languageDetector.detect(a) : a(e), n;
	}
	getFixedT(e, t, n, r) {
		let i = r?.scopeNs, a = (e, t, ...r) => {
			let o;
			o = typeof t == "object" ? { ...t } : this.options.overloadTranslationOptionHandler([e, t].concat(r)), o.lng = o.lng || a.lng, o.lngs = o.lngs || a.lngs;
			let s = o.ns !== void 0 && o.ns !== null;
			o.ns = o.ns || a.ns, o.keyPrefix !== "" && (o.keyPrefix = o.keyPrefix || n || a.keyPrefix);
			let c = {
				...this.options,
				...o
			};
			Array.isArray(i) && !s && (c.ns = i), typeof o.keyPrefix == "function" && (o.keyPrefix = kj(o.keyPrefix, c));
			let l = this.options.keySeparator || ".", u;
			return o.keyPrefix && Array.isArray(e) ? u = e.map((e) => (typeof e == "function" && (e = kj(e, c)), `${o.keyPrefix}${l}${e}`)) : (typeof e == "function" && (e = kj(e, c)), u = o.keyPrefix ? `${o.keyPrefix}${l}${e}` : e), this.t(u, o);
		};
		return $(e) ? a.lng = e : a.lngs = e, a.ns = t, a.keyPrefix = n, a;
	}
	t(...e) {
		return this.translator?.translate(...e);
	}
	exists(...e) {
		return this.translator?.exists(...e);
	}
	setDefaultNamespace(e) {
		this.options.defaultNS = e;
	}
	hasLoadedNamespace(e, t = {}) {
		if (!this.isInitialized) return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
		if (!this.languages || !this.languages.length) return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
		let n = t.lng || this.resolvedLanguage || this.languages[0], r = this.options ? this.options.fallbackLng : !1, i = this.languages[this.languages.length - 1];
		if (n.toLowerCase() === "cimode") return !0;
		let a = (e, t) => {
			let n = this.services.backendConnector.state[`${e}|${t}`];
			return n === -1 || n === 0 || n === 2;
		};
		if (t.precheck) {
			let e = t.precheck(this, a);
			if (e !== void 0) return e;
		}
		return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
	}
	loadNamespaces(e, t) {
		let n = tj();
		return this.options.ns ? ($(e) && (e = [e]), e.forEach((e) => {
			this.options.ns.includes(e) || this.options.ns.push(e);
		}), this.loadResources((e) => {
			n.resolve(), t && t(e);
		}), n) : (t && t(), Promise.resolve());
	}
	loadLanguages(e, t) {
		let n = tj();
		$(e) && (e = [e]);
		let r = this.options.preload || [], i = e.filter((e) => !r.includes(e) && this.services.languageUtils.isSupportedCode(e));
		return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
			n.resolve(), t && t(e);
		}), n) : (t && t(), Promise.resolve());
	}
	dir(e) {
		if (e ||= this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language), !e) return "rtl";
		try {
			let t = new Intl.Locale(e);
			if (t && t.getTextInfo) {
				let e = t.getTextInfo();
				if (e && e.direction) return e.direction;
			}
		} catch {}
		let t = /* @__PURE__ */ "ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb".split("."), n = this.services?.languageUtils || new Mj(Gj());
		return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.includes(n.getLanguagePartFromCode(e)) || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
	}
	static createInstance(t = {}, n) {
		let r = new e(t, n);
		return r.createInstance = e.createInstance, r;
	}
	cloneInstance(t = {}, n = qj) {
		let r = t.forkResourceStore;
		r && delete t.forkResourceStore;
		let i = {
			...this.options,
			...t,
			isClone: !0
		}, a = new e(i);
		if ((t.debug !== void 0 || t.prefix !== void 0) && (a.logger = a.logger.clone(t)), [
			"store",
			"services",
			"language"
		].forEach((e) => {
			a[e] = this[e];
		}), a.services = { ...this.services }, a.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, r && (a.store = new Tj(Object.keys(this.store.data).reduce((e, t) => (e[t] = { ...this.store.data[t] }, e[t] = Object.keys(e[t]).reduce((n, r) => (n[r] = { ...e[t][r] }, n), e[t]), e), {}), i), a.services.resourceStore = a.store), t.interpolation) {
			let e = {
				...Gj().interpolation,
				...this.options.interpolation,
				...t.interpolation
			}, n = {
				...i,
				interpolation: e
			};
			a.services.interpolator = new Rj(n);
		}
		return a.translator = new jj(a.services, i), a.translator.on("*", (e, ...t) => {
			a.emit(e, ...t);
		}), a.init(i, n), a.translator.options = i, a.translator.backendConnector.services.utils = { hasLoadedNamespace: a.hasLoadedNamespace.bind(a) }, a;
	}
	toJSON() {
		return {
			options: this.options,
			store: this.store,
			language: this.language,
			languages: this.languages,
			resolvedLanguage: this.resolvedLanguage
		};
	}
}.createInstance(), Xj = Yj.createInstance;
Yj.dir, Yj.init, Yj.loadResources, Yj.reloadResources, Yj.use, Yj.changeLanguage, Yj.getFixedT, Yj.t, Yj.exists, Yj.setDefaultNamespace, Yj.hasLoadedNamespace, Yj.loadNamespaces, Yj.loadLanguages;
var Zj = { translation: {
	aboutThisItem: "عن هذا العنصر",
	addedFromUrl: "(تمت إضافته من الرابط)",
	addManifestUrl: "موقع المصدر",
	addManifestUrlHelp: "الرابط لمصدر IIIF ",
	addResource: "اضف مصدر",
	"annotationCanvasLabel_1/1": "العنصر: [{{الملصق}}]",
	"annotationCanvasLabel_1/2": "يسار: [{{الملصق }}]",
	"annotationCanvasLabel_2/2": "يمين: [{{الملصق}}]",
	annotations: "ملاحظات",
	attribution: "إسناد",
	attributionTitle: "حقوق",
	authenticationFailed: "التوثيق لم ينجح",
	authenticationRequired: "يجب توثيق الحساب لمنح الدخول الكامل",
	backToResults: "الرجوع الى النتائج",
	book: "كتاب",
	bottom: "أسفل",
	cancel: "الغاء",
	canvasIndex: "فهرس",
	changeTheme: "قم بتغيير الموضوع",
	clearSearch: "امسح",
	closeAddResourceForm: "إغلاق الإستمارة",
	closeAddResourceMenu: "إغلاق قائمة المصادر",
	closeCompanionWindow: "إغلاق اللوحة",
	closeWindow: "إغلاق النافذة",
	collapseSection: "تصغير جزء {{section}}",
	collapseSidePanel: "تصغير الشريط الجانبي",
	continue: "استمر",
	copy: "نسخ",
	currentItem: "العنصر الحالي",
	"currentItem_1/1": "العنصر الحالي",
	"currentItem_1/2": "يسار",
	"currentItem_2/2": "يمين",
	dark: "موضوع داكن",
	dismiss: "تجاهل",
	downloadExport: "تصدير مساحة العمل",
	downloadExportWorkspace: "تصدير مساحة العمل",
	elastic: "مرن",
	elasticDescription: "حرك النوافذ و غير حجمها بحرية في مساحة عمل غير محدودة. يمكن أن تتداخل النوافذ أيضاً .",
	emptyResourceList: "قائمة المصادر الخاصة بك فارغة.",
	errorDialogConfirm: "حسناً",
	errorDialogTitle: "لقد حدث خطأ",
	exitFullScreen: "خروج من الشاشة الكاملة",
	expandSection: "توسيع الجزء {{section}}",
	expandSidePanel: "توسيع الشريط الجانبي",
	fetchManifest: "أضف",
	fullScreen: "شاشة كاملة",
	gallery: "المعرض",
	hideZoomControls: "إخفاء ضوابط التكبير",
	highlightAllAnnotations: "تحديد الكل",
	iiif_homepage: "عن هذه المصدر",
	iiif_manifest: "IIIF قائمة ",
	iiif_renderings: "تنسيقات بديلة",
	iiif_seeAlso: "أنظر أيضا",
	import: "استورد ",
	importWorkspace: "استيراد مساحة العمل",
	importWorkspaceHint: "قم بلصق تركيبة Mirador 4 ليتم استيراده",
	item: "العنصر: {{label}}",
	itemList: "قائمة العناصر",
	language: "اللغة",
	layer_hide: "إخفاء الطبقة",
	layer_move: "تحريك الطبقة",
	layer_opacity: "تعتيم الطبقة",
	layer_show: "إظهار الطبقة",
	layers: "طبقات",
	light: "موضوع فاتح",
	links: "الروابط",
	listAllOpenWindows: "انتقل بسرعة للنافذة",
	login: "تسجيل الدخول",
	logout: "تسجيل الخروج",
	manifestError: "لا يمكن إضافة المصدر:",
	maximizeWindow: "تكبير النافذة إلى الحد الاكبر",
	minimizeWindow: "تصغير النافذة إلى الحد الأدنى",
	mirador: "Mirador",
	miradorResources: "مصادر Mirador ",
	miradorViewer: "مشاهد Mirador",
	more: "أكثر...",
	moreResults: "نتائج إضافية",
	mosaic: "فسيفساء",
	mosaicDescription: "حرك وغيٌر حجم النوافذ المتعلقة ببعضها البعض داخل الإطار المرئي.",
	moveCompanionWindowToBottom: "انتقل للأسفل",
	moveCompanionWindowToRight: "انتقل لليمين",
	nextCanvas: "العنصر التالي",
	numItems_one: "{{number}} عناصر",
	off: "ايقاف",
	openCompanionWindow_annotations: "ملاحظات",
	openCompanionWindow_attribution: "حقوق",
	openCompanionWindow_canvas: "فهرس",
	openCompanionWindow_info: "معلومات",
	openCompanionWindow_layers: "طبقات",
	openCompanionWindow_search: "بحث",
	openInCompanionWindow: "افتح في صفحة جديدة",
	openWindows: "النوافذ الحالية المفتوحة",
	pagination: "{{current}} من {{total}}",
	position: "مركز",
	previewWindowTitle: "عنوان",
	previousCanvas: "العنصر السابق",
	related: "ذات صلة",
	resource: "مصدر",
	retry: "أعد المحاولة ",
	right: "حق",
	rights: "ترخيص",
	searchInputLabel: "مصطلحات البحث",
	searchNextResult: "النتيجة التالية",
	searchNoResults: "لم يتم العثور على نتائج",
	searchPreviousResult: "النتيجة السابقة",
	searchSubmitAria: "ابحث",
	searchTitle: "بحث",
	selectWorkspaceMenu: "اختر نوع مساحة العمل",
	showingNumAnnotations_one: "تظهر {{number}} ملاحظات",
	showZoomControls: "اظهر عناصر التحكم بالتكبير و التصغير",
	sidebarPanelsNavigation: "تصفح لوح الشريط الجانبي",
	single: "مفرد",
	startHere: "إبدأ هنا",
	suggestSearch: "ابحث في هذا المستند عن  \"{{ query }}\"",
	tableOfContentsList: "جدول المحتويات",
	theme: "موضوع",
	thumbnailList: "قائمة الصور المصغرة",
	thumbnailNavigation: "الصور المصغرة",
	thumbnails: "الصور المصغرة",
	toggleWindowSideBar: "تبديل الشريط الجانبي",
	tryAgain: "حاول مرة أخرى",
	untitled: "[بدون عنوان]",
	view: "شاهد",
	welcome: "مرحباً بكم في Mirador",
	window: "النافذة:  {{label}}",
	windowMenu: "عرض النوافذ و الصور المصغرة",
	windowNavigation: "تصفح النافذة",
	windowPluginButtons: "خيارات",
	windowPluginMenu: "خيارات النافذة",
	workspace: "مساحة العمل",
	workspaceFullScreen: "شاشة كاملة",
	workspaceMenu: "اعدادات مساحة العمل",
	workspaceOptions: "خيارات مساحة العمل ",
	workspaceSelectionTitle: "اختر نوع مساحة العمل",
	zoomIn: "تكبير الصورة",
	zoomOut: "تصغير الصورة",
	zoomReset: "الرجوع لحجم الصورة الأساسي"
} }, Qj = { translation: {
	aboutMirador: "Über Mirador",
	aboutThisItem: "Über dieses Element",
	addedFromUrl: "(Via URL hinzugefügt)",
	addManifestUrl: "Ort der Ressource",
	addManifestUrlHelp: "Die URL einer IIIF-Ressource",
	addResource: "Ressource hinzufügen",
	"annotationCanvasLabel_1/1": "Objekt: [{{label}}]",
	"annotationCanvasLabel_1/2": "Links: [{{label}}]",
	"annotationCanvasLabel_2/2": "Rechts: [{{label}}]",
	annotations: "Annotationen",
	attribution: "Zuschreibung",
	attributionTitle: "Rechte",
	authenticationFailed: "Authentifizierung fehlgeschlagen",
	authenticationRequired: "Für vollen Zugriff ist eine Authentifizierung nötig.",
	backToResults: "Zurück zur Trefferansicht",
	book: "Buch",
	bottom: "Unten",
	cancel: "Abbrechen",
	canvasIndex: "Index",
	changeTheme: "Farbschema ändern",
	clearSearch: "zurücksetzen",
	clearSearchAria: "Suche zurücksetzen",
	close: "Schließen",
	closeAddResourceForm: "Formular schließen",
	closeAddResourceMenu: "Ressourcenliste schließen",
	closeCompanionWindow: "Hilfsfenster schließen",
	closeWindow: "Fenster schließen",
	collapseSection: "Bereich \"{{section}}\" zuklappen",
	collapseSidePanel: "Seitenleiste zuklappen",
	collection: "Sammlung",
	continue: "Fortfahren",
	copy: "Kopieren",
	currentItem: "Aktuelles Objekt",
	"currentItem_1/1": "Aktuelles Objekt",
	"currentItem_1/2": "Links",
	"currentItem_2/2": "Rechts",
	dark: "Dunkel",
	digitizedView: "Digitalisat-Ansicht",
	dismiss: "Verwerfen",
	displayNoAnnotations: "Keine hervorheben",
	downloadExport: "Arbeitsfläche exportieren",
	downloadExportWorkspace: "Arbeitsfläche exportieren",
	elastic: "Elastisch",
	elasticDescription: "Fenster können frei und unbegrenzt innerhalb der Arbeitsfläche bewegt werden und sich überlappen",
	emptyResourceList: "Ihre Ressourcenliste ist leer",
	error: "Fehler",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Es ist ein Fehler aufgetreten",
	exitFullScreen: "Vollbildmodus verlassen",
	expandSection: "Bereich \"{{section}}\" aufklappen",
	expandSidePanel: "Seitenleiste aufklappen",
	exportCopied: "Die Konfiguration der Arbeitsfläche wurde in die Zwischenablage kopiert.",
	fetchManifest: "Hinzufügen",
	fullScreen: "Vollbild",
	gallery: "Galerie",
	hideWindowSideBar: "Seitenleiste ausblenden",
	hideZoomControls: "Zoomsteuerung verbergen",
	highlightAllAnnotations: "Alle hervorheben",
	iiif_homepage: "Über diese Ressource",
	iiif_manifest: "IIIF-Manifest",
	iiif_related: "Verwandtes",
	iiif_renderings: "Alternative Formate",
	iiif_seeAlso: "Siehe auch",
	import: "Importieren",
	importWorkspace: "Arbeitsfläche importieren",
	importWorkspaceHint: "Fügen Sie eine Mirador-3-Konfiguration ein, die importiert werden soll.",
	item: "Objekt: {{label}}",
	itemList: "Kompaktliste",
	jsError: "Technische Details",
	jsStack: "{{ stack }}",
	language: "Sprache",
	layer_hide: "Ebene verbergen",
	layer_move: "Ebene verschieben",
	layer_moveToBackground: "Ebene in der Hintergrund verschieben",
	layer_moveToFront: "Ebene ganz nach vorn bringen",
	layer_opacity: "Ebenendeckkraft",
	layer_show: "Ebene anzeigen",
	layers: "Ebenen",
	light: "Hell",
	links: "Links",
	listAllOpenWindows: "Zu Fenster springen",
	login: "Anmelden",
	logout: "Abmelden",
	manifestError: "Die Ressource konnte nicht hinzugefügt werden:",
	maximizeWindow: "Fenster maximieren",
	minimizeWindow: "Fenster minimieren",
	mirador: "Mirador",
	miradorResources: "Mirador-Ressourcen",
	miradorViewer: "Mirador viewer",
	more: "mehr...",
	moreResults: "Mehr Treffer",
	mosaic: "Mosaik",
	mosaicDescription: "Fenster können innerhalb der Arbeitsfläche in Relation zueinander verschoben und ihrer Größe verändert werden.",
	moveCompanionWindowToBottom: "Unten anordnen",
	moveCompanionWindowToRight: "Rechts anordnen",
	multipartCollection: "Mehrteilige Sammlung",
	nextCanvas: "Nächstes Objekt",
	noItemSelected: "Kein Objekt ausgewählt",
	numItems_one: "{{number}} Element",
	numItems_other: "{{number}} Elemente",
	off: "Keine",
	openCompanionWindow_annotations: "Annotationen",
	openCompanionWindow_attribution: "Rechte",
	openCompanionWindow_canvas: "Index",
	openCompanionWindow_info: "Informationen",
	openCompanionWindow_layers: "Ebenen",
	openCompanionWindow_search: "Suche",
	openInCompanionWindow: "In Hilfsfenster öffnen",
	openWindows: "Aktuell offene Fenster",
	pagination: "{{current}} von {{total}}",
	position: "Position",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Vorheriges Objekt",
	related: "Verwandtes",
	resource: "Ressource",
	retry: "Erneut versuchen",
	right: "Rechts",
	rights: "Lizenz",
	scroll: "Kontinuierlich",
	searchInputLabel: "Suchbegriffe",
	searchNextResult: "Nächster Treffer",
	searchNoResults: "Keine Treffer",
	searchPreviousResult: "Vorheriger Treffer",
	searchResultsRemaining: "{{numLeft}} weitere",
	searchSubmitAria: "Suche im Dokument",
	searchTitle: "Suche",
	selectWorkspaceMenu: "Wählen Sie einen Arbeitsflächentyp",
	showCollection: "Zeige Sammlung",
	showingNumAnnotations_one: "{{number}} Annotation wird angezeigt",
	showingNumAnnotations_other: "{{number}} Annotationen werden angezeigt",
	showWindowSideBar: "Seitenleiste einblenden",
	showZoomControls: "Zoomsteuerung anzeigen",
	sidebarPanelsNavigation: "Hilfsfensternavigation",
	single: "Einzeln",
	startHere: "Hier starten",
	suggestSearch: "Dieses Dokument durchsuchen nach \"{{ query }}\"",
	tableOfContentsList: "Inhaltsverzeichnis",
	theme: "Farbschema",
	thumbnailList: "Miniaturansicht",
	thumbnailNavigation: "Miniaturansicht",
	thumbnails: "Miniaturansicht",
	toggleWindowSideBar: "Seitenleiste umschalten",
	totalCollections_one: "{{count}} Sammlung",
	totalCollections_other: "{{count}} Sammlungen",
	totalManifests_one: "{{count}} Manifest",
	totalManifests_other: "{{count}} Manifeste",
	tryAgain: "Wiederholen",
	untitled: "[Unbenannt]",
	view: "Ansicht",
	viewWorkspaceConfiguration: "Zeige Konfiguration der Arbeitsfläche",
	welcome: "Willkommen bei Mirador",
	window: "Fenster: {{label}}",
	windowMenu: "Fenstermenü und Miniaturansicht",
	windowNavigation: "Fensternavigation",
	windowPluginButtons: "Optionen",
	windowPluginMenu: "Fensteroptionen",
	workspace: "Arbeitsfläche",
	workspaceFullScreen: "Vollbild",
	workspaceMenu: "Arbeitsflächenmenü",
	workspaceNavigation: "Arbeitsflächensteuerung",
	workspaceOptions: "Arbeitsflächenoptionen",
	workspaceSelectionTitle: "Bitte wählen Sie einen Arbeitsflächentyp",
	zoomIn: "Vergrößern",
	zoomOut: "Verkleinern",
	zoomReset: "Ansicht zurücksetzen"
} }, $j = { translation: {
	aboutMirador: "About Project Mirador",
	aboutThisItem: "About this item",
	addedFromUrl: "(Added from URL)",
	addManifestUrl: "Resource location",
	addManifestUrlHelp: "The URL of a IIIF resource",
	addResource: "Add resource",
	"annotationCanvasLabel_1/1": "Item: [{{label}}]",
	"annotationCanvasLabel_1/2": "Left: [{{label}}]",
	"annotationCanvasLabel_2/2": "Right: [{{label}}]",
	annotations: "Annotations",
	attribution: "Attribution",
	attributionTitle: "Rights",
	authenticationFailed: "Authentication failed.",
	authenticationRequired: "Authentication required for full access",
	backToResults: "Back to results",
	book: "Book",
	bottom: "Bottom",
	cancel: "Cancel",
	canvasIndex: "Index",
	changeTheme: "Change theme",
	clearSearch: "clear",
	clearSearchAria: "Reset search",
	close: "Close",
	closeAddResourceForm: "Close form",
	closeAddResourceMenu: "Close resource list",
	closeCompanionWindow: "Close panel",
	closeWindow: "Close window",
	collapseSection: "Collapse \"{{section}}\" section",
	collapseSidePanel: "Collapse sidebar",
	collection: "Collection",
	continue: "Continue",
	copy: "Copy",
	currentItem: "Current item",
	"currentItem_1/1": "Current item",
	"currentItem_1/2": "Left",
	"currentItem_2/2": "Right",
	dark: "Dark theme",
	digitizedView: "Digitized view",
	dismiss: "Dismiss",
	displayNoAnnotations: "Highlight none",
	downloadExport: "Export workspace",
	downloadExportWorkspace: "Export workspace",
	elastic: "Elastic",
	elasticDescription: "Move and size windows freely in an unlimited workspace. Windows can overlap.",
	emptyResourceList: "Your resource list is empty",
	error: "Error",
	errorDialogConfirm: "OK",
	errorDialogTitle: "An error occurred",
	exitFullScreen: "Exit full screen",
	expandSection: "Expand \"{{section}}\" section",
	expandSidePanel: "Expand sidebar",
	exportCopied: "The workspace configuration was copied to your clipboard",
	fetchManifest: "Add",
	fullScreen: "Full Screen",
	gallery: "Gallery",
	hideWindowSideBar: "Hide sidebar",
	hideZoomControls: "Hide zoom controls",
	highlightAllAnnotations: "Highlight all",
	iiif_homepage: "About this resource",
	iiif_manifest: "IIIF manifest",
	iiif_related: "Related",
	iiif_renderings: "Alternate formats",
	iiif_seeAlso: "See also",
	imageFailedToLoad: "Problem loading image. See console for details.",
	import: "Import",
	importWorkspace: "Import workspace",
	importWorkspaceHint: "Paste a Mirador 4 configuration to be imported",
	item: "Item: {{label}}",
	itemList: "Item list",
	jsError: "Technical details",
	jsStack: "{{ stack }}",
	language: "Language",
	layer_hide: "Hide layer",
	layer_move: "Move layer",
	layer_moveToBackground: "Move layer to background",
	layer_moveToFront: "Move layer to front",
	layer_opacity: "Layer opacity",
	layer_show: "Show layer",
	layers: "Layers",
	light: "Light theme",
	links: "Links",
	listAllOpenWindows: "Jump to window",
	login: "Log in",
	logout: "Log out",
	manifestError: "The resource cannot be added:",
	maximizeWindow: "Maximize window",
	minimizeWindow: "Minimize window",
	mirador: "Mirador",
	miradorResources: "Mirador resources",
	miradorViewer: "Mirador viewer",
	more: "more...",
	moreResults: "More results",
	mosaic: "Mosaic",
	mosaicDescription: "Move and size windows in relation to each other, within the visible frame.",
	moveCompanionWindowToBottom: "Move to bottom",
	moveCompanionWindowToRight: "Move to right",
	multipartCollection: "Multipart Collection",
	nextCanvas: "Next item",
	noItemSelected: "No item selected",
	numItems_one: "{{number}} item",
	numItems_other: "{{number}} items",
	off: "Off",
	openCompanionWindow_annotations: "Annotations",
	openCompanionWindow_attribution: "Rights",
	openCompanionWindow_canvas: "Index",
	openCompanionWindow_info: "Information",
	openCompanionWindow_layers: "Layers",
	openCompanionWindow_search: "Search",
	openInCompanionWindow: "Open in separate panel",
	openWindows: "Current open windows",
	pagination: "{{current}} of {{total}}",
	position: "Position",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Previous item",
	related: "Related",
	resource: "Resource",
	retry: "Retry",
	right: "Right",
	rights: "License",
	scroll: "Scroll",
	searchInputLabel: "search terms",
	searchNextResult: "Next result",
	searchNoResults: "No results found",
	searchPreviousResult: "Previous result",
	searchResultsRemaining: "{{numLeft}} remaining",
	searchSubmitAria: "Search in the document",
	searchTitle: "Search",
	selectWorkspaceMenu: "Select workspace type",
	showCollection: "Show collection",
	showingNumAnnotations_one: "Showing {{number}} annotation",
	showingNumAnnotations_other: "Showing {{number}} annotations",
	showWindowSideBar: "Show sidebar",
	showZoomControls: "Show zoom controls",
	sidebarPanelsNavigation: "Sidebar panels navigation",
	single: "Single",
	startHere: "Start Here",
	suggestSearch: "Search this document for \"{{ query }}\"",
	tableOfContentsList: "Table of contents",
	theme: "Theme",
	thumbnailList: "Thumbnail list",
	thumbnailNavigation: "Thumbnails",
	thumbnails: "Thumbnails",
	toggleWindowSideBar: "Toggle sidebar",
	totalCollections_one: "{{count}} collection",
	totalCollections_other: "{{count}} collections",
	totalManifests_one: "{{count}} manifest",
	totalManifests_other: "{{count}} manifests",
	tryAgain: "Try again",
	untitled: "[Untitled]",
	view: "View",
	viewWorkspaceConfiguration: "View workspace configuration",
	welcome: "Welcome to Mirador",
	window: "Window: {{label}}",
	windowMenu: "Window views & thumbnail display",
	windowNavigation: "Window navigation",
	windowPluginButtons: "Options",
	windowPluginMenu: "Window options",
	workspace: "Workspace",
	workspaceFullScreen: "Full screen",
	workspaceMenu: "Workspace settings",
	workspaceNavigation: "Workspace navigation",
	workspaceOptions: "Workspace options",
	workspaceSelectionTitle: "Select a workspace type",
	zoomIn: "Zoom in",
	zoomOut: "Zoom out",
	zoomReset: "Reset zoom"
} }, eM = { translation: {
	aboutMirador: "Projekti Mirador kohta",
	aboutThisItem: "Teave teose kohta",
	addedFromUrl: "(Lisatud URL-ist)",
	addManifestUrl: "Teose asukoht",
	addManifestUrlHelp: "IIIF manifesti URL",
	addResource: "Lisa teos",
	"annotationCanvasLabel_1/1": "Teos: [{{label}}]",
	"annotationCanvasLabel_1/2": "Vasak: [{{label}}]",
	"annotationCanvasLabel_2/2": "Parem: [{{label}}]",
	annotations: "Annotatsioonid",
	attribution: "Omistus",
	attributionTitle: "Kasutusõigused",
	authenticationFailed: "Autentimine ebaõnnestus",
	authenticationRequired: "Juurdepääsu saamiseks on vajalik autentimine.",
	backToResults: "Tagasi tulemustele",
	book: "Raamat",
	bottom: "All",
	cancel: "Katkesta",
	canvasIndex: "Indeks",
	changeTheme: "Muuda teema",
	clearSearch: "Puhasta",
	close: "Sulge",
	closeAddResourceForm: "Sulge vorm",
	closeAddResourceMenu: "Sulge teoste loend",
	closeCompanionWindow: "Sulge paneel",
	closeWindow: "Sulge aken",
	collapseSection: "Sulge \"{{section}}\"",
	collapseSidePanel: "Sulge külgpaneel",
	collection: "Kollektsioon",
	continue: "Jätka",
	copy: "Kopeeri",
	currentItem: "Kuvatav lõuend",
	"currentItem_1/1": "Pealkiri",
	"currentItem_1/2": "Vasak",
	"currentItem_2/2": "Parem",
	dark: "Tume teema",
	digitizedView: "Digiteeritud vaade",
	dismiss: "Vabasta",
	displayNoAnnotations: "Ära kuva annotatsioone",
	downloadExport: "Ekspordi tööruum",
	downloadExportWorkspace: "Ekspordi tööruum",
	elastic: "Paindlik vaade",
	elasticDescription: "Saad akende suurust muuta ja neid vabalt tööruumis ringi liigutada.",
	emptyResourceList: "Teoste loend on tühi",
	error: "Viga",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Esines viga",
	exitFullScreen: "Lähtesta",
	expandSection: "Ava \"{{section}}\"",
	expandSidePanel: "Ava külgpaneel",
	exportCopied: "Tööruumi seadustused kopeeriti lõikepuhvrisse.",
	fetchManifest: "Lisa",
	fullScreen: "Täisekraan",
	gallery: "Galerii",
	hideZoomControls: "Peida suurendamisnupud",
	highlightAllAnnotations: "Kuva kõik annotatsioonid",
	iiif_homepage: "Teave teose kohta",
	iiif_manifest: "IIIF manifest",
	iiif_related: "Seotud",
	iiif_renderings: "Alternatiivsed vormingud",
	iiif_seeAlso: "Vaata ka",
	import: "Impordi",
	importWorkspace: "Impordi tööruum",
	importWorkspaceHint: "Kleebi imporditava tööruumi seadistused.",
	item: "Lõuend: {{label}}",
	itemList: "Lõuendite loetelu",
	jsError: "Tehnilised üksikasjad",
	jsStack: "{{ stack }}",
	language: "Keel",
	layer_hide: "Peida kiht",
	layer_move: "Liiguta kihti",
	layer_opacity: "Kihi läbipaistvus",
	layer_show: "Näita kihti",
	layers: "Kihid",
	light: "Hele teema",
	links: "Lingid",
	listAllOpenWindows: "Vali aken",
	login: "Logi sisse",
	logout: "Logi välja",
	manifestError: "Ei ole võimalik lisada soovitud teost:",
	maximizeWindow: "Suurenda akent",
	minimizeWindow: "Vähenda akent",
	mirador: "Mirador",
	miradorResources: "Miradori teoste loetelu",
	miradorViewer: "Miradori vaatur",
	more: "rohkem...",
	moreResults: "Veel tulemusi",
	mosaic: "Mosaiik",
	mosaicDescription: "Muuda töölaua akende suurust ja liiguta neid üksteise suhtes.",
	moveCompanionWindowToBottom: "Liiguta alla",
	moveCompanionWindowToRight: "Liiguta paremale",
	multipartCollection: "Mitmeosaline kollektsioon",
	nextCanvas: "Järgmine lõuend",
	noItemSelected: "Ühtegi lõuendit pole valitud.",
	numItems_one: "{{number}} lõuend",
	numItems_other: "{{number}} lõuendit",
	off: "Väljas",
	openCompanionWindow_annotations: "Annotatsioonid",
	openCompanionWindow_attribution: "Kasutusõigused",
	openCompanionWindow_canvas: "Struktuur",
	openCompanionWindow_info: "Teave",
	openCompanionWindow_layers: "Kihid",
	openCompanionWindow_search: "Otsing",
	openInCompanionWindow: "Ava eraldi paneelis",
	openWindows: "Hetkel avatud aknad",
	pagination: "{{current}} / {{total}}",
	position: "Asukoht",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Eelmine lõuend",
	related: "Seotud",
	resource: "Teos",
	retry: "Proovi uuesti",
	right: "Parem",
	rights: "Kasutuslitsents",
	scroll: "Keri",
	searchInputLabel: "otsinguterminid",
	searchNextResult: "Järgmine tulemus",
	searchNoResults: "Tulemusi ei leitud",
	searchPreviousResult: "Eelmine tulemus",
	searchResultsRemaining: "{{numLeft}} alles",
	searchSubmitAria: "Otsi",
	searchTitle: "Otsi",
	selectWorkspaceMenu: "Vali tööruumi tüüp",
	showCollection: "Näita kollektsiooni",
	showingNumAnnotations_one: "Näitan {{number}} annotatsiooni",
	showingNumAnnotations_other: "Näitan {{number}} annotatsiooni",
	showZoomControls: "Näita suurendamisnuppe",
	sidebarPanelsNavigation: "Külgpaneelide navigeerimine",
	single: "Üksik",
	startHere: "Alusta siit",
	suggestSearch: "Otsi sellest dokumendist \"{{ query }}\"",
	tableOfContentsList: "Sisukord",
	theme: "Teema",
	thumbnailList: "Pisipiltide loend",
	thumbnailNavigation: "Pisipildid",
	thumbnails: "Pisipildid",
	toggleWindowSideBar: "külgpaneel",
	totalCollections_one: "{{count}} kollektsioon",
	totalCollections_other: "{{count}} kollektsiooni",
	totalManifests_one: "{{count}} manifest",
	totalManifests_other: "{{count}} manifesti",
	tryAgain: "Proovi uuesti",
	untitled: "[Pealkiri puudub]",
	view: "Vaade",
	viewWorkspaceConfiguration: "Vaata tööruumi seadistusi",
	welcome: "Tere tulemast Miradori",
	window: "Aken: {{label}}",
	windowMenu: "Akna vaated ja pisipiltide kuvamine",
	windowNavigation: "Akna navigeerimine",
	windowPluginButtons: "Suvandid",
	windowPluginMenu: "Akna suvandid",
	workspace: "Tööruum",
	workspaceFullScreen: "Täisekraan",
	workspaceMenu: "Tööruumi sätted",
	workspaceNavigation: "Tööruumi navigeerimine",
	workspaceOptions: "Tööruumi valikud",
	workspaceSelectionTitle: "Vali tööruumi tüüp",
	zoomIn: "Suurenda sisse",
	zoomOut: "Suurenda välja",
	zoomReset: "Lähtesta suurendus"
} }, tM = { translation: {
	aboutMirador: "در بارهٔ پروژه Mirador",
	aboutThisItem: "در بارهٔ این مورد",
	addedFromUrl: "(از آدرس اینترنتی ازافه شده)",
	addManifestUrl: "مکان منبع",
	addManifestUrlHelp: "آدرس اینترنتی منبع IIIF ",
	addResource: "منبع را ازافه کن",
	"annotationCanvasLabel_1/1": "مورد: [{{label}}]",
	"annotationCanvasLabel_1/2": "چپ: [{{label}}]",
	"annotationCanvasLabel_2/2": "راست: [{{label}}]",
	annotations: "حاشیه نویسی ها",
	attribution: "نسبت دادن",
	attributionTitle: "حقوق",
	authenticationFailed: "تصدیق هویت ناموفق بود.",
	authenticationRequired: "برای دسترسی کامل نیاز به احراز هویت",
	backToResults: "بازگشت به نتایج",
	book: "کتاب",
	bottom: "پایان",
	cancel: "لغو",
	canvasIndex: "فهرست راهنما",
	changeTheme: "تغیر زمینه",
	clearSearch: "پاک کن",
	close: "ببند",
	closeAddResourceForm: "پرسش‌نامه‌ را ببند",
	closeAddResourceMenu: "فهرست منابع را ببند",
	closeCompanionWindow: "پانل را ببند",
	closeWindow: "پنجره را ببند",
	collapseSection: "بخش \"{{section}}\" را کوچک کنید",
	collapseSidePanel: "نوار کناری را کوچک کن",
	collection: "مجموعه",
	continue: "ادامه",
	copy: "کپی",
	currentItem: "مورد فعلی",
	"currentItem_1/1": "مورد فعلی",
	"currentItem_1/2": "چپ",
	"currentItem_2/2": "راست",
	dark: "زمینه تاریک",
	digitizedView: "نمای دیجیتالی شده",
	dismiss: "مرخص کن",
	displayNoAnnotations: "هیچ کدام را برجسته نکنید",
	downloadExport: "صدور فضای کاری",
	downloadExportWorkspace: "صدور فضای کاری",
	elastic: "کشدار",
	elasticDescription: "پنجره ها را آزادانه در یک فضای کاری نامحدود حرکت دهید و اندازه کنید. پنجره ها می تواند همپوشانی داشته باشند.",
	emptyResourceList: "فهرست منابع شما خالی است",
	error: "خطا",
	errorDialogConfirm: "OK",
	errorDialogTitle: "خطایی اتفاق افتاد",
	exitFullScreen: "خروج از تمام صفحه",
	expandSection: "بخش \"{{section}}\" را باز کنید",
	expandSidePanel: "نوار کناری را باز کن",
	exportCopied: "پیکربندی فضای کاری در کلیپ بورد شما کپی شد",
	fetchManifest: "اضافه کن",
	fullScreen: "تمام صفحه",
	gallery: "آلبوم عکس",
	hideZoomControls: "کنترل های بزرگنما را مخفی کنید",
	highlightAllAnnotations: "همه را برجسته کنید",
	iiif_homepage: "در باره ی این منبع",
	iiif_manifest: "بیانیه ی IIIF",
	iiif_related: "مربوط",
	iiif_renderings: "فرمت های جایگزین",
	iiif_seeAlso: "همچنین ببینید",
	import: "وارد كنید",
	importWorkspace: "فضای کاری را وارد كنید",
	importWorkspaceHint: "پیکربندی Mirador 4 را برای وارد کردن جای‌گذاری کنید",
	item: "مورد: {{label}}",
	itemList: "فهرست موارد",
	jsError: "جزییات فنی",
	jsStack: "{{ stack }}",
	language: "زبان",
	layer_hide: "لایه را پنهان کنید",
	layer_move: "لایه را حرکت دهید",
	layer_opacity: "لایه کدورت",
	layer_show: "نمایش لایه",
	layers: "لایه ها",
	light: "زمینه رشن",
	links: "پیوندها",
	listAllOpenWindows: "پرش به پنجره",
	login: "وارد به سیستم",
	logout: "خروج از سیستم",
	manifestError: "منبع اضافه نمیشود :",
	maximizeWindow: "پنجره را به حداکثر برسانید",
	minimizeWindow: "پنجره را به حداقل برسانید",
	mirador: "Mirador",
	miradorResources: "منابعی Mirador",
	miradorViewer: "بیننده Mirador",
	more: "بیشتر...",
	moreResults: "نتایج بیشتر",
	mosaic: "موزائیک",
	mosaicDescription: "جابجایی و اندازه پنجره ها نسبت به یکدیگر، در چارچوب قابل مشاهده.",
	moveCompanionWindowToBottom: "حرکت به سمت پایین",
	moveCompanionWindowToRight: "حرکت به سمت راست",
	multipartCollection: "مجموعه چند قسمتی",
	nextCanvas: "مورد بعدی",
	noItemSelected: "هیچ موردی انتخاب نشده است",
	numItems_one: "{{number}} مورد",
	numItems_other: "{{number}} موارد",
	off: "خاموش",
	openCompanionWindow_annotations: "حاشیه نویسی ها",
	openCompanionWindow_attribution: "حقوق",
	openCompanionWindow_canvas: "فهرست راهنما",
	openCompanionWindow_info: "اطلاعات",
	openCompanionWindow_layers: "لایه ها",
	openCompanionWindow_search: "جستجو",
	openInCompanionWindow: "در پنل جداگانه باز کن",
	openWindows: "پنجره های باز",
	pagination: "{{total}} از {{current}}",
	position: "موقعیت",
	previewWindowTitle: "{{title}}",
	previousCanvas: "مورد قبلی",
	related: "مربوط",
	resource: "منبع",
	retry: "امتحان دوباره",
	right: "حقوق",
	rights: "مجوز",
	scroll: "پیمایش",
	searchInputLabel: "عبارات جستجو",
	searchNextResult: "نتیجه بعدی",
	searchNoResults: "نتیجه ای پیدا نشد",
	searchPreviousResult: "نتیجه قبلی",
	searchResultsRemaining: "{{numLeft}} باقی مانده",
	searchSubmitAria: "ارسال جستجو",
	searchTitle: "جستجو",
	selectWorkspaceMenu: "نوع فضای کار را انتخاب کنید",
	showCollection: "نمایش مجموعه",
	showingNumAnnotations_one: "نمایش {{number}} حاشیه نویسی",
	showingNumAnnotations_other: "نمایش {{number}} حاشیه نویسی",
	showZoomControls: "نمایش کنترل های بزرگنمایی",
	sidebarPanelsNavigation: "پانل های ناوبری نوار کناری",
	single: "واحد",
	startHere: "از اینجا شروع کنید",
	suggestSearch: "این سند را برای \"{{ query }}\" جستجوی کنید",
	tableOfContentsList: "فهرست مطالب",
	theme: "زمینه",
	thumbnailList: "فهرست تصاویر بندانگشتی",
	thumbnailNavigation: "تصاویر بندانگشتی",
	thumbnails: "تصاویر بندانگشتی",
	toggleWindowSideBar: "نوار کناری را تغییر دهید",
	totalCollections_one: "{{count}} مجموعه",
	totalCollections_other: "{{count}} مجموعات",
	totalManifests_one: "{{count}} بیانیه",
	totalManifests_other: "{{count}} بیانیه ها",
	tryAgain: "دوباره امتحان کنید",
	untitled: "[بدون عنوان]",
	view: "مشاهده",
	viewWorkspaceConfiguration: "مشاهده پیکربندی فضای کاری",
	welcome: "به Mirador خوش آمدید",
	window: "پنجره: {{label}}",
	windowMenu: "نماهای پنجره و نمایش تصاویر کوچک",
	windowNavigation: "جهت یابی پنجره",
	windowPluginButtons: "گزینه ها",
	windowPluginMenu: "گزینه های پنجره",
	workspace: "فضای کار",
	workspaceFullScreen: "تمام صفحه",
	workspaceMenu: "تنظیمات فضای کاری",
	workspaceNavigation: "جهت یابی فضای کاری",
	workspaceOptions: "گزینه های فضای کاری",
	workspaceSelectionTitle: "نوع فضای کاری را انتخاب کنید",
	zoomIn: "بزرگنمایی",
	zoomOut: "کوچک نمایی",
	zoomReset: " تنظیم بزرگنما"
} }, nM = { translation: {
	aboutMirador: "关于Mirador项目",
	aboutThisItem: "有关此条目",
	addedFromUrl: "(从URL添加)",
	addManifestUrl: "来源",
	addManifestUrlHelp: "IIIF资源的URL",
	addResource: "添加资源",
	"annotationCanvasLabel_1/1": "条目: [{{label}}]",
	"annotationCanvasLabel_1/2": "左方: [{{label}}]",
	"annotationCanvasLabel_2/2": "右方: [{{label}}]",
	annotations: "标注",
	attribution: "著作权",
	attributionTitle: "著作权",
	authenticationFailed: "认证失败。",
	authenticationRequired: "完全访问需要认证",
	backToResults: "返回到结果",
	book: "书籍",
	bottom: "下方",
	cancel: "取消",
	canvasIndex: "索引",
	changeTheme: "变更背景主题",
	clearSearch: "清除",
	close: "关闭",
	closeAddResourceForm: "关闭表格",
	closeAddResourceMenu: "关闭资源列表",
	closeCompanionWindow: "关闭附属窗口",
	closeWindow: "关闭窗口",
	collapseSection: "关闭{{section}}分页",
	collapseSidePanel: "关闭边栏",
	collection: "集合",
	continue: "继续",
	copy: "复制",
	currentItem: "当前条目",
	"currentItem_1/1": "当前条目",
	"currentItem_1/2": "左方",
	"currentItem_2/2": "右方",
	dark: "暗色主题",
	digitizedView: "数字视图",
	dismiss: "关闭信息",
	displayNoAnnotations: "不高亮",
	downloadExport: "导出桌面排版",
	downloadExportWorkspace: "导出桌面排版",
	elastic: "弹性",
	elasticDescription: "在桌面上自由摆放窗口",
	emptyResourceList: "空资源列表",
	error: "错误",
	errorDialogConfirm: "确定",
	errorDialogTitle: "发生错误",
	exitFullScreen: "退出全屏",
	expandSection: "开启{{section}}分页",
	expandSidePanel: "开启边栏",
	exportCopied: "工作区配置被复制到你的剪贴板上了",
	fetchManifest: "添加",
	fullScreen: "全屏",
	gallery: "画廊",
	hideZoomControls: "隐藏缩放选项",
	highlightAllAnnotations: "高亮所有标注",
	iiif_homepage: "主页",
	iiif_manifest: "IIIF清单",
	iiif_renderings: "其他格式",
	iiif_seeAlso: "另见",
	import: "导入",
	importWorkspace: "导入桌面排版",
	importWorkspaceHint: "在此贴上Mirador 4排版设定码",
	item: "条目: {{label}}",
	itemList: "标题列表",
	jsError: "技术细节",
	jsStack: "{{ stack }}",
	language: "语言",
	layer_hide: "隐藏图层",
	layer_move: "移动图层",
	layer_opacity: "图层不透明度",
	layer_show: "显示图层",
	layers: "图层",
	light: "亮色主题",
	links: "链接",
	listAllOpenWindows: "切换至窗口",
	login: "登入",
	logout: "登出",
	manifestError: "无法增添资源:",
	maximizeWindow: "窗口最大化",
	minimizeWindow: "窗口最小化",
	mirador: "Mirador",
	miradorResources: "Mirador资源",
	miradorViewer: "Mirador阅览器",
	more: "更多...",
	moreResults: "更多结果",
	mosaic: "马赛克",
	mosaicDescription: "在桌面上以格状方式排列窗口",
	moveCompanionWindowToBottom: "移至下方",
	moveCompanionWindowToRight: "移至右方",
	multipartCollection: "多卷集合",
	nextCanvas: "下一页",
	noItemSelected: "没有条目被选中",
	numItems_one: "{{number}} 项条目",
	numItems_other: "{{number}} 项条目",
	off: "关闭",
	openCompanionWindow_annotations: "标注",
	openCompanionWindow_attribution: "著作权",
	openCompanionWindow_canvas: "目录",
	openCompanionWindow_info: "资讯",
	openCompanionWindow_layers: "图层",
	openCompanionWindow_search: "搜索",
	openInCompanionWindow: "移至新附属窗口",
	openWindows: "当前窗口",
	pagination: "{{current}} / {{total}}",
	position: "位置",
	previewWindowTitle: "{{title}}",
	previousCanvas: "上一页",
	related: "相关信息",
	resource: "资源",
	retry: "重试",
	right: "右方",
	rights: "版权",
	scroll: "滚动",
	searchInputLabel: "搜索关键字",
	searchNextResult: "下一个结果",
	searchNoResults: "没有搜索到结果",
	searchPreviousResult: "前一个结果",
	searchResultsRemaining: "{{numLeft}}剩余",
	searchSubmitAria: "提交搜索",
	searchTitle: "搜索",
	selectWorkspaceMenu: "选择桌面排版方式",
	showCollection: "显示集合",
	showingNumAnnotations_one: "显示 {{number}} 项标注",
	showingNumAnnotations_other: "显示 {{number}} 项标注",
	showZoomControls: "显示缩放选项",
	sidebarPanelsNavigation: "切换边栏",
	single: "单项",
	startHere: "按此开始",
	suggestSearch: "搜索本文档以\"{{ query }}\"",
	tableOfContentsList: "目录",
	theme: "背景主题",
	thumbnailList: "缩略图列表",
	thumbnailNavigation: "缩略图",
	thumbnails: "缩略图",
	toggleWindowSideBar: "切换边栏开关",
	totalCollections_one: "{{count}} 集合",
	totalCollections_other: "{{count}} 集合",
	totalManifests_one: "{{count}} 清单",
	totalManifests_other: "{{count}} 清单",
	tryAgain: "请重试",
	untitled: "[无标题]",
	view: "条目排列方式",
	viewWorkspaceConfiguration: "查看工作区配置",
	welcome: "欢迎使用Mirador",
	window: "窗口: {{label}}",
	windowMenu: "窗口视图 & 缩略图显示",
	windowNavigation: "切换窗口",
	windowPluginButtons: "选项",
	windowPluginMenu: "窗口选项",
	workspace: "桌面",
	workspaceFullScreen: "全屏",
	workspaceMenu: "桌面设定",
	workspaceNavigation: "工作区导航",
	workspaceOptions: "桌面选项",
	workspaceSelectionTitle: "选择桌面排版方式",
	zoomIn: "放大",
	zoomOut: "缩小",
	zoomReset: "重设缩放"
} }, rM = { translation: {
	aboutMirador: "關於Mirador項目",
	aboutThisItem: "有關此物件",
	addedFromUrl: "(從URL添加)",
	addManifestUrl: "來源",
	addManifestUrlHelp: "IIIF資源的URL",
	addResource: "添加資源",
	"annotationCanvasLabel_1/1": "物件: [{{label}}]",
	"annotationCanvasLabel_1/2": "左方: [{{label}}]",
	"annotationCanvasLabel_2/2": "右方: [{{label}}]",
	annotations: "標註",
	attribution: "著作權",
	attributionTitle: "著作權",
	authenticationFailed: "認證失敗。",
	authenticationRequired: "完全訪問需要認證",
	backToResults: "返回到結果",
	book: "書籍",
	bottom: "下方",
	cancel: "取消",
	canvasIndex: "索引",
	changeTheme: "變更佈景主題",
	clearSearch: "清除",
	close: "關閉",
	closeAddResourceForm: "關閉表格",
	closeAddResourceMenu: "關閉資源列表",
	closeCompanionWindow: "關閉附屬視窗",
	closeWindow: "關閉視窗",
	collapseSection: "關閉{{section}}分頁",
	collapseSidePanel: "關閉邊欄",
	collection: "集合",
	continue: "繼續",
	copy: "複製",
	currentItem: "目前物件",
	"currentItem_1/1": "目前物件",
	"currentItem_1/2": "左方",
	"currentItem_2/2": "右方",
	dark: "暗色主題",
	digitizedView: "數字視圖",
	dismiss: "關閉信息",
	displayNoAnnotations: "不高亮",
	downloadExport: "滙出桌面排版",
	downloadExportWorkspace: "滙出桌面排版",
	elastic: "彈性",
	elasticDescription: "在桌面上自由擺放視窗",
	emptyResourceList: "資源列表沒有物件",
	error: "錯誤",
	errorDialogConfirm: "確定",
	errorDialogTitle: "發生錯誤",
	exitFullScreen: "退出全螢幕",
	expandSection: "開啟{{section}}分頁",
	expandSidePanel: "開啟邊欄",
	exportCopied: "工作區配置被複製到你的剪貼板上了",
	fetchManifest: "添加",
	fullScreen: "全螢幕",
	gallery: "矩列",
	hideZoomControls: "隱藏縮放選項",
	highlightAllAnnotations: "高亮所有標註",
	iiif_homepage: "有關此資源",
	iiif_manifest: "IIIF清單",
	iiif_renderings: "其他格式",
	iiif_seeAlso: "另見",
	import: "滙入",
	importWorkspace: "滙入桌面排版",
	importWorkspaceHint: "在此貼上Mirador 4排版設定碼",
	item: "物件: {{label}}",
	itemList: "標題列表",
	jsError: "技術細節",
	jsStack: "{{ stack }}",
	language: "語言",
	layer_hide: "隱藏圖層",
	layer_move: "移動圖層",
	layer_opacity: "圖層不透明度",
	layer_show: "顯示圖層",
	layers: "圖層",
	light: "亮色主題",
	links: "連結",
	listAllOpenWindows: "切換至視窗",
	login: "登入",
	logout: "登出",
	manifestError: "無法增添資源:",
	maximizeWindow: "視窗最大化",
	minimizeWindow: "視窗最小化",
	mirador: "Mirador",
	miradorResources: "Mirador資源",
	miradorViewer: "Mirador閱覽器",
	more: "更多...",
	moreResults: "更多結果",
	mosaic: "馬賽克",
	mosaicDescription: "在桌面上以格狀方式排列視窗",
	moveCompanionWindowToBottom: "移至下方",
	moveCompanionWindowToRight: "移至右方",
	multipartCollection: "多卷集合",
	nextCanvas: "下一頁",
	noItemSelected: "沒有物件被選中",
	numItems_one: "{{number}} 項物件",
	numItems_other: "{{number}} 項物件",
	off: "關閉",
	openCompanionWindow_annotations: "標註",
	openCompanionWindow_attribution: "著作權",
	openCompanionWindow_canvas: "目錄",
	openCompanionWindow_info: "資訊",
	openCompanionWindow_layers: "圖層",
	openCompanionWindow_search: "搜索",
	openInCompanionWindow: "移至新附屬視窗",
	openWindows: "現有視窗",
	pagination: "{{current}} / {{total}}",
	position: "位置",
	previewWindowTitle: "{{title}}",
	previousCanvas: "上一頁",
	related: "相關資訊",
	resource: "資源",
	retry: "重試",
	right: "右方",
	rights: "版權",
	scroll: "滾動",
	searchInputLabel: "搜索關鍵字",
	searchNextResult: "下一個結果",
	searchNoResults: "沒有搜索到結果",
	searchPreviousResult: "前一個結果",
	searchResultsRemaining: "{{numLeft}}剩餘",
	searchSubmitAria: "提交搜索",
	searchTitle: "搜索",
	selectWorkspaceMenu: "選擇桌面排版方式",
	showCollection: "顯示集合",
	showingNumAnnotations_one: "顯示 {{number}} 項標註",
	showingNumAnnotations_other: "顯示 {{number}} 項標註",
	showZoomControls: "顯示縮放選項",
	sidebarPanelsNavigation: "切換邊欄",
	single: "單項",
	startHere: "按此開始",
	suggestSearch: "搜索本文檔以\"{{ query }}\"",
	tableOfContentsList: "目錄",
	theme: "佈景主題",
	thumbnailList: "縮略圖列表",
	thumbnailNavigation: "縮略圖",
	thumbnails: "縮略圖",
	toggleWindowSideBar: "切換邊欄開關",
	totalCollections_one: "{{count}} 集合",
	totalCollections_other: "{{count}} 集合",
	totalManifests_one: "{{count}} 清單",
	totalManifests_other: "{{count}} 清單",
	tryAgain: "請重試",
	untitled: "[無標題]",
	view: "物件排列方式",
	viewWorkspaceConfiguration: "查看工作區配置",
	welcome: "歡迎使用Mirador",
	window: "視窗: {{label}}",
	windowMenu: "視窗視圖 & 縮略圖顯示",
	windowNavigation: "切換視窗",
	windowPluginButtons: "選項",
	windowPluginMenu: "視窗選項",
	workspace: "桌面",
	workspaceFullScreen: "全螢幕",
	workspaceMenu: "桌面設定",
	workspaceNavigation: "工作區導航",
	workspaceOptions: "桌面選項",
	workspaceSelectionTitle: "選擇桌面排版方式",
	zoomIn: "放大",
	zoomOut: "縮小",
	zoomReset: "重設縮放"
} }, iM = { translation: {
	aboutMirador: "A propos du projet Mirador",
	aboutThisItem: "Informations",
	addedFromUrl: "(Ajouté depuis une URL)",
	addManifestUrl: "Emplacement de la ressource",
	addManifestUrlHelp: "Coller ici l'URL de la ressource IIIF",
	addResource: "Ajouter une ressource",
	"annotationCanvasLabel_1/1": "Item : [{{label}}]",
	"annotationCanvasLabel_1/2": "Gauche : [{{label}}]",
	"annotationCanvasLabel_2/2": "Droite : [{{label}}]",
	annotations: "Annotations",
	attribution: "Attribution",
	attributionTitle: "Droits",
	authenticationFailed: "L'authentification a échoué.",
	authenticationRequired: "Authentification requise pour un accès complet",
	backToResults: "Retour aux résultats",
	book: "Livre",
	bottom: "Bas",
	cancel: "Annuler",
	canvasIndex: "Index",
	changeTheme: "Changer le thème",
	clearSearch: "effacer",
	closeAddResourceForm: "Fermer le panneau",
	closeAddResourceMenu: "Fermer la liste des ressources",
	closeCompanionWindow: "Fermer le panneau",
	closeWindow: "Fermer cette fenêtre",
	collapseSection: "Replier la section \"{{section}}\"",
	collapseSidePanel: "Replier le panneau",
	continue: "Continuer",
	copy: "Copier",
	currentItem: "Image courante",
	"currentItem_1/1": "Image courante",
	"currentItem_1/2": "Gauche",
	"currentItem_2/2": "Droite",
	dark: "Thème sombre",
	digitizedView: "Vue de l'objet numérique",
	dismiss: "Rejeter",
	displayNoAnnotations: "Masquer tout",
	downloadExport: "Exporter l'espace de travail",
	downloadExportWorkspace: "Exporter l'espace de travail",
	elastic: "Elastique",
	elasticDescription: "Déplacer et redimensionner librement les fenêtres dans un espace de travail non limité par l'écran. Les fenêtres peuvent être superposées.",
	emptyResourceList: "Votre liste de ressource est vide",
	error: "Erreur",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Une erreur est survenue",
	exitFullScreen: "Quitter le plein écran",
	expandSection: "Déplier la section \"{{section}}\"",
	expandSidePanel: "Déplier le panneau",
	exportCopied: "La configuration de l'espace de travail a été copiée dans votre presse-papier",
	fetchManifest: "Ajouter",
	fullScreen: "Plein écran",
	gallery: "Galerie",
	hideZoomControls: "Désactiver les commandes de zoom",
	highlightAllAnnotations: "Afficher tout",
	iiif_homepage: "A propos de cette ressource",
	iiif_manifest: "Manifeste IIIF",
	iiif_renderings: "Formats alternatifs",
	iiif_seeAlso: "Voir aussi",
	import: "Importer",
	importWorkspace: "Importer un espace de travail",
	importWorkspaceHint: "Insérer une configuration Mirador 4 à importer",
	item: "Item : {{label}}",
	itemList: "Liste compacte",
	jsError: "Détails techniques",
	jsStack: "{{ stack }}",
	language: "Langue",
	layer_hide: "Masquer le calque",
	layer_move: "Déplacer le calque",
	layer_opacity: "Opacité du calque",
	layer_show: "Afficher le calque",
	layers: "Calques",
	light: "Thème clair",
	links: "Liens",
	listAllOpenWindows: "Lister les fenêtres",
	login: "Se connecter",
	logout: "Se déconnecter",
	manifestError: "Cette ressource ne peut pas être ajoutée :",
	maximizeWindow: "Agrandir cette fenêtre",
	minimizeWindow: "Réduire cette fenêtre",
	mirador: "Mirador",
	miradorResources: "Ressources Mirador",
	miradorViewer: "Visualiseur Mirador",
	more: "plus...",
	moreResults: "Plus de résultats",
	mosaic: "Mosaïque",
	mosaicDescription: "Déplacer et redimensionner les fenêtres les unes par rapport aux autres dans l'espace disponible sur l'écran",
	moveCompanionWindowToBottom: "Déplacer en bas",
	moveCompanionWindowToRight: "Déplacer à droite",
	nextCanvas: "Suivant",
	noItemSelected: "Aucun élément sélectionné",
	numItems_one: "{{number}} image",
	numItems_other: "{{number}} images",
	off: "aucun",
	openCompanionWindow_annotations: "Annotations",
	openCompanionWindow_attribution: "Droits",
	openCompanionWindow_canvas: "Index",
	openCompanionWindow_info: "Informations",
	openCompanionWindow_layers: "Calques",
	openCompanionWindow_search: "Rechercher",
	openInCompanionWindow: "Ouvrir dans un panneau séparé",
	openWindows: "Fenêtres ouvertes",
	pagination: "{{current}} sur {{total}}",
	position: "Position",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Précédent",
	related: "En relation",
	resource: "Ressource",
	retry: "Réessayer",
	right: "Droite",
	rights: "Licence",
	scroll: "Défilement horizontal",
	searchInputLabel: "Chercher un mot",
	searchNextResult: "Résultat suivant",
	searchNoResults: "Aucun résultat trouvé",
	searchPreviousResult: "Résultat précédent",
	searchSubmitAria: "Lancer la recherche",
	searchTitle: "Rechercher",
	selectWorkspaceMenu: "Changer de type d'espace de travail",
	showCollection: "Voir la collection",
	showingNumAnnotations_one: "{{number}} annotation affichée",
	showingNumAnnotations_other: "{{number}} annotations affichées",
	showZoomControls: "Activer les commandes de zoom",
	sidebarPanelsNavigation: "Navigation dans les panneaux latéraux",
	single: "Simple",
	startHere: "Commencer ici",
	suggestSearch: "Rechercher \"{{ query }}\" dans ce document",
	tableOfContentsList: "Sommaire",
	theme: "Thème",
	thumbnailList: "Liste des vignettes",
	thumbnailNavigation: "Vignettes",
	thumbnails: "Afficher les vignettes",
	toggleWindowSideBar: "Afficher le menu latéral",
	totalCollections_one: "{{count}} collection",
	totalCollections_other: "{{count}} collections",
	totalManifests_one: "{{count}} manifeste",
	totalManifests_other: "{{count}} manifestes",
	tryAgain: "Essayer à nouveau",
	untitled: "[Sans titre]",
	view: "Voir les images en mode",
	welcome: "Bienvenue dans Mirador",
	window: "Fenêtre : {{label}}",
	windowMenu: "Options de fenêtre",
	windowNavigation: "Navigation dans les fenêtres",
	windowPluginButtons: "Options",
	windowPluginMenu: "Autres options et outils",
	workspace: "Espace de travail",
	workspaceFullScreen: "Plein écran",
	workspaceMenu: "Réglages de l'espace de travail",
	workspaceNavigation: "Menu de l'espace de travail",
	workspaceOptions: "Options de l'espace de travail",
	workspaceSelectionTitle: "Sélectionner un type d'espace de travail",
	zoomIn: "Zoom avant",
	zoomOut: "Zoom arrière",
	zoomReset: "Réinitialiser le zoom"
} }, aM = { translation: {
	aboutMirador: "O Projektu Mirador",
	aboutThisItem: "O ovom zapisu",
	addedFromUrl: "(Dodano s URL-a)",
	addManifestUrl: "Lokacija resursa",
	addManifestUrlHelp: "URL IIIF resursa",
	addResource: "Dodaj resurs",
	"annotationCanvasLabel_1/1": "Stavka: [{{label}}]",
	"annotationCanvasLabel_1/2": "Lijevo: [{{label}}]",
	"annotationCanvasLabel_2/2": "Desno: [{{label}}]",
	annotations: "Anotacije",
	attribution: "Pripisivanje",
	attributionTitle: "Prava",
	authenticationFailed: "Autentifikacija nije uspjela",
	authenticationRequired: "Potrebna je autentifikacija za potpuni pristup",
	backToResults: "Povratak na rezultate",
	book: "Knjiga",
	bottom: "Dno",
	cancel: "Otkaži",
	canvasIndex: "Indeks",
	changeTheme: "Promijeni temu",
	clearSearch: "očisti",
	close: "Zatvori",
	closeAddResourceForm: "Zatvori obrazac",
	closeAddResourceMenu: "Zatvori popis resursa",
	closeCompanionWindow: "Zatvori ploču",
	closeWindow: "Zatvori prozor",
	collapseSection: "Sažmi \"{{section}}\" odjeljak",
	collapseSidePanel: "Sklopi bočnu traku",
	collection: "Kolekcija",
	continue: "Nastavi",
	copy: "Kopiraj",
	currentItem: "Trenutna stavka",
	"currentItem_1/1": "Trenutna stavka",
	"currentItem_1/2": "Lijevo",
	"currentItem_2/2": "Desno",
	dark: "Tamna tema",
	digitizedView: "Digitalizirani prikaz",
	dismiss: "Odbaci",
	displayNoAnnotations: "Istaknite ništa",
	downloadExport: "Izvezi radni prostor",
	downloadExportWorkspace: "Izvezi radni prostor",
	elastic: "Elastičan",
	elasticDescription: "Premještajte i mijenjajte veličinu prozora slobodno u neograničenom radnom prostoru. Prozori se mogu preklapati.",
	emptyResourceList: "Vaš popis resursa je prazan",
	error: "Greška",
	errorDialogConfirm: "U redu",
	errorDialogTitle: "Došlo je do greške",
	exitFullScreen: "Izađi iz punog zaslona",
	expandSection: "Proširi odjeljak \"{{section}}\"",
	expandSidePanel: "Proširi bočnu traku",
	exportCopied: "Konfiguracija radnog prostora kopirana je u vaš međuspremnik",
	fetchManifest: "Dodaj",
	fullScreen: "Cijeli ekran",
	gallery: "Galerija",
	hideZoomControls: "Sakrij kontrole zuma",
	highlightAllAnnotations: "Istakni sve",
	iiif_homepage: "O ovom resursu",
	iiif_manifest: "IIIF manifest",
	iiif_related: "Srodno",
	iiif_renderings: "Alternativni formati",
	iiif_seeAlso: "Vidi također",
	import: "Uvoz",
	importWorkspace: "Uvezi radni prostor",
	importWorkspaceHint: "Zalijepite konfiguraciju Mirador 4 koju treba uvesti",
	item: "Stavka: {{label}}",
	itemList: "Popis stavki",
	jsError: "Tehnički detalji",
	jsStack: "{{ stack }}",
	language: "Jezik",
	layer_hide: "Sakrij sloj",
	layer_move: "Premjesti sloj",
	layer_opacity: "Prozirnost sloja",
	layer_show: "Prikaži sloj",
	layers: "Slojevi",
	light: "Svijetla tema",
	links: "Poveznice",
	listAllOpenWindows: "Skoči do prozora",
	login: "Prijavi se",
	logout: "Odjavi se",
	manifestError: "Resurs se ne može dodati",
	maximizeWindow: "Maksimiziraj prozor",
	minimizeWindow: "Minimiziraj prozor",
	mirador: "Mirador",
	miradorResources: "Mirador resursi",
	miradorViewer: "Preglednik Mirador",
	more: "još...",
	moreResults: "Više rezultata",
	mosaic: "Mozaik",
	mosaicDescription: "Pomičite i mijenjajte veličinu prozora u odnosu jedan prema drugom, unutar vidljivog okvira.",
	moveCompanionWindowToBottom: "Pomakni se na dno",
	moveCompanionWindowToRight: "Pomakni se udesno",
	multipartCollection: "Višedijelna zbirka",
	nextCanvas: "Sljedeća stavka",
	noItemSelected: "Nijedna stavka nije odabrana",
	numItems_one: "{{number}} predmet",
	numItems_other: "{{number}} artikala",
	off: "Isključeno",
	openCompanionWindow_annotations: "Bilješke",
	openCompanionWindow_attribution: "Prava",
	openCompanionWindow_canvas: "Indeks",
	openCompanionWindow_info: "Informacija",
	openCompanionWindow_layers: "Slojevi",
	openCompanionWindow_search: "Pretraživanje",
	openInCompanionWindow: "Otvori u zasebnom panelu",
	openWindows: "Trenutno otvoreni prozori",
	pagination: "{{current}} od {{total}}",
	position: "Pozicija",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Prethodna stavka",
	related: "Srodno",
	resource: "Resurs",
	retry: "Pokušaj ponovno",
	right: "Desno",
	rights: "Licenca",
	scroll: "Pomakni",
	searchInputLabel: "pojmovima pretraživanja",
	searchNextResult: "Sljedeći rezultat",
	searchNoResults: "Nema rezultata",
	searchPreviousResult: "Prethodni rezultat",
	searchResultsRemaining: "Preostalo je {{numLeft}}",
	searchSubmitAria: "Podnesi pretragu",
	searchTitle: "Pretraživanje",
	selectWorkspaceMenu: "Odaberite vrstu radnog prostora",
	showCollection: "Prikaži kolekciju",
	showingNumAnnotations_one: "Prikazivanje {{number}} bilješke",
	showingNumAnnotations_other: "Prikazivanje {{number}} bilješki",
	showZoomControls: "Prikaži kontrole zumiranja",
	sidebarPanelsNavigation: "Bočne ploče navigacija",
	single: "Jedan",
	startHere: "Počnite ovdje",
	suggestSearch: "Pretraži ovaj dokument za \"{{ query }}\"",
	tableOfContentsList: "Sadržaj",
	theme: "Tema",
	thumbnailList: "Popis sličica",
	thumbnailNavigation: "Sličice",
	thumbnails: "Sličice",
	toggleWindowSideBar: "Prebaci bočnu traku",
	totalCollections_one: "{{count}} kolekcija",
	totalCollections_other: "{{count}} kolekcija",
	totalManifests_one: "{{count}} manifest",
	totalManifests_other: "{{count}} manifesta",
	tryAgain: "Pokušaj ponovno",
	untitled: "[Nenaslovljeno]",
	view: "Pogled",
	viewWorkspaceConfiguration: "Pogledaj konfiguraciju radnog prostora",
	welcome: "Dobrodošli u Mirador",
	window: "Prozor: {{label}}",
	windowMenu: "Prikazi prozora i prikaz sličica",
	windowNavigation: "Navigacija prozorom",
	windowPluginButtons: "Opcije",
	windowPluginMenu: "Opcije prozora",
	workspace: "Radni prostor",
	workspaceFullScreen: "Puni zaslon",
	workspaceMenu: "Postavke radnog prostora",
	workspaceNavigation: "Navigacija radnog prostora",
	workspaceOptions: "Opcije radnog prostora",
	workspaceSelectionTitle: "Odaberite vrstu radnog prostora",
	zoomIn: "Povećaj",
	zoomOut: "Umanji prikaz",
	zoomReset: "Poništi zumiranje"
} }, oM = { translation: {
	aboutMirador: "Project Miradorについて",
	aboutThisItem: "この資料について",
	addedFromUrl: "(URLで追加)",
	addManifestUrl: "資料のIIIFマニフェストURI",
	addManifestUrlHelp: "追加したいIIIF資料のURIを上記に入力してください",
	addResource: "資料の追加",
	"annotationCanvasLabel_1/1": "アイテム: [{{label}}]",
	"annotationCanvasLabel_1/2": "左: [{{label}}]",
	"annotationCanvasLabel_2/2": "右: [{{label}}]",
	annotations: "アノテーション",
	attribution: "帰属",
	attributionTitle: "権利",
	authenticationFailed: "認証失敗",
	authenticationRequired: "フルアクセスには認証が必要",
	backToResults: "結果に戻る",
	book: "見開き",
	bottom: "下部",
	cancel: "キャンセル",
	canvasIndex: "インデックス",
	changeTheme: "テーマの変更",
	clearSearch: "クリア",
	close: "閉じる",
	closeAddResourceForm: "フォームを閉じる",
	closeAddResourceMenu: "資料一覧を閉じる",
	closeCompanionWindow: "パネルを閉じる",
	closeWindow: "ウインドウを閉じる",
	collapseSection: "{{section}} セクションを畳む",
	collapseSidePanel: "サイドバーを畳む",
	collection: "コレクション",
	continue: "続ける",
	copy: "コピー",
	currentItem: "現在のアイテム",
	"currentItem_1/1": "現在のアイテム",
	"currentItem_1/2": "左",
	"currentItem_2/2": "右",
	dark: "ダークなテーマ",
	digitizedView: "デジタルビュー",
	dismiss: "片付け",
	displayNoAnnotations: "アノテーションを非表示",
	downloadExport: "ワークスペースをエクスポート",
	downloadExportWorkspace: "ワークスペースをエクスポート",
	elastic: "伸縮",
	elasticDescription: "自由なウインドウの伸縮",
	emptyResourceList: "資料の一覧が空です",
	error: "エラー",
	errorDialogConfirm: "OK",
	errorDialogTitle: "エラー発生",
	exitFullScreen: "全画面を解除",
	expandSection: "セクション {{section}}を拡大",
	expandSidePanel: "サイドバーを拡大",
	exportCopied: "ワークスペースの設定がクリップボードにコピーされました。",
	fetchManifest: "追加",
	fullScreen: "全画面",
	gallery: "ギャラリー",
	hideZoomControls: "zoom制御を隠す",
	highlightAllAnnotations: "すべてを表示",
	iiif_homepage: "IIIFホームページ",
	iiif_manifest: "IIIF マニフェスト",
	iiif_renderings: "別の形式",
	iiif_seeAlso: "参照",
	import: "取り込み",
	importWorkspace: "ワークスペースの取り込み",
	importWorkspaceHint: "Mirador3の設定を貼り付け",
	item: "アイテム: {{label}}",
	itemList: "アイテム一覧",
	jsError: "技術的な詳細",
	jsStack: "{{ stack }}",
	language: "言語",
	layer_hide: "レイヤーを隠す",
	layer_move: "レイヤーを動かす",
	layer_opacity: "レイヤーの透過度",
	layer_show: "レイヤーを表示",
	layers: "レイヤー",
	light: "明るいテーマ",
	links: "リンク",
	listAllOpenWindows: "ウインドウにジャンプ",
	login: "ログイン",
	logout: "ログアウト",
	manifestError: "資料追加に失敗:",
	maximizeWindow: "ウインドウを最大化",
	minimizeWindow: "ウインドウを最小化",
	mirador: "Mirador",
	miradorResources: "Mirador資料",
	miradorViewer: "Miradorビューワ",
	more: "さらに...",
	moreResults: "さらに結果を",
	mosaic: "モザイク",
	mosaicDescription: "モザイク表示",
	moveCompanionWindowToBottom: "下部に移動",
	moveCompanionWindowToRight: "右に移動",
	nextCanvas: "次のアイテム",
	noItemSelected: "アイテムが未選択",
	numItems_one: "{{number}} アイテム",
	off: "オフ",
	openCompanionWindow_annotations: "アノテーション",
	openCompanionWindow_attribution: "権利",
	openCompanionWindow_canvas: "インデックス",
	openCompanionWindow_info: "情報",
	openCompanionWindow_layers: "レイヤー",
	openCompanionWindow_search: "検索",
	openInCompanionWindow: "別のパネルで開く",
	openWindows: "現在開いているウインドウ",
	pagination: "{{current}} of {{total}}",
	position: "位置",
	previewWindowTitle: "{{title}}",
	previousCanvas: "前のアイテム",
	related: "関連",
	resource: "資料",
	retry: "リトライ",
	right: "右側",
	rights: "利用条件",
	scroll: "スクロール",
	searchInputLabel: "検索語",
	searchNextResult: "次の結果",
	searchNoResults: "ヒットせず",
	searchPreviousResult: "前の結果",
	searchSubmitAria: "検索",
	searchTitle: "検索",
	selectWorkspaceMenu: "ワークスペースタイプの選択",
	showCollection: "コレクションを表示",
	showingNumAnnotations_one: "アノテーション {{number}} を表示",
	showZoomControls: "ズーム操作を表示",
	sidebarPanelsNavigation: "サイドバーパネルの操作",
	single: "単一",
	startHere: "ここから始める",
	suggestSearch: "この文書を \"{{ query }}\" で検索",
	tableOfContentsList: "目次",
	theme: "テーマ",
	thumbnailList: "サムネイル一覧",
	thumbnailNavigation: "サムネイル",
	thumbnails: "サムネイル表示",
	toggleWindowSideBar: "サイドバー切り替え",
	totalCollections_one: "{{count}} コレクション",
	totalManifests_one: "{{count}} マニフェスト",
	tryAgain: "もう一度試す",
	untitled: "[タイトル無し]",
	view: "表示の仕方",
	welcome: "Miradorにようこそ",
	window: "{{label}} ウインドウ",
	windowMenu: "ウインドウメニュー",
	windowNavigation: "ウィンドウ操作",
	windowPluginButtons: "オプション",
	windowPluginMenu: "ウインドウオプション",
	workspace: "ワークスペース",
	workspaceFullScreen: "全画面",
	workspaceMenu: "ワークスペースの設定",
	workspaceNavigation: "ワークスペースナビ",
	workspaceOptions: "ワークスペースのオプション",
	workspaceSelectionTitle: "ワークスペースのタイプを選択",
	zoomIn: "ズームイン",
	zoomOut: "ズームアウト",
	zoomReset: "ズームを戻す"
} }, sM = { translation: {
	aboutMirador: "Mirador 프로젝트에 대하여",
	aboutThisItem: "해당 아이템에 대하여",
	addedFromUrl: "(URL에서 추가됨)",
	addManifestUrl: "리소스의 위치",
	addManifestUrlHelp: "IIIF 리소스의 URL",
	addResource: "리소스 추가",
	"annotationCanvasLabel_1/1": "아이템: [{{label}}]",
	"annotationCanvasLabel_1/2": "왼쪽: [{{label}}]",
	"annotationCanvasLabel_2/2": "오른쪽: [{{label}}]",
	annotations: "주석",
	attribution: "귀속",
	attributionTitle: "권리",
	authenticationFailed: "인증 실패.",
	authenticationRequired: "모든 정보에 접근하기 위해선 인증이 필요합니다.",
	backToResults: "결과로 돌아가기",
	book: "책",
	bottom: "아래",
	cancel: "취소",
	canvasIndex: "인덱스",
	changeTheme: "테마 변경",
	clearSearch: "지우기",
	close: "닫기",
	closeAddResourceForm: "폼 닫기",
	closeAddResourceMenu: "리소스 목록 닫기",
	closeCompanionWindow: "패널 닫기",
	closeWindow: "윈도우 닫기",
	collapseSection: "\"{{section}}\" 섹션 접기",
	collapseSidePanel: "사이드바 접기",
	collection: "컬렉션",
	continue: "계속하기",
	copy: "복사",
	currentItem: "현재 아이템",
	"currentItem_1/1": "현재 아이템",
	"currentItem_1/2": "왼쪽",
	"currentItem_2/2": "오른쪽",
	dark: "다크 모드",
	digitizedView: "디지털 뷰",
	dismiss: "무시하기",
	displayNoAnnotations: "하이라이트 해제",
	downloadExport: "작업공간 내보내기",
	downloadExportWorkspace: "작업공간 내보내기",
	elastic: "신축성",
	elasticDescription: "무한한 작업공간에서 윈도우를 자유롭게 움직이고 조절해보세요. 윈도우는 서로 겹칠 수 있습니다.",
	emptyResourceList: "리소스 목록이 비어있습니다",
	error: "오류",
	errorDialogConfirm: "허락",
	errorDialogTitle: "오류 발생",
	exitFullScreen: "전체화면에서 나가기",
	expandSection: "\"{{section}}\" 섹션 확장",
	expandSidePanel: "사이드바 확장",
	exportCopied: "작업공간 환경설정을 클립보드에 복사했습니다",
	fetchManifest: "추가하기",
	fullScreen: "전체화면",
	gallery: "갤러리",
	hideZoomControls: "확대/축소 기능 숨기기",
	highlightAllAnnotations: "모두 하이라이트하기",
	iiif_homepage: "해당 리소스에 대하여",
	iiif_manifest: "IIIF 매니페스트",
	iiif_renderings: "대체 포맷",
	iiif_seeAlso: "참고",
	import: "가져오기",
	importWorkspace: "작업공간 가져오기",
	importWorkspaceHint: "Mirador 4 환경설정 가져와 붙여넣기",
	item: "아이템: {{label}}",
	itemList: "아이템 목록",
	jsError: "기술적인 세부사항",
	jsStack: "{{ stack }}",
	language: "언어",
	layer_hide: "레이어 숨기기",
	layer_move: "레이어 움직이기",
	layer_opacity: "레이어 불투명도",
	layer_show: "레이어 보이기",
	layers: "레이어",
	light: "라이트 모드",
	links: "링크",
	listAllOpenWindows: "윈도우로 이동하기",
	login: "로그인",
	logout: "로그아웃",
	manifestError: "리소스를 추가할 수 없습니다:",
	maximizeWindow: "윈도우 크기 최대화",
	minimizeWindow: "윈도우 크기 최소화",
	mirador: "Mirador",
	miradorResources: "Mirador 리소스",
	miradorViewer: "Mirador 뷰어",
	more: "더 보기...",
	moreResults: "결과 더 보기",
	mosaic: "모자이크",
	mosaicDescription: "프레임 내에서 윈도우를 이동하고 크기를 조정합니다.",
	moveCompanionWindowToBottom: "아래로 옮기기",
	moveCompanionWindowToRight: "오른쪽으로 옮기기",
	nextCanvas: "다음 아이템",
	noItemSelected: "아이템이 선택되지 않았습니다",
	numItems_one: "{{number}}개의 아이템",
	numItems_other: "{{number}}개의 아이템",
	off: "끄기",
	openCompanionWindow_annotations: "주석",
	openCompanionWindow_attribution: "권리",
	openCompanionWindow_canvas: "인덱스",
	openCompanionWindow_info: "정보",
	openCompanionWindow_layers: "레이어",
	openCompanionWindow_search: "검색",
	openInCompanionWindow: "별도의 패널에서 열기",
	openWindows: "현재 열려있는 윈도우",
	pagination: "{{current}} of {{total}}",
	position: "배치",
	previewWindowTitle: "{{title}}",
	previousCanvas: "이전 아이템",
	related: "관련",
	resource: "리소스",
	retry: "재시도",
	right: "오른쪽",
	rights: "라이선스",
	scroll: "스크롤",
	searchInputLabel: "용어 찾기",
	searchNextResult: "다음 결과",
	searchNoResults: "해당 결과 없음",
	searchPreviousResult: "이전 결과",
	searchResultsRemaining: "{{numLeft}}개 남음",
	searchSubmitAria: "검색하기",
	searchTitle: "검색",
	selectWorkspaceMenu: "작업공간 유형 선택",
	showCollection: "컬렉션 보이기",
	showingNumAnnotations_one: "{{number}}개의 주석 나타내기",
	showingNumAnnotations_other: "{{number}}개의 주석 나타내기",
	showZoomControls: "확대/축소 기능 보이기",
	sidebarPanelsNavigation: "사이드바 패널 탐색",
	single: "한 개",
	startHere: "시작하기",
	suggestSearch: "이 문서를 \"{{ query }}\"로 검색하기",
	tableOfContentsList: "목차",
	theme: "테마",
	thumbnailList: "썸네일 목록",
	thumbnailNavigation: "썸네일",
	thumbnails: "썸네일",
	toggleWindowSideBar: "사이드바 전환",
	totalCollections_one: "{{count}}개의 컬렉션",
	totalCollections_other: "{{count}}개의 컬렉션",
	totalManifests_one: "{{count}}개의 매니페스트",
	totalManifests_other: "{{count}}개의 매니페스트",
	tryAgain: "다시 시도하세요",
	untitled: "[타이틀 없음]",
	view: "뷰",
	viewWorkspaceConfiguration: "작업공간 환경설정 ㅂ괴",
	welcome: "Mirador에 오신 것을 환영합니다",
	window: "윈도우: {{label}}",
	windowMenu: "윈도우 뷰 & 썸네일 표시",
	windowNavigation: "윈도우 탐색",
	windowPluginButtons: "옵션",
	windowPluginMenu: "윈도우 옵션",
	workspace: "작업공간",
	workspaceFullScreen: "전체화면",
	workspaceMenu: "작업공간 설정",
	workspaceNavigation: "작업공간 탐색",
	workspaceOptions: "작업공간 옵션",
	workspaceSelectionTitle: "작업공간 유형을 선택하세요",
	zoomIn: "확대",
	zoomOut: "축소",
	zoomReset: "줌 재설정"
} }, cM = { translation: {
	aboutThisItem: "Over dit item",
	addedFromUrl: "(Toegevoegd via URL)",
	addManifestUrl: "Locatie bron",
	addManifestUrlHelp: "De URL van een IIIF-resource",
	addResource: "Voeg bron toe",
	"annotationCanvasLabel_1/1": "Item: [{{label}}]",
	"annotationCanvasLabel_1/2": "Links: [{{label}}]",
	"annotationCanvasLabel_2/2": "Rechts: [{{label}}]",
	annotations: "Annotaties",
	attribution: "Naamsvermelding",
	attributionTitle: "Rechten",
	authenticationFailed: "Authenticatie gefaald.",
	authenticationRequired: "Authenticatie is vereist voor volledige toegang",
	backToResults: "Terug naar resultaten",
	book: "Boek",
	bottom: "Onderaan",
	cancel: "Annuleer",
	canvasIndex: "Index",
	changeTheme: "Wijzig thema",
	clearSearch: "clear",
	closeAddResourceForm: "Sluit formulier",
	closeAddResourceMenu: "Sluit lijst met bronnen",
	closeCompanionWindow: "Sluit paneel",
	closeWindow: "Sluit venster",
	collapseSection: "Klap \"{{section}}\" sectie in",
	collapseSidePanel: "Klap zijbalk in",
	continue: "Ga verder",
	copy: "Kopieer",
	currentItem: "Huidig item",
	"currentItem_1/1": "Huidig item",
	"currentItem_1/2": "Links",
	"currentItem_2/2": "Rechts",
	dark: "Donker thema",
	dismiss: "Dismiss",
	downloadExport: "Exporteer workspace",
	downloadExportWorkspace: "Exporteer workspace",
	elastic: "Elastisch",
	elasticDescription: "Verplaats en rangschik vensters vrij in een onbeperkte workspace. Vensters kunnen elkaar overlappen.",
	emptyResourceList: "Je lijst met bronnen is leeg",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Er is een fout opgetreden",
	exitFullScreen: "Verlaat volledig scherm",
	expandSection: "Klap \"{{section}}\" sectie uit",
	expandSidePanel: "Klap zijbalk uit",
	fetchManifest: "Voeg toe",
	fullScreen: "Volledig scherm",
	gallery: "Gallerij",
	hideZoomControls: "Verberg zoomknoppen",
	highlightAllAnnotations: "Markeer alles",
	iiif_homepage: "Over deze bron",
	iiif_manifest: "IIIF-manifest",
	iiif_renderings: "Alternatieve formaten",
	iiif_seeAlso: "Zie ook",
	import: "Importeer",
	importWorkspace: "Importeer workspace",
	importWorkspaceHint: "Plak een Mirador 4 configuratie die geïmporteerd moet worden",
	item: "Item: {{label}}",
	itemList: "Compacte lijst",
	language: "Taal",
	light: "Licht thema",
	links: "Links",
	listAllOpenWindows: "Ga naar venster",
	login: "Log in",
	manifestError: "De bron kan niet worden toegevoegd:",
	maximizeWindow: "Maximaliseer venster",
	minimizeWindow: "Minimaliseer venster",
	mirador: "Mirador",
	miradorResources: "Mirador resources",
	miradorViewer: "Mirador viewer",
	more: "meer...",
	moreResults: "Meer resultaten",
	mosaic: "Mozaïek",
	mosaicDescription: "Verplaats en rangschik vensters in verhouding tot elkaar binnen het zichtbare kader.",
	moveCompanionWindowToBottom: "Verplaats naar beneden",
	moveCompanionWindowToRight: "Verplaats naar rechts",
	nextCanvas: "Volgend item",
	numItems_one: "{{number}} item",
	numItems_other: "{{number}} items",
	off: "Uit",
	openCompanionWindow_annotations: "Annotaties",
	openCompanionWindow_attribution: "Rechten",
	openCompanionWindow_canvas: "Index",
	openCompanionWindow_info: "Informatie",
	openCompanionWindow_search: "Zoeken",
	openInCompanionWindow: "Open in een apart paneel",
	openWindows: "Geopende vensters",
	pagination: "{{current}} van {{total}}",
	position: "Positie",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Vorig item",
	related: "Verwant",
	resource: "Bron",
	retry: "Probeer opnieuw",
	right: "Rechts",
	rights: "Licentie",
	searchInputLabel: "zoek termen",
	searchNextResult: "Volgend resultaat",
	searchNoResults: "Geen resultaten gevonden",
	searchPreviousResult: "Vorig resultaat",
	searchSubmitAria: "Zoeken",
	searchTitle: "Zoek",
	selectWorkspaceMenu: "Selecteer workspacetype",
	showingNumAnnotations_one: "{{number}} annotatie weergegeven",
	showingNumAnnotations_other: "{{number}} annotaties weergegeven",
	showZoomControls: "Toon zoomknoppen",
	sidebarPanelsNavigation: "Zijbalk panelen navigatie",
	single: "Enkel",
	startHere: "Begin Hier",
	suggestSearch: "Zoek in dit document naar \"{{ query }}\"",
	theme: "Thema",
	thumbnailList: "Lijst thumbnails",
	thumbnailNavigation: "Thumbnails",
	thumbnails: "Thumbnails",
	toggleWindowSideBar: "Toon zijbalk",
	totalCollections_one: "{{count}} collectie",
	totalCollections_other: "{{count}} collecties",
	totalManifests_one: "{{count}} manifest",
	totalManifests_other: "{{count}} manifests",
	tryAgain: "Probeer opnieuw",
	untitled: "[Zonder titel]",
	view: "Weergave",
	welcome: "Welkom in Mirador",
	window: "Venster: {{label}}",
	windowMenu: "Vensters- en miniatuurweergave",
	windowNavigation: "Navigatie venster",
	windowPluginButtons: "Opties",
	windowPluginMenu: "Vensteropties",
	workspace: "Workspace",
	workspaceFullScreen: "Volledig scherm",
	workspaceMenu: "Workspace instellingen",
	workspaceOptions: "Workspace opties",
	workspaceSelectionTitle: "Selecteer een workspace type",
	zoomIn: "Zoom in",
	zoomOut: "Zoom out",
	zoomReset: "Reset zoom"
} }, lM = { translation: {
	aboutMirador: "O Projekcie Mirador",
	aboutThisItem: "O bieżącej pozycji",
	addedFromUrl: "(Dodano z URL)",
	addManifestUrl: "Lokalizacja zasobów",
	addManifestUrlHelp: "URL zasobów IIIF",
	addResource: "Dodaj zasoby",
	"annotationCanvasLabel_1/1": "Pozycja: [{{label}}]",
	"annotationCanvasLabel_1/2": "Lewo: [{{label}}]",
	"annotationCanvasLabel_2/2": "Prawo: [{{label}}]",
	annotations: "Adnotacje",
	attribution: "Atrybucja",
	attributionTitle: "Prawa",
	authenticationFailed: "Uwierzytelnianie nie powiodło się.",
	authenticationRequired: "Do pełnego dostępu wymagane jest uwierzytelnienie",
	backToResults: "Powrót do wyników",
	book: "Książka",
	bottom: "Dół",
	cancel: "Anuluj",
	canvasIndex: "Indeks",
	changeTheme: "Zmień motyw",
	clearSearch: "wyczyść",
	close: "Zamknij",
	closeAddResourceForm: "Zamknij formularz",
	closeAddResourceMenu: "Zamknij listę zasobów",
	closeCompanionWindow: "Zamknij panel",
	closeWindow: "Zamknij okno",
	collapseSection: "Zwiń sekcję \"{{section}}\"",
	collapseSidePanel: "Zwiń panel boczny",
	collection: "Zbiór",
	continue: "Kontynuuj",
	copy: "Kopiuj",
	currentItem: "Bieżąca pozycja",
	"currentItem_1/1": "Bieżąca pozycja",
	"currentItem_1/2": "Lewo",
	"currentItem_2/2": "Prawo",
	dark: "Ciemny motyw",
	digitizedView: "Widok zdigitalizowany",
	dismiss: "Odrzuć",
	displayNoAnnotations: "Nie podświetlaj",
	downloadExport: "Eksportuj obszar roboczy",
	downloadExportWorkspace: "Eksportuj obszar roboczy",
	elastic: "Elastyczny",
	elasticDescription: "Swobodnie przesuwaj i dopasowuj okna w nieograniczonej przestrzeni roboczej. Okna mogą zachodzić na siebie.",
	emptyResourceList: "Twoja lista zasobów jest pusta",
	error: "Błąd",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Wystąpił błąd",
	exitFullScreen: "Wyłącz tryb pełnoekranowy",
	expandSection: "Rozwiń sekcję \"{{section}}\"",
	expandSidePanel: "Rozwiń panel boczny",
	exportCopied: "Konfiguracja obszaru roboczego została skopiowana do schowka",
	fetchManifest: "Dodaj",
	fullScreen: "Pełny ekran",
	gallery: "Galeria",
	hideZoomControls: "Ukryj kontrolki powiększenia",
	highlightAllAnnotations: "Podświetl wszystko",
	iiif_homepage: "O tym zasobie",
	iiif_manifest: "Manifest IIIF",
	iiif_renderings: "Alternatywne formaty",
	iiif_seeAlso: "Zobacz też",
	import: "Importuj",
	importWorkspace: "Importuj obszar roboczy",
	importWorkspaceHint: "Wklej konfigurację Mirador 4 do zaimportowania",
	item: "Pozycja: {{label}}",
	itemList: "Lista pozycji",
	jsError: "Szczegóły techniczne",
	jsStack: "{{ stack }}",
	language: "Język",
	layer_hide: "Ukryj warstwę",
	layer_move: "Przenieś warstwę",
	layer_opacity: "Krycie warstwy",
	layer_show: "Pokaż warstwę",
	layers: "Warstwy",
	light: "Jasny motyw",
	links: "Linki",
	listAllOpenWindows: "Przejdź do okna",
	login: "Zaloguj",
	logout: "Wyloguj",
	manifestError: "Następujące zasoby nie mogą być dodane:",
	maximizeWindow: "Maksymalizuj okno",
	minimizeWindow: "Minimalizuj okno",
	mirador: "Mirador",
	miradorResources: "Zasoby Mirador",
	miradorViewer: "Przeglądarka Mirador",
	more: "więcej...",
	moreResults: "Więcej wyników",
	mosaic: "Mozaika",
	mosaicDescription: "Przesuwaj i zmieniaj rozmiary okien względem siebie, w widocznej ramce.",
	moveCompanionWindowToBottom: "Przesuń na dół",
	moveCompanionWindowToRight: "Przesuń w prawo",
	nextCanvas: "Następna pozycja",
	noItemSelected: "Nie wybrano pozycji",
	numItems_one: "{{number}} pozycja",
	numItems_other: "{{number}} pozycje",
	off: "Wyłącz",
	openCompanionWindow_annotations: "Adnotacje",
	openCompanionWindow_attribution: "Prawa",
	openCompanionWindow_canvas: "Indeks",
	openCompanionWindow_info: "Informacje",
	openCompanionWindow_layers: "Warstwy",
	openCompanionWindow_search: "Szukaj",
	openInCompanionWindow: "Otwórz w oddzielnym panelu",
	openWindows: "Aktualnie otwarte okna",
	pagination: "{{current}} of {{total}}",
	position: "Pozycja",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Poprzednia pozycja",
	related: "Powiązane",
	resource: "Zasoby",
	retry: "Spróbuj ponownie",
	right: "Prawo",
	rights: "Licencja",
	scroll: "Przewiń",
	searchInputLabel: "szukane słowa",
	searchNextResult: "Następny wynik",
	searchNoResults: "Nie znaleziono wyników",
	searchPreviousResult: "Poprzedni wynik",
	searchResultsRemaining: "Pozostało {{numLeft}}",
	searchSubmitAria: "Wyszukaj",
	searchTitle: "Wyszukaj",
	selectWorkspaceMenu: "Wybierz typ obszaru roboczego",
	showCollection: "Pokaż zbiór",
	showingNumAnnotations_one: "Wyświetlanie {{number}} adnotacji",
	showingNumAnnotations_other: "Wyświetlanie {{number}} adnotacji",
	showZoomControls: "Pokaż kontrolki powiększenia",
	sidebarPanelsNavigation: "Nawigacja pasków panelu bocznego",
	single: "Pojedynczy",
	startHere: "Zacznij tutaj",
	suggestSearch: "Przeszukaj ten dokument pod kątem \"{{ query }}\"",
	tableOfContentsList: "Spis treści",
	theme: "Motyw",
	thumbnailList: "Lista miniatur",
	thumbnailNavigation: "Miniatury",
	thumbnails: "Miniatury",
	toggleWindowSideBar: "Przełącz panel boczny",
	totalCollections_one: "{{count}} zbiór",
	totalCollections_other: "{{count}} zbiorów",
	totalManifests_one: "{{count}} manifest",
	totalManifests_other: "{{count}} manifestów",
	tryAgain: "Spróbuj ponownie",
	untitled: "[Bez nazwy]",
	view: "Widok",
	viewWorkspaceConfiguration: "Wyświetl konfigurację obszaru roboczego",
	welcome: "Witaj w Miradorze",
	window: "Okno: {{label}}",
	windowMenu: "Widoki okien i wyświetlanie miniatur",
	windowNavigation: "Nawigacja okna",
	windowPluginButtons: "Opcje",
	windowPluginMenu: "Opcje okna",
	workspace: "Obszar roboczy",
	workspaceFullScreen: "Pełny ekran",
	workspaceMenu: "Ustawienia obszaru roboczego",
	workspaceNavigation: "Nawigacja obszaru roboczego",
	workspaceOptions: "Opcje obszaru roboczego",
	workspaceSelectionTitle: "Wybierz typ obszaru roboczego",
	zoomIn: "Przybliż",
	zoomOut: "Oddal",
	zoomReset: "Zresetuj powiększenie"
} }, uM = { translation: {
	aboutThisItem: "Sobre esse item",
	addedFromUrl: "(Adicionado por URL)",
	addManifestUrl: "Localização do manifesto",
	addManifestUrlHelp: "URL do manifesto IIIF",
	addResource: "Adicionar conteúdo",
	"annotationCanvasLabel_1/1": "Item: [{{label}}]",
	"annotationCanvasLabel_1/2": "Esquerda: [{{label}}]",
	"annotationCanvasLabel_2/2": "Direita: [{{label}}]",
	annotations: "Anotações",
	attribution: "Atribuições",
	attributionTitle: "Direitos",
	authenticationFailed: "Falha na autenticação.",
	authenticationRequired: "Autenticação necessária para acesso completo",
	backToResults: "Voltar aos resultados",
	book: "Livro",
	bottom: "Embaixo",
	cancel: "Cancelar",
	canvasIndex: "Índice",
	changeTheme: "Mudar tema",
	clearSearch: "limpar",
	closeAddResourceForm: "Fechar formulário",
	closeAddResourceMenu: "Fechar lista de conteúdo",
	closeCompanionWindow: "Fechar painel",
	closeWindow: "Fechar janela",
	collapseSection: "Suprimir seção \"{{section}}\"",
	collapseSidePanel: "Suprimir barra lateral",
	continue: "Continuar",
	copy: "Copiar",
	currentItem: "Item atual",
	"currentItem_1/1": "Item atual",
	"currentItem_1/2": "Esquerda",
	"currentItem_2/2": "Direita",
	dark: "Tema escuro",
	dismiss: "Cancelar",
	downloadExport: "Exportar área de trabalho",
	downloadExportWorkspace: "Exportar área de trabalho",
	elastic: "Elástico",
	elasticDescription: "Mova e redimensione janelas livremente numa área de trabalho ilimitada. Janelas podem se sobrepor.",
	emptyResourceList: "Sua lista de conteúdos está vazia",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Um erro ocorreu",
	exitFullScreen: "Sair do modo tela cheia",
	expandSection: "Expandir seção \"{{section}}\"",
	expandSidePanel: "Expandir barra lateral",
	fetchManifest: "Adicionar",
	fullScreen: "Tela cheia",
	gallery: "Galeria",
	hideZoomControls: "Ocultar controles de zoom",
	highlightAllAnnotations: "Exibir todas",
	iiif_homepage: "Sobre esse conteúdo",
	iiif_manifest: "Manifesto IIIF",
	iiif_renderings: "Outros formatos",
	iiif_seeAlso: "Veja também",
	import: "Importar",
	importWorkspace: "Importar área de trabalho",
	importWorkspaceHint: "Cole uma configuração do Mirador 4 para importar",
	item: "Item: {{label}}",
	itemList: "Lista compacta",
	language: "Idioma",
	light: "Tema claro",
	links: "Links",
	listAllOpenWindows: "Pular para janela",
	login: "Login",
	manifestError: "O conteúdo não pode ser adicionado:",
	maximizeWindow: "Maximizar janela",
	minimizeWindow: "Minimizar janela",
	mirador: "Mirador",
	miradorResources: "conteúdo Mirador",
	miradorViewer: "visualizador Mirador",
	more: "mais...",
	moreResults: "Mais resultados",
	mosaic: "Mosáico",
	mosaicDescription: "Mova e redimensione janelas em relação entre si, dentro de uma área visível (grid).",
	moveCompanionWindowToBottom: "Mover para baixo",
	moveCompanionWindowToRight: "Mover para direita",
	nextCanvas: "Próximo item",
	numItems_one: "{{number}} itens",
	off: "Desativado",
	openCompanionWindow_annotations: "Anotações",
	openCompanionWindow_attribution: "Direitos",
	openCompanionWindow_canvas: "Índice",
	openCompanionWindow_info: "Informações",
	openCompanionWindow_search: "Busca",
	openInCompanionWindow: "Abrir em janela separada",
	openWindows: "Janelas abertas",
	pagination: "{{current}} de {{total}}",
	position: "Posição",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Item anterior",
	related: "Relacionado",
	resource: "Conteúdo",
	retry: "Tentar novamente",
	right: "Direita",
	rights: "Licenças",
	searchInputLabel: "termos de busca",
	searchNextResult: "Próximo resultado",
	searchNoResults: "Nenhum resultado encontrado",
	searchPreviousResult: "Resultado anterior",
	searchSubmitAria: "Realizar busca",
	searchTitle: "Busca",
	selectWorkspaceMenu: "Selecione um tipo de área de trabalho",
	showingNumAnnotations_one: "Mostrando {{number}} anotações",
	showZoomControls: "Mostrar controles de zoom",
	sidebarPanelsNavigation: "Navegação por paineis na barra lateral",
	single: "Individual",
	startHere: "Comece aqui",
	suggestSearch: "Procurar neste documento por \"{{ query }}\"",
	theme: "Tema",
	thumbnailList: "Lista de thumbnails",
	thumbnailNavigation: "Thumbnails",
	thumbnails: "Thumbnails",
	toggleWindowSideBar: "Ver barra lateral",
	tryAgain: "Tente novamente",
	untitled: "[Sem título]",
	view: "Visualizações",
	welcome: "Bem-vindo ao Mirador",
	window: "Janela: {{label}}",
	windowMenu: "Opções de visualização de janelas e thumbnails",
	windowNavigation: "Navegação de janelas",
	windowPluginButtons: "Opções",
	windowPluginMenu: "Opções de janela",
	workspace: "Área de trabalho",
	workspaceFullScreen: "Tela cheia",
	workspaceMenu: "Configurações de área de trabalho",
	workspaceOptions: "Opções de área de trabalho",
	workspaceSelectionTitle: "Selecionar tipo de área de trabalho",
	zoomIn: "Mais zoom",
	zoomOut: "Menos zoom",
	zoomReset: "Zerar zoom"
} }, dM = { translation: {
	aboutMirador: "Informazioni su Mirador",
	aboutThisItem: "Informazioni sull'oggetto",
	addedFromUrl: "(Aggiunto dall'URL)",
	addManifestUrl: "URL della risorsa",
	addManifestUrlHelp: "L'URL di una risorsa IIIF",
	addResource: "Aggiungi una risorsa",
	"annotationCanvasLabel_1/1": "Oggetto: [{{label}}]",
	"annotationCanvasLabel_1/2": "Sinistra: [{{label}}]",
	"annotationCanvasLabel_2/2": "Destra: [{{label}}]",
	annotations: "Annotazioni",
	attribution: "Attribuzione",
	attributionTitle: "Diritti",
	authenticationFailed: "Autenticazione fallita.",
	authenticationRequired: "Autenticazione richiesta per l'accesso completo",
	backToResults: "Torna ai risultati",
	book: "Libro",
	bottom: "Fondo",
	cancel: "Cancella",
	canvasIndex: "Indice",
	changeTheme: "Cambia tema",
	clearSearch: "pulisci",
	close: "Chiudi",
	closeAddResourceForm: "Chiudi il modulo",
	closeAddResourceMenu: "Chiudi la lista di risorse",
	closeCompanionWindow: "Chiudi il pannello",
	closeWindow: "Chiudi finestra",
	collapseSection: "Collassa la sezione \"{{section}}\"",
	collapseSidePanel: "Collassa la barra laterale",
	collection: "Collezione",
	continue: "Continua",
	copy: "Copia",
	currentItem: "Oggetto corrente",
	"currentItem_1/1": "Oggetto corrente",
	"currentItem_1/2": "Sinistra",
	"currentItem_2/2": "Destra",
	dark: "Tema scuro",
	digitizedView: "Digitized view",
	dismiss: "Dismiss",
	displayNoAnnotations: "Nascondi evidenziazione",
	downloadExport: "Esporta il workspace",
	downloadExportWorkspace: "Esporta il workspace",
	elastic: "Elastico",
	elasticDescription: "Muovi e ridimensiona le finestre liberamente in un workspace illimitato. Le finestre possono sovrapporsi.",
	emptyResourceList: "La tua lista di risorse è vuota.",
	error: "Errore",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Si è verificato un errore.",
	exitFullScreen: "Esci da schermo intero",
	expandSection: "Espandi la sezione \"{{section}}\"",
	expandSidePanel: "Espandi la barra laterale",
	exportCopied: "La configurazione del workspace è stata copiata nella tua clipboard",
	fetchManifest: "Aggiungi",
	fullScreen: "Schermo intero",
	gallery: "Galleria",
	hideZoomControls: "Nascondi i controlli di zoom",
	highlightAllAnnotations: "Evidenzia tutto",
	iiif_homepage: "Informazioni su questa risorsa",
	iiif_manifest: "IIIF manifest",
	iiif_renderings: "Formati alternativi",
	iiif_seeAlso: "Vedi anche",
	import: "Importa",
	importWorkspace: "Importa workspace",
	importWorkspaceHint: "Incolla una configurazione di Mirador 4 da importare",
	item: "Oggetto: {{label}}",
	itemList: "Lista compatta",
	jsError: "Dettagli tecnici",
	jsStack: "{{ stack }}",
	language: "Lingua",
	layer_hide: "Nascondi livello",
	layer_move: "Sposta livello",
	layer_opacity: "Opacità del livello",
	layer_show: "Visualizza livello",
	layers: "Livelli",
	light: "Tema chiaro",
	links: "Link",
	listAllOpenWindows: "Vai alla finestra",
	login: "Entra",
	logout: "Esci",
	manifestError: "La risorsa non può essere aggiunta:",
	maximizeWindow: "Massimizza la finestra",
	minimizeWindow: "Minimizza la finestra",
	mirador: "Mirador",
	miradorResources: "Risorse Mirador",
	miradorViewer: "Visualizzatore Mirador",
	more: "ancora...",
	moreResults: "Più risultati",
	mosaic: "Mosaico",
	mosaicDescription: "Muovi e ridimensiona le finestre, tenendole all'interno dell'area visibile",
	moveCompanionWindowToBottom: "Sposta in fondo",
	moveCompanionWindowToRight: "Sposta a destra",
	nextCanvas: "Oggetto Successivo",
	noItemSelected: "Nessun oggetto selezionato",
	numItems_one: "{{number}} oggetti",
	numItems_other: "{{number}} oggetti",
	off: "Off",
	openCompanionWindow_annotations: "Annotazioni",
	openCompanionWindow_attribution: "Diritti",
	openCompanionWindow_canvas: "Indice",
	openCompanionWindow_info: "Informazioni",
	openCompanionWindow_layers: "Livelli",
	openCompanionWindow_search: "Cerca",
	openInCompanionWindow: "Apri in un pannello separato",
	openWindows: "Finestre aperte in questo momento",
	pagination: "{{current}} di {{total}}",
	position: "Posizione",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Oggetto precedente",
	related: "Contenuti collegati",
	resource: "Risorsa",
	retry: "Riprova",
	right: "Right",
	rights: "Licenza",
	scroll: "Scorri",
	searchInputLabel: "termini di ricerca",
	searchNextResult: "Prossimo risultato",
	searchNoResults: "Nessun risultato",
	searchPreviousResult: "Risultato precedente",
	searchResultsRemaining: "{{numLeft}} rimanenti",
	searchSubmitAria: "Cerca",
	searchTitle: "Cerca",
	selectWorkspaceMenu: "Selezione il tipo di workspace",
	showCollection: "Visualizza la collezione",
	showingNumAnnotations_one: "Sto mostrando {{number}} annotazioni",
	showingNumAnnotations_other: "Visualizzando {{number}} annotazioni",
	showZoomControls: "Mostra i controlli di zoom",
	sidebarPanelsNavigation: "Navigazione dei pannelli della barra laterale",
	single: "Singolo",
	startHere: "Inizia qui",
	suggestSearch: "Cerca in questo documento: \"{{ query }}\"",
	tableOfContentsList: "Sommario",
	theme: "Tema",
	thumbnailList: "Lista thumbnail",
	thumbnailNavigation: "Thumbnails",
	thumbnails: "Thumbnails",
	toggleWindowSideBar: "Apri/Chiudi la barra",
	totalCollections_one: "{{count}} collezione",
	totalCollections_other: "{{count}} collezioni",
	totalManifests_one: "{{count}} manifest",
	totalManifests_other: "{{count}} manifests",
	tryAgain: "Riprova",
	untitled: "[senza titolo]",
	view: "Visualizza",
	viewWorkspaceConfiguration: "Visualizza la configurazione del workspace",
	welcome: "Benvenuto in Mirador",
	window: "Finestra: {{label}}",
	windowMenu: "Visualizzazioni finestra e display thumbnail",
	windowNavigation: "Navigazione finestra",
	windowPluginButtons: "Opzioni",
	windowPluginMenu: "Opzioni finestra",
	workspace: "Workspace",
	workspaceFullScreen: "Schermo intero",
	workspaceMenu: "Configurazioni Workspace",
	workspaceNavigation: "Navigazione del workspace",
	workspaceOptions: "Opzioni Workspace",
	workspaceSelectionTitle: "Seleziona il tipo di workspace",
	zoomIn: "Zoom in",
	zoomOut: "Zoom out",
	zoomReset: "Reimposta zoom"
} }, fM = { translation: {
	aboutMirador: "О пројекту Mirador",
	aboutThisItem: "Опис",
	addedFromUrl: "(Додато са URL)",
	addManifestUrl: "Локација ресурса",
	addManifestUrlHelp: "URL IIIF ресурса",
	addResource: "Додајте ресурс",
	"annotationCanvasLabel_1/1": "Страница: [{{label}}]",
	"annotationCanvasLabel_1/2": "Лева: [{{label}}]",
	"annotationCanvasLabel_2/2": "Десна: [{{label}}]",
	annotations: "Анотације",
	attribution: "Приступ",
	attributionTitle: "Права",
	authenticationFailed: "Неуспела аутентификација.",
	authenticationRequired: "За потпуни приступ неопходна је аутентификација",
	backToResults: "Повратак на резултате",
	book: "Књига",
	bottom: "На дну",
	cancel: "Одустаните",
	canvasIndex: "Индекс",
	changeTheme: "Промените тему",
	clearSearch: "обришите",
	close: "Затворите",
	closeAddResourceForm: "Затворите",
	closeAddResourceMenu: "Затворите листу ресурса",
	closeCompanionWindow: "Затворите панел",
	closeWindow: "Затворите приказ",
	collapseSection: "Сакријте \"{{section}}\" секцију",
	collapseSidePanel: "Сакријте",
	collection: "Колекција",
	continue: "Наставите",
	copy: "Копирајте",
	currentItem: "Тренутна страница",
	"currentItem_1/1": "Тренутна страница",
	"currentItem_1/2": "Лева",
	"currentItem_2/2": "Десна",
	dark: "Тамна тема",
	digitizedView: "Приказ дигиталног објекта",
	dismiss: "Откажите",
	displayNoAnnotations: "Без приказа",
	downloadExport: "Извезите радно окружење",
	downloadExportWorkspace: "Извезите радно окружење",
	elastic: "Еластични",
	elasticDescription: "Слободно померајте и одредите величину приказа у неограниченом радном простору. Прикази могу бити већи од радног простора.",
	emptyResourceList: "Ваша листа ресурса је празна",
	error: "Грешка",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Дошло је до грешке",
	exitFullScreen: "Изађите из приказа преко целог екрана",
	expandSection: "Проширите \"{{section}}\" секцију",
	expandSidePanel: "Прикажите",
	exportCopied: "Конфигурација радног окружења је копирана у привремену меморију",
	fetchManifest: "Додајте",
	fullScreen: "Приказ у пуном екрану",
	gallery: "Галерија",
	hideZoomControls: "Сакријте контроле зума",
	highlightAllAnnotations: "Приказ свих",
	iiif_homepage: "О ресурсу",
	iiif_manifest: "IIIF manifest",
	iiif_renderings: "Додатни формати",
	iiif_seeAlso: "Погледајте и",
	import: "Увезите",
	importWorkspace: "Увезите радно окружење",
	importWorkspaceHint: "Убаците конфигурацију Mirador 4 како би могли да је увезете",
	item: "Страница: {{label}}",
	itemList: "Листа страница",
	jsError: "Технички детаљи",
	jsStack: "{{ stack }}",
	language: "Језик приказа",
	layer_hide: "Сакријте слој",
	layer_move: "Померите слој",
	layer_opacity: "Видљивост слоја",
	layer_show: "Приказ слоја",
	layers: "Слојеви",
	light: "Светла тема",
	links: "Линкови",
	listAllOpenWindows: "Идите на приказ",
	login: "Улогујте се",
	logout: "Излогујте се",
	manifestError: "Ресурс се не може додати",
	maximizeWindow: "Максималан приказ",
	minimizeWindow: "Минималан приказ",
	mirador: "Mirador",
	miradorResources: "Mirador ресурси",
	miradorViewer: "Mirador прегледач",
	more: "још...",
	moreResults: "Још резултата",
	mosaic: "Мозаик",
	mosaicDescription: "Померајте и одредите величину приказа који су у међусобној релацији, унутар видљивог оквира.",
	moveCompanionWindowToBottom: "Пребаците на дно",
	moveCompanionWindowToRight: "Померите у десну страну",
	nextCanvas: "Следећа",
	noItemSelected: "Нема изабраних објеката",
	numItems_one: "{{number}} страница/це",
	off: "Искључене",
	openCompanionWindow_annotations: "Анотације",
	openCompanionWindow_attribution: "Права",
	openCompanionWindow_canvas: "Индекс",
	openCompanionWindow_info: "Информације",
	openCompanionWindow_layers: "Слојеви",
	openCompanionWindow_search: "Претрага",
	openInCompanionWindow: "Отворите у засебном панелу",
	openWindows: "Тренутно отворени прикази",
	pagination: "{{current}} од {{total}}",
	position: "Позиција",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Претходна",
	related: "Релације",
	resource: "Ресурс",
	retry: "Покушајте поново",
	right: "Десно",
	rights: "Лиценца",
	scroll: "Померајте",
	searchInputLabel: "претражите појам",
	searchNextResult: "Следећи резултат",
	searchNoResults: "Тражени појам није пронађен",
	searchPreviousResult: "Претходни резултат",
	searchSubmitAria: "Претражите",
	searchTitle: "Претрага",
	selectWorkspaceMenu: "Изаберите тип радног окружења",
	showCollection: "Прикажи колекцију",
	showingNumAnnotations_one: "Приказ {{number}} анотација/је",
	showZoomControls: "Приказ контрола зума",
	sidebarPanelsNavigation: "Навигација сајдбар панела",
	single: "Појединачно",
	startHere: "Започните",
	suggestSearch: "Пронађите појам \"{{ query }}\" у овом документу",
	tableOfContentsList: "Садржај",
	theme: "Тема",
	thumbnailList: "Листа сличица",
	thumbnailNavigation: "Сличице",
	thumbnails: "Сличице",
	toggleWindowSideBar: "Сајдбар",
	totalCollections_one: "{{count}} колекција/е",
	totalManifests_one: "{{count}} објек(а)та",
	tryAgain: "Покушајте поново",
	untitled: "[Без наслова]",
	view: "Преглед",
	welcome: "Добродошли у прегледач Mirador",
	window: "Приказ: {{label}}",
	windowMenu: "Изглед прегледа и позиција сличица",
	windowNavigation: "Навигација приказа",
	windowPluginButtons: "Опције",
	windowPluginMenu: "Опције приказа",
	workspace: "Радни простор",
	workspaceFullScreen: "Приказ преко целог екрана",
	workspaceMenu: "Уређивање радног простора",
	workspaceOptions: "Опције радног окружења",
	workspaceSelectionTitle: "Изаберите тип радног окружења",
	zoomIn: "Увећајте",
	zoomOut: "Умањите",
	zoomReset: "Ресет зума"
} }, pM = { translation: {
	aboutMirador: "Om Projekt Mirador",
	aboutThisItem: "Om det här objektet",
	addedFromUrl: "(Tillagd från URL)",
	addManifestUrl: "Webbadress till samling eller manifest",
	addManifestUrlHelp: "URL till en IIIF-resurs",
	addResource: "Lägg till resurs",
	"annotationCanvasLabel_1/1": "Objekt: [{{label}}]",
	"annotationCanvasLabel_1/2": "Vänster: [{{label}}]",
	"annotationCanvasLabel_2/2": "Höger: [{{label}}]",
	annotations: "Noteringar",
	attribution: "Tillskrivning",
	attributionTitle: "Rättigheter",
	authenticationFailed: "Autentisering misslyckades.",
	authenticationRequired: "Autentisering krävs för full åtkomst",
	backToResults: "Tillbaka till resultat",
	book: "Bok",
	bottom: "Nederkant",
	cancel: "Avbryt",
	canvasIndex: "Index",
	changeTheme: "Ändra tema",
	clearSearch: "Ta bort sökning",
	close: "Stäng",
	closeAddResourceForm: "Stäng formulär",
	closeAddResourceMenu: "Stäng resurslista",
	closeCompanionWindow: "Stäng panel",
	closeWindow: "Stäng fönster",
	collapseSection: "Stäng sektionen \"{{section}}\"",
	collapseSidePanel: "Stäng sidofält",
	collection: "Samling",
	continue: "Fortsätt",
	copy: "Kopiera",
	currentItem: "Aktuellt objekt",
	"currentItem_1/1": "Aktuellt objekt",
	"currentItem_1/2": "Vänster",
	"currentItem_2/2": "Höger",
	dark: "Mörkt tema",
	digitizedView: "Digitaliserad vy",
	dismiss: "Stäng",
	displayNoAnnotations: "Avmarkera alla",
	downloadExport: "Exportera arbetsyta",
	downloadExportWorkspace: "Exportera arbetsyta",
	elastic: "Elastisk",
	elasticDescription: "Flytta och ändra storlek på fönster fritt i en obegränsad arbetsyta. Fönster kan överlappa.",
	emptyResourceList: "Din resurslista är tom",
	error: "Error",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Ett problem uppstod",
	exitFullScreen: "Lämna helskärmsläge",
	expandSection: "Expandera sektionen \"{{section}}\"",
	expandSidePanel: "Expandera sidofält",
	exportCopied: "Konfiguration av arbetsytan har kopierats till dina urklipp",
	fetchManifest: "Lägg till",
	fullScreen: "Helskärmsläge",
	gallery: "Galleri",
	hideZoomControls: "Dölj zoomkontroller",
	highlightAllAnnotations: "Markera alla",
	iiif_homepage: "Om den här resursen",
	iiif_manifest: "IIIF manifest",
	iiif_renderings: "Alternativa format",
	iiif_seeAlso: "Se även",
	import: "Importera",
	importWorkspace: "Importera arbetsyta",
	importWorkspaceHint: "Klistra in en Mirador 4 konfiguration att importera",
	item: "Objekt: {{label}}",
	itemList: "Objektlista",
	jsError: "Tekniska detaljer",
	jsStack: "{{ stack }}",
	language: "Språk",
	layer_hide: "Dölj lager",
	layer_move: "Flytta lager",
	layer_opacity: "Lageropacitet",
	layer_show: "Visa lager",
	layers: "Lager",
	light: "Ljust tema",
	links: "Länkar",
	listAllOpenWindows: "Gå till fönster",
	login: "Logga in",
	logout: "Logga ut",
	manifestError: "Resursen kan inte läggas till:",
	maximizeWindow: "Maximera fönster",
	minimizeWindow: "Minimera fönster",
	mirador: "Mirador",
	miradorResources: "Miradorresurser",
	miradorViewer: "Mirador bildvisare",
	more: "mer...",
	moreResults: "Fler resultat",
	mosaic: "Mosaik",
	mosaicDescription: "Flytta och ändra storlek på fönster i relation till varandra, innanför den synliga ramen.",
	moveCompanionWindowToBottom: "Flytta till botten",
	moveCompanionWindowToRight: "Flytta till höger",
	nextCanvas: "Nästa objekt",
	noItemSelected: "Inga valda objekt",
	numItems_one: "{{number}} objekt",
	off: "Av",
	openCompanionWindow_annotations: "Noteringar",
	openCompanionWindow_attribution: "Rättigheter",
	openCompanionWindow_canvas: "Index",
	openCompanionWindow_info: "Information",
	openCompanionWindow_layers: "Lager",
	openCompanionWindow_search: "Sök",
	openInCompanionWindow: "Öppna i separat panel",
	openWindows: "Öppna fönster",
	pagination: "{{current}} av {{total}}",
	position: "Position",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Föregående objekt",
	related: "Relaterat",
	resource: "Resurs",
	retry: "Försök igen",
	right: "Till höger",
	rights: "Licens",
	scroll: "Scrolla",
	searchInputLabel: "Sökord",
	searchNextResult: "Nästa resultat",
	searchNoResults: "Inga resultat hittades",
	searchPreviousResult: "Föregående resultat",
	searchResultsRemaining: "{{numLeft}} kvar",
	searchSubmitAria: "Sök",
	searchTitle: "Sök",
	selectWorkspaceMenu: "Välj typ av arbetsyta",
	showCollection: "Visa samling",
	showingNumAnnotations_one: "Visar {{number}} noteringar",
	showZoomControls: "Visa zoomkontroller",
	sidebarPanelsNavigation: "Sidofältspaneler navigering",
	single: "En och en",
	startHere: "Börja här",
	suggestSearch: "Sök i detta dokument efter \"{{ query }}\"",
	tableOfContentsList: "Innehållsförteckning",
	theme: "Tema",
	thumbnailList: "Miniatyrlista",
	thumbnailNavigation: "Miniatyrer",
	thumbnails: "Miniatyrer",
	toggleWindowSideBar: "Visa/dölj sidofält",
	totalCollections_one: "{{count}} samlingar",
	totalManifests_one: "{{count}} manifest",
	tryAgain: "Försök igen",
	untitled: "[namnlös]",
	view: "Vy",
	welcome: "Välkommen till Mirador",
	window: "Fönster: {{label}}",
	windowMenu: "Fönstervyer & miniatyrdisplay",
	windowNavigation: "Fönsternavigation",
	windowPluginButtons: "Inställningar",
	windowPluginMenu: "Fönsterinställningar",
	workspace: "Arbetsyta",
	workspaceFullScreen: "Helskärmsläge",
	workspaceMenu: "Inställningar för arbetsyta",
	workspaceNavigation: "Navigera i arbetsyta",
	workspaceOptions: "Fler val för arbetsyta",
	workspaceSelectionTitle: "Välj typ av arbetsyta",
	zoomIn: "Zooma in",
	zoomOut: "Zooma ut",
	zoomReset: "Återställ zoom"
} }, mM = { translation: {
	aboutMirador: "Apie Project Mirador",
	aboutThisItem: "Apie šį įrašą",
	addedFromUrl: "(Pridėta naudojant URL)",
	addManifestUrl: "Šaltinio adresas",
	addManifestUrlHelp: "Nuoroda į IIIF šaltinį",
	addResource: "Pridėti šaltinį",
	"annotationCanvasLabel_1/1": "Įrašas: [{{label}}]",
	"annotationCanvasLabel_1/2": "Kairė: [{{label}}]",
	"annotationCanvasLabel_2/2": "Dešinė: [{{label}}]",
	annotations: "Anotacijos",
	attribution: "Priskyrimas",
	attributionTitle: "Teisės",
	authenticationFailed: "Autentifikavimo klaida.",
	authenticationRequired: "Pilnai prieigai būtina autentifikacija",
	backToResults: "Grįžti į rezultatus",
	book: "Knyga",
	bottom: "Apačia",
	cancel: "Atšaukti",
	canvasIndex: "Indeksas",
	changeTheme: "Keisti temą",
	clearSearch: "valyti",
	closeAddResourceForm: "Uždaryti paraišką",
	closeAddResourceMenu: "Uždaryti šaltinių sąrašą",
	closeCompanionWindow: "Uždaryti panelę",
	closeWindow: "Uždaryti langą",
	collapseSection: "Suskleisti \"{{section}}\" sekciją",
	collapseSidePanel: "Suskleisti šoninę juostą",
	continue: "Tęsti",
	copy: "Kopijuoti",
	currentItem: "Dabartinis įrašas",
	"currentItem_1/1": "Dabartinis įrašas",
	"currentItem_1/2": "Kairė",
	"currentItem_2/2": "Dešinė",
	dark: "Tamsi tema",
	digitizedView: "Skaitmenintas vaizdas",
	dismiss: "Atmesti",
	displayNoAnnotations: "Slėpti viską",
	downloadExport: "Išsaugoti darbalaukį",
	downloadExportWorkspace: "Išsaugoti darbalaukį",
	elastic: "Lankstus",
	elasticDescription: "Langų dydis ir vieta gali būti laisvai valdomi. Langai gali persidengti.",
	emptyResourceList: "Jūsų šaltinių sąrašas yra tuščias",
	error: "Klaida",
	errorDialogConfirm: "Gerai",
	errorDialogTitle: "Įvyko klaida",
	exitFullScreen: "Išjungti pilno ekrano režimą",
	expandSection: "Išplėsti \"{{section}}\" sekciją",
	expandSidePanel: "Išplėsti šoninę juostą",
	exportCopied: "Darbalaukio nustatymai nukopijuoti",
	fetchManifest: "Pridėti",
	fullScreen: "Pilnas ekranas",
	gallery: "Galerija",
	hideZoomControls: "Slėpti priartinimo valdymą",
	highlightAllAnnotations: "Paryškinti viską",
	iiif_homepage: "Apie šį šaltinį",
	iiif_manifest: "IIIF manifestas",
	iiif_renderings: "Kiti formatai",
	iiif_seeAlso: "Susiję",
	import: "Įkelti",
	importWorkspace: "Įkelti darbalaukį",
	importWorkspaceHint: "Įterpkite Mirador 4 nustatymus įkėlimui",
	item: "Įrašas: {{label}}",
	itemList: "Įrašų sąrašas",
	jsError: "Techninė informacija",
	jsStack: "{{ stack }}",
	language: "Kalba",
	layer_hide: "Slėpti sluoksnį",
	layer_move: "Perkelti sluoksnį",
	layer_opacity: "Sluoksnio nepermatomumas",
	layer_show: "Rodyti sluoksnį",
	layers: "Sluoksniai",
	light: "Šviesi tema",
	links: "Nuorodos",
	listAllOpenWindows: "Rodyti aktyvius langus",
	login: "Prisijungti",
	logout: "Atsijungti",
	manifestError: "Šaltinis negali būti pridėtas:",
	maximizeWindow: "Išdidinti langą",
	minimizeWindow: "Sumažinti langą",
	mirador: "Mirador",
	miradorResources: "Mirador šaltiniai",
	miradorViewer: "Mirador žiūryklė",
	more: "daugiau...",
	moreResults: "Daugiau rezultatų",
	mosaic: "Mosaic",
	mosaicDescription: "Langų dydžio ir pozicijos keitimai apribojami ekrano erdvėje.",
	moveCompanionWindowToBottom: "Perkelti į apačią",
	moveCompanionWindowToRight: "Perkelti į dešinę",
	nextCanvas: "Kitas įrašas",
	numItems_one: "{{number}} įrašas (-ai)",
	off: "Išjungti",
	openCompanionWindow_annotations: "Anotacijos",
	openCompanionWindow_attribution: "Teisės",
	openCompanionWindow_canvas: "Indeksas",
	openCompanionWindow_info: "Informacija",
	openCompanionWindow_layers: "Sluoksniai",
	openCompanionWindow_search: "Paieška",
	openInCompanionWindow: "Atidaryti kaip naują panelę",
	openWindows: "Aktyvųs langai",
	pagination: "{{current}} iš {{total}}",
	position: "Pozicija",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Buvęs įrašas",
	related: "Susiję",
	resource: "Šaltinis",
	retry: "Pabandyti iš naujo",
	right: "Dešinė",
	rights: "Teisės",
	scroll: "Paslinkti",
	searchInputLabel: "paieškos terminas",
	searchNextResult: "Kitas rezultatas",
	searchNoResults: "Nėra rezultatų",
	searchPreviousResult: "Buvęs rezultatas",
	searchSubmitAria: "Pateikti paieškos užklausą",
	searchTitle: "Ieškoti",
	selectWorkspaceMenu: "Pasirinkti darbalaukio tipą",
	showCollection: "Rodyti kolekciją",
	showingNumAnnotations_one: "Rodoma {{number}} anotacija (-os)",
	showZoomControls: "Rodyti priartinimo valdymą",
	sidebarPanelsNavigation: "Šoninės juostos valdymas",
	single: "Atskiras",
	startHere: "Pradėkite čia",
	suggestSearch: "Ieškoti \"{{ query }}\" visame documente",
	tableOfContentsList: "Turinys",
	theme: "Tema",
	thumbnailList: "Miniatiūrų sąrašas",
	thumbnailNavigation: "Miniatiūros",
	thumbnails: "Miniatiūros",
	toggleWindowSideBar: "Perjungti šoninę juostą",
	totalCollections_one: "{{count}} kolekcija (-os)",
	totalManifests_one: "{{count}} šaltinis (-iai)",
	tryAgain: "Bandykite dar kartą",
	untitled: "[Be pavadinimo]",
	view: "Žiūrėti",
	welcome: "Sveiki atvykę į Mirador",
	window: "Langas: {{label}}",
	windowMenu: "Langų & miniatiūrų atvaizdavimas",
	windowNavigation: "Langų valdymas",
	windowPluginButtons: "Pasirinkimai",
	windowPluginMenu: "Langų pasirinkimai",
	workspace: "Darbalaukis",
	workspaceFullScreen: "Pilnas ekranas",
	workspaceMenu: "Darbalaukio nustatymai",
	workspaceNavigation: "Darbalaukio valdymas",
	workspaceOptions: "Darbalaukio pasirinkimai",
	workspaceSelectionTitle: "Pasirinkite darbalaukio tipą",
	zoomIn: "Priartinti",
	zoomOut: "Atitolinti",
	zoomReset: "Atstatyti priartinimą"
} }, hM = { translation: {
	aboutMirador: "Về dự án Mirador",
	aboutThisItem: "Về khoản mục này",
	addedFromUrl: "(Được thêm từ URL)",
	addManifestUrl: "Vị trí tài nguyên",
	addManifestUrlHelp: "URL của tài nguyên IIIF",
	addResource: "Bổ sung tài nguyên",
	"annotationCanvasLabel_1/1": "Khoản mục: [{{label}}]",
	"annotationCanvasLabel_1/2": "Trái: [{{label}}]",
	"annotationCanvasLabel_2/2": "Phải: [{{label}}]",
	annotations: "Chú giải",
	attribution: "Quyền hạn",
	attributionTitle: "Quyền",
	authenticationFailed: "Xác thực thất bại.",
	authenticationRequired: "Xác thực được yêu cầu cho truy nhập đầy đủ",
	backToResults: "Trở lại kết quả",
	book: "Sách",
	bottom: "Đáy",
	cancel: "Huỷ bỏ",
	canvasIndex: "Chỉ mục",
	changeTheme: "Đổi chủ đề",
	clearSearch: "xoá",
	close: "Đóng",
	closeAddResourceForm: "Đóng mẫu",
	closeAddResourceMenu: "Đóng danh sách tài nguyên",
	closeCompanionWindow: "Đóng panel",
	closeWindow: "Đóng cửa sổ",
	collapseSection: "Co sập {{section}} mục",
	collapseSidePanel: "Co sập thanh bên",
	collection: "Tuyển tập",
	continue: "Tiếp tục",
	copy: "Sao",
	currentItem: "Khoản mục hiện thời",
	"currentItem_1/1": "Khoản mục hiện thời",
	"currentItem_1/2": "Trái",
	"currentItem_2/2": "Phải",
	dark: "Chủ đề tối",
	digitizedView: "Cái nhìn số hoá",
	dismiss: "Bác bỏ",
	displayNoAnnotations: "Không làm nổi bật",
	downloadExport: "Vùng xuất khẩu",
	downloadExportWorkspace: "Vùng xuất khẩu",
	elastic: "Co giãn",
	elasticDescription: "Di chuyển và định cỡ cửa sổ tự do trong vùng vô giới hạn. Cửa sổ có thể chèn lấp.",
	emptyResourceList: "Danh sách tài nguyên của bạn là trống",
	error: "Lỗi",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Lỗi đã xuất hiện",
	exitFullScreen: "Ra khỏi toàn màn hình",
	expandSection: "Mở rộng {{section}} mục",
	expandSidePanel: "Mở rộng thanh bên",
	exportCopied: "Cấu hình vùng làm việc được sao vào bảng đệm của bạn",
	fetchManifest: "Thêm",
	fullScreen: "Toàn màn hình",
	gallery: "Phòng tranh",
	hideZoomControls: "Ẩn điều khiển thu phóng",
	highlightAllAnnotations: "Làm nổi bật tất",
	iiif_homepage: "Về tài nguyên này",
	iiif_manifest: "Bản kê IIIF",
	iiif_renderings: "Dạng thức luân phiên",
	iiif_seeAlso: "Cũng xem",
	import: "Nhập khẩu",
	importWorkspace: "Vùng nhập khẩu",
	importWorkspaceHint: "Dán cấu hình Mirador 4 để được nhập khẩu",
	item: "Khoản mục: {{label}}",
	itemList: "Danh sách khoản mục",
	jsError: "Chi tiết kĩ thuật",
	jsStack: "{{ stack }}",
	language: "Ngôn ngữ",
	layer_hide: "Giấu tầng",
	layer_move: "Chuyển tầng",
	layer_opacity: "Làm mờ tầng",
	layer_show: "Hiện tầng",
	layers: "Tầng",
	light: "Chủ đề sáng",
	links: "Móc nối",
	listAllOpenWindows: "Nhảy tới cửa sổ",
	login: "Đăng nhập",
	logout: "Đăng xuất",
	manifestError: "Tài nguyên không thể được bổ sung:",
	maximizeWindow: "Cực đại cửa sổ",
	minimizeWindow: "Cực tiểu cửa sổ",
	mirador: "Mirador",
	miradorResources: "Tài nguyên Mirador",
	miradorViewer: "Bộ xem Mirador",
	more: "thêm...",
	moreResults: "Thêm kết quả",
	mosaic: "Mosaic",
	mosaicDescription: "Di chuyển và định cỡ cửa sổ trong quan hệ lẫn nhau, bên trong khung thấy được.",
	moveCompanionWindowToBottom: "Chuyển tới đáy",
	moveCompanionWindowToRight: "Chuyển sang phải",
	nextCanvas: "Khoản mục tiếp",
	noItemSelected: "Không khoản mục nào được chọn",
	numItems_one: "{{number}} khoản mục",
	off: "Off",
	openCompanionWindow_annotations: "Chú giải",
	openCompanionWindow_attribution: "Quyền",
	openCompanionWindow_canvas: "Chỉ mục",
	openCompanionWindow_info: "Thông tin",
	openCompanionWindow_layers: "Tầng",
	openCompanionWindow_search: "Tìm",
	openInCompanionWindow: "Mở trong ngăn tách rời",
	openWindows: "Cửa sổ mở hiện thời",
	pagination: "{{current}} trong {{total}}",
	position: "Vị trí",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Khoản mục trước",
	related: "Có liên quan",
	resource: "Tài nguyên",
	retry: "Thử lại",
	right: "Quyền",
	rights: "Cấp phép",
	scroll: "Cuộn",
	searchInputLabel: "Từ tìm kiếm",
	searchNextResult: "Kết quả tiếp",
	searchNoResults: "Không tìm được kết quả nào",
	searchPreviousResult: "Kết quả trước",
	searchSubmitAria: "Đệ trình việc tìm",
	searchTitle: "Tìm",
	selectWorkspaceMenu: "Chọn kiểu vùng làm việc",
	showCollection: "Hiện bộ sưu tập",
	showingNumAnnotations_one: "Hiện {{number}} chú giải",
	showZoomControls: "Hiện kiểm soát thu phóng",
	sidebarPanelsNavigation: "Dẫn lái ngăn thanh bên",
	single: "Chỉ một",
	startHere: "Bắt đầu ở đây",
	suggestSearch: "Tìm tài liệu này cho \"{{ query }}\"",
	tableOfContentsList: "Mục lục",
	theme: "Chủ đề",
	thumbnailList: "Danh sách ảnh thu nhỏ",
	thumbnailNavigation: "Ảnh thu nhỏ",
	thumbnails: "Ảnh thu nhỏ",
	toggleWindowSideBar: "chốt thanh bên",
	totalCollections_one: "{{count}} bộ sưu tập",
	totalManifests_one: "{{count}} bản kê",
	tryAgain: "Thử lại",
	untitled: "[Untitled]",
	view: "Xem",
	welcome: "Chào mừng bạn tới Mirador",
	window: "Cửa sổ: {{label}}",
	windowMenu: "Xem cửa sổ & hiển thị ảnh thu nhỏ",
	windowNavigation: "Dẫn lái cửa sổ",
	windowPluginButtons: "Tuỳ chọn",
	windowPluginMenu: "Tuỳ chọn cửa sổ",
	workspace: "Vùng làm việc",
	workspaceFullScreen: "Toàn màn hình",
	workspaceMenu: "Thiết đặt vùng làm việc",
	workspaceNavigation: "Dẫn lái vùng làm việc",
	workspaceOptions: "Tuỳ chọn vùng làm việc",
	workspaceSelectionTitle: "Chọn kiểu vùng làm việc",
	zoomIn: "Thu nhỏ",
	zoomOut: "Phóng to",
	zoomReset: "Đặt lại thu phóng"
} }, gM = { translation: {
	aboutMirador: "За проекта Mirador",
	aboutThisItem: "За този елемент",
	addedFromUrl: "(Добавено от линк)",
	addManifestUrl: "Адрес на ресурса",
	addManifestUrlHelp: "Адресът на IIIF ресурса",
	addResource: "Добавяне на ресурс",
	"annotationCanvasLabel_1/1": "Елемент: [{{label}}]",
	"annotationCanvasLabel_1/2": "Ляво: [{{label}}]",
	"annotationCanvasLabel_2/2": "Дясно: [{{label}}]",
	annotations: "Анотации",
	attribution: "Принос",
	attributionTitle: "Права",
	authenticationFailed: "Неуспешна аутентикация.",
	authenticationRequired: "Необходима е аутентикация за пълен достъп",
	backToResults: "Назад към ресултатите",
	book: "Книга",
	bottom: "Долу",
	cancel: "Отказ",
	canvasIndex: "Индекс",
	changeTheme: "Промяна на темата",
	clearSearch: "изчистване",
	close: "Затвори",
	closeAddResourceForm: "Затваряне на формата",
	closeAddResourceMenu: "Затваряне на списъка с ресурси",
	closeCompanionWindow: "Затваряне на панела",
	closeWindow: "Затваряне на прозореца",
	collapseSection: "Свиване на секция \"{{section}}\"",
	collapseSidePanel: "Свиване на страничен панел",
	collection: "Колекция",
	continue: "Продължи",
	copy: "Копиране",
	currentItem: "Текущ елемент",
	"currentItem_1/1": "Текущ елемент",
	"currentItem_1/2": "Ляво",
	"currentItem_2/2": "Дясно",
	dark: "Тъмен режим",
	digitizedView: "Цифровизиран преглед",
	dismiss: "Отхвърляне",
	displayNoAnnotations: "Изчистване на маркирането",
	downloadExport: "Експорт на работното пространство",
	downloadExportWorkspace: "Експорт на работното пространство",
	elastic: "Еластичен",
	elasticDescription: "Премествайте и оразмерявайте прозорците свободно в неограничено работно пространство. Прозорците могат да се застъпват.",
	emptyResourceList: "Списъкът с ресурси е празен",
	error: "Грешка",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Възникна грешка",
	exitFullScreen: "Изход от цял екран",
	expandSection: "Разширяване на секция \"{{section}}\"",
	expandSidePanel: "разширяване на страничния панел",
	exportCopied: "Конфигурацията на работното пространство е копирана в клипборда",
	fetchManifest: "Добавяне",
	fullScreen: "Цял екран",
	gallery: "Галерия",
	hideZoomControls: "Скриване на контролите за мащабиране",
	highlightAllAnnotations: "Маркиране на всичко",
	iiif_homepage: "За този ресурс",
	iiif_manifest: "IIIF манифест",
	iiif_related: "Свързано",
	iiif_renderings: "Алтернативни формати",
	iiif_seeAlso: "Вижте също",
	import: "Импорт",
	importWorkspace: "Импорт на работно пространство",
	importWorkspaceHint: "Поставете Mirador 4 конфигурация за импорт",
	item: "Елемент: {{label}}",
	itemList: "Списък с елементи",
	jsError: "Технически детайли",
	jsStack: "{{ stack }}",
	language: "Език",
	layer_hide: "Скриване на слой",
	layer_move: "Преместване на слой",
	layer_opacity: "Прозрачност на слой",
	layer_show: "Показване на слой",
	layers: "Слоеве",
	light: "Светъл режим",
	links: "Връзки",
	listAllOpenWindows: "Към прозорец",
	login: "Вход",
	logout: "Изход",
	manifestError: "Ресурсът не може да бъде добавен:",
	maximizeWindow: "Увеличаване на прозореца",
	minimizeWindow: "Минимизиране на прозореца",
	mirador: "Mirador",
	miradorResources: "Mirador ресурси",
	miradorViewer: "Mirador viewer",
	more: "още...",
	moreResults: "Още резултати",
	mosaic: "Мозайка",
	mosaicDescription: "Премествайте и оразмерявайте прозорците помежду им в рамките на видимата рамка.",
	moveCompanionWindowToBottom: "Преместване отдолу",
	moveCompanionWindowToRight: "Преместване вдясно",
	multipartCollection: "Колекция от много части",
	nextCanvas: "Следващ елемент",
	noItemSelected: "Не е избран елемент",
	numItems: "{{number}} елемент",
	numItems_plural: "{{number}} елемента",
	off: "Изключено",
	openCompanionWindow_annotations: "Анотации",
	openCompanionWindow_attribution: "Права",
	openCompanionWindow_canvas: "Индекс",
	openCompanionWindow_info: "Информация",
	openCompanionWindow_layers: "Слоеве",
	openCompanionWindow_search: "Търсене",
	openInCompanionWindow: "Отваряне в отделен панел",
	openWindows: "Текущо отворени прозорци",
	pagination: "{{current}} от {{total}}",
	position: "Позиция",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Предишен елемент",
	related: "Свързано",
	resource: "Ресурс",
	retry: "Опитайте отново",
	right: "Дясно",
	rights: "Лиценз",
	scroll: "Скрол",
	searchInputLabel: "термини за търсене",
	searchNextResult: "Следващ резултат",
	searchNoResults: "Не са намерени резултати",
	searchPreviousResult: "Предишен резултат",
	searchResultsRemaining: "{{numLeft}} оставащи",
	searchSubmitAria: "Търси",
	searchTitle: "Търсене",
	selectWorkspaceMenu: "Посочете тип работно пространство",
	showCollection: "Показване на колекция",
	showingNumAnnotations: "Показване на {{number}} анотация",
	showingNumAnnotations_plural: "Показване на {{number}} анотации",
	showZoomControls: "Показване на контролите за мащабиране",
	sidebarPanelsNavigation: "Навигация на страничните панели",
	single: "Единичен",
	startHere: "Започнете оттук",
	suggestSearch: "Търсене в този документ за \"{{ query }}\"",
	tableOfContentsList: "Съдържание",
	theme: "Тема",
	thumbnailList: "Списък с представителни изображения",
	thumbnailNavigation: "Представителни изображения",
	thumbnails: "Представителни изображения",
	toggleWindowSideBar: "Превключване на страничния панел",
	totalCollections: "{{count}} колекция",
	totalCollections_plural: "{{count}} колекции",
	totalManifests: "{{count}} манифест",
	totalManifests_plural: "{{count}} манифеста",
	tryAgain: "Опитайте отново",
	untitled: "[Неозаглавено]",
	view: "Изглед",
	viewWorkspaceConfiguration: "Преглед на конфигурацията на работното пространство",
	welcome: "Добре дошли в Mirador",
	window: "Прозорец: {{label}}",
	windowMenu: "Изгледи на прозорците и на елементите",
	windowNavigation: "Навигация на прозорците",
	windowPluginButtons: "Настройки",
	windowPluginMenu: "Настройки на прозорците",
	workspace: "Работно пространство",
	workspaceFullScreen: "Цял екран",
	workspaceMenu: "Настройки на работното пространство",
	workspaceNavigation: "Навигация на работното пространство",
	workspaceOptions: "Опции за работното пространство",
	workspaceSelectionTitle: "Изберете тип на работно пространство",
	zoomIn: "Увеличаване",
	zoomOut: "Намаляване",
	zoomReset: "Нулиране"
} }, _M = { translation: {
	aboutMirador: "Om Projekt Mirador",
	aboutThisItem: "Om dette objektet",
	addedFromUrl: "(Lagt til fra URL)",
	addManifestUrl: "Nettadresse til samling eller manifest",
	addManifestUrlHelp: "URL til en IIIF-ressurs",
	addResource: "Legg til ressurs",
	"annotationCanvasLabel_1/1": "Objekt: [{{label}}]",
	"annotationCanvasLabel_1/2": "Venstre: [{{label}}]",
	"annotationCanvasLabel_2/2": "Høyre: [{{label}}]",
	annotations: "Annoteringer",
	attribution: "Tilskrivelse",
	attributionTitle: "Rettigheter",
	authenticationFailed: "Autentiseringen feilet.",
	authenticationRequired: "Autentisering kreves for full tilgang",
	backToResults: "Tilbake til resultat",
	book: "Bok",
	bottom: "Nederst",
	cancel: "Avbryt",
	canvasIndex: "Index",
	changeTheme: "Skift tema",
	clearSearch: "Fjern søket",
	close: "Lukk",
	closeAddResourceForm: "Lukk skjemaet",
	closeAddResourceMenu: "Lukk ressurslisten",
	closeCompanionWindow: "Lukk panelet",
	closeWindow: "Lukk vinduet",
	collapseSection: "Lukk seksjonen \"{{section}}\"",
	collapseSidePanel: "Lukk sidemenyen",
	collection: "Samling",
	continue: "Fortsett",
	copy: "Kopiere",
	currentItem: "Valgt objekt",
	"currentItem_1/1": "Valgt objekt",
	"currentItem_1/2": "Venstre",
	"currentItem_2/2": "Høyre",
	dark: "Mørkt tema",
	digitizedView: "Digitalisert visning",
	dismiss: "Lukk",
	displayNoAnnotations: "Avmarkér alle",
	downloadExport: "Eksportér arbeidsområde",
	downloadExportWorkspace: "Eksportér arbeidsområde",
	elastic: "Elastisk",
	elasticDescription: "Flytt og endre størrelsen på vinduet fritt i et ubegrenset arbeidsområde. Vindu kan overlappe.",
	emptyResourceList: "Din resursliste er tom",
	error: "Error",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Et problem oppstod",
	exitFullScreen: "Forlat fullskjermsvisning",
	expandSection: "Ekspandér seksjonen \"{{section}}\"",
	expandSidePanel: "Ekspandér sidemenyen",
	exportCopied: "Konfiguration av arbeidsområdet ble kopiert til din utklippstavle",
	fetchManifest: "Legg til",
	fullScreen: "Fullskjermsvisning",
	gallery: "Galleri",
	hideZoomControls: "Skjul zoomkontroll",
	highlightAllAnnotations: "Markér alle",
	iiif_homepage: "Om denne ressursen",
	iiif_manifest: "IIIF manifest",
	iiif_renderings: "Alternativt format",
	iiif_seeAlso: "Se også",
	import: "Importér",
	importWorkspace: "Importér arbeidsområde",
	importWorkspaceHint: "Lim inn en Mirador 4 konfigurasjon for import",
	item: "Objekt: {{label}}",
	itemList: "Objektliste",
	jsError: "Tekniske detaljer",
	jsStack: "{{ stack }}",
	language: "Språk",
	layer_hide: "Skjul lag",
	layer_move: "Flytt lag",
	layer_opacity: "Lag-gjennomsiktighet",
	layer_show: "Vis lag",
	layers: "Lag",
	light: "Lyst tema",
	links: "Lenker",
	listAllOpenWindows: "Gå til vindu",
	login: "Logg inn",
	logout: "Logg ut",
	manifestError: "Ressursen kan ikke legges til:",
	maximizeWindow: "Maksimér vinduet",
	minimizeWindow: "Minimér vinduet",
	mirador: "Mirador",
	miradorResources: "Miradorressurser",
	miradorViewer: "Mirador bildeviser",
	more: "mer...",
	moreResults: "Flere resultat",
	mosaic: "Mosaik",
	mosaicDescription: "Flytt og endre størrelse på vinduet i relasjon til hverandre, innenfor den synlige rammen.",
	moveCompanionWindowToBottom: "Flytt til bunnen",
	moveCompanionWindowToRight: "Flytt til høyre",
	nextCanvas: "Neste objekt",
	noItemSelected: "Ingen valgte objekt",
	numItems_one: "{{number}} objekt",
	numItems_other: "{{number}} objekter",
	off: "Av",
	openCompanionWindow_annotations: "Annoteringer",
	openCompanionWindow_attribution: "Rettigheter",
	openCompanionWindow_canvas: "Indeks",
	openCompanionWindow_info: "Informasjon",
	openCompanionWindow_layers: "Lag",
	openCompanionWindow_search: "Søk",
	openInCompanionWindow: "Åpne i eget panel",
	openWindows: "Åpne vindu",
	pagination: "{{current}} av {{total}}",
	position: "Posisjon",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Forrige objekt",
	related: "Relatert",
	resource: "Ressurs",
	retry: "Forsøk igjen",
	right: "Til høyre",
	rights: "Lisens",
	scroll: "Bla",
	searchInputLabel: "Søkeord",
	searchNextResult: "Neste resultat",
	searchNoResults: "Ingen treff",
	searchPreviousResult: "Forrige resultat",
	searchResultsRemaining: "{{numLeft}} igjen",
	searchSubmitAria: "Søk",
	searchTitle: "Søk",
	selectWorkspaceMenu: "Velg arbeidsområde-type",
	showCollection: "Vis samling",
	showingNumAnnotations_one: "Vis {{number}} annotasjon",
	showingNumAnnotations_other: "Vis {{number}} annotasjoner",
	showZoomControls: "Vis zoomkontroll",
	sidebarPanelsNavigation: "Sidemeny-panel navigering",
	single: "En og en",
	startHere: "Start her",
	suggestSearch: "Søk etter \"{{ query }}\" i dette dokument",
	tableOfContentsList: "Innholdsfortegnelse",
	theme: "Tema",
	thumbnailList: "Miniatyrliste",
	thumbnailNavigation: "Miniatyrer",
	thumbnails: "Miniatyrer",
	toggleWindowSideBar: "Vis/skjul sidemenyen",
	totalCollections_one: "{{count}} samling",
	totalCollections_other: "{{count}} samlinger",
	totalManifests_one: "{{count}} manifest",
	totalManifests_other: "{{count}} manifester",
	tryAgain: "Forsøk igjen",
	untitled: "[uten tittel]",
	view: "Visning",
	viewWorkspaceConfiguration: "Vis konfigurasjon av arbeidsområde.",
	welcome: "Velkommen til Mirador",
	window: "Vindu: {{label}}",
	windowMenu: "Vindusvisning & miniatyrvisning",
	windowNavigation: "Vindusnavigasjon",
	windowPluginButtons: "Innstillinger",
	windowPluginMenu: "Vindusinnstillinger",
	workspace: "Arbeidsområde",
	workspaceFullScreen: "Fullskjermsvisning",
	workspaceMenu: "Innstillinger for arbeidsområdet",
	workspaceNavigation: "Navigasjon i arbeidsområdet",
	workspaceOptions: "Flere valg for arbeidsområdet",
	workspaceSelectionTitle: "Velg arbeidsområde-type",
	zoomIn: "Zoom inn",
	zoomOut: "Zoom ut",
	zoomReset: "Tilbakestill zoom"
} }, vM = { translation: {
	aboutMirador: "A Mirador Project weboldala",
	aboutThisItem: "Elem adatai",
	addedFromUrl: "(URL-ként hozzáadva)",
	addManifestUrl: "Manifest URL",
	addManifestUrlHelp: "Az IIIF-dokumentum hivatkozása",
	addResource: "Hozzáadás",
	"annotationCanvasLabel_1/1": "Elem: [{{label}}]",
	"annotationCanvasLabel_1/2": "Balra: [{{label}}]",
	"annotationCanvasLabel_2/2": "Jobbra: [{{label}}]",
	annotations: "Megjegyzések",
	attribution: "Tulajdon",
	attributionTitle: "Szerzői jogok",
	authenticationFailed: "Sikertelen bejelentkezés",
	authenticationRequired: "A teljes eléréshez bejelentkezés szükséges",
	backToResults: "Vissza a találatokhoz",
	book: "Könyv",
	bottom: "Lent",
	cancel: "Mégsem",
	canvasIndex: "Index",
	changeTheme: "Téma módosítása",
	clearSearch: "törlés",
	close: "Bezárás",
	closeAddResourceForm: "Bezárás",
	closeAddResourceMenu: "Lista bezárása",
	closeCompanionWindow: "Panel bezárása",
	closeWindow: "Ablak bezárása",
	collapseSection: "\"{{section}}\" rész bezárása",
	collapseSidePanel: "Oldalsáv elrejtése",
	collection: "Gyűjtemény",
	continue: "Folytatás",
	copy: "Másolás",
	currentItem: "Aktuális elem",
	"currentItem_1/1": "Aktuális elem",
	"currentItem_1/2": "Balra",
	"currentItem_2/2": "Jobbra",
	dark: "Sötét téma",
	digitizedView: "Digitalizált nézet",
	dismiss: "Bezár",
	displayNoAnnotations: "Annotációk elrejtése",
	downloadExport: "Munkaterület exportálása",
	downloadExportWorkspace: "Munkaterület exportálása",
	elastic: "Elastic",
	elasticDescription: "Szabadon mozgathatja az ablakokat, akár fedhetik is egymást.",
	emptyResourceList: "A forráslista üres",
	error: "Hiba",
	errorDialogConfirm: "OK",
	errorDialogTitle: "Hiba történt",
	exitFullScreen: "Teljes képernyő bezárása",
	expandSection: "\"{{section}}\" rész kinyitása",
	expandSidePanel: "Oldalsáv kinyitása",
	exportCopied: "Munkaterület beállításai vágólapra másolva",
	fetchManifest: "Hozzáadás",
	fullScreen: "Teljes képernyő",
	gallery: "Galéria",
	hideZoomControls: "Zoom eszközök elrejtése",
	highlightAllAnnotations: "Annotációk megjelenítése",
	iiif_homepage: "Dokumentum adatai",
	iiif_manifest: "IIIF manifest",
	iiif_related: "Kapcsolódó",
	iiif_renderings: "Más formátumok",
	iiif_seeAlso: "Lásd még",
	import: "Importálás",
	importWorkspace: "Munkaterület importálása",
	importWorkspaceHint: "Illesszen be egy Mirador 4 konfigurációt",
	item: "Elem: {{label}}",
	itemList: "Tartalomjegyzék",
	jsError: "Technikai adatok",
	jsStack: "{{ stack }}",
	language: "Nyelv",
	layer_hide: "Réteg elrejtése",
	layer_move: "Réteg mozgatása",
	layer_moveToBackground: "Réteg mozgatása hátra",
	layer_moveToFront: "Réteg mozgatása előre",
	layer_opacity: "Réteg átlátszósága",
	layer_show: "Réteg megjelenítése",
	layers: "Rétegek",
	light: "Világos téma",
	links: "Linkek",
	listAllOpenWindows: "Ablakok",
	login: "Bejelentkezés",
	logout: "Kijelentkezés",
	manifestError: "Nem sikerült a hozzáadás:",
	maximizeWindow: "Teljes méretű ablak",
	minimizeWindow: "Előző méret",
	mirador: "Mirador",
	miradorResources: "Mirador dokumentumok",
	miradorViewer: "Mirador viewer",
	more: "több...",
	moreResults: "További találatok",
	mosaic: "Mozaik",
	mosaicDescription: "Ablakok mozgatása és átméretezése megadott területen.",
	moveCompanionWindowToBottom: "Mozgatás lefelé",
	moveCompanionWindowToRight: "Mozgatás jobbra",
	multipartCollection: "Összetett gyűjtemény",
	nextCanvas: "Következő",
	noItemSelected: "Nincs kiválasztott elem",
	numItems_one: "{{number}} elem",
	numItems_other: "{{number}} elem",
	off: "Nincs",
	openCompanionWindow_annotations: "Megjegyzések",
	openCompanionWindow_attribution: "Szerzői jogok",
	openCompanionWindow_canvas: "Tartalomjegyzék",
	openCompanionWindow_info: "Információ",
	openCompanionWindow_layers: "Rétegek",
	openCompanionWindow_search: "Keresés",
	openInCompanionWindow: "Megnyitás új panelen",
	openWindows: "Megnyitott ablakok",
	pagination: "{{current}} / {{total}}",
	position: "Pozíció",
	previewWindowTitle: "{{title}}",
	previousCanvas: "Előző",
	related: "Kapcsolódó",
	resource: "Adatok",
	retry: "Űjra",
	right: "Jobbra",
	rights: "Licensz",
	scroll: "Görgetés",
	searchInputLabel: "kereső szavak",
	searchNextResult: "Következő találat",
	searchNoResults: "Nincs találat",
	searchPreviousResult: "Előző találat",
	searchResultsRemaining: "{{numLeft}} van hátra",
	searchSubmitAria: "Keresés",
	searchTitle: "Keresés",
	selectWorkspaceMenu: "Munkaterület típusának kiválasztása",
	showCollection: "Gyűjtemény megjelenítése",
	showingNumAnnotations_one: "{{number}} megjegyzés megjelenítve",
	showingNumAnnotations_other: "{{number}} megjegyzés megjelenítve",
	showZoomControls: "Zoom eszközök megjelenítése",
	sidebarPanelsNavigation: "Oldalsáv navigáció",
	single: "Egyoldalas",
	startHere: "Hozzáadás",
	suggestSearch: "Keresés: \"{{ query }}\"",
	tableOfContentsList: "Tartalomjegyzék",
	theme: "Téma",
	thumbnailList: "Előnézeti képek listája",
	thumbnailNavigation: "Előnézeti képek",
	thumbnails: "Előnézeti képek",
	toggleWindowSideBar: "Oldalsáv ki/bekapcsolása",
	totalCollections_one: "{{count}} gyűjtemény",
	totalCollections_other: "{{count}} gyűjtemény",
	totalManifests_one: "{{count}} manifest",
	totalManifests_other: "{{count}} manifest",
	tryAgain: "Próbálja újra",
	untitled: "[Névtelen]",
	view: "Megtekintés",
	viewWorkspaceConfiguration: "Munkaterület beállítások",
	welcome: "Üdvözli a Mirador",
	window: "Ablak: {{label}}",
	windowMenu: "Megjelenítési mód & előnézet",
	windowNavigation: "Ablakok kezelése",
	windowPluginButtons: "Beállítások",
	windowPluginMenu: "További lehetőségek",
	workspace: "Munkaterület",
	workspaceFullScreen: "Teljes képernyő",
	workspaceMenu: "Munkaterület beállítások",
	workspaceNavigation: "Workspace navigation",
	workspaceOptions: "Munkaterület lehetőségek",
	workspaceSelectionTitle: "Munkaterület típusa",
	zoomIn: "Nagyítás",
	zoomOut: "Kicsinyítés",
	zoomReset: "Képméret ablakhoz igazítása"
} }, yM = { translation: /* @__PURE__ */ JSON.parse("{\"aboutMirador\":\"மிரடோர்  திட்டம் பற்றி\",\"aboutThisItem\":\"இந்த உருப்படியைப் பற்றி\",\"addedFromUrl\":\"(உரலியிலிருந்து சேர்க்கப்பட்டது)\",\"addManifestUrl\":\"வள இருப்பிடம்\",\"addManifestUrlHelp\":\"ஒரு IIIF வளத்தின் உரலி\",\"addResource\":\"வளத்தைச் சேர்க்கவும்\",\"annotationCanvasLabel_1/1\":\"உருப்படி: [{{label}}]\",\"annotationCanvasLabel_1/2\":\"இடது: [{{label}}]\",\"annotationCanvasLabel_2/2\":\"வலது: [{{label}}]\",\"annotations\":\"குறிப்புரைகள்\",\"attribution\":\"பண்புக்கூறு\",\"attributionTitle\":\"உரிமைகள்\",\"authenticationFailed\":\"அடையாளச் சரிபார்ப்பு தோல்வியடைந்தது\",\"authenticationRequired\":\"முழு அணுகலுக்கு அடையாளச் சரிபார்ப்பு அவசியம்\",\"backToResults\":\"முடிவுகளுக்குத் திரும்பு\",\"book\":\"நூல்\",\"bottom\":\"கீழ்\",\"cancel\":\"நீக்குக\",\"canvasIndex\":\"சுட்டெண்\",\"changeTheme\":\"கருப்பொருளை மாற்றவும்\",\"clearSearch\":\"நீக்குக\",\"close\":\"மூடுக\",\"closeAddResourceForm\":\"படிவத்தை மூடுக\",\"closeAddResourceMenu\":\"வளங்கள் பட்டியலை மூடுக\",\"closeCompanionWindow\":\"பலகத்தை  மூடுக\",\"closeWindow\":\"சாளரத்தை மூடுக\",\"collapseSection\":\"\\\"{{section}}\\\" பகுதியைச் சுருக்குக\",\"collapseSidePanel\":\"பக்கப்பட்டையைச் சுருக்குக\",\"collection\":\"சேகரம்\",\"continue\":\"தொடரவும்\",\"copy\":\"நகல்\",\"currentItem\":\"தற்போதைய உருப்படி\",\"currentItem_1/1\":\"தற்போதைய உருப்படி\",\"currentItem_1/2\":\"இடது\",\"currentItem_2/2\":\"வலது\",\"dark\":\"அடர் கருப்பொருள்\",\"digitizedView\":\"எண்ணிம காட்சி\",\"dismiss\":\"நிராகரிக்குக\",\"displayNoAnnotations\":\"முன்னிறுத்தல் இல்லை\",\"downloadExport\":\"பணித்தளத்தை தரவிறக்கவும்\",\"downloadExportWorkspace\":\"பணித்தளத்தை தரவிறக்கவும்\",\"elastic\":\"மீள்ம\",\"elasticDescription\":\"வரம்பற்ற பணித்தளத்தில் சாளரங்களை சுதந்திரமாக நகர்த்த முடியும், அளவையும் மாற்றலாம். சாளரங்கள் ஒன்றின் மேல் ஒன்று வரலாம்.\",\"emptyResourceList\":\"உங்கள் வளப் பட்டியல் காலியாக உள்ளது\",\"error\":\"தவறு\",\"errorDialogConfirm\":\"சரி\",\"errorDialogTitle\":\"ஒரு தவறு ஏற்பட்டுள்ளது\",\"exitFullScreen\":\"முழுத்திரையிலிருந்து வெளியேறவும்\",\"expandSection\":\"\\\"{{section}}\\\" பகுதியை விரிவாக்குக\",\"expandSidePanel\":\"பக்கப்பட்டையை விரிவாக்குக\",\"exportCopied\":\"பணித்தள அமைப்பு உங்கள் நகல்நினைவியில் நகலெடுக்கப்பட்டது.\",\"fetchManifest\":\"சேர்க்க\",\"fullScreen\":\"முழுத்திரை\",\"gallery\":\"படத்தொகுப்பு\",\"hideZoomControls\":\"பெரிதாக்குதல் கட்டுப்பாடுகளை மறைக்கவும்\",\"highlightAllAnnotations\":\"முன்னிறுத்தல்: அனைத்தும்\",\"iiif_homepage\":\"இந்த வளம் பற்றி\",\"iiif_manifest\":\"IIIF விபரக் கோப்பு\",\"iiif_related\":\"தொடர்புடையவை\",\"iiif_renderings\":\"மாற்று வடிவங்கள்\",\"iiif_seeAlso\":\"மேலும் காண்க\",\"imageFailedToLoad\":\"படத்தை பதிவேற்றுவதில் சிக்கல். விவரங்களுக்கு முனையத்தைப் பார்க்கவும்\",\"import\":\"தரவிறக்கம்\",\"importWorkspace\":\"பணித்தள தரவிறக்கம்\",\"importWorkspaceHint\":\"தரவிறக்கவேண்டிய மிரடோர் 4 பணித்தள அமைப்பை இங்கே ஒட்டவும்\",\"item\":\"உருப்படி: {{label}}\",\"itemList\":\"உருப்படி பட்டியல்\",\"jsError\":\"தொழில்நுட்ப விவரங்கள்\",\"jsStack\":\"{{ stack }}\",\"language\":\"மொழி\",\"layer_hide\":\"அடுக்கை மறைக்கவும்\",\"layer_move\":\"அடுக்கை நகர்த்தவும்\",\"layer_moveToBackground\":\"அடுக்கை பின்னணிக்கு நகர்த்தவும்\",\"layer_moveToFront\":\"அடுக்கை முன்னணிக்கு நகர்த்தவும்\",\"layer_opacity\":\"அடுக்கின் தெளிவின்மை\",\"layer_show\":\"அடுக்கை காட்டவும்\",\"layers\":\"அடுக்குகள்\",\"light\":\"மென் கருப்பொருள்\",\"links\":\"இணைப்புகள்\",\"listAllOpenWindows\":\"சாளரத்திற்குச் செல்லவும்\",\"login\":\"புகுபதிகை\",\"logout\":\"விடுபதிகை\",\"manifestError\":\"வளத்தைச் சேர்க்க முடியாது:\",\"maximizeWindow\":\"சாளரத்தை பெரிதாக்கவும்\",\"minimizeWindow\":\"சாளரத்தைச் சிறிதாக்கவும்\",\"mirador\":\"மிரடோர்\",\"miradorResources\":\"மிரடோர் வளங்கள்\",\"miradorViewer\":\"மிரடோர் பார்வையாளர்\",\"more\":\"மேலும்...\",\"moreResults\":\"மேலும் முடிவுகள்\",\"mosaic\":\"மொசைக்\",\"mosaicDescription\":\"காணப்படும் சாளர எல்லைக்குள், சாளரங்களை ஒன்றையொன்று சார்ந்து நகர்த்தியும் அளவை மாற்றியும் கொள்ளலாம்.\",\"moveCompanionWindowToBottom\":\"கீழே நகர்த்தவும்\",\"moveCompanionWindowToRight\":\"வலதுபுறம் நகர்த்தவும்\",\"multipartCollection\":\"பல்பகுதி சேகரம்\",\"nextCanvas\":\"அடுத்த உருப்படி\",\"noItemSelected\":\"எந்த உருப்படியும் தேர்ந்தெடுக்கப்படவில்லை\",\"numItems_one\":\"{{number}} உருப்படி\",\"numItems_other\":\"{{number}} உருப்படிகள்\",\"off\":\"முடக்குக\",\"openCompanionWindow_annotations\":\"குறிப்புரைகள்\",\"openCompanionWindow_attribution\":\"உரிமைகள்\",\"openCompanionWindow_canvas\":\"சுட்டெண்\",\"openCompanionWindow_info\":\"தகவல்\",\"openCompanionWindow_layers\":\"அடுக்குகள்\",\"openCompanionWindow_search\":\"தேடல்\",\"openInCompanionWindow\":\"தனி பலகத்தில் திறக்கவும்\",\"openWindows\":\"தற்போது திறந்திருக்கும் சாளரங்கள்\",\"pagination\":\"{{current}} இல் {{total}}\",\"position\":\"நிலை\",\"previewWindowTitle\":\"{{title}}\",\"previousCanvas\":\"முந்தைய உருப்படி\",\"related\":\"தொடர்புடைய\",\"resource\":\"வளம்\",\"retry\":\"மீண்டும் முயற்சிக்கவும்\",\"right\":\"சரி\",\"rights\":\"உரிமம்\",\"scroll\":\"உருட்டவும்\",\"searchInputLabel\":\"தேடல் சொற்கள்\",\"searchNextResult\":\"அடுத்த முடிவு\",\"searchNoResults\":\"முடிவுகள் எதுவும் காணப்படவில்லை\",\"searchPreviousResult\":\"முந்தைய முடிவு\",\"searchResultsRemaining\":\"{{numLeft}} மீதமுள்ளன\",\"searchSubmitAria\":\"தேடலைச் சமர்ப்பிக்கவும்\",\"searchTitle\":\"தேடல்\",\"selectWorkspaceMenu\":\"பணித்தள வகையைத் தேர்ந்தெடுக்கவும்\",\"showCollection\":\"சேகரத்தை காட்டவும்\",\"showingNumAnnotations_one\":\"{{number}} குறிப்புரை காட்டப்படுகிறது\",\"showingNumAnnotations_other\":\"{{number}} குறிப்புரைகள் காட்டப்படுகின்றன\",\"showZoomControls\":\"பெரிதாக்குதல் கட்டுப்பாடுகளைக் காட்டு\",\"sidebarPanelsNavigation\":\"பக்கப்பட்டை பலகங்களை வழிசெலுத்தல்\",\"single\":\"தனி\",\"startHere\":\"இங்கிருந்து தொடங்குங்கள்\",\"suggestSearch\":\"இந்த ஆவணத்தில் \\\"{{ query }}\\\" என்பதைத் தேடவும்\",\"tableOfContentsList\":\"பொருளடக்கம்\",\"theme\":\"கருப்பொருள்\",\"thumbnailList\":\"சிறுபடப் பட்டியல்\",\"thumbnailNavigation\":\"சிறுபடங்கள்\",\"thumbnails\":\"சிறுபடங்கள்\",\"toggleWindowSideBar\":\"பக்கப்பட்டையை மாற்றவும்\",\"totalCollections_one\":\"{{count}} சேகரம்\",\"totalCollections_other\":\"{{count}} சேகரங்கள்\",\"totalManifests_one\":\"{{count}} விபரக் கோப்பு\",\"totalManifests_other\":\"{{count}} விபரக் கோப்புக்கள்\",\"tryAgain\":\"மீண்டும் முயற்சிக்கவும்\",\"untitled\":\"[Untitled]\",\"view\":\"பார்வை\",\"viewWorkspaceConfiguration\":\"பணித்தள உள்ளமைவைக் காண்க\",\"welcome\":\"மிரடோருக்கு வரவேற்கிறோம்\",\"window\":\"சாளரம்: {{label}}\",\"windowMenu\":\"சாளரக் காட்சிகள் மற்றும் சிறுபடக் காட்சி\",\"windowNavigation\":\"சாளர வழிசெலுத்தல்\",\"windowPluginButtons\":\"தேர்வுகள்\",\"windowPluginMenu\":\"சாளர தேர்வுகள்\",\"workspace\":\"பணித்தளம்\",\"workspaceFullScreen\":\"முழுத்திரை\",\"workspaceMenu\":\"பணித்தள அமைப்புகள்\",\"workspaceNavigation\":\"பணித்தள வழிசெலுத்தல்\",\"workspaceOptions\":\"பணித்தள தேர்வுகள்\",\"workspaceSelectionTitle\":\"பணித்தள வகையைத் தேர்ந்தெடுக்கவும்\",\"zoomIn\":\"பெரிதாக்குக\",\"zoomOut\":\"சிறிதாக்குக\",\"zoomReset\":\"பெரிதாக்கத்தை மீளமைக்க\"}") };
//#endregion
//#region src/i18n.js
function bM(e = {}) {
	let t = {
		ar: Zj,
		bg: gM,
		de: Qj,
		en: $j,
		et: eM,
		fa: tM,
		fr: iM,
		hr: aM,
		hu: vM,
		it: dM,
		ja: oM,
		kr: sM,
		lt: mM,
		"nb-NO": _M,
		nl: cM,
		pl: lM,
		"pt-BR": uM,
		sr: fM,
		sv: pM,
		vi: hM,
		"zh-CN": nM,
		"zh-TW": rM,
		ta: yM
	}, n = Xj();
	return n.use(Ui).init({
		fallbackLng: "en",
		interpolation: { escapeValue: !1 },
		lng: "en",
		resources: t,
		...e
	}), n;
}
//#endregion
//#region src/contexts/FailedImageProvider.jsx
var xM = "data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"600\"%3E%3Crect width=\"400\" height=\"600\" fill=\"%23f5f5f5\"/%3E%3Cpath d=\"M 200 240 L 254 354 L 146 354 Z M 200 228 L 128 372 L 272 372 Z M 204.5 336 L 195.5 336 L 195.5 345 L 204.5 345 Z M 204.5 309 L 195.5 309 L 195.5 327 L 204.5 327 Z\" fill=\"%231967d2\"/%3E%3C/svg%3E";
function SM({ children: e }) {
	let t = pe.fallbackImage || xM, [n, r] = zi(/* @__PURE__ */ new Set()), i = I((e) => {
		r((t) => new Set(t).add(e));
	}, []);
	return /* @__PURE__ */ z(pr.Provider, {
		value: {
			failedImages: n,
			fallbackImage: t,
			notifyFailure: i
		},
		children: e
	});
}
SM.propTypes = { children: W.default.node.isRequired };
//#endregion
//#region src/lib/FullScreenHandle.jsx
function CM() {
	let [e, t] = zi(!1), n = R(), r = () => {
		t(document.fullscreenElement === n.current);
	};
	L(() => (document.addEventListener("fullscreenchange", r), () => document.removeEventListener("fullscreenchange", r)), []);
	let i = () => n.current.requestFullscreen(), a = I(() => document.fullscreenElement ? document.exitFullscreen().then(() => i()) : i(), []), o = I(() => document.fullscreenElement === n.current ? document.exitFullscreen() : Promise.resolve(), []);
	return Li(() => ({
		active: e,
		enter: a,
		exit: o,
		fullscreenRef: n
	}), [
		e,
		a,
		o,
		n
	]);
}
var wM = ({ handle: e, onChange: t = void 0, children: n = null, className: r = "" }) => {
	let i = [
		"fullscreen",
		r,
		e.active ? "fullscreen-enabled" : ""
	].filter(Boolean);
	L(() => {
		t && t(e.active, e);
	}, [
		e,
		e.active,
		t
	]);
	let a = e.active ? {
		height: "100%",
		width: "100%"
	} : {};
	return /* @__PURE__ */ z("div", {
		ref: e.fullscreenRef,
		className: i.join(" "),
		style: a,
		children: n
	});
};
wM.propTypes = {
	children: W.default.node,
	className: W.default.string,
	handle: W.default.object.isRequired,
	onChange: W.default.func
};
//#endregion
//#region src/contexts/FullScreenContext.js
var TM = Ei(), EM = ({ dndManager: e = void 0, children: t }) => e === !1 ? t : e === void 0 ? /* @__PURE__ */ z(ME, {
	backend: HD,
	options: IO,
	children: t
}) : /* @__PURE__ */ z(Iw.Provider, {
	value: e,
	children: t
});
EM.propTypes = {
	children: W.default.node.isRequired,
	dndManager: W.default.oneOf([
		void 0,
		!1,
		W.default.object
	])
};
var DM = ({ children: e }) => {
	let t = CM();
	return /* @__PURE__ */ z(wM, {
		handle: t,
		children: /* @__PURE__ */ z(TM.Provider, {
			value: t,
			children: e
		})
	});
};
DM.propTypes = { children: W.default.node.isRequired };
var OM = ({ children: e, language: t, translations: n }) => {
	let [r] = zi(bM({ lng: t }));
	return L(() => {
		r && r.language !== t && r.changeLanguage(t);
	}, [r, t]), L(() => {
		Object.keys(n).forEach((e) => {
			r.addResourceBundle(e, "translation", n[e], !0, !0);
		});
	}, [r, n]), /* @__PURE__ */ z(Hi, {
		i18n: r,
		children: e
	});
};
OM.propTypes = {
	children: W.default.node.isRequired,
	language: W.default.string.isRequired,
	translations: W.default.object.isRequired
};
var kM = ej({
	key: "muirtl",
	stylisPlugins: [Rk, Vk]
}), AM = ej({ key: "mui" });
function jM({ children: e = null, language: t, theme: n, translations: r, dndManager: i = void 0 }) {
	return /* @__PURE__ */ z(DM, { children: /* @__PURE__ */ z(OM, {
		language: t,
		translations: r,
		children: /* @__PURE__ */ z($r.Provider, {
			value: t,
			children: /* @__PURE__ */ z(Ki, {
				injectFirst: !0,
				children: /* @__PURE__ */ z(La, {
					value: n.direction === "rtl" ? kM : AM,
					children: /* @__PURE__ */ z(qi, {
						theme: Yi(n),
						children: /* @__PURE__ */ z(EM, {
							dndManager: i,
							children: /* @__PURE__ */ z(SM, { children: e })
						})
					})
				})
			})
		})
	}) });
}
jM.propTypes = {
	children: W.default.node,
	dndManager: W.default.object,
	language: W.default.string.isRequired,
	theme: W.default.object.isRequired,
	translations: W.default.object.isRequired
};
var MM = i(O((e) => ({
	language: Gt(e).language,
	theme: Nn(e),
	translations: Gt(e).translations
})), A("AppProviders"))(jM), NM = ji(() => Promise.resolve().then(() => bQ));
function PM({ dndManager: e = void 0, plugins: t = [] }) {
	let n = Oi();
	return /* @__PURE__ */ z(Fw, {
		plugins: t,
		children: /* @__PURE__ */ z(MM, {
			dndManager: e,
			children: /* @__PURE__ */ z(oi.Provider, {
				value: n,
				children: /* @__PURE__ */ z(wi, {
					fallback: /* @__PURE__ */ z("div", {}),
					children: /* @__PURE__ */ z(NM, { areaRef: n })
				})
			})
		})
	});
}
PM.propTypes = {
	dndManager: W.default.object,
	plugins: W.default.array
};
//#endregion
//#region node_modules/lodash/isString.js
var FM = /* @__PURE__ */ D(((e, t) => {
	var n = ue(), r = x(), i = xe(), a = "[object String]";
	function o(e) {
		return typeof e == "string" || !r(e) && i(e) && n(e) == a;
	}
	t.exports = o;
})), IM = /* @__PURE__ */ D(((e, t) => {
	function n(e) {
		return e === void 0;
	}
	t.exports = n;
})), LM = /* @__PURE__ */ D(((e, t) => {
	function n(e) {
		return e === null;
	}
	t.exports = n;
})), RM = /* @__PURE__ */ D(((e, t) => {
	var n = It();
	function r(e, t) {
		return n(t, function(t) {
			return e[t];
		});
	}
	t.exports = r;
})), zM = /* @__PURE__ */ D(((e, t) => {
	var n = RM(), r = _n();
	function i(e) {
		return e == null ? [] : n(e, r(e));
	}
	t.exports = i;
})), BM = /* @__PURE__ */ k(FM(), 1), VM = /* @__PURE__ */ k(IM(), 1), HM = /* @__PURE__ */ k(LM(), 1), UM = /* @__PURE__ */ k(zM(), 1), WM = (e) => [
	GM,
	KM,
	qM,
	JM,
	YM,
	XM,
	ZM
].every((t) => t(e)), GM = (e) => (0, Jf.default)(e), KM = (e) => {
	let { name: t } = e;
	return (0, VM.default)(t) || (0, BM.default)(t);
}, qM = (e) => {
	let { mode: t, target: n } = e;
	return (0, VM.default)(t) ? (0, VM.default)(n) : (0, BM.default)(n);
}, JM = (e) => {
	let { mode: t } = e;
	return (0, VM.default)(t) || ["add", "wrap"].some((e) => e === t);
}, YM = (e) => {
	let { mapStateToProps: t } = e;
	return (0, VM.default)(t) || (0, HM.default)(t) || (0, Op.default)(t);
}, XM = (e) => {
	let { mapDispatchToProps: t } = e;
	return (0, VM.default)(t) || (0, HM.default)(t) || (0, Op.default)(t) || (0, Jf.default)(t);
}, ZM = (e) => {
	let { reducers: t } = e;
	return (0, VM.default)(t) || (0, Jf.default)(t) && (0, UM.default)(t).every(Op.default);
};
//#endregion
//#region src/extend/pluginPreprocessing.js
function QM(e) {
	let { validPlugins: t, invalidPlugins: n } = $M(e);
	return eN(n), t;
}
function $M(e) {
	let t = [], n = [];
	return e.forEach((e) => {
		Array.isArray(e) ? e.every((e) => WM(e)) ? n.push(...e) : t.push(...e) : WM(e) ? n.push(e) : t.push(e);
	}), {
		invalidPlugins: t,
		validPlugins: n
	};
}
function eN(e) {
	e.forEach((e) => console.log(`Mirador: Plugin ${e.name} is not valid and was rejected.`));
}
function tN(e) {
	return e && e.reduce((e, t) => ({
		...e,
		...t.reducers
	}), {});
}
function nN(e) {
	return e && e.reduce((e, t) => (0, kp.default)(e, t.config || {}), {});
}
function rN(e) {
	return e && e.filter((e) => e.saga).map((e) => e.saga);
}
//#endregion
//#region node_modules/redux-thunk/dist/redux-thunk.mjs
function iN(e) {
	return ({ dispatch: t, getState: n }) => (r) => (i) => typeof i == "function" ? i(t, n, e) : r(i);
}
var aN = iN(), oN = function(e) {
	return "@@redux-saga/" + e;
}, sN = /*#__PURE__*/ oN("CANCEL_PROMISE"), cN = /*#__PURE__*/ oN("CHANNEL_END"), lN = /*#__PURE__*/ oN("IO"), uN = /*#__PURE__*/ oN("MATCH"), dN = /*#__PURE__*/ oN("MULTICAST"), fN = /*#__PURE__*/ oN("SAGA_ACTION"), pN = /*#__PURE__*/ oN("SELF_CANCELLATION"), mN = /*#__PURE__*/ oN("TASK"), hN = /*#__PURE__*/ oN("TASK_CANCEL"), gN = /*#__PURE__*/ oN("TERMINATE"), _N = /*#__PURE__*/ oN("LOCATION"), vN = function(e) {
	return e == null;
}, yN = function(e) {
	return e != null;
}, bN = function(e) {
	return typeof e == "function";
}, xN = function(e) {
	return typeof e == "string";
}, SN = Array.isArray, CN = function(e) {
	return e && bN(e.then);
}, wN = function(e) {
	return e && bN(e.next) && bN(e.throw);
}, TN = function(e) {
	return e && (xN(e) || ON(e) || bN(e) || SN(e) && e.every(TN));
}, EN = function(e) {
	return e && bN(e.take) && bN(e.close);
}, DN = function(e) {
	return bN(e) && e.hasOwnProperty("toString");
}, ON = function(e) {
	return !!e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype;
}, kN = function(e) {
	return EN(e) && e[dN];
}, AN = 2147483647;
function jN(e, t) {
	t === void 0 && (t = !0);
	var n, r = new Promise(function(r) {
		n = setTimeout(r, Math.min(AN, e), t);
	});
	return r[sN] = function() {
		clearTimeout(n);
	}, r;
}
//#endregion
//#region node_modules/@redux-saga/core/dist/io-dec07f91.esm.js
var MN = /*#__PURE__*/ function(e) {
	return function() {
		return e;
	};
}(!0), NN = function() {}, PN = function(e) {
	return e;
}, FN = function(e, t) {
	K(e, t), Object.getOwnPropertySymbols && Object.getOwnPropertySymbols(t).forEach(function(n) {
		e[n] = t[n];
	});
}, IN = function(e, t) {
	var n;
	return (n = []).concat.apply(n, t.map(e));
};
function LN(e, t) {
	var n = e.indexOf(t);
	n >= 0 && e.splice(n, 1);
}
function RN(e) {
	var t = !1;
	return function() {
		t || (t = !0, e());
	};
}
var zN = function(e) {
	throw e;
}, BN = function(e) {
	return {
		value: e,
		done: !0
	};
};
function VN(e, t, n) {
	t === void 0 && (t = zN), n === void 0 && (n = "iterator");
	var r = {
		meta: { name: n },
		next: e,
		throw: t,
		return: BN,
		isSagaIterator: !0
	};
	return typeof Symbol < "u" && (r[Symbol.iterator] = function() {
		return r;
	}), r;
}
function HN(e, t) {
	var n = t.sagaStack;
	console.error(e), console.error(n);
}
var UN = function(e) {
	return Array.apply(null, Array(e));
}, WN = function(e) {
	return function(t) {
		return e(Object.defineProperty(t, fN, { value: !0 }));
	};
}, GN = function(e) {
	return e === gN;
}, KN = function(e) {
	return e === hN;
}, qN = function(e) {
	return GN(e) || KN(e);
};
function JN(e, t) {
	var n = Object.keys(e), r = n.length, i = 0, a, o = SN(e) ? UN(r) : {}, s = {};
	function c() {
		i === r && (a = !0, t(o));
	}
	return n.forEach(function(e) {
		var n = function(n, r) {
			a || (r || qN(n) ? (t.cancel(), t(n, r)) : (o[e] = n, i++, c()));
		};
		n.cancel = NN, s[e] = n;
	}), t.cancel = function() {
		a || (a = !0, n.forEach(function(e) {
			return s[e].cancel();
		}));
	}, s;
}
function YN(e) {
	return {
		name: e.name || "anonymous",
		location: XN(e)
	};
}
function XN(e) {
	return e[_N];
}
function ZN() {
	var e = [...arguments];
	return e.length === 0 ? function(e) {
		return e;
	} : e.length === 1 ? e[0] : e.reduce(function(e, t) {
		return function() {
			return e(t.apply(void 0, arguments));
		};
	});
}
var QN = "Channel's Buffer overflow!", $N = 1, eP = 3, tP = 4;
function nP(e, t) {
	e === void 0 && (e = 10);
	var n = Array(e), r = 0, i = 0, a = 0, o = function(t) {
		n[i] = t, i = (i + 1) % e, r++;
	}, s = function() {
		if (r != 0) {
			var t = n[a];
			return n[a] = null, r--, a = (a + 1) % e, t;
		}
	}, c = function() {
		for (var e = []; r;) e.push(s());
		return e;
	};
	return {
		isEmpty: function() {
			return r == 0;
		},
		put: function(s) {
			if (r < e) o(s);
			else {
				var l;
				switch (t) {
					case $N: throw Error(QN);
					case eP:
						n[i] = s, i = (i + 1) % e, a = i;
						break;
					case tP: l = 2 * e, n = c(), r = n.length, i = n.length, a = 0, n.length = l, e = l, o(s);
				}
			}
		},
		take: s,
		flush: c
	};
}
var rP = function(e) {
	return nP(e, tP);
}, iP = "TAKE", aP = "RACE", oP = "CALL", sP = "FORK", cP = "JOIN", lP = "CANCEL", uP = "SELECT", dP = "ACTION_CHANNEL", fP = "CANCELLED", pP = "FLUSH", mP = "GET_CONTEXT", hP = "SET_CONTEXT", gP = function(e, t) {
	var n;
	return n = {}, n[lN] = !0, n.combinator = !1, n.type = e, n.payload = t, n;
}, _P = function(e) {
	return gP(sP, K({}, e.payload, { detached: !0 }));
};
function vP(e, t) {
	if (e === void 0 && (e = "*"), TN(e)) return yN(t) && console.warn("take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types"), gP(iP, { pattern: e });
	if (kN(e) && yN(t) && TN(t)) return gP(iP, {
		channel: e,
		pattern: t
	});
	if (EN(e)) return yN(t) && console.warn("take(channel) takes one argument but two were provided. Second argument is ignored."), gP(iP, { channel: e });
}
function yP(e, t) {
	return vN(t) && (t = e, e = void 0), gP("PUT", {
		channel: e,
		action: t
	});
}
function bP(e) {
	var t = gP("ALL", e);
	return t.combinator = !0, t;
}
function xP(e, t) {
	var n = null, r;
	return bN(e) ? r = e : (SN(e) ? (n = e[0], r = e[1]) : (n = e.context, r = e.fn), n && xN(r) && bN(n[r]) && (r = n[r])), {
		context: n,
		fn: r,
		args: t
	};
}
function SP(e) {
	return gP(oP, xP(e, [...arguments].slice(1)));
}
function CP(e) {
	return gP(sP, xP(e, [...arguments].slice(1)));
}
function wP(e) {
	var t = [...arguments].slice(1);
	return _P(CP.apply(void 0, [e].concat(t)));
}
function TP(e) {
	e === void 0 && (e = PN);
	var t = [...arguments].slice(1);
	return gP(uP, {
		selector: e,
		args: t
	});
}
var EP = /*#__PURE__*/ SP.bind(null, jN);
//#endregion
//#region node_modules/@redux-saga/deferred/dist/redux-saga-deferred.esm.js
function DP() {
	var e = {};
	return e.promise = new Promise(function(t, n) {
		e.resolve = t, e.reject = n;
	}), e;
}
//#endregion
//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
function OP(e, t) {
	(t == null || t > e.length) && (t = e.length);
	for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
	return r;
}
//#endregion
//#region node_modules/@redux-saga/core/dist/redux-saga-core.esm.js
var kP = [], AP = 0;
function jP(e) {
	try {
		PP(), e();
	} finally {
		FP();
	}
}
function MP(e) {
	kP.push(e), AP || (PP(), IP());
}
function NP(e) {
	try {
		return PP(), e();
	} finally {
		IP();
	}
}
function PP() {
	AP++;
}
function FP() {
	AP--;
}
function IP() {
	FP();
	for (var e; !AP && (e = kP.shift()) !== void 0;) jP(e);
}
var LP = function(e) {
	return function(t) {
		return e.some(function(e) {
			return HP(e)(t);
		});
	};
}, RP = function(e) {
	return function(t) {
		return e(t);
	};
}, zP = function(e) {
	return function(t) {
		return t.type === String(e);
	};
}, BP = function(e) {
	return function(t) {
		return t.type === e;
	};
}, VP = function() {
	return MN;
};
function HP(e) {
	var t = e === "*" ? VP : xN(e) ? zP : SN(e) ? LP : DN(e) ? zP : bN(e) ? RP : ON(e) ? BP : null;
	if (t === null) throw Error("invalid pattern: " + e);
	return t(e);
}
var UP = { type: cN }, WP = function(e) {
	return e && e.type === cN;
};
function GP(e) {
	e === void 0 && (e = rP());
	var t = !1, n = [];
	function r(r) {
		if (!t) {
			if (n.length === 0) return e.put(r);
			n.shift()(r);
		}
	}
	function i(r) {
		t && e.isEmpty() ? r(UP) : e.isEmpty() ? (n.push(r), r.cancel = function() {
			LN(n, r);
		}) : r(e.take());
	}
	function a(n) {
		if (t && e.isEmpty()) {
			n(UP);
			return;
		}
		n(e.flush());
	}
	function o() {
		if (!t) {
			t = !0;
			var e = n;
			n = [];
			for (var r = 0, i = e.length; r < i; r++) {
				var a = e[r];
				a(UP);
			}
		}
	}
	return {
		take: i,
		put: r,
		flush: a,
		close: o
	};
}
function KP() {
	var e, t = !1, n = [], r = n, i = function() {
		r === n && (r = n.slice());
	}, a = function() {
		t = !0;
		var e = n = r;
		r = [], e.forEach(function(e) {
			e(UP);
		});
	};
	return e = {}, e[dN] = !0, e.put = function(e) {
		if (!t) {
			if (WP(e)) {
				a();
				return;
			}
			for (var i = n = r, o = 0, s = i.length; o < s; o++) {
				var c = i[o];
				c[uN](e) && (c.cancel(), c(e));
			}
		}
	}, e.take = function(e, n) {
		if (n === void 0 && (n = VP), t) {
			e(UP);
			return;
		}
		e[uN] = n, i(), r.push(e), e.cancel = RN(function() {
			i(), LN(r, e);
		});
	}, e.close = a, e;
}
function qP() {
	var e = KP(), t = e.put;
	return e.put = function(e) {
		if (e[fN]) {
			t(e);
			return;
		}
		MP(function() {
			t(e);
		});
	}, e;
}
var JP = 0, YP = 1, XP = 2, ZP = 3;
function QP(e, t) {
	var n = e[sN];
	bN(n) && (t.cancel = n), e.then(t, function(e) {
		t(e, !0);
	});
}
var $P = 0, eF = (function() {
	return ++$P;
}), tF;
function nF(e, t) {
	return e.isSagaIterator ? { name: e.meta.name } : YN(t);
}
function rF(e) {
	var t = e.context, n = e.fn, r = e.args;
	try {
		var i = n.apply(t, r);
		if (wN(i)) return i;
		var a = !1;
		return VN(function(e) {
			return a ? {
				value: e,
				done: !0
			} : (a = !0, {
				value: i,
				done: !CN(i)
			});
		});
	} catch (e) {
		return VN(function() {
			throw e;
		});
	}
}
function iF(e, t, n) {
	var r = t.channel, i = t.action, a = t.resolve;
	MP(function() {
		var t;
		try {
			t = (r ? r.put : e.dispatch)(i);
		} catch (e) {
			n(e, !0);
			return;
		}
		a && CN(t) ? QP(t, n) : n(t);
	});
}
function aF(e, t, n) {
	var r = t.channel, i = r === void 0 ? e.channel : r, a = t.pattern, o = t.maybe, s = function(e) {
		if (e instanceof Error) {
			n(e, !0);
			return;
		}
		if (WP(e) && !o) {
			n(gN);
			return;
		}
		n(e);
	};
	try {
		i.take(s, yN(a) ? HP(a) : null);
	} catch (e) {
		n(e, !0);
		return;
	}
	n.cancel = s.cancel;
}
function oF(e, t, n, r) {
	var i = t.context, a = t.fn, o = t.args, s = r.task;
	try {
		var c = a.apply(i, o);
		if (CN(c)) {
			QP(c, n);
			return;
		}
		if (wN(c)) {
			NF(e, c, s.context, $P, YN(a), !1, n);
			return;
		}
		n(c);
	} catch (e) {
		n(e, !0);
	}
}
function sF(e, t, n) {
	var r = t.context, i = t.fn, a = t.args;
	try {
		var o = function(e, t) {
			vN(e) ? n(t) : n(e, !0);
		};
		i.apply(r, a.concat(o)), o.cancel && (n.cancel = o.cancel);
	} catch (e) {
		n(e, !0);
	}
}
function cF(e, t, n, r) {
	var i = t.context, a = t.fn, o = t.args, s = t.detached, c = r.task, l = rF({
		context: i,
		fn: a,
		args: o
	}), u = nF(l, a);
	NP(function() {
		var t = NF(e, l, c.context, $P, u, s, void 0);
		s ? n(t) : t.isRunning() ? (c.queue.addTask(t), n(t)) : t.isAborted() ? c.queue.abort(t.error()) : n(t);
	});
}
function lF(e, t, n, r) {
	var i = r.task, a = function(e, t) {
		if (e.isRunning()) {
			var n = {
				task: i,
				cb: t
			};
			t.cancel = function() {
				e.isRunning() && LN(e.joiners, n);
			}, e.joiners.push(n);
		} else e.isAborted() ? t(e.error(), !0) : t(e.result());
	};
	if (SN(t)) {
		if (t.length === 0) {
			n([]);
			return;
		}
		var o = JN(t, n);
		t.forEach(function(e, t) {
			a(e, o[t]);
		});
	} else a(t, n);
}
function uF(e) {
	e.isRunning() && e.cancel();
}
function dF(e, t, n, r) {
	var i = r.task;
	t === pN ? uF(i) : SN(t) ? t.forEach(uF) : uF(t), n();
}
function fF(e, t, n, r) {
	var i = r.digestEffect, a = $P, o = Object.keys(t);
	if (o.length === 0) {
		n(SN(t) ? [] : {});
		return;
	}
	var s = JN(t, n);
	o.forEach(function(e) {
		i(t[e], a, s[e], e);
	});
}
function pF(e, t, n, r) {
	var i = r.digestEffect, a = $P, o = Object.keys(t), s = SN(t) ? UN(o.length) : {}, c = {}, l = !1;
	o.forEach(function(e) {
		var t = function(t, r) {
			l || (r || qN(t) ? (n.cancel(), n(t, r)) : (n.cancel(), l = !0, s[e] = t, n(s)));
		};
		t.cancel = NN, c[e] = t;
	}), n.cancel = function() {
		l || (l = !0, o.forEach(function(e) {
			return c[e].cancel();
		}));
	}, o.forEach(function(e) {
		l || i(t[e], a, c[e], e);
	});
}
function mF(e, t, n) {
	var r = t.selector, i = t.args;
	try {
		n(r.apply(void 0, [e.getState()].concat(i)));
	} catch (e) {
		n(e, !0);
	}
}
function hF(e, t, n) {
	var r = t.pattern, i = t.buffer, a = GP(i), o = HP(r), s = function(t) {
		WP(t) || e.channel.take(s, o), a.put(t);
	}, c = a.close;
	a.close = function() {
		s.cancel(), c();
	}, e.channel.take(s, o), n(a);
}
function gF(e, t, n, r) {
	var i = r.task;
	n(i.isCancelled());
}
function _F(e, t, n) {
	t.flush(n);
}
function vF(e, t, n, r) {
	var i = r.task;
	n(i.context[t]);
}
function yF(e, t, n, r) {
	var i = r.task;
	FN(i.context, t), n();
}
var bF = (tF = {}, tF[iP] = aF, tF.PUT = iF, tF.ALL = fF, tF[aP] = pF, tF[oP] = oF, tF.CPS = sF, tF[sP] = cF, tF[cP] = lF, tF[lP] = dF, tF[uP] = mF, tF[dP] = hF, tF[fP] = gF, tF[pP] = _F, tF[mP] = vF, tF[hP] = yF, tF);
function xF(e, t, n) {
	var r = [], i, a = !1;
	c(e);
	var o = function() {
		return r;
	};
	function s(e) {
		t(), l(), n(e, !0);
	}
	function c(t) {
		r.push(t), t.cont = function(o, c) {
			a || (LN(r, t), t.cont = NN, c ? s(o) : (t === e && (i = o), r.length || (a = !0, n(i))));
		};
	}
	function l() {
		a || (a = !0, r.forEach(function(e) {
			e.cont = NN, e.cancel();
		}), r = []);
	}
	return {
		addTask: c,
		cancelAll: l,
		abort: s,
		getTasks: o
	};
}
function SF(e, t) {
	return e + "?" + t;
}
function CF(e) {
	var t = XN(e);
	if (t) {
		var n = t.code, r = t.fileName, i = t.lineNumber;
		return n + "  " + SF(r, i);
	}
	return "";
}
function wF(e) {
	var t = e.name, n = e.location;
	return n ? t + "  " + SF(n.fileName, n.lineNumber) : t;
}
function TF(e) {
	var t = IN(function(e) {
		return e.cancelledTasks;
	}, e);
	return t.length ? ["Tasks cancelled due to error:"].concat(t).join("\n") : "";
}
var EF = null, DF = [], OF = function(e) {
	e.crashedEffect = EF, DF.push(e);
}, kF = function() {
	EF = null, DF.length = 0;
}, AF = function(e) {
	EF = e;
}, jF = function() {
	var e = DF[0], t = OP(DF).slice(1), n = e.crashedEffect ? CF(e.crashedEffect) : null;
	return ["The above error occurred in task " + wF(e.meta) + (n ? " \n when executing effect " + n : "")].concat(t.map(function(e) {
		return "    created by " + wF(e.meta);
	}), [TF(DF)]).join("\n");
};
function MF(e, t, n, r, i, a, o) {
	var s;
	o === void 0 && (o = NN);
	var c = JP, l, u, d = null, f = [], p = Object.create(n), m = xF(t, function() {
		f.push.apply(f, m.getTasks().map(function(e) {
			return e.meta.name;
		}));
	}, g);
	function h() {
		c === JP && (c = YP, m.cancelAll(), g(hN, !1));
	}
	function g(t, n) {
		if (!n) t === hN ? c = YP : c !== YP && (c = ZP), l = t, d && d.resolve(t);
		else {
			if (c = XP, OF({
				meta: i,
				cancelledTasks: f
			}), y.isRoot) {
				var r = jF();
				kF(), e.onError(t, { sagaStack: r });
			}
			u = t, d && d.reject(t);
		}
		y.cont(t, n), y.joiners.forEach(function(e) {
			e.cb(t, n);
		}), y.joiners = null;
	}
	function _(e) {
		FN(p, e);
	}
	function v() {
		return d ? d.promise : (d = DP(), c === XP ? d.reject(u) : c !== JP && d.resolve(l), d.promise);
	}
	var y = (s = {}, s[mN] = !0, s.id = r, s.meta = i, s.isRoot = a, s.context = p, s.joiners = [], s.queue = m, s.cancel = h, s.cont = o, s.end = g, s.setContext = _, s.toPromise = v, s.isRunning = function() {
		return c === JP;
	}, s.isCancelled = function() {
		return c === YP || c === JP && t.status === YP;
	}, s.isAborted = function() {
		return c === XP;
	}, s.result = function() {
		return l;
	}, s.error = function() {
		return u;
	}, s);
	return y;
}
function NF(e, t, n, r, i, a, o) {
	var s = e.finalizeRunEffect(g);
	h.cancel = NN;
	var c = {
		meta: i,
		cancel: d,
		status: JP
	}, l = MF(e, c, n, r, i, a, o), u = {
		task: l,
		digestEffect: _
	};
	function d() {
		c.status === JP && (c.status = YP, h(hN));
	}
	o && (o.cancel = l.cancel);
	var f = !1, p = 0, m;
	return h(), l;
	function h(e, n) {
		if (f && (p === AP || p > 0 && AP > p)) {
			KN(e) && (c.status = YP, h.cancel()), m = {
				arg: e,
				isErr: n
			};
			return;
		}
		try {
			var i;
			do {
				i = !1;
				var a = void 0;
				if (n ? (a = t.throw(e), kF()) : KN(e) ? (c.status = YP, h.cancel(), a = bN(t.return) ? t.return(hN) : {
					done: !0,
					value: hN
				}) : a = GN(e) ? bN(t.return) ? t.return() : { done: !0 } : t.next(e), a.done) {
					c.status !== YP && (c.status = ZP), c.cont(a.value);
					return;
				}
				m = null;
				var o = f, s = p;
				try {
					f = !0, p = AP, _(a.value, r, h);
				} finally {
					f = o, p = s;
				}
				if (!m) return;
				e = m.arg, n = m.isErr, m = null, i = !0;
			} while (i);
		} catch (e) {
			if (c.status === YP) throw e;
			c.status = XP, c.cont(e, !0);
		}
	}
	function g(t, n, r) {
		if (CN(t)) QP(t, r);
		else if (wN(t)) NF(e, t, l.context, n, i, !1, r);
		else if (t && t[lN]) {
			var a = bF[t.type];
			a(e, t.payload, r, u);
		} else r(t);
	}
	function _(t, n, r, i) {
		i === void 0 && (i = "");
		var a = eF();
		e.sagaMonitor && e.sagaMonitor.effectTriggered({
			effectId: a,
			parentEffectId: n,
			label: i,
			effect: t
		});
		var o;
		function c(n, i) {
			o || (o = !0, r.cancel = NN, e.sagaMonitor && (i ? e.sagaMonitor.effectRejected(a, n) : e.sagaMonitor.effectResolved(a, n)), i && AF(t), r(n, i));
		}
		c.cancel = NN, r.cancel = function() {
			o || (o = !0, c.cancel(), c.cancel = NN, e.sagaMonitor && e.sagaMonitor.effectCancelled(a));
		}, s(t, a, c);
	}
}
function PF(e, t) {
	var n = e.channel, r = n === void 0 ? qP() : n, i = e.dispatch, a = e.getState, o = e.context, s = o === void 0 ? {} : o, c = e.sagaMonitor, l = e.effectMiddlewares, u = e.onError, d = u === void 0 ? HN : u, f = [...arguments].slice(2), p = t.apply(void 0, f), m = eF();
	c && (c.rootSagaStarted = c.rootSagaStarted || NN, c.effectTriggered = c.effectTriggered || NN, c.effectResolved = c.effectResolved || NN, c.effectRejected = c.effectRejected || NN, c.effectCancelled = c.effectCancelled || NN, c.actionDispatched = c.actionDispatched || NN, c.rootSagaStarted({
		effectId: m,
		saga: t,
		args: f
	}));
	var h;
	if (l) {
		var g = ZN.apply(void 0, l);
		h = function(e) {
			return function(t, n, r) {
				return g(function(t) {
					return e(t, n, r);
				})(t);
			};
		};
	} else h = PN;
	var _ = {
		channel: r,
		dispatch: WN(i),
		getState: a,
		sagaMonitor: c,
		onError: d,
		finalizeRunEffect: h
	};
	return NP(function() {
		var e = NF(_, p, s, m, YN(t), !0, void 0);
		return c && c.effectResolved(m, e), e;
	});
}
var FF = [
	"context",
	"channel",
	"sagaMonitor"
];
function IF(e) {
	var t = e === void 0 ? {} : e, n = t.context, r = n === void 0 ? {} : n, i = t.channel, a = i === void 0 ? qP() : i, o = t.sagaMonitor, s = Ap(t, FF), c;
	function l(e) {
		var t = e.getState, n = e.dispatch;
		return c = PF.bind(null, K({}, s, {
			context: r,
			channel: a,
			dispatch: n,
			getState: t,
			sagaMonitor: o
		})), function(e) {
			return function(t) {
				o && o.actionDispatched && o.actionDispatched(t);
				var n = e(t);
				return a.put(t), n;
			};
		};
	}
	return l.run = function() {
		return c.apply(void 0, arguments);
	}, l.setContext = function(e) {
		FN(r, e);
	}, l;
}
//#endregion
//#region node_modules/@redux-devtools/extension/lib/esm/index.js
function LF() {
	var e = [...arguments];
	if (e.length !== 0) return typeof e[0] == "object" ? i : i(...e);
}
var RF = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : LF;
typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__;
//#endregion
//#region node_modules/lodash/_copyObject.js
var zF = /* @__PURE__ */ D(((e, t) => {
	var n = wo(), r = ln();
	function i(e, t, i, a) {
		var o = !i;
		i ||= {};
		for (var s = -1, c = t.length; ++s < c;) {
			var l = t[s], u = a ? a(i[l], e[l], l, i, e) : void 0;
			u === void 0 && (u = e[l]), o ? r(i, l, u) : n(i, l, u);
		}
		return i;
	}
	t.exports = i;
})), BF = /* @__PURE__ */ D(((e, t) => {
	var n = zF(), r = _n();
	function i(e, t) {
		return e && n(t, r(t), e);
	}
	t.exports = i;
})), VF = /* @__PURE__ */ D(((e, t) => {
	function n(e) {
		var t = [];
		if (e != null) for (var n in Object(e)) t.push(n);
		return t;
	}
	t.exports = n;
})), HF = /* @__PURE__ */ D(((t, n) => {
	var r = e(), i = ae(), a = VF(), o = Object.prototype.hasOwnProperty;
	function s(e) {
		if (!r(e)) return a(e);
		var t = i(e), n = [];
		for (var s in e) s == "constructor" && (t || !o.call(e, s)) || n.push(s);
		return n;
	}
	n.exports = s;
})), UF = /* @__PURE__ */ D(((e, t) => {
	var n = qt(), r = HF(), i = we();
	function a(e) {
		return i(e) ? n(e, !0) : r(e);
	}
	t.exports = a;
})), WF = /* @__PURE__ */ D(((e, t) => {
	var n = zF(), r = UF();
	function i(e, t) {
		return e && n(t, r(t), e);
	}
	t.exports = i;
})), GF = /* @__PURE__ */ D(((e, t) => {
	var n = ie(), r = typeof e == "object" && e && !e.nodeType && e, i = r && typeof t == "object" && t && !t.nodeType && t, a = i && i.exports === r ? n.Buffer : void 0, o = a ? a.allocUnsafe : void 0;
	function s(e, t) {
		if (t) return e.slice();
		var n = e.length, r = o ? o(n) : new e.constructor(n);
		return e.copy(r), r;
	}
	t.exports = s;
})), KF = /* @__PURE__ */ D(((e, t) => {
	var n = zF(), r = hn();
	function i(e, t) {
		return n(e, r(e), t);
	}
	t.exports = i;
})), qF = /* @__PURE__ */ D(((e, n) => {
	n.exports = t()(Object.getPrototypeOf, Object);
})), JF = /* @__PURE__ */ D(((e, t) => {
	var n = xt(), r = qF(), i = hn(), a = qe();
	t.exports = Object.getOwnPropertySymbols ? function(e) {
		for (var t = []; e;) n(t, i(e)), e = r(e);
		return t;
	} : a;
})), YF = /* @__PURE__ */ D(((e, t) => {
	var n = zF(), r = JF();
	function i(e, t) {
		return n(e, r(e), t);
	}
	t.exports = i;
})), XF = /* @__PURE__ */ D(((e, t) => {
	var n = Ct(), r = JF(), i = UF();
	function a(e) {
		return n(e, i, r);
	}
	t.exports = a;
})), ZF = /* @__PURE__ */ D(((e, t) => {
	var n = Object.prototype.hasOwnProperty;
	function r(e) {
		var t = e.length, r = new e.constructor(t);
		return t && typeof e[0] == "string" && n.call(e, "index") && (r.index = e.index, r.input = e.input), r;
	}
	t.exports = r;
})), QF = /* @__PURE__ */ D(((e, t) => {
	var n = st();
	function r(e) {
		var t = new e.constructor(e.byteLength);
		return new n(t).set(new n(e)), t;
	}
	t.exports = r;
})), $F = /* @__PURE__ */ D(((e, t) => {
	var n = QF();
	function r(e, t) {
		var r = t ? n(e.buffer) : e.buffer;
		return new e.constructor(r, e.byteOffset, e.byteLength);
	}
	t.exports = r;
})), eI = /* @__PURE__ */ D(((e, t) => {
	var n = /\w*$/;
	function r(e) {
		var t = new e.constructor(e.source, n.exec(e));
		return t.lastIndex = e.lastIndex, t;
	}
	t.exports = r;
})), tI = /* @__PURE__ */ D(((e, t) => {
	var n = _e(), r = n ? n.prototype : void 0, i = r ? r.valueOf : void 0;
	function a(e) {
		return i ? Object(i.call(e)) : {};
	}
	t.exports = a;
})), nI = /* @__PURE__ */ D(((e, t) => {
	var n = QF();
	function r(e, t) {
		var r = t ? n(e.buffer) : e.buffer;
		return new e.constructor(r, e.byteOffset, e.length);
	}
	t.exports = r;
})), rI = /* @__PURE__ */ D(((e, t) => {
	var n = QF(), r = $F(), i = eI(), a = tI(), o = nI(), s = "[object Boolean]", c = "[object Date]", l = "[object Map]", u = "[object Number]", d = "[object RegExp]", f = "[object Set]", p = "[object String]", m = "[object Symbol]", h = "[object ArrayBuffer]", g = "[object DataView]", _ = "[object Float32Array]", v = "[object Float64Array]", y = "[object Int8Array]", b = "[object Int16Array]", x = "[object Int32Array]", S = "[object Uint8Array]", C = "[object Uint8ClampedArray]", w = "[object Uint16Array]", T = "[object Uint32Array]";
	function E(e, t, E) {
		var ee = e.constructor;
		switch (t) {
			case h: return n(e);
			case s:
			case c: return new ee(+e);
			case g: return r(e, E);
			case _:
			case v:
			case y:
			case b:
			case x:
			case S:
			case C:
			case w:
			case T: return o(e, E);
			case l: return new ee();
			case u:
			case p: return new ee(e);
			case d: return i(e);
			case f: return new ee();
			case m: return a(e);
		}
	}
	t.exports = E;
})), iI = /* @__PURE__ */ D(((e, t) => {
	var n = _(), r = qF(), i = ae();
	function a(e) {
		return typeof e.constructor == "function" && !i(e) ? n(r(e)) : {};
	}
	t.exports = a;
})), aI = /* @__PURE__ */ D(((e, t) => {
	var n = r(), i = xe(), a = "[object Map]";
	function o(e) {
		return i(e) && n(e) == a;
	}
	t.exports = o;
})), oI = /* @__PURE__ */ D(((e, t) => {
	var n = aI(), r = h(), i = Te(), a = i && i.isMap;
	t.exports = a ? r(a) : n;
})), sI = /* @__PURE__ */ D(((e, t) => {
	var n = r(), i = xe(), a = "[object Set]";
	function o(e) {
		return i(e) && n(e) == a;
	}
	t.exports = o;
})), cI = /* @__PURE__ */ D(((e, t) => {
	var n = sI(), r = h(), i = Te(), a = i && i.isSet;
	t.exports = a ? r(a) : n;
})), lI = /* @__PURE__ */ D(((t, i) => {
	var a = Cn(), s = o(), c = wo(), l = BF(), u = WF(), d = GF(), f = m(), p = KF(), h = YF(), g = Ye(), _ = XF(), v = r(), y = ZF(), b = rI(), S = iI(), C = x(), w = n(), T = oI(), E = e(), ee = cI(), D = _n(), te = UF(), ne = 1, re = 2, ie = 4, ae = "[object Arguments]", oe = "[object Array]", se = "[object Boolean]", O = "[object Date]", ce = "[object Error]", k = "[object Function]", le = "[object GeneratorFunction]", ue = "[object Map]", de = "[object Number]", fe = "[object Object]", pe = "[object RegExp]", me = "[object Set]", he = "[object String]", ge = "[object Symbol]", _e = "[object WeakMap]", ve = "[object ArrayBuffer]", ye = "[object DataView]", be = "[object Float32Array]", xe = "[object Float64Array]", Se = "[object Int8Array]", Ce = "[object Int16Array]", A = "[object Int32Array]", we = "[object Uint8Array]", Te = "[object Uint8ClampedArray]", Ee = "[object Uint16Array]", De = "[object Uint32Array]", Oe = {};
	Oe[ae] = Oe[oe] = Oe[ve] = Oe[ye] = Oe[se] = Oe[O] = Oe[be] = Oe[xe] = Oe[Se] = Oe[Ce] = Oe[A] = Oe[ue] = Oe[de] = Oe[fe] = Oe[pe] = Oe[me] = Oe[he] = Oe[ge] = Oe[we] = Oe[Te] = Oe[Ee] = Oe[De] = !0, Oe[ce] = Oe[k] = Oe[_e] = !1;
	function ke(e, t, n, r, i, o) {
		var m, x = t & ne, oe = t & re, se = t & ie;
		if (n && (m = i ? n(e, r, i, o) : n(e)), m !== void 0) return m;
		if (!E(e)) return e;
		var O = C(e);
		if (O) {
			if (m = y(e), !x) return f(e, m);
		} else {
			var ce = v(e), ue = ce == k || ce == le;
			if (w(e)) return d(e, x);
			if (ce == fe || ce == ae || ue && !i) {
				if (m = oe || ue ? {} : S(e), !x) return oe ? h(e, u(m, e)) : p(e, l(m, e));
			} else {
				if (!Oe[ce]) return i ? e : {};
				m = b(e, ce, x);
			}
		}
		o ||= new a();
		var de = o.get(e);
		if (de) return de;
		o.set(e, m), ee(e) ? e.forEach(function(r) {
			m.add(ke(r, t, n, r, e, o));
		}) : T(e) && e.forEach(function(r, i) {
			m.set(i, ke(r, t, n, i, e, o));
		});
		var pe = O ? void 0 : (se ? oe ? _ : g : oe ? te : D)(e);
		return s(pe || e, function(r, i) {
			pe && (i = r, r = e[i]), c(m, i, ke(r, t, n, i, e, o));
		}), m;
	}
	i.exports = ke;
})), uI = /* @__PURE__ */ D(((e, t) => {
	function n(e) {
		var t = e == null ? 0 : e.length;
		return t ? e[t - 1] : void 0;
	}
	t.exports = n;
})), dI = /* @__PURE__ */ D(((e, t) => {
	function n(e, t, n) {
		var r = -1, i = e.length;
		t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0;
		for (var a = Array(i); ++r < i;) a[r] = e[r + t];
		return a;
	}
	t.exports = n;
})), fI = /* @__PURE__ */ D(((e, t) => {
	var n = bn(), r = dI();
	function i(e, t) {
		return t.length < 2 ? e : n(e, r(t, 0, -1));
	}
	t.exports = i;
})), pI = /* @__PURE__ */ D(((e, t) => {
	var n = en(), r = uI(), i = fI(), a = Nt(), o = Object.prototype.hasOwnProperty;
	function s(e, t) {
		t = n(t, e);
		var s = -1, c = t.length;
		if (!c) return !0;
		for (; ++s < c;) {
			var l = a(t[s]);
			if (l === "__proto__" && !o.call(e, "__proto__") || (l === "constructor" || l === "prototype") && s < c - 1) return !1;
		}
		var u = i(e, t);
		return u == null || delete u[a(r(t))];
	}
	t.exports = s;
})), mI = /* @__PURE__ */ D(((e, t) => {
	var n = ue(), r = qF(), i = xe(), a = "[object Object]", o = Function.prototype, s = Object.prototype, c = o.toString, l = s.hasOwnProperty, u = c.call(Object);
	function d(e) {
		if (!i(e) || n(e) != a) return !1;
		var t = r(e);
		if (t === null) return !0;
		var o = l.call(t, "constructor") && t.constructor;
		return typeof o == "function" && o instanceof o && c.call(o) == u;
	}
	t.exports = d;
})), hI = /* @__PURE__ */ D(((e, t) => {
	var n = mI();
	function r(e) {
		return n(e) ? void 0 : e;
	}
	t.exports = r;
})), gI = /* @__PURE__ */ D(((e, t) => {
	var n = Sr();
	function r(e) {
		return e != null && e.length ? n(e, 1) : [];
	}
	t.exports = r;
})), _I = /* @__PURE__ */ D(((e, t) => {
	var n = gI(), r = xr(), i = l();
	function a(e) {
		return i(r(e, void 0, n), e + "");
	}
	t.exports = a;
})), vI = /* @__PURE__ */ k((/* @__PURE__ */ D(((e, t) => {
	var n = It(), r = lI(), i = pI(), a = en(), o = zF(), s = hI(), c = _I(), l = XF(), u = 1, d = 2, f = 4;
	t.exports = c(function(e, t) {
		var c = {};
		if (e == null) return c;
		var p = !1;
		t = n(t, function(t) {
			return t = a(t, e), p ||= t.length > 1, t;
		}), o(e, l(e), c), p && (c = r(c, u | d | f, s));
		for (var m = t.length; m--;) i(c, t[m]);
		return c;
	});
})))(), 1);
function yI(e = {}, t) {
	switch (t.type) {
		case j.RESOLVE_AUTHENTICATION_REQUEST: return {
			...e,
			[t.tokenServiceId]: {
				authId: t.id,
				id: t.tokenServiceId,
				isFetching: !0
			}
		};
		case j.REQUEST_ACCESS_TOKEN: return {
			...e,
			[t.serviceId]: {
				authId: t.authId,
				id: t.serviceId,
				isFetching: !0
			}
		};
		case j.RECEIVE_ACCESS_TOKEN: return {
			...e,
			[t.serviceId]: {
				...e[t.serviceId],
				isFetching: !1,
				json: t.json
			}
		};
		case j.RECEIVE_ACCESS_TOKEN_FAILURE: return {
			...e,
			[t.serviceId]: {
				...e[t.serviceId],
				error: t.error,
				isFetching: !1
			}
		};
		case j.RESET_AUTHENTICATION_STATE: return (0, vI.default)(e, t.tokenServiceId);
		case j.RECEIVE_INFO_RESPONSE: return !t.tokenServiceId || e[t.tokenServiceId].success ? e : {
			...e,
			[t.tokenServiceId]: {
				...e[t.tokenServiceId],
				success: !0
			}
		};
		default: return e;
	}
}
//#endregion
//#region node_modules/lodash/fp/_mapping.js
var bI = /* @__PURE__ */ D(((e) => {
	e.aliasToReal = {
		each: "forEach",
		eachRight: "forEachRight",
		entries: "toPairs",
		entriesIn: "toPairsIn",
		extend: "assignIn",
		extendAll: "assignInAll",
		extendAllWith: "assignInAllWith",
		extendWith: "assignInWith",
		first: "head",
		conforms: "conformsTo",
		matches: "isMatch",
		property: "get",
		__: "placeholder",
		F: "stubFalse",
		T: "stubTrue",
		all: "every",
		allPass: "overEvery",
		always: "constant",
		any: "some",
		anyPass: "overSome",
		apply: "spread",
		assoc: "set",
		assocPath: "set",
		complement: "negate",
		compose: "flowRight",
		contains: "includes",
		dissoc: "unset",
		dissocPath: "unset",
		dropLast: "dropRight",
		dropLastWhile: "dropRightWhile",
		equals: "isEqual",
		identical: "eq",
		indexBy: "keyBy",
		init: "initial",
		invertObj: "invert",
		juxt: "over",
		omitAll: "omit",
		nAry: "ary",
		path: "get",
		pathEq: "matchesProperty",
		pathOr: "getOr",
		paths: "at",
		pickAll: "pick",
		pipe: "flow",
		pluck: "map",
		prop: "get",
		propEq: "matchesProperty",
		propOr: "getOr",
		props: "at",
		symmetricDifference: "xor",
		symmetricDifferenceBy: "xorBy",
		symmetricDifferenceWith: "xorWith",
		takeLast: "takeRight",
		takeLastWhile: "takeRightWhile",
		unapply: "rest",
		unnest: "flatten",
		useWith: "overArgs",
		where: "conformsTo",
		whereEq: "isMatch",
		zipObj: "zipObject"
	}, e.aryMethod = {
		1: /* @__PURE__ */ "assignAll.assignInAll.attempt.castArray.ceil.create.curry.curryRight.defaultsAll.defaultsDeepAll.floor.flow.flowRight.fromPairs.invert.iteratee.memoize.method.mergeAll.methodOf.mixin.nthArg.over.overEvery.overSome.rest.reverse.round.runInContext.spread.template.trim.trimEnd.trimStart.uniqueId.words.zipAll".split("."),
		2: /* @__PURE__ */ "add.after.ary.assign.assignAllWith.assignIn.assignInAllWith.at.before.bind.bindAll.bindKey.chunk.cloneDeepWith.cloneWith.concat.conformsTo.countBy.curryN.curryRightN.debounce.defaults.defaultsDeep.defaultTo.delay.difference.divide.drop.dropRight.dropRightWhile.dropWhile.endsWith.eq.every.filter.find.findIndex.findKey.findLast.findLastIndex.findLastKey.flatMap.flatMapDeep.flattenDepth.forEach.forEachRight.forIn.forInRight.forOwn.forOwnRight.get.groupBy.gt.gte.has.hasIn.includes.indexOf.intersection.invertBy.invoke.invokeMap.isEqual.isMatch.join.keyBy.lastIndexOf.lt.lte.map.mapKeys.mapValues.matchesProperty.maxBy.meanBy.merge.mergeAllWith.minBy.multiply.nth.omit.omitBy.overArgs.pad.padEnd.padStart.parseInt.partial.partialRight.partition.pick.pickBy.propertyOf.pull.pullAll.pullAt.random.range.rangeRight.rearg.reject.remove.repeat.restFrom.result.sampleSize.some.sortBy.sortedIndex.sortedIndexOf.sortedLastIndex.sortedLastIndexOf.sortedUniqBy.split.spreadFrom.startsWith.subtract.sumBy.take.takeRight.takeRightWhile.takeWhile.tap.throttle.thru.times.trimChars.trimCharsEnd.trimCharsStart.truncate.union.uniqBy.uniqWith.unset.unzipWith.without.wrap.xor.zip.zipObject.zipObjectDeep".split("."),
		3: /* @__PURE__ */ "assignInWith.assignWith.clamp.differenceBy.differenceWith.findFrom.findIndexFrom.findLastFrom.findLastIndexFrom.getOr.includesFrom.indexOfFrom.inRange.intersectionBy.intersectionWith.invokeArgs.invokeArgsMap.isEqualWith.isMatchWith.flatMapDepth.lastIndexOfFrom.mergeWith.orderBy.padChars.padCharsEnd.padCharsStart.pullAllBy.pullAllWith.rangeStep.rangeStepRight.reduce.reduceRight.replace.set.slice.sortedIndexBy.sortedLastIndexBy.transform.unionBy.unionWith.update.xorBy.xorWith.zipWith".split("."),
		4: [
			"fill",
			"setWith",
			"updateWith"
		]
	}, e.aryRearg = {
		2: [1, 0],
		3: [
			2,
			0,
			1
		],
		4: [
			3,
			2,
			0,
			1
		]
	}, e.iterateeAry = {
		dropRightWhile: 1,
		dropWhile: 1,
		every: 1,
		filter: 1,
		find: 1,
		findFrom: 1,
		findIndex: 1,
		findIndexFrom: 1,
		findKey: 1,
		findLast: 1,
		findLastFrom: 1,
		findLastIndex: 1,
		findLastIndexFrom: 1,
		findLastKey: 1,
		flatMap: 1,
		flatMapDeep: 1,
		flatMapDepth: 1,
		forEach: 1,
		forEachRight: 1,
		forIn: 1,
		forInRight: 1,
		forOwn: 1,
		forOwnRight: 1,
		map: 1,
		mapKeys: 1,
		mapValues: 1,
		partition: 1,
		reduce: 2,
		reduceRight: 2,
		reject: 1,
		remove: 1,
		some: 1,
		takeRightWhile: 1,
		takeWhile: 1,
		times: 1,
		transform: 2
	}, e.iterateeRearg = {
		mapKeys: [1],
		reduceRight: [1, 0]
	}, e.methodRearg = {
		assignInAllWith: [1, 0],
		assignInWith: [
			1,
			2,
			0
		],
		assignAllWith: [1, 0],
		assignWith: [
			1,
			2,
			0
		],
		differenceBy: [
			1,
			2,
			0
		],
		differenceWith: [
			1,
			2,
			0
		],
		getOr: [
			2,
			1,
			0
		],
		intersectionBy: [
			1,
			2,
			0
		],
		intersectionWith: [
			1,
			2,
			0
		],
		isEqualWith: [
			1,
			2,
			0
		],
		isMatchWith: [
			2,
			1,
			0
		],
		mergeAllWith: [1, 0],
		mergeWith: [
			1,
			2,
			0
		],
		padChars: [
			2,
			1,
			0
		],
		padCharsEnd: [
			2,
			1,
			0
		],
		padCharsStart: [
			2,
			1,
			0
		],
		pullAllBy: [
			2,
			1,
			0
		],
		pullAllWith: [
			2,
			1,
			0
		],
		rangeStep: [
			1,
			2,
			0
		],
		rangeStepRight: [
			1,
			2,
			0
		],
		setWith: [
			3,
			1,
			2,
			0
		],
		sortedIndexBy: [
			2,
			1,
			0
		],
		sortedLastIndexBy: [
			2,
			1,
			0
		],
		unionBy: [
			1,
			2,
			0
		],
		unionWith: [
			1,
			2,
			0
		],
		updateWith: [
			3,
			1,
			2,
			0
		],
		xorBy: [
			1,
			2,
			0
		],
		xorWith: [
			1,
			2,
			0
		],
		zipWith: [
			1,
			2,
			0
		]
	}, e.methodSpread = {
		assignAll: { start: 0 },
		assignAllWith: { start: 0 },
		assignInAll: { start: 0 },
		assignInAllWith: { start: 0 },
		defaultsAll: { start: 0 },
		defaultsDeepAll: { start: 0 },
		invokeArgs: { start: 2 },
		invokeArgsMap: { start: 2 },
		mergeAll: { start: 0 },
		mergeAllWith: { start: 0 },
		partial: { start: 1 },
		partialRight: { start: 1 },
		without: { start: 1 },
		zipAll: { start: 0 }
	}, e.mutate = {
		array: {
			fill: !0,
			pull: !0,
			pullAll: !0,
			pullAllBy: !0,
			pullAllWith: !0,
			pullAt: !0,
			remove: !0,
			reverse: !0
		},
		object: {
			assign: !0,
			assignAll: !0,
			assignAllWith: !0,
			assignIn: !0,
			assignInAll: !0,
			assignInAllWith: !0,
			assignInWith: !0,
			assignWith: !0,
			defaults: !0,
			defaultsAll: !0,
			defaultsDeep: !0,
			defaultsDeepAll: !0,
			merge: !0,
			mergeAll: !0,
			mergeAllWith: !0,
			mergeWith: !0
		},
		set: {
			set: !0,
			setWith: !0,
			unset: !0,
			update: !0,
			updateWith: !0
		}
	}, e.realToAlias = function() {
		var t = Object.prototype.hasOwnProperty, n = e.aliasToReal, r = {};
		for (var i in n) {
			var a = n[i];
			t.call(r, a) ? r[a].push(i) : r[a] = [i];
		}
		return r;
	}(), e.remap = {
		assignAll: "assign",
		assignAllWith: "assignWith",
		assignInAll: "assignIn",
		assignInAllWith: "assignInWith",
		curryN: "curry",
		curryRightN: "curryRight",
		defaultsAll: "defaults",
		defaultsDeepAll: "defaultsDeep",
		findFrom: "find",
		findIndexFrom: "findIndex",
		findLastFrom: "findLast",
		findLastIndexFrom: "findLastIndex",
		getOr: "get",
		includesFrom: "includes",
		indexOfFrom: "indexOf",
		invokeArgs: "invoke",
		invokeArgsMap: "invokeMap",
		lastIndexOfFrom: "lastIndexOf",
		mergeAll: "merge",
		mergeAllWith: "mergeWith",
		padChars: "pad",
		padCharsEnd: "padEnd",
		padCharsStart: "padStart",
		propertyOf: "get",
		rangeStep: "range",
		rangeStepRight: "rangeRight",
		restFrom: "rest",
		spreadFrom: "spread",
		trimChars: "trim",
		trimCharsEnd: "trimEnd",
		trimCharsStart: "trimStart",
		zipAll: "zip"
	}, e.skipFixed = {
		castArray: !0,
		flow: !0,
		flowRight: !0,
		iteratee: !0,
		mixin: !0,
		rearg: !0,
		runInContext: !0
	}, e.skipRearg = {
		add: !0,
		assign: !0,
		assignIn: !0,
		bind: !0,
		bindKey: !0,
		concat: !0,
		difference: !0,
		divide: !0,
		eq: !0,
		gt: !0,
		gte: !0,
		isEqual: !0,
		lt: !0,
		lte: !0,
		matchesProperty: !0,
		merge: !0,
		multiply: !0,
		overArgs: !0,
		partial: !0,
		partialRight: !0,
		propertyOf: !0,
		random: !0,
		range: !0,
		rangeRight: !0,
		subtract: !0,
		zip: !0,
		zipObject: !0,
		zipObjectDeep: !0
	};
})), xI = /* @__PURE__ */ D(((e, t) => {
	t.exports = {};
})), SI = /* @__PURE__ */ D(((e, t) => {
	var n = bI(), r = xI(), i = Array.prototype.push;
	function a(e, t) {
		return t == 2 ? function(t, n) {
			return e.apply(void 0, arguments);
		} : function(t) {
			return e.apply(void 0, arguments);
		};
	}
	function o(e, t) {
		return t == 2 ? function(t, n) {
			return e(t, n);
		} : function(t) {
			return e(t);
		};
	}
	function s(e) {
		for (var t = e ? e.length : 0, n = Array(t); t--;) n[t] = e[t];
		return n;
	}
	function c(e) {
		return function(t) {
			return e({}, t);
		};
	}
	function l(e, t) {
		return function() {
			for (var n = arguments.length, r = n - 1, a = Array(n); n--;) a[n] = arguments[n];
			var o = a[t], s = a.slice(0, t);
			return o && i.apply(s, o), t != r && i.apply(s, a.slice(t + 1)), e.apply(this, s);
		};
	}
	function u(e, t) {
		return function() {
			var n = arguments.length;
			if (n) {
				for (var r = Array(n); n--;) r[n] = arguments[n];
				var i = r[0] = t.apply(void 0, r);
				return e.apply(void 0, r), i;
			}
		};
	}
	function d(e, t, i, f) {
		var p = typeof t == "function", m = t === Object(t);
		if (m && (f = i, i = t, t = void 0), i == null) throw TypeError();
		f ||= {};
		var h = {
			cap: "cap" in f ? f.cap : !0,
			curry: "curry" in f ? f.curry : !0,
			fixed: "fixed" in f ? f.fixed : !0,
			immutable: "immutable" in f ? f.immutable : !0,
			rearg: "rearg" in f ? f.rearg : !0
		}, g = p ? i : r, _ = "curry" in f && f.curry, v = "fixed" in f && f.fixed, y = "rearg" in f && f.rearg, b = p ? i.runInContext() : void 0, x = p ? i : {
			ary: e.ary,
			assign: e.assign,
			clone: e.clone,
			curry: e.curry,
			forEach: e.forEach,
			isArray: e.isArray,
			isError: e.isError,
			isFunction: e.isFunction,
			isWeakMap: e.isWeakMap,
			iteratee: e.iteratee,
			keys: e.keys,
			rearg: e.rearg,
			toInteger: e.toInteger,
			toPath: e.toPath
		}, S = x.ary, C = x.assign, w = x.clone, T = x.curry, E = x.forEach, ee = x.isArray, D = x.isError, te = x.isFunction, ne = x.isWeakMap, re = x.keys, ie = x.rearg, ae = x.toInteger, oe = x.toPath, se = re(n.aryMethod), O = {
			castArray: function(e) {
				return function() {
					var t = arguments[0];
					return ee(t) ? e(s(t)) : e.apply(void 0, arguments);
				};
			},
			iteratee: function(e) {
				return function() {
					var t = arguments[0], n = arguments[1], r = e(t, n), i = r.length;
					return h.cap && typeof n == "number" ? (n = n > 2 ? n - 2 : 1, i && i <= n ? r : o(r, n)) : r;
				};
			},
			mixin: function(e) {
				return function(t) {
					var n = this;
					if (!te(n)) return e(n, Object(t));
					var r = [];
					return E(re(t), function(e) {
						te(t[e]) && r.push([e, n.prototype[e]]);
					}), e(n, Object(t)), E(r, function(e) {
						var t = e[1];
						te(t) ? n.prototype[e[0]] = t : delete n.prototype[e[0]];
					}), n;
				};
			},
			nthArg: function(e) {
				return function(t) {
					var n = t < 0 ? 1 : ae(t) + 1;
					return T(e(t), n);
				};
			},
			rearg: function(e) {
				return function(t, n) {
					var r = n ? n.length : 0;
					return T(e(t, n), r);
				};
			},
			runInContext: function(t) {
				return function(n) {
					return d(e, t(n), f);
				};
			}
		};
		function ce(e, t) {
			if (h.cap) {
				var r = n.iterateeRearg[e];
				if (r) return he(t, r);
				var i = !p && n.iterateeAry[e];
				if (i) return me(t, i);
			}
			return t;
		}
		function k(e, t, n) {
			return _ || h.curry && n > 1 ? T(t, n) : t;
		}
		function le(e, t, r) {
			if (h.fixed && (v || !n.skipFixed[e])) {
				var i = n.methodSpread[e], a = i && i.start;
				return a === void 0 ? S(t, r) : l(t, a);
			}
			return t;
		}
		function ue(e, t, r) {
			return h.rearg && r > 1 && (y || !n.skipRearg[e]) ? ie(t, n.methodRearg[e] || n.aryRearg[r]) : t;
		}
		function de(e, t) {
			t = oe(t);
			for (var n = -1, r = t.length, i = r - 1, a = w(Object(e)), o = a; o != null && ++n < r;) {
				var s = t[n], c = o[s];
				c != null && !(te(c) || D(c) || ne(c)) && (o[s] = w(n == i ? c : Object(c))), o = o[s];
			}
			return a;
		}
		function fe(e) {
			return ve.runInContext.convert(e)(void 0);
		}
		function pe(e, t) {
			var r = n.aliasToReal[e] || e, i = n.remap[r] || r, a = f;
			return function(e) {
				return d(p ? b : x, r, p ? b[i] : t, C(C({}, a), e));
			};
		}
		function me(e, t) {
			return ge(e, function(e) {
				return typeof e == "function" ? o(e, t) : e;
			});
		}
		function he(e, t) {
			return ge(e, function(e) {
				var n = t.length;
				return a(ie(o(e, n), t), n);
			});
		}
		function ge(e, t) {
			return function() {
				var n = arguments.length;
				if (!n) return e();
				for (var r = Array(n); n--;) r[n] = arguments[n];
				var i = h.rearg ? 0 : n - 1;
				return r[i] = t(r[i]), e.apply(void 0, r);
			};
		}
		function _e(e, t, r) {
			var i, a = n.aliasToReal[e] || e, o = t, l = O[a];
			return l ? o = l(t) : h.immutable && (n.mutate.array[a] ? o = u(t, s) : n.mutate.object[a] ? o = u(t, c(t)) : n.mutate.set[a] && (o = u(t, de))), E(se, function(e) {
				return E(n.aryMethod[e], function(t) {
					if (a == t) {
						var r = n.methodSpread[a];
						return i = r && r.afterRearg ? le(a, ue(a, o, e), e) : ue(a, le(a, o, e), e), i = ce(a, i), i = k(a, i, e), !1;
					}
				}), !i;
			}), i ||= o, i == t && (i = _ ? T(i, 1) : function() {
				return t.apply(this, arguments);
			}), i.convert = pe(a, t), i.placeholder = t.placeholder = r, i;
		}
		if (!m) return _e(t, i, g);
		var ve = i, ye = [];
		return E(se, function(e) {
			E(n.aryMethod[e], function(e) {
				var t = ve[n.remap[e] || e];
				t && ye.push([e, _e(e, t, ve)]);
			});
		}), E(re(ve), function(e) {
			var t = ve[e];
			if (typeof t == "function") {
				for (var n = ye.length; n--;) if (ye[n][0] == e) return;
				t.convert = pe(e, t), ye.push([e, t]);
			}
		}), E(ye, function(e) {
			ve[e[0]] = e[1];
		}), ve.convert = fe, ve.placeholder = ve, E(re(ve), function(e) {
			E(n.realToAlias[e] || [], function(t) {
				ve[t] = ve[e];
			});
		}), ve;
	}
	t.exports = d;
})), CI = /* @__PURE__ */ D(((e, t) => {
	var n = d(), r = 128;
	function i(e, t, i) {
		return t = i ? void 0 : t, t = e && t == null ? e.length : t, n(e, r, void 0, void 0, void 0, void 0, t);
	}
	t.exports = i;
})), wI = /* @__PURE__ */ D(((e, t) => {
	var n = lI(), r = 4;
	function i(e) {
		return n(e, r);
	}
	t.exports = i;
})), TI = /* @__PURE__ */ D(((e, t) => {
	var n = ue(), r = xe(), i = mI(), a = "[object DOMException]", o = "[object Error]";
	function s(e) {
		if (!r(e)) return !1;
		var t = n(e);
		return t == o || t == a || typeof e.message == "string" && typeof e.name == "string" && !i(e);
	}
	t.exports = s;
})), EI = /* @__PURE__ */ D(((e, t) => {
	var n = r(), i = xe(), a = "[object WeakMap]";
	function o(e) {
		return i(e) && n(e) == a;
	}
	t.exports = o;
})), DI = /* @__PURE__ */ D(((e, t) => {
	var n = lI(), r = yt(), i = 1;
	function a(e) {
		return r(typeof e == "function" ? e : n(e, i));
	}
	t.exports = a;
})), OI = /* @__PURE__ */ D(((e, t) => {
	var n = d(), r = _I(), i = 256;
	t.exports = r(function(e, t) {
		return n(e, i, void 0, void 0, void 0, t);
	});
})), kI = /* @__PURE__ */ D(((e, t) => {
	var n = It(), r = m(), i = x(), a = E(), o = Bt(), s = Nt(), c = En();
	function l(e) {
		return i(e) ? n(e, s) : a(e) ? [e] : r(o(c(e)));
	}
	t.exports = l;
})), AI = /* @__PURE__ */ D(((e, t) => {
	t.exports = {
		ary: CI(),
		assign: BF(),
		clone: wI(),
		curry: u(),
		forEach: o(),
		isArray: x(),
		isError: TI(),
		isFunction: p(),
		isWeakMap: EI(),
		iteratee: DI(),
		keys: oe(),
		rearg: OI(),
		toInteger: f(),
		toPath: kI()
	};
})), jI = /* @__PURE__ */ D(((e, t) => {
	var n = SI(), r = AI();
	function i(e, t, i) {
		return n(r, e, t, i);
	}
	t.exports = i;
})), MI = /* @__PURE__ */ D(((e, t) => {
	var n = To();
	function r(e, t, r) {
		return e == null ? e : n(e, t, r);
	}
	t.exports = r;
})), NI = /* @__PURE__ */ D(((e, t) => {
	var n = jI()("set", MI());
	n.placeholder = xI(), t.exports = n;
})), PI = /* @__PURE__ */ D(((e, t) => {
	var n = jI()("update", Oo());
	n.placeholder = xI(), t.exports = n;
})), FI = /* @__PURE__ */ k(NI(), 1), II = /* @__PURE__ */ k(PI(), 1);
function LI(e = {}, t) {
	switch (t.type) {
		case j.ADD_COMPANION_WINDOW: return (0, FI.default)([t.id], t.payload, e);
		case j.ADD_WINDOW: return {
			...e,
			...(t.companionWindows || []).reduce((n, r) => (n[r.id] = {
				...e[r.id],
				...r,
				windowId: t.id
			}, n), {})
		};
		case j.REMOVE_WINDOW: return Object.keys(e).reduce((n, r) => (e[r].windowId !== t.windowId && (n[r] = e[r]), n), {});
		case j.UPDATE_COMPANION_WINDOW: return (0, II.default)([t.id], (e) => ({
			...e || {},
			...t.payload
		}), e);
		case j.REMOVE_COMPANION_WINDOW: return (0, vI.default)(e, t.id);
		case j.IMPORT_MIRADOR_STATE: return t.state.companionWindows || [];
		case j.TOGGLE_TOC_NODE: return (0, II.default)([t.id, "tocNodes"], (e) => ({
			...e || {},
			...t.payload
		}), e);
		default: return e;
	}
}
//#endregion
//#region src/state/reducers/errors.js
var RI = { items: [] }, zI = (e = RI, t) => {
	let n;
	switch (t.type) {
		case j.ADD_ERROR: return {
			...e,
			[t.id]: {
				id: t.id,
				message: t.message
			},
			items: [...e.items, t.id]
		};
		case j.RECEIVE_INFO_RESPONSE_FAILURE: return {
			...e,
			[t.infoId]: {
				id: t.infoId,
				message: t.error
			},
			items: [...e.items, t.infoId]
		};
		case j.RECEIVE_SEARCH_FAILURE: return {
			...e,
			[t.searchId]: {
				id: t.searchId,
				message: t.error
			},
			items: [...e.items, t.searchId]
		};
		case j.REMOVE_ERROR: return n = Object.keys(e).reduce((n, r) => (r !== t.id && (n[r] = e[r]), n), {}), n.items = (0, No.default)(n.items, t.id), n;
		case j.IMPORT_MIRADOR_STATE: return RI;
		default: return e;
	}
};
//#endregion
//#region src/state/reducers/workspace.js
function BI(e) {
	return e.x !== void 0 && e.y !== void 0 && e.width !== void 0 && e.height !== void 0;
}
function VI(e, t) {
	return t.x - t.width / 2 > e.x - e.width / 2 && t.y - t.height / 2 > e.y - e.height / 2 && t.x + t.width / 2 < e.x + e.width / 2 && t.y + t.height / 2 < e.y + e.height / 2;
}
var HI = (e = {
	...pe.workspace,
	windowIds: []
}, t) => {
	let n, r, i;
	switch (t.type) {
		case j.UPDATE_WORKSPACE: return {
			...e,
			...t.config
		};
		case j.FOCUS_WINDOW: return {
			...e,
			focusedWindowId: t.windowId,
			viewportPosition: {
				...e.viewportPosition,
				...t.position
			}
		};
		case j.ADD_WINDOW: return {
			...e,
			focusedWindowId: t.window.id,
			windowIds: [...e.windowIds || [], t.window.id]
		};
		case j.REMOVE_WINDOW: return i = (e.windowIds || []).filter((e) => e !== t.windowId), {
			...e,
			focusedWindowId: t.windowId === e.focusedWindowId ? i[i.length - 1] : e.focusedWindowId,
			windowIds: i
		};
		case j.SET_WORKSPACE_FULLSCREEN: return {
			...e,
			isFullscreenEnabled: t.isFullscreenEnabled
		};
		case j.TOGGLE_ZOOM_CONTROLS: return {
			...e,
			showZoomControls: t.showZoomControls
		};
		case j.UPDATE_WORKSPACE_MOSAIC_LAYOUT: return {
			...e,
			layout: t.layout
		};
		case j.SET_WORKSPACE_ADD_VISIBILITY: return {
			...e,
			isWorkspaceAddVisible: t.isWorkspaceAddVisible
		};
		case j.SET_WORKSPACE_VIEWPORT_POSITION: return n = {}, r = {
			...e.viewportPosition,
			...t.payload.position
		}, BI(r) && !VI({
			height: e.height,
			width: e.width,
			x: 0,
			y: 0
		}, r) && (n = {
			height: e.height * 2,
			width: e.width * 2
		}), {
			...e,
			...n,
			viewportPosition: r
		};
		case j.SET_CONFIG:
		case j.IMPORT_CONFIG:
		case j.UPDATE_CONFIG: return {
			...e,
			...t.config.workspace
		};
		case j.IMPORT_MIRADOR_STATE: return t.state.workspace || {};
		case j.TOGGLE_DRAGGING: return {
			...e,
			draggingEnabled: !e.draggingEnabled
		};
		default: return e;
	}
}, UI = (e = {}, t) => {
	switch (t.type) {
		case j.ADD_WINDOW: return {
			...e,
			[t.window.id]: t.window
		};
		case j.MAXIMIZE_WINDOW: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				maximized: !0
			}
		};
		case j.MINIMIZE_WINDOW: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				maximized: !1
			}
		};
		case j.UPDATE_WINDOW: return e[t.id] ? (0, II.default)([t.id], (e) => ({
			...e || {},
			...Object.fromEntries(Object.entries(t.payload).filter(([, e]) => e !== void 0))
		}), e) : e;
		case j.REMOVE_WINDOW: return (0, vI.default)(e, [t.windowId]);
		case j.TOGGLE_WINDOW_SIDE_BAR: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				sideBarOpen: !e[t.windowId].sideBarOpen
			}
		};
		case j.SET_WINDOW_VIEW_TYPE: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				view: t.viewType
			}
		};
		case j.UPDATE_WINDOW_POSITION: return {
			...e,
			[t.payload.windowId]: {
				...e[t.payload.windowId],
				x: t.payload.position.x,
				y: t.payload.position.y
			}
		};
		case j.SET_WINDOW_SIZE: return {
			...e,
			[t.payload.windowId]: {
				...e[t.payload.windowId],
				height: t.payload.size.height,
				width: t.payload.size.width,
				x: t.payload.size.x,
				y: t.payload.size.y
			}
		};
		case j.SET_CANVAS: return e[t.windowId] ? (0, II.default)([t.windowId], (e) => ({
			...e || {},
			canvasId: t.canvasId,
			visibleCanvases: t.visibleCanvases || []
		}), e) : e;
		case j.ADD_COMPANION_WINDOW: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				companionWindowIds: e[t.windowId].companionWindowIds.concat([t.id]),
				...t.payload.position === "left" ? {
					companionAreaOpen: !0,
					sideBarPanel: t.payload.content
				} : {}
			}
		};
		case j.UPDATE_COMPANION_WINDOW: return t.payload.position === "left" ? {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				companionAreaOpen: !0
			}
		} : e;
		case j.REMOVE_COMPANION_WINDOW: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				companionWindowIds: e[t.windowId].companionWindowIds.filter((e) => e !== t.id)
			}
		};
		case j.SELECT_ANNOTATION: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				selectedAnnotationId: t.annotationId
			}
		};
		case j.DESELECT_ANNOTATION: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				selectedAnnotationId: void 0
			}
		};
		case j.HOVER_ANNOTATION: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				hoveredAnnotationIds: t.annotationIds
			}
		};
		case j.TOGGLE_ANNOTATION_DISPLAY: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				highlightAllAnnotations: !e[t.windowId].highlightAllAnnotations
			}
		};
		case j.IMPORT_MIRADOR_STATE: return t.state.windows || [];
		case j.REQUEST_SEARCH: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				suggestedSearches: void 0
			}
		};
		case j.SHOW_COLLECTION_DIALOG: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				collectionDialogOn: !0,
				collectionManifestId: t.manifestId,
				dialogCollectionPath: t.dialogCollectionPath
			}
		};
		case j.HIDE_COLLECTION_DIALOG: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				collectionDialogOn: !1
			}
		};
		default: return e;
	}
}, WI = (e = {}, t) => {
	switch (t.type) {
		case j.REQUEST_MANIFEST: return {
			[t.manifestId]: {
				...e[t.manifestId],
				...t.properties,
				id: t.manifestId
			},
			...(0, vI.default)(e, t.manifestId)
		};
		case j.RECEIVE_MANIFEST: return {
			...e,
			[t.manifestId]: {
				...e[t.manifestId],
				error: null,
				id: t.manifestId,
				isFetching: !1,
				json: t.manifestJson
			}
		};
		case j.RECEIVE_MANIFEST_FAILURE: return {
			...e,
			[t.manifestId]: {
				...e[t.manifestId],
				error: t.error,
				id: t.manifestId,
				isFetching: !1
			}
		};
		case j.REMOVE_MANIFEST: return Object.keys(e).reduce((n, r) => (r !== t.manifestId && (n[r] = e[r]), n), {});
		case j.IMPORT_MIRADOR_STATE: return t.state.manifests || {};
		default: return e;
	}
}, GI = (e = {}, t) => {
	switch (t.type) {
		case j.REQUEST_INFO_RESPONSE: return {
			...e,
			[t.infoId]: {
				id: t.infoId,
				isFetching: !0
			}
		};
		case j.RECEIVE_INFO_RESPONSE: return {
			...e,
			[t.infoId]: {
				degraded: !1,
				id: t.infoId,
				isFetching: !1,
				json: t.infoJson,
				tokenServiceId: t.tokenServiceId
			}
		};
		case j.RECEIVE_DEGRADED_INFO_RESPONSE: return {
			...e,
			[t.infoId]: {
				degraded: !0,
				id: t.infoId,
				isFetching: !1,
				json: t.infoJson,
				tokenServiceId: t.tokenServiceId
			}
		};
		case j.RECEIVE_INFO_RESPONSE_FAILURE: return {
			...e,
			[t.infoId]: {
				error: t.error,
				id: t.infoId,
				isFetching: !1,
				tokenServiceId: t.tokenServiceId
			}
		};
		case j.REMOVE_INFO_RESPONSE: return Object.keys(e).reduce((n, r) => (r !== t.infoId && (n[r] = e[r]), n), {});
		case j.IMPORT_MIRADOR_STATE: return {};
		default: return e;
	}
}, KI = { ...pe }, qI = (e, t, n) => t, JI = (e = KI, t) => {
	switch (t.type) {
		case j.UPDATE_CONFIG:
		case j.IMPORT_CONFIG: return (0, kp.default)(e, t.config, { arrayMerge: qI });
		case j.SET_CONFIG: return t.config;
		case j.IMPORT_MIRADOR_STATE: return {
			...t.state.config || {},
			export: (0, kp.default)(e.export || {}, t.state.config?.export || {}, { arrayMerge: qI }),
			requests: (0, kp.default)(e.requests || {}, t.state.config?.requests || {}, { arrayMerge: qI }),
			theme: (0, kp.default)(e.theme || {}, t.state.config?.theme || {}, { arrayMerge: qI }),
			themes: (0, kp.default)(e.themes || {}, t.state.config?.themes || {}, { arrayMerge: qI })
		};
		default: return e;
	}
}, YI = (e = {}, t) => {
	switch (t.type) {
		case j.UPDATE_VIEWPORT: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				...t.payload
			}
		};
		case j.ADD_WINDOW: return t.window.initialViewerConfig ? {
			...e,
			[t.window.id]: {
				...e[t.window.id],
				...t.window.initialViewerConfig
			}
		} : e;
		case j.REMOVE_WINDOW: return (0, vI.default)(e, t.windowId);
		case j.SET_WINDOW_VIEW_TYPE: return (0, FI.default)([t.windowId], null, e);
		case j.SET_CANVAS: return t.preserveViewport ? e : (0, FI.default)([t.windowId], null, e);
		case j.IMPORT_MIRADOR_STATE: return t.state.viewers || {};
		default: return e;
	}
}, XI = (e = {}, t) => {
	switch (t.type) {
		case j.REQUEST_ANNOTATION: return {
			...e,
			[t.targetId]: {
				...e[t.targetId],
				[t.annotationId]: {
					id: t.annotationId,
					isFetching: !0
				}
			}
		};
		case j.RECEIVE_ANNOTATION: return {
			...e,
			[t.targetId]: {
				...e[t.targetId],
				[t.annotationId]: {
					id: t.annotationId,
					isFetching: !1,
					json: t.annotationJson
				}
			}
		};
		case j.RECEIVE_ANNOTATION_FAILURE: return {
			...e,
			[t.targetId]: {
				...e[t.targetId],
				[t.annotationId]: {
					error: t.error,
					id: t.annotationId,
					isFetching: !1
				}
			}
		};
		case j.IMPORT_MIRADOR_STATE: return {};
		default: return e;
	}
}, ZI = (e = {}, t) => {
	switch (t.type) {
		case j.ADD_AUTHENTICATION_REQUEST: return {
			...e,
			[t.id]: {
				id: t.id,
				isFetching: !0,
				profile: t.profile,
				windowId: t.windowId
			}
		};
		case j.RESOLVE_AUTHENTICATION_REQUEST: return {
			...e,
			[t.id]: {
				...e[t.id],
				isFetching: !1,
				ok: t.ok
			}
		};
		case j.RECEIVE_ACCESS_TOKEN: return t.authId ? {
			...e,
			[t.authId]: {
				...e[t.authId],
				ok: !0
			}
		} : e;
		case j.RESET_AUTHENTICATION_STATE: return (0, vI.default)(e, t.id);
		default: return e;
	}
}, QI = (e = {}, t) => {
	switch (t.type) {
		case j.ADD_WINDOW: return {
			...e,
			[t.window.id]: {
				windowId: t.window.id,
				...t.elasticLayout
			}
		};
		case j.UPDATE_ELASTIC_WINDOW_LAYOUT: return (0, II.default)([t.windowId], (e) => ({
			...e || {},
			...t.payload
		}), e);
		case j.REMOVE_WINDOW: return (0, vI.default)(e, t.windowId);
		case j.IMPORT_MIRADOR_STATE: return t.state.elasticLayout || {};
		default: return e;
	}
}, $I = (e = {}, t) => {
	let n = (e[t.windowId] || {})[t.companionWindowId] || {};
	switch (t.type) {
		case j.REQUEST_SEARCH: return n.query === t.query ? {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				[t.companionWindowId]: {
					...n,
					data: {
						...n.data,
						[t.searchId]: { isFetching: !0 }
					}
				}
			}
		} : {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				[t.companionWindowId]: {
					...n,
					data: { [t.searchId]: { isFetching: !0 } },
					query: t.query,
					selectedContentSearchAnnotationIds: []
				}
			}
		};
		case j.RECEIVE_SEARCH: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				[t.companionWindowId]: {
					...n,
					data: {
						...n.data,
						[t.searchId]: {
							isFetching: !1,
							json: t.searchJson
						}
					}
				}
			}
		};
		case j.RECEIVE_SEARCH_FAILURE: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				[t.companionWindowId]: {
					...n,
					data: {
						...n.data,
						[t.searchId]: {
							error: t.error,
							isFetching: !1
						}
					}
				}
			}
		};
		case j.REMOVE_SEARCH: return {
			...e,
			[t.windowId]: Object.keys(e[t.windowId]).reduce((n, r) => (r !== t.companionWindowId && (n[r] = e[t.windowId][r]), n), {})
		};
		case j.SET_CONTENT_SEARCH_CURRENT_ANNOTATIONS: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				[t.companionWindowId]: {
					...n,
					selectedContentSearchAnnotationIds: t.annotationIds
				}
			}
		};
		case j.SELECT_ANNOTATION: return e[t.windowId] ? {
			...e,
			[t.windowId]: Object.keys(e[t.windowId]).reduce((n, r) => {
				let i = e[t.windowId][r];
				return n[r] = i.data && Object.values(i.data).filter((e) => e.json && e.json.resources).some((e) => [e.json.resources].flat().some((e) => e["@id"] === t.annotationId)) ? {
					...i,
					selectedContentSearchAnnotationIds: [t.annotationId]
				} : i, n;
			}, {})
		} : e;
		case j.IMPORT_MIRADOR_STATE: return {};
		case j.REMOVE_WINDOW: return (0, vI.default)(e, t.windowId);
		case j.REMOVE_COMPANION_WINDOW: return e[t.windowId] ? {
			...e,
			[t.windowId]: { ...(0, vI.default)(e[t.windowId], t.id) }
		} : e;
		default: return e;
	}
}, eL = (e = {}, t) => {
	switch (t.type) {
		case j.UPDATE_LAYERS: return {
			...e,
			[t.windowId]: {
				...e[t.windowId],
				[t.canvasId]: (0, kp.default)((e[t.windowId] || {})[t.canvasId] || {}, t.payload)
			}
		};
		case j.REMOVE_WINDOW: return (0, vI.default)(e, [t.windowId]);
		default: return e;
	}
}, tL = (e = [], t) => {
	switch (t.type) {
		case j.ADD_RESOURCE: return e.some((e) => e.manifestId === t.manifestId) ? e : [{
			manifestId: t.manifestId,
			...t.payload
		}, ...e];
		case j.ADD_WINDOW: return e.some((e) => e.manifestId === t.window.manifestId) ? e : [{ manifestId: t.window.manifestId }, ...e];
		case j.UPDATE_WINDOW: return !t.payload.manifestId || e.some((e) => e.manifestId === t.payload.manifestId) ? e : [{ manifestId: t.payload.manifestId }, ...e];
		case j.REMOVE_RESOURCE: return e.filter((e) => e.manifestId !== t.manifestId);
		case j.IMPORT_CONFIG: return t.config.catalog || [];
		case j.IMPORT_MIRADOR_STATE: return t.state.catalog || [];
		default: return e;
	}
}, nL = /* @__PURE__ */ me({
	accessTokensReducer: () => yI,
	annotationsReducer: () => XI,
	authReducer: () => ZI,
	catalogReducer: () => tL,
	companionWindowsReducer: () => LI,
	configReducer: () => JI,
	elasticLayoutReducer: () => QI,
	errorsReducer: () => zI,
	infoResponsesReducer: () => GI,
	layersReducer: () => eL,
	manifestsReducer: () => WI,
	searchesReducer: () => $I,
	viewersReducer: () => YI,
	windowsReducer: () => UI,
	workspaceReducer: () => HI
});
//#endregion
//#region src/state/reducers/rootReducer.js
function rL(e) {
	return v({
		accessTokens: yI,
		annotations: XI,
		auth: ZI,
		catalog: tL,
		companionWindows: LI,
		config: JI,
		elasticLayout: QI,
		errors: zI,
		infoResponses: GI,
		layers: eL,
		manifests: WI,
		searches: $I,
		viewers: YI,
		windows: UI,
		workspace: HI,
		...e
	});
}
//#endregion
//#region node_modules/@redux-saga/core/effects/dist/redux-saga-core-effects.esm.js
var iL = function(e) {
	return {
		done: !0,
		value: e
	};
}, aL = {};
function oL(e) {
	return EN(e) ? "channel" : DN(e) ? String(e) : bN(e) ? e.name : String(e);
}
function sL(e, t, n) {
	var r, i, a, o = t;
	function s(t, n) {
		if (o === aL) return iL(t);
		if (n && !i) throw o = aL, n;
		r && r(t);
		var s = n ? e[i](n) : e[o]();
		return o = s.nextState, a = s.effect, r = s.stateUpdater, i = s.errorState, o === aL ? iL(t) : a;
	}
	return VN(s, function(e) {
		return s(null, e);
	}, n);
}
function cL(e, t) {
	var n = [...arguments].slice(2), r = {
		done: !1,
		value: vP(e)
	}, i = function(e) {
		return {
			done: !1,
			value: CP.apply(void 0, [t].concat(n, [e]))
		};
	}, a, o = function(e) {
		return a = e;
	};
	return sL({
		q1: function() {
			return {
				nextState: "q2",
				effect: r,
				stateUpdater: o
			};
		},
		q2: function() {
			return {
				nextState: "q1",
				effect: i(a)
			};
		}
	}, "q1", "takeEvery(" + oL(e) + ", " + t.name + ")");
}
function lL(e, t) {
	var n = [...arguments].slice(2);
	return CP.apply(void 0, [
		cL,
		e,
		t
	].concat(n));
}
//#endregion
//#region src/state/sagas/iiif.js
function uL(e, t, { success: n, degraded: r, failure: i }) {
	return fetch(e, t).then((t) => t.json().then((e) => t.status === 401 ? (r || n)({
		json: e,
		response: t
	}) : t.ok ? n({
		json: e,
		response: t
	}) : i({
		error: t.statusText,
		json: e,
		response: t
	})).catch((n) => t.ok ? i({
		error: n,
		response: t
	}) : i({
		error: `${t.status} ${t.statusText}: ${e}`,
		response: t
	}))).catch((e) => i({ error: e }));
}
function* dL(e, t, { success: n, degraded: r, failure: i }) {
	let { preprocessors: a = [], postprocessors: o = [] } = yield TP(Fn);
	try {
		let s = yield SP(uL, e, a.reduce((t, n) => n(e, t) || t, t), {
			degraded: r,
			failure: i,
			success: n
		});
		return s = o.reduce((t, n) => n(e, t) || t, s), s;
	} catch (e) {
		return i({ error: e });
	}
}
function* fL(e, t, n, { degraded: r, failure: i, success: a }) {
	let o = { ...n }, s;
	if (t) {
		let e = yield SP(mL, t);
		s = e && e.id, e && e.json && (o.headers = {
			Authorization: `Bearer ${e.json.accessToken}`,
			...n.headers
		});
	}
	let { error: c, json: l, response: u } = yield SP(dL, e, o, {
		failure: (e) => e,
		success: (e) => e
	});
	if (c) {
		yield yP(i({
			error: c,
			json: l,
			response: u,
			tokenServiceId: s
		}));
		return;
	}
	let d = l["@id"] || l.id;
	if (u.ok) {
		if (ms(d, { stripAuthentication: !1 }) === ms(e.replace(/info\.json$/, ""), { stripAuthentication: !1 })) {
			yield yP(a({
				json: l,
				response: u,
				tokenServiceId: s
			}));
			return;
		}
	} else if (u.status !== 401) {
		yield yP(i({
			error: c,
			json: l,
			response: u,
			tokenServiceId: s
		}));
		return;
	}
	let f = yield SP(mL, l);
	if (f && f.id !== s) {
		yield SP(fL, e, l, n, {
			degraded: r,
			failure: i,
			success: a
		});
		return;
	}
	yield yP((r || a)({
		json: l,
		response: u,
		tokenServiceId: s
	}));
}
function* pL({ manifestId: e }) {
	yield yP(yield SP(dL, e, {}, {
		failure: ({ error: t, json: n, response: r }) => Ns(e, typeof t == "object" ? String(t) : t),
		success: ({ json: t, response: n }) => Ms(e, t)
	}));
}
function* mL(e) {
	let t = e && e.__jsonld ? e : {
		...e,
		options: {}
	}, n = Po.Utils.getServices(t).filter((e) => e.getProfile().match(/http:\/\/iiif.io\/api\/auth\//));
	if (n.length === 0) return;
	let r = yield TP(qo);
	if (r) for (let e = 0; e < n.length; e += 1) {
		let t = n[e], i = Po.Utils.getService(t, "http://iiif.io/api/auth/1/token") || Po.Utils.getService(t, "http://iiif.io/api/auth/0/token"), a = i && r[i.id];
		if (a && a.json) return a;
	}
}
function* hL({ imageResource: e, infoId: t, windowId: n }) {
	let r = e;
	r ||= yield TP(On, { infoId: t }), yield SP(fL, `${t.replace(/\/$/, "")}/info.json`, r, {}, {
		degraded: ({ json: e, response: r, tokenServiceId: i }) => Rs(t, e, r.ok, i, n),
		failure: ({ error: e, json: n, response: r, tokenServiceId: i }) => zs(t, e, i),
		success: ({ json: e, response: n, tokenServiceId: r }) => Ls(t, e, n.ok, r)
	});
}
function* gL({ windowId: e, companionWindowId: t, query: n, searchId: r }) {
	yield yP(yield SP(dL, r, {}, {
		failure: ({ error: n, json: i, response: a }) => ac(e, t, r, n),
		success: ({ json: n, response: i }) => ic(e, t, r, n)
	}));
}
function* _L({ targetId: e, annotationId: t }) {
	yield yP(yield SP(dL, t, {}, {
		failure: ({ error: n, json: r, response: i }) => Xn(e, t, n),
		success: ({ json: n, response: r }) => rr(e, t, n)
	}));
}
function* vL({ manifestId: e, manifestJson: t }) {
	if (t) {
		yield yP(Ms(e, t));
		return;
	}
	e && ((yield TP(ge) || {})[e] || (yield* pL({ manifestId: e })));
}
function* yL(...e) {
	let t = yield TP(ge);
	for (let n = 0; n < e.length; n += 1) {
		let r = e[n];
		t[r] || (yield SP(pL, { manifestId: r }));
	}
}
function* bL() {
	yield bP([
		lL(j.REQUEST_MANIFEST, pL),
		lL(j.REQUEST_INFO_RESPONSE, hL),
		lL(j.REQUEST_SEARCH, gL),
		lL(j.REQUEST_ANNOTATION, _L),
		lL(j.ADD_RESOURCE, vL)
	]);
}
//#endregion
//#region src/state/sagas/windows.js
function* xL(e) {
	let { collectionPath: t, id: n, manifestId: r } = e.payload || e.window;
	r && (e.manifest ? yield yP(Ms(r, e.manifest)) : yield SP(yL, r, ...t || []), yield SP(TL, e), yield SP(EL, e), t || (yield SP(CL, {
		manifestId: r,
		windowId: e.id || e.window.id
	})), yield SP(PL, r, n));
}
function* SL(e) {
	let t = e.id;
	if (!e || !e.payload || !e.payload.sequenceId) return;
	let n = yield TP(yn, { windowId: t });
	!n || !n[0] || !n[0].id || (yield yP(yield SP(Gr, t, n[0].id)));
}
function* CL({ manifestId: e, windowId: t }) {
	let n = yield TP(un, { manifestId: e });
	if (n) {
		let e = n.getProperty("partOf"), r = Array.isArray(e) ? e[0] : e;
		r && r.id && (yield yP(Pr(t, { collectionPath: [r.id] })));
	}
}
function* wL(e) {
	let { collectionPath: t } = e.payload;
	t && (yield SP(yL, ...t));
}
function* TL(e) {
	let { canvasId: t, canvasIndex: n, manifestId: r } = e.payload || e.window, i = e.id || e.window.id;
	if (t) {
		let n = !!e.payload || !!e.window?.initialViewerConfig;
		yield yP(yield SP(Gr, i, t, null, { preserveViewport: n }));
	} else {
		let t = yield TP(lt), a = yield TP(un, { manifestId: r });
		if (a) {
			let r = t(a), o = r.startCanvas || r.canvasAt(n || 0) || r.canvasAt(0);
			if (o) {
				let t = !!e.payload || !!e.window?.initialViewerConfig;
				yield yP(t ? yield SP(Gr, i, o.id, null, { preserveViewport: t }) : yield SP(Gr, i, o.id));
			}
		}
	}
}
function* EL(e) {
	if (!e.window || !e.window.defaultSearchQuery) return;
	let { id: t, defaultSearchQuery: n } = e.window, r = yield TP(De, { windowId: t }), i = (yield TP(rt, {
		position: "left",
		windowId: t
	}))[0];
	r && i && (yield yP(sc(t, i, r && `${r.id}?${new URLSearchParams({ q: n })}`, n)));
}
function DL(e, { canvasIds: t, companionWindowIds: n, windowId: r }) {
	return n.reduce((n, i) => {
		let a = sr(e, {
			companionWindowId: i,
			windowId: r
		}).resources.find((e) => t.includes(e.targetId));
		return a && (n[i] = [a.id]), n;
	}, {});
}
function* OL({ annotationId: e, windowId: t, visibleCanvases: n }) {
	let r = yield TP(tr, { windowId: t }), i = Object.keys(r || {});
	if (i.length === 0) return;
	let a = yield TP(DL, {
		canvasIds: n,
		companionWindowIds: i,
		windowId: t
	});
	yield bP(Object.keys(a).map((e) => yP(cc(t, e, a[e])))), Object.values(a).length > 0 && (yield yP(Qn(t, Object.values(a)[0][0])));
}
function* kL({ pan: e, windowId: t }) {
	if (!e) return;
	let { x: n, y: r, width: i, height: a } = (yield TP(Ie))[t] || {}, { viewportPosition: { width: o, height: s } } = yield TP(se);
	yield yP(Ks({
		x: n + i / 2 - o / 2,
		y: r + a / 2 - s / 2
	}));
}
function* AL({ windowId: e }) {
	let { canvasId: t } = yield TP(b, { windowId: e }), n = yield TP(gn, {
		canvasId: t,
		windowId: e
	});
	yield yP(yield SP(Gr, e, t, (n || []).map((e) => e.id)));
}
function* jL({ companionWindowId: e, windowId: t }) {
	let { switchCanvasOnSearch: n } = yield TP(ut, { windowId: t });
	if (!n || (yield TP(Zn, {
		companionWindowId: e,
		windowId: t
	})).length !== 0) return;
	let r = yield TP(_r, {
		companionWindowId: e,
		windowId: t
	});
	!r || r.length === 0 || (yield yP(Qn(t, r[0].id)));
}
function* ML({ annotationId: e, windowId: t }) {
	let n = yield TP(dn, { windowId: t }), r = yield TP(mr, {
		annotationId: e,
		windowId: t
	});
	!r || n.includes(r.id) || (yield yP(yield SP(Gr, t, r.id)));
}
function* NL({ visibleCanvases: e, windowId: t }) {
	let n = yield TP(yn, { windowId: t }), r = yield TP(Pn), i = (n || []).filter((t) => e.includes(t.id)), a = yield TP(Ze);
	yield bP(i.map((e) => bP(a(e).iiifImageResources.map((e) => !r[_t(e)?.id] && yP(Bs({
		imageResource: e,
		windowId: t
	}))).filter(Boolean))));
}
function* PL(e, t) {
	let n = yield TP(un, { manifestId: e });
	n && n.isCollection() && (yield yP(Hr(e, [], t)));
}
function* FL() {
	yield bP([
		lL(j.ADD_WINDOW, xL),
		lL(j.UPDATE_WINDOW, xL),
		lL(j.UPDATE_WINDOW, SL),
		lL(j.UPDATE_WINDOW, wL),
		lL(j.SET_CANVAS, OL),
		lL(j.SET_CANVAS, NL),
		lL(j.UPDATE_COMPANION_WINDOW, wL),
		lL(j.SET_WINDOW_VIEW_TYPE, AL),
		lL(j.RECEIVE_SEARCH, jL),
		lL(j.SELECT_ANNOTATION, ML),
		lL(j.FOCUS_WINDOW, kL)
	]);
}
//#endregion
//#region src/state/sagas/app.js
function* IL(e) {
	yield bP([...Object.entries(e.state.windows || {}).map(([e, t]) => SP(xL, {
		id: t.id,
		payload: t
	})), ...Object.entries(e.state.manifests || {}).filter(([e, t]) => !t.json).map(([e, t]) => SP(yL, t.id))]);
}
function* LL({ config: { thumbnailNavigation: e, windows: t } }) {
	!t || t.length === 0 || (yield bP((yield bP(t.map((t) => {
		let n = `window-${y()}`, r = t.manifestId || t.loadedManifest;
		return SP(Vr, {
			id: n,
			manifestId: r,
			thumbnailNavigationPosition: e && e.defaultPosition,
			...t
		});
	}))).map((e) => yP(e))));
}
function* RL(e) {
	let { dialogCollectionPath: t, manifestId: n } = e;
	yield SP(yL, n, ...t);
}
function* zL() {
	yield bP([
		lL(j.IMPORT_MIRADOR_STATE, IL),
		lL(j.IMPORT_CONFIG, LL),
		lL(j.SHOW_COLLECTION_DIALOG, RL)
	]);
}
//#endregion
//#region src/state/sagas/annotations.js
function* BL({ canvasId: e, windowId: t }) {
	let n = yield TP(Sn, {
		canvasId: e,
		windowId: t
	}), r = yield TP(Bn), i = (yield TP(Ze))(n);
	return yield bP([...i.annotationListUris.filter((e) => !(r[n.id] && r[n.id][e])).map((e) => yP(lr(n.id, e))), ...i.canvasAnnotationPages.filter((e) => !(r[n.id] && r[n.id][e.id])).map((e) => e.items ? yP(rr(n.id, e.id, e)) : yP(lr(n.id, e.id)))]);
}
function* VL({ visibleCanvases: e = [], windowId: t }) {
	return yield bP(e.map((e) => yP(fr(t, e))));
}
function* HL() {
	yield bP([lL(j.REQUEST_CANVAS_ANNOTATIONS, BL), lL(j.SET_CANVAS, VL)]);
}
//#endregion
//#region src/state/sagas/auth.js
function* UL({ tokenServiceId: e }) {
	yield EP(2e3), yield SP(WL, { serviceId: e });
}
function* WL({ serviceId: e }) {
	let t = yield TP(S), n = yield bP(Object.keys(t).map((e) => TP(Tt, { windowId: e }))), r = yield TP(Ze), i = n.flat().flatMap((e) => r(e).imageServiceIds), a = yield TP(Pn), o = (t) => Po.Utils.getServices(t).some((t) => {
		let n = Po.Utils.getService(t, "http://iiif.io/api/auth/1/token") || Po.Utils.getService(t, "http://iiif.io/api/auth/0/token");
		return n && n.id === e;
	});
	yield bP(Object.values(a).filter((e) => e.json && o(e.json)).map(({ id: e }) => i.includes(e) ? SP(hL, { infoId: e }) : yP({
		infoId: e,
		type: j.REMOVE_INFO_RESPONSE
	})));
}
function* GL({ infoJson: e, windowId: t }) {
	let n = yield TP(Jo), { auth: { serviceProfiles: r = [] } = {} } = yield TP(Gt), i = r.filter((e) => e.external || e.kiosk), a = Po.Utils.getServices(e).filter((e) => !n[e.id]).find((e) => i.some((t) => t.profile === e.getProfile()));
	if (!a) return;
	let o = i.find((e) => e.profile === a.getProfile());
	if (o.kiosk) yield yP(Ys(t, a.id, a.getProfile()));
	else if (o.external) {
		let e = Po.Utils.getService(a, "http://iiif.io/api/auth/1/token") || Po.Utils.getService(a, "http://iiif.io/api/auth/0/token");
		if (!e) return;
		yield yP(Ys(t, a.id, a.getProfile())), yield yP(Xs(a.id, e.id, { ok: !0 })), yield yP(Zs(e.id, a.id));
	}
}
function* KL({ infoJson: e, windowId: t, tokenServiceId: n }) {
	if (!n) return;
	let r = Po.Utils.getServices(e).find((e) => {
		let t = Po.Utils.getService(e, "http://iiif.io/api/auth/1/token") || Po.Utils.getService(e, "http://iiif.io/api/auth/0/token");
		return t && t.id === n;
	});
	if (!r) return;
	let i = (yield TP(qo))[n];
	i && i.success && (yield yP(Zs(n, r.id)));
}
function* qL({ serviceId: e }) {
	let t = yield TP(qo), n = yield TP(Jo), r = t[e];
	if (!r) return;
	let i = n[r.authId];
	i && (r.success ? yield yP(tc({
		authServiceId: i.id,
		tokenServiceId: r.id
	})) : yield yP(Xs(i.id, r.id, { ok: !1 })));
}
function* JL() {
	yield bP([
		lL(j.RECEIVE_DEGRADED_INFO_RESPONSE, KL),
		lL(j.RECEIVE_ACCESS_TOKEN_FAILURE, qL),
		lL(j.RECEIVE_DEGRADED_INFO_RESPONSE, GL),
		lL(j.RECEIVE_ACCESS_TOKEN, WL),
		lL(j.RESET_AUTHENTICATION_STATE, UL)
	]);
}
//#endregion
//#region src/state/sagas/index.js
var YL = /* @__PURE__ */ me({ default: () => ZL });
function* XL(e) {
	for (;;) try {
		yield SP(e);
		break;
	} catch (e) {
		console.log(e);
	}
}
function ZL(e = []) {
	return function* () {
		yield bP([
			HL,
			zL,
			bL,
			FL,
			JL,
			...e
		].map((e) => wP(XL, e)));
	};
}
//#endregion
//#region src/state/createStore.js
function QL(e, t = []) {
	let n = rL(e), r = pe.state.slice ? v({ [pe.state.slice]: n }) : n, i = IF(), o = c(r, RF(a(aN, i)));
	return i.run(ZL(t)), o;
}
//#endregion
//#region src/state/createPluggableStore.js
function $L(e, t = []) {
	let n = QM(t), r = QL(tN(n), rN(n));
	return r.dispatch(Ts((0, kp.default)(nN(n), e))), r;
}
//#endregion
//#region src/lib/MiradorViewer.jsx
var eR = class {
	constructor(e, t = {}) {
		this.plugins = QM(t.plugins || []), this.config = e, this.store = t.store || $L(this.config, this.plugins), e.id && this.renderInto(document.getElementById(e.id));
	}
	renderInto(e) {
		this.container = e, this.root = bi(this.container), this.root.render(this.render());
	}
	render(e = {}) {
		return /* @__PURE__ */ z(C, {
			store: this.store,
			children: /* @__PURE__ */ z(PM, {
				plugins: this.plugins,
				...e
			})
		});
	}
	unmount() {
		this.root && this.root.unmount();
	}
};
//#endregion
//#region src/init.js
function tR(e, t) {
	let n;
	return n = Array.isArray(t) ? { plugins: t } : t, new eR(e, n);
}
var nR = { viewer: tR }, rR = {
	actions: fc,
	createStore: QL,
	reducers: nL,
	sagas: YL,
	selectors: _s
}, iR = F[typeof document < "u" && document.createElement !== void 0 ? "useLayoutEffect" : "useEffect"], aR = (e) => {
	let t = P.useRef(e);
	return P.useEffect(() => {
		t.current = e;
	}), t;
};
//#endregion
//#region node_modules/@react-hook/resize-observer/dist/module/index.js
function oR() {}
function sR(e, t, n = {}) {
	let r = uR(n.polyfill), i = aR(t);
	return iR(() => {
		let t = !1, n = e && "current" in e ? e.current : e;
		if (!n) return oR;
		function a(e, n) {
			t || i.current(e, n);
		}
		return r.subscribe(n, a), () => {
			t = !0, r.unsubscribe(n, a);
		};
	}, [
		e,
		r,
		i
	]), r.observer;
}
function cR(e) {
	let t = !1, n = [], r = /* @__PURE__ */ new Map(), i = new (e || window.ResizeObserver)((e, i) => {
		n = n.concat(e);
		function a() {
			let e = /* @__PURE__ */ new Set();
			for (let t = 0; t < n.length; t++) e.has(n[t].target) || (e.add(n[t].target), r.get(n[t].target)?.forEach((e) => e(n[t], i)));
			n = [], t = !1;
		}
		t || window.requestAnimationFrame(a), t = !0;
	});
	return {
		observer: i,
		subscribe(e, t) {
			i.observe(e);
			let n = r.get(e) ?? [];
			n.push(t), r.set(e, n);
		},
		unsubscribe(e, t) {
			let n = r.get(e) ?? [];
			if (n.length === 1) {
				i.unobserve(e), r.delete(e);
				return;
			}
			let a = n.indexOf(t);
			a !== -1 && n.splice(a, 1), r.set(e, n);
		}
	};
}
var lR, uR = (e) => lR ||= cR(e), dR = typeof global == "object" && global && global.Object === Object && global, fR = typeof self == "object" && self && self.Object === Object && self, pR = dR || fR || Function("return this")(), mR = pR.Symbol, hR = Object.prototype, gR = hR.hasOwnProperty, _R = hR.toString, vR = mR ? mR.toStringTag : void 0;
function yR(e) {
	var t = gR.call(e, vR), n = e[vR];
	try {
		e[vR] = void 0;
		var r = !0;
	} catch {}
	var i = _R.call(e);
	return r && (t ? e[vR] = n : delete e[vR]), i;
}
//#endregion
//#region node_modules/lodash-es/_objectToString.js
var bR = Object.prototype.toString;
function xR(e) {
	return bR.call(e);
}
//#endregion
//#region node_modules/lodash-es/_baseGetTag.js
var SR = "[object Null]", CR = "[object Undefined]", wR = mR ? mR.toStringTag : void 0;
function TR(e) {
	return e == null ? e === void 0 ? CR : SR : wR && wR in Object(e) ? yR(e) : xR(e);
}
//#endregion
//#region node_modules/lodash-es/isObjectLike.js
function ER(e) {
	return typeof e == "object" && !!e;
}
//#endregion
//#region node_modules/lodash-es/isSymbol.js
var DR = "[object Symbol]";
function OR(e) {
	return typeof e == "symbol" || ER(e) && TR(e) == DR;
}
//#endregion
//#region node_modules/lodash-es/_arrayMap.js
function kR(e, t) {
	for (var n = -1, r = e == null ? 0 : e.length, i = Array(r); ++n < r;) i[n] = t(e[n], n, e);
	return i;
}
//#endregion
//#region node_modules/lodash-es/isArray.js
var AR = Array.isArray, jR = 1 / 0, MR = mR ? mR.prototype : void 0, NR = MR ? MR.toString : void 0;
function PR(e) {
	if (typeof e == "string") return e;
	if (AR(e)) return kR(e, PR) + "";
	if (OR(e)) return NR ? NR.call(e) : "";
	var t = e + "";
	return t == "0" && 1 / e == -jR ? "-0" : t;
}
//#endregion
//#region node_modules/lodash-es/_trimmedEndIndex.js
var FR = /\s/;
function IR(e) {
	for (var t = e.length; t-- && FR.test(e.charAt(t)););
	return t;
}
//#endregion
//#region node_modules/lodash-es/_baseTrim.js
var LR = /^\s+/;
function RR(e) {
	return e && e.slice(0, IR(e) + 1).replace(LR, "");
}
//#endregion
//#region node_modules/lodash-es/isObject.js
function zR(e) {
	var t = typeof e;
	return e != null && (t == "object" || t == "function");
}
//#endregion
//#region node_modules/lodash-es/toNumber.js
var BR = NaN, VR = /^[-+]0x[0-9a-f]+$/i, HR = /^0b[01]+$/i, UR = /^0o[0-7]+$/i, WR = parseInt;
function GR(e) {
	if (typeof e == "number") return e;
	if (OR(e)) return BR;
	if (zR(e)) {
		var t = typeof e.valueOf == "function" ? e.valueOf() : e;
		e = zR(t) ? t + "" : t;
	}
	if (typeof e != "string") return e === 0 ? e : +e;
	e = RR(e);
	var n = HR.test(e);
	return n || UR.test(e) ? WR(e.slice(2), n ? 2 : 8) : VR.test(e) ? BR : +e;
}
//#endregion
//#region node_modules/lodash-es/toFinite.js
var KR = 1 / 0, qR = 17976931348623157e292;
function JR(e) {
	return e ? (e = GR(e), e === KR || e === -KR ? (e < 0 ? -1 : 1) * qR : e === e ? e : 0) : e === 0 ? e : 0;
}
//#endregion
//#region node_modules/lodash-es/toInteger.js
function YR(e) {
	var t = JR(e), n = t % 1;
	return t === t ? n ? t - n : t : 0;
}
//#endregion
//#region node_modules/lodash-es/identity.js
function XR(e) {
	return e;
}
//#endregion
//#region node_modules/lodash-es/isFunction.js
var ZR = "[object AsyncFunction]", QR = "[object Function]", $R = "[object GeneratorFunction]", ez = "[object Proxy]";
function tz(e) {
	if (!zR(e)) return !1;
	var t = TR(e);
	return t == QR || t == $R || t == ZR || t == ez;
}
//#endregion
//#region node_modules/lodash-es/_coreJsData.js
var nz = pR["__core-js_shared__"], rz = function() {
	var e = /[^.]+$/.exec(nz && nz.keys && nz.keys.IE_PROTO || "");
	return e ? "Symbol(src)_1." + e : "";
}();
function iz(e) {
	return !!rz && rz in e;
}
//#endregion
//#region node_modules/lodash-es/_toSource.js
var az = Function.prototype.toString;
function oz(e) {
	if (e != null) {
		try {
			return az.call(e);
		} catch {}
		try {
			return e + "";
		} catch {}
	}
	return "";
}
//#endregion
//#region node_modules/lodash-es/_baseIsNative.js
var sz = /[\\^$.*+?()[\]{}|]/g, cz = /^\[object .+?Constructor\]$/, lz = Function.prototype, uz = Object.prototype, dz = lz.toString, fz = uz.hasOwnProperty, pz = RegExp("^" + dz.call(fz).replace(sz, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
function mz(e) {
	return !zR(e) || iz(e) ? !1 : (tz(e) ? pz : cz).test(oz(e));
}
//#endregion
//#region node_modules/lodash-es/_getValue.js
function hz(e, t) {
	return e?.[t];
}
//#endregion
//#region node_modules/lodash-es/_getNative.js
function gz(e, t) {
	var n = hz(e, t);
	return mz(n) ? n : void 0;
}
//#endregion
//#region node_modules/lodash-es/_WeakMap.js
var _z = gz(pR, "WeakMap"), vz = Object.create, yz = function() {
	function e() {}
	return function(t) {
		if (!zR(t)) return {};
		if (vz) return vz(t);
		e.prototype = t;
		var n = new e();
		return e.prototype = void 0, n;
	};
}();
//#endregion
//#region node_modules/lodash-es/_apply.js
function bz(e, t, n) {
	switch (n.length) {
		case 0: return e.call(t);
		case 1: return e.call(t, n[0]);
		case 2: return e.call(t, n[0], n[1]);
		case 3: return e.call(t, n[0], n[1], n[2]);
	}
	return e.apply(t, n);
}
//#endregion
//#region node_modules/lodash-es/noop.js
function xz() {}
//#endregion
//#region node_modules/lodash-es/_copyArray.js
function Sz(e, t) {
	var n = -1, r = e.length;
	for (t ||= Array(r); ++n < r;) t[n] = e[n];
	return t;
}
//#endregion
//#region node_modules/lodash-es/_shortOut.js
var Cz = 800, wz = 16, Tz = Date.now;
function Ez(e) {
	var t = 0, n = 0;
	return function() {
		var r = Tz(), i = wz - (r - n);
		if (n = r, i > 0) {
			if (++t >= Cz) return arguments[0];
		} else t = 0;
		return e.apply(void 0, arguments);
	};
}
//#endregion
//#region node_modules/lodash-es/constant.js
function Dz(e) {
	return function() {
		return e;
	};
}
//#endregion
//#region node_modules/lodash-es/_defineProperty.js
var Oz = function() {
	try {
		var e = gz(Object, "defineProperty");
		return e({}, "", {}), e;
	} catch {}
}(), kz = Ez(Oz ? function(e, t) {
	return Oz(e, "toString", {
		configurable: !0,
		enumerable: !1,
		value: Dz(t),
		writable: !0
	});
} : XR);
//#endregion
//#region node_modules/lodash-es/_arrayEach.js
function Az(e, t) {
	for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1;);
	return e;
}
//#endregion
//#region node_modules/lodash-es/_isIndex.js
var jz = 9007199254740991, Mz = /^(?:0|[1-9]\d*)$/;
function Nz(e, t) {
	var n = typeof e;
	return t ??= jz, !!t && (n == "number" || n != "symbol" && Mz.test(e)) && e > -1 && e % 1 == 0 && e < t;
}
//#endregion
//#region node_modules/lodash-es/_baseAssignValue.js
function Pz(e, t, n) {
	t == "__proto__" && Oz ? Oz(e, t, {
		configurable: !0,
		enumerable: !0,
		value: n,
		writable: !0
	}) : e[t] = n;
}
//#endregion
//#region node_modules/lodash-es/eq.js
function Fz(e, t) {
	return e === t || e !== e && t !== t;
}
//#endregion
//#region node_modules/lodash-es/_assignValue.js
var Iz = Object.prototype.hasOwnProperty;
function Lz(e, t, n) {
	var r = e[t];
	(!(Iz.call(e, t) && Fz(r, n)) || n === void 0 && !(t in e)) && Pz(e, t, n);
}
//#endregion
//#region node_modules/lodash-es/_copyObject.js
function Rz(e, t, n, r) {
	var i = !n;
	n ||= {};
	for (var a = -1, o = t.length; ++a < o;) {
		var s = t[a], c = r ? r(n[s], e[s], s, n, e) : void 0;
		c === void 0 && (c = e[s]), i ? Pz(n, s, c) : Lz(n, s, c);
	}
	return n;
}
//#endregion
//#region node_modules/lodash-es/_overRest.js
var zz = Math.max;
function Bz(e, t, n) {
	return t = zz(t === void 0 ? e.length - 1 : t, 0), function() {
		for (var r = arguments, i = -1, a = zz(r.length - t, 0), o = Array(a); ++i < a;) o[i] = r[t + i];
		i = -1;
		for (var s = Array(t + 1); ++i < t;) s[i] = r[i];
		return s[t] = n(o), bz(e, this, s);
	};
}
//#endregion
//#region node_modules/lodash-es/_baseRest.js
function Vz(e, t) {
	return kz(Bz(e, t, XR), e + "");
}
//#endregion
//#region node_modules/lodash-es/isLength.js
var Hz = 9007199254740991;
function Uz(e) {
	return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Hz;
}
//#endregion
//#region node_modules/lodash-es/isArrayLike.js
function Wz(e) {
	return e != null && Uz(e.length) && !tz(e);
}
//#endregion
//#region node_modules/lodash-es/_isPrototype.js
var Gz = Object.prototype;
function Kz(e) {
	var t = e && e.constructor;
	return e === (typeof t == "function" && t.prototype || Gz);
}
//#endregion
//#region node_modules/lodash-es/_baseTimes.js
function qz(e, t) {
	for (var n = -1, r = Array(e); ++n < e;) r[n] = t(n);
	return r;
}
//#endregion
//#region node_modules/lodash-es/_baseIsArguments.js
var Jz = "[object Arguments]";
function Yz(e) {
	return ER(e) && TR(e) == Jz;
}
//#endregion
//#region node_modules/lodash-es/isArguments.js
var Xz = Object.prototype, Zz = Xz.hasOwnProperty, Qz = Xz.propertyIsEnumerable, $z = Yz(function() {
	return arguments;
}()) ? Yz : function(e) {
	return ER(e) && Zz.call(e, "callee") && !Qz.call(e, "callee");
};
//#endregion
//#region node_modules/lodash-es/stubFalse.js
function eB() {
	return !1;
}
//#endregion
//#region node_modules/lodash-es/isBuffer.js
var tB = typeof exports == "object" && exports && !exports.nodeType && exports, nB = tB && typeof module == "object" && module && !module.nodeType && module, rB = nB && nB.exports === tB ? pR.Buffer : void 0, iB = (rB ? rB.isBuffer : void 0) || eB, aB = "[object Arguments]", oB = "[object Array]", sB = "[object Boolean]", cB = "[object Date]", lB = "[object Error]", uB = "[object Function]", dB = "[object Map]", fB = "[object Number]", pB = "[object Object]", mB = "[object RegExp]", hB = "[object Set]", gB = "[object String]", _B = "[object WeakMap]", vB = "[object ArrayBuffer]", yB = "[object DataView]", bB = "[object Float32Array]", xB = "[object Float64Array]", SB = "[object Int8Array]", CB = "[object Int16Array]", wB = "[object Int32Array]", TB = "[object Uint8Array]", EB = "[object Uint8ClampedArray]", DB = "[object Uint16Array]", OB = "[object Uint32Array]", kB = {};
kB[bB] = kB[xB] = kB[SB] = kB[CB] = kB[wB] = kB[TB] = kB[EB] = kB[DB] = kB[OB] = !0, kB[aB] = kB[oB] = kB[vB] = kB[sB] = kB[yB] = kB[cB] = kB[lB] = kB[uB] = kB[dB] = kB[fB] = kB[pB] = kB[mB] = kB[hB] = kB[gB] = kB[_B] = !1;
function AB(e) {
	return ER(e) && Uz(e.length) && !!kB[TR(e)];
}
//#endregion
//#region node_modules/lodash-es/_baseUnary.js
function jB(e) {
	return function(t) {
		return e(t);
	};
}
//#endregion
//#region node_modules/lodash-es/_nodeUtil.js
var MB = typeof exports == "object" && exports && !exports.nodeType && exports, NB = MB && typeof module == "object" && module && !module.nodeType && module, PB = NB && NB.exports === MB && dR.process, FB = function() {
	try {
		return NB && NB.require && NB.require("util").types || PB && PB.binding && PB.binding("util");
	} catch {}
}(), IB = FB && FB.isTypedArray, LB = IB ? jB(IB) : AB, RB = Object.prototype.hasOwnProperty;
function zB(e, t) {
	var n = AR(e), r = !n && $z(e), i = !n && !r && iB(e), a = !n && !r && !i && LB(e), o = n || r || i || a, s = o ? qz(e.length, String) : [], c = s.length;
	for (var l in e) (t || RB.call(e, l)) && !(o && (l == "length" || i && (l == "offset" || l == "parent") || a && (l == "buffer" || l == "byteLength" || l == "byteOffset") || Nz(l, c))) && s.push(l);
	return s;
}
//#endregion
//#region node_modules/lodash-es/_overArg.js
function BB(e, t) {
	return function(n) {
		return e(t(n));
	};
}
//#endregion
//#region node_modules/lodash-es/_nativeKeys.js
var VB = BB(Object.keys, Object), HB = Object.prototype.hasOwnProperty;
function UB(e) {
	if (!Kz(e)) return VB(e);
	var t = [];
	for (var n in Object(e)) HB.call(e, n) && n != "constructor" && t.push(n);
	return t;
}
//#endregion
//#region node_modules/lodash-es/keys.js
function WB(e) {
	return Wz(e) ? zB(e) : UB(e);
}
//#endregion
//#region node_modules/lodash-es/_nativeKeysIn.js
function GB(e) {
	var t = [];
	if (e != null) for (var n in Object(e)) t.push(n);
	return t;
}
//#endregion
//#region node_modules/lodash-es/_baseKeysIn.js
var KB = Object.prototype.hasOwnProperty;
function qB(e) {
	if (!zR(e)) return GB(e);
	var t = Kz(e), n = [];
	for (var r in e) r == "constructor" && (t || !KB.call(e, r)) || n.push(r);
	return n;
}
//#endregion
//#region node_modules/lodash-es/keysIn.js
function JB(e) {
	return Wz(e) ? zB(e, !0) : qB(e);
}
//#endregion
//#region node_modules/lodash-es/_nativeCreate.js
var YB = gz(Object, "create");
//#endregion
//#region node_modules/lodash-es/_hashClear.js
function XB() {
	this.__data__ = YB ? YB(null) : {}, this.size = 0;
}
//#endregion
//#region node_modules/lodash-es/_hashDelete.js
function ZB(e) {
	var t = this.has(e) && delete this.__data__[e];
	return this.size -= +!!t, t;
}
//#endregion
//#region node_modules/lodash-es/_hashGet.js
var QB = "__lodash_hash_undefined__", $B = Object.prototype.hasOwnProperty;
function eV(e) {
	var t = this.__data__;
	if (YB) {
		var n = t[e];
		return n === QB ? void 0 : n;
	}
	return $B.call(t, e) ? t[e] : void 0;
}
//#endregion
//#region node_modules/lodash-es/_hashHas.js
var tV = Object.prototype.hasOwnProperty;
function nV(e) {
	var t = this.__data__;
	return YB ? t[e] !== void 0 : tV.call(t, e);
}
//#endregion
//#region node_modules/lodash-es/_hashSet.js
var rV = "__lodash_hash_undefined__";
function iV(e, t) {
	var n = this.__data__;
	return this.size += +!this.has(e), n[e] = YB && t === void 0 ? rV : t, this;
}
//#endregion
//#region node_modules/lodash-es/_Hash.js
function aV(e) {
	var t = -1, n = e == null ? 0 : e.length;
	for (this.clear(); ++t < n;) {
		var r = e[t];
		this.set(r[0], r[1]);
	}
}
aV.prototype.clear = XB, aV.prototype.delete = ZB, aV.prototype.get = eV, aV.prototype.has = nV, aV.prototype.set = iV;
//#endregion
//#region node_modules/lodash-es/_listCacheClear.js
function oV() {
	this.__data__ = [], this.size = 0;
}
//#endregion
//#region node_modules/lodash-es/_assocIndexOf.js
function sV(e, t) {
	for (var n = e.length; n--;) if (Fz(e[n][0], t)) return n;
	return -1;
}
//#endregion
//#region node_modules/lodash-es/_listCacheDelete.js
var cV = Array.prototype.splice;
function lV(e) {
	var t = this.__data__, n = sV(t, e);
	return n < 0 ? !1 : (n == t.length - 1 ? t.pop() : cV.call(t, n, 1), --this.size, !0);
}
//#endregion
//#region node_modules/lodash-es/_listCacheGet.js
function uV(e) {
	var t = this.__data__, n = sV(t, e);
	return n < 0 ? void 0 : t[n][1];
}
//#endregion
//#region node_modules/lodash-es/_listCacheHas.js
function dV(e) {
	return sV(this.__data__, e) > -1;
}
//#endregion
//#region node_modules/lodash-es/_listCacheSet.js
function fV(e, t) {
	var n = this.__data__, r = sV(n, e);
	return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
}
//#endregion
//#region node_modules/lodash-es/_ListCache.js
function pV(e) {
	var t = -1, n = e == null ? 0 : e.length;
	for (this.clear(); ++t < n;) {
		var r = e[t];
		this.set(r[0], r[1]);
	}
}
pV.prototype.clear = oV, pV.prototype.delete = lV, pV.prototype.get = uV, pV.prototype.has = dV, pV.prototype.set = fV;
//#endregion
//#region node_modules/lodash-es/_Map.js
var mV = gz(pR, "Map");
//#endregion
//#region node_modules/lodash-es/_mapCacheClear.js
function hV() {
	this.size = 0, this.__data__ = {
		hash: new aV(),
		map: new (mV || pV)(),
		string: new aV()
	};
}
//#endregion
//#region node_modules/lodash-es/_isKeyable.js
function gV(e) {
	var t = typeof e;
	return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
}
//#endregion
//#region node_modules/lodash-es/_getMapData.js
function _V(e, t) {
	var n = e.__data__;
	return gV(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
}
//#endregion
//#region node_modules/lodash-es/_mapCacheDelete.js
function vV(e) {
	var t = _V(this, e).delete(e);
	return this.size -= +!!t, t;
}
//#endregion
//#region node_modules/lodash-es/_mapCacheGet.js
function yV(e) {
	return _V(this, e).get(e);
}
//#endregion
//#region node_modules/lodash-es/_mapCacheHas.js
function bV(e) {
	return _V(this, e).has(e);
}
//#endregion
//#region node_modules/lodash-es/_mapCacheSet.js
function xV(e, t) {
	var n = _V(this, e), r = n.size;
	return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
}
//#endregion
//#region node_modules/lodash-es/_MapCache.js
function SV(e) {
	var t = -1, n = e == null ? 0 : e.length;
	for (this.clear(); ++t < n;) {
		var r = e[t];
		this.set(r[0], r[1]);
	}
}
SV.prototype.clear = hV, SV.prototype.delete = vV, SV.prototype.get = yV, SV.prototype.has = bV, SV.prototype.set = xV;
//#endregion
//#region node_modules/lodash-es/toString.js
function CV(e) {
	return e == null ? "" : PR(e);
}
//#endregion
//#region node_modules/lodash-es/_arrayPush.js
function wV(e, t) {
	for (var n = -1, r = t.length, i = e.length; ++n < r;) e[i + n] = t[n];
	return e;
}
//#endregion
//#region node_modules/lodash-es/_isFlattenable.js
var TV = mR ? mR.isConcatSpreadable : void 0;
function EV(e) {
	return AR(e) || $z(e) || !!(TV && e && e[TV]);
}
//#endregion
//#region node_modules/lodash-es/_baseFlatten.js
function DV(e, t, n, r, i) {
	var a = -1, o = e.length;
	for (n ||= EV, i ||= []; ++a < o;) {
		var s = e[a];
		t > 0 && n(s) ? t > 1 ? DV(s, t - 1, n, r, i) : wV(i, s) : r || (i[i.length] = s);
	}
	return i;
}
//#endregion
//#region node_modules/lodash-es/flatten.js
function OV(e) {
	return e != null && e.length ? DV(e, 1) : [];
}
//#endregion
//#region node_modules/lodash-es/_getPrototype.js
var kV = BB(Object.getPrototypeOf, Object);
//#endregion
//#region node_modules/lodash-es/_baseSlice.js
function AV(e, t, n) {
	var r = -1, i = e.length;
	t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0;
	for (var a = Array(i); ++r < i;) a[r] = e[r + t];
	return a;
}
//#endregion
//#region node_modules/lodash-es/_arrayReduce.js
function jV(e, t, n, r) {
	var i = -1, a = e == null ? 0 : e.length;
	for (r && a && (n = e[++i]); ++i < a;) n = t(n, e[i], i, e);
	return n;
}
//#endregion
//#region node_modules/lodash-es/_basePropertyOf.js
function MV(e) {
	return function(t) {
		return e?.[t];
	};
}
//#endregion
//#region node_modules/lodash-es/_deburrLetter.js
var NV = MV({
	À: "A",
	Á: "A",
	Â: "A",
	Ã: "A",
	Ä: "A",
	Å: "A",
	à: "a",
	á: "a",
	â: "a",
	ã: "a",
	ä: "a",
	å: "a",
	Ç: "C",
	ç: "c",
	Ð: "D",
	ð: "d",
	È: "E",
	É: "E",
	Ê: "E",
	Ë: "E",
	è: "e",
	é: "e",
	ê: "e",
	ë: "e",
	Ì: "I",
	Í: "I",
	Î: "I",
	Ï: "I",
	ì: "i",
	í: "i",
	î: "i",
	ï: "i",
	Ñ: "N",
	ñ: "n",
	Ò: "O",
	Ó: "O",
	Ô: "O",
	Õ: "O",
	Ö: "O",
	Ø: "O",
	ò: "o",
	ó: "o",
	ô: "o",
	õ: "o",
	ö: "o",
	ø: "o",
	Ù: "U",
	Ú: "U",
	Û: "U",
	Ü: "U",
	ù: "u",
	ú: "u",
	û: "u",
	ü: "u",
	Ý: "Y",
	ý: "y",
	ÿ: "y",
	Æ: "Ae",
	æ: "ae",
	Þ: "Th",
	þ: "th",
	ß: "ss",
	Ā: "A",
	Ă: "A",
	Ą: "A",
	ā: "a",
	ă: "a",
	ą: "a",
	Ć: "C",
	Ĉ: "C",
	Ċ: "C",
	Č: "C",
	ć: "c",
	ĉ: "c",
	ċ: "c",
	č: "c",
	Ď: "D",
	Đ: "D",
	ď: "d",
	đ: "d",
	Ē: "E",
	Ĕ: "E",
	Ė: "E",
	Ę: "E",
	Ě: "E",
	ē: "e",
	ĕ: "e",
	ė: "e",
	ę: "e",
	ě: "e",
	Ĝ: "G",
	Ğ: "G",
	Ġ: "G",
	Ģ: "G",
	ĝ: "g",
	ğ: "g",
	ġ: "g",
	ģ: "g",
	Ĥ: "H",
	Ħ: "H",
	ĥ: "h",
	ħ: "h",
	Ĩ: "I",
	Ī: "I",
	Ĭ: "I",
	Į: "I",
	İ: "I",
	ĩ: "i",
	ī: "i",
	ĭ: "i",
	į: "i",
	ı: "i",
	Ĵ: "J",
	ĵ: "j",
	Ķ: "K",
	ķ: "k",
	ĸ: "k",
	Ĺ: "L",
	Ļ: "L",
	Ľ: "L",
	Ŀ: "L",
	Ł: "L",
	ĺ: "l",
	ļ: "l",
	ľ: "l",
	ŀ: "l",
	ł: "l",
	Ń: "N",
	Ņ: "N",
	Ň: "N",
	Ŋ: "N",
	ń: "n",
	ņ: "n",
	ň: "n",
	ŋ: "n",
	Ō: "O",
	Ŏ: "O",
	Ő: "O",
	ō: "o",
	ŏ: "o",
	ő: "o",
	Ŕ: "R",
	Ŗ: "R",
	Ř: "R",
	ŕ: "r",
	ŗ: "r",
	ř: "r",
	Ś: "S",
	Ŝ: "S",
	Ş: "S",
	Š: "S",
	ś: "s",
	ŝ: "s",
	ş: "s",
	š: "s",
	Ţ: "T",
	Ť: "T",
	Ŧ: "T",
	ţ: "t",
	ť: "t",
	ŧ: "t",
	Ũ: "U",
	Ū: "U",
	Ŭ: "U",
	Ů: "U",
	Ű: "U",
	Ų: "U",
	ũ: "u",
	ū: "u",
	ŭ: "u",
	ů: "u",
	ű: "u",
	ų: "u",
	Ŵ: "W",
	ŵ: "w",
	Ŷ: "Y",
	ŷ: "y",
	Ÿ: "Y",
	Ź: "Z",
	Ż: "Z",
	Ž: "Z",
	ź: "z",
	ż: "z",
	ž: "z",
	IJ: "IJ",
	ij: "ij",
	Œ: "Oe",
	œ: "oe",
	ʼn: "'n",
	ſ: "s"
}), PV = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, FV = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g");
function IV(e) {
	return e = CV(e), e && e.replace(PV, NV).replace(FV, "");
}
//#endregion
//#region node_modules/lodash-es/_asciiWords.js
var LV = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
function RV(e) {
	return e.match(LV) || [];
}
//#endregion
//#region node_modules/lodash-es/_hasUnicodeWord.js
var zV = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
function BV(e) {
	return zV.test(e);
}
//#endregion
//#region node_modules/lodash-es/_unicodeWords.js
var VV = "\\ud800-\\udfff", HV = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", UV = "\\u2700-\\u27bf", WV = "a-z\\xdf-\\xf6\\xf8-\\xff", GV = "\\xac\\xb1\\xd7\\xf7", KV = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", qV = "\\u2000-\\u206f", JV = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", YV = "A-Z\\xc0-\\xd6\\xd8-\\xde", XV = "\\ufe0e\\ufe0f", ZV = GV + KV + qV + JV, QV = "['’]", $V = "[" + ZV + "]", eH = "[" + HV + "]", tH = "\\d+", nH = "[" + UV + "]", rH = "[" + WV + "]", iH = "[^" + VV + ZV + tH + UV + WV + YV + "]", aH = "(?:" + eH + "|\\ud83c[\\udffb-\\udfff])", oH = "[^" + VV + "]", sH = "(?:\\ud83c[\\udde6-\\uddff]){2}", cH = "[\\ud800-\\udbff][\\udc00-\\udfff]", lH = "[" + YV + "]", uH = "\\u200d", dH = "(?:" + rH + "|" + iH + ")", fH = "(?:" + lH + "|" + iH + ")", pH = "(?:" + QV + "(?:d|ll|m|re|s|t|ve))?", mH = "(?:" + QV + "(?:D|LL|M|RE|S|T|VE))?", hH = aH + "?", gH = "[" + XV + "]?", _H = "(?:" + uH + "(?:" + [
	oH,
	sH,
	cH
].join("|") + ")" + gH + hH + ")*", vH = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", yH = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", bH = gH + hH + _H, xH = "(?:" + [
	nH,
	sH,
	cH
].join("|") + ")" + bH, SH = RegExp([
	lH + "?" + rH + "+" + pH + "(?=" + [
		$V,
		lH,
		"$"
	].join("|") + ")",
	fH + "+" + mH + "(?=" + [
		$V,
		lH + dH,
		"$"
	].join("|") + ")",
	lH + "?" + dH + "+" + pH,
	lH + "+" + mH,
	yH,
	vH,
	tH,
	xH
].join("|"), "g");
function CH(e) {
	return e.match(SH) || [];
}
//#endregion
//#region node_modules/lodash-es/words.js
function wH(e, t, n) {
	return e = CV(e), t = n ? void 0 : t, t === void 0 ? BV(e) ? CH(e) : RV(e) : e.match(t) || [];
}
//#endregion
//#region node_modules/lodash-es/_createCompounder.js
var TH = RegExp("['’]", "g");
function EH(e) {
	return function(t) {
		return jV(wH(IV(t).replace(TH, "")), e, "");
	};
}
//#endregion
//#region node_modules/lodash-es/_baseClamp.js
function DH(e, t, n) {
	return e === e && (n !== void 0 && (e = e <= n ? e : n), t !== void 0 && (e = e >= t ? e : t)), e;
}
//#endregion
//#region node_modules/lodash-es/clamp.js
function OH(e, t, n) {
	return n === void 0 && (n = t, t = void 0), n !== void 0 && (n = GR(n), n = n === n ? n : 0), t !== void 0 && (t = GR(t), t = t === t ? t : 0), DH(GR(e), t, n);
}
//#endregion
//#region node_modules/lodash-es/_stackClear.js
function kH() {
	this.__data__ = new pV(), this.size = 0;
}
//#endregion
//#region node_modules/lodash-es/_stackDelete.js
function AH(e) {
	var t = this.__data__, n = t.delete(e);
	return this.size = t.size, n;
}
//#endregion
//#region node_modules/lodash-es/_stackGet.js
function jH(e) {
	return this.__data__.get(e);
}
//#endregion
//#region node_modules/lodash-es/_stackHas.js
function MH(e) {
	return this.__data__.has(e);
}
//#endregion
//#region node_modules/lodash-es/_stackSet.js
var NH = 200;
function PH(e, t) {
	var n = this.__data__;
	if (n instanceof pV) {
		var r = n.__data__;
		if (!mV || r.length < NH - 1) return r.push([e, t]), this.size = ++n.size, this;
		n = this.__data__ = new SV(r);
	}
	return n.set(e, t), this.size = n.size, this;
}
//#endregion
//#region node_modules/lodash-es/_Stack.js
function FH(e) {
	var t = this.__data__ = new pV(e);
	this.size = t.size;
}
FH.prototype.clear = kH, FH.prototype.delete = AH, FH.prototype.get = jH, FH.prototype.has = MH, FH.prototype.set = PH;
//#endregion
//#region node_modules/lodash-es/_baseAssign.js
function IH(e, t) {
	return e && Rz(t, WB(t), e);
}
//#endregion
//#region node_modules/lodash-es/_baseAssignIn.js
function LH(e, t) {
	return e && Rz(t, JB(t), e);
}
//#endregion
//#region node_modules/lodash-es/_cloneBuffer.js
var RH = typeof exports == "object" && exports && !exports.nodeType && exports, zH = RH && typeof module == "object" && module && !module.nodeType && module, BH = zH && zH.exports === RH ? pR.Buffer : void 0, VH = BH ? BH.allocUnsafe : void 0;
function HH(e, t) {
	if (t) return e.slice();
	var n = e.length, r = VH ? VH(n) : new e.constructor(n);
	return e.copy(r), r;
}
//#endregion
//#region node_modules/lodash-es/_arrayFilter.js
function UH(e, t) {
	for (var n = -1, r = e == null ? 0 : e.length, i = 0, a = []; ++n < r;) {
		var o = e[n];
		t(o, n, e) && (a[i++] = o);
	}
	return a;
}
//#endregion
//#region node_modules/lodash-es/stubArray.js
function WH() {
	return [];
}
//#endregion
//#region node_modules/lodash-es/_getSymbols.js
var GH = Object.prototype.propertyIsEnumerable, KH = Object.getOwnPropertySymbols, qH = KH ? function(e) {
	return e == null ? [] : (e = Object(e), UH(KH(e), function(t) {
		return GH.call(e, t);
	}));
} : WH;
//#endregion
//#region node_modules/lodash-es/_copySymbols.js
function JH(e, t) {
	return Rz(e, qH(e), t);
}
//#endregion
//#region node_modules/lodash-es/_getSymbolsIn.js
var YH = Object.getOwnPropertySymbols ? function(e) {
	for (var t = []; e;) wV(t, qH(e)), e = kV(e);
	return t;
} : WH;
//#endregion
//#region node_modules/lodash-es/_copySymbolsIn.js
function XH(e, t) {
	return Rz(e, YH(e), t);
}
//#endregion
//#region node_modules/lodash-es/_baseGetAllKeys.js
function ZH(e, t, n) {
	var r = t(e);
	return AR(e) ? r : wV(r, n(e));
}
//#endregion
//#region node_modules/lodash-es/_getAllKeys.js
function QH(e) {
	return ZH(e, WB, qH);
}
//#endregion
//#region node_modules/lodash-es/_getAllKeysIn.js
function $H(e) {
	return ZH(e, JB, YH);
}
//#endregion
//#region node_modules/lodash-es/_DataView.js
var eU = gz(pR, "DataView"), tU = gz(pR, "Promise"), nU = gz(pR, "Set"), rU = "[object Map]", iU = "[object Object]", aU = "[object Promise]", oU = "[object Set]", sU = "[object WeakMap]", cU = "[object DataView]", lU = oz(eU), uU = oz(mV), dU = oz(tU), fU = oz(nU), pU = oz(_z), mU = TR;
(eU && mU(new eU(/* @__PURE__ */ new ArrayBuffer(1))) != cU || mV && mU(new mV()) != rU || tU && mU(tU.resolve()) != aU || nU && mU(new nU()) != oU || _z && mU(new _z()) != sU) && (mU = function(e) {
	var t = TR(e), n = t == iU ? e.constructor : void 0, r = n ? oz(n) : "";
	if (r) switch (r) {
		case lU: return cU;
		case uU: return rU;
		case dU: return aU;
		case fU: return oU;
		case pU: return sU;
	}
	return t;
});
var hU = mU, gU = Object.prototype.hasOwnProperty;
function _U(e) {
	var t = e.length, n = new e.constructor(t);
	return t && typeof e[0] == "string" && gU.call(e, "index") && (n.index = e.index, n.input = e.input), n;
}
//#endregion
//#region node_modules/lodash-es/_Uint8Array.js
var vU = pR.Uint8Array;
//#endregion
//#region node_modules/lodash-es/_cloneArrayBuffer.js
function yU(e) {
	var t = new e.constructor(e.byteLength);
	return new vU(t).set(new vU(e)), t;
}
//#endregion
//#region node_modules/lodash-es/_cloneDataView.js
function bU(e, t) {
	var n = t ? yU(e.buffer) : e.buffer;
	return new e.constructor(n, e.byteOffset, e.byteLength);
}
//#endregion
//#region node_modules/lodash-es/_cloneRegExp.js
var xU = /\w*$/;
function SU(e) {
	var t = new e.constructor(e.source, xU.exec(e));
	return t.lastIndex = e.lastIndex, t;
}
//#endregion
//#region node_modules/lodash-es/_cloneSymbol.js
var CU = mR ? mR.prototype : void 0, wU = CU ? CU.valueOf : void 0;
function TU(e) {
	return wU ? Object(wU.call(e)) : {};
}
//#endregion
//#region node_modules/lodash-es/_cloneTypedArray.js
function EU(e, t) {
	var n = t ? yU(e.buffer) : e.buffer;
	return new e.constructor(n, e.byteOffset, e.length);
}
//#endregion
//#region node_modules/lodash-es/_initCloneByTag.js
var DU = "[object Boolean]", OU = "[object Date]", kU = "[object Map]", AU = "[object Number]", jU = "[object RegExp]", MU = "[object Set]", NU = "[object String]", PU = "[object Symbol]", FU = "[object ArrayBuffer]", IU = "[object DataView]", LU = "[object Float32Array]", RU = "[object Float64Array]", zU = "[object Int8Array]", BU = "[object Int16Array]", VU = "[object Int32Array]", HU = "[object Uint8Array]", UU = "[object Uint8ClampedArray]", WU = "[object Uint16Array]", GU = "[object Uint32Array]";
function KU(e, t, n) {
	var r = e.constructor;
	switch (t) {
		case FU: return yU(e);
		case DU:
		case OU: return new r(+e);
		case IU: return bU(e, n);
		case LU:
		case RU:
		case zU:
		case BU:
		case VU:
		case HU:
		case UU:
		case WU:
		case GU: return EU(e, n);
		case kU: return new r();
		case AU:
		case NU: return new r(e);
		case jU: return SU(e);
		case MU: return new r();
		case PU: return TU(e);
	}
}
//#endregion
//#region node_modules/lodash-es/_initCloneObject.js
function qU(e) {
	return typeof e.constructor == "function" && !Kz(e) ? yz(kV(e)) : {};
}
//#endregion
//#region node_modules/lodash-es/_baseIsMap.js
var JU = "[object Map]";
function YU(e) {
	return ER(e) && hU(e) == JU;
}
//#endregion
//#region node_modules/lodash-es/isMap.js
var XU = FB && FB.isMap, ZU = XU ? jB(XU) : YU, QU = "[object Set]";
function $U(e) {
	return ER(e) && hU(e) == QU;
}
//#endregion
//#region node_modules/lodash-es/isSet.js
var eW = FB && FB.isSet, tW = eW ? jB(eW) : $U, nW = 1, rW = 2, iW = 4, aW = "[object Arguments]", oW = "[object Array]", sW = "[object Boolean]", cW = "[object Date]", lW = "[object Error]", uW = "[object Function]", dW = "[object GeneratorFunction]", fW = "[object Map]", pW = "[object Number]", mW = "[object Object]", hW = "[object RegExp]", gW = "[object Set]", _W = "[object String]", vW = "[object Symbol]", yW = "[object WeakMap]", bW = "[object ArrayBuffer]", xW = "[object DataView]", SW = "[object Float32Array]", CW = "[object Float64Array]", wW = "[object Int8Array]", TW = "[object Int16Array]", EW = "[object Int32Array]", DW = "[object Uint8Array]", OW = "[object Uint8ClampedArray]", kW = "[object Uint16Array]", AW = "[object Uint32Array]", jW = {};
jW[aW] = jW[oW] = jW[bW] = jW[xW] = jW[sW] = jW[cW] = jW[SW] = jW[CW] = jW[wW] = jW[TW] = jW[EW] = jW[fW] = jW[pW] = jW[mW] = jW[hW] = jW[gW] = jW[_W] = jW[vW] = jW[DW] = jW[OW] = jW[kW] = jW[AW] = !0, jW[lW] = jW[uW] = jW[yW] = !1;
function MW(e, t, n, r, i, a) {
	var o, s = t & nW, c = t & rW, l = t & iW;
	if (n && (o = i ? n(e, r, i, a) : n(e)), o !== void 0) return o;
	if (!zR(e)) return e;
	var u = AR(e);
	if (u) {
		if (o = _U(e), !s) return Sz(e, o);
	} else {
		var d = hU(e), f = d == uW || d == dW;
		if (iB(e)) return HH(e, s);
		if (d == mW || d == aW || f && !i) {
			if (o = c || f ? {} : qU(e), !s) return c ? XH(e, LH(o, e)) : JH(e, IH(o, e));
		} else {
			if (!jW[d]) return i ? e : {};
			o = KU(e, d, s);
		}
	}
	a ||= new FH();
	var p = a.get(e);
	if (p) return p;
	a.set(e, o), tW(e) ? e.forEach(function(r) {
		o.add(MW(r, t, n, r, e, a));
	}) : ZU(e) && e.forEach(function(r, i) {
		o.set(i, MW(r, t, n, i, e, a));
	});
	var m = u ? void 0 : (l ? c ? $H : QH : c ? JB : WB)(e);
	return Az(m || e, function(r, i) {
		m && (i = r, r = e[i]), Lz(o, i, MW(r, t, n, i, e, a));
	}), o;
}
//#endregion
//#region node_modules/lodash-es/clone.js
var NW = 4;
function PW(e) {
	return MW(e, NW);
}
//#endregion
//#region node_modules/lodash-es/_setCacheAdd.js
var FW = "__lodash_hash_undefined__";
function IW(e) {
	return this.__data__.set(e, FW), this;
}
//#endregion
//#region node_modules/lodash-es/_setCacheHas.js
function LW(e) {
	return this.__data__.has(e);
}
//#endregion
//#region node_modules/lodash-es/_SetCache.js
function RW(e) {
	var t = -1, n = e == null ? 0 : e.length;
	for (this.__data__ = new SV(); ++t < n;) this.add(e[t]);
}
RW.prototype.add = RW.prototype.push = IW, RW.prototype.has = LW;
//#endregion
//#region node_modules/lodash-es/_arraySome.js
function zW(e, t) {
	for (var n = -1, r = e == null ? 0 : e.length; ++n < r;) if (t(e[n], n, e)) return !0;
	return !1;
}
//#endregion
//#region node_modules/lodash-es/_cacheHas.js
function BW(e, t) {
	return e.has(t);
}
//#endregion
//#region node_modules/lodash-es/_equalArrays.js
var VW = 1, HW = 2;
function UW(e, t, n, r, i, a) {
	var o = n & VW, s = e.length, c = t.length;
	if (s != c && !(o && c > s)) return !1;
	var l = a.get(e), u = a.get(t);
	if (l && u) return l == t && u == e;
	var d = -1, f = !0, p = n & HW ? new RW() : void 0;
	for (a.set(e, t), a.set(t, e); ++d < s;) {
		var m = e[d], h = t[d];
		if (r) var g = o ? r(h, m, d, t, e, a) : r(m, h, d, e, t, a);
		if (g !== void 0) {
			if (g) continue;
			f = !1;
			break;
		}
		if (p) {
			if (!zW(t, function(e, t) {
				if (!BW(p, t) && (m === e || i(m, e, n, r, a))) return p.push(t);
			})) {
				f = !1;
				break;
			}
		} else if (!(m === h || i(m, h, n, r, a))) {
			f = !1;
			break;
		}
	}
	return a.delete(e), a.delete(t), f;
}
//#endregion
//#region node_modules/lodash-es/_mapToArray.js
function WW(e) {
	var t = -1, n = Array(e.size);
	return e.forEach(function(e, r) {
		n[++t] = [r, e];
	}), n;
}
//#endregion
//#region node_modules/lodash-es/_setToArray.js
function GW(e) {
	var t = -1, n = Array(e.size);
	return e.forEach(function(e) {
		n[++t] = e;
	}), n;
}
//#endregion
//#region node_modules/lodash-es/_equalByTag.js
var KW = 1, qW = 2, JW = "[object Boolean]", YW = "[object Date]", XW = "[object Error]", ZW = "[object Map]", QW = "[object Number]", $W = "[object RegExp]", eG = "[object Set]", tG = "[object String]", nG = "[object Symbol]", rG = "[object ArrayBuffer]", iG = "[object DataView]", aG = mR ? mR.prototype : void 0, oG = aG ? aG.valueOf : void 0;
function sG(e, t, n, r, i, a, o) {
	switch (n) {
		case iG:
			if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset) return !1;
			e = e.buffer, t = t.buffer;
		case rG: return !(e.byteLength != t.byteLength || !a(new vU(e), new vU(t)));
		case JW:
		case YW:
		case QW: return Fz(+e, +t);
		case XW: return e.name == t.name && e.message == t.message;
		case $W:
		case tG: return e == t + "";
		case ZW: var s = WW;
		case eG:
			var c = r & KW;
			if (s ||= GW, e.size != t.size && !c) return !1;
			var l = o.get(e);
			if (l) return l == t;
			r |= qW, o.set(e, t);
			var u = UW(s(e), s(t), r, i, a, o);
			return o.delete(e), u;
		case nG: if (oG) return oG.call(e) == oG.call(t);
	}
	return !1;
}
//#endregion
//#region node_modules/lodash-es/_equalObjects.js
var cG = 1, lG = Object.prototype.hasOwnProperty;
function uG(e, t, n, r, i, a) {
	var o = n & cG, s = QH(e), c = s.length;
	if (c != QH(t).length && !o) return !1;
	for (var l = c; l--;) {
		var u = s[l];
		if (!(o ? u in t : lG.call(t, u))) return !1;
	}
	var d = a.get(e), f = a.get(t);
	if (d && f) return d == t && f == e;
	var p = !0;
	a.set(e, t), a.set(t, e);
	for (var m = o; ++l < c;) {
		u = s[l];
		var h = e[u], g = t[u];
		if (r) var _ = o ? r(g, h, u, t, e, a) : r(h, g, u, e, t, a);
		if (!(_ === void 0 ? h === g || i(h, g, n, r, a) : _)) {
			p = !1;
			break;
		}
		m ||= u == "constructor";
	}
	if (p && !m) {
		var v = e.constructor, y = t.constructor;
		v != y && "constructor" in e && "constructor" in t && !(typeof v == "function" && v instanceof v && typeof y == "function" && y instanceof y) && (p = !1);
	}
	return a.delete(e), a.delete(t), p;
}
//#endregion
//#region node_modules/lodash-es/_baseIsEqualDeep.js
var dG = 1, fG = "[object Arguments]", pG = "[object Array]", mG = "[object Object]", hG = Object.prototype.hasOwnProperty;
function gG(e, t, n, r, i, a) {
	var o = AR(e), s = AR(t), c = o ? pG : hU(e), l = s ? pG : hU(t);
	c = c == fG ? mG : c, l = l == fG ? mG : l;
	var u = c == mG, d = l == mG, f = c == l;
	if (f && iB(e)) {
		if (!iB(t)) return !1;
		o = !0, u = !1;
	}
	if (f && !u) return a ||= new FH(), o || LB(e) ? UW(e, t, n, r, i, a) : sG(e, t, c, n, r, i, a);
	if (!(n & dG)) {
		var p = u && hG.call(e, "__wrapped__"), m = d && hG.call(t, "__wrapped__");
		if (p || m) {
			var h = p ? e.value() : e, g = m ? t.value() : t;
			return a ||= new FH(), i(h, g, n, r, a);
		}
	}
	return f ? (a ||= new FH(), uG(e, t, n, r, i, a)) : !1;
}
//#endregion
//#region node_modules/lodash-es/_baseIsEqual.js
function _G(e, t, n, r, i) {
	return e === t ? !0 : e == null || t == null || !ER(e) && !ER(t) ? e !== e && t !== t : gG(e, t, n, r, _G, i);
}
//#endregion
//#region node_modules/lodash-es/now.js
var vG = function() {
	return pR.Date.now();
}, yG = "Expected a function", bG = Math.max, xG = Math.min;
function SG(e, t, n) {
	var r, i, a, o, s, c, l = 0, u = !1, d = !1, f = !0;
	if (typeof e != "function") throw TypeError(yG);
	t = GR(t) || 0, zR(n) && (u = !!n.leading, d = "maxWait" in n, a = d ? bG(GR(n.maxWait) || 0, t) : a, f = "trailing" in n ? !!n.trailing : f);
	function p(t) {
		var n = r, a = i;
		return r = i = void 0, l = t, o = e.apply(a, n), o;
	}
	function m(e) {
		return l = e, s = setTimeout(_, t), u ? p(e) : o;
	}
	function h(e) {
		var n = e - c, r = e - l, i = t - n;
		return d ? xG(i, a - r) : i;
	}
	function g(e) {
		var n = e - c, r = e - l;
		return c === void 0 || n >= t || n < 0 || d && r >= a;
	}
	function _() {
		var e = vG();
		if (g(e)) return v(e);
		s = setTimeout(_, h(e));
	}
	function v(e) {
		return s = void 0, f && r ? p(e) : (r = i = void 0, o);
	}
	function y() {
		s !== void 0 && clearTimeout(s), l = 0, r = c = i = s = void 0;
	}
	function b() {
		return s === void 0 ? o : v(vG());
	}
	function x() {
		var e = vG(), n = g(e);
		if (r = arguments, i = this, c = e, n) {
			if (s === void 0) return m(c);
			if (d) return clearTimeout(s), s = setTimeout(_, t), p(c);
		}
		return s === void 0 && (s = setTimeout(_, t)), o;
	}
	return x.cancel = y, x.flush = b, x;
}
//#endregion
//#region node_modules/lodash-es/_baseDelay.js
var CG = "Expected a function";
function wG(e, t, n) {
	if (typeof e != "function") throw TypeError(CG);
	return setTimeout(function() {
		e.apply(void 0, n);
	}, t);
}
//#endregion
//#region node_modules/lodash-es/defer.js
var TG = Vz(function(e, t) {
	return wG(e, 1, t);
});
//#endregion
//#region node_modules/lodash-es/drop.js
function EG(e, t, n) {
	var r = e == null ? 0 : e.length;
	return r ? (t = n || t === void 0 ? 1 : YR(t), AV(e, t < 0 ? 0 : t, r)) : [];
}
//#endregion
//#region node_modules/lodash-es/dropRight.js
function DG(e, t, n) {
	var r = e == null ? 0 : e.length;
	return r ? (t = n || t === void 0 ? 1 : YR(t), t = r - t, AV(e, 0, t < 0 ? 0 : t)) : [];
}
//#endregion
//#region node_modules/lodash-es/_baseValues.js
function OG(e, t) {
	return kR(t, function(t) {
		return e[t];
	});
}
//#endregion
//#region node_modules/lodash-es/values.js
function kG(e) {
	return e == null ? [] : OG(e, WB(e));
}
//#endregion
//#region node_modules/lodash-es/isEqual.js
function AG(e, t) {
	return _G(e, t);
}
//#endregion
//#region node_modules/lodash-es/kebabCase.js
var jG = EH(function(e, t, n) {
	return e + (n ? "-" : "") + t.toLowerCase();
});
//#endregion
//#region node_modules/lodash-es/_baseSum.js
function MG(e, t) {
	for (var n, r = -1, i = e.length; ++r < i;) {
		var a = t(e[r]);
		a !== void 0 && (n = n === void 0 ? a : n + a);
	}
	return n;
}
//#endregion
//#region node_modules/lodash-es/sum.js
function NG(e) {
	return e && e.length ? MG(e, XR) : 0;
}
//#endregion
//#region node_modules/lodash-es/throttle.js
var PG = "Expected a function";
function FG(e, t, n) {
	var r = !0, i = !0;
	if (typeof e != "function") throw TypeError(PG);
	return zR(n) && (r = "leading" in n ? !!n.leading : r, i = "trailing" in n ? !!n.trailing : i), SG(e, t, {
		leading: r,
		maxWait: t,
		trailing: i
	});
}
//#endregion
//#region node_modules/react-mosaic-component/lib/contextTypes.mjs
var IG = F.createContext(void 0), LG = F.createContext(void 0);
//#endregion
//#region node_modules/react-mosaic-component/lib/util/assertNever.mjs
function RG(e) {
	throw Error("Unhandled case: " + JSON.stringify(e));
}
//#endregion
//#region node_modules/react-mosaic-component/lib/util/BoundingBox.mjs
function zG() {
	return {
		top: 0,
		right: 0,
		bottom: 0,
		left: 0
	};
}
function BG(e, t, n) {
	let r = [], i = 0;
	for (let a of t) {
		let t = { ...e };
		switch (n) {
			case "row": {
				let n = 100 - e.left - e.right;
				t.left = e.left + n * i / 100, t.right = e.right + n * (100 - (i + a)) / 100;
				break;
			}
			case "column": {
				let n = 100 - e.top - e.bottom;
				t.top = e.top + n * i / 100, t.bottom = e.bottom + n * (100 - (i + a)) / 100;
				break;
			}
			default: RG(n);
		}
		r.push(t), i += a;
	}
	return r;
}
function VG({ top: e, right: t, bottom: n, left: r }) {
	return {
		top: `${e}%`,
		right: `${t}%`,
		bottom: `${n}%`,
		left: `${r}%`
	};
}
function HG(e, t, n) {
	let { top: r, right: i, bottom: a, left: o } = e;
	return n === "column" ? (100 - r - a) * t / 100 + r : n === "row" ? (100 - i - o) * t / 100 + o : RG(n);
}
function UG(e, t, n) {
	let { top: r, right: i, bottom: a, left: o } = e;
	if (n === "column") {
		let e = 100 - r - a;
		return e === 0 ? 0 : (t - r) / e * 100;
	}
	if (n === "row") {
		let e = 100 - i - o;
		return e === 0 ? 0 : (t - o) / e * 100;
	}
	return RG(n);
}
//#endregion
//#region node_modules/react-mosaic-component/lib/Split.mjs
var WG = 1e3 / 30, GG = {
	capture: !0,
	passive: !1
}, KG = class extends F.PureComponent {
	rootElement = F.createRef();
	listenersBound = !1;
	static defaultProps = {
		onChange: () => void 0,
		onRelease: () => void 0,
		minimumPaneSizePercentage: 10
	};
	render() {
		let { direction: e } = this.props;
		return /* @__PURE__ */ F.createElement("div", {
			className: (0, G.default)("mosaic-split", {
				"-row": e === "row",
				"-column": e === "column"
			}),
			ref: this.rootElement,
			onMouseDown: this.onMouseDown,
			style: this.computeStyle()
		}, /* @__PURE__ */ F.createElement("div", { className: "mosaic-split-line" }));
	}
	componentDidMount() {
		this.rootElement.current.addEventListener("touchstart", this.onMouseDown, GG);
	}
	componentWillUnmount() {
		this.unbindListeners(), this.rootElement.current && this.rootElement.current.ownerDocument.removeEventListener("touchstart", this.onMouseDown, GG);
	}
	computeStyle() {
		let { boundingBox: e, direction: t, splitPercentages: n, splitIndex: r } = this.props, i = HG(e, NG(n.slice(0, r + 1)), t), a = t === "column" ? "top" : "left";
		return {
			...VG(e),
			[a]: `${i}%`
		};
	}
	onMouseDown = (e) => {
		!qG(e) && e.button !== 0 || (e.preventDefault(), this.bindListeners());
	};
	onMouseUp = (e) => {
		this.unbindListeners();
		let t = this.calculateNewPercentages(e);
		this.props.onRelease(t);
	};
	onMouseMove = (e) => {
		e.preventDefault(), this.throttledUpdatePercentage(e);
	};
	throttledUpdatePercentage = FG((e) => {
		let t = this.calculateNewPercentages(e);
		this.props.onChange(t);
	}, WG);
	calculateNewPercentages(e) {
		let { minimumPaneSizePercentage: t, direction: n, boundingBox: r, splitPercentages: i, splitIndex: a } = this.props, o = this.rootElement.current.parentElement.getBoundingClientRect(), s = qG(e) ? e.changedTouches[0] : e, c;
		c = n === "column" ? (s.clientY - o.top) / o.height * 100 : (s.clientX - o.left) / o.width * 100;
		let l = UG(r, c, n), u = NG(i.slice(0, a)), d = i[a] + i[a + 1], f = l - u;
		f = OH(f, t, d - t);
		let p = d - f, m = [...i];
		return m[a] = f, m[a + 1] = p, m;
	}
	bindListeners() {
		if (!this.listenersBound) {
			let e = this.rootElement.current.ownerDocument;
			e.addEventListener("mousemove", this.onMouseMove, !0), e.addEventListener("touchmove", this.onMouseMove, GG), e.addEventListener("mouseup", this.onMouseUp, !0), e.addEventListener("touchend", this.onMouseUp, !0), this.listenersBound = !0;
		}
	}
	unbindListeners() {
		if (this.listenersBound && this.rootElement.current) {
			let e = this.rootElement.current.ownerDocument;
			e.removeEventListener("mousemove", this.onMouseMove, !0), e.removeEventListener("touchmove", this.onMouseMove, GG), e.removeEventListener("mouseup", this.onMouseUp, !0), e.removeEventListener("touchend", this.onMouseUp, !0), this.listenersBound = !1;
		}
	}
};
function qG(e) {
	return e.changedTouches != null;
}
//#endregion
//#region node_modules/react-mosaic-component/lib/util/mosaicUtilities.mjs
var JG = /* @__PURE__ */ k((/* @__PURE__ */ D(((e, t) => {
	Object.defineProperty(e, "__esModule", { value: !0 });
	function n(e) {
		/* istanbul ignore next */
		return typeof e == "object" && !("toString" in e) ? Object.prototype.toString.call(e).slice(8, -1) : e;
	}
	var r = typeof process == "object" && !0;
	function i(e, t) {
		if (!e) throw Error(r ? "Invariant failed" : t());
	}
	e.invariant = i;
	var a = Object.prototype.hasOwnProperty, o = Array.prototype.splice, s = Object.prototype.toString;
	function c(e) {
		return s.call(e).slice(8, -1);
	}
	var l = Object.assign || (function(e, t) {
		return u(t).forEach(function(n) {
			a.call(t, n) && (e[n] = t[n]);
		}), e;
	}), u = typeof Object.getOwnPropertySymbols == "function" ? function(e) {
		return Object.keys(e).concat(Object.getOwnPropertySymbols(e));
	} : function(e) {
		return Object.keys(e);
	};
	function d(e) {
		return Array.isArray(e) ? l(e.constructor(e.length), e) : c(e) === "Map" ? new Map(e) : c(e) === "Set" ? new Set(e) : e && typeof e == "object" ? l(Object.create(Object.getPrototypeOf(e)), e) : e;
	}
	var f = function() {
		function e() {
			this.commands = l({}, p), this.update = this.update.bind(this), this.update.extend = this.extend = this.extend.bind(this), this.update.isEquals = function(e, t) {
				return e === t;
			}, this.update.newContext = function() {
				return new e().update;
			};
		}
		return Object.defineProperty(e.prototype, "isEquals", {
			get: function() {
				return this.update.isEquals;
			},
			set: function(e) {
				this.update.isEquals = e;
			},
			enumerable: !0,
			configurable: !0
		}), e.prototype.extend = function(e, t) {
			this.commands[e] = t;
		}, e.prototype.update = function(e, t) {
			var n = this, r = typeof t == "function" ? { $apply: t } : t;
			Array.isArray(e) && Array.isArray(r) || i(!Array.isArray(r), function() {
				return "update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value.";
			}), i(typeof r == "object" && !!r, function() {
				return "update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the " + ("following commands: " + Object.keys(n.commands).join(", ") + ".");
			});
			var o = e;
			return u(r).forEach(function(t) {
				if (a.call(n.commands, t)) {
					var i = e === o;
					o = n.commands[t](r[t], o, r, e), i && n.isEquals(o, e) && (o = e);
				} else {
					var s = c(e) === "Map" ? n.update(e.get(t), r[t]) : n.update(e[t], r[t]), l = c(o) === "Map" ? o.get(t) : o[t];
					(!n.isEquals(s, l) || s === void 0 && !a.call(e, t)) && (o === e && (o = d(e)), c(o) === "Map" ? o.set(t, s) : o[t] = s);
				}
			}), o;
		}, e;
	}();
	e.Context = f;
	var p = {
		$push: function(e, t, n) {
			return h(t, n, "$push"), e.length ? t.concat(e) : t;
		},
		$unshift: function(e, t, n) {
			return h(t, n, "$unshift"), e.length ? e.concat(t) : t;
		},
		$splice: function(e, t, n, r) {
			return _(t, n), e.forEach(function(e) {
				v(e), t === r && e.length && (t = d(r)), o.apply(t, e);
			}), t;
		},
		$set: function(e, t, n) {
			return b(n), e;
		},
		$toggle: function(e, t) {
			g(e, "$toggle");
			var n = e.length ? d(t) : t;
			return e.forEach(function(e) {
				n[e] = !t[e];
			}), n;
		},
		$unset: function(e, t, n, r) {
			return g(e, "$unset"), e.forEach(function(e) {
				Object.hasOwnProperty.call(t, e) && (t === r && (t = d(r)), delete t[e]);
			}), t;
		},
		$add: function(e, t, n, r) {
			return S(t, "$add"), g(e, "$add"), c(t) === "Map" ? e.forEach(function(e) {
				var n = e[0], i = e[1];
				t === r && t.get(n) !== i && (t = d(r)), t.set(n, i);
			}) : e.forEach(function(e) {
				t === r && !t.has(e) && (t = d(r)), t.add(e);
			}), t;
		},
		$remove: function(e, t, n, r) {
			return S(t, "$remove"), g(e, "$remove"), e.forEach(function(e) {
				t === r && t.has(e) && (t = d(r)), t.delete(e);
			}), t;
		},
		$merge: function(e, t, n, r) {
			return x(t, e), u(e).forEach(function(n) {
				e[n] !== t[n] && (t === r && (t = d(r)), t[n] = e[n]);
			}), t;
		},
		$apply: function(e, t) {
			return y(e), e(t);
		}
	}, m = new f();
	e.isEquals = m.update.isEquals, e.extend = m.extend, e.default = m.update, e.default.default = t.exports = l(e.default, e);
	function h(e, t, r) {
		i(Array.isArray(e), function() {
			return "update(): expected target of " + n(r) + " to be an array; got " + n(e) + ".";
		}), g(t[r], r);
	}
	function g(e, t) {
		i(Array.isArray(e), function() {
			return "update(): expected spec of " + n(t) + " to be an array; got " + n(e) + ". Did you forget to wrap your parameter in an array?";
		});
	}
	function _(e, t) {
		i(Array.isArray(e), function() {
			return "Expected $splice target to be an array; got " + n(e);
		}), v(t.$splice);
	}
	function v(e) {
		i(Array.isArray(e), function() {
			return "update(): expected spec of $splice to be an array of arrays; got " + n(e) + ". Did you forget to wrap your parameters in an array?";
		});
	}
	function y(e) {
		i(typeof e == "function", function() {
			return "update(): expected spec of $apply to be a function; got " + n(e) + ".";
		});
	}
	function b(e) {
		i(Object.keys(e).length === 1, function() {
			return "Cannot have more than one key in an object with $set";
		});
	}
	function x(e, t) {
		i(t && typeof t == "object", function() {
			return "update(): $merge expects a spec of type 'object'; got " + n(t);
		}), i(e && typeof e == "object", function() {
			return "update(): $merge expects a target of type 'object'; got " + n(e);
		});
	}
	function S(e, t) {
		var r = c(e);
		i(r === "Map" || r === "Set", function() {
			return "update(): " + n(t) + " expects a target of type Set or Map; got " + n(r);
		});
	}
})))(), 1);
function YG(e, t = "row") {
	if (ZG(e)) {
		let n = nK(t);
		return {
			type: "split",
			direction: t,
			children: e.children.map((e) => YG(e, n)),
			splitPercentages: e.splitPercentages
		};
	}
	return e;
}
var XG = /* @__PURE__ */ ((e) => (e[e.TOP_LEFT = 1] = "TOP_LEFT", e[e.TOP_RIGHT = 2] = "TOP_RIGHT", e[e.BOTTOM_LEFT = 3] = "BOTTOM_LEFT", e[e.BOTTOM_RIGHT = 4] = "BOTTOM_RIGHT", e))(XG || {});
function ZG(e) {
	return typeof e == "object" && !!e && "type" in e && e.type === "split";
}
function QG(e) {
	return typeof e == "object" && !!e && "tabs" in e && Array.isArray(e.tabs);
}
function $G(e, t) {
	return sK(e, eK(t));
}
function eK(e) {
	return e.slice(0, -1);
}
function tK(e, t = "row") {
	if (e.length === 0) return null;
	if (e.length === 1) return e[0];
	let n = PW(e), r = [];
	for (; n.length > 1;) {
		for (; n.length > 0;) if (n.length > 1) {
			let e = n.shift(), t = n.shift();
			r.push({
				type: "split",
				direction: "row",
				children: [e, t],
				splitPercentages: [50, 50]
			});
		} else r.unshift(n.shift());
		n = r, r = [];
	}
	return YG(n[0], t);
}
function nK(e) {
	return e === "row" ? "column" : "row";
}
function rK(e, t) {
	let n = e, r = [];
	for (; ZG(n);) {
		let e;
		e = n.direction === "row" ? t === 1 || t === 3 ? 0 : n.children.length - 1 : t === 1 || t === 2 ? 0 : n.children.length - 1, r.push(e), n = n.children[e];
	}
	return r;
}
function iK(e) {
	return e == null ? [] : ZG(e) ? e.children.flatMap((e) => iK(e)) : QG(e) ? e.tabs : [e];
}
function aK(e) {
	if (typeof e != "object" || !e || !("first" in e)) return e;
	let t = e;
	return {
		type: "split",
		direction: t.direction,
		children: [aK(t.first), aK(t.second)],
		splitPercentages: t.splitPercentage === void 0 ? void 0 : [t.splitPercentage, 100 - t.splitPercentage]
	};
}
function oK(e) {
	if (typeof e != "object" || !e) return e;
	if (e.type === "split") {
		let t = e.children.map((e) => oK(e)).filter((e) => e !== null);
		if (t.length === 0) return null;
		if (t.length === 1) return t[0];
		let n = [], r = [], i = !0;
		for (let a = 0; a < t.length; a++) {
			let o = t[a];
			if (ZG(o) && o.direction === e.direction) {
				if (n.push(...o.children), i && e.splitPercentages && o.splitPercentages) {
					let t = e.splitPercentages[a], n = o.splitPercentages.map((e) => e * t / 100);
					r.push(...n);
				} else i = !1;
			} else n.push(o), i && e.splitPercentages ? r.push(e.splitPercentages[a]) : i = !1;
		}
		let a, o = n.length !== t.length, s = e.children.length !== t.length;
		if (i && r.length === n.length) a = r;
		else if (!o && !s && e.splitPercentages) a = e.splitPercentages;
		else if (s && e.splitPercentages) {
			let r = [], i = 0;
			for (let n = 0; n < t.length; n++) {
				let a = t[n], o = e.children.findIndex((e) => oK(e) === a);
				o >= 0 && e.splitPercentages[o] ? (r.push(e.splitPercentages[o]), i += e.splitPercentages[o]) : r.push(0);
			}
			if (i > 0) a = r.map((e) => e / i * 100);
			else {
				let e = 100 / n.length;
				a = Array(n.length).fill(e);
			}
		} else {
			let e = 100 / n.length;
			a = Array(n.length).fill(e);
		}
		return {
			...e,
			children: n,
			splitPercentages: a
		};
	}
	if (e.type === "tabs") {
		let t = e.tabs;
		if (t.length === 0) return null;
		if (t.length === 1) return t[0];
		let n = Math.max(0, Math.min(e.activeTabIndex, t.length - 1));
		return {
			...e,
			activeTabIndex: n
		};
	}
	return e;
}
function sK(e, t) {
	if (!e) return null;
	let n = e;
	for (let e of t) {
		if (typeof n != "object" || !n) return null;
		if ("type" in n) switch (n.type) {
			case "split":
				n = n.children[e] ?? null;
				break;
			case "tabs":
				n = n.tabs[e] ?? null;
				break;
			default: return null;
		}
		else return null;
	}
	return n;
}
function cK(e, t) {
	if (e == null) throw Error("Root is empty, cannot fetch path");
	let n = sK(e, t);
	if (n == null) throw Error(`Path [${t.join(", ")}] did not resolve to a node`);
	return n;
}
function lK(e, t) {
	if (t.length === 0 || e == null) return null;
	let n = t.slice(0, -1), r = t[t.length - 1], i = typeof r == "number" ? r : Number(r);
	if (!Number.isInteger(i) || i < 0) return null;
	let a = sK(e, n);
	return a ? ZG(a) ? i >= a.children.length ? null : {
		parent: a,
		childIndex: i
	} : QG(a) ? i >= a.tabs.length ? null : {
		parent: a,
		childIndex: i
	} : null : null;
}
//#endregion
//#region node_modules/react-mosaic-component/lib/types.mjs
var uK = { WINDOW: "MosaicWindow" }, dK = {
	TOP: "top",
	BOTTOM: "bottom",
	LEFT: "left",
	RIGHT: "right"
};
//#endregion
//#region node_modules/react-mosaic-component/lib/util/mosaicUpdates.mjs
function fK(e, t, n) {
	return t.reduceRight((n, r, i) => {
		let a = sK(e, t.slice(0, i)), o = "children";
		return a && typeof a == "object" && "type" in a && a.type === "tabs" && (o = "tabs"), { [o]: { [r]: n } };
	}, n);
}
function pK(e, t) {
	if (t.length === 0) return e;
	let n = e;
	for (let { path: e, spec: r } of t) if (e.length === 0) n = (0, JG.default)(n, r);
	else {
		let t = fK(n, e, r);
		n = (0, JG.default)(n, t);
	}
	return n;
}
function mK(e, t) {
	if (t.length === 0) throw Error("Cannot remove root node");
	let n = lK(e, t);
	if (!n) throw Error("Cannot find parent for removal");
	let { parent: r, childIndex: i } = n;
	if (ZG(r)) {
		if (r.children.length === 2) {
			let e = +(i === 0), n = r.children[e];
			return {
				path: DG(t),
				spec: { $set: n }
			};
		}
		{
			let e = r.children.filter((e, t) => t !== i), n = r.splitPercentages || Array(r.children.length).fill(100 / r.children.length), a = n[i] / e.length, o = n.filter((e, t) => t !== i).map((e) => e + a);
			return {
				path: DG(t),
				spec: {
					children: { $set: e },
					splitPercentages: { $set: o }
				}
			};
		}
	}
	if (QG(r)) {
		let e = r.tabs.filter((e, t) => t !== i);
		if (e.length === 0) throw Error("Cannot remove last tab from tabs node");
		let n = r.activeTabIndex;
		return i === r.activeTabIndex ? n = i > 0 ? i - 1 : 0 : i < r.activeTabIndex && (n = r.activeTabIndex - 1), {
			path: DG(t),
			spec: {
				tabs: { $set: e },
				activeTabIndex: { $set: n }
			}
		};
	}
	throw Error("Invalid parent node type for removal");
}
function hK(e, t, n, r) {
	if (AG(t, n)) return [];
	let i = cK(e, n), a = cK(e, t);
	switch (r.type) {
		case "tab-container":
		case "tab-reorder": {
			if (!QG(i)) throw Error(`Expected tab container at destination path ${n.join(", ")}, but found: ${JSON.stringify(i)}`);
			let o = [];
			o.push(mK(e, t));
			let s = gK(t, n), c = pK(e, o), l = sK(c, s);
			if (!l || !QG(l)) {
				let e = function(t, n = []) {
					if (t && typeof t == "object") {
						if (QG(t) && QG(i) && t.tabs && JSON.stringify(t.tabs) === JSON.stringify(i.tabs)) return {
							node: t,
							path: n
						};
						if (ZG(t)) for (let r = 0; r < t.children.length; r++) {
							let i = e(t.children[r], [...n, r]);
							if (i) return i;
						}
					}
					return null;
				}, t = e(c);
				t && (s = t.path, l = t.node);
			}
			if (!l || !QG(l)) throw Error(`Could not find tabs container after removal. Original path: ${n.join(", ")}, Adjusted path: ${s.join(", ")}`);
			if (r.type === "tab-reorder") {
				let e = [...l.tabs];
				e.splice(r.insertIndex, 0, a), o.push({
					path: s,
					spec: {
						tabs: { $set: e },
						activeTabIndex: { $set: r.insertIndex }
					}
				});
			} else o.push({
				path: s,
				spec: {
					tabs: { $push: [a] },
					activeTabIndex: { $set: l.tabs.length }
				}
			});
			return o;
		}
		case "split": {
			let i = [];
			i.push(mK(e, t));
			let o = gK(t, n), s = pK(e, i), c = sK(s, o);
			if (!c) {
				for (let e = o.length - 1; e >= 0; e--) {
					let t = o.slice(0, e), n = sK(s, t);
					if (n) {
						o = t, c = n;
						break;
					}
				}
				c ||= (o = [], s);
			}
			if (!c) throw console.error("Could not find valid destination after removing source from:", t, "original destination was:", n), Error(`Could not find valid destination after removing source from [${t.join(", ")}]`);
			let l = "column";
			if ((r.position === dK.LEFT || r.position === dK.RIGHT) && (l = "row"), ZG(c) && c.direction === l) {
				let e = r.position === dK.LEFT || r.position === dK.TOP ? 0 : c.children.length;
				i.push(yK(o, a, e));
			} else {
				let e, t;
				r.position === dK.LEFT || r.position === dK.TOP ? (e = a, t = c) : (e = c, t = a), i.push({
					path: o,
					spec: { $set: {
						type: "split",
						direction: l,
						children: [e, t],
						splitPercentages: [50, 50]
					} }
				});
			}
			return i;
		}
		default: RG(r);
	}
}
function gK(e, t) {
	if (e.length === 0 || t.length === 0) return t;
	if (AG(e, t)) return [];
	if (!AG(e.slice(0, -1), t.slice(0, -1))) return t;
	let n = e[e.length - 1], r = t[t.length - 1];
	if (typeof n == "number" && typeof r == "number" && r > n) {
		let e = [...t];
		return e[e.length - 1] = r - 1, e;
	}
	return t;
}
function _K(e, t) {
	if (t.length === 0) throw Error("Cannot hide root node");
	let n = lK(e, t);
	if (!n) throw Error("Cannot hide node: parent not found");
	let { parent: r, childIndex: i } = n;
	if (ZG(r)) {
		let e = r.splitPercentages || Array(r.children.length).fill(100 / r.children.length), n = e[i], a = e.map((e, t) => t).filter((e) => e !== i);
		if (a.length === 0) throw Error("Cannot hide the only child of a split node");
		let o = n / a.length, s = e.map((e, t) => t === i ? 0 : e + o);
		return {
			path: DG(t),
			spec: { splitPercentages: { $set: s } }
		};
	}
	if (QG(r)) {
		if (r.tabs.length <= 1) throw Error("Cannot hide the only tab in a tab container");
		let e = r.activeTabIndex;
		return i === r.activeTabIndex && (e = i > 0 ? i - 1 : i + 1), {
			path: DG(t),
			spec: { activeTabIndex: { $set: e } }
		};
	}
	throw Error("Cannot hide node: parent is not a split or tabs node");
}
function vK(e, t) {
	let n = {};
	for (let r = e.length - 1; r >= 0; r--) {
		let i = typeof e[r] == "number" ? e[r] : Number(e[r]);
		n = {
			splitPercentages: { $apply: (e) => {
				if (!e) throw Error("Cannot expand: parent node has no splitPercentages defined");
				let n = [...e], r = t, a = n.length - 1;
				if (a === 0) return [100];
				let o = (100 - r) / a;
				for (let e = 0; e < n.length; e++) e === i ? n[e] = r : n[e] = o;
				return n;
			} },
			children: { [i]: n }
		};
	}
	return {
		spec: n,
		path: []
	};
}
function yK(e, t, n) {
	return {
		path: e,
		spec: {
			children: { $apply: (e) => {
				let r = [...e], i = n === void 0 ? r.length : n;
				return r.splice(i, 0, t), r;
			} },
			splitPercentages: { $apply: (e) => {
				let t = (e ? e.length : 0) + 1, n = 100 / t;
				return Array(t).fill(n);
			} }
		}
	};
}
//#endregion
//#region node_modules/react-mosaic-component/lib/util/OptionalBlueprint.mjs
var bK;
((e) => {
	e.Icon = ({ icon: e, className: t, size: r = "standard" }) => {
		let { blueprintNamespace: i } = P.useContext(IG);
		return /* @__PURE__ */ P.createElement("span", { className: (0, G.default)(t, n(i, e), {
			[`${i}-icon`]: r === "empty",
			[`${i}-icon-${r}`]: r !== "empty"
		}) });
	};
	function t(e, ...t) {
		return t.map((t) => `${e}-${jG(t)}`).join(" ");
	}
	e.getClasses = t;
	function n(e, t) {
		return `${e}-icon-${jG(t)}`;
	}
	e.getIconClass = n;
})(bK ||= {});
//#endregion
//#region node_modules/react-mosaic-component/lib/DraggableTab.mjs
var xK = ({ tabKey: e, tabIndex: t, tabContainerPath: n, mosaicActions: r, mosaicId: i, children: a }) => {
	let o = n.concat(t), [{ isDragging: s }, c, l] = mD({
		type: uK.WINDOW,
		item: () => (r.hide(o, !0), {
			mosaicId: i,
			isTab: !0,
			tabIndex: t,
			tabKey: e,
			tabContainerPath: n
		}),
		end: (i, a) => {
			let s = a.getDropResult(), c = a.didDrop(), l = o, u = s?.tabReorderIndex, d = u !== void 0 && s?.path && AG(s.path, n), f = u !== void 0 && s?.path && !AG(s.path, n), p = s?.path && AG(s.path, n) && u === void 0, m = s?.path && s.path.length > l.length && AG(s.path.slice(0, l.length), l);
			if (!c || !s || m) {
				r.show(l, !0);
				return;
			}
			if (d) {
				let e = sK(r.getRoot(), n);
				if (e && QG(e)) {
					let i = [...e.tabs], a = e.activeTabIndex, [o] = i.splice(t, 1), s = t < u ? u - 1 : u;
					i.splice(s, 0, o);
					let c = a;
					t === a ? c = s : t < a && s >= a ? c = a - 1 : t > a && s <= a && (c = a + 1), r.updateTree([{
						path: n,
						spec: {
							tabs: { $set: i },
							activeTabIndex: { $set: c }
						}
					}]);
				} else console.warn("Could not find tabs node at path:", n);
				return;
			}
			if (f) {
				let i = r.getRoot(), a = sK(i, s.path);
				if (a && QG(a)) {
					let o = sK(i, n), c = [...o.tabs];
					c.splice(t, 1);
					let l = [{
						path: n,
						spec: {
							tabs: { $set: c },
							activeTabIndex: { $set: Math.max(0, Math.min(t, o.tabs.length - 2)) }
						}
					}], d = [...a.tabs];
					d.splice(u, 0, e);
					let f = [{
						path: s.path,
						spec: {
							tabs: { $set: d },
							activeTabIndex: { $set: u }
						}
					}];
					r.updateTree([...l, ...f]);
				} else console.warn("Could not find destination tabs node at path:", s.path);
				return;
			}
			if (p || s.path === void 0) {
				r.show(l, !0);
				return;
			}
			let h = hK(r.getRoot(), l, s.path, s.position === void 0 ? { type: "tab-container" } : {
				type: "split",
				position: s.position
			});
			r.updateTree(h, { shouldNormalize: !0 });
		},
		collect: (e) => ({ isDragging: e.isDragging() })
	});
	return a({
		isDragging: s,
		connectDragSource: c,
		connectDragPreview: l
	});
}, SK = ({ title: e, className: t, onClick: n, text: r }) => {
	let { blueprintNamespace: i } = F.useContext(IG);
	return /* @__PURE__ */ F.createElement("button", {
		title: e,
		onClick: n,
		className: (0, G.default)("mosaic-default-control", bK.getClasses(i, "BUTTON", "MINIMAL", "SMALL"), t)
	}, r && /* @__PURE__ */ F.createElement("span", { className: "control-text" }, r));
}, CK = class extends F.PureComponent {
	static contextType = LG;
	render() {
		return /* @__PURE__ */ F.createElement(IG.Consumer, null, ({ mosaicActions: e }) => /* @__PURE__ */ F.createElement(SK, {
			title: "Expand",
			className: (0, G.default)("expand-button", bK.getIconClass(this.context.blueprintNamespace, "MAXIMIZE")),
			onClick: this.createExpand(e)
		}));
	}
	createExpand(e) {
		return () => {
			e.expand(this.context.mosaicWindowActions.getPath()), this.props.onClick && this.props.onClick();
		};
	}
}, wK = class extends F.PureComponent {
	static contextType = LG;
	render() {
		return /* @__PURE__ */ F.createElement(IG.Consumer, null, ({ mosaicActions: e, blueprintNamespace: t }) => /* @__PURE__ */ F.createElement(SK, {
			title: "Close Window",
			className: (0, G.default)("close-button", bK.getIconClass(t, "CROSS")),
			onClick: this.createRemove(e)
		}));
	}
	createRemove(e) {
		return () => {
			e.remove(this.context.mosaicWindowActions.getPath()), this.props.onClick && this.props.onClick();
		};
	}
}, TK = class extends F.PureComponent {
	static contextType = LG;
	render() {
		return /* @__PURE__ */ F.createElement(SK, {
			title: "Replace Window",
			className: (0, G.default)("replace-button", bK.getIconClass(this.context.blueprintNamespace, "EXCHANGE")),
			onClick: this.replace
		});
	}
	replace = () => {
		this.context.mosaicWindowActions.replaceWithNew().then(() => {
			this.props.onClick && this.props.onClick();
		}).catch(xz);
	};
}, EK = class extends F.PureComponent {
	static contextType = LG;
	render() {
		return /* @__PURE__ */ F.createElement(SK, {
			title: "Split Window",
			className: (0, G.default)("split-button", bK.getIconClass(this.context.blueprintNamespace, "SPLIT_COLUMNS")),
			onClick: this.split
		});
	}
	split = () => {
		this.context.mosaicWindowActions.split().then(() => {
			this.props.onClick && this.props.onClick();
		}).catch(xz);
	};
}, DK = class extends F.PureComponent {
	static contextType = LG;
	render() {
		return /* @__PURE__ */ F.createElement(SK, {
			title: "Add Tab",
			className: (0, G.default)("add-tab-button", bK.getIconClass(this.context.blueprintNamespace, "ADD_COLUMN_RIGHT")),
			onClick: this.addTab
		});
	}
	addTab = () => {
		this.context.mosaicWindowActions.addTab().then(() => {
			this.props.onClick && this.props.onClick();
		}).catch(xz);
	};
}, OK = class extends F.PureComponent {
	static contextType = IG;
	render() {
		return /* @__PURE__ */ F.createElement(SK, {
			title: "Split Tab Group",
			className: (0, G.default)("split-button", bK.getIconClass(this.context.blueprintNamespace, "SPLIT_COLUMNS")),
			onClick: this.split
		});
	}
	split = () => {
		let { mosaicActions: e } = this.context, { path: t } = this.props;
		if (e.createNode == null) {
			console.error("Operation invalid unless `createNode` is defined on Mosaic");
			return;
		}
		Promise.resolve(e.createNode()).then((n) => {
			if (!n) return;
			let r = this.getCurrentTabsNode();
			if (!r) return;
			let i = {
				type: "split",
				direction: "row",
				splitPercentages: [50, 50],
				children: [r, n]
			};
			e.replaceWith(t, i), this.props.onClick && this.props.onClick();
		}).catch(xz);
	};
	getCurrentTabsNode = () => {
		let e = this.context.mosaicActions.getRoot();
		if (!e) return null;
		let t = e;
		for (let e of this.props.path) if (typeof t == "object" && "children" in t) t = t.children[e];
		else return null;
		return t;
	};
}, kK = class extends F.PureComponent {
	static contextType = IG;
	render() {
		return /* @__PURE__ */ F.createElement(SK, {
			title: "Close Tab Group",
			className: (0, G.default)("close-button", bK.getIconClass(this.context.blueprintNamespace, "CROSS")),
			onClick: this.remove
		});
	}
	remove = () => {
		let { mosaicActions: e } = this.context, { path: t } = this.props;
		e.remove(t), this.props.onClick && this.props.onClick();
	};
}, AK = class extends F.PureComponent {
	static contextType = IG;
	render() {
		return this.props.connectDragSource(/* @__PURE__ */ F.createElement("button", {
			title: "Drag to move",
			className: (0, G.default)("mosaic-default-control", "mosaic-tab-drag-button", bK.getClasses(this.context.blueprintNamespace, "BUTTON", "MINIMAL", "SMALL"), bK.getIconClass(this.context.blueprintNamespace, "DRAG_HANDLE_VERTICAL"))
		}));
	}
}, jK = ({ path: e, className: t, title: n = "Add new tab", ariaLabel: r = "Add new tab", children: i = "+" }) => {
	let { mosaicActions: a } = F.useContext(IG);
	return /* @__PURE__ */ F.createElement("button", {
		className: (0, G.default)("mosaic-tab-add-button", t),
		onClick: () => {
			a.addTab(e).catch((e) => console.error(e));
		},
		"aria-label": r,
		title: n
	}, i);
}, MK = F.Children.toArray([/* @__PURE__ */ F.createElement(wK, null)]), NK = (e, t) => F.Children.toArray([
	...t ? [/* @__PURE__ */ F.createElement(AK, {
		connectDragSource: t,
		key: "tab-drag-btn"
	})] : [],
	/* @__PURE__ */ F.createElement(jK, {
		path: e,
		key: "tab-add-btn"
	}),
	/* @__PURE__ */ F.createElement(OK, {
		path: e,
		key: "tab-split-btn"
	}),
	/* @__PURE__ */ F.createElement(kK, {
		path: e,
		key: "tab-remove-btn"
	})
]), PK = F.Children.toArray([
	/* @__PURE__ */ F.createElement(TK, { key: "replace-btn" }),
	/* @__PURE__ */ F.createElement(EK, { key: "split-btn" }),
	/* @__PURE__ */ F.createElement(DK, { key: "add-tab-btn" }),
	/* @__PURE__ */ F.createElement(CK, { key: "expand-btn" }),
	/* @__PURE__ */ F.createElement(wK, { key: "remove-btn" })
]), FK = F.Children.toArray([/* @__PURE__ */ F.createElement(CK, { key: "expand-btn" }), /* @__PURE__ */ F.createElement(wK, { key: "remove-btn" })]), IK = ({ tabKey: e, index: t, isActive: n, path: r, mosaicId: i, onTabClick: a, mosaicActions: o, renderTabTitle: s = ({ tabKey: e }) => `Tab ${e}`, canClose: c = () => "canClose", onTabClose: l, tabs: u }) => {
	let d = (n) => {
		n.stopPropagation(), l?.(e, t);
	}, f = c(e, u, t, r);
	return /* @__PURE__ */ F.createElement(xK, {
		tabKey: e,
		tabIndex: t,
		tabContainerPath: r,
		mosaicActions: o,
		mosaicId: i
	}, ({ isDragging: o, connectDragSource: c, connectDragPreview: l }) => /* @__PURE__ */ F.createElement("button", {
		className: (0, G.default)("mosaic-tab-button", {
			"-active": n,
			"-dragging": o
		}),
		onClick: a,
		title: `${e}`,
		ref: (e) => {
			c(e), l(e);
		}
	}, /* @__PURE__ */ F.createElement("span", { className: "mosaic-tab-button-content" }, s({
		tabKey: e,
		path: r,
		isActive: n,
		index: t,
		mosaicId: i
	})), f !== "noClose" && /* @__PURE__ */ F.createElement("span", {
		className: (0, G.default)("mosaic-tab-close-button", {
			"-can-close": f === "canClose",
			"-cannot-close": f === "cannotClose",
			"-active-tab": n,
			"-inactive-tab": !n
		}),
		onClick: f === "canClose" ? d : void 0,
		title: f === "canClose" ? "Close tab" : "Cannot close tab"
	}, /* @__PURE__ */ F.createElement(bK.Icon, {
		size: "empty",
		icon: "CROSS"
	}))));
}, LK = ({ tabContainerPath: e, insertIndex: t }) => {
	let [{ isOver: n, canDrop: r, draggedMosaicId: i }, a] = SD({
		accept: uK.WINDOW,
		canDrop: (t) => {
			let n = t?.isTab && t?.tabContainerPath && AG(t.tabContainerPath, e), r = !t?.isTab || !AG(t.tabContainerPath, e);
			return n || r;
		},
		drop: () => ({
			path: e,
			position: void 0,
			tabReorderIndex: t
		}),
		hover: () => {},
		collect: (e) => ({
			isOver: e.isOver(),
			canDrop: e.canDrop(),
			draggedMosaicId: e.getItem()?.mosaicId
		})
	}), o = i != null;
	return a(/* @__PURE__ */ F.createElement("div", { className: (0, G.default)("tab-drop-target", {
		"tab-drop-target-hover": n,
		dragging: o
	}) }, n ? /* @__PURE__ */ F.createElement("div", { className: "tab-drop-placeholder" }, /* @__PURE__ */ F.createElement("div", { className: "tab-drop-arrow" }), "``") : /* @__PURE__ */ F.createElement("div", { className: (0, G.default)("tab-drop-indicator", {
		"can-drop": r,
		default: !r
	}) })));
}, RK = ({ node: e, path: t, renderTile: n, renderTabToolbar: r, boundingBox: i, renderTabTitle: a, renderTabButton: o, renderTabToolbarControls: s, canClose: c, showTabDragButton: l }) => {
	let { mosaicActions: u, mosaicId: d } = F.useContext(IG), { tabs: f, activeTabIndex: p } = e, [, m, h] = mD({
		type: uK.WINDOW,
		item: () => {
			let e = TG(() => u.hide(t));
			return {
				mosaicId: d,
				hideTimer: e
			};
		},
		end: ({ hideTimer: e }, n) => {
			window.clearTimeout(e);
			let r = t, i = n.getDropResult() || {}, { position: a, path: o } = i, s = o != null, c = s && AG(o, r), l = s && QG(sK(u.getRoot(), o)) && AG(r, o), d = s && o.length > r.length && AG(r, EG(o, o.length - r.length));
			if (s && !c && !d && !l) {
				let e = hK(u.getRoot(), r, o, i.tabReorderIndex === void 0 ? a === void 0 ? { type: "tab-container" } : {
					type: "split",
					position: a
				} : {
					type: "tab-reorder",
					insertIndex: i.tabReorderIndex
				});
				u.updateTree(e, { shouldNormalize: !0 });
			} else u.show(r, !0);
		}
	}), [, g] = SD({
		accept: uK.WINDOW,
		canDrop: () => !1,
		collect: (e) => ({
			isOver: e.isOver({ shallow: !0 }),
			draggedMosaicId: e.getItem()?.mosaicId
		})
	}), [{ isOver: _, draggedMosaicId: v }, y] = SD({
		accept: uK.WINDOW,
		canDrop: (e, t) => t.isOver({ shallow: !0 }),
		drop: () => ({
			path: t,
			position: void 0
		}),
		collect: (e) => ({
			isOver: e.isOver({ shallow: !0 }),
			draggedMosaicId: e.getItem()?.mosaicId
		})
	}), b = (e) => {
		e !== p && u.updateTree([{
			path: t,
			spec: { activeTabIndex: { $set: e } }
		}]);
	}, x = (e, n) => {
		(c ? c(e, f, n, t) : "noClose") === "canClose" && (f.length <= 1 || u.removeTab(t, n));
	}, S = () => {
		let e = t.length > 0, n = {
			tabs: f,
			activeTabIndex: p,
			path: t,
			mosaicId: d
		}, r = e && (!l || l(t)), i = r && s !== void 0 ? /* @__PURE__ */ F.createElement(AK, { connectDragSource: m }) : null, h = s ? s(n) : NK(t, r ? m : void 0);
		return y(/* @__PURE__ */ F.createElement("div", { className: (0, G.default)("mosaic-tab-bar", {
			"tab-bar-drop-target-hover": _ && v === d,
			draggable: e
		}) }, /* @__PURE__ */ F.createElement("div", { className: "mosaic-tab-bar-tabs" }, /* @__PURE__ */ F.createElement(LK, {
			tabContainerPath: t,
			insertIndex: 0,
			mosaicActions: u,
			mosaicId: d
		}), f.map((e, n) => {
			let r = o || IK;
			return /* @__PURE__ */ F.createElement(F.Fragment, { key: e }, /* @__PURE__ */ F.createElement(r, {
				tabKey: e,
				index: n,
				isActive: n === p,
				path: t,
				mosaicId: d,
				onTabClick: () => b(n),
				mosaicActions: u,
				renderTabTitle: a,
				canClose: c,
				onTabClose: x,
				tabs: f
			}), /* @__PURE__ */ F.createElement(LK, {
				tabContainerPath: t,
				insertIndex: n + 1,
				mosaicActions: u,
				mosaicId: d
			}));
		})), /* @__PURE__ */ F.createElement("div", { className: "mosaic-tab-bar-controls" }, i, /* @__PURE__ */ F.createElement("div", { className: "mosaic-tab-toolbar-controls" }, h))));
	}, C = f[p], w = t.concat(p);
	return /* @__PURE__ */ F.createElement("div", {
		className: "mosaic-tabs-container",
		style: VG(i)
	}, r ? r({
		tabs: f,
		activeTabIndex: p,
		path: t,
		DraggableTab: (e) => /* @__PURE__ */ F.createElement(xK, {
			key: e.tabKey,
			...e,
			tabContainerPath: t,
			mosaicActions: u,
			mosaicId: d
		})
	}) : S(), g(/* @__PURE__ */ F.createElement("div", { className: "mosaic-tile" }, n(C, w))), h(/* @__PURE__ */ F.createElement("div", { className: "mosaic-preview" }, /* @__PURE__ */ F.createElement("div", { className: "mosaic-tab-bar" }, /* @__PURE__ */ F.createElement("div", { className: "mosaic-tab-bar-tabs" }, f.map((e, n) => /* @__PURE__ */ F.createElement("button", {
		key: e,
		className: (0, G.default)("mosaic-tab-button", { "-active": n === p })
	}, /* @__PURE__ */ F.createElement("span", { className: "mosaic-tab-button-content" }, a ? a({
		tabKey: e,
		path: t,
		isActive: n === p,
		index: n,
		mosaicId: d
	}) : `Tab ${e}`))))), /* @__PURE__ */ F.createElement("div", { className: "mosaic-window-body" }, /* @__PURE__ */ F.createElement("h4", null, "Tab Container"), /* @__PURE__ */ F.createElement(bK.Icon, {
		className: "default-preview-icon",
		size: "large",
		icon: "APPLICATION"
	})))));
}, zK = class extends F.PureComponent {
	static contextType = IG;
	render() {
		let e = aK(this.props.root);
		return e === null ? null : /* @__PURE__ */ F.createElement("div", { className: "mosaic-root" }, this.renderRecursively(e, zG(), []));
	}
	renderRecursively(e, t, n) {
		if (typeof e == "string" || typeof e == "number") return /* @__PURE__ */ F.createElement("div", {
			key: e,
			className: "mosaic-tile",
			style: { ...VG(t) }
		}, this.props.renderTile(e, n));
		switch (e.type) {
			case "split": {
				let { children: r, direction: i } = e, a = BG(t, e.splitPercentages ?? r.map(() => 100 / r.length), i), o = OV(r.flatMap((i, o) => {
					let s = n.concat(o), c = [this.renderRecursively(i, a[o], s)];
					return o < r.length - 1 && c.push(this.renderSplit(e, n, o, t)), c;
				})).filter(BK);
				return /* @__PURE__ */ F.createElement(F.Fragment, null, o.map((e, t) => F.cloneElement(e, { key: e.key || `${n.join("-")}-${t}` })));
			}
			case "tabs": return /* @__PURE__ */ F.createElement(RK, {
				node: e,
				path: n,
				renderTile: this.props.renderTile,
				renderTabToolbar: this.props.renderTabToolbar,
				boundingBox: t,
				renderTabTitle: this.props.renderTabTitle,
				renderTabButton: this.props.renderTabButton,
				showTabDragButton: this.props.showTabDragButton,
				renderTabToolbarControls: this.props.renderTabToolbarControls,
				canClose: this.props.canClose
			});
			default: return console.error("Unknown mosaic node type:", e), null;
		}
	}
	renderSplit(e, t, n, r) {
		let { resize: i } = this.props;
		if (i !== "DISABLED" && e.children.length > 1) {
			let { direction: a } = e, o = e.splitPercentages ?? e.children.map(() => 100 / e.children.length);
			return /* @__PURE__ */ F.createElement(KG, {
				key: `split-${t.join("-")}-${n}`,
				...i,
				direction: a,
				boundingBox: r,
				splitIndex: n,
				splitPercentages: o,
				onChange: (e) => this.onResize(e, t, !0),
				onRelease: (e) => this.onResize(e, t, !1)
			});
		}
		return null;
	}
	onResize = (e, t, n) => {
		this.context.mosaicActions.updateTree([{
			path: t,
			spec: { splitPercentages: { $set: e } }
		}], { suppressOnRelease: n });
	};
};
function BK(e) {
	return e !== null;
}
//#endregion
//#region node_modules/react-mosaic-component/lib/MosaicZeroState.mjs
var VK = class extends F.PureComponent {
	static contextType = IG;
	render() {
		return /* @__PURE__ */ F.createElement("div", { className: (0, G.default)("mosaic-zero-state", bK.getClasses(this.context.blueprintNamespace, "NON_IDEAL_STATE")) }, /* @__PURE__ */ F.createElement("div", { className: bK.getClasses(this.context.blueprintNamespace, "NON_IDEAL_STATE_VISUAL") }, /* @__PURE__ */ F.createElement(bK.Icon, {
			className: "default-zero-state-icon",
			size: "large",
			icon: "APPLICATIONS"
		})), /* @__PURE__ */ F.createElement("h4", { className: bK.getClasses(this.context.blueprintNamespace, "HEADING") }, "No Windows Present"), /* @__PURE__ */ F.createElement("div", null, this.props.createNode && /* @__PURE__ */ F.createElement("button", {
			className: (0, G.default)(bK.getClasses(this.context.blueprintNamespace, "BUTTON"), bK.getIconClass(this.context.blueprintNamespace, "ADD")),
			onClick: this.replace
		}, "Add New Window")));
	}
	replace = () => Promise.resolve(this.props.createNode()).then((e) => this.context.mosaicActions.replaceWith([], e)).catch(xz);
}, HK = ({ path: e, position: t }) => {
	let { mosaicId: n } = F.useContext(IG), [{ isOver: r, draggedMosaicId: i }, a] = SD({
		accept: uK.WINDOW,
		drop: () => ({
			path: e,
			position: t
		}),
		collect: (e) => ({
			isOver: e.isOver(),
			draggedMosaicId: e.getItem()?.mosaicId
		})
	});
	return a(/* @__PURE__ */ F.createElement("div", { className: (0, G.default)("drop-target", t, { "drop-target-hover": r && i === n }) }));
}, UK = F.memo(() => {
	let [{ isDragging: e }] = SD({
		accept: uK.WINDOW,
		collect: (e) => ({ isDragging: e.getItem() !== null && e.getItemType() === uK.WINDOW })
	}), t = WK(e, 0);
	return /* @__PURE__ */ F.createElement("div", { className: (0, G.default)("drop-target-container", { "-dragging": t }) }, kG(dK).map((e) => /* @__PURE__ */ F.createElement(HK, {
		position: e,
		path: [],
		key: e
	})));
});
UK.displayName = "RootDropTargets";
function WK(e, t) {
	let n = F.useRef(e), [, r] = F.useState(0), i = (e) => {
		n.current = e, r((e) => e + 1);
	};
	return e || (n.current = !1), F.useEffect(() => {
		if (n.current === e || !e) return;
		let r = window.setTimeout(() => i(!0), t);
		return () => {
			window.clearTimeout(r);
		};
	}, [e]), n.current;
}
//#endregion
//#region node_modules/react-mosaic-component/lib/Mosaic.mjs
var GK = 70;
function KK(e) {
	return e.initialValue != null;
}
var qK = class extends F.PureComponent {
	static defaultProps = {
		onChange: () => void 0,
		zeroStateView: /* @__PURE__ */ F.createElement(VK, null),
		className: "mosaic-blueprint-theme",
		blueprintNamespace: "bp5"
	};
	static getDerivedStateFromProps(e, t) {
		return e.mosaicId && (t.mosaicId, e.mosaicId), KK(e) && e.initialValue !== t.lastInitialValue ? {
			lastInitialValue: aK(e.initialValue),
			currentNode: aK(e.initialValue)
		} : null;
	}
	state = {
		currentNode: null,
		lastInitialValue: null,
		mosaicId: this.props.mosaicId ?? y()
	};
	render() {
		let { className: e } = this.props;
		return /* @__PURE__ */ F.createElement(IG.Provider, { value: this.childContext }, /* @__PURE__ */ F.createElement(JK, { className: e }, this.renderTree(), /* @__PURE__ */ F.createElement(UK, null)));
	}
	getRoot() {
		return KK(this.props) ? this.state.currentNode : aK(this.props.value);
	}
	updateRoot = (e, t) => {
		t = {
			shouldNormalize: t?.shouldNormalize ?? !1,
			suppressOnRelease: t?.suppressOnRelease ?? !1,
			suppressOnChange: t?.suppressOnChange ?? !1
		};
		let n = this.getRoot() || {}, r = t.shouldNormalize ? oK(pK(n, e)) : pK(n, e);
		this.replaceRoot(r, t.suppressOnRelease, t.suppressOnChange);
	};
	replaceRoot = (e, t = !1, n = !1) => {
		n || this.props.onChange(e), !t && this.props.onRelease && this.props.onRelease(e), KK(this.props) && this.setState({ currentNode: e });
	};
	actions = {
		updateTree: this.updateRoot,
		remove: (e) => {
			e.length === 0 ? this.replaceRoot(null) : this.updateRoot([mK(this.getRoot(), e)], { shouldNormalize: !0 });
		},
		expand: (e, t = GK) => this.updateRoot([vK(e, t)]),
		getRoot: () => this.getRoot(),
		hide: (e, t = !1) => {
			this.updateRoot([_K(this.getRoot(), e)], {
				suppressOnChange: t,
				suppressOnRelease: !0
			});
		},
		show: (e, t = !1) => {
			let n = this.getRoot();
			if (!n || e.length === 0) return;
			let r = lK(n, e);
			if (!r) return;
			let { parent: i } = r;
			if (ZG(i)) {
				let n = 100 / i.children.length, r = Array(i.children.length).fill(n);
				this.updateRoot([{
					path: e.slice(0, -1),
					spec: { splitPercentages: { $set: r } }
				}], {
					suppressOnChange: t,
					suppressOnRelease: !0
				});
			}
		},
		createNode: this.props.createNode,
		addTab: (e, ...t) => {
			let { createNode: n } = this.props;
			return n == null ? Promise.reject(/* @__PURE__ */ Error("addTab requires `createNode` to be defined on Mosaic")) : Promise.resolve(n(...t)).then((t) => {
				if (typeof t != "string" && typeof t != "number") {
					console.error("createNode() for addTab must return a MosaicKey (string or number).");
					return;
				}
				let n = this.getRoot();
				if (!n) return;
				let r = sK(n, e);
				if (r == null) {
					console.error("addTab called on an invalid path.");
					return;
				}
				if (QG(r)) {
					this.updateRoot([{
						path: e,
						spec: {
							tabs: { $push: [t] },
							activeTabIndex: { $set: r.tabs.length }
						}
					}], { shouldNormalize: !0 });
					return;
				}
				if (ZG(r)) {
					console.error("addTab cannot target a split node; pick a leaf or a tabs node.");
					return;
				}
				this.actions.replaceWith(e, {
					type: "tabs",
					tabs: [r, t],
					activeTabIndex: 1
				});
			});
		},
		removeTab: (e, t) => {
			let n = this.getRoot();
			if (!n) return;
			let r = sK(n, e);
			if (!QG(r)) {
				console.error("removeTab called on a path that is not a tabs node.");
				return;
			}
			if (t < 0 || t >= r.tabs.length) {
				console.error(`removeTab index ${t} is out of range.`);
				return;
			}
			let i = r.tabs.filter((e, n) => n !== t), a = r.activeTabIndex;
			t === r.activeTabIndex ? a = Math.max(0, t - 1) : t < r.activeTabIndex && (a = r.activeTabIndex - 1), this.updateRoot([{
				path: e,
				spec: {
					tabs: { $set: i },
					activeTabIndex: { $set: a }
				}
			}], { shouldNormalize: !0 });
		},
		replaceWith: (e, t) => this.updateRoot([{
			path: e,
			spec: { $set: t }
		}])
	};
	childContext = {
		mosaicActions: this.actions,
		mosaicId: this.state.mosaicId,
		blueprintNamespace: this.props.blueprintNamespace
	};
	renderTree() {
		let e = this.getRoot();
		if (this.validateTree(e), e == null) return this.props.zeroStateView;
		{
			let { renderTile: t, resize: n } = this.props;
			return /* @__PURE__ */ F.createElement(zK, {
				root: e,
				renderTile: t,
				renderTabToolbar: this.props.renderTabToolbar,
				renderTabToolbarControls: this.props.renderTabToolbarControls,
				resize: n,
				renderTabTitle: this.props.renderTabTitle,
				renderTabButton: this.props.renderTabButton,
				canClose: this.props.canClose
			});
		}
	}
	validateTree(e) {}
};
function JK({ className: e, children: t }) {
	let [{ isDragging: n }] = SD({
		accept: uK.WINDOW,
		collect: (e) => ({ isDragging: e.getItem() !== null && e.getItemType() === uK.WINDOW })
	});
	return /* @__PURE__ */ F.createElement("div", { className: (0, G.default)(e, "mosaic mosaic-drop-target", { "-dragging": n }) }, t);
}
var YK = class extends F.PureComponent {
	render() {
		return /* @__PURE__ */ F.createElement(ME, {
			backend: HD,
			options: IO,
			context: window,
			...this.props.dragAndDropManager && { manager: this.props.dragAndDropManager }
		}, /* @__PURE__ */ F.createElement(qK, { ...this.props }));
	}
}, XK = class extends F.PureComponent {
	render() {
		return /* @__PURE__ */ F.createElement("div", { className: "separator" });
	}
}, ZK = class extends F.Component {
	static defaultProps = {
		additionalControlButtonText: "More",
		draggable: !0,
		renderPreview: ({ title: e }) => /* @__PURE__ */ F.createElement("div", { className: "mosaic-preview" }, /* @__PURE__ */ F.createElement("div", { className: "mosaic-window-toolbar" }, /* @__PURE__ */ F.createElement("div", { className: "mosaic-window-title" }, e)), /* @__PURE__ */ F.createElement("div", { className: "mosaic-window-body" }, /* @__PURE__ */ F.createElement("h4", null, e), /* @__PURE__ */ F.createElement(bK.Icon, {
			className: "default-preview-icon",
			size: "large",
			icon: "APPLICATION"
		}))),
		renderToolbar: null
	};
	static contextType = IG;
	state = { additionalControlsOpen: !1 };
	rootElement = Oi();
	render() {
		let { className: e, isOver: t, renderPreview: n, additionalControls: r, connectDropTarget: i, connectDragPreview: a, draggedMosaicId: o, disableAdditionalControlsOverlay: s } = this.props, c = QG($G(this.context.mosaicActions.getRoot(), this.props.path));
		return /* @__PURE__ */ F.createElement(LG.Provider, { value: this.childContext }, /* @__PURE__ */ F.createElement("div", {
			className: (0, G.default)("mosaic-window", "mosaic-drop-target", e, {
				"drop-target-hover": t && o === this.context.mosaicId,
				"additional-controls-open": this.state.additionalControlsOpen
			}),
			ref: (e) => {
				this.rootElement.current = e, i(e);
			}
		}, this.renderToolbar(), /* @__PURE__ */ F.createElement("div", { className: "mosaic-window-body" }, this.props.children), !s && /* @__PURE__ */ F.createElement("div", {
			className: "mosaic-window-body-overlay",
			onClick: () => {
				this.setAdditionalControlsOpen(!1);
			}
		}), /* @__PURE__ */ F.createElement("div", { className: "mosaic-window-additional-actions-bar" }, r), a(n(this.props)), !c && /* @__PURE__ */ F.createElement("div", { className: (0, G.default)("drop-target-container", {}) }, kG(dK).map(this.renderDropTarget))));
	}
	getToolbarControls() {
		let { toolbarControls: e, createNode: t, path: n } = this.props;
		return e || (QG($G(this.context.mosaicActions.getRoot(), n)) ? MK : t ? PK : FK);
	}
	renderToolbar() {
		let { title: e, draggable: t, additionalControls: n, additionalControlButtonText: r, path: i, renderToolbar: a } = this.props, { additionalControlsOpen: o } = this.state, s = this.getToolbarControls(), c = $G(this.context.mosaicActions.getRoot(), i), l = t && i.length > 0 && !QG(c), u = l ? this.props.connectDragSource : (e) => e;
		if (a) {
			let e = u(a(this.props, t));
			return /* @__PURE__ */ F.createElement("div", { className: (0, G.default)("mosaic-window-toolbar", { draggable: l }) }, e);
		}
		let d = u(/* @__PURE__ */ F.createElement("div", {
			title: e,
			className: "mosaic-window-title"
		}, e)), f = !!n;
		return /* @__PURE__ */ F.createElement("div", { className: (0, G.default)("mosaic-window-toolbar", { draggable: l }) }, d, /* @__PURE__ */ F.createElement("div", { className: (0, G.default)("mosaic-window-controls", bK.getClasses("BUTTON_GROUP")) }, f && /* @__PURE__ */ F.createElement("button", {
			onClick: () => this.setAdditionalControlsOpen(!o),
			className: (0, G.default)(bK.getClasses(this.context.blueprintNamespace, "BUTTON", "MINIMAL"), bK.getIconClass(this.context.blueprintNamespace, "MORE"), { [bK.getClasses(this.context.blueprintNamespace, "ACTIVE")]: o })
		}, /* @__PURE__ */ F.createElement("span", { className: "control-text" }, r)), f && /* @__PURE__ */ F.createElement(XK, null), s));
	}
	renderDropTarget = (e) => {
		let { path: t } = this.props;
		return /* @__PURE__ */ F.createElement(HK, {
			position: e,
			path: t,
			key: e
		});
	};
	checkCreateNode() {
		if (this.props.createNode == null) throw Error("Operation invalid unless `createNode` is defined");
	}
	split = (...e) => {
		this.checkCreateNode();
		let { path: t } = this.props, { mosaicActions: n } = this.context, r = n.getRoot();
		if (QG($G(r, t))) return Promise.resolve();
		let i = this.rootElement.current && this.rootElement.current.offsetWidth > this.rootElement.current.offsetHeight ? "row" : "column", a = sK(r, t);
		if (!a) throw Error("Current node could not be found.");
		return Promise.resolve(n.createNode(...e)).then((e) => {
			let r = {
				type: "split",
				direction: i,
				children: [a, e],
				splitPercentages: [50, 50]
			};
			n.replaceWith(t, r);
		});
	};
	addTab = (...e) => {
		this.checkCreateNode();
		let { path: t } = this.props, { mosaicActions: n } = this.context, r = QG($G(n.getRoot(), t)) ? t.slice(0, -1) : t;
		return n.addTab(r, ...e);
	};
	getRoot = () => {
		let { mosaicActions: e } = this.context;
		return e.getRoot();
	};
	swap = (...e) => {
		this.checkCreateNode();
		let { mosaicActions: t } = this.context, { path: n, createNode: r } = this.props;
		return Promise.resolve(r(...e)).then((e) => t.replaceWith(n, e));
	};
	setAdditionalControlsOpen = (e) => {
		let t = e === "toggle" ? !this.state.additionalControlsOpen : e;
		this.setState({ additionalControlsOpen: t }), this.props.onAdditionalControlsToggle?.(t);
	};
	getPath = () => this.props.path;
	connectDragSource = (e) => {
		let { connectDragSource: t } = this.props;
		return t(e);
	};
	childContext = {
		blueprintNamespace: this.context.blueprintNamespace,
		mosaicWindowActions: {
			split: this.split,
			addTab: this.addTab,
			getRoot: this.getRoot,
			replaceWithNew: this.swap,
			setAdditionalControlsOpen: this.setAdditionalControlsOpen,
			getPath: this.getPath,
			connectDragSource: this.connectDragSource
		}
	};
};
function QK(e) {
	let { mosaicActions: t, mosaicId: n } = Ni(IG), [, r, i] = mD({
		type: uK.WINDOW,
		item: () => {
			e.onDragStart && e.onDragStart();
			let r = TG(() => t.hide(e.path));
			return {
				mosaicId: n,
				hideTimer: r
			};
		},
		end: ({ hideTimer: n }, r) => {
			window.clearTimeout(n);
			let i = e.path, a = r.getDropResult() || {}, { position: o, path: s } = a, c = s != null, l = c && AG(s, i), u = c && (() => {
				let e = t.getRoot(), n = i.slice(0, -1), r = sK(e, n), a = sK(e, s);
				return QG(r) && QG(a) && AG(n, s);
			})(), d = c && s.length > i.length && AG(i, EG(s, s.length - i.length));
			if (c && !l && !d && !u) {
				let n = hK(t.getRoot(), i, s, a.tabReorderIndex === void 0 ? o === void 0 ? { type: "tab-container" } : {
					type: "split",
					position: o
				} : {
					type: "tab-reorder",
					insertIndex: a.tabReorderIndex
				});
				t.updateTree(n, { shouldNormalize: !0 }), e.onDragEnd && e.onDragEnd("drop");
			} else t.show(i, !0), e.onDragEnd && e.onDragEnd("reset");
		}
	}), [{ isOver: a, draggedMosaicId: o }, s] = SD({
		accept: uK.WINDOW,
		collect: (e) => ({
			isOver: e.isOver(),
			draggedMosaicId: e.getItem()?.mosaicId
		})
	});
	return /* @__PURE__ */ F.createElement(ZK, {
		...e,
		connectDragPreview: i,
		connectDragSource: r,
		connectDropTarget: s,
		isOver: a,
		draggedMosaicId: o
	});
}
var $K = class extends F.PureComponent {
	render() {
		return /* @__PURE__ */ F.createElement(QK, { ...this.props });
	}
}, eq = N(/*#__PURE__*/ z("path", { d: "M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z" }), "MenuSharp"), tq = N(/*#__PURE__*/ z("path", { d: "M21 3H3v18h18zm-2 16H5V5h14z" }), "CropDinSharp");
//#endregion
//#region src/components/icons/ThumbnailNavigationBottomIcon.jsx
function nq(e) {
	return /* @__PURE__ */ z(Ha, {
		...e,
		children: /* @__PURE__ */ B("svg", {
			xmlns: "http://www.w3.org/2000/svg",
			width: "24",
			height: "24",
			viewBox: "0 0 24 24",
			children: [/* @__PURE__ */ z("path", {
				d: "M3,3H21V5H3Z",
				transform: "translate(0 16)"
			}), /* @__PURE__ */ z("path", {
				d: "M21,5H3V19H21ZM19,17H5V7H19Z",
				transform: "translate(0 -2)"
			})]
		})
	});
}
//#endregion
//#region src/components/icons/ThumbnailNavigationRightIcon.jsx
function rq(e) {
	return /* @__PURE__ */ z(Ha, {
		...e,
		children: /* @__PURE__ */ B("svg", {
			xmlns: "http://www.w3.org/2000/svg",
			width: "24",
			height: "24",
			viewBox: "0 0 24 24",
			children: [
				/* @__PURE__ */ z("path", {
					d: "M0,0H24V24H0Z",
					transform: "translate(24) rotate(90)",
					fill: "none"
				}),
				/* @__PURE__ */ z("path", {
					d: "M3,3H21V5H3Z",
					transform: "translate(24) rotate(90)"
				}),
				/* @__PURE__ */ z("path", {
					d: "M19,3H5V21H19ZM17,19H7V5H17Z",
					transform: "translate(-2)"
				})
			]
		})
	});
}
//#endregion
//#region src/components/WindowThumbnailSettings.jsx
var iq = H(sa, {
	name: "WindowThumbnailSettings",
	slot: "option"
})(({ selected: e, theme: t }) => ({ "& .MuiFormControlLabel-label": {
	borderBottom: "2px solid transparent",
	...e && { borderBottomColor: t.palette.secondary.main },
	"&.Mui-selected": { backgroundColor: "transparent !important" },
	"&.Mui-selected.Mui-focusVisible": { backgroundColor: `${(t.vars || t).palette.action.focus} !important` },
	"&:focused": { backgroundColor: `${(t.vars || t).palette.action.focus} !important` },
	color: e ? t.palette.secondary.main : void 0,
	display: "inline-flex"
} })), aq = H(oa, {
	name: "WindowViewSettings",
	slot: "option"
})(() => ({ display: "inline-flex" }));
function oq({ handleClose: e = () => {}, thumbnailNavigationPosition: t, direction: n, windowId: r, setWindowThumbnailPosition: i }) {
	let { t: a } = V(), o = (t) => {
		i(r, t), e();
	};
	return /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(za, {
		role: "presentation",
		disableSticky: !0,
		children: a("thumbnails")
	}), /* @__PURE__ */ B(aq, {
		role: "menubar",
		children: [
			/* @__PURE__ */ z(iq, {
				"aria-checked": t === "off",
				onClick: () => {
					o("off");
				},
				role: "menuitemradio",
				selected: t === "off",
				children: /* @__PURE__ */ z(Va, {
					control: /* @__PURE__ */ z(tq, {
						color: t === "off" ? "secondary" : void 0,
						fill: "currentcolor"
					}),
					label: a("off"),
					labelPlacement: "bottom",
					value: "off"
				})
			}, "off"),
			/* @__PURE__ */ z(iq, {
				"aria-checked": t === "far-bottom",
				onClick: () => {
					o("far-bottom");
				},
				role: "menuitemradio",
				selected: t === "far-bottom",
				children: /* @__PURE__ */ z(Va, {
					control: /* @__PURE__ */ z(nq, {
						color: t === "far-bottom" ? "secondary" : void 0,
						fill: "currentcolor"
					}),
					label: a("bottom"),
					labelPlacement: "bottom",
					value: "far-bottom"
				})
			}, "far-bottom"),
			/* @__PURE__ */ z(iq, {
				"aria-checked": t === "far-right",
				onClick: () => {
					o("far-right");
				},
				role: "menuitemradio",
				selected: t === "far-right",
				children: /* @__PURE__ */ z(Va, {
					control: /* @__PURE__ */ z(rq, {
						color: t === "far-right" ? "secondary" : void 0,
						fill: "currentcolor",
						style: n === "rtl" ? { transform: "rotate(180deg)" } : {}
					}),
					label: a("right"),
					labelPlacement: "bottom",
					value: "far-right"
				})
			}, "far-right")
		]
	})] });
}
oq.propTypes = {
	direction: W.default.string.isRequired,
	handleClose: W.default.func,
	setWindowThumbnailPosition: W.default.func.isRequired,
	thumbnailNavigationPosition: W.default.string.isRequired,
	windowId: W.default.string.isRequired
};
var sq = i(O((e, { windowId: t }) => ({
	direction: dt(e),
	thumbnailNavigationPosition: tt(e, { windowId: t })
}), { setWindowThumbnailPosition: Mr }, null, { forwardRef: !0 }), A("WindowThumbnailSettings"))(oq), cq = N(/*#__PURE__*/ z("path", { d: "M21 3H3v18h18zm-2 16H5V5h14zm-5.04-6.71-2.75 3.54-1.96-2.36L6.5 17h11z" }), "CropOriginalSharp"), lq = N(/*#__PURE__*/ z("path", { d: "M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z" }), "ViewColumn");
//#endregion
//#region src/components/icons/BookViewIcon.jsx
function uq(e) {
	return /* @__PURE__ */ z(Ha, {
		...e,
		children: /* @__PURE__ */ z("svg", {
			xmlns: "http://www.w3.org/2000/svg",
			width: "24",
			height: "24",
			viewBox: "0 0 24 24",
			children: /* @__PURE__ */ z("path", { d: "M1,4V21H22.853V4.1ZM3,19V6h8V19Zm18,0H13V6h8ZM14,9.5h6V11H14ZM14,12h6v1.5H14Zm0,2.5h6V16H14Z" })
		})
	});
}
//#endregion
//#region src/components/icons/GalleryViewIcon.jsx
function dq(e) {
	return /* @__PURE__ */ z(Ha, {
		...e,
		children: /* @__PURE__ */ z("svg", {
			xmlns: "http://www.w3.org/2000/svg",
			width: "24",
			height: "24",
			viewBox: "0 0 24 24",
			children: /* @__PURE__ */ z("path", {
				d: "M19.974,2H2V19.974H19.974V2ZM7.392,18.177H3.8V14.582H7.392Zm0-5.392H3.8V9.19H7.392Zm0-5.392H3.8V3.8H7.392Zm5.392,10.785H9.19V14.582h3.595Zm0-5.392H9.19V9.19h3.595Zm0-5.392H9.19V3.8h3.595Zm5.392,10.785H14.582V14.582h3.595Zm0-5.392H14.582V9.19h3.595Zm0-5.392H14.582V3.8h3.595Z",
				transform: "translate(1 1)"
			})
		})
	});
}
//#endregion
//#region src/components/WindowViewSettings.jsx
var fq = H(sa, {
	name: "WindowViewSettings",
	slot: "option"
})(({ selected: e, theme: t }) => ({ "& .MuiFormControlLabel-label": {
	borderBottom: "2px solid transparent",
	...e && { borderBottomColor: t.palette.secondary.main },
	"&.Mui-selected": { backgroundColor: "transparent !important" },
	"&.Mui-selected.Mui-focusVisible": { backgroundColor: `${(t.vars || t).palette.action.focus} !important` },
	"&:focused": { backgroundColor: `${(t.vars || t).palette.action.focus} !important` },
	color: e ? t.palette.secondary.main : void 0,
	display: "inline-block"
} })), pq = H(oa, {
	name: "WindowViewSettings",
	slot: "option"
})(() => ({ display: "inline-flex" }));
function mq({ handleClose: e = () => {}, windowViewType: t, viewTypes: n = [], setWindowViewType: r, windowId: i }) {
	let { t: a } = V(), o = (e) => {
		r(i, e);
	}, s = {
		book: uq,
		gallery: dq,
		scroll: lq,
		single: cq
	}, c = ({ value: n, Icon: r }) => /* @__PURE__ */ z(fq, {
		"aria-checked": t === n,
		autoFocus: t === n,
		onClick: () => {
			o(n), e();
		},
		role: "menuitemradio",
		selected: t === n,
		children: /* @__PURE__ */ z(Va, {
			value: n,
			control: /* @__PURE__ */ z(r, {
				fill: "currentcolor",
				color: t === n ? "secondary" : void 0
			}),
			label: a(n),
			labelPlacement: "bottom"
		})
	}, n);
	return n.length === 0 ? null : /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(za, {
		role: "presentation",
		disableSticky: !0,
		children: a("view")
	}), /* @__PURE__ */ z(pq, {
		role: "menubar",
		children: n.map((e) => c({
			Icon: s[e],
			value: e
		}))
	})] });
}
mq.propTypes = {
	handleClose: W.default.func,
	setWindowViewType: W.default.func.isRequired,
	viewTypes: W.default.arrayOf(W.default.string),
	windowId: W.default.string.isRequired,
	windowViewType: W.default.string.isRequired
};
var hq = i(O((e, { windowId: t }) => ({
	viewTypes: At(e, { windowId: t }),
	windowViewType: ft(e, { windowId: t })
}), { setWindowViewType: Ir }, null, { forwardRef: !0 }), A("WindowViewSettings"))(mq);
//#endregion
//#region src/components/WindowTopMenu.jsx
function gq({ targetName: e, ...t }) {
	let { PluginComponents: n } = qr(e), { t: r } = V();
	return n?.length > 0 ? /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(za, {
		role: "presentation",
		disableSticky: !0,
		tabIndex: -1,
		children: r("windowPluginButtons")
	}), /* @__PURE__ */ z(Yr, {
		targetName: e,
		...t
	})] }) : null;
}
gq.propTypes = { targetName: W.default.string.isRequired };
function _q({ handleClose: e, showThumbnailNavigationSettings: t = !0, toggleDraggingEnabled: n, windowId: r, anchorEl: i = null, open: a = !1 }) {
	let o = Ni(oi), s = arguments[0];
	return /* @__PURE__ */ B(Ba, {
		container: o?.current,
		anchorOrigin: {
			horizontal: "right",
			vertical: "bottom"
		},
		transformOrigin: {
			horizontal: "right",
			vertical: "top"
		},
		onClose: e,
		orientation: "horizontal",
		anchorEl: i,
		open: a,
		role: "menu",
		slotProps: {
			transition: {
				onEntering: n,
				onExit: n
			},
			paper: { className: M("window-top-menu") }
		},
		children: [
			/* @__PURE__ */ z(hq, {
				windowId: r,
				handleClose: e
			}),
			t && /* @__PURE__ */ z(sq, {
				windowId: r,
				handleClose: e
			}),
			/* @__PURE__ */ z(gq, {
				targetName: "WindowTopMenu",
				...s
			})
		]
	});
}
_q.propTypes = {
	anchorEl: W.default.object,
	handleClose: W.default.func.isRequired,
	open: W.default.bool,
	showThumbnailNavigationSettings: W.default.bool,
	toggleDraggingEnabled: W.default.func.isRequired,
	windowId: W.default.string.isRequired
};
var vq = i(O((e) => ({ showThumbnailNavigationSettings: Gt(e).thumbnailNavigation.displaySettings }), (e) => ({ toggleDraggingEnabled: () => e(Js()) })), A("WindowTopMenu"))(_q);
//#endregion
//#region src/components/icons/WindowOptionsIcon.jsx
function yq(e) {
	return /* @__PURE__ */ z(Ha, {
		...e,
		children: /* @__PURE__ */ B("svg", {
			xmlns: "http://www.w3.org/2000/svg",
			width: "24",
			height: "24",
			viewBox: "0 0 24 24",
			children: [
				/* @__PURE__ */ z("path", {
					d: "M0,0H24V24H0Z",
					fill: "none"
				}),
				/* @__PURE__ */ z("path", {
					d: "M24.852,17.981,3,18V15.945l21.852-.019Z",
					transform: "translate(-2 5)"
				}),
				/* @__PURE__ */ z("path", {
					d: "M1,4V21H22.853V4.1ZM3,19V6h8V19Zm18,0H13V6h8Z",
					transform: "translate(0 -2)"
				})
			]
		})
	});
}
//#endregion
//#region src/components/WindowTopMenuButton.jsx
function bq({ classes: e = {}, windowId: t }) {
	let { t: n } = V(), [r, i] = zi(null), [a, o] = zi(!1), s = Pi();
	return /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(ii, {
		"aria-expanded": !!r,
		"aria-haspopup": "true",
		"aria-label": n("windowMenu"),
		"aria-owns": a ? s : void 0,
		className: a ? e.ctrlBtnSelected : void 0,
		selected: a,
		onClick: (e) => {
			i(e.currentTarget), o(!0);
		},
		children: /* @__PURE__ */ z(yq, {})
	}), /* @__PURE__ */ z(vq, {
		windowId: t,
		anchorEl: r,
		handleClose: () => {
			i(null), o(!1);
		},
		id: s,
		open: a
	})] });
}
bq.propTypes = {
	classes: W.default.objectOf(W.default.string),
	windowId: W.default.string.isRequired
};
var xq = i(A("WindowTopMenuButton"))(bq);
//#endregion
//#region src/components/WindowTopBarPluginArea.jsx
function Sq(e) {
	return /* @__PURE__ */ z(Yr, {
		targetName: "WindowTopBarPluginArea",
		...e
	});
}
var Cq = i(O(null, null), A("WindowTopBarPluginArea"))(Sq), wq = N(/*#__PURE__*/ z("path", { d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreVertSharp");
//#endregion
//#region src/components/WindowTopBarPluginMenu.jsx
function Tq({ windowId: e, menuIcon: t = /* @__PURE__ */ z(wq, {}), pluginTarget: n = "WindowTopBarPluginMenu" }) {
	let { t: r } = V(), i = Ni(oi), a = arguments[0], [o, s] = zi(null), [c, l] = zi(!1), u = Pi(), { PluginComponents: d } = qr(n), f = (e) => {
		s(e.currentTarget), l(!0);
	}, p = () => {
		s(null), l(!1);
	};
	return !d || d.length === 0 ? null : /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(ii, {
		"aria-expanded": !!o,
		"aria-haspopup": "true",
		"aria-label": r("windowPluginMenu"),
		"aria-owns": c ? u : void 0,
		selected: c,
		onClick: f,
		children: t
	}), /* @__PURE__ */ z(Ua, {
		id: u,
		container: i?.current,
		anchorEl: o,
		anchorOrigin: {
			horizontal: "right",
			vertical: "bottom"
		},
		transformOrigin: {
			horizontal: "right",
			vertical: "top"
		},
		open: c,
		onClose: p,
		children: /* @__PURE__ */ z(Yr, {
			targetName: n,
			handleClose: p,
			...a
		})
	})] });
}
Tq.propTypes = {
	anchorEl: W.default.object,
	container: W.default.shape({ current: W.default.instanceOf(Element) }),
	menuIcon: W.default.element,
	open: W.default.bool,
	pluginTarget: W.default.string,
	windowId: W.default.string.isRequired
};
var Eq = i(A("WindowTopBarPluginMenu"))(Tq), Dq = N(/*#__PURE__*/ z("path", { d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8" }), "ErrorOutlineSharp"), Oq = H(Aq)(({ theme: e }) => ({
	...e.typography.h6,
	flexGrow: 1,
	paddingLeft: e.spacing(.5)
})), kq = H("div")(({ theme: e }) => ({
	...e.typography.h6,
	flexGrow: 1,
	paddingLeft: e.spacing(.5)
}));
function Aq({ children: e, ...t }) {
	return /* @__PURE__ */ z(U, {
		variant: "h2",
		noWrap: !0,
		...t,
		sx: [{ color: "inherit" }, ...Array.isArray(t.sx) ? t.sx : [t.sx]],
		children: e
	});
}
Aq.propTypes = {
	children: W.default.node.isRequired,
	sx: W.default.oneOfType([W.default.arrayOf(W.default.object), W.default.object])
};
function jq({ error: e = null, hideWindowTitle: t = !1, isFetching: n = !1, manifestTitle: r = "" }) {
	let i;
	return i = n ? /* @__PURE__ */ z(Oq, { children: /* @__PURE__ */ z(Da, { variant: "text" }) }) : e ? /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(Dq, { color: "error" }), /* @__PURE__ */ z(Oq, {
		color: "textSecondary",
		children: e
	})] }) : t ? /* @__PURE__ */ z(kq, {}) : /* @__PURE__ */ z(Oq, { children: r }), i;
}
jq.propTypes = {
	error: W.default.string,
	hideWindowTitle: W.default.bool,
	isFetching: W.default.bool,
	manifestTitle: W.default.string
};
var Mq = i(O((e, { windowId: t }) => ({
	error: wn(e, { windowId: t }).error,
	hideWindowTitle: ut(e, { windowId: t }).hideWindowTitle,
	isFetching: wn(e, { windowId: t }).isFetching,
	manifestTitle: Jt(e, { windowId: t })
}), null), A("WindowTopBarTitle"))(jq), Nq = N(/*#__PURE__*/ z("path", { d: "M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z" }), "FullscreenSharp"), Pq = N(/*#__PURE__*/ z("path", { d: "M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z" }), "FullscreenExitSharp");
//#endregion
//#region src/components/FullScreenButton.jsx
function Fq({ className: e = void 0 }) {
	let { t } = V(), n = Ni(TM), [r, i] = zi(!1);
	return L(() => {
		let e = document.createElement("div");
		i(typeof e.requestFullscreen == "function");
	}, []), r ? n && n.active ? /* @__PURE__ */ z(ii, {
		className: e,
		"aria-label": t("exitFullScreen"),
		onClick: n.exit,
		children: /* @__PURE__ */ z(Pq, {})
	}) : n ? /* @__PURE__ */ z(ii, {
		className: e,
		"aria-label": t("workspaceFullScreen"),
		onClick: n.enter,
		children: /* @__PURE__ */ z(Nq, {})
	}) : null : null;
}
Fq.propTypes = { className: W.default.string };
var Iq = i(O((e) => ({}), {}), A("FullScreenButton"))(Fq);
//#endregion
//#region src/components/icons/WindowMaxIcon.jsx
function Lq(e) {
	return /* @__PURE__ */ z(Ha, {
		...e,
		children: /* @__PURE__ */ B("svg", {
			xmlns: "http://www.w3.org/2000/svg",
			width: "24",
			height: "24",
			viewBox: "0 0 24 24",
			children: [/* @__PURE__ */ z("path", { d: "M7,14H5v5h5V17H7Zm7-9V7h3v3h2V5Z" }), /* @__PURE__ */ z("path", { d: "M22.517,1.524H1.736V22.37H22.517Zm-2,18.845H3.736V3.524H20.517Z" })]
		})
	});
}
//#endregion
//#region src/components/icons/WindowMinIcon.jsx
function Rq(e) {
	return /* @__PURE__ */ z(Ha, {
		...e,
		children: /* @__PURE__ */ B("svg", {
			xmlns: "http://www.w3.org/2000/svg",
			width: "24",
			height: "24",
			viewBox: "0 0 24 24",
			children: [/* @__PURE__ */ z("path", { d: "M5,16H8v3h2V14H5ZM16,8V5H14v5h5V8Z" }), /* @__PURE__ */ z("path", { d: "M22.517,1.524H1.736V22.37H22.517Zm-2,18.845H3.736V3.524H20.517Z" })]
		})
	});
}
//#endregion
//#region src/components/WindowTopBar.jsx
var zq = H(Ra, {
	name: "WindowTopBar",
	slot: "root"
})(() => ({ zIndex: 1100 })), Bq = H(la, {
	name: "WindowTopBar",
	slot: "toolbar"
})(({ ownerState: e, theme: t }) => ({
	backgroundColor: t.palette.shades?.main,
	borderTop: "2px solid",
	borderTopColor: e?.focused ? t.palette.primary.main : "transparent",
	minHeight: 32,
	paddingLeft: t.spacing(.5),
	paddingRight: t.spacing(.5),
	...e?.windowDraggable && { cursor: "move" }
}));
function Vq({ removeWindow: e, windowId: t, toggleWindowSideBar: n, maximizeWindow: r = () => {}, maximized: i = !1, minimizeWindow: a = () => {}, allowClose: o = !0, allowMaximize: s = !0, focusWindow: c = () => {}, allowFullscreen: l = !1, allowTopMenuButton: u = !0, allowWindowSideBar: d = !0, sideBarOpen: f = !1, component: p = "nav" }) {
	let { t: m } = V(), h = arguments[0];
	return /* @__PURE__ */ z(zq, {
		component: p,
		"aria-label": m("windowNavigation"),
		position: "relative",
		color: "default",
		enableColorOnDark: !0,
		children: /* @__PURE__ */ B(Bq, {
			disableGutters: !0,
			onMouseDown: c,
			ownerState: h,
			className: (0, G.default)(M("window-top-bar")),
			variant: "dense",
			children: [
				d && /* @__PURE__ */ z(ii, {
					"aria-expanded": f,
					"aria-haspopup": !0,
					"aria-label": m(f ? "hideWindowSideBar" : "showWindowSideBar"),
					onClick: n,
					className: M("window-menu-btn"),
					children: /* @__PURE__ */ z(eq, {})
				}),
				/* @__PURE__ */ z(Mq, { windowId: t }),
				u && /* @__PURE__ */ z(xq, {
					windowId: t,
					className: M("window-menu-btn")
				}),
				/* @__PURE__ */ z(Cq, { windowId: t }),
				/* @__PURE__ */ z(Eq, { windowId: t }),
				s && /* @__PURE__ */ z(ii, {
					"aria-label": m(i ? "minimizeWindow" : "maximizeWindow"),
					className: (0, G.default)(M("window-maximize"), M("window-menu-btn")),
					onClick: i ? a : r,
					children: z(i ? Rq : Lq, {})
				}),
				l && /* @__PURE__ */ z(Iq, { className: M("window-menu-btn") }),
				o && /* @__PURE__ */ z(ii, {
					"aria-label": m("closeWindow"),
					className: (0, G.default)(M("window-close"), M("window-menu-btn")),
					onClick: e,
					children: /* @__PURE__ */ z(Au, {})
				})
			]
		})
	});
}
Vq.propTypes = {
	allowClose: W.default.bool,
	allowFullscreen: W.default.bool,
	allowMaximize: W.default.bool,
	allowTopMenuButton: W.default.bool,
	allowWindowSideBar: W.default.bool,
	component: W.default.elementType,
	focused: W.default.bool,
	focusWindow: W.default.func,
	maximized: W.default.bool,
	maximizeWindow: W.default.func,
	minimizeWindow: W.default.func,
	sideBarOpen: W.default.bool,
	removeWindow: W.default.func.isRequired,
	toggleWindowSideBar: W.default.func.isRequired,
	windowDraggable: W.default.bool,
	windowId: W.default.string.isRequired
};
var Hq = i(O((e, { windowId: t }) => {
	let n = ut(e, { windowId: t });
	return {
		allowClose: n.allowClose,
		allowFullscreen: n.allowFullscreen,
		allowMaximize: n.allowMaximize,
		allowTopMenuButton: n.allowTopMenuButton,
		allowWindowSideBar: n.allowWindowSideBar,
		focused: Yt(e, { windowId: t }),
		maximized: n.maximized,
		sideBarOpen: (b(e, { windowId: t }) || {}).sideBarOpen
	};
}, (e, { windowId: t }) => ({
	focusWindow: () => e(Lr(t)),
	maximizeWindow: () => e(Fr(t)),
	minimizeWindow: () => e(jr(t)),
	removeWindow: () => e(Rr(t)),
	toggleWindowSideBar: () => e(Nr(t))
})), A("WindowTopBar"))(Vq), Uq = N(/*#__PURE__*/ z("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z" }), "InfoSharp"), Wq = N(/*#__PURE__*/ z("path", { d: "M10.08 10.86c.05-.33.16-.62.3-.87s.34-.46.59-.62c.24-.15.54-.22.91-.23.23.01.44.05.63.13.2.09.38.21.52.36s.25.33.34.53.13.42.14.64h1.79c-.02-.47-.11-.9-.28-1.29s-.4-.73-.7-1.01-.66-.5-1.08-.66-.88-.23-1.39-.23c-.65 0-1.22.11-1.7.34s-.88.53-1.2.92-.56.84-.71 1.36S8 11.29 8 11.87v.27c0 .58.08 1.12.23 1.64s.39.97.71 1.35.72.69 1.2.91 1.05.34 1.7.34c.47 0 .91-.08 1.32-.23s.77-.36 1.08-.63.56-.58.74-.94.29-.74.3-1.15h-1.79c-.01.21-.06.4-.15.58s-.21.33-.36.46-.32.23-.52.3c-.19.07-.39.09-.6.1-.36-.01-.66-.08-.89-.23-.25-.16-.45-.37-.59-.62s-.25-.55-.3-.88-.08-.67-.08-1v-.27c0-.35.03-.68.08-1.01M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8" }), "CopyrightSharp"), Gq = N(/*#__PURE__*/ z("path", { d: "m11.99 18.54-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27z" }), "LayersSharp");
//#endregion
//#region src/components/icons/CanvasIndexIcon.jsx
function Kq(e) {
	return /* @__PURE__ */ z(Ha, {
		...e,
		children: /* @__PURE__ */ z("svg", {
			xmlns: "http://www.w3.org/2000/svg",
			width: "24",
			height: "24",
			viewBox: "0 0 24 24",
			children: /* @__PURE__ */ z("path", { d: "M6.924,21H21V19H6.924ZM3,17H21V15H3Zm3.924-4H21V11H6.924Zm0-4H21V7H6.924ZM3,3V5H21V3Z" })
		})
	});
}
//#endregion
//#region src/components/WindowSideBarButtons.jsx
var qq = H(ba, {
	name: "WindowSideBarButtons",
	slot: "root"
})({
	"& .MuiTabs-flexContainer": { flexDirection: "column" },
	"&.MuiTabs-indicator": { display: "none" }
}), Jq = H(xa, {
	name: "WindowSideBarButtons",
	slot: "button"
})(({ theme: e }) => ({
	"&.Mui-selected": {
		borderRight: "2px solid",
		borderRightColor: e.palette.primary.main
	},
	"&.MuiTab-root": {
		"&:active": { backgroundColor: e.palette.action.active },
		"&:focus": {
			"@media (hover: none)": { backgroundColor: "transparent" },
			backgroundColor: e.palette.action.hover,
			textDecoration: "none"
		},
		"&:hover": {
			"@media (hover: none)": { backgroundColor: "transparent" },
			backgroundColor: e.palette.action.hover,
			textDecoration: "none"
		},
		borderRight: "2px solid transparent",
		minWidth: "auto"
	},
	fill: "currentcolor"
}));
function Yq({ value: e, ...t }) {
	let { t: n } = V();
	return /* @__PURE__ */ z(ia, {
		title: n("openCompanionWindow", { context: e }),
		children: /* @__PURE__ */ z(Jq, {
			...t,
			value: e,
			"aria-label": n("openCompanionWindow", { context: e }),
			disableRipple: !0
		})
	});
}
Yq.propTypes = { value: W.default.string.isRequired };
function Xq({ addCompanionWindow: e, hasAnnotations: t = !1, hasAnyAnnotations: n = !1, hasAnyLayers: r = !1, hasCurrentLayers: i = !1, hasSearchResults: a = !1, hasSearchService: o = !1, panels: s = [], sideBarPanel: c = "closed" }) {
	let { t: l } = V(), { PluginComponents: u } = qr("WindowSideBarButtons");
	return /* @__PURE__ */ B(qq, {
		value: c !== "closed" && c,
		onChange: (t, n) => {
			e(n);
		},
		variant: "fullWidth",
		indicatorColor: "primary",
		textColor: "primary",
		orientation: "vertical",
		children: [
			s.info && /* @__PURE__ */ z(Yq, {
				value: "info",
				icon: /* @__PURE__ */ z(Uq, {})
			}),
			s.attribution && /* @__PURE__ */ z(Yq, {
				value: "attribution",
				icon: /* @__PURE__ */ z(Wq, {})
			}),
			s.canvas && /* @__PURE__ */ z(Yq, {
				value: "canvas",
				icon: /* @__PURE__ */ z(Kq, {})
			}),
			s.annotations && (t || n) && /* @__PURE__ */ z(Yq, {
				value: "annotations",
				icon: /* @__PURE__ */ z(na, {
					overlap: "rectangular",
					color: "notification",
					invisible: !t,
					variant: "dot",
					children: /* @__PURE__ */ z(ni, {})
				})
			}),
			s.search && o && /* @__PURE__ */ z(Yq, {
				value: "search",
				icon: /* @__PURE__ */ z(na, {
					overlap: "rectangular",
					color: "notification",
					invisible: !a,
					variant: "dot",
					children: /* @__PURE__ */ z(Qr, {})
				})
			}),
			s.layers && r && /* @__PURE__ */ z(Yq, {
				value: "layers",
				icon: /* @__PURE__ */ z(na, {
					overlap: "rectangular",
					color: "notification",
					invisible: !i,
					variant: "dot",
					children: /* @__PURE__ */ z(Gq, {})
				})
			}),
			u && u.map((e) => /* @__PURE__ */ z(Yq, {
				value: e.value,
				icon: /* @__PURE__ */ z(e, {})
			}, e.value))
		]
	});
}
Xq.propTypes = {
	addCompanionWindow: W.default.func.isRequired,
	hasAnnotations: W.default.bool,
	hasAnyAnnotations: W.default.bool,
	hasAnyLayers: W.default.bool,
	hasCurrentLayers: W.default.bool,
	hasSearchResults: W.default.bool,
	hasSearchService: W.default.bool,
	panels: W.default.objectOf(W.default.bool),
	sideBarPanel: W.default.string
};
//#endregion
//#region src/containers/WindowSideBarButtons.js
var Zq = (e, { windowId: t }) => ({ addCompanionWindow: (n) => e(bs(t, {
	content: n,
	position: "left"
})) });
function Qq(e, t) {
	return e && e.some((e) => t(e).imageResources.length > 1);
}
function $q(e, t) {
	return e && e.some((e) => {
		let n = t(e);
		return n.annotationListUris.length > 0 || n.canvasAnnotationPages.length > 0;
	});
}
function eJ(e, { windowId: t }) {
	let { suggestedSearches: n } = b(e, { windowId: t }), r = $e(e, {
		position: "left",
		windowId: t
	})?.[0]?.id, i = vr(e, {
		companionWindowId: r,
		windowId: t
	});
	return !!(n || i);
}
var tJ = i(O((e, { windowId: t }) => ({
	hasAnnotations: gr(e, { windowId: t }).length > 0,
	hasAnyAnnotations: $q(yn(e, { windowId: t }), Ze(e)),
	hasAnyLayers: Qq(yn(e, { windowId: t }), Ze(e)),
	hasCurrentLayers: Qq(Tt(e, { windowId: t }), Ze(e)),
	hasSearchResults: eJ(e, { windowId: t }),
	hasSearchService: De(e, { windowId: t }) !== null,
	panels: ut(e, { windowId: t }).panels,
	sideBarPanel: ($e(e, {
		position: "left",
		windowId: t
	})[0] || {}).content
}), Zq), A("WindowSideBarButtons"))(Xq);
//#endregion
//#region src/components/WindowSideBar.jsx
H(Wa, {
	name: "WindowSideBar",
	slot: "root"
})(({ theme: e }) => ({
	flexShrink: 0,
	order: -1e3,
	zIndex: e.zIndex.appBar - 1
}));
function nJ({ classes: e = {}, direction: t, windowId: n, sideBarOpen: r = !1 }) {
	let { t: i } = V();
	return /* @__PURE__ */ z(Wa, {
		sx: {
			flexShrink: 0,
			order: -1e3,
			zIndex: (e) => e.zIndex.appBar - 1
		},
		variant: "persistent",
		className: e.drawer,
		anchor: t === "rtl" ? "right" : "left",
		slotProps: {
			paper: {
				"aria-label": i("sidebarPanelsNavigation"),
				component: "nav",
				sx: {
					width: r ? 48 : 0,
					position: "relative"
				}
			},
			transition: {
				direction: t === "rtl" ? "left" : "right",
				mountOnEnter: !0,
				unmountOnExit: !0
			}
		},
		open: r,
		children: /* @__PURE__ */ z(tJ, { windowId: n })
	});
}
nJ.propTypes = {
	classes: W.default.objectOf(W.default.string),
	direction: W.default.string.isRequired,
	sideBarOpen: W.default.bool,
	windowId: W.default.string.isRequired
};
var rJ = i(O((e, { windowId: t }) => ({
	direction: dt(e),
	sideBarOpen: (b(e, { windowId: t }) || {}).sideBarOpen,
	sideBarPanel: (b(e, { windowId: t }) || {}).sideBarPanel
}), null), A("WindowSideBar"))(nJ), iJ = N(/*#__PURE__*/ z("path", { d: "m14 7-5 5 5 5z" }), "ArrowLeftSharp"), aJ = N(/*#__PURE__*/ z("path", { d: "m10 17 5-5-5-5z" }), "ArrowRightSharp"), oJ = H("pre", {
	name: "ErrorContent",
	slot: "stacktrace"
})({ overflowY: "scroll" }), sJ = H("pre", {
	name: "ErrorContent",
	slot: "metadata"
})({
	height: "100px",
	overflowY: "scroll"
}), cJ = H(fa, {
	name: "ErrorContent",
	slot: "accordion"
})({
	backgroundColor: "inherit",
	color: "inherit",
	margin: 0
});
function lJ({ error: e, metadata: t = null, showJsError: n = !0, ...r }) {
	let { t: i } = V();
	if (!n) return null;
	let a = {
		error: e,
		metadata: t,
		showJsError: n,
		t: i,
		...r
	};
	return /* @__PURE__ */ B(qa, {
		elevation: 6,
		variant: "filled",
		severity: "error",
		children: [
			i("errorDialogTitle"),
			n && /* @__PURE__ */ B(cJ, {
				elevation: 2,
				square: !0,
				children: [/* @__PURE__ */ z(ma, {
					sx: { marginInlineStart: "-1rem" },
					expandIcon: /* @__PURE__ */ z(_f, { sx: { color: "#fff" } }),
					children: i("jsError", {
						message: e.message,
						name: e.name
					})
				}), /* @__PURE__ */ z(pa, { children: /* @__PURE__ */ B(Ka, { children: [/* @__PURE__ */ z(oJ, { children: i("jsStack", { stack: e.stack }) }), t && /* @__PURE__ */ z(sJ, { children: JSON.stringify(t, null, 2) })] }) })]
			}),
			/* @__PURE__ */ z(Yr, {
				targetName: "ErrorContent",
				...a
			})
		]
	});
}
lJ.propTypes = {
	error: W.default.object.isRequired,
	metadata: W.default.object,
	showJsError: W.default.bool
};
var uJ = i(O((e, { companionWindowId: t, windowId: n }) => ({
	metadata: {
		companionWindow: t && Fe(e, { companionWindowId: t }),
		manifest: le(e, { windowId: n }),
		viewer: re(e, { windowId: n }),
		window: b(e, { windowId: n })
	},
	showJsError: Gt(e).window.showJsError
})), A("ErrorContent"))(lJ);
//#endregion
//#region src/components/CompanionWindowFactory.jsx
function dJ({ content: e = null, id: t, windowId: n }) {
	let { t: r } = V(), i = I(({ error: e }) => /* @__PURE__ */ z(pf, {
		title: r("error"),
		windowId: n,
		id: t,
		children: /* @__PURE__ */ z(uJ, {
			error: e,
			windowId: n,
			companionWindowId: t
		})
	}), [
		n,
		r,
		t
	]), a = Aw[e];
	return a ? /* @__PURE__ */ z(li, {
		fallbackComponent: i,
		children: /* @__PURE__ */ z(a, {
			id: t,
			windowId: n
		})
	}) : null;
}
dJ.propTypes = {
	content: W.default.string,
	id: W.default.string.isRequired,
	windowId: W.default.string.isRequired
};
var fJ = i(O((e, { id: t }) => ({
	content: Fe(e, { companionWindowId: t }).content,
	id: t
})), A("CompanionWindowFactory"))(dJ), pJ = H("div", {
	name: "CompanionArea",
	slot: "root"
})(({ ownerState: e, theme: t }) => ({
	display: "flex",
	minHeight: 0,
	position: "relative",
	zIndex: t.zIndex.appBar - 2,
	...(e.position === "bottom" || e.position === "far-bottom") && {
		flexDirection: "column",
		width: "100%"
	}
})), mJ = H("div", {
	name: "CompanionArea",
	slot: "container"
})(({ ownerState: e }) => ({
	display: e?.companionAreaOpen ? "flex" : "none",
	...(e?.position === "bottom" || e?.position === "far-bottom") && {
		flexDirection: "column",
		width: "100%"
	},
	...e?.position === "left" && e?.companionWindowIds && e.companionWindowIds.length > 0 && { minWidth: "235px" }
})), hJ = H("div", {
	name: "CompanionArea",
	slot: "toggle"
})(({ theme: e }) => ({
	alignItems: "center",
	backgroundColor: e.palette.background.paper,
	border: `1px solid ${e.palette.shades?.dark}`,
	...e.applyStyles("dark", { borderColor: e.palette.divider }),
	borderInlineStart: 0,
	borderRadius: 0,
	display: "inline-flex",
	height: "48px",
	left: "100%",
	marginTop: "1rem",
	overflow: "hidden",
	padding: 2,
	position: "absolute",
	width: "23px",
	zIndex: e.zIndex.drawer
}));
function gJ({ classes: e = {}, className: t = void 0, direction: n, companionWindowIds: r, companionAreaOpen: i, setCompanionAreaOpen: a = () => {}, position: o, sideBarOpen: s = !1, windowId: c }) {
	let { t: l } = V(), u = o === "bottom" || o === "far-bottom" ? e.horizontal : null, d = z(n === "rtl" ? i ? aJ : iJ : i ? iJ : aJ, {}), f = (() => {
		let e = n === "rtl" ? "left" : "right", t = n === "rtl" ? "right" : "left";
		switch (o) {
			case "right":
			case "far-right": return t;
			case "bottom":
			case "far-bottom": return "up";
			default: return e;
		}
	})(), p = (0, G.default)(u, M(`companion-area-${o}`), t), m = arguments[0];
	return /* @__PURE__ */ B(pJ, {
		ownerState: m,
		className: p,
		children: [/* @__PURE__ */ z(Ga, {
			in: i,
			direction: f,
			children: /* @__PURE__ */ z(mJ, {
				ownerState: m,
				className: `${M("companion-windows")}`,
				children: r.map((e) => /* @__PURE__ */ z(fJ, {
					id: e,
					windowId: c
				}, e))
			})
		}), a && o === "left" && s && r.length > 0 && /* @__PURE__ */ z(hJ, { children: /* @__PURE__ */ z(ii, {
			"aria-expanded": i,
			"aria-label": l(i ? "collapseSidePanel" : "expandSidePanel"),
			edge: "start",
			onClick: () => {
				a(c, !i);
			},
			TooltipProps: { placement: "right" },
			children: d
		}) })]
	});
}
gJ.propTypes = {
	classes: W.default.objectOf(W.default.string),
	className: W.default.string,
	companionAreaOpen: W.default.bool.isRequired,
	companionWindowIds: W.default.arrayOf(W.default.string).isRequired,
	direction: W.default.string.isRequired,
	position: W.default.string.isRequired,
	setCompanionAreaOpen: W.default.func,
	sideBarOpen: W.default.bool,
	windowId: W.default.string.isRequired
};
var _J = i(O((e, { windowId: t, position: n }) => ({
	companionAreaOpen: Le(e, {
		position: n,
		windowId: t
	}),
	companionWindowIds: rt(e, {
		position: n,
		windowId: t
	}),
	direction: dt(e),
	sideBarOpen: (b(e, { windowId: t }) || {}).sideBarOpen
}), { setCompanionAreaOpen: Br }), A("CompanionArea"))(gJ), vJ = (e) => {
	let t;
	return t = e < 1 ? 5.11916 * e ** 2 : 4.5 * Math.log(e + 1) + 2, (t / 100).toFixed(2);
}, yJ = H(uo, {
	name: "ScrollIndicatedDialogContent",
	slot: "root"
})(({ ownerState: e, theme: t }) => {
	let n = t.palette.mode === "dark" ? { backgroundImage: `linear-gradient(${Ji("#fff", vJ(e?.elevation || 24))}, ${Ji("#fff", vJ(e?.elevation || 24))})` } : t.palette.background.paper;
	return {
		background: `linear-gradient(${n} 30%, rgba(255, 255, 255, 0)), linear-gradient(rgba(255, 255, 255, 0), ${n} 70%) 0 100%, radial-gradient(farthest-side at 50% 0, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)), radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)) 0 100%;`,
		backgroundAttachment: "local, local, scroll, scroll",
		backgroundRepeat: "no-repeat",
		backgroundSize: "100% 40px, 100% 40px, 100% 14px, 100% 14px",
		overflowY: "auto"
	};
});
function bJ({ classes: e = {}, className: t = "", ...n }) {
	let r = [t, e.shadowScrollDialog].join(" ");
	return /* @__PURE__ */ z(yJ, {
		className: r,
		...n
	});
}
bJ.propTypes = {
	classes: W.default.shape({ shadowScrollDialog: W.default.string }),
	className: W.default.string
};
//#endregion
//#region src/containers/ScrollIndicatedDialogContent.js
var xJ = bJ, SJ = H(xJ)(() => ({ padding: (e) => e.spacing(1) })), CJ = H("div")(() => ({
	"& .MuiPaper-root": { background: "transparent" },
	padding: (e) => e.spacing(2)
})), wJ = H("div")(() => ({
	padding: (e) => e.spacing(2),
	paddingTop: 0
})), TJ = ({ onClose: e, container: t }) => /* @__PURE__ */ B(Qa, {
	variant: "contained",
	onClose: e,
	open: !0,
	container: t,
	children: [/* @__PURE__ */ z(no, {
		id: "select-collection",
		children: /* @__PURE__ */ z(Da, { variant: "text" })
	}), /* @__PURE__ */ B(xJ, { children: [/* @__PURE__ */ z(Da, { variant: "text" }), /* @__PURE__ */ z(Da, { variant: "text" })] })]
});
TJ.propTypes = {
	container: W.default.instanceOf(Element).isRequired,
	onClose: W.default.func.isRequired
};
function EJ({ addWindow: e, collection: t = null, dialogCollectionPath: n = [], error: r = null, hideCollectionDialog: i, isMultipart: a = !1, manifest: o, manifestId: s, ready: c = !1, setWorkspaceAddVisibility: l, showCollectionDialog: u, updateWindow: d, windowId: f = null }) {
	let p = Ni(oi), { t: m } = V(), [h, g] = zi(null), _ = () => {
		i(f);
	}, v = (e) => {
		u(e.id, [...n, s], f);
	}, y = () => {
		u(n[n.length - 1], n.slice(0, -1), f);
	}, b = (t) => {
		f ? d(f, {
			canvasId: null,
			collectionPath: [...n, s],
			manifestId: t.id
		}) : e({
			collectionPath: [...n, s],
			manifestId: t.id
		}), _(), l(!1);
	}, x = (p?.current || document.body).querySelector(`#${f}`);
	if (r || !x) return null;
	if (!c) return /* @__PURE__ */ z(TJ, {
		container: x,
		onClose: _
	});
	let S = o && Ge(o.getProperty("rights") || o.getProperty("license")), C = o && Ge(o.getRequiredStatement()).filter((e) => e && e.getValue()).map((e) => ({
		label: null,
		values: e.getValues()
	})), w = o.getCollections(), T = h || (w.length > 0 ? "collections" : "manifests");
	return /* @__PURE__ */ B(Qa, {
		variant: "contained",
		onClose: _,
		container: x,
		open: !0,
		children: [
			/* @__PURE__ */ B(no, {
				id: "select-collection",
				children: [/* @__PURE__ */ z(lo, {
					component: "div",
					variant: "overline",
					children: m(a ? "multipartCollection" : "collection")
				}), /* @__PURE__ */ z(lo, {
					component: "div",
					variant: "h3",
					children: /* @__PURE__ */ z(Xr, { resource: o })
				})]
			}),
			/* @__PURE__ */ B(SJ, { children: [
				t && /* @__PURE__ */ z(Ja, {
					startIcon: /* @__PURE__ */ z(Cg, {}),
					onClick: () => y(),
					children: /* @__PURE__ */ z(Xr, { resource: t })
				}),
				/* @__PURE__ */ B(CJ, { children: [/* @__PURE__ */ z(Of, { manifestId: o.id }), /* @__PURE__ */ B(yf, {
					id: "select-collection-rights",
					label: m("attributionTitle"),
					children: [C && /* @__PURE__ */ z(xf, {
						labelValuePairs: C,
						defaultLabel: m("attribution")
					}), S && S.length > 0 && /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(lo, {
						variant: "subtitle2",
						component: "dt",
						children: m("rights")
					}), S.map((e) => /* @__PURE__ */ z(lo, {
						variant: "body1",
						component: "dd",
						children: /* @__PURE__ */ z(ro, {
							target: "_blank",
							rel: "noopener noreferrer",
							href: e,
							children: e
						})
					}, e))] })]
				})] }),
				/* @__PURE__ */ B(wJ, { children: [o.getTotalCollections() > 0 && /* @__PURE__ */ z(Za, {
					clickable: !0,
					color: T === "collections" ? "primary" : "default",
					onClick: () => g("collections"),
					label: m("totalCollections", { count: o.getTotalCollections() })
				}), o.getTotalManifests() > 0 && /* @__PURE__ */ z(Za, {
					clickable: !0,
					color: T === "manifests" ? "primary" : "default",
					onClick: () => g("manifests"),
					label: m("totalManifests", { count: o.getTotalManifests() })
				})] }),
				T === "collections" && /* @__PURE__ */ z(so, { children: w.map((e) => /* @__PURE__ */ z(oo, {
					onClick: () => {
						v(e);
					},
					variant: "multiline",
					children: /* @__PURE__ */ z(Xr, { resource: e })
				}, e.id)) }),
				T === "manifests" && /* @__PURE__ */ z(so, { children: o.getManifests().map((e) => /* @__PURE__ */ z(oo, {
					onClick: () => {
						b(e);
					},
					variant: "multiline",
					children: /* @__PURE__ */ z(Xr, { resource: e })
				}, e.id)) })
			] }),
			/* @__PURE__ */ z($a, { children: /* @__PURE__ */ z(Ja, {
				onClick: _,
				children: m("close")
			}) })
		]
	});
}
EJ.propTypes = {
	addWindow: W.default.func.isRequired,
	collection: W.default.object,
	dialogCollectionPath: W.default.arrayOf(W.default.string),
	error: W.default.string,
	hideCollectionDialog: W.default.func.isRequired,
	isMultipart: W.default.bool,
	manifest: W.default.object.isRequired,
	manifestId: W.default.string.isRequired,
	ready: W.default.bool,
	setWorkspaceAddVisibility: W.default.func.isRequired,
	showCollectionDialog: W.default.func.isRequired,
	updateWindow: W.default.func.isRequired,
	windowId: W.default.string
};
var DJ = i(O((e, { windowId: t }) => {
	let { collectionManifestId: n, dialogCollectionPath: r } = b(e, { windowId: t }), i = le(e, { manifestId: n }), a = r && r[r.length - 1], o = a && le(e, { manifestId: a });
	return {
		collection: o && un(e, { manifestId: o.id }),
		dialogCollectionPath: r,
		error: i && i.error,
		isMultipart: Re(e, { manifestId: n }).includes("multi-part"),
		manifest: i && un(e, { manifestId: n }),
		manifestId: n,
		open: e.workspace.collectionDialogOn,
		ready: i && !!i.json,
		windowId: t
	};
}, {
	addWindow: Vr,
	hideCollectionDialog: zr,
	setWorkspaceAddVisibility: Gs,
	showCollectionDialog: Hr,
	updateWindow: Pr
}), A("CollectionDialog"))(EJ), OJ = ji(() => Promise.resolve().then(() => oQ)), kJ = ji(() => Promise.resolve().then(() => cQ)), AJ = ji(() => Promise.resolve().then(() => fQ)), jJ = ji(() => Promise.resolve().then(() => vQ)), MJ = ji(() => Promise.resolve().then(() => gQ)), NJ = ji(() => Promise.resolve().then(() => mQ));
kJ.displayName = "GalleryView", AJ.displayName = "SelectCollection", jJ.displayName = "WindowViewer";
var PJ = H("div", {
	name: "PrimaryWindow",
	slot: "root"
})(() => ({
	display: "flex",
	flex: 1,
	position: "relative"
})), FJ = ({ audioResources: e = [], isCollection: t = !1, isFetching: n = !1, textResources: r = [], videoResources: i = [], view: a = void 0, windowId: o }) => t ? /* @__PURE__ */ z(AJ, { windowId: o }) : n === !1 ? a === "gallery" ? /* @__PURE__ */ z(kJ, { windowId: o }) : i.length > 0 ? /* @__PURE__ */ z(MJ, { windowId: o }) : e.length > 0 ? /* @__PURE__ */ z(OJ, { windowId: o }) : r.length > 0 ? /* @__PURE__ */ z(NJ, { windowId: o }) : /* @__PURE__ */ z(jJ, { windowId: o }) : null;
FJ.propTypes = {
	audioResources: W.default.arrayOf(W.default.object),
	isCollection: W.default.bool,
	isFetching: W.default.bool,
	textResources: W.default.arrayOf(W.default.object),
	videoResources: W.default.arrayOf(W.default.object),
	view: W.default.string,
	windowId: W.default.string.isRequired
};
function IJ({ audioResources: e = void 0, children: t = null, className: n = void 0, isCollection: r = !1, isCollectionDialogVisible: i = !1, isFetching: a = !1, textResources: o = void 0, videoResources: s = void 0, view: c = void 0, windowId: l }) {
	let u = {
		audioResources: e,
		isCollection: r,
		isFetching: a,
		textResources: o,
		videoResources: s,
		view: c,
		windowId: l
	};
	return /* @__PURE__ */ B(PJ, {
		"data-testid": "test-window",
		className: (0, G.default)(M("primary-window"), n),
		children: [
			/* @__PURE__ */ z(rJ, { windowId: l }),
			/* @__PURE__ */ z(_J, {
				windowId: l,
				position: "left"
			}),
			i && /* @__PURE__ */ z(DJ, { windowId: l }),
			/* @__PURE__ */ z(wi, {
				fallback: /* @__PURE__ */ z("div", {}),
				children: t || /* @__PURE__ */ z(FJ, { ...u })
			})
		]
	});
}
IJ.propTypes = {
	audioResources: W.default.arrayOf(W.default.object),
	children: W.default.node,
	className: W.default.string,
	isCollection: W.default.bool,
	isCollectionDialogVisible: W.default.bool,
	isFetching: W.default.bool,
	textResources: W.default.arrayOf(W.default.object),
	videoResources: W.default.arrayOf(W.default.object),
	view: W.default.string,
	windowId: W.default.string.isRequired
};
var LJ = i(O((e, { windowId: t }) => {
	let n = un(e, { windowId: t });
	return {
		audioResources: Ft(e, { windowId: t }) || [],
		isCollection: n && n.isCollection(),
		isCollectionDialogVisible: b(e, { windowId: t }).collectionDialogOn,
		textResources: Wt(e, { windowId: t }) || [],
		videoResources: Ht(e, { windowId: t }) || []
	};
}, null), A("PrimaryWindow"))(IJ), RJ = H(ii)(() => ({ marginLeft: "auto" }));
function zJ({ allowClose: e = !0, allowWindowSideBar: t = !0, ariaLabel: n = !0, children: r = null, label: i = "", removeWindow: a = () => {}, windowId: o }) {
	let { t: s } = V();
	return /* @__PURE__ */ B(Vi, {
		component: "section",
		elevation: 1,
		id: o,
		className: (0, G.default)(M("placeholder-window")),
		sx: {
			backgroundColor: "shades.dark",
			borderRadius: 0,
			display: "flex",
			flexDirection: "column",
			height: "100%",
			minHeight: 0,
			overflow: "hidden",
			width: "100%"
		},
		"aria-label": i && n ? s("window", { label: i }) : null,
		children: [/* @__PURE__ */ z(Ra, {
			position: "relative",
			color: "default",
			enableColorOnDark: !0,
			children: /* @__PURE__ */ B(la, {
				disableGutters: !0,
				className: (0, G.default)(M("window-top-bar")),
				sx: {
					backgroundColor: "shades.main",
					borderTop: "2px solid transparent",
					minHeight: 32,
					paddingLeft: .5,
					paddingRight: .5
				},
				variant: "dense",
				children: [
					t && /* @__PURE__ */ z(ii, {
						"aria-label": s("toggleWindowSideBar"),
						disabled: !0,
						children: /* @__PURE__ */ z(eq, {})
					}),
					/* @__PURE__ */ z(U, {
						variant: "h2",
						noWrap: !0,
						sx: {
							color: "inherit",
							flexGrow: 1,
							paddingLeft: .5,
							typography: "h6"
						},
						children: i
					}),
					e && a && /* @__PURE__ */ z(RJ, {
						"aria-label": s("closeWindow"),
						className: (0, G.default)(M("window-close")),
						onClick: a,
						TooltipProps: { tabIndex: n ? 0 : -1 },
						children: /* @__PURE__ */ z(Au, {})
					})
				]
			})
		}), r]
	});
}
zJ.propTypes = {
	allowClose: W.default.bool,
	allowWindowSideBar: W.default.bool,
	ariaLabel: W.default.bool,
	children: W.default.node,
	label: W.default.string,
	removeWindow: W.default.func,
	windowId: W.default.string.isRequired
};
var BJ = i(O((e, { windowId: t }) => ({
	allowClose: ut(e, { windowId: t }).allowClose,
	allowWindowSideBar: ut(e, { windowId: t }).allowWindowSideBar
}), (e, { windowId: t }) => ({ removeWindow: () => e(Rr(t)) })), A("MinimalWindow"))(zJ), VJ = {
	"aria-hidden": !0,
	frameBorder: 0,
	height: 1,
	name: void 0,
	scrolling: void 0,
	style: { visibility: "hidden" },
	width: 1
};
function HJ({ handleReceiveMessage: e = void 0, ...t }) {
	return L(() => {
		if (e) return window.addEventListener("message", e), () => window.removeEventListener("message", e, !1);
	}, [e]), /* @__PURE__ */ z("iframe", {
		...VJ,
		...t
	});
}
HJ.propTypes = {
	"aria-hidden": W.default.bool,
	frameBorder: W.default.oneOfType([W.default.string, W.default.number]),
	handleReceiveMessage: W.default.func,
	height: W.default.oneOfType([W.default.string, W.default.number]),
	name: W.default.string,
	scrolling: W.default.string,
	src: W.default.string.isRequired,
	style: W.default.shape({}),
	width: W.default.oneOfType([W.default.string, W.default.number])
};
//#endregion
//#region src/components/AccessTokenSender.jsx
function UJ({ handleAccessTokenMessage: e, url: t = void 0 }) {
	let n = I((n) => {
		n.data && n.data.messageId && n.data.messageId === t && e(n.data);
	}, [e, t]);
	if (!t) return null;
	let r = new URL(t);
	return r.searchParams.append("origin", window.origin), r.searchParams.append("messageId", t), /* @__PURE__ */ z(HJ, {
		src: r.toString(),
		title: "AccessTokenSender",
		handleReceiveMessage: n
	});
}
UJ.propTypes = {
	handleAccessTokenMessage: W.default.func.isRequired,
	url: W.default.string
};
//#endregion
//#region src/components/NewBrowserWindow.jsx
function WJ({ depWindow: e = void 0, features: t = void 0, name: n = void 0, onClose: r, url: i }) {
	let a = R(!1);
	return L(() => {
		let o = (e || window).open(i, n, t), s = setInterval(() => {
			!a.current && (!o || o.closed) && (a.current = !0, clearInterval(s), r(i));
		}, 250);
		return () => {
			clearInterval(s), o.close();
		};
	}), null;
}
WJ.propTypes = {
	depWindow: W.default.object,
	features: W.default.string,
	name: W.default.string,
	onClose: W.default.func.isRequired,
	url: W.default.string.isRequired
};
//#endregion
//#region node_modules/@mui/icons-material/esm/LockSharp.js
var GJ = N(/*#__PURE__*/ z("path", { d: "M20 8h-3V6.21c0-2.61-1.91-4.94-4.51-5.19C9.51.74 7 3.08 7 6v2H4v14h16zm-8 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2M9 8V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2z" }), "LockSharp"), KJ = H("div")(({ theme: e }) => ({
	alignItems: "center",
	backgroundColor: e.palette.secondary.main,
	color: e.palette.secondary.contrastText,
	display: "flex",
	padding: e.spacing(1)
})), qJ = H("span")(({ theme: e }) => ({ marginLeft: e.spacing(2.5) }));
function JJ({ confirmButton: e = void 0, continueLabel: t = void 0, header: n = void 0, description: r = void 0, icon: i = void 0, label: a, ruleSet: o = "iiif", hasLogoutService: s = !0, status: c = void 0, ConfirmProps: l = {}, onConfirm: u }) {
	let { t: d } = V(), f = arguments[0], [p, m] = zi(!1), h = () => {
		m(!1), u();
	};
	if (c === "ok" && !s) return null;
	let g = /* @__PURE__ */ z(va, {
		onClick: h,
		color: "secondary",
		sx: (e) => ({
			backgroundColor: e.palette.secondary.contrastText,
			lineHeight: "1.5rem"
		}),
		...l,
		children: e || d("login")
	});
	return !r && !n ? /* @__PURE__ */ z(Vi, {
		square: !0,
		elevation: 4,
		color: "secondary",
		children: /* @__PURE__ */ B(KJ, { children: [
			i || /* @__PURE__ */ z(GJ, { sx: { marginInlineEnd: 5 } }),
			/* @__PURE__ */ z(U, {
				component: "h3",
				variant: "body1",
				sx: { color: "inherit" },
				children: o ? /* @__PURE__ */ z(wu, {
					htmlString: a,
					ruleSet: o
				}) : a
			}),
			/* @__PURE__ */ z(Yr, {
				targetName: "WindowAuthenticationBar",
				...f
			}),
			g
		] })
	}) : /* @__PURE__ */ B(Vi, {
		square: !0,
		elevation: 4,
		color: "secondary",
		children: [/* @__PURE__ */ B(va, {
			fullWidth: !0,
			onClick: () => m(!0),
			component: "div",
			color: "inherit",
			sx: (e) => ({
				"&:hover": { backgroundColor: e.palette.secondary.main },
				backgroundColor: e.palette.secondary.main,
				borderRadius: 0,
				color: e.palette.secondary.contrastText,
				justifyContent: "start",
				textTransform: "none"
			}),
			children: [
				i || /* @__PURE__ */ z(GJ, { sx: { marginInlineEnd: 1.5 } }),
				/* @__PURE__ */ z(U, {
					component: "h3",
					variant: "body1",
					sx: {
						color: "inherit",
						paddingBlockEnd: 1,
						paddingBlockStart: 1
					},
					children: o ? /* @__PURE__ */ z(wu, {
						htmlString: a,
						ruleSet: o
					}) : a
				}),
				/* @__PURE__ */ z(Yr, {
					targetName: "WindowAuthenticationBar",
					...f
				}),
				/* @__PURE__ */ z(qJ, { children: !p && /* @__PURE__ */ z(U, {
					variant: "button",
					sx: { color: "inherit" },
					children: t || d("continue")
				}) })
			]
		}), /* @__PURE__ */ B(wa, {
			sx: (e) => ({
				backgroundColor: e.palette.secondary.main,
				color: e.palette.secondary.contrastText,
				paddingInlineEnd: e.spacing(1),
				paddingInlineStart: e.spacing(1)
			}),
			in: p,
			onClose: () => m(!1),
			children: [/* @__PURE__ */ B(U, {
				variant: "body1",
				sx: { color: "inherit" },
				children: [
					o ? /* @__PURE__ */ z(wu, {
						htmlString: n,
						ruleSet: o
					}) : n,
					n && r ? ": " : "",
					o ? /* @__PURE__ */ z(wu, {
						htmlString: r,
						ruleSet: o
					}) : r
				]
			}), /* @__PURE__ */ B(fo, { children: [/* @__PURE__ */ z(va, {
				onClick: () => m(!1),
				color: "inherit",
				children: d("cancel")
			}), g] })]
		})]
	});
}
JJ.propTypes = {
	confirmButton: W.default.string,
	ConfirmProps: W.default.object,
	continueLabel: W.default.string,
	description: W.default.node,
	hasLogoutService: W.default.bool,
	header: W.default.node,
	icon: W.default.node,
	label: W.default.node.isRequired,
	onConfirm: W.default.func.isRequired,
	ruleSet: W.default.string,
	status: W.default.string
};
var YJ = i(A("WindowAuthenticationBar"))(JJ);
//#endregion
//#region src/components/IIIFAuthentication.jsx
function XJ({ accessTokenServiceId: e = void 0, authServiceId: t = void 0, confirm: n = void 0, description: r = void 0, failureDescription: i = void 0, failureHeader: a = void 0, features: o = "centerscreen", handleAuthInteraction: s, header: c = void 0, isInteractive: l = !0, label: u = void 0, logoutConfirm: d = void 0, logoutServiceId: f = void 0, openWindow: p = window.open, resetAuthenticationState: m, resolveAccessTokenRequest: h, resolveAuthenticationRequest: g, status: _ = null, windowId: v }) {
	let { t: y } = V(), b = (n) => {
		h(t, e, n);
	}, x = () => ({
		authServiceId: t,
		hasLogoutService: !!f,
		status: _,
		windowId: v
	}), S = () => {
		p(f, void 0, o), m({
			authServiceId: t,
			tokenServiceId: e
		});
	}, C = () => !l && !f ? null : /* @__PURE__ */ z(YJ, {
		confirmButton: d || y("logout"),
		onConfirm: S,
		...x()
	}), w = () => /* @__PURE__ */ z(YJ, {
		header: a,
		description: i,
		confirmButton: y("retry"),
		onConfirm: () => s(v, t),
		...x()
	}), T = () => /* @__PURE__ */ B(Bi, { children: [ee(), /* @__PURE__ */ z(WJ, {
		name: "IiifLoginSender",
		url: `${t}?origin=${window.origin}`,
		features: o,
		onClose: () => g(t, e)
	})] }), E = () => /* @__PURE__ */ B(Bi, { children: [ee(), /* @__PURE__ */ z(UJ, {
		handleAccessTokenMessage: b,
		url: e
	})] }), ee = () => l ? /* @__PURE__ */ z(YJ, {
		header: c,
		description: r,
		label: u,
		confirmButton: n,
		onConfirm: () => s(v, t),
		...x()
	}) : null;
	return t ? _ === null ? ee() : _ === "cookie" ? T() : _ === "token" ? E() : _ === "failed" ? w() : _ === "ok" ? C() : null : null;
}
XJ.propTypes = {
	accessTokenServiceId: W.default.string,
	authServiceId: W.default.string,
	confirm: W.default.string,
	description: W.default.string,
	failureDescription: W.default.string,
	failureHeader: W.default.string,
	features: W.default.string,
	handleAuthInteraction: W.default.func.isRequired,
	header: W.default.string,
	isInteractive: W.default.bool,
	label: W.default.string,
	logoutConfirm: W.default.string,
	logoutServiceId: W.default.string,
	openWindow: W.default.func,
	resetAuthenticationState: W.default.func.isRequired,
	resolveAccessTokenRequest: W.default.func.isRequired,
	resolveAuthenticationRequest: W.default.func.isRequired,
	status: W.default.oneOf([
		"logout",
		"ok",
		"token",
		"cookie",
		"failed",
		null
	]),
	windowId: W.default.string.isRequired
};
var ZJ = i(O((e, { windowId: t }) => {
	let n = Yo(e, { windowId: t })[0], r = n && (Po.Utils.getService(n, "http://iiif.io/api/auth/1/token") || Po.Utils.getService(n, "http://iiif.io/api/auth/0/token")), i = n && (Po.Utils.getService(n, "http://iiif.io/api/auth/1/logout") || Po.Utils.getService(n, "http://iiif.io/api/auth/0/logout")), a = Jo(e), o = n && a[n.id], s = qo(e), c = r && s[r.id], l = null;
	o ? o.isFetching ? o.windowId === t && (l = "cookie") : c && c.isFetching ? o.windowId === t && (l = "token") : o.ok ? l = "ok" : o.ok === !1 && (l = "failed") : l = null;
	let u = Ko(e), d = n && n.getProfile(), f = u.some((e) => e.profile === d && !(e.external || e.kiosk));
	return {
		accessTokenServiceId: r && r.id,
		authServiceId: n && n.id,
		confirm: n && n.getConfirmLabel(),
		description: n && n.getDescription(),
		failureDescription: n && n.getFailureDescription(),
		failureHeader: n && n.getFailureHeader(),
		header: n && n.getHeader(),
		isInteractive: f,
		label: n && n.getLabel()[0].value,
		logoutConfirm: i && i.getLabel()[0] && i.getLabel()[0].value,
		logoutServiceId: i && i.id,
		profile: d,
		status: l
	};
}, {
	handleAuthInteraction: Ys,
	resetAuthenticationState: tc,
	resolveAccessTokenRequest: ec,
	resolveAuthenticationRequest: Xs
}), A("IIIFAuthentication"))(XJ), QJ = {
	display: "flex",
	flex: "1",
	flexDirection: "row",
	minHeight: 0
}, $J = {
	display: "flex",
	flex: "1",
	flexDirection: "column",
	minHeight: 0
}, eY = H(Vi, {
	name: "Window",
	slot: "root"
})(({ ownerState: e, theme: t }) => ({
	...$J,
	backgroundColor: t.palette.shades?.dark,
	borderRadius: 0,
	height: "100%",
	overflow: "hidden",
	width: "100%",
	...e?.maximized && {
		left: 0,
		position: "absolute",
		top: 0,
		zIndex: t.zIndex.modal - 1
	}
})), tY = H("div", {
	name: "Window",
	slot: "row"
})(() => ({ ...QJ })), nY = H("div", {
	name: "Window",
	slot: "column"
})(() => ({ ...$J })), rY = H(LJ, {
	name: "Window",
	slot: "primary"
})(() => ({
	...QJ,
	height: "300px",
	position: "relative"
})), iY = H(_J, {
	name: "Window",
	slot: "bottom"
})(() => ({
	...QJ,
	flex: "0",
	flexBasis: "auto"
})), aY = H("div", {
	name: "Window",
	slot: "right"
})(() => ({
	...QJ,
	flex: "0 1 auto"
})), oY = ({ children: e, ...t }) => {
	let { mosaicWindowActions: n } = Ni(LG);
	return n.connectDragSource(/* @__PURE__ */ z("nav", {
		...t,
		children: e
	}));
};
function sY({ focusWindow: e = () => {}, label: t = null, isFetching: n = !1, sideBarOpen: r = !1, view: i = void 0, windowDraggable: a = null, windowId: o, workspaceType: s = null, manifestError: c = null }) {
	let { t: l } = V(), u = arguments[0], d = I(({ error: e }) => /* @__PURE__ */ z(BJ, {
		windowId: o,
		children: /* @__PURE__ */ z(uJ, {
			error: e,
			windowId: o
		})
	}), [o]);
	return /* @__PURE__ */ z(li, {
		FallbackComponent: d,
		children: /* @__PURE__ */ B(eY, {
			onFocus: e,
			ownerState: u,
			component: "section",
			elevation: 1,
			id: o,
			className: M("window"),
			"aria-label": l("window", { label: t }),
			children: [
				/* @__PURE__ */ z(Hq, {
					component: s === "mosaic" && a ? oY : void 0,
					windowId: o,
					windowDraggable: a
				}),
				/* @__PURE__ */ z(ZJ, { windowId: o }),
				c && /* @__PURE__ */ z(uJ, {
					error: { stack: c },
					windowId: o
				}),
				/* @__PURE__ */ B(tY, { children: [/* @__PURE__ */ B(nY, { children: [/* @__PURE__ */ z(rY, {
					view: i,
					windowId: o,
					isFetching: n,
					sideBarOpen: r
				}), /* @__PURE__ */ z(iY, {
					windowId: o,
					position: "bottom"
				})] }), /* @__PURE__ */ B(aY, { children: [/* @__PURE__ */ z(_J, {
					windowId: o,
					position: "right"
				}), /* @__PURE__ */ z(_J, {
					windowId: o,
					position: "far-right"
				})] })] }),
				/* @__PURE__ */ z(_J, {
					windowId: o,
					position: "far-bottom"
				}),
				/* @__PURE__ */ z(Yr, {
					targetName: "Window",
					...u
				})
			]
		})
	});
}
sY.propTypes = {
	focusWindow: W.default.func,
	isFetching: W.default.bool,
	label: W.default.string,
	manifestError: W.default.string,
	maximized: W.default.bool,
	sideBarOpen: W.default.bool,
	view: W.default.string,
	windowDraggable: W.default.bool,
	windowId: W.default.string.isRequired,
	workspaceType: W.default.string
};
var cY = i(O((e, { windowId: t }) => ({
	isFetching: wn(e, { windowId: t }).isFetching,
	label: Jt(e, { windowId: t }),
	manifestError: vt(e, { windowId: t }),
	maximized: (b(e, { windowId: t }) || {}).maximized,
	sideBarOpen: (b(e, { windowId: t }) || {}).sideBarOpen,
	thumbnailNavigationPosition: tt(e, { windowId: t }),
	view: ft(e, { windowId: t }),
	windowDraggable: Me(e, { windowId: t }),
	workspaceType: Oe(e)
}), (e, { windowId: t }) => ({ focusWindow: () => e(Lr(t)) })), A("Window"))(sY), lY = H(tf, { shouldForwardProp: (e) => e !== "focused" })(({ focused: e, theme: t }) => ({ zIndex: e ? t.zIndex.modal - 1 : "auto" }));
function uY({ classes: e = {}, companionWindowDimensions: t = {
	height: 0,
	width: 0
}, focused: n = !1, focusWindow: r = () => {}, layout: i, workspace: a, updateElasticWindowLayout: o }) {
	let s = a.width / 2, c = a.height / 2;
	return /* @__PURE__ */ z(lY, {
		focused: n,
		className: n ? e.focused : void 0,
		size: {
			height: i.height + t.height,
			width: i.width + t.width
		},
		position: {
			x: i.x + s,
			y: i.y + c
		},
		bounds: "parent",
		onDragStop: (e, t) => {
			o(i.windowId, {
				x: t.x - s,
				y: t.y - c
			});
		},
		onDragStart: r,
		onResize: (e, n, r, a, l) => {
			o(i.windowId, {
				height: Number.parseInt(r.style.height, 10) - t.height,
				width: Number.parseInt(r.style.width, 10) - t.width,
				x: l.x - s,
				y: l.y - c
			});
		},
		dragHandleClassName: M("window-top-bar"),
		cancel: `.${M("window-menu-btn")}`,
		children: /* @__PURE__ */ z(cY, { windowId: i.windowId })
	}, `${i.windowId}-${a.id}`);
}
uY.propTypes = {
	classes: W.default.objectOf(W.default.string),
	companionWindowDimensions: W.default.shape({
		height: W.default.number,
		width: W.default.number
	}),
	focused: W.default.bool,
	focusWindow: W.default.func,
	layout: W.default.shape({
		height: W.default.number,
		id: W.default.string,
		width: W.default.number,
		windowId: W.default.string,
		x: W.default.number,
		y: W.default.number
	}).isRequired,
	updateElasticWindowLayout: W.default.func.isRequired,
	workspace: W.default.object.isRequired
};
var dY = i(O((e, { windowId: t }) => ({
	companionWindowDimensions: at(e, { windowId: t }),
	focused: Yt(e, { windowId: t }),
	layout: Ie(e)[t],
	workspace: se(e)
}), (e, t) => ({
	focusWindow: () => e(Lr(t.windowId)),
	updateElasticWindowLayout: (t, n) => {
		e(nc(t, n));
	}
})))(uY), fY = H("div", {
	name: "WorkspaceElastic",
	slot: "root"
})({
	height: "100%",
	overflow: "hidden",
	position: "relative",
	width: "100%"
}), pY = H(tf)({
	boxSizing: "border-box",
	margin: 0,
	position: "absolute",
	transitionDuration: ".7s",
	"&.react-draggable-dragging": { transitionDuration: "unset" }
});
function mY({ workspace: e, elasticLayout: t, setWorkspaceViewportDimensions: n, setWorkspaceViewportPosition: r }) {
	let { viewportPosition: i } = e, a = e.width / 2, o = e.height / 2, s = R(null);
	return Ii(() => {
		s.current && n(s.current.getBoundingClientRect());
	}, [s, n]), sR(s, (e) => {
		n(e.contentRect);
	}), /* @__PURE__ */ z(fY, {
		ref: s,
		children: /* @__PURE__ */ z(pY, {
			size: {
				height: e.height,
				width: e.width
			},
			position: {
				x: -1 * i.x - a,
				y: -1 * i.y - o
			},
			enableResizing: {
				bottom: !1,
				bottomLeft: !1,
				bottomRight: !1,
				left: !1,
				right: !1,
				top: !1,
				topLeft: !1,
				topRight: !1
			},
			onDragStop: (e, t) => {
				r({
					x: -1 * t.x - a,
					y: -1 * t.y - o
				});
			},
			cancel: `.${M("window")}`,
			className: M("workspace"),
			disableDragging: !e.draggingEnabled,
			children: Object.keys(t).map((e) => /* @__PURE__ */ z(dY, { windowId: e }, e))
		})
	});
}
mY.propTypes = {
	elasticLayout: W.default.object.isRequired,
	setWorkspaceViewportDimensions: W.default.func.isRequired,
	setWorkspaceViewportPosition: W.default.func.isRequired,
	workspace: W.default.object.isRequired
};
//#endregion
//#region node_modules/lodash/_baseMap.js
var hY = /* @__PURE__ */ D(((e, t) => {
	var n = on(), r = we();
	function i(e, t) {
		var i = -1, a = r(e) ? Array(e.length) : [];
		return n(e, function(e, n, r) {
			a[++i] = t(e, n, r);
		}), a;
	}
	t.exports = i;
})), gY = /* @__PURE__ */ D(((e, t) => {
	function n(e, t) {
		var n = e.length;
		for (e.sort(t); n--;) e[n] = e[n].value;
		return e;
	}
	t.exports = n;
})), _Y = /* @__PURE__ */ D(((e, t) => {
	var n = E();
	function r(e, t) {
		if (e !== t) {
			var r = e !== void 0, i = e === null, a = e === e, o = n(e), s = t !== void 0, c = t === null, l = t === t, u = n(t);
			if (!c && !u && !o && e > t || o && s && l && !c && !u || i && s && l || !r && l || !a) return 1;
			if (!i && !o && !u && e < t || u && r && a && !i && !o || c && r && a || !s && a || !l) return -1;
		}
		return 0;
	}
	t.exports = r;
})), vY = /* @__PURE__ */ D(((e, t) => {
	var n = _Y();
	function r(e, t, r) {
		for (var i = -1, a = e.criteria, o = t.criteria, s = a.length, c = r.length; ++i < s;) {
			var l = n(a[i], o[i]);
			if (l) return i >= c ? l : l * (r[i] == "desc" ? -1 : 1);
		}
		return e.index - t.index;
	}
	t.exports = r;
})), yY = /* @__PURE__ */ D(((e, t) => {
	var n = It(), r = bn(), i = yt(), a = hY(), o = gY(), s = h(), c = vY(), l = he(), u = x();
	function d(e, t, d) {
		t = t.length ? n(t, function(e) {
			return u(e) ? function(t) {
				return r(t, e.length === 1 ? e[0] : e);
			} : e;
		}) : [l];
		var f = -1;
		return t = n(t, s(i)), o(a(e, function(e, r, i) {
			return {
				criteria: n(t, function(t) {
					return t(e);
				}),
				index: ++f,
				value: e
			};
		}), function(e, t) {
			return c(e, t, d);
		});
	}
	t.exports = d;
})), bY = /* @__PURE__ */ D(((t, n) => {
	var r = fn(), i = we(), a = s(), o = e();
	function c(e, t, n) {
		if (!o(n)) return !1;
		var s = typeof t;
		return (s == "number" ? i(n) && a(t, n.length) : s == "string" && t in n) ? r(n[t], e) : !1;
	}
	n.exports = c;
})), xY = /* @__PURE__ */ D(((e, t) => {
	var n = Sr(), r = yY(), i = Ar(), a = bY();
	t.exports = i(function(e, t) {
		if (e == null) return [];
		var i = t.length;
		return i > 1 && a(e, t[0], t[1]) ? t = [] : i > 2 && a(t[0], t[1], t[2]) && (t = [t[0]]), r(e, n(t, 1), []);
	});
})), SY = /* @__PURE__ */ D(((e, t) => {
	var n = Or(), r = Sr(), i = wr();
	function a(e, t, a) {
		var o = e.length;
		if (o < 2) return o ? i(e[0]) : [];
		for (var s = -1, c = Array(o); ++s < o;) for (var l = e[s], u = -1; ++u < o;) u != s && (c[s] = n(c[s] || l, e[u], t, a));
		return i(r(c, 1), t, a);
	}
	t.exports = a;
})), CY = /* @__PURE__ */ D(((e, t) => {
	var n = Ot(), r = Ar(), i = SY(), a = br();
	t.exports = r(function(e) {
		return i(n(e, a));
	});
})), wY = class {
	constructor(e, t) {
		this.viewer = e, this.ref = t, this.containerWidth = 0, this.containerHeight = 0, this.viewportOrigin = {
			x: 0,
			y: 0
		};
	}
	get scale() {
		return this.viewportWidth ? this.containerWidth / this.viewportWidth : 1;
	}
	get canvas() {
		return this.canvasDiv.firstElementChild;
	}
	get canvasDiv() {
		return this.ref.current;
	}
	get context2d() {
		return this.canvas.getContext("2d");
	}
	clear() {
		this.context2d && this.context2d.clearRect(0, 0, this.containerWidth, this.containerHeight);
	}
	resize() {
		this.containerWidth !== this.viewer.container.clientWidth && (this.containerWidth = this.viewer.container.clientWidth, this.canvasDiv.setAttribute("width", this.containerWidth), this.canvas.setAttribute("width", this.containerWidth)), this.containerHeight !== this.viewer.container.clientHeight && (this.containerHeight = this.viewer.container.clientHeight, this.canvasDiv.setAttribute("height", this.containerHeight), this.canvas.setAttribute("height", this.containerHeight));
		let e = this.viewer.viewport.getBoundsNoRotateWithMargins(!0);
		this.viewportOrigin.x = e.x || 0, this.viewportOrigin.y = e.y || 0, this.viewportWidth = e.width, this.viewportHeight = e.height;
	}
	canvasUpdate(e) {
		if (!this.context2d) return;
		this.clearBeforeRedraw && this.clear();
		let { scale: t } = this;
		this.context2d.translate(-this.viewportOrigin.x * t, -this.viewportOrigin.y * t), this.context2d.scale(t, t);
		let n = this.viewer.viewport.getCenter();
		this.viewer.viewport.getFlip() && (this.context2d.translate(n.x * 2, 0), this.context2d.scale(-1, 1));
		let r = this.viewer.viewport.getRotation();
		r !== 0 && (this.context2d.translate(n.x, n.y), this.context2d.rotate(r * Math.PI / 180), this.context2d.translate(-1 * n.x, -1 * n.y)), e(), this.context2d.setTransform(1, 0, 0, 1, 0, 0);
	}
};
//#endregion
//#region src/lib/svgShapesToPath.js
function TY(e) {
	let t = new DOMParser().parseFromString(e.svgSelector.value, "text/xml");
	return Array.from(t.querySelectorAll("circle, ellipse, rect, line, polygon, polyline, path"));
}
function EY(e) {
	let t = e.tagName.toLowerCase(), n = (t) => parseFloat(e.getAttribute(t)) || 0;
	if (t === "path") return new Path2D(e.getAttribute("d"));
	let r = new Path2D();
	return DY[t]?.(r, e, n), r;
}
var DY = {
	circle: (e, t, n) => {
		e.arc(n("cx"), n("cy"), n("r"), 0, 2 * Math.PI);
	},
	ellipse: (e, t, n) => {
		e.ellipse(n("cx"), n("cy"), n("rx"), n("ry"), 0, 0, 2 * Math.PI);
	},
	rect: (e, t, n) => {
		e.rect(n("x"), n("y"), n("width"), n("height"));
	},
	line: (e, t, n) => {
		e.moveTo(n("x1"), n("y1")), e.lineTo(n("x2"), n("y2"));
	},
	polygon: (e, t) => OY(e, t, !0),
	polyline: (e, t) => OY(e, t, !1)
};
function OY(e, t, n) {
	kY(t.getAttribute("points")).forEach(([t, n], r) => {
		r === 0 ? e.moveTo(t, n) : e.lineTo(t, n);
	}), n && e.closePath();
}
function kY(e) {
	let t = e.trim().split(/[\s,]+/).map(Number), n = [];
	for (let e = 0; e < t.length - 1; e += 2) n.push([t[e], t[e + 1]]);
	return n;
}
//#endregion
//#region src/lib/CanvasAnnotationDisplay.js
var AY = class {
	constructor({ resource: e, palette: t, canvasWorld: n, overlayScale: r, selected: i, hovered: a, zoomRatio: o, offset: s }) {
		this.resource = e, this.palette = t, this.canvasWorld = n, this.selected = i, this.hovered = a, this.overlayScale = r, this.zoomRatio = o, this.offset = s || this.canvasWorld.offsetByCanvas(this.resource.targetId);
	}
	toContext(e) {
		this.context = e, this.resource.svgSelector ? this.svgContext() : this.resource.fragmentSelector && this.fragmentContext();
	}
	get svgString() {
		return this.resource.svgSelector.value;
	}
	get lineWidthScale() {
		return this.scale * this.overlayScale;
	}
	get scale() {
		return this.canvasWorld.canvasScale(this.resource.targetId);
	}
	parseOpacity(e) {
		return typeof e == "string" && e.trim().endsWith("%") ? parseFloat(e) / 100 : parseFloat(e);
	}
	svgContext() {
		let e;
		e = this.hovered ? this.palette.hovered : this.selected ? this.palette.selected : this.palette.default, e.globalAlpha !== 0 && [...this.svgPaths].forEach((t) => {
			this.context.save(), this.context.translate(this.offset.x, this.offset.y), this.context.scale(this.scale, this.scale);
			let n = EY(t);
			this.context.strokeStyle = this.color, t.getAttribute("stroke-dasharray") && this.context.setLineDash(t.getAttribute("stroke-dasharray").split(","));
			let r = {
				fill: "fillStyle",
				stroke: "strokeStyle",
				"stroke-dashoffset": "lineDashOffset",
				"stroke-linecap": "lineCap",
				"stroke-linejoin": "lineJoin",
				"stroke-miterlimit": "miterlimit",
				"stroke-width": "lineWidth"
			};
			Object.keys(r).forEach((e) => {
				t.getAttribute(e) && (this.context[r[e]] = t.getAttribute(e));
			}), this.context.lineWidth /= this.lineWidthScale, (this.selected || this.hovered) && (this.context.strokeStyle = e.strokeStyle || e.fillStyle), this.context.globalAlpha = e.globalAlpha, t.getAttribute("fill") && t.getAttribute("fill") !== "none" && (t.getAttribute("fill-opacity") && (this.context.globalAlpha = e.globalAlpha * this.parseOpacity(t.getAttribute("fill-opacity"))), this.context.fill(n)), t.getAttribute("stroke-opacity") ? this.context.globalAlpha = e.globalAlpha * this.parseOpacity(t.getAttribute("stroke-opacity")) : this.context.globalAlpha = e.globalAlpha, this.context.stroke(n), this.context.restore();
		});
	}
	fragmentContext() {
		let e = this.resource.fragmentSelector, t;
		t = this.selected ? this.palette.selected : this.hovered ? this.palette.hovered : this.palette.default, this.context.save(), Object.keys(t).forEach((e) => {
			this.context[e] = t[e];
		}), t.globalAlpha !== 0 && (this.context.translate(this.offset.x, this.offset.y), this.context.scale(this.scale, this.scale), t.fillStyle ? this.context.fillRect(...e) : (this.context.lineWidth = 1 / this.lineWidthScale, this.context.strokeRect(...e)), this.context.restore());
	}
	get svgPaths() {
		return TY(this.resource);
	}
};
//#endregion
//#region src/lib/drawAnnotationsToContext.js
function jY(e, t, { canvasWorld: n, osdCanvasOverlay: r, highlightAllAnnotations: i, hoveredAnnotationIds: a, selectedAnnotationId: o }) {
	let s = r.context2d, c = r.scale;
	e.forEach((e) => {
		e.resources.forEach((e) => {
			n.canvases.find((t) => t.id === e.targetId) && new AY({
				canvasWorld: n,
				hovered: a.includes(e.id),
				overlayScale: c,
				palette: {
					...t,
					default: {
						...t.default,
						...!i && t.hidden
					}
				},
				resource: e,
				selected: o === e.id
			}).toContext(s);
		});
	});
}
//#endregion
//#region src/components/AnnotationsOverlay.jsx
var MY = /* @__PURE__ */ k(xY(), 1), NY = /* @__PURE__ */ k(CY(), 1);
function PY(e, t, n, r, i) {
	let [a, o] = e.canvasToWorldCoordinates(r.id), s = e.canvasScale(r.id), c = (i.x - a) / s, l = (i.y - o) / s;
	if (n.svgSelector) {
		let e = t.context2d;
		return [...TY(n)].some((t) => e.isPointInPath(EY(t), c, l));
	}
	if (n.fragmentSelector) {
		let [e, t, r, i] = n.fragmentSelector;
		return e <= c && c <= e + r && t <= l && l <= t + i;
	}
	return !1;
}
function FY(e) {
	let t = e.originalEvent?.pointerType;
	return (t === "touch" || t === "pen") && e.quick === !1;
}
function IY({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () => {}, drawAnnotations: r = !0, drawSearchAnnotations: i = !0, highlightAllAnnotations: a = !1, hoverAnnotation: o = () => {}, hoveredAnnotationIds: s = [], palette: c = {}, searchAnnotations: l = [], selectAnnotation: u = () => {}, selectedAnnotationId: d = null, viewer: f = null, windowId: p }) {
	let m = R(), h = Li(() => new wY(f, m), [m, f]), g = I((e) => {
		d === e ? n(p, e) : u(p, e);
	}, [
		d,
		n,
		u,
		p
	]), _ = I((e, n) => {
		jY(e, n, {
			canvasWorld: t,
			highlightAllAnnotations: a,
			hoveredAnnotationIds: s,
			osdCanvasOverlay: h,
			selectedAnnotationId: d
		});
	}, [
		h,
		t,
		a,
		s,
		d
	]), v = I(() => {
		i && _(l, c.search), r && _(e, c.annotations);
	}, [
		e,
		_,
		r,
		i,
		c,
		l
	]), y = I(() => {
		h && (h.clear(), h.resize(), h.canvasUpdate(v));
	}, [h, v]), b = I((n, r) => [...e, ...l].flatMap((e) => e.resources).filter((e) => n.id === e.targetId && PY(t, h, e, n, r)), [
		e,
		t,
		h,
		l
	]), x = I((e) => {
		if (FY(e)) return;
		let { position: n, eventSource: { viewport: r } } = e, i = r.pointFromPixel(n), a = t.canvasAtPoint(i);
		if (!a) return;
		let [o, s, c, l] = t.canvasToWorldCoordinates(a.id), u = b(a, i);
		if (u.length > 0 && (e.preventDefaultAction = !0), u.length === 1) g(u[0].id);
		else if (u.length > 0) {
			let e = (e) => {
				let n = Math.PI / 180;
				return (r) => {
					let o = 0;
					for (let s = 0; s < 360; s += 1) {
						let c = Math.cos(s * n) * e + i.x, l = Math.sin(s * n) * e + i.y;
						PY(t, h, r, a, {
							x: c,
							y: l
						}) && (o += 1);
					}
					return {
						anno: r,
						score: o
					};
				};
			}, n = 1, r = (0, MY.default)(u.map(e(n)), "score");
			for (; n < Math.max(c, l) && r[0].score === r[1].score;) n *= 2, r = (0, MY.default)(u.map(e(n)), "score");
			g(r[0].anno.id);
		}
	}, [
		b,
		t,
		h,
		g
	]), S = kr(I((n) => {
		if (e.length === 0 && l.length === 0) return;
		let { position: r } = n, i = f.viewport.pointFromPixel(r), a = t.canvasAtPoint(i);
		if (!a) {
			o(p, []);
			return;
		}
		let c = b(a, i);
		(0, NY.default)(s, c.map((e) => e.id)).length > 0 && o(p, c.map((e) => e.id));
	}, [
		e,
		b,
		t,
		o,
		s,
		l,
		f,
		p
	]), 10), C = I(() => {
		S.cancel(), o(p, []);
	}, [
		o,
		S,
		p
	]), w = I(() => {
		y();
	}, [y]);
	return Ii(() => {
		if (f) return f.addHandler("canvas-click", x), f.addHandler("canvas-exit", C), f.addHandler("mouse-move", S), f.addHandler("update-viewport", w), () => {
			f.removeHandler("canvas-click", x), f.removeHandler("canvas-exit", C), f.removeHandler("mouse-move", S), f.removeHandler("update-viewport", w);
		};
	}, [
		x,
		C,
		S,
		w,
		f
	]), L(() => {
		f && f.forceRedraw();
	}, [
		e,
		r,
		i,
		a,
		s,
		l,
		d,
		f
	]), L(() => {
		m.current && (s.length > 0 ? m.current.style.cursor = "pointer" : m.current.style.cursor = "");
	}, [s, m]), f ? ua.createPortal(/* @__PURE__ */ z("div", {
		ref: m,
		style: {
			height: "100%",
			left: 0,
			position: "absolute",
			top: 0,
			width: "100%"
		},
		children: /* @__PURE__ */ z("canvas", {})
	}), f.canvas) : null;
}
IY.propTypes = {
	annotations: W.default.arrayOf(W.default.object),
	canvasWorld: W.default.instanceOf(hs).isRequired,
	deselectAnnotation: W.default.func,
	drawAnnotations: W.default.bool,
	drawSearchAnnotations: W.default.bool,
	highlightAllAnnotations: W.default.bool,
	hoverAnnotation: W.default.func,
	hoveredAnnotationIds: W.default.arrayOf(W.default.string),
	palette: W.default.object,
	searchAnnotations: W.default.arrayOf(W.default.object),
	selectAnnotation: W.default.func,
	selectedAnnotationId: W.default.string,
	viewer: W.default.object,
	windowId: W.default.string.isRequired
};
//#endregion
//#region src/components/AudioViewer.jsx
var LY = H("div")({
	alignItems: "center",
	display: "flex",
	width: "100%"
}), RY = H("audio")({ width: "100%" });
function zY({ audioOptions: e = {}, audioResources: t = [], canvasId: n = "", captions: r = [] }) {
	return /* @__PURE__ */ z(LY, { children: /* @__PURE__ */ Di(RY, {
		...e,
		key: n
	}, t.map((e) => /* @__PURE__ */ z(Si, { children: /* @__PURE__ */ z("source", {
		src: e.id,
		type: e.getFormat()
	}) }, e.id)), r.map((e) => /* @__PURE__ */ z(Si, { children: /* @__PURE__ */ z("track", {
		src: e.id,
		label: e.getDefaultLabel(),
		srcLang: e.getProperty("language")
	}) }, e.id))) });
}
zY.propTypes = {
	audioOptions: W.default.object,
	audioResources: W.default.arrayOf(W.default.object),
	canvasId: W.default.string,
	captions: W.default.arrayOf(W.default.object)
};
//#endregion
//#region src/components/BackgroundPluginArea.jsx
var BY = ({ ...e }) => /* @__PURE__ */ z("div", {
	className: M("background-plugin-area"),
	style: { display: "none" },
	children: /* @__PURE__ */ z(Yr, {
		targetName: "BackgroundPluginArea",
		...e
	})
});
//#endregion
//#region src/components/icons/MiradorIcon.jsx
function VY(e) {
	return /* @__PURE__ */ B(Ha, {
		viewBox: "0 0 60 55",
		...e,
		children: [
			/* @__PURE__ */ z("rect", {
				width: "18",
				height: "55"
			}),
			/* @__PURE__ */ z("rect", {
				width: "18",
				height: "55",
				transform: "translate(42)"
			}),
			/* @__PURE__ */ z("rect", {
				width: "18",
				height: "34",
				transform: "translate(21)"
			})
		]
	});
}
//#endregion
//#region src/components/Branding.jsx
function HY({ variant: e = "default", ...t }) {
	let { t: n } = V();
	return /* @__PURE__ */ B(Ka, {
		sx: { alignItems: "center" },
		...t,
		children: [e === "wide" && /* @__PURE__ */ z("div", { children: /* @__PURE__ */ z(U, {
			align: "center",
			component: "p",
			variant: "h3",
			children: n("mirador")
		}) }), /* @__PURE__ */ z(U, {
			align: "center",
			children: /* @__PURE__ */ z(ra, {
				component: "a",
				href: "https://projectmirador.org",
				target: "_blank",
				rel: "noopener",
				size: "large",
				children: /* @__PURE__ */ z(VY, {
					"aria-label": n("aboutMirador"),
					titleAccess: n("aboutMirador"),
					fontSize: "large"
				})
			})
		})]
	});
}
HY.propTypes = { variant: W.default.oneOf(["default", "wide"]) };
//#endregion
//#region node_modules/@mui/icons-material/esm/PaletteSharp.js
var UY = N(/*#__PURE__*/ z("path", { d: "M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10c1.38 0 2.5-1.12 2.5-2.5 0-.61-.23-1.2-.64-1.67-.08-.1-.13-.21-.13-.33 0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9m5.5 11c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m-3-4c-.83 0-1.5-.67-1.5-1.5S13.67 6 14.5 6s1.5.67 1.5 1.5S15.33 9 14.5 9M5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S7.33 13 6.5 13 5 12.33 5 11.5m6-4c0 .83-.67 1.5-1.5 1.5S8 8.33 8 7.5 8.67 6 9.5 6s1.5.67 1.5 1.5" }), "PaletteSharp"), WY = H(Qa, {
	name: "WorkspaceDialog",
	slot: "root"
})(({ theme: e, variant: t }) => ({
	"& .MuiDialogTitle-root": e.unstable_sx({ typography: "h2" }),
	...t === "menu" && { "& .MuiDialogContent-root": { padding: 0 } }
})), GY = H(UY, {
	name: "ThemeIcon",
	slot: "icon"
})(({ theme: e }) => ({ color: "#BDBDBD" }));
function KY({ container: e = null, handleClose: t, open: n = !1, selectedTheme: r, setSelectedTheme: i, themeIds: a = [] }) {
	let { t: o } = V(), s = I((e) => {
		i(e), t();
	}, [t, i]);
	return /* @__PURE__ */ B(WY, {
		container: e,
		onClose: t,
		open: n,
		variant: "menu",
		children: [/* @__PURE__ */ z(no, { children: o("changeTheme") }), /* @__PURE__ */ z(eo, { children: /* @__PURE__ */ z(so, {
			autoFocusItem: !0,
			children: a.map((e) => /* @__PURE__ */ B(oo, {
				className: "listitem",
				onClick: () => s(e),
				selected: e === r,
				value: e,
				children: [/* @__PURE__ */ z(io, { children: /* @__PURE__ */ z(GY, { ownerState: { value: e } }) }), /* @__PURE__ */ z(ao, { children: o(e) })]
			}, e))
		}) })]
	});
}
KY.propTypes = {
	container: W.default.object,
	handleClose: W.default.func.isRequired,
	open: W.default.bool,
	selectedTheme: W.default.string.isRequired,
	setSelectedTheme: W.default.func.isRequired,
	themeIds: W.default.arrayOf(W.default.string)
};
//#endregion
//#region src/components/ErrorDialog.jsx
function qY({ error: e = null, removeError: t = () => {} }) {
	let { t: n } = V(), r = !(0, VM.default)(e);
	return e ? /* @__PURE__ */ B(po, {
		"aria-labelledby": "error-dialog-title",
		id: "error-dialog",
		onClose: () => t(e.id),
		open: r,
		children: [/* @__PURE__ */ z(mo, {
			id: "error-dialog-title",
			children: n("errorDialogTitle")
		}), /* @__PURE__ */ B(uo, { children: [/* @__PURE__ */ z(to, {
			variant: "body2",
			noWrap: !0,
			sx: { color: "inherit" },
			children: `${e.message}`
		}), /* @__PURE__ */ z($a, { children: /* @__PURE__ */ z(va, {
			onClick: () => t(e.id),
			variant: "contained",
			children: n("errorDialogConfirm")
		}) })] })]
	}) : null;
}
qY.propTypes = {
	error: W.default.shape({
		id: W.default.string,
		message: W.default.string
	}),
	removeError: W.default.func
};
//#endregion
//#region src/components/GalleryViewThumbnail.jsx
var JY = H("div", {
	name: "GalleryView",
	slot: "thumbnail"
})(({ ownerState: e, theme: t }) => ({
	"&:focus": { outline: "none" },
	"&:hover": { backgroundColor: t.palette.action.hover },
	border: "2px solid transparent",
	...e.selected && { borderColor: t.palette.primary.main },
	...!e.selected && e.searchAnnotationsCount > 0 && { borderColor: t.palette.action.selected },
	cursor: "pointer",
	display: "inline-block",
	margin: t.spacing(1, .5),
	maxHeight: e.config.height + 45,
	minWidth: "60px",
	overflow: "hidden",
	padding: t.spacing(.5),
	position: "relative",
	width: "min-content"
})), YY = H("div", {
	name: "GalleryView",
	slot: "chipArea"
})(({ theme: e }) => ({
	display: "flex",
	flexDirection: "column",
	gap: e.spacing(.25),
	position: "absolute",
	right: 0,
	top: 0
})), XY = H(aa, {
	name: "GalleryView",
	slot: "chip"
})(({ theme: e }) => ({
	backgroundColor: e.palette.annotations.chipBackground,
	opacity: .875,
	textAlign: "right"
}));
function ZY({ canvas: e, selected: t = !1, setCanvas: n, focusOnCanvas: r, annotationsCount: i = void 0, requestCanvasAnnotations: a = () => {}, searchAnnotationsCount: o = 0, config: s = {
	height: 100,
	width: null
} }) {
	let c = R(), [l, u] = zi(!1);
	return L(() => {
		t && c.current?.scrollIntoView({ block: "nearest" });
	}, [t]), /* @__PURE__ */ z(ti, {
		onChange: (e, { isIntersecting: t }) => {
			!t || i === void 0 || i > 0 || l || (u(!0), a());
		},
		children: /* @__PURE__ */ z(JY, {
			ownerState: {
				annotationsCount: i,
				canvas: e,
				config: s,
				searchAnnotationsCount: o,
				selected: t
			},
			className: t ? "selected" : "",
			onClick: () => {
				t ? r() : n(e.id);
			},
			onKeyUp: (t) => {
				let i = {
					enter: "Enter",
					space: " "
				}, a = {
					enter: 13,
					space: 32
				};
				t.key === i.enter || t.which === a.enter || t.key === i.space || t.which === a.space ? r() : n(e.id);
			},
			ref: c,
			role: "button",
			tabIndex: 0,
			children: /* @__PURE__ */ z(ei, {
				resource: e,
				labelled: !0,
				variant: "outside",
				maxHeight: s.height,
				maxWidth: s.width,
				children: /* @__PURE__ */ B(YY, { children: [o > 0 && /* @__PURE__ */ z(XY, {
					icon: /* @__PURE__ */ z(Qr, { fontSize: "small" }),
					label: o,
					size: "small"
				}), i > 0 && /* @__PURE__ */ z(XY, {
					icon: /* @__PURE__ */ z(ni, { fontSize: "small" }),
					label: i,
					size: "small"
				})] })
			})
		}, e.id || e.index)
	});
}
ZY.propTypes = {
	annotationsCount: W.default.number,
	canvas: W.default.object.isRequired,
	config: W.default.shape({
		height: W.default.number,
		width: W.default.number
	}),
	focusOnCanvas: W.default.func.isRequired,
	requestCanvasAnnotations: W.default.func,
	searchAnnotationsCount: W.default.number,
	selected: W.default.bool,
	setCanvas: W.default.func.isRequired
};
var QY = i(O((e, { canvas: t, windowId: n }) => {
	let r = Mt(e, { windowId: n }), i = nr(e, { windowId: n }).flatMap((e) => e.resources).filter((e) => e.targetId === t.id), a = Xt(e, {
		content: "annotations",
		windowId: n
	}).length > 0;
	return {
		annotationsCount: (() => {
			if (a) return Gn(e, { canvasId: t.id }).reduce((e, n) => e + n.resources.filter((e) => e.targetId === t.id).length, 0);
		})(),
		config: Gt(e).galleryView,
		searchAnnotationsCount: i.length,
		selected: r && r.id === t.id
	};
}, (e, { canvas: t, id: n, windowId: r }) => ({
	focusOnCanvas: () => e(Ir(r, "single")),
	requestCanvasAnnotations: () => e(fr(r, t.id)),
	setCanvas: (...t) => e(Gr(r, ...t))
})))(ZY), $Y = H(Vi, {
	name: "GalleryView",
	slot: "root"
})(({ theme: e }) => ({
	alignItems: "flex-start",
	alignContent: "flex-start",
	display: "flex",
	flexDirection: "row",
	flexWrap: "wrap",
	overflowX: "hidden",
	overflowY: "scroll",
	padding: "50px 0 50px 20px",
	width: "100%"
}));
function eX({ canvases: e, viewingDirection: t = "", windowId: n }) {
	return /* @__PURE__ */ z($Y, {
		component: "section",
		"aria-label": "gallery section",
		dir: t === "right-to-left" ? "rtl" : "ltr",
		square: !0,
		elevation: 0,
		id: `${n}-gallery`,
		className: M("gallery-view"),
		children: e.map((e) => /* @__PURE__ */ z(QY, {
			windowId: n,
			canvas: e
		}, e.id))
	});
}
eX.propTypes = {
	canvases: W.default.array.isRequired,
	viewingDirection: W.default.string,
	windowId: W.default.string.isRequired
};
//#endregion
//#region node_modules/@mui/icons-material/esm/InsertDriveFileSharp.js
var tX = N(/*#__PURE__*/ z("path", { d: "M4.01 2 4 22h16V8l-6-6zM13 9V3.5L18.5 9z" }), "InsertDriveFileSharp");
//#endregion
//#region src/lib/readImageMetadata.js
function nX(e) {
	return new Promise((t, n) => {
		let r = new FileReader();
		r.addEventListener("load", () => {
			let n = new Image();
			n.addEventListener("load", () => {
				t({
					height: n.height,
					name: e.name,
					type: e.type,
					url: r.result,
					width: n.width
				});
			}), n.src = r.result;
		}), r.readAsDataURL(e);
	});
}
//#endregion
//#region src/components/IIIFDropTarget.jsx
var rX = (e) => {
	try {
		return new URL(e);
	} catch {
		return console.warn("Invalid URL:", e), null;
	}
}, iX = (e, t, n) => {
	let { onDrop: r } = n;
	if (e.html) {
		let r = new DOMParser().parseFromString(e.html, "text/html").querySelector("a[href]");
		if (r) {
			let e = rX(r.href);
			if (e) return iX({ urls: [e.toString()] }, t, n);
		}
	}
	if (e.urls && e.urls.forEach((e) => {
		let i = rX(e);
		if (!i) return;
		let a = i.searchParams.get("manifest"), o = i.searchParams.get("canvas");
		a && r({
			canvasId: o,
			manifestId: a
		}, n, t);
	}), e.files) {
		let i = e.files.filter((e) => e.type === "application/json").map((e) => new Promise((i, a) => {
			let o = new FileReader();
			o.addEventListener("load", () => {
				let e = o.result, a = y();
				e && r({
					manifestId: a,
					manifestJson: e
				}, n, t), i();
			}), o.readAsText(e);
		})), a = e.files.filter(({ type: e }) => e.startsWith("image/")), o;
		if (a.length > 0) {
			let e = y(), i = a.map((e) => nX(e));
			o = Promise.all(i).then((i) => {
				let a = {
					"@context": "http://iiif.io/api/presentation/3/context.json",
					id: e,
					items: i.map(({ name: t, type: n, width: r, height: i, url: a }, o) => ({
						height: i,
						id: `${e}/canvas/${o}`,
						items: [{
							id: `${e}/canvas/${o}/1`,
							items: [{
								body: {
									format: n,
									id: a,
									type: "Image"
								},
								height: i,
								id: `${e}/canvas/${o}/1/image`,
								motivation: "painting",
								target: `${e}/canvas/${o}/1`,
								type: "Annotation",
								width: r
							}],
							type: "AnnotationPage"
						}],
						label: t,
						type: "Canvas",
						width: r
					})),
					label: i[0].name,
					type: "Manifest"
				}, o = y();
				a && r({
					manifestId: o,
					manifestJson: a
				}, n, t);
			});
		}
		return Promise.all([...i, o]);
	}
}, aX = (e) => {
	let { children: t, onDrop: n } = e, [{ canDrop: r, isOver: i }, a] = SD({
		accept: [
			$D,
			QD,
			tO
		],
		collect: (e) => ({
			canDrop: e.canDrop(),
			isOver: e.isOver()
		}),
		drop(t, r) {
			n && iX(t, r, e);
		}
	});
	return /* @__PURE__ */ B("div", {
		ref: a,
		onDrop: (t) => {
			if (!(!window.safari || !n || !t.dataTransfer) && t.dataTransfer.types.includes("Files") && t.dataTransfer.types.includes("text/uri-list")) {
				let n = t.dataTransfer.getData("text/uri-list");
				if (!n) return;
				iX({ urls: [n] }, null, e);
			}
		},
		style: {
			height: "100%",
			width: "100%"
		},
		children: [t, /* @__PURE__ */ z(ho, {
			open: r && i,
			style: { zIndex: 9999 },
			children: /* @__PURE__ */ z(tX, { style: {
				color: go[400],
				fontSize: 256
			} })
		})]
	});
};
aX.propTypes = {
	children: W.default.node.isRequired,
	onDrop: W.default.func.isRequired
};
//#endregion
//#region src/components/ImageFailureMessage.jsx
var oX = H(_o)(({ theme: e }) => ({
	position: "absolute",
	top: e.spacing(2),
	left: "50%",
	transform: "translateX(-50%)",
	backgroundColor: e.palette.primary.main,
	color: e.palette.common.white,
	padding: e.spacing(1, 2),
	borderRadius: e.shape.borderRadius,
	zIndex: 1e3,
	pointerEvents: "none"
}));
function sX({ imageUrls: e = [] }) {
	let { failedImages: t } = Ni(pr), { t: n } = V();
	return e.some((e) => t.has(e)) ? /* @__PURE__ */ z(oX, {
		role: "status",
		"aria-live": "polite",
		children: /* @__PURE__ */ z(U, {
			variant: "body2",
			children: n("imageFailedToLoad")
		})
	}) : null;
}
sX.propTypes = { imageUrls: W.default.arrayOf(W.default.string) };
//#endregion
//#region node_modules/@mui/icons-material/esm/CheckSharp.js
var cX = N(/*#__PURE__*/ z("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }), "CheckSharp");
//#endregion
//#region src/components/LanguageSettings.jsx
function lX({ handleClick: e, languages: t }) {
	return /* @__PURE__ */ z(Bi, { children: t.map((t) => /* @__PURE__ */ B(sa, {
		"aria-selected": t.current,
		lang: t.locale,
		onClick: () => {
			e(t.locale);
		},
		children: [/* @__PURE__ */ z(Ia, { children: t.current && /* @__PURE__ */ z(cX, {}) }), /* @__PURE__ */ z(ca, {
			slotProps: { primary: { variant: "body1" } },
			children: t.label
		})]
	}, t.locale)) });
}
lX.propTypes = {
	handleClick: W.default.func.isRequired,
	languages: W.default.arrayOf(W.default.shape({
		current: W.default.bool.isRequired,
		label: W.default.string.isRequired,
		locale: W.default.string.isRequired
	})).isRequired
};
//#endregion
//#region src/components/ManifestForm.jsx
function uX({ addResourcesOpen: e, addResource: t, onSubmit: n = () => {}, onCancel: r = null }) {
	let { t: i } = V(), [a, o] = zi("");
	return e ? /* @__PURE__ */ z("form", {
		onSubmit: (e) => {
			e.preventDefault(), t(a), n(), o("");
		},
		children: /* @__PURE__ */ B(vo, {
			container: !0,
			spacing: 2,
			columns: 12,
			sx: { mt: .5 },
			children: [
				/* @__PURE__ */ z(vo, {
					size: {
						sm: "grow",
						xs: 12
					},
					children: /* @__PURE__ */ z(ka, {
						autoFocus: !0,
						fullWidth: !0,
						value: a,
						id: "manifestURL",
						type: "text",
						onChange: (e) => {
							e.preventDefault(), o(e.target.value);
						},
						variant: "filled",
						label: i("addManifestUrl"),
						helperText: i("addManifestUrlHelp"),
						slotProps: {
							inputLabel: { shrink: !0 },
							inputProps: { style: { typography: "body1" } }
						}
					})
				}),
				r && /* @__PURE__ */ z(vo, {
					size: "auto",
					children: /* @__PURE__ */ z(va, {
						onClick: () => {
							r(), o("");
						},
						children: i("cancel")
					})
				}),
				/* @__PURE__ */ z(vo, {
					size: "auto",
					children: /* @__PURE__ */ z(va, {
						id: "fetchBtn",
						type: "submit",
						variant: "contained",
						color: "primary",
						children: i("fetchManifest")
					})
				})
			]
		})
	}) : null;
}
uX.propTypes = {
	addResource: W.default.func.isRequired,
	addResourcesOpen: W.default.bool.isRequired,
	onCancel: W.default.func,
	onSubmit: W.default.func
};
//#endregion
//#region src/components/ManifestListItemError.jsx
function dX({ manifestId: e, onDismissClick: t, onTryAgainClick: n }) {
	let { t: r } = V();
	return /* @__PURE__ */ B(vo, {
		container: !0,
		sx: {
			alignItems: "center",
			width: "100%"
		},
		children: [/* @__PURE__ */ B(vo, {
			container: !0,
			size: {
				sm: 5,
				xs: 12
			},
			sx: { alignItems: "center" },
			children: [
				/* @__PURE__ */ z(Dq, { sx: {
					color: "error.main",
					height: "2rem",
					marginRight: "0.5rem",
					width: "2rem"
				} }),
				/* @__PURE__ */ z(U, { children: r("manifestError") }),
				/* @__PURE__ */ z(U, {
					sx: { wordBreak: "break-all" },
					children: e
				})
			]
		}), /* @__PURE__ */ B(vo, {
			container: !0,
			size: {
				sm: 7,
				xs: 12
			},
			children: [/* @__PURE__ */ z(va, {
				onClick: () => {
					t(e);
				},
				children: r("dismiss")
			}), /* @__PURE__ */ z(va, {
				onClick: () => {
					n(e);
				},
				children: r("tryAgain")
			})]
		})]
	});
}
dX.propTypes = {
	manifestId: W.default.string.isRequired,
	onDismissClick: W.default.func.isRequired,
	onTryAgainClick: W.default.func.isRequired
};
var fX = i(O(null, {
	onDismissClick: dc,
	onTryAgainClick: Ps
}), A("ManifestListItemError"))(dX), pX = H(Ma, {
	name: "ManifestListItem",
	slot: "root"
})(({ ownerState: e, theme: t }) => ({
	"&:hover,&:focus-within": {
		backgroundColor: t.palette.action.hover,
		borderLeftColor: e?.active ? t.palette.primary.main : t.palette.action.hover
	},
	borderLeft: "4px solid",
	borderLeftColor: e?.active ? t.palette.primary.main : "transparent",
	paddingLeft: t.spacing(2),
	paddingRight: t.spacing(2),
	[t.breakpoints.up("sm")]: {
		paddingLeft: t.spacing(3),
		paddingRight: t.spacing(3)
	}
})), mX = H(sg, {
	name: "ManifestListItem",
	slot: "thumbnail"
})(() => ({
	maxWidth: "100%",
	objectFit: "contain"
})), hX = H(sg, {
	name: "ManifestListItem",
	slot: "logo"
})(() => ({
	height: "2.5rem",
	maxWidth: "100%",
	objectFit: "contain",
	paddingRight: 1
})), gX = () => /* @__PURE__ */ B(vo, {
	container: !0,
	className: M("manifest-list-item"),
	sx: {
		alignItems: "center",
		display: "flex",
		width: "100%"
	},
	children: [
		/* @__PURE__ */ z(vo, {
			size: {
				sm: 5,
				xs: 12
			},
			sx: {
				display: "flex",
				justifyContent: "flex-start",
				width: "100%",
				alignItems: "center"
			},
			children: /* @__PURE__ */ B(vo, {
				container: !0,
				component: "div",
				sx: { width: "100%" },
				children: [/* @__PURE__ */ z(vo, {
					size: 3,
					sx: {
						alignItems: "center",
						display: "flex",
						justifyContent: "flex-start"
					},
					children: /* @__PURE__ */ z(Da, {
						variant: "rectangular",
						sx: { bgcolor: "grey[300]" },
						height: 80,
						width: 120
					})
				}), /* @__PURE__ */ z(vo, {
					size: 9,
					sx: {
						alignContent: "center",
						paddingLeft: 2
					},
					children: /* @__PURE__ */ z(Da, {
						sx: { bgcolor: "grey[300]" },
						variant: "text",
						width: 300
					})
				})]
			})
		}),
		/* @__PURE__ */ B(vo, {
			size: {
				sm: 4,
				xs: 8
			},
			children: [/* @__PURE__ */ z(Da, {
				sx: { bgcolor: "grey[300]" },
				variant: "text",
				width: 150
			}), /* @__PURE__ */ z(Da, {
				sx: { bgcolor: "grey[300]" },
				variant: "text",
				width: 70
			})]
		}),
		/* @__PURE__ */ z(vo, {
			size: {
				sm: 3,
				xs: 4
			},
			children: /* @__PURE__ */ z(Da, {
				sx: { bgcolor: "grey[300]" },
				variant: "rectangular",
				height: 60,
				width: 60
			})
		})
	]
});
function _X({ fetchManifest: e, isFetching: t = !1, addWindow: n, handleClose: r = () => {}, active: i = !1, buttonRef: a = void 0, manifestId: o, ready: s = !1, title: c = null, thumbnail: l = null, manifestLogo: u = null, size: d = 0, provider: f = null, error: p = null, isCollection: m = !1, isMultipart: h = !1 }) {
	let { t: g } = V();
	L(() => {
		!s && !p && !t && f !== "file" && e(o);
	}, [
		o,
		f,
		e,
		s,
		p,
		t
	]);
	let _ = arguments[0];
	return p ? /* @__PURE__ */ z(pX, {
		ownerState: _,
		divider: !0,
		selected: i,
		className: i ? "active" : "",
		"data-manifestid": o,
		children: /* @__PURE__ */ z(fX, { manifestId: o })
	}) : /* @__PURE__ */ z(pX, {
		ownerState: _,
		divider: !0,
		selected: i,
		className: i ? "active" : "",
		"data-manifestid": o,
		"data-active": i,
		sx: { width: "100%" },
		children: s ? /* @__PURE__ */ B(vo, {
			container: !0,
			className: M("manifest-list-item"),
			sx: {
				alignItems: "center",
				width: "100%"
			},
			children: [
				/* @__PURE__ */ z(vo, {
					size: {
						sm: 5,
						xs: 12
					},
					children: /* @__PURE__ */ z(yo, {
						ref: a,
						className: M("manifest-list-item-title"),
						onClick: () => {
							n({ manifestId: o }), r();
						},
						sx: {
							alignItems: "center",
							justifyContent: "flex-start",
							width: "100%"
						},
						children: /* @__PURE__ */ B(vo, {
							container: !0,
							component: "div",
							sx: { width: "100%" },
							children: [/* @__PURE__ */ z(vo, {
								size: 3,
								sx: {
									alignItems: "center",
									display: "flex",
									justifyContent: "flex-start"
								},
								children: l ? /* @__PURE__ */ z(mX, {
									className: M("manifest-list-item-thumb"),
									src: l,
									alt: "",
									height: "80",
									fallback: /* @__PURE__ */ z(Da, {
										variant: "rectangular",
										animation: !1,
										sx: { bgcolor: "grey[300]" },
										height: 80,
										width: 120
									})
								}) : /* @__PURE__ */ z(Da, {
									sx: { bgcolor: "grey[300]" },
									variant: "rectangular",
									height: 80,
									width: 120
								})
							}), /* @__PURE__ */ B(vo, {
								size: 9,
								sx: {
									alignContent: "center",
									paddingLeft: 2
								},
								children: [m && /* @__PURE__ */ z(U, {
									component: "div",
									variant: "overline",
									sx: { textAlign: "left" },
									children: g(h ? "multipartCollection" : "collection")
								}), /* @__PURE__ */ z(U, {
									component: "div",
									variant: "h6",
									sx: { textAlign: "left" },
									children: c || o
								})]
							})]
						})
					})
				}),
				/* @__PURE__ */ B(vo, {
					size: {
						sm: 4,
						xs: 8
					},
					children: [/* @__PURE__ */ z(U, {
						className: M("manifest-list-item-provider"),
						children: f
					}), /* @__PURE__ */ z(U, { children: g("numItems", {
						count: d,
						number: d
					}) })]
				}),
				/* @__PURE__ */ z(vo, {
					size: {
						sm: 3,
						xs: 4
					},
					children: u && /* @__PURE__ */ z(hX, {
						src: u,
						alt: "",
						role: "presentation",
						fallback: /* @__PURE__ */ z(Da, {
							variant: "rectangular",
							animation: !1,
							sx: { bgcolor: "grey[300]" },
							height: 60,
							width: 60
						})
					})
				})
			]
		}) : /* @__PURE__ */ z(gX, {})
	});
}
_X.propTypes = {
	active: W.default.bool,
	addWindow: W.default.func.isRequired,
	buttonRef: W.default.elementType,
	error: W.default.oneOfType([
		W.default.string,
		W.default.bool,
		W.default.oneOf([null])
	]),
	fetchManifest: W.default.func.isRequired,
	handleClose: W.default.func,
	isCollection: W.default.bool,
	isFetching: W.default.bool,
	isMultipart: W.default.bool,
	manifestId: W.default.string.isRequired,
	manifestLogo: W.default.string,
	provider: W.default.string,
	ready: W.default.bool,
	size: W.default.number,
	thumbnail: W.default.string,
	title: W.default.string
};
//#endregion
//#region src/components/MosaicRenderPreview.jsx
function vX({ title: e = "", windowId: t }) {
	let { t: n } = V();
	return /* @__PURE__ */ z(BJ, {
		windowId: `${t}-preview`,
		label: n("previewWindowTitle", { title: e }),
		ariaLabel: !1
	});
}
vX.propTypes = {
	title: W.default.string,
	windowId: W.default.string.isRequired
};
//#endregion
//#region node_modules/@mui/icons-material/esm/ExpandLessSharp.js
var yX = N(/*#__PURE__*/ z("path", { d: "m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z" }), "ExpandLessSharp"), bX = N(/*#__PURE__*/ z("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMoreSharp");
//#endregion
//#region src/components/NestedMenu.jsx
function xX({ children: e, icon: t = null, label: n, ...r }) {
	let [i, a] = zi(!1), o = I(() => {
		a(!i);
	}, [i, a]);
	return /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ B(sa, {
		"aria-expanded": i,
		onClick: o,
		divider: i,
		...r,
		children: [
			t && /* @__PURE__ */ z(Ia, { children: t }),
			/* @__PURE__ */ z(ca, {
				slotProps: { primary: { variant: "body1" } },
				children: n
			}),
			z(i ? yX : bX, {})
		]
	}), i && e] });
}
xX.propTypes = {
	children: W.default.element.isRequired,
	icon: W.default.element,
	label: W.default.string.isRequired
};
//#endregion
//#region node_modules/openseadragon/build/openseadragon/openseadragon.js
var SX = /* @__PURE__ */ D(((e, t) => {
	function n(e) {
		return new n.Viewer(e);
	}
	(function(e) {
		e.version = {
			versionStr: "5.0.1",
			major: 5,
			minor: 0,
			revision: 1
		};
		var t = {
			"[object Boolean]": "boolean",
			"[object Number]": "number",
			"[object String]": "string",
			"[object Function]": "function",
			"[object AsyncFunction]": "function",
			"[object Promise]": "promise",
			"[object Array]": "array",
			"[object Date]": "date",
			"[object RegExp]": "regexp",
			"[object Object]": "object"
		}, r = Object.prototype.toString, i = Object.prototype.hasOwnProperty;
		e.isFunction = function(t) {
			return e.type(t) === "function";
		}, e.isArray = Array.isArray || function(t) {
			return e.type(t) === "array";
		}, e.isWindow = function(e) {
			return e && typeof e == "object" && "setInterval" in e;
		}, e.type = function(e) {
			return e == null ? String(e) : t[r.call(e)] || "object";
		}, e.isPlainObject = function(t) {
			if (!t || n.type(t) !== "object" || t.nodeType || e.isWindow(t) || t.constructor && !i.call(t, "constructor") && !i.call(t.constructor.prototype, "isPrototypeOf")) return !1;
			var r;
			for (var a in t) r = a;
			return r === void 0 || i.call(t, r);
		}, e.isEmptyObject = function(e) {
			for (var t in e) return !1;
			return !0;
		}, e.freezeObject = function(t) {
			return e.freezeObject = Object.freeze ? Object.freeze : function(e) {
				return e;
			}, e.freezeObject(t);
		}, e.supportsCanvas = function() {
			var t = document.createElement("canvas");
			return !!(e.isFunction(t.getContext) && t.getContext("2d"));
		}(), e.isCanvasTainted = function(e) {
			var t = !1;
			try {
				e.getContext("2d").getImageData(0, 0, 1, 1);
			} catch {
				t = !0;
			}
			return t;
		}, e.supportsAddEventListener = function() {
			return !!(document.documentElement.addEventListener && document.addEventListener);
		}(), e.supportsRemoveEventListener = function() {
			return !!(document.documentElement.removeEventListener && document.removeEventListener);
		}(), e.supportsEventListenerOptions = function() {
			var t = 0;
			if (e.supportsAddEventListener) try {
				var n = {
					get capture() {
						return t++, !1;
					},
					get once() {
						return t++, !1;
					},
					get passive() {
						return t++, !1;
					}
				};
				window.addEventListener("test", null, n), window.removeEventListener("test", null, n);
			} catch {
				t = 0;
			}
			return t >= 3;
		}(), e.getCurrentPixelDensityRatio = function() {
			if (e.supportsCanvas) {
				var t = document.createElement("canvas").getContext("2d"), n = window.devicePixelRatio || 1, r = t.webkitBackingStorePixelRatio || t.mozBackingStorePixelRatio || t.msBackingStorePixelRatio || t.oBackingStorePixelRatio || t.backingStorePixelRatio || 1;
				return Math.max(n, 1) / r;
			}
			return 1;
		}, e.pixelDensityRatio = e.getCurrentPixelDensityRatio();
	})(n), (function(e) {
		e.extend = function() {
			var t, r, i, a, o, s, c = arguments[0] || {}, l = arguments.length, u = !1, d = 1;
			for (typeof c == "boolean" && (u = c, c = arguments[1] || {}, d = 2), typeof c != "object" && !n.isFunction(c) && (c = {}), l === d && (c = this, --d); d < l; d++) if (t = arguments[d], t !== null || t !== void 0) for (r in t) {
				var f = Object.getOwnPropertyDescriptor(t, r);
				if (f !== void 0) {
					if (f.get || f.set) {
						Object.defineProperty(c, r, f);
						continue;
					}
					a = f.value;
				} else {
					e.console.warn("Could not copy inherited property \"" + r + "\".");
					continue;
				}
				c !== a && (u && a && (n.isPlainObject(a) || (o = n.isArray(a))) ? (i = c[r], o ? (o = !1, s = i && n.isArray(i) ? i : []) : s = i && n.isPlainObject(i) ? i : {}, c[r] = n.extend(u, s, a)) : a !== void 0 && (c[r] = a));
			}
			return c;
		}, e.extend(e, {
			DEFAULT_SETTINGS: {
				xmlPath: null,
				tileSources: null,
				tileHost: null,
				initialPage: 0,
				crossOriginPolicy: !1,
				ajaxWithCredentials: !1,
				loadTilesWithAjax: !1,
				ajaxHeaders: {},
				splitHashDataForPost: !1,
				panHorizontal: !0,
				panVertical: !0,
				constrainDuringPan: !1,
				wrapHorizontal: !1,
				wrapVertical: !1,
				visibilityRatio: .5,
				minPixelRatio: .5,
				defaultZoomLevel: 0,
				minZoomLevel: null,
				maxZoomLevel: null,
				homeFillsViewer: !1,
				clickTimeThreshold: 300,
				clickDistThreshold: 5,
				dblClickTimeThreshold: 300,
				dblClickDistThreshold: 20,
				springStiffness: 6.5,
				animationTime: 1.2,
				gestureSettingsMouse: {
					dragToPan: !0,
					scrollToZoom: !0,
					clickToZoom: !0,
					dblClickToZoom: !1,
					dblClickDragToZoom: !1,
					pinchToZoom: !1,
					zoomToRefPoint: !0,
					flickEnabled: !1,
					flickMinSpeed: 120,
					flickMomentum: .25,
					pinchRotate: !1
				},
				gestureSettingsTouch: {
					dragToPan: !0,
					scrollToZoom: !1,
					clickToZoom: !1,
					dblClickToZoom: !0,
					dblClickDragToZoom: !0,
					pinchToZoom: !0,
					zoomToRefPoint: !0,
					flickEnabled: !0,
					flickMinSpeed: 120,
					flickMomentum: .25,
					pinchRotate: !1
				},
				gestureSettingsPen: {
					dragToPan: !0,
					scrollToZoom: !1,
					clickToZoom: !0,
					dblClickToZoom: !1,
					dblClickDragToZoom: !1,
					pinchToZoom: !1,
					zoomToRefPoint: !0,
					flickEnabled: !1,
					flickMinSpeed: 120,
					flickMomentum: .25,
					pinchRotate: !1
				},
				gestureSettingsUnknown: {
					dragToPan: !0,
					scrollToZoom: !1,
					clickToZoom: !1,
					dblClickToZoom: !0,
					dblClickDragToZoom: !1,
					pinchToZoom: !0,
					zoomToRefPoint: !0,
					flickEnabled: !0,
					flickMinSpeed: 120,
					flickMomentum: .25,
					pinchRotate: !1
				},
				zoomPerClick: 2,
				zoomPerScroll: 1.2,
				zoomPerDblClickDrag: 1.2,
				zoomPerSecond: 1,
				blendTime: 0,
				alwaysBlend: !1,
				autoHideControls: !0,
				immediateRender: !1,
				minZoomImageRatio: .9,
				maxZoomPixelRatio: 1.1,
				smoothTileEdgesMinZoom: 1.1,
				iOSDevice: function() {
					if (typeof navigator != "object") return !1;
					var e = navigator.userAgent;
					return typeof e == "string" ? e.indexOf("iPhone") !== -1 || e.indexOf("iPad") !== -1 || e.indexOf("iPod") !== -1 : !1;
				}(),
				pixelsPerWheelLine: 40,
				pixelsPerArrowPress: 40,
				autoResize: !0,
				preserveImageSizeOnResize: !1,
				minScrollDeltaTime: 50,
				rotationIncrement: 90,
				maxTilesPerFrame: 1,
				showSequenceControl: !0,
				sequenceControlAnchor: null,
				preserveViewport: !1,
				preserveOverlays: !1,
				navPrevNextWrap: !1,
				showNavigationControl: !0,
				navigationControlAnchor: null,
				showZoomControl: !0,
				showHomeControl: !0,
				showFullPageControl: !0,
				showRotationControl: !1,
				showFlipControl: !1,
				controlsFadeDelay: 2e3,
				controlsFadeLength: 1500,
				mouseNavEnabled: !0,
				showNavigator: !1,
				navigatorElement: null,
				navigatorId: null,
				navigatorPosition: null,
				navigatorSizeRatio: .2,
				navigatorMaintainSizeRatio: !1,
				navigatorTop: null,
				navigatorLeft: null,
				navigatorHeight: null,
				navigatorWidth: null,
				navigatorAutoResize: !0,
				navigatorAutoFade: !0,
				navigatorRotate: !0,
				navigatorBackground: "#000",
				navigatorOpacity: .8,
				navigatorBorderColor: "#555",
				navigatorDisplayRegionColor: "#900",
				degrees: 0,
				flipped: !1,
				overlayPreserveContentDirection: !0,
				opacity: 1,
				compositeOperation: null,
				drawer: [
					"webgl",
					"canvas",
					"html"
				],
				drawerOptions: {
					webgl: {},
					canvas: {},
					html: {},
					custom: {}
				},
				preload: !1,
				imageSmoothingEnabled: !0,
				placeholderFillStyle: null,
				subPixelRoundingForTransparency: null,
				showReferenceStrip: !1,
				referenceStripScroll: "horizontal",
				referenceStripElement: null,
				referenceStripHeight: null,
				referenceStripWidth: null,
				referenceStripPosition: "BOTTOM_LEFT",
				referenceStripSizeRatio: .2,
				collectionRows: 3,
				collectionColumns: 0,
				collectionLayout: "horizontal",
				collectionMode: !1,
				collectionTileSize: 800,
				collectionTileMargin: 80,
				imageLoaderLimit: 0,
				maxImageCacheCount: 200,
				timeout: 3e4,
				tileRetryMax: 0,
				tileRetryDelay: 2500,
				prefixUrl: "/images/",
				navImages: {
					zoomIn: {
						REST: "zoomin_rest.png",
						GROUP: "zoomin_grouphover.png",
						HOVER: "zoomin_hover.png",
						DOWN: "zoomin_pressed.png"
					},
					zoomOut: {
						REST: "zoomout_rest.png",
						GROUP: "zoomout_grouphover.png",
						HOVER: "zoomout_hover.png",
						DOWN: "zoomout_pressed.png"
					},
					home: {
						REST: "home_rest.png",
						GROUP: "home_grouphover.png",
						HOVER: "home_hover.png",
						DOWN: "home_pressed.png"
					},
					fullpage: {
						REST: "fullpage_rest.png",
						GROUP: "fullpage_grouphover.png",
						HOVER: "fullpage_hover.png",
						DOWN: "fullpage_pressed.png"
					},
					rotateleft: {
						REST: "rotateleft_rest.png",
						GROUP: "rotateleft_grouphover.png",
						HOVER: "rotateleft_hover.png",
						DOWN: "rotateleft_pressed.png"
					},
					rotateright: {
						REST: "rotateright_rest.png",
						GROUP: "rotateright_grouphover.png",
						HOVER: "rotateright_hover.png",
						DOWN: "rotateright_pressed.png"
					},
					flip: {
						REST: "flip_rest.png",
						GROUP: "flip_grouphover.png",
						HOVER: "flip_hover.png",
						DOWN: "flip_pressed.png"
					},
					previous: {
						REST: "previous_rest.png",
						GROUP: "previous_grouphover.png",
						HOVER: "previous_hover.png",
						DOWN: "previous_pressed.png"
					},
					next: {
						REST: "next_rest.png",
						GROUP: "next_grouphover.png",
						HOVER: "next_hover.png",
						DOWN: "next_pressed.png"
					}
				},
				debugMode: !1,
				debugGridColor: [
					"#437AB2",
					"#1B9E77",
					"#D95F02",
					"#7570B3",
					"#E7298A",
					"#66A61E",
					"#E6AB02",
					"#A6761D",
					"#666666"
				],
				silenceMultiImageWarnings: !1
			},
			delegate: function(e, t) {
				return function() {
					var n = arguments;
					return n === void 0 && (n = []), t.apply(e, n);
				};
			},
			BROWSERS: {
				UNKNOWN: 0,
				IE: 1,
				FIREFOX: 2,
				SAFARI: 3,
				CHROME: 4,
				OPERA: 5,
				EDGE: 6,
				CHROMEEDGE: 7
			},
			SUBPIXEL_ROUNDING_OCCURRENCES: {
				NEVER: 0,
				ONLY_AT_REST: 1,
				ALWAYS: 2
			},
			_viewers: /* @__PURE__ */ new Map(),
			getViewer: function(t) {
				return e._viewers.get(this.getElement(t));
			},
			getElement: function(e) {
				return typeof e == "string" && (e = document.getElementById(e)), e;
			},
			getElementPosition: function(t) {
				var n = new e.Point(), r, i;
				for (t = e.getElement(t), r = e.getElementStyle(t).position === "fixed", i = a(t, r); i;) n.x += t.offsetLeft, n.y += t.offsetTop, r && (n = n.plus(e.getPageScroll())), t = i, r = e.getElementStyle(t).position === "fixed", i = a(t, r);
				return n;
			},
			getElementOffset: function(t) {
				t = e.getElement(t);
				var n = t && t.ownerDocument, r, i, a = {
					top: 0,
					left: 0
				};
				return n ? (r = n.documentElement, t.getBoundingClientRect !== void 0 && (a = t.getBoundingClientRect()), i = n === n.window ? n : n.nodeType === 9 ? n.defaultView || n.parentWindow : !1, new e.Point(a.left + (i.pageXOffset || r.scrollLeft) - (r.clientLeft || 0), a.top + (i.pageYOffset || r.scrollTop) - (r.clientTop || 0))) : new e.Point();
			},
			getElementSize: function(t) {
				return t = e.getElement(t), new e.Point(t.clientWidth, t.clientHeight);
			},
			getElementStyle: document.documentElement.currentStyle ? function(t) {
				return t = e.getElement(t), t.currentStyle;
			} : function(t) {
				return t = e.getElement(t), window.getComputedStyle(t, "");
			},
			getCssPropertyWithVendorPrefix: function(t) {
				var n = {};
				return e.getCssPropertyWithVendorPrefix = function(t) {
					if (n[t] !== void 0) return n[t];
					var r = document.createElement("div").style, i = null;
					if (r[t] !== void 0) i = t;
					else for (var a = [
						"Webkit",
						"Moz",
						"MS",
						"O",
						"webkit",
						"moz",
						"ms",
						"o"
					], o = e.capitalizeFirstLetter(t), s = 0; s < a.length; s++) {
						var c = a[s] + o;
						if (r[c] !== void 0) {
							i = c;
							break;
						}
					}
					return n[t] = i, i;
				}, e.getCssPropertyWithVendorPrefix(t);
			},
			capitalizeFirstLetter: function(e) {
				return e.charAt(0).toUpperCase() + e.slice(1);
			},
			positiveModulo: function(e, t) {
				var n = e % t;
				return n < 0 && (n += t), n;
			},
			pointInElement: function(t, n) {
				t = e.getElement(t);
				var r = e.getElementOffset(t), i = e.getElementSize(t);
				return n.x >= r.x && n.x < r.x + i.x && n.y < r.y + i.y && n.y >= r.y;
			},
			getMousePosition: function(t) {
				if (typeof t.pageX == "number") e.getMousePosition = function(t) {
					var n = new e.Point();
					return n.x = t.pageX, n.y = t.pageY, n;
				};
				else if (typeof t.clientX == "number") e.getMousePosition = function(t) {
					var n = new e.Point();
					return n.x = t.clientX + document.body.scrollLeft + document.documentElement.scrollLeft, n.y = t.clientY + document.body.scrollTop + document.documentElement.scrollTop, n;
				};
				else throw Error("Unknown event mouse position, no known technique.");
				return e.getMousePosition(t);
			},
			getPageScroll: function() {
				var t = document.documentElement || {}, n = document.body || {};
				if (typeof window.pageXOffset == "number") e.getPageScroll = function() {
					return new e.Point(window.pageXOffset, window.pageYOffset);
				};
				else if (n.scrollLeft || n.scrollTop) e.getPageScroll = function() {
					return new e.Point(document.body.scrollLeft, document.body.scrollTop);
				};
				else if (t.scrollLeft || t.scrollTop) e.getPageScroll = function() {
					return new e.Point(document.documentElement.scrollLeft, document.documentElement.scrollTop);
				};
				else return new e.Point(0, 0);
				return e.getPageScroll();
			},
			setPageScroll: function(t) {
				if (window.scrollTo !== void 0) e.setPageScroll = function(e) {
					window.scrollTo(e.x, e.y);
				};
				else {
					var n = e.getPageScroll();
					if (n.x === t.x && n.y === t.y) return;
					document.body.scrollLeft = t.x, document.body.scrollTop = t.y;
					var r = e.getPageScroll();
					if (r.x !== n.x && r.y !== n.y) {
						e.setPageScroll = function(e) {
							document.body.scrollLeft = e.x, document.body.scrollTop = e.y;
						};
						return;
					}
					if (document.documentElement.scrollLeft = t.x, document.documentElement.scrollTop = t.y, r = e.getPageScroll(), r.x !== n.x && r.y !== n.y) {
						e.setPageScroll = function(e) {
							document.documentElement.scrollLeft = e.x, document.documentElement.scrollTop = e.y;
						};
						return;
					}
					e.setPageScroll = function(e) {};
				}
				e.setPageScroll(t);
			},
			getWindowSize: function() {
				var t = document.documentElement || {}, n = document.body || {};
				if (typeof window.innerWidth == "number") e.getWindowSize = function() {
					return new e.Point(window.innerWidth, window.innerHeight);
				};
				else if (t.clientWidth || t.clientHeight) e.getWindowSize = function() {
					return new e.Point(document.documentElement.clientWidth, document.documentElement.clientHeight);
				};
				else if (n.clientWidth || n.clientHeight) e.getWindowSize = function() {
					return new e.Point(document.body.clientWidth, document.body.clientHeight);
				};
				else throw Error("Unknown window size, no known technique.");
				return e.getWindowSize();
			},
			makeCenteredNode: function(t) {
				t = e.getElement(t);
				var n = [
					e.makeNeutralElement("div"),
					e.makeNeutralElement("div"),
					e.makeNeutralElement("div")
				];
				return e.extend(n[0].style, {
					display: "table",
					height: "100%",
					width: "100%"
				}), e.extend(n[1].style, { display: "table-row" }), e.extend(n[2].style, {
					display: "table-cell",
					verticalAlign: "middle",
					textAlign: "center"
				}), n[0].appendChild(n[1]), n[1].appendChild(n[2]), n[2].appendChild(t), n[0];
			},
			makeNeutralElement: function(e) {
				var t = document.createElement(e), n = t.style;
				return n.background = "transparent none", n.border = "none", n.margin = "0px", n.padding = "0px", n.position = "static", t;
			},
			now: function() {
				return e.now = Date.now ? Date.now : function() {
					return (/* @__PURE__ */ new Date()).getTime();
				}, e.now();
			},
			makeTransparentImage: function(t) {
				var n = e.makeNeutralElement("img");
				return n.src = t, n;
			},
			setElementOpacity: function(t, n, r) {
				var i, a;
				t = e.getElement(t), r && !e.Browser.alpha && (n = Math.round(n)), e.Browser.opacity ? t.style.opacity = n < 1 ? n : "" : n < 1 ? (i = Math.round(100 * n), a = "alpha(opacity=" + i + ")", t.style.filter = a) : t.style.filter = "";
			},
			setElementTouchActionNone: function(t) {
				t = e.getElement(t), t.style.touchAction === void 0 ? t.style.msTouchAction !== void 0 && (t.style.msTouchAction = "none") : t.style.touchAction = "none";
			},
			setElementPointerEvents: function(t, n) {
				t = e.getElement(t), t.style !== void 0 && t.style.pointerEvents !== void 0 && (t.style.pointerEvents = n);
			},
			setElementPointerEventsNone: function(t) {
				e.setElementPointerEvents(t, "none");
			},
			addClass: function(t, n) {
				t = e.getElement(t), t.className ? (" " + t.className + " ").indexOf(" " + n + " ") === -1 && (t.className += " " + n) : t.className = n;
			},
			indexOf: function(e, t, n) {
				return this.indexOf = Array.prototype.indexOf ? function(e, t, n) {
					return e.indexOf(t, n);
				} : function(e, t, n) {
					var r, i = n || 0, a;
					if (!e) throw TypeError();
					if (a = e.length, a === 0 || i >= a) return -1;
					for (i < 0 && (i = a - Math.abs(i)), r = i; r < a; r++) if (e[r] === t) return r;
					return -1;
				}, this.indexOf(e, t, n);
			},
			removeClass: function(t, n) {
				var r, i = [], a;
				for (t = e.getElement(t), r = t.className.split(/\s+/), a = 0; a < r.length; a++) r[a] && r[a] !== n && i.push(r[a]);
				t.className = i.join(" ");
			},
			normalizeEventListenerOptions: function(t) {
				return t === void 0 ? e.supportsEventListenerOptions ? { capture: !1 } : !1 : typeof t == "boolean" ? e.supportsEventListenerOptions ? { capture: t } : t : e.supportsEventListenerOptions ? t : t.capture !== void 0 && t.capture;
			},
			addEvent: function() {
				if (e.supportsAddEventListener) return function(t, n, r, i) {
					i = e.normalizeEventListenerOptions(i), t = e.getElement(t), t.addEventListener(n, r, i);
				};
				if (document.documentElement.attachEvent && document.attachEvent) return function(t, n, r) {
					t = e.getElement(t), t.attachEvent("on" + n, r);
				};
				throw Error("No known event model.");
			}(),
			removeEvent: function() {
				if (e.supportsRemoveEventListener) return function(t, n, r, i) {
					i = e.normalizeEventListenerOptions(i), t = e.getElement(t), t.removeEventListener(n, r, i);
				};
				if (document.documentElement.detachEvent && document.detachEvent) return function(t, n, r) {
					t = e.getElement(t), t.detachEvent("on" + n, r);
				};
				throw Error("No known event model.");
			}(),
			cancelEvent: function(e) {
				e.preventDefault();
			},
			eventIsCanceled: function(e) {
				return e.defaultPrevented;
			},
			stopEvent: function(e) {
				e.stopPropagation();
			},
			createCallback: function(e, t) {
				console.error("The createCallback function is deprecated and will be removed in future versions. Please use alternativeFunction instead.");
				var n = [], r;
				for (r = 2; r < arguments.length; r++) n.push(arguments[r]);
				return function() {
					var r = n.concat([]), i;
					for (i = 0; i < arguments.length; i++) r.push(arguments[i]);
					return t.apply(e, r);
				};
			},
			getUrlParameter: function(e) {
				return i[e] || null;
			},
			getUrlProtocol: function(e) {
				var t = e.match(/^([a-z]+:)\/\//i);
				return t === null ? window.location.protocol : t[1].toLowerCase();
			},
			createAjaxRequest: function() {
				if (window.XMLHttpRequest) return e.createAjaxRequest = function() {
					return new XMLHttpRequest();
				}, new XMLHttpRequest();
				throw Error("Browser doesn't support XMLHttpRequest.");
			},
			makeAjaxRequest: function(t, n, r) {
				var i, a, o, s;
				e.isPlainObject(t) && (n = t.success, r = t.error, i = t.withCredentials, a = t.headers, o = t.responseType || null, s = t.postData || null, t = t.url);
				var c = e.getUrlProtocol(t), l = e.createAjaxRequest();
				if (!e.isFunction(n)) throw Error("makeAjaxRequest requires a success callback");
				l.onreadystatechange = function() {
					l.readyState === 4 && (l.onreadystatechange = function() {}, l.status >= 200 && l.status < 300 || l.status === 0 && c !== "http:" && c !== "https:" ? n(l) : e.isFunction(r) ? r(l) : e.console.error("AJAX request returned %d: %s", l.status, t));
				};
				var u = s ? "POST" : "GET";
				try {
					if (l.open(u, t, !0), o && (l.responseType = o), a) for (var d in a) Object.prototype.hasOwnProperty.call(a, d) && a[d] && l.setRequestHeader(d, a[d]);
					i && (l.withCredentials = !0), l.send(s);
				} catch (t) {
					e.console.error("%s while making AJAX request: %s", t.name, t.message), l.onreadystatechange = function() {}, e.isFunction(r) && r(l, t);
				}
				return l;
			},
			jsonp: function(t) {
				var n, r = t.url, i = document.head || document.getElementsByTagName("head")[0] || document.documentElement, a = t.callbackName || "openseadragon" + e.now(), o = window[a], s = "$1" + a + "$2", c = t.param || "callback", l = t.callback;
				r = r.replace(/(=)\?(&|$)|\?\?/i, s), r += (/\?/.test(r) ? "&" : "?") + c + "=" + a, window[a] = function(t) {
					if (o) window[a] = o;
					else try {
						delete window[a];
					} catch {}
					l && e.isFunction(l) && l(t);
				}, n = document.createElement("script"), (t.async !== void 0 || !1 !== t.async) && (n.async = "async"), t.scriptCharset && (n.charset = t.scriptCharset), n.src = r, n.onload = n.onreadystatechange = function(e, t) {
					(t || !n.readyState || /loaded|complete/.test(n.readyState)) && (n.onload = n.onreadystatechange = null, i && n.parentNode && i.removeChild(n), n = void 0);
				}, i.insertBefore(n, i.firstChild);
			},
			createFromDZI: function() {
				throw "OpenSeadragon.createFromDZI is deprecated, use Viewer.open.";
			},
			parseXml: function(t) {
				if (window.DOMParser) e.parseXml = function(e) {
					var t = null;
					return t = new DOMParser().parseFromString(e, "text/xml"), t;
				};
				else throw Error("Browser doesn't support XML DOM.");
				return e.parseXml(t);
			},
			parseJSON: function(t) {
				return e.parseJSON = window.JSON.parse, e.parseJSON(t);
			},
			imageFormatSupported: function(e) {
				return e ||= "", !!r[e.toLowerCase()];
			},
			setImageFormatsSupported: function(t) {
				e.extend(r, t);
			}
		});
		var t = function(e) {};
		e.console = window.console || {
			log: t,
			debug: t,
			info: t,
			warn: t,
			error: t,
			assert: t
		}, e.Browser = {
			vendor: e.BROWSERS.UNKNOWN,
			version: 0,
			alpha: !0
		};
		var r = {
			avif: !0,
			bmp: !1,
			jpeg: !0,
			jpg: !0,
			png: !0,
			tif: !1,
			wdp: !1,
			webp: !0
		}, i = {};
		(function() {
			var t = navigator.appVersion, n = navigator.userAgent, r;
			switch (navigator.appName) {
				case "Microsoft Internet Explorer":
					window.attachEvent && window.ActiveXObject && (e.Browser.vendor = e.BROWSERS.IE, e.Browser.version = parseFloat(n.substring(n.indexOf("MSIE") + 5, n.indexOf(";", n.indexOf("MSIE")))));
					break;
				case "Netscape":
					window.addEventListener && (n.indexOf("Edge") >= 0 ? (e.Browser.vendor = e.BROWSERS.EDGE, e.Browser.version = parseFloat(n.substring(n.indexOf("Edge") + 5))) : n.indexOf("Edg") >= 0 ? (e.Browser.vendor = e.BROWSERS.CHROMEEDGE, e.Browser.version = parseFloat(n.substring(n.indexOf("Edg") + 4))) : n.indexOf("Firefox") >= 0 ? (e.Browser.vendor = e.BROWSERS.FIREFOX, e.Browser.version = parseFloat(n.substring(n.indexOf("Firefox") + 8))) : n.indexOf("Safari") >= 0 ? (e.Browser.vendor = n.indexOf("Chrome") >= 0 ? e.BROWSERS.CHROME : e.BROWSERS.SAFARI, e.Browser.version = parseFloat(n.substring(n.substring(0, n.indexOf("Safari")).lastIndexOf("/") + 1, n.indexOf("Safari")))) : (r = /* @__PURE__ */ RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"), r.exec(n) !== null && (e.Browser.vendor = e.BROWSERS.IE, e.Browser.version = parseFloat(RegExp.$1))));
					break;
				case "Opera": e.Browser.vendor = e.BROWSERS.OPERA, e.Browser.version = parseFloat(t);
			}
			var a = window.location.search.substring(1).split("&"), o, s, c;
			for (c = 0; c < a.length; c++) if (o = a[c], s = o.indexOf("="), s > 0) {
				var l = o.substring(0, s), u = o.substring(s + 1);
				try {
					i[l] = decodeURIComponent(u);
				} catch {
					e.console.error("Ignoring malformed URL parameter: %s=%s", l, u);
				}
			}
			e.Browser.alpha = !(e.Browser.vendor === e.BROWSERS.CHROME && e.Browser.version < 2), e.Browser.opacity = !0, e.Browser.vendor === e.BROWSERS.IE && e.console.error("Internet Explorer is not supported by OpenSeadragon");
		})(), (function(t) {
			var n = t.requestAnimationFrame || t.mozRequestAnimationFrame || t.webkitRequestAnimationFrame || t.msRequestAnimationFrame, r = t.cancelAnimationFrame || t.mozCancelAnimationFrame || t.webkitCancelAnimationFrame || t.msCancelAnimationFrame;
			if (n && r) e.requestAnimationFrame = function() {
				return n.apply(t, arguments);
			}, e.cancelAnimationFrame = function() {
				return r.apply(t, arguments);
			};
			else {
				var i = [], a = [], o = 0, s;
				e.requestAnimationFrame = function(t) {
					return i.push([++o, t]), s ||= setInterval(function() {
						if (i.length) {
							var t = e.now(), n = a;
							for (a = i, i = n; a.length;) a.shift()[1](t);
						} else clearInterval(s), s = void 0;
					}, 20), o;
				}, e.cancelAnimationFrame = function(e) {
					var t, n;
					for (t = 0, n = i.length; t < n; t += 1) if (i[t][0] === e) {
						i.splice(t, 1);
						return;
					}
					for (t = 0, n = a.length; t < n; t += 1) if (a[t][0] === e) {
						a.splice(t, 1);
						return;
					}
				};
			}
		})(window);
		function a(e, t) {
			return t && e !== document.body ? document.body : e.offsetParent;
		}
	})(n), (function(e, n) {
		typeof define == "function" && define.amd ? define([], n) : typeof t == "object" && t.exports ? t.exports = n() : e.OpenSeadragon = n();
	})(e, function() {
		return n;
	}), (function(e) {
		class t {
			constructor(e) {
				e ||= [
					0,
					0,
					0,
					0,
					0,
					0,
					0,
					0,
					0
				], this.values = e;
			}
			static makeIdentity() {
				return new t([
					1,
					0,
					0,
					0,
					1,
					0,
					0,
					0,
					1
				]);
			}
			static makeTranslation(e, n) {
				return new t([
					1,
					0,
					0,
					0,
					1,
					0,
					e,
					n,
					1
				]);
			}
			static makeRotation(e) {
				var n = Math.cos(e), r = Math.sin(e);
				return new t([
					n,
					-r,
					0,
					r,
					n,
					0,
					0,
					0,
					1
				]);
			}
			static makeScaling(e, n) {
				return new t([
					e,
					0,
					0,
					0,
					n,
					0,
					0,
					0,
					1
				]);
			}
			multiply(e) {
				let n = this.values, r = e.values;
				var i = n[0], a = n[1], o = n[2], s = n[3], c = n[4], l = n[5], u = n[6], d = n[7], f = n[8], p = r[0], m = r[1], h = r[2], g = r[3], _ = r[4], v = r[5], y = r[6], b = r[7], x = r[8];
				return new t([
					p * i + m * s + h * u,
					p * a + m * c + h * d,
					p * o + m * l + h * f,
					g * i + _ * s + v * u,
					g * a + _ * c + v * d,
					g * o + _ * l + v * f,
					y * i + b * s + x * u,
					y * a + b * c + x * d,
					y * o + b * l + x * f
				]);
			}
		}
		e.Mat3 = t;
	})(n), (function(e) {
		var t = {
			supportsFullScreen: !1,
			isFullScreen: function() {
				return !1;
			},
			getFullScreenElement: function() {
				return null;
			},
			requestFullScreen: function() {},
			exitFullScreen: function() {},
			cancelFullScreen: function() {},
			fullScreenEventName: "",
			fullScreenErrorEventName: ""
		};
		document.exitFullscreen ? (t.supportsFullScreen = !0, t.getFullScreenElement = function() {
			return document.fullscreenElement;
		}, t.requestFullScreen = function(t) {
			return t.requestFullscreen().catch(function(t) {
				e.console.error("Fullscreen request failed: ", t);
			});
		}, t.exitFullScreen = function() {
			document.exitFullscreen().catch(function(t) {
				e.console.error("Error while exiting fullscreen: ", t);
			});
		}, t.fullScreenEventName = "fullscreenchange", t.fullScreenErrorEventName = "fullscreenerror") : document.msExitFullscreen ? (t.supportsFullScreen = !0, t.getFullScreenElement = function() {
			return document.msFullscreenElement;
		}, t.requestFullScreen = function(e) {
			return e.msRequestFullscreen();
		}, t.exitFullScreen = function() {
			document.msExitFullscreen();
		}, t.fullScreenEventName = "MSFullscreenChange", t.fullScreenErrorEventName = "MSFullscreenError") : document.webkitExitFullscreen ? (t.supportsFullScreen = !0, t.getFullScreenElement = function() {
			return document.webkitFullscreenElement;
		}, t.requestFullScreen = function(e) {
			return e.webkitRequestFullscreen();
		}, t.exitFullScreen = function() {
			document.webkitExitFullscreen();
		}, t.fullScreenEventName = "webkitfullscreenchange", t.fullScreenErrorEventName = "webkitfullscreenerror") : document.webkitCancelFullScreen ? (t.supportsFullScreen = !0, t.getFullScreenElement = function() {
			return document.webkitCurrentFullScreenElement;
		}, t.requestFullScreen = function(e) {
			return e.webkitRequestFullScreen();
		}, t.exitFullScreen = function() {
			document.webkitCancelFullScreen();
		}, t.fullScreenEventName = "webkitfullscreenchange", t.fullScreenErrorEventName = "webkitfullscreenerror") : document.mozCancelFullScreen && (t.supportsFullScreen = !0, t.getFullScreenElement = function() {
			return document.mozFullScreenElement;
		}, t.requestFullScreen = function(e) {
			return e.mozRequestFullScreen();
		}, t.exitFullScreen = function() {
			document.mozCancelFullScreen();
		}, t.fullScreenEventName = "mozfullscreenchange", t.fullScreenErrorEventName = "mozfullscreenerror"), t.isFullScreen = function() {
			return t.getFullScreenElement() !== null;
		}, t.cancelFullScreen = function() {
			e.console.error("cancelFullScreen is deprecated. Use exitFullScreen instead."), t.exitFullScreen();
		}, e.extend(e, t);
	})(n), (function(e) {
		e.EventSource = function() {
			this.events = {}, this._rejectedEventList = {};
		}, e.EventSource.prototype = {
			addOnceHandler: function(e, t, n, r, i) {
				var a = this;
				r ||= 1;
				var o = 0, s = function(n) {
					return o++, o === r && a.removeHandler(e, s), t(n);
				};
				return this.addHandler(e, s, n, i);
			},
			addHandler: function(t, n, r, i) {
				if (Object.prototype.hasOwnProperty.call(this._rejectedEventList, t)) return e.console.error(`Error adding handler for ${t}. ${this._rejectedEventList[t]}`), !1;
				var a = this.events[t];
				if (a || (this.events[t] = a = []), n && e.isFunction(n)) {
					var o = a.length, s = {
						handler: n,
						userData: r || null,
						priority: i || 0
					};
					for (a[o] = s; o > 0 && a[o - 1].priority < a[o].priority;) a[o] = a[o - 1], a[o - 1] = s, o--;
				}
				return !0;
			},
			removeHandler: function(t, n) {
				var r = this.events[t], i = [], a;
				if (r && e.isArray(r)) {
					for (a = 0; a < r.length; a++) r[a].handler !== n && i.push(r[a]);
					this.events[t] = i;
				}
			},
			numberOfHandlers: function(e) {
				var t = this.events[e];
				return t ? t.length : 0;
			},
			removeAllHandlers: function(e) {
				if (e) this.events[e] = [];
				else for (var t in this.events) this.events[t] = [];
			},
			getHandler: function(e) {
				var t = this.events[e];
				return !t || !t.length ? null : (t = t.length === 1 ? [t[0]] : Array.apply(null, t), function(e, n) {
					var r, i = t.length;
					for (r = 0; r < i; r++) t[r] && (n.eventSource = e, n.userData = t[r].userData, t[r].handler(n));
				});
			},
			raiseEvent: function(t, n) {
				if (Object.prototype.hasOwnProperty.call(this._rejectedEventList, t)) return e.console.error(`Error adding handler for ${t}. ${this._rejectedEventList[t]}`), !1;
				var r = this.getHandler(t);
				return r && r(this, n || {}), !0;
			},
			rejectEventHandler(e, t = "") {
				this._rejectedEventList[e] = t;
			},
			allowEventHandler(e) {
				delete this._rejectedEventList[e];
			}
		};
	})(n), (function(e) {
		var t = [], n = {};
		e.MouseTracker = function(r) {
			t.push(this);
			var i = arguments;
			e.isPlainObject(r) || (r = {
				element: i[0],
				clickTimeThreshold: i[1],
				clickDistThreshold: i[2]
			}), this.hash = Math.random(), this.element = e.getElement(r.element), this.clickTimeThreshold = r.clickTimeThreshold || e.DEFAULT_SETTINGS.clickTimeThreshold, this.clickDistThreshold = r.clickDistThreshold || e.DEFAULT_SETTINGS.clickDistThreshold, this.dblClickTimeThreshold = r.dblClickTimeThreshold || e.DEFAULT_SETTINGS.dblClickTimeThreshold, this.dblClickDistThreshold = r.dblClickDistThreshold || e.DEFAULT_SETTINGS.dblClickDistThreshold, this.userData = r.userData || null, this.stopDelay = r.stopDelay || 50, this.preProcessEventHandler = r.preProcessEventHandler || null, this.contextMenuHandler = r.contextMenuHandler || null, this.enterHandler = r.enterHandler || null, this.leaveHandler = r.leaveHandler || null, this.exitHandler = r.exitHandler || null, this.overHandler = r.overHandler || null, this.outHandler = r.outHandler || null, this.pressHandler = r.pressHandler || null, this.nonPrimaryPressHandler = r.nonPrimaryPressHandler || null, this.releaseHandler = r.releaseHandler || null, this.nonPrimaryReleaseHandler = r.nonPrimaryReleaseHandler || null, this.moveHandler = r.moveHandler || null, this.scrollHandler = r.scrollHandler || null, this.clickHandler = r.clickHandler || null, this.dblClickHandler = r.dblClickHandler || null, this.dragHandler = r.dragHandler || null, this.dragEndHandler = r.dragEndHandler || null, this.pinchHandler = r.pinchHandler || null, this.stopHandler = r.stopHandler || null, this.keyDownHandler = r.keyDownHandler || null, this.keyUpHandler = r.keyUpHandler || null, this.keyHandler = r.keyHandler || null, this.focusHandler = r.focusHandler || null, this.blurHandler = r.blurHandler || null;
			var a = this;
			n[this.hash] = {
				click: function(e) {
					v(a, e);
				},
				dblclick: function(e) {
					y(a, e);
				},
				keydown: function(e) {
					b(a, e);
				},
				keyup: function(e) {
					x(a, e);
				},
				keypress: function(e) {
					S(a, e);
				},
				focus: function(e) {
					C(a, e);
				},
				blur: function(e) {
					w(a, e);
				},
				contextmenu: function(e) {
					T(a, e);
				},
				wheel: function(e) {
					E(a, e);
				},
				mousewheel: function(e) {
					ee(a, e);
				},
				DOMMouseScroll: function(e) {
					ee(a, e);
				},
				MozMousePixelScroll: function(e) {
					ee(a, e);
				},
				losecapture: function(e) {
					te(a, e);
				},
				mouseenter: function(e) {
					k(a, e);
				},
				mouseleave: function(e) {
					le(a, e);
				},
				mouseover: function(e) {
					ue(a, e);
				},
				mouseout: function(e) {
					de(a, e);
				},
				mousedown: function(e) {
					fe(a, e);
				},
				mouseup: function(e) {
					pe(a, e);
				},
				mousemove: function(e) {
					ge(a, e);
				},
				touchstart: function(e) {
					ne(a, e);
				},
				touchend: function(e) {
					re(a, e);
				},
				touchmove: function(e) {
					ie(a, e);
				},
				touchcancel: function(e) {
					ae(a, e);
				},
				gesturestart: function(e) {
					oe(a, e);
				},
				gesturechange: function(e) {
					se(a, e);
				},
				gotpointercapture: function(e) {
					O(a, e);
				},
				lostpointercapture: function(e) {
					ce(a, e);
				},
				pointerenter: function(e) {
					k(a, e);
				},
				pointerleave: function(e) {
					le(a, e);
				},
				pointerover: function(e) {
					ue(a, e);
				},
				pointerout: function(e) {
					de(a, e);
				},
				pointerdown: function(e) {
					fe(a, e);
				},
				pointerup: function(e) {
					pe(a, e);
				},
				pointermove: function(e) {
					ge(a, e);
				},
				pointercancel: function(e) {
					ye(a, e);
				},
				pointerupcaptured: function(e) {
					me(a, e);
				},
				pointermovecaptured: function(e) {
					_e(a, e);
				},
				tracking: !1,
				activePointersLists: [],
				lastClickPos: null,
				dblClickTimeOut: null,
				pinchGPoints: [],
				lastPinchDist: 0,
				currentPinchDist: 0,
				lastPinchCenter: null,
				currentPinchCenter: null,
				sentDragEvent: !1
			}, this.hasGestureHandlers = !!(this.pressHandler || this.nonPrimaryPressHandler || this.releaseHandler || this.nonPrimaryReleaseHandler || this.clickHandler || this.dblClickHandler || this.dragHandler || this.dragEndHandler || this.pinchHandler), this.hasScrollHandler = !!this.scrollHandler, e.MouseTracker.havePointerEvents && e.setElementPointerEvents(this.element, "auto"), this.exitHandler && e.console.error("MouseTracker.exitHandler is deprecated. Use MouseTracker.leaveHandler instead."), r.startDisabled || this.setTracking(!0);
		}, e.MouseTracker.prototype = {
			destroy: function() {
				var e;
				for (s(this), this.element = null, e = 0; e < t.length; e++) if (t[e] === this) {
					t.splice(e, 1);
					break;
				}
				n[this.hash] = null, delete n[this.hash];
			},
			isTracking: function() {
				return n[this.hash].tracking;
			},
			setTracking: function(e) {
				return e ? o(this) : s(this), this;
			},
			getActivePointersListByType: function(t) {
				var r = n[this.hash], i, a = r ? r.activePointersLists.length : 0, o;
				for (i = 0; i < a; i++) if (r.activePointersLists[i].type === t) return r.activePointersLists[i];
				return o = new e.MouseTracker.GesturePointList(t), r && r.activePointersLists.push(o), o;
			},
			getActivePointerCount: function() {
				var e = n[this.hash], t, r = e.activePointersLists.length, i = 0;
				for (t = 0; t < r; t++) i += e.activePointersLists[t].getLength();
				return i;
			},
			preProcessEventHandler: function() {},
			contextMenuHandler: function() {},
			enterHandler: function() {},
			leaveHandler: function() {},
			exitHandler: function() {},
			overHandler: function() {},
			outHandler: function() {},
			pressHandler: function() {},
			nonPrimaryPressHandler: function() {},
			releaseHandler: function() {},
			nonPrimaryReleaseHandler: function() {},
			moveHandler: function() {},
			scrollHandler: function() {},
			clickHandler: function() {},
			dblClickHandler: function() {},
			dragHandler: function() {},
			dragEndHandler: function() {},
			pinchHandler: function() {},
			stopHandler: function() {},
			keyDownHandler: function() {},
			keyUpHandler: function() {},
			keyHandler: function() {},
			focusHandler: function() {},
			blurHandler: function() {}
		};
		var r = (function() {
			try {
				return window.self !== window.top;
			} catch {
				return !0;
			}
		})();
		function i(e) {
			try {
				return e.addEventListener && e.removeEventListener;
			} catch {
				return !1;
			}
		}
		e.MouseTracker.gesturePointVelocityTracker = (function() {
			var t = [], n = 0, r = 0, i = function(e, t) {
				return e.hash.toString() + t.type + t.id.toString();
			}, a = function() {
				var n, i = t.length, a, o, s = e.now(), c = s - r, l, u;
				for (r = s, n = 0; n < i; n++) a = t[n], o = a.gPoint, o.direction = Math.atan2(o.currentPos.y - a.lastPos.y, o.currentPos.x - a.lastPos.x), l = a.lastPos.distanceTo(o.currentPos), a.lastPos = o.currentPos, u = 1e3 * l / (c + 1), o.speed = .75 * u + .25 * o.speed;
			};
			return {
				addPoint: function(o, s) {
					var c = i(o, s);
					t.push({
						guid: c,
						gPoint: s,
						lastPos: s.currentPos
					}), t.length === 1 && (r = e.now(), n = window.setInterval(a, 50));
				},
				removePoint: function(e, r) {
					var a = i(e, r), o, s = t.length;
					for (o = 0; o < s; o++) if (t[o].guid === a) {
						t.splice(o, 1), s--, s === 0 && window.clearInterval(n);
						break;
					}
				}
			};
		})(), e.MouseTracker.captureElement = document, e.MouseTracker.wheelEventName = "onwheel" in document.createElement("div") ? "wheel" : document.onmousewheel === void 0 ? "DOMMouseScroll" : "mousewheel", e.MouseTracker.subscribeEvents = [
			"click",
			"dblclick",
			"keydown",
			"keyup",
			"keypress",
			"focus",
			"blur",
			"contextmenu",
			e.MouseTracker.wheelEventName
		], e.MouseTracker.wheelEventName === "DOMMouseScroll" && e.MouseTracker.subscribeEvents.push("MozMousePixelScroll"), window.PointerEvent ? (e.MouseTracker.havePointerEvents = !0, e.MouseTracker.subscribeEvents.push("pointerenter", "pointerleave", "pointerover", "pointerout", "pointerdown", "pointerup", "pointermove", "pointercancel"), e.MouseTracker.havePointerCapture = function() {
			var t = document.createElement("div");
			return e.isFunction(t.setPointerCapture) && e.isFunction(t.releasePointerCapture);
		}(), e.MouseTracker.havePointerCapture && e.MouseTracker.subscribeEvents.push("gotpointercapture", "lostpointercapture")) : (e.MouseTracker.havePointerEvents = !1, e.MouseTracker.subscribeEvents.push("mouseenter", "mouseleave", "mouseover", "mouseout", "mousedown", "mouseup", "mousemove"), e.MouseTracker.mousePointerId = "legacy-mouse", e.MouseTracker.havePointerCapture = function() {
			var t = document.createElement("div");
			return e.isFunction(t.setCapture) && e.isFunction(t.releaseCapture);
		}(), e.MouseTracker.havePointerCapture && e.MouseTracker.subscribeEvents.push("losecapture"), "ontouchstart" in window && e.MouseTracker.subscribeEvents.push("touchstart", "touchend", "touchmove", "touchcancel"), "ongesturestart" in window && e.MouseTracker.subscribeEvents.push("gesturestart", "gesturechange")), e.MouseTracker.GesturePointList = function(e) {
			this._gPoints = [], this.type = e, this.buttons = 0, this.contacts = 0, this.clicks = 0, this.captureCount = 0;
		}, e.MouseTracker.GesturePointList.prototype = {
			getLength: function() {
				return this._gPoints.length;
			},
			asArray: function() {
				return this._gPoints;
			},
			add: function(e) {
				return this._gPoints.push(e);
			},
			removeById: function(e) {
				var t, n = this._gPoints.length;
				for (t = 0; t < n; t++) if (this._gPoints[t].id === e) {
					this._gPoints.splice(t, 1);
					break;
				}
				return this._gPoints.length;
			},
			getByIndex: function(e) {
				return e < this._gPoints.length ? this._gPoints[e] : null;
			},
			getById: function(e) {
				var t, n = this._gPoints.length;
				for (t = 0; t < n; t++) if (this._gPoints[t].id === e) return this._gPoints[t];
				return null;
			},
			getPrimary: function(e) {
				var t, n = this._gPoints.length;
				for (t = 0; t < n; t++) if (this._gPoints[t].isPrimary) return this._gPoints[t];
				return null;
			},
			addContact: function() {
				++this.contacts, this.contacts > 1 && (this.type === "mouse" || this.type === "pen") && (e.console.warn("GesturePointList.addContact() Implausible contacts value"), this.contacts = 1);
			},
			removeContact: function() {
				--this.contacts, this.contacts < 0 && (this.contacts = 0);
			}
		};
		function a(e) {
			var t = n[e.hash], r, i, a, o, s, c = t.activePointersLists.length;
			for (r = 0; r < c; r++) if (a = t.activePointersLists[r], a.getLength() > 0) {
				for (s = [], o = a.asArray(), i = 0; i < o.length; i++) s.push(o[i]);
				for (i = 0; i < s.length; i++) xe(e, a, s[i]);
			}
			for (r = 0; r < c; r++) t.activePointersLists.pop();
			t.sentDragEvent = !1;
		}
		function o(t) {
			var r = n[t.hash], i, o;
			if (!r.tracking) {
				for (o = 0; o < e.MouseTracker.subscribeEvents.length; o++) i = e.MouseTracker.subscribeEvents[o], e.addEvent(t.element, i, r[i], i === e.MouseTracker.wheelEventName && {
					passive: !1,
					capture: !1
				});
				a(t), r.tracking = !0;
			}
		}
		function s(t) {
			var r = n[t.hash], i, o;
			if (r.tracking) {
				for (o = 0; o < e.MouseTracker.subscribeEvents.length; o++) i = e.MouseTracker.subscribeEvents[o], e.removeEvent(t.element, i, r[i], !1);
				a(t), r.tracking = !1;
			}
		}
		function c(e, t) {
			var r = n[e.hash];
			if (t === "pointerevent" || t === "mouse") return {
				upName: "pointerup",
				upHandler: r.pointerupcaptured,
				moveName: "pointermove",
				moveHandler: r.pointermovecaptured
			};
			if (t === "touch") return {
				upName: "touchend",
				upHandler: r.touchendcaptured,
				moveName: "touchmove",
				moveHandler: r.touchmovecaptured
			};
			throw Error("MouseTracker.getCaptureEventParams: Unknown pointer type.");
		}
		function l(t, n) {
			var a;
			if (e.MouseTracker.havePointerCapture) {
				if (e.MouseTracker.havePointerEvents) try {
					t.element.setPointerCapture(n.id);
				} catch {
					e.console.warn("setPointerCapture() called on invalid pointer ID");
					return;
				}
				else t.element.setCapture(!0);
			} else a = c(t, e.MouseTracker.havePointerEvents ? "pointerevent" : n.type), r && i(window.top) && e.addEvent(window.top, a.upName, a.upHandler, !0), e.addEvent(e.MouseTracker.captureElement, a.upName, a.upHandler, !0), e.addEvent(e.MouseTracker.captureElement, a.moveName, a.moveHandler, !0);
			A(t, n, !0);
		}
		function u(t, n) {
			var a, o, s;
			if (e.MouseTracker.havePointerCapture) {
				if (e.MouseTracker.havePointerEvents) {
					if (o = t.getActivePointersListByType(n.type), s = o.getById(n.id), !s || !s.captured) return;
					try {
						t.element.releasePointerCapture(n.id);
					} catch {}
				} else t.element.releaseCapture();
			} else a = c(t, e.MouseTracker.havePointerEvents ? "pointerevent" : n.type), r && i(window.top) && e.removeEvent(window.top, a.upName, a.upHandler, !0), e.removeEvent(e.MouseTracker.captureElement, a.moveName, a.moveHandler, !0), e.removeEvent(e.MouseTracker.captureElement, a.upName, a.upHandler, !0);
			A(t, n, !1);
		}
		function d(t) {
			return e.MouseTracker.havePointerEvents ? t.pointerId : e.MouseTracker.mousePointerId;
		}
		function f(t) {
			return e.MouseTracker.havePointerEvents && t.pointerType ? t.pointerType : "mouse";
		}
		function p(t) {
			return !e.MouseTracker.havePointerEvents || t.isPrimary;
		}
		function m(t) {
			return e.getMousePosition(t);
		}
		function h(e, t) {
			return g(m(e), t);
		}
		function g(t, n) {
			var r = e.getElementOffset(n);
			return t.minus(r);
		}
		function _(t, n) {
			return new e.Point((t.x + n.x) / 2, (t.y + n.y) / 2);
		}
		function v(t, n) {
			var r = {
				originalEvent: n,
				eventType: "click",
				pointerType: "mouse",
				isEmulated: !1
			};
			Ce(t, r), r.preventDefault && !r.defaultPrevented && e.cancelEvent(n), r.stopPropagation && e.stopEvent(n);
		}
		function y(t, n) {
			var r = {
				originalEvent: n,
				eventType: "dblclick",
				pointerType: "mouse",
				isEmulated: !1
			};
			Ce(t, r), r.preventDefault && !r.defaultPrevented && e.cancelEvent(n), r.stopPropagation && e.stopEvent(n);
		}
		function b(t, n) {
			var r = null, i = {
				originalEvent: n,
				eventType: "keydown",
				pointerType: "",
				isEmulated: !1
			};
			Ce(t, i), t.keyDownHandler && !i.preventGesture && !i.defaultPrevented && (r = {
				eventSource: t,
				keyCode: n.keyCode ? n.keyCode : n.charCode,
				ctrl: n.ctrlKey,
				shift: n.shiftKey,
				alt: n.altKey,
				meta: n.metaKey,
				originalEvent: n,
				preventDefault: i.preventDefault || i.defaultPrevented,
				userData: t.userData
			}, t.keyDownHandler(r)), (r && r.preventDefault || i.preventDefault && !i.defaultPrevented) && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
		}
		function x(t, n) {
			var r = null, i = {
				originalEvent: n,
				eventType: "keyup",
				pointerType: "",
				isEmulated: !1
			};
			Ce(t, i), t.keyUpHandler && !i.preventGesture && !i.defaultPrevented && (r = {
				eventSource: t,
				keyCode: n.keyCode ? n.keyCode : n.charCode,
				ctrl: n.ctrlKey,
				shift: n.shiftKey,
				alt: n.altKey,
				meta: n.metaKey,
				originalEvent: n,
				preventDefault: i.preventDefault || i.defaultPrevented,
				userData: t.userData
			}, t.keyUpHandler(r)), (r && r.preventDefault || i.preventDefault && !i.defaultPrevented) && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
		}
		function S(t, n) {
			var r = null, i = {
				originalEvent: n,
				eventType: "keypress",
				pointerType: "",
				isEmulated: !1
			};
			Ce(t, i), t.keyHandler && !i.preventGesture && !i.defaultPrevented && (r = {
				eventSource: t,
				keyCode: n.keyCode ? n.keyCode : n.charCode,
				ctrl: n.ctrlKey,
				shift: n.shiftKey,
				alt: n.altKey,
				meta: n.metaKey,
				originalEvent: n,
				preventDefault: i.preventDefault || i.defaultPrevented,
				userData: t.userData
			}, t.keyHandler(r)), (r && r.preventDefault || i.preventDefault && !i.defaultPrevented) && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
		}
		function C(e, t) {
			var n = {
				originalEvent: t,
				eventType: "focus",
				pointerType: "",
				isEmulated: !1
			};
			Ce(e, n), e.focusHandler && !n.preventGesture && e.focusHandler({
				eventSource: e,
				originalEvent: t,
				userData: e.userData
			});
		}
		function w(e, t) {
			var n = {
				originalEvent: t,
				eventType: "blur",
				pointerType: "",
				isEmulated: !1
			};
			Ce(e, n), e.blurHandler && !n.preventGesture && e.blurHandler({
				eventSource: e,
				originalEvent: t,
				userData: e.userData
			});
		}
		function T(t, n) {
			var r = null, i = {
				originalEvent: n,
				eventType: "contextmenu",
				pointerType: "mouse",
				isEmulated: !1
			};
			Ce(t, i), t.contextMenuHandler && !i.preventGesture && !i.defaultPrevented && (r = {
				eventSource: t,
				position: g(m(n), t.element),
				originalEvent: i.originalEvent,
				preventDefault: i.preventDefault || i.defaultPrevented,
				userData: t.userData
			}, t.contextMenuHandler(r)), (r && r.preventDefault || i.preventDefault && !i.defaultPrevented) && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
		}
		function E(e, t) {
			D(e, t, t);
		}
		function ee(t, n) {
			var r = {
				target: n.target || n.srcElement,
				type: "wheel",
				shiftKey: n.shiftKey || !1,
				clientX: n.clientX,
				clientY: n.clientY,
				pageX: n.pageX ? n.pageX : n.clientX,
				pageY: n.pageY ? n.pageY : n.clientY,
				deltaMode: n.type === "MozMousePixelScroll" ? 0 : 1,
				deltaX: 0,
				deltaZ: 0
			};
			r.deltaY = e.MouseTracker.wheelEventName === "mousewheel" ? -n.wheelDelta / e.DEFAULT_SETTINGS.pixelsPerWheelLine : n.detail, D(t, r, n);
		}
		function D(t, n, r) {
			var i = 0, a, o = null;
			i = n.deltaY ? n.deltaY < 0 ? 1 : -1 : 0, a = {
				originalEvent: n,
				eventType: "wheel",
				pointerType: "mouse",
				isEmulated: n !== r
			}, Ce(t, a), t.scrollHandler && !a.preventGesture && !a.defaultPrevented && (o = {
				eventSource: t,
				pointerType: "mouse",
				position: h(n, t.element),
				scroll: i,
				shift: n.shiftKey,
				isTouchEvent: !1,
				originalEvent: r,
				preventDefault: a.preventDefault || a.defaultPrevented,
				userData: t.userData
			}, t.scrollHandler(o)), a.stopPropagation && e.stopEvent(r), (o && o.preventDefault || a.preventDefault && !a.defaultPrevented) && e.cancelEvent(r);
		}
		function te(t, n) {
			var r = {
				id: e.MouseTracker.mousePointerId,
				type: "mouse"
			}, i = {
				originalEvent: n,
				eventType: "lostpointercapture",
				pointerType: "mouse",
				isEmulated: !1
			};
			Ce(t, i), n.target === t.element && A(t, r, !1), i.stopPropagation && e.stopEvent(n);
		}
		function ne(t, n) {
			var r, i, a = n.changedTouches.length, o, s = t.getActivePointersListByType("touch");
			r = e.now(), s.getLength() > n.touches.length - a && e.console.warn("Tracked touch contact count doesn't match event.touches.length");
			var c = {
				originalEvent: n,
				eventType: "pointerdown",
				pointerType: "touch",
				isEmulated: !1
			};
			for (Ce(t, c), i = 0; i < a; i++) o = {
				id: n.changedTouches[i].identifier,
				type: "touch",
				isPrimary: s.getLength() === 0,
				currentPos: m(n.changedTouches[i]),
				currentTime: r
			}, we(t, c, o), Oe(t, c, o, 0), A(t, o, !0);
			c.preventDefault && !c.defaultPrevented && e.cancelEvent(n), c.stopPropagation && e.stopEvent(n);
		}
		function re(t, n) {
			var r, i, a = n.changedTouches.length, o;
			r = e.now();
			var s = {
				originalEvent: n,
				eventType: "pointerup",
				pointerType: "touch",
				isEmulated: !1
			};
			for (Ce(t, s), i = 0; i < a; i++) o = {
				id: n.changedTouches[i].identifier,
				type: "touch",
				currentPos: m(n.changedTouches[i]),
				currentTime: r
			}, ke(t, s, o, 0), A(t, o, !1), Te(t, s, o);
			s.preventDefault && !s.defaultPrevented && e.cancelEvent(n), s.stopPropagation && e.stopEvent(n);
		}
		function ie(t, n) {
			var r, i, a = n.changedTouches.length, o;
			r = e.now();
			var s = {
				originalEvent: n,
				eventType: "pointermove",
				pointerType: "touch",
				isEmulated: !1
			};
			for (Ce(t, s), i = 0; i < a; i++) o = {
				id: n.changedTouches[i].identifier,
				type: "touch",
				currentPos: m(n.changedTouches[i]),
				currentTime: r
			}, Ae(t, s, o);
			s.preventDefault && !s.defaultPrevented && e.cancelEvent(n), s.stopPropagation && e.stopEvent(n);
		}
		function ae(t, n) {
			var r = n.changedTouches.length, i, a, o = {
				originalEvent: n,
				eventType: "pointercancel",
				pointerType: "touch",
				isEmulated: !1
			};
			for (Ce(t, o), i = 0; i < r; i++) a = {
				id: n.changedTouches[i].identifier,
				type: "touch"
			}, je(t, o, a);
			o.stopPropagation && e.stopEvent(n);
		}
		function oe(t, n) {
			return e.eventIsCanceled(n) || n.preventDefault(), !1;
		}
		function se(t, n) {
			return e.eventIsCanceled(n) || n.preventDefault(), !1;
		}
		function O(t, n) {
			var r = {
				originalEvent: n,
				eventType: "gotpointercapture",
				pointerType: f(n),
				isEmulated: !1
			};
			Ce(t, r), n.target === t.element && A(t, {
				id: n.pointerId,
				type: f(n)
			}, !0), r.stopPropagation && e.stopEvent(n);
		}
		function ce(t, n) {
			var r = {
				originalEvent: n,
				eventType: "lostpointercapture",
				pointerType: f(n),
				isEmulated: !1
			};
			Ce(t, r), n.target === t.element && A(t, {
				id: n.pointerId,
				type: f(n)
			}, !1), r.stopPropagation && e.stopEvent(n);
		}
		function k(t, n) {
			var r = {
				id: d(n),
				type: f(n),
				isPrimary: p(n),
				currentPos: m(n),
				currentTime: e.now()
			}, i = {
				originalEvent: n,
				eventType: "pointerenter",
				pointerType: r.type,
				isEmulated: !1
			};
			Ce(t, i), we(t, i, r);
		}
		function le(t, n) {
			var r = {
				id: d(n),
				type: f(n),
				isPrimary: p(n),
				currentPos: m(n),
				currentTime: e.now()
			}, i = {
				originalEvent: n,
				eventType: "pointerleave",
				pointerType: r.type,
				isEmulated: !1
			};
			Ce(t, i), Te(t, i, r);
		}
		function ue(t, n) {
			var r = {
				id: d(n),
				type: f(n),
				isPrimary: p(n),
				currentPos: m(n),
				currentTime: e.now()
			}, i = {
				originalEvent: n,
				eventType: "pointerover",
				pointerType: r.type,
				isEmulated: !1
			};
			Ce(t, i), Ee(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
		}
		function de(t, n) {
			var r = {
				id: d(n),
				type: f(n),
				isPrimary: p(n),
				currentPos: m(n),
				currentTime: e.now()
			}, i = {
				originalEvent: n,
				eventType: "pointerout",
				pointerType: r.type,
				isEmulated: !1
			};
			Ce(t, i), De(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
		}
		function fe(t, n) {
			var r = {
				id: d(n),
				type: f(n),
				isPrimary: p(n),
				currentPos: m(n),
				currentTime: e.now()
			}, i = e.MouseTracker.havePointerEvents && r.type === "touch", a = {
				originalEvent: n,
				eventType: "pointerdown",
				pointerType: r.type,
				isEmulated: !1
			};
			Ce(t, a), Oe(t, a, r, n.button), a.preventDefault && !a.defaultPrevented && e.cancelEvent(n), a.stopPropagation && e.stopEvent(n), a.shouldCapture && (i ? A(t, r, !0) : l(t, r));
		}
		function pe(e, t) {
			he(e, t);
		}
		function me(t, n) {
			t.getActivePointersListByType(f(n)).getById(n.pointerId) && he(t, n), e.stopEvent(n);
		}
		function he(t, n) {
			var r = {
				id: d(n),
				type: f(n),
				isPrimary: p(n),
				currentPos: m(n),
				currentTime: e.now()
			}, i = {
				originalEvent: n,
				eventType: "pointerup",
				pointerType: r.type,
				isEmulated: !1
			};
			Ce(t, i), ke(t, i, r, n.button), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n), i.shouldReleaseCapture && (n.target === t.element ? u(t, r) : A(t, r, !1));
		}
		function ge(e, t) {
			ve(e, t);
		}
		function _e(t, n) {
			t.getActivePointersListByType(f(n)).getById(n.pointerId) && ve(t, n), e.stopEvent(n);
		}
		function ve(t, n) {
			var r = {
				id: d(n),
				type: f(n),
				isPrimary: p(n),
				currentPos: m(n),
				currentTime: e.now()
			}, i = {
				originalEvent: n,
				eventType: "pointermove",
				pointerType: r.type,
				isEmulated: !1
			};
			Ce(t, i), Ae(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
		}
		function ye(t, n) {
			var r = {
				id: n.pointerId,
				type: f(n)
			}, i = {
				originalEvent: n,
				eventType: "pointercancel",
				pointerType: r.type,
				isEmulated: !1
			};
			Ce(t, i), je(t, i, r), i.stopPropagation && e.stopEvent(n);
		}
		function be(e, t) {
			return t.speed = 0, t.direction = 0, t.contactPos = t.currentPos, t.contactTime = t.currentTime, t.lastPos = t.currentPos, t.lastTime = t.currentTime, e.add(t);
		}
		function xe(t, n, r) {
			var i, a = n.getById(r.id);
			return a ? (a.captured && (e.console.warn("stopTrackingPointer() called on captured pointer"), u(t, a)), n.removeContact(), i = n.removeById(r.id)) : i = n.getLength(), i;
		}
		function Se(e, t) {
			switch (t.eventType) {
				case "pointermove":
					t.isStoppable = !0, t.isCancelable = !0, t.preventDefault = !1, t.preventGesture = !e.hasGestureHandlers, t.stopPropagation = !1;
					break;
				case "pointerover":
				case "pointerout":
				case "contextmenu":
				case "keydown":
				case "keyup":
				case "keypress":
					t.isStoppable = !0, t.isCancelable = !0, t.preventDefault = !1, t.preventGesture = !1, t.stopPropagation = !1;
					break;
				case "pointerdown":
					t.isStoppable = !0, t.isCancelable = !0, t.preventDefault = !1, t.preventGesture = !e.hasGestureHandlers, t.stopPropagation = !1;
					break;
				case "pointerup":
					t.isStoppable = !0, t.isCancelable = !0, t.preventDefault = !1, t.preventGesture = !e.hasGestureHandlers, t.stopPropagation = !1;
					break;
				case "wheel":
					t.isStoppable = !0, t.isCancelable = !0, t.preventDefault = !1, t.preventGesture = !e.hasScrollHandler, t.stopPropagation = !1;
					break;
				case "gotpointercapture":
				case "lostpointercapture":
				case "pointercancel":
					t.isStoppable = !0, t.isCancelable = !1, t.preventDefault = !1, t.preventGesture = !1, t.stopPropagation = !1;
					break;
				case "click":
					t.isStoppable = !0, t.isCancelable = !0, t.preventDefault = !!e.clickHandler, t.preventGesture = !1, t.stopPropagation = !1;
					break;
				case "dblclick":
					t.isStoppable = !0, t.isCancelable = !0, t.preventDefault = !!e.dblClickHandler, t.preventGesture = !1, t.stopPropagation = !1;
					break;
				default: t.isStoppable = !1, t.isCancelable = !1, t.preventDefault = !1, t.preventGesture = !1, t.stopPropagation = !1;
			}
		}
		function Ce(t, n) {
			n.eventSource = t, n.eventPhase = n.originalEvent ? n.originalEvent.eventPhase === void 0 ? 0 : n.originalEvent.eventPhase : 0, n.defaultPrevented = e.eventIsCanceled(n.originalEvent), n.shouldCapture = !1, n.shouldReleaseCapture = !1, n.userData = t.userData, Se(t, n), t.preProcessEventHandler && t.preProcessEventHandler(n);
		}
		function A(t, n, r) {
			var i = t.getActivePointersListByType(n.type), a = i.getById(n.id);
			a ? r && !a.captured ? (a.captured = !0, i.captureCount++) : !r && a.captured && (a.captured = !1, i.captureCount--, i.captureCount < 0 && (i.captureCount = 0, e.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))) : e.console.warn("updatePointerCaptured() called on untracked pointer");
		}
		function we(e, t, n) {
			var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
			i ? (i.insideElement = !0, i.lastPos = i.currentPos, i.lastTime = i.currentTime, i.currentPos = n.currentPos, i.currentTime = n.currentTime, n = i) : (n.captured = !1, n.insideElementPressed = !1, n.insideElement = !0, be(r, n)), e.enterHandler && e.enterHandler({
				eventSource: e,
				pointerType: n.type,
				position: g(n.currentPos, e.element),
				buttons: r.buttons,
				pointers: e.getActivePointerCount(),
				insideElementPressed: n.insideElementPressed,
				buttonDownAny: r.buttons !== 0,
				isTouchEvent: n.type === "touch",
				originalEvent: t.originalEvent,
				userData: e.userData
			});
		}
		function Te(e, t, n) {
			var r = e.getActivePointersListByType(n.type), i = r.getById(n.id), a;
			i ? (i.captured ? (i.insideElement = !1, i.lastPos = i.currentPos, i.lastTime = i.currentTime, i.currentPos = n.currentPos, i.currentTime = n.currentTime) : xe(e, r, i), n = i) : (n.captured = !1, n.insideElementPressed = !1), (e.leaveHandler || e.exitHandler) && (a = {
				eventSource: e,
				pointerType: n.type,
				position: n.currentPos && g(n.currentPos, e.element),
				buttons: r.buttons,
				pointers: e.getActivePointerCount(),
				insideElementPressed: n.insideElementPressed,
				buttonDownAny: r.buttons !== 0,
				isTouchEvent: n.type === "touch",
				originalEvent: t.originalEvent,
				userData: e.userData
			}, e.leaveHandler && e.leaveHandler(a), e.exitHandler && e.exitHandler(a));
		}
		function Ee(e, t, n) {
			var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
			i ? n = i : (n.captured = !1, n.insideElementPressed = !1), e.overHandler && e.overHandler({
				eventSource: e,
				pointerType: n.type,
				position: g(n.currentPos, e.element),
				buttons: r.buttons,
				pointers: e.getActivePointerCount(),
				insideElementPressed: n.insideElementPressed,
				buttonDownAny: r.buttons !== 0,
				isTouchEvent: n.type === "touch",
				originalEvent: t.originalEvent,
				userData: e.userData
			});
		}
		function De(e, t, n) {
			var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
			i ? n = i : (n.captured = !1, n.insideElementPressed = !1), e.outHandler && e.outHandler({
				eventSource: e,
				pointerType: n.type,
				position: n.currentPos && g(n.currentPos, e.element),
				buttons: r.buttons,
				pointers: e.getActivePointerCount(),
				insideElementPressed: n.insideElementPressed,
				buttonDownAny: r.buttons !== 0,
				isTouchEvent: n.type === "touch",
				originalEvent: t.originalEvent,
				userData: e.userData
			});
		}
		function Oe(t, r, i, a) {
			var o = n[t.hash], s = t.getActivePointersListByType(i.type), c;
			if (r.originalEvent.buttons === void 0 ? a === 0 ? s.buttons |= 1 : a === 1 ? s.buttons |= 4 : a === 2 ? s.buttons |= 2 : a === 3 ? s.buttons |= 8 : a === 4 ? s.buttons |= 16 : a === 5 && (s.buttons |= 32) : s.buttons = r.originalEvent.buttons, a !== 0) {
				r.shouldCapture = !1, r.shouldReleaseCapture = !1, t.nonPrimaryPressHandler && !r.preventGesture && !r.defaultPrevented && (r.preventDefault = !0, t.nonPrimaryPressHandler({
					eventSource: t,
					pointerType: i.type,
					position: g(i.currentPos, t.element),
					button: a,
					buttons: s.buttons,
					isTouchEvent: i.type === "touch",
					originalEvent: r.originalEvent,
					userData: t.userData
				}));
				return;
			}
			c = s.getById(i.id), c ? (c.insideElementPressed = !0, c.insideElement = !0, c.originalTarget = r.originalEvent.target, c.contactPos = i.currentPos, c.contactTime = i.currentTime, c.lastPos = c.currentPos, c.lastTime = c.currentTime, c.currentPos = i.currentPos, c.currentTime = i.currentTime, i = c) : (i.captured = !1, i.insideElementPressed = !0, i.insideElement = !0, i.originalTarget = r.originalEvent.target, be(s, i)), s.addContact(), !r.preventGesture && !r.defaultPrevented ? (r.shouldCapture = !0, r.shouldReleaseCapture = !1, r.preventDefault = !0, (t.dragHandler || t.dragEndHandler || t.pinchHandler) && e.MouseTracker.gesturePointVelocityTracker.addPoint(t, i), s.contacts === 1 ? t.pressHandler && !r.preventGesture && t.pressHandler({
				eventSource: t,
				pointerType: i.type,
				position: g(i.contactPos, t.element),
				buttons: s.buttons,
				isTouchEvent: i.type === "touch",
				originalEvent: r.originalEvent,
				userData: t.userData
			}) : s.contacts === 2 && t.pinchHandler && i.type === "touch" && (o.pinchGPoints = s.asArray(), o.lastPinchDist = o.currentPinchDist = o.pinchGPoints[0].currentPos.distanceTo(o.pinchGPoints[1].currentPos), o.lastPinchCenter = o.currentPinchCenter = _(o.pinchGPoints[0].currentPos, o.pinchGPoints[1].currentPos))) : (r.shouldCapture = !1, r.shouldReleaseCapture = !1);
		}
		function ke(t, r, i, a) {
			var o = n[t.hash], s = t.getActivePointersListByType(i.type), c, l, u, d = !1, f;
			if (r.originalEvent.buttons === void 0 ? a === 0 ? s.buttons ^= -2 : a === 1 ? s.buttons ^= -5 : a === 2 ? s.buttons ^= -3 : a === 3 ? s.buttons ^= -9 : a === 4 ? s.buttons ^= -17 : a === 5 && (s.buttons ^= -33) : s.buttons = r.originalEvent.buttons, r.shouldCapture = !1, a !== 0) {
				r.shouldReleaseCapture = !1, t.nonPrimaryReleaseHandler && !r.preventGesture && !r.defaultPrevented && (r.preventDefault = !0, t.nonPrimaryReleaseHandler({
					eventSource: t,
					pointerType: i.type,
					position: g(i.currentPos, t.element),
					button: a,
					buttons: s.buttons,
					isTouchEvent: i.type === "touch",
					originalEvent: r.originalEvent,
					userData: t.userData
				}));
				return;
			}
			u = s.getById(i.id), u ? (s.removeContact(), u.captured && (d = !0), u.lastPos = u.currentPos, u.lastTime = u.currentTime, u.currentPos = i.currentPos, u.currentTime = i.currentTime, u.insideElement || xe(t, s, u), c = u.currentPos, l = u.currentTime) : (i.captured = !1, i.insideElementPressed = !1, i.insideElement = !0, be(s, i), u = i), !r.preventGesture && !r.defaultPrevented && (d ? (r.shouldReleaseCapture = !0, r.preventDefault = !0, (t.dragHandler || t.dragEndHandler || t.pinchHandler) && e.MouseTracker.gesturePointVelocityTracker.removePoint(t, u), s.contacts === 0 ? (t.releaseHandler && c && t.releaseHandler({
				eventSource: t,
				pointerType: u.type,
				position: g(c, t.element),
				buttons: s.buttons,
				insideElementPressed: u.insideElementPressed,
				insideElementReleased: u.insideElement,
				isTouchEvent: u.type === "touch",
				originalEvent: r.originalEvent,
				userData: t.userData
			}), t.dragEndHandler && o.sentDragEvent && t.dragEndHandler({
				eventSource: t,
				pointerType: u.type,
				position: g(u.currentPos, t.element),
				speed: u.speed,
				direction: u.direction,
				shift: r.originalEvent.shiftKey,
				isTouchEvent: u.type === "touch",
				originalEvent: r.originalEvent,
				userData: t.userData
			}), o.sentDragEvent = !1, (t.clickHandler || t.dblClickHandler) && u.insideElement && (f = l - u.contactTime <= t.clickTimeThreshold && u.contactPos.distanceTo(c) <= t.clickDistThreshold, t.clickHandler && t.clickHandler({
				eventSource: t,
				pointerType: u.type,
				position: g(u.currentPos, t.element),
				quick: f,
				shift: r.originalEvent.shiftKey,
				isTouchEvent: u.type === "touch",
				originalEvent: r.originalEvent,
				originalTarget: u.originalTarget,
				userData: t.userData
			}), t.dblClickHandler && f && (s.clicks++, s.clicks === 1 ? (o.lastClickPos = c, o.dblClickTimeOut = setTimeout(function() {
				s.clicks = 0;
			}, t.dblClickTimeThreshold)) : s.clicks === 2 && (clearTimeout(o.dblClickTimeOut), s.clicks = 0, o.lastClickPos.distanceTo(c) <= t.dblClickDistThreshold && t.dblClickHandler({
				eventSource: t,
				pointerType: u.type,
				position: g(u.currentPos, t.element),
				shift: r.originalEvent.shiftKey,
				isTouchEvent: u.type === "touch",
				originalEvent: r.originalEvent,
				userData: t.userData
			}), o.lastClickPos = null)))) : s.contacts === 2 && t.pinchHandler && u.type === "touch" && (o.pinchGPoints = s.asArray(), o.lastPinchDist = o.currentPinchDist = o.pinchGPoints[0].currentPos.distanceTo(o.pinchGPoints[1].currentPos), o.lastPinchCenter = o.currentPinchCenter = _(o.pinchGPoints[0].currentPos, o.pinchGPoints[1].currentPos))) : (r.shouldReleaseCapture = !1, t.releaseHandler && c && (t.releaseHandler({
				eventSource: t,
				pointerType: u.type,
				position: g(c, t.element),
				buttons: s.buttons,
				insideElementPressed: u.insideElementPressed,
				insideElementReleased: u.insideElement,
				isTouchEvent: u.type === "touch",
				originalEvent: r.originalEvent,
				userData: t.userData
			}), r.preventDefault = !0)));
		}
		function Ae(e, t, r) {
			var i = n[e.hash], a = e.getActivePointersListByType(r.type), o, s, c;
			if (t.originalEvent.buttons !== void 0 && (a.buttons = t.originalEvent.buttons), o = a.getById(r.id), o) o.lastPos = o.currentPos, o.lastTime = o.currentTime, o.currentPos = r.currentPos, o.currentTime = r.currentTime;
			else return;
			t.shouldCapture = !1, t.shouldReleaseCapture = !1, e.stopHandler && r.type === "mouse" && (clearTimeout(e.stopTimeOut), e.stopTimeOut = setTimeout(function() {
				Me(e, t.originalEvent, r.type);
			}, e.stopDelay)), a.contacts === 0 ? e.moveHandler && e.moveHandler({
				eventSource: e,
				pointerType: r.type,
				position: g(r.currentPos, e.element),
				buttons: a.buttons,
				isTouchEvent: r.type === "touch",
				originalEvent: t.originalEvent,
				userData: e.userData
			}) : a.contacts === 1 ? (e.moveHandler && (o = a.asArray()[0], e.moveHandler({
				eventSource: e,
				pointerType: o.type,
				position: g(o.currentPos, e.element),
				buttons: a.buttons,
				isTouchEvent: o.type === "touch",
				originalEvent: t.originalEvent,
				userData: e.userData
			})), e.dragHandler && !t.preventGesture && !t.defaultPrevented && (o = a.asArray()[0], c = o.currentPos.minus(o.lastPos), e.dragHandler({
				eventSource: e,
				pointerType: o.type,
				position: g(o.currentPos, e.element),
				buttons: a.buttons,
				delta: c,
				speed: o.speed,
				direction: o.direction,
				shift: t.originalEvent.shiftKey,
				isTouchEvent: o.type === "touch",
				originalEvent: t.originalEvent,
				userData: e.userData
			}), t.preventDefault = !0, i.sentDragEvent = !0)) : a.contacts === 2 && (e.moveHandler && (s = a.asArray(), e.moveHandler({
				eventSource: e,
				pointerType: s[0].type,
				position: g(_(s[0].currentPos, s[1].currentPos), e.element),
				buttons: a.buttons,
				isTouchEvent: s[0].type === "touch",
				originalEvent: t.originalEvent,
				userData: e.userData
			})), e.pinchHandler && r.type === "touch" && !t.preventGesture && !t.defaultPrevented && (c = i.pinchGPoints[0].currentPos.distanceTo(i.pinchGPoints[1].currentPos), c !== i.currentPinchDist && (i.lastPinchDist = i.currentPinchDist, i.currentPinchDist = c, i.lastPinchCenter = i.currentPinchCenter, i.currentPinchCenter = _(i.pinchGPoints[0].currentPos, i.pinchGPoints[1].currentPos), e.pinchHandler({
				eventSource: e,
				pointerType: "touch",
				gesturePoints: i.pinchGPoints,
				lastCenter: g(i.lastPinchCenter, e.element),
				center: g(i.currentPinchCenter, e.element),
				lastDistance: i.lastPinchDist,
				distance: i.currentPinchDist,
				shift: t.originalEvent.shiftKey,
				originalEvent: t.originalEvent,
				userData: e.userData
			}), t.preventDefault = !0)));
		}
		function je(e, t, n) {
			var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
			i && xe(e, r, i);
		}
		function Me(e, t, n) {
			e.stopHandler && e.stopHandler({
				eventSource: e,
				pointerType: n,
				position: h(t, e.element),
				buttons: e.getActivePointersListByType(n).buttons,
				isTouchEvent: n === "touch",
				originalEvent: t,
				userData: e.userData
			});
		}
	})(n), (function(e) {
		e.ControlAnchor = {
			NONE: 0,
			TOP_LEFT: 1,
			TOP_RIGHT: 2,
			BOTTOM_RIGHT: 3,
			BOTTOM_LEFT: 4,
			ABSOLUTE: 5
		}, e.Control = function(t, n, r) {
			var i = t.parentNode;
			typeof n == "number" && (e.console.error("Passing an anchor directly into the OpenSeadragon.Control constructor is deprecated; please use an options object instead.  Support for this deprecated variant is scheduled for removal in December 2013"), n = { anchor: n }), n.attachToViewer = n.attachToViewer === void 0 || n.attachToViewer, this.autoFade = n.autoFade === void 0 || n.autoFade, this.element = t, this.anchor = n.anchor, this.container = r, this.anchor === e.ControlAnchor.ABSOLUTE ? (this.wrapper = e.makeNeutralElement("div"), this.wrapper.style.position = "absolute", this.wrapper.style.top = typeof n.top == "number" ? n.top + "px" : n.top, this.wrapper.style.left = typeof n.left == "number" ? n.left + "px" : n.left, this.wrapper.style.height = typeof n.height == "number" ? n.height + "px" : n.height, this.wrapper.style.width = typeof n.width == "number" ? n.width + "px" : n.width, this.wrapper.style.margin = "0px", this.wrapper.style.padding = "0px", this.element.style.position = "relative", this.element.style.top = "0px", this.element.style.left = "0px", this.element.style.height = "100%", this.element.style.width = "100%") : (this.wrapper = e.makeNeutralElement("div"), this.wrapper.style.display = "inline-block", this.anchor === e.ControlAnchor.NONE && (this.wrapper.style.width = this.wrapper.style.height = "100%")), this.wrapper.appendChild(this.element), n.attachToViewer ? this.anchor === e.ControlAnchor.TOP_RIGHT || this.anchor === e.ControlAnchor.BOTTOM_RIGHT ? this.container.insertBefore(this.wrapper, this.container.firstChild) : this.container.appendChild(this.wrapper) : i.appendChild(this.wrapper);
		}, e.Control.prototype = {
			destroy: function() {
				this.wrapper.removeChild(this.element), this.anchor !== e.ControlAnchor.NONE && this.container.removeChild(this.wrapper);
			},
			isVisible: function() {
				return this.wrapper.style.display !== "none";
			},
			setVisible: function(t) {
				this.wrapper.style.display = t ? this.anchor === e.ControlAnchor.ABSOLUTE ? "block" : "inline-block" : "none";
			},
			setOpacity: function(t) {
				e.setElementOpacity(this.wrapper, t, !0);
			}
		};
	})(n), (function(e) {
		e.ControlDock = function(t) {
			var n = [
				"topleft",
				"topright",
				"bottomright",
				"bottomleft"
			], r, i;
			for (e.extend(!0, this, {
				id: "controldock-" + e.now() + "-" + Math.floor(Math.random() * 1e6),
				container: e.makeNeutralElement("div"),
				controls: []
			}, t), this.container.onsubmit = function() {
				return !1;
			}, this.element && (this.element = e.getElement(this.element), this.element.appendChild(this.container), e.getElementStyle(this.element).position === "static" && (this.element.style.position = "relative"), this.container.style.width = "100%", this.container.style.height = "100%"), i = 0; i < n.length; i++) r = n[i], this.controls[r] = e.makeNeutralElement("div"), this.controls[r].style.position = "absolute", r.match("left") && (this.controls[r].style.left = "0px"), r.match("right") && (this.controls[r].style.right = "0px"), r.match("top") && (this.controls[r].style.top = "0px"), r.match("bottom") && (this.controls[r].style.bottom = "0px");
			this.container.appendChild(this.controls.topleft), this.container.appendChild(this.controls.topright), this.container.appendChild(this.controls.bottomright), this.container.appendChild(this.controls.bottomleft);
		}, e.ControlDock.prototype = {
			addControl: function(n, r) {
				n = e.getElement(n);
				var i = null;
				if (!(t(this, n) >= 0)) {
					switch (r.anchor) {
						case e.ControlAnchor.TOP_RIGHT:
							i = this.controls.topright, n.style.position = "relative", n.style.paddingRight = "0px", n.style.paddingTop = "0px";
							break;
						case e.ControlAnchor.BOTTOM_RIGHT:
							i = this.controls.bottomright, n.style.position = "relative", n.style.paddingRight = "0px", n.style.paddingBottom = "0px";
							break;
						case e.ControlAnchor.BOTTOM_LEFT:
							i = this.controls.bottomleft, n.style.position = "relative", n.style.paddingLeft = "0px", n.style.paddingBottom = "0px";
							break;
						case e.ControlAnchor.TOP_LEFT:
							i = this.controls.topleft, n.style.position = "relative", n.style.paddingLeft = "0px", n.style.paddingTop = "0px";
							break;
						case e.ControlAnchor.ABSOLUTE:
							i = this.container, n.style.margin = "0px", n.style.padding = "0px";
							break;
						default:
						case e.ControlAnchor.NONE: i = this.container, n.style.margin = "0px", n.style.padding = "0px";
					}
					this.controls.push(new e.Control(n, r, i)), n.style.display = "inline-block";
				}
			},
			removeControl: function(n) {
				n = e.getElement(n);
				var r = t(this, n);
				return r >= 0 && (this.controls[r].destroy(), this.controls.splice(r, 1)), this;
			},
			clearControls: function() {
				for (; this.controls.length > 0;) this.controls.pop().destroy();
				return this;
			},
			areControlsEnabled: function() {
				var e;
				for (e = this.controls.length - 1; e >= 0; e--) if (this.controls[e].isVisible()) return !0;
				return !1;
			},
			setControlsEnabled: function(e) {
				var t;
				for (t = this.controls.length - 1; t >= 0; t--) this.controls[t].setVisible(e);
				return this;
			}
		};
		function t(e, t) {
			var n = e.controls, r;
			for (r = n.length - 1; r >= 0; r--) if (n[r].element === t) return r;
			return -1;
		}
	})(n), (function(e) {
		e.Placement = e.freezeObject({
			CENTER: 0,
			TOP_LEFT: 1,
			TOP: 2,
			TOP_RIGHT: 3,
			RIGHT: 4,
			BOTTOM_RIGHT: 5,
			BOTTOM: 6,
			BOTTOM_LEFT: 7,
			LEFT: 8,
			properties: {
				0: {
					isLeft: !1,
					isHorizontallyCentered: !0,
					isRight: !1,
					isTop: !1,
					isVerticallyCentered: !0,
					isBottom: !1
				},
				1: {
					isLeft: !0,
					isHorizontallyCentered: !1,
					isRight: !1,
					isTop: !0,
					isVerticallyCentered: !1,
					isBottom: !1
				},
				2: {
					isLeft: !1,
					isHorizontallyCentered: !0,
					isRight: !1,
					isTop: !0,
					isVerticallyCentered: !1,
					isBottom: !1
				},
				3: {
					isLeft: !1,
					isHorizontallyCentered: !1,
					isRight: !0,
					isTop: !0,
					isVerticallyCentered: !1,
					isBottom: !1
				},
				4: {
					isLeft: !1,
					isHorizontallyCentered: !1,
					isRight: !0,
					isTop: !1,
					isVerticallyCentered: !0,
					isBottom: !1
				},
				5: {
					isLeft: !1,
					isHorizontallyCentered: !1,
					isRight: !0,
					isTop: !1,
					isVerticallyCentered: !1,
					isBottom: !0
				},
				6: {
					isLeft: !1,
					isHorizontallyCentered: !0,
					isRight: !1,
					isTop: !1,
					isVerticallyCentered: !1,
					isBottom: !0
				},
				7: {
					isLeft: !0,
					isHorizontallyCentered: !1,
					isRight: !1,
					isTop: !1,
					isVerticallyCentered: !1,
					isBottom: !0
				},
				8: {
					isLeft: !0,
					isHorizontallyCentered: !1,
					isRight: !1,
					isTop: !1,
					isVerticallyCentered: !0,
					isBottom: !1
				}
			}
		});
	})(n), (function(e) {
		var t = {}, r = 1;
		e.Viewer = function(n) {
			var a = arguments, o = this, s;
			if (e.isPlainObject(n) || (n = {
				id: a[0],
				xmlPath: a.length > 1 ? a[1] : void 0,
				prefixUrl: a.length > 2 ? a[2] : void 0,
				controls: a.length > 3 ? a[3] : void 0,
				overlays: a.length > 4 ? a[4] : void 0
			}), n.config && (e.extend(!0, n, n.config), delete n.config), n.drawerOptions = Object.assign({}, ["useCanvas"].reduce((e, t) => (e[t] = n[t], delete n[t], e), {}), n.drawerOptions), e.extend(!0, this, {
				id: n.id,
				hash: n.hash || r++,
				initialPage: 0,
				element: null,
				container: null,
				canvas: null,
				overlays: [],
				overlaysContainer: null,
				previousBody: [],
				customControls: [],
				source: null,
				drawer: null,
				world: null,
				viewport: null,
				navigator: null,
				collectionViewport: null,
				collectionDrawer: null,
				navImages: null,
				buttonGroup: null,
				profiler: null
			}, e.DEFAULT_SETTINGS, n), this.hash === void 0) throw Error("A hash must be defined, either by specifying options.id or options.hash.");
			t[this.hash] !== void 0 && e.console.warn("Hash " + this.hash + " has already been used."), t[this.hash] = {
				fsBoundsDelta: new e.Point(1, 1),
				prevContainerSize: null,
				animating: !1,
				forceRedraw: !1,
				needsResize: !1,
				forceResize: !1,
				mouseInside: !1,
				group: null,
				zooming: !1,
				zoomFactor: null,
				lastZoomTime: null,
				fullPage: !1,
				onfullscreenchange: null,
				lastClickTime: null,
				draggingToZoom: !1
			}, this._sequenceIndex = 0, this._firstOpen = !0, this._updateRequestId = null, this._loadQueue = [], this.currentOverlays = [], this._updatePixelDensityRatioBind = null, this._lastScrollTime = e.now(), e.EventSource.call(this), this.addHandler("open-failed", function(t) {
				var n = e.getString("Errors.OpenFailed", t.eventSource, t.message);
				o._showMessage(n);
			}), e.ControlDock.call(this, n), this.xmlPath && (this.tileSources = [this.xmlPath]), this.element = this.element || document.getElementById(this.id), this.canvas = e.makeNeutralElement("div"), this.canvas.className = "openseadragon-canvas", (function(e) {
				e.width = "100%", e.height = "100%", e.overflow = "hidden", e.position = "absolute", e.top = "0px", e.left = "0px";
			})(this.canvas.style), e.setElementTouchActionNone(this.canvas), n.tabIndex !== "" && (this.canvas.tabIndex = n.tabIndex === void 0 ? 0 : n.tabIndex), this.container.className = "openseadragon-container", (function(e) {
				e.width = "100%", e.height = "100%", e.position = "relative", e.overflow = "hidden", e.left = "0px", e.top = "0px", e.textAlign = "left";
			})(this.container.style), e.setElementTouchActionNone(this.container), this.container.insertBefore(this.canvas, this.container.firstChild), this.element.appendChild(this.container), this.bodyWidth = document.body.style.width, this.bodyHeight = document.body.style.height, this.bodyOverflow = document.body.style.overflow, this.docOverflow = document.documentElement.style.overflow, this.innerTracker = new e.MouseTracker({
				userData: "Viewer.innerTracker",
				element: this.canvas,
				startDisabled: !this.mouseNavEnabled,
				clickTimeThreshold: this.clickTimeThreshold,
				clickDistThreshold: this.clickDistThreshold,
				dblClickTimeThreshold: this.dblClickTimeThreshold,
				dblClickDistThreshold: this.dblClickDistThreshold,
				contextMenuHandler: e.delegate(this, h),
				keyDownHandler: e.delegate(this, g),
				keyHandler: e.delegate(this, _),
				clickHandler: e.delegate(this, v),
				dblClickHandler: e.delegate(this, y),
				dragHandler: e.delegate(this, b),
				dragEndHandler: e.delegate(this, x),
				enterHandler: e.delegate(this, S),
				leaveHandler: e.delegate(this, C),
				pressHandler: e.delegate(this, w),
				releaseHandler: e.delegate(this, T),
				nonPrimaryPressHandler: e.delegate(this, E),
				nonPrimaryReleaseHandler: e.delegate(this, ee),
				scrollHandler: e.delegate(this, re),
				pinchHandler: e.delegate(this, D),
				focusHandler: e.delegate(this, te),
				blurHandler: e.delegate(this, ne)
			}), this.outerTracker = new e.MouseTracker({
				userData: "Viewer.outerTracker",
				element: this.container,
				startDisabled: !this.mouseNavEnabled,
				clickTimeThreshold: this.clickTimeThreshold,
				clickDistThreshold: this.clickDistThreshold,
				dblClickTimeThreshold: this.dblClickTimeThreshold,
				dblClickDistThreshold: this.dblClickDistThreshold,
				enterHandler: e.delegate(this, ie),
				leaveHandler: e.delegate(this, ae)
			}), this.toolbar &&= new e.ControlDock({ element: this.toolbar }), this.bindStandardControls(), t[this.hash].prevContainerSize = i(this.container), window.ResizeObserver ? (this._autoResizePolling = !1, this._resizeObserver = new ResizeObserver(function() {
				t[o.hash].needsResize = !0;
			}), this._resizeObserver.observe(this.container, {})) : this._autoResizePolling = !0, this.world = new e.World({ viewer: this }), this.world.addHandler("add-item", function(e) {
				o.source = o.world.getItemAt(0).source, t[o.hash].forceRedraw = !0, o._updateRequestId ||= c(o, oe);
			}), this.world.addHandler("remove-item", function(e) {
				o.source = o.world.getItemCount() ? o.world.getItemAt(0).source : null, t[o.hash].forceRedraw = !0;
			}), this.world.addHandler("metrics-change", function(e) {
				o.viewport && o.viewport._setContentBounds(o.world.getHomeBounds(), o.world.getContentFactor());
			}), this.world.addHandler("item-index-change", function(e) {
				o.source = o.world.getItemAt(0).source;
			}), this.viewport = new e.Viewport({
				containerSize: t[this.hash].prevContainerSize,
				springStiffness: this.springStiffness,
				animationTime: this.animationTime,
				minZoomImageRatio: this.minZoomImageRatio,
				maxZoomPixelRatio: this.maxZoomPixelRatio,
				visibilityRatio: this.visibilityRatio,
				wrapHorizontal: this.wrapHorizontal,
				wrapVertical: this.wrapVertical,
				defaultZoomLevel: this.defaultZoomLevel,
				minZoomLevel: this.minZoomLevel,
				maxZoomLevel: this.maxZoomLevel,
				viewer: this,
				degrees: this.degrees,
				flipped: this.flipped,
				overlayPreserveContentDirection: this.overlayPreserveContentDirection,
				navigatorRotate: this.navigatorRotate,
				homeFillsViewer: this.homeFillsViewer,
				margins: this.viewportMargins,
				silenceMultiImageWarnings: this.silenceMultiImageWarnings
			}), this.viewport._setContentBounds(this.world.getHomeBounds(), this.world.getContentFactor()), this.imageLoader = new e.ImageLoader({
				jobLimit: this.imageLoaderLimit,
				timeout: n.timeout,
				tileRetryMax: this.tileRetryMax,
				tileRetryDelay: this.tileRetryDelay
			}), this.tileCache = new e.TileCache({ maxImageCacheCount: this.maxImageCacheCount }), Object.prototype.hasOwnProperty.call(this.drawerOptions, "useCanvas") && (e.console.error("useCanvas is deprecated, use the \"drawer\" option to indicate preferred drawer(s)"), this.drawerOptions.useCanvas || (this.drawer = e.HTMLDrawer), delete this.drawerOptions.useCanvas);
			let l = Array.isArray(this.drawer) ? this.drawer : [this.drawer];
			l.length === 0 && (l = [e.DEFAULT_SETTINGS.drawer].flat(), e.console.warn("No valid drawers were selected. Using the default value.")), this.drawer = null;
			for (let e of l) if (this.requestDrawer(e, {
				mainDrawer: !0,
				redrawImmediately: !1
			})) break;
			if (!this.drawer) throw e.console.error("No drawer could be created!"), "Error with creating the selected drawer(s)";
			for (this.drawer.setImageSmoothingEnabled(this.imageSmoothingEnabled), this.overlaysContainer = e.makeNeutralElement("div"), this.canvas.appendChild(this.overlaysContainer), this.drawer.canRotate() || (this.rotateLeft && (s = this.buttonGroup.buttons.indexOf(this.rotateLeft), this.buttonGroup.buttons.splice(s, 1), this.buttonGroup.element.removeChild(this.rotateLeft.element)), this.rotateRight && (s = this.buttonGroup.buttons.indexOf(this.rotateRight), this.buttonGroup.buttons.splice(s, 1), this.buttonGroup.element.removeChild(this.rotateRight.element))), this._addUpdatePixelDensityRatioEvent(), this.showNavigator && (this.navigator = new e.Navigator({
				element: this.navigatorElement,
				id: this.navigatorId,
				position: this.navigatorPosition,
				sizeRatio: this.navigatorSizeRatio,
				maintainSizeRatio: this.navigatorMaintainSizeRatio,
				top: this.navigatorTop,
				left: this.navigatorLeft,
				width: this.navigatorWidth,
				height: this.navigatorHeight,
				autoResize: this.navigatorAutoResize,
				autoFade: this.navigatorAutoFade,
				prefixUrl: this.prefixUrl,
				viewer: this,
				navigatorRotate: this.navigatorRotate,
				background: this.navigatorBackground,
				opacity: this.navigatorOpacity,
				borderColor: this.navigatorBorderColor,
				displayRegionColor: this.navigatorDisplayRegionColor,
				crossOriginPolicy: this.crossOriginPolicy,
				animationTime: this.animationTime,
				drawer: this.drawer.getType(),
				loadTilesWithAjax: this.loadTilesWithAjax,
				ajaxHeaders: this.ajaxHeaders,
				ajaxWithCredentials: this.ajaxWithCredentials
			})), this.sequenceMode && this.bindSequenceControls(), this.tileSources && this.open(this.tileSources), s = 0; s < this.customControls.length; s++) this.addControl(this.customControls[s].id, { anchor: this.customControls[s].anchor });
			e.requestAnimationFrame(function() {
				u(o);
			}), e._viewers.set(this.element, this);
		}, e.extend(e.Viewer.prototype, e.EventSource.prototype, e.ControlDock.prototype, {
			isOpen: function() {
				return !!this.world.getItemCount();
			},
			openDzi: function(t) {
				return e.console.error("[Viewer.openDzi] this function is deprecated; use Viewer.open() instead."), this.open(t);
			},
			openTileSource: function(t) {
				return e.console.error("[Viewer.openTileSource] this function is deprecated; use Viewer.open() instead."), this.open(t);
			},
			get buttons() {
				return e.console.warn("Viewer.buttons is deprecated; Please use Viewer.buttonGroup"), this.buttonGroup;
			},
			open: function(t, n) {
				var r = this;
				if (this.close(), !t) return this;
				if (this.sequenceMode && e.isArray(t)) return this.referenceStrip &&= (this.referenceStrip.destroy(), null), n !== void 0 && !isNaN(n) && (this.initialPage = n), this.tileSources = t, this._sequenceIndex = Math.max(0, Math.min(this.tileSources.length - 1, this.initialPage)), this.tileSources.length && (this.open(this.tileSources[this._sequenceIndex]), this.showReferenceStrip && this.addReferenceStrip()), this._updateSequenceButtons(this._sequenceIndex), this;
				if (e.isArray(t) || (t = [t]), !t.length) return this;
				this._opening = !0;
				for (var i = t.length, a = 0, s = 0, c, l = function() {
					if (a + s === i) {
						if (a) {
							(r._firstOpen || !r.preserveViewport) && (r.viewport.goHome(!0), r.viewport.update()), r._firstOpen = !1;
							var e = t[0];
							if (e.tileSource && (e = e.tileSource), r.overlays && !r.preserveOverlays) for (var n = 0; n < r.overlays.length; n++) r.currentOverlays[n] = o(r, r.overlays[n]);
							r._drawOverlays(), r._opening = !1, r.raiseEvent("open", { source: e });
						} else r._opening = !1, r.raiseEvent("open-failed", c);
					}
				}, u = function(t) {
					(!e.isPlainObject(t) || !t.tileSource) && (t = { tileSource: t }), t.index !== void 0 && (e.console.error("[Viewer.open] setting indexes here is not supported; use addTiledImage instead"), delete t.index), t.collectionImmediately === void 0 && (t.collectionImmediately = !0);
					var n = t.success;
					t.success = function(e) {
						if (a++, t.tileSource.overlays) for (var i = 0; i < t.tileSource.overlays.length; i++) r.addOverlay(t.tileSource.overlays[i]);
						n && n(e), l();
					};
					var i = t.error;
					t.error = function(e) {
						s++, c ||= e, i && i(e), l();
					}, r.addTiledImage(t);
				}, d = 0; d < t.length; d++) u(t[d]);
				return this;
			},
			close: function() {
				return t[this.hash] ? (this._opening = !1, this.navigator && this.navigator.close(), this.preserveOverlays || (this.clearOverlays(), this.overlaysContainer.innerHTML = ""), t[this.hash].animating = !1, this.world.removeAll(), this.imageLoader.clear(), this.raiseEvent("close"), this) : this;
			},
			destroy: function() {
				if (t[this.hash]) {
					if (this.raiseEvent("before-destroy"), this._removeUpdatePixelDensityRatioEvent(), this.close(), this.clearOverlays(), this.overlaysContainer.innerHTML = "", this._resizeObserver && this._resizeObserver.disconnect(), this.referenceStrip &&= (this.referenceStrip.destroy(), null), this._updateRequestId !== null && (e.cancelAnimationFrame(this._updateRequestId), this._updateRequestId = null), this.drawer && this.drawer.destroy(), this.navigator &&= (this.navigator.destroy(), t[this.navigator.hash] = null, delete t[this.navigator.hash], null), this.buttonGroup) this.buttonGroup.destroy();
					else if (this.customButtons) for (; this.customButtons.length;) this.customButtons.pop().destroy();
					if (this.paging && this.paging.destroy(), this.element) for (; this.element.firstChild;) this.element.removeChild(this.element.firstChild);
					this.container.onsubmit = null, this.clearControls(), this.innerTracker && this.innerTracker.destroy(), this.outerTracker && this.outerTracker.destroy(), t[this.hash] = null, delete t[this.hash], this.canvas = null, this.container = null, e._viewers.delete(this.element), this.element = null, this.raiseEvent("destroy"), this.removeAllHandlers();
				}
			},
			requestDrawer(t, n) {
				n = e.extend(!0, {
					mainDrawer: !0,
					redrawImmediately: !0,
					drawerOptions: null
				}, n);
				let r = n.mainDrawer, i = n.redrawImmediately, a = n.drawerOptions, o = this.drawer, s = null;
				if (t && t.prototype instanceof e.DrawerBase ? (s = t, t = "custom") : typeof t == "string" && (s = e.determineDrawer(t)), s || e.console.warn("Unsupported drawer! Drawer must be an existing string type, or a class that extends OpenSeadragon.DrawerBase."), s && s.isSupported()) {
					o && r && o.destroy();
					let e = new s({
						viewer: this,
						viewport: this.viewport,
						element: this.canvas,
						debugGridColor: this.debugGridColor,
						options: a || this.drawerOptions[t]
					});
					return r && (this.drawer = e, i && this.forceRedraw()), e;
				}
				return !1;
			},
			isMouseNavEnabled: function() {
				return this.innerTracker.isTracking();
			},
			setMouseNavEnabled: function(e) {
				return this.innerTracker.setTracking(e), this.outerTracker.setTracking(e), this.raiseEvent("mouse-enabled", { enabled: e }), this;
			},
			areControlsEnabled: function() {
				var e = this.controls.length, t;
				for (t = 0; t < this.controls.length; t++) e &&= this.controls[t].isVisible();
				return e;
			},
			setControlsEnabled: function(e) {
				return e ? f(this) : u(this), this.raiseEvent("controls-enabled", { enabled: e }), this;
			},
			setDebugMode: function(e) {
				for (var t = 0; t < this.world.getItemCount(); t++) this.world.getItemAt(t).debugMode = e;
				this.debugMode = e, this.forceRedraw();
			},
			setAjaxHeaders: function(t, n) {
				if (t === null && (t = {}), !e.isPlainObject(t)) {
					console.error("[Viewer.setAjaxHeaders] Ignoring invalid headers, must be a plain object");
					return;
				}
				if (n === void 0 && (n = !0), this.ajaxHeaders = t, n) {
					for (var r = 0; r < this.world.getItemCount(); r++) this.world.getItemAt(r)._updateAjaxHeaders(!0);
					if (this.navigator && this.navigator.setAjaxHeaders(this.ajaxHeaders, !0), this.referenceStrip && this.referenceStrip.miniViewers) for (var i in this.referenceStrip.miniViewers) this.referenceStrip.miniViewers[i].setAjaxHeaders(this.ajaxHeaders, !0);
				}
			},
			addButton: function(e) {
				this.buttonGroup.addButton(e);
			},
			isFullPage: function() {
				return t[this.hash] && t[this.hash].fullPage;
			},
			setFullPage: function(n) {
				var r = document.body, i = r.style, a = document.documentElement.style, o = this, s, c;
				if (n === this.isFullPage()) return this;
				var l = {
					fullPage: n,
					preventDefaultAction: !1
				};
				if (this.raiseEvent("pre-full-page", l), l.preventDefaultAction) return this;
				if (n && this.element) {
					for (this.elementSize = e.getElementSize(this.element), this.pageScroll = e.getPageScroll(), this.elementMargin = this.element.style.margin, this.element.style.margin = "0", this.elementPadding = this.element.style.padding, this.element.style.padding = "0", this.bodyMargin = i.margin, this.docMargin = a.margin, i.margin = "0", a.margin = "0", this.bodyPadding = i.padding, this.docPadding = a.padding, i.padding = "0", a.padding = "0", this.bodyWidth = i.width, this.docWidth = a.width, i.width = "100%", a.width = "100%", this.bodyHeight = i.height, this.docHeight = a.height, i.height = "100%", a.height = "100%", this.bodyDisplay = i.display, i.display = "block", this.previousBody = [], t[this.hash].prevElementParent = this.element.parentNode, t[this.hash].prevNextSibling = this.element.nextSibling, t[this.hash].prevElementWidth = this.element.style.width, t[this.hash].prevElementHeight = this.element.style.height, s = r.childNodes.length, c = 0; c < s; c++) this.previousBody.push(r.childNodes[0]), r.removeChild(r.childNodes[0]);
					this.toolbar && this.toolbar.element && (this.toolbar.parentNode = this.toolbar.element.parentNode, this.toolbar.nextSibling = this.toolbar.element.nextSibling, r.appendChild(this.toolbar.element), e.addClass(this.toolbar.element, "fullpage")), e.addClass(this.element, "fullpage"), r.appendChild(this.element), this.element.style.height = "100vh", this.element.style.width = "100vw", this.toolbar && this.toolbar.element && (this.element.style.height = e.getElementSize(this.element).y - e.getElementSize(this.toolbar.element).y + "px"), t[this.hash].fullPage = !0, e.delegate(this, ie)({});
				} else {
					for (this.element.style.margin = this.elementMargin, this.element.style.padding = this.elementPadding, i.margin = this.bodyMargin, a.margin = this.docMargin, i.padding = this.bodyPadding, a.padding = this.docPadding, i.width = this.bodyWidth, a.width = this.docWidth, i.height = this.bodyHeight, a.height = this.docHeight, i.display = this.bodyDisplay, r.removeChild(this.element), s = this.previousBody.length, c = 0; c < s; c++) r.appendChild(this.previousBody.shift());
					e.removeClass(this.element, "fullpage"), t[this.hash].prevElementParent.insertBefore(this.element, t[this.hash].prevNextSibling), this.toolbar && this.toolbar.element && (r.removeChild(this.toolbar.element), e.removeClass(this.toolbar.element, "fullpage"), this.toolbar.parentNode.insertBefore(this.toolbar.element, this.toolbar.nextSibling), delete this.toolbar.parentNode, delete this.toolbar.nextSibling), this.element.style.width = t[this.hash].prevElementWidth, this.element.style.height = t[this.hash].prevElementHeight;
					var u = 0, d = function() {
						e.setPageScroll(o.pageScroll);
						var t = e.getPageScroll();
						u++, u < 10 && (t.x !== o.pageScroll.x || t.y !== o.pageScroll.y) && e.requestAnimationFrame(d);
					};
					e.requestAnimationFrame(d), t[this.hash].fullPage = !1, e.delegate(this, ae)({});
				}
				return this.navigator && this.viewport && this.navigator.update(this.viewport), this.raiseEvent("full-page", { fullPage: n }), this;
			},
			setFullScreen: function(t) {
				var n = this;
				if (!e.supportsFullScreen) return this.setFullPage(t);
				if (e.isFullScreen() === t) return this;
				var r = {
					fullScreen: t,
					preventDefaultAction: !1
				};
				if (this.raiseEvent("pre-full-screen", r), r.preventDefaultAction) return this;
				if (t) {
					if (this.setFullPage(!0), !this.isFullPage()) return this;
					this.fullPageStyleWidth = this.element.style.width, this.fullPageStyleHeight = this.element.style.height, this.element.style.width = "100%", this.element.style.height = "100%";
					var i = function() {
						var t = e.isFullScreen();
						t || (e.removeEvent(document, e.fullScreenEventName, i), e.removeEvent(document, e.fullScreenErrorEventName, i), n.setFullPage(!1), n.isFullPage() && (n.element.style.width = n.fullPageStyleWidth, n.element.style.height = n.fullPageStyleHeight)), n.navigator && n.viewport && setTimeout(function() {
							n.navigator.update(n.viewport);
						}), n.raiseEvent("full-screen", { fullScreen: t });
					};
					e.addEvent(document, e.fullScreenEventName, i), e.addEvent(document, e.fullScreenErrorEventName, i), e.requestFullScreen(document.body);
				} else e.exitFullScreen();
				return this;
			},
			isVisible: function() {
				return this.container.style.visibility !== "hidden";
			},
			isFullScreen: function() {
				return e.isFullScreen() && this.isFullPage();
			},
			setVisible: function(e) {
				return this.container.style.visibility = e ? "" : "hidden", this.raiseEvent("visible", { visible: e }), this;
			},
			addTiledImage: function(t) {
				e.console.assert(t, "[Viewer.addTiledImage] options is required"), e.console.assert(t.tileSource, "[Viewer.addTiledImage] options.tileSource is required"), e.console.assert(!t.replace || t.index > -1 && t.index < this.world.getItemCount(), "[Viewer.addTiledImage] if options.replace is used, options.index must be a valid index in Viewer.world");
				var n = this;
				t.replace && (t.replaceItem = n.world.getItemAt(t.index)), this._hideMessage(), t.placeholderFillStyle === void 0 && (t.placeholderFillStyle = this.placeholderFillStyle), t.opacity === void 0 && (t.opacity = this.opacity), t.preload === void 0 && (t.preload = this.preload), t.compositeOperation === void 0 && (t.compositeOperation = this.compositeOperation), t.crossOriginPolicy === void 0 && (t.crossOriginPolicy = t.tileSource.crossOriginPolicy === void 0 ? this.crossOriginPolicy : t.tileSource.crossOriginPolicy), t.ajaxWithCredentials === void 0 && (t.ajaxWithCredentials = this.ajaxWithCredentials), t.loadTilesWithAjax === void 0 && (t.loadTilesWithAjax = this.loadTilesWithAjax), e.isPlainObject(t.ajaxHeaders) || (t.ajaxHeaders = {});
				var r = { options: t };
				function i(e) {
					for (var i = 0; i < n._loadQueue.length; i++) if (n._loadQueue[i] === r) {
						n._loadQueue.splice(i, 1);
						break;
					}
					n._loadQueue.length === 0 && o(r), n.raiseEvent("add-item-failed", e), t.error && t.error(e);
				}
				function o(e) {
					n.collectionMode && (n.world.arrange({
						immediately: e.options.collectionImmediately,
						rows: n.collectionRows,
						columns: n.collectionColumns,
						layout: n.collectionLayout,
						tileSize: n.collectionTileSize,
						tileMargin: n.collectionTileMargin
					}), n.world.setAutoRefigureSizes(!0));
				}
				if (e.isArray(t.tileSource)) {
					setTimeout(function() {
						i({
							message: "[Viewer.addTiledImage] Sequences can not be added; add them one at a time instead.",
							source: t.tileSource,
							options: t
						});
					});
					return;
				}
				this._loadQueue.push(r);
				function s() {
					for (var t, r, i; n._loadQueue.length && (t = n._loadQueue[0], t.tileSource);) {
						if (n._loadQueue.splice(0, 1), t.options.replace) {
							var a = n.world.getIndexOfItem(t.options.replaceItem);
							a !== -1 && (t.options.index = a), n.world.removeItem(t.options.replaceItem);
						}
						r = new e.TiledImage({
							viewer: n,
							source: t.tileSource,
							viewport: n.viewport,
							drawer: n.drawer,
							tileCache: n.tileCache,
							imageLoader: n.imageLoader,
							x: t.options.x,
							y: t.options.y,
							width: t.options.width,
							height: t.options.height,
							fitBounds: t.options.fitBounds,
							fitBoundsPlacement: t.options.fitBoundsPlacement,
							clip: t.options.clip,
							placeholderFillStyle: t.options.placeholderFillStyle,
							opacity: t.options.opacity,
							preload: t.options.preload,
							degrees: t.options.degrees,
							flipped: t.options.flipped,
							compositeOperation: t.options.compositeOperation,
							springStiffness: n.springStiffness,
							animationTime: n.animationTime,
							minZoomImageRatio: n.minZoomImageRatio,
							wrapHorizontal: n.wrapHorizontal,
							wrapVertical: n.wrapVertical,
							maxTilesPerFrame: n.maxTilesPerFrame,
							immediateRender: n.immediateRender,
							blendTime: n.blendTime,
							alwaysBlend: n.alwaysBlend,
							minPixelRatio: n.minPixelRatio,
							smoothTileEdgesMinZoom: n.smoothTileEdgesMinZoom,
							iOSDevice: n.iOSDevice,
							crossOriginPolicy: t.options.crossOriginPolicy,
							ajaxWithCredentials: t.options.ajaxWithCredentials,
							loadTilesWithAjax: t.options.loadTilesWithAjax,
							ajaxHeaders: t.options.ajaxHeaders,
							debugMode: n.debugMode,
							subPixelRoundingForTransparency: n.subPixelRoundingForTransparency
						}), n.collectionMode && n.world.setAutoRefigureSizes(!1), n.navigator && (i = e.extend({}, t.options, {
							replace: !1,
							originalTiledImage: r,
							tileSource: t.tileSource
						}), n.navigator.addTiledImage(i)), n.world.addItem(r, { index: t.options.index }), n._loadQueue.length === 0 && o(t), n.world.getItemCount() === 1 && !n.preserveViewport && n.viewport.goHome(!0), t.options.success && t.options.success({ item: r });
					}
				}
				a(this, t.tileSource, t, function(e) {
					r.tileSource = e, s();
				}, function(e) {
					e.options = t, i(e), s();
				});
			},
			addSimpleImage: function(t) {
				e.console.assert(t, "[Viewer.addSimpleImage] options is required"), e.console.assert(t.url, "[Viewer.addSimpleImage] options.url is required");
				var n = e.extend({}, t, { tileSource: {
					type: "image",
					url: t.url
				} });
				delete n.url, this.addTiledImage(n);
			},
			addLayer: function(t) {
				var n = this;
				e.console.error("[Viewer.addLayer] this function is deprecated; use Viewer.addTiledImage() instead.");
				var r = e.extend({}, t, {
					success: function(e) {
						n.raiseEvent("add-layer", {
							options: t,
							drawer: e.item
						});
					},
					error: function(e) {
						n.raiseEvent("add-layer-failed", e);
					}
				});
				return this.addTiledImage(r), this;
			},
			getLayerAtLevel: function(t) {
				return e.console.error("[Viewer.getLayerAtLevel] this function is deprecated; use World.getItemAt() instead."), this.world.getItemAt(t);
			},
			getLevelOfLayer: function(t) {
				return e.console.error("[Viewer.getLevelOfLayer] this function is deprecated; use World.getIndexOfItem() instead."), this.world.getIndexOfItem(t);
			},
			getLayersCount: function() {
				return e.console.error("[Viewer.getLayersCount] this function is deprecated; use World.getItemCount() instead."), this.world.getItemCount();
			},
			setLayerLevel: function(t, n) {
				return e.console.error("[Viewer.setLayerLevel] this function is deprecated; use World.setItemIndex() instead."), this.world.setItemIndex(t, n);
			},
			removeLayer: function(t) {
				return e.console.error("[Viewer.removeLayer] this function is deprecated; use World.removeItem() instead."), this.world.removeItem(t);
			},
			forceRedraw: function() {
				return t[this.hash].forceRedraw = !0, this;
			},
			forceResize: function() {
				t[this.hash].needsResize = !0, t[this.hash].forceResize = !0;
			},
			bindSequenceControls: function() {
				var t = e.delegate(this, p), n = e.delegate(this, m), r = e.delegate(this, this.goToNextPage), i = e.delegate(this, this.goToPreviousPage), a = this.navImages, o = !0;
				return this.showSequenceControl && ((this.previousButton || this.nextButton) && (o = !1), this.previousButton = new e.Button({
					element: this.previousButton ? e.getElement(this.previousButton) : null,
					clickTimeThreshold: this.clickTimeThreshold,
					clickDistThreshold: this.clickDistThreshold,
					tooltip: e.getString("Tooltips.PreviousPage"),
					srcRest: k(this.prefixUrl, a.previous.REST),
					srcGroup: k(this.prefixUrl, a.previous.GROUP),
					srcHover: k(this.prefixUrl, a.previous.HOVER),
					srcDown: k(this.prefixUrl, a.previous.DOWN),
					onRelease: i,
					onFocus: t,
					onBlur: n
				}), this.nextButton = new e.Button({
					element: this.nextButton ? e.getElement(this.nextButton) : null,
					clickTimeThreshold: this.clickTimeThreshold,
					clickDistThreshold: this.clickDistThreshold,
					tooltip: e.getString("Tooltips.NextPage"),
					srcRest: k(this.prefixUrl, a.next.REST),
					srcGroup: k(this.prefixUrl, a.next.GROUP),
					srcHover: k(this.prefixUrl, a.next.HOVER),
					srcDown: k(this.prefixUrl, a.next.DOWN),
					onRelease: r,
					onFocus: t,
					onBlur: n
				}), this.navPrevNextWrap || this.previousButton.disable(), (!this.tileSources || !this.tileSources.length) && this.nextButton.disable(), o && (this.paging = new e.ButtonGroup({
					buttons: [this.previousButton, this.nextButton],
					clickTimeThreshold: this.clickTimeThreshold,
					clickDistThreshold: this.clickDistThreshold
				}), this.pagingControl = this.paging.element, this.toolbar ? this.toolbar.addControl(this.pagingControl, { anchor: e.ControlAnchor.BOTTOM_RIGHT }) : this.addControl(this.pagingControl, { anchor: this.sequenceControlAnchor || e.ControlAnchor.TOP_LEFT }))), this;
			},
			bindStandardControls: function() {
				var t = e.delegate(this, le), n = e.delegate(this, de), r = e.delegate(this, me), i = e.delegate(this, ue), a = e.delegate(this, he), o = e.delegate(this, _e), s = e.delegate(this, ve), c = e.delegate(this, ye), l = e.delegate(this, be), u = e.delegate(this, xe), d = e.delegate(this, p), f = e.delegate(this, m), h = this.navImages, g = [], _ = !0;
				return this.showNavigationControl && ((this.zoomInButton || this.zoomOutButton || this.homeButton || this.fullPageButton || this.rotateLeftButton || this.rotateRightButton || this.flipButton) && (_ = !1), this.showZoomControl && (g.push(this.zoomInButton = new e.Button({
					element: this.zoomInButton ? e.getElement(this.zoomInButton) : null,
					clickTimeThreshold: this.clickTimeThreshold,
					clickDistThreshold: this.clickDistThreshold,
					tooltip: e.getString("Tooltips.ZoomIn"),
					srcRest: k(this.prefixUrl, h.zoomIn.REST),
					srcGroup: k(this.prefixUrl, h.zoomIn.GROUP),
					srcHover: k(this.prefixUrl, h.zoomIn.HOVER),
					srcDown: k(this.prefixUrl, h.zoomIn.DOWN),
					onPress: t,
					onRelease: n,
					onClick: r,
					onEnter: t,
					onExit: n,
					onFocus: d,
					onBlur: f
				})), g.push(this.zoomOutButton = new e.Button({
					element: this.zoomOutButton ? e.getElement(this.zoomOutButton) : null,
					clickTimeThreshold: this.clickTimeThreshold,
					clickDistThreshold: this.clickDistThreshold,
					tooltip: e.getString("Tooltips.ZoomOut"),
					srcRest: k(this.prefixUrl, h.zoomOut.REST),
					srcGroup: k(this.prefixUrl, h.zoomOut.GROUP),
					srcHover: k(this.prefixUrl, h.zoomOut.HOVER),
					srcDown: k(this.prefixUrl, h.zoomOut.DOWN),
					onPress: i,
					onRelease: n,
					onClick: a,
					onEnter: i,
					onExit: n,
					onFocus: d,
					onBlur: f
				}))), this.showHomeControl && g.push(this.homeButton = new e.Button({
					element: this.homeButton ? e.getElement(this.homeButton) : null,
					clickTimeThreshold: this.clickTimeThreshold,
					clickDistThreshold: this.clickDistThreshold,
					tooltip: e.getString("Tooltips.Home"),
					srcRest: k(this.prefixUrl, h.home.REST),
					srcGroup: k(this.prefixUrl, h.home.GROUP),
					srcHover: k(this.prefixUrl, h.home.HOVER),
					srcDown: k(this.prefixUrl, h.home.DOWN),
					onRelease: o,
					onFocus: d,
					onBlur: f
				})), this.showFullPageControl && g.push(this.fullPageButton = new e.Button({
					element: this.fullPageButton ? e.getElement(this.fullPageButton) : null,
					clickTimeThreshold: this.clickTimeThreshold,
					clickDistThreshold: this.clickDistThreshold,
					tooltip: e.getString("Tooltips.FullPage"),
					srcRest: k(this.prefixUrl, h.fullpage.REST),
					srcGroup: k(this.prefixUrl, h.fullpage.GROUP),
					srcHover: k(this.prefixUrl, h.fullpage.HOVER),
					srcDown: k(this.prefixUrl, h.fullpage.DOWN),
					onRelease: s,
					onFocus: d,
					onBlur: f
				})), this.showRotationControl && (g.push(this.rotateLeftButton = new e.Button({
					element: this.rotateLeftButton ? e.getElement(this.rotateLeftButton) : null,
					clickTimeThreshold: this.clickTimeThreshold,
					clickDistThreshold: this.clickDistThreshold,
					tooltip: e.getString("Tooltips.RotateLeft"),
					srcRest: k(this.prefixUrl, h.rotateleft.REST),
					srcGroup: k(this.prefixUrl, h.rotateleft.GROUP),
					srcHover: k(this.prefixUrl, h.rotateleft.HOVER),
					srcDown: k(this.prefixUrl, h.rotateleft.DOWN),
					onRelease: c,
					onFocus: d,
					onBlur: f
				})), g.push(this.rotateRightButton = new e.Button({
					element: this.rotateRightButton ? e.getElement(this.rotateRightButton) : null,
					clickTimeThreshold: this.clickTimeThreshold,
					clickDistThreshold: this.clickDistThreshold,
					tooltip: e.getString("Tooltips.RotateRight"),
					srcRest: k(this.prefixUrl, h.rotateright.REST),
					srcGroup: k(this.prefixUrl, h.rotateright.GROUP),
					srcHover: k(this.prefixUrl, h.rotateright.HOVER),
					srcDown: k(this.prefixUrl, h.rotateright.DOWN),
					onRelease: l,
					onFocus: d,
					onBlur: f
				}))), this.showFlipControl && g.push(this.flipButton = new e.Button({
					element: this.flipButton ? e.getElement(this.flipButton) : null,
					clickTimeThreshold: this.clickTimeThreshold,
					clickDistThreshold: this.clickDistThreshold,
					tooltip: e.getString("Tooltips.Flip"),
					srcRest: k(this.prefixUrl, h.flip.REST),
					srcGroup: k(this.prefixUrl, h.flip.GROUP),
					srcHover: k(this.prefixUrl, h.flip.HOVER),
					srcDown: k(this.prefixUrl, h.flip.DOWN),
					onRelease: u,
					onFocus: d,
					onBlur: f
				})), _ ? (this.buttonGroup = new e.ButtonGroup({
					buttons: g,
					clickTimeThreshold: this.clickTimeThreshold,
					clickDistThreshold: this.clickDistThreshold
				}), this.navControl = this.buttonGroup.element, this.addHandler("open", e.delegate(this, ge)), this.toolbar ? this.toolbar.addControl(this.navControl, { anchor: this.navigationControlAnchor || e.ControlAnchor.TOP_LEFT }) : this.addControl(this.navControl, { anchor: this.navigationControlAnchor || e.ControlAnchor.TOP_LEFT })) : this.customButtons = g), this;
			},
			currentPage: function() {
				return this._sequenceIndex;
			},
			goToPage: function(e) {
				return this.tileSources && e >= 0 && e < this.tileSources.length && (this._sequenceIndex = e, this._updateSequenceButtons(e), this.open(this.tileSources[e]), this.referenceStrip && this.referenceStrip.setFocus(e), this.raiseEvent("page", { page: e })), this;
			},
			addOverlay: function(t, n, r, i) {
				var a = e.isPlainObject(t) ? t : {
					element: t,
					location: n,
					placement: r,
					onDraw: i
				};
				if (t = e.getElement(a.element), s(this.currentOverlays, t) >= 0) return this;
				var c = o(this, a);
				return this.currentOverlays.push(c), c.drawHTML(this.overlaysContainer, this.viewport), this.raiseEvent("add-overlay", {
					element: t,
					location: a.location,
					placement: a.placement
				}), this;
			},
			updateOverlay: function(n, r, i) {
				var a;
				return n = e.getElement(n), a = s(this.currentOverlays, n), a >= 0 && (this.currentOverlays[a].update(r, i), t[this.hash].forceRedraw = !0, this.raiseEvent("update-overlay", {
					element: n,
					location: r,
					placement: i
				})), this;
			},
			removeOverlay: function(n) {
				var r;
				return n = e.getElement(n), r = s(this.currentOverlays, n), r >= 0 && (this.currentOverlays[r].destroy(), this.currentOverlays.splice(r, 1), t[this.hash].forceRedraw = !0, this.raiseEvent("remove-overlay", { element: n })), this;
			},
			clearOverlays: function() {
				for (; this.currentOverlays.length > 0;) this.currentOverlays.pop().destroy();
				return t[this.hash].forceRedraw = !0, this.raiseEvent("clear-overlay", {}), this;
			},
			getOverlayById: function(t) {
				var n;
				return t = e.getElement(t), n = s(this.currentOverlays, t), n >= 0 ? this.currentOverlays[n] : null;
			},
			_updateSequenceButtons: function(e) {
				this.nextButton && (!this.tileSources || this.tileSources.length - 1 === e ? this.navPrevNextWrap || this.nextButton.disable() : this.nextButton.enable()), this.previousButton && (e > 0 ? this.previousButton.enable() : this.navPrevNextWrap || this.previousButton.disable());
			},
			_showMessage: function(t) {
				this._hideMessage();
				var n = e.makeNeutralElement("div");
				n.appendChild(document.createTextNode(t)), this.messageDiv = e.makeCenteredNode(n), e.addClass(this.messageDiv, "openseadragon-message"), this.container.appendChild(this.messageDiv);
			},
			_hideMessage: function() {
				var e = this.messageDiv;
				e && (e.parentNode.removeChild(e), delete this.messageDiv);
			},
			gestureSettingsByDeviceType: function(e) {
				switch (e) {
					case "mouse": return this.gestureSettingsMouse;
					case "touch": return this.gestureSettingsTouch;
					case "pen": return this.gestureSettingsPen;
					default: return this.gestureSettingsUnknown;
				}
			},
			_drawOverlays: function() {
				var e, t = this.currentOverlays.length;
				for (e = 0; e < t; e++) this.currentOverlays[e].drawHTML(this.overlaysContainer, this.viewport);
			},
			_cancelPendingImages: function() {
				this._loadQueue = [];
			},
			removeReferenceStrip: function() {
				this.showReferenceStrip = !1, this.referenceStrip &&= (this.referenceStrip.destroy(), null);
			},
			addReferenceStrip: function() {
				if (this.showReferenceStrip = !0, this.sequenceMode) {
					if (this.referenceStrip) return;
					this.tileSources.length && this.tileSources.length > 1 && (this.referenceStrip = new e.ReferenceStrip({
						id: this.referenceStripElement,
						position: this.referenceStripPosition,
						sizeRatio: this.referenceStripSizeRatio,
						scroll: this.referenceStripScroll,
						height: this.referenceStripHeight,
						width: this.referenceStripWidth,
						tileSources: this.tileSources,
						prefixUrl: this.prefixUrl,
						viewer: this
					}), this.referenceStrip.setFocus(this._sequenceIndex));
				} else e.console.warn("Attempting to display a reference strip while \"sequenceMode\" is off.");
			},
			_addUpdatePixelDensityRatioEvent: function() {
				this._updatePixelDensityRatioBind = this._updatePixelDensityRatio.bind(this), e.addEvent(window, "resize", this._updatePixelDensityRatioBind);
			},
			_removeUpdatePixelDensityRatioEvent: function() {
				e.removeEvent(window, "resize", this._updatePixelDensityRatioBind);
			},
			_updatePixelDensityRatio: function() {
				var t = e.pixelDensityRatio, n = e.getCurrentPixelDensityRatio();
				t !== n && (e.pixelDensityRatio = n, this.forceResize());
			},
			goToPreviousPage: function() {
				var e = this._sequenceIndex - 1;
				this.navPrevNextWrap && e < 0 && (e += this.tileSources.length), this.goToPage(e);
			},
			goToNextPage: function() {
				var e = this._sequenceIndex + 1;
				this.navPrevNextWrap && e >= this.tileSources.length && (e = 0), this.goToPage(e);
			},
			isAnimating: function() {
				return t[this.hash].animating;
			}
		});
		function i(t) {
			return t = e.getElement(t), new e.Point(t.clientWidth === 0 ? 1 : t.clientWidth, t.clientHeight === 0 ? 1 : t.clientHeight);
		}
		function a(t, n, r, i, a) {
			var o = t;
			if (e.type(n) === "string") {
				if (n.match(/^\s*<.*>\s*$/)) n = e.parseXml(n);
				else if (n.match(/^\s*[{[].*[}\]]\s*$/)) try {
					n = e.parseJSON(n);
				} catch {}
			}
			function s(e, t) {
				e.ready ? i(e) : (e.addHandler("ready", function() {
					i(e);
				}), e.addHandler("open-failed", function(e) {
					a({
						message: e.message,
						source: t
					});
				}));
			}
			setTimeout(function() {
				if (e.type(n) === "string") n = new e.TileSource({
					url: n,
					crossOriginPolicy: r.crossOriginPolicy === void 0 ? t.crossOriginPolicy : r.crossOriginPolicy,
					ajaxWithCredentials: t.ajaxWithCredentials,
					ajaxHeaders: r.ajaxHeaders ? r.ajaxHeaders : t.ajaxHeaders,
					splitHashDataForPost: t.splitHashDataForPost,
					success: function(e) {
						i(e.tileSource);
					}
				}), n.addHandler("open-failed", function(e) {
					a(e);
				});
				else if (e.isPlainObject(n) || n.nodeType) {
					if (n.crossOriginPolicy === void 0 && (r.crossOriginPolicy !== void 0 || t.crossOriginPolicy !== void 0) && (n.crossOriginPolicy = r.crossOriginPolicy === void 0 ? t.crossOriginPolicy : r.crossOriginPolicy), n.ajaxWithCredentials === void 0 && (n.ajaxWithCredentials = t.ajaxWithCredentials), e.isFunction(n.getTileUrl)) {
						var c = new e.TileSource(n);
						c.getTileUrl = n.getTileUrl, i(c);
					} else {
						var l = e.TileSource.determineType(o, n);
						if (!l) {
							a({
								message: "Unable to load TileSource",
								source: n
							});
							return;
						}
						s(new l(l.prototype.configure.apply(o, [n])), n);
					}
				} else s(n, n);
			});
		}
		function o(t, n) {
			if (n instanceof e.Overlay) return n;
			var r = null;
			if (n.element) r = e.getElement(n.element);
			else {
				var i = n.id ? n.id : "openseadragon-overlay-" + Math.floor(Math.random() * 1e7);
				r = e.getElement(n.id), r || (r = document.createElement("a"), r.href = "#/overlay/" + i), r.id = i, e.addClass(r, n.className ? n.className : "openseadragon-overlay");
			}
			var a = n.location, o = n.width, s = n.height;
			if (!a) {
				var c = n.x, l = n.y;
				if (n.px !== void 0) {
					var u = t.viewport.imageToViewportRectangle(new e.Rect(n.px, n.py, o || 0, s || 0));
					c = u.x, l = u.y, o = o === void 0 ? void 0 : u.width, s = s === void 0 ? void 0 : u.height;
				}
				a = new e.Point(c, l);
			}
			var d = n.placement;
			return d && e.type(d) === "string" && (d = e.Placement[n.placement.toUpperCase()]), new e.Overlay({
				element: r,
				location: a,
				placement: d,
				onDraw: n.onDraw,
				checkResize: n.checkResize,
				width: o,
				height: s,
				rotationMode: n.rotationMode
			});
		}
		function s(e, t) {
			var n;
			for (n = e.length - 1; n >= 0; n--) if (e[n].element === t) return n;
			return -1;
		}
		function c(t, n) {
			return e.requestAnimationFrame(function() {
				n(t);
			});
		}
		function l(t) {
			e.requestAnimationFrame(function() {
				d(t);
			});
		}
		function u(t) {
			t.autoHideControls && (t.controlsShouldFade = !0, t.controlsFadeBeginTime = e.now() + t.controlsFadeDelay, window.setTimeout(function() {
				l(t);
			}, t.controlsFadeDelay));
		}
		function d(t) {
			var n, r, i, a;
			if (t.controlsShouldFade) {
				for (n = e.now(), r = n - t.controlsFadeBeginTime, i = 1 - r / t.controlsFadeLength, i = Math.min(1, i), i = Math.max(0, i), a = t.controls.length - 1; a >= 0; a--) t.controls[a].autoFade && t.controls[a].setOpacity(i);
				i > 0 && l(t);
			}
		}
		function f(e) {
			var t;
			for (e.controlsShouldFade = !1, t = e.controls.length - 1; t >= 0; t--) e.controls[t].setOpacity(1);
		}
		function p() {
			f(this);
		}
		function m() {
			u(this);
		}
		function h(e) {
			var t = {
				tracker: e.eventSource,
				position: e.position,
				originalEvent: e.originalEvent,
				preventDefault: e.preventDefault
			};
			this.raiseEvent("canvas-contextmenu", t), e.preventDefault = t.preventDefault;
		}
		function g(t) {
			var n = {
				originalEvent: t.originalEvent,
				preventDefaultAction: !1,
				preventVerticalPan: t.preventVerticalPan || !this.panVertical,
				preventHorizontalPan: t.preventHorizontalPan || !this.panHorizontal
			};
			if (this.raiseEvent("canvas-key", n), !n.preventDefaultAction && !t.ctrl && !t.alt && !t.meta) switch (t.keyCode) {
				case 38:
					n.preventVerticalPan || (t.shift ? this.viewport.zoomBy(1.1) : this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0, -this.pixelsPerArrowPress))), this.viewport.applyConstraints()), t.preventDefault = !0;
					break;
				case 40:
					n.preventVerticalPan || (t.shift ? this.viewport.zoomBy(.9) : this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0, this.pixelsPerArrowPress))), this.viewport.applyConstraints()), t.preventDefault = !0;
					break;
				case 37:
					n.preventHorizontalPan || (this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-this.pixelsPerArrowPress, 0))), this.viewport.applyConstraints()), t.preventDefault = !0;
					break;
				case 39:
					n.preventHorizontalPan || (this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(this.pixelsPerArrowPress, 0))), this.viewport.applyConstraints()), t.preventDefault = !0;
					break;
				case 187:
					this.viewport.zoomBy(1.1), this.viewport.applyConstraints(), t.preventDefault = !0;
					break;
				case 189:
					this.viewport.zoomBy(.9), this.viewport.applyConstraints(), t.preventDefault = !0;
					break;
				case 48:
					this.viewport.goHome(), this.viewport.applyConstraints(), t.preventDefault = !0;
					break;
				case 87:
					n.preventVerticalPan || (t.shift ? this.viewport.zoomBy(1.1) : this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0, -40))), this.viewport.applyConstraints()), t.preventDefault = !0;
					break;
				case 83:
					n.preventVerticalPan || (t.shift ? this.viewport.zoomBy(.9) : this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(0, 40))), this.viewport.applyConstraints()), t.preventDefault = !0;
					break;
				case 65:
					n.preventHorizontalPan || (this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(-40, 0))), this.viewport.applyConstraints()), t.preventDefault = !0;
					break;
				case 68:
					n.preventHorizontalPan || (this.viewport.panBy(this.viewport.deltaPointsFromPixels(new e.Point(40, 0))), this.viewport.applyConstraints()), t.preventDefault = !0;
					break;
				case 82:
					t.shift ? this.viewport.flipped ? this.viewport.setRotation(this.viewport.getRotation() + this.rotationIncrement) : this.viewport.setRotation(this.viewport.getRotation() - this.rotationIncrement) : this.viewport.flipped ? this.viewport.setRotation(this.viewport.getRotation() - this.rotationIncrement) : this.viewport.setRotation(this.viewport.getRotation() + this.rotationIncrement), this.viewport.applyConstraints(), t.preventDefault = !0;
					break;
				case 70:
					this.viewport.toggleFlip(), t.preventDefault = !0;
					break;
				case 74:
					this.goToPreviousPage();
					break;
				case 75:
					this.goToNextPage();
					break;
				default: t.preventDefault = !1;
			}
			else t.preventDefault = !1;
		}
		function _(e) {
			var t = { originalEvent: e.originalEvent };
			this.raiseEvent("canvas-key-press", t);
		}
		function v(n) {
			var r;
			document.activeElement !== this.canvas && this.canvas.focus(), this.viewport.flipped && (n.position.x = this.viewport.getContainerSize().x - n.position.x);
			var i = {
				tracker: n.eventSource,
				position: n.position,
				quick: n.quick,
				shift: n.shift,
				originalEvent: n.originalEvent,
				originalTarget: n.originalTarget,
				preventDefaultAction: !1
			};
			this.raiseEvent("canvas-click", i), !i.preventDefaultAction && this.viewport && n.quick && (r = this.gestureSettingsByDeviceType(n.pointerType), r.clickToZoom === !0 && (this.viewport.zoomBy(n.shift ? 1 / this.zoomPerClick : this.zoomPerClick, r.zoomToRefPoint ? this.viewport.pointFromPixel(n.position, !0) : null), this.viewport.applyConstraints()), r.dblClickDragToZoom && (t[this.hash].draggingToZoom === !0 ? (t[this.hash].lastClickTime = null, t[this.hash].draggingToZoom = !1) : t[this.hash].lastClickTime = e.now()));
		}
		function y(e) {
			var t, n = {
				tracker: e.eventSource,
				position: e.position,
				shift: e.shift,
				originalEvent: e.originalEvent,
				preventDefaultAction: !1
			};
			this.raiseEvent("canvas-double-click", n), !n.preventDefaultAction && this.viewport && (t = this.gestureSettingsByDeviceType(e.pointerType), t.dblClickToZoom && (this.viewport.zoomBy(e.shift ? 1 / this.zoomPerClick : this.zoomPerClick, t.zoomToRefPoint ? this.viewport.pointFromPixel(e.position, !0) : null), this.viewport.applyConstraints()));
		}
		function b(e) {
			var n, r = {
				tracker: e.eventSource,
				pointerType: e.pointerType,
				position: e.position,
				delta: e.delta,
				speed: e.speed,
				direction: e.direction,
				shift: e.shift,
				originalEvent: e.originalEvent,
				preventDefaultAction: !1
			};
			if (this.raiseEvent("canvas-drag", r), n = this.gestureSettingsByDeviceType(e.pointerType), !r.preventDefaultAction && this.viewport) {
				if (n.dblClickDragToZoom && t[this.hash].draggingToZoom) {
					var i = this.zoomPerDblClickDrag ** (e.delta.y / 50);
					this.viewport.zoomBy(i);
				} else if (n.dragToPan && !t[this.hash].draggingToZoom) {
					if (this.panHorizontal || (e.delta.x = 0), this.panVertical || (e.delta.y = 0), this.viewport.flipped && (e.delta.x = -e.delta.x), this.constrainDuringPan) {
						var a = this.viewport.deltaPointsFromPixels(e.delta.negate());
						this.viewport.centerSpringX.target.value += a.x, this.viewport.centerSpringY.target.value += a.y;
						var o = this.viewport.getConstrainedBounds();
						this.viewport.centerSpringX.target.value -= a.x, this.viewport.centerSpringY.target.value -= a.y, o.xConstrained && (e.delta.x = 0), o.yConstrained && (e.delta.y = 0);
					}
					this.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta.negate()), n.flickEnabled && !this.constrainDuringPan);
				}
			}
		}
		function x(n) {
			var r, i = {
				tracker: n.eventSource,
				pointerType: n.pointerType,
				position: n.position,
				speed: n.speed,
				direction: n.direction,
				shift: n.shift,
				originalEvent: n.originalEvent,
				preventDefaultAction: !1
			};
			if (this.raiseEvent("canvas-drag-end", i), r = this.gestureSettingsByDeviceType(n.pointerType), !i.preventDefaultAction && this.viewport) {
				if (!t[this.hash].draggingToZoom && r.dragToPan && r.flickEnabled && n.speed >= r.flickMinSpeed) {
					var a = 0;
					this.panHorizontal && (a = r.flickMomentum * n.speed * Math.cos(n.direction));
					var o = 0;
					this.panVertical && (o = r.flickMomentum * n.speed * Math.sin(n.direction));
					var s = this.viewport.pixelFromPoint(this.viewport.getCenter(!0)), c = this.viewport.pointFromPixel(new e.Point(s.x - a, s.y - o));
					this.viewport.panTo(c, !1);
				}
				this.viewport.applyConstraints();
			}
			r.dblClickDragToZoom && t[this.hash].draggingToZoom === !0 && (t[this.hash].draggingToZoom = !1);
		}
		function S(e) {
			this.raiseEvent("canvas-enter", {
				tracker: e.eventSource,
				pointerType: e.pointerType,
				position: e.position,
				buttons: e.buttons,
				pointers: e.pointers,
				insideElementPressed: e.insideElementPressed,
				buttonDownAny: e.buttonDownAny,
				originalEvent: e.originalEvent
			});
		}
		function C(e) {
			this.raiseEvent("canvas-exit", {
				tracker: e.eventSource,
				pointerType: e.pointerType,
				position: e.position,
				buttons: e.buttons,
				pointers: e.pointers,
				insideElementPressed: e.insideElementPressed,
				buttonDownAny: e.buttonDownAny,
				originalEvent: e.originalEvent
			});
		}
		function w(n) {
			var r;
			if (this.raiseEvent("canvas-press", {
				tracker: n.eventSource,
				pointerType: n.pointerType,
				position: n.position,
				insideElementPressed: n.insideElementPressed,
				insideElementReleased: n.insideElementReleased,
				originalEvent: n.originalEvent
			}), r = this.gestureSettingsByDeviceType(n.pointerType), r.dblClickDragToZoom) {
				var i = t[this.hash].lastClickTime, a = e.now();
				if (i === null) return;
				a - i < this.dblClickTimeThreshold && (t[this.hash].draggingToZoom = !0), t[this.hash].lastClickTime = null;
			}
		}
		function T(e) {
			this.raiseEvent("canvas-release", {
				tracker: e.eventSource,
				pointerType: e.pointerType,
				position: e.position,
				insideElementPressed: e.insideElementPressed,
				insideElementReleased: e.insideElementReleased,
				originalEvent: e.originalEvent
			});
		}
		function E(e) {
			this.raiseEvent("canvas-nonprimary-press", {
				tracker: e.eventSource,
				position: e.position,
				pointerType: e.pointerType,
				button: e.button,
				buttons: e.buttons,
				originalEvent: e.originalEvent
			});
		}
		function ee(e) {
			this.raiseEvent("canvas-nonprimary-release", {
				tracker: e.eventSource,
				position: e.position,
				pointerType: e.pointerType,
				button: e.button,
				buttons: e.buttons,
				originalEvent: e.originalEvent
			});
		}
		function D(e) {
			var t, n, r, i, a = {
				tracker: e.eventSource,
				pointerType: e.pointerType,
				gesturePoints: e.gesturePoints,
				lastCenter: e.lastCenter,
				center: e.center,
				lastDistance: e.lastDistance,
				distance: e.distance,
				shift: e.shift,
				originalEvent: e.originalEvent,
				preventDefaultPanAction: !1,
				preventDefaultZoomAction: !1,
				preventDefaultRotateAction: !1
			};
			if (this.raiseEvent("canvas-pinch", a), this.viewport && (t = this.gestureSettingsByDeviceType(e.pointerType), t.pinchToZoom && (!a.preventDefaultPanAction || !a.preventDefaultZoomAction) && (n = this.viewport.pointFromPixel(e.center, !0), t.zoomToRefPoint && !a.preventDefaultPanAction && (r = this.viewport.pointFromPixel(e.lastCenter, !0), i = r.minus(n), this.panHorizontal || (i.x = 0), this.panVertical || (i.y = 0), this.viewport.panBy(i, !0)), a.preventDefaultZoomAction || this.viewport.zoomBy(e.distance / e.lastDistance, n, !0), this.viewport.applyConstraints()), t.pinchRotate && !a.preventDefaultRotateAction)) {
				var o = Math.atan2(e.gesturePoints[0].currentPos.y - e.gesturePoints[1].currentPos.y, e.gesturePoints[0].currentPos.x - e.gesturePoints[1].currentPos.x), s = Math.atan2(e.gesturePoints[0].lastPos.y - e.gesturePoints[1].lastPos.y, e.gesturePoints[0].lastPos.x - e.gesturePoints[1].lastPos.x);
				n = this.viewport.pointFromPixel(e.center, !0), this.viewport.rotateTo(this.viewport.getRotation(!0) + (o - s) * (180 / Math.PI), n, !0);
			}
		}
		function te(e) {
			this.raiseEvent("canvas-focus", {
				tracker: e.eventSource,
				originalEvent: e.originalEvent
			});
		}
		function ne(e) {
			this.raiseEvent("canvas-blur", {
				tracker: e.eventSource,
				originalEvent: e.originalEvent
			});
		}
		function re(t) {
			var n, r, i, a = e.now();
			a - this._lastScrollTime > this.minScrollDeltaTime ? (this._lastScrollTime = a, n = {
				tracker: t.eventSource,
				position: t.position,
				scroll: t.scroll,
				shift: t.shift,
				originalEvent: t.originalEvent,
				preventDefaultAction: !1,
				preventDefault: !0
			}, this.raiseEvent("canvas-scroll", n), !n.preventDefaultAction && this.viewport && (this.viewport.flipped && (t.position.x = this.viewport.getContainerSize().x - t.position.x), r = this.gestureSettingsByDeviceType(t.pointerType), r.scrollToZoom && (i = this.zoomPerScroll ** +t.scroll, this.viewport.zoomBy(i, r.zoomToRefPoint ? this.viewport.pointFromPixel(t.position, !0) : null), this.viewport.applyConstraints())), t.preventDefault = n.preventDefault) : t.preventDefault = !0;
		}
		function ie(e) {
			t[this.hash].mouseInside = !0, f(this), this.raiseEvent("container-enter", {
				tracker: e.eventSource,
				pointerType: e.pointerType,
				position: e.position,
				buttons: e.buttons,
				pointers: e.pointers,
				insideElementPressed: e.insideElementPressed,
				buttonDownAny: e.buttonDownAny,
				originalEvent: e.originalEvent
			});
		}
		function ae(e) {
			e.pointers < 1 && (t[this.hash].mouseInside = !1, t[this.hash].animating || u(this)), this.raiseEvent("container-exit", {
				tracker: e.eventSource,
				pointerType: e.pointerType,
				position: e.position,
				buttons: e.buttons,
				pointers: e.pointers,
				insideElementPressed: e.insideElementPressed,
				buttonDownAny: e.buttonDownAny,
				originalEvent: e.originalEvent
			});
		}
		function oe(e) {
			O(e), e._updateRequestId = e.isOpen() ? c(e, oe) : !1;
		}
		function se(n, r) {
			var i = n.viewport, a = i.getZoom(), o = i.getCenter();
			i.resize(r, n.preserveImageSizeOnResize), i.panTo(o, !0);
			var s;
			if (n.preserveImageSizeOnResize) s = t[n.hash].prevContainerSize.x / r.x;
			else {
				var c = new e.Point(0, 0), l = new e.Point(t[n.hash].prevContainerSize.x, t[n.hash].prevContainerSize.y).distanceTo(c);
				s = new e.Point(r.x, r.y).distanceTo(c) / l * t[n.hash].prevContainerSize.x / r.x;
			}
			i.zoomTo(a * s, null, !0), t[n.hash].prevContainerSize = r, t[n.hash].forceRedraw = !0, t[n.hash].needsResize = !1, t[n.hash].forceResize = !1;
		}
		function O(e) {
			if (!(e._opening || !t[e.hash])) {
				if (e.autoResize || t[e.hash].forceResize) {
					var n;
					if (e._autoResizePolling) {
						n = i(e.container);
						var r = t[e.hash].prevContainerSize;
						n.equals(r) || (t[e.hash].needsResize = !0);
					}
					t[e.hash].needsResize && se(e, n || i(e.container));
				}
				var a = e.viewport.update(), o = e.world.update(a) || a;
				a && e.raiseEvent("viewport-change"), e.referenceStrip && (o = e.referenceStrip.update(e.viewport) || o);
				var s = t[e.hash].animating;
				!s && o && (e.raiseEvent("animation-start"), f(e));
				var c = s && !o;
				c && (t[e.hash].animating = !1), (o || c || t[e.hash].forceRedraw || e.world.needsDraw()) && (ce(e), e._drawOverlays(), e.navigator && e.navigator.update(e.viewport), t[e.hash].forceRedraw = !1, o && e.raiseEvent("animation")), c && (e.raiseEvent("animation-finish"), t[e.hash].mouseInside || u(e)), t[e.hash].animating = o;
			}
		}
		function ce(e) {
			e.imageLoader.clear(), e.world.draw(), e.raiseEvent("update-viewport", {});
		}
		function k(e, t) {
			return e ? e + t : t;
		}
		function le() {
			t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = this.zoomPerSecond, t[this.hash].zooming = !0, fe(this);
		}
		function ue() {
			t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = 1 / this.zoomPerSecond, t[this.hash].zooming = !0, fe(this);
		}
		function de() {
			t[this.hash].zooming = !1;
		}
		function fe(t) {
			e.requestAnimationFrame(e.delegate(t, pe));
		}
		function pe() {
			var n, r, i;
			t[this.hash].zooming && this.viewport && (n = e.now(), r = n - t[this.hash].lastZoomTime, i = t[this.hash].zoomFactor ** (r / 1e3), this.viewport.zoomBy(i), this.viewport.applyConstraints(), t[this.hash].lastZoomTime = n, fe(this));
		}
		function me() {
			this.viewport && (t[this.hash].zooming = !1, this.viewport.zoomBy(this.zoomPerClick / 1), this.viewport.applyConstraints());
		}
		function he() {
			this.viewport && (t[this.hash].zooming = !1, this.viewport.zoomBy(1 / this.zoomPerClick), this.viewport.applyConstraints());
		}
		function ge() {
			this.buttonGroup && (this.buttonGroup.emulateEnter(), this.buttonGroup.emulateLeave());
		}
		function _e() {
			this.viewport && this.viewport.goHome();
		}
		function ve() {
			this.isFullPage() && !e.isFullScreen() ? this.setFullPage(!1) : this.setFullScreen(!this.isFullPage()), this.buttonGroup && this.buttonGroup.emulateLeave(), this.fullPageButton.element.focus(), this.viewport && this.viewport.applyConstraints();
		}
		function ye() {
			if (this.viewport) {
				var e = this.viewport.getRotation();
				this.viewport.flipped ? e += this.rotationIncrement : e -= this.rotationIncrement, this.viewport.setRotation(e);
			}
		}
		function be() {
			if (this.viewport) {
				var e = this.viewport.getRotation();
				this.viewport.flipped ? e -= this.rotationIncrement : e += this.rotationIncrement, this.viewport.setRotation(e);
			}
		}
		function xe() {
			this.viewport.toggleFlip();
		}
		e.determineDrawer = function(t) {
			for (let r in n) {
				let i = n[r], a = i.prototype;
				if (a && a instanceof n.DrawerBase && e.isFunction(a.getType) && a.getType.call(i) === t) return i;
			}
			return null;
		};
	})(n), (function(e) {
		e.Navigator = function(o) {
			var s = o.viewer, c = this, l, u;
			o.element || o.id ? (o.element ? (o.id && e.console.warn("Given option.id for Navigator was ignored since option.element was provided and is being used instead."), o.element.id ? o.id = o.element.id : o.id = "navigator-" + e.now(), this.element = o.element) : this.element = document.getElementById(o.id), o.controlOptions = {
				anchor: e.ControlAnchor.NONE,
				attachToViewer: !1,
				autoFade: !1
			}) : (o.id = "navigator-" + e.now(), this.element = e.makeNeutralElement("div"), o.controlOptions = {
				anchor: e.ControlAnchor.TOP_RIGHT,
				attachToViewer: !0,
				autoFade: o.autoFade
			}, o.position && (o.position === "BOTTOM_RIGHT" ? o.controlOptions.anchor = e.ControlAnchor.BOTTOM_RIGHT : o.position === "BOTTOM_LEFT" ? o.controlOptions.anchor = e.ControlAnchor.BOTTOM_LEFT : o.position === "TOP_RIGHT" ? o.controlOptions.anchor = e.ControlAnchor.TOP_RIGHT : o.position === "TOP_LEFT" ? o.controlOptions.anchor = e.ControlAnchor.TOP_LEFT : o.position === "ABSOLUTE" && (o.controlOptions.anchor = e.ControlAnchor.ABSOLUTE, o.controlOptions.top = o.top, o.controlOptions.left = o.left, o.controlOptions.height = o.height, o.controlOptions.width = o.width))), this.element.id = o.id, this.element.className += " navigator", o = e.extend(!0, { sizeRatio: e.DEFAULT_SETTINGS.navigatorSizeRatio }, o, {
				element: this.element,
				tabIndex: -1,
				showNavigator: !1,
				mouseNavEnabled: !1,
				showNavigationControl: !1,
				showSequenceControl: !1,
				immediateRender: !0,
				blendTime: 0,
				animationTime: o.animationTime,
				autoResize: !1,
				minZoomImageRatio: 1,
				background: o.background,
				opacity: o.opacity,
				borderColor: o.borderColor,
				displayRegionColor: o.displayRegionColor
			}), o.minPixelRatio = this.minPixelRatio = s.minPixelRatio, e.setElementTouchActionNone(this.element), this.borderWidth = 2, this.fudge = new e.Point(1, 1), this.totalBorderWidths = new e.Point(this.borderWidth * 2, this.borderWidth * 2).minus(this.fudge), o.controlOptions.anchor !== e.ControlAnchor.NONE && (function(e, t) {
				e.margin = "0px", e.border = t + "px solid " + o.borderColor, e.padding = "0px", e.background = o.background, e.opacity = o.opacity, e.overflow = "hidden";
			})(this.element.style, this.borderWidth), this.displayRegion = e.makeNeutralElement("div"), this.displayRegion.id = this.element.id + "-displayregion", this.displayRegion.className = "displayregion", (function(e, t) {
				e.position = "relative", e.top = "0px", e.left = "0px", e.fontSize = "0px", e.overflow = "hidden", e.border = t + "px solid " + o.displayRegionColor, e.margin = "0px", e.padding = "0px", e.background = "transparent", e.float = "left", e.cssFloat = "left", e.zIndex = 999999999, e.cursor = "default", e.boxSizing = "content-box";
			})(this.displayRegion.style, this.borderWidth), e.setElementPointerEventsNone(this.displayRegion), e.setElementTouchActionNone(this.displayRegion), this.displayRegionContainer = e.makeNeutralElement("div"), this.displayRegionContainer.id = this.element.id + "-displayregioncontainer", this.displayRegionContainer.className = "displayregioncontainer", this.displayRegionContainer.style.width = "100%", this.displayRegionContainer.style.height = "100%", e.setElementPointerEventsNone(this.displayRegionContainer), e.setElementTouchActionNone(this.displayRegionContainer), s.addControl(this.element, o.controlOptions), this._resizeWithViewer = o.controlOptions.anchor !== e.ControlAnchor.ABSOLUTE && o.controlOptions.anchor !== e.ControlAnchor.NONE, o.width && o.height ? (this.setWidth(o.width), this.setHeight(o.height)) : this._resizeWithViewer && (l = e.getElementSize(s.element), this.element.style.height = Math.round(l.y * o.sizeRatio) + "px", this.element.style.width = Math.round(l.x * o.sizeRatio) + "px", this.oldViewerSize = l, u = e.getElementSize(this.element), this.elementArea = u.x * u.y), this.oldContainerSize = new e.Point(0, 0), e.Viewer.apply(this, [o]), this.displayRegionContainer.appendChild(this.displayRegion), this.element.getElementsByTagName("div")[0].appendChild(this.displayRegionContainer);
			function d(e, t) {
				a(c.displayRegionContainer, e), a(c.displayRegion, -e), c.viewport.setRotation(e, t);
			}
			o.navigatorRotate && (d(o.viewer.viewport ? o.viewer.viewport.getRotation() : o.viewer.degrees || 0, !0), o.viewer.addHandler("rotate", function(e) {
				d(e.degrees, e.immediately);
			})), this.innerTracker.destroy(), this.innerTracker = new e.MouseTracker({
				userData: "Navigator.innerTracker",
				element: this.element,
				dragHandler: e.delegate(this, n),
				clickHandler: e.delegate(this, t),
				releaseHandler: e.delegate(this, r),
				scrollHandler: e.delegate(this, i),
				preProcessEventHandler: function(e) {
					e.eventType === "wheel" && (e.preventDefault = !0);
				}
			}), this.outerTracker.userData = "Navigator.outerTracker", e.setElementPointerEventsNone(this.canvas), e.setElementPointerEventsNone(this.container), this.addHandler("reset-size", function() {
				c.viewport && c.viewport.goHome(!0);
			}), s.world.addHandler("item-index-change", function(e) {
				window.setTimeout(function() {
					var t = c.world.getItemAt(e.previousIndex);
					c.world.setItemIndex(t, e.newIndex);
				}, 1);
			}), s.world.addHandler("remove-item", function(e) {
				var t = e.item, n = c._getMatchingItem(t);
				n && c.world.removeItem(n);
			}), this.update(s.viewport);
		}, e.extend(e.Navigator.prototype, e.EventSource.prototype, e.Viewer.prototype, {
			updateSize: function() {
				if (this.viewport) {
					var t = new e.Point(this.container.clientWidth === 0 ? 1 : this.container.clientWidth, this.container.clientHeight === 0 ? 1 : this.container.clientHeight);
					t.equals(this.oldContainerSize) || (this.viewport.resize(t, !0), this.viewport.goHome(!0), this.oldContainerSize = t, this.world.update(), this.world.draw(), this.update(this.viewer.viewport));
				}
			},
			setWidth: function(e) {
				this.width = e, this.element.style.width = typeof e == "number" ? e + "px" : e, this._resizeWithViewer = !1, this.updateSize();
			},
			setHeight: function(e) {
				this.height = e, this.element.style.height = typeof e == "number" ? e + "px" : e, this._resizeWithViewer = !1, this.updateSize();
			},
			setFlip: function(e) {
				return this.viewport.setFlip(e), this.setDisplayTransform(this.viewer.viewport.getFlip() ? "scale(-1,1)" : "scale(1,1)"), this;
			},
			setDisplayTransform: function(e) {
				o(this.canvas, e), o(this.element, e);
			},
			update: function(t) {
				var n, r, i, o, s, c;
				if (t ||= this.viewer.viewport, n = e.getElementSize(this.viewer.element), this._resizeWithViewer && n.x && n.y && !n.equals(this.oldViewerSize) && (this.oldViewerSize = n, this.maintainSizeRatio || !this.elementArea ? (r = n.x * this.sizeRatio, i = n.y * this.sizeRatio) : (r = Math.sqrt(this.elementArea * (n.x / n.y)), i = this.elementArea / r), this.element.style.width = Math.round(r) + "px", this.element.style.height = Math.round(i) + "px", this.elementArea ||= r * i, this.updateSize()), t && this.viewport) {
					if (o = t.getBoundsNoRotate(!0), s = this.viewport.pixelFromPointNoRotate(o.getTopLeft(), !1), c = this.viewport.pixelFromPointNoRotate(o.getBottomRight(), !1).minus(this.totalBorderWidths), !this.navigatorRotate) {
						var l = t.getRotation(!0);
						a(this.displayRegion, -l);
					}
					var u = this.displayRegion.style;
					u.display = this.world.getItemCount() ? "block" : "none", u.top = s.y.toFixed(2) + "px", u.left = s.x.toFixed(2) + "px";
					var d = c.x - s.x, f = c.y - s.y;
					u.width = Math.round(Math.max(d, 0)) + "px", u.height = Math.round(Math.max(f, 0)) + "px";
				}
			},
			addTiledImage: function(t) {
				var n = this, r = t.originalTiledImage;
				delete t.original;
				var i = e.extend({}, t, { success: function(e) {
					var t = e.item;
					t._originalForNavigator = r, n._matchBounds(t, r, !0), n._matchOpacity(t, r), n._matchCompositeOperation(t, r);
					function i() {
						n._matchBounds(t, r);
					}
					function a() {
						n._matchOpacity(t, r);
					}
					function o() {
						n._matchCompositeOperation(t, r);
					}
					r.addHandler("bounds-change", i), r.addHandler("clip-change", i), r.addHandler("opacity-change", a), r.addHandler("composite-operation-change", o);
				} });
				return e.Viewer.prototype.addTiledImage.apply(this, [i]);
			},
			destroy: function() {
				return e.Viewer.prototype.destroy.apply(this);
			},
			_getMatchingItem: function(e) {
				for (var t = this.world.getItemCount(), n, r = 0; r < t; r++) if (n = this.world.getItemAt(r), n._originalForNavigator === e) return n;
				return null;
			},
			_matchBounds: function(e, t, n) {
				var r = t.getBoundsNoRotate();
				e.setPosition(r.getTopLeft(), n), e.setWidth(r.width, n), e.setRotation(t.getRotation(), n), e.setClip(t.getClip()), e.setFlip(t.getFlip());
			},
			_matchOpacity: function(e, t) {
				e.setOpacity(t.opacity);
			},
			_matchCompositeOperation: function(e, t) {
				e.setCompositeOperation(t.compositeOperation);
			}
		});
		function t(e) {
			var t = {
				tracker: e.eventSource,
				position: e.position,
				quick: e.quick,
				shift: e.shift,
				originalEvent: e.originalEvent,
				preventDefaultAction: !1
			};
			if (this.viewer.raiseEvent("navigator-click", t), !t.preventDefaultAction && e.quick && this.viewer.viewport && (this.panVertical || this.panHorizontal)) {
				this.viewer.viewport.flipped && (e.position.x = this.viewport.getContainerSize().x - e.position.x);
				var n = this.viewport.pointFromPixel(e.position);
				this.panVertical ? this.panHorizontal || (n.x = this.viewer.viewport.getCenter(!0).x) : n.y = this.viewer.viewport.getCenter(!0).y, this.viewer.viewport.panTo(n), this.viewer.viewport.applyConstraints();
			}
		}
		function n(e) {
			var t = {
				tracker: e.eventSource,
				position: e.position,
				delta: e.delta,
				speed: e.speed,
				direction: e.direction,
				shift: e.shift,
				originalEvent: e.originalEvent,
				preventDefaultAction: !1
			};
			this.viewer.raiseEvent("navigator-drag", t), !t.preventDefaultAction && this.viewer.viewport && (this.panHorizontal || (e.delta.x = 0), this.panVertical || (e.delta.y = 0), this.viewer.viewport.flipped && (e.delta.x = -e.delta.x), this.viewer.viewport.panBy(this.viewport.deltaPointsFromPixels(e.delta)), this.viewer.constrainDuringPan && this.viewer.viewport.applyConstraints());
		}
		function r(e) {
			e.insideElementPressed && this.viewer.viewport && this.viewer.viewport.applyConstraints();
		}
		function i(e) {
			var t = {
				tracker: e.eventSource,
				position: e.position,
				scroll: e.scroll,
				shift: e.shift,
				originalEvent: e.originalEvent,
				preventDefault: e.preventDefault
			};
			this.viewer.raiseEvent("navigator-scroll", t), e.preventDefault = t.preventDefault;
		}
		function a(e, t) {
			o(e, "rotate(" + t + "deg)");
		}
		function o(e, t) {
			e.style.webkitTransform = t, e.style.mozTransform = t, e.style.msTransform = t, e.style.oTransform = t, e.style.transform = t;
		}
	})(n), (function(e) {
		var t = {
			Errors: {
				Dzc: "Sorry, we don't support Deep Zoom Collections!",
				Dzi: "Hmm, this doesn't appear to be a valid Deep Zoom Image.",
				Xml: "Hmm, this doesn't appear to be a valid Deep Zoom Image.",
				ImageFormat: "Sorry, we don't support {0}-based Deep Zoom Images.",
				Security: "It looks like a security restriction stopped us from loading this Deep Zoom Image.",
				Status: "This space unintentionally left blank ({0} {1}).",
				OpenFailed: "Unable to open {0}: {1}"
			},
			Tooltips: {
				FullPage: "Toggle full page",
				Home: "Go home",
				ZoomIn: "Zoom in",
				ZoomOut: "Zoom out",
				NextPage: "Next page",
				PreviousPage: "Previous page",
				RotateLeft: "Rotate left",
				RotateRight: "Rotate right",
				Flip: "Flip Horizontally"
			}
		};
		e.extend(e, {
			getString: function(n) {
				var r = n.split("."), i = null, a = arguments, o = t, s;
				for (s = 0; s < r.length - 1; s++) o = o[r[s]] || {};
				return i = o[r[s]], typeof i != "string" && (e.console.error("Untranslated source string:", n), i = ""), i.replace(/\{\d+\}/g, function(e) {
					var t = parseInt(e.match(/\d+/), 10) + 1;
					return t < a.length ? a[t] : "";
				});
			},
			setString: function(e, n) {
				var r = e.split("."), i = t, a;
				for (a = 0; a < r.length - 1; a++) i[r[a]] || (i[r[a]] = {}), i = i[r[a]];
				i[r[a]] = n;
			}
		});
	})(n), (function(e) {
		e.Point = function(e, t) {
			this.x = typeof e == "number" ? e : 0, this.y = typeof t == "number" ? t : 0;
		}, e.Point.prototype = {
			clone: function() {
				return new e.Point(this.x, this.y);
			},
			plus: function(t) {
				return new e.Point(this.x + t.x, this.y + t.y);
			},
			minus: function(t) {
				return new e.Point(this.x - t.x, this.y - t.y);
			},
			times: function(t) {
				return new e.Point(this.x * t, this.y * t);
			},
			divide: function(t) {
				return new e.Point(this.x / t, this.y / t);
			},
			negate: function() {
				return new e.Point(-this.x, -this.y);
			},
			distanceTo: function(e) {
				return Math.sqrt((this.x - e.x) ** 2 + (this.y - e.y) ** 2);
			},
			squaredDistanceTo: function(e) {
				return (this.x - e.x) ** 2 + (this.y - e.y) ** 2;
			},
			apply: function(t) {
				return new e.Point(t(this.x), t(this.y));
			},
			equals: function(t) {
				return t instanceof e.Point && this.x === t.x && this.y === t.y;
			},
			rotate: function(t, n) {
				n ||= new e.Point(0, 0);
				var r, i;
				if (t % 90 == 0) switch (e.positiveModulo(t, 360)) {
					case 0:
						r = 1, i = 0;
						break;
					case 90:
						r = 0, i = 1;
						break;
					case 180:
						r = -1, i = 0;
						break;
					case 270: r = 0, i = -1;
				}
				else {
					var a = t * Math.PI / 180;
					r = Math.cos(a), i = Math.sin(a);
				}
				var o = r * (this.x - n.x) - i * (this.y - n.y) + n.x, s = i * (this.x - n.x) + r * (this.y - n.y) + n.y;
				return new e.Point(o, s);
			},
			toString: function() {
				return "(" + Math.round(this.x * 100) / 100 + "," + Math.round(this.y * 100) / 100 + ")";
			}
		};
	})(n), (function(e) {
		e.TileSource = function(t, n, r, i, a, o) {
			var s = this, c = arguments, l = e.isPlainObject(t) ? t : {
				width: c[0],
				height: c[1],
				tileSize: c[2],
				tileOverlap: c[3],
				minLevel: c[4],
				maxLevel: c[5]
			}, u;
			if (e.EventSource.call(this), e.extend(!0, this, l), !this.success) {
				for (u = 0; u < arguments.length; u++) if (e.isFunction(arguments[u])) {
					this.success = arguments[u];
					break;
				}
			}
			this.success && this.addHandler("ready", function(e) {
				s.success(e);
			}), e.type(arguments[0]) === "string" && (this.url = arguments[0]), this.url ? (this.aspectRatio = 1, this.dimensions = new e.Point(10, 10), this._tileWidth = 0, this._tileHeight = 0, this.tileOverlap = 0, this.minLevel = 0, this.maxLevel = 0, this.ready = !1, this.getImageInfo(this.url)) : (this.ready = !0, this.aspectRatio = l.width && l.height ? l.width / l.height : 1, this.dimensions = new e.Point(l.width, l.height), this.tileSize ? (this._tileWidth = this._tileHeight = this.tileSize, delete this.tileSize) : (this.tileWidth ? (this._tileWidth = this.tileWidth, delete this.tileWidth) : this._tileWidth = 0, this.tileHeight ? (this._tileHeight = this.tileHeight, delete this.tileHeight) : this._tileHeight = 0), this.tileOverlap = l.tileOverlap ? l.tileOverlap : 0, this.minLevel = l.minLevel ? l.minLevel : 0, this.maxLevel = l.maxLevel !== void 0 && l.maxLevel !== null ? l.maxLevel : l.width && l.height ? Math.ceil(Math.log(Math.max(l.width, l.height)) / Math.log(2)) : 0, this.success && e.isFunction(this.success) && this.success(this));
		}, e.TileSource.prototype = {
			getTileSize: function(t) {
				return e.console.error("[TileSource.getTileSize] is deprecated. Use TileSource.getTileWidth() and TileSource.getTileHeight() instead"), this._tileWidth;
			},
			getTileWidth: function(e) {
				return this._tileWidth ? this._tileWidth : this.getTileSize(e);
			},
			getTileHeight: function(e) {
				return this._tileHeight ? this._tileHeight : this.getTileSize(e);
			},
			setMaxLevel: function(e) {
				this.maxLevel = e, this._memoizeLevelScale();
			},
			getLevelScale: function(e) {
				return this._memoizeLevelScale(), this.getLevelScale(e);
			},
			_memoizeLevelScale: function() {
				var e = {}, t;
				for (t = 0; t <= this.maxLevel; t++) e[t] = 1 / 2 ** (this.maxLevel - t);
				this.getLevelScale = function(t) {
					return e[t];
				};
			},
			getNumTiles: function(t) {
				var n = this.getLevelScale(t), r = Math.ceil(n * this.dimensions.x / this.getTileWidth(t)), i = Math.ceil(n * this.dimensions.y / this.getTileHeight(t));
				return new e.Point(r, i);
			},
			getPixelRatio: function(t) {
				var n = this.dimensions.times(this.getLevelScale(t)), r = 1 / n.x * e.pixelDensityRatio, i = 1 / n.y * e.pixelDensityRatio;
				return new e.Point(r, i);
			},
			getClosestLevel: function() {
				var e, t;
				for (e = this.minLevel + 1; e <= this.maxLevel && (t = this.getNumTiles(e), !(t.x > 1 || t.y > 1)); e++);
				return e - 1;
			},
			getTileAtPoint: function(t, n) {
				var r = n.x >= 0 && n.x <= 1 && n.y >= 0 && n.y <= 1 / this.aspectRatio;
				e.console.assert(r, "[TileSource.getTileAtPoint] must be called with a valid point.");
				var i = this.dimensions.x * this.getLevelScale(t), a = n.x * i, o = n.y * i, s = Math.floor(a / this.getTileWidth(t)), c = Math.floor(o / this.getTileHeight(t));
				return n.x >= 1 && (s = this.getNumTiles(t).x - 1), n.y >= 1 / this.aspectRatio - 1e-15 && (c = this.getNumTiles(t).y - 1), new e.Point(s, c);
			},
			getTileBounds: function(t, n, r, i) {
				var a = this.dimensions.times(this.getLevelScale(t)), o = this.getTileWidth(t), s = this.getTileHeight(t), c = n === 0 ? 0 : o * n - this.tileOverlap, l = r === 0 ? 0 : s * r - this.tileOverlap, u = o + (n === 0 ? 1 : 2) * this.tileOverlap, d = s + (r === 0 ? 1 : 2) * this.tileOverlap, f = 1 / a.x;
				return u = Math.min(u, a.x - c), d = Math.min(d, a.y - l), i ? new e.Rect(0, 0, u, d) : new e.Rect(c * f, l * f, u * f, d * f);
			},
			getImageInfo: function(n) {
				var r = this, i, a, o, s, c, l, u;
				n && (c = n.split("/"), l = c[c.length - 1], u = l.lastIndexOf("."), u > -1 && (c[c.length - 1] = l.slice(0, u)));
				var d = null;
				if (this.splitHashDataForPost) {
					var f = n.indexOf("#");
					f !== -1 && (d = n.substring(f + 1), n = n.substr(0, f));
				}
				a = function(t) {
					typeof t == "string" && (t = e.parseXml(t));
					var i = e.TileSource.determineType(r, t, n);
					if (!i) {
						r.raiseEvent("open-failed", {
							message: "Unable to load TileSource",
							source: n
						});
						return;
					}
					s = i.prototype.configure.apply(r, [
						t,
						n,
						d
					]), s.ajaxWithCredentials === void 0 && (s.ajaxWithCredentials = r.ajaxWithCredentials), o = new i(s), r.ready = !0, r.raiseEvent("ready", { tileSource: o });
				}, n.match(/\.js$/) ? (i = n.split("/").pop().replace(".js", ""), e.jsonp({
					url: n,
					async: !1,
					callbackName: i,
					callback: a
				})) : e.makeAjaxRequest({
					url: n,
					postData: d,
					withCredentials: this.ajaxWithCredentials,
					headers: this.ajaxHeaders,
					success: function(e) {
						var n = t(e);
						a(n);
					},
					error: function(t, i) {
						var a;
						try {
							a = "HTTP " + t.status + " attempting to load TileSource: " + n;
						} catch {
							a = (i === void 0 || !i.toString ? "Unknown error" : i.toString()) + " attempting to load TileSource: " + n;
						}
						e.console.error(a), r.raiseEvent("open-failed", {
							message: a,
							source: n,
							postData: d
						});
					}
				});
			},
			supports: function(e, t) {
				return !1;
			},
			configure: function(e, t, n) {
				throw Error("Method not implemented.");
			},
			getTileUrl: function(e, t, n) {
				throw Error("Method not implemented.");
			},
			getTilePostData: function(e, t, n) {
				return null;
			},
			getTileAjaxHeaders: function(e, t, n) {
				return {};
			},
			getTileHashKey: function(e, t, n, r, i, a) {
				function o(e) {
					return i ? e + "+" + JSON.stringify(i) : e;
				}
				return o(typeof r == "string" ? r : e + "/" + t + "_" + n);
			},
			tileExists: function(e, t, n) {
				var r = this.getNumTiles(e);
				return e >= this.minLevel && e <= this.maxLevel && t >= 0 && n >= 0 && t < r.x && n < r.y;
			},
			hasTransparency: function(e, t, n, r) {
				return !!e || t.match(".png");
			},
			downloadTileStart: function(t) {
				var n = t.userData, r = new Image();
				n.image = r, n.request = null;
				var i = function(e) {
					if (!r) {
						t.finish(null, n.request, "Image load failed: undefined Image instance.");
						return;
					}
					r.onload = r.onerror = r.onabort = null, t.finish(e ? null : r, n.request, e);
				};
				r.onload = function() {
					i();
				}, r.onabort = r.onerror = function() {
					i("Image load aborted.");
				}, t.loadWithAjax ? n.request = e.makeAjaxRequest({
					url: t.src,
					withCredentials: t.ajaxWithCredentials,
					headers: t.ajaxHeaders,
					responseType: "arraybuffer",
					postData: t.postData,
					success: function(e) {
						var t;
						try {
							t = new window.Blob([e.response]);
						} catch (r) {
							var n = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;
							if (r.name === "TypeError" && n) {
								var a = new n();
								a.append(e.response), t = a.getBlob();
							}
						}
						t.size === 0 ? i("Empty image response.") : r.src = (window.URL || window.webkitURL).createObjectURL(t);
					},
					error: function(e) {
						i("Image load aborted - XHR error");
					}
				}) : (t.crossOriginPolicy !== !1 && (r.crossOrigin = t.crossOriginPolicy), r.src = t.src);
			},
			downloadTileAbort: function(e) {
				e.userData.request && e.userData.request.abort();
				var t = e.userData.image;
				e.userData.image && (t.onload = t.onerror = t.onabort = null);
			},
			createTileCache: function(e, t, n) {
				e._data = t;
			},
			destroyTileCache: function(e) {
				e._data = null, e._renderedContext = null;
			},
			getTileCacheData: function(e) {
				return e._data;
			},
			getTileCacheDataAsImage: function(e) {
				return e._data;
			},
			getTileCacheDataAsContext2D: function(e) {
				if (!e._renderedContext) {
					var t = document.createElement("canvas");
					t.width = e._data.width, t.height = e._data.height, e._renderedContext = t.getContext("2d"), e._renderedContext.drawImage(e._data, 0, 0), e._data = null;
				}
				return e._renderedContext;
			}
		}, e.extend(!0, e.TileSource.prototype, e.EventSource.prototype);
		function t(t) {
			var n = t.responseText, r = t.status, i, a;
			if (!t) throw Error(e.getString("Errors.Security"));
			if (t.status !== 200 && t.status !== 0) throw r = t.status, i = r === 404 ? "Not Found" : t.statusText, Error(e.getString("Errors.Status", r, i));
			if (n.match(/^\s*<.*/)) try {
				a = t.responseXML && t.responseXML.documentElement ? t.responseXML : e.parseXml(n);
			} catch {
				a = t.responseText;
			}
			else if (n.match(/\s*[{[].*/)) try {
				a = e.parseJSON(n);
			} catch {
				a = n;
			}
			else a = n;
			return a;
		}
		e.TileSource.determineType = function(t, r, i) {
			for (var a in n) if (a.match(/.+TileSource$/) && e.isFunction(n[a]) && e.isFunction(n[a].prototype.supports) && n[a].prototype.supports.call(t, r, i)) return n[a];
			return e.console.error("No TileSource was able to open %s %s", i, r), null;
		};
	})(n), (function(e) {
		e.DziTileSource = function(t, n, r, i, a, o, s, c, l) {
			var u, d, f, p = e.isPlainObject(t) ? t : {
				width: arguments[0],
				height: arguments[1],
				tileSize: arguments[2],
				tileOverlap: arguments[3],
				tilesUrl: arguments[4],
				fileFormat: arguments[5],
				displayRects: arguments[6],
				minLevel: arguments[7],
				maxLevel: arguments[8]
			};
			if (this._levelRects = {}, this.tilesUrl = p.tilesUrl, this.fileFormat = p.fileFormat, this.displayRects = p.displayRects, this.displayRects) for (u = this.displayRects.length - 1; u >= 0; u--) for (d = this.displayRects[u], f = d.minLevel; f <= d.maxLevel; f++) this._levelRects[f] || (this._levelRects[f] = []), this._levelRects[f].push(d);
			e.TileSource.apply(this, [p]);
		}, e.extend(e.DziTileSource.prototype, e.TileSource.prototype, {
			supports: function(e, t) {
				var n;
				return e.Image ? n = e.Image.xmlns : e.documentElement && (e.documentElement.localName === "Image" || e.documentElement.tagName === "Image") && (n = e.documentElement.namespaceURI), n = (n || "").toLowerCase(), n.indexOf("schemas.microsoft.com/deepzoom/2008") !== -1 || n.indexOf("schemas.microsoft.com/deepzoom/2009") !== -1;
			},
			configure: function(r, i, a) {
				var o = e.isPlainObject(r) ? n(this, r) : t(this, r);
				return i && !o.tilesUrl && (o.tilesUrl = i.replace(/([^/]+?)(\.(dzi|xml|js)?(\?[^/]*)?)?\/?$/, "$1_files/"), o.queryParams = i.search(/\.(dzi|xml|js)\?/) === -1 ? "" : i.match(/\?.*/)), o;
			},
			getTileUrl: function(e, t, n) {
				return [
					this.tilesUrl,
					e,
					"/",
					t,
					"_",
					n,
					".",
					this.fileFormat,
					this.queryParams
				].join("");
			},
			tileExists: function(e, t, n) {
				var r = this._levelRects[e], i, a, o, s, c, l, u;
				if (this.minLevel && e < this.minLevel || this.maxLevel && e > this.maxLevel) return !1;
				if (!r || !r.length) return !0;
				for (u = r.length - 1; u >= 0; u--) if (i = r[u], !(e < i.minLevel || e > i.maxLevel) && (a = this.getLevelScale(e), o = i.x * a, s = i.y * a, c = o + i.width * a, l = s + i.height * a, o = Math.floor(o / this._tileWidth), s = Math.floor(s / this._tileWidth), c = Math.ceil(c / this._tileWidth), l = Math.ceil(l / this._tileWidth), o <= t && t < c && s <= n && n < l)) return !0;
				return !1;
			}
		});
		function t(t, r) {
			if (!r || !r.documentElement) throw Error(e.getString("Errors.Xml"));
			var i = r.documentElement, a = i.localName || i.tagName, o = r.documentElement.namespaceURI, s = null, c = [], l, u, d, f, p;
			if (a === "Image") try {
				if (f = i.getElementsByTagName("Size")[0], f === void 0 && (f = i.getElementsByTagNameNS(o, "Size")[0]), s = { Image: {
					xmlns: "http://schemas.microsoft.com/deepzoom/2008",
					Url: i.getAttribute("Url"),
					Format: i.getAttribute("Format"),
					DisplayRect: null,
					Overlap: parseInt(i.getAttribute("Overlap"), 10),
					TileSize: parseInt(i.getAttribute("TileSize"), 10),
					Size: {
						Height: parseInt(f.getAttribute("Height"), 10),
						Width: parseInt(f.getAttribute("Width"), 10)
					}
				} }, !e.imageFormatSupported(s.Image.Format)) throw Error(e.getString("Errors.ImageFormat", s.Image.Format.toUpperCase()));
				for (l = i.getElementsByTagName("DisplayRect"), l === void 0 && (l = i.getElementsByTagNameNS(o, "DisplayRect")[0]), p = 0; p < l.length; p++) u = l[p], d = u.getElementsByTagName("Rect")[0], d === void 0 && (d = u.getElementsByTagNameNS(o, "Rect")[0]), c.push({ Rect: {
					X: parseInt(d.getAttribute("X"), 10),
					Y: parseInt(d.getAttribute("Y"), 10),
					Width: parseInt(d.getAttribute("Width"), 10),
					Height: parseInt(d.getAttribute("Height"), 10),
					MinLevel: parseInt(u.getAttribute("MinLevel"), 10),
					MaxLevel: parseInt(u.getAttribute("MaxLevel"), 10)
				} });
				return c.length && (s.Image.DisplayRect = c), n(t, s);
			} catch (t) {
				throw t instanceof Error ? t : Error(e.getString("Errors.Dzi"));
			}
			if (a === "Collection") throw Error(e.getString("Errors.Dzc"));
			if (a === "Error") {
				var m = i.getElementsByTagName("Message")[0].firstChild.nodeValue;
				throw Error(m);
			}
			throw Error(e.getString("Errors.Dzi"));
		}
		function n(t, n) {
			var r = n.Image, i = r.Url, a = r.Format, o = r.Size, s = r.DisplayRect || [], c = parseInt(o.Width, 10), l = parseInt(o.Height, 10), u = parseInt(r.TileSize, 10), d = parseInt(r.Overlap, 10), f = [], p, m;
			for (m = 0; m < s.length; m++) p = s[m].Rect, f.push(new e.DisplayRect(parseInt(p.X, 10), parseInt(p.Y, 10), parseInt(p.Width, 10), parseInt(p.Height, 10), parseInt(p.MinLevel, 10), parseInt(p.MaxLevel, 10)));
			return e.extend(!0, {
				width: c,
				height: l,
				tileSize: u,
				tileOverlap: d,
				minLevel: null,
				maxLevel: null,
				tilesUrl: i,
				fileFormat: a,
				displayRects: f
			}, n);
		}
	})(n), (function(e) {
		e.IIIFTileSource = function(n) {
			if (e.extend(!0, this, n), this._id = this["@id"] || this.id || this.identifier || null, !(this.height && this.width && this._id)) throw Error("IIIF required parameters (width, height, or id) not provided.");
			if (n.tileSizePerScaleFactor = {}, this.tileFormat = this.tileFormat || "jpg", this.version = n.version, this.tile_width && this.tile_height) n.tileWidth = this.tile_width, n.tileHeight = this.tile_height;
			else if (this.tile_width) n.tileSize = this.tile_width;
			else if (this.tile_height) n.tileSize = this.tile_height;
			else if (this.tiles) {
				if (this.tiles.length === 1) n.tileWidth = this.tiles[0].width, n.tileHeight = this.tiles[0].height || this.tiles[0].width, this.scale_factors = this.tiles[0].scaleFactors;
				else {
					this.scale_factors = [];
					for (var i = 0; i < this.tiles.length; i++) for (var a = 0; a < this.tiles[i].scaleFactors.length; a++) {
						var o = this.tiles[i].scaleFactors[a];
						this.scale_factors.push(o), n.tileSizePerScaleFactor[o] = {
							width: this.tiles[i].width,
							height: this.tiles[i].height || this.tiles[i].width
						};
					}
				}
			} else if (t(n)) {
				for (var s = Math.min(this.height, this.width), c = [
					256,
					512,
					1024
				], l = [], u = 0; u < c.length; u++) c[u] <= s && l.push(c[u]);
				n.tileSize = l.length > 0 ? Math.max.apply(null, l) : s;
			} else this.sizes && this.sizes.length > 0 ? (this.emulateLegacyImagePyramid = !0, n.levels = r(this), e.extend(!0, n, {
				width: n.levels[n.levels.length - 1].width,
				height: n.levels[n.levels.length - 1].height,
				tileSize: Math.max(n.height, n.width),
				tileOverlap: 0,
				minLevel: 0,
				maxLevel: n.levels.length - 1
			}), this.levels = n.levels) : e.console.error("Nothing in the info.json to construct image pyramids from");
			if (!n.maxLevel && !this.emulateLegacyImagePyramid) {
				if (!this.scale_factors) n.maxLevel = Number(Math.round(Math.log(Math.max(this.width, this.height), 2)));
				else {
					var d = Math.max.apply(null, this.scale_factors);
					n.maxLevel = Math.round(Math.log(d) * Math.LOG2E);
				}
			}
			if (this.sizes) {
				var f = this.sizes.length;
				(f === n.maxLevel || f === n.maxLevel + 1) && (this.levelSizes = this.sizes.slice().sort((e, t) => e.width - t.width), f === n.maxLevel && this.levelSizes.push({
					width: this.width,
					height: this.height
				}));
			}
			e.TileSource.apply(this, [n]);
		}, e.extend(e.IIIFTileSource.prototype, e.TileSource.prototype, {
			supports: function(e, t) {
				return e.protocol && e.protocol === "http://iiif.io/api/image" || e["@context"] && (e["@context"] === "http://library.stanford.edu/iiif/image-api/1.1/context.json" || e["@context"] === "http://iiif.io/api/image/1/context.json") || e.profile && e.profile.indexOf("http://library.stanford.edu/iiif/image-api/compliance.html") === 0 || e.identifier && e.width && e.height ? !0 : !!(e.documentElement && e.documentElement.tagName === "info" && e.documentElement.namespaceURI === "http://library.stanford.edu/iiif/image-api/ns/");
			},
			configure: function(t, r, a) {
				if (e.isPlainObject(t)) {
					if (!t["@context"]) t["@context"] = "http://iiif.io/api/image/1.0/context.json", t["@id"] = r.replace("/info.json", ""), t.version = 1;
					else {
						var o = t["@context"];
						if (Array.isArray(o)) {
							for (var s = 0; s < o.length; s++) if (typeof o[s] == "string" && (/^http:\/\/iiif\.io\/api\/image\/[1-3]\/context\.json$/.test(o[s]) || o[s] === "http://library.stanford.edu/iiif/image-api/1.1/context.json")) {
								o = o[s];
								break;
							}
						}
						switch (o) {
							case "http://iiif.io/api/image/1/context.json":
							case "http://library.stanford.edu/iiif/image-api/1.1/context.json":
								t.version = 1;
								break;
							case "http://iiif.io/api/image/2/context.json":
								t.version = 2;
								break;
							case "http://iiif.io/api/image/3/context.json":
								t.version = 3;
								break;
							default: e.console.error("Data has a @context property which contains no known IIIF context URI.");
						}
					}
					if (t.preferredFormats) {
						for (var c = 0; c < t.preferredFormats.length; c++) if (n.imageFormatSupported(t.preferredFormats[c])) {
							t.tileFormat = t.preferredFormats[c];
							break;
						}
					}
					return t;
				}
				var l = i(t);
				return l["@context"] = "http://iiif.io/api/image/1.0/context.json", l["@id"] = r.replace("/info.xml", ""), l.version = 1, l;
			},
			getTileWidth: function(t) {
				if (this.emulateLegacyImagePyramid) return e.TileSource.prototype.getTileWidth.call(this, t);
				var n = 2 ** (this.maxLevel - t);
				return this.tileSizePerScaleFactor && this.tileSizePerScaleFactor[n] ? this.tileSizePerScaleFactor[n].width : this._tileWidth;
			},
			getTileHeight: function(t) {
				if (this.emulateLegacyImagePyramid) return e.TileSource.prototype.getTileHeight.call(this, t);
				var n = 2 ** (this.maxLevel - t);
				return this.tileSizePerScaleFactor && this.tileSizePerScaleFactor[n] ? this.tileSizePerScaleFactor[n].height : this._tileHeight;
			},
			getLevelScale: function(t) {
				if (this.emulateLegacyImagePyramid) {
					var n = NaN;
					return this.levels.length > 0 && t >= this.minLevel && t <= this.maxLevel && (n = this.levels[t].width / this.levels[this.maxLevel].width), n;
				}
				return e.TileSource.prototype.getLevelScale.call(this, t);
			},
			getNumTiles: function(t) {
				if (this.emulateLegacyImagePyramid) return this.getLevelScale(t) ? new e.Point(1, 1) : new e.Point(0, 0);
				if (this.levelSizes) {
					var n = this.levelSizes[t], r = Math.ceil(n.width / this.getTileWidth(t)), i = Math.ceil(n.height / this.getTileHeight(t));
					return new e.Point(r, i);
				}
				return e.TileSource.prototype.getNumTiles.call(this, t);
			},
			getTileAtPoint: function(t, n) {
				if (this.emulateLegacyImagePyramid) return new e.Point(0, 0);
				if (this.levelSizes) {
					var r = n.x >= 0 && n.x <= 1 && n.y >= 0 && n.y <= 1 / this.aspectRatio;
					e.console.assert(r, "[TileSource.getTileAtPoint] must be called with a valid point.");
					var i = this.levelSizes[t].width, a = n.x * i, o = n.y * i, s = Math.floor(a / this.getTileWidth(t)), c = Math.floor(o / this.getTileHeight(t));
					return n.x >= 1 && (s = this.getNumTiles(t).x - 1), n.y >= 1 / this.aspectRatio - 1e-15 && (c = this.getNumTiles(t).y - 1), new e.Point(s, c);
				}
				return e.TileSource.prototype.getTileAtPoint.call(this, t, n);
			},
			getTileUrl: function(e, t, n) {
				if (this.emulateLegacyImagePyramid) {
					var r = null;
					return this.levels.length > 0 && e >= this.minLevel && e <= this.maxLevel && (r = this.levels[e].url), r;
				}
				var i = "0", a = .5 ** (this.maxLevel - e), o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x;
				return this.levelSizes ? (o = this.levelSizes[e].width, s = this.levelSizes[e].height) : (o = Math.ceil(this.width * a), s = Math.ceil(this.height * a)), c = this.getTileWidth(e), l = this.getTileHeight(e), u = Math.round(c / a), d = Math.round(l / a), b = this.version === 1 ? "native." + this.tileFormat : "default." + this.tileFormat, o < c && s < l ? (_ = this.version === 2 && o === this.width ? "full" : this.version === 3 && o === this.width && s === this.height ? "max" : this.version === 3 ? o + "," + s : o + ",", f = "full") : (p = t * u, m = n * d, h = Math.min(u, this.width - p), g = Math.min(d, this.height - m), f = t === 0 && n === 0 && h === this.width && g === this.height ? "full" : [
					p,
					m,
					h,
					g
				].join(","), v = Math.min(c, o - t * c), y = Math.min(l, s - n * l), _ = this.version === 2 && v === this.width ? "full" : this.version === 3 && v === this.width && y === this.height ? "max" : this.version === 3 ? v + "," + y : v + ","), x = [
					this._id,
					f,
					_,
					i,
					b
				].join("/"), x;
			},
			__testonly__: {
				canBeTiled: t,
				constructLevels: r
			}
		});
		function t(e) {
			var t = [
				"http://library.stanford.edu/iiif/image-api/compliance.html#level0",
				"http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",
				"http://iiif.io/api/image/2/level0.json",
				"level0",
				"https://iiif.io/api/image/3/level0.json"
			], n = Array.isArray(e.profile) ? e.profile[0] : e.profile, r = t.indexOf(n) !== -1, i = !1;
			return e.version === 2 && e.profile.length > 1 && e.profile[1].supports && (i = e.profile[1].supports.indexOf("sizeByW") !== -1), e.version === 3 && e.extraFeatures && (i = e.extraFeatures.indexOf("sizeByWh") !== -1), !r || i;
		}
		function r(e) {
			for (var t = [], n = 0; n < e.sizes.length; n++) t.push({
				url: e._id + "/full/" + e.sizes[n].width + "," + (e.version === 3 ? e.sizes[n].height : "") + "/0/default." + e.tileFormat,
				width: e.sizes[n].width,
				height: e.sizes[n].height
			});
			return t.sort(function(e, t) {
				return e.width - t.width;
			});
		}
		function i(t) {
			if (!t || !t.documentElement) throw Error(e.getString("Errors.Xml"));
			var n = t.documentElement, r = n.tagName, i = null;
			if (r === "info") try {
				return i = {}, a(n, i), i;
			} catch (t) {
				throw t instanceof Error ? t : Error(e.getString("Errors.IIIF"));
			}
			throw Error(e.getString("Errors.IIIF"));
		}
		function a(t, n, r) {
			var i, o;
			if (t.nodeType === 3 && r) o = t.nodeValue.trim(), o.match(/^\d*$/) && (o = Number(o)), n[r] ? (e.isArray(n[r]) || (n[r] = [n[r]]), n[r].push(o)) : n[r] = o;
			else if (t.nodeType === 1) for (i = 0; i < t.childNodes.length; i++) a(t.childNodes[i], n, t.nodeName);
		}
	})(n), (function(e) {
		e.OsmTileSource = function(t, n, r, i, a) {
			var o = e.isPlainObject(t) ? t : {
				width: arguments[0],
				height: arguments[1],
				tileSize: arguments[2],
				tileOverlap: arguments[3],
				tilesUrl: arguments[4]
			};
			(!o.width || !o.height) && (o.width = 65572864, o.height = 65572864), o.tileSize || (o.tileSize = 256, o.tileOverlap = 0), o.tilesUrl ||= "http://tile.openstreetmap.org/", o.minLevel = 8, e.TileSource.apply(this, [o]);
		}, e.extend(e.OsmTileSource.prototype, e.TileSource.prototype, {
			supports: function(e, t) {
				return e.type && e.type === "openstreetmaps";
			},
			configure: function(e, t, n) {
				return e;
			},
			getTileUrl: function(e, t, n) {
				return this.tilesUrl + (e - 8) + "/" + t + "/" + n + ".png";
			}
		});
	})(n), (function(e) {
		e.TmsTileSource = function(t, n, r, i, a) {
			var o = e.isPlainObject(t) ? t : {
				width: arguments[0],
				height: arguments[1],
				tileSize: arguments[2],
				tileOverlap: arguments[3],
				tilesUrl: arguments[4]
			}, s = Math.ceil(o.width / 256) * 256, c = Math.ceil(o.height / 256) * 256, l = s > c ? s / 256 : c / 256;
			o.maxLevel = Math.ceil(Math.log(l) / Math.log(2)) - 1, o.tileSize = 256, o.width = s, o.height = c, e.TileSource.apply(this, [o]);
		}, e.extend(e.TmsTileSource.prototype, e.TileSource.prototype, {
			supports: function(e, t) {
				return e.type && e.type === "tiledmapservice";
			},
			configure: function(e, t, n) {
				return e;
			},
			getTileUrl: function(e, t, n) {
				var r = this.getNumTiles(e).y - 1;
				return this.tilesUrl + e + "/" + t + "/" + (r - n) + ".png";
			}
		});
	})(n), (function(e) {
		e.ZoomifyTileSource = function(e) {
			e.tileSize === void 0 && (e.tileSize = 256), e.fileFormat === void 0 && (e.fileFormat = "jpg", this.fileFormat = e.fileFormat);
			var t = {
				x: e.width,
				y: e.height
			};
			for (e.imageSizes = [{
				x: e.width,
				y: e.height
			}], e.gridSize = [this._getGridSize(e.width, e.height, e.tileSize)]; parseInt(t.x, 10) > e.tileSize || parseInt(t.y, 10) > e.tileSize;) t.x = Math.floor(t.x / 2), t.y = Math.floor(t.y / 2), e.imageSizes.push({
				x: t.x,
				y: t.y
			}), e.gridSize.push(this._getGridSize(t.x, t.y, e.tileSize));
			e.imageSizes.reverse(), e.gridSize.reverse(), e.minLevel = 0, e.maxLevel = e.gridSize.length - 1, n.TileSource.apply(this, [e]);
		}, e.extend(e.ZoomifyTileSource.prototype, e.TileSource.prototype, {
			_getGridSize: function(e, t, n) {
				return {
					x: Math.ceil(e / n),
					y: Math.ceil(t / n)
				};
			},
			_calculateAbsoluteTileNumber: function(e, t, n) {
				for (var r = 0, i = {}, a = 0; a < e; a++) i = this.gridSize[a], r += i.x * i.y;
				return i = this.gridSize[e], r += i.x * n + t, r;
			},
			supports: function(e, t) {
				return e.type && e.type === "zoomifytileservice";
			},
			configure: function(e, t, n) {
				return e;
			},
			getTileUrl: function(e, t, n) {
				var r = 0, i = this._calculateAbsoluteTileNumber(e, t, n);
				return r = Math.floor(i / 256), this.tilesUrl + "TileGroup" + r + "/" + e + "-" + t + "-" + n + "." + this.fileFormat;
			}
		});
	})(n), (function(e) {
		e.LegacyTileSource = function(n) {
			var r, i, a;
			e.isArray(n) && (r = {
				type: "legacy-image-pyramid",
				levels: n
			}), r.levels = t(r.levels), r.levels.length > 0 ? (i = r.levels[r.levels.length - 1].width, a = r.levels[r.levels.length - 1].height) : (i = 0, a = 0, e.console.error("No supported image formats found")), e.extend(!0, r, {
				width: i,
				height: a,
				tileSize: Math.max(a, i),
				tileOverlap: 0,
				minLevel: 0,
				maxLevel: r.levels.length > 0 ? r.levels.length - 1 : 0
			}), e.TileSource.apply(this, [r]), this.levels = r.levels;
		}, e.extend(e.LegacyTileSource.prototype, e.TileSource.prototype, {
			supports: function(e, t) {
				return e.type && e.type === "legacy-image-pyramid" || e.documentElement && e.documentElement.getAttribute("type") === "legacy-image-pyramid";
			},
			configure: function(t, i, a) {
				return e.isPlainObject(t) ? r(this, t) : n(this, t);
			},
			getLevelScale: function(e) {
				var t = NaN;
				return this.levels.length > 0 && e >= this.minLevel && e <= this.maxLevel && (t = this.levels[e].width / this.levels[this.maxLevel].width), t;
			},
			getNumTiles: function(t) {
				return this.getLevelScale(t) ? new e.Point(1, 1) : new e.Point(0, 0);
			},
			getTileUrl: function(e, t, n) {
				var r = null;
				return this.levels.length > 0 && e >= this.minLevel && e <= this.maxLevel && (r = this.levels[e].url), r;
			}
		});
		function t(t) {
			var n = [], r, i;
			for (i = 0; i < t.length; i++) r = t[i], r.height && r.width && r.url ? n.push({
				url: r.url,
				width: Number(r.width),
				height: Number(r.height)
			}) : e.console.error("Unsupported image format: %s", r.url ? r.url : "<no URL>");
			return n.sort(function(e, t) {
				return e.height - t.height;
			});
		}
		function n(t, n) {
			if (!n || !n.documentElement) throw Error(e.getString("Errors.Xml"));
			var i = n.documentElement, a = i.tagName, o = null, s = [], c, l;
			if (a === "image") try {
				for (o = {
					type: i.getAttribute("type"),
					levels: []
				}, s = i.getElementsByTagName("level"), l = 0; l < s.length; l++) c = s[l], o.levels.push({
					url: c.getAttribute("url"),
					width: parseInt(c.getAttribute("width"), 10),
					height: parseInt(c.getAttribute("height"), 10)
				});
				return r(t, o);
			} catch (e) {
				throw e instanceof Error ? e : /* @__PURE__ */ Error("Unknown error parsing Legacy Image Pyramid XML.");
			}
			throw Error(a === "collection" ? "Legacy Image Pyramid Collections not yet supported." : a === "error" ? "Error: " + n : "Unknown element " + a);
		}
		function r(e, t) {
			return t.levels;
		}
	})(n), (function(e) {
		e.ImageTileSource = function(t) {
			t = e.extend({
				buildPyramid: !0,
				crossOriginPolicy: !1,
				ajaxWithCredentials: !1
			}, t), e.TileSource.apply(this, [t]);
		}, e.extend(e.ImageTileSource.prototype, e.TileSource.prototype, {
			supports: function(e, t) {
				return e.type && e.type === "image";
			},
			configure: function(e, t, n) {
				return e;
			},
			getImageInfo: function(t) {
				var n = this._image = new Image(), r = this;
				this.crossOriginPolicy && (n.crossOrigin = this.crossOriginPolicy), this.ajaxWithCredentials && (n.useCredentials = this.ajaxWithCredentials), e.addEvent(n, "load", function() {
					r.width = n.naturalWidth, r.height = n.naturalHeight, r.aspectRatio = r.width / r.height, r.dimensions = new e.Point(r.width, r.height), r._tileWidth = r.width, r._tileHeight = r.height, r.tileOverlap = 0, r.minLevel = 0, r.levels = r._buildLevels(), r.maxLevel = r.levels.length - 1, r.ready = !0, r.raiseEvent("ready", { tileSource: r });
				}), e.addEvent(n, "error", function() {
					r.raiseEvent("open-failed", {
						message: "Error loading image at " + t,
						source: t
					});
				}), n.src = t;
			},
			getLevelScale: function(e) {
				var t = NaN;
				return e >= this.minLevel && e <= this.maxLevel && (t = this.levels[e].width / this.levels[this.maxLevel].width), t;
			},
			getNumTiles: function(t) {
				return this.getLevelScale(t) ? new e.Point(1, 1) : new e.Point(0, 0);
			},
			getTileUrl: function(e, t, n) {
				var r = null;
				return e >= this.minLevel && e <= this.maxLevel && (r = this.levels[e].url), r;
			},
			getContext2D: function(e, t, n) {
				var r = null;
				return e >= this.minLevel && e <= this.maxLevel && (r = this.levels[e].context2D), r;
			},
			destroy: function(e) {
				this._freeupCanvasMemory(e);
			},
			_buildLevels: function() {
				var t = [{
					url: this._image.src,
					width: this._image.naturalWidth,
					height: this._image.naturalHeight
				}];
				if (!this.buildPyramid || !e.supportsCanvas) return delete this._image, t;
				var n = this._image.naturalWidth, r = this._image.naturalHeight, i = document.createElement("canvas"), a = i.getContext("2d");
				if (i.width = n, i.height = r, a.drawImage(this._image, 0, 0, n, r), t[0].context2D = a, delete this._image, e.isCanvasTainted(i)) return t;
				for (; n >= 2 && r >= 2;) {
					n = Math.floor(n / 2), r = Math.floor(r / 2);
					var o = document.createElement("canvas"), s = o.getContext("2d");
					o.width = n, o.height = r, s.drawImage(i, 0, 0, n, r), t.splice(0, 0, {
						context2D: s,
						width: n,
						height: r
					}), i = o, a = s;
				}
				return t;
			},
			_freeupCanvasMemory: function(e) {
				for (var t = 0; t < this.levels.length; t++) this.levels[t].context2D && (this.levels[t].context2D.canvas.height = 0, this.levels[t].context2D.canvas.width = 0, e && e.raiseEvent("image-unloaded", { context2D: this.levels[t].context2D }));
			}
		});
	})(n), (function(e) {
		e.TileSourceCollection = function(t, n, r, i) {
			e.console.error("TileSourceCollection is deprecated; use World instead");
		};
	})(n), (function(e) {
		e.ButtonState = {
			REST: 0,
			GROUP: 1,
			HOVER: 2,
			DOWN: 3
		}, e.Button = function(t) {
			var n = this;
			e.EventSource.call(this), e.extend(!0, this, {
				tooltip: null,
				srcRest: null,
				srcGroup: null,
				srcHover: null,
				srcDown: null,
				clickTimeThreshold: e.DEFAULT_SETTINGS.clickTimeThreshold,
				clickDistThreshold: e.DEFAULT_SETTINGS.clickDistThreshold,
				fadeDelay: 0,
				fadeLength: 2e3,
				onPress: null,
				onRelease: null,
				onClick: null,
				onEnter: null,
				onExit: null,
				onFocus: null,
				onBlur: null,
				userData: null
			}, t), this.element = t.element || e.makeNeutralElement("div"), t.element || (this.imgRest = e.makeTransparentImage(this.srcRest), this.imgGroup = e.makeTransparentImage(this.srcGroup), this.imgHover = e.makeTransparentImage(this.srcHover), this.imgDown = e.makeTransparentImage(this.srcDown), this.imgRest.alt = this.imgGroup.alt = this.imgHover.alt = this.imgDown.alt = this.tooltip, e.setElementPointerEventsNone(this.imgRest), e.setElementPointerEventsNone(this.imgGroup), e.setElementPointerEventsNone(this.imgHover), e.setElementPointerEventsNone(this.imgDown), this.element.style.position = "relative", e.setElementTouchActionNone(this.element), this.imgGroup.style.position = this.imgHover.style.position = this.imgDown.style.position = "absolute", this.imgGroup.style.top = this.imgHover.style.top = this.imgDown.style.top = "0px", this.imgGroup.style.left = this.imgHover.style.left = this.imgDown.style.left = "0px", this.imgHover.style.visibility = this.imgDown.style.visibility = "hidden", this.element.appendChild(this.imgRest), this.element.appendChild(this.imgGroup), this.element.appendChild(this.imgHover), this.element.appendChild(this.imgDown)), this.addHandler("press", this.onPress), this.addHandler("release", this.onRelease), this.addHandler("click", this.onClick), this.addHandler("enter", this.onEnter), this.addHandler("exit", this.onExit), this.addHandler("focus", this.onFocus), this.addHandler("blur", this.onBlur), this.currentState = e.ButtonState.GROUP, this.fadeBeginTime = null, this.shouldFade = !1, this.element.style.display = "inline-block", this.element.style.position = "relative", this.element.title = this.tooltip, this.tracker = new e.MouseTracker({
				userData: "Button.tracker",
				element: this.element,
				clickTimeThreshold: this.clickTimeThreshold,
				clickDistThreshold: this.clickDistThreshold,
				enterHandler: function(t) {
					t.insideElementPressed ? (a(n, e.ButtonState.DOWN), n.raiseEvent("enter", { originalEvent: t.originalEvent })) : t.buttonDownAny || a(n, e.ButtonState.HOVER);
				},
				focusHandler: function(e) {
					n.tracker.enterHandler(e), n.raiseEvent("focus", { originalEvent: e.originalEvent });
				},
				leaveHandler: function(t) {
					o(n, e.ButtonState.GROUP), t.insideElementPressed && n.raiseEvent("exit", { originalEvent: t.originalEvent });
				},
				blurHandler: function(e) {
					n.tracker.leaveHandler(e), n.raiseEvent("blur", { originalEvent: e.originalEvent });
				},
				pressHandler: function(t) {
					a(n, e.ButtonState.DOWN), n.raiseEvent("press", { originalEvent: t.originalEvent });
				},
				releaseHandler: function(t) {
					t.insideElementPressed && t.insideElementReleased ? (o(n, e.ButtonState.HOVER), n.raiseEvent("release", { originalEvent: t.originalEvent })) : t.insideElementPressed ? o(n, e.ButtonState.GROUP) : a(n, e.ButtonState.HOVER);
				},
				clickHandler: function(e) {
					e.quick && n.raiseEvent("click", { originalEvent: e.originalEvent });
				},
				keyHandler: function(e) {
					e.keyCode === 13 ? (n.raiseEvent("click", { originalEvent: e.originalEvent }), n.raiseEvent("release", { originalEvent: e.originalEvent }), e.preventDefault = !0) : e.preventDefault = !1;
				}
			}), o(this, e.ButtonState.REST);
		}, e.extend(e.Button.prototype, e.EventSource.prototype, {
			notifyGroupEnter: function() {
				a(this, e.ButtonState.GROUP);
			},
			notifyGroupExit: function() {
				o(this, e.ButtonState.REST);
			},
			disable: function() {
				this.notifyGroupExit(), this.element.disabled = !0, this.tracker.setTracking(!1), e.setElementOpacity(this.element, .2, !0);
			},
			enable: function() {
				this.element.disabled = !1, this.tracker.setTracking(!0), e.setElementOpacity(this.element, 1, !0), this.notifyGroupEnter();
			},
			destroy: function() {
				this.imgRest &&= (this.element.removeChild(this.imgRest), null), this.imgGroup &&= (this.element.removeChild(this.imgGroup), null), this.imgHover &&= (this.element.removeChild(this.imgHover), null), this.imgDown &&= (this.element.removeChild(this.imgDown), null), this.removeAllHandlers(), this.tracker.destroy(), this.element = null;
			}
		});
		function t(t) {
			e.requestAnimationFrame(function() {
				n(t);
			});
		}
		function n(n) {
			var r, i, a;
			n.shouldFade && (r = e.now(), i = r - n.fadeBeginTime, a = 1 - i / n.fadeLength, a = Math.min(1, a), a = Math.max(0, a), n.imgGroup && e.setElementOpacity(n.imgGroup, a, !0), a > 0 && t(n));
		}
		function r(n) {
			n.shouldFade = !0, n.fadeBeginTime = e.now() + n.fadeDelay, window.setTimeout(function() {
				t(n);
			}, n.fadeDelay);
		}
		function i(t) {
			t.shouldFade = !1, t.imgGroup && e.setElementOpacity(t.imgGroup, 1, !0);
		}
		function a(t, n) {
			t.element.disabled || (n >= e.ButtonState.GROUP && t.currentState === e.ButtonState.REST && (i(t), t.currentState = e.ButtonState.GROUP), n >= e.ButtonState.HOVER && t.currentState === e.ButtonState.GROUP && (t.imgHover && (t.imgHover.style.visibility = ""), t.currentState = e.ButtonState.HOVER), n >= e.ButtonState.DOWN && t.currentState === e.ButtonState.HOVER && (t.imgDown && (t.imgDown.style.visibility = ""), t.currentState = e.ButtonState.DOWN));
		}
		function o(t, n) {
			t.element.disabled || (n <= e.ButtonState.HOVER && t.currentState === e.ButtonState.DOWN && (t.imgDown && (t.imgDown.style.visibility = "hidden"), t.currentState = e.ButtonState.HOVER), n <= e.ButtonState.GROUP && t.currentState === e.ButtonState.HOVER && (t.imgHover && (t.imgHover.style.visibility = "hidden"), t.currentState = e.ButtonState.GROUP), n <= e.ButtonState.REST && t.currentState === e.ButtonState.GROUP && (r(t), t.currentState = e.ButtonState.REST));
		}
	})(n), (function(e) {
		e.ButtonGroup = function(t) {
			e.extend(!0, this, {
				buttons: [],
				clickTimeThreshold: e.DEFAULT_SETTINGS.clickTimeThreshold,
				clickDistThreshold: e.DEFAULT_SETTINGS.clickDistThreshold,
				labelText: ""
			}, t);
			var n = this.buttons.concat([]), r = this, i;
			if (this.element = t.element || e.makeNeutralElement("div"), !t.group) for (this.element.style.display = "inline-block", i = 0; i < n.length; i++) this.element.appendChild(n[i].element);
			e.setElementTouchActionNone(this.element), this.tracker = new e.MouseTracker({
				userData: "ButtonGroup.tracker",
				element: this.element,
				clickTimeThreshold: this.clickTimeThreshold,
				clickDistThreshold: this.clickDistThreshold,
				enterHandler: function(e) {
					var t;
					for (t = 0; t < r.buttons.length; t++) r.buttons[t].notifyGroupEnter();
				},
				leaveHandler: function(e) {
					var t;
					if (!e.insideElementPressed) for (t = 0; t < r.buttons.length; t++) r.buttons[t].notifyGroupExit();
				}
			});
		}, e.ButtonGroup.prototype = {
			addButton: function(e) {
				this.buttons.push(e), this.element.appendChild(e.element);
			},
			emulateEnter: function() {
				this.tracker.enterHandler({ eventSource: this.tracker });
			},
			emulateLeave: function() {
				this.tracker.leaveHandler({ eventSource: this.tracker });
			},
			destroy: function() {
				for (; this.buttons.length;) {
					var e = this.buttons.pop();
					this.element.removeChild(e.element), e.destroy();
				}
				this.tracker.destroy(), this.element = null;
			}
		};
	})(n), (function(e) {
		e.Rect = function(t, n, r, i, a) {
			this.x = typeof t == "number" ? t : 0, this.y = typeof n == "number" ? n : 0, this.width = typeof r == "number" ? r : 0, this.height = typeof i == "number" ? i : 0, this.degrees = typeof a == "number" ? a : 0, this.degrees = e.positiveModulo(this.degrees, 360);
			var o, s;
			this.degrees >= 270 ? (o = this.getTopRight(), this.x = o.x, this.y = o.y, s = this.height, this.height = this.width, this.width = s, this.degrees -= 270) : this.degrees >= 180 ? (o = this.getBottomRight(), this.x = o.x, this.y = o.y, this.degrees -= 180) : this.degrees >= 90 && (o = this.getBottomLeft(), this.x = o.x, this.y = o.y, s = this.height, this.height = this.width, this.width = s, this.degrees -= 90);
		}, e.Rect.fromSummits = function(t, n, r) {
			var i = t.distanceTo(n), a = t.distanceTo(r), o = n.minus(t), s = Math.atan(o.y / o.x);
			return o.x < 0 ? s += Math.PI : o.y < 0 && (s += 2 * Math.PI), new e.Rect(t.x, t.y, i, a, s / Math.PI * 180);
		}, e.Rect.prototype = {
			clone: function() {
				return new e.Rect(this.x, this.y, this.width, this.height, this.degrees);
			},
			getAspectRatio: function() {
				return this.width / this.height;
			},
			getTopLeft: function() {
				return new e.Point(this.x, this.y);
			},
			getBottomRight: function() {
				return new e.Point(this.x + this.width, this.y + this.height).rotate(this.degrees, this.getTopLeft());
			},
			getTopRight: function() {
				return new e.Point(this.x + this.width, this.y).rotate(this.degrees, this.getTopLeft());
			},
			getBottomLeft: function() {
				return new e.Point(this.x, this.y + this.height).rotate(this.degrees, this.getTopLeft());
			},
			getCenter: function() {
				return new e.Point(this.x + this.width / 2, this.y + this.height / 2).rotate(this.degrees, this.getTopLeft());
			},
			getSize: function() {
				return new e.Point(this.width, this.height);
			},
			equals: function(t) {
				return t instanceof e.Rect && this.x === t.x && this.y === t.y && this.width === t.width && this.height === t.height && this.degrees === t.degrees;
			},
			times: function(t) {
				return new e.Rect(this.x * t, this.y * t, this.width * t, this.height * t, this.degrees);
			},
			translate: function(t) {
				return new e.Rect(this.x + t.x, this.y + t.y, this.width, this.height, this.degrees);
			},
			union: function(t) {
				var n = this.getBoundingBox(), r = t.getBoundingBox(), i = Math.min(n.x, r.x), a = Math.min(n.y, r.y), o = Math.max(n.x + n.width, r.x + r.width), s = Math.max(n.y + n.height, r.y + r.height);
				return new e.Rect(i, a, o - i, s - a);
			},
			intersection: function(t) {
				var n = 1e-10, r = [], i = this.getTopLeft();
				t.containsPoint(i, n) && r.push(i);
				var a = this.getTopRight();
				t.containsPoint(a, n) && r.push(a);
				var o = this.getBottomLeft();
				t.containsPoint(o, n) && r.push(o);
				var s = this.getBottomRight();
				t.containsPoint(s, n) && r.push(s);
				var c = t.getTopLeft();
				this.containsPoint(c, n) && r.push(c);
				var l = t.getTopRight();
				this.containsPoint(l, n) && r.push(l);
				var u = t.getBottomLeft();
				this.containsPoint(u, n) && r.push(u);
				var d = t.getBottomRight();
				this.containsPoint(d, n) && r.push(d);
				for (var f = this._getSegments(), p = t._getSegments(), m = 0; m < f.length; m++) for (var h = f[m], g = 0; g < p.length; g++) {
					var _ = p[g], v = y(h[0], h[1], _[0], _[1]);
					v && r.push(v);
				}
				function y(t, r, i, a) {
					var o = r.minus(t), s = a.minus(i), c = -s.x * o.y + o.x * s.y;
					if (c === 0) return null;
					var l = (o.x * (t.y - i.y) - o.y * (t.x - i.x)) / c, u = (s.x * (t.y - i.y) - s.y * (t.x - i.x)) / c;
					return -n <= l && l <= 1 - n && -n <= u && u <= 1 - n ? new e.Point(t.x + u * o.x, t.y + u * o.y) : null;
				}
				if (r.length === 0) return null;
				for (var b = r[0].x, x = r[0].x, S = r[0].y, C = r[0].y, w = 1; w < r.length; w++) {
					var T = r[w];
					T.x < b && (b = T.x), T.x > x && (x = T.x), T.y < S && (S = T.y), T.y > C && (C = T.y);
				}
				return new e.Rect(b, S, x - b, C - S);
			},
			_getSegments: function() {
				var e = this.getTopLeft(), t = this.getTopRight(), n = this.getBottomLeft(), r = this.getBottomRight();
				return [
					[e, t],
					[t, r],
					[r, n],
					[n, e]
				];
			},
			rotate: function(t, n) {
				if (t = e.positiveModulo(t, 360), t === 0) return this.clone();
				n ||= this.getCenter();
				var r = this.getTopLeft().rotate(t, n), i = this.getTopRight().rotate(t, n).minus(r);
				i = i.apply(function(e) {
					return Math.abs(e) < 1e-15 ? 0 : e;
				});
				var a = Math.atan(i.y / i.x);
				return i.x < 0 ? a += Math.PI : i.y < 0 && (a += 2 * Math.PI), new e.Rect(r.x, r.y, this.width, this.height, a / Math.PI * 180);
			},
			getBoundingBox: function() {
				if (this.degrees === 0) return this.clone();
				var t = this.getTopLeft(), n = this.getTopRight(), r = this.getBottomLeft(), i = this.getBottomRight(), a = Math.min(t.x, n.x, r.x, i.x), o = Math.max(t.x, n.x, r.x, i.x), s = Math.min(t.y, n.y, r.y, i.y), c = Math.max(t.y, n.y, r.y, i.y);
				return new e.Rect(a, s, o - a, c - s);
			},
			getIntegerBoundingBox: function() {
				var t = this.getBoundingBox(), n = Math.floor(t.x), r = Math.floor(t.y), i = Math.ceil(t.width + t.x - n), a = Math.ceil(t.height + t.y - r);
				return new e.Rect(n, r, i, a);
			},
			containsPoint: function(e, t) {
				t ||= 0;
				var n = this.getTopLeft(), r = this.getTopRight(), i = this.getBottomLeft(), a = r.minus(n), o = i.minus(n);
				return (e.x - n.x) * a.x + (e.y - n.y) * a.y >= -t && (e.x - r.x) * a.x + (e.y - r.y) * a.y <= t && (e.x - n.x) * o.x + (e.y - n.y) * o.y >= -t && (e.x - i.x) * o.x + (e.y - i.y) * o.y <= t;
			},
			toString: function() {
				return "[" + Math.round(this.x * 100) / 100 + ", " + Math.round(this.y * 100) / 100 + ", " + Math.round(this.width * 100) / 100 + "x" + Math.round(this.height * 100) / 100 + ", " + Math.round(this.degrees * 100) / 100 + "deg]";
			}
		};
	})(n), (function(e) {
		var t = {};
		e.ReferenceStrip = function(u) {
			var d = this, f = u.viewer, p = e.getElementSize(f.element), m, h, g;
			for (u.id || (u.id = "referencestrip-" + e.now(), this.element = e.makeNeutralElement("div"), this.element.id = u.id, this.element.className = "referencestrip"), u = e.extend(!0, {
				sizeRatio: e.DEFAULT_SETTINGS.referenceStripSizeRatio,
				position: e.DEFAULT_SETTINGS.referenceStripPosition,
				scroll: e.DEFAULT_SETTINGS.referenceStripScroll,
				clickTimeThreshold: e.DEFAULT_SETTINGS.clickTimeThreshold
			}, u, { element: this.element }), e.extend(this, u), t[this.id] = { animating: !1 }, this.minPixelRatio = this.viewer.minPixelRatio, this.element.tabIndex = 0, h = this.element.style, h.marginTop = "0px", h.marginRight = "0px", h.marginBottom = "0px", h.marginLeft = "0px", h.left = "0px", h.bottom = "0px", h.border = "0px", h.background = "#000", h.position = "relative", e.setElementTouchActionNone(this.element), e.setElementOpacity(this.element, .8), this.viewer = f, this.tracker = new e.MouseTracker({
				userData: "ReferenceStrip.tracker",
				element: this.element,
				clickHandler: e.delegate(this, n),
				dragHandler: e.delegate(this, r),
				scrollHandler: e.delegate(this, i),
				enterHandler: e.delegate(this, o),
				leaveHandler: e.delegate(this, s),
				keyDownHandler: e.delegate(this, c),
				keyHandler: e.delegate(this, l),
				preProcessEventHandler: function(e) {
					e.eventType === "wheel" && (e.preventDefault = !0);
				}
			}), u.width && u.height ? (this.element.style.width = u.width + "px", this.element.style.height = u.height + "px", f.addControl(this.element, { anchor: e.ControlAnchor.BOTTOM_LEFT })) : u.scroll === "horizontal" ? (this.element.style.width = p.x * u.sizeRatio * f.tileSources.length + 12 * f.tileSources.length + "px", this.element.style.height = p.y * u.sizeRatio + "px", f.addControl(this.element, { anchor: e.ControlAnchor.BOTTOM_LEFT })) : (this.element.style.height = p.y * u.sizeRatio * f.tileSources.length + 12 * f.tileSources.length + "px", this.element.style.width = p.x * u.sizeRatio + "px", f.addControl(this.element, { anchor: e.ControlAnchor.TOP_LEFT })), this.panelWidth = p.x * this.sizeRatio + 8, this.panelHeight = p.y * this.sizeRatio + 8, this.panels = [], this.miniViewers = {}, g = 0; g < f.tileSources.length; g++) m = e.makeNeutralElement("div"), m.id = this.element.id + "-" + g, m.style.width = d.panelWidth + "px", m.style.height = d.panelHeight + "px", m.style.display = "inline", m.style.float = "left", m.style.cssFloat = "left", m.style.padding = "2px", e.setElementTouchActionNone(m), e.setElementPointerEventsNone(m), this.element.appendChild(m), m.activePanel = !1, this.panels.push(m);
			a(this, this.scroll === "vertical" ? p.y : p.x, 0), this.setFocus(0);
		}, e.ReferenceStrip.prototype = {
			setFocus: function(t) {
				var n = this.element.querySelector("#" + this.element.id + "-" + t), r = e.getElementSize(this.viewer.canvas), i = Number(this.element.style.width.replace("px", "")), s = Number(this.element.style.height.replace("px", "")), c = -Number(this.element.style.marginLeft.replace("px", "")), l = -Number(this.element.style.marginTop.replace("px", "")), u;
				this.currentSelected !== n && (this.currentSelected && (this.currentSelected.style.background = "#000"), this.currentSelected = n, this.currentSelected.style.background = "#999", this.scroll === "horizontal" ? (u = Number(t) * (this.panelWidth + 3), u > c + r.x - this.panelWidth ? (u = Math.min(u, i - r.x), this.element.style.marginLeft = -u + "px", a(this, r.x, -u)) : u < c && (u = Math.max(0, u - r.x / 2), this.element.style.marginLeft = -u + "px", a(this, r.x, -u))) : (u = Number(t) * (this.panelHeight + 3), u > l + r.y - this.panelHeight ? (u = Math.min(u, s - r.y), this.element.style.marginTop = -u + "px", a(this, r.y, -u)) : u < l && (u = Math.max(0, u - r.y / 2), this.element.style.marginTop = -u + "px", a(this, r.y, -u))), this.currentPage = t, o.call(this, { eventSource: this.tracker }));
			},
			update: function() {
				return !!t[this.id].animating;
			},
			destroy: function() {
				if (this.miniViewers) for (var e in this.miniViewers) this.miniViewers[e].destroy();
				this.tracker.destroy(), this.element && this.viewer.removeControl(this.element);
			}
		};
		function n(e) {
			if (e.quick) {
				var t = this.scroll === "horizontal" ? Math.floor(e.position.x / (this.panelWidth + 4)) : Math.floor(e.position.y / this.panelHeight);
				this.viewer.goToPage(t);
			}
			this.element.focus();
		}
		function r(t) {
			if (this.dragging = !0, this.element) {
				var n = Number(this.element.style.marginLeft.replace("px", "")), r = Number(this.element.style.marginTop.replace("px", "")), i = Number(this.element.style.width.replace("px", "")), o = Number(this.element.style.height.replace("px", "")), s = e.getElementSize(this.viewer.canvas);
				this.scroll === "horizontal" ? -t.delta.x > 0 ? n > -(i - s.x) && (this.element.style.marginLeft = n + t.delta.x * 2 + "px", a(this, s.x, n + t.delta.x * 2)) : -t.delta.x < 0 && n < 0 && (this.element.style.marginLeft = n + t.delta.x * 2 + "px", a(this, s.x, n + t.delta.x * 2)) : -t.delta.y > 0 ? r > -(o - s.y) && (this.element.style.marginTop = r + t.delta.y * 2 + "px", a(this, s.y, r + t.delta.y * 2)) : -t.delta.y < 0 && r < 0 && (this.element.style.marginTop = r + t.delta.y * 2 + "px", a(this, s.y, r + t.delta.y * 2));
			}
		}
		function i(t) {
			if (this.element) {
				var n = Number(this.element.style.marginLeft.replace("px", "")), r = Number(this.element.style.marginTop.replace("px", "")), i = Number(this.element.style.width.replace("px", "")), o = Number(this.element.style.height.replace("px", "")), s = e.getElementSize(this.viewer.canvas);
				this.scroll === "horizontal" ? t.scroll > 0 ? n > -(i - s.x) && (this.element.style.marginLeft = n - t.scroll * 60 + "px", a(this, s.x, n - t.scroll * 60)) : t.scroll < 0 && n < 0 && (this.element.style.marginLeft = n - t.scroll * 60 + "px", a(this, s.x, n - t.scroll * 60)) : t.scroll < 0 ? r > s.y - o && (this.element.style.marginTop = r + t.scroll * 60 + "px", a(this, s.y, r + t.scroll * 60)) : t.scroll > 0 && r < 0 && (this.element.style.marginTop = r + t.scroll * 60 + "px", a(this, s.y, r + t.scroll * 60)), t.preventDefault = !0;
			}
		}
		function a(t, n, r) {
			var i = t.scroll === "horizontal" ? t.panelWidth : t.panelHeight, a = Math.ceil(n / i) + 5, o = Math.ceil((Math.abs(r) + n) / i) + 1, s, c, l;
			for (a = o - a, a = a < 0 ? 0 : a, c = a; c < o && c < t.panels.length; c++) if (l = t.panels[c], !l.activePanel) {
				var u, d = t.viewer.tileSources[c];
				u = d.referenceStripThumbnailUrl ? {
					type: "image",
					url: d.referenceStripThumbnailUrl
				} : d, s = new e.Viewer({
					id: l.id,
					tileSources: [u],
					element: l,
					navigatorSizeRatio: t.sizeRatio,
					showNavigator: !1,
					mouseNavEnabled: !1,
					showNavigationControl: !1,
					showSequenceControl: !1,
					immediateRender: !0,
					blendTime: 0,
					animationTime: 0,
					loadTilesWithAjax: t.viewer.loadTilesWithAjax,
					ajaxHeaders: t.viewer.ajaxHeaders,
					drawer: "canvas"
				}), e.setElementPointerEventsNone(s.canvas), e.setElementPointerEventsNone(s.container), s.innerTracker.setTracking(!1), s.outerTracker.setTracking(!1), t.miniViewers[l.id] = s, l.activePanel = !0;
			}
		}
		function o(e) {
			var t = e.eventSource.element;
			this.scroll === "horizontal" ? t.style.marginBottom = "0px" : t.style.marginLeft = "0px";
		}
		function s(t) {
			var n = t.eventSource.element;
			this.scroll === "horizontal" ? n.style.marginBottom = "-" + e.getElementSize(n).y / 2 + "px" : n.style.marginLeft = "-" + e.getElementSize(n).x / 2 + "px";
		}
		function c(e) {
			if (!e.ctrl && !e.alt && !e.meta) switch (e.keyCode) {
				case 38:
					i.call(this, {
						eventSource: this.tracker,
						position: null,
						scroll: 1,
						shift: null
					}), e.preventDefault = !0;
					break;
				case 40:
					i.call(this, {
						eventSource: this.tracker,
						position: null,
						scroll: -1,
						shift: null
					}), e.preventDefault = !0;
					break;
				case 37:
					i.call(this, {
						eventSource: this.tracker,
						position: null,
						scroll: -1,
						shift: null
					}), e.preventDefault = !0;
					break;
				case 39:
					i.call(this, {
						eventSource: this.tracker,
						position: null,
						scroll: 1,
						shift: null
					}), e.preventDefault = !0;
					break;
				default: e.preventDefault = !1;
			}
			else e.preventDefault = !1;
		}
		function l(e) {
			if (!e.ctrl && !e.alt && !e.meta) switch (e.keyCode) {
				case 61:
					i.call(this, {
						eventSource: this.tracker,
						position: null,
						scroll: 1,
						shift: null
					}), e.preventDefault = !0;
					break;
				case 45:
					i.call(this, {
						eventSource: this.tracker,
						position: null,
						scroll: -1,
						shift: null
					}), e.preventDefault = !0;
					break;
				case 48:
				case 119:
				case 87:
					i.call(this, {
						eventSource: this.tracker,
						position: null,
						scroll: 1,
						shift: null
					}), e.preventDefault = !0;
					break;
				case 115:
				case 83:
					i.call(this, {
						eventSource: this.tracker,
						position: null,
						scroll: -1,
						shift: null
					}), e.preventDefault = !0;
					break;
				case 97:
					i.call(this, {
						eventSource: this.tracker,
						position: null,
						scroll: -1,
						shift: null
					}), e.preventDefault = !0;
					break;
				case 100:
					i.call(this, {
						eventSource: this.tracker,
						position: null,
						scroll: 1,
						shift: null
					}), e.preventDefault = !0;
					break;
				default: e.preventDefault = !1;
			}
			else e.preventDefault = !1;
		}
	})(n), (function(e) {
		e.DisplayRect = function(t, n, r, i, a, o) {
			e.Rect.apply(this, [
				t,
				n,
				r,
				i
			]), this.minLevel = a, this.maxLevel = o;
		}, e.extend(e.DisplayRect.prototype, e.Rect.prototype);
	})(n), (function(e) {
		e.Spring = function(t) {
			var n = arguments;
			typeof t != "object" && (t = {
				initial: n.length && typeof n[0] == "number" ? n[0] : void 0,
				springStiffness: n.length > 1 ? n[1].springStiffness : 5,
				animationTime: n.length > 1 ? n[1].animationTime : 1.5
			}), e.console.assert(typeof t.springStiffness == "number" && t.springStiffness !== 0, "[OpenSeadragon.Spring] options.springStiffness must be a non-zero number"), e.console.assert(typeof t.animationTime == "number" && t.animationTime >= 0, "[OpenSeadragon.Spring] options.animationTime must be a number greater than or equal to 0"), t.exponential && (this._exponential = !0, delete t.exponential), e.extend(!0, this, t), this.current = {
				value: typeof this.initial == "number" ? this.initial : +!this._exponential,
				time: e.now()
			}, e.console.assert(!this._exponential || this.current.value !== 0, "[OpenSeadragon.Spring] value must be non-zero for exponential springs"), this.start = {
				value: this.current.value,
				time: this.current.time
			}, this.target = {
				value: this.current.value,
				time: this.current.time
			}, this._exponential && (this.start._logValue = Math.log(this.start.value), this.target._logValue = Math.log(this.target.value), this.current._logValue = Math.log(this.current.value));
		}, e.Spring.prototype = {
			resetTo: function(t) {
				e.console.assert(!this._exponential || t !== 0, "[OpenSeadragon.Spring.resetTo] target must be non-zero for exponential springs"), this.start.value = this.target.value = this.current.value = t, this.start.time = this.target.time = this.current.time = e.now(), this._exponential && (this.start._logValue = Math.log(this.start.value), this.target._logValue = Math.log(this.target.value), this.current._logValue = Math.log(this.current.value));
			},
			springTo: function(t) {
				e.console.assert(!this._exponential || t !== 0, "[OpenSeadragon.Spring.springTo] target must be non-zero for exponential springs"), this.start.value = this.current.value, this.start.time = this.current.time, this.target.value = t, this.target.time = this.start.time + 1e3 * this.animationTime, this._exponential && (this.start._logValue = Math.log(this.start.value), this.target._logValue = Math.log(this.target.value));
			},
			shiftBy: function(t) {
				this.start.value += t, this.target.value += t, this._exponential && (e.console.assert(this.target.value !== 0 && this.start.value !== 0, "[OpenSeadragon.Spring.shiftBy] spring value must be non-zero for exponential springs"), this.start._logValue = Math.log(this.start.value), this.target._logValue = Math.log(this.target.value));
			},
			setExponential: function(t) {
				this._exponential = t, this._exponential && (e.console.assert(this.current.value !== 0 && this.target.value !== 0 && this.start.value !== 0, "[OpenSeadragon.Spring.setExponential] spring value must be non-zero for exponential springs"), this.start._logValue = Math.log(this.start.value), this.target._logValue = Math.log(this.target.value), this.current._logValue = Math.log(this.current.value));
			},
			update: function() {
				this.current.time = e.now();
				let n, r;
				if (this._exponential ? (n = this.start._logValue, r = this.target._logValue) : (n = this.start.value, r = this.target.value), this.current.time >= this.target.time) this.current.value = this.target.value;
				else {
					let e = n + (r - n) * t(this.springStiffness, (this.current.time - this.start.time) / (this.target.time - this.start.time));
					this._exponential ? this.current.value = Math.exp(e) : this.current.value = e;
				}
				return this.current.value !== this.target.value;
			},
			isAtTargetValue: function() {
				return this.current.value === this.target.value;
			}
		};
		function t(e, t) {
			return (1 - Math.exp(e * -t)) / (1 - Math.exp(-e));
		}
	})(n), (function(e) {
		e.ImageJob = function(t) {
			e.extend(!0, this, {
				timeout: e.DEFAULT_SETTINGS.timeout,
				jobId: null,
				tries: 0
			}, t), this.data = null, this.userData = {}, this.errorMsg = null;
		}, e.ImageJob.prototype = {
			start: function() {
				this.tries++;
				var e = this, t = this.abort;
				this.jobId = window.setTimeout(function() {
					e.finish(null, null, "Image load exceeded timeout (" + e.timeout + " ms)");
				}, this.timeout), this.abort = function() {
					e.source.downloadTileAbort(e), typeof t == "function" && t();
				}, this.source.downloadTileStart(this);
			},
			finish: function(e, t, n) {
				this.data = e, this.request = t, this.errorMsg = n, this.jobId && window.clearTimeout(this.jobId), this.callback(this);
			}
		}, e.ImageLoader = function(t) {
			e.extend(!0, this, {
				jobLimit: e.DEFAULT_SETTINGS.imageLoaderLimit,
				timeout: e.DEFAULT_SETTINGS.timeout,
				jobQueue: [],
				failedTiles: [],
				jobsInProgress: 0
			}, t);
		}, e.ImageLoader.prototype = {
			addJob: function(n) {
				if (!n.source) {
					e.console.error("ImageLoader.prototype.addJob() requires [options.source]. TileSource since new API defines how images are fetched. Creating a dummy TileSource.");
					var r = e.TileSource.prototype;
					n.source = {
						downloadTileStart: r.downloadTileStart,
						downloadTileAbort: r.downloadTileAbort
					};
				}
				var i = this, a = {
					src: n.src,
					tile: n.tile || {},
					source: n.source,
					loadWithAjax: n.loadWithAjax,
					ajaxHeaders: n.loadWithAjax ? n.ajaxHeaders : null,
					crossOriginPolicy: n.crossOriginPolicy,
					ajaxWithCredentials: n.ajaxWithCredentials,
					postData: n.postData,
					callback: function(e) {
						t(i, e, n.callback);
					},
					abort: n.abort,
					timeout: this.timeout
				}, o = new e.ImageJob(a);
				!this.jobLimit || this.jobsInProgress < this.jobLimit ? (o.start(), this.jobsInProgress++) : this.jobQueue.push(o);
			},
			clear: function() {
				for (var e = 0; e < this.jobQueue.length; e++) {
					var t = this.jobQueue[e];
					typeof t.abort == "function" && t.abort();
				}
				this.jobQueue = [];
			}
		};
		function t(e, t, n) {
			t.errorMsg !== "" && (t.data === null || t.data === void 0) && t.tries < 1 + e.tileRetryMax && e.failedTiles.push(t);
			var r;
			e.jobsInProgress--, (!e.jobLimit || e.jobsInProgress < e.jobLimit) && e.jobQueue.length > 0 && (r = e.jobQueue.shift(), r.start(), e.jobsInProgress++), e.tileRetryMax > 0 && e.jobQueue.length === 0 && (!e.jobLimit || e.jobsInProgress < e.jobLimit) && e.failedTiles.length > 0 && (r = e.failedTiles.shift(), setTimeout(function() {
				r.start();
			}, e.tileRetryDelay), e.jobsInProgress++), n(t.data, t.errorMsg, t.request);
		}
	})(n), (function(e) {
		e.Tile = function(t, r, i, a, o, s, c, l, u, d, f, p) {
			this.level = t, this.x = r, this.y = i, this.bounds = a, this.positionedBounds = new n.Rect(a.x, a.y, a.width, a.height), this.sourceBounds = d, this.exists = o, this._url = s, this.postData = f, this.context2D = c, this.loadWithAjax = l, this.ajaxHeaders = u, p === void 0 && (e.console.warn("Tile constructor needs 'cacheKey' variable: creation tile cache in Tile class is deprecated. TileSource.prototype.getTileHashKey will be used."), p = e.TileSource.prototype.getTileHashKey(t, r, i, s, u, f)), this.cacheKey = p, this.loaded = !1, this.loading = !1, this.element = null, this.imgElement = null, this.style = null, this.position = null, this.size = null, this.flipped = !1, this.blendStart = null, this.opacity = null, this.squaredDistance = null, this.visibility = null, this.hasTransparency = !1, this.beingDrawn = !1, this.lastTouchTime = 0, this.isRightMost = !1, this.isBottomMost = !1;
		}, e.Tile.prototype = {
			toString: function() {
				return this.level + "/" + this.x + "_" + this.y;
			},
			_hasTransparencyChannel: function() {
				return console.warn("Tile.prototype._hasTransparencyChannel() has been deprecated and will be removed in the future. Use TileSource.prototype.hasTransparency() instead."), !!this.context2D || this.getUrl().match(".png");
			},
			get image() {
				return e.console.error("[Tile.image] property has been deprecated. Use [Tile.prototype.getImage] instead."), this.getImage();
			},
			get url() {
				return e.console.error("[Tile.url] property has been deprecated. Use [Tile.prototype.getUrl] instead."), this.getUrl();
			},
			getImage: function() {
				return this.cacheImageRecord.getImage();
			},
			getUrl: function() {
				return typeof this._url == "function" ? this._url() : this._url;
			},
			getCanvasContext: function() {
				return this.context2D || this.cacheImageRecord && this.cacheImageRecord.getRenderedContext();
			},
			getScaleForEdgeSmoothing: function() {
				var t;
				if (this.cacheImageRecord) t = this.cacheImageRecord.getRenderedContext();
				else if (this.context2D) t = this.context2D;
				else return e.console.warn("[Tile.drawCanvas] attempting to get tile scale %s when tile's not cached", this.toString()), 1;
				return t.canvas.width / (this.size.x * e.pixelDensityRatio);
			},
			getTranslationForEdgeSmoothing: function(t, n, r) {
				var i = Math.max(1, Math.ceil((r.x - n.x) / 2)), a = Math.max(1, Math.ceil((r.y - n.y) / 2));
				return new e.Point(i, a).minus(this.position.times(e.pixelDensityRatio).times(t || 1).apply(function(e) {
					return e % 1;
				}));
			},
			unload: function() {
				this.imgElement && this.imgElement.parentNode && this.imgElement.parentNode.removeChild(this.imgElement), this.element && this.element.parentNode && this.element.parentNode.removeChild(this.element), this.element = null, this.imgElement = null, this.loaded = !1, this.loading = !1;
			}
		};
	})(n), (function(e) {
		e.OverlayPlacement = e.Placement, e.OverlayRotationMode = e.freezeObject({
			NO_ROTATION: 1,
			EXACT: 2,
			BOUNDING_BOX: 3
		}), e.Overlay = function(t, n, r) {
			var i = e.isPlainObject(t) ? t : {
				element: t,
				location: n,
				placement: r
			};
			this.elementWrapper = document.createElement("div"), this.element = i.element, this.elementWrapper.appendChild(this.element), this.element.id ? this.elementWrapper.id = "overlay-wrapper-" + this.element.id : this.elementWrapper.id = "overlay-wrapper", this.style = this.elementWrapper.style, this._init(i);
		}, e.Overlay.prototype = {
			_init: function(t) {
				this.location = t.location, this.placement = t.placement === void 0 ? e.Placement.TOP_LEFT : t.placement, this.onDraw = t.onDraw, this.checkResize = t.checkResize === void 0 || t.checkResize, this.width = t.width === void 0 ? null : t.width, this.height = t.height === void 0 ? null : t.height, this.rotationMode = t.rotationMode || e.OverlayRotationMode.EXACT, this.location instanceof e.Rect && (this.width = this.location.width, this.height = this.location.height, this.location = this.location.getTopLeft(), this.placement = e.Placement.TOP_LEFT), this.scales = this.width !== null && this.height !== null, this.bounds = new e.Rect(this.location.x, this.location.y, this.width, this.height), this.position = this.location;
			},
			adjust: function(t, n) {
				var r = e.Placement.properties[this.placement];
				r && (r.isHorizontallyCentered ? t.x -= n.x / 2 : r.isRight && (t.x -= n.x), r.isVerticallyCentered ? t.y -= n.y / 2 : r.isBottom && (t.y -= n.y));
			},
			destroy: function() {
				var t = this.elementWrapper, n = this.style;
				t.parentNode && (t.parentNode.removeChild(t), t.prevElementParent && (n.display = "none", document.body.appendChild(t))), this.onDraw = null, n.top = "", n.left = "", n.position = "", this.width !== null && (n.width = ""), this.height !== null && (n.height = "");
				var r = e.getCssPropertyWithVendorPrefix("transformOrigin"), i = e.getCssPropertyWithVendorPrefix("transform");
				r && i && (n[r] = "", n[i] = "");
			},
			drawHTML: function(t, n) {
				var r = this.elementWrapper;
				r.parentNode !== t && (r.prevElementParent = r.parentNode, r.prevNextSibling = r.nextSibling, t.appendChild(r), this.style.position = "absolute", this.size = e.getElementSize(this.elementWrapper));
				var i = this._getOverlayPositionAndSize(n), a = i.position, o = this.size = i.size, s = "";
				n.overlayPreserveContentDirection && (s = n.flipped ? " scaleX(-1)" : " scaleX(1)");
				var c = n.flipped ? -i.rotate : i.rotate, l = n.flipped ? " scaleX(-1)" : "";
				if (this.onDraw) this.onDraw(a, o, this.element);
				else {
					var u = this.style, d = this.element.style;
					d.display = "block", u.left = a.x + "px", u.top = a.y + "px", this.width !== null && (d.width = o.x + "px"), this.height !== null && (d.height = o.y + "px");
					var f = e.getCssPropertyWithVendorPrefix("transformOrigin"), p = e.getCssPropertyWithVendorPrefix("transform");
					f && p && (c && !n.flipped ? (d[p] = "", u[f] = this._getTransformOrigin(), u[p] = "rotate(" + c + "deg)") : !c && n.flipped ? (d[p] = s, u[f] = this._getTransformOrigin(), u[p] = l) : c && n.flipped ? (d[p] = s, u[f] = this._getTransformOrigin(), u[p] = "rotate(" + c + "deg)" + l) : (d[p] = "", u[f] = "", u[p] = "")), u.display = "flex";
				}
			},
			_getOverlayPositionAndSize: function(t) {
				var n = t.pixelFromPoint(this.location, !0), r = this._getSizeInPixels(t);
				this.adjust(n, r);
				var i = 0;
				if (t.getRotation(!0) && this.rotationMode !== e.OverlayRotationMode.NO_ROTATION) {
					if (this.rotationMode === e.OverlayRotationMode.BOUNDING_BOX && this.width !== null && this.height !== null) {
						var a = new e.Rect(n.x, n.y, r.x, r.y), o = this._getBoundingBox(a, t.getRotation(!0));
						n = o.getTopLeft(), r = o.getSize();
					} else i = t.getRotation(!0);
				}
				return t.flipped && (n.x = t.getContainerSize().x - n.x), {
					position: n,
					size: r,
					rotate: i
				};
			},
			_getSizeInPixels: function(t) {
				var n = this.size.x, r = this.size.y;
				if (this.width !== null || this.height !== null) {
					var i = t.deltaPixelsFromPointsNoRotate(new e.Point(this.width || 0, this.height || 0), !0);
					this.width !== null && (n = i.x), this.height !== null && (r = i.y);
				}
				if (this.checkResize && (this.width === null || this.height === null)) {
					var a = this.size = e.getElementSize(this.elementWrapper);
					this.width === null && (n = a.x), this.height === null && (r = a.y);
				}
				return new e.Point(n, r);
			},
			_getBoundingBox: function(e, t) {
				var n = this._getPlacementPoint(e);
				return e.rotate(t, n).getBoundingBox();
			},
			_getPlacementPoint: function(t) {
				var n = new e.Point(t.x, t.y), r = e.Placement.properties[this.placement];
				return r && (r.isHorizontallyCentered ? n.x += t.width / 2 : r.isRight && (n.x += t.width), r.isVerticallyCentered ? n.y += t.height / 2 : r.isBottom && (n.y += t.height)), n;
			},
			_getTransformOrigin: function() {
				var t = "", n = e.Placement.properties[this.placement];
				return n ? (n.isLeft ? t = "left" : n.isRight && (t = "right"), n.isTop ? t += " top" : n.isBottom && (t += " bottom"), t) : t;
			},
			update: function(t, n) {
				var r = e.isPlainObject(t) ? t : {
					location: t,
					placement: n
				};
				this._init({
					location: r.location || this.location,
					placement: r.placement === void 0 ? this.placement : r.placement,
					onDraw: r.onDraw || this.onDraw,
					checkResize: r.checkResize || this.checkResize,
					width: r.width === void 0 ? this.width : r.width,
					height: r.height === void 0 ? this.height : r.height,
					rotationMode: r.rotationMode || this.rotationMode
				});
			},
			getBounds: function(t) {
				e.console.assert(t, "A viewport must now be passed to Overlay.getBounds.");
				var n = this.width, r = this.height;
				if (n === null || r === null) {
					var i = t.deltaPointsFromPixelsNoRotate(this.size, !0);
					n === null && (n = i.x), r === null && (r = i.y);
				}
				var a = this.location.clone();
				return this.adjust(a, new e.Point(n, r)), this._adjustBoundsForRotation(t, new e.Rect(a.x, a.y, n, r));
			},
			_adjustBoundsForRotation: function(t, n) {
				if (!t || t.getRotation(!0) === 0 || this.rotationMode === e.OverlayRotationMode.EXACT) return n;
				if (this.rotationMode === e.OverlayRotationMode.BOUNDING_BOX) {
					if (this.width === null || this.height === null) return n;
					var r = this._getOverlayPositionAndSize(t);
					return t.viewerElementToViewportRectangle(new e.Rect(r.position.x, r.position.y, r.size.x, r.size.y));
				}
				return n.rotate(-t.getRotation(!0), this._getPlacementPoint(n));
			}
		};
	})(n), (function(e) {
		let t = e;
		t.DrawerBase = class {
			constructor(t) {
				e.console.assert(t.viewer, "[Drawer] options.viewer is required"), e.console.assert(t.viewport, "[Drawer] options.viewport is required"), e.console.assert(t.element, "[Drawer] options.element is required"), this.viewer = t.viewer, this.viewport = t.viewport, this.debugGridColor = typeof t.debugGridColor == "string" ? [t.debugGridColor] : t.debugGridColor || e.DEFAULT_SETTINGS.debugGridColor, this.options = t.options || {}, this.container = e.getElement(t.element), this._renderingTarget = this._createDrawingElement(), this.canvas.style.width = "100%", this.canvas.style.height = "100%", this.canvas.style.position = "absolute", this.canvas.style.left = "0", e.setElementOpacity(this.canvas, this.viewer.opacity, !0), e.setElementPointerEventsNone(this.canvas), e.setElementTouchActionNone(this.canvas), this.container.style.textAlign = "left", this.container.appendChild(this.canvas), this._checkForAPIOverrides();
			}
			get canvas() {
				return this._renderingTarget;
			}
			get element() {
				return e.console.error("Drawer.element is deprecated. Use Drawer.container instead."), this.container;
			}
			getType() {
				e.console.error("Drawer.getType must be implemented by child class");
			}
			static isSupported() {
				e.console.error("Drawer.isSupported must be implemented by child class");
			}
			_createDrawingElement() {
				return e.console.error("Drawer._createDrawingElement must be implemented by child class"), null;
			}
			draw(t) {
				e.console.error("Drawer.draw must be implemented by child class");
			}
			canRotate() {
				e.console.error("Drawer.canRotate must be implemented by child class");
			}
			destroy() {
				e.console.error("Drawer.destroy must be implemented by child class");
			}
			minimumOverlapRequired(e) {
				return !1;
			}
			setImageSmoothingEnabled(t) {
				e.console.error("Drawer.setImageSmoothingEnabled must be implemented by child class");
			}
			drawDebuggingRect(t) {
				e.console.warn("[drawer].drawDebuggingRect is not implemented by this drawer");
			}
			clear() {
				e.console.warn("[drawer].clear() is deprecated. The drawer is responsible for clearing itself as needed before drawing tiles.");
			}
			_checkForAPIOverrides() {
				if (this._createDrawingElement === e.DrawerBase.prototype._createDrawingElement) throw Error("[drawer]._createDrawingElement must be implemented by child class");
				if (this.draw === e.DrawerBase.prototype.draw) throw Error("[drawer].draw must be implemented by child class");
				if (this.canRotate === e.DrawerBase.prototype.canRotate) throw Error("[drawer].canRotate must be implemented by child class");
				if (this.destroy === e.DrawerBase.prototype.destroy) throw Error("[drawer].destroy must be implemented by child class");
				if (this.setImageSmoothingEnabled === e.DrawerBase.prototype.setImageSmoothingEnabled) throw Error("[drawer].setImageSmoothingEnabled must be implemented by child class");
			}
			viewportToDrawerRectangle(t) {
				var n = this.viewport.pixelFromPointNoRotate(t.getTopLeft(), !0), r = this.viewport.deltaPixelsFromPointsNoRotate(t.getSize(), !0);
				return new e.Rect(n.x * e.pixelDensityRatio, n.y * e.pixelDensityRatio, r.x * e.pixelDensityRatio, r.y * e.pixelDensityRatio);
			}
			viewportCoordToDrawerCoord(t) {
				var n = this.viewport.pixelFromPointNoRotate(t, !0);
				return new e.Point(n.x * e.pixelDensityRatio, n.y * e.pixelDensityRatio);
			}
			_calculateCanvasSize() {
				var n = e.pixelDensityRatio, r = this.viewport.getContainerSize();
				return new t.Point(Math.round(r.x * n), Math.round(r.y * n));
			}
			_raiseTiledImageDrawnEvent(e, t) {
				this.viewer && this.viewer.raiseEvent("tiled-image-drawn", {
					tiledImage: e,
					tiles: t
				});
			}
			_raiseDrawerErrorEvent(e, t) {
				this.viewer && this.viewer.raiseEvent("drawer-error", {
					tiledImage: e,
					drawer: this,
					error: t
				});
			}
		};
	})(n), (function(e) {
		let t = e;
		class n extends t.DrawerBase {
			constructor(e) {
				super(e), this.viewer.rejectEventHandler("tile-drawing", "The HTMLDrawer does not raise the tile-drawing event"), this.viewer.allowEventHandler("tile-drawn");
			}
			static isSupported() {
				return !0;
			}
			getType() {
				return "html";
			}
			minimumOverlapRequired(e) {
				return !0;
			}
			_createDrawingElement() {
				return e.makeNeutralElement("div");
			}
			draw(e) {
				var t = this;
				this._prepareNewFrame(), e.forEach(function(e) {
					e.opacity !== 0 && t._drawTiles(e);
				});
			}
			canRotate() {
				return !1;
			}
			destroy() {
				this.container.removeChild(this.canvas);
			}
			setImageSmoothingEnabled() {}
			_prepareNewFrame() {
				this.canvas.innerHTML = "";
			}
			_drawTiles(e) {
				var t = e.getTilesToDraw().map((e) => e.tile);
				if (!(e.opacity === 0 || t.length === 0 && !e.placeholderFillStyle)) for (var n = t.length - 1; n >= 0; n--) {
					var r = t[n];
					this._drawTile(r), this.viewer && this.viewer.raiseEvent("tile-drawn", {
						tiledImage: e,
						tile: r
					});
				}
			}
			_drawTile(t) {
				e.console.assert(t, "[Drawer._drawTile] tile is required");
				let n = this.canvas;
				if (!t.cacheImageRecord) {
					e.console.warn("[Drawer._drawTileToHTML] attempting to draw tile %s when it's not cached", t.toString());
					return;
				}
				if (!t.loaded) {
					e.console.warn("Attempting to draw tile %s when it's not yet loaded.", t.toString());
					return;
				}
				if (!t.element) {
					var r = t.getImage();
					if (!r) return;
					t.element = e.makeNeutralElement("div"), t.imgElement = r.cloneNode(), t.imgElement.style.msInterpolationMode = "nearest-neighbor", t.imgElement.style.width = "100%", t.imgElement.style.height = "100%", t.style = t.element.style, t.style.position = "absolute";
				}
				t.element.parentNode !== n && n.appendChild(t.element), t.imgElement.parentNode !== t.element && t.element.appendChild(t.imgElement), t.style.top = t.position.y + "px", t.style.left = t.position.x + "px", t.style.height = t.size.y + "px", t.style.width = t.size.x + "px", t.flipped && (t.style.transform = "scaleX(-1)"), e.setElementOpacity(t.element, t.opacity);
			}
		}
		e.HTMLDrawer = n;
	})(n), (function(e) {
		let t = e;
		class n extends t.DrawerBase {
			constructor(e) {
				super(e), this.context = this.canvas.getContext("2d"), this.sketchCanvas = null, this.sketchContext = null, this._imageSmoothingEnabled = !0, this.viewer.allowEventHandler("tile-drawn"), this.viewer.allowEventHandler("tile-drawing");
			}
			static isSupported() {
				return e.supportsCanvas;
			}
			getType() {
				return "canvas";
			}
			_createDrawingElement() {
				let t = e.makeNeutralElement("canvas"), n = this._calculateCanvasSize();
				return t.width = n.x, t.height = n.y, t;
			}
			draw(e) {
				this._prepareNewFrame(), this.viewer.viewport.getFlip() !== this._viewportFlipped && this._flip();
				for (let t of e) t.opacity !== 0 && this._drawTiles(t);
			}
			canRotate() {
				return !0;
			}
			destroy() {
				this.canvas.width = 1, this.canvas.height = 1, this.sketchCanvas = null, this.sketchContext = null, this.container.removeChild(this.canvas);
			}
			minimumOverlapRequired(e) {
				return !0;
			}
			setImageSmoothingEnabled(e) {
				this._imageSmoothingEnabled = !!e, this._updateImageSmoothingEnabled(this.context), this.viewer.forceRedraw();
			}
			drawDebuggingRect(t) {
				var n = this.context;
				n.save(), n.lineWidth = 2 * e.pixelDensityRatio, n.strokeStyle = this.debugGridColor[0], n.fillStyle = this.debugGridColor[0], n.strokeRect(t.x * e.pixelDensityRatio, t.y * e.pixelDensityRatio, t.width * e.pixelDensityRatio, t.height * e.pixelDensityRatio), n.restore();
			}
			get _viewportFlipped() {
				return this.context.getTransform().a < 0;
			}
			_raiseTileDrawingEvent(e, t, n, r) {
				this.viewer.raiseEvent("tile-drawing", {
					tiledImage: e,
					context: t,
					tile: n,
					rendered: r
				});
			}
			_prepareNewFrame() {
				var e = this._calculateCanvasSize();
				if ((this.canvas.width !== e.x || this.canvas.height !== e.y) && (this.canvas.width = e.x, this.canvas.height = e.y, this._updateImageSmoothingEnabled(this.context), this.sketchCanvas !== null)) {
					var t = this._calculateSketchCanvasSize();
					this.sketchCanvas.width = t.x, this.sketchCanvas.height = t.y, this._updateImageSmoothingEnabled(this.sketchContext);
				}
				this._clear();
			}
			_clear(e, t) {
				var n = this._getContext(e);
				if (t) n.clearRect(t.x, t.y, t.width, t.height);
				else {
					var r = n.canvas;
					n.clearRect(0, 0, r.width, r.height);
				}
			}
			_drawTiles(t) {
				var n = t.getTilesToDraw().map((e) => e.tile);
				if (!(t.opacity === 0 || n.length === 0 && !t.placeholderFillStyle)) {
					var r = n[0], i;
					r && (i = t.opacity < 1 || t.compositeOperation && t.compositeOperation !== "source-over" || !t._isBottomItem() && t.source.hasTransparency(r.context2D, r.getUrl(), r.ajaxHeaders, r.postData));
					var a, s, c = this.viewport.getZoom(!0), l = t.viewportToImageZoom(c);
					n.length > 1 && l > t.smoothTileEdgesMinZoom && !t.iOSDevice && t.getRotation(!0) % 360 == 0 && (i = !0, a = r.getScaleForEdgeSmoothing(), s = r.getTranslationForEdgeSmoothing(a, this._getCanvasSize(!1), this._getCanvasSize(!0)));
					var u;
					i && (a || (u = this.viewport.viewportToViewerElementRectangle(t.getClippedBounds(!0)).getIntegerBoundingBox(), u = u.times(e.pixelDensityRatio)), this._clear(!0, u)), a || this._setRotations(t, i);
					var d = !1;
					if (t._clip) {
						this._saveContext(i);
						var f = t.imageToViewportRectangle(t._clip, !0);
						f = f.rotate(-t.getRotation(!0), t._getRotationPoint(!0));
						var p = this.viewportToDrawerRectangle(f);
						a && (p = p.times(a)), s && (p = p.translate(s)), this._setClip(p, i), d = !0;
					}
					if (t._croppingPolygons) {
						var m = this;
						d || this._saveContext(i);
						try {
							var h = t._croppingPolygons.map(function(e) {
								return e.map(function(e) {
									var n = t.imageToViewportCoordinates(e.x, e.y, !0).rotate(-t.getRotation(!0), t._getRotationPoint(!0)), r = m.viewportCoordToDrawerCoord(n);
									return a && (r = r.times(a)), s && (r = r.plus(s)), r;
								});
							});
							this._clipWithPolygons(h, i);
						} catch (t) {
							e.console.error(t);
						}
						d = !0;
					}
					if (t._hasOpaqueTile = !1, t.placeholderFillStyle && t._hasOpaqueTile === !1) {
						let e = this.viewportToDrawerRectangle(t.getBoundsNoRotate(!0));
						a && (e = e.times(a)), s && (e = e.translate(s));
						let n = null;
						n = typeof t.placeholderFillStyle == "function" ? t.placeholderFillStyle(t, this.context) : t.placeholderFillStyle, this._drawRectangle(e, n, i);
					}
					var g = o(t.subPixelRoundingForTransparency), _ = !1;
					g === e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS ? _ = !0 : g === e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST && (_ = !(this.viewer && this.viewer.isAnimating()));
					for (var v = 0; v < n.length; v++) r = n[v], this._drawTile(r, t, i, a, s, _, t.source), this.viewer && this.viewer.raiseEvent("tile-drawn", {
						tiledImage: t,
						tile: r
					});
					d && this._restoreContext(i), a || (t.getRotation(!0) % 360 != 0 && this._restoreRotationChanges(i), this.viewport.getRotation(!0) % 360 != 0 && this._restoreRotationChanges(i)), i && (a && this._setRotations(t), this.blendSketch({
						opacity: t.opacity,
						scale: a,
						translate: s,
						compositeOperation: t.compositeOperation,
						bounds: u
					}), a && (t.getRotation(!0) % 360 != 0 && this._restoreRotationChanges(!1), this.viewport.getRotation(!0) % 360 != 0 && this._restoreRotationChanges(!1))), this._drawDebugInfo(t, n), this._raiseTiledImageDrawnEvent(t, n);
				}
			}
			_drawDebugInfo(t, n) {
				if (t.debugMode) for (var r = n.length - 1; r >= 0; r--) {
					var i = n[r];
					try {
						this._drawDebugInfoOnTile(i, n.length, r, t);
					} catch (t) {
						e.console.error(t);
					}
				}
			}
			_clipWithPolygons(e, t) {
				var n = this._getContext(t);
				n.beginPath();
				for (let t of e) for (let [e, r] of t.entries()) n[e === 0 ? "moveTo" : "lineTo"](r.x, r.y);
				n.clip();
			}
			_drawTile(t, n, r, i, a, o, s) {
				e.console.assert(t, "[Drawer._drawTile] tile is required"), e.console.assert(n, "[Drawer._drawTile] drawingHandler is required");
				var c = this._getContext(r);
				i ||= 1, this._drawTileToCanvas(t, c, n, i, a, o, s);
			}
			_drawTileToCanvas(t, n, r, i, a, o, s) {
				var c = t.position.times(e.pixelDensityRatio), l = t.size.times(e.pixelDensityRatio), u;
				if (!t.context2D && !t.cacheImageRecord) {
					e.console.warn("[Drawer._drawTileToCanvas] attempting to draw tile %s when it's not cached", t.toString());
					return;
				}
				if (u = t.getCanvasContext(), !t.loaded || !u) {
					e.console.warn("Attempting to draw tile %s when it's not yet loaded.", t.toString());
					return;
				}
				n.save(), typeof i == "number" && i !== 1 && (c = c.times(i), l = l.times(i)), a instanceof e.Point && (c = c.plus(a)), n.globalAlpha === 1 && t.hasTransparency && (o && (c.x = Math.round(c.x), c.y = Math.round(c.y), l.x = Math.round(l.x), l.y = Math.round(l.y)), n.clearRect(c.x, c.y, l.x, l.y)), this._raiseTileDrawingEvent(r, n, t, u);
				var d, f;
				t.sourceBounds ? (d = Math.min(t.sourceBounds.width, u.canvas.width), f = Math.min(t.sourceBounds.height, u.canvas.height)) : (d = u.canvas.width, f = u.canvas.height), n.translate(c.x + l.x / 2, 0), t.flipped && n.scale(-1, 1), n.drawImage(u.canvas, 0, 0, d, f, -l.x / 2, c.y, l.x, l.y), n.restore();
			}
			_getContext(e) {
				var t = this.context;
				if (e) {
					if (this.sketchCanvas === null) {
						this.sketchCanvas = document.createElement("canvas");
						var n = this._calculateSketchCanvasSize();
						if (this.sketchCanvas.width = n.x, this.sketchCanvas.height = n.y, this.sketchContext = this.sketchCanvas.getContext("2d"), this.viewport.getRotation() === 0) {
							var r = this;
							this.viewer.addHandler("rotate", function e() {
								if (r.viewport.getRotation() !== 0) {
									r.viewer.removeHandler("rotate", e);
									var t = r._calculateSketchCanvasSize();
									r.sketchCanvas.width = t.x, r.sketchCanvas.height = t.y;
								}
							});
						}
						this._updateImageSmoothingEnabled(this.sketchContext);
					}
					t = this.sketchContext;
				}
				return t;
			}
			_saveContext(e) {
				this._getContext(e).save();
			}
			_restoreContext(e) {
				this._getContext(e).restore();
			}
			_setClip(e, t) {
				var n = this._getContext(t);
				n.beginPath(), n.rect(e.x, e.y, e.width, e.height), n.clip();
			}
			_drawRectangle(e, t, n) {
				var r = this._getContext(n);
				r.save(), r.fillStyle = t, r.fillRect(e.x, e.y, e.width, e.height), r.restore();
			}
			blendSketch(t, n, r, i) {
				var a = t;
				e.isPlainObject(a) || (a = {
					opacity: t,
					scale: n,
					translate: r,
					compositeOperation: i
				}), t = a.opacity, i = a.compositeOperation;
				var o = a.bounds;
				if (this.context.save(), this.context.globalAlpha = t, i && (this.context.globalCompositeOperation = i), o) o.x < 0 && (o.width += o.x, o.x = 0), o.x + o.width > this.canvas.width && (o.width = this.canvas.width - o.x), o.y < 0 && (o.height += o.y, o.y = 0), o.y + o.height > this.canvas.height && (o.height = this.canvas.height - o.y), this.context.drawImage(this.sketchCanvas, o.x, o.y, o.width, o.height, o.x, o.y, o.width, o.height);
				else {
					n = a.scale || 1, r = a.translate;
					var s = r instanceof e.Point ? r : new e.Point(0, 0), c = 0, l = 0;
					if (r) {
						var u = this.sketchCanvas.width - this.canvas.width, d = this.sketchCanvas.height - this.canvas.height;
						c = Math.round(u / 2), l = Math.round(d / 2);
					}
					this.context.drawImage(this.sketchCanvas, s.x - c * n, s.y - l * n, (this.canvas.width + 2 * c) * n, (this.canvas.height + 2 * l) * n, -c, -l, this.canvas.width + 2 * c, this.canvas.height + 2 * l);
				}
				this.context.restore();
			}
			_drawDebugInfoOnTile(t, n, r, i) {
				var a = this.viewer.world.getIndexOfItem(i) % this.debugGridColor.length, o = this.context;
				o.save(), o.lineWidth = 2 * e.pixelDensityRatio, o.font = "small-caps bold " + 13 * e.pixelDensityRatio + "px arial", o.strokeStyle = this.debugGridColor[a], o.fillStyle = this.debugGridColor[a], this._setRotations(i), this._viewportFlipped && this._flip({ point: t.position.plus(t.size.divide(2)) }), o.strokeRect(t.position.x * e.pixelDensityRatio, t.position.y * e.pixelDensityRatio, t.size.x * e.pixelDensityRatio, t.size.y * e.pixelDensityRatio);
				var s = (t.position.x + t.size.x / 2) * e.pixelDensityRatio, c = (t.position.y + t.size.y / 2) * e.pixelDensityRatio;
				o.translate(s, c);
				let l = this.viewport.getRotation(!0);
				o.rotate(Math.PI / 180 * -l), o.translate(-s, -c), t.x === 0 && t.y === 0 && (o.fillText("Zoom: " + this.viewport.getZoom(), t.position.x * e.pixelDensityRatio, (t.position.y - 30) * e.pixelDensityRatio), o.fillText("Pan: " + this.viewport.getBounds().toString(), t.position.x * e.pixelDensityRatio, (t.position.y - 20) * e.pixelDensityRatio)), o.fillText("Level: " + t.level, (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 20) * e.pixelDensityRatio), o.fillText("Column: " + t.x, (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 30) * e.pixelDensityRatio), o.fillText("Row: " + t.y, (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 40) * e.pixelDensityRatio), o.fillText("Order: " + r + " of " + n, (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 50) * e.pixelDensityRatio), o.fillText("Size: " + t.size.toString(), (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 60) * e.pixelDensityRatio), o.fillText("Position: " + t.position.toString(), (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 70) * e.pixelDensityRatio), this.viewport.getRotation(!0) % 360 != 0 && this._restoreRotationChanges(), i.getRotation(!0) % 360 != 0 && this._restoreRotationChanges(), o.restore();
			}
			_updateImageSmoothingEnabled(e) {
				e.msImageSmoothingEnabled = this._imageSmoothingEnabled, e.imageSmoothingEnabled = this._imageSmoothingEnabled;
			}
			_getCanvasSize(t) {
				var n = this._getContext(t).canvas;
				return new e.Point(n.width, n.height);
			}
			_getCanvasCenter() {
				return new e.Point(this.canvas.width / 2, this.canvas.height / 2);
			}
			_setRotations(e, t = !1) {
				var n = !1;
				this.viewport.getRotation(!0) % 360 != 0 && (this._offsetForRotation({
					degrees: this.viewport.getRotation(!0),
					useSketch: t,
					saveContext: n
				}), n = !1), e.getRotation(!0) % 360 != 0 && this._offsetForRotation({
					degrees: e.getRotation(!0),
					point: this.viewport.pixelFromPointNoRotate(e._getRotationPoint(!0), !0),
					useSketch: t,
					saveContext: n
				});
			}
			_offsetForRotation(t) {
				var n = t.point ? t.point.times(e.pixelDensityRatio) : this._getCanvasCenter(), r = this._getContext(t.useSketch);
				r.save(), r.translate(n.x, n.y), r.rotate(Math.PI / 180 * t.degrees), r.translate(-n.x, -n.y);
			}
			_flip(t) {
				t ||= {};
				var n = t.point ? t.point.times(e.pixelDensityRatio) : this._getCanvasCenter(), r = this._getContext(t.useSketch);
				r.translate(n.x, 0), r.scale(-1, 1), r.translate(-n.x, 0);
			}
			_restoreRotationChanges(e) {
				this._getContext(e).restore();
			}
			_calculateCanvasSize() {
				var t = e.pixelDensityRatio, n = this.viewport.getContainerSize();
				return {
					x: Math.round(n.x * t),
					y: Math.round(n.y * t)
				};
			}
			_calculateSketchCanvasSize() {
				var e = this._calculateCanvasSize();
				if (this.viewport.getRotation() === 0) return e;
				var t = Math.ceil(Math.sqrt(e.x * e.x + e.y * e.y));
				return {
					x: t,
					y: t
				};
			}
		}
		e.CanvasDrawer = n;
		var r = e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER;
		function i(t) {
			return t !== e.SUBPIXEL_ROUNDING_OCCURRENCES.ALWAYS && t !== e.SUBPIXEL_ROUNDING_OCCURRENCES.ONLY_AT_REST && t !== e.SUBPIXEL_ROUNDING_OCCURRENCES.NEVER;
		}
		function a(e) {
			return i(e) ? r : e;
		}
		function o(t) {
			if (typeof t == "number") return a(t);
			if (!t || !e.Browser) return r;
			var n = t[e.Browser.vendor];
			return i(n) && (n = t["*"]), a(n);
		}
	})(n), (function(e) {
		let t = e;
		t.WebGLDrawer = class extends t.DrawerBase {
			constructor(e) {
				super(e), this._destroyed = !1, this._TextureMap = /* @__PURE__ */ new Map(), this._TileMap = /* @__PURE__ */ new Map(), this._gl = null, this._firstPass = null, this._secondPass = null, this._glFrameBuffer = null, this._renderToTexture = null, this._glFramebufferToCanvasTransform = null, this._outputCanvas = null, this._outputContext = null, this._clippingCanvas = null, this._clippingContext = null, this._renderingCanvas = null, this._backupCanvasDrawer = null, this._imageSmoothingEnabled = !0, this._boundToTileReady = (e) => this._tileReadyHandler(e), this._boundToImageUnloaded = (e) => this._imageUnloadedHandler(e), this.viewer.addHandler("tile-ready", this._boundToTileReady), this.viewer.addHandler("image-unloaded", this._boundToImageUnloaded), this.viewer.rejectEventHandler("tile-drawn", "The WebGLDrawer does not raise the tile-drawn event"), this.viewer.rejectEventHandler("tile-drawing", "The WebGLDrawer does not raise the tile-drawing event"), this._setupCanvases(), this._setupRenderer(), this.context = this._outputContext;
			}
			destroy() {
				if (this._destroyed) return;
				let e = this._gl;
				var t = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);
				for (let n = 0; n < t; ++n) e.activeTexture(e.TEXTURE0 + n), e.bindTexture(e.TEXTURE_2D, null), e.bindTexture(e.TEXTURE_CUBE_MAP, null);
				e.bindBuffer(e.ARRAY_BUFFER, null), e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, null), e.bindRenderbuffer(e.RENDERBUFFER, null), e.bindFramebuffer(e.FRAMEBUFFER, null), this._unloadTextures(), e.deleteBuffer(this._secondPass.bufferOutputPosition), e.deleteFramebuffer(this._glFrameBuffer), this._renderingCanvas.width = this._renderingCanvas.height = 1, this._clippingCanvas.width = this._clippingCanvas.height = 1, this._outputCanvas.width = this._outputCanvas.height = 1, this._renderingCanvas = null, this._clippingCanvas = this._clippingContext = null, this._outputCanvas = this._outputContext = null;
				let n = e.getExtension("WEBGL_lose_context");
				n && n.loseContext(), this.viewer.removeHandler("tile-ready", this._boundToTileReady), this.viewer.removeHandler("image-unloaded", this._boundToImageUnloaded), this.viewer.removeHandler("resize", this._resizeHandler), this._gl = null, this._backupCanvasDrawer &&= (this._backupCanvasDrawer.destroy(), null), this.container.removeChild(this.canvas), this.viewer.drawer === this && (this.viewer.drawer = null), this._destroyed = !0;
			}
			canRotate() {
				return !0;
			}
			static isSupported() {
				let t = document.createElement("canvas"), n = e.isFunction(t.getContext) && t.getContext("webgl"), r = n && n.getExtension("WEBGL_lose_context");
				return r && r.loseContext(), !!n;
			}
			getType() {
				return "webgl";
			}
			minimumOverlapRequired(e) {
				return e.isTainted();
			}
			_createDrawingElement() {
				let t = e.makeNeutralElement("canvas"), n = this._calculateCanvasSize();
				return t.width = n.x, t.height = n.y, t;
			}
			_getBackupCanvasDrawer() {
				return this._backupCanvasDrawer || (this._backupCanvasDrawer = this.viewer.requestDrawer("canvas", { mainDrawer: !1 }), this._backupCanvasDrawer.canvas.style.setProperty("visibility", "hidden")), this._backupCanvasDrawer;
			}
			draw(n) {
				let r = this._gl, i = this.viewport.getBoundsNoRotateWithMargins(!0), a = {
					bounds: i,
					center: new t.Point(i.x + i.width / 2, i.y + i.height / 2),
					rotation: this.viewport.getRotation(!0) * Math.PI / 180
				}, o = this.viewport.flipped ? -1 : 1, s = e.Mat3.makeTranslation(-a.center.x, -a.center.y), c = e.Mat3.makeScaling(2 / a.bounds.width * o, -2 / a.bounds.height), l = e.Mat3.makeRotation(-a.rotation), u = c.multiply(l).multiply(s);
				r.bindFramebuffer(r.FRAMEBUFFER, null), r.clear(r.COLOR_BUFFER_BIT), this._outputContext.clearRect(0, 0, this._outputCanvas.width, this._outputCanvas.height);
				let d = !1;
				n.forEach((t, n) => {
					if (t.isTainted()) {
						d &&= (this._outputContext.drawImage(this._renderingCanvas, 0, 0), r.bindFramebuffer(r.FRAMEBUFFER, null), r.clear(r.COLOR_BUFFER_BIT), !1);
						let e = this._getBackupCanvasDrawer();
						e.draw([t]), this._outputContext.drawImage(e.canvas, 0, 0);
					} else {
						let i = t.getTilesToDraw();
						if (t.placeholderFillStyle && t._hasOpaqueTile === !1 && this._drawPlaceholder(t), i.length === 0 || t.getOpacity() === 0) return;
						let a = i[0], o = t.compositeOperation || this.viewer.compositeOperation || t._clip || t._croppingPolygons || t.debugMode, s = o || t.opacity < 1 || a.hasTransparency;
						o && (d && this._outputContext.drawImage(this._renderingCanvas, 0, 0), r.bindFramebuffer(r.FRAMEBUFFER, null), r.clear(r.COLOR_BUFFER_BIT)), r.useProgram(this._firstPass.shaderProgram), s ? (r.bindFramebuffer(r.FRAMEBUFFER, this._glFrameBuffer), r.clear(r.COLOR_BUFFER_BIT)) : r.bindFramebuffer(r.FRAMEBUFFER, null);
						let c = u, l = t.getRotation(!0);
						if (l % 360 != 0) {
							let n = e.Mat3.makeRotation(-l * Math.PI / 180), r = t.getBoundsNoRotate(!0).getCenter(), i = e.Mat3.makeTranslation(r.x, r.y), a = e.Mat3.makeTranslation(-r.x, -r.y), o = i.multiply(n).multiply(a);
							c = u.multiply(o);
						}
						let f = this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS);
						if (f <= 0) throw Error(`WegGL error: bad value for gl parameter MAX_TEXTURE_IMAGE_UNITS (${f}). This could happen
                        if too many contexts have been created and not released, or there is another problem with the graphics card.`);
						let p = new Float32Array(f * 12), m = Array(f), h = Array(f), g = Array(f);
						for (let e = 0; e < i.length; e++) {
							let n = i[e].tile, a = e % f, o = a + 1, s = n.getCanvasContext(), l = s ? this._TextureMap.get(s.canvas) : null;
							if (l ||= (this._tileReadyHandler({
								tile: n,
								tiledImage: t
							}), s ? this._TextureMap.get(s.canvas) : null), l && this._getTileData(n, t, l, c, a, p, m, h, g), o === f || e === i.length - 1) {
								for (let e = 0; e <= o; e++) r.activeTexture(r.TEXTURE0 + e), r.bindTexture(r.TEXTURE_2D, m[e]);
								r.bindBuffer(r.ARRAY_BUFFER, this._firstPass.bufferTexturePosition), r.bufferData(r.ARRAY_BUFFER, p, r.DYNAMIC_DRAW), h.forEach((e, t) => {
									r.uniformMatrix3fv(this._firstPass.uTransformMatrices[t], !1, e);
								}), r.uniform1fv(this._firstPass.uOpacities, new Float32Array(g)), r.bindBuffer(r.ARRAY_BUFFER, this._firstPass.bufferOutputPosition), r.vertexAttribPointer(this._firstPass.aOutputPosition, 2, r.FLOAT, !1, 0, 0), r.bindBuffer(r.ARRAY_BUFFER, this._firstPass.bufferTexturePosition), r.vertexAttribPointer(this._firstPass.aTexturePosition, 2, r.FLOAT, !1, 0, 0), r.bindBuffer(r.ARRAY_BUFFER, this._firstPass.bufferIndex), r.vertexAttribPointer(this._firstPass.aIndex, 1, r.FLOAT, !1, 0, 0), r.drawArrays(r.TRIANGLES, 0, 6 * o);
							}
						}
						s && (r.useProgram(this._secondPass.shaderProgram), r.bindFramebuffer(r.FRAMEBUFFER, null), r.activeTexture(r.TEXTURE0), r.bindTexture(r.TEXTURE_2D, this._renderToTexture), this._gl.uniform1f(this._secondPass.uOpacityMultiplier, t.opacity), r.bindBuffer(r.ARRAY_BUFFER, this._secondPass.bufferTexturePosition), r.vertexAttribPointer(this._secondPass.aTexturePosition, 2, r.FLOAT, !1, 0, 0), r.bindBuffer(r.ARRAY_BUFFER, this._secondPass.bufferOutputPosition), r.vertexAttribPointer(this._secondPass.aOutputPosition, 2, r.FLOAT, !1, 0, 0), r.drawArrays(r.TRIANGLES, 0, 6)), d = !0, o && (this._applyContext2dPipeline(t, i, n), d = !1, r.bindFramebuffer(r.FRAMEBUFFER, null), r.clear(r.COLOR_BUFFER_BIT)), n === 0 && this._raiseTiledImageDrawnEvent(t, i.map((e) => e.tile));
					}
				}), d && this._outputContext.drawImage(this._renderingCanvas, 0, 0);
			}
			setImageSmoothingEnabled(e) {
				this._imageSmoothingEnabled !== e && (this._imageSmoothingEnabled = e, this._unloadTextures(), this.viewer.world.draw());
			}
			drawDebuggingRect(t) {
				let n = this._outputContext;
				n.save(), n.lineWidth = 2 * e.pixelDensityRatio, n.strokeStyle = this.debugGridColor[0], n.fillStyle = this.debugGridColor[0], n.strokeRect(t.x * e.pixelDensityRatio, t.y * e.pixelDensityRatio, t.width * e.pixelDensityRatio, t.height * e.pixelDensityRatio), n.restore();
			}
			_getTextureDataFromTile(e) {
				return e.getCanvasContext().canvas;
			}
			_applyContext2dPipeline(e, t, n) {
				if (this._outputContext.save(), this._outputContext.globalCompositeOperation = n === 0 ? null : e.compositeOperation || this.viewer.compositeOperation, e._croppingPolygons || e._clip ? (this._renderToClippingCanvas(e), this._outputContext.drawImage(this._clippingCanvas, 0, 0)) : this._outputContext.drawImage(this._renderingCanvas, 0, 0), this._outputContext.restore(), e.debugMode) {
					let n = this.viewer.viewport.getFlip();
					n && this._flip(), this._drawDebugInfo(t, e, n), n && this._flip();
				}
			}
			_getTileData(t, n, r, i, a, o, s, c, l) {
				let u = r.texture, d = r.position;
				o.set(d, a * 12);
				let f = this._calculateOverlapFraction(t, n), p = t.positionedBounds.width * f.x, m = t.positionedBounds.height * f.y, h = t.positionedBounds.x + (t.x === 0 ? 0 : p), g = t.positionedBounds.y + (t.y === 0 ? 0 : m), _ = t.positionedBounds.x + t.positionedBounds.width - (t.isRightMost ? 0 : p), v = t.positionedBounds.y + t.positionedBounds.height - (t.isBottomMost ? 0 : m), y = _ - h, b = v - g, x = new e.Mat3([
					y,
					0,
					0,
					0,
					b,
					0,
					h,
					g,
					1
				]);
				if (t.flipped) {
					let t = e.Mat3.makeTranslation(.5, 0), n = e.Mat3.makeTranslation(-.5, 0), r = t.multiply(e.Mat3.makeScaling(-1, 1)).multiply(n);
					x = x.multiply(r);
				}
				let S = i.multiply(x);
				l[a] = t.opacity, s[a] = u, c[a] = S.values;
			}
			_textureFilter() {
				return this._imageSmoothingEnabled ? this._gl.LINEAR : this._gl.NEAREST;
			}
			_setupRenderer() {
				let t = this._gl;
				t || e.console.error("_setupCanvases must be called before _setupRenderer"), this._unitQuad = this._makeQuadVertexBuffer(0, 1, 0, 1), this._makeFirstPassShaderProgram(), this._makeSecondPassShaderProgram(), this._renderToTexture = t.createTexture(), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, this._renderToTexture), t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, this._renderingCanvas.width, this._renderingCanvas.height, 0, t.RGBA, t.UNSIGNED_BYTE, null), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_MIN_FILTER, this._textureFilter()), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_S, t.CLAMP_TO_EDGE), t.texParameteri(t.TEXTURE_2D, t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE), this._glFrameBuffer = t.createFramebuffer(), t.bindFramebuffer(t.FRAMEBUFFER, this._glFrameBuffer), t.framebufferTexture2D(t.FRAMEBUFFER, t.COLOR_ATTACHMENT0, t.TEXTURE_2D, this._renderToTexture, 0), t.enable(t.BLEND), t.blendFunc(t.ONE, t.ONE_MINUS_SRC_ALPHA);
			}
			_makeFirstPassShaderProgram() {
				let e = this._glNumTextures = this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS), t = `
            attribute vec2 a_output_position;
            attribute vec2 a_texture_position;
            attribute float a_index;

            ${[...Array(e).keys()].map((e) => `uniform mat3 u_matrix_${e};`).join("\n")} // create a uniform mat3 for each potential tile to draw

            varying vec2 v_texture_position;
            varying float v_image_index;

            void main() {

                mat3 transform_matrix; // value will be set by the if/elses in makeConditional()

                ${[...Array(e).keys()].map((e) => `${e > 0 ? "else " : ""}if(int(a_index) == ${e}) { transform_matrix = u_matrix_${e}; }`).join("\n")}

                gl_Position = vec4(transform_matrix * vec3(a_output_position, 1), 1);

                v_texture_position = a_texture_position;
                v_image_index = a_index;
            }
            `, n = `
            precision mediump float;

            // our textures
            uniform sampler2D u_images[${e}];
            // our opacities
            uniform float u_opacities[${e}];

            // the varyings passed in from the vertex shader.
            varying vec2 v_texture_position;
            varying float v_image_index;

            void main() {
                // can't index directly with a variable, need to use a loop iterator hack
                for(int i = 0; i < ${e}; ++i){
                    if(i == int(v_image_index)){
                        gl_FragColor = texture2D(u_images[i], v_texture_position) * u_opacities[i];
                    }
                }
            }
            `, r = this._gl, i = this.constructor.initShaderProgram(r, t, n);
				r.useProgram(i), this._firstPass = {
					shaderProgram: i,
					aOutputPosition: r.getAttribLocation(i, "a_output_position"),
					aTexturePosition: r.getAttribLocation(i, "a_texture_position"),
					aIndex: r.getAttribLocation(i, "a_index"),
					uTransformMatrices: [...Array(this._glNumTextures).keys()].map((e) => r.getUniformLocation(i, `u_matrix_${e}`)),
					uImages: r.getUniformLocation(i, "u_images"),
					uOpacities: r.getUniformLocation(i, "u_opacities"),
					bufferOutputPosition: r.createBuffer(),
					bufferTexturePosition: r.createBuffer(),
					bufferIndex: r.createBuffer()
				}, r.uniform1iv(this._firstPass.uImages, [...Array(e).keys()]);
				let a = new Float32Array(e * 12);
				for (let t = 0; t < e; ++t) a.set(Float32Array.from(this._unitQuad), t * 12);
				r.bindBuffer(r.ARRAY_BUFFER, this._firstPass.bufferOutputPosition), r.bufferData(r.ARRAY_BUFFER, a, r.STATIC_DRAW), r.enableVertexAttribArray(this._firstPass.aOutputPosition), r.bindBuffer(r.ARRAY_BUFFER, this._firstPass.bufferTexturePosition), r.enableVertexAttribArray(this._firstPass.aTexturePosition), r.bindBuffer(r.ARRAY_BUFFER, this._firstPass.bufferIndex);
				let o = [...Array(this._glNumTextures).keys()].map((e) => [
					,
					,
					,
					,
					,
					,
				].fill(e)).flat();
				r.bufferData(r.ARRAY_BUFFER, new Float32Array(o), r.STATIC_DRAW), r.enableVertexAttribArray(this._firstPass.aIndex);
			}
			_makeSecondPassShaderProgram() {
				let t = this._gl, n = this.constructor.initShaderProgram(t, "\n            attribute vec2 a_output_position;\n            attribute vec2 a_texture_position;\n\n            uniform mat3 u_matrix;\n\n            varying vec2 v_texture_position;\n\n            void main() {\n                gl_Position = vec4(u_matrix * vec3(a_output_position, 1), 1);\n\n                v_texture_position = a_texture_position;\n            }\n            ", "\n            precision mediump float;\n\n            // our texture\n            uniform sampler2D u_image;\n\n            // the texCoords passed in from the vertex shader.\n            varying vec2 v_texture_position;\n\n            // the opacity multiplier for the image\n            uniform float u_opacity_multiplier;\n\n            void main() {\n                gl_FragColor = texture2D(u_image, v_texture_position);\n                gl_FragColor *= u_opacity_multiplier;\n            }\n            ");
				t.useProgram(n), this._secondPass = {
					shaderProgram: n,
					aOutputPosition: t.getAttribLocation(n, "a_output_position"),
					aTexturePosition: t.getAttribLocation(n, "a_texture_position"),
					uMatrix: t.getUniformLocation(n, "u_matrix"),
					uImage: t.getUniformLocation(n, "u_image"),
					uOpacityMultiplier: t.getUniformLocation(n, "u_opacity_multiplier"),
					bufferOutputPosition: t.createBuffer(),
					bufferTexturePosition: t.createBuffer()
				}, t.bindBuffer(t.ARRAY_BUFFER, this._secondPass.bufferOutputPosition), t.bufferData(t.ARRAY_BUFFER, this._unitQuad, t.STATIC_DRAW), t.enableVertexAttribArray(this._secondPass.aOutputPosition), t.bindBuffer(t.ARRAY_BUFFER, this._secondPass.bufferTexturePosition), t.bufferData(t.ARRAY_BUFFER, this._unitQuad, t.DYNAMIC_DRAW), t.enableVertexAttribArray(this._secondPass.aTexturePosition);
				let r = e.Mat3.makeScaling(2, 2).multiply(e.Mat3.makeTranslation(-.5, -.5));
				t.uniformMatrix3fv(this._secondPass.uMatrix, !1, r.values);
			}
			_resizeRenderer() {
				let e = this._gl, t = this._renderingCanvas.width, n = this._renderingCanvas.height;
				e.viewport(0, 0, t, n), e.deleteTexture(this._renderToTexture), this._renderToTexture = e.createTexture(), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, this._renderToTexture), e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, t, n, 0, e.RGBA, e.UNSIGNED_BYTE, null), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, this._textureFilter()), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.bindFramebuffer(e.FRAMEBUFFER, this._glFrameBuffer), e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, this._renderToTexture, 0);
			}
			_setupCanvases() {
				let e = this;
				this._outputCanvas = this.canvas, this._outputContext = this._outputCanvas.getContext("2d"), this._renderingCanvas = document.createElement("canvas"), this._clippingCanvas = document.createElement("canvas"), this._clippingContext = this._clippingCanvas.getContext("2d"), this._renderingCanvas.width = this._clippingCanvas.width = this._outputCanvas.width, this._renderingCanvas.height = this._clippingCanvas.height = this._outputCanvas.height, this._gl = this._renderingCanvas.getContext("webgl"), this._resizeHandler = function() {
					e._outputCanvas !== e.viewer.drawer.canvas && (e._outputCanvas.style.width = e.viewer.drawer.canvas.clientWidth + "px", e._outputCanvas.style.height = e.viewer.drawer.canvas.clientHeight + "px");
					let t = e._calculateCanvasSize();
					(e._outputCanvas.width !== t.x || e._outputCanvas.height !== t.y) && (e._outputCanvas.width = t.x, e._outputCanvas.height = t.y), e._renderingCanvas.style.width = e._outputCanvas.clientWidth + "px", e._renderingCanvas.style.height = e._outputCanvas.clientHeight + "px", e._renderingCanvas.width = e._clippingCanvas.width = e._outputCanvas.width, e._renderingCanvas.height = e._clippingCanvas.height = e._outputCanvas.height, e._resizeRenderer();
				}, this.viewer.addHandler("resize", this._resizeHandler);
			}
			_makeQuadVertexBuffer(e, t, n, r) {
				return new Float32Array([
					e,
					r,
					t,
					r,
					e,
					n,
					e,
					n,
					t,
					r,
					t,
					n
				]);
			}
			_tileReadyHandler(t) {
				let n = t.tile, r = t.tiledImage;
				if (r.isTainted()) return;
				let i = n.getCanvasContext(), a = i && i.canvas;
				if (!a || e.isCanvasTainted(a)) {
					r.isTainted() || (r.setTainted(!0), e.console.warn("WebGL cannot be used to draw this TiledImage because it has tainted data. Does crossOriginPolicy need to be set?"), this._raiseDrawerErrorEvent(r, "Tainted data cannot be used by the WebGLDrawer. Falling back to CanvasDrawer for this TiledImage."));
					return;
				}
				if (!this._TextureMap.get(a)) {
					let e = this._gl, t = e.createTexture(), o, s = r.source.tileOverlap, c, l;
					if (n.sourceBounds ? (c = Math.min(n.sourceBounds.width, a.width) / a.width, l = Math.min(n.sourceBounds.height, a.height) / a.height) : (c = 1, l = 1), s > 0) {
						let e = this._calculateOverlapFraction(n, r), t = (n.x === 0 ? 0 : e.x) * c, i = (n.y === 0 ? 0 : e.y) * l, a = (n.isRightMost ? 1 : 1 - e.x) * c, s = (n.isBottomMost ? 1 : 1 - e.y) * l;
						o = this._makeQuadVertexBuffer(t, a, i, s);
					} else o = c === 1 && l === 1 ? this._unitQuad : this._makeQuadVertexBuffer(0, c, 0, l);
					let u = {
						texture: t,
						position: o
					};
					this._TextureMap.set(a, u), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, t), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, this._textureFilter()), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, this._textureFilter()), this._uploadImageData(i);
				}
			}
			_calculateOverlapFraction(e, t) {
				let n = t.source.tileOverlap, r = e.sourceBounds.width, i = e.sourceBounds.height, a = (e.x === 0 ? 0 : n) + (e.isRightMost ? 0 : n), o = (e.y === 0 ? 0 : n) + (e.isBottomMost ? 0 : n);
				return {
					x: n / (r + a),
					y: n / (i + o)
				};
			}
			_unloadTextures() {
				Array.from(this._TextureMap.keys()).forEach((e) => {
					this._cleanupImageData(e);
				});
			}
			_uploadImageData(t) {
				let n = this._gl, r = t.canvas;
				try {
					if (!r) throw t;
					n.texImage2D(n.TEXTURE_2D, 0, n.RGBA, n.RGBA, n.UNSIGNED_BYTE, r);
				} catch (t) {
					e.console.error("Error uploading image data to WebGL", t);
				}
			}
			_imageUnloadedHandler(e) {
				let t = e.context2D.canvas;
				this._cleanupImageData(t);
			}
			_cleanupImageData(e) {
				let t = this._TextureMap.get(e);
				this._TextureMap.delete(e), t && this._gl.deleteTexture(t.texture);
			}
			_setClip() {}
			_renderToClippingCanvas(t) {
				if (this._clippingContext.clearRect(0, 0, this._clippingCanvas.width, this._clippingCanvas.height), this._clippingContext.save(), this.viewer.viewport.getFlip()) {
					let t = new e.Point(this.canvas.width / 2, this.canvas.height / 2);
					this._clippingContext.translate(t.x, 0), this._clippingContext.scale(-1, 1), this._clippingContext.translate(-t.x, 0);
				}
				if (t._clip) {
					let e = [
						{
							x: t._clip.x,
							y: t._clip.y
						},
						{
							x: t._clip.x + t._clip.width,
							y: t._clip.y
						},
						{
							x: t._clip.x + t._clip.width,
							y: t._clip.y + t._clip.height
						},
						{
							x: t._clip.x,
							y: t._clip.y + t._clip.height
						}
					].map((e) => {
						let n = t.imageToViewportCoordinates(e.x, e.y, !0).rotate(this.viewer.viewport.getRotation(!0), this.viewer.viewport.getCenter(!0));
						return this.viewportCoordToDrawerCoord(n);
					});
					this._clippingContext.beginPath(), e.forEach((e, t) => {
						this._clippingContext[t === 0 ? "moveTo" : "lineTo"](e.x, e.y);
					}), this._clippingContext.clip(), this._setClip();
				}
				if (t._croppingPolygons) {
					let e = t._croppingPolygons.map((e) => e.map((e) => {
						let n = t.imageToViewportCoordinates(e.x, e.y, !0).rotate(this.viewer.viewport.getRotation(!0), this.viewer.viewport.getCenter(!0));
						return this.viewportCoordToDrawerCoord(n);
					}));
					this._clippingContext.beginPath(), e.forEach((e) => {
						e.forEach((e, t) => {
							this._clippingContext[t === 0 ? "moveTo" : "lineTo"](e.x, e.y);
						});
					}), this._clippingContext.clip();
				}
				if (this.viewer.viewport.getFlip()) {
					let t = new e.Point(this.canvas.width / 2, this.canvas.height / 2);
					this._clippingContext.translate(t.x, 0), this._clippingContext.scale(-1, 1), this._clippingContext.translate(-t.x, 0);
				}
				this._clippingContext.drawImage(this._renderingCanvas, 0, 0), this._clippingContext.restore();
			}
			_setRotations(e) {
				var t = !1;
				this.viewport.getRotation(!0) % 360 != 0 && (this._offsetForRotation({
					degrees: this.viewport.getRotation(!0),
					saveContext: t
				}), t = !1), e.getRotation(!0) % 360 != 0 && this._offsetForRotation({
					degrees: e.getRotation(!0),
					point: this.viewport.pixelFromPointNoRotate(e._getRotationPoint(!0), !0),
					saveContext: t
				});
			}
			_offsetForRotation(t) {
				var n = t.point ? t.point.times(e.pixelDensityRatio) : this._getCanvasCenter(), r = this._outputContext;
				r.save(), r.translate(n.x, n.y), r.rotate(Math.PI / 180 * t.degrees), r.translate(-n.x, -n.y);
			}
			_flip(t) {
				t ||= {};
				var n = t.point ? t.point.times(e.pixelDensityRatio) : this._getCanvasCenter(), r = this._outputContext;
				r.translate(n.x, 0), r.scale(-1, 1), r.translate(-n.x, 0);
			}
			_drawDebugInfo(t, n, r) {
				for (var i = t.length - 1; i >= 0; i--) {
					var a = t[i].tile;
					try {
						this._drawDebugInfoOnTile(a, t.length, i, n, r);
					} catch (t) {
						e.console.error(t);
					}
				}
			}
			_drawDebugInfoOnTile(t, n, r, i, a) {
				var o = this.viewer.world.getIndexOfItem(i) % this.debugGridColor.length, s = this.context;
				s.save(), s.lineWidth = 2 * e.pixelDensityRatio, s.font = "small-caps bold " + 13 * e.pixelDensityRatio + "px arial", s.strokeStyle = this.debugGridColor[o], s.fillStyle = this.debugGridColor[o], this._setRotations(i), a && this._flip({ point: t.position.plus(t.size.divide(2)) }), s.strokeRect(t.position.x * e.pixelDensityRatio, t.position.y * e.pixelDensityRatio, t.size.x * e.pixelDensityRatio, t.size.y * e.pixelDensityRatio);
				var c = (t.position.x + t.size.x / 2) * e.pixelDensityRatio, l = (t.position.y + t.size.y / 2) * e.pixelDensityRatio;
				s.translate(c, l);
				let u = this.viewport.getRotation(!0);
				s.rotate(Math.PI / 180 * -u), s.translate(-c, -l), t.x === 0 && t.y === 0 && (s.fillText("Zoom: " + this.viewport.getZoom(), t.position.x * e.pixelDensityRatio, (t.position.y - 30) * e.pixelDensityRatio), s.fillText("Pan: " + this.viewport.getBounds().toString(), t.position.x * e.pixelDensityRatio, (t.position.y - 20) * e.pixelDensityRatio)), s.fillText("Level: " + t.level, (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 20) * e.pixelDensityRatio), s.fillText("Column: " + t.x, (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 30) * e.pixelDensityRatio), s.fillText("Row: " + t.y, (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 40) * e.pixelDensityRatio), s.fillText("Order: " + r + " of " + n, (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 50) * e.pixelDensityRatio), s.fillText("Size: " + t.size.toString(), (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 60) * e.pixelDensityRatio), s.fillText("Position: " + t.position.toString(), (t.position.x + 10) * e.pixelDensityRatio, (t.position.y + 70) * e.pixelDensityRatio), this.viewport.getRotation(!0) % 360 != 0 && this._restoreRotationChanges(), i.getRotation(!0) % 360 != 0 && this._restoreRotationChanges(), s.restore();
			}
			_drawPlaceholder(e) {
				let t = e.getBounds(!0), n = this.viewportToDrawerRectangle(e.getBounds(!0)), r = this._outputContext, i;
				i = typeof e.placeholderFillStyle == "function" ? e.placeholderFillStyle(e, r) : e.placeholderFillStyle, this._offsetForRotation({ degrees: this.viewer.viewport.getRotation(!0) }), r.fillStyle = i, r.translate(n.x, n.y), r.rotate(Math.PI / 180 * t.degrees), r.translate(-n.x, -n.y), r.fillRect(n.x, n.y, n.width, n.height), this._restoreRotationChanges();
			}
			_getCanvasCenter() {
				return new e.Point(this.canvas.width / 2, this.canvas.height / 2);
			}
			_restoreRotationChanges() {
				this._outputContext.restore();
			}
			static initShaderProgram(t, n, r) {
				function i(t, n, r) {
					let i = t.createShader(n);
					return t.shaderSource(i, r), t.compileShader(i), t.getShaderParameter(i, t.COMPILE_STATUS) ? i : (e.console.error(`An error occurred compiling the shaders: ${t.getShaderInfoLog(i)}`), t.deleteShader(i), null);
				}
				let a = i(t, t.VERTEX_SHADER, n), o = i(t, t.FRAGMENT_SHADER, r), s = t.createProgram();
				return t.attachShader(s, a), t.attachShader(s, o), t.linkProgram(s), t.getProgramParameter(s, t.LINK_STATUS) ? s : (e.console.error(`Unable to initialize the shader program: ${t.getProgramInfoLog(s)}`), null);
			}
		};
	})(n), (function(e) {
		e.Viewport = function(t) {
			var n = arguments;
			n.length && n[0] instanceof e.Point && (t = {
				containerSize: n[0],
				contentSize: n[1],
				config: n[2]
			}), t.config && (e.extend(!0, t, t.config), delete t.config), this._margins = e.extend({
				left: 0,
				top: 0,
				right: 0,
				bottom: 0
			}, t.margins || {}), delete t.margins, t.initialDegrees = t.degrees, delete t.degrees, e.extend(!0, this, {
				containerSize: null,
				contentSize: null,
				zoomPoint: null,
				rotationPivot: null,
				viewer: null,
				springStiffness: e.DEFAULT_SETTINGS.springStiffness,
				animationTime: e.DEFAULT_SETTINGS.animationTime,
				minZoomImageRatio: e.DEFAULT_SETTINGS.minZoomImageRatio,
				maxZoomPixelRatio: e.DEFAULT_SETTINGS.maxZoomPixelRatio,
				visibilityRatio: e.DEFAULT_SETTINGS.visibilityRatio,
				wrapHorizontal: e.DEFAULT_SETTINGS.wrapHorizontal,
				wrapVertical: e.DEFAULT_SETTINGS.wrapVertical,
				defaultZoomLevel: e.DEFAULT_SETTINGS.defaultZoomLevel,
				minZoomLevel: e.DEFAULT_SETTINGS.minZoomLevel,
				maxZoomLevel: e.DEFAULT_SETTINGS.maxZoomLevel,
				initialDegrees: e.DEFAULT_SETTINGS.degrees,
				flipped: e.DEFAULT_SETTINGS.flipped,
				homeFillsViewer: e.DEFAULT_SETTINGS.homeFillsViewer,
				silenceMultiImageWarnings: e.DEFAULT_SETTINGS.silenceMultiImageWarnings
			}, t), this._updateContainerInnerSize(), this.centerSpringX = new e.Spring({
				initial: 0,
				springStiffness: this.springStiffness,
				animationTime: this.animationTime
			}), this.centerSpringY = new e.Spring({
				initial: 0,
				springStiffness: this.springStiffness,
				animationTime: this.animationTime
			}), this.zoomSpring = new e.Spring({
				exponential: !0,
				initial: 1,
				springStiffness: this.springStiffness,
				animationTime: this.animationTime
			}), this.degreesSpring = new e.Spring({
				initial: t.initialDegrees,
				springStiffness: this.springStiffness,
				animationTime: this.animationTime
			}), this._oldCenterX = this.centerSpringX.current.value, this._oldCenterY = this.centerSpringY.current.value, this._oldZoom = this.zoomSpring.current.value, this._oldDegrees = this.degreesSpring.current.value, this._setContentBounds(new e.Rect(0, 0, 1, 1), 1), this.goHome(!0), this.update();
		}, e.Viewport.prototype = {
			get degrees() {
				return e.console.warn("Accessing [Viewport.degrees] is deprecated. Use viewport.getRotation instead."), this.getRotation();
			},
			set degrees(t) {
				e.console.warn("Setting [Viewport.degrees] is deprecated. Use viewport.rotateTo, viewport.rotateBy, or viewport.setRotation instead."), this.rotateTo(t);
			},
			resetContentSize: function(t) {
				return e.console.assert(t, "[Viewport.resetContentSize] contentSize is required"), e.console.assert(t instanceof e.Point, "[Viewport.resetContentSize] contentSize must be an OpenSeadragon.Point"), e.console.assert(t.x > 0, "[Viewport.resetContentSize] contentSize.x must be greater than 0"), e.console.assert(t.y > 0, "[Viewport.resetContentSize] contentSize.y must be greater than 0"), this._setContentBounds(new e.Rect(0, 0, 1, t.y / t.x), t.x), this;
			},
			setHomeBounds: function(t, n) {
				e.console.error("[Viewport.setHomeBounds] this function is deprecated; The content bounds should not be set manually."), this._setContentBounds(t, n);
			},
			_setContentBounds: function(t, n) {
				e.console.assert(t, "[Viewport._setContentBounds] bounds is required"), e.console.assert(t instanceof e.Rect, "[Viewport._setContentBounds] bounds must be an OpenSeadragon.Rect"), e.console.assert(t.width > 0, "[Viewport._setContentBounds] bounds.width must be greater than 0"), e.console.assert(t.height > 0, "[Viewport._setContentBounds] bounds.height must be greater than 0"), this._contentBoundsNoRotate = t.clone(), this._contentSizeNoRotate = this._contentBoundsNoRotate.getSize().times(n), this._contentBounds = t.rotate(this.getRotation()).getBoundingBox(), this._contentSize = this._contentBounds.getSize().times(n), this._contentAspectRatio = this._contentSize.x / this._contentSize.y, this.viewer && this.viewer.raiseEvent("reset-size", {
					contentSize: this._contentSizeNoRotate.clone(),
					contentFactor: n,
					homeBounds: this._contentBoundsNoRotate.clone(),
					contentBounds: this._contentBounds.clone()
				});
			},
			getHomeZoom: function() {
				if (this.defaultZoomLevel) return this.defaultZoomLevel;
				var e = this._contentAspectRatio / this.getAspectRatio();
				return (this.homeFillsViewer ? e >= 1 ? e : 1 : e >= 1 ? 1 : e) / this._contentBounds.width;
			},
			getHomeBounds: function() {
				return this.getHomeBoundsNoRotate().rotate(-this.getRotation());
			},
			getHomeBoundsNoRotate: function() {
				var t = this._contentBounds.getCenter(), n = 1 / this.getHomeZoom(), r = n / this.getAspectRatio();
				return new e.Rect(t.x - n / 2, t.y - r / 2, n, r);
			},
			goHome: function(e) {
				return this.viewer && this.viewer.raiseEvent("home", { immediately: e }), this.fitBounds(this.getHomeBounds(), e);
			},
			getMinZoom: function() {
				var e = this.getHomeZoom();
				return this.minZoomLevel ? this.minZoomLevel : this.minZoomImageRatio * e;
			},
			getMaxZoom: function() {
				var e = this.maxZoomLevel;
				return e || (e = this._contentSize.x * this.maxZoomPixelRatio / this._containerInnerSize.x, e /= this._contentBounds.width), Math.max(e, this.getHomeZoom());
			},
			getAspectRatio: function() {
				return this._containerInnerSize.x / this._containerInnerSize.y;
			},
			getContainerSize: function() {
				return new e.Point(this.containerSize.x, this.containerSize.y);
			},
			getMargins: function() {
				return e.extend({}, this._margins);
			},
			setMargins: function(t) {
				e.console.assert(e.type(t) === "object", "[Viewport.setMargins] margins must be an object"), this._margins = e.extend({
					left: 0,
					top: 0,
					right: 0,
					bottom: 0
				}, t), this._updateContainerInnerSize(), this.viewer && this.viewer.forceRedraw();
			},
			getBounds: function(e) {
				return this.getBoundsNoRotate(e).rotate(-this.getRotation(e));
			},
			getBoundsNoRotate: function(t) {
				var n = this.getCenter(t), r = 1 / this.getZoom(t), i = r / this.getAspectRatio();
				return new e.Rect(n.x - r / 2, n.y - i / 2, r, i);
			},
			getBoundsWithMargins: function(e) {
				return this.getBoundsNoRotateWithMargins(e).rotate(-this.getRotation(e), this.getCenter(e));
			},
			getBoundsNoRotateWithMargins: function(e) {
				var t = this.getBoundsNoRotate(e), n = this._containerInnerSize.x * this.getZoom(e);
				return t.x -= this._margins.left / n, t.y -= this._margins.top / n, t.width += (this._margins.left + this._margins.right) / n, t.height += (this._margins.top + this._margins.bottom) / n, t;
			},
			getCenter: function(t) {
				var n = new e.Point(this.centerSpringX.current.value, this.centerSpringY.current.value), r = new e.Point(this.centerSpringX.target.value, this.centerSpringY.target.value), i, a, o, s, c, l, u, d;
				return t ? n : this.zoomPoint ? (i = this.pixelFromPoint(this.zoomPoint, !0), a = this.getZoom(), o = 1 / a, s = o / this.getAspectRatio(), c = new e.Rect(n.x - o / 2, n.y - s / 2, o, s), l = this._pixelFromPoint(this.zoomPoint, c), u = l.minus(i).rotate(-this.getRotation(!0)), d = u.divide(this._containerInnerSize.x * a), r.plus(d)) : r;
			},
			getZoom: function(e) {
				return e ? this.zoomSpring.current.value : this.zoomSpring.target.value;
			},
			_applyZoomConstraints: function(e) {
				return Math.max(Math.min(e, this.getMaxZoom()), this.getMinZoom());
			},
			_applyBoundaryConstraints: function(e) {
				var t = this.viewportToViewerElementRectangle(e).getBoundingBox(), n = this.viewportToViewerElementRectangle(this._contentBoundsNoRotate).getBoundingBox(), r = !1, i = !1;
				if (!this.wrapHorizontal) {
					var a = t.x + t.width, o = n.x + n.width, s = t.width > n.width ? this.visibilityRatio * n.width : this.visibilityRatio * t.width, c = n.x - a + s, l = o - t.x - s;
					s > n.width ? (t.x += (c + l) / 2, r = !0) : l < 0 ? (t.x += l, r = !0) : c > 0 && (t.x += c, r = !0);
				}
				if (!this.wrapVertical) {
					var u = t.y + t.height, d = n.y + n.height, f = t.height > n.height ? this.visibilityRatio * n.height : this.visibilityRatio * t.height, p = n.y - u + f, m = d - t.y - f;
					f > n.height ? (t.y += (p + m) / 2, i = !0) : m < 0 ? (t.y += m, i = !0) : p > 0 && (t.y += p, i = !0);
				}
				var h = r || i, g = h ? this.viewerElementToViewportRectangle(t) : e.clone();
				return g.xConstrained = r, g.yConstrained = i, g.constraintApplied = h, g;
			},
			_raiseConstraintsEvent: function(e) {
				this.viewer && this.viewer.raiseEvent("constrain", { immediately: e });
			},
			applyConstraints: function(e) {
				var t = this.getZoom(), n = this._applyZoomConstraints(t);
				t !== n && this.zoomTo(n, this.zoomPoint, e);
				var r = this.getConstrainedBounds(!1);
				return r.constraintApplied && (this.fitBounds(r, e), this._raiseConstraintsEvent(e)), this;
			},
			ensureVisible: function(e) {
				return this.applyConstraints(e);
			},
			_fitBounds: function(t, n) {
				n ||= {};
				var r = n.immediately || !1, i = n.constraints || !1, a = this.getAspectRatio(), o = t.getCenter(), s = new e.Rect(t.x, t.y, t.width, t.height, t.degrees + this.getRotation()).getBoundingBox();
				s.getAspectRatio() >= a ? s.height = s.width / a : s.width = s.height * a, s.x = o.x - s.width / 2, s.y = o.y - s.height / 2;
				var c = 1 / s.width;
				if (r) return this.panTo(o, !0), this.zoomTo(c, null, !0), i && this.applyConstraints(!0), this;
				var l = this.getCenter(!0), u = this.getZoom(!0);
				this.panTo(l, !0), this.zoomTo(u, null, !0);
				var d = this.getBounds(), f = this.getZoom();
				if (f === 0 || Math.abs(c / f - 1) < 1e-8) return this.zoomTo(c, null, !0), this.panTo(o, r), i && this.applyConstraints(!1), this;
				if (i) {
					this.panTo(o, !1), c = this._applyZoomConstraints(c), this.zoomTo(c, null, !1);
					var p = this.getConstrainedBounds();
					this.panTo(l, !0), this.zoomTo(u, null, !0), this.fitBounds(p);
				} else {
					var m = s.rotate(-this.getRotation()).getTopLeft().times(c).minus(d.getTopLeft().times(f)).divide(c - f);
					this.zoomTo(c, m, r);
				}
				return this;
			},
			fitBounds: function(e, t) {
				return this._fitBounds(e, {
					immediately: t,
					constraints: !1
				});
			},
			fitBoundsWithConstraints: function(e, t) {
				return this._fitBounds(e, {
					immediately: t,
					constraints: !0
				});
			},
			fitVertically: function(t) {
				var n = new e.Rect(this._contentBounds.x + this._contentBounds.width / 2, this._contentBounds.y, 0, this._contentBounds.height);
				return this.fitBounds(n, t);
			},
			fitHorizontally: function(t) {
				var n = new e.Rect(this._contentBounds.x, this._contentBounds.y + this._contentBounds.height / 2, this._contentBounds.width, 0);
				return this.fitBounds(n, t);
			},
			getConstrainedBounds: function(e) {
				var t = this.getBounds(e);
				return this._applyBoundaryConstraints(t);
			},
			panBy: function(t, n) {
				var r = new e.Point(this.centerSpringX.target.value, this.centerSpringY.target.value);
				return this.panTo(r.plus(t), n);
			},
			panTo: function(e, t) {
				return t ? (this.centerSpringX.resetTo(e.x), this.centerSpringY.resetTo(e.y)) : (this.centerSpringX.springTo(e.x), this.centerSpringY.springTo(e.y)), this.viewer && this.viewer.raiseEvent("pan", {
					center: e,
					immediately: t
				}), this;
			},
			zoomBy: function(e, t, n) {
				return this.zoomTo(this.zoomSpring.target.value * e, t, n);
			},
			zoomTo: function(t, n, r) {
				var i = this;
				return this.zoomPoint = n instanceof e.Point && !isNaN(n.x) && !isNaN(n.y) ? n : null, r ? this._adjustCenterSpringsForZoomPoint(function() {
					i.zoomSpring.resetTo(t);
				}) : this.zoomSpring.springTo(t), this.viewer && this.viewer.raiseEvent("zoom", {
					zoom: t,
					refPoint: n,
					immediately: r
				}), this;
			},
			setRotation: function(e, t) {
				return this.rotateTo(e, null, t);
			},
			getRotation: function(e) {
				return e ? this.degreesSpring.current.value : this.degreesSpring.target.value;
			},
			setRotationWithPivot: function(e, t, n) {
				return this.rotateTo(e, t, n);
			},
			rotateTo: function(t, n, r) {
				if (!this.viewer || !this.viewer.drawer.canRotate() || this.degreesSpring.target.value === t && this.degreesSpring.isAtTargetValue()) return this;
				if (this.rotationPivot = n instanceof e.Point && !isNaN(n.x) && !isNaN(n.y) ? n : null, r) {
					if (this.rotationPivot) {
						if (!(t - this._oldDegrees)) return this.rotationPivot = null, this;
						this._rotateAboutPivot(t);
					} else this.degreesSpring.resetTo(t);
				} else {
					var i = e.positiveModulo(this.degreesSpring.current.value, 360), a = e.positiveModulo(t, 360), o = a - i;
					o > 180 ? a -= 360 : o < -180 && (a += 360);
					var s = i - a;
					this.degreesSpring.resetTo(t + s), this.degreesSpring.springTo(t);
				}
				return this._setContentBounds(this.viewer.world.getHomeBounds(), this.viewer.world.getContentFactor()), this.viewer.forceRedraw(), this.viewer.raiseEvent("rotate", {
					degrees: t,
					immediately: !!r,
					pivot: this.rotationPivot || this.getCenter()
				}), this;
			},
			rotateBy: function(e, t, n) {
				return this.rotateTo(this.degreesSpring.target.value + e, t, n);
			},
			resize: function(e, t) {
				var n = this.getBoundsNoRotate(), r = n, i;
				this.containerSize.x = e.x, this.containerSize.y = e.y, this._updateContainerInnerSize(), t && (i = e.x / this.containerSize.x, r.width = n.width * i, r.height = r.width / this.getAspectRatio()), this.viewer && this.viewer.raiseEvent("resize", {
					newContainerSize: e,
					maintain: t
				});
				var a = this.fitBounds(r, !0);
				return this.viewer && this.viewer.raiseEvent("after-resize", {
					newContainerSize: e,
					maintain: t
				}), a;
			},
			_updateContainerInnerSize: function() {
				this._containerInnerSize = new e.Point(Math.max(1, this.containerSize.x - (this._margins.left + this._margins.right)), Math.max(1, this.containerSize.y - (this._margins.top + this._margins.bottom)));
			},
			update: function() {
				var e = this;
				this._adjustCenterSpringsForZoomPoint(function() {
					e.zoomSpring.update();
				}), this.degreesSpring.isAtTargetValue() && (this.rotationPivot = null), this.centerSpringX.update(), this.centerSpringY.update(), this.rotationPivot ? this._rotateAboutPivot(!0) : this.degreesSpring.update();
				var t = this.centerSpringX.current.value !== this._oldCenterX || this.centerSpringY.current.value !== this._oldCenterY || this.zoomSpring.current.value !== this._oldZoom || this.degreesSpring.current.value !== this._oldDegrees;
				return this._oldCenterX = this.centerSpringX.current.value, this._oldCenterY = this.centerSpringY.current.value, this._oldZoom = this.zoomSpring.current.value, this._oldDegrees = this.degreesSpring.current.value, t || !this.zoomSpring.isAtTargetValue() || !this.centerSpringX.isAtTargetValue() || !this.centerSpringY.isAtTargetValue() || !this.degreesSpring.isAtTargetValue();
			},
			_rotateAboutPivot: function(e) {
				var t = e === !0, n = this.rotationPivot.minus(this.getCenter());
				this.centerSpringX.shiftBy(n.x), this.centerSpringY.shiftBy(n.y), t ? this.degreesSpring.update() : this.degreesSpring.resetTo(e);
				var r = this.degreesSpring.current.value - this._oldDegrees, i = n.rotate(r * -1).times(-1);
				this.centerSpringX.shiftBy(i.x), this.centerSpringY.shiftBy(i.y);
			},
			_adjustCenterSpringsForZoomPoint: function(e) {
				if (this.zoomPoint) {
					var t = this.pixelFromPoint(this.zoomPoint, !0);
					e();
					var n = this.pixelFromPoint(this.zoomPoint, !0).minus(t), r = this.deltaPointsFromPixels(n, !0);
					this.centerSpringX.shiftBy(r.x), this.centerSpringY.shiftBy(r.y), this.zoomSpring.isAtTargetValue() && (this.zoomPoint = null);
				} else e();
			},
			deltaPixelsFromPointsNoRotate: function(e, t) {
				return e.times(this._containerInnerSize.x * this.getZoom(t));
			},
			deltaPixelsFromPoints: function(e, t) {
				return this.deltaPixelsFromPointsNoRotate(e.rotate(this.getRotation(t)), t);
			},
			deltaPointsFromPixelsNoRotate: function(e, t) {
				return e.divide(this._containerInnerSize.x * this.getZoom(t));
			},
			deltaPointsFromPixels: function(e, t) {
				return this.deltaPointsFromPixelsNoRotate(e, t).rotate(-this.getRotation(t));
			},
			pixelFromPointNoRotate: function(e, t) {
				return this._pixelFromPointNoRotate(e, this.getBoundsNoRotate(t));
			},
			pixelFromPoint: function(e, t) {
				return this._pixelFromPoint(e, this.getBoundsNoRotate(t));
			},
			_pixelFromPointNoRotate: function(t, n) {
				return t.minus(n.getTopLeft()).times(this._containerInnerSize.x / n.width).plus(new e.Point(this._margins.left, this._margins.top));
			},
			_pixelFromPoint: function(e, t) {
				return this._pixelFromPointNoRotate(e.rotate(this.getRotation(!0), this.getCenter(!0)), t);
			},
			pointFromPixelNoRotate: function(t, n) {
				var r = this.getBoundsNoRotate(n);
				return t.minus(new e.Point(this._margins.left, this._margins.top)).divide(this._containerInnerSize.x / r.width).plus(r.getTopLeft());
			},
			pointFromPixel: function(e, t) {
				return this.pointFromPixelNoRotate(e, t).rotate(-this.getRotation(t), this.getCenter(t));
			},
			_viewportToImageDelta: function(t, n) {
				var r = this._contentBoundsNoRotate.width;
				return new e.Point(t * this._contentSizeNoRotate.x / r, n * this._contentSizeNoRotate.x / r);
			},
			viewportToImageCoordinates: function(t, n) {
				if (t instanceof e.Point) return this.viewportToImageCoordinates(t.x, t.y);
				if (this.viewer) {
					var r = this.viewer.world.getItemCount();
					if (r > 1) this.silenceMultiImageWarnings || e.console.error("[Viewport.viewportToImageCoordinates] is not accurate with multi-image; use TiledImage.viewportToImageCoordinates instead.");
					else if (r === 1) return this.viewer.world.getItemAt(0).viewportToImageCoordinates(t, n, !0);
				}
				return this._viewportToImageDelta(t - this._contentBoundsNoRotate.x, n - this._contentBoundsNoRotate.y);
			},
			_imageToViewportDelta: function(t, n) {
				var r = this._contentBoundsNoRotate.width;
				return new e.Point(t / this._contentSizeNoRotate.x * r, n / this._contentSizeNoRotate.x * r);
			},
			imageToViewportCoordinates: function(t, n) {
				if (t instanceof e.Point) return this.imageToViewportCoordinates(t.x, t.y);
				if (this.viewer) {
					var r = this.viewer.world.getItemCount();
					if (r > 1) this.silenceMultiImageWarnings || e.console.error("[Viewport.imageToViewportCoordinates] is not accurate with multi-image; use TiledImage.imageToViewportCoordinates instead.");
					else if (r === 1) return this.viewer.world.getItemAt(0).imageToViewportCoordinates(t, n, !0);
				}
				var i = this._imageToViewportDelta(t, n);
				return i.x += this._contentBoundsNoRotate.x, i.y += this._contentBoundsNoRotate.y, i;
			},
			imageToViewportRectangle: function(t, n, r, i) {
				var a = t;
				if (a instanceof e.Rect || (a = new e.Rect(t, n, r, i)), this.viewer) {
					var o = this.viewer.world.getItemCount();
					if (o > 1) this.silenceMultiImageWarnings || e.console.error("[Viewport.imageToViewportRectangle] is not accurate with multi-image; use TiledImage.imageToViewportRectangle instead.");
					else if (o === 1) return this.viewer.world.getItemAt(0).imageToViewportRectangle(t, n, r, i, !0);
				}
				var s = this.imageToViewportCoordinates(a.x, a.y), c = this._imageToViewportDelta(a.width, a.height);
				return new e.Rect(s.x, s.y, c.x, c.y, a.degrees);
			},
			viewportToImageRectangle: function(t, n, r, i) {
				var a = t;
				if (a instanceof e.Rect || (a = new e.Rect(t, n, r, i)), this.viewer) {
					var o = this.viewer.world.getItemCount();
					if (o > 1) this.silenceMultiImageWarnings || e.console.error("[Viewport.viewportToImageRectangle] is not accurate with multi-image; use TiledImage.viewportToImageRectangle instead.");
					else if (o === 1) return this.viewer.world.getItemAt(0).viewportToImageRectangle(t, n, r, i, !0);
				}
				var s = this.viewportToImageCoordinates(a.x, a.y), c = this._viewportToImageDelta(a.width, a.height);
				return new e.Rect(s.x, s.y, c.x, c.y, a.degrees);
			},
			viewerElementToImageCoordinates: function(e) {
				var t = this.pointFromPixel(e, !0);
				return this.viewportToImageCoordinates(t);
			},
			imageToViewerElementCoordinates: function(e) {
				var t = this.imageToViewportCoordinates(e);
				return this.pixelFromPoint(t, !0);
			},
			windowToImageCoordinates: function(t) {
				e.console.assert(this.viewer, "[Viewport.windowToImageCoordinates] the viewport must have a viewer.");
				var n = t.minus(e.getElementPosition(this.viewer.element));
				return this.viewerElementToImageCoordinates(n);
			},
			imageToWindowCoordinates: function(t) {
				return e.console.assert(this.viewer, "[Viewport.imageToWindowCoordinates] the viewport must have a viewer."), this.imageToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element));
			},
			viewerElementToViewportCoordinates: function(e) {
				return this.pointFromPixel(e, !0);
			},
			viewportToViewerElementCoordinates: function(e) {
				return this.pixelFromPoint(e, !0);
			},
			viewerElementToViewportRectangle: function(t) {
				return e.Rect.fromSummits(this.pointFromPixel(t.getTopLeft(), !0), this.pointFromPixel(t.getTopRight(), !0), this.pointFromPixel(t.getBottomLeft(), !0));
			},
			viewportToViewerElementRectangle: function(t) {
				return e.Rect.fromSummits(this.pixelFromPoint(t.getTopLeft(), !0), this.pixelFromPoint(t.getTopRight(), !0), this.pixelFromPoint(t.getBottomLeft(), !0));
			},
			windowToViewportCoordinates: function(t) {
				e.console.assert(this.viewer, "[Viewport.windowToViewportCoordinates] the viewport must have a viewer.");
				var n = t.minus(e.getElementPosition(this.viewer.element));
				return this.viewerElementToViewportCoordinates(n);
			},
			viewportToWindowCoordinates: function(t) {
				return e.console.assert(this.viewer, "[Viewport.viewportToWindowCoordinates] the viewport must have a viewer."), this.viewportToViewerElementCoordinates(t).plus(e.getElementPosition(this.viewer.element));
			},
			viewportToImageZoom: function(t) {
				if (this.viewer) {
					var n = this.viewer.world.getItemCount();
					if (n > 1) this.silenceMultiImageWarnings || e.console.error("[Viewport.viewportToImageZoom] is not accurate with multi-image.");
					else if (n === 1) return this.viewer.world.getItemAt(0).viewportToImageZoom(t);
				}
				var r = this._contentSizeNoRotate.x, i = this._containerInnerSize.x, a = this._contentBoundsNoRotate.width;
				return t * (i / r * a);
			},
			imageToViewportZoom: function(t) {
				if (this.viewer) {
					var n = this.viewer.world.getItemCount();
					if (n > 1) this.silenceMultiImageWarnings || e.console.error("[Viewport.imageToViewportZoom] is not accurate with multi-image. Instead, use [TiledImage.imageToViewportZoom] for the specific image of interest");
					else if (n === 1) return this.viewer.world.getItemAt(0).imageToViewportZoom(t);
				}
				var r = this._contentSizeNoRotate.x, i = this._containerInnerSize.x, a = this._contentBoundsNoRotate.width;
				return t * (r / i / a);
			},
			toggleFlip: function() {
				return this.setFlip(!this.getFlip()), this;
			},
			getFlip: function() {
				return this.flipped;
			},
			setFlip: function(e) {
				return this.flipped === e ? this : (this.flipped = e, this.viewer.navigator && this.viewer.navigator.setFlip(this.getFlip()), this.viewer.forceRedraw(), this.viewer.raiseEvent("flip", { flipped: e }), this);
			},
			getMaxZoomPixelRatio: function() {
				return this.maxZoomPixelRatio;
			},
			setMaxZoomPixelRatio: function(t, n = !0, r = !1) {
				e.console.assert(!isNaN(t), "[Viewport.setMaxZoomPixelRatio] ratio must be a number"), !isNaN(t) && (this.maxZoomPixelRatio = t, n && this.getZoom() > this.getMaxZoom() && this.applyConstraints(r));
			}
		};
	})(n), (function(e) {
		e.TiledImage = function(t) {
			this._initialized = !1, e.console.assert(t.tileCache, "[TiledImage] options.tileCache is required"), e.console.assert(t.drawer, "[TiledImage] options.drawer is required"), e.console.assert(t.viewer, "[TiledImage] options.viewer is required"), e.console.assert(t.imageLoader, "[TiledImage] options.imageLoader is required"), e.console.assert(t.source, "[TiledImage] options.source is required"), e.console.assert(!t.clip || t.clip instanceof e.Rect, "[TiledImage] options.clip must be an OpenSeadragon.Rect if present"), e.EventSource.call(this), this._tileCache = t.tileCache, delete t.tileCache, this._drawer = t.drawer, delete t.drawer, this._imageLoader = t.imageLoader, delete t.imageLoader, t.clip instanceof e.Rect && (this._clip = t.clip.clone()), delete t.clip;
			var r = t.x || 0;
			delete t.x;
			var i = t.y || 0;
			delete t.y, this.normHeight = t.source.dimensions.y / t.source.dimensions.x, this.contentAspectX = t.source.dimensions.x / t.source.dimensions.y;
			var a = 1;
			t.width ? (a = t.width, delete t.width, t.height && (e.console.error("specifying both width and height to a tiledImage is not supported"), delete t.height)) : t.height && (a = t.height / this.normHeight, delete t.height);
			var o = t.fitBounds;
			delete t.fitBounds;
			var s = t.fitBoundsPlacement || n.Placement.CENTER;
			delete t.fitBoundsPlacement;
			var c = t.degrees || 0;
			delete t.degrees;
			var l = t.ajaxHeaders;
			delete t.ajaxHeaders, e.extend(!0, this, {
				viewer: null,
				tilesMatrix: {},
				coverage: {},
				loadingCoverage: {},
				lastDrawn: [],
				lastResetTime: 0,
				_needsDraw: !0,
				_needsUpdate: !0,
				_hasOpaqueTile: !1,
				_tilesLoading: 0,
				_tilesToDraw: [],
				_lastDrawn: [],
				_isBlending: !1,
				_wasBlending: !1,
				_isTainted: !1,
				springStiffness: e.DEFAULT_SETTINGS.springStiffness,
				animationTime: e.DEFAULT_SETTINGS.animationTime,
				minZoomImageRatio: e.DEFAULT_SETTINGS.minZoomImageRatio,
				wrapHorizontal: e.DEFAULT_SETTINGS.wrapHorizontal,
				wrapVertical: e.DEFAULT_SETTINGS.wrapVertical,
				immediateRender: e.DEFAULT_SETTINGS.immediateRender,
				blendTime: e.DEFAULT_SETTINGS.blendTime,
				alwaysBlend: e.DEFAULT_SETTINGS.alwaysBlend,
				minPixelRatio: e.DEFAULT_SETTINGS.minPixelRatio,
				smoothTileEdgesMinZoom: e.DEFAULT_SETTINGS.smoothTileEdgesMinZoom,
				iOSDevice: e.DEFAULT_SETTINGS.iOSDevice,
				debugMode: e.DEFAULT_SETTINGS.debugMode,
				crossOriginPolicy: e.DEFAULT_SETTINGS.crossOriginPolicy,
				ajaxWithCredentials: e.DEFAULT_SETTINGS.ajaxWithCredentials,
				placeholderFillStyle: e.DEFAULT_SETTINGS.placeholderFillStyle,
				opacity: e.DEFAULT_SETTINGS.opacity,
				preload: e.DEFAULT_SETTINGS.preload,
				compositeOperation: e.DEFAULT_SETTINGS.compositeOperation,
				subPixelRoundingForTransparency: e.DEFAULT_SETTINGS.subPixelRoundingForTransparency,
				maxTilesPerFrame: e.DEFAULT_SETTINGS.maxTilesPerFrame
			}, t), this._preload = this.preload, delete this.preload, this._fullyLoaded = !1, this._xSpring = new e.Spring({
				initial: r,
				springStiffness: this.springStiffness,
				animationTime: this.animationTime
			}), this._ySpring = new e.Spring({
				initial: i,
				springStiffness: this.springStiffness,
				animationTime: this.animationTime
			}), this._scaleSpring = new e.Spring({
				initial: a,
				springStiffness: this.springStiffness,
				animationTime: this.animationTime
			}), this._degreesSpring = new e.Spring({
				initial: c,
				springStiffness: this.springStiffness,
				animationTime: this.animationTime
			}), this._updateForScale(), o && this.fitBounds(o, s, !0), this._ownAjaxHeaders = {}, this.setAjaxHeaders(l, !1), this._initialized = !0;
		}, e.extend(e.TiledImage.prototype, e.EventSource.prototype, {
			needsDraw: function() {
				return this._needsDraw;
			},
			redraw: function() {
				this._needsDraw = !0;
			},
			getFullyLoaded: function() {
				return this._fullyLoaded;
			},
			_setFullyLoaded: function(e) {
				e !== this._fullyLoaded && (this._fullyLoaded = e, this.raiseEvent("fully-loaded-change", { fullyLoaded: this._fullyLoaded }));
			},
			reset: function() {
				this._tileCache.clearTilesFor(this), this.lastResetTime = e.now(), this._needsDraw = !0;
			},
			update: function(e) {
				let t = this._xSpring.update(), n = this._ySpring.update(), r = this._scaleSpring.update(), i = this._degreesSpring.update(), a = t || n || r || i || this._needsUpdate;
				if (a || e || !this._fullyLoaded) {
					let e = this._updateLevelsForViewport();
					this._setFullyLoaded(e);
				}
				return this._needsUpdate = !1, a ? (this._updateForScale(), this._raiseBoundsChange(), this._needsDraw = !0, !0) : !1;
			},
			setDrawn: function() {
				return this._needsDraw = this._isBlending || this._wasBlending, this._needsDraw;
			},
			setTainted(e) {
				this._isTainted = e;
			},
			isTainted() {
				return this._isTainted;
			},
			destroy: function() {
				this.reset(), this.source.destroy && this.source.destroy(this.viewer);
			},
			getBounds: function(e) {
				return this.getBoundsNoRotate(e).rotate(this.getRotation(e), this._getRotationPoint(e));
			},
			getBoundsNoRotate: function(t) {
				return t ? new e.Rect(this._xSpring.current.value, this._ySpring.current.value, this._worldWidthCurrent, this._worldHeightCurrent) : new e.Rect(this._xSpring.target.value, this._ySpring.target.value, this._worldWidthTarget, this._worldHeightTarget);
			},
			getWorldBounds: function() {
				return e.console.error("[TiledImage.getWorldBounds] is deprecated; use TiledImage.getBounds instead"), this.getBounds();
			},
			getClippedBounds: function(t) {
				var n = this.getBoundsNoRotate(t);
				if (this._clip) {
					var r = (t ? this._worldWidthCurrent : this._worldWidthTarget) / this.source.dimensions.x, i = this._clip.times(r);
					n = new e.Rect(n.x + i.x, n.y + i.y, i.width, i.height);
				}
				return n.rotate(this.getRotation(t), this._getRotationPoint(t));
			},
			getTileBounds: function(e, t, n) {
				var r = this.source.getNumTiles(e), i = (r.x + t % r.x) % r.x, a = (r.y + n % r.y) % r.y, o = this.source.getTileBounds(e, i, a);
				return this.getFlip() && (o.x = Math.max(0, 1 - o.x - o.width)), o.x += (t - i) / r.x, o.y += this._worldHeightCurrent / this._worldWidthCurrent * ((n - a) / r.y), o;
			},
			getContentSize: function() {
				return new e.Point(this.source.dimensions.x, this.source.dimensions.y);
			},
			getSizeInWindowCoordinates: function() {
				var t = this.imageToWindowCoordinates(new e.Point(0, 0)), n = this.imageToWindowCoordinates(this.getContentSize());
				return new e.Point(n.x - t.x, n.y - t.y);
			},
			_viewportToImageDelta: function(t, n, r) {
				var i = r ? this._scaleSpring.current.value : this._scaleSpring.target.value;
				return new e.Point(t * (this.source.dimensions.x / i), n * (this.source.dimensions.y * this.contentAspectX / i));
			},
			viewportToImageCoordinates: function(t, n, r) {
				var i;
				return t instanceof e.Point ? (r = n, i = t) : i = new e.Point(t, n), i = i.rotate(-this.getRotation(r), this._getRotationPoint(r)), r ? this._viewportToImageDelta(i.x - this._xSpring.current.value, i.y - this._ySpring.current.value) : this._viewportToImageDelta(i.x - this._xSpring.target.value, i.y - this._ySpring.target.value);
			},
			_imageToViewportDelta: function(t, n, r) {
				var i = r ? this._scaleSpring.current.value : this._scaleSpring.target.value;
				return new e.Point(t / this.source.dimensions.x * i, n / this.source.dimensions.y / this.contentAspectX * i);
			},
			imageToViewportCoordinates: function(t, n, r) {
				t instanceof e.Point && (r = n, n = t.y, t = t.x);
				var i = this._imageToViewportDelta(t, n, r);
				return r ? (i.x += this._xSpring.current.value, i.y += this._ySpring.current.value) : (i.x += this._xSpring.target.value, i.y += this._ySpring.target.value), i.rotate(this.getRotation(r), this._getRotationPoint(r));
			},
			imageToViewportRectangle: function(t, n, r, i, a) {
				var o = t;
				o instanceof e.Rect ? a = n : o = new e.Rect(t, n, r, i);
				var s = this.imageToViewportCoordinates(o.getTopLeft(), a), c = this._imageToViewportDelta(o.width, o.height, a);
				return new e.Rect(s.x, s.y, c.x, c.y, o.degrees + this.getRotation(a));
			},
			viewportToImageRectangle: function(t, n, r, i, a) {
				var o = t;
				t instanceof e.Rect ? a = n : o = new e.Rect(t, n, r, i);
				var s = this.viewportToImageCoordinates(o.getTopLeft(), a), c = this._viewportToImageDelta(o.width, o.height, a);
				return new e.Rect(s.x, s.y, c.x, c.y, o.degrees - this.getRotation(a));
			},
			viewerElementToImageCoordinates: function(e) {
				var t = this.viewport.pointFromPixel(e, !0);
				return this.viewportToImageCoordinates(t);
			},
			imageToViewerElementCoordinates: function(e) {
				var t = this.imageToViewportCoordinates(e);
				return this.viewport.pixelFromPoint(t, !0);
			},
			windowToImageCoordinates: function(e) {
				var t = e.minus(n.getElementPosition(this.viewer.element));
				return this.viewerElementToImageCoordinates(t);
			},
			imageToWindowCoordinates: function(e) {
				return this.imageToViewerElementCoordinates(e).plus(n.getElementPosition(this.viewer.element));
			},
			_viewportToTiledImageRectangle: function(t) {
				var n = this._scaleSpring.current.value;
				return t = t.rotate(-this.getRotation(!0), this._getRotationPoint(!0)), new e.Rect((t.x - this._xSpring.current.value) / n, (t.y - this._ySpring.current.value) / n, t.width / n, t.height / n, t.degrees);
			},
			viewportToImageZoom: function(e) {
				return this._scaleSpring.current.value * this.viewport._containerInnerSize.x / this.source.dimensions.x * e;
			},
			imageToViewportZoom: function(e) {
				return e / (this._scaleSpring.current.value * this.viewport._containerInnerSize.x / this.source.dimensions.x);
			},
			setPosition: function(e, t) {
				var n = this._xSpring.target.value === e.x && this._ySpring.target.value === e.y;
				if (t) {
					if (n && this._xSpring.current.value === e.x && this._ySpring.current.value === e.y) return;
					this._xSpring.resetTo(e.x), this._ySpring.resetTo(e.y), this._needsDraw = !0, this._needsUpdate = !0;
				} else {
					if (n) return;
					this._xSpring.springTo(e.x), this._ySpring.springTo(e.y), this._needsDraw = !0, this._needsUpdate = !0;
				}
				n || this._raiseBoundsChange();
			},
			setWidth: function(e, t) {
				this._setScale(e, t);
			},
			setHeight: function(e, t) {
				this._setScale(e / this.normHeight, t);
			},
			setCroppingPolygons: function(t) {
				var n = function(t) {
					return t instanceof e.Point || typeof t.x == "number" && typeof t.y == "number";
				}, r = function(e) {
					return e.map(function(e) {
						try {
							if (n(e)) return {
								x: e.x,
								y: e.y
							};
							throw Error();
						} catch {
							throw Error("A Provided cropping polygon point is not supported");
						}
					});
				};
				try {
					if (!e.isArray(t)) throw Error("Provided cropping polygon is not an array");
					this._croppingPolygons = t.map(function(e) {
						return r(e);
					}), this._needsDraw = !0;
				} catch (t) {
					e.console.error("[TiledImage.setCroppingPolygons] Cropping polygon format not supported"), e.console.error(t), this.resetCroppingPolygons();
				}
			},
			resetCroppingPolygons: function() {
				this._croppingPolygons = null, this._needsDraw = !0;
			},
			fitBounds: function(t, n, r) {
				n ||= e.Placement.CENTER;
				var i = e.Placement.properties[n], a = this.contentAspectX, o = 0, s = 0, c = 1, l = 1;
				if (this._clip && (a = this._clip.getAspectRatio(), c = this._clip.width / this.source.dimensions.x, l = this._clip.height / this.source.dimensions.y, t.getAspectRatio() > a ? (o = this._clip.x / this._clip.height * t.height, s = this._clip.y / this._clip.height * t.height) : (o = this._clip.x / this._clip.width * t.width, s = this._clip.y / this._clip.width * t.width)), t.getAspectRatio() > a) {
					var u = t.height / l, d = 0;
					i.isHorizontallyCentered ? d = (t.width - t.height * a) / 2 : i.isRight && (d = t.width - t.height * a), this.setPosition(new e.Point(t.x - o + d, t.y - s), r), this.setHeight(u, r);
				} else {
					var f = t.width / c, p = 0;
					i.isVerticallyCentered ? p = (t.height - t.width / a) / 2 : i.isBottom && (p = t.height - t.width / a), this.setPosition(new e.Point(t.x - o, t.y - s + p), r), this.setWidth(f, r);
				}
			},
			getClip: function() {
				return this._clip ? this._clip.clone() : null;
			},
			setClip: function(t) {
				e.console.assert(!t || t instanceof e.Rect, "[TiledImage.setClip] newClip must be an OpenSeadragon.Rect or null"), this._clip = t instanceof e.Rect ? t.clone() : null, this._needsUpdate = !0, this._needsDraw = !0, this.raiseEvent("clip-change");
			},
			getFlip: function() {
				return this.flipped;
			},
			setFlip: function(e) {
				this.flipped = e;
			},
			get flipped() {
				return this._flipped;
			},
			set flipped(e) {
				let t = this._flipped !== !!e;
				this._flipped = !!e, t && (this.update(!0), this._needsDraw = !0, this._raiseBoundsChange());
			},
			get wrapHorizontal() {
				return this._wrapHorizontal;
			},
			set wrapHorizontal(e) {
				let t = this._wrapHorizontal !== !!e;
				this._wrapHorizontal = !!e, this._initialized && t && (this.update(!0), this._needsDraw = !0);
			},
			get wrapVertical() {
				return this._wrapVertical;
			},
			set wrapVertical(e) {
				let t = this._wrapVertical !== !!e;
				this._wrapVertical = !!e, this._initialized && t && (this.update(!0), this._needsDraw = !0);
			},
			get debugMode() {
				return this._debugMode;
			},
			set debugMode(e) {
				this._debugMode = !!e, this._needsDraw = !0;
			},
			getOpacity: function() {
				return this.opacity;
			},
			setOpacity: function(e) {
				this.opacity = e;
			},
			get opacity() {
				return this._opacity;
			},
			set opacity(e) {
				e !== this.opacity && (this._opacity = e, this._needsDraw = !0, this.raiseEvent("opacity-change", { opacity: this.opacity }));
			},
			getPreload: function() {
				return this._preload;
			},
			setPreload: function(e) {
				this._preload = !!e, this._needsDraw = !0;
			},
			getRotation: function(e) {
				return e ? this._degreesSpring.current.value : this._degreesSpring.target.value;
			},
			setRotation: function(e, t) {
				this._degreesSpring.target.value === e && this._degreesSpring.isAtTargetValue() || (t ? this._degreesSpring.resetTo(e) : this._degreesSpring.springTo(e), this._needsDraw = !0, this._needsUpdate = !0, this._raiseBoundsChange());
			},
			getDrawArea: function() {
				if (this._opacity === 0 && !this._preload) return !1;
				var e = this._viewportToTiledImageRectangle(this.viewport.getBoundsWithMargins(!0));
				if (!this.wrapHorizontal && !this.wrapVertical) {
					var t = this._viewportToTiledImageRectangle(this.getClippedBounds(!0));
					e = e.intersection(t);
				}
				return e;
			},
			getTilesToDraw: function() {
				let e = this._tilesToDraw.flat();
				return this._updateTilesInViewport(e), e = this._tilesToDraw.flat(), e.forEach((e) => {
					e.tile.beingDrawn = !0;
				}), this._lastDrawn = e, e;
			},
			_getRotationPoint: function(e) {
				return this.getBoundsNoRotate(e).getCenter();
			},
			get compositeOperation() {
				return this._compositeOperation;
			},
			set compositeOperation(e) {
				e !== this._compositeOperation && (this._compositeOperation = e, this._needsDraw = !0, this.raiseEvent("composite-operation-change", { compositeOperation: this._compositeOperation }));
			},
			getCompositeOperation: function() {
				return this._compositeOperation;
			},
			setCompositeOperation: function(e) {
				this.compositeOperation = e;
			},
			setAjaxHeaders: function(t, n) {
				if (t === null && (t = {}), !e.isPlainObject(t)) {
					console.error("[TiledImage.setAjaxHeaders] Ignoring invalid headers, must be a plain object");
					return;
				}
				this._ownAjaxHeaders = t, this._updateAjaxHeaders(n);
			},
			_updateAjaxHeaders: function(t) {
				if (t === void 0 && (t = !0), this.ajaxHeaders = e.isPlainObject(this.viewer.ajaxHeaders) ? e.extend({}, this.viewer.ajaxHeaders, this._ownAjaxHeaders) : this._ownAjaxHeaders, t) {
					var n, r, i, a;
					for (var o in this.tilesMatrix) for (var s in n = this.source.getNumTiles(o), this.tilesMatrix[o]) for (var c in r = (n.x + s % n.x) % n.x, this.tilesMatrix[o][s]) if (i = (n.y + c % n.y) % n.y, a = this.tilesMatrix[o][s][c], a.loadWithAjax = this.loadTilesWithAjax, a.loadWithAjax) {
						var l = this.source.getTileAjaxHeaders(o, r, i);
						a.ajaxHeaders = e.extend({}, this.ajaxHeaders, l);
					} else a.ajaxHeaders = null;
					for (var u = 0; u < this._imageLoader.jobQueue.length; u++) {
						var d = this._imageLoader.jobQueue[u];
						d.loadWithAjax = d.tile.loadWithAjax, d.ajaxHeaders = d.tile.loadWithAjax ? d.tile.ajaxHeaders : null;
					}
				}
			},
			_setScale: function(e, t) {
				var n = this._scaleSpring.target.value === e;
				if (t) {
					if (n && this._scaleSpring.current.value === e) return;
					this._scaleSpring.resetTo(e), this._updateForScale(), this._needsDraw = !0, this._needsUpdate = !0;
				} else {
					if (n) return;
					this._scaleSpring.springTo(e), this._updateForScale(), this._needsDraw = !0, this._needsUpdate = !0;
				}
				n || this._raiseBoundsChange();
			},
			_updateForScale: function() {
				this._worldWidthTarget = this._scaleSpring.target.value, this._worldHeightTarget = this.normHeight * this._scaleSpring.target.value, this._worldWidthCurrent = this._scaleSpring.current.value, this._worldHeightCurrent = this.normHeight * this._scaleSpring.current.value;
			},
			_raiseBoundsChange: function() {
				this.raiseEvent("bounds-change");
			},
			_isBottomItem: function() {
				return this.viewer.world.getItemAt(0) === this;
			},
			_getLevelsInterval: function() {
				var e = Math.max(this.source.minLevel, Math.floor(Math.log(this.minZoomImageRatio) / Math.log(2))), t = this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(0), !0).x * this._scaleSpring.current.value, n = Math.min(Math.abs(this.source.maxLevel), Math.abs(Math.floor(Math.log(t / this.minPixelRatio) / Math.log(2))));
				return n = Math.max(n, this.source.minLevel || 0), e = Math.min(e, n), {
					lowestLevel: e,
					highestLevel: n
				};
			},
			_updateLevelsForViewport: function() {
				var t = this._getLevelsInterval(), n = t.lowestLevel, r = t.highestLevel, i = [], a = this.getDrawArea(), o = e.now();
				if (this._lastDrawn.forEach((e) => {
					e.tile.beingDrawn = !1;
				}), this._tilesToDraw = [], this._tilesLoading = 0, this.loadingCoverage = {}, !a) return this._needsDraw = !1, this._fullyLoaded;
				var s = Array(r - n + 1);
				for (let e = 0, t = r; t >= n; t--, e++) s[e] = t;
				for (let e = r + 1; e <= this.source.maxLevel; e++) {
					var c = this.tilesMatrix[e] && this.tilesMatrix[e][0] && this.tilesMatrix[e][0][0];
					if (c && c.isBottomMost && c.isRightMost && c.loaded) {
						s.push(e);
						break;
					}
				}
				let l = !1;
				for (let e = 0; e < s.length; e++) {
					let t = s[e];
					var u = this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(t), !0).x * this._scaleSpring.current.value;
					if (e === s.length - 1 || u >= this.minPixelRatio) l = !0;
					else if (!l) continue;
					var d = this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(t), !1).x * this._scaleSpring.current.value, f = this.viewport.deltaPixelsFromPointsNoRotate(this.source.getPixelRatio(Math.max(this.source.getClosestLevel(), 0)), !1).x * this._scaleSpring.current.value, p = this.immediateRender ? 1 : f, m = Math.min(1, (u - .5) / .5), h = p / Math.abs(p - d), g = this._updateLevel(t, m, h, a, o, i);
					i = g.bestTiles;
					var _ = g.updatedTiles.filter((e) => e.loaded), v = (function(e, t, n) {
						return function(r) {
							return {
								tile: r,
								level: e,
								levelOpacity: t,
								currentTime: n
							};
						};
					})(t, m, o);
					if (this._tilesToDraw[t] = _.map(v), this._providesCoverage(this.coverage, t)) break;
				}
				return i && i.length > 0 ? (i.forEach(function(e) {
					e && !e.context2D && this._loadTile(e, o);
				}, this), this._needsDraw = !0, !1) : this._tilesLoading === 0;
			},
			_updateTilesInViewport: function(t) {
				let n = e.now(), r = this;
				this._tilesLoading = 0, this._wasBlending = this._isBlending, this._isBlending = !1, this.loadingCoverage = {};
				let i = t.length ? t[0].level : 0;
				if (!this.getDrawArea()) return;
				function a(e) {
					let t = e.tile;
					if (t && t.loaded) {
						let a = r._blendTile(t, t.x, t.y, e.level, e.levelOpacity, n, i);
						r._isBlending = r._isBlending || a, r._needsDraw = r._needsDraw || a || r._wasBlending;
					}
				}
				let o = 0;
				for (let e = 0; e < t.length; e++) {
					let n = t[e];
					a(n), this._providesCoverage(this.coverage, n.level) && (o = Math.max(o, n.level));
				}
				if (o > 0) for (let e in this._tilesToDraw) e < o && delete this._tilesToDraw[e];
			},
			_blendTile: function(e, t, n, r, i, a, o) {
				let s = 1e3 * this.blendTime, c, l;
				return e.blendStart ||= a, c = a - e.blendStart, l = s ? Math.min(1, c / s) : 1, r === o && (l = 1, c = s), this.alwaysBlend && (l *= i), e.opacity = l, l === 1 && (this._setCoverage(this.coverage, r, t, n, !0), this._hasOpaqueTile = !0), c < s;
			},
			_updateLevel: function(e, t, n, r, i, a) {
				var o = r.getBoundingBox().getTopLeft(), s = r.getBoundingBox().getBottomRight();
				this.viewer && this.viewer.raiseEvent("update-level", {
					tiledImage: this,
					havedrawn: !0,
					level: e,
					opacity: t,
					visibility: n,
					drawArea: r,
					topleft: o,
					bottomright: s,
					currenttime: i,
					best: a
				}), this._resetCoverage(this.coverage, e), this._resetCoverage(this.loadingCoverage, e);
				var c = this._getCornerTiles(e, o, s), l = c.topLeft, u = c.bottomRight, d = this.source.getNumTiles(e), f = this.viewport.pixelFromPoint(this.viewport.getCenter());
				this.getFlip() && (u.x += 1, this.wrapHorizontal || (u.x = Math.min(u.x, d.x - 1)));
				for (var p = Math.max(0, (u.x - l.x) * (u.y - l.y)), m = Array(p), h = 0, g = l.x; g <= u.x; g++) for (var _ = l.y; _ <= u.y; _++) {
					var v;
					if (this.getFlip()) {
						var y = (d.x + g % d.x) % d.x;
						v = g + d.x - y - y - 1;
					} else v = g;
					if (r.intersection(this.getTileBounds(e, v, _)) !== null) {
						var b = this._updateTile(v, _, e, n, f, d, i, a);
						a = b.bestTiles, m[h] = b.tile, h += 1;
					}
				}
				return {
					bestTiles: a,
					updatedTiles: m
				};
			},
			_positionTile: function(t, n, r, i, a) {
				var o = t.bounds.getTopLeft();
				o.x *= this._scaleSpring.current.value, o.y *= this._scaleSpring.current.value, o.x += this._xSpring.current.value, o.y += this._ySpring.current.value;
				var s = t.bounds.getSize();
				s.x *= this._scaleSpring.current.value, s.y *= this._scaleSpring.current.value, t.positionedBounds.x = o.x, t.positionedBounds.y = o.y, t.positionedBounds.width = s.x, t.positionedBounds.height = s.y;
				var c = r.pixelFromPointNoRotate(o, !0), l = r.pixelFromPointNoRotate(o, !1), u = r.deltaPixelsFromPointsNoRotate(s, !0), d = r.deltaPixelsFromPointsNoRotate(s, !1), f = l.plus(d.divide(2)), p = i.squaredDistanceTo(f);
				this.viewer.drawer.minimumOverlapRequired(this) && (n || (u = u.plus(new e.Point(1, 1))), t.isRightMost && this.wrapHorizontal && (u.x += .75), t.isBottomMost && this.wrapVertical && (u.y += .75)), t.position = c, t.size = u, t.squaredDistance = p, t.visibility = a;
			},
			_updateTile: function(e, t, n, r, i, a, o, s) {
				var c = this._getTile(e, t, n, o, a);
				this.viewer && this.viewer.raiseEvent("update-tile", {
					tiledImage: this,
					tile: c
				}), this._setCoverage(this.coverage, n, e, t, !1);
				var l = c.loaded || c.loading || this._isCovered(this.loadingCoverage, n, e, t);
				if (this._setCoverage(this.loadingCoverage, n, e, t, l), !c.exists) return {
					bestTiles: s,
					tile: c
				};
				if (c.loaded && c.opacity === 1 && this._setCoverage(this.coverage, n, e, t, !0), this._positionTile(c, this.source.tileOverlap, this.viewport, i, r), !c.loaded) {
					if (c.context2D) this._setTileLoaded(c);
					else {
						var u = this._tileCache.getImageRecord(c.cacheKey);
						u && this._setTileLoaded(c, u.getData());
					}
				}
				return c.loading ? this._tilesLoading++ : l || (s = this._compareTiles(s, c, this.maxTilesPerFrame)), {
					bestTiles: s,
					tile: c
				};
			},
			_getCornerTiles: function(t, n, r) {
				var i, a;
				this.wrapHorizontal ? (i = e.positiveModulo(n.x, 1), a = e.positiveModulo(r.x, 1)) : (i = Math.max(0, n.x), a = Math.min(1, r.x));
				var o, s, c = 1 / this.source.aspectRatio;
				this.wrapVertical ? (o = e.positiveModulo(n.y, c), s = e.positiveModulo(r.y, c)) : (o = Math.max(0, n.y), s = Math.min(c, r.y));
				var l = this.source.getTileAtPoint(t, new e.Point(i, o)), u = this.source.getTileAtPoint(t, new e.Point(a, s)), d = this.source.getNumTiles(t);
				return this.wrapHorizontal && (l.x += d.x * Math.floor(n.x), u.x += d.x * Math.floor(r.x)), this.wrapVertical && (l.y += d.y * Math.floor(n.y / c), u.y += d.y * Math.floor(r.y / c)), {
					topLeft: l,
					bottomRight: u
				};
			},
			_getTile: function(t, n, r, i, a) {
				var o, s, c, l, u, d, f, p, m, h, g = this.tilesMatrix, _ = this.source;
				return g[r] || (g[r] = {}), g[r][t] || (g[r][t] = {}), (!g[r][t][n] || !g[r][t][n].flipped != !this.flipped) && (o = (a.x + t % a.x) % a.x, s = (a.y + n % a.y) % a.y, c = this.getTileBounds(r, t, n), l = _.getTileBounds(r, o, s, !0), u = _.tileExists(r, o, s), d = _.getTileUrl(r, o, s), f = _.getTilePostData(r, o, s), this.loadTilesWithAjax ? (p = _.getTileAjaxHeaders(r, o, s), e.isPlainObject(this.ajaxHeaders) && (p = e.extend({}, this.ajaxHeaders, p))) : p = null, m = _.getContext2D ? _.getContext2D(r, o, s) : void 0, h = new e.Tile(r, t, n, c, u, d, m, this.loadTilesWithAjax, p, l, f, _.getTileHashKey(r, o, s, d, p, f)), this.getFlip() ? o === 0 && (h.isRightMost = !0) : o === a.x - 1 && (h.isRightMost = !0), s === a.y - 1 && (h.isBottomMost = !0), h.flipped = this.flipped, g[r][t][n] = h), h = g[r][t][n], h.lastTouchTime = i, h;
			},
			_loadTile: function(e, t) {
				var n = this;
				e.loading = !0, this._imageLoader.addJob({
					src: e.getUrl(),
					tile: e,
					source: this.source,
					postData: e.postData,
					loadWithAjax: e.loadWithAjax,
					ajaxHeaders: e.ajaxHeaders,
					crossOriginPolicy: this.crossOriginPolicy,
					ajaxWithCredentials: this.ajaxWithCredentials,
					callback: function(r, i, a) {
						n._onTileLoad(e, t, r, i, a);
					},
					abort: function() {
						e.loading = !1;
					}
				});
			},
			_onTileLoad: function(t, n, r, i, a) {
				if (r) t.exists = !0;
				else {
					e.console.error("Tile %s failed to load: %s - error: %s", t, t.getUrl(), i), this.viewer.raiseEvent("tile-load-failed", {
						tile: t,
						tiledImage: this,
						time: n,
						message: i,
						tileRequest: a
					}), t.loading = !1, t.exists = !1;
					return;
				}
				if (n < this.lastResetTime) {
					e.console.warn("Ignoring tile %s loaded before reset: %s", t, t.getUrl()), t.loading = !1;
					return;
				}
				var o = this;
				(function() {
					var e = o.source.getClosestLevel();
					o._setTileLoaded(t, r, e, a);
				})();
			},
			_setTileLoaded: function(t, n, r, i) {
				var a = 0, o = !1, s = this;
				function c() {
					return o && e.console.error("Event 'tile-loaded' argument getCompletionCallback must be called synchronously. Its return value should be called asynchronously."), a++, l;
				}
				function l() {
					a--, a === 0 && (t.loading = !1, t.loaded = !0, t.hasTransparency = s.source.hasTransparency(t.context2D, t.getUrl(), t.ajaxHeaders, t.postData), t.context2D || s._tileCache.cacheTile({
						data: n,
						tile: t,
						cutoff: r,
						tiledImage: s
					}), s.viewer.raiseEvent("tile-ready", {
						tile: t,
						tiledImage: s,
						tileRequest: i
					}), s._needsDraw = !0);
				}
				var u = c();
				this.viewer.raiseEvent("tile-loaded", {
					tile: t,
					tiledImage: this,
					tileRequest: i,
					get image() {
						return e.console.error("[tile-loaded] event 'image' has been deprecated. Use 'data' property instead."), n;
					},
					data: n,
					getCompletionCallback: c
				}), o = !0, u();
			},
			_compareTiles: function(e, t, n) {
				return e ? (e.push(t), this._sortTiles(e), e.length > n && e.pop(), e) : [t];
			},
			_sortTiles: function(e) {
				e.sort(function(e, t) {
					return e === null ? 1 : t === null ? -1 : e.visibility === t.visibility ? e.squaredDistance - t.squaredDistance : t.visibility - e.visibility;
				});
			},
			_providesCoverage: function(e, t, n, r) {
				var i, a, o, s;
				if (!e[t]) return !1;
				if (n === void 0 || r === void 0) {
					for (o in i = e[t], i) if (Object.prototype.hasOwnProperty.call(i, o)) {
						for (s in a = i[o], a) if (Object.prototype.hasOwnProperty.call(a, s) && !a[s]) return !1;
					}
					return !0;
				}
				return e[t][n] === void 0 || e[t][n][r] === void 0 || e[t][n][r] === !0;
			},
			_isCovered: function(e, t, n, r) {
				return n === void 0 || r === void 0 ? this._providesCoverage(e, t + 1) : this._providesCoverage(e, t + 1, 2 * n, 2 * r) && this._providesCoverage(e, t + 1, 2 * n, 2 * r + 1) && this._providesCoverage(e, t + 1, 2 * n + 1, 2 * r) && this._providesCoverage(e, t + 1, 2 * n + 1, 2 * r + 1);
			},
			_setCoverage: function(t, n, r, i, a) {
				if (!t[n]) {
					e.console.warn("Setting coverage for a tile before its level's coverage has been reset: %s", n);
					return;
				}
				t[n][r] || (t[n][r] = {}), t[n][r][i] = a;
			},
			_resetCoverage: function(e, t) {
				e[t] = {};
			}
		});
	})(n), (function(e) {
		var t = function(t) {
			e.console.assert(t, "[TileCache.cacheTile] options is required"), e.console.assert(t.tile, "[TileCache.cacheTile] options.tile is required"), e.console.assert(t.tiledImage, "[TileCache.cacheTile] options.tiledImage is required"), this.tile = t.tile, this.tiledImage = t.tiledImage;
		}, n = function(t) {
			e.console.assert(t, "[ImageRecord] options is required"), e.console.assert(t.data, "[ImageRecord] options.data is required"), this._tiles = [], t.create.apply(null, [
				this,
				t.data,
				t.ownerTile
			]), this._destroyImplementation = t.destroy.bind(null, this), this.getImage = t.getImage.bind(null, this), this.getData = t.getData.bind(null, this), this.getRenderedContext = t.getRenderedContext.bind(null, this);
		};
		n.prototype = {
			destroy: function() {
				this._destroyImplementation(), this._tiles = null;
			},
			addTile: function(t) {
				e.console.assert(t, "[ImageRecord.addTile] tile is required"), this._tiles.push(t);
			},
			removeTile: function(t) {
				for (var n = 0; n < this._tiles.length; n++) if (this._tiles[n] === t) {
					this._tiles.splice(n, 1);
					return;
				}
				e.console.warn("[ImageRecord.removeTile] trying to remove unknown tile", t);
			},
			getTileCount: function() {
				return this._tiles.length;
			}
		}, e.TileCache = function(t) {
			t ||= {}, this._maxImageCacheCount = t.maxImageCacheCount || e.DEFAULT_SETTINGS.maxImageCacheCount, this._tilesLoaded = [], this._imagesLoaded = [], this._imagesLoadedCount = 0;
		}, e.TileCache.prototype = {
			numTilesLoaded: function() {
				return this._tilesLoaded.length;
			},
			cacheTile: function(r) {
				e.console.assert(r, "[TileCache.cacheTile] options is required"), e.console.assert(r.tile, "[TileCache.cacheTile] options.tile is required"), e.console.assert(r.tile.cacheKey, "[TileCache.cacheTile] options.tile.cacheKey is required"), e.console.assert(r.tiledImage, "[TileCache.cacheTile] options.tiledImage is required");
				var i = r.cutoff || 0, a = this._tilesLoaded.length, o = this._imagesLoaded[r.tile.cacheKey];
				if (o || (r.data ||= (e.console.error("[TileCache.cacheTile] options.image was renamed to options.data. '.image' attribute has been deprecated and will be removed in the future."), r.image), e.console.assert(r.data, "[TileCache.cacheTile] options.data is required to create an ImageRecord"), o = this._imagesLoaded[r.tile.cacheKey] = new n({
					data: r.data,
					ownerTile: r.tile,
					create: r.tiledImage.source.createTileCache,
					destroy: r.tiledImage.source.destroyTileCache,
					getImage: r.tiledImage.source.getTileCacheDataAsImage,
					getData: r.tiledImage.source.getTileCacheData,
					getRenderedContext: r.tiledImage.source.getTileCacheDataAsContext2D
				}), this._imagesLoadedCount++), o.addTile(r.tile), r.tile.cacheImageRecord = o, this._imagesLoadedCount > this._maxImageCacheCount) {
					for (var s = null, c = -1, l = null, u, d, f, p, m, h, g = this._tilesLoaded.length - 1; g >= 0; g--) if (h = this._tilesLoaded[g], u = h.tile, !(u.level <= i || u.beingDrawn)) {
						if (!s) {
							s = u, c = g, l = h;
							continue;
						}
						p = u.lastTouchTime, d = s.lastTouchTime, m = u.level, f = s.level, (p < d || p === d && m > f) && (s = u, c = g, l = h);
					}
					s && c >= 0 && (this._unloadTile(l), a = c);
				}
				this._tilesLoaded[a] = new t({
					tile: r.tile,
					tiledImage: r.tiledImage
				});
			},
			clearTilesFor: function(t) {
				e.console.assert(t, "[TileCache.clearTilesFor] tiledImage is required");
				for (var n, r = 0; r < this._tilesLoaded.length; ++r) n = this._tilesLoaded[r], n.tiledImage === t && (this._unloadTile(n), this._tilesLoaded.splice(r, 1), r--);
			},
			getImageRecord: function(t) {
				return e.console.assert(t, "[TileCache.getImageRecord] cacheKey is required"), this._imagesLoaded[t];
			},
			_unloadTile: function(t) {
				e.console.assert(t, "[TileCache._unloadTile] tileRecord is required");
				var n = t.tile, r = t.tiledImage;
				let i = n.getCanvasContext && n.getCanvasContext();
				n.unload(), n.cacheImageRecord = null;
				var a = this._imagesLoaded[n.cacheKey];
				a && (a.removeTile(n), a.getTileCount() || (a.destroy(), delete this._imagesLoaded[n.cacheKey], this._imagesLoadedCount--, i && (i.canvas.width = 0, i.canvas.height = 0, r.viewer.raiseEvent("image-unloaded", {
					context2D: i,
					tile: n
				}))), r.viewer.raiseEvent("tile-unloaded", {
					tile: n,
					tiledImage: r
				}));
			}
		};
	})(n), (function(e) {
		e.World = function(t) {
			var n = this;
			e.console.assert(t.viewer, "[World] options.viewer is required"), e.EventSource.call(this), this.viewer = t.viewer, this._items = [], this._needsDraw = !1, this._autoRefigureSizes = !0, this._needsSizesFigured = !1, this._delegatedFigureSizes = function(e) {
				n._autoRefigureSizes ? n._figureSizes() : n._needsSizesFigured = !0;
			}, this._figureSizes();
		}, e.extend(e.World.prototype, e.EventSource.prototype, {
			addItem: function(t, n) {
				if (e.console.assert(t, "[World.addItem] item is required"), e.console.assert(t instanceof e.TiledImage, "[World.addItem] only TiledImages supported at this time"), n ||= {}, n.index !== void 0) {
					var r = Math.max(0, Math.min(this._items.length, n.index));
					this._items.splice(r, 0, t);
				} else this._items.push(t);
				this._autoRefigureSizes ? this._figureSizes() : this._needsSizesFigured = !0, this._needsDraw = !0, t.addHandler("bounds-change", this._delegatedFigureSizes), t.addHandler("clip-change", this._delegatedFigureSizes), this.raiseEvent("add-item", { item: t });
			},
			getItemAt: function(t) {
				return e.console.assert(t !== void 0, "[World.getItemAt] index is required"), this._items[t];
			},
			getIndexOfItem: function(t) {
				return e.console.assert(t, "[World.getIndexOfItem] item is required"), e.indexOf(this._items, t);
			},
			getItemCount: function() {
				return this._items.length;
			},
			setItemIndex: function(t, n) {
				e.console.assert(t, "[World.setItemIndex] item is required"), e.console.assert(n !== void 0, "[World.setItemIndex] index is required");
				var r = this.getIndexOfItem(t);
				if (n >= this._items.length) throw Error("Index bigger than number of layers.");
				n !== r && r !== -1 && (this._items.splice(r, 1), this._items.splice(n, 0, t), this._needsDraw = !0, this.raiseEvent("item-index-change", {
					item: t,
					previousIndex: r,
					newIndex: n
				}));
			},
			removeItem: function(t) {
				e.console.assert(t, "[World.removeItem] item is required");
				var n = e.indexOf(this._items, t);
				n !== -1 && (t.removeHandler("bounds-change", this._delegatedFigureSizes), t.removeHandler("clip-change", this._delegatedFigureSizes), t.destroy(), this._items.splice(n, 1), this._figureSizes(), this._needsDraw = !0, this._raiseRemoveItem(t));
			},
			removeAll: function() {
				this.viewer._cancelPendingImages();
				var e, t;
				for (t = 0; t < this._items.length; t++) e = this._items[t], e.removeHandler("bounds-change", this._delegatedFigureSizes), e.removeHandler("clip-change", this._delegatedFigureSizes), e.destroy();
				var n = this._items;
				for (this._items = [], this._figureSizes(), this._needsDraw = !0, t = 0; t < n.length; t++) e = n[t], this._raiseRemoveItem(e);
			},
			resetItems: function() {
				for (var e = 0; e < this._items.length; e++) this._items[e].reset();
			},
			update: function(e) {
				for (var t = !1, n = 0; n < this._items.length; n++) t = this._items[n].update(e) || t;
				return t;
			},
			draw: function() {
				this.viewer.drawer.draw(this._items), this._needsDraw = !1, this._items.forEach((e) => {
					this._needsDraw = e.setDrawn() || this._needsDraw;
				});
			},
			needsDraw: function() {
				for (var e = 0; e < this._items.length; e++) if (this._items[e].needsDraw()) return !0;
				return this._needsDraw;
			},
			getHomeBounds: function() {
				return this._homeBounds.clone();
			},
			getContentFactor: function() {
				return this._contentFactor;
			},
			setAutoRefigureSizes: function(e) {
				this._autoRefigureSizes = e, e & this._needsSizesFigured && (this._figureSizes(), this._needsSizesFigured = !1);
			},
			arrange: function(t) {
				t ||= {};
				var n = t.immediately || !1, r = t.layout || e.DEFAULT_SETTINGS.collectionLayout, i = t.rows || e.DEFAULT_SETTINGS.collectionRows, a = t.columns || e.DEFAULT_SETTINGS.collectionColumns, o = t.tileSize || e.DEFAULT_SETTINGS.collectionTileSize, s = o + (t.tileMargin || e.DEFAULT_SETTINGS.collectionTileMargin), c = !t.rows && a ? a : Math.ceil(this._items.length / i), l = 0, u = 0, d, f, p, m, h;
				this.setAutoRefigureSizes(!1);
				for (var g = 0; g < this._items.length; g++) g && g % c === 0 && (r === "horizontal" ? (u += s, l = 0) : (l += s, u = 0)), d = this._items[g], f = d.getBounds(), p = f.width > f.height ? o : o * (f.width / f.height), m = p * (f.height / f.width), h = new e.Point(l + (o - p) / 2, u + (o - m) / 2), d.setPosition(h, n), d.setWidth(p, n), r === "horizontal" ? l += s : u += s;
				this.setAutoRefigureSizes(!0);
			},
			_figureSizes: function() {
				var t = this._homeBounds ? this._homeBounds.clone() : null, n = this._contentSize ? this._contentSize.clone() : null, r = this._contentFactor || 0;
				if (!this._items.length) this._homeBounds = new e.Rect(0, 0, 1, 1), this._contentSize = new e.Point(1, 1), this._contentFactor = 1;
				else {
					var i = this._items[0], a = i.getBounds();
					this._contentFactor = i.getContentSize().x / a.width;
					for (var o = i.getClippedBounds().getBoundingBox(), s = o.x, c = o.y, l = o.x + o.width, u = o.y + o.height, d = 1; d < this._items.length; d++) i = this._items[d], a = i.getBounds(), this._contentFactor = Math.max(this._contentFactor, i.getContentSize().x / a.width), o = i.getClippedBounds().getBoundingBox(), s = Math.min(s, o.x), c = Math.min(c, o.y), l = Math.max(l, o.x + o.width), u = Math.max(u, o.y + o.height);
					this._homeBounds = new e.Rect(s, c, l - s, u - c), this._contentSize = new e.Point(this._homeBounds.width * this._contentFactor, this._homeBounds.height * this._contentFactor);
				}
				(this._contentFactor !== r || !this._homeBounds.equals(t) || !this._contentSize.equals(n)) && this.raiseEvent("metrics-change", {});
			},
			_raiseRemoveItem: function(e) {
				this.raiseEvent("remove-item", { item: e });
			}
		});
	})(n);
})), CX = i(O((e, { windowId: t }) => ({
	annotations: Gn(e, { windowId: t }),
	canvasWorld: gs(e, { windowId: t }),
	drawAnnotations: Gt(e).window.forceDrawAnnotations || Xt(e, {
		content: "annotations",
		windowId: t
	}).length > 0,
	drawSearchAnnotations: Gt(e).window.forceDrawAnnotations || Xt(e, {
		content: "search",
		windowId: t
	}).length > 0,
	highlightAllAnnotations: b(e, { windowId: t }).highlightAllAnnotations,
	hoveredAnnotationIds: b(e, { windowId: t }).hoveredAnnotationIds,
	palette: Nn(e).palette,
	searchAnnotations: nr(e, { windowId: t }),
	selectedAnnotationId: ar(e, { windowId: t })
}), {
	deselectAnnotation: cr,
	hoverAnnotation: dr,
	selectAnnotation: Qn
}), A("AnnotationsOverlay"))(IY), wX = {
	get(e) {
		return this.refs[e];
	},
	remove(e) {
		delete this.refs[e];
	},
	refs: {},
	set(e, t) {
		this.refs[e] = t;
	}
}, TX = /* @__PURE__ */ k(SX(), 1);
function EX(e, { x: t, y: n, zoom: r, rotation: i, flip: a }, o) {
	let s = new TX.default.Point(t, n);
	t != null && n != null && (o || Math.round(t) !== Math.round(e.centerSpringX.target.value) || Math.round(n) !== Math.round(e.centerSpringY.target.value)) && e.panTo(s, o), r != null && (o || r !== e.zoomSpring.target.value) && (e.zoomTo(r, s, o), e.applyConstraints()), i != null && i !== e.getRotation() && e.setRotation(i), a != null && (a || !1) !== e.getFlip() && e.setFlip(a);
}
function DX({ children: e = void 0, Container: t = "div", osdConfig: n = {}, viewerConfig: r = {}, onUpdateViewport: i = () => {}, setViewer: a = () => {}, style: o = {}, ...s }) {
	let c = Pi(), l = R(), [u, d] = zi(!1), f = R(void 0), p = R(!1), m = R(null), h = R(!1), [, g] = Ri((e) => e + 1, 0), _ = kr(I((e) => {
		f.current?.raiseEvent("mouse-move", e);
	}, [f]), 10), v = I((e) => {
		let { viewport: t } = e.eventSource;
		p.current && (h.current || i({
			bounds: t.getBounds(),
			flip: t.getFlip(),
			rotation: t.getRotation(),
			x: Math.round(t.centerSpringX.target.value),
			y: Math.round(t.centerSpringY.target.value),
			zoom: t.zoomSpring.target.value
		}));
	}, [i, p]), y = I(({ viewport: e }) => {
		p.current || (p.current = !0, EX(e, r, !0), !r.x && !r.y && !r.zoom && (r.bounds ? (e.fitBounds(new TX.default.Rect(...r.bounds), !0), m.current = r.bounds) : e.goHome(!0)));
	}, [p, r]), b = R(y);
	b.current = y, L(() => {
		let e = f.current;
		if (!e) return;
		let { viewport: t } = e;
		if (!p.current) {
			y(e);
			return;
		}
		if (r.bounds && (!m.current || r.bounds.length !== m.current.length || r.bounds.some((e, t) => e !== m.current[t]))) {
			h.current = !0, m.current = r.bounds, e.addOnceHandler("tile-loaded", () => {
				let e = new TX.default.Rect(...r.bounds);
				t.fitBoundsWithConstraints(e, !0), h.current = !1;
			});
			return;
		}
		!r.x || !r.y || !r.zoom || EX(t, r, !1);
	}, [
		p,
		y,
		r,
		f
	]), L(() => {
		let e = (0, TX.default)({
			element: l.current,
			...n
		});
		e.addHandler("canvas-drag", () => {
			d(!0);
		}), e.addHandler("canvas-drag-end", () => {
			d(!1);
		}), e.addHandler("canvas-double-click", ({ position: t, shift: r }) => {
			if (!n.zoomPerDoubleClick) return;
			let i = e.viewport.getZoom(), a = r ? 1 / n.zoomPerDoubleClick : n.zoomPerDoubleClick;
			e.viewport.zoomTo(i * a, e.viewport.pointFromPixel(t), !1);
		}), e.addHandler("animation-finish", v), e.innerTracker.moveHandler = _, f.current = e, a(e), e.world.addHandler("add-item", () => {
			p.current = !1, b.current(e);
		}), e.world.addHandler("remove-item", () => {
			p.current = !1, b.current(e);
		}), g();
	}, [l]), L(() => () => {
		let e = f.current;
		e && (e.innerTracker?.moveHandler === _ && (e.innerTracker.moveHandler = () => {}), e.removeAllHandlers(), e.destroy(), f.current = void 0, a(null));
	}, []);
	let { t: x } = V();
	return L(() => {
		let e = f?.current?.canvas?.firstElementChild;
		e && (e.setAttribute("role", "img"), e.setAttribute("aria-label", x("digitizedView")), e.setAttribute("aria-describedby", c));
	}, [
		f?.current?.canvas?.firstElementChild,
		c,
		x
	]), /* @__PURE__ */ z(ui.Provider, {
		value: f,
		children: /* @__PURE__ */ z(t, {
			id: c,
			ref: l,
			style: {
				...o,
				cursor: u ? "grabbing" : "grab"
			},
			...s,
			children: e
		})
	});
}
DX.propTypes = {
	children: W.default.node,
	Container: W.default.elementType,
	onUpdateViewport: W.default.func,
	osdConfig: W.default.object,
	setViewer: W.default.func,
	style: W.default.object,
	viewerConfig: W.default.shape({
		bounds: W.default.arrayOf(W.default.number),
		flip: W.default.bool,
		rotation: W.default.number,
		x: W.default.number,
		y: W.default.number,
		zoom: W.default.number
	})
};
//#endregion
//#region src/components/OpenSeadragonTileSource.jsx
function OX({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, tileSource: r = {}, url: i = void 0 }) {
	let a = Ni(ui), { notifyFailure: o, fallbackImage: s } = Ni(pr), c = R(void 0);
	return L(() => {
		t != null && c.current?.setOpacity(t);
	}, [t]), L(() => {
		n && c.current?.fitBounds(new TX.default.Rect(...n));
	}, [n]), L(() => {
		!c.current || !a?.current || e == null || a.current.world.setItemIndex(c.current, e);
	}, [e, a]), L(() => {
		if (!a?.current) return;
		let l = () => {
			s && a.current.addTiledImage({
				tileSource: {
					type: "image",
					url: s
				},
				index: e,
				opacity: t,
				fitBounds: n ? new TX.default.Rect(...n) : void 0,
				success: (e) => {
					c.current = e.item;
				}
			});
		}, u = new Promise((s, c) => {
			let u = i && {
				type: "image",
				url: i
			} || (typeof r == "string" || r instanceof String) && r || { ...r };
			a.current?.addTiledImage({
				tileSource: u,
				index: e,
				opacity: t,
				fitBounds: n ? new TX.default.Rect(...n) : void 0,
				success: (e) => s(e),
				error: (e) => {
					let t = i || (typeof r == "string" ? r : r?.["@id"]);
					t && o(t), l(), c(e);
				}
			});
		}).then((e) => {
			c.current = e.item;
		}).catch((e) => {
			console.warn("[Mirador: OSD tile image load failed]", e);
		}), d = a.current;
		return () => u.finally(() => {
			d && c.current && d.world.removeItem(c.current);
		});
	}, [a?.current, i]), null;
}
OX.propTypes = {
	fitBounds: W.default.arrayOf(W.default.number),
	index: W.default.number,
	opacity: W.default.number,
	tileSource: W.default.oneOfType([W.default.string, W.default.object]),
	url: W.default.string
};
//#endregion
//#region src/components/OpenSeadragonViewer.jsx
var kX = H("section")({
	cursor: "grab",
	flex: 1,
	position: "relative"
});
function AX({ children: e = null, label: t = null, windowId: n, osdConfig: r = {}, viewerConfig: i = null, drawAnnotations: a = !1, infoResponses: o = [], canvasWorld: s, nonTiledImages: c = [], updateViewport: l, ...u }) {
	let { t: d } = V(), f = R(), [p, m] = zi(null), h = I(({ flip: e, rotation: t, x: r, y: i, zoom: a }) => {
		l(n, {
			flip: e,
			rotation: t,
			x: r,
			y: i,
			zoom: a
		});
	}, [l, n]), g = I((e = !0) => {
		f.current?.viewport && f.current.viewport.fitBounds(new TX.default.Rect(...s.worldBounds()), e);
	}, [s, f]);
	L(() => (wX.set(n, f), () => wX.remove(n)), [f, n]), L(() => {
		f.current = p;
	}, [f, p]);
	let _ = xi.map(e, (e) => Ti(e, { zoomToWorld: g })), v = {
		canvasWorld: s,
		drawAnnotations: a,
		infoResponses: o,
		label: t,
		nonTiledImages: c,
		osdConfig: r,
		t: d,
		updateViewport: l,
		viewerConfig: i,
		windowId: n,
		...u
	}, y = Li(() => [...o.map((e) => e.id), ...c.map((e) => e.id)], [o, c]);
	return /* @__PURE__ */ B(DX, {
		className: (0, G.default)(M("osd-container")),
		Container: kX,
		osdConfig: r,
		viewerConfig: i || (s.hasDimensions() ? { bounds: s.worldBounds() } : void 0),
		onUpdateViewport: h,
		setViewer: m,
		"aria-label": d("item", { label: t }),
		"aria-live": "polite",
		children: [
			o.map((e) => {
				let t = s.contentResource(e.id);
				if (!t) return null;
				let n = s.contentResourceToWorldCoordinates(t), r = s.layerIndexOfImageResource(t), i = s.layerOpacityOfImageResource(t);
				return /* @__PURE__ */ z(OX, {
					tileSource: e.json,
					fitBounds: n,
					index: r,
					opacity: i
				}, e.id);
			}),
			c.map((e) => {
				let t = e.getProperty("type"), n = e.getProperty("format") || "";
				if (!(t === "Image" || t === "dctypes:Image" || n.startsWith("image/"))) return null;
				let r = s.contentResourceToWorldCoordinates(e), i = s.layerIndexOfImageResource(e), a = s.layerOpacityOfImageResource(e);
				return /* @__PURE__ */ z(OX, {
					url: e.id,
					fitBounds: r,
					index: i,
					opacity: a
				}, e.id);
			}),
			a && /* @__PURE__ */ z(CX, {
				viewer: p,
				windowId: n
			}),
			_,
			/* @__PURE__ */ z(sX, { imageUrls: y }),
			/* @__PURE__ */ z(Yr, {
				targetName: "OpenSeadragonViewer",
				viewer: p,
				...v
			})
		]
	});
}
AX.propTypes = {
	canvasWorld: W.default.instanceOf(hs).isRequired,
	children: W.default.node,
	drawAnnotations: W.default.bool,
	infoResponses: W.default.arrayOf(W.default.object),
	label: W.default.string,
	nonTiledImages: W.default.array,
	osdConfig: W.default.object,
	updateViewport: W.default.func.isRequired,
	viewerConfig: W.default.object,
	windowId: W.default.string.isRequired
};
//#endregion
//#region node_modules/@mui/icons-material/esm/ListSharp.js
var jX = N(/*#__PURE__*/ z("path", { d: "M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7zm-4 6h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z" }), "ListSharp");
//#endregion
//#region src/components/SelectCollection.jsx
function MX({ collectionPath: e = [], manifestId: t = null, showCollectionDialog: n, windowId: r = null }) {
	let { t: i } = V(), a = I(() => {
		n(t, e.slice(0, -1), r);
	}, [
		e,
		t,
		n,
		r
	]);
	return /* @__PURE__ */ z(vo, {
		container: !0,
		sx: {
			alignContent: "center",
			justifyContent: "center",
			width: "100%"
		},
		children: /* @__PURE__ */ B(Ka, { children: [/* @__PURE__ */ z(U, {
			variant: "h4",
			component: "p",
			sx: {
				mb: 2,
				textAlign: "center"
			},
			children: /* @__PURE__ */ z("em", { children: i("noItemSelected") })
		}), /* @__PURE__ */ z(va, {
			"aria-label": "show collection",
			color: "primary",
			variant: "contained",
			onClick: a,
			startIcon: /* @__PURE__ */ z(jX, {}),
			children: i("showCollection")
		})] })
	});
}
MX.propTypes = {
	collectionPath: W.default.arrayOf(W.default.string),
	manifestId: W.default.string,
	showCollectionDialog: W.default.func.isRequired,
	windowId: W.default.string
};
//#endregion
//#region src/components/TextViewer.jsx
var NX = H("div")(() => ({
	alignItems: "center",
	display: "flex",
	width: "100%"
})), PX = H("div")(() => ({
	maxHeight: "100%",
	width: "100%"
}));
function FX({ textOptions: e = {}, textResources: t = [], windowId: n }) {
	return /* @__PURE__ */ z(NX, { children: /* @__PURE__ */ B(PX, {
		...e,
		children: [t.map((e) => /* @__PURE__ */ z("source", {
			src: e.id,
			type: e.getFormat()
		}, e.id)), /* @__PURE__ */ z(yi, { windowId: n })]
	}) });
}
FX.propTypes = {
	textOptions: W.default.object,
	textResources: W.default.arrayOf(W.default.object),
	windowId: W.default.string.isRequired
};
//#endregion
//#region src/components/VideoViewer.jsx
var IX = H("div")(() => ({
	alignItems: "center",
	display: "flex",
	width: "100%"
})), LX = H("video")(() => ({
	maxHeight: "100%",
	width: "100%"
}));
function RX({ captions: e = [], videoOptions: t = {}, videoResources: n = [], canvasId: r = "" }) {
	return /* @__PURE__ */ z(IX, { children: /* @__PURE__ */ Di(LX, {
		...t,
		key: r
	}, n.map((e) => /* @__PURE__ */ z("source", {
		src: e.id,
		type: e.getFormat()
	}, e.io)), e.map((e) => /* @__PURE__ */ z("track", {
		src: e.id,
		label: e.getDefaultLabel(),
		srcLang: e.getProperty("language")
	}, e.id))) });
}
RX.propTypes = {
	captions: W.default.arrayOf(W.default.object),
	canvasId: W.default.string,
	videoOptions: W.default.object,
	videoResources: W.default.arrayOf(W.default.object)
};
//#endregion
//#region src/components/WindowList.jsx
function zX({ handleClose: e, windowIds: t, focusWindow: n, focusedWindowId: r = null, titles: i = {}, tReady: a = !1, ...o }) {
	let { t: s } = V(), c = Ni(oi);
	return /* @__PURE__ */ B(Ua, {
		anchorOrigin: {
			horizontal: "right",
			vertical: "top"
		},
		transformOrigin: {
			horizontal: "left",
			vertical: "top"
		},
		id: "window-list-menu",
		container: c?.current,
		onClose: e,
		...o,
		children: [/* @__PURE__ */ z(za, {
			role: "presentation",
			selected: !1,
			disabled: !0,
			tabIndex: "-1",
			children: s("openWindows")
		}), t.map((t, a) => /* @__PURE__ */ z(sa, {
			selected: t === r,
			onClick: (r) => {
				n(t, !0), e(r);
			},
			children: /* @__PURE__ */ z(ca, {
				slotProps: { primary: { variant: "body1" } },
				children: i[t] || s("untitled")
			})
		}, t))]
	});
}
zX.propTypes = {
	container: W.default.shape({ current: W.default.instanceOf(Element) }),
	focusedWindowId: W.default.string,
	focusWindow: W.default.func.isRequired,
	handleClose: W.default.func.isRequired,
	titles: W.default.objectOf(W.default.string),
	tReady: W.default.bool,
	windowIds: W.default.arrayOf(W.default.string).isRequired
};
//#endregion
//#region node_modules/@mui/icons-material/esm/BookmarksSharp.js
var BX = N(/*#__PURE__*/ z("path", { d: "m19 18 2 1V1H7v2h12zM17 5H3v18l7-3 7 3z" }), "BookmarksSharp"), VX = i(O((e) => ({
	focusedWindowId: Pe(e),
	titles: An(e),
	windowIds: de(e)
}), { focusWindow: Lr }), A("WindowList"))(zX);
//#endregion
//#region src/components/WindowListButton.jsx
function HX({ disabled: e = !1, windowCount: t }) {
	let { t: n } = V(), [r, i] = zi(null), a = Pi(), o = () => {
		i(null);
	}, s = (e) => {
		i(e.currentTarget);
	};
	return /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(ii, {
		"aria-haspopup": "true",
		"aria-label": n("listAllOpenWindows"),
		"aria-owns": r ? a : null,
		selected: !!r,
		disabled: e,
		badge: !0,
		BadgeProps: {
			badgeContent: t,
			sx: { ".MuiBadge-badge": { paddingLeft: 1.5 } }
		},
		onClick: (e) => s(e),
		children: /* @__PURE__ */ z(BX, {})
	}), !!r && /* @__PURE__ */ z(VX, {
		anchorEl: r,
		id: a,
		open: !!r,
		handleClose: o
	})] });
}
HX.propTypes = {
	disabled: W.default.bool,
	windowCount: W.default.number.isRequired
};
//#endregion
//#region src/components/WindowViewer.jsx
var UX = ji(() => Promise.resolve().then(() => uQ));
function WX({ windowId: e }) {
	return /* @__PURE__ */ z(li, {
		fallback: null,
		children: /* @__PURE__ */ z(wi, {
			fallback: /* @__PURE__ */ z("div", {}),
			children: /* @__PURE__ */ z(UX, {
				windowId: e,
				children: /* @__PURE__ */ z(yi, { windowId: e })
			})
		})
	});
}
WX.propTypes = { windowId: W.default.string.isRequired };
//#endregion
//#region node_modules/lodash/isEqual.js
var GX = /* @__PURE__ */ D(((e, t) => {
	var n = Ve();
	function r(e, t) {
		return n(e, t);
	}
	t.exports = r;
})), KX = i(O((e, { windowId: t }) => ({ title: Jt(e, { windowId: t }) }), null), A("MosaicRenderPreview"))(vX), qX = /* @__PURE__ */ k((/* @__PURE__ */ D(((e, t) => {
	var n = dI(), r = f();
	function i(e, t, i) {
		var a = e == null ? 0 : e.length;
		return a ? (t = i || t === void 0 ? 1 : r(t), t = a - t, n(e, 0, t < 0 ? 0 : t)) : [];
	}
	t.exports = i;
})))(), 1), JX = class {
	constructor(e) {
		this.layout = e;
	}
	pathToCorner(e = XG.TOP_RIGHT) {
		return rK(this.layout, e);
	}
	pathToParent(e) {
		return sK(this.layout, (0, qX.default)(e));
	}
	nodeAtPath(e) {
		return sK(this.layout, e);
	}
	addWindows(e) {
		e.forEach((t, n) => {
			let r = this.pathToCorner(), i = this.pathToParent(r), a = this.nodeAtPath(r), o = i ? nK(i.direction) : "row", s;
			s = o === "row" ? [a, e[n]] : [e[n], a];
			let c = {
				path: r,
				spec: { $set: {
					type: "split",
					direction: o,
					children: s
				} }
			};
			this.layout = pK(this.layout, [c]);
		});
	}
	removeWindows(e, t) {
		let n = e.map((e) => mK(this.layout, t[e]));
		this.layout = pK(this.layout, n);
	}
}, YX = {
	".mosaic": {
		height: "100%",
		width: "100%"
	},
	".mosaic, .mosaic > *": { boxSizing: "border-box" },
	".mosaic .mosaic-zero-state": {
		position: "absolute",
		top: 6,
		right: 6,
		bottom: 6,
		left: 6,
		width: "auto",
		height: "auto",
		zIndex: "1"
	},
	".mosaic-root": {
		position: "absolute",
		top: 3,
		right: 3,
		bottom: 3,
		left: 3
	},
	".mosaic-split": {
		position: "absolute",
		zIndex: "1",
		touchAction: "none"
	},
	".mosaic-split:hover": { background: "black" },
	".mosaic-split .mosaic-split-line": { position: "absolute" },
	".mosaic-split.-row": {
		marginLeft: -3,
		width: 6,
		cursor: "ew-resize"
	},
	".mosaic-split.-row .mosaic-split-line": {
		top: "0",
		bottom: "0",
		left: 3,
		right: 3
	},
	".mosaic-split.-column": {
		marginTop: -3,
		height: 6,
		cursor: "ns-resize"
	},
	".mosaic-split.-column .mosaic-split-line": {
		top: 3,
		bottom: 3,
		left: "0",
		right: "0"
	},
	".mosaic-tile": {
		position: "absolute",
		margin: 3
	},
	".mosaic-tile > *": {
		height: "100%",
		width: "100%"
	},
	".mosaic-drop-target": { position: "relative" },
	".mosaic-drop-target.drop-target-hover .drop-target-container": { display: "block" },
	".mosaic-drop-target.mosaic > .drop-target-container .drop-target.left": { right: "calc(100% -  10px )" },
	".mosaic-drop-target.mosaic > .drop-target-container .drop-target.right": { left: "calc(100% -  10px )" },
	".mosaic-drop-target.mosaic > .drop-target-container .drop-target.bottom": { top: "calc(100% -  10px )" },
	".mosaic-drop-target.mosaic > .drop-target-container .drop-target.top": { bottom: "calc(100% -  10px )" },
	".mosaic-drop-target .drop-target-container": {
		position: "absolute",
		top: "0",
		right: "0",
		bottom: "0",
		left: "0",
		display: "none"
	},
	".mosaic-drop-target .drop-target-container.-dragging": { display: "block" },
	".mosaic-drop-target .drop-target-container .drop-target": {
		position: "absolute",
		top: "0",
		right: "0",
		bottom: "0",
		left: "0",
		background: "rgba(0, 0, 0, 0.2)",
		border: "2px solid black",
		opacity: "0",
		zIndex: "5"
	},
	".mosaic-drop-target .drop-target-container .drop-target.left": { right: "calc(100% -  30% )" },
	".mosaic-drop-target .drop-target-container .drop-target.right": { left: "calc(100% -  30% )" },
	".mosaic-drop-target .drop-target-container .drop-target.bottom": { top: "calc(100% -  30% )" },
	".mosaic-drop-target .drop-target-container .drop-target.top": { bottom: "calc(100% -  30% )" },
	".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover": { opacity: "1" },
	".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.left": { right: "calc(100% -  50% )" },
	".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.right": { left: "calc(100% -  50% )" },
	".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.bottom": { top: "calc(100% -  50% )" },
	".mosaic-drop-target .drop-target-container .drop-target.drop-target-hover.top": { bottom: "calc(100% -  50% )" },
	".mosaic-window, .mosaic-preview": {
		position: "relative",
		display: "flex",
		fallbacks: [{ display: "-webkit-box" }],
		webkitBoxOrient: "vertical",
		webkitBoxDirection: "normal",
		flexDirection: "column",
		overflow: "hidden",
		boxShadow: "0 0 1px rgba(0, 0, 0, 0.2)"
	},
	".mosaic-window .mosaic-window-toolbar, .mosaic-preview .mosaic-window-toolbar": {
		zIndex: "4",
		display: "flex",
		fallbacks: [{ display: "-webkit-box" }],
		webkitBoxPack: "justify",
		justifyContent: "space-between",
		webkitBoxAlign: "center",
		alignItems: "center",
		flexShrink: "0",
		height: 30,
		background: "white",
		boxShadow: "0 1px 1px rgba(0, 0, 0, 0.2)"
	},
	".mosaic-window .mosaic-window-toolbar.draggable, .mosaic-preview .mosaic-window-toolbar.draggable": { cursor: "move" },
	".mosaic-window .mosaic-window-title, .mosaic-preview .mosaic-window-title": {
		paddingLeft: 15,
		webkitBoxFlex: "1",
		flex: "1",
		textOverflow: "ellipsis",
		whiteSpace: "nowrap",
		overflow: "hidden",
		minHeight: 18
	},
	".mosaic-window .mosaic-window-controls, .mosaic-preview .mosaic-window-controls": {
		display: "flex",
		fallbacks: [{ display: "-webkit-box" }],
		height: "100%"
	},
	".mosaic-window .mosaic-window-controls .separator, .mosaic-preview .mosaic-window-controls .separator": {
		height: 20,
		borderLeft: "1px solid black",
		margin: "5px 4px"
	},
	".mosaic-window .mosaic-window-body, .mosaic-preview .mosaic-window-body": {
		position: "relative",
		webkitBoxFlex: "1",
		flex: "1",
		height: "0",
		background: "white",
		zIndex: "1",
		overflow: "hidden"
	},
	".mosaic-window .mosaic-window-additional-actions-bar, .mosaic-preview .mosaic-window-additional-actions-bar": {
		position: "absolute",
		top: 30,
		right: "0",
		bottom: "initial",
		left: "0",
		height: "0",
		overflow: "hidden",
		background: "white",
		webkitBoxPack: "end",
		justifyContent: "flex-end",
		display: "flex",
		fallbacks: [{ display: "-webkit-box" }],
		zIndex: "3"
	},
	".mosaic-window .mosaic-window-additional-actions-bar .bp3-button, .mosaic-preview .mosaic-window-additional-actions-bar .bp3-button": { margin: "0" },
	".mosaic-window .mosaic-window-additional-actions-bar .bp3-button:after, .mosaic-preview .mosaic-window-additional-actions-bar .bp3-button:after": { display: "none" },
	".mosaic-window .mosaic-window-body-overlay, .mosaic-preview .mosaic-window-body-overlay": {
		position: "absolute",
		top: "0",
		right: "0",
		bottom: "0",
		left: "0",
		opacity: "0",
		background: "white",
		display: "none",
		zIndex: "2"
	},
	".mosaic-window.additional-controls-open .mosaic-window-additional-actions-bar, .mosaic-preview.additional-controls-open .mosaic-window-additional-actions-bar": { height: 30 },
	".mosaic-window.additional-controls-open .mosaic-window-body-overlay, .mosaic-preview.additional-controls-open .mosaic-window-body-overlay": { display: "block" },
	".mosaic-window .mosaic-preview, .mosaic-preview .mosaic-preview": {
		height: "100%",
		width: "100%",
		position: "absolute",
		zIndex: "0",
		border: "1px solid black",
		maxHeight: 400
	},
	".mosaic-window .mosaic-preview .mosaic-window-body, .mosaic-preview .mosaic-preview .mosaic-window-body": {
		display: "flex",
		fallbacks: [{ display: "-webkit-box" }],
		webkitBoxOrient: "vertical",
		webkitBoxDirection: "normal",
		flexDirection: "column",
		webkitBoxAlign: "center",
		alignItems: "center",
		webkitBoxPack: "center",
		justifyContent: "center"
	},
	".mosaic-window .mosaic-preview h4, .mosaic-preview .mosaic-preview h4": { marginBottom: 10 },
	".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.close-button:before": { content: "'Close'" },
	".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.split-button:before": { content: "'Split'" },
	".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.replace-button:before": { content: "'Replace'" },
	".mosaic:not(.mosaic-blueprint-theme) .mosaic-default-control.expand-button:before": { content: "'Expand'" }
}, XX = /* @__PURE__ */ k(GX(), 1), ZX = H(YK)({
	"& .mosaic-preview": { boxShadow: "none" },
	"& .mosaic-tile": { boxShadow: "0 1px 3px 0 rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .2), 0 2px 1px -1px rgba(0, 0, 0, .2)" },
	"& .mosaic-window": { boxShadow: "none" },
	"& .mosaic-window-toolbar": { display: "none !important" }
}), QX = ({ windowId: e }) => /* @__PURE__ */ z("div", {
	className: "mosaic-preview",
	"aria-hidden": !0,
	children: /* @__PURE__ */ z(KX, { windowId: e })
});
QX.propTypes = { windowId: W.default.string.isRequired };
var $X = () => /* @__PURE__ */ z("div", {}), eZ = (e, t, n = {}) => {
	let r = iK(e), i = new JX(e), a = t.filter((e) => !r.includes(e));
	a.length > 0 && i.addWindows(a);
	let o = r.filter((e) => !t.includes(e));
	if (o.every((e) => n[e])) i.removeWindows(o, n);
	else return tK(t);
	return i.layout;
};
function tZ({ layout: e = void 0, updateWorkspaceMosaicLayout: t, windowIds: n = [], workspaceId: r }) {
	let i = R({}), a = Ni(Iw), o = e && aK(e);
	L(() => {
		let e = iK(o);
		if (!o || n.length === 0 || e.length < 2) {
			t(tK(n));
			return;
		}
		if (n.every((t) => e.includes(t)) && e.every((e) => n.includes(e))) return;
		let r = eZ(o, n, i.current);
		(0, XX.default)(r, o) || t(r);
	}, [
		o,
		n,
		i,
		t
	]);
	let s = [], c = (e, t) => n.includes(e) ? (i.current[e] = t, /* @__PURE__ */ z($K, {
		toolbarControls: s,
		path: t,
		windowId: e,
		renderPreview: QX,
		children: /* @__PURE__ */ z(cY, { windowId: e }, `${e}-${r}`)
	})) : null, l = (e) => {
		t(e);
	};
	return /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(bo, { styles: { ...YX } }), /* @__PURE__ */ z(ZX, {
		dragAndDropManager: a.dragDropManager,
		renderTile: c,
		initialValue: o || tK(n),
		onChange: l,
		className: (0, G.default)("mirador-mosaic"),
		zeroStateView: /* @__PURE__ */ z($X, {})
	})] });
}
tZ.propTypes = {
	layout: W.default.oneOfType([W.default.object, W.default.string]),
	updateWorkspaceMosaicLayout: W.default.func.isRequired,
	windowIds: W.default.arrayOf(W.default.string),
	workspaceId: W.default.string.isRequired
};
var nZ = i(O((e) => ({
	layout: se(e).layout,
	windowIds: se(e).windowIds,
	workspaceId: se(e).id
}), { updateWorkspaceMosaicLayout: Ws }), A("WorkspaceMosaic"))(tZ), rZ = i(O((e) => ({
	elasticLayout: Ie(e),
	workspace: se(e)
}), (e, t) => ({
	setWorkspaceViewportDimensions: (t) => {
		e(qs(t));
	},
	setWorkspaceViewportPosition: (t) => {
		e(Ks(t));
	},
	updateElasticWindowLayout: (t, n) => {
		e(nc(t, n));
	}
})), A("WorkspaceElastic"))(mY), iZ = H("div", {
	name: "Workspace",
	slot: "root"
})(() => ({
	height: "100%",
	position: "relative",
	width: "100%"
})), aZ = () => {
	let { t: e } = V();
	return /* @__PURE__ */ z(iZ, { children: /* @__PURE__ */ z(vo, {
		container: !0,
		style: {
			height: "100%",
			justifyContent: "center"
		},
		sx: { alignItems: "center" },
		children: /* @__PURE__ */ z(vo, {
			size: 12,
			children: /* @__PURE__ */ z(U, {
				variant: "h1",
				component: "div",
				align: "center",
				children: e("welcome")
			})
		})
	}) });
};
aZ.propTypes = {};
function oZ({ addWindow: e = () => {}, allowNewWindows: t = !0, maximizedWindowIds: n = [], windowIds: r = [], workspaceId: i, workspaceType: a }) {
	let { t: o } = V();
	return /* @__PURE__ */ z(aX, {
		onDrop: ({ canvasId: n, manifestId: r, manifestJson: i }, a, o) => {
			t && e({
				canvasId: n,
				manifest: i,
				manifestId: r
			});
		},
		children: /* @__PURE__ */ B(iZ, {
			ownerState: {
				allowNewWindows: t,
				maximizedWindowIds: n,
				windowIds: r,
				workspaceId: i,
				workspaceType: a
			},
			className: (0, G.default)(M("workspace-viewport")),
			children: [/* @__PURE__ */ z(U, {
				style: ci,
				component: "h1",
				children: o("miradorViewer")
			}), (() => {
				if (n.length > 0 && n.length > 0) return n.map((e) => /* @__PURE__ */ z(cY, {
					windowId: e,
					className: (0, G.default)(M("workspace-maximized-window"))
				}, `${e}-${i}`));
				if (r.length === 0) return /* @__PURE__ */ z(aZ, {});
				switch (a) {
					case "elastic": return /* @__PURE__ */ z(rZ, {});
					case "mosaic": return /* @__PURE__ */ z(nZ, {});
					default: return r.map((e) => /* @__PURE__ */ z(cY, { windowId: e }, `${e}-${i}`));
				}
			})()]
		})
	});
}
oZ.propTypes = {
	addWindow: W.default.func,
	allowNewWindows: W.default.bool,
	maximizedWindowIds: W.default.arrayOf(W.default.string),
	windowIds: W.default.arrayOf(W.default.string),
	workspaceId: W.default.string.isRequired,
	workspaceType: W.default.string.isRequired
};
//#endregion
//#region node_modules/@mui/icons-material/esm/AddSharp.js
var sZ = N(/*#__PURE__*/ z("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z" }), "AddSharp"), cZ = i(O(null, { addResource: uc }), A("ManifestForm"))(uX), lZ = i(O((e, { manifestId: t, provider: n }) => {
	let r = le(e, { manifestId: t }) || {}, i = un(e, { manifestId: t }), a = (i || { isCollection: () => !1 }).isCollection(), o = a ? i.getTotalItems() : yn(e, { manifestId: t }).length;
	return {
		active: ve(e).includes(t),
		error: r.error || !i && !!r.json,
		isCollection: a,
		isFetching: r.isFetching,
		isMultipart: a && Re(e, { manifestId: t }).includes("multi-part"),
		manifestLogo: mn(e, { manifestId: t }),
		provider: n || St(e, { manifestId: t }),
		ready: !!r.json,
		size: o,
		thumbnail: vn(e, { manifestId: t }),
		title: Jt(e, { manifestId: t })
	};
}, {
	addWindow: Vr,
	fetchManifest: Ps
}), A("ManifestListItem"))(_X), uZ = H("div")(() => ({
	boxSizing: "border-box",
	height: "100%",
	overflowX: "hidden",
	overflowY: "auto"
})), dZ = H(ii)(() => ({
	marginLeft: -12,
	marginRight: 20
}));
function fZ({ addResource: e = () => {}, catalog: t = [], setWorkspaceAddVisibility: n, ...r }) {
	let { t: i } = V(), [a, o] = zi(!1), s = R(), [c, l] = zi("100%"), u = () => {
		s.current && l(s.current.offsetWidth);
	}, d = ({ manifestId: t, manifestJson: n }, r, i) => {
		n ? e(t, n, { provider: "file" }) : e(t), p();
	}, f = () => {
		o(!1), p();
	}, p = () => {
		s.current && s.current.scrollTo({
			behavior: "smooth",
			left: 0,
			top: 0
		});
	}, m = t.map((e, t) => /* @__PURE__ */ Di(lZ, {
		...t === 0 && { buttonRef: (e) => e && e.focus() },
		key: e.manifestId,
		manifestId: e.manifestId,
		provider: e.provider,
		handleClose: () => n(!1)
	})), h = {
		addResource: e,
		catalog: t,
		setWorkspaceAddVisibility: n,
		t: i,
		...r
	};
	return L(() => (window.addEventListener("resize", u), u(), () => {
		window.removeEventListener("resize", u);
	}), []), /* @__PURE__ */ z(aX, {
		onDrop: d,
		children: /* @__PURE__ */ B(uZ, {
			className: (0, G.default)(M("workspace-add")),
			ref: s,
			children: [
				t.length < 1 ? /* @__PURE__ */ z(vo, {
					container: !0,
					style: { height: "100%" },
					sx: { alignItems: "center" },
					children: /* @__PURE__ */ z(vo, {
						size: 12,
						children: /* @__PURE__ */ z(U, {
							variant: "h1",
							component: "div",
							align: "center",
							children: i("emptyResourceList")
						})
					})
				}) : /* @__PURE__ */ B(Vi, {
					sx: { margin: 2 },
					children: [
						/* @__PURE__ */ z(U, {
							style: ci,
							component: "h1",
							children: i("miradorResources")
						}),
						/* @__PURE__ */ z(Yr, {
							targetName: "WorkspaceAdd",
							...h
						}),
						/* @__PURE__ */ z(ja, {
							disablePadding: !0,
							children: m
						})
					]
				}),
				/* @__PURE__ */ B(xo, {
					variant: "extended",
					disabled: a,
					sx: (e) => ({
						bottom: e.spacing(2),
						position: "absolute",
						right: e.spacing(2)
					}),
					className: (0, G.default)(M("add-resource-button")),
					"aria-label": i("addResource"),
					color: "primary",
					onClick: () => o(!0),
					children: [/* @__PURE__ */ z(sZ, {}), i("addResource")]
				}),
				/* @__PURE__ */ z(Wa, {
					sx: (e) => ({
						".MuiDrawer-paper": {
							borderTop: "0",
							left: "unset",
							width: c
						},
						...!a && { display: "none" }
					}),
					variant: "persistent",
					anchor: "bottom",
					open: a,
					ModalProps: {
						disablePortal: !0,
						hideBackdrop: !0,
						style: { position: "absolute" }
					},
					children: /* @__PURE__ */ B(Vi, {
						sx: {
							left: "0",
							marginTop: 6,
							paddingBottom: 2,
							paddingLeft: {
								sm: 3,
								xs: 2
							},
							paddingRight: {
								sm: 3,
								xs: 2
							},
							paddingTop: 2,
							right: "0"
						},
						children: [/* @__PURE__ */ z(Ra, {
							position: "absolute",
							color: "primary",
							enableColorOnDark: !0,
							onClick: () => o(!1),
							children: /* @__PURE__ */ B(la, {
								variant: "dense",
								children: [/* @__PURE__ */ z(dZ, {
									"aria-label": i("closeAddResourceForm"),
									color: "inherit",
									children: /* @__PURE__ */ z(bX, {})
								}), /* @__PURE__ */ z(U, {
									variant: "h2",
									noWrap: !0,
									sx: {
										color: "inherit",
										flexGrow: 1
									},
									children: i("addResource")
								})]
							})
						}), /* @__PURE__ */ z(cZ, {
							addResourcesOpen: a,
							onSubmit: f,
							onCancel: () => o(!1)
						})]
					})
				})
			]
		})
	});
}
fZ.propTypes = {
	addResource: W.default.func,
	catalog: W.default.arrayOf(W.default.shape({
		manifestId: W.default.string.isRequired,
		provider: W.default.string
	})),
	setWorkspaceAddVisibility: W.default.func.isRequired
};
//#endregion
//#region src/components/WorkspaceAddButton.jsx
function pZ() {
	let e = $i();
	return [...e.breakpoints.keys].reverse().reduce((t, n) => {
		let r = So(e.breakpoints.up(n));
		return !t && r ? n : t;
	}, null) || "xs";
}
var mZ = H(xo, {
	name: "WorkspaceAddButton",
	slot: "root"
})(({ theme: e }) => ({
	marginBottom: e.spacing(1),
	"&:hover, &.Mui-focusVisible": { backgroundColor: (e.vars || e).palette.primary.dark },
	...e.applyStyles("dark", { "&:hover, &.Mui-focusVisible": { backgroundColor: (e.vars || e).palette.primary.light } })
}));
function hZ({ setWorkspaceAddVisibility: e, isWorkspaceAddVisible: t = !1, useExtendedFab: n }) {
	let r = pZ(), { t: i } = V();
	return /* @__PURE__ */ z(ia, {
		title: i(t ? "closeAddResourceMenu" : "addResource"),
		children: /* @__PURE__ */ B(mZ, {
			size: "medium",
			color: "primary",
			id: "addBtn",
			focusRipple: !1,
			"aria-label": t ? i("closeAddResourceMenu") : n && r !== "xs" && i("startHere") || i("addResource"),
			variant: n && r !== "xs" ? "extended" : "circular",
			onClick: () => {
				e(!t);
			},
			children: [z(t ? Au : sZ, {}), n && r !== "xs" && i("startHere")]
		})
	});
}
hZ.propTypes = {
	isWorkspaceAddVisible: W.default.bool,
	setWorkspaceAddVisibility: W.default.func.isRequired,
	useExtendedFab: W.default.bool.isRequired
};
var gZ = i(O((e) => ({ error: Zt(e) }), { removeError: As }), A("ErrorDialog"))(qY), _Z = i(O((e, { width: t }) => {
	let { isWorkspaceAddVisible: n } = se(e);
	return {
		isWorkspaceAddVisible: n,
		useExtendedFab: !n && de(e).length === 0
	};
}, { setWorkspaceAddVisibility: Gs }), A("WorkspaceAddButton"))(hZ), vZ = N(/*#__PURE__*/ z("path", { d: "m19.44 12.99-.01.02c.04-.33.08-.67.08-1.01s-.03-.66-.07-.99l.01.02 2.44-1.92-2.43-4.22-2.87 1.16.01.01c-.52-.4-1.09-.74-1.71-1h.01L14.44 2H9.57l-.44 3.07h.01c-.62.26-1.19.6-1.71 1l.01-.01-2.88-1.17-2.44 4.22 2.44 1.92.01-.02c-.04.33-.07.65-.07.99s.03.68.08 1.01l-.01-.02-2.1 1.65-.33.26 2.43 4.2 2.88-1.15-.02-.04c.53.41 1.1.75 1.73 1.01h-.03L9.58 22h4.85s.03-.18.06-.42l.38-2.65h-.01c.62-.26 1.2-.6 1.73-1.01l-.02.04 2.88 1.15 2.43-4.2s-.14-.12-.33-.26zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5" }), "SettingsSharp"), yZ = i(O((e) => ({ languages: kn(e) }), (e, { afterSelect: t }) => ({ handleClick: (n) => {
	e(Ds({ language: n })), t && t();
} })), A("LanguageSettings"))(lX);
//#endregion
//#region src/components/icons/WorkspaceTypeElasticIcon.jsx
function bZ(e) {
	return /* @__PURE__ */ z(Ha, {
		...e,
		children: /* @__PURE__ */ B("svg", {
			xmlns: "http://www.w3.org/2000/svg",
			width: "120",
			height: "90",
			viewBox: "0 0 300 225",
			children: [/* @__PURE__ */ B("defs", { children: [
				/* @__PURE__ */ B("linearGradient", {
					id: "linear-gradient",
					x1: "0.5",
					y1: "1",
					x2: "0.5",
					gradientUnits: "objectBoundingBox",
					children: [
						/* @__PURE__ */ z("stop", { offset: "0" }),
						/* @__PURE__ */ z("stop", {
							offset: "0.14",
							stopOpacity: "0.631"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "1",
							stopOpacity: "0"
						})
					]
				}),
				/* @__PURE__ */ B("linearGradient", {
					id: "linear-gradient-2",
					x1: "0.5",
					y1: "1",
					x2: "0.5",
					gradientUnits: "objectBoundingBox",
					children: [
						/* @__PURE__ */ z("stop", {
							offset: "0",
							stopColor: "#fff",
							stopOpacity: "0"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.23",
							stopColor: "#fff",
							stopOpacity: "0.012"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.36",
							stopColor: "#fff",
							stopOpacity: "0.039"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.47",
							stopColor: "#fff",
							stopOpacity: "0.102"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.57",
							stopColor: "#fff",
							stopOpacity: "0.18"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.67",
							stopColor: "#fff",
							stopOpacity: "0.278"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.75",
							stopColor: "#fff",
							stopOpacity: "0.412"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.83",
							stopColor: "#fff",
							stopOpacity: "0.561"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.91",
							stopColor: "#fff",
							stopOpacity: "0.741"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.98",
							stopColor: "#fff",
							stopOpacity: "0.929"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "1",
							stopColor: "#fff"
						})
					]
				}),
				/* @__PURE__ */ z("clipPath", {
					id: "clip-elastic_icon",
					children: /* @__PURE__ */ z("rect", {
						width: "300",
						height: "225"
					})
				})
			] }), /* @__PURE__ */ B("g", {
				id: "elastic_icon",
				"data-name": "elastic icon",
				clipPath: "url(#clip-elastic_icon)",
				children: [
					/* @__PURE__ */ z("rect", {
						width: "300",
						height: "225",
						fill: "#fff"
					}),
					/* @__PURE__ */ B("g", {
						id: "Rectangle_278",
						"data-name": "Rectangle 278",
						transform: "translate(232 159)",
						fill: "#88c6c3",
						stroke: "#707070",
						strokeWidth: "1",
						opacity: "0.747",
						children: [/* @__PURE__ */ z("rect", {
							width: "54",
							height: "54",
							stroke: "none"
						}), /* @__PURE__ */ z("rect", {
							x: "0.5",
							y: "0.5",
							width: "53",
							height: "53",
							fill: "none"
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Rectangle_8",
						"data-name": "Rectangle 8",
						transform: "translate(7 148)",
						fill: "#88c6c3",
						stroke: "#707070",
						strokeWidth: "1",
						opacity: "0.747",
						children: [/* @__PURE__ */ z("rect", {
							width: "70",
							height: "70",
							stroke: "none"
						}), /* @__PURE__ */ z("rect", {
							x: "0.5",
							y: "0.5",
							width: "69",
							height: "69",
							fill: "none"
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Rectangle_258",
						"data-name": "Rectangle 258",
						transform: "translate(224 6)",
						fill: "#88c6c3",
						stroke: "#707070",
						strokeWidth: "1",
						opacity: "0.747",
						children: [/* @__PURE__ */ z("rect", {
							width: "70",
							height: "100",
							stroke: "none"
						}), /* @__PURE__ */ z("rect", {
							x: "0.5",
							y: "0.5",
							width: "69",
							height: "99",
							fill: "none"
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Rectangle_259",
						"data-name": "Rectangle 259",
						transform: "translate(71 64)",
						fill: "#88c6c3",
						stroke: "#707070",
						strokeWidth: "1",
						opacity: "0.747",
						children: [/* @__PURE__ */ z("rect", {
							width: "115",
							height: "75",
							stroke: "none"
						}), /* @__PURE__ */ z("rect", {
							x: "0.5",
							y: "0.5",
							width: "114",
							height: "74",
							fill: "none"
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Rectangle_260",
						"data-name": "Rectangle 260",
						transform: "translate(99 87)",
						fill: "#88c6c3",
						stroke: "#707070",
						strokeWidth: "1",
						opacity: "0.747",
						children: [/* @__PURE__ */ z("rect", {
							width: "115",
							height: "75",
							stroke: "none"
						}), /* @__PURE__ */ z("rect", {
							x: "0.5",
							y: "0.5",
							width: "114",
							height: "74",
							fill: "none"
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Group_689",
						"data-name": "Group 689",
						children: [
							/* @__PURE__ */ B("g", {
								id: "Group_687",
								"data-name": "Group 687",
								transform: "translate(0 3)",
								children: [/* @__PURE__ */ z("path", {
									id: "checkbox",
									d: "M258.766,37.316v146.5H39.053V37.316Zm40.07-39.254h-300v225h300Z",
									transform: "translate(1.164 -1.063)",
									fill: "#010101",
									fillRule: "evenodd",
									opacity: "0.246"
								}), /* @__PURE__ */ B("g", {
									id: "Path_821",
									"data-name": "Path 821",
									transform: "translate(40 36)",
									fill: "none",
									children: [/* @__PURE__ */ z("path", {
										d: "M0,0H220V147H0Z",
										stroke: "none"
									}), /* @__PURE__ */ z("path", {
										d: "M 2 2 L 2 145 L 218 145 L 218 2 L 172.9869689941406 2 L 2 2 M 0 0 L 172.9869689941406 0 L 220 0 L 220 147 L 0 147 L 0 0 Z",
										stroke: "none",
										fill: "#01579b"
									})]
								})]
							}),
							/* @__PURE__ */ B("g", {
								id: "Rectangle_257",
								"data-name": "Rectangle 257",
								transform: "translate(40 39)",
								fill: "#fff",
								stroke: "#01579b",
								strokeWidth: "2",
								children: [/* @__PURE__ */ z("rect", {
									width: "20",
									height: "147",
									stroke: "none"
								}), /* @__PURE__ */ z("rect", {
									x: "1",
									y: "1",
									width: "18",
									height: "145",
									fill: "none"
								})]
							}),
							/* @__PURE__ */ B("g", {
								id: "Group_688",
								"data-name": "Group 688",
								transform: "translate(-27.5 -126)",
								children: [/* @__PURE__ */ z("circle", {
									id: "teal_circle",
									"data-name": "teal circle",
									cx: "7.5",
									cy: "7.5",
									r: "7.5",
									transform: "translate(70 171)",
									fill: "#009688"
								}), /* @__PURE__ */ B("g", {
									id: "Group_333",
									"data-name": "Group 333",
									transform: "translate(70 171)",
									opacity: "0.12",
									children: [/* @__PURE__ */ z("path", {
										id: "gradient_border_2",
										"data-name": "gradient border 2",
										d: "M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",
										transform: "translate(-3403 -959)",
										fill: "url(#linear-gradient)"
									}), /* @__PURE__ */ z("path", {
										id: "gradient_border_1",
										"data-name": "gradient border 1",
										d: "M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",
										transform: "translate(-3403 -959)",
										fill: "url(#linear-gradient-2)"
									})]
								})]
							})
						]
					})
				]
			})]
		})
	});
}
//#endregion
//#region src/components/icons/WorkspaceTypeMosaicIcon.jsx
function xZ(e) {
	return /* @__PURE__ */ z(Ha, {
		...e,
		children: /* @__PURE__ */ B("svg", {
			xmlns: "http://www.w3.org/2000/svg",
			width: "120",
			height: "90",
			viewBox: "0 0 300 225",
			children: [/* @__PURE__ */ B("defs", { children: [
				/* @__PURE__ */ B("linearGradient", {
					id: "linear-gradient",
					x1: "0.5",
					y1: "1",
					x2: "0.5",
					gradientUnits: "objectBoundingBox",
					children: [
						/* @__PURE__ */ z("stop", { offset: "0" }),
						/* @__PURE__ */ z("stop", {
							offset: "0.14",
							stopOpacity: "0.631"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "1",
							stopOpacity: "0"
						})
					]
				}),
				/* @__PURE__ */ B("linearGradient", {
					id: "linear-gradient-2",
					x1: "0.5",
					y1: "1",
					x2: "0.5",
					gradientUnits: "objectBoundingBox",
					children: [
						/* @__PURE__ */ z("stop", {
							offset: "0",
							stopColor: "#fff",
							stopOpacity: "0"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.23",
							stopColor: "#fff",
							stopOpacity: "0.012"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.36",
							stopColor: "#fff",
							stopOpacity: "0.039"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.47",
							stopColor: "#fff",
							stopOpacity: "0.102"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.57",
							stopColor: "#fff",
							stopOpacity: "0.18"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.67",
							stopColor: "#fff",
							stopOpacity: "0.278"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.75",
							stopColor: "#fff",
							stopOpacity: "0.412"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.83",
							stopColor: "#fff",
							stopOpacity: "0.561"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.91",
							stopColor: "#fff",
							stopOpacity: "0.741"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "0.98",
							stopColor: "#fff",
							stopOpacity: "0.929"
						}),
						/* @__PURE__ */ z("stop", {
							offset: "1",
							stopColor: "#fff"
						})
					]
				}),
				/* @__PURE__ */ z("clipPath", {
					id: "clip-mosaic_icon",
					children: /* @__PURE__ */ z("rect", {
						width: "300",
						height: "225"
					})
				})
			] }), /* @__PURE__ */ B("g", {
				id: "mosaic_icon",
				"data-name": "mosaic icon",
				clipPath: "url(#clip-mosaic_icon)",
				children: [
					/* @__PURE__ */ z("rect", {
						width: "300",
						height: "225",
						fill: "#fff"
					}),
					/* @__PURE__ */ z("path", {
						id: "checkbox",
						d: "M258.766,37.316v146.5H39.053V37.316Zm40.07-39.254h-300v225h300Z",
						transform: "translate(1.163 1.938)",
						fill: "#010101",
						fillRule: "evenodd",
						opacity: "0.5"
					}),
					/* @__PURE__ */ z("path", {
						id: "checkbox-2",
						"data-name": "checkbox",
						d: "M258.766,37.316v146.5H39.053V37.316Zm40.07-39.254h-300v225h300Z",
						transform: "translate(1.164 1.938)",
						fill: "#010101",
						fillRule: "evenodd",
						opacity: "0.246"
					}),
					/* @__PURE__ */ B("g", {
						id: "Path_821",
						"data-name": "Path 821",
						transform: "translate(40 39)",
						fill: "none",
						children: [/* @__PURE__ */ z("path", {
							d: "M0,0H220V147H0Z",
							stroke: "none"
						}), /* @__PURE__ */ z("path", {
							d: "M 2 2 L 2 145 L 218 145 L 218 2 L 172.9869689941406 2 L 2 2 M 0 0 L 172.9869689941406 0 L 220 0 L 220 147 L 0 147 L 0 0 Z",
							stroke: "none",
							fill: "#01579b"
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Rectangle_257",
						"data-name": "Rectangle 257",
						transform: "translate(40 39)",
						fill: "#fff",
						stroke: "#01579b",
						strokeWidth: "2",
						children: [/* @__PURE__ */ z("rect", {
							width: "20",
							height: "147",
							stroke: "none"
						}), /* @__PURE__ */ z("rect", {
							x: "1",
							y: "1",
							width: "18",
							height: "145",
							fill: "none"
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Group_688",
						"data-name": "Group 688",
						transform: "translate(-27.5 -126)",
						children: [/* @__PURE__ */ z("circle", {
							id: "teal_circle",
							"data-name": "teal circle",
							cx: "7.5",
							cy: "7.5",
							r: "7.5",
							transform: "translate(70 171)",
							fill: "#009688"
						}), /* @__PURE__ */ B("g", {
							id: "Group_333",
							"data-name": "Group 333",
							transform: "translate(70 171)",
							opacity: "0.12",
							children: [/* @__PURE__ */ z("path", {
								id: "gradient_border_2",
								"data-name": "gradient border 2",
								d: "M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",
								transform: "translate(-3403 -959)",
								fill: "url(#linear-gradient)"
							}), /* @__PURE__ */ z("path", {
								id: "gradient_border_1",
								"data-name": "gradient border 1",
								d: "M3408,959.089A4.911,4.911,0,1,1,3403.09,964a4.911,4.911,0,0,1,4.911-4.911m0-.089a5,5,0,1,0,5,5,5,5,0,0,0-5-5Z",
								transform: "translate(-3403 -959)",
								fill: "url(#linear-gradient-2)"
							})]
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Rectangle_270",
						"data-name": "Rectangle 270",
						transform: "translate(60 40.647)",
						fill: "#88c6c3",
						stroke: "#707070",
						strokeWidth: "1",
						opacity: "0.747",
						children: [/* @__PURE__ */ z("rect", {
							width: "99",
							height: "72",
							stroke: "none"
						}), /* @__PURE__ */ z("rect", {
							x: "0.5",
							y: "0.5",
							width: "98",
							height: "71",
							fill: "none"
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Rectangle_271",
						"data-name": "Rectangle 271",
						transform: "translate(159 40.647)",
						fill: "#88c6c3",
						stroke: "#707070",
						strokeWidth: "1",
						opacity: "0.747",
						children: [/* @__PURE__ */ z("rect", {
							width: "99",
							height: "72",
							stroke: "none"
						}), /* @__PURE__ */ z("rect", {
							x: "0.5",
							y: "0.5",
							width: "98",
							height: "71",
							fill: "none"
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Rectangle_272",
						"data-name": "Rectangle 272",
						transform: "translate(192 112.647)",
						fill: "#88c6c3",
						stroke: "#707070",
						strokeWidth: "1",
						opacity: "0.747",
						children: [/* @__PURE__ */ z("rect", {
							width: "66",
							height: "71.45",
							stroke: "none"
						}), /* @__PURE__ */ z("rect", {
							x: "0.5",
							y: "0.5",
							width: "65",
							height: "70.45",
							fill: "none"
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Rectangle_284",
						"data-name": "Rectangle 284",
						transform: "translate(60 112.647)",
						fill: "#88c6c3",
						stroke: "#707070",
						strokeWidth: "1",
						opacity: "0.747",
						children: [/* @__PURE__ */ z("rect", {
							width: "66",
							height: "71.45",
							stroke: "none"
						}), /* @__PURE__ */ z("rect", {
							x: "0.5",
							y: "0.5",
							width: "65",
							height: "70.45",
							fill: "none"
						})]
					}),
					/* @__PURE__ */ B("g", {
						id: "Rectangle_285",
						"data-name": "Rectangle 285",
						transform: "translate(126 112.647)",
						fill: "#88c6c3",
						stroke: "#707070",
						strokeWidth: "1",
						opacity: "0.747",
						children: [/* @__PURE__ */ z("rect", {
							width: "66",
							height: "71.45",
							stroke: "none"
						}), /* @__PURE__ */ z("rect", {
							x: "0.5",
							y: "0.5",
							width: "65",
							height: "70.45",
							fill: "none"
						})]
					})
				]
			})]
		})
	});
}
//#endregion
//#region src/components/WorkspaceSelectionDialog.jsx
var SZ = H("div")(() => ({
	display: "flex",
	flexDirection: "column"
}));
function CZ({ container: e = null, handleClose: t, open: n = !1, children: r = null, updateWorkspace: i, workspaceType: a }) {
	let { t: o } = V(), s = Pi(), c = (e) => {
		i({ type: e }), t();
	};
	return /* @__PURE__ */ B(WY, {
		"aria-labelledby": s,
		container: e,
		onClose: t,
		open: n,
		children: [/* @__PURE__ */ z(mo, {
			id: s,
			children: o("workspaceSelectionTitle")
		}), /* @__PURE__ */ B(xJ, { children: [r, /* @__PURE__ */ B(so, {
			sx: {
				"&active": { outline: "none" },
				"&focus": { outline: "none" },
				outline: "none"
			},
			selected: a,
			autoFocusItem: !0,
			children: [/* @__PURE__ */ z(oo, {
				sx: {
					height: "auto",
					overflow: "auto",
					whiteSpace: "inherit"
				},
				onClick: () => c("elastic"),
				selected: a === "elastic",
				value: "elastic",
				children: /* @__PURE__ */ B(Ya, {
					sx: {
						backgroundColor: "transparent",
						borderRadius: "0",
						boxShadow: "0 0 transparent",
						display: "flex"
					},
					children: [/* @__PURE__ */ z(bZ, {
						sx: {
							flexShrink: 0,
							height: "90px",
							width: "120px"
						},
						viewBox: "0 0 120 90"
					}), /* @__PURE__ */ z(SZ, { children: /* @__PURE__ */ B(Xa, {
						sx: {
							"&.MuiCardContent-root": {
								"&:last-child": { paddingBottom: "12px" },
								paddingBottom: 0,
								paddingTop: 0,
								textAlign: "left"
							},
							flex: "1 0 auto"
						},
						children: [/* @__PURE__ */ z(lo, {
							sx: { paddingBottom: "6px" },
							component: "p",
							variant: "h3",
							children: o("elastic")
						}), /* @__PURE__ */ z(lo, {
							variant: "body1",
							children: o("elasticDescription")
						})]
					}) })]
				})
			}), /* @__PURE__ */ z(oo, {
				sx: {
					height: "auto",
					overflow: "auto",
					whiteSpace: "inherit"
				},
				onClick: () => c("mosaic"),
				selected: a === "mosaic",
				value: "mosaic",
				children: /* @__PURE__ */ B(Ya, {
					sx: {
						backgroundColor: "transparent",
						borderRadius: "0",
						boxShadow: "0 0 transparent",
						display: "flex"
					},
					children: [/* @__PURE__ */ z(xZ, {
						sx: {
							flexShrink: 0,
							height: "90px",
							width: "120px"
						},
						viewBox: "0 0 120 90"
					}), /* @__PURE__ */ z(SZ, { children: /* @__PURE__ */ B(Xa, {
						sx: {
							"&.MuiCardContent-root": {
								"&:last-child": { paddingBottom: "12px" },
								paddingBottom: 0,
								paddingTop: 0,
								textAlign: "left"
							},
							flex: "1 0 auto"
						},
						children: [/* @__PURE__ */ z(lo, {
							sx: { paddingBottom: "6px" },
							component: "p",
							variant: "h3",
							children: o("mosaic")
						}), /* @__PURE__ */ z(lo, {
							variant: "body1",
							children: o("mosaicDescription")
						})]
					}) })]
				})
			})]
		})] })]
	});
}
CZ.propTypes = {
	children: W.default.node,
	container: W.default.object,
	handleClose: W.default.func.isRequired,
	open: W.default.bool,
	updateWorkspace: W.default.func.isRequired,
	workspaceType: W.default.string.isRequired
};
var wZ = i(O((e) => ({ workspaceType: Oe(e) }), { updateWorkspace: Hs }), A("WorkspaceSelectionDialog"))(CZ), TZ = i(O((e) => ({
	selectedTheme: Gt(e).selectedTheme,
	themeIds: Ne(e)
}), (e, { windowId: t }) => ({ setSelectedTheme: (t) => e(Ds({ selectedTheme: t })) })), A("ChangeThemeDialog"))(KY);
//#endregion
//#region src/components/WorkspaceMenu.jsx
function EZ({ handleClose: e, showThemePicker: t = !1, isWorkspaceAddVisible: n = !1, tReady: r = !1, toggleZoomControls: i = () => {}, showZoomControls: a = !1, ...o }) {
	let { t: s } = V(), c = Ni(oi), [l, u] = zi(null), d = arguments[0], f = (t, n) => {
		u(t), e(n);
	}, p = () => {
		u(null);
	}, m = (t) => {
		i(!a), e(t);
	};
	return /* @__PURE__ */ B(Bi, { children: [
		/* @__PURE__ */ B(Ua, {
			container: c?.current,
			anchorOrigin: {
				horizontal: "right",
				vertical: "top"
			},
			transformOrigin: {
				horizontal: "left",
				vertical: "top"
			},
			onClose: e,
			...o,
			children: [
				/* @__PURE__ */ z(sa, {
					"aria-haspopup": "true",
					"aria-expanded": l === "workspaceSelection",
					disabled: n,
					onClick: (e) => {
						m(e);
					},
					"aria-owns": l === "toggleZoom" ? "toggle-zoom-menu" : void 0,
					children: /* @__PURE__ */ z(U, {
						variant: "body1",
						children: s(a ? "hideZoomControls" : "showZoomControls")
					})
				}),
				/* @__PURE__ */ z(sa, {
					"aria-haspopup": "true",
					onClick: (e) => {
						f("workspaceSelection", e);
					},
					"aria-owns": l === "workspaceSelection" ? "workspace-selection" : void 0,
					children: /* @__PURE__ */ z(U, {
						variant: "body1",
						children: s("selectWorkspaceMenu")
					})
				}),
				/* @__PURE__ */ z(xX, {
					label: s("language"),
					children: /* @__PURE__ */ z(yZ, { afterSelect: e })
				}),
				t && /* @__PURE__ */ z(sa, {
					"aria-haspopup": "true",
					onClick: (e) => {
						f("changeTheme", e);
					},
					"aria-owns": l === "changeTheme" ? "change-theme" : void 0,
					children: /* @__PURE__ */ z(U, {
						variant: "body1",
						children: s("changeTheme")
					})
				}),
				/* @__PURE__ */ z(Yr, {
					targetName: "WorkspaceMenu",
					...d
				})
			]
		}),
		l === "changeTheme" && /* @__PURE__ */ z(TZ, {
			container: c?.current,
			handleClose: p,
			open: l === "changeTheme"
		}),
		l === "workspaceSelection" && /* @__PURE__ */ z(wZ, {
			open: l === "workspaceSelection",
			container: c?.current,
			handleClose: p
		})
	] });
}
EZ.propTypes = {
	handleClose: W.default.func.isRequired,
	isWorkspaceAddVisible: W.default.bool,
	showThemePicker: W.default.bool,
	showZoomControls: W.default.bool,
	toggleZoomControls: W.default.func,
	tReady: W.default.bool
};
var DZ = i(O((e) => ({
	isWorkspaceAddVisible: se(e).isWorkspaceAddVisible,
	showThemePicker: Ne(e).length > 0,
	showZoomControls: jt(e)
}), { toggleZoomControls: Us }), A("WorkspaceMenu"))(EZ);
//#endregion
//#region src/components/WorkspaceMenuButton.jsx
function OZ() {
	let { t: e } = V(), [t, n] = zi(null), [r, i] = zi(!1), a = Pi();
	return /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(ii, {
		"aria-haspopup": "true",
		"aria-label": e("workspaceMenu"),
		"aria-owns": r ? a : void 0,
		selected: r,
		id: "menuBtn",
		onClick: (e) => {
			n(e.currentTarget), i(!0);
		},
		children: /* @__PURE__ */ z(vZ, {})
	}), /* @__PURE__ */ z(DZ, {
		anchorEl: t,
		id: a,
		handleClose: () => {
			n(null), i(!1);
		},
		open: r
	})] });
}
var kZ = i(A("WorkspaceMenuButton"))(OZ), AZ = N(/*#__PURE__*/ z("path", { d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }), "MoreHorizSharp"), jZ = N(/*#__PURE__*/ z("path", { d: "M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2M11 16l4-4-4-4v3H1v2h10z" }), "Input"), MZ = N(/*#__PURE__*/ z("path", { d: "M19 12v7H5v-7H3v9h18v-9zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z" }), "SaveAltSharp"), NZ = N(/*#__PURE__*/ z("path", { d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }), "Close"), PZ = /* @__PURE__ */ D(((e, t) => {
	t.exports = function() {
		var e = document.getSelection();
		if (!e.rangeCount) return function() {};
		for (var t = document.activeElement, n = [], r = 0; r < e.rangeCount; r++) n.push(e.getRangeAt(r));
		switch (t.tagName.toUpperCase()) {
			case "INPUT":
			case "TEXTAREA":
				t.blur();
				break;
			default: t = null;
		}
		return e.removeAllRanges(), function() {
			e.type === "Caret" && e.removeAllRanges(), e.rangeCount || n.forEach(function(t) {
				e.addRange(t);
			}), t && t.focus();
		};
	};
})), FZ = /* @__PURE__ */ k((/* @__PURE__ */ D(((e, t) => {
	var n = PZ(), r = {
		"text/plain": "Text",
		"text/html": "Url",
		default: "Text"
	}, i = "Copy to clipboard: #{key}, Enter";
	function a(e) {
		var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
		return e.replace(/#{\s*key\s*}/g, t);
	}
	function o(e, t) {
		var o, s, c, l, u, d, f = !1;
		t ||= {}, o = t.debug || !1;
		try {
			if (c = n(), l = document.createRange(), u = document.getSelection(), d = document.createElement("span"), d.textContent = e, d.ariaHidden = "true", d.style.all = "unset", d.style.position = "fixed", d.style.top = 0, d.style.clip = "rect(0, 0, 0, 0)", d.style.whiteSpace = "pre", d.style.webkitUserSelect = "text", d.style.MozUserSelect = "text", d.style.msUserSelect = "text", d.style.userSelect = "text", d.addEventListener("copy", function(n) {
				if (n.stopPropagation(), t.format) {
					if (n.preventDefault(), n.clipboardData === void 0) {
						o && console.warn("unable to use e.clipboardData"), o && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
						var i = r[t.format] || r.default;
						window.clipboardData.setData(i, e);
					} else n.clipboardData.clearData(), n.clipboardData.setData(t.format, e);
				}
				t.onCopy && (n.preventDefault(), t.onCopy(n.clipboardData));
			}), document.body.appendChild(d), l.selectNodeContents(d), u.addRange(l), !document.execCommand("copy")) throw Error("copy command was unsuccessful");
			f = !0;
		} catch (n) {
			o && console.error("unable to copy using execCommand: ", n), o && console.warn("trying IE specific stuff");
			try {
				window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), f = !0;
			} catch (n) {
				o && console.error("unable to copy using clipboardData: ", n), o && console.error("falling back to prompt"), s = a("message" in t ? t.message : i), window.prompt(s, e);
			}
		} finally {
			u && (typeof u.removeRange == "function" ? u.removeRange(l) : u.removeAllRanges()), d && document.body.removeChild(d), c();
		}
		return f;
	}
	t.exports = o;
})))(), 1);
function IZ({ children: e = null, container: t = null, id: n = void 0, open: r = !1, handleClose: i, exportableState: a }) {
	let { t: o } = V(), [s, c] = zi(!1), l = Pi(), u = Li(() => JSON.stringify(a, null, 2), [a]), d = I(() => {
		(0, FZ.default)(u), c(!0);
	}, [u, c]);
	return s ? /* @__PURE__ */ z(Co, {
		anchorOrigin: {
			horizontal: "center",
			vertical: "top"
		},
		open: !0,
		autoHideDuration: 6e3,
		onClose: i,
		message: o("exportCopied"),
		action: /* @__PURE__ */ z(ra, {
			size: "small",
			"aria-label": o("dismiss"),
			color: "inherit",
			onClick: i,
			children: /* @__PURE__ */ z(NZ, { fontSize: "small" })
		})
	}) : /* @__PURE__ */ B(WY, {
		"aria-labelledby": l,
		id: n,
		container: t,
		open: r,
		onClose: i,
		scroll: "paper",
		fullWidth: !0,
		maxWidth: "sm",
		children: [
			/* @__PURE__ */ z(mo, {
				id: l,
				children: o("downloadExport")
			}),
			/* @__PURE__ */ z(uo, { children: /* @__PURE__ */ B(fa, {
				slotProps: { heading: { component: "h4" } },
				elevation: 2,
				children: [/* @__PURE__ */ z(ma, {
					expandIcon: /* @__PURE__ */ z(_f, {}),
					children: /* @__PURE__ */ z(U, { children: o("viewWorkspaceConfiguration") })
				}), /* @__PURE__ */ B(pa, {
					sx: { overflow: "scroll" },
					children: [e, /* @__PURE__ */ z("pre", { children: u })]
				})]
			}) }),
			/* @__PURE__ */ B(fo, { children: [/* @__PURE__ */ z(va, {
				onClick: i,
				children: o("cancel")
			}), /* @__PURE__ */ z(va, {
				onClick: d,
				variant: "contained",
				color: "primary",
				children: o("copy")
			})] })
		]
	});
}
IZ.propTypes = {
	children: W.default.node,
	container: W.default.object,
	exportableState: W.default.object.isRequired,
	handleClose: W.default.func.isRequired,
	id: W.default.string,
	open: W.default.bool
};
var LZ = i(O((e) => ({ exportableState: Et(e) }), {}), A("WorkspaceExport"))(IZ);
//#endregion
//#region src/components/WorkspaceImport.jsx
function RZ({ addError: e, container: t = null, id: n = void 0, importConfig: r, classes: i = {}, handleClose: a, open: o = !1 }) {
	let { t: s } = V(), [c, l] = zi(""), u = Pi();
	return /* @__PURE__ */ B(WY, {
		"aria-labelledby": u,
		container: t,
		id: n,
		onClose: a,
		open: o,
		fullWidth: !0,
		maxWidth: "sm",
		children: [
			/* @__PURE__ */ z(mo, {
				id: u,
				children: s("importWorkspace")
			}),
			/* @__PURE__ */ z(xJ, { children: /* @__PURE__ */ z(co, {
				className: i.textField,
				id: "workspace-import-input",
				multiline: !0,
				onChange: (e) => {
					e.preventDefault(), l(e.target.value);
				},
				minRows: 15,
				variant: "filled",
				sx: {
					"& .MuiInputBase-input": { fontFamily: "monospace" },
					width: "100%"
				},
				helperText: s("importWorkspaceHint"),
				slotProps: { htmlInput: { autoFocus: "autofocus" } }
			}) }),
			/* @__PURE__ */ B($a, { children: [/* @__PURE__ */ z(va, {
				onClick: a,
				children: s("cancel")
			}), /* @__PURE__ */ z(va, {
				color: "primary",
				onClick: (t) => {
					try {
						r(JSON.parse(c)), a();
					} catch (t) {
						e(t.toString());
					}
				},
				variant: "contained",
				children: s("import")
			})] })
		]
	});
}
RZ.propTypes = {
	addError: W.default.func.isRequired,
	classes: W.default.objectOf(W.default.string),
	container: W.default.object,
	handleClose: W.default.func.isRequired,
	id: W.default.string,
	importConfig: W.default.func.isRequired,
	open: W.default.bool
};
var zZ = i(O(null, {
	addError: ks,
	importConfig: Os
}), A("WorkspaceImport"))(RZ);
//#endregion
//#region src/components/WorkspaceOptionsMenu.jsx
function BZ({ anchorEl: e = null, handleClose: t, open: n = !1, ...r }) {
	let { t: i } = V(), a = Ni(oi), [o, s] = zi(null), c = Pi(), l = Pi(), u = {
		anchorEl: e,
		container: a,
		handleClose: t,
		open: n,
		t: i,
		...r
	}, d = (e) => {
		s(e), t();
	}, f = () => {
		s(null);
	};
	return /* @__PURE__ */ B(Bi, { children: [
		/* @__PURE__ */ B(Ua, {
			id: "workspace-options-menu",
			container: a?.current,
			anchorEl: e,
			anchorOrigin: {
				horizontal: "right",
				vertical: "top"
			},
			transformOrigin: {
				horizontal: "left",
				vertical: "top"
			},
			open: n,
			onClose: t,
			children: [
				/* @__PURE__ */ B(sa, {
					"aria-haspopup": "true",
					onClick: () => {
						d("exportWorkspace");
					},
					"aria-owns": o === "exportWorkspace" ? c : void 0,
					children: [/* @__PURE__ */ z(Ia, { children: /* @__PURE__ */ z(MZ, {}) }), /* @__PURE__ */ z(U, {
						variant: "body1",
						children: i("downloadExportWorkspace")
					})]
				}),
				/* @__PURE__ */ B(sa, {
					"aria-haspopup": "true",
					onClick: () => {
						d("importWorkspace");
					},
					"aria-owns": o === "importWorkspace" ? l : void 0,
					children: [/* @__PURE__ */ z(Ia, { children: /* @__PURE__ */ z(jZ, {}) }), /* @__PURE__ */ z(U, {
						variant: "body1",
						children: i("importWorkspace")
					})]
				}),
				/* @__PURE__ */ z(Yr, {
					targetName: "WorkspaceOptionsMenu",
					...u
				})
			]
		}),
		o === "exportWorkspace" && /* @__PURE__ */ z(LZ, {
			id: c,
			open: o === "exportWorkspace",
			container: a?.current,
			handleClose: f
		}),
		o === "importWorkspace" && /* @__PURE__ */ z(zZ, {
			id: l,
			open: o === "importWorkspace",
			container: a?.current,
			handleClose: f
		})
	] });
}
BZ.propTypes = {
	anchorEl: W.default.object,
	handleClose: W.default.func.isRequired,
	open: W.default.bool
};
//#endregion
//#region src/containers/WorkspaceOptionsMenu.js
var VZ = BZ;
//#endregion
//#region src/components/WorkspaceOptionsButton.jsx
function HZ() {
	let { t: e } = V(), [t, n] = zi(null), [r, i] = zi(!1);
	return /* @__PURE__ */ B(Bi, { children: [/* @__PURE__ */ z(ii, {
		"aria-label": e("workspaceOptions"),
		onClick: (e) => {
			n(e.currentTarget), i(!0);
		},
		selected: r,
		children: /* @__PURE__ */ z(AZ, {})
	}), /* @__PURE__ */ z(VZ, {
		anchorEl: t,
		handleClose: () => {
			n(null), i(!1);
		},
		open: r
	})] });
}
var UZ = i(A("WorkspaceOptionsButton"))(HZ), WZ = i(O((e) => ({
	disabled: se(e).isWorkspaceAddVisible,
	windowCount: de(e).length
}), null), A("WindowListButton"))(HX);
//#endregion
//#region src/components/WorkspaceControlPanelButtons.jsx
function GZ({ ...e }) {
	return /* @__PURE__ */ B(Bi, { children: [
		/* @__PURE__ */ z(WZ, {}),
		/* @__PURE__ */ z(kZ, {}),
		/* @__PURE__ */ z(UZ, {}),
		/* @__PURE__ */ z(Iq, {}),
		/* @__PURE__ */ z(Yr, {
			targetName: "WorkspaceControlPanelButtons",
			...e
		})
	] });
}
var KZ = i(A("WorkspaceControlPanelButtons"))(GZ), qZ = A("Branding")(HY), JZ = H(Ra, {
	name: "WorkspaceControlPanel",
	slot: "root"
})(({ ownerState: e, theme: t }) => ({
	display: "flex",
	height: 64,
	padding: t.spacing(1),
	paddingBottom: 0,
	position: "relative",
	[t.breakpoints.up("sm")]: {
		height: "auto",
		width: e.variant === "wide" ? "auto" : 64
	},
	...e.variant === "wide" && { width: "auto" }
})), YZ = H(la, {
	name: "WorkspaceControlPanel",
	slot: "toolbar"
})(({ theme: e }) => ({
	display: "flex",
	flexGrow: 1,
	justifyContent: "space-between",
	[e.breakpoints.up("sm")]: {
		flexDirection: "column",
		justifyContent: "flex-start",
		minHeight: 0
	}
})), XZ = H("div", {
	name: "WorkspaceControlPanel",
	slot: "buttonArea"
})(({ theme: e }) => ({ [e.breakpoints.up("sm")]: {
	display: "flex",
	flexDirection: "column",
	gap: e.spacing(2),
	marginBottom: e.spacing(1),
	marginTop: e.spacing(1)
} })), ZZ = H(qZ, {
	name: "WorkspaceControlPanel",
	slot: "branding"
})(({ theme: e }) => ({
	[e.breakpoints.up("xs")]: { display: "none" },
	[e.breakpoints.up("sm")]: { display: "flex" }
}));
function QZ({ variant: e = "default", ...t }) {
	let { t: n } = V();
	return /* @__PURE__ */ B(JZ, {
		ownerState: {
			t: n,
			variant: e,
			...t
		},
		className: (0, G.default)(M("workspace-control-panel")),
		color: "default",
		enableColorOnDark: !0,
		position: "absolute",
		component: "nav",
		"aria-label": n("workspaceNavigation"),
		children: [/* @__PURE__ */ B(YZ, {
			disableGutters: !0,
			children: [/* @__PURE__ */ z(_Z, {}), /* @__PURE__ */ z(XZ, { children: /* @__PURE__ */ z(KZ, {}) })]
		}), /* @__PURE__ */ z(ZZ, { variant: e })]
	});
}
QZ.propTypes = { variant: W.default.oneOf(["default", "wide"]) };
var $Z = i(A("WorkspaceControlPanel"))(QZ), eQ = i(O((e) => ({
	allowNewWindows: Gt(e).workspace.allowNewWindows,
	maximizedWindowIds: Mn(e),
	windowIds: de(e),
	workspaceId: se(e).id,
	workspaceType: Oe(e)
}), { addWindow: Vr }), A("Workspace"))(oZ), tQ = i(O((e) => ({ catalog: be(e) }), {
	addResource: uc,
	setWorkspaceAddVisibility: Gs
}), A("WorkspaceAdd"))(fZ), nQ = A("BackgroundPluginArea")(BY), rQ = H("div", {
	name: "WorkspaceArea",
	slot: "root"
})(({ theme: e }) => ({
	background: Xi(e.palette.shades.light, .1),
	...e.applyStyles("dark", { background: Zi(e.palette.shades.light, .1) }),
	bottom: 0,
	display: "flex",
	flexDirection: "column",
	left: 0,
	position: "absolute",
	right: 0,
	top: 0,
	[e.breakpoints.up("sm")]: { flexDirection: "row" }
})), iQ = H("main", {
	name: "WorkspaceArea",
	slot: "viewer"
})(() => ({
	flexGrow: 1,
	position: "relative"
}));
function aQ({ areaRef: e = null, controlPanelVariant: t = void 0, isWorkspaceAddVisible: n = !1, isWorkspaceControlPanelVisible: r, lang: i = void 0 }) {
	let { t: a } = V(), o = arguments[0];
	return /* @__PURE__ */ B(rQ, {
		ownerState: o,
		children: [r && /* @__PURE__ */ z($Z, { variant: t }), /* @__PURE__ */ B(iQ, {
			className: M("viewer"),
			lang: i,
			"aria-label": a("workspace"),
			...e ? { ref: e } : {},
			children: [
				z(n ? tQ : eQ, {}),
				/* @__PURE__ */ z(gZ, {}),
				/* @__PURE__ */ z(nQ, {})
			]
		})]
	});
}
aQ.propTypes = {
	areaRef: W.default.shape({ current: W.default.instanceOf(Element) }),
	controlPanelVariant: W.default.string,
	isWorkspaceAddVisible: W.default.bool,
	isWorkspaceControlPanelVisible: W.default.bool.isRequired,
	lang: W.default.string
};
//#endregion
//#region src/containers/AudioViewer.js
var oQ = /* @__PURE__ */ me({ default: () => sQ }), sQ = i(O((e, { windowId: t }) => ({
	audioOptions: Gt(e).audioOptions,
	audioResources: Ft(e, { windowId: t }) || [],
	captions: zt(e, { windowId: t }) || [],
	canvasId: Mt(e, { windowId: t }).id
}), null), A("AudioViewer"))(zY), cQ = /* @__PURE__ */ me({ default: () => lQ }), lQ = i(O((e, { windowId: t }) => ({
	canvases: yn(e, { windowId: t }),
	viewingDirection: Xe(e, { windowId: t })
})), A("GalleryView"))(eX), uQ = /* @__PURE__ */ me({ default: () => dQ }), dQ = i(O((e, { windowId: t }) => {
	let n = gs(e, { windowId: t }), r = Pn(e), i = n.canvases.flatMap((e) => e.imageServiceIds);
	return {
		canvasWorld: n,
		drawAnnotations: Gt(e).window.forceDrawAnnotations || Xt(e, {
			content: "annotations",
			windowId: t
		}).length > 0 || Xt(e, {
			content: "search",
			windowId: t
		}).length > 0,
		infoResponses: i.map((e) => r[e]).filter((e) => e !== void 0 && e.isFetching === !1 && e.error === void 0),
		label: Dt(e, {
			canvasId: (Mt(e, { windowId: t }) || {}).id,
			windowId: t
		}),
		nonTiledImages: nn(e, { windowId: t }),
		osdConfig: Gt(e).osdConfig,
		viewerConfig: re(e, { windowId: t })
	};
}, { updateViewport: Ur }), A("OpenSeadragonViewer"))(AX), fQ = /* @__PURE__ */ me({ default: () => pQ }), pQ = i(O((e, { windowId: t }) => {
	let { collectionPath: n, manifestId: r } = b(e, { windowId: t }) || {};
	return {
		collectionPath: n,
		manifestId: r
	};
}, { showCollectionDialog: Hr }), A("SelectCollection"))(MX), mQ = /* @__PURE__ */ me({ default: () => hQ }), hQ = i(O((e, { windowId: t }) => ({
	textOptions: Gt(e).textOptions,
	textResources: Wt(e, { windowId: t }) || []
}), null), A("TextViewer"))(FX), gQ = /* @__PURE__ */ me({ default: () => _Q }), _Q = i(O((e, { windowId: t }) => ({
	captions: zt(e, { windowId: t }) || [],
	canvasId: Mt(e, { windowId: t }).id,
	videoOptions: Gt(e).videoOptions,
	videoResources: Ht(e, { windowId: t }) || []
}), null), A("VideoViewer"))(RX), vQ = /* @__PURE__ */ me({ default: () => yQ }), yQ = i(A("WindowViewer"))(WX), bQ = /* @__PURE__ */ me({ default: () => xQ }), xQ = i(O((e) => ({
	controlPanelVariant: se(e).isWorkspaceAddVisible || de(e).length > 0 ? void 0 : "wide",
	isWorkspaceAddVisible: se(e).isWorkspaceAddVisible,
	isWorkspaceControlPanelVisible: Gt(e).workspaceControlPanel.enabled,
	lang: Gt(e).language
})), A("WorkspaceArea"))(aQ), SQ = {
	...nR,
	...rR
};
//#endregion
export { UJ as AccessTokenSender, j as ActionTypes, ir as AnnotationFactory, Wn as AnnotationItem, Kn as AnnotationList, Un as AnnotationPage, Hn as AnnotationResource, Wc as AnnotationSettings, IY as AnnotationsOverlay, PM as App, jM as AppProviders, ug as AttributionPanel, zY as AudioViewer, BY as BackgroundPluginArea, uq as BookViewIcon, HY as Branding, AY as CanvasAnnotationDisplay, Ou as CanvasAnnotations, ht as CanvasGroupings, Kq as CanvasIndexIcon, Sf as CanvasInfo, bw as CanvasLayers, hs as CanvasWorld, KY as ChangeThemeDialog, vf as CollapsibleSection, EJ as CollectionDialog, Af as CollectionInfo, gJ as CompanionArea, ff as CompanionWindow, dJ as CompanionWindowFactory, Aw as CompanionWindowRegistry, mf as CompanionWindowSection, Gc as ConnectedAnnotationSettings, CX as ConnectedAnnotationsOverlay, MM as ConnectedAppProviders, dg as ConnectedAttributionPanel, sQ as ConnectedAudioViewer, nQ as ConnectedBackgroundPluginArea, qZ as ConnectedBranding, ku as ConnectedCanvasAnnotations, Cf as ConnectedCanvasInfo, xw as ConnectedCanvasLayers, TZ as ConnectedChangeThemeDialog, yf as ConnectedCollapsibleSection, DJ as ConnectedCollectionDialog, jf as ConnectedCollectionInfo, _J as ConnectedCompanionArea, pf as ConnectedCompanionWindow, fJ as ConnectedCompanionWindowFactory, Tw as ConnectedCustomPanel, uJ as ConnectedErrorContent, gZ as ConnectedErrorDialog, Iq as ConnectedFullScreenButton, lQ as ConnectedGalleryView, QY as ConnectedGalleryViewThumbnail, ZJ as ConnectedIIIFAuthentication, ei as ConnectedIIIFThumbnail, xf as ConnectedLabelValueMetadata, yZ as ConnectedLanguageSettings, Cw as ConnectedLayersPanel, Ef as ConnectedLocalePicker, cZ as ConnectedManifestForm, Of as ConnectedManifestInfo, lZ as ConnectedManifestListItem, fX as ConnectedManifestListItemError, Pf as ConnectedManifestRelatedLinks, BJ as ConnectedMinimalWindow, ii as ConnectedMiradorMenuButton, KX as ConnectedMosaicRenderPreview, dQ as ConnectedOpenSeadragonViewer, LJ as ConnectedPrimaryWindow, wu as ConnectedSanitizedHtml, xJ as ConnectedScrollIndicatedDialogContent, Lg as ConnectedSearchHit, Hg as ConnectedSearchPanel, Sg as ConnectedSearchPanelControls, vg as ConnectedSearchPanelNavigation, Bg as ConnectedSearchResults, pQ as ConnectedSelectCollection, Vf as ConnectedSidebarIndexItem, qf as ConnectedSidebarIndexList, rg as ConnectedSidebarIndexTableOfContents, Uf as ConnectedSidebarIndexThumbnail, hQ as ConnectedTextViewer, zc as ConnectedThumbnailCanvasGrouping, Vc as ConnectedThumbnailNavigation, _Q as ConnectedVideoViewer, di as ConnectedViewerInfo, _i as ConnectedViewerNavigation, cY as ConnectedWindow, YJ as ConnectedWindowAuthenticationBar, yi as ConnectedWindowCanvasNavigationControls, VX as ConnectedWindowList, WZ as ConnectedWindowListButton, rJ as ConnectedWindowSideBar, gf as ConnectedWindowSideBarAnnotationsPanel, tJ as ConnectedWindowSideBarButtons, og as ConnectedWindowSideBarCanvasPanel, kw as ConnectedWindowSideBarCollectionPanel, If as ConnectedWindowSideBarInfoPanel, sq as ConnectedWindowThumbnailSettings, Hq as ConnectedWindowTopBar, Cq as ConnectedWindowTopBarPluginArea, Eq as ConnectedWindowTopBarPluginMenu, Mq as ConnectedWindowTopBarTitle, vq as ConnectedWindowTopMenu, xq as ConnectedWindowTopMenuButton, hq as ConnectedWindowViewSettings, yQ as ConnectedWindowViewer, eQ as ConnectedWorkspace, tQ as ConnectedWorkspaceAdd, _Z as ConnectedWorkspaceAddButton, xQ as ConnectedWorkspaceArea, $Z as ConnectedWorkspaceControlPanel, KZ as ConnectedWorkspaceControlPanelButtons, rZ as ConnectedWorkspaceElastic, dY as ConnectedWorkspaceElasticWindow, LZ as ConnectedWorkspaceExport, zZ as ConnectedWorkspaceImport, DZ as ConnectedWorkspaceMenu, kZ as ConnectedWorkspaceMenuButton, nZ as ConnectedWorkspaceMosaic, UZ as ConnectedWorkspaceOptionsButton, VZ as ConnectedWorkspaceOptionsMenu, wZ as ConnectedWorkspaceSelectionDialog, vi as ConnectedZoomControls, ww as CustomPanel, Se as EMPTY_ARRAY, w as EMPTY_OBJECT, lJ as ErrorContent, qY as ErrorDialog, Fq as FullScreenButton, TM as FullScreenContext, eX as GalleryView, dq as GalleryViewIcon, ZY as GalleryViewThumbnail, XJ as IIIFAuthentication, aX as IIIFDropTarget, HJ as IIIFIFrameCommunication, Zr as IIIFThumbnail, sX as ImageFailureMessage, bf as LabelValueMetadata, lX as LanguageSettings, Sw as LayersPanel, Tf as LocalePicker, uX as ManifestForm, Df as ManifestInfo, _X as ManifestListItem, dX as ManifestListItemError, Nf as ManifestRelatedLinks, zJ as MinimalWindow, je as MiradorCanvas, VY as MiradorIcon, Ln as MiradorManifest, ri as MiradorMenuButton, eR as MiradorViewer, JX as MosaicLayout, vX as MosaicRenderPreview, xX as NestedMenu, WJ as NewBrowserWindow, wX as OSDReferences, wY as OpenSeadragonCanvasOverlay, AX as OpenSeadragonViewer, fe as PluginContext, Yr as PluginHook, Fw as PluginProvider, IJ as PrimaryWindow, mi as RestoreZoomIcon, Cu as SanitizedHtml, bJ as ScrollIndicatedDialogContent, Du as ScrollTo, Ig as SearchHit, Vg as SearchPanel, xg as SearchPanelControls, _g as SearchPanelNavigation, zg as SearchResults, MX as SelectCollection, Bf as SidebarIndexItem, Kf as SidebarIndexList, ng as SidebarIndexTableOfContents, Hf as SidebarIndexThumbnail, FX as TextViewer, Rc as ThumbnailCanvasGrouping, pn as ThumbnailFactory, Bc as ThumbnailNavigation, nq as ThumbnailNavigationBottomIcon, rq as ThumbnailNavigationRightIcon, Mg as TruncatedHit, RX as VideoViewer, gi as ViewerInfo, pi as ViewerNavigation, sY as Window, JJ as WindowAuthenticationBar, hi as WindowCanvasNavigationControls, zX as WindowList, HX as WindowListButton, Lq as WindowMaxIcon, Rq as WindowMinIcon, yq as WindowOptionsIcon, nJ as WindowSideBar, hf as WindowSideBarAnnotationsPanel, Xq as WindowSideBarButtons, ag as WindowSideBarCanvasPanel, Ow as WindowSideBarCollectionPanel, Ff as WindowSideBarInfoPanel, oq as WindowThumbnailSettings, Vq as WindowTopBar, Sq as WindowTopBarPluginArea, Tq as WindowTopBarPluginMenu, jq as WindowTopBarTitle, _q as WindowTopMenu, bq as WindowTopMenuButton, mq as WindowViewSettings, WX as WindowViewer, oZ as Workspace, fZ as WorkspaceAdd, hZ as WorkspaceAddButton, aQ as WorkspaceArea, oi as WorkspaceContext, QZ as WorkspaceControlPanel, GZ as WorkspaceControlPanelButtons, WY as WorkspaceDialog, mY as WorkspaceElastic, uY as WorkspaceElasticWindow, IZ as WorkspaceExport, RZ as WorkspaceImport, EZ as WorkspaceMenu, OZ as WorkspaceMenuButton, tZ as WorkspaceMosaic, HZ as WorkspaceOptionsButton, BZ as WorkspaceOptionsMenu, CZ as WorkspaceSelectionDialog, bZ as WorkspaceTypeElasticIcon, xZ as WorkspaceTypeMosaicIcon, fi as ZoomControls, yI as accessTokensReducer, Ys as addAuthenticationRequest, ys as addCompanionWindow, ks as addError, bs as addOrUpdateCompanionWindow, Nw as addPluginsToCompanionWindowsRegistry, uc as addResource, Vr as addWindow, XI as annotationsReducer, Ge as asArray, ZI as authReducer, tL as catalogReducer, LI as companionWindowsReducer, JI as configReducer, Mw as connectPluginsToStore, $L as createPluggableStore, QL as createStore, jw as createTargetToPluginMapping, M as cssNs, SQ as default, cr as deselectAnnotation, QI as elasticLayoutReducer, zI as errorsReducer, ws as expandNodes, Bs as fetchInfoResponse, Ps as fetchManifest, sc as fetchSearch, QM as filterValidPlugins, Lr as focusWindow, qo as getAccessTokens, At as getAllowedWindowViewTypes, gr as getAnnotationResourcesByMotivation, Jn as getAnnotationResourcesByMotivationForCanvas, Vn as getAnnotationResourcesDataForCanvas, Bn as getAnnotations, Jo as getAuth, Ko as getAuthProfiles, rn as getBestThumbnail, Sn as getCanvas, an as getCanvasDescription, mr as getCanvasForAnnotation, gn as getCanvasGrouping, Kt as getCanvasGroupings, Qe as getCanvasIndex, Dt as getCanvasLabel, Tr as getCanvasLayers, cn as getCanvasMetadata, yn as getCanvases, be as getCatalog, Le as getCompanionAreaVisibility, Fe as getCompanionWindow, rt as getCompanionWindowIdsForPosition, Qt as getCompanionWindowLocale, ke as getCompanionWindows, Xt as getCompanionWindowsForContent, $e as getCompanionWindowsForPosition, Gt as getConfig, nN as getConfigFromPlugins, Ut as getContainerId, Mt as getCurrentCanvas, gs as getCurrentCanvasWorld, Go as getDefaultSidebarVariant, Ae as getDestructuredMetadata, Ie as getElasticLayout, Uo as getExpandedNodeIds, Et as getExportableState, Pe as getFocusedWindowId, nt as getFullScreenEnabled, Lt as getIiifThumbnailOpts, kn as getLanguagesFromConfigWithCurrent, Zt as getLatestError, Dr as getLayers, Cr as getLayersForVisibleCanvases, yr as getLayersForWindow, gt as getLocale, et as getLocalizedSequenceTreeStructure, le as getManifest, He as getManifestAutocompleteService, mt as getManifestDescription, vt as getManifestError, Be as getManifestHomepage, Je as getManifestLocale, mn as getManifestLogo, Ke as getManifestMetadata, St as getManifestProviderName, bt as getManifestRelated, wt as getManifestRelatedContent, ot as getManifestRenderings, De as getManifestSearchService, Rt as getManifestSeeAlso, wn as getManifestStatus, sn as getManifestSummary, vn as getManifestThumbnail, Jt as getManifestTitle, kt as getManifestUrl, un as getManifestoInstance, ge as getManifests, Ho as getManuallyExpandedNodeIds, Mn as getMaximizedWindowsIds, xn as getMetadataLocales, Ze as getMiradorCanvasWrapper, lt as getMiradorManifestWrapper, $t as getNextCanvasGrouping, $n as getNextSearchId, Wo as getNodeIdToScrollTo, Gn as getPresentAnnotationsOnSelectedCanvases, Tn as getPreviousCanvasGrouping, Pt as getProviderLogo, tN as getReducersFromPlugins, Fn as getRequestsConfig, tn as getRequiredStatement, er as getResourceAnnotationForSearchHit, ur as getResourceAnnotationLabel, Dn as getRights, rN as getSagasFromPlugins, sr as getSearchAnnotationsForCompanionWindow, nr as getSearchAnnotationsForWindow, tr as getSearchForWindow, Yn as getSearchIsFetching, hr as getSearchNumTotal, vr as getSearchQuery, ar as getSelectedAnnotationId, Rn as getSelectedAnnotationsOnCanvases, Zn as getSelectedContentSearchAnnotationIds, it as getSequence, Re as getSequenceBehaviors, We as getSequenceTreeStructure, Xe as getSequenceViewingDirection, ct as getSequenceViewingHint, In as getSequences, jt as getShowZoomControlsConfig, Er as getSortedLayers, _r as getSortedSearchAnnotationsForCompanionWindow, qn as getSortedSearchHitsForCompanionWindow, Nn as getTheme, dt as getThemeDirection, Ne as getThemeIds, Vt as getThumbnailFactory, tt as getThumbnailNavigationPosition, jn as getThumbnailsConfig, re as getViewer, Ft as getVisibleCanvasAudioResources, zt as getVisibleCanvasCaptions, dn as getVisibleCanvasIds, nn as getVisibleCanvasNonTiledResources, Wt as getVisibleCanvasTextResources, Ht as getVisibleCanvasVideoResources, Tt as getVisibleCanvases, zo as getVisibleNodeIds, b as getWindow, ut as getWindowConfig, Me as getWindowDraggability, de as getWindowIds, ve as getWindowManifests, An as getWindowTitles, ft as getWindowViewType, S as getWindows, se as getWorkspace, Oe as getWorkspaceType, iX as handleDrop, zr as hideCollectionDialog, dr as hoverAnnotation, xu as htmlRules, Ts as importConfig, Os as importMiradorState, GI as infoResponsesReducer, Yt as isFocused, eL as layersReducer, WI as manifestsReducer, Fr as maximizeWindow, jr as minimizeWindow, ee as miradorSlice, nX as readImageMetadata, Qs as receiveAccessToken, $s as receiveAccessTokenFailure, rr as receiveAnnotation, Xn as receiveAnnotationFailure, Rs as receiveDegradedInfoResponse, Ls as receiveInfoResponse, zs as receiveInfoResponseFailure, Ms as receiveManifest, Ns as receiveManifestFailure, ic as receiveSearch, ac as receiveSearchFailure, Ss as removeCompanionWindow, As as removeError, Vs as removeInfoResponse, Fs as removeManifest, dc as removeResource, oc as removeSearch, Rr as removeWindow, Zs as requestAccessToken, lr as requestAnnotation, fr as requestCanvasAnnotations, Is as requestInfoResponse, js as requestManifest, rc as requestSearch, tc as resetAuthenticationState, ec as resolveAccessTokenRequest, Xs as resolveAuthenticationRequest, rL as rootReducer, ZL as rootSaga, $I as searchesReducer, Qn as selectAnnotation, at as selectCompanionWindowDimensions, Yo as selectCurrentAuthServices, On as selectInfoResponse, Pn as selectInfoResponses, Gr as setCanvas, Br as setCompanionAreaOpen, Es as setConfig, cc as setContentSearchCurrentAnnotation, Kr as setNextCanvas, Wr as setPreviousCanvas, Mr as setWindowThumbnailPosition, Ir as setWindowViewType, Gs as setWorkspaceAddVisibility, qs as setWorkspaceViewportDimensions, Ks as setWorkspaceViewportPosition, pe as settings, Hr as showCollectionDialog, zn as sortSearchAnnotationsByCanvasOrder, or as toggleAnnotationDisplay, Js as toggleDraggingEnabled, Cs as toggleNode, Nr as toggleWindowSideBar, Us as toggleZoomControls, xs as updateCompanionWindow, Ds as updateConfig, nc as updateElasticWindowLayout, lc as updateLayers, Ur as updateViewport, Pr as updateWindow, Hs as updateWorkspace, Ws as updateWorkspaceMosaicLayout, Wi as useTranslation, WM as validatePlugin, tR as viewer, YI as viewersReducer, UI as windowsReducer, A as withPlugins, Gi as withTranslation, HI as workspaceReducer };

//# sourceMappingURL=mirador.es.js.map