UNPKG

mongodb-chatbot-ui

Version:

UI React components for the MongoDB Chatbot Framework

1,252 lines (1,236 loc) 66.3 kB
import { p as Wn, c as ar, g as or, j as Zn } from "./jsx-runtime.js"; import { _ as bt, c as Qe, a as Gn } from "./Transition.js"; import { W as gt, r as ir, m as f, Q as ee, F as l, v as _, Z as lr, k as mt, p as cr, d as _e, a0 as ht, a1 as pe, n as ae, b as Fe, a2 as ve, K as oe, j as Ze, T as De, z as Un, a3 as Ge, a4 as Kn, a5 as Xn, a6 as qn, a7 as vt, a8 as Vn, a9 as Qn, U as Jn, aa as Ae, ab as et, ac as pr, $ as Ue, ad as Xe, Y as yt, ae as xt, i as wt, af as Ct } from "./index2.js"; import { n as Et, t as St } from "./index4.js"; import * as Se from "react"; import b, { useLayoutEffect as kt, useRef as ke, useCallback as Ke, createContext as Ot, useContext as $t, useMemo as sr, useState as Pe, forwardRef as rt, useEffect as Pt } from "react"; import { u as jt } from "./index5.js"; import { B as Lt } from "./index6.js"; import { E as Rt } from "./index7.js"; import { H as zt } from "./index8.js"; import { z as _t, H as Tt, a as Mt } from "./index11.js"; import { e as He, K as nt } from "./index12.js"; import { g as tt } from "./index10.js"; import { useChatbotContext as Nt } from "./useChatbotContext.js"; var at = {}, rr = { exports: {} }, M = {}; /** @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 br; function At() { if (br) return M; br = 1; var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, c = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, y = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, x = e ? Symbol.for("react.forward_ref") : 60112, k = e ? Symbol.for("react.suspense") : 60113, W = e ? Symbol.for("react.suspense_list") : 60120, E = e ? Symbol.for("react.memo") : 60115, o = e ? Symbol.for("react.lazy") : 60116, u = e ? Symbol.for("react.block") : 60121, h = e ? Symbol.for("react.fundamental") : 60117, v = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119; function p(i) { if (typeof i == "object" && i !== null) { var w = i.$$typeof; switch (w) { case t: switch (i = i.type, i) { case d: case m: case n: case c: case a: case k: return i; default: switch (i = i && i.$$typeof, i) { case y: case x: case o: case E: case s: return i; default: return w; } } case r: return w; } } } function O(i) { return p(i) === m; } return M.AsyncMode = d, M.ConcurrentMode = m, M.ContextConsumer = y, M.ContextProvider = s, M.Element = t, M.ForwardRef = x, M.Fragment = n, M.Lazy = o, M.Memo = E, M.Portal = r, M.Profiler = c, M.StrictMode = a, M.Suspense = k, M.isAsyncMode = function(i) { return O(i) || p(i) === d; }, M.isConcurrentMode = O, M.isContextConsumer = function(i) { return p(i) === y; }, M.isContextProvider = function(i) { return p(i) === s; }, M.isElement = function(i) { return typeof i == "object" && i !== null && i.$$typeof === t; }, M.isForwardRef = function(i) { return p(i) === x; }, M.isFragment = function(i) { return p(i) === n; }, M.isLazy = function(i) { return p(i) === o; }, M.isMemo = function(i) { return p(i) === E; }, M.isPortal = function(i) { return p(i) === r; }, M.isProfiler = function(i) { return p(i) === c; }, M.isStrictMode = function(i) { return p(i) === a; }, M.isSuspense = function(i) { return p(i) === k; }, M.isValidElementType = function(i) { return typeof i == "string" || typeof i == "function" || i === n || i === m || i === c || i === a || i === k || i === W || typeof i == "object" && i !== null && (i.$$typeof === o || i.$$typeof === E || i.$$typeof === s || i.$$typeof === y || i.$$typeof === x || i.$$typeof === h || i.$$typeof === v || i.$$typeof === A || i.$$typeof === u); }, M.typeOf = p, M; } var N = {}, gr; function Dt() { return gr || (gr = 1, Wn.env.NODE_ENV !== "production" && function() { var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, c = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, y = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, x = e ? Symbol.for("react.forward_ref") : 60112, k = e ? Symbol.for("react.suspense") : 60113, W = e ? Symbol.for("react.suspense_list") : 60120, E = e ? Symbol.for("react.memo") : 60115, o = e ? Symbol.for("react.lazy") : 60116, u = e ? Symbol.for("react.block") : 60121, h = e ? Symbol.for("react.fundamental") : 60117, v = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119; function p(g) { return typeof g == "string" || typeof g == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. g === n || g === m || g === c || g === a || g === k || g === W || typeof g == "object" && g !== null && (g.$$typeof === o || g.$$typeof === E || g.$$typeof === s || g.$$typeof === y || g.$$typeof === x || g.$$typeof === h || g.$$typeof === v || g.$$typeof === A || g.$$typeof === u); } function O(g) { if (typeof g == "object" && g !== null) { var T = g.$$typeof; switch (T) { case t: var F = g.type; switch (F) { case d: case m: case n: case c: case a: case k: return F; default: var V = F && F.$$typeof; switch (V) { case y: case x: case o: case E: case s: return V; default: return T; } } case r: return T; } } } var i = d, w = m, G = y, ne = s, B = t, X = x, q = n, R = o, Z = E, S = r, $ = c, P = a, D = k, z = !1; function te(g) { return z || (z = !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.")), H(g) || O(g) === d; } function H(g) { return O(g) === m; } function Y(g) { return O(g) === y; } function be(g) { return O(g) === s; } function ie(g) { return typeof g == "object" && g !== null && g.$$typeof === t; } function xe(g) { return O(g) === x; } function je(g) { return O(g) === n; } function ge(g) { return O(g) === o; } function we(g) { return O(g) === E; } function le(g) { return O(g) === r; } function Ce(g) { return O(g) === c; } function Le(g) { return O(g) === a; } function me(g) { return O(g) === k; } N.AsyncMode = i, N.ConcurrentMode = w, N.ContextConsumer = G, N.ContextProvider = ne, N.Element = B, N.ForwardRef = X, N.Fragment = q, N.Lazy = R, N.Memo = Z, N.Portal = S, N.Profiler = $, N.StrictMode = P, N.Suspense = D, N.isAsyncMode = te, N.isConcurrentMode = H, N.isContextConsumer = Y, N.isContextProvider = be, N.isElement = ie, N.isForwardRef = xe, N.isFragment = je, N.isLazy = ge, N.isMemo = we, N.isPortal = le, N.isProfiler = Ce, N.isStrictMode = Le, N.isSuspense = me, N.isValidElementType = p, N.typeOf = O; }()), N; } Wn.env.NODE_ENV === "production" ? rr.exports = At() : rr.exports = Dt(); var It = rr.exports; Object.defineProperty(at, "__esModule", { value: !0 }); var Je = b, Ft = It; function ot(e, t, r) { return t === void 0 && (t = 0), r === void 0 && (r = []), Je.Children.toArray(e).reduce(function(n, a, c) { return Ft.isFragment(a) ? n.push.apply(n, ot(a.props.children, t + 1, r.concat(a.key || c))) : Je.isValidElement(a) ? n.push(Je.cloneElement(a, { key: r.concat(String(a.key)).join(".") })) : (typeof a == "string" || typeof a == "number") && n.push(a), n; }, []); } var Ht = at.default = ot, Yt = kt, Bt = function(t) { var r = Se.useRef(t); return Yt(function() { r.current = t; }), r; }, mr = function(t, r) { if (typeof t == "function") { t(r); return; } t.current = r; }, Wt = function(t, r) { var n = ke(); return Ke(function(a) { t.current = a, n.current && mr(n.current, null), n.current = r, r && mr(r, a); }, [r]); }, hr = { "min-height": "0", "max-height": "none", height: "0", visibility: "hidden", overflow: "hidden", position: "absolute", "z-index": "-1000", top: "0", right: "0" }, Zt = function(t) { Object.keys(hr).forEach(function(r) { t.style.setProperty(r, hr[r], "important"); }); }, vr = Zt, J = null, yr = function(t, r) { var n = t.scrollHeight; return r.sizingStyle.boxSizing === "border-box" ? n + r.borderSize : n - r.paddingSize; }; function Gt(e, t, r, n) { r === void 0 && (r = 1), n === void 0 && (n = 1 / 0), J || (J = document.createElement("textarea"), J.setAttribute("tabindex", "-1"), J.setAttribute("aria-hidden", "true"), vr(J)), J.parentNode === null && document.body.appendChild(J); var a = e.paddingSize, c = e.borderSize, s = e.sizingStyle, y = s.boxSizing; Object.keys(s).forEach(function(W) { var E = W; J.style[E] = s[E]; }), vr(J), J.value = t; var d = yr(J, e); J.value = t, d = yr(J, e), J.value = "x"; var m = J.scrollHeight - a, x = m * r; y === "border-box" && (x = x + a + c), d = Math.max(x, d); var k = m * n; return y === "border-box" && (k = k + a + c), d = Math.min(k, d), [d, m]; } var xr = function() { }, Ut = function(t, r) { return t.reduce(function(n, a) { return n[a] = r[a], n; }, {}); }, Kt = [ "borderBottomWidth", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "boxSizing", "fontFamily", "fontSize", "fontStyle", "fontWeight", "letterSpacing", "lineHeight", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", // non-standard "tabSize", "textIndent", // non-standard "textRendering", "textTransform", "width", "wordBreak" ], Xt = !!document.documentElement.currentStyle, qt = function(t) { var r = window.getComputedStyle(t); if (r === null) return null; var n = Ut(Kt, r), a = n.boxSizing; if (a === "") return null; Xt && a === "border-box" && (n.width = parseFloat(n.width) + parseFloat(n.borderRightWidth) + parseFloat(n.borderLeftWidth) + parseFloat(n.paddingRight) + parseFloat(n.paddingLeft) + "px"); var c = parseFloat(n.paddingBottom) + parseFloat(n.paddingTop), s = parseFloat(n.borderBottomWidth) + parseFloat(n.borderTopWidth); return { sizingStyle: n, paddingSize: c, borderSize: s }; }, Vt = qt; function it(e, t, r) { var n = Bt(r); Se.useLayoutEffect(function() { var a = function(s) { return n.current(s); }; if (e) return e.addEventListener(t, a), function() { return e.removeEventListener(t, a); }; }, []); } var Qt = function(t) { it(window, "resize", t); }, Jt = function(t) { it(document.fonts, "loadingdone", t); }, ea = ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"], ra = function(t, r) { var n = t.cacheMeasurements, a = t.maxRows, c = t.minRows, s = t.onChange, y = s === void 0 ? xr : s, d = t.onHeightChange, m = d === void 0 ? xr : d, x = bt(t, ea), k = x.value !== void 0, W = Se.useRef(null), E = Wt(W, r), o = Se.useRef(0), u = Se.useRef(), h = function() { var p = W.current, O = n && u.current ? u.current : Vt(p); if (O) { u.current = O; var i = Gt(O, p.value || p.placeholder || "x", c, a), w = i[0], G = i[1]; o.current !== w && (o.current = w, p.style.setProperty("height", w + "px", "important"), m(w, { rowHeight: G })); } }, v = function(p) { k || h(), y(p); }; return Se.useLayoutEffect(h), Qt(h), Jt(h), /* @__PURE__ */ Se.createElement("textarea", gt({}, x, { onChange: v, ref: E })); }, na = /* @__PURE__ */ Se.forwardRef(ra), lt = { exports: {} }; (function(e, t) { (function(r, n) { e.exports = n(b, ir); })(ar, function(r, n) { function a(o) { if (o && typeof o == "object" && "default" in o) return o; var u = /* @__PURE__ */ Object.create(null); return o && Object.keys(o).forEach(function(h) { if (h !== "default") { var v = Object.getOwnPropertyDescriptor(o, h); Object.defineProperty(u, h, v.get ? v : { enumerable: !0, get: function() { return o[h]; } }); } }), u.default = o, Object.freeze(u); } var c = a(r); function s(o, u, h) { return (u = function(v) { var A = function(p, O) { if (typeof p != "object" || !p) return p; var i = p[Symbol.toPrimitive]; if (i !== void 0) { var w = i.call(p, O); if (typeof w != "object") return w; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(p); }(v, "string"); return typeof A == "symbol" ? A : A + ""; }(u)) in o ? Object.defineProperty(o, u, { value: h, enumerable: !0, configurable: !0, writable: !0 }) : o[u] = h, o; } function y() { return y = Object.assign ? Object.assign.bind() : function(o) { for (var u = 1; u < arguments.length; u++) { var h = arguments[u]; for (var v in h) ({}).hasOwnProperty.call(h, v) && (o[v] = h[v]); } return o; }, y.apply(null, arguments); } function d(o, u) { return u || (u = o.slice(0)), Object.freeze(Object.defineProperties(o, { raw: { value: Object.freeze(u) } })); } var m, x, k = { small: 14, default: 16, large: 20, xlarge: 24 }, W = ["className", "size", "title", "aria-label", "aria-labelledby", "fill", "role"], E = function(o) { var u = o.className, h = o.size, v = h === void 0 ? 16 : h, A = o.title, p = o["aria-label"], O = o["aria-labelledby"], i = o.fill, w = o.role, G = w === void 0 ? "img" : w, ne = function(R, Z) { if (R == null) return {}; var S, $, P = function(z, te) { if (z == null) return {}; var H = {}; for (var Y in z) if ({}.hasOwnProperty.call(z, Y)) { if (te.indexOf(Y) !== -1) continue; H[Y] = z[Y]; } return H; }(R, Z); if (Object.getOwnPropertySymbols) { var D = Object.getOwnPropertySymbols(R); for ($ = 0; $ < D.length; $++) S = D[$], Z.indexOf(S) === -1 && {}.propertyIsEnumerable.call(R, S) && (P[S] = R[S]); } return P; }(o, W), B = n.css(m || (m = d([` color: `, `; `])), i), X = n.css(x || (x = d([` flex-shrink: 0; `]))), q = function(R, Z, S) { var $, P = S["aria-label"], D = S["aria-labelledby"], z = S.title; switch (R) { case "img": return P || D || z ? s(s(s({}, "aria-labelledby", D), "aria-label", P), "title", z) : { "aria-label": ($ = Z, "".concat($.replace(/([a-z])([A-Z])/g, "$1 $2"), " Icon")) }; case "presentation": return { "aria-hidden": !0, alt: "" }; } }(G, "MagnifyingGlass", s(s({ title: A }, "aria-label", p), "aria-labelledby", O)); return c.createElement("svg", y({ className: n.cx(s({}, B, i != null), X, u), height: typeof v == "number" ? v : k[v], width: typeof v == "number" ? v : k[v], role: G }, q, ne, { viewBox: "0 0 16 16" }), c.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.3234 9.81874C4.07618 11.5715 6.75062 11.8398 8.78588 10.6244L12.93 14.7685C13.4377 15.2762 14.2608 15.2762 14.7685 14.7685C15.2762 14.2608 15.2762 13.4377 14.7685 12.93L10.6244 8.78588C11.8398 6.75062 11.5715 4.07619 9.81873 2.32341C7.74896 0.253628 4.39318 0.253628 2.3234 2.32341C0.253624 4.39319 0.253624 7.74896 2.3234 9.81874ZM7.98026 4.16188C9.03467 5.2163 9.03467 6.92585 7.98026 7.98026C6.92584 9.03468 5.2163 9.03468 4.16188 7.98026C3.10746 6.92585 3.10746 5.2163 4.16188 4.16188C5.2163 3.10747 6.92584 3.10747 7.98026 4.16188Z", fill: "currentColor" })); }; return E.displayName = "MagnifyingGlass", E.isGlyph = !0, E; }); })(lt); var ta = lt.exports; const aa = /* @__PURE__ */ or(ta); var ct = { exports: {} }; (function(e, t) { (function(r, n) { e.exports = n(b, ir); })(ar, function(r, n) { function a(o) { if (o && typeof o == "object" && "default" in o) return o; var u = /* @__PURE__ */ Object.create(null); return o && Object.keys(o).forEach(function(h) { if (h !== "default") { var v = Object.getOwnPropertyDescriptor(o, h); Object.defineProperty(u, h, v.get ? v : { enumerable: !0, get: function() { return o[h]; } }); } }), u.default = o, Object.freeze(u); } var c = a(r); function s(o, u, h) { return (u = function(v) { var A = function(p, O) { if (typeof p != "object" || !p) return p; var i = p[Symbol.toPrimitive]; if (i !== void 0) { var w = i.call(p, O); if (typeof w != "object") return w; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(p); }(v, "string"); return typeof A == "symbol" ? A : A + ""; }(u)) in o ? Object.defineProperty(o, u, { value: h, enumerable: !0, configurable: !0, writable: !0 }) : o[u] = h, o; } function y() { return y = Object.assign ? Object.assign.bind() : function(o) { for (var u = 1; u < arguments.length; u++) { var h = arguments[u]; for (var v in h) ({}).hasOwnProperty.call(h, v) && (o[v] = h[v]); } return o; }, y.apply(null, arguments); } function d(o, u) { return u || (u = o.slice(0)), Object.freeze(Object.defineProperties(o, { raw: { value: Object.freeze(u) } })); } var m, x, k = { small: 14, default: 16, large: 20, xlarge: 24 }, W = ["className", "size", "title", "aria-label", "aria-labelledby", "fill", "role"], E = function(o) { var u = o.className, h = o.size, v = h === void 0 ? 16 : h, A = o.title, p = o["aria-label"], O = o["aria-labelledby"], i = o.fill, w = o.role, G = w === void 0 ? "img" : w, ne = function(R, Z) { if (R == null) return {}; var S, $, P = function(z, te) { if (z == null) return {}; var H = {}; for (var Y in z) if ({}.hasOwnProperty.call(z, Y)) { if (te.indexOf(Y) !== -1) continue; H[Y] = z[Y]; } return H; }(R, Z); if (Object.getOwnPropertySymbols) { var D = Object.getOwnPropertySymbols(R); for ($ = 0; $ < D.length; $++) S = D[$], Z.indexOf(S) === -1 && {}.propertyIsEnumerable.call(R, S) && (P[S] = R[S]); } return P; }(o, W), B = n.css(m || (m = d([` color: `, `; `])), i), X = n.css(x || (x = d([` flex-shrink: 0; `]))), q = function(R, Z, S) { var $, P = S["aria-label"], D = S["aria-labelledby"], z = S.title; switch (R) { case "img": return P || D || z ? s(s(s({}, "aria-labelledby", D), "aria-label", P), "title", z) : { "aria-label": ($ = Z, "".concat($.replace(/([a-z])([A-Z])/g, "$1 $2"), " Icon")) }; case "presentation": return { "aria-hidden": !0, alt: "" }; } }(G, "XWithCircle", s(s({ title: A }, "aria-label", p), "aria-labelledby", O)); return c.createElement("svg", y({ className: n.cx(s({}, B, i != null), X, u), height: typeof v == "number" ? v : k[v], width: typeof v == "number" ? v : k[v], role: G }, q, ne, { viewBox: "0 0 16 16" }), c.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM9.41421 5.17157C9.80474 4.78105 10.4379 4.78105 10.8284 5.17157C11.219 5.5621 11.219 6.19526 10.8284 6.58579L9.41421 8L10.8284 9.41421C11.219 9.80474 11.219 10.4379 10.8284 10.8284C10.4379 11.219 9.80474 11.219 9.41421 10.8284L8 9.41421L6.58579 10.8284C6.19526 11.219 5.5621 11.219 5.17157 10.8284C4.78105 10.4379 4.78105 9.80474 5.17157 9.41421L6.58579 8L5.17157 6.58579C4.78105 6.19526 4.78105 5.5621 5.17157 5.17157C5.5621 4.78105 6.19526 4.78105 6.58579 5.17157L8 6.58579L9.41421 5.17157Z", fill: "currentColor" })); }; return E.displayName = "XWithCircle", E.isGlyph = !0, E; }); })(ct); var oa = ct.exports; const ia = /* @__PURE__ */ or(oa); var st = { exports: {} }; (function(e, t) { (function(r, n) { e.exports = n(b, ir); })(ar, function(r, n) { function a(o) { if (o && typeof o == "object" && "default" in o) return o; var u = /* @__PURE__ */ Object.create(null); return o && Object.keys(o).forEach(function(h) { if (h !== "default") { var v = Object.getOwnPropertyDescriptor(o, h); Object.defineProperty(u, h, v.get ? v : { enumerable: !0, get: function() { return o[h]; } }); } }), u.default = o, Object.freeze(u); } var c = a(r); function s(o, u, h) { return (u = function(v) { var A = function(p, O) { if (typeof p != "object" || !p) return p; var i = p[Symbol.toPrimitive]; if (i !== void 0) { var w = i.call(p, O); if (typeof w != "object") return w; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(p); }(v, "string"); return typeof A == "symbol" ? A : A + ""; }(u)) in o ? Object.defineProperty(o, u, { value: h, enumerable: !0, configurable: !0, writable: !0 }) : o[u] = h, o; } function y() { return y = Object.assign ? Object.assign.bind() : function(o) { for (var u = 1; u < arguments.length; u++) { var h = arguments[u]; for (var v in h) ({}).hasOwnProperty.call(h, v) && (o[v] = h[v]); } return o; }, y.apply(null, arguments); } function d(o, u) { return u || (u = o.slice(0)), Object.freeze(Object.defineProperties(o, { raw: { value: Object.freeze(u) } })); } var m, x, k = { small: 14, default: 16, large: 20, xlarge: 24 }, W = ["className", "size", "title", "aria-label", "aria-labelledby", "fill", "role"], E = function(o) { var u = o.className, h = o.size, v = h === void 0 ? 16 : h, A = o.title, p = o["aria-label"], O = o["aria-labelledby"], i = o.fill, w = o.role, G = w === void 0 ? "img" : w, ne = function(R, Z) { if (R == null) return {}; var S, $, P = function(z, te) { if (z == null) return {}; var H = {}; for (var Y in z) if ({}.hasOwnProperty.call(z, Y)) { if (te.indexOf(Y) !== -1) continue; H[Y] = z[Y]; } return H; }(R, Z); if (Object.getOwnPropertySymbols) { var D = Object.getOwnPropertySymbols(R); for ($ = 0; $ < D.length; $++) S = D[$], Z.indexOf(S) === -1 && {}.propertyIsEnumerable.call(R, S) && (P[S] = R[S]); } return P; }(o, W), B = n.css(m || (m = d([` color: `, `; `])), i), X = n.css(x || (x = d([` flex-shrink: 0; `]))), q = function(R, Z, S) { var $, P = S["aria-label"], D = S["aria-labelledby"], z = S.title; switch (R) { case "img": return P || D || z ? s(s(s({}, "aria-labelledby", D), "aria-label", P), "title", z) : { "aria-label": ($ = Z, "".concat($.replace(/([a-z])([A-Z])/g, "$1 $2"), " Icon")) }; case "presentation": return { "aria-hidden": !0, alt: "" }; } }(G, "Refresh", s(s({ title: A }, "aria-label", p), "aria-labelledby", O)); return c.createElement("svg", y({ className: n.cx(s({}, B, i != null), X, u), height: typeof v == "number" ? v : k[v], width: typeof v == "number" ? v : k[v], role: G }, q, ne, { viewBox: "0 0 16 16" }), c.createElement("path", { d: "M8.03289 2C10.7318 2 12.9831 3.71776 13.5 6L14.9144 6C15.4555 6 15.7061 6.67202 15.297 7.02629L12.8153 9.17546C12.5957 9.36566 12.2697 9.36566 12.0501 9.17545L9.56844 7.02629C9.15937 6.67202 9.40991 6 9.95107 6H11.3977C10.929 4.91456 9.7172 4 8.03289 4C7.00662 4 6.15578 4.33954 5.54157 4.85039C5.29859 5.05248 4.92429 5.0527 4.72549 4.80702L4.11499 4.05254C3.95543 3.85535 3.96725 3.56792 4.1591 3.40197C5.16255 2.53394 6.52815 2 8.03289 2Z", fill: "currentColor" }), c.createElement("path", { d: "M3.94991 6.84265C3.73028 6.65245 3.40429 6.65245 3.18466 6.84265L0.703017 8.99182C0.293944 9.34608 0.544489 10.0181 1.08564 10.0181H2.50411C3.02878 12.2913 5.27531 14 7.96711 14C9.47186 14 10.8375 13.4661 11.8409 12.598C12.0327 12.4321 12.0446 12.1447 11.885 11.9475L11.2745 11.193C11.0757 10.9473 10.7014 10.9475 10.4584 11.1496C9.84422 11.6605 8.99338 12 7.96711 12C6.29218 12 5.08453 11.0956 4.6102 10.0181H6.04893C6.59009 10.0181 6.84063 9.34608 6.43156 8.99182L3.94991 6.84265Z", fill: "currentColor" })); }; return E.displayName = "Refresh", E.isGlyph = !0, E; }); })(st); var la = st.exports; const ca = /* @__PURE__ */ or(la); function wr(e, t) { t > e.length && (t = e.length); for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r]; return n; } function L(e, t, r) { return (t = function(n) { var a = function(c, s) { if (typeof c != "object" || !c) return c; var y = c[Symbol.toPrimitive]; if (y !== void 0) { var d = y.call(c, s); if (typeof d != "object") return d; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(c); }(n, "string"); return typeof a == "symbol" ? a : a + ""; }(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e; } function Ie() { return Ie = Object.assign ? Object.assign.bind() : function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]); } return e; }, Ie.apply(null, arguments); } function Cr(e, t) { var r = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); t && (n = n.filter(function(a) { return Object.getOwnPropertyDescriptor(e, a).enumerable; })), r.push.apply(r, n); } return r; } function Ye(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t] != null ? arguments[t] : {}; t % 2 ? Cr(Object(r), !0).forEach(function(n) { L(e, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Cr(Object(r)).forEach(function(n) { Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n)); }); } return e; } function qe(e, t) { if (e == null) return {}; var r, n, a = function(s, y) { if (s == null) return {}; var d = {}; for (var m in s) if ({}.hasOwnProperty.call(s, m)) { if (y.indexOf(m) !== -1) continue; d[m] = s[m]; } return d; }(e, t); if (Object.getOwnPropertySymbols) { var c = Object.getOwnPropertySymbols(e); for (n = 0; n < c.length; n++) r = c[n], t.indexOf(r) === -1 && {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]); } return a; } function er(e, t) { return function(r) { if (Array.isArray(r)) return r; }(e) || function(r, n) { var a = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]; if (a != null) { var c, s, y, d, m = [], x = !0, k = !1; try { if (y = (a = a.call(r)).next, n !== 0) for (; !(x = (c = y.call(a)).done) && (m.push(c.value), m.length !== n); x = !0) ; } catch (W) { k = !0, s = W; } finally { try { if (!x && a.return != null && (d = a.return(), Object(d) !== d)) return; } finally { if (k) throw s; } } return m; } }(e, t) || function(r, n) { if (r) { if (typeof r == "string") return wr(r, n); var a = {}.toString.call(r).slice(8, -1); return a === "Object" && r.constructor && (a = r.constructor.name), a === "Map" || a === "Set" ? Array.from(r) : a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a) ? wr(r, n) : void 0; } }(e, t) || function() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); }(); } function C(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); } var Er, Sr, kr, sa = ["children"], ut = Ot({}); function ua(e) { var t = e.children, r = qe(e, sa); return b.createElement(ut.Provider, { value: r }, t); } var Or, $r, Pr, jr, Lr, Rr, zr, _r, Tr, Mr, Nr, Ar, Dr, Ir, Fr, Hr, Yr, Br, Wr, Zr, Gr, Ur, Kr, Xr, qr, Vr, Qr, Jr, en, rn, nn, tn, an, on, ln, cn, sn, da = f(Er || (Er = C([` display: flex; align-items: center; gap: `, `px; font-style: italic; font-weight: 300; padding-block: `, `px; `])), ee[2], ee[1]), fa = L(L({}, _.Light, f(Sr || (Sr = C([` color: `, `; `])), l.gray.dark1)), _.Dark, f(kr || (kr = C([` color: `, `; `])), l.gray.light1)), pa = function() { var e = _e().theme; return b.createElement(He, { "aria-label": "No results found", isInteractive: !1, className: ae(da, fa[e]) }, b.createElement("span", null, "No results found")); }, ba = f(Or || (Or = C([` display: flex; align-items: center; gap: `, `px; padding-block: `, `px; `])), ee[2], ee[1]), ga = lr($r || ($r = C([` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `]))), ma = f(Pr || (Pr = C([` height: 16px; width: 16px; animation: `, ` 1.5s linear infinite; `])), ga), ha = function() { var e = _e().darkMode; return b.createElement(He, { "data-testid": "lg-search-input-loading-option", "aria-label": "Loading results", isInteractive: !1, className: ba }, b.createElement(ca, { color: e ? l.blue.light1 : l.blue.base, className: ma }), b.createElement("span", null, "Loading results")); }, va = f(jr || (jr = C([` box-shadow: 0px 4px 7px `, `; border-radius: `, `px; `])), mt(0.75, "#000000"), cr[300]), ya = function(e) { return f(Lr || (Lr = C([` background-color: `, `; border: 1px solid `, `; `])), pr[e].background.primary.default, pr[e].border.secondary.default); }, xa = f(Rr || (Rr = C([` padding: `, `px 0; margin: 0; border-radius: `, `px; overflow-y: auto; scroll-behavior: smooth; `])), ee[300], cr[300]), wa = ["children", "open", "refEl", "footerSlot"], ur = b.forwardRef(function(e, t) { var r = e.children, n = e.open, a = n !== void 0 && n, c = e.refEl, s = e.footerSlot, y = qe(e, wa), d = _e().theme, m = $t(ut).state, x = sr(function() { var E, o; return (E = (o = c.current) === null || o === void 0 ? void 0 : o.clientWidth) !== null && E !== void 0 ? E : 0; }, [c, a]), k = ht(c), W = pe(k) ? "unset" : "".concat(Math.min(k, 256), "px"); return b.createElement(_t, { "data-testid": "lg-search-input-popover", spacing: ee[200], active: a, align: "bottom", justify: "start", className: ae(va, ya(d), f(zr || (zr = C([` width: `, `px; min-width: `, `px; `])), x, x)), refEl: c, dismissMode: Tt.Manual, renderMode: Mt.TopLayer }, m === "loading" ? b.createElement(ha, null) : b.createElement(b.Fragment, null, b.createElement("ul", Ie({ role: "listbox", "aria-live": "polite", "aria-relevant": "additions removals", "aria-expanded": a, ref: t, className: ae(xa, f(_r || (_r = C([` max-height: `, `; `])), W)) }, y), b.Children.count(r) ? r : b.createElement(pa, null)), s)); }); ur.displayName = "SearchResultsMenu"; var Ee = function(e) { return "0 0 0 100px ".concat(e, " inset"); }, Ca = f(Tr || (Tr = C([` outline: none; `]))), Ea = f(Mr || (Mr = C([` position: relative; display: grid; grid-auto-flow: column; align-items: center; justify-items: center; border: 1px solid; border-radius: 6px; z-index: 0; transition: `, `ms ease-in-out; transition-property: border-color, box-shadow; `])), Fe.default), Sa = L(L(L(L({}, oe.XSmall, f(Nr || (Nr = C([` font-size: `, `px; line-height: `, `px; height: 22px; grid-template-columns: 28px 1fr 36px; `])), ve.body1.fontSize, ve.body1.lineHeight)), oe.Small, f(Ar || (Ar = C([` font-size: `, `px; line-height: `, `px; height: 28px; grid-template-columns: 32px 1fr 36px; `])), ve.body1.fontSize, ve.body1.lineHeight)), oe.Default, f(Dr || (Dr = C([` font-size: `, `px; line-height: `, `px; height: 36px; grid-template-columns: 36px 1fr 36px; `])), ve.body1.fontSize, ve.body1.lineHeight)), oe.Large, f(Ir || (Ir = C([` font-size: `, `px; line-height: `, `px; height: 48px; grid-template-columns: 36px 1fr 44px; `])), ve.large.fontSize, ve.large.lineHeight)), ka = L(L({}, _.Light, f(Fr || (Fr = C([` color: `, `; background: `, `; border-color: `, `; `])), l.black, l.white, l.gray.base)), _.Dark, f(Hr || (Hr = C([` color: `, `; background-color: `, `; border-color: `, `; `])), l.gray.light2, l.gray.dark4, l.gray.base)), Oa = L(L({}, _.Light, f(Yr || (Yr = C([` &:hover, &:active { &:not(:disabled):not(:focus-within) { box-shadow: `, `; } } `])), Ze.light.gray)), _.Dark, f(Br || (Br = C([` &:hover, &:active { &:not(:disabled):not(:focus-within) { box-shadow: `, `; } } `])), Ze.dark.gray)), $a = L(L({}, _.Light, f(Wr || (Wr = C([` &:not(:disabled):focus-within { box-shadow: `, `; border-color: `, `; } `])), De.light.input, l.white)), _.Dark, f(Zr || (Zr = C([` &:not(:disabled):focus-within { box-shadow: `, `; border-color: `, `; } `])), De.dark.input, l.gray.dark4)), Pa = L(L({}, _.Light, f(Gr || (Gr = C([` cursor: not-allowed; color: `, `; background-color: `, `; border-color: `, `; `])), l.gray.base, l.gray.light2, l.gray.light1)), _.Dark, f(Ur || (Ur = C([` cursor: not-allowed; color: `, `; background-color: `, `; border-color: `, `; `])), l.gray.dark2, l.gray.dark3, l.gray.dark2)), ja = f(Kr || (Kr = C([` font-size: inherit; line-height: inherit; color: inherit; background-color: inherit; font-family: `, `; width: 100%; height: 1.5em; font-weight: `, `; z-index: 1; outline: none; border: none; padding: 0; &[aria-disabled='true'] { cursor: not-allowed; &:hover, &:active { box-shadow: none; } } &::placeholder { font-size: inherit; line-height: inherit; } &::-ms-clear, &::-ms-reveal { display: none; width: 0; height: 0; } &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration { display: none; } `])), Un.default, Ge.regular), La = L(L({}, _.Light, f(Xr || (Xr = C([` &:-webkit-autofill { color: inherit; background: transparent; border: none; -webkit-text-fill-color: inherit; &[aria-disabled='false'] { box-shadow: `, `; &:focus { box-shadow: `, `, `, `; } &:hover:not(:focus) { box-shadow: `, `, `, `; } } } &::placeholder { color: `, `; font-weight: `, `; } &[aria-disabled='true'] { &::placeholder { color: `, `; } &:-webkit-autofill { &, &:hover, &:focus { appearance: none; border: 1px solid `, `; -webkit-text-fill-color: `, `; box-shadow: `, `; } } } `])), Ee(l.white), Ee(l.white), De.light.input, Ee(l.white), Ze.light.gray, l.gray.base, Ge.regular, l.gray.base, l.gray.base, l.gray.base, Ee(l.gray.light2))), _.Dark, f(qr || (qr = C([` &:-webkit-autofill { color: inherit; background: transparent; border: none; -webkit-text-fill-color: `, `; &[aria-disabled='false'] { box-shadow: `, `; &:focus { box-shadow: `, `, `, `; border-color: `, `; } &:hover:not(:focus) { box-shadow: `, `, `, `; } } } &::placeholder { color: `, `; font-weight: `, `; } &[aria-disabled='true'] { &::placeholder { color: `, `; } &:-webkit-autofill { &, &:hover, &:focus { appearance: none; border: 1px solid `, `; -webkit-text-fill-color: `, `; box-shadow: `, `; } } } `])), l.gray.light3, Ee(l.gray.dark4), Ee(l.gray.dark4), De.dark.input, l.blue.light1, Ee(l.gray.dark4), Ze.dark.gray, l.gray.dark1, Ge.regular, l.gray.dark1, l.gray.dark1, l.gray.dark1, Ee(l.gray.dark2))), Ra = L(L({}, _.Light, f(Vr || (Vr = C([` color: `, `; `])), l.gray.dark1)), _.Dark, f(Qr || (Qr = C([` color: `, `; `])), l.gray.light1)), za = L(L(L(L({}, oe.XSmall, f(Jr || (Jr = C([` margin-left: 2px; `])))), oe.Small, f(en || (en = C([` margin-left: 0px; `])))), oe.Default, f(rn || (rn = C([` margin-left: 8px; `])))), oe.Large, f(nn || (nn = C([` margin-left: 8px; `])))), _a = L(L({}, _.Light, f(tn || (tn = C([` color: `, `; `])), l.gray.base)), _.Dark, f(an || (an = C([` color: `, `; `])), l.gray.dark1)), Ta = L(L(L(L({}, oe.XSmall, f(on || (on = C([` height: 22px; width: 22px; `])))), oe.Small, f(ln || (ln = C([` height: 28px; width: 28px; `])))), oe.Default, f(cn || (cn = C([` height: 28px; width: 28px; `])))), oe.Large, f(sn || (sn = C([` height: 28px; width: 28px; `])))), Ma = { Unset: "unset", Loading: "loading" }, Na = ["placeholder", "className", "darkMode", "size", "disabled", "children", "state", "value", "onChange", "onSubmit", "aria-label", "aria-labelledby"], Aa = b.forwardRef(function(e, t) { var r = e.placeholder, n = r === void 0 ? "Search" : r, a = e.className, c = e.darkMode, s = e.size, y = s === void 0 ? oe.Default : s, d = e.disabled, m = e.children, x = e.state, k = x === void 0 ? Ma.Unset : x, W = e.value, E = e.onChange, o = e.onSubmit, u = e["aria-label"], h = e["aria-labelledby"], v = qe(e, Na), A = _e(c), p = A.theme, O = A.darkMode, i = er(Pe(!1), 2), w = i[0], G = i[1], ne = er(Pe(0), 2), B = ne[0], X = ne[1], q = function() { return G(!1); }, R = function() { return G(!0); }, Z = ke(null), S = ke(null), $ = ke(null), P = Kn(t, null), D = ke(null), z = Xn({ prefix: "result" }), te = er(Pe(), 2), H = te[0], Y = te[1], be = z("".concat(B)), ie = !pe(m), xe = qn(W, E), je = xe.value, ge = xe.handleChange, we = Ke(function(T) { P.current && (P.current.value = T, ge(vt(new Event("change", { cancelable: !0, bubbles: !0 }), P.current))); }, [ge, P]), le = Ke(function() { var T = 0, F = function(U) { if (Ue(U, "SearchResult")) { var de, re = (T += 1) - 1, he = Xe(U); return b.cloneElement(U, Ye(Ye({}, U.props), {}, { id: "result-".concat(re), key: "result-".concat(re), ref: (de = U.props.ref) !== null && de !== void 0 ? de : z == null ? void 0 : z("".concat(re)), highlighted: re === B, onClick: function(ce) { var se, Q; if ((se = (Q = U.props).onClick) === null || se === void 0 || se.call(Q, ce), we(he), ce.detail >= 1 && Z.current && P.current) { var ue, fe = new Event("submit", { cancelable: !0, bubbles: !0 }); (ue = Z.current) === null || ue === void 0 || ue.dispatchEvent(fe); } } })); } if (Ue(U, "SearchResultGroup")) { var j = b.Children.map(U.props.children, F); if (j && j.length > 0) return b.cloneElement(U, Ye(Ye({}, U.props), {}, { children: j })); } }, V = b.Children.map(m, F); return { resultsCount: T, updatedChildren: V }; }, [m, B, P, z, we]), Ce = sr(function() { return le(); }, [le]), Le = Ce.updatedChildren, me = Ce.resultsCount, g = function(T) { switch (T) { case "first": X(0); break; case "last": X(me); break; case "next": var F = !pe(B) && B + 1 < me ? B + 1 : 0; X(F); break; case "prev": var V = !pe(B) && B - 1 >= 0 ? B - 1 : me - 1; X(V); } }; return Vn(be, $, 12), Qn(function() { q(); }, [S, $], { enabled: w && ie }), b.createElement(Jn, { darkMode: O }, b.createElement(ua, { state: k, highlight: B, resultDynamicRefs: z }, b.createElement("form", Ie({ role: "search", ref: Z, className: ae(Ca, a), onSubmit: function(T) { T.preventDefault(), o == null || o(T), ie && (q(), we("")); } }, v), b.createElement("div", { ref: S, role: "searchbox", tabIndex: -1, onMouseDown: function(T) { d && T.preventDefault(); }, onClick: function(T) { (function(F) { d ? (F.preventDefault(), F.stopPropagation()) : R(); })(T); }, onFocus: function(T) { var F, V = T.target, U = V === D.current ? D.current : (F = P.current) !== null && F !== void 0 ? F : V; U.focus(), Y(U); }, onKeyDown: function(T) { var F, V, U = (F = $.current) === null || F === void 0 ? void 0 : F.contains(document.activeElement); if ((!((V = S.current) === null || V === void 0) && V.contains(document.activeElement) || U) && !d) switch (T.key) { case Ae.Enter: var de; be == null || (de = be.current) === null || de === void 0 || de.click(); break; case Ae.Escape: var re; q(), (re = P.current) === null || re === void 0 || re.focus(); break; case Ae.ArrowDown: var he; ie && ((he = P.current) === null || he === void 0 || he.focus(), R(), T.preventDefault(), g("next")); break; case Ae.ArrowUp: var j; ie && ((j = P.current) === null || j === void 0 || j.focus(), R(), T.preventDefault(), g("prev")); break; case Ae.Tab: w && q(); break; default: ie && R(); } }, className: ae(Ea, Sa[y], ka[p], L(L(L({}, $a[p], H === P.current), Pa[p], d), Oa[p], !d)), "aria-label": h ? void 0 : u, "aria-labelledby": h }, b.createElement(aa, { className: ae(Ra[p], za[y], L({}, _a[p], d)), role: "presentation" }), b.createElement("input", { type: "search", className: ae(ja, La[p]), value: je, onChange: function(T) { ge == null || ge(T); }, placeholder: n, ref: P, readOnly: d, "aria-disabled": d }), je && b.createElement(zt, { ref: D, type: "button", "aria-label": "Clear search", onClick: function(T) { var F; T.stopPropagation(), we(""), P == null || (F = P.current) === null || F === void 0 || F.focus(); }, className: Ta[y], tabIndex: d ? -1 : 0, disabled: d }, b.createElement(ia, null))), ie && b.createElement(ur, { open: w, refEl: S, ref: $ }, Le)))); }); Aa.displayName = "SearchInput"; var un, dn, fn, Da = ["as", "children", "description", "disabled", "className", "darkMode"], Ia = et(function(e, t) { var r, n = e.as, a = n === void 0 ? "li" : n, c = e.children, s = e.description, y = e.disabled, d = e.className; e.darkMode; var m = qe(e, Da), x = Xe(c), k = (r = m["aria-label"]) !== null && r !== void 0 ? r : m["aria-labelledby"] ? "" : x; return b.createElement(He, Ie({}, m, { as: a, ref: t, className: d, disabled: y, "aria-labelledby": m["aria-labelledby"], "aria-label": k }), b.createElement(nt, { description: s, preserveIconSpace: !1 }, b.createElement("strong", null, c))); }, "SearchResult"); Ia.displayName = "SearchResult"; f(un || (un = C([` padding-top: 12px; padding-bottom: 0; `]))); L(L({}, _.Light, f(dn || (dn = C([` color: `, `; `])), l.gray.dark1)), _.Dark, f(fn || (fn = C([` color: `, `; `])), l.gray.base)); function pn(e, t) { t > e.length && (t = e.length); for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r]; return n; } function K(e, t, r) { return (t = function(n) { var a = function(c, s) { if (typeof c != "object" || !c) return c; var y = c[Symbol.toPrimitive]; if (y !== void 0) { var d = y.call(c, s); if (typeof d != "object") return d; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(c); }(n, "string"); return typeof a == "symbol" ? a : a + ""; }(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e; } function ye() { return ye = Object.assign ? Object.assign.bind() : function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]); } return e; }, ye.apply(null, arguments); } function bn(e, t) { var r = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); t && (n = n.filter(function(a) { return Object.getOwnPropertyDescriptor(e, a).enumerable; })), r.push.apply(r, n); } return r; } function Be(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t] != null ? arguments[t] : {}; t % 2 ? bn(Object(r), !0).forEach(function(n) { K(e, n, r[n]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : bn(Object(r)).forEach(function(n) { Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n)); }); } return e; } function dr(e, t) { if (e == null) return {}; var r, n, a = function(s, y) { if (s == null) return {}; var d = {}; for (var m in s) if ({}.hasOwnProperty.call(s, m)) { if (y.indexOf(m) !== -1) continue; d[m] = s[m]; } return d; }(e, t); if (Object.getOwnPropertySymbols) { var c = Object.getOwnPropertySymbols(e); for (n = 0; n < c.length; n++) r = c[n], t.indexOf(r) === -1 && {}.propertyIsEnumerable.call(e, r) && (a[r] = e[r]); } return a; } function We(e, t) { return function(r) { if (Array.isArray(r)) return r; }(e) || function(r, n) { var a = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"]; if (a != null) { var c, s, y, d, m = [], x = !0, k = !1; try { if (y = (a = a.call(r)).next, n !== 0) for (; !(x = (c = y.call(a)).done) && (m.push(c.value), m.length !== n); x = !0) ; } catch (W) { k = !0, s = W; } finally { try { if (!x && a.return != null && (d = a.return(), Object(d) !== d)) return; } finally { if (k) throw s; } } return m; } }(e, t) || function(r, n) { if (r) { if (typeof r == "string") return pn(r, n); var a = {}.toString.call(r).slice(8, -1); return a === "Object" && r.constructor && (a = r.constructor.name), a === "Map" || a === "Set" ? Array.from(r) : a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a) ? pn(r, n) : void 0; } }(e, t) || function() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); }(); } function I(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); } var gn, mn, hn, vn, yn, xn, wn, Cn, En, Sn, kn, On, $n, Pn, jn, Ln, Rn, zn, _n, Tn, Mn, Nn, An, Fa = f(gn || (gn = I([` width: 100%; position: relative; `]))), Ha = f(mn || (mn = I([` width: 100%; display: grid; grid-template-columns: auto 1fr auto; position: relative; border-radius: 8px; border: 1px solid `, `; z-index: 2; &:disabled { cursor: not-allowed; &:hover, &:active { box-shadow: none; } } `])), l.gray.base), Ya = f(hn || (hn = I([` border-color: transparent; `]))), Ba = K(K({}, _.Dark, f(vn || (vn = I([` background-color: `, `; color: `, `; `])), l.black, l.white)), _.Light, f(yn || (yn = I([` background-color: `, `; color: black; `])), l.white)), Wa = f(xn || (xn = I([` display: flex; gap: `, `px; align-items: center; align-self: top; height: 36px; // hard set to height of textarea padding: `, "px 0px ", "px ", `p