@storybook/core
Version:
Storybook framework-agnostic API
1,589 lines (1,500 loc) • 146 kB
JavaScript
"use strict";
var oo = Object.create;
var Ve = Object.defineProperty;
var io = Object.getOwnPropertyDescriptor;
var so = Object.getOwnPropertyNames;
var uo = Object.getPrototypeOf, fo = Object.prototype.hasOwnProperty;
var o = (e, r) => Ve(e, "name", { value: r, configurable: !0 });
var k = (e, r) => () => (r || e((r = { exports: {} }).exports, r), r.exports), co = (e, r) => {
for (var t in r)
Ve(e, t, { get: r[t], enumerable: !0 });
}, Ht = (e, r, t, n) => {
if (r && typeof r == "object" || typeof r == "function")
for (let a of so(r))
!fo.call(e, a) && a !== t && Ve(e, a, { get: () => r[a], enumerable: !(n = io(r, a)) || n.enumerable });
return e;
};
var W = (e, r, t) => (t = e != null ? oo(uo(e)) : {}, Ht(
// 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.
r || !e || !e.__esModule ? Ve(t, "default", { value: e, enumerable: !0 }) : t,
e
)), lo = (e) => Ht(Ve({}, "__esModule", { value: !0 }), e);
// ../node_modules/react-is/cjs/react-is.production.min.js
var cn = k((_) => {
"use strict";
var B = typeof Symbol == "function" && Symbol.for, tt = B ? Symbol.for("react.element") : 60103, nt = B ? Symbol.for("react.portal") : 60106,
wr = B ? Symbol.for("react.fragment") : 60107, Sr = B ? Symbol.for("react.strict_mode") : 60108, Er = B ? Symbol.for("react.profiler") : 60114,
Tr = B ? Symbol.for("react.provider") : 60109, Cr = B ? Symbol.for("react.context") : 60110, at = B ? Symbol.for("react.async_mode") : 60111,
Or = B ? Symbol.for("react.concurrent_mode") : 60111, Rr = B ? Symbol.for("react.forward_ref") : 60112, Ar = B ? Symbol.for("react.suspens\
e") : 60113, To = B ? Symbol.for("react.suspense_list") : 60120, _r = B ? Symbol.for("react.memo") : 60115, Fr = B ? Symbol.for("react.lazy") :
60116, Co = B ? Symbol.for("react.block") : 60121, Oo = B ? Symbol.for("react.fundamental") : 60117, Ro = B ? Symbol.for("react.responder") :
60118, Ao = B ? Symbol.for("react.scope") : 60119;
function V(e) {
if (typeof e == "object" && e !== null) {
var r = e.$$typeof;
switch (r) {
case tt:
switch (e = e.type, e) {
case at:
case Or:
case wr:
case Er:
case Sr:
case Ar:
return e;
default:
switch (e = e && e.$$typeof, e) {
case Cr:
case Rr:
case Fr:
case _r:
case Tr:
return e;
default:
return r;
}
}
case nt:
return r;
}
}
}
o(V, "z");
function fn(e) {
return V(e) === Or;
}
o(fn, "A");
_.AsyncMode = at;
_.ConcurrentMode = Or;
_.ContextConsumer = Cr;
_.ContextProvider = Tr;
_.Element = tt;
_.ForwardRef = Rr;
_.Fragment = wr;
_.Lazy = Fr;
_.Memo = _r;
_.Portal = nt;
_.Profiler = Er;
_.StrictMode = Sr;
_.Suspense = Ar;
_.isAsyncMode = function(e) {
return fn(e) || V(e) === at;
};
_.isConcurrentMode = fn;
_.isContextConsumer = function(e) {
return V(e) === Cr;
};
_.isContextProvider = function(e) {
return V(e) === Tr;
};
_.isElement = function(e) {
return typeof e == "object" && e !== null && e.$$typeof === tt;
};
_.isForwardRef = function(e) {
return V(e) === Rr;
};
_.isFragment = function(e) {
return V(e) === wr;
};
_.isLazy = function(e) {
return V(e) === Fr;
};
_.isMemo = function(e) {
return V(e) === _r;
};
_.isPortal = function(e) {
return V(e) === nt;
};
_.isProfiler = function(e) {
return V(e) === Er;
};
_.isStrictMode = function(e) {
return V(e) === Sr;
};
_.isSuspense = function(e) {
return V(e) === Ar;
};
_.isValidElementType = function(e) {
return typeof e == "string" || typeof e == "function" || e === wr || e === Or || e === Er || e === Sr || e === Ar || e === To || typeof e ==
"object" && e !== null && (e.$$typeof === Fr || e.$$typeof === _r || e.$$typeof === Tr || e.$$typeof === Cr || e.$$typeof === Rr || e.$$typeof ===
Oo || e.$$typeof === Ro || e.$$typeof === Ao || e.$$typeof === Co);
};
_.typeOf = V;
});
// ../node_modules/react-is/cjs/react-is.development.js
var ln = k((F) => {
"use strict";
process.env.NODE_ENV !== "production" && function() {
"use strict";
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106,
n = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114,
s = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111,
l = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, c = e ? Symbol.for("react.suspense") :
60113, m = e ? Symbol.for("react.suspense_list") : 60120, T = e ? Symbol.for("react.memo") : 60115, y = e ? Symbol.for("react.lazy") : 60116,
v = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, S = e ? Symbol.for("react.responder") : 60118,
I = e ? Symbol.for("react.scope") : 60119;
function M(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 === l || g === i || g === a || g === c || g === m || typeof g == "object" && g !== null && (g.$$typeof === y || g.$$typeof ===
T || g.$$typeof === s || g.$$typeof === u || g.$$typeof === d || g.$$typeof === x || g.$$typeof === S || g.$$typeof === I || g.$$typeof ===
v);
}
o(M, "isValidElementType");
function w(g) {
if (typeof g == "object" && g !== null) {
var Yr = g.$$typeof;
switch (Yr) {
case r:
var pr = g.type;
switch (pr) {
case f:
case l:
case n:
case i:
case a:
case c:
return pr;
default:
var jt = pr && pr.$$typeof;
switch (jt) {
case u:
case d:
case y:
case T:
case s:
return jt;
default:
return Yr;
}
}
case t:
return Yr;
}
}
}
o(w, "typeOf");
var R = f, C = l, E = u, X = s, ne = r, q = d, le = n, Vr = y, Gr = T, qr = t, Ua = i, Va = a, Ga = c, $t = !1;
function qa(g) {
return $t || ($t = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update you\
r code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Dt(g) || w(g) === f;
}
o(qa, "isAsyncMode");
function Dt(g) {
return w(g) === l;
}
o(Dt, "isConcurrentMode");
function Ya(g) {
return w(g) === u;
}
o(Ya, "isContextConsumer");
function Ja(g) {
return w(g) === s;
}
o(Ja, "isContextProvider");
function Ka(g) {
return typeof g == "object" && g !== null && g.$$typeof === r;
}
o(Ka, "isElement");
function Xa(g) {
return w(g) === d;
}
o(Xa, "isForwardRef");
function Za(g) {
return w(g) === n;
}
o(Za, "isFragment");
function Qa(g) {
return w(g) === y;
}
o(Qa, "isLazy");
function eo(g) {
return w(g) === T;
}
o(eo, "isMemo");
function ro(g) {
return w(g) === t;
}
o(ro, "isPortal");
function to(g) {
return w(g) === i;
}
o(to, "isProfiler");
function no(g) {
return w(g) === a;
}
o(no, "isStrictMode");
function ao(g) {
return w(g) === c;
}
o(ao, "isSuspense"), F.AsyncMode = R, F.ConcurrentMode = C, F.ContextConsumer = E, F.ContextProvider = X, F.Element = ne, F.ForwardRef =
q, F.Fragment = le, F.Lazy = Vr, F.Memo = Gr, F.Portal = qr, F.Profiler = Ua, F.StrictMode = Va, F.Suspense = Ga, F.isAsyncMode = qa, F.
isConcurrentMode = Dt, F.isContextConsumer = Ya, F.isContextProvider = Ja, F.isElement = Ka, F.isForwardRef = Xa, F.isFragment = Za, F.isLazy =
Qa, F.isMemo = eo, F.isPortal = ro, F.isProfiler = to, F.isStrictMode = no, F.isSuspense = ao, F.isValidElementType = M, F.typeOf = w;
}();
});
// ../node_modules/react-is/index.js
var dn = k((xc, ot) => {
"use strict";
process.env.NODE_ENV === "production" ? ot.exports = cn() : ot.exports = ln();
});
// ../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
var ut = k((wc, yn) => {
"use strict";
var it = dn(), _o = {
childContextTypes: !0,
contextType: !0,
contextTypes: !0,
defaultProps: !0,
displayName: !0,
getDefaultProps: !0,
getDerivedStateFromError: !0,
getDerivedStateFromProps: !0,
mixins: !0,
propTypes: !0,
type: !0
}, Fo = {
name: !0,
length: !0,
prototype: !0,
caller: !0,
callee: !0,
arguments: !0,
arity: !0
}, Io = {
$$typeof: !0,
render: !0,
defaultProps: !0,
displayName: !0,
propTypes: !0
}, gn = {
$$typeof: !0,
compare: !0,
defaultProps: !0,
displayName: !0,
propTypes: !0,
type: !0
}, st = {};
st[it.ForwardRef] = Io;
st[it.Memo] = gn;
function pn(e) {
return it.isMemo(e) ? gn : st[e.$$typeof] || _o;
}
o(pn, "getStatics");
var Po = Object.defineProperty, Mo = Object.getOwnPropertyNames, mn = Object.getOwnPropertySymbols, Lo = Object.getOwnPropertyDescriptor, ko = Object.
getPrototypeOf, hn = Object.prototype;
function bn(e, r, t) {
if (typeof r != "string") {
if (hn) {
var n = ko(r);
n && n !== hn && bn(e, n, t);
}
var a = Mo(r);
mn && (a = a.concat(mn(r)));
for (var i = pn(e), s = pn(r), u = 0; u < a.length; ++u) {
var f = a[u];
if (!Fo[f] && !(t && t[f]) && !(s && s[f]) && !(i && i[f])) {
var l = Lo(r, f);
try {
Po(e, f, l);
} catch {
}
}
}
}
return e;
}
o(bn, "hoistNonReactStatics");
yn.exports = bn;
});
// ../node_modules/@babel/runtime/helpers/extends.js
var Lr = k((Gc, ae) => {
function bt() {
return ae.exports = bt = Object.assign ? Object.assign.bind() : function(e) {
for (var r = 1; r < arguments.length; r++) {
var t = arguments[r];
for (var n in t) ({}).hasOwnProperty.call(t, n) && (e[n] = t[n]);
}
return e;
}, ae.exports.__esModule = !0, ae.exports.default = ae.exports, bt.apply(null, arguments);
}
o(bt, "_extends");
ae.exports = bt, ae.exports.__esModule = !0, ae.exports.default = ae.exports;
});
// ../node_modules/@babel/runtime/helpers/assertThisInitialized.js
var zn = k((Tl, rr) => {
function ti(e) {
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
o(ti, "_assertThisInitialized");
rr.exports = ti, rr.exports.__esModule = !0, rr.exports.default = rr.exports;
});
// ../node_modules/@babel/runtime/helpers/setPrototypeOf.js
var Br = k((Ol, ie) => {
function yt(e, r) {
return ie.exports = yt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, n) {
return t.__proto__ = n, t;
}, ie.exports.__esModule = !0, ie.exports.default = ie.exports, yt(e, r);
}
o(yt, "_setPrototypeOf");
ie.exports = yt, ie.exports.__esModule = !0, ie.exports.default = ie.exports;
});
// ../node_modules/@babel/runtime/helpers/inheritsLoose.js
var Nn = k((Al, tr) => {
var ni = Br();
function ai(e, r) {
e.prototype = Object.create(r.prototype), e.prototype.constructor = e, ni(e, r);
}
o(ai, "_inheritsLoose");
tr.exports = ai, tr.exports.__esModule = !0, tr.exports.default = tr.exports;
});
// ../node_modules/@babel/runtime/helpers/getPrototypeOf.js
var Bn = k((Fl, se) => {
function vt(e) {
return se.exports = vt = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
return r.__proto__ || Object.getPrototypeOf(r);
}, se.exports.__esModule = !0, se.exports.default = se.exports, vt(e);
}
o(vt, "_getPrototypeOf");
se.exports = vt, se.exports.__esModule = !0, se.exports.default = se.exports;
});
// ../node_modules/@babel/runtime/helpers/isNativeFunction.js
var $n = k((Pl, nr) => {
function oi(e) {
try {
return Function.toString.call(e).indexOf("[native code]") !== -1;
} catch {
return typeof e == "function";
}
}
o(oi, "_isNativeFunction");
nr.exports = oi, nr.exports.__esModule = !0, nr.exports.default = nr.exports;
});
// ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js
var jn = k((Ll, ue) => {
function Dn() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
}));
} catch {
}
return (ue.exports = Dn = /* @__PURE__ */ o(function() {
return !!e;
}, "_isNativeReflectConstruct"), ue.exports.__esModule = !0, ue.exports.default = ue.exports)();
}
o(Dn, "_isNativeReflectConstruct");
ue.exports = Dn, ue.exports.__esModule = !0, ue.exports.default = ue.exports;
});
// ../node_modules/@babel/runtime/helpers/construct.js
var Hn = k((zl, ar) => {
var ii = jn(), si = Br();
function ui(e, r, t) {
if (ii()) return Reflect.construct.apply(null, arguments);
var n = [null];
n.push.apply(n, r);
var a = new (e.bind.apply(e, n))();
return t && si(a, t.prototype), a;
}
o(ui, "_construct");
ar.exports = ui, ar.exports.__esModule = !0, ar.exports.default = ar.exports;
});
// ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js
var Wn = k((Bl, fe) => {
var fi = Bn(), ci = Br(), li = $n(), di = Hn();
function xt(e) {
var r = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
return fe.exports = xt = /* @__PURE__ */ o(function(n) {
if (n === null || !li(n)) return n;
if (typeof n != "function") throw new TypeError("Super expression must either be null or a function");
if (r !== void 0) {
if (r.has(n)) return r.get(n);
r.set(n, a);
}
function a() {
return di(n, arguments, fi(this).constructor);
}
return o(a, "Wrapper"), a.prototype = Object.create(n.prototype, {
constructor: {
value: a,
enumerable: !1,
writable: !0,
configurable: !0
}
}), ci(a, n);
}, "_wrapNativeSuper"), fe.exports.__esModule = !0, fe.exports.default = fe.exports, xt(e);
}
o(xt, "_wrapNativeSuper");
fe.exports = xt, fe.exports.__esModule = !0, fe.exports.default = fe.exports;
});
// ../node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js
var Un = k((Dl, or) => {
function pi(e, r) {
return r || (r = e.slice(0)), e.raw = r, e;
}
o(pi, "_taggedTemplateLiteralLoose");
or.exports = pi, or.exports.__esModule = !0, or.exports.default = or.exports;
});
// ../node_modules/polished/dist/polished.cjs.js
var jr = k((p) => {
"use strict";
Object.defineProperty(p, "__esModule", { value: !0 });
var mi = Lr(), hi = zn(), gi = Nn(), bi = Wn(), yi = Un();
function fr(e) {
return e && typeof e == "object" && "default" in e ? e : { default: e };
}
o(fr, "_interopDefaultLegacy");
var P = /* @__PURE__ */ fr(mi), vi = /* @__PURE__ */ fr(hi), xi = /* @__PURE__ */ fr(gi), wi = /* @__PURE__ */ fr(bi), aa = /* @__PURE__ */ fr(
yi);
function Vn() {
var e;
return e = arguments.length - 1, e < 0 || arguments.length <= e ? void 0 : arguments[e];
}
o(Vn, "last");
function Si(e) {
return -e;
}
o(Si, "negation");
function Ei(e, r) {
return e + r;
}
o(Ei, "addition");
function Ti(e, r) {
return e - r;
}
o(Ti, "subtraction");
function Ci(e, r) {
return e * r;
}
o(Ci, "multiplication");
function Oi(e, r) {
return e / r;
}
o(Oi, "division");
function Ri() {
return Math.max.apply(Math, arguments);
}
o(Ri, "max");
function Ai() {
return Math.min.apply(Math, arguments);
}
o(Ai, "min");
function _i() {
return Array.of.apply(Array, arguments);
}
o(_i, "comma");
var Fi = {
symbols: {
"*": {
infix: {
symbol: "*",
f: Ci,
notation: "infix",
precedence: 4,
rightToLeft: 0,
argCount: 2
},
symbol: "*",
regSymbol: "\\*"
},
"/": {
infix: {
symbol: "/",
f: Oi,
notation: "infix",
precedence: 4,
rightToLeft: 0,
argCount: 2
},
symbol: "/",
regSymbol: "/"
},
"+": {
infix: {
symbol: "+",
f: Ei,
notation: "infix",
precedence: 2,
rightToLeft: 0,
argCount: 2
},
prefix: {
symbol: "+",
f: Vn,
notation: "prefix",
precedence: 3,
rightToLeft: 0,
argCount: 1
},
symbol: "+",
regSymbol: "\\+"
},
"-": {
infix: {
symbol: "-",
f: Ti,
notation: "infix",
precedence: 2,
rightToLeft: 0,
argCount: 2
},
prefix: {
symbol: "-",
f: Si,
notation: "prefix",
precedence: 3,
rightToLeft: 0,
argCount: 1
},
symbol: "-",
regSymbol: "-"
},
",": {
infix: {
symbol: ",",
f: _i,
notation: "infix",
precedence: 1,
rightToLeft: 0,
argCount: 2
},
symbol: ",",
regSymbol: ","
},
"(": {
prefix: {
symbol: "(",
f: Vn,
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: Ai,
notation: "func",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: "min",
regSymbol: "min\\b"
},
max: {
func: {
symbol: "max",
f: Ri,
notation: "func",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: "max",
regSymbol: "max\\b"
}
}
}, Gn = Fi, Ii = {
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 Pi() {
for (var e = arguments.length, r = new Array(e), t = 0; t < e; t++)
r[t] = arguments[t];
var n = r[0], a = [], i;
for (i = 1; i < r.length; i += 1)
a.push(r[i]);
return a.forEach(function(s) {
n = n.replace(/%[a-z]/, s);
}), n;
}
o(Pi, "format");
var b = /* @__PURE__ */ function(e) {
xi.default(r, e);
function r(t) {
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#" + t +
" for more information.") || this;
else {
for (var a = arguments.length, i = new Array(a > 1 ? a - 1 : 0), s = 1; s < a; s++)
i[s - 1] = arguments[s];
n = e.call(this, Pi.apply(void 0, [Ii[t]].concat(i))) || this;
}
return vi.default(n);
}
return o(r, "PolishedError"), r;
}(/* @__PURE__ */ wi.default(Error)), qn = /((?!\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 Mi(e) {
var r = {};
return r.symbols = e ? P.default({}, Gn.symbols, e.symbols) : P.default({}, Gn.symbols), r;
}
o(Mi, "mergeSymbolMaps");
function Yn(e, r) {
var t, n = e.pop();
return r.push(n.f.apply(n, (t = []).concat.apply(t, r.splice(-n.argCount)))), n.precedence;
}
o(Yn, "exec");
function Li(e, r) {
var t = Mi(r), n, a = [t.symbols["("].prefix], i = [], s = new RegExp(
// Pattern for numbers
"\\d+(?:\\.\\d+)?|" + // ...and patterns for individual operators/function names
Object.keys(t.symbols).map(function(x) {
return t.symbols[x];
}).sort(function(x, S) {
return S.symbol.length - x.symbol.length;
}).map(function(x) {
return x.regSymbol;
}).join("|") + "|(\\S)",
"g"
);
s.lastIndex = 0;
var u = !1;
do {
n = s.exec(e);
var f = n || [")", void 0], l = f[0], d = f[1], c = t.symbols[l], m = c && !c.prefix && !c.func, T = !c || !c.postfix && !c.infix;
if (d || (u ? T : m))
throw new b(37, n ? n.index : e.length, e);
if (u) {
var y = c.postfix || c.infix;
do {
var v = a[a.length - 1];
if ((y.precedence - v.precedence || v.rightToLeft) > 0) break;
} while (Yn(a, i));
u = y.notation === "postfix", y.symbol !== ")" && (a.push(y), u && Yn(a, i));
} else if (c) {
if (a.push(c.prefix || c.func), c.func && (n = s.exec(e), !n || n[0] !== "("))
throw new b(38, n ? n.index : e.length, e);
} else
i.push(+l), u = !0;
} while (n && a.length);
if (a.length)
throw new b(39, n ? n.index : e.length, e);
if (n)
throw new b(40, n ? n.index : e.length, e);
return i.pop();
}
o(Li, "calculate");
function wt(e) {
return e.split("").reverse().join("");
}
o(wt, "reverseString");
function ki(e, r) {
var t = wt(e), n = t.match(qn);
if (n && !n.every(function(i) {
return i === n[0];
}))
throw new b(41);
var a = wt(t.replace(qn, ""));
return "" + Li(a, r) + (n ? wt(n[0]) : "");
}
o(ki, "math");
var zi = /--[\S]*/g;
function Ni(e, r) {
if (!e || !e.match(zi))
throw new b(73);
var t;
if (typeof document < "u" && document.documentElement !== null && (t = getComputedStyle(document.documentElement).getPropertyValue(e)), t)
return t.trim();
if (r)
return r;
throw new b(74);
}
o(Ni, "cssVar");
function ir(e) {
return e.charAt(0).toUpperCase() + e.slice(1);
}
o(ir, "capitalizeString");
var Bi = ["Top", "Right", "Bottom", "Left"];
function $i(e, r) {
if (!e) return r.toLowerCase();
var t = e.split("-");
if (t.length > 1)
return t.splice(1, 0, r), t.reduce(function(a, i) {
return "" + a + ir(i);
});
var n = e.replace(/([a-z])([A-Z])/g, "$1" + r + "$2");
return e === n ? "" + e + r : n;
}
o($i, "generateProperty");
function Di(e, r) {
for (var t = {}, n = 0; n < r.length; n += 1)
(r[n] || r[n] === 0) && (t[$i(e, Bi[n])] = r[n]);
return t;
}
o(Di, "generateStyles");
function ge(e) {
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
t[n - 1] = arguments[n];
var a = t[0], i = t[1], s = i === void 0 ? a : i, u = t[2], f = u === void 0 ? a : u, l = t[3], d = l === void 0 ? s : l, c = [a, s, f, d];
return Di(e, c);
}
o(ge, "directionalProperty");
function Jn(e, r) {
return e.substr(-r.length) === r;
}
o(Jn, "endsWith");
var ji = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
function Ct(e) {
if (typeof e != "string") return e;
var r = e.match(ji);
return r ? parseFloat(e) : e;
}
o(Ct, "stripUnit");
var Hi = /* @__PURE__ */ o(function(r) {
return function(t, n) {
n === void 0 && (n = "16px");
var a = t, i = n;
if (typeof t == "string") {
if (!Jn(t, "px"))
throw new b(69, r, t);
a = Ct(t);
}
if (typeof n == "string") {
if (!Jn(n, "px"))
throw new b(70, r, n);
i = Ct(n);
}
if (typeof a == "string")
throw new b(71, t, r);
if (typeof i == "string")
throw new b(72, n, r);
return "" + a / i + r;
};
}, "pxtoFactory"), oa = Hi, Wi = /* @__PURE__ */ oa("em"), Ui = Wi, Vi = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
function te(e) {
if (typeof e != "string") return [e, ""];
var r = e.match(Vi);
return r ? [parseFloat(e), r[2]] : [e, void 0];
}
o(te, "getValueAndUnit");
function ia(e, r) {
if (typeof e != "object" || e === null)
throw new b(75, typeof e);
var t = {};
return Object.keys(e).forEach(function(n) {
typeof e[n] == "object" && e[n] !== null ? t[n] = ia(e[n], r) : !r || r && (r === n || r.indexOf(n) >= 0) ? t[n] = e[n] + " !important" :
t[n] = e[n];
}), t;
}
o(ia, "important");
var sa = {
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 Gi(e) {
return sa[e];
}
o(Gi, "getRatio");
function qi(e, r, t) {
if (r === void 0 && (r = "1em"), t === void 0 && (t = 1.333), typeof e != "number")
throw new b(42);
if (typeof t == "string" && !sa[t])
throw new b(43);
var n = typeof r == "string" ? te(r) : [r, ""], a = n[0], i = n[1], s = typeof t == "string" ? Gi(t) : t;
if (typeof a == "string")
throw new b(44, r);
return "" + a * Math.pow(s, e) + (i || "");
}
o(qi, "modularScale");
var Yi = /* @__PURE__ */ oa("rem"), Ji = Yi, Ot = 16;
function ua(e) {
var r = te(e);
if (r[1] === "px")
return parseFloat(e);
if (r[1] === "%")
return parseFloat(e) / 100 * Ot;
throw new b(78, r[1]);
}
o(ua, "convertBase");
function Ki() {
if (typeof document < "u" && document.documentElement !== null) {
var e = getComputedStyle(document.documentElement).fontSize;
return e ? ua(e) : Ot;
}
return Ot;
}
o(Ki, "getBaseFromDoc");
function Xi(e, r) {
var t = te(e);
if (t[1] !== "rem" && t[1] !== "")
throw new b(77, t[1]);
var n = r ? ua(r) : Ki();
return t[0] * n + "px";
}
o(Xi, "remToPx");
var Zi = {
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 Qi(e) {
return Zi[e.toLowerCase().trim()];
}
o(Qi, "easeIn");
var es = {
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 rs(e) {
return es[e.toLowerCase().trim()];
}
o(rs, "easeInOut");
var ts = {
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 ns(e) {
return ts[e.toLowerCase().trim()];
}
o(ns, "easeOut");
function Rt(e, r, t, n) {
t === void 0 && (t = "320px"), n === void 0 && (n = "1200px");
var a = te(e), i = a[0], s = a[1], u = te(r), f = u[0], l = u[1], d = te(t), c = d[0], m = d[1], T = te(n), y = T[0], v = T[1];
if (typeof c != "number" || typeof y != "number" || !m || !v || m !== v)
throw new b(47);
if (typeof i != "number" || typeof f != "number" || s !== l)
throw new b(48);
if (s !== m || l !== v)
throw new b(76);
var x = (i - f) / (c - y), S = f - x * y;
return "calc(" + S.toFixed(2) + (s || "") + " + " + (100 * x).toFixed(2) + "vw)";
}
o(Rt, "between");
function as(e) {
var r;
e === void 0 && (e = "&");
var t = e + "::after";
return r = {}, r[t] = {
clear: "both",
content: '""',
display: "table"
}, r;
}
o(as, "clearFix");
function os(e) {
return e === void 0 && (e = 0), {
position: "absolute",
top: e,
right: e,
bottom: e,
left: e
};
}
o(os, "cover");
function is(e, r) {
r === void 0 && (r = 1);
var t = {
display: "inline-block",
maxWidth: e || "100%",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
wordWrap: "normal"
};
return r > 1 ? P.default({}, t, {
WebkitBoxOrient: "vertical",
WebkitLineClamp: r,
display: "-webkit-box",
whiteSpace: "normal"
}) : t;
}
o(is, "ellipsis");
function ss(e, r) {
var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (t) return (t = t.call(e)).next.bind(t);
if (Array.isArray(e) || (t = us(e)) || r && e && typeof e.length == "number") {
t && (e = t);
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(ss, "_createForOfIteratorHelperLoose");
function us(e, r) {
if (e) {
if (typeof e == "string") return Kn(e, r);
var t = Object.prototype.toString.call(e).slice(8, -1);
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set") return Array.from(e);
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Kn(e, r);
}
}
o(us, "_unsupportedIterableToArray");
function Kn(e, r) {
(r == null || r > e.length) && (r = e.length);
for (var t = 0, n = new Array(r); t < r; t++)
n[t] = e[t];
return n;
}
o(Kn, "_arrayLikeToArray");
function fs(e, r, t) {
if (r === void 0 && (r = "320px"), t === void 0 && (t = "1200px"), !Array.isArray(e) && typeof e != "object" || e === null)
throw new b(49);
if (Array.isArray(e)) {
for (var n = {}, a = {}, i = ss(e), s; !(s = i()).done; ) {
var u, f, l = s.value;
if (!l.prop || !l.fromSize || !l.toSize)
throw new b(50);
a[l.prop] = l.fromSize, n["@media (min-width: " + r + ")"] = P.default({}, n["@media (min-width: " + r + ")"], (u = {}, u[l.prop] = Rt(
l.fromSize, l.toSize, r, t), u)), n["@media (min-width: " + t + ")"] = P.default({}, n["@media (min-width: " + t + ")"], (f = {}, f[l.
prop] = l.toSize, f));
}
return P.default({}, a, n);
} else {
var d, c, m;
if (!e.prop || !e.fromSize || !e.toSize)
throw new b(51);
return m = {}, m[e.prop] = e.fromSize, m["@media (min-width: " + r + ")"] = (d = {}, d[e.prop] = Rt(e.fromSize, e.toSize, r, t), d), m["\
@media (min-width: " + t + ")"] = (c = {}, c[e.prop] = e.toSize, c), m;
}
}
o(fs, "fluidRange");
var cs = /^\s*data:([a-z]+\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\-._~:@/?%\s]*\s*$/i, ls = {
woff: "woff",
woff2: "woff2",
ttf: "truetype",
otf: "opentype",
eot: "embedded-opentype",
svg: "svg",
svgz: "svg"
};
function Xn(e, r) {
return r ? ' format("' + ls[e] + '")' : "";
}
o(Xn, "generateFormatHint");
function ds(e) {
return !!e.replace(/\s+/g, " ").match(cs);
}
o(ds, "isDataURI");
function ps(e, r, t) {
if (ds(e))
return 'url("' + e + '")' + Xn(r[0], t);
var n = r.map(function(a) {
return 'url("' + e + "." + a + '")' + Xn(a, t);
});
return n.join(", ");
}
o(ps, "generateFileReferences");
function ms(e) {
var r = e.map(function(t) {
return 'local("' + t + '")';
});
return r.join(", ");
}
o(ms, "generateLocalReferences");
function hs(e, r, t, n) {
var a = [];
return r && a.push(ms(r)), e && a.push(ps(e, t, n)), a.join(", ");
}
o(hs, "generateSources");
function gs(e) {
var r = e.fontFamily, t = e.fontFilePath, n = e.fontStretch, a = e.fontStyle, i = e.fontVariant, s = e.fontWeight, u = e.fileFormats, f = u ===
void 0 ? ["eot", "woff2", "woff", "ttf", "svg"] : u, l = e.formatHint, d = l === void 0 ? !1 : l, c = e.localFonts, m = c === void 0 ? [
r] : c, T = e.unicodeRange, y = e.fontDisplay, v = e.fontVariationSettings, x = e.fontFeatureSettings;
if (!r) throw new b(55);
if (!t && !m)
throw new b(52);
if (m && !Array.isArray(m))
throw new b(53);
if (!Array.isArray(f))
throw new b(54);
var S = {
"@font-face": {
fontFamily: r,
src: hs(t, m, f, d),
unicodeRange: T,
fontStretch: n,
fontStyle: a,
fontVariant: i,
fontWeight: s,
fontDisplay: y,
fontVariationSettings: v,
fontFeatureSettings: x
}
};
return JSON.parse(JSON.stringify(S));
}
o(gs, "fontFace");
function bs() {
return {
textIndent: "101%",
overflow: "hidden",
whiteSpace: "nowrap"
};
}
o(bs, "hideText");
function ys() {
return {
border: "0",
clip: "rect(0 0 0 0)",
height: "1px",
margin: "-1px",
overflow: "hidden",
padding: "0",
position: "absolute",
whiteSpace: "nowrap",
width: "1px"
};
}
o(ys, "hideVisually");
function fa(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(fa, "hiDPI");
function ca(e) {
for (var r = "", t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
n[a - 1] = arguments[a];
for (var i = 0; i < e.length; i += 1)
if (r += e[i], i === n.length - 1 && n[i]) {
var s = n.filter(function(u) {
return !!u;
});
s.length > 1 ? (r = r.slice(0, -1), r += ", " + n[i]) : s.length === 1 && (r += "" + n[i]);
} else n[i] && (r += n[i] + " ");
return r.trim();
}
o(ca, "constructGradientValue");
var Zn;
function vs(e) {
var r = e.colorStops, t = e.fallback, n = e.toDirection, a = n === void 0 ? "" : n;
if (!r || r.length < 2)
throw new b(56);
return {
backgroundColor: t || r[0].replace(/,\s+/g, ",").split(" ")[0].replace(/,(?=\S)/g, ", "),
backgroundImage: ca(Zn || (Zn = aa.default(["linear-gradient(", "", ")"])), a, r.join(", ").replace(/,(?=\S)/g, ", "))
};
}
o(vs, "linearGradient");
function xs() {
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(xs, "normalize");
var Qn;
function ws(e) {
var r = e.colorStops, t = e.extent, n = t === void 0 ? "" : t, a = e.fallback, i = e.position, s = i === void 0 ? "" : i, u = e.shape, f = u ===
void 0 ? "" : u;
if (!r || r.length < 2)
throw new b(57);
return {
backgroundColor: a || r[0].split(" ")[0],
backgroundImage: ca(Qn || (Qn = aa.default(["radial-gradient(", "", "", "", ")"])), s, f, n, r.join(", "))
};
}
o(ws, "radialGradient");
function Ss(e, r, t, n, a) {
var i;
if (t === void 0 && (t = "png"), a === void 0 && (a = "_2x"), !e)
throw new b(58);
var s = t.replace(/^\./, ""), u = n ? n + "." + s : "" + e + a + "." + s;
return i = {
backgroundImage: "url(" + e + "." + s + ")"
}, i[fa()] = P.default({
backgroundImage: "url(" + u + ")"
}, r ? {
backgroundSize: r
} : {}), i;
}
o(Ss, "retinaImage");
var Es = {
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 Ts(e) {
return Es[e];
}
o(Ts, "getTimingFunction");
function Cs(e) {
return Ts(e);
}
o(Cs, "timingFunctions");
var Os = /* @__PURE__ */ o(function(r, t, n) {
var a = "" + n[0] + (n[1] || ""), i = "" + n[0] / 2 + (n[1] || ""), s = "" + t[0] + (t[1] || ""), u = "" + t[0] / 2 + (t[1] || "");
switch (r) {
case "top":
return "0 " + i + " " + s + " " + i;
case "topLeft":
return a + " " + s + " 0 0";
case "left":
return u + " " + a + " " + u + " 0";
case "bottomLeft":
return a + " 0 0 " + s;
case "bottom":
return s + " " + i + " 0 " + i;
case "bottomRight":
return "0 0 " + a + " " + s;
case "right":
return u + " 0 " + u + " " + a;
case "topRight":
default:
return "0 " + a + " " + s + " 0";
}
}, "getBorderWidth"), Rs = /* @__PURE__ */ o(function(r, t) {
switch (r) {
case "top":
case "bottomRight":
return {
borderBottomColor: t
};
case "right":