iwelp
Version:
A feedback component library
1,445 lines (1,444 loc) • 367 kB
JavaScript
import fe, { createElement as jn, forwardRef as Ve, useRef as Pe, useState as pe, useEffect as ce, createContext as yo, useContext as Dn, useCallback as bo } from "react";
function Bt(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var _t = { exports: {} }, ut = {};
var mr;
function xo() {
if (mr) return ut;
mr = 1;
var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), n = /* @__PURE__ */ Symbol.for("react.fragment");
function t(r, i, l) {
var o = null;
if (l !== void 0 && (o = "" + l), i.key !== void 0 && (o = "" + i.key), "key" in i) {
l = {};
for (var a in i)
a !== "key" && (l[a] = i[a]);
} else l = i;
return i = l.ref, {
$$typeof: e,
type: r,
key: o,
ref: i !== void 0 ? i : null,
props: l
};
}
return ut.Fragment = n, ut.jsx = t, ut.jsxs = t, ut;
}
var ct = {};
var gr;
function ko() {
return gr || (gr = 1, process.env.NODE_ENV !== "production" && (function() {
function e(x) {
if (x == null) return null;
if (typeof x == "function")
return x.$$typeof === $ ? null : x.displayName || x.name || null;
if (typeof x == "string") return x;
switch (x) {
case w:
return "Fragment";
case E:
return "Profiler";
case y:
return "StrictMode";
case C:
return "Suspense";
case q:
return "SuspenseList";
case v:
return "Activity";
}
if (typeof x == "object")
switch (typeof x.tag == "number" && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), x.$$typeof) {
case b:
return "Portal";
case I:
return x.displayName || "Context";
case k:
return (x._context.displayName || "Context") + ".Consumer";
case _:
var R = x.render;
return x = x.displayName, x || (x = R.displayName || R.name || "", x = x !== "" ? "ForwardRef(" + x + ")" : "ForwardRef"), x;
case H:
return R = x.displayName || null, R !== null ? R : e(x.type) || "Memo";
case M:
R = x._payload, x = x._init;
try {
return e(x(R));
} catch {
}
}
return null;
}
function n(x) {
return "" + x;
}
function t(x) {
try {
n(x);
var R = !1;
} catch {
R = !0;
}
if (R) {
R = console;
var m = R.error, z = typeof Symbol == "function" && Symbol.toStringTag && x[Symbol.toStringTag] || x.constructor.name || "Object";
return m.call(
R,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
z
), n(x);
}
}
function r(x) {
if (x === w) return "<>";
if (typeof x == "object" && x !== null && x.$$typeof === M)
return "<...>";
try {
var R = e(x);
return R ? "<" + R + ">" : "<...>";
} catch {
return "<...>";
}
}
function i() {
var x = L.A;
return x === null ? null : x.getOwner();
}
function l() {
return Error("react-stack-top-frame");
}
function o(x) {
if (B.call(x, "key")) {
var R = Object.getOwnPropertyDescriptor(x, "key").get;
if (R && R.isReactWarning) return !1;
}
return x.key !== void 0;
}
function a(x, R) {
function m() {
V || (V = !0, console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
R
));
}
m.isReactWarning = !0, Object.defineProperty(x, "key", {
get: m,
configurable: !0
});
}
function u() {
var x = e(this.type);
return W[x] || (W[x] = !0, console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
)), x = this.props.ref, x !== void 0 ? x : null;
}
function s(x, R, m, z, Y, N) {
var j = m.ref;
return x = {
$$typeof: g,
type: x,
key: R,
props: m,
_owner: z
}, (j !== void 0 ? j : null) !== null ? Object.defineProperty(x, "ref", {
enumerable: !1,
get: u
}) : Object.defineProperty(x, "ref", { enumerable: !1, value: null }), x._store = {}, Object.defineProperty(x._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
}), Object.defineProperty(x, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
}), Object.defineProperty(x, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: Y
}), Object.defineProperty(x, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: N
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
}
function f(x, R, m, z, Y, N) {
var j = R.children;
if (j !== void 0)
if (z)
if (F(j)) {
for (z = 0; z < j.length; z++)
c(j[z]);
Object.freeze && Object.freeze(j);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else c(j);
if (B.call(R, "key")) {
j = e(x);
var G = Object.keys(R).filter(function(X) {
return X !== "key";
});
z = 0 < G.length ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}", d[j + z] || (G = 0 < G.length ? "{" + G.join(": ..., ") + ": ...}" : "{}", console.error(
`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,
z,
j,
G,
j
), d[j + z] = !0);
}
if (j = null, m !== void 0 && (t(m), j = "" + m), o(R) && (t(R.key), j = "" + R.key), "key" in R) {
m = {};
for (var Q in R)
Q !== "key" && (m[Q] = R[Q]);
} else m = R;
return j && a(
m,
typeof x == "function" ? x.displayName || x.name || "Unknown" : x
), s(
x,
j,
m,
i(),
Y,
N
);
}
function c(x) {
h(x) ? x._store && (x._store.validated = 1) : typeof x == "object" && x !== null && x.$$typeof === M && (x._payload.status === "fulfilled" ? h(x._payload.value) && x._payload.value._store && (x._payload.value._store.validated = 1) : x._store && (x._store.validated = 1));
}
function h(x) {
return typeof x == "object" && x !== null && x.$$typeof === g;
}
var p = fe, g = /* @__PURE__ */ Symbol.for("react.transitional.element"), b = /* @__PURE__ */ Symbol.for("react.portal"), w = /* @__PURE__ */ Symbol.for("react.fragment"), y = /* @__PURE__ */ Symbol.for("react.strict_mode"), E = /* @__PURE__ */ Symbol.for("react.profiler"), k = /* @__PURE__ */ Symbol.for("react.consumer"), I = /* @__PURE__ */ Symbol.for("react.context"), _ = /* @__PURE__ */ Symbol.for("react.forward_ref"), C = /* @__PURE__ */ Symbol.for("react.suspense"), q = /* @__PURE__ */ Symbol.for("react.suspense_list"), H = /* @__PURE__ */ Symbol.for("react.memo"), M = /* @__PURE__ */ Symbol.for("react.lazy"), v = /* @__PURE__ */ Symbol.for("react.activity"), $ = /* @__PURE__ */ Symbol.for("react.client.reference"), L = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, B = Object.prototype.hasOwnProperty, F = Array.isArray, A = console.createTask ? console.createTask : function() {
return null;
};
p = {
react_stack_bottom_frame: function(x) {
return x();
}
};
var V, W = {}, ee = p.react_stack_bottom_frame.bind(
p,
l
)(), ue = A(r(l)), d = {};
ct.Fragment = w, ct.jsx = function(x, R, m) {
var z = 1e4 > L.recentlyCreatedOwnerStacks++;
return f(
x,
R,
m,
!1,
z ? Error("react-stack-top-frame") : ee,
z ? A(r(x)) : ue
);
}, ct.jsxs = function(x, R, m) {
var z = 1e4 > L.recentlyCreatedOwnerStacks++;
return f(
x,
R,
m,
!0,
z ? Error("react-stack-top-frame") : ee,
z ? A(r(x)) : ue
);
};
})()), ct;
}
var yr;
function wo() {
return yr || (yr = 1, process.env.NODE_ENV === "production" ? _t.exports = xo() : _t.exports = ko()), _t.exports;
}
var S = wo(), Tt = { exports: {} }, At = { exports: {} }, ie = {};
var br;
function vo() {
if (br) return ie;
br = 1;
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, l = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, o = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, a = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, u = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, s = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, f = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, c = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, h = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, p = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, g = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, b = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, w = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, y = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, E = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
function k(_) {
if (typeof _ == "object" && _ !== null) {
var C = _.$$typeof;
switch (C) {
case n:
switch (_ = _.type, _) {
case u:
case s:
case r:
case l:
case i:
case c:
return _;
default:
switch (_ = _ && _.$$typeof, _) {
case a:
case f:
case g:
case p:
case o:
return _;
default:
return C;
}
}
case t:
return C;
}
}
}
function I(_) {
return k(_) === s;
}
return ie.AsyncMode = u, ie.ConcurrentMode = s, ie.ContextConsumer = a, ie.ContextProvider = o, ie.Element = n, ie.ForwardRef = f, ie.Fragment = r, ie.Lazy = g, ie.Memo = p, ie.Portal = t, ie.Profiler = l, ie.StrictMode = i, ie.Suspense = c, ie.isAsyncMode = function(_) {
return I(_) || k(_) === u;
}, ie.isConcurrentMode = I, ie.isContextConsumer = function(_) {
return k(_) === a;
}, ie.isContextProvider = function(_) {
return k(_) === o;
}, ie.isElement = function(_) {
return typeof _ == "object" && _ !== null && _.$$typeof === n;
}, ie.isForwardRef = function(_) {
return k(_) === f;
}, ie.isFragment = function(_) {
return k(_) === r;
}, ie.isLazy = function(_) {
return k(_) === g;
}, ie.isMemo = function(_) {
return k(_) === p;
}, ie.isPortal = function(_) {
return k(_) === t;
}, ie.isProfiler = function(_) {
return k(_) === l;
}, ie.isStrictMode = function(_) {
return k(_) === i;
}, ie.isSuspense = function(_) {
return k(_) === c;
}, ie.isValidElementType = function(_) {
return typeof _ == "string" || typeof _ == "function" || _ === r || _ === s || _ === l || _ === i || _ === c || _ === h || typeof _ == "object" && _ !== null && (_.$$typeof === g || _.$$typeof === p || _.$$typeof === o || _.$$typeof === a || _.$$typeof === f || _.$$typeof === w || _.$$typeof === y || _.$$typeof === E || _.$$typeof === b);
}, ie.typeOf = k, ie;
}
var le = {};
var xr;
function Co() {
return xr || (xr = 1, process.env.NODE_ENV !== "production" && (function() {
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, l = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, o = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, a = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, u = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, s = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, f = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, c = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, h = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, p = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, g = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, b = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, w = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, y = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, E = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
function k(D) {
return typeof D == "string" || typeof D == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
D === r || D === s || D === l || D === i || D === c || D === h || typeof D == "object" && D !== null && (D.$$typeof === g || D.$$typeof === p || D.$$typeof === o || D.$$typeof === a || D.$$typeof === f || D.$$typeof === w || D.$$typeof === y || D.$$typeof === E || D.$$typeof === b);
}
function I(D) {
if (typeof D == "object" && D !== null) {
var Ee = D.$$typeof;
switch (Ee) {
case n:
var Ye = D.type;
switch (Ye) {
case u:
case s:
case r:
case l:
case i:
case c:
return Ye;
default:
var ot = Ye && Ye.$$typeof;
switch (ot) {
case a:
case f:
case g:
case p:
case o:
return ot;
default:
return Ee;
}
}
case t:
return Ee;
}
}
}
var _ = u, C = s, q = a, H = o, M = n, v = f, $ = r, L = g, B = p, F = t, A = l, V = i, W = c, ee = !1;
function ue(D) {
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.")), d(D) || I(D) === u;
}
function d(D) {
return I(D) === s;
}
function x(D) {
return I(D) === a;
}
function R(D) {
return I(D) === o;
}
function m(D) {
return typeof D == "object" && D !== null && D.$$typeof === n;
}
function z(D) {
return I(D) === f;
}
function Y(D) {
return I(D) === r;
}
function N(D) {
return I(D) === g;
}
function j(D) {
return I(D) === p;
}
function G(D) {
return I(D) === t;
}
function Q(D) {
return I(D) === l;
}
function X(D) {
return I(D) === i;
}
function de(D) {
return I(D) === c;
}
le.AsyncMode = _, le.ConcurrentMode = C, le.ContextConsumer = q, le.ContextProvider = H, le.Element = M, le.ForwardRef = v, le.Fragment = $, le.Lazy = L, le.Memo = B, le.Portal = F, le.Profiler = A, le.StrictMode = V, le.Suspense = W, le.isAsyncMode = ue, le.isConcurrentMode = d, le.isContextConsumer = x, le.isContextProvider = R, le.isElement = m, le.isForwardRef = z, le.isFragment = Y, le.isLazy = N, le.isMemo = j, le.isPortal = G, le.isProfiler = Q, le.isStrictMode = X, le.isSuspense = de, le.isValidElementType = k, le.typeOf = I;
})()), le;
}
var kr;
function Ai() {
return kr || (kr = 1, process.env.NODE_ENV === "production" ? At.exports = vo() : At.exports = Co()), At.exports;
}
var Gt, wr;
function So() {
if (wr) return Gt;
wr = 1;
var e = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
function r(l) {
if (l == null)
throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(l);
}
function i() {
try {
if (!Object.assign)
return !1;
var l = new String("abc");
if (l[5] = "de", Object.getOwnPropertyNames(l)[0] === "5")
return !1;
for (var o = {}, a = 0; a < 10; a++)
o["_" + String.fromCharCode(a)] = a;
var u = Object.getOwnPropertyNames(o).map(function(f) {
return o[f];
});
if (u.join("") !== "0123456789")
return !1;
var s = {};
return "abcdefghijklmnopqrst".split("").forEach(function(f) {
s[f] = f;
}), Object.keys(Object.assign({}, s)).join("") === "abcdefghijklmnopqrst";
} catch {
return !1;
}
}
return Gt = i() ? Object.assign : function(l, o) {
for (var a, u = r(l), s, f = 1; f < arguments.length; f++) {
a = Object(arguments[f]);
for (var c in a)
n.call(a, c) && (u[c] = a[c]);
if (e) {
s = e(a);
for (var h = 0; h < s.length; h++)
t.call(a, s[h]) && (u[s[h]] = a[s[h]]);
}
}
return u;
}, Gt;
}
var Kt, vr;
function Mn() {
if (vr) return Kt;
vr = 1;
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
return Kt = e, Kt;
}
var Xt, Cr;
function Ii() {
return Cr || (Cr = 1, Xt = Function.call.bind(Object.prototype.hasOwnProperty)), Xt;
}
var Jt, Sr;
function Eo() {
if (Sr) return Jt;
Sr = 1;
var e = function() {
};
if (process.env.NODE_ENV !== "production") {
var n = /* @__PURE__ */ Mn(), t = {}, r = /* @__PURE__ */ Ii();
e = function(l) {
var o = "Warning: " + l;
typeof console < "u" && console.error(o);
try {
throw new Error(o);
} catch {
}
};
}
function i(l, o, a, u, s) {
if (process.env.NODE_ENV !== "production") {
for (var f in l)
if (r(l, f)) {
var c;
try {
if (typeof l[f] != "function") {
var h = Error(
(u || "React class") + ": " + a + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
);
throw h.name = "Invariant Violation", h;
}
c = l[f](o, f, u, a, null, n);
} catch (g) {
c = g;
}
if (c && !(c instanceof Error) && e(
(u || "React class") + ": type specification of " + a + " `" + f + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof c + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
), c instanceof Error && !(c.message in t)) {
t[c.message] = !0;
var p = s ? s() : "";
e(
"Failed " + a + " type: " + c.message + (p ?? "")
);
}
}
}
}
return i.resetWarningCache = function() {
process.env.NODE_ENV !== "production" && (t = {});
}, Jt = i, Jt;
}
var Qt, Er;
function _o() {
if (Er) return Qt;
Er = 1;
var e = Ai(), n = So(), t = /* @__PURE__ */ Mn(), r = /* @__PURE__ */ Ii(), i = /* @__PURE__ */ Eo(), l = function() {
};
process.env.NODE_ENV !== "production" && (l = function(a) {
var u = "Warning: " + a;
typeof console < "u" && console.error(u);
try {
throw new Error(u);
} catch {
}
});
function o() {
return null;
}
return Qt = function(a, u) {
var s = typeof Symbol == "function" && Symbol.iterator, f = "@@iterator";
function c(d) {
var x = d && (s && d[s] || d[f]);
if (typeof x == "function")
return x;
}
var h = "<<anonymous>>", p = {
array: y("array"),
bigint: y("bigint"),
bool: y("boolean"),
func: y("function"),
number: y("number"),
object: y("object"),
string: y("string"),
symbol: y("symbol"),
any: E(),
arrayOf: k,
element: I(),
elementType: _(),
instanceOf: C,
node: v(),
objectOf: H,
oneOf: q,
oneOfType: M,
shape: L,
exact: B
};
function g(d, x) {
return d === x ? d !== 0 || 1 / d === 1 / x : d !== d && x !== x;
}
function b(d, x) {
this.message = d, this.data = x && typeof x == "object" ? x : {}, this.stack = "";
}
b.prototype = Error.prototype;
function w(d) {
if (process.env.NODE_ENV !== "production")
var x = {}, R = 0;
function m(Y, N, j, G, Q, X, de) {
if (G = G || h, X = X || j, de !== t) {
if (u) {
var D = 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 D.name = "Invariant Violation", D;
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
var Ee = G + ":" + j;
!x[Ee] && // Avoid spamming the console because they are often not actionable except for lib authors
R < 3 && (l(
"You are manually calling a React.PropTypes validation function for the `" + X + "` prop on `" + G + "`. 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."
), x[Ee] = !0, R++);
}
}
return N[j] == null ? Y ? N[j] === null ? new b("The " + Q + " `" + X + "` is marked as required " + ("in `" + G + "`, but its value is `null`.")) : new b("The " + Q + " `" + X + "` is marked as required in " + ("`" + G + "`, but its value is `undefined`.")) : null : d(N, j, G, Q, X);
}
var z = m.bind(null, !1);
return z.isRequired = m.bind(null, !0), z;
}
function y(d) {
function x(R, m, z, Y, N, j) {
var G = R[m], Q = V(G);
if (Q !== d) {
var X = W(G);
return new b(
"Invalid " + Y + " `" + N + "` of type " + ("`" + X + "` supplied to `" + z + "`, expected ") + ("`" + d + "`."),
{ expectedType: d }
);
}
return null;
}
return w(x);
}
function E() {
return w(o);
}
function k(d) {
function x(R, m, z, Y, N) {
if (typeof d != "function")
return new b("Property `" + N + "` of component `" + z + "` has invalid PropType notation inside arrayOf.");
var j = R[m];
if (!Array.isArray(j)) {
var G = V(j);
return new b("Invalid " + Y + " `" + N + "` of type " + ("`" + G + "` supplied to `" + z + "`, expected an array."));
}
for (var Q = 0; Q < j.length; Q++) {
var X = d(j, Q, z, Y, N + "[" + Q + "]", t);
if (X instanceof Error)
return X;
}
return null;
}
return w(x);
}
function I() {
function d(x, R, m, z, Y) {
var N = x[R];
if (!a(N)) {
var j = V(N);
return new b("Invalid " + z + " `" + Y + "` of type " + ("`" + j + "` supplied to `" + m + "`, expected a single ReactElement."));
}
return null;
}
return w(d);
}
function _() {
function d(x, R, m, z, Y) {
var N = x[R];
if (!e.isValidElementType(N)) {
var j = V(N);
return new b("Invalid " + z + " `" + Y + "` of type " + ("`" + j + "` supplied to `" + m + "`, expected a single ReactElement type."));
}
return null;
}
return w(d);
}
function C(d) {
function x(R, m, z, Y, N) {
if (!(R[m] instanceof d)) {
var j = d.name || h, G = ue(R[m]);
return new b("Invalid " + Y + " `" + N + "` of type " + ("`" + G + "` supplied to `" + z + "`, expected ") + ("instance of `" + j + "`."));
}
return null;
}
return w(x);
}
function q(d) {
if (!Array.isArray(d))
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? l(
"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])."
) : l("Invalid argument supplied to oneOf, expected an array.")), o;
function x(R, m, z, Y, N) {
for (var j = R[m], G = 0; G < d.length; G++)
if (g(j, d[G]))
return null;
var Q = JSON.stringify(d, function(de, D) {
var Ee = W(D);
return Ee === "symbol" ? String(D) : D;
});
return new b("Invalid " + Y + " `" + N + "` of value `" + String(j) + "` " + ("supplied to `" + z + "`, expected one of " + Q + "."));
}
return w(x);
}
function H(d) {
function x(R, m, z, Y, N) {
if (typeof d != "function")
return new b("Property `" + N + "` of component `" + z + "` has invalid PropType notation inside objectOf.");
var j = R[m], G = V(j);
if (G !== "object")
return new b("Invalid " + Y + " `" + N + "` of type " + ("`" + G + "` supplied to `" + z + "`, expected an object."));
for (var Q in j)
if (r(j, Q)) {
var X = d(j, Q, z, Y, N + "." + Q, t);
if (X instanceof Error)
return X;
}
return null;
}
return w(x);
}
function M(d) {
if (!Array.isArray(d))
return process.env.NODE_ENV !== "production" && l("Invalid argument supplied to oneOfType, expected an instance of array."), o;
for (var x = 0; x < d.length; x++) {
var R = d[x];
if (typeof R != "function")
return l(
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ee(R) + " at index " + x + "."
), o;
}
function m(z, Y, N, j, G) {
for (var Q = [], X = 0; X < d.length; X++) {
var de = d[X], D = de(z, Y, N, j, G, t);
if (D == null)
return null;
D.data && r(D.data, "expectedType") && Q.push(D.data.expectedType);
}
var Ee = Q.length > 0 ? ", expected one of type [" + Q.join(", ") + "]" : "";
return new b("Invalid " + j + " `" + G + "` supplied to " + ("`" + N + "`" + Ee + "."));
}
return w(m);
}
function v() {
function d(x, R, m, z, Y) {
return F(x[R]) ? null : new b("Invalid " + z + " `" + Y + "` supplied to " + ("`" + m + "`, expected a ReactNode."));
}
return w(d);
}
function $(d, x, R, m, z) {
return new b(
(d || "React class") + ": " + x + " type `" + R + "." + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + z + "`."
);
}
function L(d) {
function x(R, m, z, Y, N) {
var j = R[m], G = V(j);
if (G !== "object")
return new b("Invalid " + Y + " `" + N + "` of type `" + G + "` " + ("supplied to `" + z + "`, expected `object`."));
for (var Q in d) {
var X = d[Q];
if (typeof X != "function")
return $(z, Y, N, Q, W(X));
var de = X(j, Q, z, Y, N + "." + Q, t);
if (de)
return de;
}
return null;
}
return w(x);
}
function B(d) {
function x(R, m, z, Y, N) {
var j = R[m], G = V(j);
if (G !== "object")
return new b("Invalid " + Y + " `" + N + "` of type `" + G + "` " + ("supplied to `" + z + "`, expected `object`."));
var Q = n({}, R[m], d);
for (var X in Q) {
var de = d[X];
if (r(d, X) && typeof de != "function")
return $(z, Y, N, X, W(de));
if (!de)
return new b(
"Invalid " + Y + " `" + N + "` key `" + X + "` supplied to `" + z + "`.\nBad object: " + JSON.stringify(R[m], null, " ") + `
Valid keys: ` + JSON.stringify(Object.keys(d), null, " ")
);
var D = de(j, X, z, Y, N + "." + X, t);
if (D)
return D;
}
return null;
}
return w(x);
}
function F(d) {
switch (typeof d) {
case "number":
case "string":
case "undefined":
return !0;
case "boolean":
return !d;
case "object":
if (Array.isArray(d))
return d.every(F);
if (d === null || a(d))
return !0;
var x = c(d);
if (x) {
var R = x.call(d), m;
if (x !== d.entries) {
for (; !(m = R.next()).done; )
if (!F(m.value))
return !1;
} else
for (; !(m = R.next()).done; ) {
var z = m.value;
if (z && !F(z[1]))
return !1;
}
} else
return !1;
return !0;
default:
return !1;
}
}
function A(d, x) {
return d === "symbol" ? !0 : x ? x["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && x instanceof Symbol : !1;
}
function V(d) {
var x = typeof d;
return Array.isArray(d) ? "array" : d instanceof RegExp ? "object" : A(x, d) ? "symbol" : x;
}
function W(d) {
if (typeof d > "u" || d === null)
return "" + d;
var x = V(d);
if (x === "object") {
if (d instanceof Date)
return "date";
if (d instanceof RegExp)
return "regexp";
}
return x;
}
function ee(d) {
var x = W(d);
switch (x) {
case "array":
case "object":
return "an " + x;
case "boolean":
case "date":
case "regexp":
return "a " + x;
default:
return x;
}
}
function ue(d) {
return !d.constructor || !d.constructor.name ? h : d.constructor.name;
}
return p.checkPropTypes = i, p.resetWarningCache = i.resetWarningCache, p.PropTypes = p, p;
}, Qt;
}
var Zt, _r;
function To() {
if (_r) return Zt;
_r = 1;
var e = /* @__PURE__ */ Mn();
function n() {
}
function t() {
}
return t.resetWarningCache = n, Zt = function() {
function r(o, a, u, s, f, c) {
if (c !== e) {
var h = 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 h.name = "Invariant Violation", h;
}
}
r.isRequired = r;
function i() {
return r;
}
var l = {
array: r,
bigint: r,
bool: r,
func: r,
number: r,
object: r,
string: r,
symbol: r,
any: r,
arrayOf: i,
element: r,
elementType: r,
instanceOf: i,
node: r,
objectOf: i,
oneOf: i,
oneOfType: i,
shape: i,
exact: i,
checkPropTypes: t,
resetWarningCache: n
};
return l.PropTypes = l, l;
}, Zt;
}
var Tr;
function Ao() {
if (Tr) return Tt.exports;
if (Tr = 1, process.env.NODE_ENV !== "production") {
var e = Ai(), n = !0;
Tt.exports = /* @__PURE__ */ _o()(e.isElement, n);
} else
Tt.exports = /* @__PURE__ */ To()();
return Tt.exports;
}
var Io = /* @__PURE__ */ Ao();
const me = /* @__PURE__ */ Bt(Io);
var en = { exports: {} };
var Ar;
function Po() {
return Ar || (Ar = 1, (function(e) {
(function() {
var n = {}.hasOwnProperty;
function t() {
for (var l = "", o = 0; o < arguments.length; o++) {
var a = arguments[o];
a && (l = i(l, r(a)));
}
return l;
}
function r(l) {
if (typeof l == "string" || typeof l == "number")
return l;
if (typeof l != "object")
return "";
if (Array.isArray(l))
return t.apply(null, l);
if (l.toString !== Object.prototype.toString && !l.toString.toString().includes("[native code]"))
return l.toString();
var o = "";
for (var a in l)
n.call(l, a) && l[a] && (o = i(o, a));
return o;
}
function i(l, o) {
return o ? l ? l + " " + o : l + o : l;
}
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
})();
})(en)), en.exports;
}
var Ro = Po();
const re = /* @__PURE__ */ Bt(Ro), Lo = ({
prefix: e = "",
className: n,
viewBox: t = "0 0 24 24",
ariaHidden: r = !0,
children: i,
...l
}) => /* @__PURE__ */ S.jsx(
"svg",
{
viewBox: t,
focusable: "false",
width: "24",
height: "24",
...l,
"aria-hidden": r,
className: `${e}svg-icon${n ? ` ${n}` : ""}`,
children: i
}
), Oo = (e) => {
const {
prefix: n = "",
viewBox: t = "0 0 24 24",
paths: r,
className: i,
modifier: l,
ariaHidden: o = !0,
...a
} = e, u = re(i, l && `${n}svg-icon--${l}`);
return r ? /* @__PURE__ */ S.jsx(
Lo,
{
viewBox: t,
prefix: n,
...a,
className: u,
ariaHidden: o,
children: r().map((s, f) => fe.cloneElement(s, { key: f }))
}
) : null;
};
var $o = Oo, Ue = $o;
const zo = [{ tag: "path", att: { d: "M11.9999 15.0002c-1.3965 0-2.5725-.9551-2.9056-2.2492l-1.9368.4985c.555 2.1563 2.5112 3.7507 4.8424 3.7507 2.3312 0 4.2874-1.5944 4.8424-3.7507l-1.9369-.4985c-.3331 1.2941-1.509 2.2492-2.9055 2.2492zM11 9.5c0 .8284-.6716 1.5-1.5 1.5S8 10.3284 8 9.5 8.6716 8 9.5 8s1.5.6716 1.5 1.5zm3.5 1.5c.8284 0 1.5-.6716 1.5-1.5S15.3284 8 14.5 8 13 8.6716 13 9.5s.6716 1.5 1.5 1.5z" } }, { tag: "path", att: { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M21 12c0 4.9706-4.0294 9-9 9s-9-4.0294-9-9 4.0294-9 9-9 9 4.0294 9 9zm-2 0c0 3.866-3.134 7-7 7s-7-3.134-7-7 3.134-7 7-7 7 3.134 7 7z" } }];
function Fo(e) {
return e.replace(/-([a-z])/g, (n, t) => t.toUpperCase());
}
function No(e) {
return Object.entries(e).reduce((n, [t, r]) => (n[Fo(t)] = r, n), {});
}
function ge(e) {
if (e)
return e.map(
(n) => jn(n.tag, No(n.att), ge(n.nds))
);
}
var Pi = () => ge(zo);
const Bn = ({
position: e = "rightCenter",
bgcolor: n = "#FFD700",
style: t,
className: r,
onClick: i
}) => /* @__PURE__ */ S.jsx(S.Fragment, {
// <div
// onClick={onClick}
// className={styles.WelpButton + " " + styles[position] + " " + className}
// style={{
// ...style,
// backgroundColor: bgcolor
// }}
// >
// <SSRIcon prefix="iwelp-" className={styles.WelpIcon} paths={FeedbackHappyIcon} />
// <div className={styles.WelpText}>
// <span>Feedback</span>
// </div>
// </div>
children: /* @__PURE__ */ S.jsx(
"div",
{
onClick: i,
className: `iwelp-Content iwelp-${e} ` + r,
style: {
...t,
"--backgroundColor": n
},
children: /* @__PURE__ */ S.jsx("div", { className: "iwelp-Text", children: "Feedback" })
}
)
});
Bn.propTypes = {
position: me.oneOf(["leftCenter", "rightCenter", "topLeft", "topRight", "bottomLeft", "bottomRight"]),
bgcolor: me.string,
style: me.object,
className: me.string,
onClick: me.func.isRequired
};
Bn.displayName = "iWelpButton";
const jo = "100ms", Ri = [{ tag: "path", att: { d: "M11.0036 14.2509h2v-6h-2v6zm1 1.5c-.6904 0-1.25.5596-1.25 1.25 0 .6903.5596 1.25 1.25 1.25.6903 0 1.25-.5597 1.25-1.25 0-.6904-.5597-1.25-1.25-1.25z" } }, { tag: "path", att: { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "m1.1152 20.5351 10-19h1.7699l10 19-.8849 1.4658h-20l-.885-1.4658zm2.5413-.5342h16.6873l-8.3436-15.853-8.3437 15.853z" } }];
var Do = () => ge(Ri);
const Mo = [
"primary",
"emphasised",
"secondary",
"tertiary"
], Li = Ve(
(e, n) => {
const {
href: t = "",
newWindow: r = !1,
loadingSrText: i = "Loading…",
ssrIcon: l,
iconOnly: o = !1,
prefix: a = "",
htmlType: u = "button",
disabled: s = !1,
className: f = "",
onClick: c,
text: h = "",
type: p = "secondary",
expanding: g = !1,
loading: b = !1,
iconPosition: w = "leading",
fluid: y = !1,
inverseTheme: E = !1,
children: k,
expandedOnTouchDevice: I = !1,
size: _ = "medium",
staticColour: C = !1,
...q
} = e, H = (W) => {
if (s || b || W.key !== " ")
return;
W.target.click();
};
let M = p || "secondary";
o && l && (M = `icon-${M}`), E && p !== "danger" && p !== "plain" && p !== "image-overlay" && Mo.indexOf(p) > -1 && (M = `${M}-inverse`);
const v = re(`${a}btn__inner`), $ = `${a}btn__icon`, L = p === "danger" ? Do : l, B = L ? /* @__PURE__ */ S.jsx(Ue, { className: $, prefix: a, paths: L }) : null, F = re(
`${a}btn`,
b && `${a}btn--loading`,
_ !== "medium" && `${a}btn--${_}`,
!o && L && w && `${a}${w}-icon`,
p && `${a}btn--${M}`,
y && !o && `${a}btn--fluid`,
g && `${a}btn--expanding`,
g && I && `${a}btn--touch-device-expanded`,
C && `${a}btn--static-colour`,
f
), A = (W) => {
if (b || s) {
W.stopPropagation();
return;
}
c && typeof c == "function" && c(W);
}, V = /* @__PURE__ */ S.jsxs("span", { className: v, children: [
B,
h && /* @__PURE__ */ S.jsx("span", { className: `${a}btn__label`, children: h }) || null,
!b && k || null,
b && /* @__PURE__ */ S.jsx("span", { className: `${a}btn__loader`, children: i }) || null
] });
return t ? /* @__PURE__ */ S.jsx(
"a",
{
ref: n,
className: F,
"aria-disabled": b ? !0 : void 0,
onClick: A,
onKeyUp: H,
href: s ? void 0 : t,
target: r ? "_blank" : void 0,
rel: r ? "noreferrer" : void 0,
...q,
children: V
}
) : /* @__PURE__ */ S.jsx(
"button",
{
ref: n,
className: F,
disabled: s,
type: u,
onClick: A,
...q,
children: V
}
);
}
);
Li.displayName = "Button";
var Bo = Li, kt = Bo;
const qo = [{ tag: "path", att: { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "m12 13.4139 4.9497 4.9498 1.4142-1.4142-4.9497-4.9498L18.3639 7.05l-1.4142-1.4143L12 10.5855 7.0502 5.6357 5.636 7.05l4.9497 4.9497-4.9497 4.9498 1.4142 1.4142L12 13.4139z" } }];
var Ho = () => ge(qo);
const Vo = [{ tag: "path", att: { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "m3.999 11.9997 8 8.0011 1.4143-1.4141-5.5859-5.5866H20v-2H7.8273l5.5871-5.5868-1.4142-1.4143-8.0012 8.0007z" } }];
var Uo = () => ge(Vo);
const Wo = (e) => {
const {
title: n = "",
titleId: t = "",
prefix: r = "",
className: i = "",
closeBtnClick: l,
ariaCloseTxt: o = "Close",
backBtnClick: a,
ariaBackBtnTxt: u = "Back",
floating: s = !1,
children: f,
...c
} = e, h = re(
`${r}modal-header__title-wrapper`,
!a && `${r}modal-header__title-wrapper--padded`
), p = re(
`${r}modal-header`,
s && `${r}modal-header--floating-header`,
i
);
return /* @__PURE__ */ S.jsxs("div", { className: p, ...c, children: [
/* @__PURE__ */ S.jsx(
kt,
{
prefix: r,
type: "primary",
inverseTheme: !0,
staticColour: !0,
size: "small",
iconOnly: !0,
ssrIcon: Ho,
onClick: l,
className: `${r}modal-header__close`,
"aria-label": o
}
),
!s && (n || f) && /* @__PURE__ */ S.jsxs("div", { className: h, children: [
n && /* @__PURE__ */ S.jsx("h2", { id: t, className: `${r}modal-header__title`, children: n }),
f
] }),
a && /* @__PURE__ */ S.jsx(
kt,
{
prefix: r,
type: "primary",
inverseTheme: !0,
staticColour: !0,
size: "small",
iconOnly: !0,
ssrIcon: Uo,
onClick: a,
className: `${r}modal-header__back-button`,
"aria-label": u
}
)
] });
}, Yo = (e) => {
const { prefix: n = "", children: t, className: r = "", ...i } = e;
return /* @__PURE__ */ S.jsx("div", { ...i, className: re(`${n}modal-body`, r), children: t });
}, Go = (e) => e ? !!!e.querySelectorAll("*[data-autofocus],*[autofocus]").length : !1, Ko = () => {
const e = Pe(null), [n, t] = pe(
void 0
);
return ce(() => {
if (e.current) {
const r = e.current;
t(Go(r));
}
}, []), [n, e];
};
var Xo = Ko;
const Jo = (e) => {
const {
className: n = "",
fullSize: t = !1,
prefix: r = "",
children: i,
open: l = !1,
closeBtnClick: o,
header: a,
alignment: u = "right",
preserveAlignment: s = !1,
footer: f,
size: c = "small",
describedById: h,
labelledById: p,
ariaLabel: g,
...b
} = e, w = re(
`${r}sheets`,
`${r}sheets--${c}`,
t && `${r}sheets--mobile-full-size`,
u === "left" && `${r}sheets--mirrored`,
s && `${r}sheets--preserve-alignment`,
l ? `${r}sheets--enter` : `${r}sheets--close`,
n
), y = a ? fe.cloneElement(a, { closeBtnClick: o, prefix: r }) : null, E = f && fe.cloneElement(f, {
prefix: r,
closeBtnClick: o,
stacked: c === "small" ? f.props.stacked : !1
}) || null, k = fe.Children.map(
i,
(C) => fe.isValidElement(C) ? fe.cloneElement(C, { prefix: r }) : C
), [I, _] = Xo();
return /* @__PURE__ */ S.jsxs(
"div",
{
"aria-describedby": h,
"aria-labelledby": p,
"aria-label": g,
...b,
className: w,
"aria-modal": "true",
role: "dialog",
tabIndex: -1,
children: [
I !== void 0 && y,
/* @__PURE__ */ S.jsx(
"div",
{
className: `${r}sheets__content-wrapper`,
role: "document",
tabIndex: 0,
ref: _,
"data-autofocus": I,
children: k
}
),
E
]
}
);
}, je = {
Enable: "skapa-focus-lock-enable",
Disable: "skapa-focus-lock-disable",
Escape: "skapa-focus-lock-escape-hotkey"
};
class tn extends Event {
constructor(n, t) {
super(n), this.SkapaFocusLockReference = t;
}
}
const qe = /* @__PURE__ */ new Set();
function Qo(e) {
if (!e)
return;
const n = e.getRootNode();
if ("host" in n)
return n.host;
}
function Zo(e) {
return e.parentElement || e.getRootNode() && e.getRootNode().host;
}
function ea(e) {
const n = [e];
let t = e, r;
for (; r = Zo(t); )
n.push(t = r);
return n;
}
function tt(e, n, t) {
var r;
const i = [...e];
n && i.reverse();
const l = typeof window < "u";
for (let o = 0; o < i.length; o++) {
const a = i[o];
if (!(l && !En(a, t)) && !a.matches("[disabled], [hidden], [inert]")) {
if (a.matches('button, a[href], input:not([type="hidden"]), select, textarea, audio, video, details, [tabindex], [contenteditable]:not([contenteditable="false"])') && a.matches(':not([tabindex="-1"])')) {
if (!((r = a.closest("fieldset")) === null || r === void 0) && r.hasAttribute("disabled"))
continue;
return a;
}
if (a.shadowRoot) {
const u = tt(Array.from(a.shadowRoot.querySelectorAll("*")), n, a);
if (u)
return u;
}
if (a.tagName === "SLOT") {
const u = tt(Array.from(a.assignedElements({ flatten: !0 })), n, a);
if (u)
return u;
}
}
}
}
function ta(e) {
const n = e.SkapaFocusLockReference;
if (e.type === je.Enable) {
const t = [...qe.values()].reverse()[0];
t && (t.passive = !0), qe.add(n);
} else {
qe.delete(n);
const t = [...qe.values()].reverse()[0];
t && (t.passive = !1);
}
}
function na(e) {
qe.forEach((n) => n.handlePointer(e));
}
function ra(e) {
e.key, qe.forEach((n) => n.handleKeyboard(e));
}
const ia = ["mousedown", "pointerup", "touchstart", "click"], la = ["keydown", "keyup"], oa = [je.Enable, je.Disable];
let Ir = !1;
function Pr(e = !0) {
if (Ir === e || !e && qe.size)
return;
const n = (e ? document.addEventListener : document.removeEventListener).bind(document);
ia.forEach((t) => n(t, na, { capture: !0 })), la.forEach((t) => n(t, ra)), oa.forEach((t) => n(t, ta)), Ir = e;
}
let Sn = -1;
const Oi = { cache: /* @__PURE__ */ new WeakMap() };
function aa() {
Sn = -1, Oi.cache = /* @__PURE__ */ new WeakMap();
}
function En(e, n) {
if (!e)
return !1;
if (e === n)
return !0;
const t = Oi.cache;
if (t.has(e))
return !!t.get(e);
Sn === -1 && (Sn = requestAnimationFrame(aa));
const { display: r, visibility: i } = window.getComputedStyle(e);
if (r === "none" || i === "hidden")
return t.set(e, !1), !1;
const l = e.parentNode;
if (l && l === n)
return t.set(e, !0), !0;
if (l && l.nodeType === 1) {
const o = En(l, n);
return t.set(e, o), o;
}
if (l && l.nodeType === 11 && "host" in l) {
const o = En(l.host, n);
return t.set(e, o), o;
}
return t.set(e, !0), !0;
}
function $i(e = document) {
if (e.activeElement)
return e.activeElement.shadowRoot && $i(e.activeElement.shadowRoot) || e.activeElement;
}
const zi = "skapa-focus-region-boundary";
let $e;
function Rr() {
return $e || ($e = document.createElement("div"), $e.tabIndex = 0, $e.toggleAttribute(zi, !0), $e.style.position = "fixed", $e.style.top = "0", $e.style.left = "0", $e.style.width = "1px"), $e.cloneNode(!0);
}
const zt = /* @__PURE__ */ new Map();
function Lr(e, n) {
e.preventDefault(), e.stopImmediatePropagation(), n.focus();
}
function sa(e) {
const n = e.container;
if (n.isConnected && n.parentNode) {
zt.has(e) && Fi(e);
const t = Rr(), r = Rr(), i = function(o) {
const a = tt([n, ...Array.from(n.querySelectorAll("*"))], !0, n);
a && Lr(o, a);
}, l = function(o) {
const a = tt([n, ...Array.from(n.querySelectorAll("*"))], !1, n);
a && Lr(o, a);
};
t.addEventListener("focusin", i, { capture: !0 }), r.addEventListener("focusin", l, { capture: !0 }), n.before(t), n.after(r), zt.set(e, {
nodes: [t, r],
listeners: [i, l]
});
}
}
function Fi(e) {
const n = zt.get(e);
n && (n.nodes.forEach((t, r) => {
t.removeEventListener("focusin", n.listeners[r], { capture: !0 }), t && t.isConnected && t.remove();
}), zt.delete(e));
}
class ua extends EventTarget {
constructor(n) {
super(), this.autoFocus = !1, this.passive = !1, this.capturePointerEvents = !0, this.autoFocusReturn = !0, this.__active = !1, this.__disableKeyConfig = {
key: "Escape",
shift: !1,
ctrl: !1
}, this.__shiftKeyDown = !1, this.handleKeyboard = (t) => {
if (!this.passive) {
if (t.type === "keydown" && typeof t.key == "string" && t.key.toLowerCase() === this.__disableKeyConfig.key.toLowerCase()) {
const { shift: r, ctrl: i } = this.__disableKeyConfig;
if (r === t.shiftKey && i === t.ctrlKey) {
this.active = !1, this.dispatchEvent(new tn(je.Escape, this));
return;
}
}
t.key === "Shift" && (this.__shiftKeyDown = t.type === "keydown");
}
}, this.disconnectedLockWrapper = () => {
const t = !(this.container && this.container.isConnected);
return t && console.warn("Focus lock feature was not disabled before removing the container from the DOM tree."), t;
}, this.handlePointer = (t) => {
if (this.passive || !this.capturePointerEvents || this.disconnectedLockWrapper())
return;
const r = t.composedPath();
r.includes(this.container) || // this can save some manual calculation time
r.find((i) => Element.prototype.isPrototypeOf(i) && (i.classList.contains("skapa-focus-portal") || (i.getAttribute("role") || "").includes("dialog"))) || this.isElementWithin(r[0]) || (t.cancelable && t.preventDefault(), t.type === "click" && t.stopImmediatePropagation());
}, this.enableLock = () => {
this.container.addEventListener("focusout", this.handleFocus), Pr(!0), sa(this), document.dispatchEvent(new tn(je.Enable, this)), this.captureFocus();
}, this.disableLock = () => {
Fi(this), Pr(!1), this.container.removeEventListener("focusout", this.handleFocus), this.returnFocus(), document.dispatchEvent(new tn(je.Disable, this));
}, this.captureFocus = () => {
document.activeElement && (this._activeElementBeforeFocusLock = $i());
const t = this.autoFocus && this.container.querySelector('*[data-autofocus]:not([tabindex="-1"]):not(:disabled)'), r = tt(t ? [t] : [this.container, ...Array.from(this.container.querySelectorAll("*"))], !1, this.container);