Open KTibow opened 3 years ago
the is card is minified already. The card itself is not big but with the way home assistant allows custom cards to import custom elements, there is a lot of loading of unnecessary code in the background. Nothing custom card creators can do about that. So for example, I can't just load the color wheel for this card, I have to load the entire light entity info modal to get the color wheel. There's an open issue to track a way to fix this.
For some reason it's keeping whitespace, but mangling names.
!(function (t) {
var e = {};
function n(r) {
if (e[r]) return e[r].exports;
var i = (e[r] = { i: r, l: !1, exports: {} });
return t[r].call(i.exports, i, i.exports, n), (i.l = !0), i.exports;
}
(n.m = t),
(n.c = e),
(n.d = function (t, e, r) {
n.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: r });
}),
(n.r = function (t) {
"undefined" != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }),
Object.defineProperty(t, "__esModule", { value: !0 });
}),
(n.t = function (t, e) {
if ((1 & e && (t = n(t)), 8 & e)) return t;
if (4 & e && "object" == typeof t && t && t.__esModule) return t;
var r = Object.create(null);
if (
(n.r(r),
Object.defineProperty(r, "default", { enumerable: !0, value: t }),
2 & e && "string" != typeof t)
)
for (var i in t)
n.d(
r,
i,
function (e) {
return t[e];
}.bind(null, i)
);
return r;
}),
(n.n = function (t) {
var e =
t && t.__esModule
? function () {
return t.default;
}
: function () {
return t;
};
return n.d(e, "a", e), e;
}),
(n.o = function (t, e) {
return Object.prototype.hasOwnProperty.call(t, e);
}),
(n.p = "/local/"),
n((n.s = 308));
})([
function (t, e, n) {
var r = n(1),
i = n(7),
o = n(14),
a = n(11),
c = n(20),
u = function (t, e, n) {
var s,
f,
l,
h,
p = t & u.F,
d = t & u.G,
v = t & u.S,
g = t & u.P,
y = t & u.B,
m = d ? r : v ? r[e] || (r[e] = {}) : (r[e] || {}).prototype,
_ = d ? i : i[e] || (i[e] = {}),
b = _.prototype || (_.prototype = {});
for (s in (d && (n = e), n))
(l = ((f = !p && m && void 0 !== m[s]) ? m : n)[s]),
(h =
y && f
? c(l, r)
: g && "function" == typeof l
? c(Function.call, l)
: l),
m && a(m, s, l, t & u.U),
_[s] != l && o(_, s, h),
g && b[s] != l && (b[s] = l);
};
(r.core = i),
(u.F = 1),
(u.G = 2),
(u.S = 4),
(u.P = 8),
(u.B = 16),
(u.W = 32),
(u.U = 64),
(u.R = 128),
(t.exports = u);
},
function (t, e) {
var n = (t.exports =
"undefined" != typeof window && window.Math == Math
? window
: "undefined" != typeof self && self.Math == Math
? self
: Function("return this")());
"number" == typeof __g && (__g = n);
},
function (t, e) {
t.exports = function (t) {
try {
return !!t();
} catch (t) {
return !0;
}
};
},
function (t, e, n) {
var r = n(4);
t.exports = function (t) {
if (!r(t)) throw TypeError(t + " is not an object!");
return t;
};
},
function (t, e) {
t.exports = function (t) {
return "object" == typeof t ? null !== t : "function" == typeof t;
};
},
function (t, e, n) {
var r = n(57)("wks"),
i = n(35),
o = n(1).Symbol,
a = "function" == typeof o;
(t.exports = function (t) {
return r[t] || (r[t] = (a && o[t]) || (a ? o : i)("Symbol." + t));
}).store = r;
},
function (t, e, n) {
var r = n(22),
i = Math.min;
t.exports = function (t) {
return t > 0 ? i(r(t), 9007199254740991) : 0;
};
},
function (t, e) {
var n = (t.exports = { version: "2.6.9" });
"number" == typeof __e && (__e = n);
},
function (t, e, n) {
t.exports = !n(2)(function () {
return (
7 !=
Object.defineProperty({}, "a", {
get: function () {
return 7;
},
}).a
);
});
},
function (t, e, n) {
var r = n(3),
i = n(103),
o = n(31),
a = Object.defineProperty;
e.f = n(8)
? Object.defineProperty
: function (t, e, n) {
if ((r(t), (e = o(e, !0)), r(n), i))
try {
return a(t, e, n);
} catch (t) {}
if ("get" in n || "set" in n)
throw TypeError("Accessors not supported!");
return "value" in n && (t[e] = n.value), t;
};
},
function (t, e, n) {
var r = n(28);
t.exports = function (t) {
return Object(r(t));
};
},
function (t, e, n) {
var r = n(1),
i = n(14),
o = n(13),
a = n(35)("src"),
c = n(144),
u = ("" + c).split("toString");
(n(7).inspectSource = function (t) {
return c.call(t);
}),
(t.exports = function (t, e, n, c) {
var s = "function" == typeof n;
s && (o(n, "name") || i(n, "name", e)),
t[e] !== n &&
(s && (o(n, a) || i(n, a, t[e] ? "" + t[e] : u.join(String(e)))),
t === r
? (t[e] = n)
: c
? t[e]
? (t[e] = n)
: i(t, e, n)
: (delete t[e], i(t, e, n)));
})(Function.prototype, "toString", function () {
return ("function" == typeof this && this[a]) || c.call(this);
});
},
function (t, e, n) {
var r = n(0),
i = n(2),
o = n(28),
a = /"/g,
c = function (t, e, n, r) {
var i = String(o(t)),
c = "<" + e;
return (
"" !== n &&
(c += " " + n + '="' + String(r).replace(a, """) + '"'),
c + ">" + i + "</" + e + ">"
);
};
t.exports = function (t, e) {
var n = {};
(n[t] = e(c)),
r(
r.P +
r.F *
i(function () {
var e = ""[t]('"');
return e !== e.toLowerCase() || e.split('"').length > 3;
}),
"String",
n
);
};
},
function (t, e) {
var n = {}.hasOwnProperty;
t.exports = function (t, e) {
return n.call(t, e);
};
},
function (t, e, n) {
var r = n(9),
i = n(34);
t.exports = n(8)
? function (t, e, n) {
return r.f(t, e, i(1, n));
}
: function (t, e, n) {
return (t[e] = n), t;
};
},
function (t, e, n) {
var r = n(51),
i = n(28);
t.exports = function (t) {
return r(i(t));
};
},
function (t, e, n) {
"use strict";
var r = n(42),
i = n(123),
o = n(47),
a = n(15);
(t.exports = n(85)(
Array,
"Array",
function (t, e) {
(this._t = a(t)), (this._i = 0), (this._k = e);
},
function () {
var t = this._t,
e = this._k,
n = this._i++;
return !t || n >= t.length
? ((this._t = void 0), i(1))
: i(0, "keys" == e ? n : "values" == e ? t[n] : [n, t[n]]);
},
"values"
)),
(o.Arguments = o.Array),
r("keys"),
r("values"),
r("entries");
},
function (t, e, n) {
"use strict";
var r = n(54),
i = {};
(i[n(5)("toStringTag")] = "z"),
i + "" != "[object z]" &&
n(11)(
Object.prototype,
"toString",
function () {
return "[object " + r(this) + "]";
},
!0
);
},
function (t, e, n) {
"use strict";
var r = n(2);
t.exports = function (t, e) {
return (
!!t &&
r(function () {
e ? t.call(null, function () {}, 1) : t.call(null);
})
);
};
},
function (t, e, n) {
for (
var r = n(16),
i = n(37),
o = n(11),
a = n(1),
c = n(14),
u = n(47),
s = n(5),
f = s("iterator"),
l = s("toStringTag"),
h = u.Array,
p = {
CSSRuleList: !0,
CSSStyleDeclaration: !1,
CSSValueList: !1,
ClientRectList: !1,
DOMRectList: !1,
DOMStringList: !1,
DOMTokenList: !0,
DataTransferItemList: !1,
FileList: !1,
HTMLAllCollection: !1,
HTMLCollection: !1,
HTMLFormElement: !1,
HTMLSelectElement: !1,
MediaList: !0,
MimeTypeArray: !1,
NamedNodeMap: !1,
NodeList: !0,
PaintRequestList: !1,
Plugin: !1,
PluginArray: !1,
SVGLengthList: !1,
SVGNumberList: !1,
SVGPathSegList: !1,
SVGPointList: !1,
SVGStringList: !1,
SVGTransformList: !1,
SourceBufferList: !1,
StyleSheetList: !0,
TextTrackCueList: !1,
TextTrackList: !1,
TouchList: !1,
},
d = i(p),
v = 0;
v < d.length;
v++
) {
var g,
y = d[v],
m = p[y],
_ = a[y],
b = _ && _.prototype;
if (b && (b[f] || c(b, f, h), b[l] || c(b, l, y), (u[y] = h), m))
for (g in r) b[g] || o(b, g, r[g], !0);
}
},
function (t, e, n) {
var r = n(21);
t.exports = function (t, e, n) {
if ((r(t), void 0 === e)) return t;
switch (n) {
case 1:
return function (n) {
return t.call(e, n);
};
case 2:
return function (n, r) {
return t.call(e, n, r);
};
case 3:
return function (n, r, i) {
return t.call(e, n, r, i);
};
}
return function () {
return t.apply(e, arguments);
};
};
},
function (t, e) {
t.exports = function (t) {
if ("function" != typeof t) throw TypeError(t + " is not a function!");
return t;
};
},
function (t, e) {
var n = Math.ceil,
r = Math.floor;
t.exports = function (t) {
return isNaN((t = +t)) ? 0 : (t > 0 ? r : n)(t);
};
},
function (t, e, n) {
var r = n(52),
i = n(34),
o = n(15),
a = n(31),
c = n(13),
u = n(103),
s = Object.getOwnPropertyDescriptor;
e.f = n(8)
? s
: function (t, e) {
if (((t = o(t)), (e = a(e, !0)), u))
try {
return s(t, e);
} catch (t) {}
if (c(t, e)) return i(!r.f.call(t, e), t[e]);
};
},
function (t, e, n) {
var r = n(0),
i = n(7),
o = n(2);
t.exports = function (t, e) {
var n = (i.Object || {})[t] || Object[t],
a = {};
(a[t] = e(n)),
r(
r.S +
r.F *
o(function () {
n(1);
}),
"Object",
a
);
};
},
function (t, e, n) {
var r = n(20),
i = n(51),
o = n(10),
a = n(6),
c = n(120);
t.exports = function (t, e) {
var n = 1 == t,
u = 2 == t,
s = 3 == t,
f = 4 == t,
l = 6 == t,
h = 5 == t || l,
p = e || c;
return function (e, c, d) {
for (
var v,
g,
y = o(e),
m = i(y),
_ = r(c, d, 3),
b = a(m.length),
w = 0,
S = n ? p(e, b) : u ? p(e, 0) : void 0;
b > w;
w++
)
if ((h || w in m) && ((g = _((v = m[w]), w, y)), t))
if (n) S[w] = g;
else if (g)
switch (t) {
case 3:
return !0;
case 5:
return v;
case 6:
return w;
case 2:
S.push(v);
}
else if (f) return !1;
return l ? -1 : s || f ? f : S;
};
};
},
function (t, e, n) {
"use strict";
var r = n(1),
i = n(13),
o = n(8),
a = n(0),
c = n(11),
u = n(32).KEY,
s = n(2),
f = n(57),
l = n(44),
h = n(35),
p = n(5),
d = n(74),
v = n(104),
g = n(145),
y = n(60),
m = n(3),
_ = n(4),
b = n(10),
w = n(15),
S = n(31),
x = n(34),
k = n(39),
E = n(107),
P = n(23),
O = n(59),
A = n(9),
j = n(37),
N = P.f,
C = A.f,
T = E.f,
F = r.Symbol,
M = r.JSON,
I = M && M.stringify,
R = p("_hidden"),
$ = p("toPrimitive"),
L = {}.propertyIsEnumerable,
V = f("symbol-registry"),
U = f("symbols"),
W = f("op-symbols"),
D = Object.prototype,
B = "function" == typeof F && !!O.f,
G = r.QObject,
z = !G || !G.prototype || !G.prototype.findChild,
q =
o &&
s(function () {
return (
7 !=
k(
C({}, "a", {
get: function () {
return C(this, "a", { value: 7 }).a;
},
})
).a
);
})
? function (t, e, n) {
var r = N(D, e);
r && delete D[e], C(t, e, n), r && t !== D && C(D, e, r);
}
: C,
H = function (t) {
var e = (U[t] = k(F.prototype));
return (e._k = t), e;
},
J =
B && "symbol" == typeof F.iterator
? function (t) {
return "symbol" == typeof t;
}
: function (t) {
return t instanceof F;
},
Y = function (t, e, n) {
return (
t === D && Y(W, e, n),
m(t),
(e = S(e, !0)),
m(n),
i(U, e)
? (n.enumerable
? (i(t, R) && t[R][e] && (t[R][e] = !1),
(n = k(n, { enumerable: x(0, !1) })))
: (i(t, R) || C(t, R, x(1, {})), (t[R][e] = !0)),
q(t, e, n))
: C(t, e, n)
);
},
K = function (t, e) {
m(t);
for (var n, r = g((e = w(e))), i = 0, o = r.length; o > i; )
Y(t, (n = r[i++]), e[n]);
return t;
},
X = function (t) {
var e = L.call(this, (t = S(t, !0)));
return (
!(this === D && i(U, t) && !i(W, t)) &&
(!(e || !i(this, t) || !i(U, t) || (i(this, R) && this[R][t])) || e)
);
},
Z = function (t, e) {
if (((t = w(t)), (e = S(e, !0)), t !== D || !i(U, e) || i(W, e))) {
var n = N(t, e);
return (
!n || !i(U, e) || (i(t, R) && t[R][e]) || (n.enumerable = !0), n
);
}
},
Q = function (t) {
for (var e, n = T(w(t)), r = [], o = 0; n.length > o; )
i(U, (e = n[o++])) || e == R || e == u || r.push(e);
return r;
},
tt = function (t) {
for (
var e, n = t === D, r = T(n ? W : w(t)), o = [], a = 0;
r.length > a;
)
!i(U, (e = r[a++])) || (n && !i(D, e)) || o.push(U[e]);
return o;
};
B ||
(c(
(F = function () {
if (this instanceof F)
throw TypeError("Symbol is not a constructor!");
var t = h(arguments.length > 0 ? arguments[0] : void 0),
e = function (n) {
this === D && e.call(W, n),
i(this, R) && i(this[R], t) && (this[R][t] = !1),
q(this, t, x(1, n));
};
return o && z && q(D, t, { configurable: !0, set: e }), H(t);
}).prototype,
"toString",
function () {
return this._k;
}
),
(P.f = Z),
(A.f = Y),
(n(40).f = E.f = Q),
(n(52).f = X),
(O.f = tt),
o && !n(36) && c(D, "propertyIsEnumerable", X, !0),
(d.f = function (t) {
return H(p(t));
})),
a(a.G + a.W + a.F * !B, { Symbol: F });
for (
var et = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(
","
),
nt = 0;
et.length > nt;
)
p(et[nt++]);
for (var rt = j(p.store), it = 0; rt.length > it; ) v(rt[it++]);
a(a.S + a.F * !B, "Symbol", {
for: function (t) {
return i(V, (t += "")) ? V[t] : (V[t] = F(t));
},
keyFor: function (t) {
if (!J(t)) throw TypeError(t + " is not a symbol!");
for (var e in V) if (V[e] === t) return e;
},
useSetter: function () {
z = !0;
},
useSimple: function () {
z = !1;
},
}),
a(a.S + a.F * !B, "Object", {
create: function (t, e) {
return void 0 === e ? k(t) : K(k(t), e);
},
defineProperty: Y,
defineProperties: K,
getOwnPropertyDescriptor: Z,
getOwnPropertyNames: Q,
getOwnPropertySymbols: tt,
});
var ot = s(function () {
O.f(1);
});
a(a.S + a.F * ot, "Object", {
getOwnPropertySymbols: function (t) {
return O.f(b(t));
},
}),
M &&
a(
a.S +
a.F *
(!B ||
s(function () {
var t = F();
return (
"[null]" != I([t]) ||
"{}" != I({ a: t }) ||
"{}" != I(Object(t))
);
})),
"JSON",
{
stringify: function (t) {
for (var e, n, r = [t], i = 1; arguments.length > i; )
r.push(arguments[i++]);
if (((n = e = r[1]), (_(e) || void 0 !== t) && !J(t)))
return (
y(e) ||
(e = function (t, e) {
if (
("function" == typeof n && (e = n.call(this, t, e)),
!J(e))
)
return e;
}),
(r[1] = e),
I.apply(M, r)
);
},
}
),
F.prototype[$] || n(14)(F.prototype, $, F.prototype.valueOf),
l(F, "Symbol"),
l(Math, "Math", !0),
l(r.JSON, "JSON", !0);
},
function (t, e) {
var n = {}.toString;
t.exports = function (t) {
return n.call(t).slice(8, -1);
};
},
function (t, e) {
t.exports = function (t) {
if (null == t) throw TypeError("Can't call method on " + t);
return t;
};
},
function (t, e, n) {
"use strict";
if (n(8)) {
var r = n(36),
i = n(1),
o = n(2),
a = n(0),
c = n(71),
u = n(99),
s = n(20),
The card is slowing down my load time. Any way all of the newlines and indentation could be used using uglify.js or something similar?