LazyBoy2/node_modules/.vite/deps/@blobatar_react.js

583 lines
28 KiB
JavaScript
Raw Permalink Normal View History

2026-09-16 06:47:32 +00:00
import {
require_react
} from "./chunk-IO7TC67E.js";
import {
__commonJS,
__toESM
} from "./chunk-DC5AMYBS.js";
// node_modules/react/cjs/react-jsx-runtime.development.js
var require_react_jsx_runtime_development = __commonJS({
"node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
"use strict";
(function() {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
case REACT_VIEW_TRANSITION_TYPE:
return "ViewTransition";
}
if ("object" === typeof type)
switch ("number" === typeof type.tag && console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
), type.$$typeof) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return type.displayName || "Context";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
return type;
case REACT_MEMO_TYPE:
return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {
}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = false;
} catch (e) {
JSCompiler_inline_result = true;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternals.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return false;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown || (specialPropKeyWarningShown = true, 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)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: true
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, 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."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, props, owner, debugStack, debugTask) {
var refProp = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type,
key,
props,
_owner: owner
};
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
enumerable: false,
get: elementRefGetterWithDeprecationWarning
}) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: false,
enumerable: false,
writable: true,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: false,
enumerable: false,
writable: true,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: false,
enumerable: false,
writable: true,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: false,
enumerable: false,
writable: true,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(type, config, maybeKey, isStaticChildren, debugStack, debugTask) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} 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 validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function(k2) {
return "key" !== k2;
});
isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
isStaticChildren,
children,
keys,
children
), didWarnAboutKeySpread[children + isStaticChildren] = true);
}
children = null;
void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children && defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type ? type.displayName || type.name || "Unknown" : type
);
return ReactElement(
type,
children,
maybeKey,
getOwner(),
debugStack,
debugTask
);
}
function validateChildKeys(node) {
isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1));
}
function isValidElement(object) {
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
}
var React = require_react(), REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
return null;
};
React = {
react_stack_bottom_frame: function(callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = function(type, config, maybeKey) {
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
if (trackActualOwner) {
var previousStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 10;
var debugStackDEV = Error("react-stack-top-frame");
Error.stackTraceLimit = previousStackTraceLimit;
} else debugStackDEV = unknownOwnerDebugStack;
return jsxDEVImpl(
type,
config,
maybeKey,
false,
debugStackDEV,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxs = function(type, config, maybeKey) {
var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
if (trackActualOwner) {
var previousStackTraceLimit = Error.stackTraceLimit;
Error.stackTraceLimit = 10;
var debugStackDEV = Error("react-stack-top-frame");
Error.stackTraceLimit = previousStackTraceLimit;
} else debugStackDEV = unknownOwnerDebugStack;
return jsxDEVImpl(
type,
config,
maybeKey,
true,
debugStackDEV,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
})();
}
});
// node_modules/react/jsx-runtime.js
var require_jsx_runtime = __commonJS({
"node_modules/react/jsx-runtime.js"(exports, module) {
"use strict";
if (false) {
module.exports = null;
} else {
module.exports = require_react_jsx_runtime_development();
}
}
});
// node_modules/blobatar/dist/react.js
var import_react = __toESM(require_react());
var import_jsx_runtime = __toESM(require_jsx_runtime());
var G = (t, e) => `mo-root${t === "always" ? " mo-always" : ""}${e ? " mo-expr" : ""}`;
function It(t) {
let e = Math.round(t.num("motion.blink", 3500, 6500)), n = Math.round(t.num("motion.saccade", 4200, 7600)), a = t.num("motion.lookX", 1, 2.2), o = t.num("motion.lookY", 0.8, 1.7), r2 = (s) => Math.round(s * 100) / 100;
return { phase: Math.round(t.num("motion.phase", 0, 2800)), bob: Math.round(t.num("motion.bob", 0, 3400)), blink: e, blinkPhase: Math.round(t.num("motion.blinkPhase", 0, e)), saccade: n, saccadePhase: Math.round(t.num("motion.saccadePhase", 0, n)), lookX: r2(a) * (t.bool("motion.lookXFlip") ? -1 : 1), lookY: r2(o) * (t.bool("motion.lookYFlip") ? -1 : 1), lookMX: r2(a), lookMY: r2(o) };
}
function N(t) {
let e = (a) => `${-a}ms`, n = It(t);
return { "--mo-phase": e(n.phase), "--mo-bob-phase": e(n.bob), "--mo-blink": `${n.blink}ms`, "--mo-blink-phase": e(n.blinkPhase), "--mo-look-x": String(n.lookX), "--mo-look-mx": String(n.lookMX), "--mo-look-y": String(n.lookY), "--mo-look-my": String(n.lookMY), "--mo-saccade": `${n.saccade}ms`, "--mo-saccade-phase": e(n.saccadePhase) };
}
function R({ l: t, c: e, h: n }) {
let a = n * Math.PI / 180, o = e * Math.cos(a), r2 = e * Math.sin(a), s = t + 0.3963377774 * o + 0.2158037573 * r2, c = t - 0.1055613458 * o - 0.0638541728 * r2, i = t - 0.0894841775 * o - 1.291485548 * r2, u = s * s * s, m = c * c * c, l = i * i * i;
return [4.0767416621 * u - 3.3077115913 * m + 0.2309699292 * l, -1.2684380046 * u + 2.6097574011 * m - 0.3413193965 * l, -0.0041960863 * u - 0.7034186147 * m + 1.707614701 * l];
}
var U = (t) => t.every((e) => e >= -1e-4 && e <= 1.0001);
function Q(t) {
let e = R(t);
if (!U(e)) {
let n = 0, a = t.c;
for (let o = 0; o < 12; o++) {
let r2 = (n + a) / 2;
if (U(R({ ...t, c: r2 }))) n = r2;
else a = r2;
}
e = R({ ...t, c: n });
}
return e.map((n) => Math.min(1, Math.max(0, n)));
}
function q(t) {
let [e, n, a] = Q(t);
return 0.2126 * e + 0.7152 * n + 0.0722 * a;
}
function B(t, e) {
let n = q(t), a = q(e);
return (Math.max(n, a) + 0.05) / (Math.min(n, a) + 0.05);
}
function v(t, e, n) {
if (B(t, e) >= n) return t;
let a = t.l >= e.l ? 1 : -1;
for (let s of [a, -a]) {
let c = { ...t };
for (let i = 0; i < 60; i++) {
if (c.l = Math.min(1, Math.max(0, c.l + s * 0.02)), B(c, e) >= n) return c;
if (c.l === 0 || c.l === 1) break;
}
}
let o = { ...t, l: 0, c: 0 }, r2 = { ...t, l: 1, c: 0 };
return B(o, e) >= B(r2, e) ? o : r2;
}
function T(t) {
return "#" + Q(t).map((e) => {
let n = e <= 31308e-7 ? 12.92 * e : 1.055 * Math.pow(e, 0.4166666666666667) - 0.055;
return Math.round(n * 255).toString(16).padStart(2, "0");
}).join("");
}
var K = [[0.2, { l: 0.86, c: 0.085 }], [0.36, { l: 0.9, c: 0.028 }], [0.62, { l: 0.73, c: 0.135 }], [0.8, { l: 0.62, c: 0.165 }], [0.93, { l: 0.87, c: 0.16 }], [1, { l: 0.34, c: 0.035 }]];
var At = (t) => {
var _a;
return ((_a = K.find(([e]) => t < e)) == null ? void 0 : _a[1]) ?? K[0][1];
};
var J = { l: 0.145, c: 0, h: 0 };
var W = 1.5;
var Rt = (t, e) => {
let n = At(e), a = v({ l: n.l, c: n.c, h: t }, J, W);
return { bg: { l: 0.965, c: 0.01, h: t }, head: a, eye: a.l >= 0.5 ? { l: 0.17, c: 0.02, h: t } : { l: 0.97, c: 0.012, h: t } };
};
var Ht = [["head", "bg", 1.25], ["eye", "head", 4.5]];
function Ft(t, e = true, n = 0) {
let a = Rt(t, n);
if (e) for (let [o, r2, s] of Ht) a[o] = v(a[o], a[r2], s);
return a;
}
function tt(t, e = true, n = 0) {
let a = Ft(t, e, n), o = {};
for (let r2 in a) o[r2] = T(a[r2]);
return o;
}
var y = (t) => {
let e = Math.round(t * 100) / 100;
return Object.is(e, -0) ? "0" : String(e);
};
function P({ cx: t, cy: e, rx: n, ry: a, n: o = 4, rot: r2 = 0 }) {
let s = Math.min(1, (8 * Math.pow(2, -1 / o) - 4) / 3), c = n, i = a, u = c * s, m = i * s, l = [[c, 0], [c, m], [u, i], [0, i], [-u, i], [-c, m], [-c, 0], [-c, -m], [-u, -i], [0, -i], [u, -i], [c, -m], [c, 0]], b = r2 * Math.PI / 180, p = Math.cos(b), d = Math.sin(b), g = (x) => {
let [f, M] = l[x];
return `${y(t + f * p - M * d)} ${y(e + f * d + M * p)}`;
}, h = `M${g(0)}`;
for (let x = 1; x < 13; x += 3) h += `C${g(x)} ${g(x + 1)} ${g(x + 2)}`;
return h + "Z";
}
function et(t, e, n, a, o, r2 = 0) {
let s = o.length, c = r2 * Math.PI / 180, i = o.map((l, b) => {
let p = c + 2 * Math.PI * b / s;
return [t + n * l * Math.cos(p), e + a * l * Math.sin(p)];
}), u = (l) => i[(l % s + s) % s], m = `M${y(u(0)[0])} ${y(u(0)[1])}`;
for (let l = 0; l < s; l++) {
let [b, p] = u(l - 1), [d, g] = u(l), [h, x] = u(l + 1), [f, M] = u(l + 2);
m += `C${y(d + (h - b) / 6)} ${y(g + (x - p) / 6)} ${y(h - (f - d) / 6)} ${y(x - (M - g) / 6)} ${y(h)} ${y(x)}`;
}
return m + "Z";
}
function nt({ cx: t, cy: e, rx: n, ry: a, sides: o, round: r2 = 0.3, rot: s = 0 }) {
let c = r2 > 0 ? r2 < 1 ? r2 / 2 : 0.5 : 0, i = s * Math.PI / 180 - Math.PI / 2, u = Array.from({ length: o }, (p, d) => {
let g = i + 2 * Math.PI * d / o;
return [t + n * Math.cos(g), e + a * Math.sin(g)];
}), m = (p) => u[(p % o + o) % o], l = (p, d) => {
let [g, h] = m(p), [x, f] = m(d);
return `${y(g + (x - g) * c)} ${y(h + (f - h) * c)}`;
}, b = `M${l(0, -1)}`;
for (let p = 0; p < o; p++) {
let [d, g] = m(p);
if (b += `Q${y(d)} ${y(g)} ${l(p, p + 1)}`, c < 0.5) b += `L${l(p + 1, p)}`;
}
return b + "Z";
}
function rt(t, e, n, a) {
let o = y(t - n), r2 = y(t + n);
return `M${o} ${y(e - a)}H${r2}V${y(e + a)}H${o}Z`;
}
function ot(t, e, n, a, o) {
let r2 = Math.max(1.05, o), s = n * Math.sqrt(1 - 1 / (r2 * r2)), c = e - a / r2, i = e - r2 * a, u = s * 0.14, m = c + 0.86 * (i - c);
return `M${y(t - s)} ${y(c)}L${y(t - u)} ${y(m)}Q${y(t)} ${y(i)} ${y(t + u)} ${y(m)}L${y(t + s)} ${y(c)}Z`;
}
function H(t, e) {
for (let n = 0; n < e.length; n++) t = Math.imul(t ^ e[n], 3432918353), t = t << 13 | t >>> 19;
return t;
}
function jt(t) {
return t = Math.imul(t ^ t >>> 16, 2246822507), t = Math.imul(t ^ t >>> 13, 3266489909), (t ^ t >>> 16) >>> 0;
}
var at = new TextEncoder();
function _t(t) {
return t.normalize("NFC").trim().toLowerCase();
}
function st(t, e = true) {
let n = e ? _t(t) : t;
return H(1779033703 ^ n.length, at.encode(n));
}
function F(t, e) {
return jt(H(H(t, Uint8Array.of(255)), at.encode(e))) / 4294967296;
}
function ct(t, e = true, n) {
let a = st(t, e), o = (r2) => {
let s = n == null ? void 0 : n[r2], c = Array.isArray(s) ? s[Math.floor(F(a, r2) * s.length)] : s;
return c === void 0 ? F(a, r2) : c > 0 ? c < 1 ? c : 0.999999 : 0;
};
return o.num = (r2, s, c) => s + o(r2) * (c - s), o.int = (r2, s, c) => s + Math.floor(o(r2) * (c - s + 1)), o.pick = (r2, s) => s[Math.floor(o(r2) * s.length)], o.bool = (r2, s = 0.5) => o(r2) < s, o.jitter = (r2, s) => (o(r2) * 2 - 1) * s, o;
}
function I(t, e, n) {
let a = e.expression;
if (n || !a) return { l: t, wrap: "" };
return a.bake(t, a.p);
}
var j = (t, e) => (e == null ? void 0 : e.tint) ? e.tint(t, e.p) : t;
var it = (t, e) => e ? `<g transform="${e}">${t}</g>` : t;
var Ct = (t) => t.replace(/[&<>]/g, (e) => e === "&" ? "&amp;" : e === "<" ? "&lt;" : "&gt;");
function O(t, e) {
let n = ct(t, e.normalize ?? true, e.traits);
return { t: n, palette: { ...tt(e.hue ?? n.num("hue", 0, 360), e.contrast ?? true, e.tone ?? n("tone")), ...e.palette } };
}
var Vt = (t) => t.title ? `<title>${Ct(t.title)}</title>` : "";
function w(t, e, n) {
let a = e.background ?? t.background;
if (a === false) return;
return { d: a === "square" ? "M0 0H100V100H0Z" : P({ cx: 50, cy: 50, rx: 50, ry: 50, n: a === "circle" ? 2 : 6 }), fill: n.bg };
}
var Xt = (t) => t ? `<path d="${t.d}" fill="${t.fill}"/>` : "";
function lt(t) {
return (e, n = {}) => {
let { t: a, palette: o } = O(e, n), r2 = j(o, n.expression), s = n.size ? ` width="${n.size}" height="${n.size}"` : "", c = I(t.layout(a), n), i = Vt(n) + Xt(w(t, n, r2)) + it(t.render(c.l, r2), c.wrap);
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"${s}>${i}</svg>`;
};
}
function ut(t) {
return (e, n = {}, a) => {
let { t: o, palette: r2 } = O(e, n), s = a == null ? void 0 : a(o, r2), c = I(t.layout(o), n, s);
return { cls: s == null ? void 0 : s.cls, bg: w(t, n, r2), inner: it(t.render(c.l, r2, !!s), c.wrap), vars: s == null ? void 0 : s.vars };
};
}
var mt = (t, e, n) => {
let a = e.rx, o = t.num("eye.rx", 0.075, 0.105) * a, r2 = t.num("eye.ratio", 1.9, 3.2), s = t.num("eye.scale", 0.78, 1.24), c = t.num("eye.stretch", 0.85, 1.18), i = t.num("eye.gap", 0.1, 0.24) * a, u = o * Math.max(1, s), m = o * r2 * Math.max(1, s * c), l = u + a * 0.03 + i, b = t.jitter("gaze.x", 0.09) * n.rx, p = t.num("gaze.y", -0.2, 0.08) * n.ry, d = t.jitter("eye.dy", 0.04) * n.ry, g = Math.hypot(u, m), h = Math.hypot((Math.abs(b) + l + g) / n.rx, (Math.abs(p) + Math.abs(d) + g) / n.ry), x = h > 0.9 ? 0.9 / h : 1, f = o * x, M = f * r2, L = l * x, A = Math.max(0, Math.min(1, i / m)), Lt = Math.min(12, Math.asin(A) * 180 / Math.PI), X = t.num("eye.lean", -1, 1) * Lt, vt = Math.max(-12, Math.min(12, X + t.jitter("eye.lean2", 3.5))), Y = n.cx + b * x, z = n.cy + p * x;
return [{ cx: Y - L, cy: z, rx: f, ry: M, n: t.num("eye.n", 3.5, 6), rot: X }, { cx: Y + L, cy: z + d * x, rx: f * s, ry: M * s * c, n: t.num("eye.n", 3.5, 6), rot: vt }];
};
function pt(t, e) {
let n = (r2) => (t.find(([, s]) => r2 < s) ?? t[t.length - 1])[0];
function a(r2) {
var _a, _b, _c;
let s = n(r2("shape")), c = r2.num("body.r", 31, 38) * s.core, i = { cx: 50 + r2.jitter("body.x", 1.5), cy: 50 + r2.jitter("body.y", 1.5), rx: c, ry: c * r2.num("body.ratio", 0.92, 1.08), n: r2.num("body.n", 1.9, 2.5), rot: 0, radii: Array.from({ length: r2.int("body.pts", 6, 8) }, (l, b) => 1 + r2.jitter(`body.r${b}`, 0.16)) };
(_a = s.body) == null ? void 0 : _a.call(s, r2, i);
let u = ((_b = s.face) == null ? void 0 : _b.call(s, i)) ?? i, m = { petals: [], extra: [] };
return (_c = s.decorate) == null ? void 0 : _c.call(s, r2, i, m), { shape: s.name, draw: s.path, body: i, face: u, petals: m.petals, extra: m.extra, eyes: e(r2, i, u) };
}
function o(r2, s, c) {
let i = (l) => Math.round(l * 100) / 100, u = (l, b) => {
let p = `<path d="${P(l)}"/>`;
return c ? `<g class="mo-eye" style="--mo-wrap:${b ? 1 : -1};--mo-lean:${i(l.rot)};transform-origin:${i(l.cx)}px ${i(l.cy)}px">${p}</g>` : p;
}, m = `<g fill="${s.head}">` + r2.petals.map((l) => `<circle cx="${i(l.cx)}" cy="${i(l.cy)}" r="${i(l.r)}"/>`).join("") + r2.extra.map((l) => `<path d="${l}"/>`).join("") + `<path d="${r2.draw ? r2.draw(r2.body) : P(r2.body)}"/></g><g fill="${s.eye}"${c ? ' class="mo-eyes"' : ""}>` + r2.eyes.map(u).join("") + "</g>";
return c ? `<g class="mo-breathe"><g class="mo-bob">${m}</g></g>` : m;
}
return { layout: a, render: o, background: false };
}
var yt = (t) => nt(t);
var bt = (t) => et(t.cx, t.cy, t.rx, t.ry, t.radii, t.rot);
var C = (t) => (e) => ({ cx: e.cx, cy: e.cy, rx: e.rx * t, ry: e.ry * t });
var ht = (t) => C(Math.min(...t.radii) * 0.95)(t);
var Yt = (t) => C(0.84)(t);
var xt = { name: "round", core: 1 };
var dt = { name: "organic", core: 0.98, path: bt, face: ht };
var gt = { name: "boxy", core: 0.86, body: (t, e) => {
e.n = t.num("body.n", 3.4, 6), e.rot = t.num("body.rot", -20, 20);
} };
var ft = { name: "capsule", core: 1.02, body: (t, e) => {
e.ry *= t.num("capsule.squat", 0.55, 0.68);
}, face: C(0.94), decorate: (t, e, n) => {
for (let a of [-1, 1]) n.petals.push({ cx: e.cx + a * (e.rx - e.ry), cy: e.cy, r: e.ry });
}, path: (t) => rt(t.cx, t.cy, t.rx - t.ry, t.ry) };
var Mt = { name: "nub", core: 0.88, decorate: (t, e, n) => {
let a = t.int("nub.n", 1, 2);
for (let o = 0; o < a; o++) {
let r2 = t.num(`nub.a${o}`, 0, 2 * Math.PI);
n.petals.push({ cx: e.cx + Math.cos(r2) * e.rx * 0.88, cy: e.cy + Math.sin(r2) * e.rx * 0.88, r: e.rx * t.num(`nub.r${o}`, 0.24, 0.4) });
}
} };
var kt = { name: "cloud", core: 0.78, face: ht, path: bt, decorate: (t, e, n) => {
let a = t.int("cloud.n", 4, 6);
for (let o = 0; o < a; o++) {
let r2 = Math.PI + Math.PI * (o + 0.5) / a;
n.petals.push({ cx: e.cx + Math.cos(r2) * e.rx * 0.8, cy: e.cy + Math.sin(r2) * e.rx * 0.5, r: e.rx * t.num(`cloud.r${o}`, 0.44, 0.62) });
}
} };
var $t = { name: "droplet", core: 0.78, body: (t, e) => {
e.cy += 0.22 * e.ry, e.n = 2;
}, face: (t) => ({ cx: t.cx, cy: t.cy + t.ry * 0.05, rx: t.rx * 0.88, ry: t.ry * 0.88 }), decorate: (t, e, n) => {
n.extra.push(ot(e.cx, e.cy, e.rx, e.ry, t.num("droplet.tip", 1.4, 1.65)));
} };
var Pt = { name: "hexagon", core: 1.05, path: yt, face: Yt, body: (t, e) => {
e.sides = 6, e.rot = t.num("body.rot", -12, 12), e.round = t.num("poly.round", 0.24, 0.5);
} };
var St = { name: "sun", core: 0.7, decorate: (t, e, n) => {
let a = t.int("sun.n", 6, 9), o = e.rx * t.num("sun.dist", 1, 1.08), r2 = e.rx * t.num("sun.r", 0.2, 0.26), s = t.num("sun.rot", 0, 2 * Math.PI);
for (let c = 0; c < a; c++) {
let i = s + 2 * Math.PI * c / a;
n.petals.push({ cx: e.cx + Math.cos(i) * o, cy: e.cy + Math.sin(i) * o, r: r2 });
}
} };
var Ot = { name: "triangle", core: 1.15, path: yt, body: (t, e) => {
e.sides = 3, e.rot = t.num("body.rot", -5, 5), e.round = t.num("poly.round", 0.24, 0.5);
}, face: (t) => ({ cx: t.cx, cy: t.cy + t.ry * 0.1, rx: t.rx * 0.54, ry: t.ry * 0.36 }) };
var zt = [[xt, 0.22], [dt, 0.48], [gt, 0.6], [ft, 0.7], [Mt, 0.79], [kt, 0.86], [$t, 0.915], [Pt, 0.95], [St, 0.98], [Ot, 1]];
var k = pt(zt, mt);
var Bt = lt(k);
var Gt = (t, e) => (n, a) => {
let o = e ? e.vars(e.p) : {}, r2 = (e == null ? void 0 : e.tint) ? e.tint(a, e.p) : a;
return { cls: G(t, !!Object.keys(o).length || !!(e == null ? void 0 : e.tint)), vars: { ...N(n), "--mo-head": r2.head, "--mo-eye": r2.eye, ...o } };
};
function Tt(t, e = {}) {
return ut(k)(t, e, e.animate && Gt(e.animate, e.expression));
}
function wt(t, e) {
return "data:image/svg+xml," + Bt(t, e).replace(/"/g, "'").replace(/[%#<>{}|\\^[\]`]/g, (a) => "%" + a.charCodeAt(0).toString(16).toUpperCase()).replace(/\s+/g, " ");
}
function Le({ name: t, size: e, background: n, palette: a, hue: o, tone: r2, normalize: s, contrast: c, title: i, animate: u, expression: m, traits: l, ...b }) {
let p = { size: e, background: n, palette: a, hue: o, tone: r2, normalize: s, contrast: c, title: i, expression: m, traits: l }, d = JSON.stringify([t, p, u]), g = (0, import_react.useMemo)(() => u ? "" : wt(t, p), [d]), h = (0, import_react.useMemo)(() => u ? Tt(t, { ...p, animate: u }) : null, [d]), x = (0, import_react.useMemo)(() => ({ __html: (h == null ? void 0 : h.inner) ?? "" }), [h == null ? void 0 : h.inner]);
if (h) {
let { style: L, ...A } = b;
return (0, import_jsx_runtime.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 100 100", width: e, height: e, role: i ? "img" : void 0, "aria-hidden": i ? void 0 : true, style: { ...h.vars, ...L }, ...A, children: [i ? (0, import_jsx_runtime.jsx)("title", { children: i }) : null, h.bg ? (0, import_jsx_runtime.jsx)("path", { d: h.bg.d, fill: h.bg.fill }) : null, (0, import_jsx_runtime.jsx)("g", { className: h.cls, dangerouslySetInnerHTML: x })] });
}
let { alt: f, ...M } = b;
return (0, import_jsx_runtime.jsx)("img", { src: g, width: e, height: e, alt: f ?? i ?? "", ...M });
}
// node_modules/@blobatar/react/dist/index.js
var r = Le;
export {
r as Blobatar
};
/*! Bundled license information:
react/cjs/react-jsx-runtime.development.js:
(**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
*/
//# sourceMappingURL=@blobatar_react.js.map