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.

1,439 lines (1,437 loc) 2.06 MB
var LF = Object.defineProperty; var kF = (e, t, n) => t in e ? LF(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var ct = (e, t, n) => kF(e, typeof t != "symbol" ? t + "" : t, n); import { jsx as b, jsxs as z, Fragment as dt } from "react/jsx-runtime"; import { createRoot as WF } from "react-dom/client"; import * as X from "react"; import J, { createContext as Zi, forwardRef as Tc, useContext as Qt, Component as xO, createElement as pr, PureComponent as Ny, useState as ot, useEffect as Ue, useMemo as Vt, useRef as ze, useCallback as it, cloneElement as So, Children as RO, createRef as IO, isValidElement as OO, useId as Ht, useInsertionEffect as FF, useLayoutEffect as PO, memo as zF, Suspense as My, lazy as Ri, Fragment as EE, useReducer as BF } from "react"; import vr from "@mui/material/Paper"; import { useTranslation as ye, initReactI18next as VF, I18nextProvider as HF } from "react-i18next"; import { useTranslation as Ome, withTranslation as Pme } from "react-i18next"; import { styled as ie, useThemeProps as jF, alpha as Qr, StyledEngineProvider as UF, ThemeProvider as qF, createTheme as GF, useTheme as KF, darken as ZF, lighten as $F } from "@mui/material/styles"; import be from "@mui/material/Typography"; import { createSvgIcon as Fe } from "@mui/material/utils"; import Il from "@mui/material/Badge"; import Ly from "@mui/material/IconButton"; import pi from "@mui/material/Tooltip"; import Sc from "@mui/material/Chip"; import ms from "@mui/material/MenuList"; import wn from "@mui/material/MenuItem"; import _i from "@mui/material/ListItemText"; import vs from "@mui/material/Toolbar"; import Cc, { flushSync as xc } from "react-dom"; import ky from "@mui/material/Accordion"; import Wy from "@mui/material/AccordionDetails"; import Fy from "@mui/material/AccordionSummary"; import YF from "@mui/material/InputLabel"; import AO from "@mui/material/FormControl"; import DO from "@mui/material/Select"; import Zt from "@mui/material/Button"; import mo from "@mui/material/Link"; import NO from "@mui/material/Tabs"; import Ol from "@mui/material/Tab"; import { useRtl as XF } from "@mui/system/RtlProvider"; import MO from "@mui/material/Collapse"; import { shouldForwardProp as LO } from "@mui/system/createStyled"; import QF from "@mui/material/Checkbox"; import { shouldForwardProp as JF } from "@mui/system"; import fn from "@mui/material/Skeleton"; import ez from "@mui/material/Autocomplete"; import tz from "@mui/material/CircularProgress"; import kO from "@mui/material/TextField"; import WO from "@mui/material/InputAdornment"; import Rc from "@mui/material/List"; import zy from "@mui/material/ListItem"; import FO from "@mui/material/ListItemButton"; import nz from "@mui/material/Input"; import rz from "@mui/material/Slider"; import Co from "@mui/material/ListItemIcon"; import { CacheProvider as iz } from "@emotion/react"; import ur from "@mui/material/SvgIcon"; import Ic from "@mui/material/AppBar"; import Oc from "@mui/material/ListSubheader"; import oz from "@mui/material/Popover"; import Pl from "@mui/material/FormControlLabel"; import Pc from "@mui/material/Menu"; import zO from "@mui/material/Drawer"; import az from "@mui/material/Slide"; import Ac from "@mui/material/Stack"; import sz from "@mui/material/Alert"; import { Dialog as By, DialogTitle as Vy, Typography as hi, Button as TE, Link as lz, Chip as SE, MenuList as Ql, MenuItem as ja, DialogActions as Hy, DialogContent as cz, ListItemIcon as uz, ListItemText as dz, DialogContentText as hz, Card as CE, CardContent as xE, TextField as fz } from "@mui/material"; import jy from "@mui/material/DialogContent"; import BO from "@mui/material/DialogActions"; import Dc from "@mui/material/DialogTitle"; import pz from "@mui/material/Snackbar"; import gz from "@mui/material/Dialog"; import mz from "@mui/material/Backdrop"; import { grey as vz } from "@mui/material/colors"; import Dt from "@mui/material/Grid"; import yz from "@mui/material/ButtonBase"; import bz from "@mui/material/Divider"; import wz from "@mui/material/GlobalStyles"; import VO from "@mui/material/Fab"; import _z from "@mui/material/useMediaQuery"; var tl = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function st(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } function HO(e) { if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e; var t = e.default; if (typeof t == "function") { var n = function r() { return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments); }; n.prototype = t.prototype; } else n = {}; return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) { var i = Object.getOwnPropertyDescriptor(e, r); Object.defineProperty(n, r, i.get ? i : { enumerable: !0, get: function() { return e[r]; } }); }), n; } var nl = { exports: {} }, fd = {}; /** * @license React * use-sync-external-store-with-selector.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var RE; function Ez() { if (RE) return fd; RE = 1; var e = J; function t(l, c) { return l === c && (l !== 0 || 1 / l === 1 / c) || l !== l && c !== c; } var n = typeof Object.is == "function" ? Object.is : t, r = e.useSyncExternalStore, i = e.useRef, o = e.useEffect, a = e.useMemo, s = e.useDebugValue; return fd.useSyncExternalStoreWithSelector = function(l, c, u, d, h) { var f = i(null); if (f.current === null) { var g = { hasValue: !1, value: null }; f.current = g; } else g = f.current; f = a( function() { function m(T) { if (!y) { if (y = !0, w = T, T = d(T), h !== void 0 && g.hasValue) { var C = g.value; if (h(C, T)) return _ = C; } return _ = T; } if (C = _, n(w, T)) return C; var R = d(T); return h !== void 0 && h(C, R) ? (w = T, C) : (w = T, _ = R); } var y = !1, w, _, S = u === void 0 ? null : u; return [ function() { return m(c()); }, S === null ? void 0 : function() { return m(S()); } ]; }, [c, u, d, h] ); var p = r(l, f[0], f[1]); return o( function() { g.hasValue = !0, g.value = p; }, [p] ), s(p), p; }, fd; } var pd = {}, IE; function Tz() { if (IE) return pd; IE = 1; var e = {}; /** * @license React * use-sync-external-store-with-selector.development.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ return e.NODE_ENV !== "production" && (function() { function t(c, u) { return c === u && (c !== 0 || 1 / c === 1 / u) || c !== c && u !== u; } typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); var n = J, r = typeof Object.is == "function" ? Object.is : t, i = n.useSyncExternalStore, o = n.useRef, a = n.useEffect, s = n.useMemo, l = n.useDebugValue; pd.useSyncExternalStoreWithSelector = function(c, u, d, h, f) { var g = o(null); if (g.current === null) { var p = { hasValue: !1, value: null }; g.current = p; } else p = g.current; g = s( function() { function y(C) { if (!w) { if (w = !0, _ = C, C = h(C), f !== void 0 && p.hasValue) { var R = p.value; if (f(R, C)) return S = R; } return S = C; } if (R = S, r(_, C)) return R; var O = h(C); return f !== void 0 && f(R, O) ? (_ = C, R) : (_ = C, S = O); } var w = !1, _, S, T = d === void 0 ? null : d; return [ function() { return y(u()); }, T === null ? void 0 : function() { return y(T()); } ]; }, [u, d, h, f] ); var m = i(c, g[0], g[1]); return a( function() { p.hasValue = !0, p.value = m; }, [m] ), l(m), m; }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); })(), pd; } var OE; function Sz() { if (OE) return nl.exports; OE = 1; var e = {}; return e.NODE_ENV === "production" ? nl.exports = Ez() : nl.exports = Tz(), nl.exports; } var Cz = Sz(), tr = {}, jO = /* @__PURE__ */ X.version.startsWith("19"), xz = /* @__PURE__ */ Symbol.for( jO ? "react.transitional.element" : "react.element" ), Rz = /* @__PURE__ */ Symbol.for("react.portal"), UO = /* @__PURE__ */ Symbol.for("react.fragment"), qO = /* @__PURE__ */ Symbol.for("react.strict_mode"), GO = /* @__PURE__ */ Symbol.for("react.profiler"), Uy = /* @__PURE__ */ Symbol.for("react.consumer"), qy = /* @__PURE__ */ Symbol.for("react.context"), Gy = /* @__PURE__ */ Symbol.for("react.forward_ref"), KO = /* @__PURE__ */ Symbol.for("react.suspense"), ZO = /* @__PURE__ */ Symbol.for( "react.suspense_list" ), Nc = /* @__PURE__ */ Symbol.for("react.memo"), $O = /* @__PURE__ */ Symbol.for("react.lazy"), Iz = /* @__PURE__ */ Symbol.for("react.offscreen"), Oz = /* @__PURE__ */ Symbol.for( "react.client.reference" ), Pz = Gy, Az = Nc; function Dz(e) { return typeof e == "string" || typeof e == "function" || e === UO || e === GO || e === qO || e === KO || e === ZO || e === Iz || typeof e == "object" && e !== null && (e.$$typeof === $O || e.$$typeof === Nc || e.$$typeof === qy || e.$$typeof === Uy || e.$$typeof === Gy || e.$$typeof === Oz || e.getModuleId !== void 0); } function Mv(e) { if (typeof e == "object" && e !== null) { const { $$typeof: t } = e; switch (t) { case xz: switch (e = e.type, e) { case UO: case GO: case qO: case KO: case ZO: return e; default: switch (e = e && e.$$typeof, e) { case qy: case Gy: case $O: case Nc: return e; case Uy: return e; default: return t; } } case Rz: return t; } } } function Nz(e) { return jO ? Mv(e) === Uy : Mv(e) === qy; } function Mz(e) { return Mv(e) === Nc; } function Ky(e) { typeof console < "u" && typeof console.error == "function" && console.error(e); try { throw new Error(e); } catch { } } function gd(e, t) { if (e) (t === "mapStateToProps" || t === "mapDispatchToProps") && (Object.prototype.hasOwnProperty.call(e, "dependsOnOwnProps") || Ky( `The selector for ${t} of connect did not specify a value for dependsOnOwnProps.` )); else throw new Error(`Unexpected value for ${t} in connect.`); } function Lz(e, t, n) { gd(e, "mapStateToProps"), gd(t, "mapDispatchToProps"), gd(n, "mergeProps"); } function kz(e, t, n, r, { areStatesEqual: i, areOwnPropsEqual: o, areStatePropsEqual: a }) { let s = !1, l, c, u, d, h; function f(w, _) { return l = w, c = _, u = e(l, c), d = t(r, c), h = n(u, d, c), s = !0, h; } function g() { return u = e(l, c), t.dependsOnOwnProps && (d = t(r, c)), h = n(u, d, c), h; } function p() { return e.dependsOnOwnProps && (u = e(l, c)), t.dependsOnOwnProps && (d = t(r, c)), h = n(u, d, c), h; } function m() { const w = e(l, c), _ = !a(w, u); return u = w, _ && (h = n(u, d, c)), h; } function y(w, _) { const S = !o(_, c), T = !i( w, l, _, c ); return l = w, c = _, S && T ? g() : S ? p() : T ? m() : h; } return function(_, S) { return s ? y(_, S) : f(_, S); }; } function Wz(e, { initMapStateToProps: t, initMapDispatchToProps: n, initMergeProps: r, ...i }) { const o = t(e, i), a = n(e, i), s = r(e, i); return tr.NODE_ENV !== "production" && Lz(o, a, s), kz(o, a, s, e, i); } function Fz(e, t) { const n = {}; for (const r in e) { const i = e[r]; typeof i == "function" && (n[r] = (...o) => t(i(...o))); } return n; } function zz(e) { if (typeof e != "object" || e === null) return !1; const t = Object.getPrototypeOf(e); if (t === null) return !0; let n = t; for (; Object.getPrototypeOf(n) !== null; ) n = Object.getPrototypeOf(n); return t === n; } function YO(e, t, n) { zz(e) || Ky( `${n}() in ${t} must return a plain object. Instead received ${e}.` ); } function Lv(e) { return function(n) { const r = e(n); function i() { return r; } return i.dependsOnOwnProps = !1, i; }; } function PE(e) { return e.dependsOnOwnProps ? !!e.dependsOnOwnProps : e.length !== 1; } function XO(e, t) { return function(r, { displayName: i }) { const o = function(s, l) { return o.dependsOnOwnProps ? o.mapToProps(s, l) : o.mapToProps(s, void 0); }; return o.dependsOnOwnProps = !0, o.mapToProps = function(s, l) { o.mapToProps = e, o.dependsOnOwnProps = PE(e); let c = o(s, l); return typeof c == "function" && (o.mapToProps = c, o.dependsOnOwnProps = PE(c), c = o(s, l)), tr.NODE_ENV !== "production" && YO(c, i, t), c; }, o; }; } function Zy(e, t) { return (n, r) => { throw new Error( `Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.` ); }; } function Bz(e) { return e && typeof e == "object" ? Lv( (t) => ( // @ts-ignore Fz(e, t) ) ) : e ? typeof e == "function" ? ( // @ts-ignore XO(e, "mapDispatchToProps") ) : Zy(e, "mapDispatchToProps") : Lv((t) => ({ dispatch: t })); } function Vz(e) { return e ? typeof e == "function" ? ( // @ts-ignore XO(e, "mapStateToProps") ) : Zy(e, "mapStateToProps") : Lv(() => ({})); } function Hz(e, t, n) { return { ...n, ...e, ...t }; } function jz(e) { return function(n, { displayName: r, areMergedPropsEqual: i }) { let o = !1, a; return function(l, c, u) { const d = e(l, c, u); return o ? i(d, a) || (a = d) : (o = !0, a = d, tr.NODE_ENV !== "production" && YO(a, r, "mergeProps")), a; }; }; } function Uz(e) { return e ? typeof e == "function" ? jz(e) : Zy(e, "mergeProps") : () => Hz; } function qz(e) { e(); } function Gz() { let e = null, t = null; return { clear() { e = null, t = null; }, notify() { qz(() => { let n = e; for (; n; ) n.callback(), n = n.next; }); }, get() { const n = []; let r = e; for (; r; ) n.push(r), r = r.next; return n; }, subscribe(n) { let r = !0; const i = t = { callback: n, next: null, prev: t }; return i.prev ? i.prev.next = i : e = i, function() { !r || e === null || (r = !1, i.next ? i.next.prev = i.prev : t = i.prev, i.prev ? i.prev.next = i.next : e = i.next); }; } }; } var AE = { notify() { }, get: () => [] }; function QO(e, t) { let n, r = AE, i = 0, o = !1; function a(p) { u(); const m = r.subscribe(p); let y = !1; return () => { y || (y = !0, m(), d()); }; } function s() { r.notify(); } function l() { g.onStateChange && g.onStateChange(); } function c() { return o; } function u() { i++, n || (n = t ? t.addNestedSub(l) : e.subscribe(l), r = Gz()); } function d() { i--, n && i === 0 && (n(), n = void 0, r.clear(), r = AE); } function h() { o || (o = !0, u()); } function f() { o && (o = !1, d()); } const g = { addNestedSub: a, notifyNestedSubs: s, handleChangeWrapper: l, isSubscribed: c, trySubscribe: h, tryUnsubscribe: f, getListeners: () => r }; return g; } var Kz = () => typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", Zz = /* @__PURE__ */ Kz(), $z = () => typeof navigator < "u" && navigator.product === "ReactNative", Yz = /* @__PURE__ */ $z(), Xz = () => Zz || Yz ? X.useLayoutEffect : X.useEffect, Jl = /* @__PURE__ */ Xz(); function DE(e, t) { return e === t ? e !== 0 || t !== 0 || 1 / e === 1 / t : e !== e && t !== t; } function md(e, t) { if (DE(e, t)) return !0; if (typeof e != "object" || e === null || typeof t != "object" || t === null) return !1; const n = Object.keys(e), r = Object.keys(t); if (n.length !== r.length) return !1; for (let i = 0; i < n.length; i++) if (!Object.prototype.hasOwnProperty.call(t, n[i]) || !DE(e[n[i]], t[n[i]])) return !1; return !0; } var Qz = { childContextTypes: !0, contextType: !0, contextTypes: !0, defaultProps: !0, displayName: !0, getDefaultProps: !0, getDerivedStateFromError: !0, getDerivedStateFromProps: !0, mixins: !0, propTypes: !0, type: !0 }, Jz = { name: !0, length: !0, prototype: !0, caller: !0, callee: !0, arguments: !0, arity: !0 }, eB = { $$typeof: !0, render: !0, defaultProps: !0, displayName: !0, propTypes: !0 }, JO = { $$typeof: !0, compare: !0, defaultProps: !0, displayName: !0, propTypes: !0, type: !0 }, tB = { [Pz]: eB, [Az]: JO }; function NE(e) { return Mz(e) ? JO : tB[e.$$typeof] || Qz; } var nB = Object.defineProperty, rB = Object.getOwnPropertyNames, ME = Object.getOwnPropertySymbols, iB = Object.getOwnPropertyDescriptor, oB = Object.getPrototypeOf, LE = Object.prototype; function kv(e, t) { if (typeof t != "string") { if (LE) { const o = oB(t); o && o !== LE && kv(e, o); } let n = rB(t); ME && (n = n.concat(ME(t))); const r = NE(e), i = NE(t); for (let o = 0; o < n.length; ++o) { const a = n[o]; if (!Jz[a] && !(i && i[a]) && !(r && r[a])) { const s = iB(t, a); try { nB(e, a, s); } catch { } } } } return e; } var vd = /* @__PURE__ */ Symbol.for("react-redux-context"), yd = typeof globalThis < "u" ? globalThis : ( /* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */ {} ); function aB() { if (!X.createContext) return {}; const e = yd[vd] ?? (yd[vd] = /* @__PURE__ */ new Map()); let t = e.get(X.createContext); return t || (t = X.createContext( null ), tr.NODE_ENV !== "production" && (t.displayName = "ReactRedux"), e.set(X.createContext, t)), t; } var Ua = /* @__PURE__ */ aB(), sB = [null, null], lB = (e) => { try { return JSON.stringify(e); } catch { return String(e); } }; function cB(e, t, n) { Jl(() => e(...t), n); } function uB(e, t, n, r, i, o) { e.current = r, n.current = !1, i.current && (i.current = null, o()); } function dB(e, t, n, r, i, o, a, s, l, c, u) { if (!e) return () => { }; let d = !1, h = null; const f = () => { if (d || !s.current) return; const p = t.getState(); let m, y; try { m = r( p, i.current ); } catch (w) { y = w, h = w; } y || (h = null), m === o.current ? a.current || c() : (o.current = m, l.current = m, a.current = !0, u()); }; return n.onStateChange = f, n.trySubscribe(), f(), () => { if (d = !0, n.tryUnsubscribe(), n.onStateChange = null, h) throw h; }; } function hB(e, t) { return e === t; } var kE = !1; function fB(e, t, n, { // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence. // @ts-ignore pure: r, areStatesEqual: i = hB, areOwnPropsEqual: o = md, areStatePropsEqual: a = md, areMergedPropsEqual: s = md, // use React's forwardRef to expose a ref of the wrapped component forwardRef: l = !1, // the context consumer to use context: c = Ua } = {}) { tr.NODE_ENV !== "production" && r !== void 0 && !kE && (kE = !0, Ky( 'The `pure` option has been removed. `connect` is now always a "pure/memoized" component' )); const u = c, d = Vz(e), h = Bz(t), f = Uz(n), g = !!e; return (m) => { if (tr.NODE_ENV !== "production" && !/* @__PURE__ */ Dz(m)) throw new Error( `You must pass a component to the function returned by connect. Instead received ${lB( m )}` ); const y = m.displayName || m.name || "Component", w = `Connect(${y})`, _ = { shouldHandleStateChanges: g, displayName: w, wrappedComponentName: y, WrappedComponent: m, // @ts-ignore initMapStateToProps: d, initMapDispatchToProps: h, initMergeProps: f, areStatesEqual: i, areStatePropsEqual: a, areOwnPropsEqual: o, areMergedPropsEqual: s }; function S(R) { const [O, A, M] = X.useMemo(() => { const { reactReduxForwardedRef: He, ...ee } = R; return [R.context, He, ee]; }, [R]), L = X.useMemo(() => { let He = u; if (O != null && O.Consumer && tr.NODE_ENV !== "production") { if (!/* @__PURE__ */ Nz( // @ts-ignore /* @__PURE__ */ X.createElement(O.Consumer, null) )) throw new Error( "You must pass a valid React context consumer as `props.context`" ); He = O; } return He; }, [O, u]), k = X.useContext(L), H = !!R.store && !!R.store.getState && !!R.store.dispatch, K = !!k && !!k.store; if (tr.NODE_ENV !== "production" && !H && !K) throw new Error( `Could not find "store" in the context of "${w}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${w} in connect options.` ); const ue = H ? R.store : k.store, oe = K ? k.getServerState : ue.getState, pe = X.useMemo(() => Wz(ue.dispatch, _), [ue]), [fe, Ee] = X.useMemo(() => { if (!g) return sB; const He = QO( ue, H ? void 0 : k.subscription ), ee = He.notifyNestedSubs.bind(He); return [He, ee]; }, [ue, H, k]), Ne = X.useMemo(() => H ? k : { ...k, subscription: fe }, [H, k, fe]), j = X.useRef(void 0), ne = X.useRef(M), Z = X.useRef(void 0), ve = X.useRef(!1), ae = X.useRef(!1), we = X.useRef( void 0 ); Jl(() => (ae.current = !0, () => { ae.current = !1; }), []); const _e = X.useMemo(() => () => Z.current && M === ne.current ? Z.current : pe(ue.getState(), M), [ue, M]), Oe = X.useMemo(() => (ee) => fe ? dB( g, ue, fe, // @ts-ignore pe, ne, j, ve, ae, Z, Ee, ee ) : () => { }, [fe]); cB(uB, [ ne, j, ve, M, Z, Ee ]); let Me; try { Me = X.useSyncExternalStore( // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing Oe, // TODO This is incredibly hacky. We've already processed the store update and calculated new child props, // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`. _e, oe ? () => pe(oe(), M) : _e ); } catch (He) { throw we.current && (He.message += ` The error may be correlated with this previous error: ${we.current.stack} `), He; } Jl(() => { we.current = void 0, Z.current = void 0, j.current = Me; }); const xe = X.useMemo(() => ( // @ts-ignore /* @__PURE__ */ X.createElement( m, { ...Me, ref: A } ) ), [A, m, Me]); return X.useMemo(() => g ? /* @__PURE__ */ X.createElement(L.Provider, { value: Ne }, xe) : xe, [L, xe, Ne]); } const C = X.memo(S); if (C.WrappedComponent = m, C.displayName = S.displayName = w, l) { const O = X.forwardRef( function(M, L) { return /* @__PURE__ */ X.createElement(C, { ...M, reactReduxForwardedRef: L }); } ); return O.displayName = w, O.WrappedComponent = m, /* @__PURE__ */ kv(O, m); } return /* @__PURE__ */ kv(C, m); }; } var me = fB; function pB(e) { const { children: t, context: n, serverState: r, store: i } = e, o = X.useMemo(() => { const l = QO(i), c = { store: i, subscription: l, getServerState: r ? () => r : void 0 }; if (tr.NODE_ENV === "production") return c; { const { identityFunctionCheck: u = "once", stabilityCheck: d = "once" } = e; return /* @__PURE__ */ Object.assign(c, { stabilityCheck: d, identityFunctionCheck: u }); } }, [i, r]), a = X.useMemo(() => i.getState(), [i]); Jl(() => { const { subscription: l } = o; return l.onStateChange = l.notifyNestedSubs, l.trySubscribe(), a !== i.getState() && l.notifyNestedSubs(), () => { l.tryUnsubscribe(), l.onStateChange = void 0; }; }, [o, a]); const s = n || Ua; return /* @__PURE__ */ X.createElement(s.Provider, { value: o }, t); } var eP = pB; function tP(e = Ua) { return function() { const n = X.useContext(e); if (tr.NODE_ENV !== "production" && !n) throw new Error( "could not find react-redux context value; please ensure the component is wrapped in a <Provider>" ); return n; }; } var gB = /* @__PURE__ */ tP(), mB = (e, t) => e === t; function vB(e = Ua) { const t = e === Ua ? gB : tP(e), n = (r, i = {}) => { const { equalityFn: o = mB } = typeof i == "function" ? { equalityFn: i } : i; if (tr.NODE_ENV !== "production") { if (!r) throw new Error("You must pass a selector to useSelector"); if (typeof r != "function") throw new Error("You must pass a function as a selector to useSelector"); if (typeof o != "function") throw new Error( "You must pass a function as an equality function to useSelector" ); } const a = t(), { store: s, subscription: l, getServerState: c } = a, u = X.useRef(!0), d = X.useCallback( { [r.name](f) { const g = r(f); if (tr.NODE_ENV !== "production") { const { devModeChecks: p = {} } = typeof i == "function" ? {} : i, { identityFunctionCheck: m, stabilityCheck: y } = a, { identityFunctionCheck: w, stabilityCheck: _ } = { stabilityCheck: y, identityFunctionCheck: m, ...p }; if (_ === "always" || _ === "once" && u.current) { const S = r(f); if (!o(g, S)) { let T; try { throw new Error(); } catch (C) { ({ stack: T } = C); } console.warn( "Selector " + (r.name || "unknown") + ` returned a different result when called with the same parameters. This can lead to unnecessary rerenders. Selectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization`, { state: f, selected: g, selected2: S, stack: T } ); } } if ((w === "always" || w === "once" && u.current) && g === f) { let S; try { throw new Error(); } catch (T) { ({ stack: S } = T); } console.warn( "Selector " + (r.name || "unknown") + ` returned the root state when called. This can lead to unnecessary rerenders. Selectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.`, { stack: S } ); } u.current && (u.current = !1); } return g; } }[r.name], [r] ), h = Cz.useSyncExternalStoreWithSelector( l.addNestedSub, s.getState, c || s.getState, d, o ); return X.useDebugValue(h), h; }; return Object.assign(n, { withTypes: () => n }), n; } var ys = /* @__PURE__ */ vB(), rl = { exports: {} }, il = { exports: {} }, bt = {}; /** @license React v16.13.1 * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var WE; function yB() { if (WE) return bt; WE = 1; var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, d = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, f = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, p = e ? Symbol.for("react.block") : 60121, m = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, w = e ? Symbol.for("react.scope") : 60119; function _(T) { if (typeof T == "object" && T !== null) { var C = T.$$typeof; switch (C) { case t: switch (T = T.type, T) { case l: case c: case r: case o: case i: case d: return T; default: switch (T = T && T.$$typeof, T) { case s: case u: case g: case f: case a: return T; default: return C; } } case n: return C; } } } function S(T) { return _(T) === c; } return bt.AsyncMode = l, bt.ConcurrentMode = c, bt.ContextConsumer = s, bt.ContextProvider = a, bt.Element = t, bt.ForwardRef = u, bt.Fragment = r, bt.Lazy = g, bt.Memo = f, bt.Portal = n, bt.Profiler = o, bt.StrictMode = i, bt.Suspense = d, bt.isAsyncMode = function(T) { return S(T) || _(T) === l; }, bt.isConcurrentMode = S, bt.isContextConsumer = function(T) { return _(T) === s; }, bt.isContextProvider = function(T) { return _(T) === a; }, bt.isElement = function(T) { return typeof T == "object" && T !== null && T.$$typeof === t; }, bt.isForwardRef = function(T) { return _(T) === u; }, bt.isFragment = function(T) { return _(T) === r; }, bt.isLazy = function(T) { return _(T) === g; }, bt.isMemo = function(T) { return _(T) === f; }, bt.isPortal = function(T) { return _(T) === n; }, bt.isProfiler = function(T) { return _(T) === o; }, bt.isStrictMode = function(T) { return _(T) === i; }, bt.isSuspense = function(T) { return _(T) === d; }, bt.isValidElementType = function(T) { return typeof T == "string" || typeof T == "function" || T === r || T === c || T === o || T === i || T === d || T === h || typeof T == "object" && T !== null && (T.$$typeof === g || T.$$typeof === f || T.$$typeof === a || T.$$typeof === s || T.$$typeof === u || T.$$typeof === m || T.$$typeof === y || T.$$typeof === w || T.$$typeof === p); }, bt.typeOf = _, bt; } var wt = {}, FE; function bB() { if (FE) return wt; FE = 1; var e = {}; /** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ return e.NODE_ENV !== "production" && (function() { var t = typeof Symbol == "function" && Symbol.for, n = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, i = t ? Symbol.for("react.fragment") : 60107, o = t ? Symbol.for("react.strict_mode") : 60108, a = t ? Symbol.for("react.profiler") : 60114, s = t ? Symbol.for("react.provider") : 60109, l = t ? Symbol.for("react.context") : 60110, c = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, h = t ? Symbol.for("react.suspense") : 60113, f = t ? Symbol.for("react.suspense_list") : 60120, g = t ? Symbol.for("react.memo") : 60115, p = t ? Symbol.for("react.lazy") : 60116, m = t ? Symbol.for("react.block") : 60121, y = t ? Symbol.for("react.fundamental") : 60117, w = t ? Symbol.for("react.responder") : 60118, _ = t ? Symbol.for("react.scope") : 60119; function S(ee) { return typeof ee == "string" || typeof ee == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. ee === i || ee === u || ee === a || ee === o || ee === h || ee === f || typeof ee == "object" && ee !== null && (ee.$$typeof === p || ee.$$typeof === g || ee.$$typeof === s || ee.$$typeof === l || ee.$$typeof === d || ee.$$typeof === y || ee.$$typeof === w || ee.$$typeof === _ || ee.$$typeof === m); } function T(ee) { if (typeof ee == "object" && ee !== null) { var at = ee.$$typeof; switch (at) { case n: var re = ee.type; switch (re) { case c: case u: case i: case a: case o: case h: return re; default: var se = re && re.$$typeof; switch (se) { case l: case d: case p: case g: case s: return se; default: return at; } } case r: return at; } } } var C = c, R = u, O = l, A = s, M = n, L = d, k = i, H = p, K = g, ue = r, oe = a, pe = o, fe = h, Ee = !1; function Ne(ee) { return Ee || (Ee = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), j(ee) || T(ee) === c; } function j(ee) { return T(ee) === u; } function ne(ee) { return T(ee) === l; } function Z(ee) { return T(ee) === s; } function ve(ee) { return typeof ee == "object" && ee !== null && ee.$$typeof === n; } function ae(ee) { return T(ee) === d; } function we(ee) { return T(ee) === i; } function _e(ee) { return T(ee) === p; } function Oe(ee) { return T(ee) === g; } function Me(ee) { return T(ee) === r; } function xe(ee) { return T(ee) === a; } function Be(ee) { return T(ee) === o; } function He(ee) { return T(ee) === h; } wt.AsyncMode = C, wt.ConcurrentMode = R, wt.ContextConsumer = O, wt.ContextProvider = A, wt.Element = M, wt.ForwardRef = L, wt.Fragment = k, wt.Lazy = H, wt.Memo = K, wt.Portal = ue, wt.Profiler = oe, wt.StrictMode = pe, wt.Suspense = fe, wt.isAsyncMode = Ne, wt.isConcurrentMode = j, wt.isContextConsumer = ne, wt.isContextProvider = Z, wt.isElement = ve, wt.isForwardRef = ae, wt.isFragment = we, wt.isLazy = _e, wt.isMemo = Oe, wt.isPortal = Me, wt.isProfiler = xe, wt.isStrictMode = Be, wt.isSuspense = He, wt.isValidElementType = S, wt.typeOf = T; })(), wt; } var zE; function nP() { if (zE) return il.exports; zE = 1; var e = {}; return e.NODE_ENV === "production" ? il.exports = yB() : il.exports = bB(), il.exports; } /* object-assign (c) Sindre Sorhus @license MIT */ var bd, BE; function wB() { if (BE) return bd; BE = 1; var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable; function r(o) { if (o == null) throw new TypeError("Object.assign cannot be called with null or undefined"); return Object(o); } function i() { try { if (!Object.assign) return !1; var o = new String("abc"); if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5") return !1; for (var a = {}, s = 0; s < 10; s++) a["_" + String.fromCharCode(s)] = s; var l = Object.getOwnPropertyNames(a).map(function(u) { return a[u]; }); if (l.join("") !== "0123456789") return !1; var c = {}; return "abcdefghijklmnopqrst".split("").forEach(function(u) { c[u] = u; }), Object.keys(Object.assign({}, c)).join("") === "abcdefghijklmnopqrst"; } catch { return !1; } } return bd = i() ? Object.assign : function(o, a) { for (var s, l = r(o), c, u = 1; u < arguments.length; u++) { s = Object(arguments[u]); for (var d in s) t.call(s, d) && (l[d] = s[d]); if (e) { c = e(s); for (var h = 0; h < c.length; h++) n.call(s, c[h]) && (l[c[h]] = s[c[h]]); } } return l; }, bd; } var wd, VE; function $y() { if (VE) return wd; VE = 1; var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; return wd = e, wd; } var _d, HE; function rP() { return HE || (HE = 1, _d = Function.call.bind(Object.prototype.hasOwnProperty)), _d; } var Ed, jE; function _B() { if (jE) return Ed; jE = 1; var e = {}, t = function() { }; if (e.NODE_ENV !== "production") { var n = /* @__PURE__ */ $y(), r = {}, i = /* @__PURE__ */ rP(); t = function(a) { var s = "Warning: " + a; typeof console < "u" && console.error(s); try { throw new Error(s); } catch { } }; } function o(a, s, l, c, u) { if (e.NODE_ENV !== "production") { for (var d in a) if (i(a, d)) { var h; try { if (typeof a[d] != "function") { var f = Error( (c || "React class") + ": " + l + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." ); throw f.name = "Invariant Violation", f; } h = a[d](s, d, c, l, null, n); } catch (p) { h = p; } if (h && !(h instanceof Error) && t( (c || "React class") + ": type specification of " + l + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." ), h instanceof Error && !(h.message in r)) { r[h.message] = !0; var g = u ? u() : ""; t( "Failed " + l + " type: " + h.message + (g ?? "") ); } } } } return o.resetWarningCache = function() { e.NODE_ENV !== "production" && (r = {}); }, Ed = o, Ed; } var Td, UE; function EB() { if (UE) return Td; UE = 1; var e = {}, t = nP(), n = wB(), r = /* @__PURE__ */ $y(), i = /* @__PURE__ */ rP(), o = /* @__PURE__ */ _B(), a = function() { }; e.NODE_ENV !== "production" && (a = function(l) { var c = "Warning: " + l; typeof console < "u" && console.error(c); try { throw new Error(c); } catch { } }); function s() { return null; } return Td = function(l, c) { var u = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator"; function h(j) { var ne = j && (u && j[u] || j[d]); if (typeof ne == "function") return ne; } var f = "<<anonymous>>", g = { array: w("array"), bigint: w("bigint"), bool: w("boolean"), func: w("function"), number: w("number"), object: w("object"), string: w("string"), symbol: w("symbol"), any: _(), arrayOf: S, element: T(), elementType: C(), instanceOf: R, node: L(), objectOf: A, oneOf: O, oneOfType: M, shape: H, exact: K }; function p(j, ne) { return j === ne ? j !== 0 || 1 / j === 1 / ne : j !== j && ne !== ne; } function m(j, ne) { this.message = j, this.data = ne && typeof ne == "object" ? ne : {}, this.stack = ""; } m.prototype = Error.prototype; function y(j) { if (e.NODE_ENV !== "production") var ne = {}, Z = 0; function ve(we, _e, Oe, Me, xe, Be, He) { if (Me = Me || f, Be = Be || Oe, He !== r) { if (c) { var ee = new Error( "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types" ); throw ee.name = "Invariant Violation", ee; } else if (e.NODE_ENV !== "production" && typeof console < "u") { var at = Me + ":" + Oe; !ne[at] && // Avoid spamming the console because they are often not actionable except for lib authors Z < 3 && (a( "You are manually calling a React.PropTypes validation function for the `" + Be + "` prop on `" + Me + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details." ), ne[at] = !0, Z++); } } return _e[Oe] == null ? we ? _e[Oe] === null ? new m("The " + xe + " `" + Be + "` is marked as required " + ("in `" + Me + "`, but its value is `null`.")) : new m("The " + xe + " `" + Be + "` is marked as required in " + ("`" + Me + "`, but its value is `undefined`.")) : null : j(_e, Oe, Me, xe, Be); } var ae = ve.bind(null, !1); return ae.isRequired = ve.bind(null, !0), ae; } function w(j) { function ne(Z, ve, ae, we, _e, Oe) { var Me = Z[ve], xe = pe(Me); if (xe !== j) { var Be = fe(Me); return new m( "Invalid " + we + " `" + _e + "` of type " + ("`" + Be + "` supplied to `" + ae + "`, expected ") + ("`" + j + "`."), { expectedType: j } ); } return null; } return y(ne); } function _() { return y(s); } function S(j) { function ne(Z, ve, ae, we, _e) { if (typeof j != "function") return new m("Property `" + _e + "` of component `" + ae + "` has invalid PropType notation inside arrayOf."); var Oe = Z[ve]; if (!Array.isArray(Oe)) { var Me = pe(Oe); return new m("Invalid " + we + " `" + _e + "` of type " + ("`" + Me + "` supplied to `" + ae + "`, expected an array.")); } for (var xe = 0; xe < Oe.length; xe++) { var Be = j(Oe, xe, ae, we, _e + "[" + xe + "]", r); if (Be instanceof Error) return Be; } return null; } return y(ne); } function T() { function j(ne, Z, ve, ae, we) { var _e = ne[Z]; if (!l(_e)) { var Oe = pe(_e); return new m("Invalid " + ae + " `" + we + "` of type " + ("`" + Oe + "` supplied to `" + ve + "`, expected a single ReactElement.")); } return null; } return y(j); } function C() { function j(ne, Z, ve, ae, we) { var _e = ne[Z]; if (!t.isValidElementType(_e)) { var Oe = pe(_e); return new m("Invalid " + ae + " `" + we + "` of type " + ("`" + Oe + "` supplied to `" + ve + "`, expected a single ReactElement type.")); } return null; } return y(j); } function R(j) { function ne(Z, ve, ae, we, _e) { if (!(Z[ve] instanceof j)) { var Oe = j.name || f, Me = Ne(Z[ve]); return new m("Invalid " + we + " `" + _e + "` of type " + ("`" + Me + "` supplied to `" + ae + "`, expected ") + ("instance of `" + Oe + "`.")); } return null; } return y(ne); } function O(j) { if (!Array.isArray(j)) return e.NODE_ENV !== "production" && (arguments.length > 1 ? a( "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])." ) : a("Invalid argument supplied to oneOf, expected an array.")), s; function ne(Z, ve, ae, we, _e) { for (var Oe = Z[ve], Me = 0; Me < j.length; Me++) if (p(Oe, j[Me])) return null; var xe = JSON.stringify(j, function(He, ee) { var at = fe(ee); return at === "symbol" ? String(ee) : ee; }); return new m("Invalid " + we + " `" + _e + "` of value `" + String(Oe) + "` " + ("supplied to `" + ae + "`, expected one of " + xe + ".")); } return y(ne); } function A(j) { function ne(Z, ve, ae, we, _e) { if (typeof j != "function") return new m("Property `" + _e + "` of component `" + ae + "` has invalid PropType notation inside objectOf."); var Oe = Z[ve], Me = pe(Oe); if (Me !== "object") return new m("Invalid " + we + " `" + _e + "` of type " + ("`" + Me + "` supplied to `" + ae + "`, expected an object.")); for (var xe in Oe) if (i(Oe, xe)) { var Be = j(Oe, xe, ae, we, _e + "." + xe, r); if (Be instanceof Error) return Be; } return null; } return y(ne); } function M(j) { if (!Array.isArray(j)) return e.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), s; for (var ne = 0; ne < j.length; ne++) { var Z = j[ne]; if (typeof Z != "function") return a( "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Ee(Z) + " at index " + ne + "." ), s; } function ve(ae, we, _e, Oe, Me) { for (var xe = [], Be = 0; Be < j.length; Be++) { var He = j[Be], ee = He(ae, we, _e, Oe, Me, r); if (ee == null) return null; ee.data && i(ee.data, "expectedType") && xe.push(ee.data.expectedType); } var at = xe.length > 0 ? ", expected one of type [" + xe.join(", ") + "]" : ""; return new m("Invalid " + Oe + " `" + Me + "` supplied to " + ("`" + _e + "`" + at + ".")); } return y(ve); } function L() { function j(ne, Z, ve, ae, we) { return ue(ne[Z]) ? null : new m("Invalid " + ae + " `" + we + "` supplied to " + ("`" + ve + "`, expected a ReactNode.")); } return y(j); } function k(j, ne, Z, ve, ae) { return new m( (j || "React class") + ": " + ne + " type `" + Z + "." + ve + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + ae + "`." ); } function H(j) { function ne(Z, ve, ae, we, _e) { var Oe = Z[ve], Me = pe(Oe); if (Me !== "object") return new m("Invalid " + we + " `" + _e + "` of type `" + Me + "` " + ("supplied to `" + ae + "`, expected `object`.")); for (var xe in j) { var Be = j[xe]; if (typeof Be != "function") return k(ae, we, _e, xe, fe(Be)); var He = Be(Oe, xe, ae, we, _e + "." + xe, r); if (He) return He; } return null; } return y(ne); } function K(j) { function ne(Z, ve, ae, we, _e) { var Oe = Z[ve], Me = pe(Oe); if (Me !== "object") return new m("Invalid " + we + " `" + _e + "` of type `" + Me + "` " + ("supplied to `" + ae + "`, expected `object`.")); var xe = n({}, Z[ve], j); for (var Be in xe) { var He = j[Be]; if (i(j, Be) && typeof He != "function") return k(ae, we, _e, Be, fe(He)); if (!He) return new m( "Invalid " + we + " `" + _e + "` key `" + Be + "` supplied to `" + ae + "`.\nBad object: " + JSON.stringify(Z[ve], null, " ") + ` Valid keys: ` + JSON.stringify(Object.keys(j), null, " ") ); var ee = He(Oe, Be, ae, we, _e + "." + Be, r); if (ee) return ee; } return null; } return y(ne); } function ue(j) { switch (typeof j) { case "number": case "string": case "undefined": return !0; case "boolean": return !j;