mongodb-chatbot-ui
Version:
UI React components for the MongoDB Chatbot Framework
190 lines (189 loc) • 8.66 kB
JavaScript
import { c as R, g as D } from "./jsx-runtime.js";
import G from "react";
import { r as A } from "./index2.js";
var B = { exports: {} };
(function(W, V) {
(function(j, f) {
W.exports = f(G, A);
})(R, function(j, f) {
function N(e) {
if (e && typeof e == "object" && "default" in e)
return e;
var r = /* @__PURE__ */ Object.create(null);
return e && Object.keys(e).forEach(function(a) {
if (a !== "default") {
var t = Object.getOwnPropertyDescriptor(e, a);
Object.defineProperty(r, a, t.get ? t : { enumerable: !0, get: function() {
return e[a];
} });
}
}), r.default = e, Object.freeze(r);
}
var C = N(j);
function u(e, r, a) {
return (r = function(t) {
var s = function(l, h) {
if (typeof l != "object" || !l)
return l;
var b = l[Symbol.toPrimitive];
if (b !== void 0) {
var p = b.call(l, h);
if (typeof p != "object")
return p;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return String(l);
}(t, "string");
return typeof s == "symbol" ? s : s + "";
}(r)) in e ? Object.defineProperty(e, r, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = a, e;
}
function g() {
return g = Object.assign ? Object.assign.bind() : function(e) {
for (var r = 1; r < arguments.length; r++) {
var a = arguments[r];
for (var t in a)
({}).hasOwnProperty.call(a, t) && (e[t] = a[t]);
}
return e;
}, g.apply(null, arguments);
}
function w(e, r) {
return r || (r = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(r) } }));
}
var x, P, E = { small: 14, default: 16, large: 20, xlarge: 24 }, S = ["className", "size", "title", "aria-label", "aria-labelledby", "fill", "role"], O = function(e) {
var r = e.className, a = e.size, t = a === void 0 ? 16 : a, s = e.title, l = e["aria-label"], h = e["aria-labelledby"], b = e.fill, p = e.role, k = p === void 0 ? "img" : p, Z = function(i, d) {
if (i == null)
return {};
var n, o, v = function(c, M) {
if (c == null)
return {};
var z = {};
for (var y in c)
if ({}.hasOwnProperty.call(c, y)) {
if (M.indexOf(y) !== -1)
continue;
z[y] = c[y];
}
return z;
}(i, d);
if (Object.getOwnPropertySymbols) {
var m = Object.getOwnPropertySymbols(i);
for (o = 0; o < m.length; o++)
n = m[o], d.indexOf(n) === -1 && {}.propertyIsEnumerable.call(i, n) && (v[n] = i[n]);
}
return v;
}(e, S), L = f.css(x || (x = w([`
color: `, `;
`])), b), $ = f.css(P || (P = w([`
flex-shrink: 0;
`]))), I = function(i, d, n) {
var o, v = n["aria-label"], m = n["aria-labelledby"], c = n.title;
switch (i) {
case "img":
return v || m || c ? u(u(u({}, "aria-labelledby", m), "aria-label", v), "title", c) : { "aria-label": (o = d, "".concat(o.replace(/([a-z])([A-Z])/g, "$1 $2"), " Icon")) };
case "presentation":
return { "aria-hidden": !0, alt: "" };
}
}(k, "CheckmarkWithCircle", u(u({ title: s }, "aria-label", l), "aria-labelledby", h));
return C.createElement("svg", g({ className: f.cx(u({}, L, b != null), $, r), height: typeof t == "number" ? t : E[t], width: typeof t == "number" ? t : E[t], role: k }, I, Z, { 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 15ZM10.4485 4.89583C10.8275 4.45816 11.4983 4.43411 11.9077 4.84352C12.2777 5.21345 12.2989 5.80633 11.9564 6.2018L7.38365 11.4818C7.31367 11.5739 7.22644 11.6552 7.12309 11.7208C6.65669 12.0166 6.03882 11.8783 5.74302 11.4119L3.9245 8.54448C3.6287 8.07809 3.767 7.46021 4.2334 7.16442C4.69979 6.86863 5.31767 7.00693 5.61346 7.47332L6.71374 9.20819L10.4485 4.89583Z", fill: "currentColor" }));
};
return O.displayName = "CheckmarkWithCircle", O.isGlyph = !0, O;
});
})(B);
var _ = B.exports;
const K = /* @__PURE__ */ D(_);
var T = { exports: {} };
(function(W, V) {
(function(j, f) {
W.exports = f(G, A);
})(R, function(j, f) {
function N(e) {
if (e && typeof e == "object" && "default" in e)
return e;
var r = /* @__PURE__ */ Object.create(null);
return e && Object.keys(e).forEach(function(a) {
if (a !== "default") {
var t = Object.getOwnPropertyDescriptor(e, a);
Object.defineProperty(r, a, t.get ? t : { enumerable: !0, get: function() {
return e[a];
} });
}
}), r.default = e, Object.freeze(r);
}
var C = N(j);
function u(e, r, a) {
return (r = function(t) {
var s = function(l, h) {
if (typeof l != "object" || !l)
return l;
var b = l[Symbol.toPrimitive];
if (b !== void 0) {
var p = b.call(l, h);
if (typeof p != "object")
return p;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return String(l);
}(t, "string");
return typeof s == "symbol" ? s : s + "";
}(r)) in e ? Object.defineProperty(e, r, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = a, e;
}
function g() {
return g = Object.assign ? Object.assign.bind() : function(e) {
for (var r = 1; r < arguments.length; r++) {
var a = arguments[r];
for (var t in a)
({}).hasOwnProperty.call(a, t) && (e[t] = a[t]);
}
return e;
}, g.apply(null, arguments);
}
function w(e, r) {
return r || (r = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(r) } }));
}
var x, P, E = { small: 14, default: 16, large: 20, xlarge: 24 }, S = ["className", "size", "title", "aria-label", "aria-labelledby", "fill", "role"], O = function(e) {
var r = e.className, a = e.size, t = a === void 0 ? 16 : a, s = e.title, l = e["aria-label"], h = e["aria-labelledby"], b = e.fill, p = e.role, k = p === void 0 ? "img" : p, Z = function(i, d) {
if (i == null)
return {};
var n, o, v = function(c, M) {
if (c == null)
return {};
var z = {};
for (var y in c)
if ({}.hasOwnProperty.call(c, y)) {
if (M.indexOf(y) !== -1)
continue;
z[y] = c[y];
}
return z;
}(i, d);
if (Object.getOwnPropertySymbols) {
var m = Object.getOwnPropertySymbols(i);
for (o = 0; o < m.length; o++)
n = m[o], d.indexOf(n) === -1 && {}.propertyIsEnumerable.call(i, n) && (v[n] = i[n]);
}
return v;
}(e, S), L = f.css(x || (x = w([`
color: `, `;
`])), b), $ = f.css(P || (P = w([`
flex-shrink: 0;
`]))), I = function(i, d, n) {
var o, v = n["aria-label"], m = n["aria-labelledby"], c = n.title;
switch (i) {
case "img":
return v || m || c ? u(u(u({}, "aria-labelledby", m), "aria-label", v), "title", c) : { "aria-label": (o = d, "".concat(o.replace(/([a-z])([A-Z])/g, "$1 $2"), " Icon")) };
case "presentation":
return { "aria-hidden": !0, alt: "" };
}
}(k, "Warning", u(u({ title: s }, "aria-label", l), "aria-labelledby", h));
return C.createElement("svg", g({ className: f.cx(u({}, L, b != null), $, r), height: typeof t == "number" ? t : E[t], width: typeof t == "number" ? t : E[t], role: k }, I, Z, { viewBox: "0 0 16 16" }), C.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.8639 1.51357C8.49039 0.828811 7.50961 0.828811 7.1361 1.51357L1.12218 12.5388C0.763263 13.1968 1.23814 14 1.98608 14H14.0139C14.7619 14 15.2367 13.1968 14.8778 12.5388L8.8639 1.51357ZM7 5C7 4.44772 7.44772 4 8 4C8.55228 4 9 4.44772 9 5V9C9 9.55228 8.55228 10 8 10C7.44772 10 7 9.55228 7 9V5ZM9 12C9 12.5523 8.55228 13 8 13C7.44772 13 7 12.5523 7 12C7 11.4477 7.44772 11 8 11C8.55228 11 9 11.4477 9 12Z", fill: "currentColor" }));
};
return O.displayName = "Warning", O.isGlyph = !0, O;
});
})(T);
var q = T.exports;
const Q = /* @__PURE__ */ D(q);
export {
Q as W,
K as d
};