@storybook/core
Version:
Storybook framework-agnostic API
1,624 lines (1,540 loc) • 1.09 MB
JavaScript
"use strict";
var Ib = Object.create;
var Gi = Object.defineProperty;
var Tb = Object.getOwnPropertyDescriptor;
var _b = Object.getOwnPropertyNames;
var Lb = Object.getPrototypeOf, Bb = Object.prototype.hasOwnProperty;
var o = (e, t) => Gi(e, "name", { value: t, configurable: !0 });
var Be = (e, t) => () => (e && (t = e(e = 0)), t);
var G = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), _o = (e, t) => {
for (var r in t)
Gi(e, r, { get: t[r], enumerable: !0 });
}, Dh = (e, t, r, n) => {
if (t && typeof t == "object" || typeof t == "function")
for (let l of _b(t))
!Bb.call(e, l) && l !== r && Gi(e, l, { get: () => t[l], enumerable: !(n = Tb(t, l)) || n.enumerable });
return e;
};
var X = (e, t, r) => (r = e != null ? Ib(Lb(e)) : {}, Dh(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
t || !e || !e.__esModule ? Gi(r, "default", { value: e, enumerable: !0 }) : r,
e
)), vr = (e) => Dh(Gi({}, "__esModule", { value: !0 }), e);
// ../node_modules/@babel/runtime/helpers/extends.js
var hu = G((uB, vn) => {
function np() {
return vn.exports = np = 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;
}, vn.exports.__esModule = !0, vn.exports.default = vn.exports, np.apply(null, arguments);
}
o(np, "_extends");
vn.exports = np, vn.exports.__esModule = !0, vn.exports.default = vn.exports;
});
// ../node_modules/@babel/runtime/helpers/assertThisInitialized.js
var xh = G((pB, Yi) => {
function Mb(e) {
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
o(Mb, "_assertThisInitialized");
Yi.exports = Mb, Yi.exports.__esModule = !0, Yi.exports.default = Yi.exports;
});
// ../node_modules/@babel/runtime/helpers/setPrototypeOf.js
var mu = G((fB, wn) => {
function op(e, t) {
return wn.exports = op = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
return r.__proto__ = n, r;
}, wn.exports.__esModule = !0, wn.exports.default = wn.exports, op(e, t);
}
o(op, "_setPrototypeOf");
wn.exports = op, wn.exports.__esModule = !0, wn.exports.default = wn.exports;
});
// ../node_modules/@babel/runtime/helpers/inheritsLoose.js
var Ch = G((mB, Xi) => {
var Pb = mu();
function Hb(e, t) {
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Pb(e, t);
}
o(Hb, "_inheritsLoose");
Xi.exports = Hb, Xi.exports.__esModule = !0, Xi.exports.default = Xi.exports;
});
// ../node_modules/@babel/runtime/helpers/getPrototypeOf.js
var Eh = G((vB, bn) => {
function ap(e) {
return bn.exports = ap = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
return t.__proto__ || Object.getPrototypeOf(t);
}, bn.exports.__esModule = !0, bn.exports.default = bn.exports, ap(e);
}
o(ap, "_getPrototypeOf");
bn.exports = ap, bn.exports.__esModule = !0, bn.exports.default = bn.exports;
});
// ../node_modules/@babel/runtime/helpers/isNativeFunction.js
var Sh = G((bB, Zi) => {
function Ob(e) {
try {
return Function.toString.call(e).indexOf("[native code]") !== -1;
} catch {
return typeof e == "function";
}
}
o(Ob, "_isNativeFunction");
Zi.exports = Ob, Zi.exports.__esModule = !0, Zi.exports.default = Zi.exports;
});
// ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js
var Rh = G((DB, yn) => {
function Ah() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
}));
} catch {
}
return (yn.exports = Ah = /* @__PURE__ */ o(function() {
return !!e;
}, "_isNativeReflectConstruct"), yn.exports.__esModule = !0, yn.exports.default = yn.exports)();
}
o(Ah, "_isNativeReflectConstruct");
yn.exports = Ah, yn.exports.__esModule = !0, yn.exports.default = yn.exports;
});
// ../node_modules/@babel/runtime/helpers/construct.js
var kh = G((CB, Ki) => {
var zb = Rh(), Nb = mu();
function qb(e, t, r) {
if (zb()) return Reflect.construct.apply(null, arguments);
var n = [null];
n.push.apply(n, t);
var l = new (e.bind.apply(e, n))();
return r && Nb(l, r.prototype), l;
}
o(qb, "_construct");
Ki.exports = qb, Ki.exports.__esModule = !0, Ki.exports.default = Ki.exports;
});
// ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js
var Fh = G((SB, Dn) => {
var jb = Eh(), Vb = mu(), $b = Sh(), Wb = kh();
function ip(e) {
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
return Dn.exports = ip = /* @__PURE__ */ o(function(n) {
if (n === null || !$b(n)) return n;
if (typeof n != "function") throw new TypeError("Super expression must either be null or a function");
if (t !== void 0) {
if (t.has(n)) return t.get(n);
t.set(n, l);
}
function l() {
return Wb(n, arguments, jb(this).constructor);
}
return o(l, "Wrapper"), l.prototype = Object.create(n.prototype, {
constructor: {
value: l,
enumerable: !1,
writable: !0,
configurable: !0
}
}), Vb(l, n);
}, "_wrapNativeSuper"), Dn.exports.__esModule = !0, Dn.exports.default = Dn.exports, ip(e);
}
o(ip, "_wrapNativeSuper");
Dn.exports = ip, Dn.exports.__esModule = !0, Dn.exports.default = Dn.exports;
});
// ../node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js
var Ih = G((RB, Ji) => {
function Ub(e, t) {
return t || (t = e.slice(0)), e.raw = t, e;
}
o(Ub, "_taggedTemplateLiteralLoose");
Ji.exports = Ub, Ji.exports.__esModule = !0, Ji.exports.default = Ji.exports;
});
// ../node_modules/polished/dist/polished.cjs.js
var Fa = G((ne) => {
"use strict";
Object.defineProperty(ne, "__esModule", { value: !0 });
var Gb = hu(), Yb = xh(), Xb = Ch(), Zb = Fh(), Kb = Ih();
function rl(e) {
return e && typeof e == "object" && "default" in e ? e : { default: e };
}
o(rl, "_interopDefaultLegacy");
var Je = /* @__PURE__ */ rl(Gb), Jb = /* @__PURE__ */ rl(Yb), Qb = /* @__PURE__ */ rl(Xb), ey = /* @__PURE__ */ rl(Zb), $h = /* @__PURE__ */ rl(
Kb);
function Th() {
var e;
return e = arguments.length - 1, e < 0 || arguments.length <= e ? void 0 : arguments[e];
}
o(Th, "last");
function ty(e) {
return -e;
}
o(ty, "negation");
function ry(e, t) {
return e + t;
}
o(ry, "addition");
function ny(e, t) {
return e - t;
}
o(ny, "subtraction");
function oy(e, t) {
return e * t;
}
o(oy, "multiplication");
function ay(e, t) {
return e / t;
}
o(ay, "division");
function iy() {
return Math.max.apply(Math, arguments);
}
o(iy, "max");
function ly() {
return Math.min.apply(Math, arguments);
}
o(ly, "min");
function sy() {
return Array.of.apply(Array, arguments);
}
o(sy, "comma");
var uy = {
symbols: {
"*": {
infix: {
symbol: "*",
f: oy,
notation: "infix",
precedence: 4,
rightToLeft: 0,
argCount: 2
},
symbol: "*",
regSymbol: "\\*"
},
"/": {
infix: {
symbol: "/",
f: ay,
notation: "infix",
precedence: 4,
rightToLeft: 0,
argCount: 2
},
symbol: "/",
regSymbol: "/"
},
"+": {
infix: {
symbol: "+",
f: ry,
notation: "infix",
precedence: 2,
rightToLeft: 0,
argCount: 2
},
prefix: {
symbol: "+",
f: Th,
notation: "prefix",
precedence: 3,
rightToLeft: 0,
argCount: 1
},
symbol: "+",
regSymbol: "\\+"
},
"-": {
infix: {
symbol: "-",
f: ny,
notation: "infix",
precedence: 2,
rightToLeft: 0,
argCount: 2
},
prefix: {
symbol: "-",
f: ty,
notation: "prefix",
precedence: 3,
rightToLeft: 0,
argCount: 1
},
symbol: "-",
regSymbol: "-"
},
",": {
infix: {
symbol: ",",
f: sy,
notation: "infix",
precedence: 1,
rightToLeft: 0,
argCount: 2
},
symbol: ",",
regSymbol: ","
},
"(": {
prefix: {
symbol: "(",
f: Th,
notation: "prefix",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: "(",
regSymbol: "\\("
},
")": {
postfix: {
symbol: ")",
f: void 0,
notation: "postfix",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: ")",
regSymbol: "\\)"
},
min: {
func: {
symbol: "min",
f: ly,
notation: "func",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: "min",
regSymbol: "min\\b"
},
max: {
func: {
symbol: "max",
f: iy,
notation: "func",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: "max",
regSymbol: "max\\b"
}
}
}, _h = uy, cy = {
1: `Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation:\
0.4, lightness: 0.75 }).
`,
2: `Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, satu\
ration: 0.4, lightness: 0.75, alpha: 0.7 }).
`,
3: `Passed an incorrect argument to a color function, please pass a string representation of a color.
`,
4: `Couldn't generate valid rgb string from %s, it returned %s.
`,
5: `Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.
`,
6: `Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, \
blue: 100 }).
`,
7: `Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green\
: 205, blue: 100, alpha: 0.75 }).
`,
8: `Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.
`,
9: `Please provide a number of steps to the modularScale helper.
`,
10: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
`,
11: `Invalid value passed as base to modularScale, expected number or em string but got "%s"
`,
12: `Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.
`,
13: `Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.
`,
14: `Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.
`,
15: `Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.
`,
16: `You must provide a template to this method.
`,
17: `You passed an unsupported selector state to this method.
`,
18: `minScreen and maxScreen must be provided as stringified numbers with the same units.
`,
19: `fromSize and toSize must be provided as stringified numbers with the same units.
`,
20: `expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
`,
21: "expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
22: "expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
23: `fontFace expects a name of a font-family.
`,
24: `fontFace expects either the path to the font file(s) or a name of a local copy.
`,
25: `fontFace expects localFonts to be an array.
`,
26: `fontFace expects fileFormats to be an array.
`,
27: `radialGradient requries at least 2 color-stops to properly render.
`,
28: `Please supply a filename to retinaImage() as the first argument.
`,
29: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
`,
30: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
31: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation
`,
32: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])
To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')
`,
33: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation
`,
34: `borderRadius expects a radius value as a string or number as the second argument.
`,
35: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
`,
36: `Property must be a string value.
`,
37: `Syntax Error at %s.
`,
38: `Formula contains a function that needs parentheses at %s.
`,
39: `Formula is missing closing parenthesis at %s.
`,
40: `Formula has too many closing parentheses at %s.
`,
41: `All values in a formula must have the same unit or be unitless.
`,
42: `Please provide a number of steps to the modularScale helper.
`,
43: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
`,
44: `Invalid value passed as base to modularScale, expected number or em/rem string but got %s.
`,
45: `Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.
`,
46: `Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.
`,
47: `minScreen and maxScreen must be provided as stringified numbers with the same units.
`,
48: `fromSize and toSize must be provided as stringified numbers with the same units.
`,
49: `Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
`,
50: `Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.
`,
51: `Expects the first argument object to have the properties prop, fromSize, and toSize.
`,
52: `fontFace expects either the path to the font file(s) or a name of a local copy.
`,
53: `fontFace expects localFonts to be an array.
`,
54: `fontFace expects fileFormats to be an array.
`,
55: `fontFace expects a name of a font-family.
`,
56: `linearGradient requries at least 2 color-stops to properly render.
`,
57: `radialGradient requries at least 2 color-stops to properly render.
`,
58: `Please supply a filename to retinaImage() as the first argument.
`,
59: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
`,
60: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
61: `Property must be a string value.
`,
62: `borderRadius expects a radius value as a string or number as the second argument.
`,
63: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
`,
64: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.
`,
65: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animat\
ion please supply them in simple values, e.g. animation('rotate', '2s').
`,
66: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.
`,
67: `You must provide a template to this method.
`,
68: `You passed an unsupported selector state to this method.
`,
69: `Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.
`,
70: `Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.
`,
71: `Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.
`,
72: `Passed invalid base value %s to %s(), please pass a value like "12px" or 12.
`,
73: `Please provide a valid CSS variable.
`,
74: `CSS variable not found and no default was provided.
`,
75: `important requires a valid style object, got a %s instead.
`,
76: `fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.
`,
77: `remToPx expects a value in "rem" but you provided it in "%s".
`,
78: `base must be set in "px" or "%" but you set it in "%s".
`
};
function py() {
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
t[r] = arguments[r];
var n = t[0], l = [], p;
for (p = 1; p < t.length; p += 1)
l.push(t[p]);
return l.forEach(function(m) {
n = n.replace(/%[a-z]/, m);
}), n;
}
o(py, "format");
var de = /* @__PURE__ */ function(e) {
Qb.default(t, e);
function t(r) {
var n;
if (process.env.NODE_ENV === "production")
n = e.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + r +
" for more information.") || this;
else {
for (var l = arguments.length, p = new Array(l > 1 ? l - 1 : 0), m = 1; m < l; m++)
p[m - 1] = arguments[m];
n = e.call(this, py.apply(void 0, [cy[r]].concat(p))) || this;
}
return Jb.default(n);
}
return o(t, "PolishedError"), t;
}(/* @__PURE__ */ ey.default(Error)), Lh = /((?!\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\D|$)|ged|darg?|nrut)/g;
function dy(e) {
var t = {};
return t.symbols = e ? Je.default({}, _h.symbols, e.symbols) : Je.default({}, _h.symbols), t;
}
o(dy, "mergeSymbolMaps");
function Bh(e, t) {
var r, n = e.pop();
return t.push(n.f.apply(n, (r = []).concat.apply(r, t.splice(-n.argCount)))), n.precedence;
}
o(Bh, "exec");
function fy(e, t) {
var r = dy(t), n, l = [r.symbols["("].prefix], p = [], m = new RegExp(
// Pattern for numbers
"\\d+(?:\\.\\d+)?|" + // ...and patterns for individual operators/function names
Object.keys(r.symbols).map(function(R) {
return r.symbols[R];
}).sort(function(R, T) {
return T.symbol.length - R.symbol.length;
}).map(function(R) {
return R.regSymbol;
}).join("|") + "|(\\S)",
"g"
);
m.lastIndex = 0;
var h = !1;
do {
n = m.exec(e);
var y = n || [")", void 0], b = y[0], C = y[1], E = r.symbols[b], S = E && !E.prefix && !E.func, L = !E || !E.postfix && !E.infix;
if (C || (h ? L : S))
throw new de(37, n ? n.index : e.length, e);
if (h) {
var O = E.postfix || E.infix;
do {
var F = l[l.length - 1];
if ((O.precedence - F.precedence || F.rightToLeft) > 0) break;
} while (Bh(l, p));
h = O.notation === "postfix", O.symbol !== ")" && (l.push(O), h && Bh(l, p));
} else if (E) {
if (l.push(E.prefix || E.func), E.func && (n = m.exec(e), !n || n[0] !== "("))
throw new de(38, n ? n.index : e.length, e);
} else
p.push(+b), h = !0;
} while (n && l.length);
if (l.length)
throw new de(39, n ? n.index : e.length, e);
if (n)
throw new de(40, n ? n.index : e.length, e);
return p.pop();
}
o(fy, "calculate");
function lp(e) {
return e.split("").reverse().join("");
}
o(lp, "reverseString");
function hy(e, t) {
var r = lp(e), n = r.match(Lh);
if (n && !n.every(function(p) {
return p === n[0];
}))
throw new de(41);
var l = lp(r.replace(Lh, ""));
return "" + fy(l, t) + (n ? lp(n[0]) : "");
}
o(hy, "math");
var my = /--[\S]*/g;
function gy(e, t) {
if (!e || !e.match(my))
throw new de(73);
var r;
if (typeof document < "u" && document.documentElement !== null && (r = getComputedStyle(document.documentElement).getPropertyValue(e)), r)
return r.trim();
if (t)
return t;
throw new de(74);
}
o(gy, "cssVar");
function Qi(e) {
return e.charAt(0).toUpperCase() + e.slice(1);
}
o(Qi, "capitalizeString");
var vy = ["Top", "Right", "Bottom", "Left"];
function wy(e, t) {
if (!e) return t.toLowerCase();
var r = e.split("-");
if (r.length > 1)
return r.splice(1, 0, t), r.reduce(function(l, p) {
return "" + l + Qi(p);
});
var n = e.replace(/([a-z])([A-Z])/g, "$1" + t + "$2");
return e === n ? "" + e + t : n;
}
o(wy, "generateProperty");
function by(e, t) {
for (var r = {}, n = 0; n < t.length; n += 1)
(t[n] || t[n] === 0) && (r[wy(e, vy[n])] = t[n]);
return r;
}
o(by, "generateStyles");
function Jn(e) {
for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
r[n - 1] = arguments[n];
var l = r[0], p = r[1], m = p === void 0 ? l : p, h = r[2], y = h === void 0 ? l : h, b = r[3], C = b === void 0 ? m : b, E = [l, m, y, C];
return by(e, E);
}
o(Jn, "directionalProperty");
function Mh(e, t) {
return e.substr(-t.length) === t;
}
o(Mh, "endsWith");
var yy = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
function pp(e) {
if (typeof e != "string") return e;
var t = e.match(yy);
return t ? parseFloat(e) : e;
}
o(pp, "stripUnit");
var Dy = /* @__PURE__ */ o(function(t) {
return function(r, n) {
n === void 0 && (n = "16px");
var l = r, p = n;
if (typeof r == "string") {
if (!Mh(r, "px"))
throw new de(69, t, r);
l = pp(r);
}
if (typeof n == "string") {
if (!Mh(n, "px"))
throw new de(70, t, n);
p = pp(n);
}
if (typeof l == "string")
throw new de(71, r, t);
if (typeof p == "string")
throw new de(72, n, t);
return "" + l / p + t;
};
}, "pxtoFactory"), Wh = Dy, xy = /* @__PURE__ */ Wh("em"), Cy = xy, Ey = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
function Xr(e) {
if (typeof e != "string") return [e, ""];
var t = e.match(Ey);
return t ? [parseFloat(e), t[2]] : [e, void 0];
}
o(Xr, "getValueAndUnit");
function Uh(e, t) {
if (typeof e != "object" || e === null)
throw new de(75, typeof e);
var r = {};
return Object.keys(e).forEach(function(n) {
typeof e[n] == "object" && e[n] !== null ? r[n] = Uh(e[n], t) : !t || t && (t === n || t.indexOf(n) >= 0) ? r[n] = e[n] + " !important" :
r[n] = e[n];
}), r;
}
o(Uh, "important");
var Gh = {
minorSecond: 1.067,
majorSecond: 1.125,
minorThird: 1.2,
majorThird: 1.25,
perfectFourth: 1.333,
augFourth: 1.414,
perfectFifth: 1.5,
minorSixth: 1.6,
goldenSection: 1.618,
majorSixth: 1.667,
minorSeventh: 1.778,
majorSeventh: 1.875,
octave: 2,
majorTenth: 2.5,
majorEleventh: 2.667,
majorTwelfth: 3,
doubleOctave: 4
};
function Sy(e) {
return Gh[e];
}
o(Sy, "getRatio");
function Ay(e, t, r) {
if (t === void 0 && (t = "1em"), r === void 0 && (r = 1.333), typeof e != "number")
throw new de(42);
if (typeof r == "string" && !Gh[r])
throw new de(43);
var n = typeof t == "string" ? Xr(t) : [t, ""], l = n[0], p = n[1], m = typeof r == "string" ? Sy(r) : r;
if (typeof l == "string")
throw new de(44, t);
return "" + l * Math.pow(m, e) + (p || "");
}
o(Ay, "modularScale");
var Ry = /* @__PURE__ */ Wh("rem"), ky = Ry, dp = 16;
function Yh(e) {
var t = Xr(e);
if (t[1] === "px")
return parseFloat(e);
if (t[1] === "%")
return parseFloat(e) / 100 * dp;
throw new de(78, t[1]);
}
o(Yh, "convertBase");
function Fy() {
if (typeof document < "u" && document.documentElement !== null) {
var e = getComputedStyle(document.documentElement).fontSize;
return e ? Yh(e) : dp;
}
return dp;
}
o(Fy, "getBaseFromDoc");
function Iy(e, t) {
var r = Xr(e);
if (r[1] !== "rem" && r[1] !== "")
throw new de(77, r[1]);
var n = t ? Yh(t) : Fy();
return r[0] * n + "px";
}
o(Iy, "remToPx");
var Ty = {
back: "cubic-bezier(0.600, -0.280, 0.735, 0.045)",
circ: "cubic-bezier(0.600, 0.040, 0.980, 0.335)",
cubic: "cubic-bezier(0.550, 0.055, 0.675, 0.190)",
expo: "cubic-bezier(0.950, 0.050, 0.795, 0.035)",
quad: "cubic-bezier(0.550, 0.085, 0.680, 0.530)",
quart: "cubic-bezier(0.895, 0.030, 0.685, 0.220)",
quint: "cubic-bezier(0.755, 0.050, 0.855, 0.060)",
sine: "cubic-bezier(0.470, 0.000, 0.745, 0.715)"
};
function _y(e) {
return Ty[e.toLowerCase().trim()];
}
o(_y, "easeIn");
var Ly = {
back: "cubic-bezier(0.680, -0.550, 0.265, 1.550)",
circ: "cubic-bezier(0.785, 0.135, 0.150, 0.860)",
cubic: "cubic-bezier(0.645, 0.045, 0.355, 1.000)",
expo: "cubic-bezier(1.000, 0.000, 0.000, 1.000)",
quad: "cubic-bezier(0.455, 0.030, 0.515, 0.955)",
quart: "cubic-bezier(0.770, 0.000, 0.175, 1.000)",
quint: "cubic-bezier(0.860, 0.000, 0.070, 1.000)",
sine: "cubic-bezier(0.445, 0.050, 0.550, 0.950)"
};
function By(e) {
return Ly[e.toLowerCase().trim()];
}
o(By, "easeInOut");
var My = {
back: "cubic-bezier(0.175, 0.885, 0.320, 1.275)",
cubic: "cubic-bezier(0.215, 0.610, 0.355, 1.000)",
circ: "cubic-bezier(0.075, 0.820, 0.165, 1.000)",
expo: "cubic-bezier(0.190, 1.000, 0.220, 1.000)",
quad: "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
quart: "cubic-bezier(0.165, 0.840, 0.440, 1.000)",
quint: "cubic-bezier(0.230, 1.000, 0.320, 1.000)",
sine: "cubic-bezier(0.390, 0.575, 0.565, 1.000)"
};
function Py(e) {
return My[e.toLowerCase().trim()];
}
o(Py, "easeOut");
function fp(e, t, r, n) {
r === void 0 && (r = "320px"), n === void 0 && (n = "1200px");
var l = Xr(e), p = l[0], m = l[1], h = Xr(t), y = h[0], b = h[1], C = Xr(r), E = C[0], S = C[1], L = Xr(n), O = L[0], F = L[1];
if (typeof E != "number" || typeof O != "number" || !S || !F || S !== F)
throw new de(47);
if (typeof p != "number" || typeof y != "number" || m !== b)
throw new de(48);
if (m !== S || b !== F)
throw new de(76);
var R = (p - y) / (E - O), T = y - R * O;
return "calc(" + T.toFixed(2) + (m || "") + " + " + (100 * R).toFixed(2) + "vw)";
}
o(fp, "between");
function Hy(e) {
var t;
e === void 0 && (e = "&");
var r = e + "::after";
return t = {}, t[r] = {
clear: "both",
content: '""',
display: "table"
}, t;
}
o(Hy, "clearFix");
function Oy(e) {
return e === void 0 && (e = 0), {
position: "absolute",
top: e,
right: e,
bottom: e,
left: e
};
}
o(Oy, "cover");
function zy(e, t) {
t === void 0 && (t = 1);
var r = {
display: "inline-block",
maxWidth: e || "100%",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
wordWrap: "normal"
};
return t > 1 ? Je.default({}, r, {
WebkitBoxOrient: "vertical",
WebkitLineClamp: t,
display: "-webkit-box",
whiteSpace: "normal"
}) : r;
}
o(zy, "ellipsis");
function Ny(e, t) {
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (r) return (r = r.call(e)).next.bind(r);
if (Array.isArray(e) || (r = qy(e)) || t && e && typeof e.length == "number") {
r && (e = r);
var n = 0;
return function() {
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
};
}
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
o(Ny, "_createForOfIteratorHelperLoose");
function qy(e, t) {
if (e) {
if (typeof e == "string") return Ph(e, t);
var r = Object.prototype.toString.call(e).slice(8, -1);
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Ph(e, t);
}
}
o(qy, "_unsupportedIterableToArray");
function Ph(e, t) {
(t == null || t > e.length) && (t = e.length);
for (var r = 0, n = new Array(t); r < t; r++)
n[r] = e[r];
return n;
}
o(Ph, "_arrayLikeToArray");
function jy(e, t, r) {
if (t === void 0 && (t = "320px"), r === void 0 && (r = "1200px"), !Array.isArray(e) && typeof e != "object" || e === null)
throw new de(49);
if (Array.isArray(e)) {
for (var n = {}, l = {}, p = Ny(e), m; !(m = p()).done; ) {
var h, y, b = m.value;
if (!b.prop || !b.fromSize || !b.toSize)
throw new de(50);
l[b.prop] = b.fromSize, n["@media (min-width: " + t + ")"] = Je.default({}, n["@media (min-width: " + t + ")"], (h = {}, h[b.prop] =
fp(b.fromSize, b.toSize, t, r), h)), n["@media (min-width: " + r + ")"] = Je.default({}, n["@media (min-width: " + r + ")"], (y = {},
y[b.prop] = b.toSize, y));
}
return Je.default({}, l, n);
} else {
var C, E, S;
if (!e.prop || !e.fromSize || !e.toSize)
throw new de(51);
return S = {}, S[e.prop] = e.fromSize, S["@media (min-width: " + t + ")"] = (C = {}, C[e.prop] = fp(e.fromSize, e.toSize, t, r), C), S["\
@media (min-width: " + r + ")"] = (E = {}, E[e.prop] = e.toSize, E), S;
}
}
o(jy, "fluidRange");
var Vy = /^\s*data:([a-z]+\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\-._~:@/?%\s]*\s*$/i, $y = {
woff: "woff",
woff2: "woff2",
ttf: "truetype",
otf: "opentype",
eot: "embedded-opentype",
svg: "svg",
svgz: "svg"
};
function Hh(e, t) {
return t ? ' format("' + $y[e] + '")' : "";
}
o(Hh, "generateFormatHint");
function Wy(e) {
return !!e.replace(/\s+/g, " ").match(Vy);
}
o(Wy, "isDataURI");
function Uy(e, t, r) {
if (Wy(e))
return 'url("' + e + '")' + Hh(t[0], r);
var n = t.map(function(l) {
return 'url("' + e + "." + l + '")' + Hh(l, r);
});
return n.join(", ");
}
o(Uy, "generateFileReferences");
function Gy(e) {
var t = e.map(function(r) {
return 'local("' + r + '")';
});
return t.join(", ");
}
o(Gy, "generateLocalReferences");
function Yy(e, t, r, n) {
var l = [];
return t && l.push(Gy(t)), e && l.push(Uy(e, r, n)), l.join(", ");
}
o(Yy, "generateSources");
function Xy(e) {
var t = e.fontFamily, r = e.fontFilePath, n = e.fontStretch, l = e.fontStyle, p = e.fontVariant, m = e.fontWeight, h = e.fileFormats, y = h ===
void 0 ? ["eot", "woff2", "woff", "ttf", "svg"] : h, b = e.formatHint, C = b === void 0 ? !1 : b, E = e.localFonts, S = E === void 0 ? [
t] : E, L = e.unicodeRange, O = e.fontDisplay, F = e.fontVariationSettings, R = e.fontFeatureSettings;
if (!t) throw new de(55);
if (!r && !S)
throw new de(52);
if (S && !Array.isArray(S))
throw new de(53);
if (!Array.isArray(y))
throw new de(54);
var T = {
"@font-face": {
fontFamily: t,
src: Yy(r, S, y, C),
unicodeRange: L,
fontStretch: n,
fontStyle: l,
fontVariant: p,
fontWeight: m,
fontDisplay: O,
fontVariationSettings: F,
fontFeatureSettings: R
}
};
return JSON.parse(JSON.stringify(T));
}
o(Xy, "fontFace");
function Zy() {
return {
textIndent: "101%",
overflow: "hidden",
whiteSpace: "nowrap"
};
}
o(Zy, "hideText");
function Ky() {
return {
border: "0",
clip: "rect(0 0 0 0)",
height: "1px",
margin: "-1px",
overflow: "hidden",
padding: "0",
position: "absolute",
whiteSpace: "nowrap",
width: "1px"
};
}
o(Ky, "hideVisually");
function Xh(e) {
return e === void 0 && (e = 1.3), `
@media only screen and (-webkit-min-device-pixel-ratio: ` + e + `),
only screen and (min--moz-device-pixel-ratio: ` + e + `),
only screen and (-o-min-device-pixel-ratio: ` + e + `/1),
only screen and (min-resolution: ` + Math.round(e * 96) + `dpi),
only screen and (min-resolution: ` + e + `dppx)
`;
}
o(Xh, "hiDPI");
function Zh(e) {
for (var t = "", r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
n[l - 1] = arguments[l];
for (var p = 0; p < e.length; p += 1)
if (t += e[p], p === n.length - 1 && n[p]) {
var m = n.filter(function(h) {
return !!h;
});
m.length > 1 ? (t = t.slice(0, -1), t += ", " + n[p]) : m.length === 1 && (t += "" + n[p]);
} else n[p] && (t += n[p] + " ");
return t.trim();
}
o(Zh, "constructGradientValue");
var Oh;
function Jy(e) {
var t = e.colorStops, r = e.fallback, n = e.toDirection, l = n === void 0 ? "" : n;
if (!t || t.length < 2)
throw new de(56);
return {
backgroundColor: r || t[0].replace(/,\s+/g, ",").split(" ")[0].replace(/,(?=\S)/g, ", "),
backgroundImage: Zh(Oh || (Oh = $h.default(["linear-gradient(", "", ")"])), l, t.join(", ").replace(/,(?=\S)/g, ", "))
};
}
o(Jy, "linearGradient");
function Qy() {
var e;
return [(e = {
html: {
lineHeight: "1.15",
textSizeAdjust: "100%"
},
body: {
margin: "0"
},
main: {
display: "block"
},
h1: {
fontSize: "2em",
margin: "0.67em 0"
},
hr: {
boxSizing: "content-box",
height: "0",
overflow: "visible"
},
pre: {
fontFamily: "monospace, monospace",
fontSize: "1em"
},
a: {
backgroundColor: "transparent"
},
"abbr[title]": {
borderBottom: "none",
textDecoration: "underline"
}
}, e[`b,
strong`] = {
fontWeight: "bolder"
}, e[`code,
kbd,
samp`] = {
fontFamily: "monospace, monospace",
fontSize: "1em"
}, e.small = {
fontSize: "80%"
}, e[`sub,
sup`] = {
fontSize: "75%",
lineHeight: "0",
position: "relative",
verticalAlign: "baseline"
}, e.sub = {
bottom: "-0.25em"
}, e.sup = {
top: "-0.5em"
}, e.img = {
borderStyle: "none"
}, e[`button,
input,
optgroup,
select,
textarea`] = {
fontFamily: "inherit",
fontSize: "100%",
lineHeight: "1.15",
margin: "0"
}, e[`button,
input`] = {
overflow: "visible"
}, e[`button,
select`] = {
textTransform: "none"
}, e[`button,
html [type="button"],
[type="reset"],
[type="submit"]`] = {
WebkitAppearance: "button"
}, e[`button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner`] = {
borderStyle: "none",
padding: "0"
}, e[`button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring`] = {
outline: "1px dotted ButtonText"
}, e.fieldset = {
padding: "0.35em 0.625em 0.75em"
}, e.legend = {
boxSizing: "border-box",
color: "inherit",
display: "table",
maxWidth: "100%",
padding: "0",
whiteSpace: "normal"
}, e.progress = {
verticalAlign: "baseline"
}, e.textarea = {
overflow: "auto"
}, e[`[type="checkbox"],
[type="radio"]`] = {
boxSizing: "border-box",
padding: "0"
}, e[`[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button`] = {
height: "auto"
}, e['[type="search"]'] = {
WebkitAppearance: "textfield",
outlineOffset: "-2px"
}, e['[type="search"]::-webkit-search-decoration'] = {
WebkitAppearance: "none"
}, e["::-webkit-file-upload-button"] = {
WebkitAppearance: "button",
font: "inherit"
}, e.details = {
display: "block"
}, e.summary = {
display: "list-item"
}, e.template = {
display: "none"
}, e["[hidden]"] = {
display: "none"
}, e), {
"abbr[title]": {
textDecoration: "underline dotted"
}
}];
}
o(Qy, "normalize");
var zh;
function e6(e) {
var t = e.colorStops, r = e.extent, n = r === void 0 ? "" : r, l = e.fallback, p = e.position, m = p === void 0 ? "" : p, h = e.shape, y = h ===
void 0 ? "" : h;
if (!t || t.length < 2)
throw new de(57);
return {
backgroundColor: l || t[0].split(" ")[0],
backgroundImage: Zh(zh || (zh = $h.default(["radial-gradient(", "", "", "", ")"])), m, y, n, t.join(", "))
};
}
o(e6, "radialGradient");
function t6(e, t, r, n, l) {
var p;
if (r === void 0 && (r = "png"), l === void 0 && (l = "_2x"), !e)
throw new de(58);
var m = r.replace(/^\./, ""), h = n ? n + "." + m : "" + e + l + "." + m;
return p = {
backgroundImage: "url(" + e + "." + m + ")"
}, p[Xh()] = Je.default({
backgroundImage: "url(" + h + ")"
}, t ? {
backgroundSize: t
} : {}), p;
}
o(t6, "retinaImage");
var r6 = {
easeInBack: "cubic-bezier(0.600, -0.280, 0.735, 0.045)",
easeInCirc: "cubic-bezier(0.600, 0.040, 0.980, 0.335)",
easeInCubic: "cubic-bezier(0.550, 0.055, 0.675, 0.190)",
easeInExpo: "cubic-bezier(0.950, 0.050, 0.795, 0.035)",
easeInQuad: "cubic-bezier(0.550, 0.085, 0.680, 0.530)",
easeInQuart: "cubic-bezier(0.895, 0.030, 0.685, 0.220)",
easeInQuint: "cubic-bezier(0.755, 0.050, 0.855, 0.060)",
easeInSine: "cubic-bezier(0.470, 0.000, 0.745, 0.715)",
easeOutBack: "cubic-bezier(0.175, 0.885, 0.320, 1.275)",
easeOutCubic: "cubic-bezier(0.215, 0.610, 0.355, 1.000)",
easeOutCirc: "cubic-bezier(0.075, 0.820, 0.165, 1.000)",
easeOutExpo: "cubic-bezier(0.190, 1.000, 0.220, 1.000)",
easeOutQuad: "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
easeOutQuart: "cubic-bezier(0.165, 0.840, 0.440, 1.000)",
easeOutQuint: "cubic-bezier(0.230, 1.000, 0.320, 1.000)",
easeOutSine: "cubic-bezier(0.390, 0.575, 0.565, 1.000)",
easeInOutBack: "cubic-bezier(0.680, -0.550, 0.265, 1.550)",
easeInOutCirc: "cubic-bezier(0.785, 0.135, 0.150, 0.860)",
easeInOutCubic: "cubic-bezier(0.645, 0.045, 0.355, 1.000)",
easeInOutExpo: "cubic-bezier(1.000, 0.000, 0.000, 1.000)",
easeInOutQuad: "cubic-bezier(0.455, 0.030, 0.515, 0.955)",
easeInOutQuart: "cubic-bezier(0.770, 0.000, 0.175, 1.000)",
easeInOutQuint: "cubic-bezier(0.860, 0.000, 0.070, 1.000)",
easeInOutSine: "cubic-bezier(0.445, 0.050, 0.550, 0.950)"
};
function n6(e) {
return r6[e];
}
o(n6, "getTimingFunction");
function o6(e) {
return n6(e);
}
o(o6, "timingFunctions");
var a6 = /* @__PURE__ */ o(function(t, r, n) {
var l = "" + n[0] + (n[1] || ""), p = "" + n[0] / 2 + (n[1] || ""), m = "" + r[0] + (r[1] || ""), h = "" + r[0] / 2 + (r[1] || "");
switch (t) {
case "top":
return "0 " + p + " " + m + " " + p;
case "topLeft":
return l + " " + m + " 0 0";
case "left":
return h + " " + l + " " + h + " 0";
case "bottomLeft":
return l + " 0 0 " + m;
case "bottom":
return m + " " + p + " 0 " + p;
case "bottomRight":
return "0 0 " + l + " " + m;
case "right":
return h + " 0 " + h + " " + l;
case "topRight":
default:
return "0 " + l + " " + m + " 0";
}
}, "getBorderWidth"), i6 = /* @__PURE__ */ o(function(t, r) {
switch (t) {
case "top":
case "bottomRight":
return {
borderBottomColor: r
};
case "right":
case "bottomLeft":
return {
borderLeftColor: r
};
case "bottom":
case "topLeft":
return {
borderTopColor: r
};
case "left":
case "topRight":
return {
borderRightColor: r
};
default:
throw new de(59);
}
}, "getBorderColor");
function l6(e) {
var t = e.pointingDirection, r = e.height, n = e.width, l = e.foregroundColor, p = e.backgroundColor, m = p === void 0 ? "transparent" :
p, h = Xr(n), y = Xr(r);
if (isNaN(y[0]) || isNaN(h[0]))
throw new de(60);
return Je.default({
width: "0",
height: "0",
borderColor: m
}, i6(t, l), {
borderStyle: "solid",
borderWidth: a6(t, y, h)
});
}
o(l6, "triangle");
function s6(e) {
e === void 0 && (e = "break-word");
var t = e === "break-word" ? "break-all" : e;
return {
overflowWrap: e,
wordWrap: e,
wordBreak: t
};
}
o(s6, "wordWrap");
function sp(e) {
return Math.round(e * 255);
}
o(sp, "colorToInt");
function u6(e, t, r) {
return sp(e) + "," + sp(t) + "," + sp(r);
}
o(u6, "convertToInt");
function el(e, t, r, n) {
if (n === void 0 && (n = u6), t === 0)
return n(r, r, r);
var l = (e % 360 + 360) % 360 / 60, p = (1 - Math.abs(2 * r - 1)) * t, m = p * (1 - Math.abs(l % 2 - 1)), h = 0, y = 0, b = 0;
l >= 0 && l < 1 ? (h = p, y = m) : l >= 1 && l < 2 ? (h = m, y = p) : l >= 2 && l < 3 ? (y = p, b = m) : l >= 3 && l < 4 ? (y = m, b = p) :
l >= 4 && l < 5 ? (h = m, b = p) : l >= 5 && l < 6 && (h = p, b = m);
var C = r - p / 2, E = h + C, S = y + C, L = b + C;
return n(E, S, L);
}
o(el, "hslToRgb");
var Nh = {
aliceblue: "f0f8ff",
antiquewhite: "faebd7",
aqua: "00ffff",
aquamarine: "7fffd4",
azure: "f0ffff",
beige: "f5f5dc",
bisque: "ffe4c4",
black: "000",
blanchedalmond: "ffebcd",
blue: "0000ff",
blueviolet: "8a2be2",
brown: "a52a2a",
burlywood: "deb887",
cadetblue: "5f9ea0",
chartreuse: "7fff00",
chocolate: "d2691e",
coral: "ff7f50",
cornflowerblue: "6495ed",
cornsilk: "fff8dc",
crimson: "dc143c",
cyan: "00ffff",
darkblue: "00008b",
darkcyan: "008b8b",
darkgoldenrod: "b8860b",
darkgray: "a9a9a9",
darkgreen: "006400",
darkgrey: "a9a9a9",
darkkhaki: "bdb76b",
darkmagenta: "8b008b",
darkolivegreen: "556b2f",
darkorange: "ff8c00",
darkorchid: "9932cc",
darkred: "8b0000",
darksalmon: "e9967a",
darkseagreen: "8fbc8f",
darkslateblue: "483d8b",
darkslategray: "2f4f4f",
darkslategrey: "2f4f4f",
darkturquoise: "00ced1",
darkviolet: "9400d3",
deeppink: "ff1493",
deepskyblue: "00bfff",
dimgray: "696969",
dimgrey: "696969",
dodgerblue: "1e90ff",
firebrick: "b22222",
floralwhite: "fffaf0",
forestgreen: "228b22",
fuchsia: "ff00ff",
gainsboro: "dcdcdc",
ghostwhite: "f8f8ff",
gold: "ffd700",
goldenrod: "daa520",
gray: "808080",
green: "008000",
greenyellow: "adff2f",
grey: "808080",
honeydew: "f0fff0",
hotpink: "ff69b4",
indianred: "cd5c5c",
indigo: "4b0082",
ivory: "fffff0",
khaki: "f0e68c",
lavender: "e6e6fa",
lavenderblush: "fff0f5",
lawngreen: "7cfc00",
lemonchiffon: "fffacd",
lightblue: "add8e6",
lightcoral: "f08080",
lightcyan: "e0ffff",
lightgoldenrodyellow: "fafad2",
lightgray: "d3d3d3",
lightgreen: "90ee90",
lightgrey: "d3d3d3",
lightpink: "ffb6c1",
lightsalmon: "ffa07a",
lightseagreen: "20b2aa",
lightskyblue: "87cefa",
lightslategray: "789",
lightslategrey: "789",
lightsteelblue: "b0c4de",
lightyellow: "ffffe0",
lime: "0f0",
limegreen: "32cd32",
linen: "faf0e6",
magenta: "f0f",
maroon: "800000",
mediumaquamarine: "66cdaa",
mediumblue: "0000cd",
mediumorchid: "ba55d3",
mediumpurple: "9370db",
mediumseagreen: "3cb371",
mediumslateblue: "7b68ee",
mediumspringgreen: "00fa9a",
mediumturquoise: "48d1cc",
mediumvioletred: "c71585",
midnightblue: "191970",
mintcream: "f5fffa",
mistyrose: "ffe4e1",
moccasin: "ffe4b5",
navajowhite: "ffdead",
navy: "000080",
oldlace: "fdf5e6",
olive: "808000",
olivedrab: "6b8e23",
orange: "ffa500",
orangered: "ff4500",
orchid: "da70d6",
palegoldenrod: "eee8aa",
palegreen: "98fb98",
paleturquoise: "afeeee",
palevioletred: "db7093",
papayawhip: "ffefd5",
peachpuff: "ffdab9",
peru: "cd853f",
pink: "ffc0cb",
plum: "dda0dd",
powderblue: "b0e0e6",
purple: "800080",
rebeccapurple: "639",
red: "f00",
rosybrown: "bc8f8f",
royalblue: "4169e1",
saddlebrown: "8b4513",
salmon: "fa8072",
sandybrown: "f4a460",
seagreen: "2e8b57",
seashell: "fff5ee",
sienna: "a0522d",
silver: "c0c0c0",
skyblue: "87ceeb",
slateblue: "6a5acd",
slategray: "708090",
slategrey: "708090",
snow: "fffafa",
springgreen: "00ff7f",
steelblue: "4682b4",
tan: "d2b48c",
teal: "008080",
thistle: "d8bfd8",
tomato: "ff6347",
turquoise: "40e0d0",
violet: "ee82ee",
wheat: "f5deb3",
white: "fff",
whitesmoke: "f5f5f5",
yellow: "ff0",
yellowgreen: "9acd32"
};
function c6(e) {
if (typeof e != "string") return e;
var t = e.toLowerCase();
return Nh[t] ? "#" + Nh[t] : e;
}
o(c6, "nameToHex");
var p6 = /^#[a-fA-F0-9]{6}$/, d6 = /^#[a-fA-F0-9]{8}$/, f6 = /^#[a-fA-F0-9]{3}$/, h6 = /^#[a-fA-F0-9]{4}$/, up = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,
m6 = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, g6 = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,
v6 = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
function xn(e) {
if (typeof e != "string")
throw new de(3);
var t = c6(e);
if (t.match(p6))
return {
red: parseInt("" + t[1] + t[2], 16),
green: parseInt("" + t[3] + t[4], 16),
blue: parseInt("" + t[5] + t[6], 16)
};
if (t.match(d6)) {
var r = parseFloat((parseInt("" + t[7] + t[8], 16) / 255).toFixed(2));
return {
red: parseInt("" + t[1] + t[2], 16),
green: parseInt("" + t[3] + t[4], 16),
blue: parseInt("" + t[5] + t[6], 16),
alpha: r
};
}
if (t.match(f6))
return {
red: parseInt("" + t[1] + t[1], 16),
green: parseInt("" + t[2] + t[2], 16),
blue: parseInt("" + t[3] + t[3], 16)
};
if (t.match(h6)) {
var n = parseFloat((parseInt("" + t[4] + t[4], 16) / 255).toFixed(2));
return {
red: parseInt("" + t[1] + t[1], 16),
green: parseInt("" + t[2] + t[2], 16),
blue: parseInt("" + t[3] + t[3], 16),
alpha: n
};
}
var l = up.exec(t);
if (l)
return {
red: parseInt("" + l[1], 10),
green: parseInt("" + l[2], 10),
blue: parseInt("" + l[3], 10)
};
var p = m6.exec(t.substring(0, 50));
if (p)
return {
red: parseInt("" + p[1], 10),
green: parseInt("" + p[2], 10),
blue: parseInt("" + p[3], 10),
alpha: parseFloat("" + p[4]) > 1 ? parseFloat("" + p[4]) / 100 : parseFloat("" + p[4])
};
var m = g6.exec(t);
if (m) {
var h = parseInt("" + m[1], 10), y = parseInt("" + m[2], 10) / 100, b = parseInt("" + m[3], 10) / 100, C = "rgb(" + el(h, y, b) + ")",
E = up.exec(C);
if (!E)
throw new de(4, t, C);
return {
red: parseInt("" + E[1], 10),
green: parseInt("" + E[2], 10),
blue: parseInt("" + E[3], 10)
};
}
var S = v6.exec(t.substring(0, 50));
if (S) {
var L = parseInt("" + S[1], 10), O = parseInt("" + S[2], 10) / 100, F = parseInt("" + S[3], 10) / 100, R = "rgb(" + el(L, O, F) + ")",
T = up.exec(R);
if (!T)
throw new de(4, t, R);
return {
red: parseInt("" + T[1], 10),
green: parseInt("" + T[2], 10),
blue: parseInt("" + T[3], 10),
alpha: parseFloat("" + S[4]) > 1 ? parseFloat("" + S[4]) / 100 : parseFloat("" + S[4])
};
}
throw new de(5);
}
o(xn, "parseToRgb");
function w6(e) {
var t = e.red / 255, r = e.green / 255, n = e.blue / 255, l = Math.max(t, r, n), p = Math.min(t, r, n), m = (l + p) / 2;
if (l === p)
return e.alpha !== void 0 ? {
hue: 0,
saturation: 0,
lightness: m,
alpha: e.alpha
} : {
hue: 0,
saturation: 0,
lightness: m
};
var h, y = l - p, b = m > 0.5 ? y / (2 - l - p) : y / (l + p);
switch (l) {
case t:
h = (r - n) / y + (r < n ? 6 : 0);
break;
case r:
h = (n - t) / y + 2;
break;
default:
h = (t - r) / y + 4;
break;
}
return h *= 60, e.alpha !== void 0 ? {
hue: h,
saturation: b,
lightness: