12272 lines
652 KiB
JavaScript
12272 lines
652 KiB
JavaScript
function kl(r, e) {
|
|
for (var t = 0; t < e.length; t++) {
|
|
const o = e[t];
|
|
if (typeof o != "string" && !Array.isArray(o)) {
|
|
for (const i in o)
|
|
if (i !== "default" && !(i in r)) {
|
|
const a = Object.getOwnPropertyDescriptor(o, i);
|
|
a && Object.defineProperty(r, i, a.get ? a : {
|
|
enumerable: !0,
|
|
get: () => o[i]
|
|
});
|
|
}
|
|
}
|
|
}
|
|
return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
|
|
}
|
|
function Cl(r) {
|
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
}
|
|
var da = { exports: {} }, gr = {}, ca = { exports: {} }, Y = {};
|
|
/**
|
|
* @license React
|
|
* react.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
var vn;
|
|
function El() {
|
|
if (vn) return Y;
|
|
vn = 1;
|
|
var r = Symbol.for("react.element"), e = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), s = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), y = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), f = Symbol.iterator;
|
|
function C(m) {
|
|
return m === null || typeof m != "object" ? null : (m = f && m[f] || m["@@iterator"], typeof m == "function" ? m : null);
|
|
}
|
|
var w = { isMounted: function() {
|
|
return !1;
|
|
}, enqueueForceUpdate: function() {
|
|
}, enqueueReplaceState: function() {
|
|
}, enqueueSetState: function() {
|
|
} }, A = Object.assign, S = {};
|
|
function I(m, E, Z) {
|
|
this.props = m, this.context = E, this.refs = S, this.updater = Z || w;
|
|
}
|
|
I.prototype.isReactComponent = {}, I.prototype.setState = function(m, E) {
|
|
if (typeof m != "object" && typeof m != "function" && m != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
this.updater.enqueueSetState(this, m, E, "setState");
|
|
}, I.prototype.forceUpdate = function(m) {
|
|
this.updater.enqueueForceUpdate(this, m, "forceUpdate");
|
|
};
|
|
function O() {
|
|
}
|
|
O.prototype = I.prototype;
|
|
function R(m, E, Z) {
|
|
this.props = m, this.context = E, this.refs = S, this.updater = Z || w;
|
|
}
|
|
var B = R.prototype = new O();
|
|
B.constructor = R, A(B, I.prototype), B.isPureReactComponent = !0;
|
|
var U = Array.isArray, P = Object.prototype.hasOwnProperty, q = { current: null }, D = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
function Oe(m, E, Z) {
|
|
var te, oe = {}, ve = null, he = null;
|
|
if (E != null) for (te in E.ref !== void 0 && (he = E.ref), E.key !== void 0 && (ve = "" + E.key), E) P.call(E, te) && !D.hasOwnProperty(te) && (oe[te] = E[te]);
|
|
var ue = arguments.length - 2;
|
|
if (ue === 1) oe.children = Z;
|
|
else if (1 < ue) {
|
|
for (var de = Array(ue), Ae = 0; Ae < ue; Ae++) de[Ae] = arguments[Ae + 2];
|
|
oe.children = de;
|
|
}
|
|
if (m && m.defaultProps) for (te in ue = m.defaultProps, ue) oe[te] === void 0 && (oe[te] = ue[te]);
|
|
return { $$typeof: r, type: m, key: ve, ref: he, props: oe, _owner: q.current };
|
|
}
|
|
function Fe(m, E) {
|
|
return { $$typeof: r, type: m.type, key: E, ref: m.ref, props: m.props, _owner: m._owner };
|
|
}
|
|
function ze(m) {
|
|
return typeof m == "object" && m !== null && m.$$typeof === r;
|
|
}
|
|
function Ue(m) {
|
|
var E = { "=": "=0", ":": "=2" };
|
|
return "$" + m.replace(/[=:]/g, function(Z) {
|
|
return E[Z];
|
|
});
|
|
}
|
|
var st = /\/+/g;
|
|
function Ce(m, E) {
|
|
return typeof m == "object" && m !== null && m.key != null ? Ue("" + m.key) : E.toString(36);
|
|
}
|
|
function Ee(m, E, Z, te, oe) {
|
|
var ve = typeof m;
|
|
(ve === "undefined" || ve === "boolean") && (m = null);
|
|
var he = !1;
|
|
if (m === null) he = !0;
|
|
else switch (ve) {
|
|
case "string":
|
|
case "number":
|
|
he = !0;
|
|
break;
|
|
case "object":
|
|
switch (m.$$typeof) {
|
|
case r:
|
|
case e:
|
|
he = !0;
|
|
}
|
|
}
|
|
if (he) return he = m, oe = oe(he), m = te === "" ? "." + Ce(he, 0) : te, U(oe) ? (Z = "", m != null && (Z = m.replace(st, "$&/") + "/"), Ee(oe, E, Z, "", function(Ae) {
|
|
return Ae;
|
|
})) : oe != null && (ze(oe) && (oe = Fe(oe, Z + (!oe.key || he && he.key === oe.key ? "" : ("" + oe.key).replace(st, "$&/") + "/") + m)), E.push(oe)), 1;
|
|
if (he = 0, te = te === "" ? "." : te + ":", U(m)) for (var ue = 0; ue < m.length; ue++) {
|
|
ve = m[ue];
|
|
var de = te + Ce(ve, ue);
|
|
he += Ee(ve, E, Z, de, oe);
|
|
}
|
|
else if (de = C(m), typeof de == "function") for (m = de.call(m), ue = 0; !(ve = m.next()).done; ) ve = ve.value, de = te + Ce(ve, ue++), he += Ee(ve, E, Z, de, oe);
|
|
else if (ve === "object") throw E = String(m), Error("Objects are not valid as a React child (found: " + (E === "[object Object]" ? "object with keys {" + Object.keys(m).join(", ") + "}" : E) + "). If you meant to render a collection of children, use an array instead.");
|
|
return he;
|
|
}
|
|
function Te(m, E, Z) {
|
|
if (m == null) return m;
|
|
var te = [], oe = 0;
|
|
return Ee(m, te, "", "", function(ve) {
|
|
return E.call(Z, ve, oe++);
|
|
}), te;
|
|
}
|
|
function Ke(m) {
|
|
if (m._status === -1) {
|
|
var E = m._result;
|
|
E = E(), E.then(function(Z) {
|
|
(m._status === 0 || m._status === -1) && (m._status = 1, m._result = Z);
|
|
}, function(Z) {
|
|
(m._status === 0 || m._status === -1) && (m._status = 2, m._result = Z);
|
|
}), m._status === -1 && (m._status = 0, m._result = E);
|
|
}
|
|
if (m._status === 1) return m._result.default;
|
|
throw m._result;
|
|
}
|
|
var L = { current: null }, Se = { transition: null }, Pt = { ReactCurrentDispatcher: L, ReactCurrentBatchConfig: Se, ReactCurrentOwner: q };
|
|
function ft() {
|
|
throw Error("act(...) is not supported in production builds of React.");
|
|
}
|
|
return Y.Children = { map: Te, forEach: function(m, E, Z) {
|
|
Te(m, function() {
|
|
E.apply(this, arguments);
|
|
}, Z);
|
|
}, count: function(m) {
|
|
var E = 0;
|
|
return Te(m, function() {
|
|
E++;
|
|
}), E;
|
|
}, toArray: function(m) {
|
|
return Te(m, function(E) {
|
|
return E;
|
|
}) || [];
|
|
}, only: function(m) {
|
|
if (!ze(m)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
return m;
|
|
} }, Y.Component = I, Y.Fragment = t, Y.Profiler = i, Y.PureComponent = R, Y.StrictMode = o, Y.Suspense = h, Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Pt, Y.act = ft, Y.cloneElement = function(m, E, Z) {
|
|
if (m == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + m + ".");
|
|
var te = A({}, m.props), oe = m.key, ve = m.ref, he = m._owner;
|
|
if (E != null) {
|
|
if (E.ref !== void 0 && (ve = E.ref, he = q.current), E.key !== void 0 && (oe = "" + E.key), m.type && m.type.defaultProps) var ue = m.type.defaultProps;
|
|
for (de in E) P.call(E, de) && !D.hasOwnProperty(de) && (te[de] = E[de] === void 0 && ue !== void 0 ? ue[de] : E[de]);
|
|
}
|
|
var de = arguments.length - 2;
|
|
if (de === 1) te.children = Z;
|
|
else if (1 < de) {
|
|
ue = Array(de);
|
|
for (var Ae = 0; Ae < de; Ae++) ue[Ae] = arguments[Ae + 2];
|
|
te.children = ue;
|
|
}
|
|
return { $$typeof: r, type: m.type, key: oe, ref: ve, props: te, _owner: he };
|
|
}, Y.createContext = function(m) {
|
|
return m = { $$typeof: s, _currentValue: m, _currentValue2: m, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, m.Provider = { $$typeof: a, _context: m }, m.Consumer = m;
|
|
}, Y.createElement = Oe, Y.createFactory = function(m) {
|
|
var E = Oe.bind(null, m);
|
|
return E.type = m, E;
|
|
}, Y.createRef = function() {
|
|
return { current: null };
|
|
}, Y.forwardRef = function(m) {
|
|
return { $$typeof: d, render: m };
|
|
}, Y.isValidElement = ze, Y.lazy = function(m) {
|
|
return { $$typeof: v, _payload: { _status: -1, _result: m }, _init: Ke };
|
|
}, Y.memo = function(m, E) {
|
|
return { $$typeof: y, type: m, compare: E === void 0 ? null : E };
|
|
}, Y.startTransition = function(m) {
|
|
var E = Se.transition;
|
|
Se.transition = {};
|
|
try {
|
|
m();
|
|
} finally {
|
|
Se.transition = E;
|
|
}
|
|
}, Y.unstable_act = ft, Y.useCallback = function(m, E) {
|
|
return L.current.useCallback(m, E);
|
|
}, Y.useContext = function(m) {
|
|
return L.current.useContext(m);
|
|
}, Y.useDebugValue = function() {
|
|
}, Y.useDeferredValue = function(m) {
|
|
return L.current.useDeferredValue(m);
|
|
}, Y.useEffect = function(m, E) {
|
|
return L.current.useEffect(m, E);
|
|
}, Y.useId = function() {
|
|
return L.current.useId();
|
|
}, Y.useImperativeHandle = function(m, E, Z) {
|
|
return L.current.useImperativeHandle(m, E, Z);
|
|
}, Y.useInsertionEffect = function(m, E) {
|
|
return L.current.useInsertionEffect(m, E);
|
|
}, Y.useLayoutEffect = function(m, E) {
|
|
return L.current.useLayoutEffect(m, E);
|
|
}, Y.useMemo = function(m, E) {
|
|
return L.current.useMemo(m, E);
|
|
}, Y.useReducer = function(m, E, Z) {
|
|
return L.current.useReducer(m, E, Z);
|
|
}, Y.useRef = function(m) {
|
|
return L.current.useRef(m);
|
|
}, Y.useState = function(m) {
|
|
return L.current.useState(m);
|
|
}, Y.useSyncExternalStore = function(m, E, Z) {
|
|
return L.current.useSyncExternalStore(m, E, Z);
|
|
}, Y.useTransition = function() {
|
|
return L.current.useTransition();
|
|
}, Y.version = "18.3.1", Y;
|
|
}
|
|
var Cr = { exports: {} };
|
|
/**
|
|
* @license React
|
|
* react.development.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
Cr.exports;
|
|
var mn;
|
|
function $l() {
|
|
return mn || (mn = 1, function(r, e) {
|
|
process.env.NODE_ENV !== "production" && function() {
|
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
var t = "18.3.1", o = Symbol.for("react.element"), i = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), y = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), I = Symbol.iterator, O = "@@iterator";
|
|
function R(n) {
|
|
if (n === null || typeof n != "object")
|
|
return null;
|
|
var c = I && n[I] || n[O];
|
|
return typeof c == "function" ? c : null;
|
|
}
|
|
var B = {
|
|
/**
|
|
* @internal
|
|
* @type {ReactComponent}
|
|
*/
|
|
current: null
|
|
}, U = {
|
|
transition: null
|
|
}, P = {
|
|
current: null,
|
|
// Used to reproduce behavior of `batchedUpdates` in legacy mode.
|
|
isBatchingLegacy: !1,
|
|
didScheduleLegacyUpdate: !1
|
|
}, q = {
|
|
/**
|
|
* @internal
|
|
* @type {ReactComponent}
|
|
*/
|
|
current: null
|
|
}, D = {}, Oe = null;
|
|
function Fe(n) {
|
|
Oe = n;
|
|
}
|
|
D.setExtraStackFrame = function(n) {
|
|
Oe = n;
|
|
}, D.getCurrentStack = null, D.getStackAddendum = function() {
|
|
var n = "";
|
|
Oe && (n += Oe);
|
|
var c = D.getCurrentStack;
|
|
return c && (n += c() || ""), n;
|
|
};
|
|
var ze = !1, Ue = !1, st = !1, Ce = !1, Ee = !1, Te = {
|
|
ReactCurrentDispatcher: B,
|
|
ReactCurrentBatchConfig: U,
|
|
ReactCurrentOwner: q
|
|
};
|
|
Te.ReactDebugCurrentFrame = D, Te.ReactCurrentActQueue = P;
|
|
function Ke(n) {
|
|
{
|
|
for (var c = arguments.length, b = new Array(c > 1 ? c - 1 : 0), g = 1; g < c; g++)
|
|
b[g - 1] = arguments[g];
|
|
Se("warn", n, b);
|
|
}
|
|
}
|
|
function L(n) {
|
|
{
|
|
for (var c = arguments.length, b = new Array(c > 1 ? c - 1 : 0), g = 1; g < c; g++)
|
|
b[g - 1] = arguments[g];
|
|
Se("error", n, b);
|
|
}
|
|
}
|
|
function Se(n, c, b) {
|
|
{
|
|
var g = Te.ReactDebugCurrentFrame, T = g.getStackAddendum();
|
|
T !== "" && (c += "%s", b = b.concat([T]));
|
|
var M = b.map(function(z) {
|
|
return String(z);
|
|
});
|
|
M.unshift("Warning: " + c), Function.prototype.apply.call(console[n], console, M);
|
|
}
|
|
}
|
|
var Pt = {};
|
|
function ft(n, c) {
|
|
{
|
|
var b = n.constructor, g = b && (b.displayName || b.name) || "ReactClass", T = g + "." + c;
|
|
if (Pt[T])
|
|
return;
|
|
L("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", c, g), Pt[T] = !0;
|
|
}
|
|
}
|
|
var m = {
|
|
/**
|
|
* Checks whether or not this composite component is mounted.
|
|
* @param {ReactClass} publicInstance The instance we want to test.
|
|
* @return {boolean} True if mounted, false otherwise.
|
|
* @protected
|
|
* @final
|
|
*/
|
|
isMounted: function(n) {
|
|
return !1;
|
|
},
|
|
/**
|
|
* Forces an update. This should only be invoked when it is known with
|
|
* certainty that we are **not** in a DOM transaction.
|
|
*
|
|
* You may want to call this when you know that some deeper aspect of the
|
|
* component's state has changed but `setState` was not called.
|
|
*
|
|
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
* `componentWillUpdate` and `componentDidUpdate`.
|
|
*
|
|
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
* @param {?function} callback Called after component is updated.
|
|
* @param {?string} callerName name of the calling function in the public API.
|
|
* @internal
|
|
*/
|
|
enqueueForceUpdate: function(n, c, b) {
|
|
ft(n, "forceUpdate");
|
|
},
|
|
/**
|
|
* Replaces all of the state. Always use this or `setState` to mutate state.
|
|
* You should treat `this.state` as immutable.
|
|
*
|
|
* There is no guarantee that `this.state` will be immediately updated, so
|
|
* accessing `this.state` after calling this method may return the old value.
|
|
*
|
|
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
* @param {object} completeState Next state.
|
|
* @param {?function} callback Called after component is updated.
|
|
* @param {?string} callerName name of the calling function in the public API.
|
|
* @internal
|
|
*/
|
|
enqueueReplaceState: function(n, c, b, g) {
|
|
ft(n, "replaceState");
|
|
},
|
|
/**
|
|
* Sets a subset of the state. This only exists because _pendingState is
|
|
* internal. This provides a merging strategy that is not available to deep
|
|
* properties which is confusing. TODO: Expose pendingState or don't use it
|
|
* during the merge.
|
|
*
|
|
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
* @param {object} partialState Next partial state to be merged with state.
|
|
* @param {?function} callback Called after component is updated.
|
|
* @param {?string} Name of the calling function in the public API.
|
|
* @internal
|
|
*/
|
|
enqueueSetState: function(n, c, b, g) {
|
|
ft(n, "setState");
|
|
}
|
|
}, E = Object.assign, Z = {};
|
|
Object.freeze(Z);
|
|
function te(n, c, b) {
|
|
this.props = n, this.context = c, this.refs = Z, this.updater = b || m;
|
|
}
|
|
te.prototype.isReactComponent = {}, te.prototype.setState = function(n, c) {
|
|
if (typeof n != "object" && typeof n != "function" && n != null)
|
|
throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
this.updater.enqueueSetState(this, n, c, "setState");
|
|
}, te.prototype.forceUpdate = function(n) {
|
|
this.updater.enqueueForceUpdate(this, n, "forceUpdate");
|
|
};
|
|
{
|
|
var oe = {
|
|
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
|
|
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
|
|
}, ve = function(n, c) {
|
|
Object.defineProperty(te.prototype, n, {
|
|
get: function() {
|
|
Ke("%s(...) is deprecated in plain JavaScript React classes. %s", c[0], c[1]);
|
|
}
|
|
});
|
|
};
|
|
for (var he in oe)
|
|
oe.hasOwnProperty(he) && ve(he, oe[he]);
|
|
}
|
|
function ue() {
|
|
}
|
|
ue.prototype = te.prototype;
|
|
function de(n, c, b) {
|
|
this.props = n, this.context = c, this.refs = Z, this.updater = b || m;
|
|
}
|
|
var Ae = de.prototype = new ue();
|
|
Ae.constructor = de, E(Ae, te.prototype), Ae.isPureReactComponent = !0;
|
|
function $i() {
|
|
var n = {
|
|
current: null
|
|
};
|
|
return Object.seal(n), n;
|
|
}
|
|
var Hr = Array.isArray;
|
|
function Xt(n) {
|
|
return Hr(n);
|
|
}
|
|
function Ti(n) {
|
|
{
|
|
var c = typeof Symbol == "function" && Symbol.toStringTag, b = c && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
return b;
|
|
}
|
|
}
|
|
function Zt(n) {
|
|
try {
|
|
return xt(n), !1;
|
|
} catch {
|
|
return !0;
|
|
}
|
|
}
|
|
function xt(n) {
|
|
return "" + n;
|
|
}
|
|
function Lt(n) {
|
|
if (Zt(n))
|
|
return L("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ti(n)), xt(n);
|
|
}
|
|
function qr(n, c, b) {
|
|
var g = n.displayName;
|
|
if (g)
|
|
return g;
|
|
var T = c.displayName || c.name || "";
|
|
return T !== "" ? b + "(" + T + ")" : b;
|
|
}
|
|
function Ft(n) {
|
|
return n.displayName || "Context";
|
|
}
|
|
function lt(n) {
|
|
if (n == null)
|
|
return null;
|
|
if (typeof n.tag == "number" && L("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
return n.displayName || n.name || null;
|
|
if (typeof n == "string")
|
|
return n;
|
|
switch (n) {
|
|
case a:
|
|
return "Fragment";
|
|
case i:
|
|
return "Portal";
|
|
case d:
|
|
return "Profiler";
|
|
case s:
|
|
return "StrictMode";
|
|
case f:
|
|
return "Suspense";
|
|
case C:
|
|
return "SuspenseList";
|
|
}
|
|
if (typeof n == "object")
|
|
switch (n.$$typeof) {
|
|
case y:
|
|
var c = n;
|
|
return Ft(c) + ".Consumer";
|
|
case h:
|
|
var b = n;
|
|
return Ft(b._context) + ".Provider";
|
|
case v:
|
|
return qr(n, n.render, "ForwardRef");
|
|
case w:
|
|
var g = n.displayName || null;
|
|
return g !== null ? g : lt(n.type) || "Memo";
|
|
case A: {
|
|
var T = n, M = T._payload, z = T._init;
|
|
try {
|
|
return lt(z(M));
|
|
} catch {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
var Mt = Object.prototype.hasOwnProperty, Jt = {
|
|
key: !0,
|
|
ref: !0,
|
|
__self: !0,
|
|
__source: !0
|
|
}, Wr, Kr, Qt;
|
|
Qt = {};
|
|
function fr(n) {
|
|
if (Mt.call(n, "ref")) {
|
|
var c = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
if (c && c.isReactWarning)
|
|
return !1;
|
|
}
|
|
return n.ref !== void 0;
|
|
}
|
|
function _t(n) {
|
|
if (Mt.call(n, "key")) {
|
|
var c = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
if (c && c.isReactWarning)
|
|
return !1;
|
|
}
|
|
return n.key !== void 0;
|
|
}
|
|
function Si(n, c) {
|
|
var b = function() {
|
|
Wr || (Wr = !0, L("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
|
|
};
|
|
b.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
get: b,
|
|
configurable: !0
|
|
});
|
|
}
|
|
function Yr(n, c) {
|
|
var b = function() {
|
|
Kr || (Kr = !0, L("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
|
|
};
|
|
b.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
get: b,
|
|
configurable: !0
|
|
});
|
|
}
|
|
function Gr(n) {
|
|
if (typeof n.ref == "string" && q.current && n.__self && q.current.stateNode !== n.__self) {
|
|
var c = lt(q.current.type);
|
|
Qt[c] || (L('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', c, n.ref), Qt[c] = !0);
|
|
}
|
|
}
|
|
var Dt = function(n, c, b, g, T, M, z) {
|
|
var j = {
|
|
// This tag allows us to uniquely identify this as a React Element
|
|
$$typeof: o,
|
|
// Built-in properties that belong on the element
|
|
type: n,
|
|
key: c,
|
|
ref: b,
|
|
props: z,
|
|
// Record the component responsible for creating this element.
|
|
_owner: M
|
|
};
|
|
return j._store = {}, Object.defineProperty(j._store, "validated", {
|
|
configurable: !1,
|
|
enumerable: !1,
|
|
writable: !0,
|
|
value: !1
|
|
}), Object.defineProperty(j, "_self", {
|
|
configurable: !1,
|
|
enumerable: !1,
|
|
writable: !1,
|
|
value: g
|
|
}), Object.defineProperty(j, "_source", {
|
|
configurable: !1,
|
|
enumerable: !1,
|
|
writable: !1,
|
|
value: T
|
|
}), Object.freeze && (Object.freeze(j.props), Object.freeze(j)), j;
|
|
};
|
|
function Ai(n, c, b) {
|
|
var g, T = {}, M = null, z = null, j = null, re = null;
|
|
if (c != null) {
|
|
fr(c) && (z = c.ref, Gr(c)), _t(c) && (Lt(c.key), M = "" + c.key), j = c.__self === void 0 ? null : c.__self, re = c.__source === void 0 ? null : c.__source;
|
|
for (g in c)
|
|
Mt.call(c, g) && !Jt.hasOwnProperty(g) && (T[g] = c[g]);
|
|
}
|
|
var pe = arguments.length - 2;
|
|
if (pe === 1)
|
|
T.children = b;
|
|
else if (pe > 1) {
|
|
for (var me = Array(pe), be = 0; be < pe; be++)
|
|
me[be] = arguments[be + 2];
|
|
Object.freeze && Object.freeze(me), T.children = me;
|
|
}
|
|
if (n && n.defaultProps) {
|
|
var xe = n.defaultProps;
|
|
for (g in xe)
|
|
T[g] === void 0 && (T[g] = xe[g]);
|
|
}
|
|
if (M || z) {
|
|
var Re = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
M && Si(T, Re), z && Yr(T, Re);
|
|
}
|
|
return Dt(n, M, z, j, re, q.current, T);
|
|
}
|
|
function Ri(n, c) {
|
|
var b = Dt(n.type, c, n.ref, n._self, n._source, n._owner, n.props);
|
|
return b;
|
|
}
|
|
function Ii(n, c, b) {
|
|
if (n == null)
|
|
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + n + ".");
|
|
var g, T = E({}, n.props), M = n.key, z = n.ref, j = n._self, re = n._source, pe = n._owner;
|
|
if (c != null) {
|
|
fr(c) && (z = c.ref, pe = q.current), _t(c) && (Lt(c.key), M = "" + c.key);
|
|
var me;
|
|
n.type && n.type.defaultProps && (me = n.type.defaultProps);
|
|
for (g in c)
|
|
Mt.call(c, g) && !Jt.hasOwnProperty(g) && (c[g] === void 0 && me !== void 0 ? T[g] = me[g] : T[g] = c[g]);
|
|
}
|
|
var be = arguments.length - 2;
|
|
if (be === 1)
|
|
T.children = b;
|
|
else if (be > 1) {
|
|
for (var xe = Array(be), Re = 0; Re < be; Re++)
|
|
xe[Re] = arguments[Re + 2];
|
|
T.children = xe;
|
|
}
|
|
return Dt(n.type, M, z, j, re, pe, T);
|
|
}
|
|
function wt(n) {
|
|
return typeof n == "object" && n !== null && n.$$typeof === o;
|
|
}
|
|
var Xr = ".", Oi = ":";
|
|
function zi(n) {
|
|
var c = /[=:]/g, b = {
|
|
"=": "=0",
|
|
":": "=2"
|
|
}, g = n.replace(c, function(T) {
|
|
return b[T];
|
|
});
|
|
return "$" + g;
|
|
}
|
|
var er = !1, Zr = /\/+/g;
|
|
function vt(n) {
|
|
return n.replace(Zr, "$&/");
|
|
}
|
|
function Nt(n, c) {
|
|
return typeof n == "object" && n !== null && n.key != null ? (Lt(n.key), zi("" + n.key)) : c.toString(36);
|
|
}
|
|
function kt(n, c, b, g, T) {
|
|
var M = typeof n;
|
|
(M === "undefined" || M === "boolean") && (n = null);
|
|
var z = !1;
|
|
if (n === null)
|
|
z = !0;
|
|
else
|
|
switch (M) {
|
|
case "string":
|
|
case "number":
|
|
z = !0;
|
|
break;
|
|
case "object":
|
|
switch (n.$$typeof) {
|
|
case o:
|
|
case i:
|
|
z = !0;
|
|
}
|
|
}
|
|
if (z) {
|
|
var j = n, re = T(j), pe = g === "" ? Xr + Nt(j, 0) : g;
|
|
if (Xt(re)) {
|
|
var me = "";
|
|
pe != null && (me = vt(pe) + "/"), kt(re, c, me, "", function(wl) {
|
|
return wl;
|
|
});
|
|
} else re != null && (wt(re) && (re.key && (!j || j.key !== re.key) && Lt(re.key), re = Ri(
|
|
re,
|
|
// Keep both the (mapped) and old keys if they differ, just as
|
|
// traverseAllChildren used to do for objects as children
|
|
b + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
|
|
(re.key && (!j || j.key !== re.key) ? (
|
|
// $FlowFixMe Flow incorrectly thinks existing element's key can be a number
|
|
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
vt("" + re.key) + "/"
|
|
) : "") + pe
|
|
)), c.push(re));
|
|
return 1;
|
|
}
|
|
var be, xe, Re = 0, De = g === "" ? Xr : g + Oi;
|
|
if (Xt(n))
|
|
for (var co = 0; co < n.length; co++)
|
|
be = n[co], xe = De + Nt(be, co), Re += kt(be, c, b, xe, T);
|
|
else {
|
|
var Yi = R(n);
|
|
if (typeof Yi == "function") {
|
|
var hn = n;
|
|
Yi === hn.entries && (er || Ke("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), er = !0);
|
|
for (var xl = Yi.call(hn), pn, _l = 0; !(pn = xl.next()).done; )
|
|
be = pn.value, xe = De + Nt(be, _l++), Re += kt(be, c, b, xe, T);
|
|
} else if (M === "object") {
|
|
var fn = String(n);
|
|
throw new Error("Objects are not valid as a React child (found: " + (fn === "[object Object]" ? "object with keys {" + Object.keys(n).join(", ") + "}" : fn) + "). If you meant to render a collection of children, use an array instead.");
|
|
}
|
|
}
|
|
return Re;
|
|
}
|
|
function Bt(n, c, b) {
|
|
if (n == null)
|
|
return n;
|
|
var g = [], T = 0;
|
|
return kt(n, g, "", "", function(M) {
|
|
return c.call(b, M, T++);
|
|
}), g;
|
|
}
|
|
function Pi(n) {
|
|
var c = 0;
|
|
return Bt(n, function() {
|
|
c++;
|
|
}), c;
|
|
}
|
|
function Jr(n, c, b) {
|
|
Bt(n, function() {
|
|
c.apply(this, arguments);
|
|
}, b);
|
|
}
|
|
function Li(n) {
|
|
return Bt(n, function(c) {
|
|
return c;
|
|
}) || [];
|
|
}
|
|
function Qr(n) {
|
|
if (!wt(n))
|
|
throw new Error("React.Children.only expected to receive a single React element child.");
|
|
return n;
|
|
}
|
|
function eo(n) {
|
|
var c = {
|
|
$$typeof: y,
|
|
// As a workaround to support multiple concurrent renderers, we categorize
|
|
// some renderers as primary and others as secondary. We only expect
|
|
// there to be two concurrent renderers at most: React Native (primary) and
|
|
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
// Secondary renderers store their context values on separate fields.
|
|
_currentValue: n,
|
|
_currentValue2: n,
|
|
// Used to track how many concurrent renderers this context currently
|
|
// supports within in a single renderer. Such as parallel server rendering.
|
|
_threadCount: 0,
|
|
// These are circular
|
|
Provider: null,
|
|
Consumer: null,
|
|
// Add these to use same hidden class in VM as ServerContext
|
|
_defaultValue: null,
|
|
_globalName: null
|
|
};
|
|
c.Provider = {
|
|
$$typeof: h,
|
|
_context: c
|
|
};
|
|
var b = !1, g = !1, T = !1;
|
|
{
|
|
var M = {
|
|
$$typeof: y,
|
|
_context: c
|
|
};
|
|
Object.defineProperties(M, {
|
|
Provider: {
|
|
get: function() {
|
|
return g || (g = !0, L("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")), c.Provider;
|
|
},
|
|
set: function(z) {
|
|
c.Provider = z;
|
|
}
|
|
},
|
|
_currentValue: {
|
|
get: function() {
|
|
return c._currentValue;
|
|
},
|
|
set: function(z) {
|
|
c._currentValue = z;
|
|
}
|
|
},
|
|
_currentValue2: {
|
|
get: function() {
|
|
return c._currentValue2;
|
|
},
|
|
set: function(z) {
|
|
c._currentValue2 = z;
|
|
}
|
|
},
|
|
_threadCount: {
|
|
get: function() {
|
|
return c._threadCount;
|
|
},
|
|
set: function(z) {
|
|
c._threadCount = z;
|
|
}
|
|
},
|
|
Consumer: {
|
|
get: function() {
|
|
return b || (b = !0, L("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")), c.Consumer;
|
|
}
|
|
},
|
|
displayName: {
|
|
get: function() {
|
|
return c.displayName;
|
|
},
|
|
set: function(z) {
|
|
T || (Ke("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", z), T = !0);
|
|
}
|
|
}
|
|
}), c.Consumer = M;
|
|
}
|
|
return c._currentRenderer = null, c._currentRenderer2 = null, c;
|
|
}
|
|
var jt = -1, vr = 0, mr = 1, to = 2;
|
|
function Fi(n) {
|
|
if (n._status === jt) {
|
|
var c = n._result, b = c();
|
|
if (b.then(function(M) {
|
|
if (n._status === vr || n._status === jt) {
|
|
var z = n;
|
|
z._status = mr, z._result = M;
|
|
}
|
|
}, function(M) {
|
|
if (n._status === vr || n._status === jt) {
|
|
var z = n;
|
|
z._status = to, z._result = M;
|
|
}
|
|
}), n._status === jt) {
|
|
var g = n;
|
|
g._status = vr, g._result = b;
|
|
}
|
|
}
|
|
if (n._status === mr) {
|
|
var T = n._result;
|
|
return T === void 0 && L(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
|
|
Your code should look like:
|
|
const MyComponent = lazy(() => import('./MyComponent'))
|
|
|
|
Did you accidentally put curly braces around the import?`, T), "default" in T || L(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
|
|
Your code should look like:
|
|
const MyComponent = lazy(() => import('./MyComponent'))`, T), T.default;
|
|
} else
|
|
throw n._result;
|
|
}
|
|
function Mi(n) {
|
|
var c = {
|
|
// We use these fields to store the result.
|
|
_status: jt,
|
|
_result: n
|
|
}, b = {
|
|
$$typeof: A,
|
|
_payload: c,
|
|
_init: Fi
|
|
};
|
|
{
|
|
var g, T;
|
|
Object.defineProperties(b, {
|
|
defaultProps: {
|
|
configurable: !0,
|
|
get: function() {
|
|
return g;
|
|
},
|
|
set: function(M) {
|
|
L("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), g = M, Object.defineProperty(b, "defaultProps", {
|
|
enumerable: !0
|
|
});
|
|
}
|
|
},
|
|
propTypes: {
|
|
configurable: !0,
|
|
get: function() {
|
|
return T;
|
|
},
|
|
set: function(M) {
|
|
L("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."), T = M, Object.defineProperty(b, "propTypes", {
|
|
enumerable: !0
|
|
});
|
|
}
|
|
}
|
|
});
|
|
}
|
|
return b;
|
|
}
|
|
function Di(n) {
|
|
n != null && n.$$typeof === w ? L("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : typeof n != "function" ? L("forwardRef requires a render function but was given %s.", n === null ? "null" : typeof n) : n.length !== 0 && n.length !== 2 && L("forwardRef render functions accept exactly two parameters: props and ref. %s", n.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."), n != null && (n.defaultProps != null || n.propTypes != null) && L("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
|
|
var c = {
|
|
$$typeof: v,
|
|
render: n
|
|
};
|
|
{
|
|
var b;
|
|
Object.defineProperty(c, "displayName", {
|
|
enumerable: !1,
|
|
configurable: !0,
|
|
get: function() {
|
|
return b;
|
|
},
|
|
set: function(g) {
|
|
b = g, !n.name && !n.displayName && (n.displayName = g);
|
|
}
|
|
});
|
|
}
|
|
return c;
|
|
}
|
|
var ro;
|
|
ro = Symbol.for("react.module.reference");
|
|
function u(n) {
|
|
return !!(typeof n == "string" || typeof n == "function" || n === a || n === d || Ee || n === s || n === f || n === C || Ce || n === S || ze || Ue || st || typeof n == "object" && n !== null && (n.$$typeof === A || n.$$typeof === w || n.$$typeof === h || n.$$typeof === y || n.$$typeof === v || // This needs to include all possible module reference object
|
|
// types supported by any Flight configuration anywhere since
|
|
// we don't know which Flight build this will end up being used
|
|
// with.
|
|
n.$$typeof === ro || n.getModuleId !== void 0));
|
|
}
|
|
function k(n, c) {
|
|
u(n) || L("memo: The first argument must be a component. Instead received: %s", n === null ? "null" : typeof n);
|
|
var b = {
|
|
$$typeof: w,
|
|
type: n,
|
|
compare: c === void 0 ? null : c
|
|
};
|
|
{
|
|
var g;
|
|
Object.defineProperty(b, "displayName", {
|
|
enumerable: !1,
|
|
configurable: !0,
|
|
get: function() {
|
|
return g;
|
|
},
|
|
set: function(T) {
|
|
g = T, !n.name && !n.displayName && (n.displayName = T);
|
|
}
|
|
});
|
|
}
|
|
return b;
|
|
}
|
|
function $() {
|
|
var n = B.current;
|
|
return n === null && L(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
2. You might be breaking the Rules of Hooks
|
|
3. You might have more than one copy of React in the same app
|
|
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`), n;
|
|
}
|
|
function N(n) {
|
|
var c = $();
|
|
if (n._context !== void 0) {
|
|
var b = n._context;
|
|
b.Consumer === n ? L("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?") : b.Provider === n && L("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
|
|
}
|
|
return c.useContext(n);
|
|
}
|
|
function ie(n) {
|
|
var c = $();
|
|
return c.useState(n);
|
|
}
|
|
function ce(n, c, b) {
|
|
var g = $();
|
|
return g.useReducer(n, c, b);
|
|
}
|
|
function Q(n) {
|
|
var c = $();
|
|
return c.useRef(n);
|
|
}
|
|
function K(n, c) {
|
|
var b = $();
|
|
return b.useEffect(n, c);
|
|
}
|
|
function Me(n, c) {
|
|
var b = $();
|
|
return b.useInsertionEffect(n, c);
|
|
}
|
|
function ge(n, c) {
|
|
var b = $();
|
|
return b.useLayoutEffect(n, c);
|
|
}
|
|
function we(n, c) {
|
|
var b = $();
|
|
return b.useCallback(n, c);
|
|
}
|
|
function Ge(n, c) {
|
|
var b = $();
|
|
return b.useMemo(n, c);
|
|
}
|
|
function Ct(n, c, b) {
|
|
var g = $();
|
|
return g.useImperativeHandle(n, c, b);
|
|
}
|
|
function mt(n, c) {
|
|
{
|
|
var b = $();
|
|
return b.useDebugValue(n, c);
|
|
}
|
|
}
|
|
function Ve() {
|
|
var n = $();
|
|
return n.useTransition();
|
|
}
|
|
function br(n) {
|
|
var c = $();
|
|
return c.useDeferredValue(n);
|
|
}
|
|
function Ni() {
|
|
var n = $();
|
|
return n.useId();
|
|
}
|
|
function Bi(n, c, b) {
|
|
var g = $();
|
|
return g.useSyncExternalStore(n, c, b);
|
|
}
|
|
var yr = 0, Ha, qa, Wa, Ka, Ya, Ga, Xa;
|
|
function Za() {
|
|
}
|
|
Za.__reactDisabledLog = !0;
|
|
function rl() {
|
|
{
|
|
if (yr === 0) {
|
|
Ha = console.log, qa = console.info, Wa = console.warn, Ka = console.error, Ya = console.group, Ga = console.groupCollapsed, Xa = console.groupEnd;
|
|
var n = {
|
|
configurable: !0,
|
|
enumerable: !0,
|
|
value: Za,
|
|
writable: !0
|
|
};
|
|
Object.defineProperties(console, {
|
|
info: n,
|
|
log: n,
|
|
warn: n,
|
|
error: n,
|
|
group: n,
|
|
groupCollapsed: n,
|
|
groupEnd: n
|
|
});
|
|
}
|
|
yr++;
|
|
}
|
|
}
|
|
function ol() {
|
|
{
|
|
if (yr--, yr === 0) {
|
|
var n = {
|
|
configurable: !0,
|
|
enumerable: !0,
|
|
writable: !0
|
|
};
|
|
Object.defineProperties(console, {
|
|
log: E({}, n, {
|
|
value: Ha
|
|
}),
|
|
info: E({}, n, {
|
|
value: qa
|
|
}),
|
|
warn: E({}, n, {
|
|
value: Wa
|
|
}),
|
|
error: E({}, n, {
|
|
value: Ka
|
|
}),
|
|
group: E({}, n, {
|
|
value: Ya
|
|
}),
|
|
groupCollapsed: E({}, n, {
|
|
value: Ga
|
|
}),
|
|
groupEnd: E({}, n, {
|
|
value: Xa
|
|
})
|
|
});
|
|
}
|
|
yr < 0 && L("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
}
|
|
}
|
|
var ji = Te.ReactCurrentDispatcher, Ui;
|
|
function oo(n, c, b) {
|
|
{
|
|
if (Ui === void 0)
|
|
try {
|
|
throw Error();
|
|
} catch (T) {
|
|
var g = T.stack.trim().match(/\n( *(at )?)/);
|
|
Ui = g && g[1] || "";
|
|
}
|
|
return `
|
|
` + Ui + n;
|
|
}
|
|
}
|
|
var Vi = !1, io;
|
|
{
|
|
var il = typeof WeakMap == "function" ? WeakMap : Map;
|
|
io = new il();
|
|
}
|
|
function Ja(n, c) {
|
|
if (!n || Vi)
|
|
return "";
|
|
{
|
|
var b = io.get(n);
|
|
if (b !== void 0)
|
|
return b;
|
|
}
|
|
var g;
|
|
Vi = !0;
|
|
var T = Error.prepareStackTrace;
|
|
Error.prepareStackTrace = void 0;
|
|
var M;
|
|
M = ji.current, ji.current = null, rl();
|
|
try {
|
|
if (c) {
|
|
var z = function() {
|
|
throw Error();
|
|
};
|
|
if (Object.defineProperty(z.prototype, "props", {
|
|
set: function() {
|
|
throw Error();
|
|
}
|
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
try {
|
|
Reflect.construct(z, []);
|
|
} catch (De) {
|
|
g = De;
|
|
}
|
|
Reflect.construct(n, [], z);
|
|
} else {
|
|
try {
|
|
z.call();
|
|
} catch (De) {
|
|
g = De;
|
|
}
|
|
n.call(z.prototype);
|
|
}
|
|
} else {
|
|
try {
|
|
throw Error();
|
|
} catch (De) {
|
|
g = De;
|
|
}
|
|
n();
|
|
}
|
|
} catch (De) {
|
|
if (De && g && typeof De.stack == "string") {
|
|
for (var j = De.stack.split(`
|
|
`), re = g.stack.split(`
|
|
`), pe = j.length - 1, me = re.length - 1; pe >= 1 && me >= 0 && j[pe] !== re[me]; )
|
|
me--;
|
|
for (; pe >= 1 && me >= 0; pe--, me--)
|
|
if (j[pe] !== re[me]) {
|
|
if (pe !== 1 || me !== 1)
|
|
do
|
|
if (pe--, me--, me < 0 || j[pe] !== re[me]) {
|
|
var be = `
|
|
` + j[pe].replace(" at new ", " at ");
|
|
return n.displayName && be.includes("<anonymous>") && (be = be.replace("<anonymous>", n.displayName)), typeof n == "function" && io.set(n, be), be;
|
|
}
|
|
while (pe >= 1 && me >= 0);
|
|
break;
|
|
}
|
|
}
|
|
} finally {
|
|
Vi = !1, ji.current = M, ol(), Error.prepareStackTrace = T;
|
|
}
|
|
var xe = n ? n.displayName || n.name : "", Re = xe ? oo(xe) : "";
|
|
return typeof n == "function" && io.set(n, Re), Re;
|
|
}
|
|
function al(n, c, b) {
|
|
return Ja(n, !1);
|
|
}
|
|
function nl(n) {
|
|
var c = n.prototype;
|
|
return !!(c && c.isReactComponent);
|
|
}
|
|
function ao(n, c, b) {
|
|
if (n == null)
|
|
return "";
|
|
if (typeof n == "function")
|
|
return Ja(n, nl(n));
|
|
if (typeof n == "string")
|
|
return oo(n);
|
|
switch (n) {
|
|
case f:
|
|
return oo("Suspense");
|
|
case C:
|
|
return oo("SuspenseList");
|
|
}
|
|
if (typeof n == "object")
|
|
switch (n.$$typeof) {
|
|
case v:
|
|
return al(n.render);
|
|
case w:
|
|
return ao(n.type, c, b);
|
|
case A: {
|
|
var g = n, T = g._payload, M = g._init;
|
|
try {
|
|
return ao(M(T), c, b);
|
|
} catch {
|
|
}
|
|
}
|
|
}
|
|
return "";
|
|
}
|
|
var Qa = {}, en = Te.ReactDebugCurrentFrame;
|
|
function no(n) {
|
|
if (n) {
|
|
var c = n._owner, b = ao(n.type, n._source, c ? c.type : null);
|
|
en.setExtraStackFrame(b);
|
|
} else
|
|
en.setExtraStackFrame(null);
|
|
}
|
|
function sl(n, c, b, g, T) {
|
|
{
|
|
var M = Function.call.bind(Mt);
|
|
for (var z in n)
|
|
if (M(n, z)) {
|
|
var j = void 0;
|
|
try {
|
|
if (typeof n[z] != "function") {
|
|
var re = Error((g || "React class") + ": " + b + " type `" + z + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[z] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
throw re.name = "Invariant Violation", re;
|
|
}
|
|
j = n[z](c, z, g, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
} catch (pe) {
|
|
j = pe;
|
|
}
|
|
j && !(j instanceof Error) && (no(T), L("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", b, z, typeof j), no(null)), j instanceof Error && !(j.message in Qa) && (Qa[j.message] = !0, no(T), L("Failed %s type: %s", b, j.message), no(null));
|
|
}
|
|
}
|
|
}
|
|
function tr(n) {
|
|
if (n) {
|
|
var c = n._owner, b = ao(n.type, n._source, c ? c.type : null);
|
|
Fe(b);
|
|
} else
|
|
Fe(null);
|
|
}
|
|
var Hi;
|
|
Hi = !1;
|
|
function tn() {
|
|
if (q.current) {
|
|
var n = lt(q.current.type);
|
|
if (n)
|
|
return `
|
|
|
|
Check the render method of \`` + n + "`.";
|
|
}
|
|
return "";
|
|
}
|
|
function ll(n) {
|
|
if (n !== void 0) {
|
|
var c = n.fileName.replace(/^.*[\\\/]/, ""), b = n.lineNumber;
|
|
return `
|
|
|
|
Check your code at ` + c + ":" + b + ".";
|
|
}
|
|
return "";
|
|
}
|
|
function dl(n) {
|
|
return n != null ? ll(n.__source) : "";
|
|
}
|
|
var rn = {};
|
|
function cl(n) {
|
|
var c = tn();
|
|
if (!c) {
|
|
var b = typeof n == "string" ? n : n.displayName || n.name;
|
|
b && (c = `
|
|
|
|
Check the top-level render call using <` + b + ">.");
|
|
}
|
|
return c;
|
|
}
|
|
function on(n, c) {
|
|
if (!(!n._store || n._store.validated || n.key != null)) {
|
|
n._store.validated = !0;
|
|
var b = cl(c);
|
|
if (!rn[b]) {
|
|
rn[b] = !0;
|
|
var g = "";
|
|
n && n._owner && n._owner !== q.current && (g = " It was passed a child from " + lt(n._owner.type) + "."), tr(n), L('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, g), tr(null);
|
|
}
|
|
}
|
|
}
|
|
function an(n, c) {
|
|
if (typeof n == "object") {
|
|
if (Xt(n))
|
|
for (var b = 0; b < n.length; b++) {
|
|
var g = n[b];
|
|
wt(g) && on(g, c);
|
|
}
|
|
else if (wt(n))
|
|
n._store && (n._store.validated = !0);
|
|
else if (n) {
|
|
var T = R(n);
|
|
if (typeof T == "function" && T !== n.entries)
|
|
for (var M = T.call(n), z; !(z = M.next()).done; )
|
|
wt(z.value) && on(z.value, c);
|
|
}
|
|
}
|
|
}
|
|
function nn(n) {
|
|
{
|
|
var c = n.type;
|
|
if (c == null || typeof c == "string")
|
|
return;
|
|
var b;
|
|
if (typeof c == "function")
|
|
b = c.propTypes;
|
|
else if (typeof c == "object" && (c.$$typeof === v || // Note: Memo only checks outer props here.
|
|
// Inner props are checked in the reconciler.
|
|
c.$$typeof === w))
|
|
b = c.propTypes;
|
|
else
|
|
return;
|
|
if (b) {
|
|
var g = lt(c);
|
|
sl(b, n.props, "prop", g, n);
|
|
} else if (c.PropTypes !== void 0 && !Hi) {
|
|
Hi = !0;
|
|
var T = lt(c);
|
|
L("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", T || "Unknown");
|
|
}
|
|
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && L("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
}
|
|
}
|
|
function ul(n) {
|
|
{
|
|
for (var c = Object.keys(n.props), b = 0; b < c.length; b++) {
|
|
var g = c[b];
|
|
if (g !== "children" && g !== "key") {
|
|
tr(n), L("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), tr(null);
|
|
break;
|
|
}
|
|
}
|
|
n.ref !== null && (tr(n), L("Invalid attribute `ref` supplied to `React.Fragment`."), tr(null));
|
|
}
|
|
}
|
|
function sn(n, c, b) {
|
|
var g = u(n);
|
|
if (!g) {
|
|
var T = "";
|
|
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
var M = dl(c);
|
|
M ? T += M : T += tn();
|
|
var z;
|
|
n === null ? z = "null" : Xt(n) ? z = "array" : n !== void 0 && n.$$typeof === o ? (z = "<" + (lt(n.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : z = typeof n, L("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", z, T);
|
|
}
|
|
var j = Ai.apply(this, arguments);
|
|
if (j == null)
|
|
return j;
|
|
if (g)
|
|
for (var re = 2; re < arguments.length; re++)
|
|
an(arguments[re], n);
|
|
return n === a ? ul(j) : nn(j), j;
|
|
}
|
|
var ln = !1;
|
|
function hl(n) {
|
|
var c = sn.bind(null, n);
|
|
return c.type = n, ln || (ln = !0, Ke("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(c, "type", {
|
|
enumerable: !1,
|
|
get: function() {
|
|
return Ke("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
|
|
value: n
|
|
}), n;
|
|
}
|
|
}), c;
|
|
}
|
|
function pl(n, c, b) {
|
|
for (var g = Ii.apply(this, arguments), T = 2; T < arguments.length; T++)
|
|
an(arguments[T], g.type);
|
|
return nn(g), g;
|
|
}
|
|
function fl(n, c) {
|
|
var b = U.transition;
|
|
U.transition = {};
|
|
var g = U.transition;
|
|
U.transition._updatedFibers = /* @__PURE__ */ new Set();
|
|
try {
|
|
n();
|
|
} finally {
|
|
if (U.transition = b, b === null && g._updatedFibers) {
|
|
var T = g._updatedFibers.size;
|
|
T > 10 && Ke("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."), g._updatedFibers.clear();
|
|
}
|
|
}
|
|
}
|
|
var dn = !1, so = null;
|
|
function vl(n) {
|
|
if (so === null)
|
|
try {
|
|
var c = ("require" + Math.random()).slice(0, 7), b = r && r[c];
|
|
so = b.call(r, "timers").setImmediate;
|
|
} catch {
|
|
so = function(T) {
|
|
dn === !1 && (dn = !0, typeof MessageChannel > "u" && L("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
|
var M = new MessageChannel();
|
|
M.port1.onmessage = T, M.port2.postMessage(void 0);
|
|
};
|
|
}
|
|
return so(n);
|
|
}
|
|
var rr = 0, cn = !1;
|
|
function un(n) {
|
|
{
|
|
var c = rr;
|
|
rr++, P.current === null && (P.current = []);
|
|
var b = P.isBatchingLegacy, g;
|
|
try {
|
|
if (P.isBatchingLegacy = !0, g = n(), !b && P.didScheduleLegacyUpdate) {
|
|
var T = P.current;
|
|
T !== null && (P.didScheduleLegacyUpdate = !1, Ki(T));
|
|
}
|
|
} catch (xe) {
|
|
throw lo(c), xe;
|
|
} finally {
|
|
P.isBatchingLegacy = b;
|
|
}
|
|
if (g !== null && typeof g == "object" && typeof g.then == "function") {
|
|
var M = g, z = !1, j = {
|
|
then: function(xe, Re) {
|
|
z = !0, M.then(function(De) {
|
|
lo(c), rr === 0 ? qi(De, xe, Re) : xe(De);
|
|
}, function(De) {
|
|
lo(c), Re(De);
|
|
});
|
|
}
|
|
};
|
|
return !cn && typeof Promise < "u" && Promise.resolve().then(function() {
|
|
}).then(function() {
|
|
z || (cn = !0, L("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
|
}), j;
|
|
} else {
|
|
var re = g;
|
|
if (lo(c), rr === 0) {
|
|
var pe = P.current;
|
|
pe !== null && (Ki(pe), P.current = null);
|
|
var me = {
|
|
then: function(xe, Re) {
|
|
P.current === null ? (P.current = [], qi(re, xe, Re)) : xe(re);
|
|
}
|
|
};
|
|
return me;
|
|
} else {
|
|
var be = {
|
|
then: function(xe, Re) {
|
|
xe(re);
|
|
}
|
|
};
|
|
return be;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function lo(n) {
|
|
n !== rr - 1 && L("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "), rr = n;
|
|
}
|
|
function qi(n, c, b) {
|
|
{
|
|
var g = P.current;
|
|
if (g !== null)
|
|
try {
|
|
Ki(g), vl(function() {
|
|
g.length === 0 ? (P.current = null, c(n)) : qi(n, c, b);
|
|
});
|
|
} catch (T) {
|
|
b(T);
|
|
}
|
|
else
|
|
c(n);
|
|
}
|
|
}
|
|
var Wi = !1;
|
|
function Ki(n) {
|
|
if (!Wi) {
|
|
Wi = !0;
|
|
var c = 0;
|
|
try {
|
|
for (; c < n.length; c++) {
|
|
var b = n[c];
|
|
do
|
|
b = b(!0);
|
|
while (b !== null);
|
|
}
|
|
n.length = 0;
|
|
} catch (g) {
|
|
throw n = n.slice(c + 1), g;
|
|
} finally {
|
|
Wi = !1;
|
|
}
|
|
}
|
|
}
|
|
var ml = sn, bl = pl, yl = hl, gl = {
|
|
map: Bt,
|
|
forEach: Jr,
|
|
count: Pi,
|
|
toArray: Li,
|
|
only: Qr
|
|
};
|
|
e.Children = gl, e.Component = te, e.Fragment = a, e.Profiler = d, e.PureComponent = de, e.StrictMode = s, e.Suspense = f, e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Te, e.act = un, e.cloneElement = bl, e.createContext = eo, e.createElement = ml, e.createFactory = yl, e.createRef = $i, e.forwardRef = Di, e.isValidElement = wt, e.lazy = Mi, e.memo = k, e.startTransition = fl, e.unstable_act = un, e.useCallback = we, e.useContext = N, e.useDebugValue = mt, e.useDeferredValue = br, e.useEffect = K, e.useId = Ni, e.useImperativeHandle = Ct, e.useInsertionEffect = Me, e.useLayoutEffect = ge, e.useMemo = Ge, e.useReducer = ce, e.useRef = Q, e.useState = ie, e.useSyncExternalStore = Bi, e.useTransition = Ve, e.version = t, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
}();
|
|
}(Cr, Cr.exports)), Cr.exports;
|
|
}
|
|
process.env.NODE_ENV === "production" ? ca.exports = El() : ca.exports = $l();
|
|
var qe = ca.exports;
|
|
const J = /* @__PURE__ */ Cl(qe), bn = /* @__PURE__ */ kl({
|
|
__proto__: null,
|
|
default: J
|
|
}, [qe]);
|
|
/**
|
|
* @license React
|
|
* react-jsx-runtime.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
var yn;
|
|
function Tl() {
|
|
if (yn) return gr;
|
|
yn = 1;
|
|
var r = qe, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
function s(d, h, y) {
|
|
var v, f = {}, C = null, w = null;
|
|
y !== void 0 && (C = "" + y), h.key !== void 0 && (C = "" + h.key), h.ref !== void 0 && (w = h.ref);
|
|
for (v in h) o.call(h, v) && !a.hasOwnProperty(v) && (f[v] = h[v]);
|
|
if (d && d.defaultProps) for (v in h = d.defaultProps, h) f[v] === void 0 && (f[v] = h[v]);
|
|
return { $$typeof: e, type: d, key: C, ref: w, props: f, _owner: i.current };
|
|
}
|
|
return gr.Fragment = t, gr.jsx = s, gr.jsxs = s, gr;
|
|
}
|
|
var xr = {};
|
|
/**
|
|
* @license React
|
|
* react-jsx-runtime.development.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
var gn;
|
|
function Sl() {
|
|
return gn || (gn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
var r = qe, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), d = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), w = Symbol.for("react.offscreen"), A = Symbol.iterator, S = "@@iterator";
|
|
function I(u) {
|
|
if (u === null || typeof u != "object")
|
|
return null;
|
|
var k = A && u[A] || u[S];
|
|
return typeof k == "function" ? k : null;
|
|
}
|
|
var O = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
function R(u) {
|
|
{
|
|
for (var k = arguments.length, $ = new Array(k > 1 ? k - 1 : 0), N = 1; N < k; N++)
|
|
$[N - 1] = arguments[N];
|
|
B("error", u, $);
|
|
}
|
|
}
|
|
function B(u, k, $) {
|
|
{
|
|
var N = O.ReactDebugCurrentFrame, ie = N.getStackAddendum();
|
|
ie !== "" && (k += "%s", $ = $.concat([ie]));
|
|
var ce = $.map(function(Q) {
|
|
return String(Q);
|
|
});
|
|
ce.unshift("Warning: " + k), Function.prototype.apply.call(console[u], console, ce);
|
|
}
|
|
}
|
|
var U = !1, P = !1, q = !1, D = !1, Oe = !1, Fe;
|
|
Fe = Symbol.for("react.module.reference");
|
|
function ze(u) {
|
|
return !!(typeof u == "string" || typeof u == "function" || u === o || u === a || Oe || u === i || u === y || u === v || D || u === w || U || P || q || typeof u == "object" && u !== null && (u.$$typeof === C || u.$$typeof === f || u.$$typeof === s || u.$$typeof === d || u.$$typeof === h || // This needs to include all possible module reference object
|
|
// types supported by any Flight configuration anywhere since
|
|
// we don't know which Flight build this will end up being used
|
|
// with.
|
|
u.$$typeof === Fe || u.getModuleId !== void 0));
|
|
}
|
|
function Ue(u, k, $) {
|
|
var N = u.displayName;
|
|
if (N)
|
|
return N;
|
|
var ie = k.displayName || k.name || "";
|
|
return ie !== "" ? $ + "(" + ie + ")" : $;
|
|
}
|
|
function st(u) {
|
|
return u.displayName || "Context";
|
|
}
|
|
function Ce(u) {
|
|
if (u == null)
|
|
return null;
|
|
if (typeof u.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof u == "function")
|
|
return u.displayName || u.name || null;
|
|
if (typeof u == "string")
|
|
return u;
|
|
switch (u) {
|
|
case o:
|
|
return "Fragment";
|
|
case t:
|
|
return "Portal";
|
|
case a:
|
|
return "Profiler";
|
|
case i:
|
|
return "StrictMode";
|
|
case y:
|
|
return "Suspense";
|
|
case v:
|
|
return "SuspenseList";
|
|
}
|
|
if (typeof u == "object")
|
|
switch (u.$$typeof) {
|
|
case d:
|
|
var k = u;
|
|
return st(k) + ".Consumer";
|
|
case s:
|
|
var $ = u;
|
|
return st($._context) + ".Provider";
|
|
case h:
|
|
return Ue(u, u.render, "ForwardRef");
|
|
case f:
|
|
var N = u.displayName || null;
|
|
return N !== null ? N : Ce(u.type) || "Memo";
|
|
case C: {
|
|
var ie = u, ce = ie._payload, Q = ie._init;
|
|
try {
|
|
return Ce(Q(ce));
|
|
} catch {
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
var Ee = Object.assign, Te = 0, Ke, L, Se, Pt, ft, m, E;
|
|
function Z() {
|
|
}
|
|
Z.__reactDisabledLog = !0;
|
|
function te() {
|
|
{
|
|
if (Te === 0) {
|
|
Ke = console.log, L = console.info, Se = console.warn, Pt = console.error, ft = console.group, m = console.groupCollapsed, E = console.groupEnd;
|
|
var u = {
|
|
configurable: !0,
|
|
enumerable: !0,
|
|
value: Z,
|
|
writable: !0
|
|
};
|
|
Object.defineProperties(console, {
|
|
info: u,
|
|
log: u,
|
|
warn: u,
|
|
error: u,
|
|
group: u,
|
|
groupCollapsed: u,
|
|
groupEnd: u
|
|
});
|
|
}
|
|
Te++;
|
|
}
|
|
}
|
|
function oe() {
|
|
{
|
|
if (Te--, Te === 0) {
|
|
var u = {
|
|
configurable: !0,
|
|
enumerable: !0,
|
|
writable: !0
|
|
};
|
|
Object.defineProperties(console, {
|
|
log: Ee({}, u, {
|
|
value: Ke
|
|
}),
|
|
info: Ee({}, u, {
|
|
value: L
|
|
}),
|
|
warn: Ee({}, u, {
|
|
value: Se
|
|
}),
|
|
error: Ee({}, u, {
|
|
value: Pt
|
|
}),
|
|
group: Ee({}, u, {
|
|
value: ft
|
|
}),
|
|
groupCollapsed: Ee({}, u, {
|
|
value: m
|
|
}),
|
|
groupEnd: Ee({}, u, {
|
|
value: E
|
|
})
|
|
});
|
|
}
|
|
Te < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
}
|
|
}
|
|
var ve = O.ReactCurrentDispatcher, he;
|
|
function ue(u, k, $) {
|
|
{
|
|
if (he === void 0)
|
|
try {
|
|
throw Error();
|
|
} catch (ie) {
|
|
var N = ie.stack.trim().match(/\n( *(at )?)/);
|
|
he = N && N[1] || "";
|
|
}
|
|
return `
|
|
` + he + u;
|
|
}
|
|
}
|
|
var de = !1, Ae;
|
|
{
|
|
var $i = typeof WeakMap == "function" ? WeakMap : Map;
|
|
Ae = new $i();
|
|
}
|
|
function Hr(u, k) {
|
|
if (!u || de)
|
|
return "";
|
|
{
|
|
var $ = Ae.get(u);
|
|
if ($ !== void 0)
|
|
return $;
|
|
}
|
|
var N;
|
|
de = !0;
|
|
var ie = Error.prepareStackTrace;
|
|
Error.prepareStackTrace = void 0;
|
|
var ce;
|
|
ce = ve.current, ve.current = null, te();
|
|
try {
|
|
if (k) {
|
|
var Q = function() {
|
|
throw Error();
|
|
};
|
|
if (Object.defineProperty(Q.prototype, "props", {
|
|
set: function() {
|
|
throw Error();
|
|
}
|
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
try {
|
|
Reflect.construct(Q, []);
|
|
} catch (Ve) {
|
|
N = Ve;
|
|
}
|
|
Reflect.construct(u, [], Q);
|
|
} else {
|
|
try {
|
|
Q.call();
|
|
} catch (Ve) {
|
|
N = Ve;
|
|
}
|
|
u.call(Q.prototype);
|
|
}
|
|
} else {
|
|
try {
|
|
throw Error();
|
|
} catch (Ve) {
|
|
N = Ve;
|
|
}
|
|
u();
|
|
}
|
|
} catch (Ve) {
|
|
if (Ve && N && typeof Ve.stack == "string") {
|
|
for (var K = Ve.stack.split(`
|
|
`), Me = N.stack.split(`
|
|
`), ge = K.length - 1, we = Me.length - 1; ge >= 1 && we >= 0 && K[ge] !== Me[we]; )
|
|
we--;
|
|
for (; ge >= 1 && we >= 0; ge--, we--)
|
|
if (K[ge] !== Me[we]) {
|
|
if (ge !== 1 || we !== 1)
|
|
do
|
|
if (ge--, we--, we < 0 || K[ge] !== Me[we]) {
|
|
var Ge = `
|
|
` + K[ge].replace(" at new ", " at ");
|
|
return u.displayName && Ge.includes("<anonymous>") && (Ge = Ge.replace("<anonymous>", u.displayName)), typeof u == "function" && Ae.set(u, Ge), Ge;
|
|
}
|
|
while (ge >= 1 && we >= 0);
|
|
break;
|
|
}
|
|
}
|
|
} finally {
|
|
de = !1, ve.current = ce, oe(), Error.prepareStackTrace = ie;
|
|
}
|
|
var Ct = u ? u.displayName || u.name : "", mt = Ct ? ue(Ct) : "";
|
|
return typeof u == "function" && Ae.set(u, mt), mt;
|
|
}
|
|
function Xt(u, k, $) {
|
|
return Hr(u, !1);
|
|
}
|
|
function Ti(u) {
|
|
var k = u.prototype;
|
|
return !!(k && k.isReactComponent);
|
|
}
|
|
function Zt(u, k, $) {
|
|
if (u == null)
|
|
return "";
|
|
if (typeof u == "function")
|
|
return Hr(u, Ti(u));
|
|
if (typeof u == "string")
|
|
return ue(u);
|
|
switch (u) {
|
|
case y:
|
|
return ue("Suspense");
|
|
case v:
|
|
return ue("SuspenseList");
|
|
}
|
|
if (typeof u == "object")
|
|
switch (u.$$typeof) {
|
|
case h:
|
|
return Xt(u.render);
|
|
case f:
|
|
return Zt(u.type, k, $);
|
|
case C: {
|
|
var N = u, ie = N._payload, ce = N._init;
|
|
try {
|
|
return Zt(ce(ie), k, $);
|
|
} catch {
|
|
}
|
|
}
|
|
}
|
|
return "";
|
|
}
|
|
var xt = Object.prototype.hasOwnProperty, Lt = {}, qr = O.ReactDebugCurrentFrame;
|
|
function Ft(u) {
|
|
if (u) {
|
|
var k = u._owner, $ = Zt(u.type, u._source, k ? k.type : null);
|
|
qr.setExtraStackFrame($);
|
|
} else
|
|
qr.setExtraStackFrame(null);
|
|
}
|
|
function lt(u, k, $, N, ie) {
|
|
{
|
|
var ce = Function.call.bind(xt);
|
|
for (var Q in u)
|
|
if (ce(u, Q)) {
|
|
var K = void 0;
|
|
try {
|
|
if (typeof u[Q] != "function") {
|
|
var Me = Error((N || "React class") + ": " + $ + " type `" + Q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof u[Q] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
throw Me.name = "Invariant Violation", Me;
|
|
}
|
|
K = u[Q](k, Q, N, $, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
} catch (ge) {
|
|
K = ge;
|
|
}
|
|
K && !(K instanceof Error) && (Ft(ie), R("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", N || "React class", $, Q, typeof K), Ft(null)), K instanceof Error && !(K.message in Lt) && (Lt[K.message] = !0, Ft(ie), R("Failed %s type: %s", $, K.message), Ft(null));
|
|
}
|
|
}
|
|
}
|
|
var Mt = Array.isArray;
|
|
function Jt(u) {
|
|
return Mt(u);
|
|
}
|
|
function Wr(u) {
|
|
{
|
|
var k = typeof Symbol == "function" && Symbol.toStringTag, $ = k && u[Symbol.toStringTag] || u.constructor.name || "Object";
|
|
return $;
|
|
}
|
|
}
|
|
function Kr(u) {
|
|
try {
|
|
return Qt(u), !1;
|
|
} catch {
|
|
return !0;
|
|
}
|
|
}
|
|
function Qt(u) {
|
|
return "" + u;
|
|
}
|
|
function fr(u) {
|
|
if (Kr(u))
|
|
return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Wr(u)), Qt(u);
|
|
}
|
|
var _t = O.ReactCurrentOwner, Si = {
|
|
key: !0,
|
|
ref: !0,
|
|
__self: !0,
|
|
__source: !0
|
|
}, Yr, Gr, Dt;
|
|
Dt = {};
|
|
function Ai(u) {
|
|
if (xt.call(u, "ref")) {
|
|
var k = Object.getOwnPropertyDescriptor(u, "ref").get;
|
|
if (k && k.isReactWarning)
|
|
return !1;
|
|
}
|
|
return u.ref !== void 0;
|
|
}
|
|
function Ri(u) {
|
|
if (xt.call(u, "key")) {
|
|
var k = Object.getOwnPropertyDescriptor(u, "key").get;
|
|
if (k && k.isReactWarning)
|
|
return !1;
|
|
}
|
|
return u.key !== void 0;
|
|
}
|
|
function Ii(u, k) {
|
|
if (typeof u.ref == "string" && _t.current && k && _t.current.stateNode !== k) {
|
|
var $ = Ce(_t.current.type);
|
|
Dt[$] || (R('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Ce(_t.current.type), u.ref), Dt[$] = !0);
|
|
}
|
|
}
|
|
function wt(u, k) {
|
|
{
|
|
var $ = function() {
|
|
Yr || (Yr = !0, R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", k));
|
|
};
|
|
$.isReactWarning = !0, Object.defineProperty(u, "key", {
|
|
get: $,
|
|
configurable: !0
|
|
});
|
|
}
|
|
}
|
|
function Xr(u, k) {
|
|
{
|
|
var $ = function() {
|
|
Gr || (Gr = !0, R("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", k));
|
|
};
|
|
$.isReactWarning = !0, Object.defineProperty(u, "ref", {
|
|
get: $,
|
|
configurable: !0
|
|
});
|
|
}
|
|
}
|
|
var Oi = function(u, k, $, N, ie, ce, Q) {
|
|
var K = {
|
|
// This tag allows us to uniquely identify this as a React Element
|
|
$$typeof: e,
|
|
// Built-in properties that belong on the element
|
|
type: u,
|
|
key: k,
|
|
ref: $,
|
|
props: Q,
|
|
// Record the component responsible for creating this element.
|
|
_owner: ce
|
|
};
|
|
return K._store = {}, Object.defineProperty(K._store, "validated", {
|
|
configurable: !1,
|
|
enumerable: !1,
|
|
writable: !0,
|
|
value: !1
|
|
}), Object.defineProperty(K, "_self", {
|
|
configurable: !1,
|
|
enumerable: !1,
|
|
writable: !1,
|
|
value: N
|
|
}), Object.defineProperty(K, "_source", {
|
|
configurable: !1,
|
|
enumerable: !1,
|
|
writable: !1,
|
|
value: ie
|
|
}), Object.freeze && (Object.freeze(K.props), Object.freeze(K)), K;
|
|
};
|
|
function zi(u, k, $, N, ie) {
|
|
{
|
|
var ce, Q = {}, K = null, Me = null;
|
|
$ !== void 0 && (fr($), K = "" + $), Ri(k) && (fr(k.key), K = "" + k.key), Ai(k) && (Me = k.ref, Ii(k, ie));
|
|
for (ce in k)
|
|
xt.call(k, ce) && !Si.hasOwnProperty(ce) && (Q[ce] = k[ce]);
|
|
if (u && u.defaultProps) {
|
|
var ge = u.defaultProps;
|
|
for (ce in ge)
|
|
Q[ce] === void 0 && (Q[ce] = ge[ce]);
|
|
}
|
|
if (K || Me) {
|
|
var we = typeof u == "function" ? u.displayName || u.name || "Unknown" : u;
|
|
K && wt(Q, we), Me && Xr(Q, we);
|
|
}
|
|
return Oi(u, K, Me, ie, N, _t.current, Q);
|
|
}
|
|
}
|
|
var er = O.ReactCurrentOwner, Zr = O.ReactDebugCurrentFrame;
|
|
function vt(u) {
|
|
if (u) {
|
|
var k = u._owner, $ = Zt(u.type, u._source, k ? k.type : null);
|
|
Zr.setExtraStackFrame($);
|
|
} else
|
|
Zr.setExtraStackFrame(null);
|
|
}
|
|
var Nt;
|
|
Nt = !1;
|
|
function kt(u) {
|
|
return typeof u == "object" && u !== null && u.$$typeof === e;
|
|
}
|
|
function Bt() {
|
|
{
|
|
if (er.current) {
|
|
var u = Ce(er.current.type);
|
|
if (u)
|
|
return `
|
|
|
|
Check the render method of \`` + u + "`.";
|
|
}
|
|
return "";
|
|
}
|
|
}
|
|
function Pi(u) {
|
|
return "";
|
|
}
|
|
var Jr = {};
|
|
function Li(u) {
|
|
{
|
|
var k = Bt();
|
|
if (!k) {
|
|
var $ = typeof u == "string" ? u : u.displayName || u.name;
|
|
$ && (k = `
|
|
|
|
Check the top-level render call using <` + $ + ">.");
|
|
}
|
|
return k;
|
|
}
|
|
}
|
|
function Qr(u, k) {
|
|
{
|
|
if (!u._store || u._store.validated || u.key != null)
|
|
return;
|
|
u._store.validated = !0;
|
|
var $ = Li(k);
|
|
if (Jr[$])
|
|
return;
|
|
Jr[$] = !0;
|
|
var N = "";
|
|
u && u._owner && u._owner !== er.current && (N = " It was passed a child from " + Ce(u._owner.type) + "."), vt(u), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', $, N), vt(null);
|
|
}
|
|
}
|
|
function eo(u, k) {
|
|
{
|
|
if (typeof u != "object")
|
|
return;
|
|
if (Jt(u))
|
|
for (var $ = 0; $ < u.length; $++) {
|
|
var N = u[$];
|
|
kt(N) && Qr(N, k);
|
|
}
|
|
else if (kt(u))
|
|
u._store && (u._store.validated = !0);
|
|
else if (u) {
|
|
var ie = I(u);
|
|
if (typeof ie == "function" && ie !== u.entries)
|
|
for (var ce = ie.call(u), Q; !(Q = ce.next()).done; )
|
|
kt(Q.value) && Qr(Q.value, k);
|
|
}
|
|
}
|
|
}
|
|
function jt(u) {
|
|
{
|
|
var k = u.type;
|
|
if (k == null || typeof k == "string")
|
|
return;
|
|
var $;
|
|
if (typeof k == "function")
|
|
$ = k.propTypes;
|
|
else if (typeof k == "object" && (k.$$typeof === h || // Note: Memo only checks outer props here.
|
|
// Inner props are checked in the reconciler.
|
|
k.$$typeof === f))
|
|
$ = k.propTypes;
|
|
else
|
|
return;
|
|
if ($) {
|
|
var N = Ce(k);
|
|
lt($, u.props, "prop", N, u);
|
|
} else if (k.PropTypes !== void 0 && !Nt) {
|
|
Nt = !0;
|
|
var ie = Ce(k);
|
|
R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ie || "Unknown");
|
|
}
|
|
typeof k.getDefaultProps == "function" && !k.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
}
|
|
}
|
|
function vr(u) {
|
|
{
|
|
for (var k = Object.keys(u.props), $ = 0; $ < k.length; $++) {
|
|
var N = k[$];
|
|
if (N !== "children" && N !== "key") {
|
|
vt(u), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), vt(null);
|
|
break;
|
|
}
|
|
}
|
|
u.ref !== null && (vt(u), R("Invalid attribute `ref` supplied to `React.Fragment`."), vt(null));
|
|
}
|
|
}
|
|
var mr = {};
|
|
function to(u, k, $, N, ie, ce) {
|
|
{
|
|
var Q = ze(u);
|
|
if (!Q) {
|
|
var K = "";
|
|
(u === void 0 || typeof u == "object" && u !== null && Object.keys(u).length === 0) && (K += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
var Me = Pi();
|
|
Me ? K += Me : K += Bt();
|
|
var ge;
|
|
u === null ? ge = "null" : Jt(u) ? ge = "array" : u !== void 0 && u.$$typeof === e ? (ge = "<" + (Ce(u.type) || "Unknown") + " />", K = " Did you accidentally export a JSX literal instead of a component?") : ge = typeof u, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ge, K);
|
|
}
|
|
var we = zi(u, k, $, ie, ce);
|
|
if (we == null)
|
|
return we;
|
|
if (Q) {
|
|
var Ge = k.children;
|
|
if (Ge !== void 0)
|
|
if (N)
|
|
if (Jt(Ge)) {
|
|
for (var Ct = 0; Ct < Ge.length; Ct++)
|
|
eo(Ge[Ct], u);
|
|
Object.freeze && Object.freeze(Ge);
|
|
} else
|
|
R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
else
|
|
eo(Ge, u);
|
|
}
|
|
if (xt.call(k, "key")) {
|
|
var mt = Ce(u), Ve = Object.keys(k).filter(function(Bi) {
|
|
return Bi !== "key";
|
|
}), br = Ve.length > 0 ? "{key: someKey, " + Ve.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
if (!mr[mt + br]) {
|
|
var Ni = Ve.length > 0 ? "{" + Ve.join(": ..., ") + ": ...}" : "{}";
|
|
R(`A props object containing a "key" prop is being spread into JSX:
|
|
let props = %s;
|
|
<%s {...props} />
|
|
React keys must be passed directly to JSX without using spread:
|
|
let props = %s;
|
|
<%s key={someKey} {...props} />`, br, mt, Ni, mt), mr[mt + br] = !0;
|
|
}
|
|
}
|
|
return u === o ? vr(we) : jt(we), we;
|
|
}
|
|
}
|
|
function Fi(u, k, $) {
|
|
return to(u, k, $, !0);
|
|
}
|
|
function Mi(u, k, $) {
|
|
return to(u, k, $, !1);
|
|
}
|
|
var Di = Mi, ro = Fi;
|
|
xr.Fragment = o, xr.jsx = Di, xr.jsxs = ro;
|
|
}()), xr;
|
|
}
|
|
process.env.NODE_ENV === "production" ? da.exports = Tl() : da.exports = Sl();
|
|
var V = da.exports;
|
|
/**
|
|
* @license
|
|
* Copyright 2018 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const Al = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "className"]), xn = /* @__PURE__ */ new WeakMap(), _n = (r, e, t, o, i) => {
|
|
const a = i == null ? void 0 : i[e];
|
|
a === void 0 ? (r[e] = t, t == null && e in HTMLElement.prototype && r.removeAttribute(e)) : t !== o && ((s, d, h) => {
|
|
let y = xn.get(s);
|
|
y === void 0 && xn.set(s, y = /* @__PURE__ */ new Map());
|
|
let v = y.get(d);
|
|
h !== void 0 ? v === void 0 ? (y.set(d, v = { handleEvent: h }), s.addEventListener(d, v)) : v.handleEvent = h : v !== void 0 && (y.delete(d), s.removeEventListener(d, v));
|
|
})(r, a, t);
|
|
}, ee = ({ react: r, tagName: e, elementClass: t, events: o, displayName: i }) => {
|
|
const a = new Set(Object.keys(o ?? {})), s = r.forwardRef((d, h) => {
|
|
const y = r.useRef(/* @__PURE__ */ new Map()), v = r.useRef(null), f = {}, C = {};
|
|
for (const [w, A] of Object.entries(d)) Al.has(w) ? f[w === "className" ? "class" : w] = A : a.has(w) || w in t.prototype ? C[w] = A : f[w] = A;
|
|
return r.useLayoutEffect(() => {
|
|
if (v.current === null) return;
|
|
const w = /* @__PURE__ */ new Map();
|
|
for (const A in C) _n(v.current, A, d[A], y.current.get(A), o), y.current.delete(A), w.set(A, d[A]);
|
|
for (const [A, S] of y.current) _n(v.current, A, void 0, S, o);
|
|
y.current = w;
|
|
}), r.useLayoutEffect(() => {
|
|
var w;
|
|
(w = v.current) == null || w.removeAttribute("defer-hydration");
|
|
}, []), f.suppressHydrationWarning = !0, r.createElement(e, { ...f, ref: r.useCallback((w) => {
|
|
v.current = w, typeof h == "function" ? h(w) : h !== null && (h.current = w);
|
|
}, [h]) });
|
|
});
|
|
return s.displayName = i ?? t.name, s;
|
|
};
|
|
function l(r, e, t, o) {
|
|
var i = arguments.length, a = i < 3 ? e : o === null ? o = Object.getOwnPropertyDescriptor(e, t) : o, s;
|
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(r, e, t, o);
|
|
else for (var d = r.length - 1; d >= 0; d--) (s = r[d]) && (a = (i < 3 ? s(a) : i > 3 ? s(e, t, a) : s(e, t)) || a);
|
|
return i > 3 && a && Object.defineProperty(e, t, a), a;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const H = (r) => (e, t) => {
|
|
t !== void 0 ? t.addInitializer(() => {
|
|
customElements.define(r, e);
|
|
}) : customElements.define(r, e);
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const Eo = globalThis, Sa = Eo.ShadowRoot && (Eo.ShadyCSS === void 0 || Eo.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Aa = Symbol(), wn = /* @__PURE__ */ new WeakMap();
|
|
let es = class {
|
|
constructor(e, t, o) {
|
|
if (this._$cssResult$ = !0, o !== Aa) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
this.cssText = e, this.t = t;
|
|
}
|
|
get styleSheet() {
|
|
let e = this.o;
|
|
const t = this.t;
|
|
if (Sa && e === void 0) {
|
|
const o = t !== void 0 && t.length === 1;
|
|
o && (e = wn.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), o && wn.set(t, e));
|
|
}
|
|
return e;
|
|
}
|
|
toString() {
|
|
return this.cssText;
|
|
}
|
|
};
|
|
const Rl = (r) => new es(typeof r == "string" ? r : r + "", void 0, Aa), F = (r, ...e) => {
|
|
const t = r.length === 1 ? r[0] : e.reduce((o, i, a) => o + ((s) => {
|
|
if (s._$cssResult$ === !0) return s.cssText;
|
|
if (typeof s == "number") return s;
|
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
})(i) + r[a + 1], r[0]);
|
|
return new es(t, r, Aa);
|
|
}, Il = (r, e) => {
|
|
if (Sa) r.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
else for (const t of e) {
|
|
const o = document.createElement("style"), i = Eo.litNonce;
|
|
i !== void 0 && o.setAttribute("nonce", i), o.textContent = t.cssText, r.appendChild(o);
|
|
}
|
|
}, kn = Sa ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((e) => {
|
|
let t = "";
|
|
for (const o of e.cssRules) t += o.cssText;
|
|
return Rl(t);
|
|
})(r) : r;
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const { is: Ol, defineProperty: zl, getOwnPropertyDescriptor: Pl, getOwnPropertyNames: Ll, getOwnPropertySymbols: Fl, getPrototypeOf: Ml } = Object, St = globalThis, Cn = St.trustedTypes, Dl = Cn ? Cn.emptyScript : "", Gi = St.reactiveElementPolyfillSupport, Er = (r, e) => r, Ro = { toAttribute(r, e) {
|
|
switch (e) {
|
|
case Boolean:
|
|
r = r ? Dl : null;
|
|
break;
|
|
case Object:
|
|
case Array:
|
|
r = r == null ? r : JSON.stringify(r);
|
|
}
|
|
return r;
|
|
}, fromAttribute(r, e) {
|
|
let t = r;
|
|
switch (e) {
|
|
case Boolean:
|
|
t = r !== null;
|
|
break;
|
|
case Number:
|
|
t = r === null ? null : Number(r);
|
|
break;
|
|
case Object:
|
|
case Array:
|
|
try {
|
|
t = JSON.parse(r);
|
|
} catch {
|
|
t = null;
|
|
}
|
|
}
|
|
return t;
|
|
} }, Ra = (r, e) => !Ol(r, e), En = { attribute: !0, type: String, converter: Ro, reflect: !1, hasChanged: Ra };
|
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), St.litPropertyMetadata ?? (St.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
class ir extends HTMLElement {
|
|
static addInitializer(e) {
|
|
this._$Ei(), (this.l ?? (this.l = [])).push(e);
|
|
}
|
|
static get observedAttributes() {
|
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
}
|
|
static createProperty(e, t = En) {
|
|
if (t.state && (t.attribute = !1), this._$Ei(), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
const o = Symbol(), i = this.getPropertyDescriptor(e, o, t);
|
|
i !== void 0 && zl(this.prototype, e, i);
|
|
}
|
|
}
|
|
static getPropertyDescriptor(e, t, o) {
|
|
const { get: i, set: a } = Pl(this.prototype, e) ?? { get() {
|
|
return this[t];
|
|
}, set(s) {
|
|
this[t] = s;
|
|
} };
|
|
return { get() {
|
|
return i == null ? void 0 : i.call(this);
|
|
}, set(s) {
|
|
const d = i == null ? void 0 : i.call(this);
|
|
a.call(this, s), this.requestUpdate(e, d, o);
|
|
}, configurable: !0, enumerable: !0 };
|
|
}
|
|
static getPropertyOptions(e) {
|
|
return this.elementProperties.get(e) ?? En;
|
|
}
|
|
static _$Ei() {
|
|
if (this.hasOwnProperty(Er("elementProperties"))) return;
|
|
const e = Ml(this);
|
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
}
|
|
static finalize() {
|
|
if (this.hasOwnProperty(Er("finalized"))) return;
|
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Er("properties"))) {
|
|
const t = this.properties, o = [...Ll(t), ...Fl(t)];
|
|
for (const i of o) this.createProperty(i, t[i]);
|
|
}
|
|
const e = this[Symbol.metadata];
|
|
if (e !== null) {
|
|
const t = litPropertyMetadata.get(e);
|
|
if (t !== void 0) for (const [o, i] of t) this.elementProperties.set(o, i);
|
|
}
|
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
for (const [t, o] of this.elementProperties) {
|
|
const i = this._$Eu(t, o);
|
|
i !== void 0 && this._$Eh.set(i, t);
|
|
}
|
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
}
|
|
static finalizeStyles(e) {
|
|
const t = [];
|
|
if (Array.isArray(e)) {
|
|
const o = new Set(e.flat(1 / 0).reverse());
|
|
for (const i of o) t.unshift(kn(i));
|
|
} else e !== void 0 && t.push(kn(e));
|
|
return t;
|
|
}
|
|
static _$Eu(e, t) {
|
|
const o = t.attribute;
|
|
return o === !1 ? void 0 : typeof o == "string" ? o : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
}
|
|
constructor() {
|
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
}
|
|
_$Ev() {
|
|
var e;
|
|
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
|
|
}
|
|
addController(e) {
|
|
var t;
|
|
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(e), this.renderRoot !== void 0 && this.isConnected && ((t = e.hostConnected) == null || t.call(e));
|
|
}
|
|
removeController(e) {
|
|
var t;
|
|
(t = this._$EO) == null || t.delete(e);
|
|
}
|
|
_$E_() {
|
|
const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
|
|
for (const o of t.keys()) this.hasOwnProperty(o) && (e.set(o, this[o]), delete this[o]);
|
|
e.size > 0 && (this._$Ep = e);
|
|
}
|
|
createRenderRoot() {
|
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
return Il(e, this.constructor.elementStyles), e;
|
|
}
|
|
connectedCallback() {
|
|
var e;
|
|
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$EO) == null || e.forEach((t) => {
|
|
var o;
|
|
return (o = t.hostConnected) == null ? void 0 : o.call(t);
|
|
});
|
|
}
|
|
enableUpdating(e) {
|
|
}
|
|
disconnectedCallback() {
|
|
var e;
|
|
(e = this._$EO) == null || e.forEach((t) => {
|
|
var o;
|
|
return (o = t.hostDisconnected) == null ? void 0 : o.call(t);
|
|
});
|
|
}
|
|
attributeChangedCallback(e, t, o) {
|
|
this._$AK(e, o);
|
|
}
|
|
_$EC(e, t) {
|
|
var a;
|
|
const o = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, o);
|
|
if (i !== void 0 && o.reflect === !0) {
|
|
const s = (((a = o.converter) == null ? void 0 : a.toAttribute) !== void 0 ? o.converter : Ro).toAttribute(t, o.type);
|
|
this._$Em = e, s == null ? this.removeAttribute(i) : this.setAttribute(i, s), this._$Em = null;
|
|
}
|
|
}
|
|
_$AK(e, t) {
|
|
var a;
|
|
const o = this.constructor, i = o._$Eh.get(e);
|
|
if (i !== void 0 && this._$Em !== i) {
|
|
const s = o.getPropertyOptions(i), d = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((a = s.converter) == null ? void 0 : a.fromAttribute) !== void 0 ? s.converter : Ro;
|
|
this._$Em = i, this[i] = d.fromAttribute(t, s.type), this._$Em = null;
|
|
}
|
|
}
|
|
requestUpdate(e, t, o) {
|
|
if (e !== void 0) {
|
|
if (o ?? (o = this.constructor.getPropertyOptions(e)), !(o.hasChanged ?? Ra)(this[e], t)) return;
|
|
this.P(e, t, o);
|
|
}
|
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
}
|
|
P(e, t, o) {
|
|
this._$AL.has(e) || this._$AL.set(e, t), o.reflect === !0 && this._$Em !== e && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(e);
|
|
}
|
|
async _$ET() {
|
|
this.isUpdatePending = !0;
|
|
try {
|
|
await this._$ES;
|
|
} catch (t) {
|
|
Promise.reject(t);
|
|
}
|
|
const e = this.scheduleUpdate();
|
|
return e != null && await e, !this.isUpdatePending;
|
|
}
|
|
scheduleUpdate() {
|
|
return this.performUpdate();
|
|
}
|
|
performUpdate() {
|
|
var o;
|
|
if (!this.isUpdatePending) return;
|
|
if (!this.hasUpdated) {
|
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
for (const [a, s] of this._$Ep) this[a] = s;
|
|
this._$Ep = void 0;
|
|
}
|
|
const i = this.constructor.elementProperties;
|
|
if (i.size > 0) for (const [a, s] of i) s.wrapped !== !0 || this._$AL.has(a) || this[a] === void 0 || this.P(a, this[a], s);
|
|
}
|
|
let e = !1;
|
|
const t = this._$AL;
|
|
try {
|
|
e = this.shouldUpdate(t), e ? (this.willUpdate(t), (o = this._$EO) == null || o.forEach((i) => {
|
|
var a;
|
|
return (a = i.hostUpdate) == null ? void 0 : a.call(i);
|
|
}), this.update(t)) : this._$EU();
|
|
} catch (i) {
|
|
throw e = !1, this._$EU(), i;
|
|
}
|
|
e && this._$AE(t);
|
|
}
|
|
willUpdate(e) {
|
|
}
|
|
_$AE(e) {
|
|
var t;
|
|
(t = this._$EO) == null || t.forEach((o) => {
|
|
var i;
|
|
return (i = o.hostUpdated) == null ? void 0 : i.call(o);
|
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
}
|
|
_$EU() {
|
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
}
|
|
get updateComplete() {
|
|
return this.getUpdateComplete();
|
|
}
|
|
getUpdateComplete() {
|
|
return this._$ES;
|
|
}
|
|
shouldUpdate(e) {
|
|
return !0;
|
|
}
|
|
update(e) {
|
|
this._$Ej && (this._$Ej = this._$Ej.forEach((t) => this._$EC(t, this[t]))), this._$EU();
|
|
}
|
|
updated(e) {
|
|
}
|
|
firstUpdated(e) {
|
|
}
|
|
}
|
|
ir.elementStyles = [], ir.shadowRootOptions = { mode: "open" }, ir[Er("elementProperties")] = /* @__PURE__ */ new Map(), ir[Er("finalized")] = /* @__PURE__ */ new Map(), Gi == null || Gi({ ReactiveElement: ir }), (St.reactiveElementVersions ?? (St.reactiveElementVersions = [])).push("2.0.4");
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const Nl = { attribute: !0, type: String, converter: Ro, reflect: !1, hasChanged: Ra }, Bl = (r = Nl, e, t) => {
|
|
const { kind: o, metadata: i } = t;
|
|
let a = globalThis.litPropertyMetadata.get(i);
|
|
if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), a.set(t.name, r), o === "accessor") {
|
|
const { name: s } = t;
|
|
return { set(d) {
|
|
const h = e.get.call(this);
|
|
e.set.call(this, d), this.requestUpdate(s, h, r);
|
|
}, init(d) {
|
|
return d !== void 0 && this.P(s, void 0, r), d;
|
|
} };
|
|
}
|
|
if (o === "setter") {
|
|
const { name: s } = t;
|
|
return function(d) {
|
|
const h = this[s];
|
|
e.call(this, d), this.requestUpdate(s, h, r);
|
|
};
|
|
}
|
|
throw Error("Unsupported decorator location: " + o);
|
|
};
|
|
function p(r) {
|
|
return (e, t) => typeof t == "object" ? Bl(r, e, t) : ((o, i, a) => {
|
|
const s = i.hasOwnProperty(a);
|
|
return i.constructor.createProperty(a, s ? { ...o, wrapped: !0 } : o), s ? Object.getOwnPropertyDescriptor(i, a) : void 0;
|
|
})(r, e, t);
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
function se(r) {
|
|
return p({ ...r, state: !0, attribute: !1 });
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const Pr = (r, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(r, e, t), t);
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
function G(r, e) {
|
|
return (t, o, i) => {
|
|
const a = (s) => {
|
|
var d;
|
|
return ((d = s.renderRoot) == null ? void 0 : d.querySelector(r)) ?? null;
|
|
};
|
|
return Pr(t, o, { get() {
|
|
return a(this);
|
|
} });
|
|
};
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
let jl;
|
|
function Ul(r) {
|
|
return (e, t) => Pr(e, t, { get() {
|
|
return (this.renderRoot ?? jl ?? (jl = document.createDocumentFragment())).querySelectorAll(r);
|
|
} });
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
function ts(r) {
|
|
return (e, t) => Pr(e, t, { async get() {
|
|
var o;
|
|
return await this.updateComplete, ((o = this.renderRoot) == null ? void 0 : o.querySelector(r)) ?? null;
|
|
} });
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
function We(r) {
|
|
return (e, t) => {
|
|
const { slot: o, selector: i } = r ?? {}, a = "slot" + (o ? `[name=${o}]` : ":not([name])");
|
|
return Pr(e, t, { get() {
|
|
var h;
|
|
const s = (h = this.renderRoot) == null ? void 0 : h.querySelector(a), d = (s == null ? void 0 : s.assignedElements(r)) ?? [];
|
|
return i === void 0 ? d : d.filter((y) => y.matches(i));
|
|
} });
|
|
};
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
function Ia(r) {
|
|
return (e, t) => {
|
|
const { slot: o } = r ?? {}, i = "slot" + (o ? `[name=${o}]` : ":not([name])");
|
|
return Pr(e, t, { get() {
|
|
var s;
|
|
const a = (s = this.renderRoot) == null ? void 0 : s.querySelector(i);
|
|
return (a == null ? void 0 : a.assignedNodes(r)) ?? [];
|
|
} });
|
|
};
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const $r = globalThis, Io = $r.trustedTypes, $n = Io ? Io.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, rs = "$lit$", Tt = `lit$${Math.random().toFixed(9).slice(2)}$`, os = "?" + Tt, Vl = `<${os}>`, Ht = document, Tr = () => Ht.createComment(""), Sr = (r) => r === null || typeof r != "object" && typeof r != "function", Oa = Array.isArray, Hl = (r) => Oa(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", Xi = `[
|
|
\f\r]`, _r = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Tn = /-->/g, Sn = />/g, Ut = RegExp(`>|${Xi}(?:([^\\s"'>=/]+)(${Xi}*=${Xi}*(?:[^
|
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), An = /'/g, Rn = /"/g, is = /^(?:script|style|textarea|title)$/i, ql = (r) => (e, ...t) => ({ _$litType$: r, strings: e, values: t }), _ = ql(1), rt = Symbol.for("lit-noChange"), x = Symbol.for("lit-nothing"), In = /* @__PURE__ */ new WeakMap(), Vt = Ht.createTreeWalker(Ht, 129);
|
|
function as(r, e) {
|
|
if (!Oa(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
return $n !== void 0 ? $n.createHTML(e) : e;
|
|
}
|
|
const Wl = (r, e) => {
|
|
const t = r.length - 1, o = [];
|
|
let i, a = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", s = _r;
|
|
for (let d = 0; d < t; d++) {
|
|
const h = r[d];
|
|
let y, v, f = -1, C = 0;
|
|
for (; C < h.length && (s.lastIndex = C, v = s.exec(h), v !== null); ) C = s.lastIndex, s === _r ? v[1] === "!--" ? s = Tn : v[1] !== void 0 ? s = Sn : v[2] !== void 0 ? (is.test(v[2]) && (i = RegExp("</" + v[2], "g")), s = Ut) : v[3] !== void 0 && (s = Ut) : s === Ut ? v[0] === ">" ? (s = i ?? _r, f = -1) : v[1] === void 0 ? f = -2 : (f = s.lastIndex - v[2].length, y = v[1], s = v[3] === void 0 ? Ut : v[3] === '"' ? Rn : An) : s === Rn || s === An ? s = Ut : s === Tn || s === Sn ? s = _r : (s = Ut, i = void 0);
|
|
const w = s === Ut && r[d + 1].startsWith("/>") ? " " : "";
|
|
a += s === _r ? h + Vl : f >= 0 ? (o.push(y), h.slice(0, f) + rs + h.slice(f) + Tt + w) : h + Tt + (f === -2 ? d : w);
|
|
}
|
|
return [as(r, a + (r[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), o];
|
|
};
|
|
class Ar {
|
|
constructor({ strings: e, _$litType$: t }, o) {
|
|
let i;
|
|
this.parts = [];
|
|
let a = 0, s = 0;
|
|
const d = e.length - 1, h = this.parts, [y, v] = Wl(e, t);
|
|
if (this.el = Ar.createElement(y, o), Vt.currentNode = this.el.content, t === 2 || t === 3) {
|
|
const f = this.el.content.firstChild;
|
|
f.replaceWith(...f.childNodes);
|
|
}
|
|
for (; (i = Vt.nextNode()) !== null && h.length < d; ) {
|
|
if (i.nodeType === 1) {
|
|
if (i.hasAttributes()) for (const f of i.getAttributeNames()) if (f.endsWith(rs)) {
|
|
const C = v[s++], w = i.getAttribute(f).split(Tt), A = /([.?@])?(.*)/.exec(C);
|
|
h.push({ type: 1, index: a, name: A[2], strings: w, ctor: A[1] === "." ? Yl : A[1] === "?" ? Gl : A[1] === "@" ? Xl : mi }), i.removeAttribute(f);
|
|
} else f.startsWith(Tt) && (h.push({ type: 6, index: a }), i.removeAttribute(f));
|
|
if (is.test(i.tagName)) {
|
|
const f = i.textContent.split(Tt), C = f.length - 1;
|
|
if (C > 0) {
|
|
i.textContent = Io ? Io.emptyScript : "";
|
|
for (let w = 0; w < C; w++) i.append(f[w], Tr()), Vt.nextNode(), h.push({ type: 2, index: ++a });
|
|
i.append(f[C], Tr());
|
|
}
|
|
}
|
|
} else if (i.nodeType === 8) if (i.data === os) h.push({ type: 2, index: a });
|
|
else {
|
|
let f = -1;
|
|
for (; (f = i.data.indexOf(Tt, f + 1)) !== -1; ) h.push({ type: 7, index: a }), f += Tt.length - 1;
|
|
}
|
|
a++;
|
|
}
|
|
}
|
|
static createElement(e, t) {
|
|
const o = Ht.createElement("template");
|
|
return o.innerHTML = e, o;
|
|
}
|
|
}
|
|
function lr(r, e, t = r, o) {
|
|
var s, d;
|
|
if (e === rt) return e;
|
|
let i = o !== void 0 ? (s = t._$Co) == null ? void 0 : s[o] : t._$Cl;
|
|
const a = Sr(e) ? void 0 : e._$litDirective$;
|
|
return (i == null ? void 0 : i.constructor) !== a && ((d = i == null ? void 0 : i._$AO) == null || d.call(i, !1), a === void 0 ? i = void 0 : (i = new a(r), i._$AT(r, t, o)), o !== void 0 ? (t._$Co ?? (t._$Co = []))[o] = i : t._$Cl = i), i !== void 0 && (e = lr(r, i._$AS(r, e.values), i, o)), e;
|
|
}
|
|
class Kl {
|
|
constructor(e, t) {
|
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
}
|
|
get parentNode() {
|
|
return this._$AM.parentNode;
|
|
}
|
|
get _$AU() {
|
|
return this._$AM._$AU;
|
|
}
|
|
u(e) {
|
|
const { el: { content: t }, parts: o } = this._$AD, i = ((e == null ? void 0 : e.creationScope) ?? Ht).importNode(t, !0);
|
|
Vt.currentNode = i;
|
|
let a = Vt.nextNode(), s = 0, d = 0, h = o[0];
|
|
for (; h !== void 0; ) {
|
|
if (s === h.index) {
|
|
let y;
|
|
h.type === 2 ? y = new Lr(a, a.nextSibling, this, e) : h.type === 1 ? y = new h.ctor(a, h.name, h.strings, this, e) : h.type === 6 && (y = new Zl(a, this, e)), this._$AV.push(y), h = o[++d];
|
|
}
|
|
s !== (h == null ? void 0 : h.index) && (a = Vt.nextNode(), s++);
|
|
}
|
|
return Vt.currentNode = Ht, i;
|
|
}
|
|
p(e) {
|
|
let t = 0;
|
|
for (const o of this._$AV) o !== void 0 && (o.strings !== void 0 ? (o._$AI(e, o, t), t += o.strings.length - 2) : o._$AI(e[t])), t++;
|
|
}
|
|
}
|
|
class Lr {
|
|
get _$AU() {
|
|
var e;
|
|
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
}
|
|
constructor(e, t, o, i) {
|
|
this.type = 2, this._$AH = x, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = o, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
|
|
}
|
|
get parentNode() {
|
|
let e = this._$AA.parentNode;
|
|
const t = this._$AM;
|
|
return t !== void 0 && (e == null ? void 0 : e.nodeType) === 11 && (e = t.parentNode), e;
|
|
}
|
|
get startNode() {
|
|
return this._$AA;
|
|
}
|
|
get endNode() {
|
|
return this._$AB;
|
|
}
|
|
_$AI(e, t = this) {
|
|
e = lr(this, e, t), Sr(e) ? e === x || e == null || e === "" ? (this._$AH !== x && this._$AR(), this._$AH = x) : e !== this._$AH && e !== rt && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Hl(e) ? this.k(e) : this._(e);
|
|
}
|
|
O(e) {
|
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
}
|
|
T(e) {
|
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
}
|
|
_(e) {
|
|
this._$AH !== x && Sr(this._$AH) ? this._$AA.nextSibling.data = e : this.T(Ht.createTextNode(e)), this._$AH = e;
|
|
}
|
|
$(e) {
|
|
var a;
|
|
const { values: t, _$litType$: o } = e, i = typeof o == "number" ? this._$AC(e) : (o.el === void 0 && (o.el = Ar.createElement(as(o.h, o.h[0]), this.options)), o);
|
|
if (((a = this._$AH) == null ? void 0 : a._$AD) === i) this._$AH.p(t);
|
|
else {
|
|
const s = new Kl(i, this), d = s.u(this.options);
|
|
s.p(t), this.T(d), this._$AH = s;
|
|
}
|
|
}
|
|
_$AC(e) {
|
|
let t = In.get(e.strings);
|
|
return t === void 0 && In.set(e.strings, t = new Ar(e)), t;
|
|
}
|
|
k(e) {
|
|
Oa(this._$AH) || (this._$AH = [], this._$AR());
|
|
const t = this._$AH;
|
|
let o, i = 0;
|
|
for (const a of e) i === t.length ? t.push(o = new Lr(this.O(Tr()), this.O(Tr()), this, this.options)) : o = t[i], o._$AI(a), i++;
|
|
i < t.length && (this._$AR(o && o._$AB.nextSibling, i), t.length = i);
|
|
}
|
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
var o;
|
|
for ((o = this._$AP) == null ? void 0 : o.call(this, !1, !0, t); e && e !== this._$AB; ) {
|
|
const i = e.nextSibling;
|
|
e.remove(), e = i;
|
|
}
|
|
}
|
|
setConnected(e) {
|
|
var t;
|
|
this._$AM === void 0 && (this._$Cv = e, (t = this._$AP) == null || t.call(this, e));
|
|
}
|
|
}
|
|
class mi {
|
|
get tagName() {
|
|
return this.element.tagName;
|
|
}
|
|
get _$AU() {
|
|
return this._$AM._$AU;
|
|
}
|
|
constructor(e, t, o, i, a) {
|
|
this.type = 1, this._$AH = x, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = a, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = x;
|
|
}
|
|
_$AI(e, t = this, o, i) {
|
|
const a = this.strings;
|
|
let s = !1;
|
|
if (a === void 0) e = lr(this, e, t, 0), s = !Sr(e) || e !== this._$AH && e !== rt, s && (this._$AH = e);
|
|
else {
|
|
const d = e;
|
|
let h, y;
|
|
for (e = a[0], h = 0; h < a.length - 1; h++) y = lr(this, d[o + h], t, h), y === rt && (y = this._$AH[h]), s || (s = !Sr(y) || y !== this._$AH[h]), y === x ? e = x : e !== x && (e += (y ?? "") + a[h + 1]), this._$AH[h] = y;
|
|
}
|
|
s && !i && this.j(e);
|
|
}
|
|
j(e) {
|
|
e === x ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
}
|
|
}
|
|
class Yl extends mi {
|
|
constructor() {
|
|
super(...arguments), this.type = 3;
|
|
}
|
|
j(e) {
|
|
this.element[this.name] = e === x ? void 0 : e;
|
|
}
|
|
}
|
|
class Gl extends mi {
|
|
constructor() {
|
|
super(...arguments), this.type = 4;
|
|
}
|
|
j(e) {
|
|
this.element.toggleAttribute(this.name, !!e && e !== x);
|
|
}
|
|
}
|
|
class Xl extends mi {
|
|
constructor(e, t, o, i, a) {
|
|
super(e, t, o, i, a), this.type = 5;
|
|
}
|
|
_$AI(e, t = this) {
|
|
if ((e = lr(this, e, t, 0) ?? x) === rt) return;
|
|
const o = this._$AH, i = e === x && o !== x || e.capture !== o.capture || e.once !== o.once || e.passive !== o.passive, a = e !== x && (o === x || i);
|
|
i && this.element.removeEventListener(this.name, this, o), a && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
}
|
|
handleEvent(e) {
|
|
var t;
|
|
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
}
|
|
}
|
|
class Zl {
|
|
constructor(e, t, o) {
|
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = o;
|
|
}
|
|
get _$AU() {
|
|
return this._$AM._$AU;
|
|
}
|
|
_$AI(e) {
|
|
lr(this, e);
|
|
}
|
|
}
|
|
const Zi = $r.litHtmlPolyfillSupport;
|
|
Zi == null || Zi(Ar, Lr), ($r.litHtmlVersions ?? ($r.litHtmlVersions = [])).push("3.2.1");
|
|
const za = (r, e, t) => {
|
|
const o = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
let i = o._$litPart$;
|
|
if (i === void 0) {
|
|
const a = (t == null ? void 0 : t.renderBefore) ?? null;
|
|
o._$litPart$ = i = new Lr(e.insertBefore(Tr(), a), a, void 0, t ?? {});
|
|
}
|
|
return i._$AI(r), i;
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
class W extends ir {
|
|
constructor() {
|
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
}
|
|
createRenderRoot() {
|
|
var t;
|
|
const e = super.createRenderRoot();
|
|
return (t = this.renderOptions).renderBefore ?? (t.renderBefore = e.firstChild), e;
|
|
}
|
|
update(e) {
|
|
const t = this.render();
|
|
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = za(t, this.renderRoot, this.renderOptions);
|
|
}
|
|
connectedCallback() {
|
|
var e;
|
|
super.connectedCallback(), (e = this._$Do) == null || e.setConnected(!0);
|
|
}
|
|
disconnectedCallback() {
|
|
var e;
|
|
super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
|
|
}
|
|
render() {
|
|
return rt;
|
|
}
|
|
}
|
|
var Qn;
|
|
W._$litElement$ = !0, W.finalized = !0, (Qn = globalThis.litElementHydrateSupport) == null || Qn.call(globalThis, { LitElement: W });
|
|
const Ji = globalThis.litElementPolyfillSupport;
|
|
Ji == null || Ji({ LitElement: W });
|
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const Jl = !1;
|
|
/**
|
|
* @license
|
|
* Copyright 2017 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const $t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Pa = (r) => (...e) => ({ _$litDirective$: r, values: e });
|
|
let La = class {
|
|
constructor(e) {
|
|
}
|
|
get _$AU() {
|
|
return this._$AM._$AU;
|
|
}
|
|
_$AT(e, t, o) {
|
|
this._$Ct = e, this._$AM = t, this._$Ci = o;
|
|
}
|
|
_$AS(e, t) {
|
|
return this.update(e, t);
|
|
}
|
|
update(e, t) {
|
|
return this.render(...t);
|
|
}
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2018 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const ye = Pa(class extends La {
|
|
constructor(r) {
|
|
var e;
|
|
if (super(r), r.type !== $t.ATTRIBUTE || r.name !== "class" || ((e = r.strings) == null ? void 0 : e.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
}
|
|
render(r) {
|
|
return " " + Object.keys(r).filter((e) => r[e]).join(" ") + " ";
|
|
}
|
|
update(r, [e]) {
|
|
var o, i;
|
|
if (this.st === void 0) {
|
|
this.st = /* @__PURE__ */ new Set(), r.strings !== void 0 && (this.nt = new Set(r.strings.join(" ").split(/\s/).filter((a) => a !== "")));
|
|
for (const a in e) e[a] && !((o = this.nt) != null && o.has(a)) && this.st.add(a);
|
|
return this.render(e);
|
|
}
|
|
const t = r.element.classList;
|
|
for (const a of this.st) a in e || (t.remove(a), this.st.delete(a));
|
|
for (const a in e) {
|
|
const s = !!e[a];
|
|
s === this.st.has(a) || (i = this.nt) != null && i.has(a) || (s ? (t.add(a), this.st.add(a)) : (t.remove(a), this.st.delete(a)));
|
|
}
|
|
return rt;
|
|
}
|
|
});
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const at = {
|
|
STANDARD: "cubic-bezier(0.2, 0, 0, 1)",
|
|
STANDARD_ACCELERATE: "cubic-bezier(.3,0,1,1)",
|
|
STANDARD_DECELERATE: "cubic-bezier(0,0,0,1)",
|
|
EMPHASIZED: "cubic-bezier(.3,0,0,1)",
|
|
EMPHASIZED_ACCELERATE: "cubic-bezier(.3,0,.8,.15)",
|
|
EMPHASIZED_DECELERATE: "cubic-bezier(.05,.7,.1,1)"
|
|
};
|
|
function Ql() {
|
|
let r = null;
|
|
return {
|
|
start() {
|
|
return r == null || r.abort(), r = new AbortController(), r.signal;
|
|
},
|
|
finish() {
|
|
r = null;
|
|
}
|
|
};
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class _e extends W {
|
|
constructor() {
|
|
super(...arguments), this.disabled = !1, this.error = !1, this.focused = !1, this.label = "", this.noAsterisk = !1, this.populated = !1, this.required = !1, this.resizable = !1, this.supportingText = "", this.errorText = "", this.count = -1, this.max = -1, this.hasStart = !1, this.hasEnd = !1, this.isAnimating = !1, this.refreshErrorAlert = !1, this.disableTransitions = !1;
|
|
}
|
|
get counterText() {
|
|
const e = this.count ?? -1, t = this.max ?? -1;
|
|
return e < 0 || t <= 0 ? "" : `${e} / ${t}`;
|
|
}
|
|
get supportingOrErrorText() {
|
|
return this.error && this.errorText ? this.errorText : this.supportingText;
|
|
}
|
|
/**
|
|
* Re-announces the field's error supporting text to screen readers.
|
|
*
|
|
* Error text announces to screen readers anytime it is visible and changes.
|
|
* Use the method to re-announce the message when the text has not changed,
|
|
* but announcement is still needed (such as for `reportValidity()`).
|
|
*/
|
|
reannounceError() {
|
|
this.refreshErrorAlert = !0;
|
|
}
|
|
update(e) {
|
|
e.has("disabled") && e.get("disabled") !== void 0 && (this.disableTransitions = !0), this.disabled && this.focused && (e.set("focused", !0), this.focused = !1), this.animateLabelIfNeeded({
|
|
wasFocused: e.get("focused"),
|
|
wasPopulated: e.get("populated")
|
|
}), super.update(e);
|
|
}
|
|
render() {
|
|
var a, s, d, h;
|
|
const e = this.renderLabel(
|
|
/*isFloating*/
|
|
!0
|
|
), t = this.renderLabel(
|
|
/*isFloating*/
|
|
!1
|
|
), o = (a = this.renderOutline) == null ? void 0 : a.call(this, e), i = {
|
|
disabled: this.disabled,
|
|
"disable-transitions": this.disableTransitions,
|
|
error: this.error && !this.disabled,
|
|
focused: this.focused,
|
|
"with-start": this.hasStart,
|
|
"with-end": this.hasEnd,
|
|
populated: this.populated,
|
|
resizable: this.resizable,
|
|
required: this.required,
|
|
"no-label": !this.label
|
|
};
|
|
return _`
|
|
<div class="field ${ye(i)}">
|
|
<div class="container-overflow">
|
|
${(s = this.renderBackground) == null ? void 0 : s.call(this)}
|
|
<slot name="container"></slot>
|
|
${(d = this.renderStateLayer) == null ? void 0 : d.call(this)} ${(h = this.renderIndicator) == null ? void 0 : h.call(this)} ${o}
|
|
<div class="container">
|
|
<div class="start">
|
|
<slot name="start"></slot>
|
|
</div>
|
|
<div class="middle">
|
|
<div class="label-wrapper">
|
|
${t} ${o ? x : e}
|
|
</div>
|
|
<div class="content">
|
|
<slot></slot>
|
|
</div>
|
|
</div>
|
|
<div class="end">
|
|
<slot name="end"></slot>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
${this.renderSupportingText()}
|
|
</div>
|
|
`;
|
|
}
|
|
updated(e) {
|
|
(e.has("supportingText") || e.has("errorText") || e.has("count") || e.has("max")) && this.updateSlottedAriaDescribedBy(), this.refreshErrorAlert && requestAnimationFrame(() => {
|
|
this.refreshErrorAlert = !1;
|
|
}), this.disableTransitions && requestAnimationFrame(() => {
|
|
this.disableTransitions = !1;
|
|
});
|
|
}
|
|
renderSupportingText() {
|
|
const { supportingOrErrorText: e, counterText: t } = this;
|
|
if (!e && !t)
|
|
return x;
|
|
const o = _`<span>${e}</span>`, i = t ? _`<span class="counter">${t}</span>` : x, s = this.error && this.errorText && !this.refreshErrorAlert ? "alert" : x;
|
|
return _`
|
|
<div class="supporting-text" role=${s}>${o}${i}</div>
|
|
<slot
|
|
name="aria-describedby"
|
|
@slotchange=${this.updateSlottedAriaDescribedBy}></slot>
|
|
`;
|
|
}
|
|
updateSlottedAriaDescribedBy() {
|
|
for (const e of this.slottedAriaDescribedBy)
|
|
za(_`${this.supportingOrErrorText} ${this.counterText}`, e), e.setAttribute("hidden", "");
|
|
}
|
|
renderLabel(e) {
|
|
if (!this.label)
|
|
return x;
|
|
let t;
|
|
e ? t = this.focused || this.populated || this.isAnimating : t = !this.focused && !this.populated && !this.isAnimating;
|
|
const o = {
|
|
hidden: !t,
|
|
floating: e,
|
|
resting: !e
|
|
}, i = `${this.label}${this.required && !this.noAsterisk ? "*" : ""}`;
|
|
return _`
|
|
<span class="label ${ye(o)}" aria-hidden=${!t}
|
|
>${i}</span
|
|
>
|
|
`;
|
|
}
|
|
animateLabelIfNeeded({ wasFocused: e, wasPopulated: t }) {
|
|
var a, s, d;
|
|
if (!this.label)
|
|
return;
|
|
e ?? (e = this.focused), t ?? (t = this.populated);
|
|
const o = e || t, i = this.focused || this.populated;
|
|
o !== i && (this.isAnimating = !0, (a = this.labelAnimation) == null || a.cancel(), this.labelAnimation = (s = this.floatingLabelEl) == null ? void 0 : s.animate(this.getLabelKeyframes(), { duration: 150, easing: at.STANDARD }), (d = this.labelAnimation) == null || d.addEventListener("finish", () => {
|
|
this.isAnimating = !1;
|
|
}));
|
|
}
|
|
getLabelKeyframes() {
|
|
const { floatingLabelEl: e, restingLabelEl: t } = this;
|
|
if (!e || !t)
|
|
return [];
|
|
const { x: o, y: i, height: a } = e.getBoundingClientRect(), { x: s, y: d, height: h } = t.getBoundingClientRect(), y = e.scrollWidth, v = t.scrollWidth, f = v / y, C = s - o, w = d - i + Math.round((h - a * f) / 2), A = `translateX(${C}px) translateY(${w}px) scale(${f})`, S = "translateX(0) translateY(0) scale(1)", I = t.clientWidth, R = v > I ? `${I / f}px` : "";
|
|
return this.focused || this.populated ? [
|
|
{ transform: A, width: R },
|
|
{ transform: S, width: R }
|
|
] : [
|
|
{ transform: S, width: R },
|
|
{ transform: A, width: R }
|
|
];
|
|
}
|
|
getSurfacePositionClientRect() {
|
|
return this.containerEl.getBoundingClientRect();
|
|
}
|
|
}
|
|
l([
|
|
p({ type: Boolean })
|
|
], _e.prototype, "disabled", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], _e.prototype, "error", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], _e.prototype, "focused", void 0);
|
|
l([
|
|
p()
|
|
], _e.prototype, "label", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "no-asterisk" })
|
|
], _e.prototype, "noAsterisk", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], _e.prototype, "populated", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], _e.prototype, "required", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], _e.prototype, "resizable", void 0);
|
|
l([
|
|
p({ attribute: "supporting-text" })
|
|
], _e.prototype, "supportingText", void 0);
|
|
l([
|
|
p({ attribute: "error-text" })
|
|
], _e.prototype, "errorText", void 0);
|
|
l([
|
|
p({ type: Number })
|
|
], _e.prototype, "count", void 0);
|
|
l([
|
|
p({ type: Number })
|
|
], _e.prototype, "max", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "has-start" })
|
|
], _e.prototype, "hasStart", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "has-end" })
|
|
], _e.prototype, "hasEnd", void 0);
|
|
l([
|
|
We({ slot: "aria-describedby" })
|
|
], _e.prototype, "slottedAriaDescribedBy", void 0);
|
|
l([
|
|
se()
|
|
], _e.prototype, "isAnimating", void 0);
|
|
l([
|
|
se()
|
|
], _e.prototype, "refreshErrorAlert", void 0);
|
|
l([
|
|
se()
|
|
], _e.prototype, "disableTransitions", void 0);
|
|
l([
|
|
G(".label.floating")
|
|
], _e.prototype, "floatingLabelEl", void 0);
|
|
l([
|
|
G(".label.resting")
|
|
], _e.prototype, "restingLabelEl", void 0);
|
|
l([
|
|
G(".container")
|
|
], _e.prototype, "containerEl", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class ed extends _e {
|
|
renderBackground() {
|
|
return _` <div class="background"></div> `;
|
|
}
|
|
renderStateLayer() {
|
|
return _` <div class="state-layer"></div> `;
|
|
}
|
|
renderIndicator() {
|
|
return _`<div class="active-indicator"></div>`;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const td = F`@layer styles{:host{--_active-indicator-color: var(--md-filled-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-field-active-indicator-height, 1px);--_bottom-space: var(--md-filled-field-bottom-space, 16px);--_container-color: var(--md-filled-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_content-color: var(--md-filled-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-filled-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-filled-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-filled-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-space: var(--md-filled-field-content-space, 16px);--_content-weight: var(--md-filled-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-active-indicator-color: var(--md-filled-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-indicator-height: var(--md-filled-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-field-disabled-container-opacity, 0.04);--_disabled-content-color: var(--md-filled-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-filled-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-filled-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-filled-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-filled-field-disabled-leading-content-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-filled-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-filled-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-filled-field-disabled-trailing-content-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-content-color: var(--md-filled-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-active-indicator-color: var(--md-filled-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-content-color: var(--md-filled-field-error-focus-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-label-text-color: var(--md-filled-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-filled-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-filled-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-content-color: var(--md-filled-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-filled-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-filled-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-state-layer-opacity: var(--md-filled-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-filled-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-filled-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-filled-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-filled-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-field-focus-active-indicator-height, 3px);--_focus-content-color: var(--md-filled-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-filled-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-filled-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-filled-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-active-indicator-height: var(--md-filled-field-hover-active-indicator-height, 1px);--_hover-content-color: var(--md-filled-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-filled-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-content-color: var(--md-filled-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-filled-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-filled-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-filled-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-filled-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-filled-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-filled-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-filled-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-filled-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-filled-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-filled-field-leading-space, 16px);--_supporting-text-color: var(--md-filled-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-filled-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-filled-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-filled-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-filled-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-filled-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-filled-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-filled-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-filled-field-top-space, 16px);--_trailing-content-color: var(--md-filled-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-filled-field-trailing-space, 16px);--_with-label-bottom-space: var(--md-filled-field-with-label-bottom-space, 8px);--_with-label-top-space: var(--md-filled-field-with-label-top-space, 8px);--_with-leading-content-leading-space: var(--md-filled-field-with-leading-content-leading-space, 12px);--_with-trailing-content-trailing-space: var(--md-filled-field-with-trailing-content-trailing-space, 12px);--_container-shape-start-start: var(--md-filled-field-container-shape-start-start, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-filled-field-container-shape-start-end, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-filled-field-container-shape-end-end, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-filled-field-container-shape-end-start, var(--md-filled-field-container-shape, var(--md-sys-shape-corner-none, 0px)))}.background,.state-layer{border-radius:inherit;inset:0;pointer-events:none;position:absolute}.background{background:var(--_container-color)}.state-layer{visibility:hidden}.field:not(.disabled):hover .state-layer{visibility:visible}.label.floating{position:absolute;top:var(--_with-label-top-space)}.field:not(.with-start) .label-wrapper{margin-inline-start:var(--_leading-space)}.field:not(.with-end) .label-wrapper{margin-inline-end:var(--_trailing-space)}.active-indicator{inset:auto 0 0 0;pointer-events:none;position:absolute;width:100%;z-index:1}.active-indicator::before,.active-indicator::after{border-bottom:var(--_active-indicator-height) solid var(--_active-indicator-color);inset:auto 0 0 0;content:"";position:absolute;width:100%}.active-indicator::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .active-indicator::after{opacity:1}.field:not(.with-start) .content ::slotted(*){padding-inline-start:var(--_leading-space)}.field:not(.with-end) .content ::slotted(*){padding-inline-end:var(--_trailing-space)}.field:not(.no-label) .content ::slotted(:not(textarea)){padding-bottom:var(--_with-label-bottom-space);padding-top:calc(var(--_with-label-top-space) + var(--_label-text-populated-line-height))}.field:not(.no-label) .content ::slotted(textarea){margin-bottom:var(--_with-label-bottom-space);margin-top:calc(var(--_with-label-top-space) + var(--_label-text-populated-line-height))}:hover .active-indicator::before{border-bottom-color:var(--_hover-active-indicator-color);border-bottom-width:var(--_hover-active-indicator-height)}.active-indicator::after{border-bottom-color:var(--_focus-active-indicator-color);border-bottom-width:var(--_focus-active-indicator-height)}:hover .state-layer{background:var(--_hover-state-layer-color);opacity:var(--_hover-state-layer-opacity)}.disabled .active-indicator::before{border-bottom-color:var(--_disabled-active-indicator-color);border-bottom-width:var(--_disabled-active-indicator-height);opacity:var(--_disabled-active-indicator-opacity)}.disabled .background{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.error .active-indicator::before{border-bottom-color:var(--_error-active-indicator-color)}.error:hover .active-indicator::before{border-bottom-color:var(--_error-hover-active-indicator-color)}.error:hover .state-layer{background:var(--_error-hover-state-layer-color);opacity:var(--_error-hover-state-layer-opacity)}.error .active-indicator::after{border-bottom-color:var(--_error-focus-active-indicator-color)}.resizable .container{bottom:var(--_focus-active-indicator-height);clip-path:inset(var(--_focus-active-indicator-height) 0 0 0)}.resizable .container>*{top:var(--_focus-active-indicator-height)}}@layer hcm{@media(forced-colors: active){.disabled .active-indicator::before{border-color:GrayText;opacity:1}}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const ns = F`:host{display:inline-flex;resize:both}.field{display:flex;flex:1;flex-direction:column;writing-mode:horizontal-tb;max-width:100%}.container-overflow{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start);display:flex;height:100%;position:relative}.container{align-items:center;border-radius:inherit;display:flex;flex:1;max-height:100%;min-height:100%;min-width:min-content;position:relative}.field,.container-overflow{resize:inherit}.resizable:not(.disabled) .container{resize:inherit;overflow:hidden}.disabled{pointer-events:none}slot[name=container]{border-radius:inherit}slot[name=container]::slotted(*){border-radius:inherit;inset:0;pointer-events:none;position:absolute}@layer styles{.start,.middle,.end{display:flex;box-sizing:border-box;height:100%;position:relative}.start{color:var(--_leading-content-color)}.end{color:var(--_trailing-content-color)}.start,.end{align-items:center;justify-content:center}.with-start .start{margin-inline:var(--_with-leading-content-leading-space) var(--_content-space)}.with-end .end{margin-inline:var(--_content-space) var(--_with-trailing-content-trailing-space)}.middle{align-items:stretch;align-self:baseline;flex:1}.content{color:var(--_content-color);display:flex;flex:1;opacity:0;transition:opacity 83ms cubic-bezier(0.2, 0, 0, 1)}.no-label .content,.focused .content,.populated .content{opacity:1;transition-delay:67ms}:is(.disabled,.disable-transitions) .content{transition:none}.content ::slotted(*){all:unset;color:currentColor;font-family:var(--_content-font);font-size:var(--_content-size);line-height:var(--_content-line-height);font-weight:var(--_content-weight);width:100%;overflow-wrap:revert;white-space:revert}.content ::slotted(:not(textarea)){padding-top:var(--_top-space);padding-bottom:var(--_bottom-space)}.content ::slotted(textarea){margin-top:var(--_top-space);margin-bottom:var(--_bottom-space)}:hover .content{color:var(--_hover-content-color)}:hover .start{color:var(--_hover-leading-content-color)}:hover .end{color:var(--_hover-trailing-content-color)}.focused .content{color:var(--_focus-content-color)}.focused .start{color:var(--_focus-leading-content-color)}.focused .end{color:var(--_focus-trailing-content-color)}.disabled .content{color:var(--_disabled-content-color)}.disabled.no-label .content,.disabled.focused .content,.disabled.populated .content{opacity:var(--_disabled-content-opacity)}.disabled .start{color:var(--_disabled-leading-content-color);opacity:var(--_disabled-leading-content-opacity)}.disabled .end{color:var(--_disabled-trailing-content-color);opacity:var(--_disabled-trailing-content-opacity)}.error .content{color:var(--_error-content-color)}.error .start{color:var(--_error-leading-content-color)}.error .end{color:var(--_error-trailing-content-color)}.error:hover .content{color:var(--_error-hover-content-color)}.error:hover .start{color:var(--_error-hover-leading-content-color)}.error:hover .end{color:var(--_error-hover-trailing-content-color)}.error.focused .content{color:var(--_error-focus-content-color)}.error.focused .start{color:var(--_error-focus-leading-content-color)}.error.focused .end{color:var(--_error-focus-trailing-content-color)}}@layer hcm{@media(forced-colors: active){.disabled :is(.start,.content,.end){color:GrayText;opacity:1}}}@layer styles{.label{box-sizing:border-box;color:var(--_label-text-color);overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap;z-index:1;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);width:min-content}.label-wrapper{inset:0;pointer-events:none;position:absolute}.label.resting{position:absolute;top:var(--_top-space)}.label.floating{font-size:var(--_label-text-populated-size);line-height:var(--_label-text-populated-line-height);transform-origin:top left}.label.hidden{opacity:0}.no-label .label{display:none}.label-wrapper{inset:0;position:absolute;text-align:initial}:hover .label{color:var(--_hover-label-text-color)}.focused .label{color:var(--_focus-label-text-color)}.disabled .label{color:var(--_disabled-label-text-color)}.disabled .label:not(.hidden){opacity:var(--_disabled-label-text-opacity)}.error .label{color:var(--_error-label-text-color)}.error:hover .label{color:var(--_error-hover-label-text-color)}.error.focused .label{color:var(--_error-focus-label-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .label:not(.hidden){color:GrayText;opacity:1}}}@layer styles{.supporting-text{color:var(--_supporting-text-color);display:flex;font-family:var(--_supporting-text-font);font-size:var(--_supporting-text-size);line-height:var(--_supporting-text-line-height);font-weight:var(--_supporting-text-weight);gap:16px;justify-content:space-between;padding-inline-start:var(--_supporting-text-leading-space);padding-inline-end:var(--_supporting-text-trailing-space);padding-top:var(--_supporting-text-top-space)}.supporting-text :nth-child(2){flex-shrink:0}:hover .supporting-text{color:var(--_hover-supporting-text-color)}.focus .supporting-text{color:var(--_focus-supporting-text-color)}.disabled .supporting-text{color:var(--_disabled-supporting-text-color);opacity:var(--_disabled-supporting-text-opacity)}.error .supporting-text{color:var(--_error-supporting-text-color)}.error:hover .supporting-text{color:var(--_error-hover-supporting-text-color)}.error.focus .supporting-text{color:var(--_error-focus-supporting-text-color)}}@layer hcm{@media(forced-colors: active){.disabled .supporting-text{color:GrayText;opacity:1}}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ua = class extends ed {
|
|
};
|
|
ua.styles = [ns, td];
|
|
ua = l([
|
|
H("md-filled-field")
|
|
], ua);
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const ss = Symbol.for(""), rd = (r) => {
|
|
if ((r == null ? void 0 : r.r) === ss) return r == null ? void 0 : r._$litStatic$;
|
|
}, Xe = (r, ...e) => ({ _$litStatic$: e.reduce((t, o, i) => t + ((a) => {
|
|
if (a._$litStatic$ !== void 0) return a._$litStatic$;
|
|
throw Error(`Value passed to 'literal' function must be a 'literal' result: ${a}. Use 'unsafeStatic' to pass non-literal values, but
|
|
take care to ensure page security.`);
|
|
})(o) + r[i + 1], r[0]), r: ss }), On = /* @__PURE__ */ new Map(), od = (r) => (e, ...t) => {
|
|
const o = t.length;
|
|
let i, a;
|
|
const s = [], d = [];
|
|
let h, y = 0, v = !1;
|
|
for (; y < o; ) {
|
|
for (h = e[y]; y < o && (a = t[y], (i = rd(a)) !== void 0); ) h += i + e[++y], v = !0;
|
|
y !== o && d.push(a), s.push(h), y++;
|
|
}
|
|
if (y === o && s.push(e[o]), v) {
|
|
const f = s.join("$$lit$$");
|
|
(e = On.get(f)) === void 0 && (s.raw = s, On.set(f, e = s)), t = d;
|
|
}
|
|
return r(e, ...t);
|
|
}, Fr = od(_);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const id = F`:host{--_active-indicator-color: var(--md-filled-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_active-indicator-height: var(--md-filled-text-field-active-indicator-height, 1px);--_caret-color: var(--md-filled-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_container-color: var(--md-filled-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_disabled-active-indicator-color: var(--md-filled-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-indicator-height: var(--md-filled-text-field-disabled-active-indicator-height, 1px);--_disabled-active-indicator-opacity: var(--md-filled-text-field-disabled-active-indicator-opacity, 0.38);--_disabled-container-color: var(--md-filled-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-text-field-disabled-container-opacity, 0.04);--_disabled-input-text-color: var(--md-filled-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-filled-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-filled-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-filled-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filled-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-supporting-text-color: var(--md-filled-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-filled-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-filled-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filled-text-field-disabled-trailing-icon-opacity, 0.38);--_error-active-indicator-color: var(--md-filled-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-active-indicator-color: var(--md-filled-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_error-focus-caret-color: var(--md-filled-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-filled-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-filled-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-filled-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-supporting-text-color: var(--md-filled-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-filled-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-active-indicator-color: var(--md-filled-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-input-text-color: var(--md-filled-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-filled-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-filled-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-state-layer-color: var(--md-filled-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-state-layer-opacity: var(--md-filled-text-field-error-hover-state-layer-opacity, 0.08);--_error-hover-supporting-text-color: var(--md-filled-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-filled-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-filled-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-filled-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-filled-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-supporting-text-color: var(--md-filled-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-filled-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-active-indicator-color: var(--md-filled-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_focus-active-indicator-height: var(--md-filled-text-field-focus-active-indicator-height, 3px);--_focus-input-text-color: var(--md-filled-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-filled-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-filled-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-supporting-text-color: var(--md-filled-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-filled-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-active-indicator-color: var(--md-filled-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-active-indicator-height: var(--md-filled-text-field-hover-active-indicator-height, 1px);--_hover-input-text-color: var(--md-filled-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-filled-text-field-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-leading-icon-color: var(--md-filled-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filled-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-filled-text-field-hover-state-layer-opacity, 0.08);--_hover-supporting-text-color: var(--md-filled-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filled-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-filled-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-filled-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-filled-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-filled-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-filled-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-filled-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-filled-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-filled-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-filled-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-filled-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-filled-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-filled-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-filled-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-filled-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-filled-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-filled-text-field-leading-icon-size, 24px);--_supporting-text-color: var(--md-filled-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-filled-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-filled-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-filled-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-filled-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-filled-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-filled-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-filled-text-field-container-shape-start-start, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-filled-text-field-container-shape-start-end, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-filled-text-field-container-shape-end-end, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-filled-text-field-container-shape-end-start, var(--md-filled-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_icon-input-space: var(--md-filled-text-field-icon-input-space, 16px);--_leading-space: var(--md-filled-text-field-leading-space, 16px);--_trailing-space: var(--md-filled-text-field-trailing-space, 16px);--_top-space: var(--md-filled-text-field-top-space, 16px);--_bottom-space: var(--md-filled-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-filled-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-filled-text-field-input-text-suffix-leading-space, 2px);--_with-label-top-space: var(--md-filled-text-field-with-label-top-space, 8px);--_with-label-bottom-space: var(--md-filled-text-field-with-label-bottom-space, 8px);--_focus-caret-color: var(--md-filled-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_with-leading-icon-leading-space: var(--md-filled-text-field-with-leading-icon-leading-space, 12px);--_with-trailing-icon-trailing-space: var(--md-filled-text-field-with-trailing-icon-trailing-space, 12px);--md-filled-field-active-indicator-color: var(--_active-indicator-color);--md-filled-field-active-indicator-height: var(--_active-indicator-height);--md-filled-field-bottom-space: var(--_bottom-space);--md-filled-field-container-color: var(--_container-color);--md-filled-field-container-shape-end-end: var(--_container-shape-end-end);--md-filled-field-container-shape-end-start: var(--_container-shape-end-start);--md-filled-field-container-shape-start-end: var(--_container-shape-start-end);--md-filled-field-container-shape-start-start: var(--_container-shape-start-start);--md-filled-field-content-color: var(--_input-text-color);--md-filled-field-content-font: var(--_input-text-font);--md-filled-field-content-line-height: var(--_input-text-line-height);--md-filled-field-content-size: var(--_input-text-size);--md-filled-field-content-space: var(--_icon-input-space);--md-filled-field-content-weight: var(--_input-text-weight);--md-filled-field-disabled-active-indicator-color: var(--_disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height: var(--_disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity: var(--_disabled-active-indicator-opacity);--md-filled-field-disabled-container-color: var(--_disabled-container-color);--md-filled-field-disabled-container-opacity: var(--_disabled-container-opacity);--md-filled-field-disabled-content-color: var(--_disabled-input-text-color);--md-filled-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-filled-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-filled-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color: var(--_error-active-indicator-color);--md-filled-field-error-content-color: var(--_error-input-text-color);--md-filled-field-error-focus-active-indicator-color: var(--_error-focus-active-indicator-color);--md-filled-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-filled-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color: var(--_error-hover-active-indicator-color);--md-filled-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-filled-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color: var(--_error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity: var(--_error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-filled-field-error-label-text-color: var(--_error-label-text-color);--md-filled-field-error-leading-content-color: var(--_error-leading-icon-color);--md-filled-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-filled-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-filled-field-focus-active-indicator-color: var(--_focus-active-indicator-color);--md-filled-field-focus-active-indicator-height: var(--_focus-active-indicator-height);--md-filled-field-focus-content-color: var(--_focus-input-text-color);--md-filled-field-focus-label-text-color: var(--_focus-label-text-color);--md-filled-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-filled-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-filled-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color: var(--_hover-active-indicator-color);--md-filled-field-hover-active-indicator-height: var(--_hover-active-indicator-height);--md-filled-field-hover-content-color: var(--_hover-input-text-color);--md-filled-field-hover-label-text-color: var(--_hover-label-text-color);--md-filled-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-filled-field-hover-state-layer-color: var(--_hover-state-layer-color);--md-filled-field-hover-state-layer-opacity: var(--_hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-filled-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-filled-field-label-text-color: var(--_label-text-color);--md-filled-field-label-text-font: var(--_label-text-font);--md-filled-field-label-text-line-height: var(--_label-text-line-height);--md-filled-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-filled-field-label-text-populated-size: var(--_label-text-populated-size);--md-filled-field-label-text-size: var(--_label-text-size);--md-filled-field-label-text-weight: var(--_label-text-weight);--md-filled-field-leading-content-color: var(--_leading-icon-color);--md-filled-field-leading-space: var(--_leading-space);--md-filled-field-supporting-text-color: var(--_supporting-text-color);--md-filled-field-supporting-text-font: var(--_supporting-text-font);--md-filled-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-filled-field-supporting-text-size: var(--_supporting-text-size);--md-filled-field-supporting-text-weight: var(--_supporting-text-weight);--md-filled-field-top-space: var(--_top-space);--md-filled-field-trailing-content-color: var(--_trailing-icon-color);--md-filled-field-trailing-space: var(--_trailing-space);--md-filled-field-with-label-bottom-space: var(--_with-label-bottom-space);--md-filled-field-with-label-top-space: var(--_with-label-top-space);--md-filled-field-with-leading-content-leading-space: var(--_with-leading-icon-leading-space);--md-filled-field-with-trailing-content-trailing-space: var(--_with-trailing-icon-trailing-space)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const ad = (r) => r.strings === void 0, nd = {}, sd = (r, e = nd) => r._$AH = e;
|
|
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const zn = Pa(class extends La {
|
|
constructor(r) {
|
|
if (super(r), r.type !== $t.PROPERTY && r.type !== $t.ATTRIBUTE && r.type !== $t.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
|
|
if (!ad(r)) throw Error("`live` bindings can only contain a single expression");
|
|
}
|
|
render(r) {
|
|
return r;
|
|
}
|
|
update(r, [e]) {
|
|
if (e === rt || e === x) return e;
|
|
const t = r.element, o = r.name;
|
|
if (r.type === $t.PROPERTY) {
|
|
if (e === t[o]) return rt;
|
|
} else if (r.type === $t.BOOLEAN_ATTRIBUTE) {
|
|
if (!!e === t.hasAttribute(o)) return rt;
|
|
} else if (r.type === $t.ATTRIBUTE && t.getAttribute(o) === e + "") return rt;
|
|
return sd(r), e;
|
|
}
|
|
});
|
|
/**
|
|
* @license
|
|
* Copyright 2018 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
const ls = "important", ld = " !" + ls, qt = Pa(class extends La {
|
|
constructor(r) {
|
|
var e;
|
|
if (super(r), r.type !== $t.ATTRIBUTE || r.name !== "style" || ((e = r.strings) == null ? void 0 : e.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
}
|
|
render(r) {
|
|
return Object.keys(r).reduce((e, t) => {
|
|
const o = r[t];
|
|
return o == null ? e : e + `${t = t.includes("-") ? t : t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${o};`;
|
|
}, "");
|
|
}
|
|
update(r, [e]) {
|
|
const { style: t } = r.element;
|
|
if (this.ft === void 0) return this.ft = new Set(Object.keys(e)), this.render(e);
|
|
for (const o of this.ft) e[o] == null && (this.ft.delete(o), o.includes("-") ? t.removeProperty(o) : t[o] = null);
|
|
for (const o in e) {
|
|
const i = e[o];
|
|
if (i != null) {
|
|
this.ft.add(o);
|
|
const a = typeof i == "string" && i.endsWith(ld);
|
|
o.includes("-") || a ? t.setProperty(o, a ? i.slice(0, -11) : i, a ? ls : "") : t[o] = i;
|
|
}
|
|
}
|
|
return rt;
|
|
}
|
|
});
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const ds = [
|
|
"role",
|
|
"ariaAtomic",
|
|
"ariaAutoComplete",
|
|
"ariaBusy",
|
|
"ariaChecked",
|
|
"ariaColCount",
|
|
"ariaColIndex",
|
|
"ariaColSpan",
|
|
"ariaCurrent",
|
|
"ariaDisabled",
|
|
"ariaExpanded",
|
|
"ariaHasPopup",
|
|
"ariaHidden",
|
|
"ariaInvalid",
|
|
"ariaKeyShortcuts",
|
|
"ariaLabel",
|
|
"ariaLevel",
|
|
"ariaLive",
|
|
"ariaModal",
|
|
"ariaMultiLine",
|
|
"ariaMultiSelectable",
|
|
"ariaOrientation",
|
|
"ariaPlaceholder",
|
|
"ariaPosInSet",
|
|
"ariaPressed",
|
|
"ariaReadOnly",
|
|
"ariaRequired",
|
|
"ariaRoleDescription",
|
|
"ariaRowCount",
|
|
"ariaRowIndex",
|
|
"ariaRowSpan",
|
|
"ariaSelected",
|
|
"ariaSetSize",
|
|
"ariaSort",
|
|
"ariaValueMax",
|
|
"ariaValueMin",
|
|
"ariaValueNow",
|
|
"ariaValueText"
|
|
], dd = ds.map(cs);
|
|
function Qi(r) {
|
|
return dd.includes(r);
|
|
}
|
|
function cs(r) {
|
|
return r.replace("aria", "aria-").replace(/Elements?/g, "").toLowerCase();
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const uo = Symbol("privateIgnoreAttributeChangesFor");
|
|
function Je(r) {
|
|
var e;
|
|
class t extends r {
|
|
constructor() {
|
|
super(...arguments), this[e] = /* @__PURE__ */ new Set();
|
|
}
|
|
attributeChangedCallback(i, a, s) {
|
|
if (!Qi(i)) {
|
|
super.attributeChangedCallback(i, a, s);
|
|
return;
|
|
}
|
|
if (this[uo].has(i))
|
|
return;
|
|
this[uo].add(i), this.removeAttribute(i), this[uo].delete(i);
|
|
const d = pa(i);
|
|
s === null ? delete this.dataset[d] : this.dataset[d] = s, this.requestUpdate(pa(i), a);
|
|
}
|
|
getAttribute(i) {
|
|
return Qi(i) ? super.getAttribute(ha(i)) : super.getAttribute(i);
|
|
}
|
|
removeAttribute(i) {
|
|
super.removeAttribute(i), Qi(i) && (super.removeAttribute(ha(i)), this.requestUpdate());
|
|
}
|
|
}
|
|
return e = uo, cd(t), t;
|
|
}
|
|
function cd(r) {
|
|
for (const e of ds) {
|
|
const t = cs(e), o = ha(t), i = pa(t);
|
|
r.createProperty(e, {
|
|
attribute: t,
|
|
noAccessor: !0
|
|
}), r.createProperty(Symbol(o), {
|
|
attribute: o,
|
|
noAccessor: !0
|
|
}), Object.defineProperty(r.prototype, e, {
|
|
configurable: !0,
|
|
enumerable: !0,
|
|
get() {
|
|
return this.dataset[i] ?? null;
|
|
},
|
|
set(a) {
|
|
const s = this.dataset[i] ?? null;
|
|
a !== s && (a === null ? delete this.dataset[i] : this.dataset[i] = a, this.requestUpdate(e, s));
|
|
}
|
|
});
|
|
}
|
|
}
|
|
function ha(r) {
|
|
return `data-${r}`;
|
|
}
|
|
function pa(r) {
|
|
return r.replace(/-\w/, (e) => e[1].toUpperCase());
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const ud = {
|
|
fromAttribute(r) {
|
|
return r ?? "";
|
|
},
|
|
toAttribute(r) {
|
|
return r || null;
|
|
}
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function At(r, e) {
|
|
e.bubbles && (!r.shadowRoot || e.composed) && e.stopPropagation();
|
|
const t = Reflect.construct(e.constructor, [e.type, e]), o = r.dispatchEvent(t);
|
|
return o || e.preventDefault(), o;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const je = Symbol("internals"), ea = Symbol("privateInternals");
|
|
function Rt(r) {
|
|
class e extends r {
|
|
get [je]() {
|
|
return this[ea] || (this[ea] = this.attachInternals()), this[ea];
|
|
}
|
|
}
|
|
return e;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Wt = Symbol("createValidator"), Kt = Symbol("getValidityAnchor"), ta = Symbol("privateValidator"), bt = Symbol("privateSyncValidity"), ho = Symbol("privateCustomValidationMessage");
|
|
function Mr(r) {
|
|
var e;
|
|
class t extends r {
|
|
constructor() {
|
|
super(...arguments), this[e] = "";
|
|
}
|
|
get validity() {
|
|
return this[bt](), this[je].validity;
|
|
}
|
|
get validationMessage() {
|
|
return this[bt](), this[je].validationMessage;
|
|
}
|
|
get willValidate() {
|
|
return this[bt](), this[je].willValidate;
|
|
}
|
|
checkValidity() {
|
|
return this[bt](), this[je].checkValidity();
|
|
}
|
|
reportValidity() {
|
|
return this[bt](), this[je].reportValidity();
|
|
}
|
|
setCustomValidity(i) {
|
|
this[ho] = i, this[bt]();
|
|
}
|
|
requestUpdate(i, a, s) {
|
|
super.requestUpdate(i, a, s), this[bt]();
|
|
}
|
|
firstUpdated(i) {
|
|
super.firstUpdated(i), this[bt]();
|
|
}
|
|
[(e = ho, bt)]() {
|
|
this[ta] || (this[ta] = this[Wt]());
|
|
const { validity: i, validationMessage: a } = this[ta].getValidity(), s = !!this[ho], d = this[ho] || a;
|
|
this[je].setValidity({ ...i, customError: s }, d, this[Kt]() ?? void 0);
|
|
}
|
|
[Wt]() {
|
|
throw new Error("Implement [createValidator]");
|
|
}
|
|
[Kt]() {
|
|
throw new Error("Implement [getValidityAnchor]");
|
|
}
|
|
}
|
|
return t;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const yt = Symbol("getFormValue"), Rr = Symbol("getFormState");
|
|
function cr(r) {
|
|
class e extends r {
|
|
get form() {
|
|
return this[je].form;
|
|
}
|
|
get labels() {
|
|
return this[je].labels;
|
|
}
|
|
// Use @property for the `name` and `disabled` properties to add them to the
|
|
// `observedAttributes` array and trigger `attributeChangedCallback()`.
|
|
//
|
|
// We don't use Lit's default getter/setter (`noAccessor: true`) because
|
|
// the attributes need to be updated synchronously to work with synchronous
|
|
// form APIs, and Lit updates attributes async by default.
|
|
get name() {
|
|
return this.getAttribute("name") ?? "";
|
|
}
|
|
set name(o) {
|
|
this.setAttribute("name", o);
|
|
}
|
|
get disabled() {
|
|
return this.hasAttribute("disabled");
|
|
}
|
|
set disabled(o) {
|
|
this.toggleAttribute("disabled", o);
|
|
}
|
|
attributeChangedCallback(o, i, a) {
|
|
if (o === "name" || o === "disabled") {
|
|
const s = o === "disabled" ? i !== null : i;
|
|
this.requestUpdate(o, s);
|
|
return;
|
|
}
|
|
super.attributeChangedCallback(o, i, a);
|
|
}
|
|
requestUpdate(o, i, a) {
|
|
super.requestUpdate(o, i, a), this[je].setFormValue(this[yt](), this[Rr]());
|
|
}
|
|
[yt]() {
|
|
throw new Error("Implement [getFormValue]");
|
|
}
|
|
[Rr]() {
|
|
return this[yt]();
|
|
}
|
|
formDisabledCallback(o) {
|
|
this.disabled = o;
|
|
}
|
|
}
|
|
return e.formAssociated = !0, l([
|
|
p({ noAccessor: !0 })
|
|
], e.prototype, "name", null), l([
|
|
p({ type: Boolean, noAccessor: !0 })
|
|
], e.prototype, "disabled", null), e;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Oo = Symbol("onReportValidity"), po = Symbol("privateCleanupFormListeners"), fo = Symbol("privateDoNotReportInvalid"), vo = Symbol("privateIsSelfReportingValidity"), mo = Symbol("privateCallOnReportValidity");
|
|
function us(r) {
|
|
var e, t, o;
|
|
class i extends r {
|
|
// Mixins must have a constructor with `...args: any[]`
|
|
// tslint:disable-next-line:no-any
|
|
constructor(...s) {
|
|
super(...s), this[e] = new AbortController(), this[t] = !1, this[o] = !1, this.addEventListener("invalid", (d) => {
|
|
this[fo] || !d.isTrusted || this.addEventListener("invalid", () => {
|
|
this[mo](d);
|
|
}, { once: !0 });
|
|
}, {
|
|
// Listen during the capture phase, which will happen before the
|
|
// bubbling phase. That way, we can add a final event listener that
|
|
// will run after other event listeners, and we can check if it was
|
|
// default prevented. This works because invalid does not bubble.
|
|
capture: !0
|
|
});
|
|
}
|
|
checkValidity() {
|
|
this[fo] = !0;
|
|
const s = super.checkValidity();
|
|
return this[fo] = !1, s;
|
|
}
|
|
reportValidity() {
|
|
this[vo] = !0;
|
|
const s = super.reportValidity();
|
|
return s && this[mo](null), this[vo] = !1, s;
|
|
}
|
|
[(e = po, t = fo, o = vo, mo)](s) {
|
|
const d = s == null ? void 0 : s.defaultPrevented;
|
|
d || (this[Oo](s), !(!d && (s == null ? void 0 : s.defaultPrevented))) || (this[vo] || fd(this[je].form, this)) && this.focus();
|
|
}
|
|
[Oo](s) {
|
|
throw new Error("Implement [onReportValidity]");
|
|
}
|
|
formAssociatedCallback(s) {
|
|
super.formAssociatedCallback && super.formAssociatedCallback(s), this[po].abort(), s && (this[po] = new AbortController(), hd(this, s, () => {
|
|
this[mo](null);
|
|
}, this[po].signal));
|
|
}
|
|
}
|
|
return i;
|
|
}
|
|
function hd(r, e, t, o) {
|
|
const i = pd(e);
|
|
let a = !1, s, d = !1;
|
|
i.addEventListener("before", () => {
|
|
d = !0, s = new AbortController(), a = !1, r.addEventListener("invalid", () => {
|
|
a = !0;
|
|
}, {
|
|
signal: s.signal
|
|
});
|
|
}, { signal: o }), i.addEventListener("after", () => {
|
|
d = !1, s == null || s.abort(), !a && t();
|
|
}, { signal: o }), e.addEventListener("submit", () => {
|
|
d || t();
|
|
}, {
|
|
signal: o
|
|
});
|
|
}
|
|
const ra = /* @__PURE__ */ new WeakMap();
|
|
function pd(r) {
|
|
if (!ra.has(r)) {
|
|
const e = new EventTarget();
|
|
ra.set(r, e);
|
|
for (const t of ["reportValidity", "requestSubmit"]) {
|
|
const o = r[t];
|
|
r[t] = function() {
|
|
e.dispatchEvent(new Event("before"));
|
|
const i = Reflect.apply(o, this, arguments);
|
|
return e.dispatchEvent(new Event("after")), i;
|
|
};
|
|
}
|
|
}
|
|
return ra.get(r);
|
|
}
|
|
function fd(r, e) {
|
|
if (!r)
|
|
return !0;
|
|
let t;
|
|
for (const o of r.elements)
|
|
if (o.matches(":invalid")) {
|
|
t = o;
|
|
break;
|
|
}
|
|
return t === e;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class bi {
|
|
/**
|
|
* Creates a new validator.
|
|
*
|
|
* @param getCurrentState A callback that returns the current state of
|
|
* constraint validation-related properties.
|
|
*/
|
|
constructor(e) {
|
|
this.getCurrentState = e, this.currentValidity = {
|
|
validity: {},
|
|
validationMessage: ""
|
|
};
|
|
}
|
|
/**
|
|
* Returns the current `ValidityStateFlags` and validation message for the
|
|
* validator.
|
|
*
|
|
* If the constraint validation state has not changed, this will return a
|
|
* cached result. This is important since `getValidity()` can be called
|
|
* frequently in response to synchronous property changes.
|
|
*
|
|
* @return The current validity and validation message.
|
|
*/
|
|
getValidity() {
|
|
const e = this.getCurrentState();
|
|
if (!(!this.prevState || !this.equals(this.prevState, e)))
|
|
return this.currentValidity;
|
|
const { validity: o, validationMessage: i } = this.computeValidity(e);
|
|
return this.prevState = this.copy(e), this.currentValidity = {
|
|
validationMessage: i,
|
|
validity: {
|
|
// Change any `ValidityState` instances into `ValidityStateFlags` since
|
|
// `ValidityState` cannot be easily `{...spread}`.
|
|
badInput: o.badInput,
|
|
customError: o.customError,
|
|
patternMismatch: o.patternMismatch,
|
|
rangeOverflow: o.rangeOverflow,
|
|
rangeUnderflow: o.rangeUnderflow,
|
|
stepMismatch: o.stepMismatch,
|
|
tooLong: o.tooLong,
|
|
tooShort: o.tooShort,
|
|
typeMismatch: o.typeMismatch,
|
|
valueMissing: o.valueMissing
|
|
}
|
|
}, this.currentValidity;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class vd extends bi {
|
|
computeValidity({ state: e, renderedControl: t }) {
|
|
let o = t;
|
|
wr(e) && !o ? (o = this.inputControl || document.createElement("input"), this.inputControl = o) : o || (o = this.textAreaControl || document.createElement("textarea"), this.textAreaControl = o);
|
|
const i = wr(e) ? o : null;
|
|
if (i && (i.type = e.type), o.value !== e.value && (o.value = e.value), o.required = e.required, i) {
|
|
const a = e;
|
|
a.pattern ? i.pattern = a.pattern : i.removeAttribute("pattern"), a.min ? i.min = a.min : i.removeAttribute("min"), a.max ? i.max = a.max : i.removeAttribute("max"), a.step ? i.step = a.step : i.removeAttribute("step");
|
|
}
|
|
return (e.minLength ?? -1) > -1 ? o.setAttribute("minlength", String(e.minLength)) : o.removeAttribute("minlength"), (e.maxLength ?? -1) > -1 ? o.setAttribute("maxlength", String(e.maxLength)) : o.removeAttribute("maxlength"), {
|
|
validity: o.validity,
|
|
validationMessage: o.validationMessage
|
|
};
|
|
}
|
|
equals({ state: e }, { state: t }) {
|
|
const o = e.type === t.type && e.value === t.value && e.required === t.required && e.minLength === t.minLength && e.maxLength === t.maxLength;
|
|
return !wr(e) || !wr(t) ? o : o && e.pattern === t.pattern && e.min === t.min && e.max === t.max && e.step === t.step;
|
|
}
|
|
copy({ state: e }) {
|
|
return {
|
|
state: wr(e) ? this.copyInput(e) : this.copyTextArea(e),
|
|
renderedControl: null
|
|
};
|
|
}
|
|
copyInput(e) {
|
|
const { type: t, pattern: o, min: i, max: a, step: s } = e;
|
|
return {
|
|
...this.copySharedState(e),
|
|
type: t,
|
|
pattern: o,
|
|
min: i,
|
|
max: a,
|
|
step: s
|
|
};
|
|
}
|
|
copyTextArea(e) {
|
|
return {
|
|
...this.copySharedState(e),
|
|
type: e.type
|
|
};
|
|
}
|
|
copySharedState({ value: e, required: t, minLength: o, maxLength: i }) {
|
|
return { value: e, required: t, minLength: o, maxLength: i };
|
|
}
|
|
}
|
|
function wr(r) {
|
|
return r.type !== "textarea";
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const md = Je(us(Mr(cr(Rt(W)))));
|
|
let X = class extends md {
|
|
constructor() {
|
|
super(...arguments), this.error = !1, this.errorText = "", this.label = "", this.noAsterisk = !1, this.required = !1, this.value = "", this.prefixText = "", this.suffixText = "", this.hasLeadingIcon = !1, this.hasTrailingIcon = !1, this.supportingText = "", this.textDirection = "", this.rows = 2, this.cols = 20, this.inputMode = "", this.max = "", this.maxLength = -1, this.min = "", this.minLength = -1, this.noSpinner = !1, this.pattern = "", this.placeholder = "", this.readOnly = !1, this.multiple = !1, this.step = "", this.type = "text", this.autocomplete = "", this.dirty = !1, this.focused = !1, this.nativeError = !1, this.nativeErrorText = "";
|
|
}
|
|
/**
|
|
* Gets or sets the direction in which selection occurred.
|
|
*/
|
|
get selectionDirection() {
|
|
return this.getInputOrTextarea().selectionDirection;
|
|
}
|
|
set selectionDirection(e) {
|
|
this.getInputOrTextarea().selectionDirection = e;
|
|
}
|
|
/**
|
|
* Gets or sets the end position or offset of a text selection.
|
|
*/
|
|
get selectionEnd() {
|
|
return this.getInputOrTextarea().selectionEnd;
|
|
}
|
|
set selectionEnd(e) {
|
|
this.getInputOrTextarea().selectionEnd = e;
|
|
}
|
|
/**
|
|
* Gets or sets the starting position or offset of a text selection.
|
|
*/
|
|
get selectionStart() {
|
|
return this.getInputOrTextarea().selectionStart;
|
|
}
|
|
set selectionStart(e) {
|
|
this.getInputOrTextarea().selectionStart = e;
|
|
}
|
|
/**
|
|
* The text field's value as a number.
|
|
*/
|
|
get valueAsNumber() {
|
|
const e = this.getInput();
|
|
return e ? e.valueAsNumber : NaN;
|
|
}
|
|
set valueAsNumber(e) {
|
|
const t = this.getInput();
|
|
t && (t.valueAsNumber = e, this.value = t.value);
|
|
}
|
|
/**
|
|
* The text field's value as a Date.
|
|
*/
|
|
get valueAsDate() {
|
|
const e = this.getInput();
|
|
return e ? e.valueAsDate : null;
|
|
}
|
|
set valueAsDate(e) {
|
|
const t = this.getInput();
|
|
t && (t.valueAsDate = e, this.value = t.value);
|
|
}
|
|
get hasError() {
|
|
return this.error || this.nativeError;
|
|
}
|
|
/**
|
|
* Selects all the text in the text field.
|
|
*
|
|
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select
|
|
*/
|
|
select() {
|
|
this.getInputOrTextarea().select();
|
|
}
|
|
setRangeText(...e) {
|
|
this.getInputOrTextarea().setRangeText(...e), this.value = this.getInputOrTextarea().value;
|
|
}
|
|
/**
|
|
* Sets the start and end positions of a selection in the text field.
|
|
*
|
|
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange
|
|
*
|
|
* @param start The offset into the text field for the start of the selection.
|
|
* @param end The offset into the text field for the end of the selection.
|
|
* @param direction The direction in which the selection is performed.
|
|
*/
|
|
setSelectionRange(e, t, o) {
|
|
this.getInputOrTextarea().setSelectionRange(e, t, o);
|
|
}
|
|
/**
|
|
* Decrements the value of a numeric type text field by `step` or `n` `step`
|
|
* number of times.
|
|
*
|
|
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepDown
|
|
*
|
|
* @param stepDecrement The number of steps to decrement, defaults to 1.
|
|
*/
|
|
stepDown(e) {
|
|
const t = this.getInput();
|
|
t && (t.stepDown(e), this.value = t.value);
|
|
}
|
|
/**
|
|
* Increments the value of a numeric type text field by `step` or `n` `step`
|
|
* number of times.
|
|
*
|
|
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/stepUp
|
|
*
|
|
* @param stepIncrement The number of steps to increment, defaults to 1.
|
|
*/
|
|
stepUp(e) {
|
|
const t = this.getInput();
|
|
t && (t.stepUp(e), this.value = t.value);
|
|
}
|
|
/**
|
|
* Reset the text field to its default value.
|
|
*/
|
|
reset() {
|
|
this.dirty = !1, this.value = this.getAttribute("value") ?? "", this.nativeError = !1, this.nativeErrorText = "";
|
|
}
|
|
attributeChangedCallback(e, t, o) {
|
|
e === "value" && this.dirty || super.attributeChangedCallback(e, t, o);
|
|
}
|
|
render() {
|
|
const e = {
|
|
disabled: this.disabled,
|
|
error: !this.disabled && this.hasError,
|
|
textarea: this.type === "textarea",
|
|
"no-spinner": this.noSpinner
|
|
};
|
|
return _`
|
|
<span class="text-field ${ye(e)}">
|
|
${this.renderField()}
|
|
</span>
|
|
`;
|
|
}
|
|
updated(e) {
|
|
const t = this.getInputOrTextarea().value;
|
|
this.value !== t && (this.value = t);
|
|
}
|
|
renderField() {
|
|
return Fr`<${this.fieldTag}
|
|
class="field"
|
|
count=${this.value.length}
|
|
?disabled=${this.disabled}
|
|
?error=${this.hasError}
|
|
error-text=${this.getErrorText()}
|
|
?focused=${this.focused}
|
|
?has-end=${this.hasTrailingIcon}
|
|
?has-start=${this.hasLeadingIcon}
|
|
label=${this.label}
|
|
?no-asterisk=${this.noAsterisk}
|
|
max=${this.maxLength}
|
|
?populated=${!!this.value}
|
|
?required=${this.required}
|
|
?resizable=${this.type === "textarea"}
|
|
supporting-text=${this.supportingText}
|
|
>
|
|
${this.renderLeadingIcon()}
|
|
${this.renderInputOrTextarea()}
|
|
${this.renderTrailingIcon()}
|
|
<div id="description" slot="aria-describedby"></div>
|
|
<slot name="container" slot="container"></slot>
|
|
</${this.fieldTag}>`;
|
|
}
|
|
renderLeadingIcon() {
|
|
return _`
|
|
<span class="icon leading" slot="start">
|
|
<slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
|
|
</span>
|
|
`;
|
|
}
|
|
renderTrailingIcon() {
|
|
return _`
|
|
<span class="icon trailing" slot="end">
|
|
<slot name="trailing-icon" @slotchange=${this.handleIconChange}></slot>
|
|
</span>
|
|
`;
|
|
}
|
|
renderInputOrTextarea() {
|
|
const e = { direction: this.textDirection }, t = this.ariaLabel || this.label || x, o = this.autocomplete, i = (this.maxLength ?? -1) > -1, a = (this.minLength ?? -1) > -1;
|
|
if (this.type === "textarea")
|
|
return _`
|
|
<textarea
|
|
class="input"
|
|
style=${qt(e)}
|
|
aria-describedby="description"
|
|
aria-invalid=${this.hasError}
|
|
aria-label=${t}
|
|
autocomplete=${o || x}
|
|
name=${this.name || x}
|
|
?disabled=${this.disabled}
|
|
maxlength=${i ? this.maxLength : x}
|
|
minlength=${a ? this.minLength : x}
|
|
placeholder=${this.placeholder || x}
|
|
?readonly=${this.readOnly}
|
|
?required=${this.required}
|
|
rows=${this.rows}
|
|
cols=${this.cols}
|
|
.value=${zn(this.value)}
|
|
@change=${this.redispatchEvent}
|
|
@focus=${this.handleFocusChange}
|
|
@blur=${this.handleFocusChange}
|
|
@input=${this.handleInput}
|
|
@select=${this.redispatchEvent}></textarea>
|
|
`;
|
|
const s = this.renderPrefix(), d = this.renderSuffix(), h = this.inputMode;
|
|
return _`
|
|
<div class="input-wrapper">
|
|
${s}
|
|
<input
|
|
class="input"
|
|
style=${qt(e)}
|
|
aria-describedby="description"
|
|
aria-invalid=${this.hasError}
|
|
aria-label=${t}
|
|
autocomplete=${o || x}
|
|
name=${this.name || x}
|
|
?disabled=${this.disabled}
|
|
inputmode=${h || x}
|
|
max=${this.max || x}
|
|
maxlength=${i ? this.maxLength : x}
|
|
min=${this.min || x}
|
|
minlength=${a ? this.minLength : x}
|
|
pattern=${this.pattern || x}
|
|
placeholder=${this.placeholder || x}
|
|
?readonly=${this.readOnly}
|
|
?required=${this.required}
|
|
?multiple=${this.multiple}
|
|
step=${this.step || x}
|
|
type=${this.type}
|
|
.value=${zn(this.value)}
|
|
@change=${this.redispatchEvent}
|
|
@focus=${this.handleFocusChange}
|
|
@blur=${this.handleFocusChange}
|
|
@input=${this.handleInput}
|
|
@select=${this.redispatchEvent} />
|
|
${d}
|
|
</div>
|
|
`;
|
|
}
|
|
renderPrefix() {
|
|
return this.renderAffix(
|
|
this.prefixText,
|
|
/* isSuffix */
|
|
!1
|
|
);
|
|
}
|
|
renderSuffix() {
|
|
return this.renderAffix(
|
|
this.suffixText,
|
|
/* isSuffix */
|
|
!0
|
|
);
|
|
}
|
|
renderAffix(e, t) {
|
|
return e ? _`<span class="${ye({
|
|
suffix: t,
|
|
prefix: !t
|
|
})}">${e}</span>` : x;
|
|
}
|
|
getErrorText() {
|
|
return this.error ? this.errorText : this.nativeErrorText;
|
|
}
|
|
handleFocusChange() {
|
|
var e;
|
|
this.focused = ((e = this.inputOrTextarea) == null ? void 0 : e.matches(":focus")) ?? !1;
|
|
}
|
|
handleInput(e) {
|
|
this.dirty = !0, this.value = e.target.value;
|
|
}
|
|
redispatchEvent(e) {
|
|
At(this, e);
|
|
}
|
|
getInputOrTextarea() {
|
|
return this.inputOrTextarea || (this.connectedCallback(), this.scheduleUpdate()), this.isUpdatePending && this.scheduleUpdate(), this.inputOrTextarea;
|
|
}
|
|
getInput() {
|
|
return this.type === "textarea" ? null : this.getInputOrTextarea();
|
|
}
|
|
handleIconChange() {
|
|
this.hasLeadingIcon = this.leadingIcons.length > 0, this.hasTrailingIcon = this.trailingIcons.length > 0;
|
|
}
|
|
[yt]() {
|
|
return this.value;
|
|
}
|
|
formResetCallback() {
|
|
this.reset();
|
|
}
|
|
formStateRestoreCallback(e) {
|
|
this.value = e;
|
|
}
|
|
focus() {
|
|
this.getInputOrTextarea().focus();
|
|
}
|
|
[Wt]() {
|
|
return new vd(() => ({
|
|
state: this,
|
|
renderedControl: this.inputOrTextarea
|
|
}));
|
|
}
|
|
[Kt]() {
|
|
return this.inputOrTextarea;
|
|
}
|
|
[Oo](e) {
|
|
var o;
|
|
e == null || e.preventDefault();
|
|
const t = this.getErrorText();
|
|
this.nativeError = !!e, this.nativeErrorText = this.validationMessage, t === this.getErrorText() && ((o = this.field) == null || o.reannounceError());
|
|
}
|
|
};
|
|
X.shadowRootOptions = {
|
|
...W.shadowRootOptions,
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], X.prototype, "error", void 0);
|
|
l([
|
|
p({ attribute: "error-text" })
|
|
], X.prototype, "errorText", void 0);
|
|
l([
|
|
p()
|
|
], X.prototype, "label", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "no-asterisk" })
|
|
], X.prototype, "noAsterisk", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], X.prototype, "required", void 0);
|
|
l([
|
|
p()
|
|
], X.prototype, "value", void 0);
|
|
l([
|
|
p({ attribute: "prefix-text" })
|
|
], X.prototype, "prefixText", void 0);
|
|
l([
|
|
p({ attribute: "suffix-text" })
|
|
], X.prototype, "suffixText", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "has-leading-icon" })
|
|
], X.prototype, "hasLeadingIcon", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "has-trailing-icon" })
|
|
], X.prototype, "hasTrailingIcon", void 0);
|
|
l([
|
|
p({ attribute: "supporting-text" })
|
|
], X.prototype, "supportingText", void 0);
|
|
l([
|
|
p({ attribute: "text-direction" })
|
|
], X.prototype, "textDirection", void 0);
|
|
l([
|
|
p({ type: Number })
|
|
], X.prototype, "rows", void 0);
|
|
l([
|
|
p({ type: Number })
|
|
], X.prototype, "cols", void 0);
|
|
l([
|
|
p({ reflect: !0 })
|
|
], X.prototype, "inputMode", void 0);
|
|
l([
|
|
p()
|
|
], X.prototype, "max", void 0);
|
|
l([
|
|
p({ type: Number })
|
|
], X.prototype, "maxLength", void 0);
|
|
l([
|
|
p()
|
|
], X.prototype, "min", void 0);
|
|
l([
|
|
p({ type: Number })
|
|
], X.prototype, "minLength", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "no-spinner" })
|
|
], X.prototype, "noSpinner", void 0);
|
|
l([
|
|
p()
|
|
], X.prototype, "pattern", void 0);
|
|
l([
|
|
p({ reflect: !0, converter: ud })
|
|
], X.prototype, "placeholder", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], X.prototype, "readOnly", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], X.prototype, "multiple", void 0);
|
|
l([
|
|
p()
|
|
], X.prototype, "step", void 0);
|
|
l([
|
|
p({ reflect: !0 })
|
|
], X.prototype, "type", void 0);
|
|
l([
|
|
p({ reflect: !0 })
|
|
], X.prototype, "autocomplete", void 0);
|
|
l([
|
|
se()
|
|
], X.prototype, "dirty", void 0);
|
|
l([
|
|
se()
|
|
], X.prototype, "focused", void 0);
|
|
l([
|
|
se()
|
|
], X.prototype, "nativeError", void 0);
|
|
l([
|
|
se()
|
|
], X.prototype, "nativeErrorText", void 0);
|
|
l([
|
|
G(".input")
|
|
], X.prototype, "inputOrTextarea", void 0);
|
|
l([
|
|
G(".field")
|
|
], X.prototype, "field", void 0);
|
|
l([
|
|
We({ slot: "leading-icon" })
|
|
], X.prototype, "leadingIcons", void 0);
|
|
l([
|
|
We({ slot: "trailing-icon" })
|
|
], X.prototype, "trailingIcons", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class bd extends X {
|
|
constructor() {
|
|
super(...arguments), this.fieldTag = Xe`md-filled-field`;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const hs = F`:host{display:inline-flex;outline:none;resize:both;text-align:start;-webkit-tap-highlight-color:rgba(0,0,0,0)}.text-field,.field{width:100%}.text-field{display:inline-flex}.field{cursor:text}.disabled .field{cursor:default}.text-field,.textarea .field{resize:inherit}slot[name=container]{border-radius:inherit}.icon{color:currentColor;display:flex;align-items:center;justify-content:center;fill:currentColor;position:relative}.icon ::slotted(*){display:flex;position:absolute}[has-start] .icon.leading{font-size:var(--_leading-icon-size);height:var(--_leading-icon-size);width:var(--_leading-icon-size)}[has-end] .icon.trailing{font-size:var(--_trailing-icon-size);height:var(--_trailing-icon-size);width:var(--_trailing-icon-size)}.input-wrapper{display:flex}.input-wrapper>*{all:inherit;padding:0}.input{caret-color:var(--_caret-color);overflow-x:hidden;text-align:inherit}.input::placeholder{color:currentColor;opacity:1}.input::-webkit-calendar-picker-indicator{display:none}.input::-webkit-search-decoration,.input::-webkit-search-cancel-button{display:none}@media(forced-colors: active){.input{background:none}}.no-spinner .input::-webkit-inner-spin-button,.no-spinner .input::-webkit-outer-spin-button{display:none}.no-spinner .input[type=number]{-moz-appearance:textfield}:focus-within .input{caret-color:var(--_focus-caret-color)}.error:focus-within .input{caret-color:var(--_error-focus-caret-color)}.text-field:not(.disabled) .prefix{color:var(--_input-text-prefix-color)}.text-field:not(.disabled) .suffix{color:var(--_input-text-suffix-color)}.text-field:not(.disabled) .input::placeholder{color:var(--_input-text-placeholder-color)}.prefix,.suffix{text-wrap:nowrap;width:min-content}.prefix{padding-inline-end:var(--_input-text-prefix-trailing-space)}.suffix{padding-inline-start:var(--_input-text-suffix-leading-space)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let zo = class extends bd {
|
|
constructor() {
|
|
super(...arguments), this.fieldTag = Xe`md-filled-field`;
|
|
}
|
|
};
|
|
zo.styles = [hs, id];
|
|
zo = l([
|
|
H("md-filled-text-field")
|
|
], zo);
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class yd extends _e {
|
|
renderOutline(e) {
|
|
return _`
|
|
<div class="outline">
|
|
<div class="outline-start"></div>
|
|
<div class="outline-notch">
|
|
<div class="outline-panel-inactive"></div>
|
|
<div class="outline-panel-active"></div>
|
|
<div class="outline-label">${e}</div>
|
|
</div>
|
|
<div class="outline-end"></div>
|
|
</div>
|
|
`;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const gd = F`@layer styles{:host{--_bottom-space: var(--md-outlined-field-bottom-space, 16px);--_content-color: var(--md-outlined-field-content-color, var(--md-sys-color-on-surface, #1d1b20));--_content-font: var(--md-outlined-field-content-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_content-line-height: var(--md-outlined-field-content-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_content-size: var(--md-outlined-field-content-size, var(--md-sys-typescale-body-large-size, 1rem));--_content-space: var(--md-outlined-field-content-space, 16px);--_content-weight: var(--md-outlined-field-content-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_disabled-content-color: var(--md-outlined-field-disabled-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-content-opacity: var(--md-outlined-field-disabled-content-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-field-disabled-label-text-opacity, 0.38);--_disabled-leading-content-color: var(--md-outlined-field-disabled-leading-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-content-opacity: var(--md-outlined-field-disabled-leading-content-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-content-color: var(--md-outlined-field-disabled-trailing-content-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-content-opacity: var(--md-outlined-field-disabled-trailing-content-opacity, 0.38);--_error-content-color: var(--md-outlined-field-error-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-content-color: var(--md-outlined-field-error-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-content-color: var(--md-outlined-field-error-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-content-color: var(--md-outlined-field-error-focus-trailing-content-color, var(--md-sys-color-error, #b3261e));--_error-hover-content-color: var(--md-outlined-field-error-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-content-color: var(--md-outlined-field-error-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-content-color: var(--md-outlined-field-error-hover-trailing-content-color, var(--md-sys-color-on-error-container, #410e0b));--_error-label-text-color: var(--md-outlined-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-content-color: var(--md-outlined-field-error-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-content-color: var(--md-outlined-field-error-trailing-content-color, var(--md-sys-color-error, #b3261e));--_focus-content-color: var(--md-outlined-field-focus-content-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-content-color: var(--md-outlined-field-focus-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-content-color: var(--md-outlined-field-focus-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-content-color: var(--md-outlined-field-hover-content-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-content-color: var(--md-outlined-field-hover-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-content-color: var(--md-outlined-field-hover-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-outlined-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-padding-bottom: var(--md-outlined-field-label-text-padding-bottom, 8px);--_label-text-populated-line-height: var(--md-outlined-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-content-color: var(--md-outlined-field-leading-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-space: var(--md-outlined-field-leading-space, 16px);--_outline-color: var(--md-outlined-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-label-padding: var(--md-outlined-field-outline-label-padding, 4px);--_outline-width: var(--md-outlined-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-leading-space: var(--md-outlined-field-supporting-text-leading-space, 16px);--_supporting-text-line-height: var(--md-outlined-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-top-space: var(--md-outlined-field-supporting-text-top-space, 4px);--_supporting-text-trailing-space: var(--md-outlined-field-supporting-text-trailing-space, 16px);--_supporting-text-weight: var(--md-outlined-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_top-space: var(--md-outlined-field-top-space, 16px);--_trailing-content-color: var(--md-outlined-field-trailing-content-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-space: var(--md-outlined-field-trailing-space, 16px);--_with-leading-content-leading-space: var(--md-outlined-field-with-leading-content-leading-space, 12px);--_with-trailing-content-trailing-space: var(--md-outlined-field-with-trailing-content-trailing-space, 12px);--_container-shape-start-start: var(--md-outlined-field-container-shape-start-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-field-container-shape-start-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-field-container-shape-end-end, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-field-container-shape-end-start, var(--md-outlined-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)))}.outline{border-color:var(--_outline-color);border-radius:inherit;display:flex;pointer-events:none;height:100%;position:absolute;width:100%;z-index:1}.outline-start::before,.outline-start::after,.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after,.outline-end::before,.outline-end::after{border:inherit;content:"";inset:0;position:absolute}.outline-start,.outline-end{border:inherit;border-radius:inherit;box-sizing:border-box;position:relative}.outline-start::before,.outline-start::after,.outline-end::before,.outline-end::after{border-bottom-style:solid;border-top-style:solid}.outline-start::after,.outline-end::after{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-start::after,.focused .outline-end::after{opacity:1}.outline-start::before,.outline-start::after{border-inline-start-style:solid;border-inline-end-style:none;border-start-start-radius:inherit;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:0;margin-inline-end:var(--_outline-label-padding)}.outline-end{flex-grow:1;margin-inline-start:calc(-1*var(--_outline-label-padding))}.outline-end::before,.outline-end::after{border-inline-start-style:none;border-inline-end-style:solid;border-start-start-radius:0;border-start-end-radius:inherit;border-end-start-radius:0;border-end-end-radius:inherit}.outline-notch{align-items:flex-start;border:inherit;display:flex;margin-inline-start:calc(-1*var(--_outline-label-padding));margin-inline-end:var(--_outline-label-padding);max-width:calc(100% - var(--_leading-space) - var(--_trailing-space));padding:0 var(--_outline-label-padding);position:relative}.no-label .outline-notch{display:none}.outline-panel-inactive,.outline-panel-active{border:inherit;border-bottom-style:solid;inset:0;position:absolute}.outline-panel-inactive::before,.outline-panel-inactive::after,.outline-panel-active::before,.outline-panel-active::after{border-top-style:solid;border-bottom:none;bottom:auto;transform:scaleX(1);transition:transform 150ms cubic-bezier(0.2, 0, 0, 1)}.outline-panel-inactive::before,.outline-panel-active::before{right:50%;transform-origin:top left}.outline-panel-inactive::after,.outline-panel-active::after{left:50%;transform-origin:top right}.populated .outline-panel-inactive::before,.populated .outline-panel-inactive::after,.populated .outline-panel-active::before,.populated .outline-panel-active::after,.focused .outline-panel-inactive::before,.focused .outline-panel-inactive::after,.focused .outline-panel-active::before,.focused .outline-panel-active::after{transform:scaleX(0)}.outline-panel-active{opacity:0;transition:opacity 150ms cubic-bezier(0.2, 0, 0, 1)}.focused .outline-panel-active{opacity:1}.outline-label{display:flex;max-width:100%;transform:translateY(calc(-100% + var(--_label-text-padding-bottom)))}.outline-start,.field:not(.with-start) .content ::slotted(*){padding-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-start) .label-wrapper{margin-inline-start:max(var(--_leading-space),max(var(--_container-shape-start-start),var(--_container-shape-end-start)) + var(--_outline-label-padding))}.field:not(.with-end) .content ::slotted(*){padding-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.field:not(.with-end) .label-wrapper{margin-inline-end:max(var(--_trailing-space),max(var(--_container-shape-start-end),var(--_container-shape-end-end)))}.outline-start::before,.outline-end::before,.outline-panel-inactive,.outline-panel-inactive::before,.outline-panel-inactive::after{border-width:var(--_outline-width)}:hover .outline{border-color:var(--_hover-outline-color);color:var(--_hover-outline-color)}:hover .outline-start::before,:hover .outline-end::before,:hover .outline-panel-inactive,:hover .outline-panel-inactive::before,:hover .outline-panel-inactive::after{border-width:var(--_hover-outline-width)}.focused .outline{border-color:var(--_focus-outline-color);color:var(--_focus-outline-color)}.outline-start::after,.outline-end::after,.outline-panel-active,.outline-panel-active::before,.outline-panel-active::after{border-width:var(--_focus-outline-width)}.disabled .outline{border-color:var(--_disabled-outline-color);color:var(--_disabled-outline-color)}.disabled .outline-start,.disabled .outline-end,.disabled .outline-panel-inactive{opacity:var(--_disabled-outline-opacity)}.disabled .outline-start::before,.disabled .outline-end::before,.disabled .outline-panel-inactive,.disabled .outline-panel-inactive::before,.disabled .outline-panel-inactive::after{border-width:var(--_disabled-outline-width)}.error .outline{border-color:var(--_error-outline-color);color:var(--_error-outline-color)}.error:hover .outline{border-color:var(--_error-hover-outline-color);color:var(--_error-hover-outline-color)}.error.focused .outline{border-color:var(--_error-focus-outline-color);color:var(--_error-focus-outline-color)}.resizable .container{bottom:var(--_focus-outline-width);inset-inline-end:var(--_focus-outline-width);clip-path:inset(var(--_focus-outline-width) 0 0 var(--_focus-outline-width))}.resizable .container>*{top:var(--_focus-outline-width);inset-inline-start:var(--_focus-outline-width)}.resizable .container:dir(rtl){clip-path:inset(var(--_focus-outline-width) var(--_focus-outline-width) 0 0)}}@layer hcm{@media(forced-colors: active){.disabled .outline{border-color:GrayText;color:GrayText}.disabled :is(.outline-start,.outline-end,.outline-panel-inactive){opacity:1}}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let fa = class extends yd {
|
|
};
|
|
fa.styles = [ns, gd];
|
|
fa = l([
|
|
H("md-outlined-field")
|
|
], fa);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const xd = F`:host{--_caret-color: var(--md-outlined-text-field-caret-color, var(--md-sys-color-primary, #6750a4));--_disabled-input-text-color: var(--md-outlined-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-input-text-opacity: var(--md-outlined-text-field-disabled-input-text-opacity, 0.38);--_disabled-label-text-color: var(--md-outlined-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-text-field-disabled-label-text-opacity, 0.38);--_disabled-leading-icon-color: var(--md-outlined-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-outlined-text-field-disabled-leading-icon-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-text-field-disabled-outline-opacity, 0.12);--_disabled-outline-width: var(--md-outlined-text-field-disabled-outline-width, 1px);--_disabled-supporting-text-color: var(--md-outlined-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-supporting-text-opacity: var(--md-outlined-text-field-disabled-supporting-text-opacity, 0.38);--_disabled-trailing-icon-color: var(--md-outlined-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-outlined-text-field-disabled-trailing-icon-opacity, 0.38);--_error-focus-caret-color: var(--md-outlined-text-field-error-focus-caret-color, var(--md-sys-color-error, #b3261e));--_error-focus-input-text-color: var(--md-outlined-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-focus-label-text-color: var(--md-outlined-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-leading-icon-color: var(--md-outlined-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-focus-outline-color: var(--md-outlined-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_error-focus-supporting-text-color: var(--md-outlined-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-focus-trailing-icon-color: var(--md-outlined-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_error-hover-input-text-color: var(--md-outlined-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-hover-label-text-color: var(--md-outlined-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-leading-icon-color: var(--md-outlined-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-hover-outline-color: var(--md-outlined-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_error-hover-supporting-text-color: var(--md-outlined-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-hover-trailing-icon-color: var(--md-outlined-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_error-input-text-color: var(--md-outlined-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_error-label-text-color: var(--md-outlined-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_error-leading-icon-color: var(--md-outlined-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_error-outline-color: var(--md-outlined-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_error-supporting-text-color: var(--md-outlined-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_error-trailing-icon-color: var(--md-outlined-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_focus-input-text-color: var(--md-outlined-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_focus-label-text-color: var(--md-outlined-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-outlined-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-outlined-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_focus-outline-width: var(--md-outlined-text-field-focus-outline-width, 3px);--_focus-supporting-text-color: var(--md-outlined-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-trailing-icon-color: var(--md-outlined-text-field-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-input-text-color: var(--md-outlined-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-outlined-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-leading-icon-color: var(--md-outlined-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-outline-color: var(--md-outlined-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-outline-width: var(--md-outlined-text-field-hover-outline-width, 1px);--_hover-supporting-text-color: var(--md-outlined-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-outlined-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-color: var(--md-outlined-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_input-text-font: var(--md-outlined-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_input-text-line-height: var(--md-outlined-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_input-text-placeholder-color: var(--md-outlined-text-field-input-text-placeholder-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-prefix-color: var(--md-outlined-text-field-input-text-prefix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-size: var(--md-outlined-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_input-text-suffix-color: var(--md-outlined-text-field-input-text-suffix-color, var(--md-sys-color-on-surface-variant, #49454f));--_input-text-weight: var(--md-outlined-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_label-text-color: var(--md-outlined-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-font: var(--md-outlined-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_label-text-populated-line-height: var(--md-outlined-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_label-text-populated-size: var(--md-outlined-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_label-text-size: var(--md-outlined-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_label-text-weight: var(--md-outlined-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_leading-icon-color: var(--md-outlined-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_leading-icon-size: var(--md-outlined-text-field-leading-icon-size, 24px);--_outline-color: var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-text-field-outline-width, 1px);--_supporting-text-color: var(--md-outlined-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_supporting-text-font: var(--md-outlined-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_supporting-text-line-height: var(--md-outlined-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_supporting-text-size: var(--md-outlined-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_supporting-text-weight: var(--md-outlined-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_trailing-icon-color: var(--md-outlined-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-size: var(--md-outlined-text-field-trailing-icon-size, 24px);--_container-shape-start-start: var(--md-outlined-text-field-container-shape-start-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-start-end: var(--md-outlined-text-field-container-shape-start-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-end: var(--md-outlined-text-field-container-shape-end-end, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_container-shape-end-start: var(--md-outlined-text-field-container-shape-end-start, var(--md-outlined-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_icon-input-space: var(--md-outlined-text-field-icon-input-space, 16px);--_leading-space: var(--md-outlined-text-field-leading-space, 16px);--_trailing-space: var(--md-outlined-text-field-trailing-space, 16px);--_top-space: var(--md-outlined-text-field-top-space, 16px);--_bottom-space: var(--md-outlined-text-field-bottom-space, 16px);--_input-text-prefix-trailing-space: var(--md-outlined-text-field-input-text-prefix-trailing-space, 2px);--_input-text-suffix-leading-space: var(--md-outlined-text-field-input-text-suffix-leading-space, 2px);--_focus-caret-color: var(--md-outlined-text-field-focus-caret-color, var(--md-sys-color-primary, #6750a4));--_with-leading-icon-leading-space: var(--md-outlined-text-field-with-leading-icon-leading-space, 12px);--_with-trailing-icon-trailing-space: var(--md-outlined-text-field-with-trailing-icon-trailing-space, 12px);--md-outlined-field-bottom-space: var(--_bottom-space);--md-outlined-field-container-shape-end-end: var(--_container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_container-shape-start-start);--md-outlined-field-content-color: var(--_input-text-color);--md-outlined-field-content-font: var(--_input-text-font);--md-outlined-field-content-line-height: var(--_input-text-line-height);--md-outlined-field-content-size: var(--_input-text-size);--md-outlined-field-content-space: var(--_icon-input-space);--md-outlined-field-content-weight: var(--_input-text-weight);--md-outlined-field-disabled-content-color: var(--_disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_focus-outline-color);--md-outlined-field-focus-outline-width: var(--_focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_hover-outline-color);--md-outlined-field-hover-outline-width: var(--_hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_label-text-color);--md-outlined-field-label-text-font: var(--_label-text-font);--md-outlined-field-label-text-line-height: var(--_label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_label-text-populated-size);--md-outlined-field-label-text-size: var(--_label-text-size);--md-outlined-field-label-text-weight: var(--_label-text-weight);--md-outlined-field-leading-content-color: var(--_leading-icon-color);--md-outlined-field-leading-space: var(--_leading-space);--md-outlined-field-outline-color: var(--_outline-color);--md-outlined-field-outline-width: var(--_outline-width);--md-outlined-field-supporting-text-color: var(--_supporting-text-color);--md-outlined-field-supporting-text-font: var(--_supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_supporting-text-weight);--md-outlined-field-top-space: var(--_top-space);--md-outlined-field-trailing-content-color: var(--_trailing-icon-color);--md-outlined-field-trailing-space: var(--_trailing-space);--md-outlined-field-with-leading-content-leading-space: var(--_with-leading-icon-leading-space);--md-outlined-field-with-trailing-content-trailing-space: var(--_with-trailing-icon-trailing-space)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class _d extends X {
|
|
constructor() {
|
|
super(...arguments), this.fieldTag = Xe`md-outlined-field`;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Po = class extends _d {
|
|
constructor() {
|
|
super(...arguments), this.fieldTag = Xe`md-outlined-field`;
|
|
}
|
|
};
|
|
Po.styles = [hs, xd];
|
|
Po = l([
|
|
H("md-outlined-text-field")
|
|
], Po);
|
|
const wd = ee({
|
|
react: J,
|
|
tagName: "md-filled-text-field",
|
|
elementClass: zo
|
|
}), kd = ee({
|
|
react: J,
|
|
tagName: "md-outlined-text-field",
|
|
elementClass: Po
|
|
}), tp = qe.forwardRef(({
|
|
variant: r = "filled",
|
|
...e
|
|
}, t) => r === "filled" ? /* @__PURE__ */ V.jsx(wd, { ...e, ref: t }) : /* @__PURE__ */ V.jsx(kd, { ...e, ref: t }));
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class Cd extends W {
|
|
connectedCallback() {
|
|
super.connectedCallback(), this.setAttribute("aria-hidden", "true");
|
|
}
|
|
render() {
|
|
return _`<span class="shadow"></span>`;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ed = F`:host,.shadow,.shadow::before,.shadow::after{border-radius:inherit;inset:0;position:absolute;transition-duration:inherit;transition-property:inherit;transition-timing-function:inherit}:host{display:flex;pointer-events:none;transition-property:box-shadow,opacity}.shadow::before,.shadow::after{content:"";transition-property:box-shadow,opacity;--_level: var(--md-elevation-level, 0);--_shadow-color: var(--md-elevation-shadow-color, var(--md-sys-color-shadow, #000))}.shadow::before{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 3,1) + 2*clamp(0,var(--_level) - 4,1))) calc(1px*(2*clamp(0,var(--_level),1) + clamp(0,var(--_level) - 2,1) + clamp(0,var(--_level) - 4,1))) 0px var(--_shadow-color);opacity:.3}.shadow::after{box-shadow:0px calc(1px*(clamp(0,var(--_level),1) + clamp(0,var(--_level) - 1,1) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(3*clamp(0,var(--_level),2) + 2*clamp(0,var(--_level) - 2,3))) calc(1px*(clamp(0,var(--_level),4) + 2*clamp(0,var(--_level) - 4,1))) var(--_shadow-color);opacity:.15}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let va = class extends Cd {
|
|
};
|
|
va.styles = [Ed];
|
|
va = l([
|
|
H("md-elevation")
|
|
], va);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const ps = Symbol("attachableController");
|
|
let $o;
|
|
$o = new MutationObserver((r) => {
|
|
var e;
|
|
for (const t of r)
|
|
(e = t.target[ps]) == null || e.hostConnected();
|
|
});
|
|
class fs {
|
|
get htmlFor() {
|
|
return this.host.getAttribute("for");
|
|
}
|
|
set htmlFor(e) {
|
|
e === null ? this.host.removeAttribute("for") : this.host.setAttribute("for", e);
|
|
}
|
|
get control() {
|
|
return this.host.hasAttribute("for") ? !this.htmlFor || !this.host.isConnected ? null : this.host.getRootNode().querySelector(`#${this.htmlFor}`) : this.currentControl || this.host.parentElement;
|
|
}
|
|
set control(e) {
|
|
e ? this.attach(e) : this.detach();
|
|
}
|
|
/**
|
|
* Creates a new controller for an `Attachable` element.
|
|
*
|
|
* @param host The `Attachable` element.
|
|
* @param onControlChange A callback with two parameters for the previous and
|
|
* next control. An `Attachable` element may perform setup or teardown
|
|
* logic whenever the control changes.
|
|
*/
|
|
constructor(e, t) {
|
|
this.host = e, this.onControlChange = t, this.currentControl = null, e.addController(this), e[ps] = this, $o == null || $o.observe(e, { attributeFilter: ["for"] });
|
|
}
|
|
attach(e) {
|
|
e !== this.currentControl && (this.setCurrentControl(e), this.host.removeAttribute("for"));
|
|
}
|
|
detach() {
|
|
this.setCurrentControl(null), this.host.setAttribute("for", "");
|
|
}
|
|
/** @private */
|
|
hostConnected() {
|
|
this.setCurrentControl(this.control);
|
|
}
|
|
/** @private */
|
|
hostDisconnected() {
|
|
this.setCurrentControl(null);
|
|
}
|
|
setCurrentControl(e) {
|
|
this.onControlChange(this.currentControl, e), this.currentControl = e;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const $d = ["focusin", "focusout", "pointerdown"];
|
|
class Fa extends W {
|
|
constructor() {
|
|
super(...arguments), this.visible = !1, this.inward = !1, this.attachableController = new fs(this, this.onControlChange.bind(this));
|
|
}
|
|
get htmlFor() {
|
|
return this.attachableController.htmlFor;
|
|
}
|
|
set htmlFor(e) {
|
|
this.attachableController.htmlFor = e;
|
|
}
|
|
get control() {
|
|
return this.attachableController.control;
|
|
}
|
|
set control(e) {
|
|
this.attachableController.control = e;
|
|
}
|
|
attach(e) {
|
|
this.attachableController.attach(e);
|
|
}
|
|
detach() {
|
|
this.attachableController.detach();
|
|
}
|
|
connectedCallback() {
|
|
super.connectedCallback(), this.setAttribute("aria-hidden", "true");
|
|
}
|
|
/** @private */
|
|
handleEvent(e) {
|
|
var t;
|
|
if (!e[Pn]) {
|
|
switch (e.type) {
|
|
default:
|
|
return;
|
|
case "focusin":
|
|
this.visible = ((t = this.control) == null ? void 0 : t.matches(":focus-visible")) ?? !1;
|
|
break;
|
|
case "focusout":
|
|
case "pointerdown":
|
|
this.visible = !1;
|
|
break;
|
|
}
|
|
e[Pn] = !0;
|
|
}
|
|
}
|
|
onControlChange(e, t) {
|
|
for (const o of $d)
|
|
e == null || e.removeEventListener(o, this), t == null || t.addEventListener(o, this);
|
|
}
|
|
update(e) {
|
|
e.has("visible") && this.dispatchEvent(new Event("visibility-changed")), super.update(e);
|
|
}
|
|
}
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], Fa.prototype, "visible", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], Fa.prototype, "inward", void 0);
|
|
const Pn = Symbol("handledByFocusRing");
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Td = F`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ma = class extends Fa {
|
|
};
|
|
ma.styles = [Td];
|
|
ma = l([
|
|
H("md-focus-ring")
|
|
], ma);
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Sd = 450, Ln = 225, Ad = 0.2, Rd = 10, Id = 75, Od = 0.35, zd = "::after", Pd = "forwards";
|
|
var Ye;
|
|
(function(r) {
|
|
r[r.INACTIVE = 0] = "INACTIVE", r[r.TOUCH_DELAY = 1] = "TOUCH_DELAY", r[r.HOLDING = 2] = "HOLDING", r[r.WAITING_FOR_CLICK = 3] = "WAITING_FOR_CLICK";
|
|
})(Ye || (Ye = {}));
|
|
const Ld = [
|
|
"click",
|
|
"contextmenu",
|
|
"pointercancel",
|
|
"pointerdown",
|
|
"pointerenter",
|
|
"pointerleave",
|
|
"pointerup"
|
|
], Fd = 150, oa = window.matchMedia("(forced-colors: active)");
|
|
class Dr extends W {
|
|
constructor() {
|
|
super(...arguments), this.disabled = !1, this.hovered = !1, this.pressed = !1, this.rippleSize = "", this.rippleScale = "", this.initialSize = 0, this.state = Ye.INACTIVE, this.checkBoundsAfterContextMenu = !1, this.attachableController = new fs(this, this.onControlChange.bind(this));
|
|
}
|
|
get htmlFor() {
|
|
return this.attachableController.htmlFor;
|
|
}
|
|
set htmlFor(e) {
|
|
this.attachableController.htmlFor = e;
|
|
}
|
|
get control() {
|
|
return this.attachableController.control;
|
|
}
|
|
set control(e) {
|
|
this.attachableController.control = e;
|
|
}
|
|
attach(e) {
|
|
this.attachableController.attach(e);
|
|
}
|
|
detach() {
|
|
this.attachableController.detach();
|
|
}
|
|
connectedCallback() {
|
|
super.connectedCallback(), this.setAttribute("aria-hidden", "true");
|
|
}
|
|
render() {
|
|
const e = {
|
|
hovered: this.hovered,
|
|
pressed: this.pressed
|
|
};
|
|
return _`<div class="surface ${ye(e)}"></div>`;
|
|
}
|
|
update(e) {
|
|
e.has("disabled") && this.disabled && (this.hovered = !1, this.pressed = !1), super.update(e);
|
|
}
|
|
/**
|
|
* TODO(b/269799771): make private
|
|
* @private only public for slider
|
|
*/
|
|
handlePointerenter(e) {
|
|
this.shouldReactToEvent(e) && (this.hovered = !0);
|
|
}
|
|
/**
|
|
* TODO(b/269799771): make private
|
|
* @private only public for slider
|
|
*/
|
|
handlePointerleave(e) {
|
|
this.shouldReactToEvent(e) && (this.hovered = !1, this.state !== Ye.INACTIVE && this.endPressAnimation());
|
|
}
|
|
handlePointerup(e) {
|
|
if (this.shouldReactToEvent(e)) {
|
|
if (this.state === Ye.HOLDING) {
|
|
this.state = Ye.WAITING_FOR_CLICK;
|
|
return;
|
|
}
|
|
if (this.state === Ye.TOUCH_DELAY) {
|
|
this.state = Ye.WAITING_FOR_CLICK, this.startPressAnimation(this.rippleStartEvent);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
async handlePointerdown(e) {
|
|
if (this.shouldReactToEvent(e)) {
|
|
if (this.rippleStartEvent = e, !this.isTouch(e)) {
|
|
this.state = Ye.WAITING_FOR_CLICK, this.startPressAnimation(e);
|
|
return;
|
|
}
|
|
this.checkBoundsAfterContextMenu && !this.inBounds(e) || (this.checkBoundsAfterContextMenu = !1, this.state = Ye.TOUCH_DELAY, await new Promise((t) => {
|
|
setTimeout(t, Fd);
|
|
}), this.state === Ye.TOUCH_DELAY && (this.state = Ye.HOLDING, this.startPressAnimation(e)));
|
|
}
|
|
}
|
|
handleClick() {
|
|
if (!this.disabled) {
|
|
if (this.state === Ye.WAITING_FOR_CLICK) {
|
|
this.endPressAnimation();
|
|
return;
|
|
}
|
|
this.state === Ye.INACTIVE && (this.startPressAnimation(), this.endPressAnimation());
|
|
}
|
|
}
|
|
handlePointercancel(e) {
|
|
this.shouldReactToEvent(e) && this.endPressAnimation();
|
|
}
|
|
handleContextmenu() {
|
|
this.disabled || (this.checkBoundsAfterContextMenu = !0, this.endPressAnimation());
|
|
}
|
|
determineRippleSize() {
|
|
const { height: e, width: t } = this.getBoundingClientRect(), o = Math.max(e, t), i = Math.max(Od * o, Id), a = Math.floor(o * Ad), d = Math.sqrt(t ** 2 + e ** 2) + Rd;
|
|
this.initialSize = a, this.rippleScale = `${(d + i) / a}`, this.rippleSize = `${a}px`;
|
|
}
|
|
getNormalizedPointerEventCoords(e) {
|
|
const { scrollX: t, scrollY: o } = window, { left: i, top: a } = this.getBoundingClientRect(), s = t + i, d = o + a, { pageX: h, pageY: y } = e;
|
|
return { x: h - s, y: y - d };
|
|
}
|
|
getTranslationCoordinates(e) {
|
|
const { height: t, width: o } = this.getBoundingClientRect(), i = {
|
|
x: (o - this.initialSize) / 2,
|
|
y: (t - this.initialSize) / 2
|
|
};
|
|
let a;
|
|
return e instanceof PointerEvent ? a = this.getNormalizedPointerEventCoords(e) : a = {
|
|
x: o / 2,
|
|
y: t / 2
|
|
}, a = {
|
|
x: a.x - this.initialSize / 2,
|
|
y: a.y - this.initialSize / 2
|
|
}, { startPoint: a, endPoint: i };
|
|
}
|
|
startPressAnimation(e) {
|
|
var s;
|
|
if (!this.mdRoot)
|
|
return;
|
|
this.pressed = !0, (s = this.growAnimation) == null || s.cancel(), this.determineRippleSize();
|
|
const { startPoint: t, endPoint: o } = this.getTranslationCoordinates(e), i = `${t.x}px, ${t.y}px`, a = `${o.x}px, ${o.y}px`;
|
|
this.growAnimation = this.mdRoot.animate({
|
|
top: [0, 0],
|
|
left: [0, 0],
|
|
height: [this.rippleSize, this.rippleSize],
|
|
width: [this.rippleSize, this.rippleSize],
|
|
transform: [
|
|
`translate(${i}) scale(1)`,
|
|
`translate(${a}) scale(${this.rippleScale})`
|
|
]
|
|
}, {
|
|
pseudoElement: zd,
|
|
duration: Sd,
|
|
easing: at.STANDARD,
|
|
fill: Pd
|
|
});
|
|
}
|
|
async endPressAnimation() {
|
|
this.rippleStartEvent = void 0, this.state = Ye.INACTIVE;
|
|
const e = this.growAnimation;
|
|
let t = 1 / 0;
|
|
if (typeof (e == null ? void 0 : e.currentTime) == "number" ? t = e.currentTime : e != null && e.currentTime && (t = e.currentTime.to("ms").value), t >= Ln) {
|
|
this.pressed = !1;
|
|
return;
|
|
}
|
|
await new Promise((o) => {
|
|
setTimeout(o, Ln - t);
|
|
}), this.growAnimation === e && (this.pressed = !1);
|
|
}
|
|
/**
|
|
* Returns `true` if
|
|
* - the ripple element is enabled
|
|
* - the pointer is primary for the input type
|
|
* - the pointer is the pointer that started the interaction, or will start
|
|
* the interaction
|
|
* - the pointer is a touch, or the pointer state has the primary button
|
|
* held, or the pointer is hovering
|
|
*/
|
|
shouldReactToEvent(e) {
|
|
if (this.disabled || !e.isPrimary || this.rippleStartEvent && this.rippleStartEvent.pointerId !== e.pointerId)
|
|
return !1;
|
|
if (e.type === "pointerenter" || e.type === "pointerleave")
|
|
return !this.isTouch(e);
|
|
const t = e.buttons === 1;
|
|
return this.isTouch(e) || t;
|
|
}
|
|
/**
|
|
* Check if the event is within the bounds of the element.
|
|
*
|
|
* This is only needed for the "stuck" contextmenu longpress on Chrome.
|
|
*/
|
|
inBounds({ x: e, y: t }) {
|
|
const { top: o, left: i, bottom: a, right: s } = this.getBoundingClientRect();
|
|
return e >= i && e <= s && t >= o && t <= a;
|
|
}
|
|
isTouch({ pointerType: e }) {
|
|
return e === "touch";
|
|
}
|
|
/** @private */
|
|
async handleEvent(e) {
|
|
if (!(oa != null && oa.matches))
|
|
switch (e.type) {
|
|
case "click":
|
|
this.handleClick();
|
|
break;
|
|
case "contextmenu":
|
|
this.handleContextmenu();
|
|
break;
|
|
case "pointercancel":
|
|
this.handlePointercancel(e);
|
|
break;
|
|
case "pointerdown":
|
|
await this.handlePointerdown(e);
|
|
break;
|
|
case "pointerenter":
|
|
this.handlePointerenter(e);
|
|
break;
|
|
case "pointerleave":
|
|
this.handlePointerleave(e);
|
|
break;
|
|
case "pointerup":
|
|
this.handlePointerup(e);
|
|
break;
|
|
}
|
|
}
|
|
onControlChange(e, t) {
|
|
for (const o of Ld)
|
|
e == null || e.removeEventListener(o, this), t == null || t.addEventListener(o, this);
|
|
}
|
|
}
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], Dr.prototype, "disabled", void 0);
|
|
l([
|
|
se()
|
|
], Dr.prototype, "hovered", void 0);
|
|
l([
|
|
se()
|
|
], Dr.prototype, "pressed", void 0);
|
|
l([
|
|
G(".surface")
|
|
], Dr.prototype, "mdRoot", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Md = F`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ba = class extends Dr {
|
|
};
|
|
ba.styles = [Md];
|
|
ba = l([
|
|
H("md-ripple")
|
|
], ba);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function vs(r) {
|
|
r.addInitializer((e) => {
|
|
const t = e;
|
|
t.addEventListener("click", async (o) => {
|
|
const { type: i, [je]: a } = t, { form: s } = a;
|
|
if (!(!s || i === "button") && (await new Promise((d) => {
|
|
setTimeout(d);
|
|
}), !o.defaultPrevented)) {
|
|
if (i === "reset") {
|
|
s.reset();
|
|
return;
|
|
}
|
|
s.addEventListener("submit", (d) => {
|
|
Object.defineProperty(d, "submitter", {
|
|
configurable: !0,
|
|
enumerable: !0,
|
|
get: () => t
|
|
});
|
|
}, { capture: !0, once: !0 }), a.setFormValue(t.value), s.requestSubmit();
|
|
}
|
|
});
|
|
});
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function yi(r) {
|
|
const e = new MouseEvent("click", { bubbles: !0 });
|
|
return r.dispatchEvent(e), e;
|
|
}
|
|
function Nr(r) {
|
|
return r.currentTarget !== r.target || r.composedPath()[0] !== r.target || r.target.disabled ? !1 : !Dd(r);
|
|
}
|
|
function Dd(r) {
|
|
const e = ya;
|
|
return e && (r.preventDefault(), r.stopImmediatePropagation()), Nd(), e;
|
|
}
|
|
let ya = !1;
|
|
async function Nd() {
|
|
ya = !0, await null, ya = !1;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Bd = Je(Rt(W));
|
|
let Pe = class extends Bd {
|
|
get name() {
|
|
return this.getAttribute("name") ?? "";
|
|
}
|
|
set name(e) {
|
|
this.setAttribute("name", e);
|
|
}
|
|
/**
|
|
* The associated form element with which this element's value will submit.
|
|
*/
|
|
get form() {
|
|
return this[je].form;
|
|
}
|
|
constructor() {
|
|
super(), this.disabled = !1, this.softDisabled = !1, this.href = "", this.target = "", this.trailingIcon = !1, this.hasIcon = !1, this.type = "submit", this.value = "", this.addEventListener("click", this.handleClick.bind(this));
|
|
}
|
|
focus() {
|
|
var e;
|
|
(e = this.buttonElement) == null || e.focus();
|
|
}
|
|
blur() {
|
|
var e;
|
|
(e = this.buttonElement) == null || e.blur();
|
|
}
|
|
render() {
|
|
var i;
|
|
const e = !this.href && (this.disabled || this.softDisabled), t = this.href ? this.renderLink() : this.renderButton(), o = this.href ? "link" : "button";
|
|
return _`
|
|
${(i = this.renderElevationOrOutline) == null ? void 0 : i.call(this)}
|
|
<div class="background"></div>
|
|
<md-focus-ring part="focus-ring" for=${o}></md-focus-ring>
|
|
<md-ripple
|
|
part="ripple"
|
|
for=${o}
|
|
?disabled="${e}"></md-ripple>
|
|
${t}
|
|
`;
|
|
}
|
|
renderButton() {
|
|
const { ariaLabel: e, ariaHasPopup: t, ariaExpanded: o } = this;
|
|
return _`<button
|
|
id="button"
|
|
class="button"
|
|
?disabled=${this.disabled}
|
|
aria-disabled=${this.softDisabled || x}
|
|
aria-label="${e || x}"
|
|
aria-haspopup="${t || x}"
|
|
aria-expanded="${o || x}">
|
|
${this.renderContent()}
|
|
</button>`;
|
|
}
|
|
renderLink() {
|
|
const { ariaLabel: e, ariaHasPopup: t, ariaExpanded: o } = this;
|
|
return _`<a
|
|
id="link"
|
|
class="button"
|
|
aria-label="${e || x}"
|
|
aria-haspopup="${t || x}"
|
|
aria-expanded="${o || x}"
|
|
href=${this.href}
|
|
target=${this.target || x}
|
|
>${this.renderContent()}
|
|
</a>`;
|
|
}
|
|
renderContent() {
|
|
const e = _`<slot
|
|
name="icon"
|
|
@slotchange="${this.handleSlotChange}"></slot>`;
|
|
return _`
|
|
<span class="touch"></span>
|
|
${this.trailingIcon ? x : e}
|
|
<span class="label"><slot></slot></span>
|
|
${this.trailingIcon ? e : x}
|
|
`;
|
|
}
|
|
handleClick(e) {
|
|
if (!this.href && this.softDisabled) {
|
|
e.stopImmediatePropagation(), e.preventDefault();
|
|
return;
|
|
}
|
|
!Nr(e) || !this.buttonElement || (this.focus(), yi(this.buttonElement));
|
|
}
|
|
handleSlotChange() {
|
|
this.hasIcon = this.assignedIcons.length > 0;
|
|
}
|
|
};
|
|
vs(Pe);
|
|
Pe.formAssociated = !0;
|
|
Pe.shadowRootOptions = {
|
|
mode: "open",
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], Pe.prototype, "disabled", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "soft-disabled", reflect: !0 })
|
|
], Pe.prototype, "softDisabled", void 0);
|
|
l([
|
|
p()
|
|
], Pe.prototype, "href", void 0);
|
|
l([
|
|
p()
|
|
], Pe.prototype, "target", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "trailing-icon", reflect: !0 })
|
|
], Pe.prototype, "trailingIcon", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "has-icon", reflect: !0 })
|
|
], Pe.prototype, "hasIcon", void 0);
|
|
l([
|
|
p()
|
|
], Pe.prototype, "type", void 0);
|
|
l([
|
|
p({ reflect: !0 })
|
|
], Pe.prototype, "value", void 0);
|
|
l([
|
|
G(".button")
|
|
], Pe.prototype, "buttonElement", void 0);
|
|
l([
|
|
We({ slot: "icon", flatten: !0 })
|
|
], Pe.prototype, "assignedIcons", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class jd extends Pe {
|
|
renderElevationOrOutline() {
|
|
return _`<md-elevation part="elevation"></md-elevation>`;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ud = F`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ma = F`md-elevation{transition-duration:280ms}:host(:is([disabled],[soft-disabled])) md-elevation{transition:none}md-elevation{--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color)}:host(:focus-within) md-elevation{--md-elevation-level: var(--_focus-container-elevation)}:host(:hover) md-elevation{--md-elevation-level: var(--_hover-container-elevation)}:host(:active) md-elevation{--md-elevation-level: var(--_pressed-container-elevation)}:host(:is([disabled],[soft-disabled])) md-elevation{--md-elevation-level: var(--_disabled-container-elevation)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Br = F`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background-color:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Lo = class extends jd {
|
|
};
|
|
Lo.styles = [
|
|
Br,
|
|
Ma,
|
|
Ud
|
|
];
|
|
Lo = l([
|
|
H("md-filled-button")
|
|
], Lo);
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class Vd extends Pe {
|
|
renderElevationOrOutline() {
|
|
return _`<md-elevation part="elevation"></md-elevation>`;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Hd = F`:host{--_container-color: var(--md-filled-tonal-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-elevation: var(--md-filled-tonal-button-container-elevation, 0);--_container-height: var(--md-filled-tonal-button-container-height, 40px);--_container-shadow-color: var(--md-filled-tonal-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-tonal-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-tonal-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-tonal-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-tonal-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-tonal-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-tonal-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-tonal-button-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-container-elevation: var(--md-filled-tonal-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-tonal-button-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-tonal-button-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_label-text-font: var(--md-filled-tonal-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-tonal-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-tonal-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-tonal-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-tonal-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-tonal-button-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-color: var(--md-filled-tonal-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-tonal-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_container-shape-start-start: var(--md-filled-tonal-button-container-shape-start-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-button-container-shape-start-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-button-container-shape-end-end, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-button-container-shape-end-start, var(--md-filled-tonal-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-tonal-button-leading-space, 24px);--_trailing-space: var(--md-filled-tonal-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-tonal-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-tonal-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-tonal-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-tonal-button-with-trailing-icon-trailing-space, 16px)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Fo = class extends Vd {
|
|
};
|
|
Fo.styles = [
|
|
Br,
|
|
Ma,
|
|
Hd
|
|
];
|
|
Fo = l([
|
|
H("md-filled-tonal-button")
|
|
], Fo);
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class qd extends Pe {
|
|
renderElevationOrOutline() {
|
|
return _`<md-elevation part="elevation"></md-elevation>`;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Wd = F`:host{--_container-color: var(--md-elevated-button-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_container-elevation: var(--md-elevated-button-container-elevation, 1);--_container-height: var(--md-elevated-button-container-height, 40px);--_container-shadow-color: var(--md-elevated-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-elevated-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-elevated-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-elevated-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-elevated-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-elevated-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-elevated-button-focus-container-elevation, 1);--_focus-label-text-color: var(--md-elevated-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-elevated-button-hover-container-elevation, 2);--_hover-label-text-color: var(--md-elevated-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-elevated-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-elevated-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-elevated-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-elevated-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-elevated-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-elevated-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-elevated-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-elevated-button-pressed-container-elevation, 1);--_pressed-label-text-color: var(--md-elevated-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-elevated-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-elevated-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-elevated-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-elevated-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-elevated-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-elevated-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-elevated-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-elevated-button-icon-size, 18px);--_pressed-icon-color: var(--md-elevated-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-elevated-button-container-shape-start-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-elevated-button-container-shape-start-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-elevated-button-container-shape-end-end, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-elevated-button-container-shape-end-start, var(--md-elevated-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-elevated-button-leading-space, 24px);--_trailing-space: var(--md-elevated-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-elevated-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-elevated-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-elevated-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-elevated-button-with-trailing-icon-trailing-space, 16px)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Mo = class extends qd {
|
|
};
|
|
Mo.styles = [
|
|
Br,
|
|
Ma,
|
|
Wd
|
|
];
|
|
Mo = l([
|
|
H("md-elevated-button")
|
|
], Mo);
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class Kd extends Pe {
|
|
renderElevationOrOutline() {
|
|
return _`<div class="outline"></div>`;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Yd = F`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host(:is([disabled],[soft-disabled])) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])) .background{border-color:GrayText}:host(:is([disabled],[soft-disabled])) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Do = class extends Kd {
|
|
};
|
|
Do.styles = [Br, Yd];
|
|
Do = l([
|
|
H("md-outlined-button")
|
|
], Do);
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class Gd extends Pe {
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Xd = F`:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let No = class extends Gd {
|
|
};
|
|
No.styles = [Br, Xd];
|
|
No = l([
|
|
H("md-text-button")
|
|
], No);
|
|
const Fn = ee({
|
|
tagName: "md-filled-button",
|
|
elementClass: Lo,
|
|
react: J
|
|
}), Zd = ee({
|
|
tagName: "md-filled-tonal-button",
|
|
elementClass: Fo,
|
|
react: J
|
|
}), Jd = ee({
|
|
tagName: "md-elevated-button",
|
|
elementClass: Mo,
|
|
react: J
|
|
}), Qd = ee({
|
|
tagName: "md-outlined-button",
|
|
elementClass: Do,
|
|
react: J
|
|
}), ec = ee({
|
|
tagName: "md-text-button",
|
|
elementClass: No,
|
|
react: J
|
|
}), up = ({ variant: r, children: e, disabled: t, softDisabled: o, href: i, target: a, type: s, value: d, ...h }) => {
|
|
switch (r) {
|
|
case "filled":
|
|
return /* @__PURE__ */ V.jsx(Fn, { ...h, disabled: t, softDisabled: o, href: i, target: a, type: s, value: d, children: e });
|
|
case "filled-tonal":
|
|
return /* @__PURE__ */ V.jsx(Zd, { ...h, disabled: t, softDisabled: o, href: i, target: a, type: s, value: d, children: e });
|
|
case "elevated":
|
|
return /* @__PURE__ */ V.jsx(Jd, { ...h, disabled: t, softDisabled: o, href: i, target: a, type: s, value: d, children: e });
|
|
case "outlined":
|
|
return /* @__PURE__ */ V.jsx(Qd, { ...h, disabled: t, softDisabled: o, href: i, target: a, type: s, value: d, children: e });
|
|
case "text":
|
|
return /* @__PURE__ */ V.jsx(ec, { ...h, disabled: t, softDisabled: o, href: i, target: a, type: s, value: d, children: e });
|
|
default:
|
|
return /* @__PURE__ */ V.jsx(Fn, { ...h, disabled: t, softDisabled: o, href: i, target: a, type: s, value: d, children: e });
|
|
}
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class ms extends bi {
|
|
computeValidity(e) {
|
|
return this.checkboxControl || (this.checkboxControl = document.createElement("input"), this.checkboxControl.type = "checkbox"), this.checkboxControl.checked = e.checked, this.checkboxControl.required = e.required, {
|
|
validity: this.checkboxControl.validity,
|
|
validationMessage: this.checkboxControl.validationMessage
|
|
};
|
|
}
|
|
equals(e, t) {
|
|
return e.checked === t.checked && e.required === t.required;
|
|
}
|
|
copy({ checked: e, required: t }) {
|
|
return { checked: e, required: t };
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const tc = Je(Mr(cr(Rt(W))));
|
|
let ht = class extends tc {
|
|
constructor() {
|
|
super(), this.checked = !1, this.indeterminate = !1, this.required = !1, this.value = "on", this.prevChecked = !1, this.prevDisabled = !1, this.prevIndeterminate = !1, this.addEventListener("click", (e) => {
|
|
!Nr(e) || !this.input || (this.focus(), yi(this.input));
|
|
});
|
|
}
|
|
update(e) {
|
|
(e.has("checked") || e.has("disabled") || e.has("indeterminate")) && (this.prevChecked = e.get("checked") ?? this.checked, this.prevDisabled = e.get("disabled") ?? this.disabled, this.prevIndeterminate = e.get("indeterminate") ?? this.indeterminate), super.update(e);
|
|
}
|
|
render() {
|
|
const e = !this.prevChecked && !this.prevIndeterminate, t = this.prevChecked && !this.prevIndeterminate, o = this.prevIndeterminate, i = this.checked && !this.indeterminate, a = this.indeterminate, s = ye({
|
|
disabled: this.disabled,
|
|
selected: i || a,
|
|
unselected: !i && !a,
|
|
checked: i,
|
|
indeterminate: a,
|
|
"prev-unselected": e,
|
|
"prev-checked": t,
|
|
"prev-indeterminate": o,
|
|
"prev-disabled": this.prevDisabled
|
|
}), { ariaLabel: d, ariaInvalid: h } = this;
|
|
return _`
|
|
<div class="container ${s}">
|
|
<input
|
|
type="checkbox"
|
|
id="input"
|
|
aria-checked=${a ? "mixed" : x}
|
|
aria-label=${d || x}
|
|
aria-invalid=${h || x}
|
|
?disabled=${this.disabled}
|
|
?required=${this.required}
|
|
.indeterminate=${this.indeterminate}
|
|
.checked=${this.checked}
|
|
@input=${this.handleInput}
|
|
@change=${this.handleChange} />
|
|
|
|
<div class="outline"></div>
|
|
<div class="background"></div>
|
|
<md-focus-ring part="focus-ring" for="input"></md-focus-ring>
|
|
<md-ripple for="input" ?disabled=${this.disabled}></md-ripple>
|
|
<svg class="icon" viewBox="0 0 18 18" aria-hidden="true">
|
|
<rect class="mark short" />
|
|
<rect class="mark long" />
|
|
</svg>
|
|
</div>
|
|
`;
|
|
}
|
|
handleInput(e) {
|
|
const t = e.target;
|
|
this.checked = t.checked, this.indeterminate = t.indeterminate;
|
|
}
|
|
handleChange(e) {
|
|
At(this, e);
|
|
}
|
|
[yt]() {
|
|
return !this.checked || this.indeterminate ? null : this.value;
|
|
}
|
|
[Rr]() {
|
|
return String(this.checked);
|
|
}
|
|
formResetCallback() {
|
|
this.checked = this.hasAttribute("checked");
|
|
}
|
|
formStateRestoreCallback(e) {
|
|
this.checked = e === "true";
|
|
}
|
|
[Wt]() {
|
|
return new ms(() => this);
|
|
}
|
|
[Kt]() {
|
|
return this.input;
|
|
}
|
|
};
|
|
ht.shadowRootOptions = {
|
|
...W.shadowRootOptions,
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ type: Boolean })
|
|
], ht.prototype, "checked", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], ht.prototype, "indeterminate", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], ht.prototype, "required", void 0);
|
|
l([
|
|
p()
|
|
], ht.prototype, "value", void 0);
|
|
l([
|
|
se()
|
|
], ht.prototype, "prevChecked", void 0);
|
|
l([
|
|
se()
|
|
], ht.prototype, "prevDisabled", void 0);
|
|
l([
|
|
se()
|
|
], ht.prototype, "prevIndeterminate", void 0);
|
|
l([
|
|
G("input")
|
|
], ht.prototype, "input", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const rc = F`:host{border-start-start-radius:var(--md-checkbox-container-shape-start-start, var(--md-checkbox-container-shape, 2px));border-start-end-radius:var(--md-checkbox-container-shape-start-end, var(--md-checkbox-container-shape, 2px));border-end-end-radius:var(--md-checkbox-container-shape-end-end, var(--md-checkbox-container-shape, 2px));border-end-start-radius:var(--md-checkbox-container-shape-end-start, var(--md-checkbox-container-shape, 2px));display:inline-flex;height:var(--md-checkbox-container-size, 18px);position:relative;vertical-align:top;width:var(--md-checkbox-container-size, 18px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-checkbox-container-size, 18px))/2)}md-focus-ring{height:44px;inset:unset;width:44px}input{appearance:none;height:48px;margin:0;opacity:0;outline:none;position:absolute;width:48px;z-index:1;cursor:inherit}:host([touch-target=none]) input{height:100%;width:100%}.container{border-radius:inherit;display:flex;height:100%;place-content:center;place-items:center;position:relative;width:100%}.outline,.background,.icon{inset:0;position:absolute}.outline,.background{border-radius:inherit}.outline{border-color:var(--md-checkbox-outline-color, var(--md-sys-color-on-surface-variant, #49454f));border-style:solid;border-width:var(--md-checkbox-outline-width, 2px);box-sizing:border-box}.background{background-color:var(--md-checkbox-selected-container-color, var(--md-sys-color-primary, #6750a4))}.background,.icon{opacity:0;transition-duration:150ms,50ms;transition-property:transform,opacity;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15),linear;transform:scale(0.6)}:where(.selected) :is(.background,.icon){opacity:1;transition-duration:350ms,50ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1),linear;transform:scale(1)}md-ripple{border-radius:var(--md-checkbox-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-checkbox-state-layer-size, 40px);inset:unset;width:var(--md-checkbox-state-layer-size, 40px);--md-ripple-hover-color: var(--md-checkbox-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-checkbox-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-checkbox-pressed-state-layer-opacity, 0.12)}.selected md-ripple{--md-ripple-hover-color: var(--md-checkbox-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-checkbox-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-checkbox-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-checkbox-selected-pressed-state-layer-opacity, 0.12)}.icon{fill:var(--md-checkbox-selected-icon-color, var(--md-sys-color-on-primary, #fff));height:var(--md-checkbox-icon-size, 18px);width:var(--md-checkbox-icon-size, 18px)}.mark.short{height:2px;transition-property:transform,height;width:2px}.mark.long{height:2px;transition-property:transform,width;width:10px}.mark{animation-duration:150ms;animation-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15);transition-duration:150ms;transition-timing-function:cubic-bezier(0.3, 0, 0.8, 0.15)}.selected .mark{animation-duration:350ms;animation-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1);transition-duration:350ms;transition-timing-function:cubic-bezier(0.05, 0.7, 0.1, 1)}.checked .mark,.prev-checked.unselected .mark{transform:scaleY(-1) translate(7px, -14px) rotate(45deg)}.checked .mark.short,.prev-checked.unselected .mark.short{height:5.6568542495px}.checked .mark.long,.prev-checked.unselected .mark.long{width:11.313708499px}.indeterminate .mark,.prev-indeterminate.unselected .mark{transform:scaleY(-1) translate(4px, -10px) rotate(0deg)}.prev-unselected .mark{transition-property:none}.prev-unselected.checked .mark.long{animation-name:prev-unselected-to-checked}@keyframes prev-unselected-to-checked{from{width:0}}:where(:hover) .outline{border-color:var(--md-checkbox-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-hover-outline-width, 2px)}:where(:hover) .background{background:var(--md-checkbox-selected-hover-container-color, var(--md-sys-color-primary, #6750a4))}:where(:hover) .icon{fill:var(--md-checkbox-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:focus-within) .outline{border-color:var(--md-checkbox-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-focus-outline-width, 2px)}:where(:focus-within) .background{background:var(--md-checkbox-selected-focus-container-color, var(--md-sys-color-primary, #6750a4))}:where(:focus-within) .icon{fill:var(--md-checkbox-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff))}:where(:active) .outline{border-color:var(--md-checkbox-pressed-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-pressed-outline-width, 2px)}:where(:active) .background{background:var(--md-checkbox-selected-pressed-container-color, var(--md-sys-color-primary, #6750a4))}:where(:active) .icon{fill:var(--md-checkbox-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff))}:where(.disabled,.prev-disabled) :is(.background,.icon,.mark){animation-duration:0s;transition-duration:0s}:where(.disabled) .outline{border-color:var(--md-checkbox-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));border-width:var(--md-checkbox-disabled-outline-width, 2px);opacity:var(--md-checkbox-disabled-container-opacity, 0.38)}:where(.selected.disabled) .outline{visibility:hidden}:where(.selected.disabled) .background{background:var(--md-checkbox-selected-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-checkbox-selected-disabled-container-opacity, 0.38)}:where(.disabled) .icon{fill:var(--md-checkbox-selected-disabled-icon-color, var(--md-sys-color-surface, #fef7ff))}@media(forced-colors: active){.background{background-color:CanvasText}.selected.disabled .background{background-color:GrayText;opacity:1}.outline{border-color:CanvasText}.disabled .outline{border-color:GrayText;opacity:1}.icon{fill:Canvas}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2018 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Bo = class extends ht {
|
|
};
|
|
Bo.styles = [rc];
|
|
Bo = l([
|
|
H("md-checkbox")
|
|
], Bo);
|
|
const oc = ee({
|
|
tagName: "md-checkbox",
|
|
react: J,
|
|
elementClass: Bo
|
|
}), fp = ({ checked: r, indeterminate: e, id: t, disabled: o, hidden: i, ariaLabel: a, ariaLabelledBy: s, ariaDescribedBy: d, ariaControls: h, required: y, onInput: v, onChange: f, onClick: C, onMouseDown: w, onMouseUp: A, onMouseEnter: S, onFocus: I, onBlur: O, className: R, style: B, tabIndex: U, name: P, ...q }) => /* @__PURE__ */ V.jsx(
|
|
oc,
|
|
{
|
|
...q,
|
|
id: t,
|
|
value: r ? "on" : "off",
|
|
indeterminate: e,
|
|
disabled: o || !1,
|
|
required: y,
|
|
checked: r,
|
|
hidden: i,
|
|
"touch-target": "wrapper",
|
|
"aria-label": a,
|
|
"aria-labelledby": s,
|
|
"aria-describedby": d,
|
|
"aria-controls": h,
|
|
"aria-required": y,
|
|
onInput: v,
|
|
onChange: f,
|
|
onClick: C,
|
|
onMouseDown: w,
|
|
onMouseUp: A,
|
|
onMouseEnter: S,
|
|
onFocus: I,
|
|
onBlur: O,
|
|
className: R,
|
|
style: B,
|
|
tabIndex: U,
|
|
name: P || void 0
|
|
}
|
|
);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const bo = Symbol("isFocusable"), ia = Symbol("privateIsFocusable"), yo = Symbol("externalTabIndex"), go = Symbol("isUpdatingTabIndex"), xo = Symbol("updateTabIndex");
|
|
function bs(r) {
|
|
var e, t, o;
|
|
class i extends r {
|
|
constructor() {
|
|
super(...arguments), this[e] = !0, this[t] = null, this[o] = !1;
|
|
}
|
|
get [bo]() {
|
|
return this[ia];
|
|
}
|
|
set [bo](s) {
|
|
this[bo] !== s && (this[ia] = s, this[xo]());
|
|
}
|
|
connectedCallback() {
|
|
super.connectedCallback(), this[xo]();
|
|
}
|
|
attributeChangedCallback(s, d, h) {
|
|
if (s !== "tabindex") {
|
|
super.attributeChangedCallback(s, d, h);
|
|
return;
|
|
}
|
|
if (this.requestUpdate("tabIndex", Number(d ?? -1)), !this[go]) {
|
|
if (!this.hasAttribute("tabindex")) {
|
|
this[yo] = null, this[xo]();
|
|
return;
|
|
}
|
|
this[yo] = this.tabIndex;
|
|
}
|
|
}
|
|
[(e = ia, t = yo, o = go, xo)]() {
|
|
const s = this[bo] ? 0 : -1, d = this[yo] ?? s;
|
|
this[go] = !0, this.tabIndex = d, this[go] = !1;
|
|
}
|
|
}
|
|
return l([
|
|
p({ noAccessor: !0 })
|
|
], i.prototype, "tabIndex", void 0), i;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class ic extends bi {
|
|
computeValidity(e) {
|
|
this.radioElement || (this.radioElement = document.createElement("input"), this.radioElement.type = "radio", this.radioElement.name = "group");
|
|
let t = !1, o = !1;
|
|
for (const { checked: i, required: a } of e)
|
|
a && (t = !0), i && (o = !0);
|
|
return this.radioElement.checked = o, this.radioElement.required = t, {
|
|
validity: {
|
|
valueMissing: t && !o
|
|
},
|
|
validationMessage: this.radioElement.validationMessage
|
|
};
|
|
}
|
|
equals(e, t) {
|
|
if (e.length !== t.length)
|
|
return !1;
|
|
for (let o = 0; o < e.length; o++) {
|
|
const i = e[o], a = t[o];
|
|
if (i.checked !== a.checked || i.required !== a.required)
|
|
return !1;
|
|
}
|
|
return !0;
|
|
}
|
|
copy(e) {
|
|
return e.map(({ checked: t, required: o }) => ({
|
|
checked: t,
|
|
required: o
|
|
}));
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class ac {
|
|
/**
|
|
* All single selection elements in the host element's root with the same
|
|
* `name` attribute, including the host element.
|
|
*/
|
|
get controls() {
|
|
const e = this.host.getAttribute("name");
|
|
return !e || !this.root || !this.host.isConnected ? [this.host] : Array.from(this.root.querySelectorAll(`[name="${e}"]`));
|
|
}
|
|
constructor(e) {
|
|
this.host = e, this.focused = !1, this.root = null, this.handleFocusIn = () => {
|
|
this.focused = !0, this.updateTabIndices();
|
|
}, this.handleFocusOut = () => {
|
|
this.focused = !1, this.updateTabIndices();
|
|
}, this.handleKeyDown = (t) => {
|
|
const o = t.key === "ArrowDown", i = t.key === "ArrowUp", a = t.key === "ArrowLeft", s = t.key === "ArrowRight";
|
|
if (!a && !s && !o && !i)
|
|
return;
|
|
const d = this.controls;
|
|
if (!d.length)
|
|
return;
|
|
t.preventDefault();
|
|
const y = getComputedStyle(this.host).direction === "rtl" ? a || o : s || o, v = d.indexOf(this.host);
|
|
let f = y ? v + 1 : v - 1;
|
|
for (; f !== v; ) {
|
|
f >= d.length ? f = 0 : f < 0 && (f = d.length - 1);
|
|
const C = d[f];
|
|
if (C.hasAttribute("disabled")) {
|
|
y ? f++ : f--;
|
|
continue;
|
|
}
|
|
for (const w of d)
|
|
w !== C && (w.checked = !1, w.tabIndex = -1, w.blur());
|
|
C.checked = !0, C.tabIndex = 0, C.focus(), C.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
break;
|
|
}
|
|
};
|
|
}
|
|
hostConnected() {
|
|
this.root = this.host.getRootNode(), this.host.addEventListener("keydown", this.handleKeyDown), this.host.addEventListener("focusin", this.handleFocusIn), this.host.addEventListener("focusout", this.handleFocusOut), this.host.checked && this.uncheckSiblings(), this.updateTabIndices();
|
|
}
|
|
hostDisconnected() {
|
|
this.host.removeEventListener("keydown", this.handleKeyDown), this.host.removeEventListener("focusin", this.handleFocusIn), this.host.removeEventListener("focusout", this.handleFocusOut), this.updateTabIndices(), this.root = null;
|
|
}
|
|
/**
|
|
* Should be called whenever the host's `checked` property changes
|
|
* synchronously.
|
|
*/
|
|
handleCheckedChange() {
|
|
this.host.checked && (this.uncheckSiblings(), this.updateTabIndices());
|
|
}
|
|
uncheckSiblings() {
|
|
for (const e of this.controls)
|
|
e !== this.host && (e.checked = !1);
|
|
}
|
|
/**
|
|
* Updates the `tabindex` of the host and its siblings.
|
|
*/
|
|
updateTabIndices() {
|
|
const e = this.controls, t = e.find((o) => o.checked);
|
|
if (t || this.focused) {
|
|
const o = t || this.host;
|
|
o.tabIndex = 0;
|
|
for (const i of e)
|
|
i !== o && (i.tabIndex = -1);
|
|
return;
|
|
}
|
|
for (const o of e)
|
|
o.tabIndex = 0;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2018 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
var Mn;
|
|
const aa = Symbol("checked");
|
|
let nc = 0;
|
|
const sc = Mr(cr(Rt(bs(W))));
|
|
let jr = class extends sc {
|
|
/**
|
|
* Whether or not the radio is selected.
|
|
*/
|
|
get checked() {
|
|
return this[aa];
|
|
}
|
|
set checked(e) {
|
|
const t = this.checked;
|
|
t !== e && (this[aa] = e, this.requestUpdate("checked", t), this.selectionController.handleCheckedChange());
|
|
}
|
|
constructor() {
|
|
super(), this.maskId = `cutout${++nc}`, this[Mn] = !1, this.required = !1, this.value = "on", this.selectionController = new ac(this), this.addController(this.selectionController), this[je].role = "radio", this.addEventListener("click", this.handleClick.bind(this)), this.addEventListener("keydown", this.handleKeydown.bind(this));
|
|
}
|
|
render() {
|
|
const e = { checked: this.checked };
|
|
return _`
|
|
<div class="container ${ye(e)}" aria-hidden="true">
|
|
<md-ripple
|
|
part="ripple"
|
|
.control=${this}
|
|
?disabled=${this.disabled}></md-ripple>
|
|
<md-focus-ring part="focus-ring" .control=${this}></md-focus-ring>
|
|
<svg class="icon" viewBox="0 0 20 20">
|
|
<mask id="${this.maskId}">
|
|
<rect width="100%" height="100%" fill="white" />
|
|
<circle cx="10" cy="10" r="8" fill="black" />
|
|
</mask>
|
|
<circle
|
|
class="outer circle"
|
|
cx="10"
|
|
cy="10"
|
|
r="10"
|
|
mask="url(#${this.maskId})" />
|
|
<circle class="inner circle" cx="10" cy="10" r="5" />
|
|
</svg>
|
|
|
|
<div class="touch-target"></div>
|
|
</div>
|
|
`;
|
|
}
|
|
updated() {
|
|
this[je].ariaChecked = String(this.checked);
|
|
}
|
|
async handleClick(e) {
|
|
this.disabled || (await 0, !e.defaultPrevented && (Nr(e) && this.focus(), this.checked = !0, this.dispatchEvent(new Event("change", { bubbles: !0 })), this.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 }))));
|
|
}
|
|
async handleKeydown(e) {
|
|
await 0, !(e.key !== " " || e.defaultPrevented) && this.click();
|
|
}
|
|
[(Mn = aa, yt)]() {
|
|
return this.checked ? this.value : null;
|
|
}
|
|
[Rr]() {
|
|
return String(this.checked);
|
|
}
|
|
formResetCallback() {
|
|
this.checked = this.hasAttribute("checked");
|
|
}
|
|
formStateRestoreCallback(e) {
|
|
this.checked = e === "true";
|
|
}
|
|
[Wt]() {
|
|
return new ic(() => this.selectionController ? this.selectionController.controls : [this]);
|
|
}
|
|
[Kt]() {
|
|
return this.container;
|
|
}
|
|
};
|
|
l([
|
|
p({ type: Boolean })
|
|
], jr.prototype, "checked", null);
|
|
l([
|
|
p({ type: Boolean })
|
|
], jr.prototype, "required", void 0);
|
|
l([
|
|
p()
|
|
], jr.prototype, "value", void 0);
|
|
l([
|
|
G(".container")
|
|
], jr.prototype, "container", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const lc = F`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20px);outline:none;position:relative;vertical-align:top;width:var(--md-radio-icon-size, 20px);-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;--md-ripple-hover-color: var(--md-radio-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-radio-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-opacity: var(--md-radio-pressed-state-layer-opacity, 0.12)}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-radio-icon-size, 20px))/2)}.container{display:flex;height:100%;place-content:center;place-items:center;width:100%}md-focus-ring{height:44px;inset:unset;width:44px}.checked{--md-ripple-hover-color: var(--md-radio-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-radio-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-radio-selected-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-radio-selected-pressed-state-layer-opacity, 0.12)}.touch-target{height:48px;position:absolute;width:48px}:host([touch-target=none]) .touch-target{display:none}md-ripple{border-radius:50%;height:var(--md-radio-state-layer-size, 40px);inset:unset;width:var(--md-radio-state-layer-size, 40px)}.icon{fill:var(--md-radio-icon-color, var(--md-sys-color-on-surface-variant, #49454f));inset:0;position:absolute}.outer.circle{transition:fill 50ms linear}.inner.circle{opacity:0;transform-origin:center;transition:opacity 50ms linear}.checked .icon{fill:var(--md-radio-selected-icon-color, var(--md-sys-color-primary, #6750a4))}.checked .inner.circle{animation:inner-circle-grow 300ms cubic-bezier(0.05, 0.7, 0.1, 1);opacity:1}@keyframes inner-circle-grow{from{transform:scale(0)}to{transform:scale(1)}}:host([disabled]) .circle{animation-duration:0s;transition-duration:0s}:host(:hover) .icon{fill:var(--md-radio-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:focus-within) .icon{fill:var(--md-radio-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host(:active) .icon{fill:var(--md-radio-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20))}:host([disabled]) .icon{fill:var(--md-radio-disabled-unselected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-unselected-icon-opacity, 0.38)}:host(:hover) .checked .icon{fill:var(--md-radio-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:focus-within) .checked .icon{fill:var(--md-radio-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4))}:host(:active) .checked .icon{fill:var(--md-radio-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4))}:host([disabled]) .checked .icon{fill:var(--md-radio-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-radio-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon{fill:CanvasText}:host([disabled]) .icon{fill:GrayText;opacity:1}}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let jo = class extends jr {
|
|
};
|
|
jo.styles = [lc];
|
|
jo = l([
|
|
H("md-radio")
|
|
], jo);
|
|
const dc = ee({
|
|
react: J,
|
|
tagName: "md-radio",
|
|
elementClass: jo
|
|
}), bp = (r) => {
|
|
const {
|
|
checked: e,
|
|
value: t,
|
|
required: o,
|
|
disabled: i,
|
|
name: a,
|
|
ariaLabel: s,
|
|
className: d,
|
|
style: h,
|
|
id: y,
|
|
iconColor: v,
|
|
selectedIconColor: f,
|
|
iconSize: C,
|
|
...w
|
|
} = r;
|
|
return /* @__PURE__ */ V.jsx(
|
|
dc,
|
|
{
|
|
checked: e,
|
|
value: t,
|
|
required: o,
|
|
disabled: i || !1,
|
|
name: a,
|
|
className: d,
|
|
style: {
|
|
...h,
|
|
"--md-radio-icon-color": v || "var(--md-sys-on-surface-variant)",
|
|
"--md-radio-selected-icon-color": f || "var(--md-sys-color-primary)",
|
|
"--md-radio-icon-size": C || "20px"
|
|
},
|
|
id: y,
|
|
"aria-label": s,
|
|
...w
|
|
}
|
|
);
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function ys(r, e = pt) {
|
|
const t = gi(r, e);
|
|
return t && (t.tabIndex = 0, t.focus()), t;
|
|
}
|
|
function gs(r, e = pt) {
|
|
const t = xs(r, e);
|
|
return t && (t.tabIndex = 0, t.focus()), t;
|
|
}
|
|
function cc(r, e = pt) {
|
|
const t = ar(r, e);
|
|
return t && (t.item.tabIndex = -1), t;
|
|
}
|
|
function ar(r, e = pt) {
|
|
for (let t = 0; t < r.length; t++) {
|
|
const o = r[t];
|
|
if (o.tabIndex === 0 && e(o))
|
|
return {
|
|
item: o,
|
|
index: t
|
|
};
|
|
}
|
|
return null;
|
|
}
|
|
function gi(r, e = pt) {
|
|
for (const t of r)
|
|
if (e(t))
|
|
return t;
|
|
return null;
|
|
}
|
|
function xs(r, e = pt) {
|
|
for (let t = r.length - 1; t >= 0; t--) {
|
|
const o = r[t];
|
|
if (e(o))
|
|
return o;
|
|
}
|
|
return null;
|
|
}
|
|
function uc(r, e, t = pt, o = !0) {
|
|
for (let i = 1; i < r.length; i++) {
|
|
const a = (i + e) % r.length;
|
|
if (a < e && !o)
|
|
return null;
|
|
const s = r[a];
|
|
if (t(s))
|
|
return s;
|
|
}
|
|
return r[e] ? r[e] : null;
|
|
}
|
|
function hc(r, e, t = pt, o = !0) {
|
|
for (let i = 1; i < r.length; i++) {
|
|
const a = (e - i + r.length) % r.length;
|
|
if (a > e && !o)
|
|
return null;
|
|
const s = r[a];
|
|
if (t(s))
|
|
return s;
|
|
}
|
|
return r[e] ? r[e] : null;
|
|
}
|
|
function Dn(r, e, t = pt, o = !0) {
|
|
if (e) {
|
|
const i = uc(r, e.index, t, o);
|
|
return i && (i.tabIndex = 0, i.focus()), i;
|
|
} else
|
|
return ys(r, t);
|
|
}
|
|
function Nn(r, e, t = pt, o = !0) {
|
|
if (e) {
|
|
const i = hc(r, e.index, t, o);
|
|
return i && (i.tabIndex = 0, i.focus()), i;
|
|
} else
|
|
return gs(r, t);
|
|
}
|
|
function _o() {
|
|
return new Event("deactivate-items", { bubbles: !0, composed: !0 });
|
|
}
|
|
function _s() {
|
|
return new Event("request-activation", { bubbles: !0, composed: !0 });
|
|
}
|
|
function pt(r) {
|
|
return !r.disabled;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ne = {
|
|
ArrowDown: "ArrowDown",
|
|
ArrowLeft: "ArrowLeft",
|
|
ArrowUp: "ArrowUp",
|
|
ArrowRight: "ArrowRight",
|
|
Home: "Home",
|
|
End: "End"
|
|
};
|
|
class ws {
|
|
constructor(e) {
|
|
this.handleKeydown = (v) => {
|
|
const f = v.key;
|
|
if (v.defaultPrevented || !this.isNavigableKey(f))
|
|
return;
|
|
const C = this.items;
|
|
if (!C.length)
|
|
return;
|
|
const w = ar(C, this.isActivatable);
|
|
v.preventDefault();
|
|
const A = this.isRtl(), S = A ? Ne.ArrowRight : Ne.ArrowLeft, I = A ? Ne.ArrowLeft : Ne.ArrowRight;
|
|
let O = null;
|
|
switch (f) {
|
|
case Ne.ArrowDown:
|
|
case I:
|
|
O = Dn(C, w, this.isActivatable, this.wrapNavigation());
|
|
break;
|
|
case Ne.ArrowUp:
|
|
case S:
|
|
O = Nn(C, w, this.isActivatable, this.wrapNavigation());
|
|
break;
|
|
case Ne.Home:
|
|
O = ys(C, this.isActivatable);
|
|
break;
|
|
case Ne.End:
|
|
O = gs(C, this.isActivatable);
|
|
break;
|
|
}
|
|
O && w && w.item !== O && (w.item.tabIndex = -1);
|
|
}, this.onDeactivateItems = () => {
|
|
const v = this.items;
|
|
for (const f of v)
|
|
this.deactivateItem(f);
|
|
}, this.onRequestActivation = (v) => {
|
|
this.onDeactivateItems();
|
|
const f = v.target;
|
|
this.activateItem(f), f.focus();
|
|
}, this.onSlotchange = () => {
|
|
const v = this.items;
|
|
let f = !1;
|
|
for (const w of v) {
|
|
if (!w.disabled && w.tabIndex > -1 && !f) {
|
|
f = !0, w.tabIndex = 0;
|
|
continue;
|
|
}
|
|
w.tabIndex = -1;
|
|
}
|
|
if (f)
|
|
return;
|
|
const C = gi(v, this.isActivatable);
|
|
C && (C.tabIndex = 0);
|
|
};
|
|
const { isItem: t, getPossibleItems: o, isRtl: i, deactivateItem: a, activateItem: s, isNavigableKey: d, isActivatable: h, wrapNavigation: y } = e;
|
|
this.isItem = t, this.getPossibleItems = o, this.isRtl = i, this.deactivateItem = a, this.activateItem = s, this.isNavigableKey = d, this.isActivatable = h, this.wrapNavigation = y ?? (() => !0);
|
|
}
|
|
/**
|
|
* The items being managed by the list. Additionally, attempts to see if the
|
|
* object has a sub-item in the `.item` property.
|
|
*/
|
|
get items() {
|
|
const e = this.getPossibleItems(), t = [];
|
|
for (const o of e) {
|
|
if (this.isItem(o)) {
|
|
t.push(o);
|
|
continue;
|
|
}
|
|
const a = o.item;
|
|
a && this.isItem(a) && t.push(a);
|
|
}
|
|
return t;
|
|
}
|
|
/**
|
|
* Activates the next item in the list. If at the end of the list, the first
|
|
* item will be activated.
|
|
*
|
|
* @return The activated list item or `null` if there are no items.
|
|
*/
|
|
activateNextItem() {
|
|
const e = this.items, t = ar(e, this.isActivatable);
|
|
return t && (t.item.tabIndex = -1), Dn(e, t, this.isActivatable, this.wrapNavigation());
|
|
}
|
|
/**
|
|
* Activates the previous item in the list. If at the start of the list, the
|
|
* last item will be activated.
|
|
*
|
|
* @return The activated list item or `null` if there are no items.
|
|
*/
|
|
activatePreviousItem() {
|
|
const e = this.items, t = ar(e, this.isActivatable);
|
|
return t && (t.item.tabIndex = -1), Nn(e, t, this.isActivatable, this.wrapNavigation());
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function pc(r, e) {
|
|
return new CustomEvent("close-menu", {
|
|
bubbles: !0,
|
|
composed: !0,
|
|
detail: { initiator: r, reason: e, itemPath: [r] }
|
|
});
|
|
}
|
|
const Bn = pc;
|
|
function fc() {
|
|
return new Event("deactivate-typeahead", { bubbles: !0, composed: !0 });
|
|
}
|
|
function na() {
|
|
return new Event("activate-typeahead", { bubbles: !0, composed: !0 });
|
|
}
|
|
const Et = {
|
|
UP: "ArrowUp",
|
|
DOWN: "ArrowDown",
|
|
RIGHT: "ArrowRight",
|
|
LEFT: "ArrowLeft"
|
|
}, nr = {
|
|
SPACE: "Space",
|
|
ENTER: "Enter"
|
|
}, ga = {
|
|
CLICK_SELECTION: "click-selection",
|
|
KEYDOWN: "keydown"
|
|
}, xa = {
|
|
ESCAPE: "Escape",
|
|
SPACE: nr.SPACE,
|
|
ENTER: nr.ENTER
|
|
};
|
|
function ks(r) {
|
|
return Object.values(xa).some((e) => e === r);
|
|
}
|
|
function vc(r) {
|
|
return Object.values(nr).some((e) => e === r);
|
|
}
|
|
function _a(r, e) {
|
|
const t = new Event("md-contains", { bubbles: !0, composed: !0 });
|
|
let o = [];
|
|
const i = (s) => {
|
|
o = s.composedPath();
|
|
};
|
|
return e.addEventListener("md-contains", i), r.dispatchEvent(t), e.removeEventListener("md-contains", i), o.length > 0;
|
|
}
|
|
const it = {
|
|
NONE: "none",
|
|
LIST_ROOT: "list-root",
|
|
FIRST_ITEM: "first-item",
|
|
LAST_ITEM: "last-item"
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Uo = {
|
|
END_START: "end-start",
|
|
END_END: "end-end",
|
|
START_START: "start-start",
|
|
START_END: "start-end"
|
|
};
|
|
class mc {
|
|
/**
|
|
* @param host The host to connect the controller to.
|
|
* @param getProperties A function that returns the properties for the
|
|
* controller.
|
|
*/
|
|
constructor(e, t) {
|
|
this.host = e, this.getProperties = t, this.surfaceStylesInternal = {
|
|
display: "none"
|
|
}, this.lastValues = {
|
|
isOpen: !1
|
|
}, this.host.addController(this);
|
|
}
|
|
/**
|
|
* The StyleInfo map to apply to the surface via Lit's stylemap
|
|
*/
|
|
get surfaceStyles() {
|
|
return this.surfaceStylesInternal;
|
|
}
|
|
/**
|
|
* Calculates the surface's new position required so that the surface's
|
|
* `surfaceCorner` aligns to the anchor's `anchorCorner` while keeping the
|
|
* surface inside the window viewport. This positioning also respects RTL by
|
|
* checking `getComputedStyle()` on the surface element.
|
|
*/
|
|
async position() {
|
|
const { surfaceEl: e, anchorEl: t, anchorCorner: o, surfaceCorner: i, positioning: a, xOffset: s, yOffset: d, disableBlockFlip: h, disableInlineFlip: y, repositionStrategy: v } = this.getProperties(), f = o.toLowerCase().trim(), C = i.toLowerCase().trim();
|
|
if (!e || !t)
|
|
return;
|
|
const w = window.innerWidth, A = window.innerHeight, S = document.createElement("div");
|
|
S.style.opacity = "0", S.style.position = "fixed", S.style.display = "block", S.style.inset = "0", document.body.appendChild(S);
|
|
const I = S.getBoundingClientRect();
|
|
S.remove();
|
|
const O = window.innerHeight - I.bottom, R = window.innerWidth - I.right;
|
|
this.surfaceStylesInternal = {
|
|
display: "block",
|
|
opacity: "0"
|
|
}, this.host.requestUpdate(), await this.host.updateComplete, e.popover && e.isConnected && e.showPopover();
|
|
const B = e.getSurfacePositionClientRect ? e.getSurfacePositionClientRect() : e.getBoundingClientRect(), U = t.getSurfacePositionClientRect ? t.getSurfacePositionClientRect() : t.getBoundingClientRect(), [P, q] = C.split("-"), [D, Oe] = f.split("-"), Fe = getComputedStyle(e).direction === "ltr";
|
|
let { blockInset: ze, blockOutOfBoundsCorrection: Ue, surfaceBlockProperty: st } = this.calculateBlock({
|
|
surfaceRect: B,
|
|
anchorRect: U,
|
|
anchorBlock: D,
|
|
surfaceBlock: P,
|
|
yOffset: d,
|
|
positioning: a,
|
|
windowInnerHeight: A,
|
|
blockScrollbarHeight: O
|
|
});
|
|
if (Ue && !h) {
|
|
const Ke = P === "start" ? "end" : "start", L = D === "start" ? "end" : "start", Se = this.calculateBlock({
|
|
surfaceRect: B,
|
|
anchorRect: U,
|
|
anchorBlock: L,
|
|
surfaceBlock: Ke,
|
|
yOffset: d,
|
|
positioning: a,
|
|
windowInnerHeight: A,
|
|
blockScrollbarHeight: O
|
|
});
|
|
Ue > Se.blockOutOfBoundsCorrection && (ze = Se.blockInset, Ue = Se.blockOutOfBoundsCorrection, st = Se.surfaceBlockProperty);
|
|
}
|
|
let { inlineInset: Ce, inlineOutOfBoundsCorrection: Ee, surfaceInlineProperty: Te } = this.calculateInline({
|
|
surfaceRect: B,
|
|
anchorRect: U,
|
|
anchorInline: Oe,
|
|
surfaceInline: q,
|
|
xOffset: s,
|
|
positioning: a,
|
|
isLTR: Fe,
|
|
windowInnerWidth: w,
|
|
inlineScrollbarWidth: R
|
|
});
|
|
if (Ee && !y) {
|
|
const Ke = q === "start" ? "end" : "start", L = Oe === "start" ? "end" : "start", Se = this.calculateInline({
|
|
surfaceRect: B,
|
|
anchorRect: U,
|
|
anchorInline: L,
|
|
surfaceInline: Ke,
|
|
xOffset: s,
|
|
positioning: a,
|
|
isLTR: Fe,
|
|
windowInnerWidth: w,
|
|
inlineScrollbarWidth: R
|
|
});
|
|
Math.abs(Ee) > Math.abs(Se.inlineOutOfBoundsCorrection) && (Ce = Se.inlineInset, Ee = Se.inlineOutOfBoundsCorrection, Te = Se.surfaceInlineProperty);
|
|
}
|
|
v === "move" && (ze = ze - Ue, Ce = Ce - Ee), this.surfaceStylesInternal = {
|
|
display: "block",
|
|
opacity: "1",
|
|
[st]: `${ze}px`,
|
|
[Te]: `${Ce}px`
|
|
}, v === "resize" && (Ue && (this.surfaceStylesInternal.height = `${B.height - Ue}px`), Ee && (this.surfaceStylesInternal.width = `${B.width - Ee}px`)), this.host.requestUpdate();
|
|
}
|
|
/**
|
|
* Calculates the css property, the inset, and the out of bounds correction
|
|
* for the surface in the block direction.
|
|
*/
|
|
calculateBlock(e) {
|
|
const { surfaceRect: t, anchorRect: o, anchorBlock: i, surfaceBlock: a, yOffset: s, positioning: d, windowInnerHeight: h, blockScrollbarHeight: y } = e, v = d === "fixed" || d === "document" ? 1 : 0, f = d === "document" ? 1 : 0, C = a === "start" ? 1 : 0, w = a === "end" ? 1 : 0, S = (i !== a ? 1 : 0) * o.height + s, I = C * o.top + w * (h - o.bottom - y), O = C * window.scrollY - w * window.scrollY, R = Math.abs(Math.min(0, h - I - S - t.height));
|
|
return { blockInset: v * I + f * O + S, blockOutOfBoundsCorrection: R, surfaceBlockProperty: a === "start" ? "inset-block-start" : "inset-block-end" };
|
|
}
|
|
/**
|
|
* Calculates the css property, the inset, and the out of bounds correction
|
|
* for the surface in the inline direction.
|
|
*/
|
|
calculateInline(e) {
|
|
const { isLTR: t, surfaceInline: o, anchorInline: i, anchorRect: a, surfaceRect: s, xOffset: d, positioning: h, windowInnerWidth: y, inlineScrollbarWidth: v } = e, f = h === "fixed" || h === "document" ? 1 : 0, C = h === "document" ? 1 : 0, w = t ? 1 : 0, A = t ? 0 : 1, S = o === "start" ? 1 : 0, I = o === "end" ? 1 : 0, R = (i !== o ? 1 : 0) * a.width + d, B = S * a.left + I * (y - a.right - v), U = S * (y - a.right - v) + I * a.left, P = w * B + A * U, q = S * window.scrollX - I * window.scrollX, D = I * window.scrollX - S * window.scrollX, Oe = w * q + A * D, Fe = Math.abs(Math.min(0, y - P - R - s.width)), ze = f * P + R + C * Oe;
|
|
let Ue = o === "start" ? "inset-inline-start" : "inset-inline-end";
|
|
return (h === "document" || h === "fixed") && (o === "start" && t || o === "end" && !t ? Ue = "left" : Ue = "right"), {
|
|
inlineInset: ze,
|
|
inlineOutOfBoundsCorrection: Fe,
|
|
surfaceInlineProperty: Ue
|
|
};
|
|
}
|
|
hostUpdate() {
|
|
this.onUpdate();
|
|
}
|
|
hostUpdated() {
|
|
this.onUpdate();
|
|
}
|
|
/**
|
|
* Checks whether the properties passed into the controller have changed since
|
|
* the last positioning. If so, it will reposition if the surface is open or
|
|
* close it if the surface should close.
|
|
*/
|
|
async onUpdate() {
|
|
const e = this.getProperties();
|
|
let t = !1;
|
|
for (const [s, d] of Object.entries(e))
|
|
if (t = t || d !== this.lastValues[s], t)
|
|
break;
|
|
const o = this.lastValues.isOpen !== e.isOpen, i = !!e.anchorEl, a = !!e.surfaceEl;
|
|
t && i && a && (this.lastValues.isOpen = e.isOpen, e.isOpen ? (this.lastValues = e, await this.position(), e.onOpen()) : o && (await e.beforeClose(), this.close(), e.onClose()));
|
|
}
|
|
/**
|
|
* Hides the surface.
|
|
*/
|
|
close() {
|
|
this.surfaceStylesInternal = {
|
|
display: "none"
|
|
}, this.host.requestUpdate();
|
|
const e = this.getProperties().surfaceEl;
|
|
e != null && e.popover && (e != null && e.isConnected) && e.hidePopover();
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const tt = {
|
|
INDEX: 0,
|
|
ITEM: 1,
|
|
TEXT: 2
|
|
};
|
|
class bc {
|
|
/**
|
|
* @param getProperties A function that returns the options of the typeahead
|
|
* controller:
|
|
*
|
|
* {
|
|
* getItems: A function that returns an array of menu items to be searched.
|
|
* typeaheadBufferTime: The maximum time between each keystroke to keep the
|
|
* current type buffer alive.
|
|
* }
|
|
*/
|
|
constructor(e) {
|
|
this.getProperties = e, this.typeaheadRecords = [], this.typaheadBuffer = "", this.cancelTypeaheadTimeout = 0, this.isTypingAhead = !1, this.lastActiveRecord = null, this.onKeydown = (t) => {
|
|
this.isTypingAhead ? this.typeahead(t) : this.beginTypeahead(t);
|
|
}, this.endTypeahead = () => {
|
|
this.isTypingAhead = !1, this.typaheadBuffer = "", this.typeaheadRecords = [];
|
|
};
|
|
}
|
|
get items() {
|
|
return this.getProperties().getItems();
|
|
}
|
|
get active() {
|
|
return this.getProperties().active;
|
|
}
|
|
/**
|
|
* Sets up typingahead
|
|
*/
|
|
beginTypeahead(e) {
|
|
this.active && (e.code === "Space" || e.code === "Enter" || e.code.startsWith("Arrow") || e.code === "Escape" || (this.isTypingAhead = !0, this.typeaheadRecords = this.items.map((t, o) => [
|
|
o,
|
|
t,
|
|
t.typeaheadText.trim().toLowerCase()
|
|
]), this.lastActiveRecord = this.typeaheadRecords.find((t) => t[tt.ITEM].tabIndex === 0) ?? null, this.lastActiveRecord && (this.lastActiveRecord[tt.ITEM].tabIndex = -1), this.typeahead(e)));
|
|
}
|
|
/**
|
|
* Performs the typeahead. Based on the normalized items and the current text
|
|
* buffer, finds the _next_ item with matching text and activates it.
|
|
*
|
|
* @example
|
|
*
|
|
* items: Apple, Banana, Olive, Orange, Cucumber
|
|
* buffer: ''
|
|
* user types: o
|
|
*
|
|
* activates Olive
|
|
*
|
|
* @example
|
|
*
|
|
* items: Apple, Banana, Olive (active), Orange, Cucumber
|
|
* buffer: 'o'
|
|
* user types: l
|
|
*
|
|
* activates Olive
|
|
*
|
|
* @example
|
|
*
|
|
* items: Apple, Banana, Olive (active), Orange, Cucumber
|
|
* buffer: ''
|
|
* user types: o
|
|
*
|
|
* activates Orange
|
|
*
|
|
* @example
|
|
*
|
|
* items: Apple, Banana, Olive, Orange (active), Cucumber
|
|
* buffer: ''
|
|
* user types: o
|
|
*
|
|
* activates Olive
|
|
*/
|
|
typeahead(e) {
|
|
if (e.defaultPrevented)
|
|
return;
|
|
if (clearTimeout(this.cancelTypeaheadTimeout), e.code === "Enter" || e.code.startsWith("Arrow") || e.code === "Escape") {
|
|
this.endTypeahead(), this.lastActiveRecord && (this.lastActiveRecord[tt.ITEM].tabIndex = -1);
|
|
return;
|
|
}
|
|
e.code === "Space" && e.preventDefault(), this.cancelTypeaheadTimeout = setTimeout(this.endTypeahead, this.getProperties().typeaheadBufferTime), this.typaheadBuffer += e.key.toLowerCase();
|
|
const t = this.lastActiveRecord ? this.lastActiveRecord[tt.INDEX] : -1, o = this.typeaheadRecords.length, i = (h) => (h[tt.INDEX] + o - t) % o, a = this.typeaheadRecords.filter((h) => !h[tt.ITEM].disabled && h[tt.TEXT].startsWith(this.typaheadBuffer)).sort((h, y) => i(h) - i(y));
|
|
if (a.length === 0) {
|
|
clearTimeout(this.cancelTypeaheadTimeout), this.lastActiveRecord && (this.lastActiveRecord[tt.ITEM].tabIndex = -1), this.endTypeahead();
|
|
return;
|
|
}
|
|
const s = this.typaheadBuffer.length === 1;
|
|
let d;
|
|
this.lastActiveRecord === a[0] && s ? d = a[1] ?? a[0] : d = a[0], this.lastActiveRecord && (this.lastActiveRecord[tt.ITEM].tabIndex = -1), this.lastActiveRecord = d, d[tt.ITEM].tabIndex = 0, d[tt.ITEM].focus();
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Cs = 200, Es = /* @__PURE__ */ new Set([
|
|
Ne.ArrowDown,
|
|
Ne.ArrowUp,
|
|
Ne.Home,
|
|
Ne.End
|
|
]), yc = /* @__PURE__ */ new Set([
|
|
Ne.ArrowLeft,
|
|
Ne.ArrowRight,
|
|
...Es
|
|
]);
|
|
function gc(r = document) {
|
|
var t;
|
|
let e = r.activeElement;
|
|
for (; e && ((t = e == null ? void 0 : e.shadowRoot) != null && t.activeElement); )
|
|
e = e.shadowRoot.activeElement;
|
|
return e;
|
|
}
|
|
let ke = class extends W {
|
|
/**
|
|
* Whether the menu is animating upwards or downwards when opening. This is
|
|
* helpful for calculating some animation calculations.
|
|
*/
|
|
get openDirection() {
|
|
return this.menuCorner.split("-")[0] === "start" ? "DOWN" : "UP";
|
|
}
|
|
/**
|
|
* The element which the menu should align to. If `anchor` is set to a
|
|
* non-empty idref string, then `anchorEl` will resolve to the element with
|
|
* the given id in the same root node. Otherwise, `null`.
|
|
*/
|
|
get anchorElement() {
|
|
return this.anchor ? this.getRootNode().querySelector(`#${this.anchor}`) : this.currentAnchorElement;
|
|
}
|
|
set anchorElement(e) {
|
|
this.currentAnchorElement = e, this.requestUpdate("anchorElement");
|
|
}
|
|
constructor() {
|
|
super(), this.anchor = "", this.positioning = "absolute", this.quick = !1, this.hasOverflow = !1, this.open = !1, this.xOffset = 0, this.yOffset = 0, this.noHorizontalFlip = !1, this.noVerticalFlip = !1, this.typeaheadDelay = Cs, this.anchorCorner = Uo.END_START, this.menuCorner = Uo.START_START, this.stayOpenOnOutsideClick = !1, this.stayOpenOnFocusout = !1, this.skipRestoreFocus = !1, this.defaultFocus = it.FIRST_ITEM, this.noNavigationWrap = !1, this.typeaheadActive = !0, this.isSubmenu = !1, this.pointerPath = [], this.isRepositioning = !1, this.openCloseAnimationSignal = Ql(), this.listController = new ws({
|
|
isItem: (e) => e.hasAttribute("md-menu-item"),
|
|
getPossibleItems: () => this.slotItems,
|
|
isRtl: () => getComputedStyle(this).direction === "rtl",
|
|
deactivateItem: (e) => {
|
|
e.selected = !1, e.tabIndex = -1;
|
|
},
|
|
activateItem: (e) => {
|
|
e.selected = !0, e.tabIndex = 0;
|
|
},
|
|
isNavigableKey: (e) => {
|
|
if (!this.isSubmenu)
|
|
return yc.has(e);
|
|
const o = getComputedStyle(this).direction === "rtl" ? Ne.ArrowLeft : Ne.ArrowRight;
|
|
return e === o ? !0 : Es.has(e);
|
|
},
|
|
wrapNavigation: () => !this.noNavigationWrap
|
|
}), this.lastFocusedElement = null, this.typeaheadController = new bc(() => ({
|
|
getItems: () => this.items,
|
|
typeaheadBufferTime: this.typeaheadDelay,
|
|
active: this.typeaheadActive
|
|
})), this.currentAnchorElement = null, this.internals = // Cast needed for closure
|
|
this.attachInternals(), this.menuPositionController = new mc(this, () => ({
|
|
anchorCorner: this.anchorCorner,
|
|
surfaceCorner: this.menuCorner,
|
|
surfaceEl: this.surfaceEl,
|
|
anchorEl: this.anchorElement,
|
|
positioning: this.positioning === "popover" ? "document" : this.positioning,
|
|
isOpen: this.open,
|
|
xOffset: this.xOffset,
|
|
yOffset: this.yOffset,
|
|
disableBlockFlip: this.noVerticalFlip,
|
|
disableInlineFlip: this.noHorizontalFlip,
|
|
onOpen: this.onOpened,
|
|
beforeClose: this.beforeClose,
|
|
onClose: this.onClosed,
|
|
// We can't resize components that have overflow like menus with
|
|
// submenus because the overflow-y will show menu items / content
|
|
// outside the bounds of the menu. Popover API fixes this because each
|
|
// submenu is hoisted to the top-layer and are not considered overflow
|
|
// content.
|
|
repositionStrategy: this.hasOverflow && this.positioning !== "popover" ? "move" : "resize"
|
|
})), this.onWindowResize = () => {
|
|
this.isRepositioning || this.positioning !== "document" && this.positioning !== "fixed" && this.positioning !== "popover" || (this.isRepositioning = !0, this.reposition(), this.isRepositioning = !1);
|
|
}, this.handleFocusout = async (e) => {
|
|
const t = this.anchorElement;
|
|
if (this.stayOpenOnFocusout || !this.open || this.pointerPath.includes(t))
|
|
return;
|
|
if (e.relatedTarget) {
|
|
if (_a(e.relatedTarget, this) || this.pointerPath.length !== 0 && _a(e.relatedTarget, t))
|
|
return;
|
|
} else if (this.pointerPath.includes(this))
|
|
return;
|
|
const o = this.skipRestoreFocus;
|
|
this.skipRestoreFocus = !0, this.close(), await this.updateComplete, this.skipRestoreFocus = o;
|
|
}, this.onOpened = async () => {
|
|
this.lastFocusedElement = gc();
|
|
const e = this.items, t = ar(e);
|
|
t && this.defaultFocus !== it.NONE && (t.item.tabIndex = -1);
|
|
let o = !this.quick;
|
|
switch (this.quick ? this.dispatchEvent(new Event("opening")) : o = !!await this.animateOpen(), this.defaultFocus) {
|
|
case it.FIRST_ITEM:
|
|
const i = gi(e);
|
|
i && (i.tabIndex = 0, i.focus(), await i.updateComplete);
|
|
break;
|
|
case it.LAST_ITEM:
|
|
const a = xs(e);
|
|
a && (a.tabIndex = 0, a.focus(), await a.updateComplete);
|
|
break;
|
|
case it.LIST_ROOT:
|
|
this.focus();
|
|
break;
|
|
default:
|
|
case it.NONE:
|
|
break;
|
|
}
|
|
o || this.dispatchEvent(new Event("opened"));
|
|
}, this.beforeClose = async () => {
|
|
var e, t;
|
|
this.open = !1, this.skipRestoreFocus || (t = (e = this.lastFocusedElement) == null ? void 0 : e.focus) == null || t.call(e), this.quick || await this.animateClose();
|
|
}, this.onClosed = () => {
|
|
this.quick && (this.dispatchEvent(new Event("closing")), this.dispatchEvent(new Event("closed")));
|
|
}, this.onWindowPointerdown = (e) => {
|
|
this.pointerPath = e.composedPath();
|
|
}, this.onDocumentClick = (e) => {
|
|
if (!this.open)
|
|
return;
|
|
const t = e.composedPath();
|
|
!this.stayOpenOnOutsideClick && !t.includes(this) && !t.includes(this.anchorElement) && (this.open = !1);
|
|
}, this.internals.role = "menu", this.addEventListener("keydown", this.handleKeydown), this.addEventListener("keydown", this.captureKeydown, { capture: !0 }), this.addEventListener("focusout", this.handleFocusout);
|
|
}
|
|
/**
|
|
* The menu items associated with this menu. The items must be `MenuItem`s and
|
|
* have both the `md-menu-item` and `md-list-item` attributes.
|
|
*/
|
|
get items() {
|
|
return this.listController.items;
|
|
}
|
|
willUpdate(e) {
|
|
if (e.has("open")) {
|
|
if (this.open) {
|
|
this.removeAttribute("aria-hidden");
|
|
return;
|
|
}
|
|
this.setAttribute("aria-hidden", "true");
|
|
}
|
|
}
|
|
update(e) {
|
|
e.has("open") && (this.open ? this.setUpGlobalEventListeners() : this.cleanUpGlobalEventListeners()), e.has("positioning") && this.positioning === "popover" && // type required for Google JS conformance
|
|
!this.showPopover && (this.positioning = "fixed"), super.update(e);
|
|
}
|
|
connectedCallback() {
|
|
super.connectedCallback(), this.open && this.setUpGlobalEventListeners();
|
|
}
|
|
disconnectedCallback() {
|
|
super.disconnectedCallback(), this.cleanUpGlobalEventListeners();
|
|
}
|
|
getBoundingClientRect() {
|
|
return this.surfaceEl ? this.surfaceEl.getBoundingClientRect() : super.getBoundingClientRect();
|
|
}
|
|
getClientRects() {
|
|
return this.surfaceEl ? this.surfaceEl.getClientRects() : super.getClientRects();
|
|
}
|
|
render() {
|
|
return this.renderSurface();
|
|
}
|
|
/**
|
|
* Renders the positionable surface element and its contents.
|
|
*/
|
|
renderSurface() {
|
|
return _`
|
|
<div
|
|
class="menu ${ye(this.getSurfaceClasses())}"
|
|
style=${qt(this.menuPositionController.surfaceStyles)}
|
|
popover=${this.positioning === "popover" ? "manual" : x}>
|
|
${this.renderElevation()}
|
|
<div class="items">
|
|
<div class="item-padding"> ${this.renderMenuItems()} </div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
}
|
|
/**
|
|
* Renders the menu items' slot
|
|
*/
|
|
renderMenuItems() {
|
|
return _`<slot
|
|
@close-menu=${this.onCloseMenu}
|
|
@deactivate-items=${this.onDeactivateItems}
|
|
@request-activation=${this.onRequestActivation}
|
|
@deactivate-typeahead=${this.handleDeactivateTypeahead}
|
|
@activate-typeahead=${this.handleActivateTypeahead}
|
|
@stay-open-on-focusout=${this.handleStayOpenOnFocusout}
|
|
@close-on-focusout=${this.handleCloseOnFocusout}
|
|
@slotchange=${this.listController.onSlotchange}></slot>`;
|
|
}
|
|
/**
|
|
* Renders the elevation component.
|
|
*/
|
|
renderElevation() {
|
|
return _`<md-elevation part="elevation"></md-elevation>`;
|
|
}
|
|
getSurfaceClasses() {
|
|
return {
|
|
open: this.open,
|
|
fixed: this.positioning === "fixed",
|
|
"has-overflow": this.hasOverflow
|
|
};
|
|
}
|
|
captureKeydown(e) {
|
|
e.target === this && !e.defaultPrevented && ks(e.code) && (e.preventDefault(), this.close()), this.typeaheadController.onKeydown(e);
|
|
}
|
|
/**
|
|
* Performs the opening animation:
|
|
*
|
|
* https://direct.googleplex.com/#/spec/295000003+271060003
|
|
*
|
|
* @return A promise that resolve to `true` if the animation was aborted,
|
|
* `false` if it was not aborted.
|
|
*/
|
|
async animateOpen() {
|
|
const e = this.surfaceEl, t = this.slotEl;
|
|
if (!e || !t)
|
|
return !0;
|
|
const o = this.openDirection;
|
|
this.dispatchEvent(new Event("opening")), e.classList.toggle("animating", !0);
|
|
const i = this.openCloseAnimationSignal.start(), a = e.offsetHeight, s = o === "UP", d = this.items, h = 500, y = 50, v = 250, f = (h - v) / d.length, C = e.animate([{ height: "0px" }, { height: `${a}px` }], {
|
|
duration: h,
|
|
easing: at.EMPHASIZED
|
|
}), w = t.animate([
|
|
{ transform: s ? `translateY(-${a}px)` : "" },
|
|
{ transform: "" }
|
|
], { duration: h, easing: at.EMPHASIZED }), A = e.animate([{ opacity: 0 }, { opacity: 1 }], y), S = [];
|
|
for (let R = 0; R < d.length; R++) {
|
|
const B = s ? d.length - 1 - R : R, U = d[B], P = U.animate([{ opacity: 0 }, { opacity: 1 }], {
|
|
duration: v,
|
|
delay: f * R
|
|
});
|
|
U.classList.toggle("md-menu-hidden", !0), P.addEventListener("finish", () => {
|
|
U.classList.toggle("md-menu-hidden", !1);
|
|
}), S.push([U, P]);
|
|
}
|
|
let I = (R) => {
|
|
};
|
|
const O = new Promise((R) => {
|
|
I = R;
|
|
});
|
|
return i.addEventListener("abort", () => {
|
|
C.cancel(), w.cancel(), A.cancel(), S.forEach(([R, B]) => {
|
|
R.classList.toggle("md-menu-hidden", !1), B.cancel();
|
|
}), I(!0);
|
|
}), C.addEventListener("finish", () => {
|
|
e.classList.toggle("animating", !1), this.openCloseAnimationSignal.finish(), I(!1);
|
|
}), await O;
|
|
}
|
|
/**
|
|
* Performs the closing animation:
|
|
*
|
|
* https://direct.googleplex.com/#/spec/295000003+271060003
|
|
*/
|
|
animateClose() {
|
|
let e;
|
|
const t = new Promise((P) => {
|
|
e = P;
|
|
}), o = this.surfaceEl, i = this.slotEl;
|
|
if (!o || !i)
|
|
return e(!1), t;
|
|
const s = this.openDirection === "UP";
|
|
this.dispatchEvent(new Event("closing")), o.classList.toggle("animating", !0);
|
|
const d = this.openCloseAnimationSignal.start(), h = o.offsetHeight, y = this.items, v = 150, f = 50, C = v - f, w = 50, A = 50, S = 0.35, I = (v - A - w) / y.length, O = o.animate([
|
|
{ height: `${h}px` },
|
|
{ height: `${h * S}px` }
|
|
], {
|
|
duration: v,
|
|
easing: at.EMPHASIZED_ACCELERATE
|
|
}), R = i.animate([
|
|
{ transform: "" },
|
|
{
|
|
transform: s ? `translateY(-${h * (1 - S)}px)` : ""
|
|
}
|
|
], { duration: v, easing: at.EMPHASIZED_ACCELERATE }), B = o.animate([{ opacity: 1 }, { opacity: 0 }], { duration: f, delay: C }), U = [];
|
|
for (let P = 0; P < y.length; P++) {
|
|
const q = s ? P : y.length - 1 - P, D = y[q], Oe = D.animate([{ opacity: 1 }, { opacity: 0 }], {
|
|
duration: w,
|
|
delay: A + I * P
|
|
});
|
|
Oe.addEventListener("finish", () => {
|
|
D.classList.toggle("md-menu-hidden", !0);
|
|
}), U.push([D, Oe]);
|
|
}
|
|
return d.addEventListener("abort", () => {
|
|
O.cancel(), R.cancel(), B.cancel(), U.forEach(([P, q]) => {
|
|
q.cancel(), P.classList.toggle("md-menu-hidden", !1);
|
|
}), e(!1);
|
|
}), O.addEventListener("finish", () => {
|
|
o.classList.toggle("animating", !1), U.forEach(([P]) => {
|
|
P.classList.toggle("md-menu-hidden", !1);
|
|
}), this.openCloseAnimationSignal.finish(), this.dispatchEvent(new Event("closed")), e(!0);
|
|
}), t;
|
|
}
|
|
handleKeydown(e) {
|
|
this.pointerPath = [], this.listController.handleKeydown(e);
|
|
}
|
|
setUpGlobalEventListeners() {
|
|
document.addEventListener("click", this.onDocumentClick, { capture: !0 }), window.addEventListener("pointerdown", this.onWindowPointerdown), document.addEventListener("resize", this.onWindowResize, { passive: !0 }), window.addEventListener("resize", this.onWindowResize, { passive: !0 });
|
|
}
|
|
cleanUpGlobalEventListeners() {
|
|
document.removeEventListener("click", this.onDocumentClick, {
|
|
capture: !0
|
|
}), window.removeEventListener("pointerdown", this.onWindowPointerdown), document.removeEventListener("resize", this.onWindowResize), window.removeEventListener("resize", this.onWindowResize);
|
|
}
|
|
onCloseMenu() {
|
|
this.close();
|
|
}
|
|
onDeactivateItems(e) {
|
|
e.stopPropagation(), this.listController.onDeactivateItems();
|
|
}
|
|
onRequestActivation(e) {
|
|
e.stopPropagation(), this.listController.onRequestActivation(e);
|
|
}
|
|
handleDeactivateTypeahead(e) {
|
|
e.stopPropagation(), this.typeaheadActive = !1;
|
|
}
|
|
handleActivateTypeahead(e) {
|
|
e.stopPropagation(), this.typeaheadActive = !0;
|
|
}
|
|
handleStayOpenOnFocusout(e) {
|
|
e.stopPropagation(), this.stayOpenOnFocusout = !0;
|
|
}
|
|
handleCloseOnFocusout(e) {
|
|
e.stopPropagation(), this.stayOpenOnFocusout = !1;
|
|
}
|
|
close() {
|
|
this.open = !1, this.slotItems.forEach((t) => {
|
|
var o;
|
|
(o = t.close) == null || o.call(t);
|
|
});
|
|
}
|
|
show() {
|
|
this.open = !0;
|
|
}
|
|
/**
|
|
* Activates the next item in the menu. If at the end of the menu, the first
|
|
* item will be activated.
|
|
*
|
|
* @return The activated menu item or `null` if there are no items.
|
|
*/
|
|
activateNextItem() {
|
|
return this.listController.activateNextItem() ?? null;
|
|
}
|
|
/**
|
|
* Activates the previous item in the menu. If at the start of the menu, the
|
|
* last item will be activated.
|
|
*
|
|
* @return The activated menu item or `null` if there are no items.
|
|
*/
|
|
activatePreviousItem() {
|
|
return this.listController.activatePreviousItem() ?? null;
|
|
}
|
|
/**
|
|
* Repositions the menu if it is open.
|
|
*
|
|
* Useful for the case where document or window-positioned menus have their
|
|
* anchors moved while open.
|
|
*/
|
|
reposition() {
|
|
this.open && this.menuPositionController.position();
|
|
}
|
|
};
|
|
l([
|
|
G(".menu")
|
|
], ke.prototype, "surfaceEl", void 0);
|
|
l([
|
|
G("slot")
|
|
], ke.prototype, "slotEl", void 0);
|
|
l([
|
|
p()
|
|
], ke.prototype, "anchor", void 0);
|
|
l([
|
|
p()
|
|
], ke.prototype, "positioning", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], ke.prototype, "quick", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "has-overflow" })
|
|
], ke.prototype, "hasOverflow", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], ke.prototype, "open", void 0);
|
|
l([
|
|
p({ type: Number, attribute: "x-offset" })
|
|
], ke.prototype, "xOffset", void 0);
|
|
l([
|
|
p({ type: Number, attribute: "y-offset" })
|
|
], ke.prototype, "yOffset", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "no-horizontal-flip" })
|
|
], ke.prototype, "noHorizontalFlip", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "no-vertical-flip" })
|
|
], ke.prototype, "noVerticalFlip", void 0);
|
|
l([
|
|
p({ type: Number, attribute: "typeahead-delay" })
|
|
], ke.prototype, "typeaheadDelay", void 0);
|
|
l([
|
|
p({ attribute: "anchor-corner" })
|
|
], ke.prototype, "anchorCorner", void 0);
|
|
l([
|
|
p({ attribute: "menu-corner" })
|
|
], ke.prototype, "menuCorner", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "stay-open-on-outside-click" })
|
|
], ke.prototype, "stayOpenOnOutsideClick", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "stay-open-on-focusout" })
|
|
], ke.prototype, "stayOpenOnFocusout", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "skip-restore-focus" })
|
|
], ke.prototype, "skipRestoreFocus", void 0);
|
|
l([
|
|
p({ attribute: "default-focus" })
|
|
], ke.prototype, "defaultFocus", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "no-navigation-wrap" })
|
|
], ke.prototype, "noNavigationWrap", void 0);
|
|
l([
|
|
We({ flatten: !0 })
|
|
], ke.prototype, "slotItems", void 0);
|
|
l([
|
|
se()
|
|
], ke.prototype, "typeaheadActive", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const xc = F`:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px))}.menu{border-radius:var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px));display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);color:inherit;opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit;scrollbar-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit;scrollbar-width:inherit}.item-padding{padding-block:8px}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Vo = class extends ke {
|
|
};
|
|
Vo.styles = [xc];
|
|
Vo = l([
|
|
H("md-menu")
|
|
], Vo);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class _c extends bi {
|
|
computeValidity(e) {
|
|
return this.selectControl || (this.selectControl = document.createElement("select")), za(_`<option value=${e.value}></option>`, this.selectControl), this.selectControl.value = e.value, this.selectControl.required = e.required, {
|
|
validity: this.selectControl.validity,
|
|
validationMessage: this.selectControl.validationMessage
|
|
};
|
|
}
|
|
equals(e, t) {
|
|
return e.value === t.value && e.required === t.required;
|
|
}
|
|
copy({ value: e, required: t }) {
|
|
return { value: e, required: t };
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function wc(r) {
|
|
const e = [];
|
|
for (let t = 0; t < r.length; t++) {
|
|
const o = r[t];
|
|
o.selected && e.push([o, t]);
|
|
}
|
|
return e;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
var jn;
|
|
const wo = Symbol("value"), kc = Je(us(Mr(cr(Rt(W)))));
|
|
let fe = class extends kc {
|
|
/**
|
|
* The value of the currently selected option.
|
|
*
|
|
* Note: For SSR, set `[selected]` on the requested option and `displayText`
|
|
* rather than setting `value` setting `value` will incur a DOM query.
|
|
*/
|
|
get value() {
|
|
return this[wo];
|
|
}
|
|
set value(e) {
|
|
this.lastUserSetValue = e, this.select(e);
|
|
}
|
|
get options() {
|
|
var e;
|
|
return ((e = this.menu) == null ? void 0 : e.items) ?? [];
|
|
}
|
|
/**
|
|
* The index of the currently selected option.
|
|
*
|
|
* Note: For SSR, set `[selected]` on the requested option and `displayText`
|
|
* rather than setting `selectedIndex` setting `selectedIndex` will incur a
|
|
* DOM query.
|
|
*/
|
|
get selectedIndex() {
|
|
const [e, t] = (this.getSelectedOptions() ?? [])[0] ?? [];
|
|
return t ?? -1;
|
|
}
|
|
set selectedIndex(e) {
|
|
this.lastUserSetSelectedIndex = e, this.selectIndex(e);
|
|
}
|
|
/**
|
|
* Returns an array of selected options.
|
|
*
|
|
* NOTE: md-select only supports single selection.
|
|
*/
|
|
get selectedOptions() {
|
|
return (this.getSelectedOptions() ?? []).map(([e]) => e);
|
|
}
|
|
get hasError() {
|
|
return this.error || this.nativeError;
|
|
}
|
|
constructor() {
|
|
super(), this.quick = !1, this.required = !1, this.errorText = "", this.label = "", this.noAsterisk = !1, this.supportingText = "", this.error = !1, this.menuPositioning = "popover", this.clampMenuWidth = !1, this.typeaheadDelay = Cs, this.hasLeadingIcon = !1, this.displayText = "", this.menuAlign = "start", this[jn] = "", this.lastUserSetValue = null, this.lastUserSetSelectedIndex = null, this.lastSelectedOption = null, this.lastSelectedOptionRecords = [], this.nativeError = !1, this.nativeErrorText = "", this.focused = !1, this.open = !1, this.defaultFocus = it.NONE, this.prevOpen = this.open, this.selectWidth = 0, this.addEventListener("focus", this.handleFocus.bind(this)), this.addEventListener("blur", this.handleBlur.bind(this));
|
|
}
|
|
/**
|
|
* Selects an option given the value of the option, and updates MdSelect's
|
|
* value.
|
|
*/
|
|
select(e) {
|
|
const t = this.options.find((o) => o.value === e);
|
|
t && this.selectItem(t);
|
|
}
|
|
/**
|
|
* Selects an option given the index of the option, and updates MdSelect's
|
|
* value.
|
|
*/
|
|
selectIndex(e) {
|
|
const t = this.options[e];
|
|
t && this.selectItem(t);
|
|
}
|
|
/**
|
|
* Reset the select to its default value.
|
|
*/
|
|
reset() {
|
|
for (const e of this.options)
|
|
e.selected = e.hasAttribute("selected");
|
|
this.updateValueAndDisplayText(), this.nativeError = !1, this.nativeErrorText = "";
|
|
}
|
|
[(jn = wo, Oo)](e) {
|
|
var o;
|
|
e == null || e.preventDefault();
|
|
const t = this.getErrorText();
|
|
this.nativeError = !!e, this.nativeErrorText = this.validationMessage, t === this.getErrorText() && ((o = this.field) == null || o.reannounceError());
|
|
}
|
|
update(e) {
|
|
if (this.hasUpdated || this.initUserSelection(), this.prevOpen !== this.open && this.open) {
|
|
const t = this.getBoundingClientRect();
|
|
this.selectWidth = t.width;
|
|
}
|
|
this.prevOpen = this.open, super.update(e);
|
|
}
|
|
render() {
|
|
return _`
|
|
<span
|
|
class="select ${ye(this.getRenderClasses())}"
|
|
@focusout=${this.handleFocusout}>
|
|
${this.renderField()} ${this.renderMenu()}
|
|
</span>
|
|
`;
|
|
}
|
|
async firstUpdated(e) {
|
|
var t;
|
|
await ((t = this.menu) == null ? void 0 : t.updateComplete), this.lastSelectedOptionRecords.length || this.initUserSelection(), !this.lastSelectedOptionRecords.length && !Jl && !this.options.length && setTimeout(() => {
|
|
this.updateValueAndDisplayText();
|
|
}), super.firstUpdated(e);
|
|
}
|
|
getRenderClasses() {
|
|
return {
|
|
disabled: this.disabled,
|
|
error: this.error,
|
|
open: this.open
|
|
};
|
|
}
|
|
renderField() {
|
|
return Fr`
|
|
<${this.fieldTag}
|
|
aria-haspopup="listbox"
|
|
role="combobox"
|
|
part="field"
|
|
id="field"
|
|
tabindex=${this.disabled ? "-1" : "0"}
|
|
aria-label=${this.ariaLabel || x}
|
|
aria-describedby="description"
|
|
aria-expanded=${this.open ? "true" : "false"}
|
|
aria-controls="listbox"
|
|
class="field"
|
|
label=${this.label}
|
|
?no-asterisk=${this.noAsterisk}
|
|
.focused=${this.focused || this.open}
|
|
.populated=${!!this.displayText}
|
|
.disabled=${this.disabled}
|
|
.required=${this.required}
|
|
.error=${this.hasError}
|
|
?has-start=${this.hasLeadingIcon}
|
|
has-end
|
|
supporting-text=${this.supportingText}
|
|
error-text=${this.getErrorText()}
|
|
@keydown=${this.handleKeydown}
|
|
@click=${this.handleClick}>
|
|
${this.renderFieldContent()}
|
|
<div id="description" slot="aria-describedby"></div>
|
|
</${this.fieldTag}>`;
|
|
}
|
|
renderFieldContent() {
|
|
return [
|
|
this.renderLeadingIcon(),
|
|
this.renderLabel(),
|
|
this.renderTrailingIcon()
|
|
];
|
|
}
|
|
renderLeadingIcon() {
|
|
return _`
|
|
<span class="icon leading" slot="start">
|
|
<slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
|
|
</span>
|
|
`;
|
|
}
|
|
renderTrailingIcon() {
|
|
return _`
|
|
<span class="icon trailing" slot="end">
|
|
<slot name="trailing-icon" @slotchange=${this.handleIconChange}>
|
|
<svg height="5" viewBox="7 10 10 5" focusable="false">
|
|
<polygon
|
|
class="down"
|
|
stroke="none"
|
|
fill-rule="evenodd"
|
|
points="7 10 12 15 17 10"></polygon>
|
|
<polygon
|
|
class="up"
|
|
stroke="none"
|
|
fill-rule="evenodd"
|
|
points="7 15 12 10 17 15"></polygon>
|
|
</svg>
|
|
</slot>
|
|
</span>
|
|
`;
|
|
}
|
|
renderLabel() {
|
|
return _`<div id="label">${this.displayText || _` `}</div>`;
|
|
}
|
|
renderMenu() {
|
|
const e = this.label || this.ariaLabel;
|
|
return _`<div class="menu-wrapper">
|
|
<md-menu
|
|
id="listbox"
|
|
.defaultFocus=${this.defaultFocus}
|
|
role="listbox"
|
|
tabindex="-1"
|
|
aria-label=${e || x}
|
|
stay-open-on-focusout
|
|
part="menu"
|
|
exportparts="focus-ring: menu-focus-ring"
|
|
anchor="field"
|
|
style=${qt({
|
|
"--__menu-min-width": `${this.selectWidth}px`,
|
|
"--__menu-max-width": this.clampMenuWidth ? `${this.selectWidth}px` : void 0
|
|
})}
|
|
no-navigation-wrap
|
|
.open=${this.open}
|
|
.quick=${this.quick}
|
|
.positioning=${this.menuPositioning}
|
|
.typeaheadDelay=${this.typeaheadDelay}
|
|
.anchorCorner=${this.menuAlign === "start" ? "end-start" : "end-end"}
|
|
.menuCorner=${this.menuAlign === "start" ? "start-start" : "start-end"}
|
|
@opening=${this.handleOpening}
|
|
@opened=${this.redispatchEvent}
|
|
@closing=${this.redispatchEvent}
|
|
@closed=${this.handleClosed}
|
|
@close-menu=${this.handleCloseMenu}
|
|
@request-selection=${this.handleRequestSelection}
|
|
@request-deselection=${this.handleRequestDeselection}>
|
|
${this.renderMenuContent()}
|
|
</md-menu>
|
|
</div>`;
|
|
}
|
|
renderMenuContent() {
|
|
return _`<slot></slot>`;
|
|
}
|
|
/**
|
|
* Handles opening the select on keydown and typahead selection when the menu
|
|
* is closed.
|
|
*/
|
|
handleKeydown(e) {
|
|
var a, s;
|
|
if (this.open || this.disabled || !this.menu)
|
|
return;
|
|
const t = this.menu.typeaheadController, o = e.code === "Space" || e.code === "ArrowDown" || e.code === "ArrowUp" || e.code === "End" || e.code === "Home" || e.code === "Enter";
|
|
if (!t.isTypingAhead && o) {
|
|
switch (e.preventDefault(), this.open = !0, e.code) {
|
|
case "Space":
|
|
case "ArrowDown":
|
|
case "Enter":
|
|
this.defaultFocus = it.NONE;
|
|
break;
|
|
case "End":
|
|
this.defaultFocus = it.LAST_ITEM;
|
|
break;
|
|
case "ArrowUp":
|
|
case "Home":
|
|
this.defaultFocus = it.FIRST_ITEM;
|
|
break;
|
|
}
|
|
return;
|
|
}
|
|
if (e.key.length === 1) {
|
|
t.onKeydown(e), e.preventDefault();
|
|
const { lastActiveRecord: d } = t;
|
|
if (!d)
|
|
return;
|
|
(s = (a = this.labelEl) == null ? void 0 : a.setAttribute) == null || s.call(a, "aria-live", "polite"), this.selectItem(d[tt.ITEM]) && this.dispatchInteractionEvents();
|
|
}
|
|
}
|
|
handleClick() {
|
|
this.open = !this.open;
|
|
}
|
|
handleFocus() {
|
|
this.focused = !0;
|
|
}
|
|
handleBlur() {
|
|
this.focused = !1;
|
|
}
|
|
/**
|
|
* Handles closing the menu when the focus leaves the select's subtree.
|
|
*/
|
|
handleFocusout(e) {
|
|
e.relatedTarget && _a(e.relatedTarget, this) || (this.open = !1);
|
|
}
|
|
/**
|
|
* Gets a list of all selected select options as a list item record array.
|
|
*
|
|
* @return An array of selected list option records.
|
|
*/
|
|
getSelectedOptions() {
|
|
if (!this.menu)
|
|
return this.lastSelectedOptionRecords = [], null;
|
|
const e = this.menu.items;
|
|
return this.lastSelectedOptionRecords = wc(e), this.lastSelectedOptionRecords;
|
|
}
|
|
async getUpdateComplete() {
|
|
var e;
|
|
return await ((e = this.menu) == null ? void 0 : e.updateComplete), super.getUpdateComplete();
|
|
}
|
|
/**
|
|
* Gets the selected options from the DOM, and updates the value and display
|
|
* text to the first selected option's value and headline respectively.
|
|
*
|
|
* @return Whether or not the selected option has changed since last update.
|
|
*/
|
|
updateValueAndDisplayText() {
|
|
const e = this.getSelectedOptions() ?? [];
|
|
let t = !1;
|
|
if (e.length) {
|
|
const [o] = e[0];
|
|
t = this.lastSelectedOption !== o, this.lastSelectedOption = o, this[wo] = o.value, this.displayText = o.displayText;
|
|
} else
|
|
t = this.lastSelectedOption !== null, this.lastSelectedOption = null, this[wo] = "", this.displayText = "";
|
|
return t;
|
|
}
|
|
/**
|
|
* Focuses and activates the last selected item upon opening, and resets other
|
|
* active items.
|
|
*/
|
|
async handleOpening(e) {
|
|
var a, s, d;
|
|
if ((s = (a = this.labelEl) == null ? void 0 : a.removeAttribute) == null || s.call(a, "aria-live"), this.redispatchEvent(e), this.defaultFocus !== it.NONE)
|
|
return;
|
|
const t = this.menu.items, o = (d = ar(t)) == null ? void 0 : d.item;
|
|
let [i] = this.lastSelectedOptionRecords[0] ?? [null];
|
|
o && o !== i && (o.tabIndex = -1), i = i ?? t[0], i && (i.tabIndex = 0, i.focus());
|
|
}
|
|
redispatchEvent(e) {
|
|
At(this, e);
|
|
}
|
|
handleClosed(e) {
|
|
this.open = !1, this.redispatchEvent(e);
|
|
}
|
|
/**
|
|
* Determines the reason for closing, and updates the UI accordingly.
|
|
*/
|
|
handleCloseMenu(e) {
|
|
const t = e.detail.reason, o = e.detail.itemPath[0];
|
|
this.open = !1;
|
|
let i = !1;
|
|
t.kind === "click-selection" ? i = this.selectItem(o) : t.kind === "keydown" && vc(t.key) ? i = this.selectItem(o) : (o.tabIndex = -1, o.blur()), i && this.dispatchInteractionEvents();
|
|
}
|
|
/**
|
|
* Selects a given option, deselects other options, and updates the UI.
|
|
*
|
|
* @return Whether the last selected option has changed.
|
|
*/
|
|
selectItem(e) {
|
|
return (this.getSelectedOptions() ?? []).forEach(([o]) => {
|
|
e !== o && (o.selected = !1);
|
|
}), e.selected = !0, this.updateValueAndDisplayText();
|
|
}
|
|
/**
|
|
* Handles updating selection when an option element requests selection via
|
|
* property / attribute change.
|
|
*/
|
|
handleRequestSelection(e) {
|
|
const t = e.target;
|
|
this.lastSelectedOptionRecords.some(([o]) => o === t) || this.selectItem(t);
|
|
}
|
|
/**
|
|
* Handles updating selection when an option element requests deselection via
|
|
* property / attribute change.
|
|
*/
|
|
handleRequestDeselection(e) {
|
|
const t = e.target;
|
|
this.lastSelectedOptionRecords.some(([o]) => o === t) && this.updateValueAndDisplayText();
|
|
}
|
|
/**
|
|
* Attempts to initialize the selected option from user-settable values like
|
|
* SSR, setting `value`, or `selectedIndex` at startup.
|
|
*/
|
|
initUserSelection() {
|
|
this.lastUserSetValue && !this.lastSelectedOptionRecords.length ? this.select(this.lastUserSetValue) : this.lastUserSetSelectedIndex !== null && !this.lastSelectedOptionRecords.length ? this.selectIndex(this.lastUserSetSelectedIndex) : this.updateValueAndDisplayText();
|
|
}
|
|
handleIconChange() {
|
|
this.hasLeadingIcon = this.leadingIcons.length > 0;
|
|
}
|
|
/**
|
|
* Dispatches the `input` and `change` events.
|
|
*/
|
|
dispatchInteractionEvents() {
|
|
this.dispatchEvent(new Event("input", { bubbles: !0, composed: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
}
|
|
getErrorText() {
|
|
return this.error ? this.errorText : this.nativeErrorText;
|
|
}
|
|
[yt]() {
|
|
return this.value;
|
|
}
|
|
formResetCallback() {
|
|
this.reset();
|
|
}
|
|
formStateRestoreCallback(e) {
|
|
this.value = e;
|
|
}
|
|
click() {
|
|
var e;
|
|
(e = this.field) == null || e.click();
|
|
}
|
|
[Wt]() {
|
|
return new _c(() => this);
|
|
}
|
|
[Kt]() {
|
|
return this.field;
|
|
}
|
|
};
|
|
fe.shadowRootOptions = {
|
|
...W.shadowRootOptions,
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ type: Boolean })
|
|
], fe.prototype, "quick", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], fe.prototype, "required", void 0);
|
|
l([
|
|
p({ type: String, attribute: "error-text" })
|
|
], fe.prototype, "errorText", void 0);
|
|
l([
|
|
p()
|
|
], fe.prototype, "label", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "no-asterisk" })
|
|
], fe.prototype, "noAsterisk", void 0);
|
|
l([
|
|
p({ type: String, attribute: "supporting-text" })
|
|
], fe.prototype, "supportingText", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], fe.prototype, "error", void 0);
|
|
l([
|
|
p({ attribute: "menu-positioning" })
|
|
], fe.prototype, "menuPositioning", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "clamp-menu-width" })
|
|
], fe.prototype, "clampMenuWidth", void 0);
|
|
l([
|
|
p({ type: Number, attribute: "typeahead-delay" })
|
|
], fe.prototype, "typeaheadDelay", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "has-leading-icon" })
|
|
], fe.prototype, "hasLeadingIcon", void 0);
|
|
l([
|
|
p({ attribute: "display-text" })
|
|
], fe.prototype, "displayText", void 0);
|
|
l([
|
|
p({ attribute: "menu-align" })
|
|
], fe.prototype, "menuAlign", void 0);
|
|
l([
|
|
p()
|
|
], fe.prototype, "value", null);
|
|
l([
|
|
p({ type: Number, attribute: "selected-index" })
|
|
], fe.prototype, "selectedIndex", null);
|
|
l([
|
|
se()
|
|
], fe.prototype, "nativeError", void 0);
|
|
l([
|
|
se()
|
|
], fe.prototype, "nativeErrorText", void 0);
|
|
l([
|
|
se()
|
|
], fe.prototype, "focused", void 0);
|
|
l([
|
|
se()
|
|
], fe.prototype, "open", void 0);
|
|
l([
|
|
se()
|
|
], fe.prototype, "defaultFocus", void 0);
|
|
l([
|
|
G(".field")
|
|
], fe.prototype, "field", void 0);
|
|
l([
|
|
G("md-menu")
|
|
], fe.prototype, "menu", void 0);
|
|
l([
|
|
G("#label")
|
|
], fe.prototype, "labelEl", void 0);
|
|
l([
|
|
We({ slot: "leading-icon", flatten: !0 })
|
|
], fe.prototype, "leadingIcons", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class Cc extends fe {
|
|
constructor() {
|
|
super(...arguments), this.fieldTag = Xe`md-filled-field`;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ec = F`:host{--_text-field-active-indicator-color: var(--md-filled-select-text-field-active-indicator-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-active-indicator-height: var(--md-filled-select-text-field-active-indicator-height, 1px);--_text-field-container-color: var(--md-filled-select-text-field-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_text-field-disabled-active-indicator-color: var(--md-filled-select-text-field-disabled-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-active-indicator-height: var(--md-filled-select-text-field-disabled-active-indicator-height, 1px);--_text-field-disabled-active-indicator-opacity: var(--md-filled-select-text-field-disabled-active-indicator-opacity, 0.38);--_text-field-disabled-container-color: var(--md-filled-select-text-field-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-container-opacity: var(--md-filled-select-text-field-disabled-container-opacity, 0.04);--_text-field-disabled-input-text-color: var(--md-filled-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-filled-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-filled-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-filled-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-filled-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-filled-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-supporting-text-color: var(--md-filled-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-filled-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-filled-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-filled-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-active-indicator-color: var(--md-filled-select-text-field-error-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-active-indicator-color: var(--md-filled-select-text-field-error-focus-active-indicator-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-input-text-color: var(--md-filled-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-filled-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-filled-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-supporting-text-color: var(--md-filled-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-filled-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-active-indicator-color: var(--md-filled-select-text-field-error-hover-active-indicator-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-input-text-color: var(--md-filled-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-filled-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-filled-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-state-layer-color: var(--md-filled-select-text-field-error-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-state-layer-opacity: var(--md-filled-select-text-field-error-hover-state-layer-opacity, 0.08);--_text-field-error-hover-supporting-text-color: var(--md-filled-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-filled-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-filled-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-filled-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-filled-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-supporting-text-color: var(--md-filled-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-filled-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-active-indicator-color: var(--md-filled-select-text-field-focus-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-active-indicator-height: var(--md-filled-select-text-field-focus-active-indicator-height, 3px);--_text-field-focus-input-text-color: var(--md-filled-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-filled-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-filled-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-supporting-text-color: var(--md-filled-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-filled-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-active-indicator-color: var(--md-filled-select-text-field-hover-active-indicator-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-active-indicator-height: var(--md-filled-select-text-field-hover-active-indicator-height, 1px);--_text-field-hover-input-text-color: var(--md-filled-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-filled-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-filled-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-state-layer-color: var(--md-filled-select-text-field-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-state-layer-opacity: var(--md-filled-select-text-field-hover-state-layer-opacity, 0.08);--_text-field-hover-supporting-text-color: var(--md-filled-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-filled-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-filled-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-filled-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-filled-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-filled-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-filled-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-filled-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-filled-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-filled-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-filled-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-filled-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-filled-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-filled-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-filled-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-filled-select-text-field-leading-icon-size, 24px);--_text-field-supporting-text-color: var(--md-filled-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-filled-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-filled-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-filled-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-filled-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-filled-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-filled-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-filled-select-text-field-container-shape-start-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-filled-select-text-field-container-shape-start-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-filled-select-text-field-container-shape-end-end, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--_text-field-container-shape-end-start: var(--md-filled-select-text-field-container-shape-end-start, var(--md-filled-select-text-field-container-shape, var(--md-sys-shape-corner-none, 0px)));--md-filled-field-active-indicator-color: var(--_text-field-active-indicator-color);--md-filled-field-active-indicator-height: var(--_text-field-active-indicator-height);--md-filled-field-container-color: var(--_text-field-container-color);--md-filled-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-filled-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-filled-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-filled-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-filled-field-content-color: var(--_text-field-input-text-color);--md-filled-field-content-font: var(--_text-field-input-text-font);--md-filled-field-content-line-height: var(--_text-field-input-text-line-height);--md-filled-field-content-size: var(--_text-field-input-text-size);--md-filled-field-content-weight: var(--_text-field-input-text-weight);--md-filled-field-disabled-active-indicator-color: var(--_text-field-disabled-active-indicator-color);--md-filled-field-disabled-active-indicator-height: var(--_text-field-disabled-active-indicator-height);--md-filled-field-disabled-active-indicator-opacity: var(--_text-field-disabled-active-indicator-opacity);--md-filled-field-disabled-container-color: var(--_text-field-disabled-container-color);--md-filled-field-disabled-container-opacity: var(--_text-field-disabled-container-opacity);--md-filled-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-filled-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-filled-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-filled-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-filled-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-filled-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-filled-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-filled-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-filled-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-filled-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-filled-field-error-active-indicator-color: var(--_text-field-error-active-indicator-color);--md-filled-field-error-content-color: var(--_text-field-error-input-text-color);--md-filled-field-error-focus-active-indicator-color: var(--_text-field-error-focus-active-indicator-color);--md-filled-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-filled-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-filled-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-filled-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-filled-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-filled-field-error-hover-active-indicator-color: var(--_text-field-error-hover-active-indicator-color);--md-filled-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-filled-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-filled-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-filled-field-error-hover-state-layer-color: var(--_text-field-error-hover-state-layer-color);--md-filled-field-error-hover-state-layer-opacity: var(--_text-field-error-hover-state-layer-opacity);--md-filled-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-filled-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-filled-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-filled-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-filled-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-filled-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-filled-field-focus-active-indicator-color: var(--_text-field-focus-active-indicator-color);--md-filled-field-focus-active-indicator-height: var(--_text-field-focus-active-indicator-height);--md-filled-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-filled-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-filled-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-filled-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-filled-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-filled-field-hover-active-indicator-color: var(--_text-field-hover-active-indicator-color);--md-filled-field-hover-active-indicator-height: var(--_text-field-hover-active-indicator-height);--md-filled-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-filled-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-filled-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-filled-field-hover-state-layer-color: var(--_text-field-hover-state-layer-color);--md-filled-field-hover-state-layer-opacity: var(--_text-field-hover-state-layer-opacity);--md-filled-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-filled-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-filled-field-label-text-color: var(--_text-field-label-text-color);--md-filled-field-label-text-font: var(--_text-field-label-text-font);--md-filled-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-filled-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-filled-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-filled-field-label-text-size: var(--_text-field-label-text-size);--md-filled-field-label-text-weight: var(--_text-field-label-text-weight);--md-filled-field-leading-content-color: var(--_text-field-leading-icon-color);--md-filled-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-filled-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-filled-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-filled-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-filled-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-filled-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const $s = F`:host{color:unset;min-width:210px;display:flex}.field{cursor:default;outline:none}.select{position:relative;flex-direction:column}.icon.trailing svg,.icon ::slotted(*){fill:currentColor}.icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}.icon slot{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.icon.trailing :is(.up,.down){opacity:0;transition:opacity 75ms linear 75ms}.select:not(.open) .down,.select.open .up{opacity:1}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit;display:flex}md-menu{min-width:var(--__menu-min-width);max-width:var(--__menu-max-width, inherit)}.menu-wrapper{width:0px;height:0px;max-width:inherit}md-menu ::slotted(:not[disabled]){cursor:pointer}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Ho = class extends Cc {
|
|
};
|
|
Ho.styles = [$s, Ec];
|
|
Ho = l([
|
|
H("md-filled-select")
|
|
], Ho);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class $c extends fe {
|
|
constructor() {
|
|
super(...arguments), this.fieldTag = Xe`md-outlined-field`;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Tc = F`:host{--_text-field-disabled-input-text-color: var(--md-outlined-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-outlined-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-outlined-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-outlined-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-outlined-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-outlined-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-outline-color: var(--md-outlined-select-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-outline-opacity: var(--md-outlined-select-text-field-disabled-outline-opacity, 0.12);--_text-field-disabled-outline-width: var(--md-outlined-select-text-field-disabled-outline-width, 1px);--_text-field-disabled-supporting-text-color: var(--md-outlined-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-outlined-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-outlined-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-outlined-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-focus-input-text-color: var(--md-outlined-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-outlined-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-outlined-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-outline-color: var(--md-outlined-select-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-supporting-text-color: var(--md-outlined-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-outlined-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-input-text-color: var(--md-outlined-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-outlined-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-outlined-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-outline-color: var(--md-outlined-select-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-supporting-text-color: var(--md-outlined-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-outlined-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-outlined-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-outlined-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-outlined-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-outline-color: var(--md-outlined-select-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-supporting-text-color: var(--md-outlined-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-outlined-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-input-text-color: var(--md-outlined-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-outlined-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-outlined-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-outline-color: var(--md-outlined-select-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-outline-width: var(--md-outlined-select-text-field-focus-outline-width, 3px);--_text-field-focus-supporting-text-color: var(--md-outlined-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-outlined-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-input-text-color: var(--md-outlined-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-outlined-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-outlined-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-outline-color: var(--md-outlined-select-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-outline-width: var(--md-outlined-select-text-field-hover-outline-width, 1px);--_text-field-hover-supporting-text-color: var(--md-outlined-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-outlined-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-outlined-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-outlined-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-outlined-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-outlined-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-outlined-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-outlined-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-outlined-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-outlined-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-outlined-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-outlined-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-outlined-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-outlined-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-outlined-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-outlined-select-text-field-leading-icon-size, 24px);--_text-field-outline-color: var(--md-outlined-select-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_text-field-outline-width: var(--md-outlined-select-text-field-outline-width, 1px);--_text-field-supporting-text-color: var(--md-outlined-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-outlined-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-outlined-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-outlined-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-outlined-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-outlined-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-outlined-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-outlined-select-text-field-container-shape-start-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-outlined-select-text-field-container-shape-start-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-outlined-select-text-field-container-shape-end-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-start: var(--md-outlined-select-text-field-container-shape-end-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--md-outlined-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-outlined-field-content-color: var(--_text-field-input-text-color);--md-outlined-field-content-font: var(--_text-field-input-text-font);--md-outlined-field-content-line-height: var(--_text-field-input-text-line-height);--md-outlined-field-content-size: var(--_text-field-input-text-size);--md-outlined-field-content-weight: var(--_text-field-input-text-weight);--md-outlined-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_text-field-disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_text-field-disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_text-field-disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_text-field-error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_text-field-error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_text-field-error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_text-field-error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_text-field-focus-outline-color);--md-outlined-field-focus-outline-width: var(--_text-field-focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_text-field-hover-outline-color);--md-outlined-field-hover-outline-width: var(--_text-field-hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_text-field-label-text-color);--md-outlined-field-label-text-font: var(--_text-field-label-text-font);--md-outlined-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-outlined-field-label-text-size: var(--_text-field-label-text-size);--md-outlined-field-label-text-weight: var(--_text-field-label-text-weight);--md-outlined-field-leading-content-color: var(--_text-field-leading-icon-color);--md-outlined-field-outline-color: var(--_text-field-outline-color);--md-outlined-field-outline-width: var(--_text-field-outline-width);--md-outlined-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-outlined-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-outlined-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let qo = class extends $c {
|
|
};
|
|
qo.styles = [$s, Tc];
|
|
qo = l([
|
|
H("md-outlined-select")
|
|
], qo);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ts = F`:host{display:flex;--md-ripple-hover-color: var(--md-menu-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-menu-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-menu-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-menu-item-pressed-state-layer-opacity, 0.12)}:host([disabled]){opacity:var(--md-menu-item-disabled-opacity, 0.3);pointer-events:none}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled){cursor:pointer}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;color:var(--md-menu-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-menu-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-menu-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-menu-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-menu-item-one-line-container-height, 56px);padding-top:var(--md-menu-item-top-space, 12px);padding-bottom:var(--md-menu-item-bottom-space, 12px);padding-inline-start:var(--md-menu-item-leading-space, 16px);padding-inline-end:var(--md-menu-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-menu-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-menu-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-menu-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-menu-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-menu-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-menu-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-menu-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-menu-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-menu-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}.list-item{background-color:var(--md-menu-item-container-color, transparent)}.list-item.selected{background-color:var(--md-menu-item-selected-container-color, var(--md-sys-color-secondary-container, #e8def8))}.selected:not(.disabled) ::slotted(*){color:var(--md-menu-item-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b))}@media(forced-colors: active){:host([disabled]),:host([disabled]) slot{color:GrayText;opacity:1}.list-item{position:relative}.list-item.selected::before{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;border:3px double CanvasText}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class Da extends W {
|
|
constructor() {
|
|
super(...arguments), this.multiline = !1;
|
|
}
|
|
render() {
|
|
return _`
|
|
<slot name="container"></slot>
|
|
<slot class="non-text" name="start"></slot>
|
|
<div class="text">
|
|
<slot name="overline" @slotchange=${this.handleTextSlotChange}></slot>
|
|
<slot
|
|
class="default-slot"
|
|
@slotchange=${this.handleTextSlotChange}></slot>
|
|
<slot name="headline" @slotchange=${this.handleTextSlotChange}></slot>
|
|
<slot
|
|
name="supporting-text"
|
|
@slotchange=${this.handleTextSlotChange}></slot>
|
|
</div>
|
|
<slot class="non-text" name="trailing-supporting-text"></slot>
|
|
<slot class="non-text" name="end"></slot>
|
|
`;
|
|
}
|
|
handleTextSlotChange() {
|
|
let e = !1, t = 0;
|
|
for (const o of this.textSlots)
|
|
if (Sc(o) && (t += 1), t > 1) {
|
|
e = !0;
|
|
break;
|
|
}
|
|
this.multiline = e;
|
|
}
|
|
}
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], Da.prototype, "multiline", void 0);
|
|
l([
|
|
Ul(".text slot")
|
|
], Da.prototype, "textSlots", void 0);
|
|
function Sc(r) {
|
|
var e;
|
|
for (const t of r.assignedNodes({ flatten: !0 })) {
|
|
const o = t.nodeType === Node.ELEMENT_NODE, i = t.nodeType === Node.TEXT_NODE && ((e = t.textContent) == null ? void 0 : e.match(/\S/));
|
|
if (o || i)
|
|
return !0;
|
|
}
|
|
return !1;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ac = F`:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let wa = class extends Da {
|
|
};
|
|
wa.styles = [Ac];
|
|
wa = l([
|
|
H("md-item")
|
|
], wa);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class Ss {
|
|
/**
|
|
* @param host The MenuItem in which to attach this controller to.
|
|
* @param config The object that configures this controller's behavior.
|
|
*/
|
|
constructor(e, t) {
|
|
this.host = e, this.internalTypeaheadText = null, this.onClick = () => {
|
|
this.host.keepOpen || this.host.dispatchEvent(Bn(this.host, {
|
|
kind: ga.CLICK_SELECTION
|
|
}));
|
|
}, this.onKeydown = (o) => {
|
|
if (this.host.href && o.code === "Enter") {
|
|
const a = this.getInteractiveElement();
|
|
a instanceof HTMLAnchorElement && a.click();
|
|
}
|
|
if (o.defaultPrevented)
|
|
return;
|
|
const i = o.code;
|
|
this.host.keepOpen && i !== "Escape" || ks(i) && (o.preventDefault(), this.host.dispatchEvent(Bn(this.host, {
|
|
kind: ga.KEYDOWN,
|
|
key: i
|
|
})));
|
|
}, this.getHeadlineElements = t.getHeadlineElements, this.getSupportingTextElements = t.getSupportingTextElements, this.getDefaultElements = t.getDefaultElements, this.getInteractiveElement = t.getInteractiveElement, this.host.addController(this);
|
|
}
|
|
/**
|
|
* The text that is selectable via typeahead. If not set, defaults to the
|
|
* innerText of the item slotted into the `"headline"` slot, and if there are
|
|
* no slotted elements into headline, then it checks the _default_ slot, and
|
|
* then the `"supporting-text"` slot if nothing is in _default_.
|
|
*/
|
|
get typeaheadText() {
|
|
if (this.internalTypeaheadText !== null)
|
|
return this.internalTypeaheadText;
|
|
const e = this.getHeadlineElements(), t = [];
|
|
return e.forEach((o) => {
|
|
o.textContent && o.textContent.trim() && t.push(o.textContent.trim());
|
|
}), t.length === 0 && this.getDefaultElements().forEach((o) => {
|
|
o.textContent && o.textContent.trim() && t.push(o.textContent.trim());
|
|
}), t.length === 0 && this.getSupportingTextElements().forEach((o) => {
|
|
o.textContent && o.textContent.trim() && t.push(o.textContent.trim());
|
|
}), t.join(" ");
|
|
}
|
|
/**
|
|
* The recommended tag name to render as the list item.
|
|
*/
|
|
get tagName() {
|
|
switch (this.host.type) {
|
|
case "link":
|
|
return "a";
|
|
case "button":
|
|
return "button";
|
|
default:
|
|
case "menuitem":
|
|
case "option":
|
|
return "li";
|
|
}
|
|
}
|
|
/**
|
|
* The recommended role of the menu item.
|
|
*/
|
|
get role() {
|
|
return this.host.type === "option" ? "option" : "menuitem";
|
|
}
|
|
hostConnected() {
|
|
this.host.toggleAttribute("md-menu-item", !0);
|
|
}
|
|
hostUpdate() {
|
|
this.host.href && (this.host.type = "link");
|
|
}
|
|
/**
|
|
* Use to set the typeaheadText when it changes.
|
|
*/
|
|
setTypeaheadText(e) {
|
|
this.internalTypeaheadText = e;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function Rc() {
|
|
return new Event("request-selection", {
|
|
bubbles: !0,
|
|
composed: !0
|
|
});
|
|
}
|
|
function Ic() {
|
|
return new Event("request-deselection", {
|
|
bubbles: !0,
|
|
composed: !0
|
|
});
|
|
}
|
|
class Oc {
|
|
/**
|
|
* The recommended role of the select option.
|
|
*/
|
|
get role() {
|
|
return this.menuItemController.role;
|
|
}
|
|
/**
|
|
* The text that is selectable via typeahead. If not set, defaults to the
|
|
* innerText of the item slotted into the `"headline"` slot, and if there are
|
|
* no slotted elements into headline, then it checks the _default_ slot, and
|
|
* then the `"supporting-text"` slot if nothing is in _default_.
|
|
*/
|
|
get typeaheadText() {
|
|
return this.menuItemController.typeaheadText;
|
|
}
|
|
setTypeaheadText(e) {
|
|
this.menuItemController.setTypeaheadText(e);
|
|
}
|
|
/**
|
|
* The text that is displayed in the select field when selected. If not set,
|
|
* defaults to the textContent of the item slotted into the `"headline"` slot,
|
|
* and if there are no slotted elements into headline, then it checks the
|
|
* _default_ slot, and then the `"supporting-text"` slot if nothing is in
|
|
* _default_.
|
|
*/
|
|
get displayText() {
|
|
return this.internalDisplayText !== null ? this.internalDisplayText : this.menuItemController.typeaheadText;
|
|
}
|
|
setDisplayText(e) {
|
|
this.internalDisplayText = e;
|
|
}
|
|
/**
|
|
* @param host The SelectOption in which to attach this controller to.
|
|
* @param config The object that configures this controller's behavior.
|
|
*/
|
|
constructor(e, t) {
|
|
this.host = e, this.internalDisplayText = null, this.firstUpdate = !0, this.onClick = () => {
|
|
this.menuItemController.onClick();
|
|
}, this.onKeydown = (o) => {
|
|
this.menuItemController.onKeydown(o);
|
|
}, this.lastSelected = this.host.selected, this.menuItemController = new Ss(e, t), e.addController(this);
|
|
}
|
|
hostUpdate() {
|
|
this.lastSelected !== this.host.selected && (this.host.ariaSelected = this.host.selected ? "true" : "false");
|
|
}
|
|
hostUpdated() {
|
|
this.lastSelected !== this.host.selected && !this.firstUpdate && (this.host.selected ? this.host.dispatchEvent(Rc()) : this.host.dispatchEvent(Ic())), this.lastSelected = this.host.selected, this.firstUpdate = !1;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const zc = Je(W);
|
|
class ot extends zc {
|
|
constructor() {
|
|
super(...arguments), this.disabled = !1, this.isMenuItem = !0, this.selected = !1, this.value = "", this.type = "option", this.selectOptionController = new Oc(this, {
|
|
getHeadlineElements: () => this.headlineElements,
|
|
getSupportingTextElements: () => this.supportingTextElements,
|
|
getDefaultElements: () => this.defaultElements,
|
|
getInteractiveElement: () => this.listItemRoot
|
|
});
|
|
}
|
|
/**
|
|
* The text that is selectable via typeahead. If not set, defaults to the
|
|
* innerText of the item slotted into the `"headline"` slot.
|
|
*/
|
|
get typeaheadText() {
|
|
return this.selectOptionController.typeaheadText;
|
|
}
|
|
set typeaheadText(e) {
|
|
this.selectOptionController.setTypeaheadText(e);
|
|
}
|
|
/**
|
|
* The text that is displayed in the select field when selected. If not set,
|
|
* defaults to the textContent of the item slotted into the `"headline"` slot.
|
|
*/
|
|
get displayText() {
|
|
return this.selectOptionController.displayText;
|
|
}
|
|
set displayText(e) {
|
|
this.selectOptionController.setDisplayText(e);
|
|
}
|
|
render() {
|
|
return this.renderListItem(_`
|
|
<md-item>
|
|
<div slot="container">
|
|
${this.renderRipple()} ${this.renderFocusRing()}
|
|
</div>
|
|
<slot name="start" slot="start"></slot>
|
|
<slot name="end" slot="end"></slot>
|
|
${this.renderBody()}
|
|
</md-item>
|
|
`);
|
|
}
|
|
/**
|
|
* Renders the root list item.
|
|
*
|
|
* @param content the child content of the list item.
|
|
*/
|
|
renderListItem(e) {
|
|
return _`
|
|
<li
|
|
id="item"
|
|
tabindex=${this.disabled ? -1 : 0}
|
|
role=${this.selectOptionController.role}
|
|
aria-label=${this.ariaLabel || x}
|
|
aria-selected=${this.ariaSelected || x}
|
|
aria-checked=${this.ariaChecked || x}
|
|
aria-expanded=${this.ariaExpanded || x}
|
|
aria-haspopup=${this.ariaHasPopup || x}
|
|
class="list-item ${ye(this.getRenderClasses())}"
|
|
@click=${this.selectOptionController.onClick}
|
|
@keydown=${this.selectOptionController.onKeydown}
|
|
>${e}</li
|
|
>
|
|
`;
|
|
}
|
|
/**
|
|
* Handles rendering of the ripple element.
|
|
*/
|
|
renderRipple() {
|
|
return _` <md-ripple
|
|
part="ripple"
|
|
for="item"
|
|
?disabled=${this.disabled}></md-ripple>`;
|
|
}
|
|
/**
|
|
* Handles rendering of the focus ring.
|
|
*/
|
|
renderFocusRing() {
|
|
return _` <md-focus-ring
|
|
part="focus-ring"
|
|
for="item"
|
|
inward></md-focus-ring>`;
|
|
}
|
|
/**
|
|
* Classes applied to the list item root.
|
|
*/
|
|
getRenderClasses() {
|
|
return {
|
|
disabled: this.disabled,
|
|
selected: this.selected
|
|
};
|
|
}
|
|
/**
|
|
* Handles rendering the headline and supporting text.
|
|
*/
|
|
renderBody() {
|
|
return _`
|
|
<slot></slot>
|
|
<slot name="overline" slot="overline"></slot>
|
|
<slot name="headline" slot="headline"></slot>
|
|
<slot name="supporting-text" slot="supporting-text"></slot>
|
|
<slot
|
|
name="trailing-supporting-text"
|
|
slot="trailing-supporting-text"></slot>
|
|
`;
|
|
}
|
|
focus() {
|
|
var e;
|
|
(e = this.listItemRoot) == null || e.focus();
|
|
}
|
|
}
|
|
ot.shadowRootOptions = {
|
|
...W.shadowRootOptions,
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], ot.prototype, "disabled", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "md-menu-item", reflect: !0 })
|
|
], ot.prototype, "isMenuItem", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], ot.prototype, "selected", void 0);
|
|
l([
|
|
p()
|
|
], ot.prototype, "value", void 0);
|
|
l([
|
|
G(".list-item")
|
|
], ot.prototype, "listItemRoot", void 0);
|
|
l([
|
|
We({ slot: "headline" })
|
|
], ot.prototype, "headlineElements", void 0);
|
|
l([
|
|
We({ slot: "supporting-text" })
|
|
], ot.prototype, "supportingTextElements", void 0);
|
|
l([
|
|
Ia({ slot: "" })
|
|
], ot.prototype, "defaultElements", void 0);
|
|
l([
|
|
p({ attribute: "typeahead-text" })
|
|
], ot.prototype, "typeaheadText", null);
|
|
l([
|
|
p({ attribute: "display-text" })
|
|
], ot.prototype, "displayText", null);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Wo = class extends ot {
|
|
};
|
|
Wo.styles = [Ts];
|
|
Wo = l([
|
|
H("md-select-option")
|
|
], Wo);
|
|
const Pc = ee({
|
|
tagName: "md-select",
|
|
react: J,
|
|
elementClass: Ho
|
|
}), Lc = ee({
|
|
tagName: "md-select",
|
|
react: J,
|
|
elementClass: qo
|
|
});
|
|
ee({
|
|
tagName: "md-select-option",
|
|
react: J,
|
|
elementClass: Wo
|
|
});
|
|
const Ep = (r) => {
|
|
const { variant: e = "filled", ...t } = r, o = e === "filled" ? Pc : Lc;
|
|
return /* @__PURE__ */ V.jsx(o, { ...t });
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const As = Symbol("dispatchHooks");
|
|
function Fc(r, e) {
|
|
const t = r[As];
|
|
if (!t)
|
|
throw new Error(`'${r.type}' event needs setupDispatchHooks().`);
|
|
t.addEventListener("after", e);
|
|
}
|
|
const Un = /* @__PURE__ */ new WeakMap();
|
|
function Mc(r, ...e) {
|
|
let t = Un.get(r);
|
|
t || (t = /* @__PURE__ */ new Set(), Un.set(r, t));
|
|
for (const o of e) {
|
|
if (t.has(o))
|
|
continue;
|
|
let i = !1;
|
|
r.addEventListener(o, (a) => {
|
|
if (i)
|
|
return;
|
|
a.stopImmediatePropagation();
|
|
const s = Reflect.construct(a.constructor, [
|
|
a.type,
|
|
a
|
|
]), d = new EventTarget();
|
|
s[As] = d, i = !0;
|
|
const h = r.dispatchEvent(s);
|
|
i = !1, h || a.preventDefault(), d.dispatchEvent(new Event("after"));
|
|
}, {
|
|
// Ensure this listener runs before other listeners.
|
|
// `setupDispatchHooks()` should be called in constructors to also
|
|
// ensure they run before any other externally-added capture listeners.
|
|
capture: !0
|
|
}), t.add(o);
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Dc = Je(Mr(cr(Rt(W))));
|
|
let It = class extends Dc {
|
|
constructor() {
|
|
super(), this.selected = !1, this.icons = !1, this.showOnlySelectedIcon = !1, this.required = !1, this.value = "on", this.addEventListener("click", (e) => {
|
|
!Nr(e) || !this.input || (this.focus(), yi(this.input));
|
|
}), Mc(this, "keydown"), this.addEventListener("keydown", (e) => {
|
|
Fc(e, () => {
|
|
e.defaultPrevented || e.key !== "Enter" || this.disabled || !this.input || this.input.click();
|
|
});
|
|
});
|
|
}
|
|
render() {
|
|
return _`
|
|
<div class="switch ${ye(this.getRenderClasses())}">
|
|
<input
|
|
id="switch"
|
|
class="touch"
|
|
type="checkbox"
|
|
role="switch"
|
|
aria-label=${this.ariaLabel || x}
|
|
?checked=${this.selected}
|
|
?disabled=${this.disabled}
|
|
?required=${this.required}
|
|
@input=${this.handleInput}
|
|
@change=${this.handleChange} />
|
|
|
|
<md-focus-ring part="focus-ring" for="switch"></md-focus-ring>
|
|
<span class="track"> ${this.renderHandle()} </span>
|
|
</div>
|
|
`;
|
|
}
|
|
getRenderClasses() {
|
|
return {
|
|
selected: this.selected,
|
|
unselected: !this.selected,
|
|
disabled: this.disabled
|
|
};
|
|
}
|
|
renderHandle() {
|
|
const e = {
|
|
"with-icon": this.showOnlySelectedIcon ? this.selected : this.icons
|
|
};
|
|
return _`
|
|
${this.renderTouchTarget()}
|
|
<span class="handle-container">
|
|
<md-ripple for="switch" ?disabled="${this.disabled}"></md-ripple>
|
|
<span class="handle ${ye(e)}">
|
|
${this.shouldShowIcons() ? this.renderIcons() : _``}
|
|
</span>
|
|
</span>
|
|
`;
|
|
}
|
|
renderIcons() {
|
|
return _`
|
|
<div class="icons">
|
|
${this.renderOnIcon()}
|
|
${this.showOnlySelectedIcon ? _`` : this.renderOffIcon()}
|
|
</div>
|
|
`;
|
|
}
|
|
/**
|
|
* https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck%3AFILL%400%3Bwght%40500%3BGRAD%400%3Bopsz%4024
|
|
*/
|
|
renderOnIcon() {
|
|
return _`
|
|
<slot class="icon icon--on" name="on-icon">
|
|
<svg viewBox="0 0 24 24">
|
|
<path
|
|
d="M9.55 18.2 3.65 12.3 5.275 10.675 9.55 14.95 18.725 5.775 20.35 7.4Z" />
|
|
</svg>
|
|
</slot>
|
|
`;
|
|
}
|
|
/**
|
|
* https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Aclose%3AFILL%400%3Bwght%40500%3BGRAD%400%3Bopsz%4024
|
|
*/
|
|
renderOffIcon() {
|
|
return _`
|
|
<slot class="icon icon--off" name="off-icon">
|
|
<svg viewBox="0 0 24 24">
|
|
<path
|
|
d="M6.4 19.2 4.8 17.6 10.4 12 4.8 6.4 6.4 4.8 12 10.4 17.6 4.8 19.2 6.4 13.6 12 19.2 17.6 17.6 19.2 12 13.6Z" />
|
|
</svg>
|
|
</slot>
|
|
`;
|
|
}
|
|
renderTouchTarget() {
|
|
return _`<span class="touch"></span>`;
|
|
}
|
|
shouldShowIcons() {
|
|
return this.icons || this.showOnlySelectedIcon;
|
|
}
|
|
handleInput(e) {
|
|
const t = e.target;
|
|
this.selected = t.checked;
|
|
}
|
|
handleChange(e) {
|
|
At(this, e);
|
|
}
|
|
[yt]() {
|
|
return this.selected ? this.value : null;
|
|
}
|
|
[Rr]() {
|
|
return String(this.selected);
|
|
}
|
|
formResetCallback() {
|
|
this.selected = this.hasAttribute("selected");
|
|
}
|
|
formStateRestoreCallback(e) {
|
|
this.selected = e === "true";
|
|
}
|
|
[Wt]() {
|
|
return new ms(() => ({
|
|
checked: this.selected,
|
|
required: this.required
|
|
}));
|
|
}
|
|
[Kt]() {
|
|
return this.input;
|
|
}
|
|
};
|
|
It.shadowRootOptions = {
|
|
mode: "open",
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ type: Boolean })
|
|
], It.prototype, "selected", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], It.prototype, "icons", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "show-only-selected-icon" })
|
|
], It.prototype, "showOnlySelectedIcon", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], It.prototype, "required", void 0);
|
|
l([
|
|
p()
|
|
], It.prototype, "value", void 0);
|
|
l([
|
|
G("input")
|
|
], It.prototype, "input", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Nc = F`@layer styles, hcm;@layer styles{:host{display:inline-flex;outline:none;vertical-align:top;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer}:host([disabled]){cursor:default}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--md-switch-track-height, 32px))/2) 0px}md-focus-ring{--md-focus-ring-shape-start-start: var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-start-end: var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-end: var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));--md-focus-ring-shape-end-start: var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}.switch{align-items:center;display:inline-flex;flex-shrink:0;position:relative;width:var(--md-switch-track-width, 52px);height:var(--md-switch-track-height, 32px);border-start-start-radius:var(--md-switch-track-shape-start-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-track-shape-start-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-track-shape-end-end, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-track-shape-end-start, var(--md-switch-track-shape, var(--md-sys-shape-corner-full, 9999px)))}input{appearance:none;height:max(100%,var(--md-switch-touch-target-size, 48px));outline:none;margin:0;position:absolute;width:max(100%,var(--md-switch-touch-target-size, 48px));z-index:1;cursor:inherit;top:50%;left:50%;transform:translate(-50%, -50%)}:host([touch-target=none]) input{display:none}}@layer styles{.track{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:inherit;display:flex;justify-content:center;align-items:center}.track::before{content:"";display:flex;position:absolute;height:100%;width:100%;border-radius:inherit;box-sizing:border-box;transition-property:opacity,background-color;transition-timing-function:linear;transition-duration:67ms}.disabled .track{background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.disabled .track::before,.disabled .track::after{transition:none;opacity:var(--md-switch-disabled-track-opacity, 0.12)}.disabled .track::before{background-clip:content-box}.selected .track::before{background-color:var(--md-switch-selected-track-color, var(--md-sys-color-primary, #6750a4))}.selected:hover .track::before{background-color:var(--md-switch-selected-hover-track-color, var(--md-sys-color-primary, #6750a4))}.selected:focus-within .track::before{background-color:var(--md-switch-selected-focus-track-color, var(--md-sys-color-primary, #6750a4))}.selected:active .track::before{background-color:var(--md-switch-selected-pressed-track-color, var(--md-sys-color-primary, #6750a4))}.selected.disabled .track{background-clip:border-box}.selected.disabled .track::before{background-color:var(--md-switch-disabled-selected-track-color, var(--md-sys-color-on-surface, #1d1b20))}.unselected .track::before{background-color:var(--md-switch-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-track-outline-color, var(--md-sys-color-outline, #79747e));border-style:solid;border-width:var(--md-switch-track-outline-width, 2px)}.unselected:hover .track::before{background-color:var(--md-switch-hover-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-hover-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:focus-visible .track::before{background-color:var(--md-switch-focus-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-focus-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected:active .track::before{background-color:var(--md-switch-pressed-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-pressed-track-outline-color, var(--md-sys-color-outline, #79747e))}.unselected.disabled .track::before{background-color:var(--md-switch-disabled-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));border-color:var(--md-switch-disabled-track-outline-color, var(--md-sys-color-on-surface, #1d1b20))}}@layer hcm{@media(forced-colors: active){.selected .track::before{background:ButtonText;border-color:ButtonText}.disabled .track::before{border-color:GrayText;opacity:1}.disabled.selected .track::before{background:GrayText}}}@layer styles{.handle-container{display:flex;place-content:center;place-items:center;position:relative;transition:margin 300ms cubic-bezier(0.175, 0.885, 0.32, 1.275)}.selected .handle-container{margin-inline-start:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.unselected .handle-container{margin-inline-end:calc(var(--md-switch-track-width, 52px) - var(--md-switch-track-height, 32px))}.disabled .handle-container{transition:none}.handle{border-start-start-radius:var(--md-switch-handle-shape-start-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-start-end-radius:var(--md-switch-handle-shape-start-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-end-radius:var(--md-switch-handle-shape-end-end, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));border-end-start-radius:var(--md-switch-handle-shape-end-start, var(--md-switch-handle-shape, var(--md-sys-shape-corner-full, 9999px)));height:var(--md-switch-handle-height, 16px);width:var(--md-switch-handle-width, 16px);transform-origin:center;transition-property:height,width;transition-duration:250ms,250ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1),cubic-bezier(0.2, 0, 0, 1);z-index:0}.handle::before{content:"";display:flex;inset:0;position:absolute;border-radius:inherit;box-sizing:border-box;transition:background-color 67ms linear}.disabled .handle,.disabled .handle::before{transition:none}.selected .handle{height:var(--md-switch-selected-handle-height, 24px);width:var(--md-switch-selected-handle-width, 24px)}.handle.with-icon{height:var(--md-switch-with-icon-handle-height, 24px);width:var(--md-switch-with-icon-handle-width, 24px)}.selected:not(.disabled):active .handle,.unselected:not(.disabled):active .handle{height:var(--md-switch-pressed-handle-height, 28px);width:var(--md-switch-pressed-handle-width, 28px);transition-timing-function:linear;transition-duration:100ms}.selected .handle::before{background-color:var(--md-switch-selected-handle-color, var(--md-sys-color-on-primary, #fff))}.selected:hover .handle::before{background-color:var(--md-switch-selected-hover-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:focus-within .handle::before{background-color:var(--md-switch-selected-focus-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected:active .handle::before{background-color:var(--md-switch-selected-pressed-handle-color, var(--md-sys-color-primary-container, #eaddff))}.selected.disabled .handle::before{background-color:var(--md-switch-disabled-selected-handle-color, var(--md-sys-color-surface, #fef7ff));opacity:var(--md-switch-disabled-selected-handle-opacity, 1)}.unselected .handle::before{background-color:var(--md-switch-handle-color, var(--md-sys-color-outline, #79747e))}.unselected:hover .handle::before{background-color:var(--md-switch-hover-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:focus-within .handle::before{background-color:var(--md-switch-focus-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected:active .handle::before{background-color:var(--md-switch-pressed-handle-color, var(--md-sys-color-on-surface-variant, #49454f))}.unselected.disabled .handle::before{background-color:var(--md-switch-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-handle-opacity, 0.38)}md-ripple{border-radius:var(--md-switch-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));height:var(--md-switch-state-layer-size, 40px);inset:unset;width:var(--md-switch-state-layer-size, 40px)}.selected md-ripple{--md-ripple-hover-color: var(--md-switch-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-pressed-color: var(--md-switch-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--md-ripple-hover-opacity: var(--md-switch-selected-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-selected-pressed-state-layer-opacity, 0.12)}.unselected md-ripple{--md-ripple-hover-color: var(--md-switch-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-color: var(--md-switch-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-switch-hover-state-layer-opacity, 0.08);--md-ripple-pressed-opacity: var(--md-switch-pressed-state-layer-opacity, 0.12)}}@layer hcm{@media(forced-colors: active){.unselected .handle::before{background:ButtonText}.disabled .handle::before{opacity:1}.disabled.unselected .handle::before{background:GrayText}}}@layer styles{.icons{position:relative;height:100%;width:100%}.icon{position:absolute;inset:0;margin:auto;display:flex;align-items:center;justify-content:center;fill:currentColor;transition:fill 67ms linear,opacity 33ms linear,transform 167ms cubic-bezier(0.2, 0, 0, 1);opacity:0}.disabled .icon{transition:none}.selected .icon--on,.unselected .icon--off{opacity:1}.unselected .handle:not(.with-icon) .icon--on{transform:rotate(-45deg)}.icon--off{width:var(--md-switch-icon-size, 16px);height:var(--md-switch-icon-size, 16px);color:var(--md-switch-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:hover .icon--off{color:var(--md-switch-hover-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:focus-within .icon--off{color:var(--md-switch-focus-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected:active .icon--off{color:var(--md-switch-pressed-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9))}.unselected.disabled .icon--off{color:var(--md-switch-disabled-icon-color, var(--md-sys-color-surface-container-highest, #e6e0e9));opacity:var(--md-switch-disabled-icon-opacity, 0.38)}.icon--on{width:var(--md-switch-selected-icon-size, 16px);height:var(--md-switch-selected-icon-size, 16px);color:var(--md-switch-selected-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:hover .icon--on{color:var(--md-switch-selected-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:focus-within .icon--on{color:var(--md-switch-selected-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected:active .icon--on{color:var(--md-switch-selected-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d))}.selected.disabled .icon--on{color:var(--md-switch-disabled-selected-icon-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-switch-disabled-selected-icon-opacity, 0.38)}}@layer hcm{@media(forced-colors: active){.icon--off{fill:Canvas}.icon--on{fill:ButtonText}.disabled.unselected .icon--off,.disabled.selected .icon--on{opacity:1}.disabled .icon--on{fill:GrayText}}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Ko = class extends It {
|
|
};
|
|
Ko.styles = [Nc];
|
|
Ko = l([
|
|
H("md-switch")
|
|
], Ko);
|
|
const Bc = ee({
|
|
tagName: "md-switch",
|
|
react: J,
|
|
elementClass: Ko
|
|
}), Sp = ({ checked: r, id: e, disabled: t, hidden: o, ariaLabel: i, ariaLabelledBy: a, ariaDescribedBy: s, ariaControls: d, required: h, onInput: y, onChange: v, onClick: f, onMouseDown: C, onMouseUp: w, onMouseEnter: A, onFocus: S, onBlur: I, className: O, style: R, tabIndex: B, name: U, ...P }) => /* @__PURE__ */ V.jsx(
|
|
Bc,
|
|
{
|
|
...P,
|
|
id: e,
|
|
disabled: t || !1,
|
|
required: h,
|
|
selected: r,
|
|
hidden: o,
|
|
"touch-target": "wrapper",
|
|
"aria-label": i,
|
|
"aria-labelledby": a,
|
|
"aria-describedby": s,
|
|
"aria-controls": d,
|
|
"aria-required": h,
|
|
onInput: y,
|
|
onChange: v,
|
|
onClick: f,
|
|
onMouseDown: C,
|
|
onMouseUp: w,
|
|
onMouseEnter: A,
|
|
onFocus: S,
|
|
onBlur: I,
|
|
className: O,
|
|
style: R,
|
|
tabIndex: B,
|
|
name: U || void 0
|
|
}
|
|
);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const jc = F`@media(forced-colors: active){:host{--md-slider-active-track-color: CanvasText;--md-slider-disabled-active-track-color: GrayText;--md-slider-disabled-active-track-opacity: 1;--md-slider-disabled-handle-color: GrayText;--md-slider-disabled-inactive-track-color: GrayText;--md-slider-disabled-inactive-track-opacity: 1;--md-slider-focus-handle-color: CanvasText;--md-slider-handle-color: CanvasText;--md-slider-handle-shadow-color: Canvas;--md-slider-hover-handle-color: CanvasText;--md-slider-hover-state-layer-color: Canvas;--md-slider-hover-state-layer-opacity: 1;--md-slider-inactive-track-color: Canvas;--md-slider-label-container-color: Canvas;--md-slider-label-text-color: CanvasText;--md-slider-pressed-handle-color: CanvasText;--md-slider-pressed-state-layer-color: Canvas;--md-slider-pressed-state-layer-opacity: 1;--md-slider-with-overlap-handle-outline-color: CanvasText}.label,.label::before{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}:host(:not([disabled])) .track::before{border:1px solid var(--_active-track-color)}.tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='CanvasText'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}.tickmarks::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}:host([disabled]) .tickmarks::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='Canvas'%3E%3Ccircle cx='2' cy='2' r='1'/%3E%3C/svg%3E")}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
function sa(r, e, t) {
|
|
return r ? e(r) : t == null ? void 0 : t(r);
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Uc = Je(cr(Rt(W)));
|
|
let le = class extends Uc {
|
|
/**
|
|
* The HTML name to use in form submission for a range slider's starting
|
|
* value. Use `name` instead if both the start and end values should use the
|
|
* same name.
|
|
*/
|
|
get nameStart() {
|
|
return this.getAttribute("name-start") ?? this.name;
|
|
}
|
|
set nameStart(e) {
|
|
this.setAttribute("name-start", e);
|
|
}
|
|
/**
|
|
* The HTML name to use in form submission for a range slider's ending value.
|
|
* Use `name` instead if both the start and end values should use the same
|
|
* name.
|
|
*/
|
|
get nameEnd() {
|
|
return this.getAttribute("name-end") ?? this.nameStart;
|
|
}
|
|
set nameEnd(e) {
|
|
this.setAttribute("name-end", e);
|
|
}
|
|
// Note: start aria-* properties are only applied when range=true, which is
|
|
// why they do not need to handle both cases.
|
|
get renderAriaLabelStart() {
|
|
const { ariaLabel: e } = this;
|
|
return this.ariaLabelStart || e && `${e} start` || this.valueLabelStart || String(this.valueStart);
|
|
}
|
|
get renderAriaValueTextStart() {
|
|
return this.ariaValueTextStart || this.valueLabelStart || String(this.valueStart);
|
|
}
|
|
// Note: end aria-* properties are applied for single and range sliders, which
|
|
// is why it needs to handle `this.range` (while start aria-* properties do
|
|
// not).
|
|
get renderAriaLabelEnd() {
|
|
const { ariaLabel: e } = this;
|
|
return this.range ? this.ariaLabelEnd || e && `${e} end` || this.valueLabelEnd || String(this.valueEnd) : e || this.valueLabel || String(this.value);
|
|
}
|
|
get renderAriaValueTextEnd() {
|
|
if (this.range)
|
|
return this.ariaValueTextEnd || this.valueLabelEnd || String(this.valueEnd);
|
|
const { ariaValueText: e } = this;
|
|
return e || this.valueLabel || String(this.value);
|
|
}
|
|
constructor() {
|
|
super(), this.min = 0, this.max = 100, this.valueLabel = "", this.valueLabelStart = "", this.valueLabelEnd = "", this.ariaLabelStart = "", this.ariaValueTextStart = "", this.ariaLabelEnd = "", this.ariaValueTextEnd = "", this.step = 1, this.ticks = !1, this.labeled = !1, this.range = !1, this.handleStartHover = !1, this.handleEndHover = !1, this.startOnTop = !1, this.handlesOverlapping = !1, this.ripplePointerId = 1, this.isRedispatchingEvent = !1, this.addEventListener("click", (e) => {
|
|
!Nr(e) || !this.inputEnd || (this.focus(), yi(this.inputEnd));
|
|
});
|
|
}
|
|
focus() {
|
|
var e;
|
|
(e = this.inputEnd) == null || e.focus();
|
|
}
|
|
willUpdate(e) {
|
|
var o, i;
|
|
this.renderValueStart = e.has("valueStart") ? this.valueStart : (o = this.inputStart) == null ? void 0 : o.valueAsNumber;
|
|
const t = e.has("valueEnd") && this.range || e.has("value");
|
|
this.renderValueEnd = t ? this.range ? this.valueEnd : this.value : (i = this.inputEnd) == null ? void 0 : i.valueAsNumber, e.get("handleStartHover") !== void 0 ? this.toggleRippleHover(this.rippleStart, this.handleStartHover) : e.get("handleEndHover") !== void 0 && this.toggleRippleHover(this.rippleEnd, this.handleEndHover);
|
|
}
|
|
updated(e) {
|
|
var t, o;
|
|
if (this.range && (this.renderValueStart = this.inputStart.valueAsNumber), this.renderValueEnd = this.inputEnd.valueAsNumber, this.range) {
|
|
const i = (this.max - this.min) / 3;
|
|
if (this.valueStart === void 0) {
|
|
this.inputStart.valueAsNumber = this.min + i;
|
|
const a = this.inputStart.valueAsNumber;
|
|
this.valueStart = this.renderValueStart = a;
|
|
}
|
|
if (this.valueEnd === void 0) {
|
|
this.inputEnd.valueAsNumber = this.min + 2 * i;
|
|
const a = this.inputEnd.valueAsNumber;
|
|
this.valueEnd = this.renderValueEnd = a;
|
|
}
|
|
} else
|
|
this.value ?? (this.value = this.renderValueEnd);
|
|
if (e.has("range") || e.has("renderValueStart") || e.has("renderValueEnd") || this.isUpdatePending) {
|
|
const i = (t = this.handleStart) == null ? void 0 : t.querySelector(".handleNub"), a = (o = this.handleEnd) == null ? void 0 : o.querySelector(".handleNub");
|
|
this.handlesOverlapping = Vc(i, a);
|
|
}
|
|
this.performUpdate();
|
|
}
|
|
render() {
|
|
const e = this.step === 0 ? 1 : this.step, t = Math.max(this.max - this.min, e), o = this.range ? ((this.renderValueStart ?? this.min) - this.min) / t : 0, i = ((this.renderValueEnd ?? this.min) - this.min) / t, a = {
|
|
// for clipping inputs and active track.
|
|
"--_start-fraction": String(o),
|
|
"--_end-fraction": String(i),
|
|
// for generating tick marks
|
|
"--_tick-count": String(t / e)
|
|
}, s = { ranged: this.range }, d = this.valueLabelStart || String(this.renderValueStart), h = (this.range ? this.valueLabelEnd : this.valueLabel) || String(this.renderValueEnd), y = {
|
|
start: !0,
|
|
value: this.renderValueStart,
|
|
ariaLabel: this.renderAriaLabelStart,
|
|
ariaValueText: this.renderAriaValueTextStart,
|
|
ariaMin: this.min,
|
|
ariaMax: this.valueEnd ?? this.max
|
|
}, v = {
|
|
start: !1,
|
|
value: this.renderValueEnd,
|
|
ariaLabel: this.renderAriaLabelEnd,
|
|
ariaValueText: this.renderAriaValueTextEnd,
|
|
ariaMin: this.range ? this.valueStart ?? this.min : this.min,
|
|
ariaMax: this.max
|
|
}, f = {
|
|
start: !0,
|
|
hover: this.handleStartHover,
|
|
label: d
|
|
}, C = {
|
|
start: !1,
|
|
hover: this.handleEndHover,
|
|
label: h
|
|
}, w = {
|
|
hover: this.handleStartHover || this.handleEndHover
|
|
};
|
|
return _` <div
|
|
class="container ${ye(s)}"
|
|
style=${qt(a)}>
|
|
${sa(this.range, () => this.renderInput(y))}
|
|
${this.renderInput(v)} ${this.renderTrack()}
|
|
<div class="handleContainerPadded">
|
|
<div class="handleContainerBlock">
|
|
<div class="handleContainer ${ye(w)}">
|
|
${sa(this.range, () => this.renderHandle(f))}
|
|
${this.renderHandle(C)}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>`;
|
|
}
|
|
renderTrack() {
|
|
return _`
|
|
<div class="track"></div>
|
|
${this.ticks ? _`<div class="tickmarks"></div>` : x}
|
|
`;
|
|
}
|
|
renderLabel(e) {
|
|
return _`<div class="label" aria-hidden="true">
|
|
<span class="labelContent" part="label">${e}</span>
|
|
</div>`;
|
|
}
|
|
renderHandle({ start: e, hover: t, label: o }) {
|
|
const i = !this.disabled && e === this.startOnTop, a = !this.disabled && this.handlesOverlapping, s = e ? "start" : "end";
|
|
return _`<div
|
|
class="handle ${ye({
|
|
[s]: !0,
|
|
hover: t,
|
|
onTop: i,
|
|
isOverlapping: a
|
|
})}">
|
|
<md-focus-ring part="focus-ring" for=${s}></md-focus-ring>
|
|
<md-ripple
|
|
for=${s}
|
|
class=${s}
|
|
?disabled=${this.disabled}></md-ripple>
|
|
<div class="handleNub">
|
|
<md-elevation part="elevation"></md-elevation>
|
|
</div>
|
|
${sa(this.labeled, () => this.renderLabel(o))}
|
|
</div>`;
|
|
}
|
|
renderInput({ start: e, value: t, ariaLabel: o, ariaValueText: i, ariaMin: a, ariaMax: s }) {
|
|
const d = e ? "start" : "end";
|
|
return _`<input
|
|
type="range"
|
|
class="${ye({
|
|
start: e,
|
|
end: !e
|
|
})}"
|
|
@focus=${this.handleFocus}
|
|
@pointerdown=${this.handleDown}
|
|
@pointerup=${this.handleUp}
|
|
@pointerenter=${this.handleEnter}
|
|
@pointermove=${this.handleMove}
|
|
@pointerleave=${this.handleLeave}
|
|
@keydown=${this.handleKeydown}
|
|
@keyup=${this.handleKeyup}
|
|
@input=${this.handleInput}
|
|
@change=${this.handleChange}
|
|
id=${d}
|
|
.disabled=${this.disabled}
|
|
.min=${String(this.min)}
|
|
aria-valuemin=${a}
|
|
.max=${String(this.max)}
|
|
aria-valuemax=${s}
|
|
.step=${String(this.step)}
|
|
.value=${String(t)}
|
|
.tabIndex=${e ? 1 : 0}
|
|
aria-label=${o || x}
|
|
aria-valuetext=${i} />`;
|
|
}
|
|
async toggleRippleHover(e, t) {
|
|
const o = await e;
|
|
o && (t ? o.handlePointerenter(new PointerEvent("pointerenter", {
|
|
isPrimary: !0,
|
|
pointerId: this.ripplePointerId
|
|
})) : o.handlePointerleave(new PointerEvent("pointerleave", {
|
|
isPrimary: !0,
|
|
pointerId: this.ripplePointerId
|
|
})));
|
|
}
|
|
handleFocus(e) {
|
|
this.updateOnTop(e.target);
|
|
}
|
|
startAction(e) {
|
|
const t = e.target, o = t === this.inputStart ? this.inputEnd : this.inputStart;
|
|
this.action = {
|
|
canFlip: e.type === "pointerdown",
|
|
flipped: !1,
|
|
target: t,
|
|
fixed: o,
|
|
values: /* @__PURE__ */ new Map([
|
|
[t, t.valueAsNumber],
|
|
[o, o == null ? void 0 : o.valueAsNumber]
|
|
])
|
|
};
|
|
}
|
|
finishAction(e) {
|
|
this.action = void 0;
|
|
}
|
|
handleKeydown(e) {
|
|
this.startAction(e);
|
|
}
|
|
handleKeyup(e) {
|
|
this.finishAction(e);
|
|
}
|
|
handleDown(e) {
|
|
this.startAction(e), this.ripplePointerId = e.pointerId;
|
|
const t = e.target === this.inputStart;
|
|
this.handleStartHover = !this.disabled && t && !!this.handleStart, this.handleEndHover = !this.disabled && !t && !!this.handleEnd;
|
|
}
|
|
async handleUp(e) {
|
|
if (!this.action)
|
|
return;
|
|
const { target: t, values: o, flipped: i } = this.action;
|
|
await new Promise(requestAnimationFrame), t !== void 0 && (t.focus(), i && t.valueAsNumber !== o.get(t) && t.dispatchEvent(new Event("change", { bubbles: !0 }))), this.finishAction(e);
|
|
}
|
|
/**
|
|
* The move handler tracks handle hovering to facilitate proper ripple
|
|
* behavior on the slider handle. This is needed because user interaction with
|
|
* the native input is leveraged to position the handle. Because the separate
|
|
* displayed handle element has pointer events disabled (to allow interaction
|
|
* with the input) and the input's handle is a pseudo-element, neither can be
|
|
* the ripple's interactive element. Therefore the input is the ripple's
|
|
* interactive element and has a `ripple` directive; however the ripple
|
|
* is gated on the handle being hovered. In addition, because the ripple
|
|
* hover state is being specially handled, it must be triggered independent
|
|
* of the directive. This is done based on the hover state when the
|
|
* slider is updated.
|
|
*/
|
|
handleMove(e) {
|
|
this.handleStartHover = !this.disabled && Vn(e, this.handleStart), this.handleEndHover = !this.disabled && Vn(e, this.handleEnd);
|
|
}
|
|
handleEnter(e) {
|
|
this.handleMove(e);
|
|
}
|
|
handleLeave() {
|
|
this.handleStartHover = !1, this.handleEndHover = !1;
|
|
}
|
|
updateOnTop(e) {
|
|
this.startOnTop = e.classList.contains("start");
|
|
}
|
|
needsClamping() {
|
|
if (!this.action)
|
|
return !1;
|
|
const { target: e, fixed: t } = this.action;
|
|
return e === this.inputStart ? e.valueAsNumber > t.valueAsNumber : e.valueAsNumber < t.valueAsNumber;
|
|
}
|
|
// if start/end start coincident and the first drag input would e.g. move
|
|
// start > end, avoid clamping and "flip" to use the other input
|
|
// as the action target.
|
|
isActionFlipped() {
|
|
const { action: e } = this;
|
|
if (!e)
|
|
return !1;
|
|
const { target: t, fixed: o, values: i } = e;
|
|
return e.canFlip && i.get(t) === i.get(o) && this.needsClamping() && (e.canFlip = !1, e.flipped = !0, e.target = o, e.fixed = t), e.flipped;
|
|
}
|
|
// when flipped, apply the drag input to the flipped target and reset
|
|
// the actual target.
|
|
flipAction() {
|
|
if (!this.action)
|
|
return !1;
|
|
const { target: e, fixed: t, values: o } = this.action, i = e.valueAsNumber !== t.valueAsNumber;
|
|
return e.valueAsNumber = t.valueAsNumber, t.valueAsNumber = o.get(t), i;
|
|
}
|
|
// clamp such that start does not move beyond end and visa versa.
|
|
clampAction() {
|
|
if (!this.needsClamping() || !this.action)
|
|
return !1;
|
|
const { target: e, fixed: t } = this.action;
|
|
return e.valueAsNumber = t.valueAsNumber, !0;
|
|
}
|
|
handleInput(e) {
|
|
if (this.isRedispatchingEvent)
|
|
return;
|
|
let t = !1, o = !1;
|
|
this.range && (this.isActionFlipped() && (t = !0, o = this.flipAction()), this.clampAction() && (t = !0, o = !1));
|
|
const i = e.target;
|
|
this.updateOnTop(i), this.range ? (this.valueStart = this.inputStart.valueAsNumber, this.valueEnd = this.inputEnd.valueAsNumber) : this.value = this.inputEnd.valueAsNumber, t && e.stopPropagation(), o && (this.isRedispatchingEvent = !0, At(i, e), this.isRedispatchingEvent = !1);
|
|
}
|
|
handleChange(e) {
|
|
const t = e.target, { target: o, values: i } = this.action ?? {};
|
|
o && o.valueAsNumber === i.get(t) || At(this, e), this.finishAction(e);
|
|
}
|
|
[yt]() {
|
|
if (this.range) {
|
|
const e = new FormData();
|
|
return e.append(this.nameStart, String(this.valueStart)), e.append(this.nameEnd, String(this.valueEnd)), e;
|
|
}
|
|
return String(this.value);
|
|
}
|
|
formResetCallback() {
|
|
if (this.range) {
|
|
const t = this.getAttribute("value-start");
|
|
this.valueStart = t !== null ? Number(t) : void 0;
|
|
const o = this.getAttribute("value-end");
|
|
this.valueEnd = o !== null ? Number(o) : void 0;
|
|
return;
|
|
}
|
|
const e = this.getAttribute("value");
|
|
this.value = e !== null ? Number(e) : void 0;
|
|
}
|
|
formStateRestoreCallback(e) {
|
|
if (Array.isArray(e)) {
|
|
const [[, t], [, o]] = e;
|
|
this.valueStart = Number(t), this.valueEnd = Number(o), this.range = !0;
|
|
return;
|
|
}
|
|
this.value = Number(e), this.range = !1;
|
|
}
|
|
};
|
|
le.shadowRootOptions = {
|
|
...W.shadowRootOptions,
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ type: Number })
|
|
], le.prototype, "min", void 0);
|
|
l([
|
|
p({ type: Number })
|
|
], le.prototype, "max", void 0);
|
|
l([
|
|
p({ type: Number })
|
|
], le.prototype, "value", void 0);
|
|
l([
|
|
p({ type: Number, attribute: "value-start" })
|
|
], le.prototype, "valueStart", void 0);
|
|
l([
|
|
p({ type: Number, attribute: "value-end" })
|
|
], le.prototype, "valueEnd", void 0);
|
|
l([
|
|
p({ attribute: "value-label" })
|
|
], le.prototype, "valueLabel", void 0);
|
|
l([
|
|
p({ attribute: "value-label-start" })
|
|
], le.prototype, "valueLabelStart", void 0);
|
|
l([
|
|
p({ attribute: "value-label-end" })
|
|
], le.prototype, "valueLabelEnd", void 0);
|
|
l([
|
|
p({ attribute: "aria-label-start" })
|
|
], le.prototype, "ariaLabelStart", void 0);
|
|
l([
|
|
p({ attribute: "aria-valuetext-start" })
|
|
], le.prototype, "ariaValueTextStart", void 0);
|
|
l([
|
|
p({ attribute: "aria-label-end" })
|
|
], le.prototype, "ariaLabelEnd", void 0);
|
|
l([
|
|
p({ attribute: "aria-valuetext-end" })
|
|
], le.prototype, "ariaValueTextEnd", void 0);
|
|
l([
|
|
p({ type: Number })
|
|
], le.prototype, "step", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], le.prototype, "ticks", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], le.prototype, "labeled", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], le.prototype, "range", void 0);
|
|
l([
|
|
G("input.start")
|
|
], le.prototype, "inputStart", void 0);
|
|
l([
|
|
G(".handle.start")
|
|
], le.prototype, "handleStart", void 0);
|
|
l([
|
|
ts("md-ripple.start")
|
|
], le.prototype, "rippleStart", void 0);
|
|
l([
|
|
G("input.end")
|
|
], le.prototype, "inputEnd", void 0);
|
|
l([
|
|
G(".handle.end")
|
|
], le.prototype, "handleEnd", void 0);
|
|
l([
|
|
ts("md-ripple.end")
|
|
], le.prototype, "rippleEnd", void 0);
|
|
l([
|
|
se()
|
|
], le.prototype, "handleStartHover", void 0);
|
|
l([
|
|
se()
|
|
], le.prototype, "handleEndHover", void 0);
|
|
l([
|
|
se()
|
|
], le.prototype, "startOnTop", void 0);
|
|
l([
|
|
se()
|
|
], le.prototype, "handlesOverlapping", void 0);
|
|
l([
|
|
se()
|
|
], le.prototype, "renderValueStart", void 0);
|
|
l([
|
|
se()
|
|
], le.prototype, "renderValueEnd", void 0);
|
|
function Vn({ x: r, y: e }, t) {
|
|
if (!t)
|
|
return !1;
|
|
const { top: o, left: i, bottom: a, right: s } = t.getBoundingClientRect();
|
|
return r >= i && r <= s && e >= o && e <= a;
|
|
}
|
|
function Vc(r, e) {
|
|
if (!(r && e))
|
|
return !1;
|
|
const t = r.getBoundingClientRect(), o = e.getBoundingClientRect();
|
|
return !(t.top > o.bottom || t.right < o.left || t.bottom < o.top || t.left > o.right);
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Hc = F`:host{--_active-track-color: var(--md-slider-active-track-color, var(--md-sys-color-primary, #6750a4));--_active-track-height: var(--md-slider-active-track-height, 4px);--_active-track-shape: var(--md-slider-active-track-shape, var(--md-sys-shape-corner-full, 9999px));--_disabled-active-track-color: var(--md-slider-disabled-active-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-active-track-opacity: var(--md-slider-disabled-active-track-opacity, 0.38);--_disabled-handle-color: var(--md-slider-disabled-handle-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-handle-elevation: var(--md-slider-disabled-handle-elevation, 0);--_disabled-inactive-track-color: var(--md-slider-disabled-inactive-track-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-inactive-track-opacity: var(--md-slider-disabled-inactive-track-opacity, 0.12);--_focus-handle-color: var(--md-slider-focus-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-color: var(--md-slider-handle-color, var(--md-sys-color-primary, #6750a4));--_handle-elevation: var(--md-slider-handle-elevation, 1);--_handle-height: var(--md-slider-handle-height, 20px);--_handle-shadow-color: var(--md-slider-handle-shadow-color, var(--md-sys-color-shadow, #000));--_handle-shape: var(--md-slider-handle-shape, var(--md-sys-shape-corner-full, 9999px));--_handle-width: var(--md-slider-handle-width, 20px);--_hover-handle-color: var(--md-slider-hover-handle-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-slider-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-slider-hover-state-layer-opacity, 0.08);--_inactive-track-color: var(--md-slider-inactive-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_inactive-track-height: var(--md-slider-inactive-track-height, 4px);--_inactive-track-shape: var(--md-slider-inactive-track-shape, var(--md-sys-shape-corner-full, 9999px));--_label-container-color: var(--md-slider-label-container-color, var(--md-sys-color-primary, #6750a4));--_label-container-height: var(--md-slider-label-container-height, 28px);--_pressed-handle-color: var(--md-slider-pressed-handle-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-slider-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-slider-pressed-state-layer-opacity, 0.12);--_state-layer-size: var(--md-slider-state-layer-size, 40px);--_with-overlap-handle-outline-color: var(--md-slider-with-overlap-handle-outline-color, var(--md-sys-color-on-primary, #fff));--_with-overlap-handle-outline-width: var(--md-slider-with-overlap-handle-outline-width, 1px);--_with-tick-marks-active-container-color: var(--md-slider-with-tick-marks-active-container-color, var(--md-sys-color-on-primary, #fff));--_with-tick-marks-container-size: var(--md-slider-with-tick-marks-container-size, 2px);--_with-tick-marks-disabled-container-color: var(--md-slider-with-tick-marks-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_with-tick-marks-inactive-container-color: var(--md-slider-with-tick-marks-inactive-container-color, var(--md-sys-color-on-surface-variant, #49454f));--_label-text-color: var(--md-slider-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-slider-label-text-font, var(--md-sys-typescale-label-medium-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-slider-label-text-line-height, var(--md-sys-typescale-label-medium-line-height, 1rem));--_label-text-size: var(--md-slider-label-text-size, var(--md-sys-typescale-label-medium-size, 0.75rem));--_label-text-weight: var(--md-slider-label-text-weight, var(--md-sys-typescale-label-medium-weight, var(--md-ref-typeface-weight-medium, 500)));--_start-fraction: 0;--_end-fraction: 0;--_tick-count: 0;display:inline-flex;vertical-align:middle;min-inline-size:200px;--md-elevation-level: var(--_handle-elevation);--md-elevation-shadow-color: var(--_handle-shadow-color)}md-focus-ring{height:48px;inset:unset;width:48px}md-elevation{transition-duration:250ms}@media(prefers-reduced-motion){.label{transition-duration:0}}:host([disabled]){opacity:var(--_disabled-active-track-opacity);--md-elevation-level: var(--_disabled-handle-elevation)}.container{flex:1;display:flex;align-items:center;position:relative;block-size:var(--_state-layer-size);pointer-events:none;touch-action:none}.track,.tickmarks{position:absolute;inset:0;display:flex;align-items:center}.track::before,.tickmarks::before,.track::after,.tickmarks::after{position:absolute;content:"";inset-inline-start:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));inset-inline-end:calc(var(--_state-layer-size)/2 - var(--_with-tick-marks-container-size));background-size:calc((100% - var(--_with-tick-marks-container-size)*2)/var(--_tick-count)) 100%}.track::before,.tickmarks::before{block-size:var(--_inactive-track-height);border-radius:var(--_inactive-track-shape)}.track::before{background:var(--_inactive-track-color)}.tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-inactive-container-color) 0, var(--_with-tick-marks-inactive-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}:host([disabled]) .track::before{opacity:calc(1/var(--_disabled-active-track-opacity)*var(--_disabled-inactive-track-opacity));background:var(--_disabled-inactive-track-color)}.track::after,.tickmarks::after{block-size:var(--_active-track-height);border-radius:var(--_active-track-shape);clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))) 0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)))}.track::after{background:var(--_active-track-color)}.tickmarks::after{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-active-container-color) 0, var(--_with-tick-marks-active-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.track:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}.tickmarks:dir(rtl)::after{clip-path:inset(0 calc(var(--_with-tick-marks-container-size) * min(var(--_start-fraction) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * var(--_start-fraction)) 0 calc(var(--_with-tick-marks-container-size) * min((1 - var(--_end-fraction)) * 1000000000, 1) + (100% - var(--_with-tick-marks-container-size) * 2) * (1 - var(--_end-fraction))))}:host([disabled]) .track::after{background:var(--_disabled-active-track-color)}:host([disabled]) .tickmarks::before{background-image:radial-gradient(circle at var(--_with-tick-marks-container-size) center, var(--_with-tick-marks-disabled-container-color) 0, var(--_with-tick-marks-disabled-container-color) calc(var(--_with-tick-marks-container-size) / 2), transparent calc(var(--_with-tick-marks-container-size) / 2))}.handleContainerPadded{position:relative;block-size:100%;inline-size:100%;padding-inline:calc(var(--_state-layer-size)/2)}.handleContainerBlock{position:relative;block-size:100%;inline-size:100%}.handleContainer{position:absolute;inset-block-start:0;inset-block-end:0;inset-inline-start:calc(100%*var(--_start-fraction));inline-size:calc(100%*(var(--_end-fraction) - var(--_start-fraction)))}.handle{position:absolute;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);border-radius:var(--_handle-shape);display:flex;place-content:center;place-items:center}.handleNub{position:absolute;height:var(--_handle-height);width:var(--_handle-width);border-radius:var(--_handle-shape);background:var(--_handle-color)}:host([disabled]) .handleNub{background:var(--_disabled-handle-color)}input.end:focus~.handleContainerPadded .handle.end>.handleNub,input.start:focus~.handleContainerPadded .handle.start>.handleNub{background:var(--_focus-handle-color)}.container>.handleContainerPadded .handle.hover>.handleNub{background:var(--_hover-handle-color)}:host(:not([disabled])) input.end:active~.handleContainerPadded .handle.end>.handleNub,:host(:not([disabled])) input.start:active~.handleContainerPadded .handle.start>.handleNub{background:var(--_pressed-handle-color)}.onTop.isOverlapping .label,.onTop.isOverlapping .label::before{outline:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.onTop.isOverlapping .handleNub{border:var(--_with-overlap-handle-outline-color) solid var(--_with-overlap-handle-outline-width)}.handle.start{inset-inline-start:calc(0px - var(--_state-layer-size)/2)}.handle.end{inset-inline-end:calc(0px - var(--_state-layer-size)/2)}.label{position:absolute;box-sizing:border-box;display:flex;padding:4px;place-content:center;place-items:center;border-radius:var(--md-sys-shape-corner-full, 9999px);color:var(--_label-text-color);font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);inset-block-end:100%;min-inline-size:var(--_label-container-height);min-block-size:var(--_label-container-height);background:var(--_label-container-color);transition:transform 100ms cubic-bezier(0.2, 0, 0, 1);transform-origin:center bottom;transform:scale(0)}:host(:focus-within) .label,.handleContainer.hover .label,:where(:has(input:active)) .label{transform:scale(1)}.label::before,.label::after{position:absolute;display:block;content:"";background:inherit}.label::before{inline-size:calc(var(--_label-container-height)/2);block-size:calc(var(--_label-container-height)/2);bottom:calc(var(--_label-container-height)/-10);transform:rotate(45deg)}.label::after{inset:0px;border-radius:inherit}.labelContent{z-index:1}input[type=range]{opacity:0;-webkit-tap-highlight-color:rgba(0,0,0,0);position:absolute;box-sizing:border-box;height:100%;width:100%;margin:0;background:rgba(0,0,0,0);cursor:pointer;pointer-events:auto;appearance:none}input[type=range]:focus{outline:none}::-webkit-slider-runnable-track{-webkit-appearance:none}::-moz-range-track{appearance:none}::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;block-size:var(--_handle-height);inline-size:var(--_handle-width);opacity:0;z-index:2}input.end::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_end-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.end:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}input.start::-webkit-slider-thumb{--_track-and-knob-padding: calc( (var(--_state-layer-size) - var(--_handle-width)) / 2 );--_x-translate: calc( var(--_track-and-knob-padding) - 2 * var(--_start-fraction) * var(--_track-and-knob-padding) );transform:translateX(var(--_x-translate))}input.start:dir(rtl)::-webkit-slider-thumb{transform:translateX(calc(-1 * var(--_x-translate)))}::-moz-range-thumb{appearance:none;block-size:var(--_state-layer-size);inline-size:var(--_state-layer-size);transform:scaleX(0);opacity:0;z-index:2}.ranged input.start{clip-path:inset(0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))) 0 0)}.ranged input.start:dir(rtl){clip-path:inset(0 0 0 calc(100% - (var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2))))}.ranged input.end{clip-path:inset(0 0 0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)))}.ranged input.end:dir(rtl){clip-path:inset(0 calc(var(--_state-layer-size) / 2 + (100% - var(--_state-layer-size)) * (var(--_start-fraction) + (var(--_end-fraction) - var(--_start-fraction)) / 2)) 0 0)}.onTop{z-index:1}.handle{--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-ripple{border-radius:50%;height:var(--_state-layer-size);width:var(--_state-layer-size)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Yo = class extends le {
|
|
};
|
|
Yo.styles = [Hc, jc];
|
|
Yo = l([
|
|
H("md-slider")
|
|
], Yo);
|
|
const qc = ee({
|
|
react: J,
|
|
elementClass: Yo,
|
|
tagName: "md-slider"
|
|
}), Ip = ({
|
|
className: r,
|
|
id: e,
|
|
style: t,
|
|
...o
|
|
}) => /* @__PURE__ */ V.jsx(
|
|
qc,
|
|
{
|
|
className: r,
|
|
id: e,
|
|
style: t,
|
|
...o
|
|
}
|
|
);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class xi extends W {
|
|
constructor() {
|
|
super(...arguments), this.inset = !1, this.insetStart = !1, this.insetEnd = !1;
|
|
}
|
|
}
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], xi.prototype, "inset", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0, attribute: "inset-start" })
|
|
], xi.prototype, "insetStart", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0, attribute: "inset-end" })
|
|
], xi.prototype, "insetEnd", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Wc = F`:host{box-sizing:border-box;color:var(--md-divider-color, var(--md-sys-color-outline-variant, #cac4d0));display:flex;height:var(--md-divider-thickness, 1px);width:100%}:host([inset]),:host([inset-start]){padding-inline-start:16px}:host([inset]),:host([inset-end]){padding-inline-end:16px}:host::before{background:currentColor;content:"";height:100%;width:100%}@media(forced-colors: active){:host::before{background:CanvasText}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ka = class extends xi {
|
|
};
|
|
ka.styles = [Wc];
|
|
ka = l([
|
|
H("md-divider")
|
|
], ka);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Kc = {
|
|
dialog: [
|
|
[
|
|
// Dialog slide down
|
|
[{ transform: "translateY(-50px)" }, { transform: "translateY(0)" }],
|
|
{ duration: 500, easing: at.EMPHASIZED }
|
|
]
|
|
],
|
|
scrim: [
|
|
[
|
|
// Scrim fade in
|
|
[{ opacity: 0 }, { opacity: 0.32 }],
|
|
{ duration: 500, easing: "linear" }
|
|
]
|
|
],
|
|
container: [
|
|
[
|
|
// Container fade in
|
|
[{ opacity: 0 }, { opacity: 1 }],
|
|
{ duration: 50, easing: "linear", pseudoElement: "::before" }
|
|
],
|
|
[
|
|
// Container grow
|
|
// Note: current spec says to grow from 0dp->100% and shrink from
|
|
// 100%->35%. We change this to 35%->100% to simplify the animation that
|
|
// is supposed to clip content as it grows. From 0dp it's possible to see
|
|
// text/actions appear before the container has fully grown.
|
|
[{ height: "35%" }, { height: "100%" }],
|
|
{ duration: 500, easing: at.EMPHASIZED, pseudoElement: "::before" }
|
|
]
|
|
],
|
|
headline: [
|
|
[
|
|
// Headline fade in
|
|
[{ opacity: 0 }, { opacity: 0, offset: 0.2 }, { opacity: 1 }],
|
|
{ duration: 250, easing: "linear", fill: "forwards" }
|
|
]
|
|
],
|
|
content: [
|
|
[
|
|
// Content fade in
|
|
[{ opacity: 0 }, { opacity: 0, offset: 0.2 }, { opacity: 1 }],
|
|
{ duration: 250, easing: "linear", fill: "forwards" }
|
|
]
|
|
],
|
|
actions: [
|
|
[
|
|
// Actions fade in
|
|
[{ opacity: 0 }, { opacity: 0, offset: 0.5 }, { opacity: 1 }],
|
|
{ duration: 300, easing: "linear", fill: "forwards" }
|
|
]
|
|
]
|
|
}, Yc = {
|
|
dialog: [
|
|
[
|
|
// Dialog slide up
|
|
[{ transform: "translateY(0)" }, { transform: "translateY(-50px)" }],
|
|
{ duration: 150, easing: at.EMPHASIZED_ACCELERATE }
|
|
]
|
|
],
|
|
scrim: [
|
|
[
|
|
// Scrim fade out
|
|
[{ opacity: 0.32 }, { opacity: 0 }],
|
|
{ duration: 150, easing: "linear" }
|
|
]
|
|
],
|
|
container: [
|
|
[
|
|
// Container shrink
|
|
[{ height: "100%" }, { height: "35%" }],
|
|
{
|
|
duration: 150,
|
|
easing: at.EMPHASIZED_ACCELERATE,
|
|
pseudoElement: "::before"
|
|
}
|
|
],
|
|
[
|
|
// Container fade out
|
|
[{ opacity: "1" }, { opacity: "0" }],
|
|
{ delay: 100, duration: 50, easing: "linear", pseudoElement: "::before" }
|
|
]
|
|
],
|
|
headline: [
|
|
[
|
|
// Headline fade out
|
|
[{ opacity: 1 }, { opacity: 0 }],
|
|
{ duration: 100, easing: "linear", fill: "forwards" }
|
|
]
|
|
],
|
|
content: [
|
|
[
|
|
// Content fade out
|
|
[{ opacity: 1 }, { opacity: 0 }],
|
|
{ duration: 100, easing: "linear", fill: "forwards" }
|
|
]
|
|
],
|
|
actions: [
|
|
[
|
|
// Actions fade out
|
|
[{ opacity: 1 }, { opacity: 0 }],
|
|
{ duration: 100, easing: "linear", fill: "forwards" }
|
|
]
|
|
]
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Gc = Je(W);
|
|
let $e = class extends Gc {
|
|
// We do not use `delegatesFocus: true` due to a Chromium bug with
|
|
// selecting text.
|
|
// See https://bugs.chromium.org/p/chromium/issues/detail?id=950357
|
|
/**
|
|
* Opens the dialog when set to `true` and closes it when set to `false`.
|
|
*/
|
|
get open() {
|
|
return this.isOpen;
|
|
}
|
|
set open(e) {
|
|
e !== this.isOpen && (this.isOpen = e, e ? (this.setAttribute("open", ""), this.show()) : (this.removeAttribute("open"), this.close()));
|
|
}
|
|
constructor() {
|
|
super(), this.quick = !1, this.returnValue = "", this.noFocusTrap = !1, this.getOpenAnimation = () => Kc, this.getCloseAnimation = () => Yc, this.isOpen = !1, this.isOpening = !1, this.isConnectedPromise = this.getIsConnectedPromise(), this.isAtScrollTop = !1, this.isAtScrollBottom = !1, this.nextClickIsFromContent = !1, this.hasHeadline = !1, this.hasActions = !1, this.hasIcon = !1, this.escapePressedWithoutCancel = !1, this.treewalker = document.createTreeWalker(this, NodeFilter.SHOW_ELEMENT), this.addEventListener("submit", this.handleSubmit);
|
|
}
|
|
/**
|
|
* Opens the dialog and fires a cancelable `open` event. After a dialog's
|
|
* animation, an `opened` event is fired.
|
|
*
|
|
* Add an `autofocus` attribute to a child of the dialog that should
|
|
* receive focus after opening.
|
|
*
|
|
* @return A Promise that resolves after the animation is finished and the
|
|
* `opened` event was fired.
|
|
*/
|
|
async show() {
|
|
var o;
|
|
this.isOpening = !0, await this.isConnectedPromise, await this.updateComplete;
|
|
const e = this.dialog;
|
|
if (e.open || !this.isOpening) {
|
|
this.isOpening = !1;
|
|
return;
|
|
}
|
|
if (!this.dispatchEvent(new Event("open", { cancelable: !0 }))) {
|
|
this.open = !1, this.isOpening = !1;
|
|
return;
|
|
}
|
|
e.showModal(), this.open = !0, this.scroller && (this.scroller.scrollTop = 0), (o = this.querySelector("[autofocus]")) == null || o.focus(), await this.animateDialog(this.getOpenAnimation()), this.dispatchEvent(new Event("opened")), this.isOpening = !1;
|
|
}
|
|
/**
|
|
* Closes the dialog and fires a cancelable `close` event. After a dialog's
|
|
* animation, a `closed` event is fired.
|
|
*
|
|
* @param returnValue A return value usually indicating which button was used
|
|
* to close a dialog. If a dialog is canceled by clicking the scrim or
|
|
* pressing Escape, it will not change the return value after closing.
|
|
* @return A Promise that resolves after the animation is finished and the
|
|
* `closed` event was fired.
|
|
*/
|
|
async close(e = this.returnValue) {
|
|
if (this.isOpening = !1, !this.isConnected) {
|
|
this.open = !1;
|
|
return;
|
|
}
|
|
await this.updateComplete;
|
|
const t = this.dialog;
|
|
if (!t.open || this.isOpening) {
|
|
this.open = !1;
|
|
return;
|
|
}
|
|
const o = this.returnValue;
|
|
if (this.returnValue = e, !this.dispatchEvent(new Event("close", { cancelable: !0 }))) {
|
|
this.returnValue = o;
|
|
return;
|
|
}
|
|
await this.animateDialog(this.getCloseAnimation()), t.close(e), this.open = !1, this.dispatchEvent(new Event("closed"));
|
|
}
|
|
connectedCallback() {
|
|
super.connectedCallback(), this.isConnectedPromiseResolve();
|
|
}
|
|
disconnectedCallback() {
|
|
super.disconnectedCallback(), this.isConnectedPromise = this.getIsConnectedPromise();
|
|
}
|
|
render() {
|
|
const e = this.open && !(this.isAtScrollTop && this.isAtScrollBottom), t = {
|
|
"has-headline": this.hasHeadline,
|
|
"has-actions": this.hasActions,
|
|
"has-icon": this.hasIcon,
|
|
scrollable: e,
|
|
"show-top-divider": e && !this.isAtScrollTop,
|
|
"show-bottom-divider": e && !this.isAtScrollBottom
|
|
}, o = this.open && !this.noFocusTrap, i = _`
|
|
<div
|
|
class="focus-trap"
|
|
tabindex="0"
|
|
aria-hidden="true"
|
|
@focus=${this.handleFocusTrapFocus}></div>
|
|
`, { ariaLabel: a } = this;
|
|
return _`
|
|
<div class="scrim"></div>
|
|
<dialog
|
|
class=${ye(t)}
|
|
aria-label=${a || x}
|
|
aria-labelledby=${this.hasHeadline ? "headline" : x}
|
|
role=${this.type === "alert" ? "alertdialog" : x}
|
|
@cancel=${this.handleCancel}
|
|
@click=${this.handleDialogClick}
|
|
@close=${this.handleClose}
|
|
@keydown=${this.handleKeydown}
|
|
.returnValue=${this.returnValue || x}>
|
|
${o ? i : x}
|
|
<div class="container" @click=${this.handleContentClick}>
|
|
<div class="headline">
|
|
<div class="icon" aria-hidden="true">
|
|
<slot name="icon" @slotchange=${this.handleIconChange}></slot>
|
|
</div>
|
|
<h2 id="headline" aria-hidden=${!this.hasHeadline || x}>
|
|
<slot
|
|
name="headline"
|
|
@slotchange=${this.handleHeadlineChange}></slot>
|
|
</h2>
|
|
<md-divider></md-divider>
|
|
</div>
|
|
<div class="scroller">
|
|
<div class="content">
|
|
<div class="top anchor"></div>
|
|
<slot name="content"></slot>
|
|
<div class="bottom anchor"></div>
|
|
</div>
|
|
</div>
|
|
<div class="actions">
|
|
<md-divider></md-divider>
|
|
<slot name="actions" @slotchange=${this.handleActionsChange}></slot>
|
|
</div>
|
|
</div>
|
|
${o ? i : x}
|
|
</dialog>
|
|
`;
|
|
}
|
|
firstUpdated() {
|
|
this.intersectionObserver = new IntersectionObserver((e) => {
|
|
for (const t of e)
|
|
this.handleAnchorIntersection(t);
|
|
}, { root: this.scroller }), this.intersectionObserver.observe(this.topAnchor), this.intersectionObserver.observe(this.bottomAnchor);
|
|
}
|
|
handleDialogClick() {
|
|
if (this.nextClickIsFromContent) {
|
|
this.nextClickIsFromContent = !1;
|
|
return;
|
|
}
|
|
this.dispatchEvent(new Event("cancel", { cancelable: !0 })) && this.close();
|
|
}
|
|
handleContentClick() {
|
|
this.nextClickIsFromContent = !0;
|
|
}
|
|
handleSubmit(e) {
|
|
const t = e.target, { submitter: o } = e;
|
|
t.method !== "dialog" || !o || this.close(o.getAttribute("value") ?? this.returnValue);
|
|
}
|
|
handleCancel(e) {
|
|
if (e.target !== this.dialog)
|
|
return;
|
|
this.escapePressedWithoutCancel = !1;
|
|
const t = !At(this, e);
|
|
e.preventDefault(), !t && this.close();
|
|
}
|
|
handleClose() {
|
|
var e;
|
|
this.escapePressedWithoutCancel && (this.escapePressedWithoutCancel = !1, (e = this.dialog) == null || e.dispatchEvent(new Event("cancel", { cancelable: !0 })));
|
|
}
|
|
handleKeydown(e) {
|
|
e.key === "Escape" && (this.escapePressedWithoutCancel = !0, setTimeout(() => {
|
|
this.escapePressedWithoutCancel = !1;
|
|
}));
|
|
}
|
|
async animateDialog(e) {
|
|
var I;
|
|
if ((I = this.cancelAnimations) == null || I.abort(), this.cancelAnimations = new AbortController(), this.quick)
|
|
return;
|
|
const { dialog: t, scrim: o, container: i, headline: a, content: s, actions: d } = this;
|
|
if (!t || !o || !i || !a || !s || !d)
|
|
return;
|
|
const { container: h, dialog: y, scrim: v, headline: f, content: C, actions: w } = e, A = [
|
|
[t, y ?? []],
|
|
[o, v ?? []],
|
|
[i, h ?? []],
|
|
[a, f ?? []],
|
|
[s, C ?? []],
|
|
[d, w ?? []]
|
|
], S = [];
|
|
for (const [O, R] of A)
|
|
for (const B of R) {
|
|
const U = O.animate(...B);
|
|
this.cancelAnimations.signal.addEventListener("abort", () => {
|
|
U.cancel();
|
|
}), S.push(U);
|
|
}
|
|
await Promise.all(S.map((O) => O.finished.catch(() => {
|
|
})));
|
|
}
|
|
handleHeadlineChange(e) {
|
|
const t = e.target;
|
|
this.hasHeadline = t.assignedElements().length > 0;
|
|
}
|
|
handleActionsChange(e) {
|
|
const t = e.target;
|
|
this.hasActions = t.assignedElements().length > 0;
|
|
}
|
|
handleIconChange(e) {
|
|
const t = e.target;
|
|
this.hasIcon = t.assignedElements().length > 0;
|
|
}
|
|
handleAnchorIntersection(e) {
|
|
const { target: t, isIntersecting: o } = e;
|
|
t === this.topAnchor && (this.isAtScrollTop = o), t === this.bottomAnchor && (this.isAtScrollBottom = o);
|
|
}
|
|
getIsConnectedPromise() {
|
|
return new Promise((e) => {
|
|
this.isConnectedPromiseResolve = e;
|
|
});
|
|
}
|
|
handleFocusTrapFocus(e) {
|
|
var f;
|
|
const [t, o] = this.getFirstAndLastFocusableChildren();
|
|
if (!t || !o) {
|
|
(f = this.dialog) == null || f.focus();
|
|
return;
|
|
}
|
|
const i = e.target === this.firstFocusTrap, a = !i, s = e.relatedTarget === t, d = e.relatedTarget === o, h = !s && !d;
|
|
if (a && d || i && h) {
|
|
t.focus();
|
|
return;
|
|
}
|
|
if (i && s || a && h) {
|
|
o.focus();
|
|
return;
|
|
}
|
|
}
|
|
getFirstAndLastFocusableChildren() {
|
|
if (!this.treewalker)
|
|
return [null, null];
|
|
let e = null, t = null;
|
|
for (this.treewalker.currentNode = this.treewalker.root; this.treewalker.nextNode(); ) {
|
|
const o = this.treewalker.currentNode;
|
|
Xc(o) && (e || (e = o), t = o);
|
|
}
|
|
return [e, t];
|
|
}
|
|
};
|
|
l([
|
|
p({ type: Boolean })
|
|
], $e.prototype, "open", null);
|
|
l([
|
|
p({ type: Boolean })
|
|
], $e.prototype, "quick", void 0);
|
|
l([
|
|
p({ attribute: !1 })
|
|
], $e.prototype, "returnValue", void 0);
|
|
l([
|
|
p()
|
|
], $e.prototype, "type", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "no-focus-trap" })
|
|
], $e.prototype, "noFocusTrap", void 0);
|
|
l([
|
|
G("dialog")
|
|
], $e.prototype, "dialog", void 0);
|
|
l([
|
|
G(".scrim")
|
|
], $e.prototype, "scrim", void 0);
|
|
l([
|
|
G(".container")
|
|
], $e.prototype, "container", void 0);
|
|
l([
|
|
G(".headline")
|
|
], $e.prototype, "headline", void 0);
|
|
l([
|
|
G(".content")
|
|
], $e.prototype, "content", void 0);
|
|
l([
|
|
G(".actions")
|
|
], $e.prototype, "actions", void 0);
|
|
l([
|
|
se()
|
|
], $e.prototype, "isAtScrollTop", void 0);
|
|
l([
|
|
se()
|
|
], $e.prototype, "isAtScrollBottom", void 0);
|
|
l([
|
|
G(".scroller")
|
|
], $e.prototype, "scroller", void 0);
|
|
l([
|
|
G(".top.anchor")
|
|
], $e.prototype, "topAnchor", void 0);
|
|
l([
|
|
G(".bottom.anchor")
|
|
], $e.prototype, "bottomAnchor", void 0);
|
|
l([
|
|
G(".focus-trap")
|
|
], $e.prototype, "firstFocusTrap", void 0);
|
|
l([
|
|
se()
|
|
], $e.prototype, "hasHeadline", void 0);
|
|
l([
|
|
se()
|
|
], $e.prototype, "hasActions", void 0);
|
|
l([
|
|
se()
|
|
], $e.prototype, "hasIcon", void 0);
|
|
function Xc(r) {
|
|
var a;
|
|
const e = ":is(button,input,select,textarea,object,:is(a,area)[href],[tabindex],[contenteditable=true])", t = ":not(:disabled,[disabled])";
|
|
return r.matches(e + t + ':not([tabindex^="-"])') ? !0 : !r.localName.includes("-") || !r.matches(t) ? !1 : ((a = r.shadowRoot) == null ? void 0 : a.delegatesFocus) ?? !1;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Zc = F`:host{border-start-start-radius:var(--md-dialog-container-shape-start-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-start-end-radius:var(--md-dialog-container-shape-start-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-end-radius:var(--md-dialog-container-shape-end-end, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));border-end-start-radius:var(--md-dialog-container-shape-end-start, var(--md-dialog-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));display:contents;margin:auto;max-height:min(560px,100% - 48px);max-width:min(560px,100% - 48px);min-height:140px;min-width:280px;position:fixed;height:fit-content;width:fit-content}dialog{background:rgba(0,0,0,0);border:none;border-radius:inherit;flex-direction:column;height:inherit;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;outline:none;overflow:visible;padding:0;width:inherit}dialog[open]{display:flex}::backdrop{background:none}.scrim{background:var(--md-sys-color-scrim, #000);display:none;inset:0;opacity:32%;pointer-events:none;position:fixed;z-index:1}:host([open]) .scrim{display:flex}h2{all:unset;align-self:stretch}.headline{align-items:center;color:var(--md-dialog-headline-color, var(--md-sys-color-on-surface, #1d1b20));display:flex;flex-direction:column;font-family:var(--md-dialog-headline-font, var(--md-sys-typescale-headline-small-font, var(--md-ref-typeface-brand, Roboto)));font-size:var(--md-dialog-headline-size, var(--md-sys-typescale-headline-small-size, 1.5rem));line-height:var(--md-dialog-headline-line-height, var(--md-sys-typescale-headline-small-line-height, 2rem));font-weight:var(--md-dialog-headline-weight, var(--md-sys-typescale-headline-small-weight, var(--md-ref-typeface-weight-regular, 400)));position:relative}slot[name=headline]::slotted(*){align-items:center;align-self:stretch;box-sizing:border-box;display:flex;gap:8px;padding:24px 24px 0}.icon{display:flex}slot[name=icon]::slotted(*){color:var(--md-dialog-icon-color, var(--md-sys-color-secondary, #625b71));fill:currentColor;font-size:var(--md-dialog-icon-size, 24px);margin-top:24px;height:var(--md-dialog-icon-size, 24px);width:var(--md-dialog-icon-size, 24px)}.has-icon slot[name=headline]::slotted(*){justify-content:center;padding-top:16px}.scrollable slot[name=headline]::slotted(*){padding-bottom:16px}.scrollable.has-headline slot[name=content]::slotted(*){padding-top:8px}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top}.container::before{background:var(--md-dialog-container-color, var(--md-sys-color-surface-container-high, #ece6f0));border-radius:inherit;content:"";inset:0;position:absolute}.scroller{display:flex;flex:1;flex-direction:column;overflow:hidden;z-index:1}.scrollable .scroller{overflow-y:scroll}.content{color:var(--md-dialog-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-dialog-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-dialog-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-dialog-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));flex:1;font-weight:var(--md-dialog-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)));height:min-content;position:relative}slot[name=content]::slotted(*){box-sizing:border-box;padding:24px}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}.actions{position:relative}slot[name=actions]::slotted(*){box-sizing:border-box;display:flex;gap:8px;justify-content:flex-end;padding:16px 24px 24px}.has-actions slot[name=content]::slotted(*){padding-bottom:8px}md-divider{display:none;position:absolute}.has-headline.show-top-divider .headline md-divider,.has-actions.show-bottom-divider .actions md-divider{display:flex}.headline md-divider{bottom:0}.actions md-divider{top:0}@media(forced-colors: active){dialog{outline:2px solid WindowText}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Go = class extends $e {
|
|
};
|
|
Go.styles = [Zc];
|
|
Go = l([
|
|
H("md-dialog")
|
|
], Go);
|
|
const Jc = ee({
|
|
react: J,
|
|
tagName: "md-dialog",
|
|
elementClass: Go,
|
|
events: {
|
|
onClose: "close",
|
|
onShow: "show",
|
|
onOpen: "open",
|
|
onOpened: "opened",
|
|
onClosed: "closed",
|
|
onCancel: "cancel"
|
|
}
|
|
}), Lp = (r) => {
|
|
const { children: e, quick: t, returnValue: o, noFocusTrap: i, open: a, fullScreen: s, style: d, className: h, id: y, onClose: v, onShow: f, onOpen: C, onOpened: w, onClosed: A, onCancel: S } = r;
|
|
return /* @__PURE__ */ V.jsx(
|
|
Jc,
|
|
{
|
|
quick: t,
|
|
returnValue: o,
|
|
noFocusTrap: i,
|
|
open: a,
|
|
style: {
|
|
...d,
|
|
...s ? {
|
|
width: "100vw",
|
|
height: "100vh",
|
|
maxWidth: "100vw",
|
|
maxHeight: "100vh"
|
|
} : {}
|
|
},
|
|
className: h,
|
|
id: y,
|
|
onClose: v,
|
|
onShow: f,
|
|
onOpen: C,
|
|
onOpened: w,
|
|
onClosed: A,
|
|
onCancel: S,
|
|
children: e
|
|
}
|
|
);
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Qc = new Set(Object.values(Ne));
|
|
let Rs = class extends W {
|
|
/** @export */
|
|
get items() {
|
|
return this.listController.items;
|
|
}
|
|
constructor() {
|
|
super(), this.listController = new ws({
|
|
isItem: (e) => e.hasAttribute("md-list-item"),
|
|
getPossibleItems: () => this.slotItems,
|
|
isRtl: () => getComputedStyle(this).direction === "rtl",
|
|
deactivateItem: (e) => {
|
|
e.tabIndex = -1;
|
|
},
|
|
activateItem: (e) => {
|
|
e.tabIndex = 0;
|
|
},
|
|
isNavigableKey: (e) => Qc.has(e),
|
|
isActivatable: (e) => !e.disabled && e.type !== "text"
|
|
}), this.internals = // Cast needed for closure
|
|
this.attachInternals(), this.internals.role = "list", this.addEventListener("keydown", this.listController.handleKeydown);
|
|
}
|
|
render() {
|
|
return _`
|
|
<slot
|
|
@deactivate-items=${this.listController.onDeactivateItems}
|
|
@request-activation=${this.listController.onRequestActivation}
|
|
@slotchange=${this.listController.onSlotchange}>
|
|
</slot>
|
|
`;
|
|
}
|
|
/**
|
|
* Activates the next item in the list. If at the end of the list, the first
|
|
* item will be activated.
|
|
*
|
|
* @return The activated list item or `null` if there are no items.
|
|
*/
|
|
activateNextItem() {
|
|
return this.listController.activateNextItem();
|
|
}
|
|
/**
|
|
* Activates the previous item in the list. If at the start of the list, the
|
|
* last item will be activated.
|
|
*
|
|
* @return The activated list item or `null` if there are no items.
|
|
*/
|
|
activatePreviousItem() {
|
|
return this.listController.activatePreviousItem();
|
|
}
|
|
};
|
|
l([
|
|
We({ flatten: !0 })
|
|
], Rs.prototype, "slotItems", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const eu = F`:host{background:var(--md-list-container-color, var(--md-sys-color-surface, #fef7ff));color:unset;display:flex;flex-direction:column;outline:none;padding:8px 0;position:relative}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Xo = class extends Rs {
|
|
};
|
|
Xo.styles = [eu];
|
|
Xo = l([
|
|
H("md-list")
|
|
], Xo);
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const tu = Je(W);
|
|
class Ot extends tu {
|
|
constructor() {
|
|
super(...arguments), this.disabled = !1, this.type = "text", this.isListItem = !0, this.href = "", this.target = "";
|
|
}
|
|
get isDisabled() {
|
|
return this.disabled && this.type !== "link";
|
|
}
|
|
willUpdate(e) {
|
|
this.href && (this.type = "link"), super.willUpdate(e);
|
|
}
|
|
render() {
|
|
return this.renderListItem(_`
|
|
<md-item>
|
|
<div slot="container">
|
|
${this.renderRipple()} ${this.renderFocusRing()}
|
|
</div>
|
|
<slot name="start" slot="start"></slot>
|
|
<slot name="end" slot="end"></slot>
|
|
${this.renderBody()}
|
|
</md-item>
|
|
`);
|
|
}
|
|
/**
|
|
* Renders the root list item.
|
|
*
|
|
* @param content the child content of the list item.
|
|
*/
|
|
renderListItem(e) {
|
|
const t = this.type === "link";
|
|
let o;
|
|
switch (this.type) {
|
|
case "link":
|
|
o = Xe`a`;
|
|
break;
|
|
case "button":
|
|
o = Xe`button`;
|
|
break;
|
|
default:
|
|
case "text":
|
|
o = Xe`li`;
|
|
break;
|
|
}
|
|
const i = this.type !== "text", a = t && this.target ? this.target : x;
|
|
return Fr`
|
|
<${o}
|
|
id="item"
|
|
tabindex="${this.isDisabled || !i ? -1 : 0}"
|
|
?disabled=${this.isDisabled}
|
|
role="listitem"
|
|
aria-selected=${this.ariaSelected || x}
|
|
aria-checked=${this.ariaChecked || x}
|
|
aria-expanded=${this.ariaExpanded || x}
|
|
aria-haspopup=${this.ariaHasPopup || x}
|
|
class="list-item ${ye(this.getRenderClasses())}"
|
|
href=${this.href || x}
|
|
target=${a}
|
|
@focus=${this.onFocus}
|
|
>${e}</${o}>
|
|
`;
|
|
}
|
|
/**
|
|
* Handles rendering of the ripple element.
|
|
*/
|
|
renderRipple() {
|
|
return this.type === "text" ? x : _` <md-ripple
|
|
part="ripple"
|
|
for="item"
|
|
?disabled=${this.isDisabled}></md-ripple>`;
|
|
}
|
|
/**
|
|
* Handles rendering of the focus ring.
|
|
*/
|
|
renderFocusRing() {
|
|
return this.type === "text" ? x : _` <md-focus-ring
|
|
@visibility-changed=${this.onFocusRingVisibilityChanged}
|
|
part="focus-ring"
|
|
for="item"
|
|
inward></md-focus-ring>`;
|
|
}
|
|
onFocusRingVisibilityChanged(e) {
|
|
}
|
|
/**
|
|
* Classes applied to the list item root.
|
|
*/
|
|
getRenderClasses() {
|
|
return { disabled: this.isDisabled };
|
|
}
|
|
/**
|
|
* Handles rendering the headline and supporting text.
|
|
*/
|
|
renderBody() {
|
|
return _`
|
|
<slot></slot>
|
|
<slot name="overline" slot="overline"></slot>
|
|
<slot name="headline" slot="headline"></slot>
|
|
<slot name="supporting-text" slot="supporting-text"></slot>
|
|
<slot
|
|
name="trailing-supporting-text"
|
|
slot="trailing-supporting-text"></slot>
|
|
`;
|
|
}
|
|
onFocus() {
|
|
this.tabIndex === -1 && this.dispatchEvent(_s());
|
|
}
|
|
focus() {
|
|
var e;
|
|
(e = this.listItemRoot) == null || e.focus();
|
|
}
|
|
}
|
|
Ot.shadowRootOptions = {
|
|
...W.shadowRootOptions,
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], Ot.prototype, "disabled", void 0);
|
|
l([
|
|
p({ reflect: !0 })
|
|
], Ot.prototype, "type", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "md-list-item", reflect: !0 })
|
|
], Ot.prototype, "isListItem", void 0);
|
|
l([
|
|
p()
|
|
], Ot.prototype, "href", void 0);
|
|
l([
|
|
p()
|
|
], Ot.prototype, "target", void 0);
|
|
l([
|
|
G(".list-item")
|
|
], Ot.prototype, "listItemRoot", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const ru = F`:host{display:flex;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--md-list-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-list-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-list-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-list-item-pressed-state-layer-opacity, 0.12)}:host(:is([type=button]:not([disabled]),[type=link])){cursor:pointer}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;cursor:inherit;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);width:100%}.list-item.interactive{cursor:pointer}.list-item.disabled{opacity:var(--md-list-item-disabled-opacity, 0.3);pointer-events:none}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;height:100%;color:var(--md-list-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-list-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-list-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-list-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-list-item-one-line-container-height, 56px);padding-top:var(--md-list-item-top-space, 12px);padding-bottom:var(--md-list-item-bottom-space, 12px);padding-inline-start:var(--md-list-item-leading-space, 16px);padding-inline-end:var(--md-list-item-trailing-space, 16px)}md-item[multiline]{min-height:var(--md-list-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-list-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-list-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-list-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-list-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-list-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-list-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-list-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-list-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-list-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-list-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}@media(forced-colors: active){.disabled slot{color:GrayText}.list-item.disabled{color:GrayText;opacity:1}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Zo = class extends Ot {
|
|
};
|
|
Zo.styles = [ru];
|
|
Zo = l([
|
|
H("md-list-item")
|
|
], Zo);
|
|
const ou = ee({
|
|
react: J,
|
|
tagName: "md-list",
|
|
elementClass: Xo
|
|
}), Np = (r) => {
|
|
const { children: e, ...t } = r;
|
|
return /* @__PURE__ */ V.jsx(ou, { ...t, children: e });
|
|
};
|
|
ee({
|
|
react: J,
|
|
tagName: "md-list-item",
|
|
elementClass: Zo
|
|
});
|
|
function Ca() {
|
|
return Ca = Object.assign ? Object.assign.bind() : function(r) {
|
|
for (var e = 1; e < arguments.length; e++) {
|
|
var t = arguments[e];
|
|
for (var o in t) ({}).hasOwnProperty.call(t, o) && (r[o] = t[o]);
|
|
}
|
|
return r;
|
|
}, Ca.apply(null, arguments);
|
|
}
|
|
function Is(r) {
|
|
var e = /* @__PURE__ */ Object.create(null);
|
|
return function(t) {
|
|
return e[t] === void 0 && (e[t] = r(t)), e[t];
|
|
};
|
|
}
|
|
var iu = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, au = /* @__PURE__ */ Is(
|
|
function(r) {
|
|
return iu.test(r) || r.charCodeAt(0) === 111 && r.charCodeAt(1) === 110 && r.charCodeAt(2) < 91;
|
|
}
|
|
/* Z+1 */
|
|
), nu = !1;
|
|
function su(r) {
|
|
if (r.sheet)
|
|
return r.sheet;
|
|
for (var e = 0; e < document.styleSheets.length; e++)
|
|
if (document.styleSheets[e].ownerNode === r)
|
|
return document.styleSheets[e];
|
|
}
|
|
function lu(r) {
|
|
var e = document.createElement("style");
|
|
return e.setAttribute("data-emotion", r.key), r.nonce !== void 0 && e.setAttribute("nonce", r.nonce), e.appendChild(document.createTextNode("")), e.setAttribute("data-s", ""), e;
|
|
}
|
|
var du = /* @__PURE__ */ function() {
|
|
function r(t) {
|
|
var o = this;
|
|
this._insertTag = function(i) {
|
|
var a;
|
|
o.tags.length === 0 ? o.insertionPoint ? a = o.insertionPoint.nextSibling : o.prepend ? a = o.container.firstChild : a = o.before : a = o.tags[o.tags.length - 1].nextSibling, o.container.insertBefore(i, a), o.tags.push(i);
|
|
}, this.isSpeedy = t.speedy === void 0 ? !nu : t.speedy, this.tags = [], this.ctr = 0, this.nonce = t.nonce, this.key = t.key, this.container = t.container, this.prepend = t.prepend, this.insertionPoint = t.insertionPoint, this.before = null;
|
|
}
|
|
var e = r.prototype;
|
|
return e.hydrate = function(o) {
|
|
o.forEach(this._insertTag);
|
|
}, e.insert = function(o) {
|
|
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(lu(this));
|
|
var i = this.tags[this.tags.length - 1];
|
|
if (this.isSpeedy) {
|
|
var a = su(i);
|
|
try {
|
|
a.insertRule(o, a.cssRules.length);
|
|
} catch {
|
|
}
|
|
} else
|
|
i.appendChild(document.createTextNode(o));
|
|
this.ctr++;
|
|
}, e.flush = function() {
|
|
this.tags.forEach(function(o) {
|
|
var i;
|
|
return (i = o.parentNode) == null ? void 0 : i.removeChild(o);
|
|
}), this.tags = [], this.ctr = 0;
|
|
}, r;
|
|
}(), He = "-ms-", Jo = "-moz-", ae = "-webkit-", Os = "comm", Na = "rule", Ba = "decl", cu = "@import", zs = "@keyframes", uu = "@layer", hu = Math.abs, _i = String.fromCharCode, pu = Object.assign;
|
|
function fu(r, e) {
|
|
return Be(r, 0) ^ 45 ? (((e << 2 ^ Be(r, 0)) << 2 ^ Be(r, 1)) << 2 ^ Be(r, 2)) << 2 ^ Be(r, 3) : 0;
|
|
}
|
|
function Ps(r) {
|
|
return r.trim();
|
|
}
|
|
function vu(r, e) {
|
|
return (r = e.exec(r)) ? r[0] : r;
|
|
}
|
|
function ne(r, e, t) {
|
|
return r.replace(e, t);
|
|
}
|
|
function Ea(r, e) {
|
|
return r.indexOf(e);
|
|
}
|
|
function Be(r, e) {
|
|
return r.charCodeAt(e) | 0;
|
|
}
|
|
function Ir(r, e, t) {
|
|
return r.slice(e, t);
|
|
}
|
|
function dt(r) {
|
|
return r.length;
|
|
}
|
|
function ja(r) {
|
|
return r.length;
|
|
}
|
|
function ko(r, e) {
|
|
return e.push(r), r;
|
|
}
|
|
function mu(r, e) {
|
|
return r.map(e).join("");
|
|
}
|
|
var wi = 1, dr = 1, Ls = 0, Ze = 0, Ie = 0, ur = "";
|
|
function ki(r, e, t, o, i, a, s) {
|
|
return { value: r, root: e, parent: t, type: o, props: i, children: a, line: wi, column: dr, length: s, return: "" };
|
|
}
|
|
function kr(r, e) {
|
|
return pu(ki("", null, null, "", null, null, 0), r, { length: -r.length }, e);
|
|
}
|
|
function bu() {
|
|
return Ie;
|
|
}
|
|
function yu() {
|
|
return Ie = Ze > 0 ? Be(ur, --Ze) : 0, dr--, Ie === 10 && (dr = 1, wi--), Ie;
|
|
}
|
|
function Qe() {
|
|
return Ie = Ze < Ls ? Be(ur, Ze++) : 0, dr++, Ie === 10 && (dr = 1, wi++), Ie;
|
|
}
|
|
function ut() {
|
|
return Be(ur, Ze);
|
|
}
|
|
function To() {
|
|
return Ze;
|
|
}
|
|
function Ur(r, e) {
|
|
return Ir(ur, r, e);
|
|
}
|
|
function Or(r) {
|
|
switch (r) {
|
|
case 0:
|
|
case 9:
|
|
case 10:
|
|
case 13:
|
|
case 32:
|
|
return 5;
|
|
case 33:
|
|
case 43:
|
|
case 44:
|
|
case 47:
|
|
case 62:
|
|
case 64:
|
|
case 126:
|
|
case 59:
|
|
case 123:
|
|
case 125:
|
|
return 4;
|
|
case 58:
|
|
return 3;
|
|
case 34:
|
|
case 39:
|
|
case 40:
|
|
case 91:
|
|
return 2;
|
|
case 41:
|
|
case 93:
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
function Fs(r) {
|
|
return wi = dr = 1, Ls = dt(ur = r), Ze = 0, [];
|
|
}
|
|
function Ms(r) {
|
|
return ur = "", r;
|
|
}
|
|
function So(r) {
|
|
return Ps(Ur(Ze - 1, $a(r === 91 ? r + 2 : r === 40 ? r + 1 : r)));
|
|
}
|
|
function gu(r) {
|
|
for (; (Ie = ut()) && Ie < 33; )
|
|
Qe();
|
|
return Or(r) > 2 || Or(Ie) > 3 ? "" : " ";
|
|
}
|
|
function xu(r, e) {
|
|
for (; --e && Qe() && !(Ie < 48 || Ie > 102 || Ie > 57 && Ie < 65 || Ie > 70 && Ie < 97); )
|
|
;
|
|
return Ur(r, To() + (e < 6 && ut() == 32 && Qe() == 32));
|
|
}
|
|
function $a(r) {
|
|
for (; Qe(); )
|
|
switch (Ie) {
|
|
case r:
|
|
return Ze;
|
|
case 34:
|
|
case 39:
|
|
r !== 34 && r !== 39 && $a(Ie);
|
|
break;
|
|
case 40:
|
|
r === 41 && $a(r);
|
|
break;
|
|
case 92:
|
|
Qe();
|
|
break;
|
|
}
|
|
return Ze;
|
|
}
|
|
function _u(r, e) {
|
|
for (; Qe() && r + Ie !== 57; )
|
|
if (r + Ie === 84 && ut() === 47)
|
|
break;
|
|
return "/*" + Ur(e, Ze - 1) + "*" + _i(r === 47 ? r : Qe());
|
|
}
|
|
function wu(r) {
|
|
for (; !Or(ut()); )
|
|
Qe();
|
|
return Ur(r, Ze);
|
|
}
|
|
function ku(r) {
|
|
return Ms(Ao("", null, null, null, [""], r = Fs(r), 0, [0], r));
|
|
}
|
|
function Ao(r, e, t, o, i, a, s, d, h) {
|
|
for (var y = 0, v = 0, f = s, C = 0, w = 0, A = 0, S = 1, I = 1, O = 1, R = 0, B = "", U = i, P = a, q = o, D = B; I; )
|
|
switch (A = R, R = Qe()) {
|
|
case 40:
|
|
if (A != 108 && Be(D, f - 1) == 58) {
|
|
Ea(D += ne(So(R), "&", "&\f"), "&\f") != -1 && (O = -1);
|
|
break;
|
|
}
|
|
case 34:
|
|
case 39:
|
|
case 91:
|
|
D += So(R);
|
|
break;
|
|
case 9:
|
|
case 10:
|
|
case 13:
|
|
case 32:
|
|
D += gu(A);
|
|
break;
|
|
case 92:
|
|
D += xu(To() - 1, 7);
|
|
continue;
|
|
case 47:
|
|
switch (ut()) {
|
|
case 42:
|
|
case 47:
|
|
ko(Cu(_u(Qe(), To()), e, t), h);
|
|
break;
|
|
default:
|
|
D += "/";
|
|
}
|
|
break;
|
|
case 123 * S:
|
|
d[y++] = dt(D) * O;
|
|
case 125 * S:
|
|
case 59:
|
|
case 0:
|
|
switch (R) {
|
|
case 0:
|
|
case 125:
|
|
I = 0;
|
|
case 59 + v:
|
|
O == -1 && (D = ne(D, /\f/g, "")), w > 0 && dt(D) - f && ko(w > 32 ? qn(D + ";", o, t, f - 1) : qn(ne(D, " ", "") + ";", o, t, f - 2), h);
|
|
break;
|
|
case 59:
|
|
D += ";";
|
|
default:
|
|
if (ko(q = Hn(D, e, t, y, v, i, d, B, U = [], P = [], f), a), R === 123)
|
|
if (v === 0)
|
|
Ao(D, e, q, q, U, a, f, d, P);
|
|
else
|
|
switch (C === 99 && Be(D, 3) === 110 ? 100 : C) {
|
|
case 100:
|
|
case 108:
|
|
case 109:
|
|
case 115:
|
|
Ao(r, q, q, o && ko(Hn(r, q, q, 0, 0, i, d, B, i, U = [], f), P), i, P, f, d, o ? U : P);
|
|
break;
|
|
default:
|
|
Ao(D, q, q, q, [""], P, 0, d, P);
|
|
}
|
|
}
|
|
y = v = w = 0, S = O = 1, B = D = "", f = s;
|
|
break;
|
|
case 58:
|
|
f = 1 + dt(D), w = A;
|
|
default:
|
|
if (S < 1) {
|
|
if (R == 123)
|
|
--S;
|
|
else if (R == 125 && S++ == 0 && yu() == 125)
|
|
continue;
|
|
}
|
|
switch (D += _i(R), R * S) {
|
|
case 38:
|
|
O = v > 0 ? 1 : (D += "\f", -1);
|
|
break;
|
|
case 44:
|
|
d[y++] = (dt(D) - 1) * O, O = 1;
|
|
break;
|
|
case 64:
|
|
ut() === 45 && (D += So(Qe())), C = ut(), v = f = dt(B = D += wu(To())), R++;
|
|
break;
|
|
case 45:
|
|
A === 45 && dt(D) == 2 && (S = 0);
|
|
}
|
|
}
|
|
return a;
|
|
}
|
|
function Hn(r, e, t, o, i, a, s, d, h, y, v) {
|
|
for (var f = i - 1, C = i === 0 ? a : [""], w = ja(C), A = 0, S = 0, I = 0; A < o; ++A)
|
|
for (var O = 0, R = Ir(r, f + 1, f = hu(S = s[A])), B = r; O < w; ++O)
|
|
(B = Ps(S > 0 ? C[O] + " " + R : ne(R, /&\f/g, C[O]))) && (h[I++] = B);
|
|
return ki(r, e, t, i === 0 ? Na : d, h, y, v);
|
|
}
|
|
function Cu(r, e, t) {
|
|
return ki(r, e, t, Os, _i(bu()), Ir(r, 2, -2), 0);
|
|
}
|
|
function qn(r, e, t, o) {
|
|
return ki(r, e, t, Ba, Ir(r, 0, o), Ir(r, o + 1, -1), o);
|
|
}
|
|
function sr(r, e) {
|
|
for (var t = "", o = ja(r), i = 0; i < o; i++)
|
|
t += e(r[i], i, r, e) || "";
|
|
return t;
|
|
}
|
|
function Eu(r, e, t, o) {
|
|
switch (r.type) {
|
|
case uu:
|
|
if (r.children.length) break;
|
|
case cu:
|
|
case Ba:
|
|
return r.return = r.return || r.value;
|
|
case Os:
|
|
return "";
|
|
case zs:
|
|
return r.return = r.value + "{" + sr(r.children, o) + "}";
|
|
case Na:
|
|
r.value = r.props.join(",");
|
|
}
|
|
return dt(t = sr(r.children, o)) ? r.return = r.value + "{" + t + "}" : "";
|
|
}
|
|
function $u(r) {
|
|
var e = ja(r);
|
|
return function(t, o, i, a) {
|
|
for (var s = "", d = 0; d < e; d++)
|
|
s += r[d](t, o, i, a) || "";
|
|
return s;
|
|
};
|
|
}
|
|
function Tu(r) {
|
|
return function(e) {
|
|
e.root || (e = e.return) && r(e);
|
|
};
|
|
}
|
|
var Su = function(e, t, o) {
|
|
for (var i = 0, a = 0; i = a, a = ut(), i === 38 && a === 12 && (t[o] = 1), !Or(a); )
|
|
Qe();
|
|
return Ur(e, Ze);
|
|
}, Au = function(e, t) {
|
|
var o = -1, i = 44;
|
|
do
|
|
switch (Or(i)) {
|
|
case 0:
|
|
i === 38 && ut() === 12 && (t[o] = 1), e[o] += Su(Ze - 1, t, o);
|
|
break;
|
|
case 2:
|
|
e[o] += So(i);
|
|
break;
|
|
case 4:
|
|
if (i === 44) {
|
|
e[++o] = ut() === 58 ? "&\f" : "", t[o] = e[o].length;
|
|
break;
|
|
}
|
|
default:
|
|
e[o] += _i(i);
|
|
}
|
|
while (i = Qe());
|
|
return e;
|
|
}, Ru = function(e, t) {
|
|
return Ms(Au(Fs(e), t));
|
|
}, Wn = /* @__PURE__ */ new WeakMap(), Iu = function(e) {
|
|
if (!(e.type !== "rule" || !e.parent || // positive .length indicates that this rule contains pseudo
|
|
// negative .length indicates that this rule has been already prefixed
|
|
e.length < 1)) {
|
|
for (var t = e.value, o = e.parent, i = e.column === o.column && e.line === o.line; o.type !== "rule"; )
|
|
if (o = o.parent, !o) return;
|
|
if (!(e.props.length === 1 && t.charCodeAt(0) !== 58 && !Wn.get(o)) && !i) {
|
|
Wn.set(e, !0);
|
|
for (var a = [], s = Ru(t, a), d = o.props, h = 0, y = 0; h < s.length; h++)
|
|
for (var v = 0; v < d.length; v++, y++)
|
|
e.props[y] = a[h] ? s[h].replace(/&\f/g, d[v]) : d[v] + " " + s[h];
|
|
}
|
|
}
|
|
}, Ou = function(e) {
|
|
if (e.type === "decl") {
|
|
var t = e.value;
|
|
// charcode for l
|
|
t.charCodeAt(0) === 108 && // charcode for b
|
|
t.charCodeAt(2) === 98 && (e.return = "", e.value = "");
|
|
}
|
|
};
|
|
function Ds(r, e) {
|
|
switch (fu(r, e)) {
|
|
case 5103:
|
|
return ae + "print-" + r + r;
|
|
case 5737:
|
|
case 4201:
|
|
case 3177:
|
|
case 3433:
|
|
case 1641:
|
|
case 4457:
|
|
case 2921:
|
|
case 5572:
|
|
case 6356:
|
|
case 5844:
|
|
case 3191:
|
|
case 6645:
|
|
case 3005:
|
|
case 6391:
|
|
case 5879:
|
|
case 5623:
|
|
case 6135:
|
|
case 4599:
|
|
case 4855:
|
|
case 4215:
|
|
case 6389:
|
|
case 5109:
|
|
case 5365:
|
|
case 5621:
|
|
case 3829:
|
|
return ae + r + r;
|
|
case 5349:
|
|
case 4246:
|
|
case 4810:
|
|
case 6968:
|
|
case 2756:
|
|
return ae + r + Jo + r + He + r + r;
|
|
case 6828:
|
|
case 4268:
|
|
return ae + r + He + r + r;
|
|
case 6165:
|
|
return ae + r + He + "flex-" + r + r;
|
|
case 5187:
|
|
return ae + r + ne(r, /(\w+).+(:[^]+)/, ae + "box-$1$2" + He + "flex-$1$2") + r;
|
|
case 5443:
|
|
return ae + r + He + "flex-item-" + ne(r, /flex-|-self/, "") + r;
|
|
case 4675:
|
|
return ae + r + He + "flex-line-pack" + ne(r, /align-content|flex-|-self/, "") + r;
|
|
case 5548:
|
|
return ae + r + He + ne(r, "shrink", "negative") + r;
|
|
case 5292:
|
|
return ae + r + He + ne(r, "basis", "preferred-size") + r;
|
|
case 6060:
|
|
return ae + "box-" + ne(r, "-grow", "") + ae + r + He + ne(r, "grow", "positive") + r;
|
|
case 4554:
|
|
return ae + ne(r, /([^-])(transform)/g, "$1" + ae + "$2") + r;
|
|
case 6187:
|
|
return ne(ne(ne(r, /(zoom-|grab)/, ae + "$1"), /(image-set)/, ae + "$1"), r, "") + r;
|
|
case 5495:
|
|
case 3959:
|
|
return ne(r, /(image-set\([^]*)/, ae + "$1$`$1");
|
|
case 4968:
|
|
return ne(ne(r, /(.+:)(flex-)?(.*)/, ae + "box-pack:$3" + He + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + ae + r + r;
|
|
case 4095:
|
|
case 3583:
|
|
case 4068:
|
|
case 2532:
|
|
return ne(r, /(.+)-inline(.+)/, ae + "$1$2") + r;
|
|
case 8116:
|
|
case 7059:
|
|
case 5753:
|
|
case 5535:
|
|
case 5445:
|
|
case 5701:
|
|
case 4933:
|
|
case 4677:
|
|
case 5533:
|
|
case 5789:
|
|
case 5021:
|
|
case 4765:
|
|
if (dt(r) - 1 - e > 6) switch (Be(r, e + 1)) {
|
|
case 109:
|
|
if (Be(r, e + 4) !== 45) break;
|
|
case 102:
|
|
return ne(r, /(.+:)(.+)-([^]+)/, "$1" + ae + "$2-$3$1" + Jo + (Be(r, e + 3) == 108 ? "$3" : "$2-$3")) + r;
|
|
case 115:
|
|
return ~Ea(r, "stretch") ? Ds(ne(r, "stretch", "fill-available"), e) + r : r;
|
|
}
|
|
break;
|
|
case 4949:
|
|
if (Be(r, e + 1) !== 115) break;
|
|
case 6444:
|
|
switch (Be(r, dt(r) - 3 - (~Ea(r, "!important") && 10))) {
|
|
case 107:
|
|
return ne(r, ":", ":" + ae) + r;
|
|
case 101:
|
|
return ne(r, /(.+:)([^;!]+)(;|!.+)?/, "$1" + ae + (Be(r, 14) === 45 ? "inline-" : "") + "box$3$1" + ae + "$2$3$1" + He + "$2box$3") + r;
|
|
}
|
|
break;
|
|
case 5936:
|
|
switch (Be(r, e + 11)) {
|
|
case 114:
|
|
return ae + r + He + ne(r, /[svh]\w+-[tblr]{2}/, "tb") + r;
|
|
case 108:
|
|
return ae + r + He + ne(r, /[svh]\w+-[tblr]{2}/, "tb-rl") + r;
|
|
case 45:
|
|
return ae + r + He + ne(r, /[svh]\w+-[tblr]{2}/, "lr") + r;
|
|
}
|
|
return ae + r + He + r + r;
|
|
}
|
|
return r;
|
|
}
|
|
var zu = function(e, t, o, i) {
|
|
if (e.length > -1 && !e.return) switch (e.type) {
|
|
case Ba:
|
|
e.return = Ds(e.value, e.length);
|
|
break;
|
|
case zs:
|
|
return sr([kr(e, {
|
|
value: ne(e.value, "@", "@" + ae)
|
|
})], i);
|
|
case Na:
|
|
if (e.length) return mu(e.props, function(a) {
|
|
switch (vu(a, /(::plac\w+|:read-\w+)/)) {
|
|
case ":read-only":
|
|
case ":read-write":
|
|
return sr([kr(e, {
|
|
props: [ne(a, /:(read-\w+)/, ":" + Jo + "$1")]
|
|
})], i);
|
|
case "::placeholder":
|
|
return sr([kr(e, {
|
|
props: [ne(a, /:(plac\w+)/, ":" + ae + "input-$1")]
|
|
}), kr(e, {
|
|
props: [ne(a, /:(plac\w+)/, ":" + Jo + "$1")]
|
|
}), kr(e, {
|
|
props: [ne(a, /:(plac\w+)/, He + "input-$1")]
|
|
})], i);
|
|
}
|
|
return "";
|
|
});
|
|
}
|
|
}, Pu = [zu], Lu = function(e) {
|
|
var t = e.key;
|
|
if (t === "css") {
|
|
var o = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
Array.prototype.forEach.call(o, function(S) {
|
|
var I = S.getAttribute("data-emotion");
|
|
I.indexOf(" ") !== -1 && (document.head.appendChild(S), S.setAttribute("data-s", ""));
|
|
});
|
|
}
|
|
var i = e.stylisPlugins || Pu, a = {}, s, d = [];
|
|
s = e.container || document.head, Array.prototype.forEach.call(
|
|
// this means we will ignore elements which don't have a space in them which
|
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
document.querySelectorAll('style[data-emotion^="' + t + ' "]'),
|
|
function(S) {
|
|
for (var I = S.getAttribute("data-emotion").split(" "), O = 1; O < I.length; O++)
|
|
a[I[O]] = !0;
|
|
d.push(S);
|
|
}
|
|
);
|
|
var h, y = [Iu, Ou];
|
|
{
|
|
var v, f = [Eu, Tu(function(S) {
|
|
v.insert(S);
|
|
})], C = $u(y.concat(i, f)), w = function(I) {
|
|
return sr(ku(I), C);
|
|
};
|
|
h = function(I, O, R, B) {
|
|
v = R, w(I ? I + "{" + O.styles + "}" : O.styles), B && (A.inserted[O.name] = !0);
|
|
};
|
|
}
|
|
var A = {
|
|
key: t,
|
|
sheet: new du({
|
|
key: t,
|
|
container: s,
|
|
nonce: e.nonce,
|
|
speedy: e.speedy,
|
|
prepend: e.prepend,
|
|
insertionPoint: e.insertionPoint
|
|
}),
|
|
nonce: e.nonce,
|
|
inserted: a,
|
|
registered: {},
|
|
insert: h
|
|
};
|
|
return A.sheet.hydrate(d), A;
|
|
}, Fu = !0;
|
|
function Mu(r, e, t) {
|
|
var o = "";
|
|
return t.split(" ").forEach(function(i) {
|
|
r[i] !== void 0 ? e.push(r[i] + ";") : i && (o += i + " ");
|
|
}), o;
|
|
}
|
|
var Ns = function(e, t, o) {
|
|
var i = e.key + "-" + t.name;
|
|
// we only need to add the styles to the registered cache if the
|
|
// class name could be used further down
|
|
// the tree but if it's a string tag, we know it won't
|
|
// so we don't have to add it to registered cache.
|
|
// this improves memory usage since we can avoid storing the whole style string
|
|
(o === !1 || // we need to always store it if we're in compat mode and
|
|
// in node since emotion-server relies on whether a style is in
|
|
// the registered cache to know whether a style is global or not
|
|
// also, note that this check will be dead code eliminated in the browser
|
|
Fu === !1) && e.registered[i] === void 0 && (e.registered[i] = t.styles);
|
|
}, Du = function(e, t, o) {
|
|
Ns(e, t, o);
|
|
var i = e.key + "-" + t.name;
|
|
if (e.inserted[t.name] === void 0) {
|
|
var a = t;
|
|
do
|
|
e.insert(t === a ? "." + i : "", a, e.sheet, !0), a = a.next;
|
|
while (a !== void 0);
|
|
}
|
|
};
|
|
function Nu(r) {
|
|
for (var e = 0, t, o = 0, i = r.length; i >= 4; ++o, i -= 4)
|
|
t = r.charCodeAt(o) & 255 | (r.charCodeAt(++o) & 255) << 8 | (r.charCodeAt(++o) & 255) << 16 | (r.charCodeAt(++o) & 255) << 24, t = /* Math.imul(k, m): */
|
|
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), t ^= /* k >>> r: */
|
|
t >>> 24, e = /* Math.imul(k, m): */
|
|
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
(e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
|
|
switch (i) {
|
|
case 3:
|
|
e ^= (r.charCodeAt(o + 2) & 255) << 16;
|
|
case 2:
|
|
e ^= (r.charCodeAt(o + 1) & 255) << 8;
|
|
case 1:
|
|
e ^= r.charCodeAt(o) & 255, e = /* Math.imul(h, m): */
|
|
(e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16);
|
|
}
|
|
return e ^= e >>> 13, e = /* Math.imul(h, m): */
|
|
(e & 65535) * 1540483477 + ((e >>> 16) * 59797 << 16), ((e ^ e >>> 15) >>> 0).toString(36);
|
|
}
|
|
var Bu = {
|
|
animationIterationCount: 1,
|
|
aspectRatio: 1,
|
|
borderImageOutset: 1,
|
|
borderImageSlice: 1,
|
|
borderImageWidth: 1,
|
|
boxFlex: 1,
|
|
boxFlexGroup: 1,
|
|
boxOrdinalGroup: 1,
|
|
columnCount: 1,
|
|
columns: 1,
|
|
flex: 1,
|
|
flexGrow: 1,
|
|
flexPositive: 1,
|
|
flexShrink: 1,
|
|
flexNegative: 1,
|
|
flexOrder: 1,
|
|
gridRow: 1,
|
|
gridRowEnd: 1,
|
|
gridRowSpan: 1,
|
|
gridRowStart: 1,
|
|
gridColumn: 1,
|
|
gridColumnEnd: 1,
|
|
gridColumnSpan: 1,
|
|
gridColumnStart: 1,
|
|
msGridRow: 1,
|
|
msGridRowSpan: 1,
|
|
msGridColumn: 1,
|
|
msGridColumnSpan: 1,
|
|
fontWeight: 1,
|
|
lineHeight: 1,
|
|
opacity: 1,
|
|
order: 1,
|
|
orphans: 1,
|
|
scale: 1,
|
|
tabSize: 1,
|
|
widows: 1,
|
|
zIndex: 1,
|
|
zoom: 1,
|
|
WebkitLineClamp: 1,
|
|
// SVG-related properties
|
|
fillOpacity: 1,
|
|
floodOpacity: 1,
|
|
stopOpacity: 1,
|
|
strokeDasharray: 1,
|
|
strokeDashoffset: 1,
|
|
strokeMiterlimit: 1,
|
|
strokeOpacity: 1,
|
|
strokeWidth: 1
|
|
}, ju = !1, Uu = /[A-Z]|^ms/g, Vu = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Bs = function(e) {
|
|
return e.charCodeAt(1) === 45;
|
|
}, Kn = function(e) {
|
|
return e != null && typeof e != "boolean";
|
|
}, la = /* @__PURE__ */ Is(function(r) {
|
|
return Bs(r) ? r : r.replace(Uu, "-$&").toLowerCase();
|
|
}), Yn = function(e, t) {
|
|
switch (e) {
|
|
case "animation":
|
|
case "animationName":
|
|
if (typeof t == "string")
|
|
return t.replace(Vu, function(o, i, a) {
|
|
return ct = {
|
|
name: i,
|
|
styles: a,
|
|
next: ct
|
|
}, i;
|
|
});
|
|
}
|
|
return Bu[e] !== 1 && !Bs(e) && typeof t == "number" && t !== 0 ? t + "px" : t;
|
|
}, Hu = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
|
|
function zr(r, e, t) {
|
|
if (t == null)
|
|
return "";
|
|
var o = t;
|
|
if (o.__emotion_styles !== void 0)
|
|
return o;
|
|
switch (typeof t) {
|
|
case "boolean":
|
|
return "";
|
|
case "object": {
|
|
var i = t;
|
|
if (i.anim === 1)
|
|
return ct = {
|
|
name: i.name,
|
|
styles: i.styles,
|
|
next: ct
|
|
}, i.name;
|
|
var a = t;
|
|
if (a.styles !== void 0) {
|
|
var s = a.next;
|
|
if (s !== void 0)
|
|
for (; s !== void 0; )
|
|
ct = {
|
|
name: s.name,
|
|
styles: s.styles,
|
|
next: ct
|
|
}, s = s.next;
|
|
var d = a.styles + ";";
|
|
return d;
|
|
}
|
|
return qu(r, e, t);
|
|
}
|
|
case "function": {
|
|
if (r !== void 0) {
|
|
var h = ct, y = t(r);
|
|
return ct = h, zr(r, e, y);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
var v = t;
|
|
if (e == null)
|
|
return v;
|
|
var f = e[v];
|
|
return f !== void 0 ? f : v;
|
|
}
|
|
function qu(r, e, t) {
|
|
var o = "";
|
|
if (Array.isArray(t))
|
|
for (var i = 0; i < t.length; i++)
|
|
o += zr(r, e, t[i]) + ";";
|
|
else
|
|
for (var a in t) {
|
|
var s = t[a];
|
|
if (typeof s != "object") {
|
|
var d = s;
|
|
e != null && e[d] !== void 0 ? o += a + "{" + e[d] + "}" : Kn(d) && (o += la(a) + ":" + Yn(a, d) + ";");
|
|
} else {
|
|
if (a === "NO_COMPONENT_SELECTOR" && ju)
|
|
throw new Error(Hu);
|
|
if (Array.isArray(s) && typeof s[0] == "string" && (e == null || e[s[0]] === void 0))
|
|
for (var h = 0; h < s.length; h++)
|
|
Kn(s[h]) && (o += la(a) + ":" + Yn(a, s[h]) + ";");
|
|
else {
|
|
var y = zr(r, e, s);
|
|
switch (a) {
|
|
case "animation":
|
|
case "animationName": {
|
|
o += la(a) + ":" + y + ";";
|
|
break;
|
|
}
|
|
default:
|
|
o += a + "{" + y + "}";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return o;
|
|
}
|
|
var Gn = /label:\s*([^\s;{]+)\s*(;|$)/g, ct;
|
|
function Wu(r, e, t) {
|
|
if (r.length === 1 && typeof r[0] == "object" && r[0] !== null && r[0].styles !== void 0)
|
|
return r[0];
|
|
var o = !0, i = "";
|
|
ct = void 0;
|
|
var a = r[0];
|
|
if (a == null || a.raw === void 0)
|
|
o = !1, i += zr(t, e, a);
|
|
else {
|
|
var s = a;
|
|
i += s[0];
|
|
}
|
|
for (var d = 1; d < r.length; d++)
|
|
if (i += zr(t, e, r[d]), o) {
|
|
var h = a;
|
|
i += h[d];
|
|
}
|
|
Gn.lastIndex = 0;
|
|
for (var y = "", v; (v = Gn.exec(i)) !== null; )
|
|
y += "-" + v[1];
|
|
var f = Nu(i) + y;
|
|
return {
|
|
name: f,
|
|
styles: i,
|
|
next: ct
|
|
};
|
|
}
|
|
var Ku = function(e) {
|
|
return e();
|
|
}, Yu = bn.useInsertionEffect ? bn.useInsertionEffect : !1, Gu = Yu || Ku, js = /* @__PURE__ */ qe.createContext(
|
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
// because this module is primarily intended for the browser and node
|
|
// but it's also required in react native and similar environments sometimes
|
|
// and we could have a special build just for that
|
|
// but this is much easier and the native packages
|
|
// might use a different theme context in the future anyway
|
|
typeof HTMLElement < "u" ? /* @__PURE__ */ Lu({
|
|
key: "css"
|
|
}) : null
|
|
);
|
|
js.Provider;
|
|
var Xu = function(e) {
|
|
return /* @__PURE__ */ qe.forwardRef(function(t, o) {
|
|
var i = qe.useContext(js);
|
|
return e(t, i, o);
|
|
});
|
|
}, Zu = /* @__PURE__ */ qe.createContext({}), Ju = au, Qu = function(e) {
|
|
return e !== "theme";
|
|
}, Xn = function(e) {
|
|
return typeof e == "string" && // 96 is one less than the char code
|
|
// for "a" so this is checking that
|
|
// it's a lowercase character
|
|
e.charCodeAt(0) > 96 ? Ju : Qu;
|
|
}, Zn = function(e, t, o) {
|
|
var i;
|
|
if (t) {
|
|
var a = t.shouldForwardProp;
|
|
i = e.__emotion_forwardProp && a ? function(s) {
|
|
return e.__emotion_forwardProp(s) && a(s);
|
|
} : a;
|
|
}
|
|
return typeof i != "function" && o && (i = e.__emotion_forwardProp), i;
|
|
}, eh = !1, th = function(e) {
|
|
var t = e.cache, o = e.serialized, i = e.isStringTag;
|
|
return Ns(t, o, i), Gu(function() {
|
|
return Du(t, o, i);
|
|
}), null;
|
|
}, rh = function r(e, t) {
|
|
var o = e.__emotion_real === e, i = o && e.__emotion_base || e, a, s;
|
|
t !== void 0 && (a = t.label, s = t.target);
|
|
var d = Zn(e, t, o), h = d || Xn(i), y = !h("as");
|
|
return function() {
|
|
var v = arguments, f = o && e.__emotion_styles !== void 0 ? e.__emotion_styles.slice(0) : [];
|
|
if (a !== void 0 && f.push("label:" + a + ";"), v[0] == null || v[0].raw === void 0)
|
|
f.push.apply(f, v);
|
|
else {
|
|
f.push(v[0][0]);
|
|
for (var C = v.length, w = 1; w < C; w++)
|
|
f.push(v[w], v[0][w]);
|
|
}
|
|
var A = Xu(function(S, I, O) {
|
|
var R = y && S.as || i, B = "", U = [], P = S;
|
|
if (S.theme == null) {
|
|
P = {};
|
|
for (var q in S)
|
|
P[q] = S[q];
|
|
P.theme = qe.useContext(Zu);
|
|
}
|
|
typeof S.className == "string" ? B = Mu(I.registered, U, S.className) : S.className != null && (B = S.className + " ");
|
|
var D = Wu(f.concat(U), I.registered, P);
|
|
B += I.key + "-" + D.name, s !== void 0 && (B += " " + s);
|
|
var Oe = y && d === void 0 ? Xn(R) : h, Fe = {};
|
|
for (var ze in S)
|
|
y && ze === "as" || Oe(ze) && (Fe[ze] = S[ze]);
|
|
return Fe.className = B, O && (Fe.ref = O), /* @__PURE__ */ qe.createElement(qe.Fragment, null, /* @__PURE__ */ qe.createElement(th, {
|
|
cache: I,
|
|
serialized: D,
|
|
isStringTag: typeof R == "string"
|
|
}), /* @__PURE__ */ qe.createElement(R, Fe));
|
|
});
|
|
return A.displayName = a !== void 0 ? a : "Styled(" + (typeof i == "string" ? i : i.displayName || i.name || "Component") + ")", A.defaultProps = e.defaultProps, A.__emotion_real = A, A.__emotion_base = i, A.__emotion_styles = f, A.__emotion_forwardProp = d, Object.defineProperty(A, "toString", {
|
|
value: function() {
|
|
return s === void 0 && eh ? "NO_COMPONENT_SELECTOR" : "." + s;
|
|
}
|
|
}), A.withComponent = function(S, I) {
|
|
return r(S, Ca({}, t, I, {
|
|
shouldForwardProp: Zn(A, I, !0)
|
|
})).apply(void 0, f);
|
|
}, A;
|
|
};
|
|
}, oh = [
|
|
"a",
|
|
"abbr",
|
|
"address",
|
|
"area",
|
|
"article",
|
|
"aside",
|
|
"audio",
|
|
"b",
|
|
"base",
|
|
"bdi",
|
|
"bdo",
|
|
"big",
|
|
"blockquote",
|
|
"body",
|
|
"br",
|
|
"button",
|
|
"canvas",
|
|
"caption",
|
|
"cite",
|
|
"code",
|
|
"col",
|
|
"colgroup",
|
|
"data",
|
|
"datalist",
|
|
"dd",
|
|
"del",
|
|
"details",
|
|
"dfn",
|
|
"dialog",
|
|
"div",
|
|
"dl",
|
|
"dt",
|
|
"em",
|
|
"embed",
|
|
"fieldset",
|
|
"figcaption",
|
|
"figure",
|
|
"footer",
|
|
"form",
|
|
"h1",
|
|
"h2",
|
|
"h3",
|
|
"h4",
|
|
"h5",
|
|
"h6",
|
|
"head",
|
|
"header",
|
|
"hgroup",
|
|
"hr",
|
|
"html",
|
|
"i",
|
|
"iframe",
|
|
"img",
|
|
"input",
|
|
"ins",
|
|
"kbd",
|
|
"keygen",
|
|
"label",
|
|
"legend",
|
|
"li",
|
|
"link",
|
|
"main",
|
|
"map",
|
|
"mark",
|
|
"marquee",
|
|
"menu",
|
|
"menuitem",
|
|
"meta",
|
|
"meter",
|
|
"nav",
|
|
"noscript",
|
|
"object",
|
|
"ol",
|
|
"optgroup",
|
|
"option",
|
|
"output",
|
|
"p",
|
|
"param",
|
|
"picture",
|
|
"pre",
|
|
"progress",
|
|
"q",
|
|
"rp",
|
|
"rt",
|
|
"ruby",
|
|
"s",
|
|
"samp",
|
|
"script",
|
|
"section",
|
|
"select",
|
|
"small",
|
|
"source",
|
|
"span",
|
|
"strong",
|
|
"style",
|
|
"sub",
|
|
"summary",
|
|
"sup",
|
|
"table",
|
|
"tbody",
|
|
"td",
|
|
"textarea",
|
|
"tfoot",
|
|
"th",
|
|
"thead",
|
|
"time",
|
|
"title",
|
|
"tr",
|
|
"track",
|
|
"u",
|
|
"ul",
|
|
"var",
|
|
"video",
|
|
"wbr",
|
|
// SVG
|
|
"circle",
|
|
"clipPath",
|
|
"defs",
|
|
"ellipse",
|
|
"foreignObject",
|
|
"g",
|
|
"image",
|
|
"line",
|
|
"linearGradient",
|
|
"mask",
|
|
"path",
|
|
"pattern",
|
|
"polygon",
|
|
"polyline",
|
|
"radialGradient",
|
|
"rect",
|
|
"stop",
|
|
"svg",
|
|
"text",
|
|
"tspan"
|
|
], Ta = rh.bind();
|
|
oh.forEach(function(r) {
|
|
Ta[r] = Ta(r);
|
|
});
|
|
const ih = Ta.div`
|
|
display: ${(r) => r.display};
|
|
flex-direction: ${(r) => r.flexDirection};
|
|
flex-wrap: ${(r) => r.flexWrap};
|
|
justify-content: ${(r) => r.justifyContent};
|
|
align-items: ${(r) => r.alignItems};
|
|
align-content: ${(r) => r.alignContent};
|
|
gap: ${(r) => r.gap};
|
|
row-gap: ${(r) => r.rowGap};
|
|
column-gap: ${(r) => r.columnGap};
|
|
flex: ${(r) => r.flex};
|
|
flex-grow: ${(r) => r.flexGrow};
|
|
flex-shrink: ${(r) => r.flexShrink};
|
|
flex-basis: ${(r) => r.flexBasis};
|
|
flex-flow: ${(r) => r.flexFlow};
|
|
align-self: ${(r) => r.alignSelf};
|
|
order: ${(r) => r.order};
|
|
`, Us = (r) => {
|
|
const { style: e, children: t, ...o } = r;
|
|
return /* @__PURE__ */ V.jsx(ih, { style: e, ...o, children: t });
|
|
}, Bp = ({ children: r, variant: e = "span", className: t, color: o = "", align: i, style: a, noWrap: s, id: d, size: h = "auto", htmlFor: y }) => {
|
|
const v = qe.useMemo(() => o === "primary" ? "var(--md-sys-color-primary)" : o === "secondary" ? "var(--md-sys-color-secondary)" : o === "tertiary" ? "var(--md-sys-color-tertiary)" : o === "error" ? "var(--md-sys-color-error)" : o === "on-primary" ? "var(--md-sys-color-on-primary)" : o === "on-secondary" ? "var(--md-sys-color-on-secondary)" : o === "on-tertiary" ? "var(--md-sys-color-on-tertiary)" : o === "on-error" ? "var(--md-sys-color-on-error)" : o === "on-surface" ? "var(--md-sys-color-on-surface)" : o === "scrim" ? "var(--md-sys-color-scrim)" : o === "outline" ? "var(--md-sys-color-outline)" : o === "outline-variant" ? "var(--md-sys-color-outline-variant)" : o, [o]), f = qe.useMemo(() => {
|
|
if (h === "auto")
|
|
return {
|
|
h1: "large",
|
|
h2: "large",
|
|
h3: "medium",
|
|
h4: "medium",
|
|
h5: "small",
|
|
h6: "small",
|
|
p: "large",
|
|
span: "large",
|
|
label: "large"
|
|
}[e];
|
|
if (h === "small") return "small";
|
|
if (h === "medium") return "medium";
|
|
if (h === "large") return "large";
|
|
}, [h]);
|
|
return e === "h1" ? /* @__PURE__ */ V.jsx(
|
|
"h1",
|
|
{
|
|
className: t,
|
|
style: {
|
|
color: v,
|
|
fontWeight: `var(--md-sys-typescale-headline-${f}-weight)`,
|
|
fontSize: `var(--md-sys-typescale-headline-${f}-size)`,
|
|
lineHeight: `var(--md-sys-typescale-headline-${f}-line-height)`,
|
|
fontFamily: `var(--md-sys-typescale-headline-${f}-font)`,
|
|
textAlign: i,
|
|
whiteSpace: s ? "nowrap" : "normal",
|
|
...a
|
|
},
|
|
id: d,
|
|
children: r
|
|
}
|
|
) : e === "h2" ? /* @__PURE__ */ V.jsx(
|
|
"h2",
|
|
{
|
|
className: t,
|
|
style: {
|
|
color: v,
|
|
fontWeight: `var(--md-sys-typescale-headline-${f}-weight)`,
|
|
fontSize: `var(--md-sys-typescale-headline-${f}-size)`,
|
|
lineHeight: `var(--md-sys-typescale-headline-${f}-line-height)`,
|
|
fontFamily: `var(--md-sys-typescale-headline-${f}-font)`,
|
|
textAlign: i,
|
|
whiteSpace: s ? "nowrap" : "normal",
|
|
...a
|
|
},
|
|
id: d,
|
|
children: r
|
|
}
|
|
) : e === "h3" ? /* @__PURE__ */ V.jsx(
|
|
"h3",
|
|
{
|
|
className: t,
|
|
style: {
|
|
color: v,
|
|
fontWeight: `var(--md-sys-typescale-headline-${f}-weight)`,
|
|
fontSize: `var(--md-sys-typescale-headline-${f}-size)`,
|
|
lineHeight: `var(--md-sys-typescale-headline-${f}-line-height)`,
|
|
fontFamily: `var(--md-sys-typescale-headline-${f}-font)`,
|
|
textAlign: i,
|
|
whiteSpace: s ? "nowrap" : "normal",
|
|
...a
|
|
},
|
|
id: d,
|
|
children: r
|
|
}
|
|
) : e === "h4" ? /* @__PURE__ */ V.jsx(
|
|
"h4",
|
|
{
|
|
className: t,
|
|
style: {
|
|
color: v,
|
|
fontWeight: `var(--md-sys-typescale-headline-${f}-weight)`,
|
|
fontSize: `var(--md-sys-typescale-headline-${f}-size)`,
|
|
lineHeight: `var(--md-sys-typescale-headline-${f}-line-height)`,
|
|
fontFamily: `var(--md-sys-typescale-headline-${f}-font)`,
|
|
textAlign: i,
|
|
whiteSpace: s ? "nowrap" : "normal",
|
|
...a
|
|
},
|
|
id: d,
|
|
children: r
|
|
}
|
|
) : e === "h5" ? /* @__PURE__ */ V.jsx(
|
|
"h5",
|
|
{
|
|
className: t,
|
|
style: {
|
|
color: v,
|
|
fontWeight: `var(--md-sys-typescale-headline-${f}-weight)`,
|
|
fontSize: `var(--md-sys-typescale-headline-${f}-size)`,
|
|
lineHeight: `var(--md-sys-typescale-headline-${f}-line-height)`,
|
|
fontFamily: `var(--md-sys-typescale-headline-${f}-font)`,
|
|
textAlign: i,
|
|
whiteSpace: s ? "nowrap" : "normal",
|
|
...a
|
|
},
|
|
id: d,
|
|
children: r
|
|
}
|
|
) : e === "h6" ? /* @__PURE__ */ V.jsx(
|
|
"h6",
|
|
{
|
|
className: t,
|
|
style: {
|
|
color: v,
|
|
fontWeight: `var(--md-sys-typescale-headline-${f}-weight)`,
|
|
fontSize: `var(--md-sys-typescale-headline-${f}-size)`,
|
|
lineHeight: `var(--md-sys-typescale-headline-${f}-line-height)`,
|
|
fontFamily: `var(--md-sys-typescale-headline-${f}-font)`,
|
|
textAlign: i,
|
|
whiteSpace: s ? "nowrap" : "normal",
|
|
...a
|
|
},
|
|
id: d,
|
|
children: r
|
|
}
|
|
) : e === "p" ? /* @__PURE__ */ V.jsx(
|
|
"p",
|
|
{
|
|
className: t,
|
|
style: {
|
|
color: v,
|
|
fontWeight: `var(--md-sys-typescale-body-${f}-weight)`,
|
|
fontSize: `var(--md-sys-typescale-body-${f}-size)`,
|
|
lineHeight: `var(--md-sys-typescale-body-${f}-line-height)`,
|
|
fontFamily: `var(--md-sys-typescale-body-${f}-font)`,
|
|
textAlign: i,
|
|
whiteSpace: s ? "nowrap" : "normal",
|
|
...a
|
|
},
|
|
id: d,
|
|
children: r
|
|
}
|
|
) : e === "span" ? /* @__PURE__ */ V.jsx(
|
|
"span",
|
|
{
|
|
className: t,
|
|
style: {
|
|
color: v,
|
|
fontWeight: `var(--md-sys-typescale-body-${f}-weight)`,
|
|
fontSize: `var(--md-sys-typescale-body-${f}-size)`,
|
|
lineHeight: `var(--md-sys-typescale-body-${f}-line-height)`,
|
|
fontFamily: `var(--md-sys-typescale-body-${f}-font)`,
|
|
textAlign: i,
|
|
whiteSpace: s ? "nowrap" : "normal",
|
|
...a
|
|
},
|
|
id: d,
|
|
children: r
|
|
}
|
|
) : e === "label" ? /* @__PURE__ */ V.jsx(
|
|
"label",
|
|
{
|
|
htmlFor: y,
|
|
className: t,
|
|
style: {
|
|
color: v,
|
|
fontWeight: `var(--md-sys-typescale-label-${f}-weight)`,
|
|
fontSize: `var(--md-sys-typescale-label-${f}-size)`,
|
|
lineHeight: `var(--md-sys-typescale-label-${f}-line-height)`,
|
|
fontFamily: `var(--md-sys-typescale-label-${f}-font)`,
|
|
textAlign: i,
|
|
whiteSpace: s ? "nowrap" : "normal",
|
|
...a
|
|
},
|
|
id: d,
|
|
children: r
|
|
}
|
|
) : null;
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function Jn(r, e = !0) {
|
|
return e && getComputedStyle(r).getPropertyValue("direction").trim() === "rtl";
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2018 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const ah = Je(Rt(W));
|
|
let Le = class extends ah {
|
|
get name() {
|
|
return this.getAttribute("name") ?? "";
|
|
}
|
|
set name(e) {
|
|
this.setAttribute("name", e);
|
|
}
|
|
/**
|
|
* The associated form element with which this element's value will submit.
|
|
*/
|
|
get form() {
|
|
return this[je].form;
|
|
}
|
|
/**
|
|
* The labels this element is associated with.
|
|
*/
|
|
get labels() {
|
|
return this[je].labels;
|
|
}
|
|
constructor() {
|
|
super(), this.disabled = !1, this.softDisabled = !1, this.flipIconInRtl = !1, this.href = "", this.target = "", this.ariaLabelSelected = "", this.toggle = !1, this.selected = !1, this.type = "submit", this.value = "", this.flipIcon = Jn(this, this.flipIconInRtl), this.addEventListener("click", this.handleClick.bind(this));
|
|
}
|
|
willUpdate() {
|
|
this.href && (this.disabled = !1, this.softDisabled = !1);
|
|
}
|
|
render() {
|
|
const e = this.href ? Xe`div` : Xe`button`, { ariaLabel: t, ariaHasPopup: o, ariaExpanded: i } = this, a = t && this.ariaLabelSelected, s = this.toggle ? this.selected : x;
|
|
let d = x;
|
|
return this.href || (d = a && this.selected ? this.ariaLabelSelected : t), Fr`<${e}
|
|
class="icon-button ${ye(this.getRenderClasses())}"
|
|
id="button"
|
|
aria-label="${d || x}"
|
|
aria-haspopup="${!this.href && o || x}"
|
|
aria-expanded="${!this.href && i || x}"
|
|
aria-pressed="${s}"
|
|
aria-disabled=${!this.href && this.softDisabled || x}
|
|
?disabled="${!this.href && this.disabled}"
|
|
@click="${this.handleClickOnChild}">
|
|
${this.renderFocusRing()}
|
|
${this.renderRipple()}
|
|
${this.selected ? x : this.renderIcon()}
|
|
${this.selected ? this.renderSelectedIcon() : x}
|
|
${this.renderTouchTarget()}
|
|
${this.href && this.renderLink()}
|
|
</${e}>`;
|
|
}
|
|
renderLink() {
|
|
const { ariaLabel: e } = this;
|
|
return _`
|
|
<a
|
|
class="link"
|
|
id="link"
|
|
href="${this.href}"
|
|
target="${this.target || x}"
|
|
aria-label="${e || x}"></a>
|
|
`;
|
|
}
|
|
getRenderClasses() {
|
|
return {
|
|
"flip-icon": this.flipIcon,
|
|
selected: this.toggle && this.selected
|
|
};
|
|
}
|
|
renderIcon() {
|
|
return _`<span class="icon"><slot></slot></span>`;
|
|
}
|
|
renderSelectedIcon() {
|
|
return _`<span class="icon icon--selected"
|
|
><slot name="selected"><slot></slot></slot
|
|
></span>`;
|
|
}
|
|
renderTouchTarget() {
|
|
return _`<span class="touch"></span>`;
|
|
}
|
|
renderFocusRing() {
|
|
return _`<md-focus-ring
|
|
part="focus-ring"
|
|
for=${this.href ? "link" : "button"}></md-focus-ring>`;
|
|
}
|
|
renderRipple() {
|
|
const e = !this.href && (this.disabled || this.softDisabled);
|
|
return _`<md-ripple
|
|
for=${this.href ? "link" : x}
|
|
?disabled="${e}"></md-ripple>`;
|
|
}
|
|
connectedCallback() {
|
|
this.flipIcon = Jn(this, this.flipIconInRtl), super.connectedCallback();
|
|
}
|
|
/** Handles a click on this element. */
|
|
handleClick(e) {
|
|
if (!this.href && this.softDisabled) {
|
|
e.stopImmediatePropagation(), e.preventDefault();
|
|
return;
|
|
}
|
|
}
|
|
/**
|
|
* Handles a click on the child <div> or <button> element within this
|
|
* element's shadow DOM.
|
|
*/
|
|
async handleClickOnChild(e) {
|
|
await 0, !(!this.toggle || this.disabled || this.softDisabled || e.defaultPrevented) && (this.selected = !this.selected, this.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
}
|
|
};
|
|
vs(Le);
|
|
Le.formAssociated = !0;
|
|
Le.shadowRootOptions = {
|
|
mode: "open",
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], Le.prototype, "disabled", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "soft-disabled", reflect: !0 })
|
|
], Le.prototype, "softDisabled", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "flip-icon-in-rtl" })
|
|
], Le.prototype, "flipIconInRtl", void 0);
|
|
l([
|
|
p()
|
|
], Le.prototype, "href", void 0);
|
|
l([
|
|
p()
|
|
], Le.prototype, "target", void 0);
|
|
l([
|
|
p({ attribute: "aria-label-selected" })
|
|
], Le.prototype, "ariaLabelSelected", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], Le.prototype, "toggle", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], Le.prototype, "selected", void 0);
|
|
l([
|
|
p()
|
|
], Le.prototype, "type", void 0);
|
|
l([
|
|
p({ reflect: !0 })
|
|
], Le.prototype, "value", void 0);
|
|
l([
|
|
se()
|
|
], Le.prototype, "flipIcon", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ci = F`:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0);height:var(--_container-height);width:var(--_container-width);justify-content:center}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) max(0px,(48px - var(--_container-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){pointer-events:none}.icon-button{place-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:flex;place-content:center;outline:none;padding:0;position:relative;text-decoration:none;user-select:none;z-index:0;flex:1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.icon ::slotted(*){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size);font-weight:inherit}md-ripple{z-index:-1;border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}.flip-icon .icon{transform:scaleX(-1)}.icon{display:inline-flex}.link{height:100%;outline:none;position:absolute;width:100%}.touch{position:absolute;height:max(48px,100%);width:max(48px,100%)}:host([touch-target=none]) .touch{display:none}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const nh = F`:host{--_disabled-icon-color: var(--md-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-icon-button-disabled-icon-opacity, 0.38);--_icon-size: var(--md-icon-button-icon-size, 24px);--_selected-focus-icon-color: var(--md-icon-button-selected-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-icon-color: var(--md-icon-button-selected-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-color: var(--md-icon-button-selected-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-state-layer-opacity: var(--md-icon-button-selected-hover-state-layer-opacity, 0.08);--_selected-icon-color: var(--md-icon-button-selected-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-icon-color: var(--md-icon-button-selected-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-color: var(--md-icon-button-selected-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-state-layer-opacity: var(--md-icon-button-selected-pressed-state-layer-opacity, 0.12);--_state-layer-height: var(--md-icon-button-state-layer-height, 40px);--_state-layer-shape: var(--md-icon-button-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));--_state-layer-width: var(--md-icon-button-state-layer-width, 40px);--_focus-icon-color: var(--md-icon-button-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-icon-color: var(--md-icon-button-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-icon-button-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-icon-button-pressed-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-icon-button-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-icon-button-pressed-state-layer-opacity, 0.12);--_container-shape-start-start: 0;--_container-shape-start-end: 0;--_container-shape-end-end: 0;--_container-shape-end-start: 0;--_container-height: 0;--_container-width: 0;height:var(--_state-layer-height);width:var(--_state-layer-width)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_state-layer-height))/2) max(0px,(48px - var(--_state-layer-width))/2)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_state-layer-shape);--md-focus-ring-shape-start-end: var(--_state-layer-shape);--md-focus-ring-shape-end-end: var(--_state-layer-shape);--md-focus-ring-shape-end-start: var(--_state-layer-shape)}.standard{background-color:rgba(0,0,0,0);color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.standard:hover{color:var(--_hover-icon-color)}.standard:focus{color:var(--_focus-icon-color)}.standard:active{color:var(--_pressed-icon-color)}.standard:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}md-ripple{border-radius:var(--_state-layer-shape)}.standard:is(:disabled,[aria-disabled=true]){opacity:var(--_disabled-icon-opacity)}.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_selected-pressed-icon-color)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Qo = class extends Le {
|
|
getRenderClasses() {
|
|
return {
|
|
...super.getRenderClasses(),
|
|
standard: !0
|
|
};
|
|
}
|
|
};
|
|
Qo.styles = [Ci, nh];
|
|
Qo = l([
|
|
H("md-icon-button")
|
|
], Qo);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const sh = F`:host{--_container-color: var(--md-filled-icon-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-height: var(--md-filled-icon-button-container-height, 40px);--_container-width: var(--md-filled-icon-button-container-width, 40px);--_disabled-container-color: var(--md-filled-icon-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-icon-button-disabled-container-opacity, 0.12);--_disabled-icon-color: var(--md-filled-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-icon-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-icon-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-icon-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-icon-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-filled-icon-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-icon-button-icon-size, 24px);--_pressed-icon-color: var(--md-filled-icon-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-icon-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-icon-button-pressed-state-layer-opacity, 0.12);--_selected-container-color: var(--md-filled-icon-button-selected-container-color, var(--md-sys-color-primary, #6750a4));--_toggle-selected-focus-icon-color: var(--md-filled-icon-button-toggle-selected-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-icon-color: var(--md-filled-icon-button-toggle-selected-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-hover-state-layer-color: var(--md-filled-icon-button-toggle-selected-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-icon-color: var(--md-filled-icon-button-toggle-selected-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-icon-color: var(--md-filled-icon-button-toggle-selected-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_toggle-selected-pressed-state-layer-color: var(--md-filled-icon-button-toggle-selected-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_unselected-container-color: var(--md-filled-icon-button-unselected-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_toggle-focus-icon-color: var(--md-filled-icon-button-toggle-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-icon-color: var(--md-filled-icon-button-toggle-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-hover-state-layer-color: var(--md-filled-icon-button-toggle-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_toggle-icon-color: var(--md-filled-icon-button-toggle-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-icon-color: var(--md-filled-icon-button-toggle-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_toggle-pressed-state-layer-color: var(--md-filled-icon-button-toggle-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-filled-icon-button-container-shape-start-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-icon-button-container-shape-start-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-icon-button-container-shape-end-end, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-icon-button-container-shape-end-start, var(--md-filled-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)))}.icon-button{color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.icon-button:hover{color:var(--_hover-icon-color)}.icon-button:focus{color:var(--_focus-icon-color)}.icon-button:active{color:var(--_pressed-icon-color)}.icon-button:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}.icon-button::before{background-color:var(--_container-color);border-radius:inherit;content:"";inset:0;position:absolute;z-index:-1}.icon-button:is(:disabled,[aria-disabled=true])::before{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.icon-button:is(:disabled,[aria-disabled=true]) .icon{opacity:var(--_disabled-icon-opacity)}.toggle-filled{--md-ripple-hover-color: var(--_toggle-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-pressed-state-layer-color)}.toggle-filled:not(:disabled,[aria-disabled=true]){color:var(--_toggle-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-hover-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-focus-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-pressed-icon-color)}.toggle-filled:not(:disabled,[aria-disabled=true])::before{background-color:var(--_unselected-container-color)}.selected{--md-ripple-hover-color: var(--_toggle-selected-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-selected-pressed-state-layer-color)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_toggle-selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-selected-pressed-icon-color)}.selected:not(:disabled,[aria-disabled=true])::before{background-color:var(--_selected-container-color)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ei = class extends Le {
|
|
getRenderClasses() {
|
|
return {
|
|
...super.getRenderClasses(),
|
|
filled: !0,
|
|
"toggle-filled": this.toggle
|
|
};
|
|
}
|
|
};
|
|
ei.styles = [Ci, sh];
|
|
ei = l([
|
|
H("md-filled-icon-button")
|
|
], ei);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const lh = F`:host{--_container-height: var(--md-outlined-icon-button-container-height, 40px);--_container-width: var(--md-outlined-icon-button-container-width, 40px);--_disabled-icon-color: var(--md-outlined-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-icon-button-disabled-icon-opacity, 0.38);--_disabled-selected-container-color: var(--md-outlined-icon-button-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-outlined-icon-button-disabled-selected-container-opacity, 0.12);--_hover-state-layer-opacity: var(--md-outlined-icon-button-hover-state-layer-opacity, 0.08);--_icon-size: var(--md-outlined-icon-button-icon-size, 24px);--_pressed-state-layer-opacity: var(--md-outlined-icon-button-pressed-state-layer-opacity, 0.12);--_selected-container-color: var(--md-outlined-icon-button-selected-container-color, var(--md-sys-color-inverse-surface, #322f35));--_selected-focus-icon-color: var(--md-outlined-icon-button-selected-focus-icon-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_selected-hover-icon-color: var(--md-outlined-icon-button-selected-hover-icon-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_selected-hover-state-layer-color: var(--md-outlined-icon-button-selected-hover-state-layer-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_selected-icon-color: var(--md-outlined-icon-button-selected-icon-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_selected-pressed-icon-color: var(--md-outlined-icon-button-selected-pressed-icon-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_selected-pressed-state-layer-color: var(--md-outlined-icon-button-selected-pressed-state-layer-color, var(--md-sys-color-inverse-on-surface, #f5eff7));--_disabled-outline-color: var(--md-outlined-icon-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-icon-button-disabled-outline-opacity, 0.12);--_focus-icon-color: var(--md-outlined-icon-button-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-icon-color: var(--md-outlined-icon-button-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-outlined-icon-button-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_icon-color: var(--md-outlined-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-outlined-icon-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-icon-button-outline-width, 1px);--_pressed-icon-color: var(--md-outlined-icon-button-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-outlined-icon-button-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-outlined-icon-button-container-shape-start-start, var(--md-outlined-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-icon-button-container-shape-start-end, var(--md-outlined-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-icon-button-container-shape-end-end, var(--md-outlined-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-icon-button-container-shape-end-start, var(--md-outlined-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)))}.outlined{background-color:rgba(0,0,0,0);color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.outlined::before{border-color:var(--_outline-color);border-width:var(--_outline-width)}.outlined:hover{color:var(--_hover-icon-color)}.outlined:focus{color:var(--_focus-icon-color)}.outlined:active{color:var(--_pressed-icon-color)}.outlined:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}.outlined:is(:disabled,[aria-disabled=true])::before{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}.outlined:is(:disabled,[aria-disabled=true]) .icon{opacity:var(--_disabled-icon-opacity)}.outlined::before{block-size:100%;border-style:solid;border-radius:inherit;box-sizing:border-box;content:"";inline-size:100%;inset:0;pointer-events:none;position:absolute;z-index:-1}.outlined.selected::before{border-width:0}.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_selected-pressed-icon-color)}.selected:not(:disabled,[aria-disabled=true])::before{background-color:var(--_selected-container-color)}.selected:is(:disabled,[aria-disabled=true])::before{background-color:var(--_disabled-selected-container-color);opacity:var(--_disabled-selected-container-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])){--_disabled-outline-opacity: 1}.selected::before{border-color:CanvasText;border-width:var(--_outline-width)}.selected:is(:disabled,[aria-disabled=true])::before{border-color:GrayText;opacity:1}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ti = class extends Le {
|
|
getRenderClasses() {
|
|
return {
|
|
...super.getRenderClasses(),
|
|
outlined: !0
|
|
};
|
|
}
|
|
};
|
|
ti.styles = [Ci, lh];
|
|
ti = l([
|
|
H("md-outlined-icon-button")
|
|
], ti);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const dh = F`:host{--_container-color: var(--md-filled-tonal-icon-button-container-color, var(--md-sys-color-secondary-container, #e8def8));--_container-height: var(--md-filled-tonal-icon-button-container-height, 40px);--_container-width: var(--md-filled-tonal-icon-button-container-width, 40px);--_disabled-container-color: var(--md-filled-tonal-icon-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-opacity: var(--md-filled-tonal-icon-button-disabled-container-opacity, 0.12);--_disabled-icon-color: var(--md-filled-tonal-icon-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-tonal-icon-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-tonal-icon-button-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-icon-color: var(--md-filled-tonal-icon-button-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-color: var(--md-filled-tonal-icon-button-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_hover-state-layer-opacity: var(--md-filled-tonal-icon-button-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-filled-tonal-icon-button-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_icon-size: var(--md-filled-tonal-icon-button-icon-size, 24px);--_pressed-icon-color: var(--md-filled-tonal-icon-button-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-color: var(--md-filled-tonal-icon-button-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filled-tonal-icon-button-pressed-state-layer-opacity, 0.12);--_selected-container-color: var(--md-filled-tonal-icon-button-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_toggle-selected-focus-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-hover-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-hover-state-layer-color: var(--md-filled-tonal-icon-button-toggle-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-pressed-icon-color: var(--md-filled-tonal-icon-button-toggle-selected-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_toggle-selected-pressed-state-layer-color: var(--md-filled-tonal-icon-button-toggle-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_unselected-container-color: var(--md-filled-tonal-icon-button-unselected-container-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_toggle-focus-icon-color: var(--md-filled-tonal-icon-button-toggle-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-hover-icon-color: var(--md-filled-tonal-icon-button-toggle-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-hover-state-layer-color: var(--md-filled-tonal-icon-button-toggle-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-icon-color: var(--md-filled-tonal-icon-button-toggle-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-pressed-icon-color: var(--md-filled-tonal-icon-button-toggle-pressed-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_toggle-pressed-state-layer-color: var(--md-filled-tonal-icon-button-toggle-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-filled-tonal-icon-button-container-shape-start-start, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-tonal-icon-button-container-shape-start-end, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-tonal-icon-button-container-shape-end-end, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-tonal-icon-button-container-shape-end-start, var(--md-filled-tonal-icon-button-container-shape, var(--md-sys-shape-corner-full, 9999px)))}.icon-button{color:var(--_icon-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}.icon-button:hover{color:var(--_hover-icon-color)}.icon-button:focus{color:var(--_focus-icon-color)}.icon-button:active{color:var(--_pressed-icon-color)}.icon-button:is(:disabled,[aria-disabled=true]){color:var(--_disabled-icon-color)}.icon-button::before{background-color:var(--_container-color);border-radius:inherit;content:"";inset:0;position:absolute;z-index:-1}.icon-button:is(:disabled,[aria-disabled=true])::before{background-color:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}.icon-button:is(:disabled,[aria-disabled=true]) .icon{opacity:var(--_disabled-icon-opacity)}.toggle-filled-tonal{--md-ripple-hover-color: var(--_toggle-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-pressed-state-layer-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]){color:var(--_toggle-icon-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-hover-icon-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-focus-icon-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-pressed-icon-color)}.toggle-filled-tonal:not(:disabled,[aria-disabled=true])::before{background-color:var(--_unselected-container-color)}.selected{--md-ripple-hover-color: var(--_toggle-selected-hover-state-layer-color);--md-ripple-pressed-color: var(--_toggle-selected-pressed-state-layer-color)}.selected:not(:disabled,[aria-disabled=true]){color:var(--_toggle-selected-icon-color)}.selected:not(:disabled,[aria-disabled=true]):hover{color:var(--_toggle-selected-hover-icon-color)}.selected:not(:disabled,[aria-disabled=true]):focus{color:var(--_toggle-selected-focus-icon-color)}.selected:not(:disabled,[aria-disabled=true]):active{color:var(--_toggle-selected-pressed-icon-color)}.selected:not(:disabled,[aria-disabled=true])::before{background-color:var(--_selected-container-color)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ri = class extends Le {
|
|
getRenderClasses() {
|
|
return {
|
|
...super.getRenderClasses(),
|
|
"filled-tonal": !0,
|
|
"toggle-filled-tonal": this.toggle
|
|
};
|
|
}
|
|
};
|
|
ri.styles = [Ci, dh];
|
|
ri = l([
|
|
H("md-filled-tonal-icon-button")
|
|
], ri);
|
|
const ch = ee({
|
|
react: J,
|
|
tagName: "md-icon-button",
|
|
elementClass: Qo,
|
|
events: {
|
|
onChange: "change",
|
|
onInput: "input",
|
|
onClick: "click"
|
|
}
|
|
}), uh = ee({
|
|
react: J,
|
|
tagName: "md-filled-icon-button",
|
|
elementClass: ei,
|
|
events: {
|
|
onChange: "change",
|
|
onInput: "input",
|
|
onClick: "click"
|
|
}
|
|
}), hh = ee({
|
|
react: J,
|
|
tagName: "md-outlined-icon-button",
|
|
elementClass: ti,
|
|
events: {
|
|
onChange: "change",
|
|
onInput: "input",
|
|
onClick: "click"
|
|
}
|
|
}), ph = ee({
|
|
react: J,
|
|
tagName: "md-filled-tonal-icon-button",
|
|
elementClass: ri,
|
|
events: {
|
|
onChange: "change",
|
|
onInput: "input",
|
|
onClick: "click"
|
|
}
|
|
}), Wp = (r) => {
|
|
switch (r.variant || "standard") {
|
|
case "filled":
|
|
return /* @__PURE__ */ V.jsx(uh, { ...r });
|
|
case "outlined":
|
|
return /* @__PURE__ */ V.jsx(hh, { ...r });
|
|
case "filled-tonal":
|
|
return /* @__PURE__ */ V.jsx(ph, { ...r });
|
|
default:
|
|
return /* @__PURE__ */ V.jsx(ch, { ...r });
|
|
}
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const fh = Je(W);
|
|
class gt extends fh {
|
|
/**
|
|
* Whether or not the primary ripple is disabled (defaults to `disabled`).
|
|
* Some chip actions such as links cannot be disabled.
|
|
*/
|
|
get rippleDisabled() {
|
|
return this.disabled || this.softDisabled;
|
|
}
|
|
constructor() {
|
|
super(), this.disabled = !1, this.softDisabled = !1, this.alwaysFocusable = !1, this.label = "", this.hasIcon = !1, this.addEventListener("click", this.handleClick.bind(this));
|
|
}
|
|
focus(e) {
|
|
this.disabled && !this.alwaysFocusable || super.focus(e);
|
|
}
|
|
render() {
|
|
return _`
|
|
<div class="container ${ye(this.getContainerClasses())}">
|
|
${this.renderContainerContent()}
|
|
</div>
|
|
`;
|
|
}
|
|
updated(e) {
|
|
e.has("disabled") && e.get("disabled") !== void 0 && this.dispatchEvent(new Event("update-focus", { bubbles: !0 }));
|
|
}
|
|
getContainerClasses() {
|
|
return {
|
|
disabled: this.disabled || this.softDisabled,
|
|
"has-icon": this.hasIcon
|
|
};
|
|
}
|
|
renderContainerContent() {
|
|
return _`
|
|
${this.renderOutline()}
|
|
<md-focus-ring part="focus-ring" for=${this.primaryId}></md-focus-ring>
|
|
<md-ripple
|
|
for=${this.primaryId}
|
|
?disabled=${this.rippleDisabled}></md-ripple>
|
|
${this.renderPrimaryAction(this.renderPrimaryContent())}
|
|
`;
|
|
}
|
|
renderOutline() {
|
|
return _`<span class="outline"></span>`;
|
|
}
|
|
renderLeadingIcon() {
|
|
return _`<slot name="icon" @slotchange=${this.handleIconChange}></slot>`;
|
|
}
|
|
renderPrimaryContent() {
|
|
return _`
|
|
<span class="leading icon" aria-hidden="true">
|
|
${this.renderLeadingIcon()}
|
|
</span>
|
|
<span class="label">
|
|
<span class="label-text" id="label">
|
|
${this.label ? this.label : _`<slot></slot>`}
|
|
</span>
|
|
</span>
|
|
<span class="touch"></span>
|
|
`;
|
|
}
|
|
handleIconChange(e) {
|
|
const t = e.target;
|
|
this.hasIcon = t.assignedElements({ flatten: !0 }).length > 0;
|
|
}
|
|
handleClick(e) {
|
|
if (this.softDisabled || this.disabled && this.alwaysFocusable) {
|
|
e.stopImmediatePropagation(), e.preventDefault();
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
gt.shadowRootOptions = {
|
|
...W.shadowRootOptions,
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], gt.prototype, "disabled", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "soft-disabled", reflect: !0 })
|
|
], gt.prototype, "softDisabled", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "always-focusable" })
|
|
], gt.prototype, "alwaysFocusable", void 0);
|
|
l([
|
|
p()
|
|
], gt.prototype, "label", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0, attribute: "has-icon" })
|
|
], gt.prototype, "hasIcon", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Ei = class extends gt {
|
|
constructor() {
|
|
super(...arguments), this.elevated = !1, this.href = "", this.target = "";
|
|
}
|
|
get primaryId() {
|
|
return this.href ? "link" : "button";
|
|
}
|
|
get rippleDisabled() {
|
|
return !this.href && (this.disabled || this.softDisabled);
|
|
}
|
|
getContainerClasses() {
|
|
return {
|
|
...super.getContainerClasses(),
|
|
// Link chips cannot be disabled
|
|
disabled: !this.href && (this.disabled || this.softDisabled),
|
|
elevated: this.elevated,
|
|
link: !!this.href
|
|
};
|
|
}
|
|
renderPrimaryAction(e) {
|
|
const { ariaLabel: t } = this;
|
|
return this.href ? _`
|
|
<a
|
|
class="primary action"
|
|
id="link"
|
|
aria-label=${t || x}
|
|
href=${this.href}
|
|
target=${this.target || x}
|
|
>${e}</a
|
|
>
|
|
` : _`
|
|
<button
|
|
class="primary action"
|
|
id="button"
|
|
aria-label=${t || x}
|
|
aria-disabled=${this.softDisabled || x}
|
|
?disabled=${this.disabled && !this.alwaysFocusable}
|
|
type="button"
|
|
>${e}</button
|
|
>
|
|
`;
|
|
}
|
|
renderOutline() {
|
|
return this.elevated ? _`<md-elevation part="elevation"></md-elevation>` : super.renderOutline();
|
|
}
|
|
};
|
|
l([
|
|
p({ type: Boolean })
|
|
], Ei.prototype, "elevated", void 0);
|
|
l([
|
|
p()
|
|
], Ei.prototype, "href", void 0);
|
|
l([
|
|
p()
|
|
], Ei.prototype, "target", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const vh = F`:host{--_container-height: var(--md-assist-chip-container-height, 32px);--_disabled-label-text-color: var(--md-assist-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-assist-chip-disabled-label-text-opacity, 0.38);--_elevated-container-color: var(--md-assist-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_elevated-container-elevation: var(--md-assist-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-assist-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-assist-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-assist-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-assist-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-assist-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-assist-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-assist-chip-elevated-pressed-container-elevation, 1);--_focus-label-text-color: var(--md-assist-chip-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-assist-chip-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-assist-chip-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-assist-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-assist-chip-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-assist-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-assist-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-assist-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-assist-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-assist-chip-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-assist-chip-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-assist-chip-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-assist-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-assist-chip-disabled-outline-opacity, 0.12);--_focus-outline-color: var(--md-assist-chip-focus-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_outline-color: var(--md-assist-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-assist-chip-outline-width, 1px);--_disabled-leading-icon-color: var(--md-assist-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-assist-chip-disabled-leading-icon-opacity, 0.38);--_focus-leading-icon-color: var(--md-assist-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-assist-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-assist-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-assist-chip-icon-size, 18px);--_pressed-leading-icon-color: var(--md-assist-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-assist-chip-container-shape-start-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-assist-chip-container-shape-start-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-assist-chip-container-shape-end-end, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-assist-chip-container-shape-end-start, var(--md-assist-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-assist-chip-leading-space, 16px);--_trailing-space: var(--md-assist-chip-trailing-space, 16px);--_icon-label-space: var(--md-assist-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-assist-chip-with-leading-icon-leading-space, 8px)}@media(forced-colors: active){.link .outline{border-color:ActiveText}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Vs = F`.elevated{--md-elevation-level: var(--_elevated-container-elevation);--md-elevation-shadow-color: var(--_elevated-container-shadow-color)}.elevated::before{background:var(--_elevated-container-color)}.elevated:hover{--md-elevation-level: var(--_elevated-hover-container-elevation)}.elevated:focus-within{--md-elevation-level: var(--_elevated-focus-container-elevation)}.elevated:active{--md-elevation-level: var(--_elevated-pressed-container-elevation)}.elevated.disabled{--md-elevation-level: var(--_elevated-disabled-container-elevation)}.elevated.disabled::before{background:var(--_elevated-disabled-container-color);opacity:var(--_elevated-disabled-container-opacity)}@media(forced-colors: active){.elevated md-elevation{border:1px solid CanvasText}.elevated.disabled md-elevation{border-color:GrayText}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ua = F`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);display:inline-flex;height:var(--_container-height);cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}:host(:is([disabled],[soft-disabled])){pointer-events:none}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.container{border-radius:inherit;box-sizing:border-box;display:flex;height:100%;position:relative;width:100%}.container::before{border-radius:inherit;content:"";inset:0;pointer-events:none;position:absolute}.container:not(.disabled){cursor:pointer}.container.disabled{pointer-events:none}.cell{display:flex}.action{align-items:baseline;appearance:none;background:none;border:none;border-radius:inherit;display:flex;outline:none;padding:0;position:relative;text-decoration:none}.primary.action{min-width:0;padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space)}.has-icon .primary.action{padding-inline-start:var(--_with-leading-icon-leading-space)}.touch{height:48px;inset:50% 0 0;position:absolute;transform:translateY(-50%);width:100%}:host([touch-target=none]) .touch{display:none}.outline{border:var(--_outline-width) solid var(--_outline-color);border-radius:inherit;inset:0;pointer-events:none;position:absolute}:where(:focus) .outline{border-color:var(--_focus-outline-color)}:where(.disabled) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}md-ripple{border-radius:inherit}.label,.icon,.touch{z-index:1}.label{align-items:center;color:var(--_label-text-color);display:flex;font-family:var(--_label-text-font);font-size:var(--_label-text-size);font-weight:var(--_label-text-weight);height:100%;line-height:var(--_label-text-line-height);overflow:hidden;user-select:none}.label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(:hover) .label{color:var(--_hover-label-text-color)}:where(:focus) .label{color:var(--_focus-label-text-color)}:where(:active) .label{color:var(--_pressed-label-text-color)}:where(.disabled) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}.icon{align-self:center;display:flex;fill:currentColor;position:relative}.icon ::slotted(:first-child){font-size:var(--_icon-size);height:var(--_icon-size);width:var(--_icon-size)}.leading.icon{color:var(--_leading-icon-color)}.leading.icon ::slotted(*),.leading.icon svg{margin-inline-end:var(--_icon-label-space)}:where(:hover) .leading.icon{color:var(--_hover-leading-icon-color)}:where(:focus) .leading.icon{color:var(--_focus-leading-icon-color)}:where(:active) .leading.icon{color:var(--_pressed-leading-icon-color)}:where(.disabled) .leading.icon{color:var(--_disabled-leading-icon-color);opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){:where(.disabled) :is(.label,.outline,.leading.icon){color:GrayText;opacity:1}}a,button{text-transform:inherit}a,button:not(:disabled,[aria-disabled=true]){cursor:inherit}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let oi = class extends Ei {
|
|
};
|
|
oi.styles = [Ua, Vs, vh];
|
|
oi = l([
|
|
H("md-assist-chip")
|
|
], oi);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Hs = class extends W {
|
|
get chips() {
|
|
return this.childElements.filter((e) => e instanceof gt);
|
|
}
|
|
constructor() {
|
|
super(), this.internals = // Cast needed for closure
|
|
this.attachInternals(), this.addEventListener("focusin", this.updateTabIndices.bind(this)), this.addEventListener("update-focus", this.updateTabIndices.bind(this)), this.addEventListener("keydown", this.handleKeyDown.bind(this)), this.internals.role = "toolbar";
|
|
}
|
|
render() {
|
|
return _`<slot @slotchange=${this.updateTabIndices}></slot>`;
|
|
}
|
|
handleKeyDown(e) {
|
|
const t = e.key === "ArrowLeft", o = e.key === "ArrowRight", i = e.key === "Home", a = e.key === "End";
|
|
if (!t && !o && !i && !a)
|
|
return;
|
|
const { chips: s } = this;
|
|
if (s.length < 2)
|
|
return;
|
|
if (e.preventDefault(), i || a) {
|
|
const C = i ? 0 : s.length - 1;
|
|
s[C].focus({ trailing: a }), this.updateTabIndices();
|
|
return;
|
|
}
|
|
const h = getComputedStyle(this).direction === "rtl" ? t : o, y = s.find((C) => C.matches(":focus-within"));
|
|
if (!y) {
|
|
(h ? s[0] : s[s.length - 1]).focus({ trailing: !h }), this.updateTabIndices();
|
|
return;
|
|
}
|
|
const v = s.indexOf(y);
|
|
let f = h ? v + 1 : v - 1;
|
|
for (; f !== v; ) {
|
|
f >= s.length ? f = 0 : f < 0 && (f = s.length - 1);
|
|
const C = s[f];
|
|
if (C.disabled && !C.alwaysFocusable) {
|
|
h ? f++ : f--;
|
|
continue;
|
|
}
|
|
C.focus({ trailing: !h }), this.updateTabIndices();
|
|
break;
|
|
}
|
|
}
|
|
updateTabIndices() {
|
|
const { chips: e } = this;
|
|
let t;
|
|
for (const o of e) {
|
|
const i = o.alwaysFocusable || !o.disabled;
|
|
if (o.matches(":focus-within") && i) {
|
|
t = o;
|
|
continue;
|
|
}
|
|
i && !t && (t = o), o.tabIndex = -1;
|
|
}
|
|
t && (t.tabIndex = 0);
|
|
}
|
|
};
|
|
l([
|
|
We()
|
|
], Hs.prototype, "childElements", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const mh = F`:host{display:flex;flex-wrap:wrap;gap:8px}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ii = class extends Hs {
|
|
};
|
|
ii.styles = [mh];
|
|
ii = l([
|
|
H("md-chip-set")
|
|
], ii);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Co = "aria-label-remove";
|
|
class qs extends gt {
|
|
get ariaLabelRemove() {
|
|
if (this.hasAttribute(Co))
|
|
return this.getAttribute(Co);
|
|
const { ariaLabel: e } = this;
|
|
return e || this.label ? `Remove ${e || this.label}` : null;
|
|
}
|
|
set ariaLabelRemove(e) {
|
|
const t = this.ariaLabelRemove;
|
|
e !== t && (e === null ? this.removeAttribute(Co) : this.setAttribute(Co, e), this.requestUpdate());
|
|
}
|
|
constructor() {
|
|
super(), this.handleTrailingActionFocus = this.handleTrailingActionFocus.bind(this), this.addEventListener("keydown", this.handleKeyDown.bind(this));
|
|
}
|
|
focus(e) {
|
|
if ((this.alwaysFocusable || !this.disabled) && (e != null && e.trailing) && this.trailingAction) {
|
|
this.trailingAction.focus(e);
|
|
return;
|
|
}
|
|
super.focus(e);
|
|
}
|
|
renderContainerContent() {
|
|
return _`
|
|
${super.renderContainerContent()}
|
|
${this.renderTrailingAction(this.handleTrailingActionFocus)}
|
|
`;
|
|
}
|
|
handleKeyDown(e) {
|
|
var y, v;
|
|
const t = e.key === "ArrowLeft", o = e.key === "ArrowRight";
|
|
if (!t && !o || !this.primaryAction || !this.trailingAction)
|
|
return;
|
|
const a = getComputedStyle(this).direction === "rtl" ? t : o, s = (y = this.primaryAction) == null ? void 0 : y.matches(":focus-within"), d = (v = this.trailingAction) == null ? void 0 : v.matches(":focus-within");
|
|
if (a && d || !a && s)
|
|
return;
|
|
e.preventDefault(), e.stopPropagation(), (a ? this.trailingAction : this.primaryAction).focus();
|
|
}
|
|
handleTrailingActionFocus() {
|
|
const { primaryAction: e, trailingAction: t } = this;
|
|
!e || !t || (e.tabIndex = -1, t.addEventListener("focusout", () => {
|
|
e.tabIndex = 0;
|
|
}, { once: !0 }));
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
function Ws({ ariaLabel: r, disabled: e, focusListener: t, tabbable: o = !1 }) {
|
|
return _`
|
|
<span id="remove-label" hidden aria-hidden="true">Remove</span>
|
|
<button
|
|
class="trailing action"
|
|
aria-label=${r || x}
|
|
aria-labelledby=${r ? x : "remove-label label"}
|
|
tabindex=${o ? x : -1}
|
|
@click=${bh}
|
|
@focus=${t}>
|
|
<md-focus-ring part="trailing-focus-ring"></md-focus-ring>
|
|
<md-ripple ?disabled=${e}></md-ripple>
|
|
<span class="trailing icon" aria-hidden="true">
|
|
<slot name="remove-trailing-icon">
|
|
<svg viewBox="0 96 960 960">
|
|
<path
|
|
d="m249 849-42-42 231-231-231-231 42-42 231 231 231-231 42 42-231 231 231 231-42 42-231-231-231 231Z" />
|
|
</svg>
|
|
</slot>
|
|
</span>
|
|
<span class="touch"></span>
|
|
</button>
|
|
`;
|
|
}
|
|
function bh(r) {
|
|
this.disabled || this.softDisabled || (r.stopPropagation(), !this.dispatchEvent(new Event("remove", { cancelable: !0 }))) || this.remove();
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Yt = class extends qs {
|
|
constructor() {
|
|
super(...arguments), this.elevated = !1, this.removable = !1, this.selected = !1, this.hasSelectedIcon = !1;
|
|
}
|
|
get primaryId() {
|
|
return "button";
|
|
}
|
|
getContainerClasses() {
|
|
return {
|
|
...super.getContainerClasses(),
|
|
elevated: this.elevated,
|
|
selected: this.selected,
|
|
"has-trailing": this.removable,
|
|
"has-icon": this.hasIcon || this.selected
|
|
};
|
|
}
|
|
renderPrimaryAction(e) {
|
|
const { ariaLabel: t } = this;
|
|
return _`
|
|
<button
|
|
class="primary action"
|
|
id="button"
|
|
aria-label=${t || x}
|
|
aria-pressed=${this.selected}
|
|
aria-disabled=${this.softDisabled || x}
|
|
?disabled=${this.disabled && !this.alwaysFocusable}
|
|
@click=${this.handleClickOnChild}
|
|
>${e}</button
|
|
>
|
|
`;
|
|
}
|
|
renderLeadingIcon() {
|
|
return this.selected ? _`
|
|
<slot name="selected-icon">
|
|
<svg class="checkmark" viewBox="0 0 18 18" aria-hidden="true">
|
|
<path
|
|
d="M6.75012 12.1274L3.62262 8.99988L2.55762 10.0574L6.75012 14.2499L15.7501 5.24988L14.6926 4.19238L6.75012 12.1274Z" />
|
|
</svg>
|
|
</slot>
|
|
` : super.renderLeadingIcon();
|
|
}
|
|
renderTrailingAction(e) {
|
|
return this.removable ? Ws({
|
|
focusListener: e,
|
|
ariaLabel: this.ariaLabelRemove,
|
|
disabled: this.disabled || this.softDisabled
|
|
}) : x;
|
|
}
|
|
renderOutline() {
|
|
return this.elevated ? _`<md-elevation part="elevation"></md-elevation>` : super.renderOutline();
|
|
}
|
|
handleClickOnChild(e) {
|
|
if (this.disabled || this.softDisabled)
|
|
return;
|
|
const t = this.selected;
|
|
if (this.selected = !this.selected, !At(this, e)) {
|
|
this.selected = t;
|
|
return;
|
|
}
|
|
}
|
|
};
|
|
l([
|
|
p({ type: Boolean })
|
|
], Yt.prototype, "elevated", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], Yt.prototype, "removable", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], Yt.prototype, "selected", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0, attribute: "has-selected-icon" })
|
|
], Yt.prototype, "hasSelectedIcon", void 0);
|
|
l([
|
|
G(".primary.action")
|
|
], Yt.prototype, "primaryAction", void 0);
|
|
l([
|
|
G(".trailing.action")
|
|
], Yt.prototype, "trailingAction", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const yh = F`:host{--_container-height: var(--md-filter-chip-container-height, 32px);--_disabled-label-text-color: var(--md-filter-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filter-chip-disabled-label-text-opacity, 0.38);--_elevated-container-elevation: var(--md-filter-chip-elevated-container-elevation, 1);--_elevated-container-shadow-color: var(--md-filter-chip-elevated-container-shadow-color, var(--md-sys-color-shadow, #000));--_elevated-disabled-container-color: var(--md-filter-chip-elevated-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_elevated-disabled-container-elevation: var(--md-filter-chip-elevated-disabled-container-elevation, 0);--_elevated-disabled-container-opacity: var(--md-filter-chip-elevated-disabled-container-opacity, 0.12);--_elevated-focus-container-elevation: var(--md-filter-chip-elevated-focus-container-elevation, 1);--_elevated-hover-container-elevation: var(--md-filter-chip-elevated-hover-container-elevation, 2);--_elevated-pressed-container-elevation: var(--md-filter-chip-elevated-pressed-container-elevation, 1);--_elevated-selected-container-color: var(--md-filter-chip-elevated-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_label-text-font: var(--md-filter-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filter-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filter-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filter-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-focus-label-text-color: var(--md-filter-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-filter-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-filter-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-filter-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-filter-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-label-text-color: var(--md-filter-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-filter-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_selected-pressed-state-layer-opacity: var(--md-filter-chip-selected-pressed-state-layer-opacity, 0.12);--_elevated-container-color: var(--md-filter-chip-elevated-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_disabled-outline-color: var(--md-filter-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-filter-chip-disabled-outline-opacity, 0.12);--_disabled-selected-container-color: var(--md-filter-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-filter-chip-disabled-selected-container-opacity, 0.12);--_focus-outline-color: var(--md-filter-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-filter-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-filter-chip-outline-width, 1px);--_selected-container-color: var(--md-filter-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-outline-width: var(--md-filter-chip-selected-outline-width, 0px);--_focus-label-text-color: var(--md-filter-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-filter-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-filter-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-filter-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filter-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-filter-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-filter-chip-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_pressed-state-layer-opacity: var(--md-filter-chip-pressed-state-layer-opacity, 0.12);--_icon-size: var(--md-filter-chip-icon-size, 18px);--_disabled-leading-icon-color: var(--md-filter-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-filter-chip-disabled-leading-icon-opacity, 0.38);--_selected-focus-leading-icon-color: var(--md-filter-chip-selected-focus-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-leading-icon-color: var(--md-filter-chip-selected-hover-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-leading-icon-color: var(--md-filter-chip-selected-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-leading-icon-color: var(--md-filter-chip-selected-pressed-leading-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-leading-icon-color: var(--md-filter-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-filter-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-filter-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-filter-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-filter-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-filter-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-filter-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-filter-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-filter-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-filter-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-filter-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-filter-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-filter-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-filter-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-filter-chip-container-shape-start-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-filter-chip-container-shape-start-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-filter-chip-container-shape-end-end, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-filter-chip-container-shape-end-start, var(--md-filter-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-filter-chip-leading-space, 16px);--_trailing-space: var(--md-filter-chip-trailing-space, 16px);--_icon-label-space: var(--md-filter-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-filter-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-filter-chip-with-trailing-icon-trailing-space, 8px)}.selected.elevated::before{background:var(--_elevated-selected-container-color)}.checkmark{height:var(--_icon-size);width:var(--_icon-size)}.disabled .checkmark{opacity:var(--_disabled-leading-icon-opacity)}@media(forced-colors: active){.disabled .checkmark{opacity:1}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ks = F`.selected{--md-ripple-hover-color: var(--_selected-hover-state-layer-color);--md-ripple-hover-opacity: var(--_selected-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_selected-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_selected-pressed-state-layer-opacity)}:where(.selected)::before{background:var(--_selected-container-color)}:where(.selected) .outline{border-width:var(--_selected-outline-width)}:where(.selected.disabled)::before{background:var(--_disabled-selected-container-color);opacity:var(--_disabled-selected-container-opacity)}:where(.selected) .label{color:var(--_selected-label-text-color)}:where(.selected:hover) .label{color:var(--_selected-hover-label-text-color)}:where(.selected:focus) .label{color:var(--_selected-focus-label-text-color)}:where(.selected:active) .label{color:var(--_selected-pressed-label-text-color)}:where(.selected) .leading.icon{color:var(--_selected-leading-icon-color)}:where(.selected:hover) .leading.icon{color:var(--_selected-hover-leading-icon-color)}:where(.selected:focus) .leading.icon{color:var(--_selected-focus-leading-icon-color)}:where(.selected:active) .leading.icon{color:var(--_selected-pressed-leading-icon-color)}@media(forced-colors: active){:where(.selected:not(.elevated))::before{border:1px solid CanvasText}:where(.selected) .outline{border-width:1px}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ys = F`.trailing.action{align-items:center;justify-content:center;padding-inline-start:var(--_icon-label-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}.trailing.action :is(md-ripple,md-focus-ring){border-radius:50%;height:calc(1.3333333333*var(--_icon-size));width:calc(1.3333333333*var(--_icon-size))}.trailing.action md-focus-ring{inset:unset}.has-trailing .primary.action{padding-inline-end:0}.trailing.icon{color:var(--_trailing-icon-color);height:var(--_icon-size);width:var(--_icon-size)}:where(:hover) .trailing.icon{color:var(--_hover-trailing-icon-color)}:where(:focus) .trailing.icon{color:var(--_focus-trailing-icon-color)}:where(:active) .trailing.icon{color:var(--_pressed-trailing-icon-color)}:where(.disabled) .trailing.icon{color:var(--_disabled-trailing-icon-color);opacity:var(--_disabled-trailing-icon-opacity)}:where(.selected) .trailing.icon{color:var(--_selected-trailing-icon-color)}:where(.selected:hover) .trailing.icon{color:var(--_selected-hover-trailing-icon-color)}:where(.selected:focus) .trailing.icon{color:var(--_selected-focus-trailing-icon-color)}:where(.selected:active) .trailing.icon{color:var(--_selected-pressed-trailing-icon-color)}@media(forced-colors: active){.trailing.icon{color:ButtonText}:where(.disabled) .trailing.icon{color:GrayText;opacity:1}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ai = class extends Yt {
|
|
};
|
|
ai.styles = [
|
|
Ua,
|
|
Vs,
|
|
Ys,
|
|
Ks,
|
|
yh
|
|
];
|
|
ai = l([
|
|
H("md-filter-chip")
|
|
], ai);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Gt = class extends qs {
|
|
constructor() {
|
|
super(...arguments), this.avatar = !1, this.href = "", this.target = "", this.removeOnly = !1, this.selected = !1;
|
|
}
|
|
get primaryId() {
|
|
return this.href ? "link" : this.removeOnly ? "" : "button";
|
|
}
|
|
get rippleDisabled() {
|
|
return !this.href && (this.disabled || this.softDisabled);
|
|
}
|
|
get primaryAction() {
|
|
return this.removeOnly ? null : this.renderRoot.querySelector(".primary.action");
|
|
}
|
|
getContainerClasses() {
|
|
return {
|
|
...super.getContainerClasses(),
|
|
avatar: this.avatar,
|
|
// Link chips cannot be disabled
|
|
disabled: !this.href && (this.disabled || this.softDisabled),
|
|
link: !!this.href,
|
|
selected: this.selected,
|
|
"has-trailing": !0
|
|
};
|
|
}
|
|
renderPrimaryAction(e) {
|
|
const { ariaLabel: t } = this;
|
|
return this.href ? _`
|
|
<a
|
|
class="primary action"
|
|
id="link"
|
|
aria-label=${t || x}
|
|
href=${this.href}
|
|
target=${this.target || x}
|
|
>${e}</a
|
|
>
|
|
` : this.removeOnly ? _`
|
|
<span class="primary action" aria-label=${t || x}>
|
|
${e}
|
|
</span>
|
|
` : _`
|
|
<button
|
|
class="primary action"
|
|
id="button"
|
|
aria-label=${t || x}
|
|
aria-disabled=${this.softDisabled || x}
|
|
?disabled=${this.disabled && !this.alwaysFocusable}
|
|
type="button"
|
|
>${e}</button
|
|
>
|
|
`;
|
|
}
|
|
renderTrailingAction(e) {
|
|
return Ws({
|
|
focusListener: e,
|
|
ariaLabel: this.ariaLabelRemove,
|
|
disabled: !this.href && (this.disabled || this.softDisabled),
|
|
tabbable: this.removeOnly
|
|
});
|
|
}
|
|
};
|
|
l([
|
|
p({ type: Boolean })
|
|
], Gt.prototype, "avatar", void 0);
|
|
l([
|
|
p()
|
|
], Gt.prototype, "href", void 0);
|
|
l([
|
|
p()
|
|
], Gt.prototype, "target", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "remove-only" })
|
|
], Gt.prototype, "removeOnly", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], Gt.prototype, "selected", void 0);
|
|
l([
|
|
G(".trailing.action")
|
|
], Gt.prototype, "trailingAction", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const gh = F`:host{--_container-height: var(--md-input-chip-container-height, 32px);--_disabled-label-text-color: var(--md-input-chip-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-input-chip-disabled-label-text-opacity, 0.38);--_disabled-selected-container-color: var(--md-input-chip-disabled-selected-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-selected-container-opacity: var(--md-input-chip-disabled-selected-container-opacity, 0.12);--_label-text-font: var(--md-input-chip-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-input-chip-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-input-chip-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-input-chip-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_selected-container-color: var(--md-input-chip-selected-container-color, var(--md-sys-color-secondary-container, #e8def8));--_selected-focus-label-text-color: var(--md-input-chip-selected-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-label-text-color: var(--md-input-chip-selected-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-color: var(--md-input-chip-selected-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-state-layer-opacity: var(--md-input-chip-selected-hover-state-layer-opacity, 0.08);--_selected-label-text-color: var(--md-input-chip-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-outline-width: var(--md-input-chip-selected-outline-width, 0px);--_selected-pressed-label-text-color: var(--md-input-chip-selected-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-color: var(--md-input-chip-selected-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-state-layer-opacity: var(--md-input-chip-selected-pressed-state-layer-opacity, 0.12);--_disabled-outline-color: var(--md-input-chip-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-input-chip-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-input-chip-focus-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-outline-color: var(--md-input-chip-focus-outline-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-label-text-color: var(--md-input-chip-hover-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-color: var(--md-input-chip-hover-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-state-layer-opacity: var(--md-input-chip-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-input-chip-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_outline-color: var(--md-input-chip-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-input-chip-outline-width, 1px);--_pressed-label-text-color: var(--md-input-chip-pressed-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-color: var(--md-input-chip-pressed-state-layer-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-state-layer-opacity: var(--md-input-chip-pressed-state-layer-opacity, 0.12);--_avatar-shape: var(--md-input-chip-avatar-shape, var(--md-sys-shape-corner-full, 9999px));--_avatar-size: var(--md-input-chip-avatar-size, 24px);--_disabled-avatar-opacity: var(--md-input-chip-disabled-avatar-opacity, 0.38);--_disabled-leading-icon-color: var(--md-input-chip-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-leading-icon-opacity: var(--md-input-chip-disabled-leading-icon-opacity, 0.38);--_icon-size: var(--md-input-chip-icon-size, 18px);--_selected-focus-leading-icon-color: var(--md-input-chip-selected-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-hover-leading-icon-color: var(--md-input-chip-selected-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-leading-icon-color: var(--md-input-chip-selected-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_selected-pressed-leading-icon-color: var(--md-input-chip-selected-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_focus-leading-icon-color: var(--md-input-chip-focus-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-leading-icon-color: var(--md-input-chip-hover-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_leading-icon-color: var(--md-input-chip-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-leading-icon-color: var(--md-input-chip-pressed-leading-icon-color, var(--md-sys-color-primary, #6750a4));--_disabled-trailing-icon-color: var(--md-input-chip-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-trailing-icon-opacity: var(--md-input-chip-disabled-trailing-icon-opacity, 0.38);--_selected-focus-trailing-icon-color: var(--md-input-chip-selected-focus-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-hover-trailing-icon-color: var(--md-input-chip-selected-hover-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-pressed-trailing-icon-color: var(--md-input-chip-selected-pressed-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_selected-trailing-icon-color: var(--md-input-chip-selected-trailing-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_focus-trailing-icon-color: var(--md-input-chip-focus-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_hover-trailing-icon-color: var(--md-input-chip-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-trailing-icon-color: var(--md-input-chip-pressed-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_trailing-icon-color: var(--md-input-chip-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_container-shape-start-start: var(--md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-start-end: var(--md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-end: var(--md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_container-shape-end-start: var(--md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, var(--md-sys-shape-corner-small, 8px)));--_leading-space: var(--md-input-chip-leading-space, 16px);--_trailing-space: var(--md-input-chip-trailing-space, 16px);--_icon-label-space: var(--md-input-chip-icon-label-space, 8px);--_with-leading-icon-leading-space: var(--md-input-chip-with-leading-icon-leading-space, 8px);--_with-trailing-icon-trailing-space: var(--md-input-chip-with-trailing-icon-trailing-space, 8px)}:host([avatar]){--_container-shape-start-start: var( --md-input-chip-container-shape-start-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-start-end: var( --md-input-chip-container-shape-start-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-end: var( --md-input-chip-container-shape-end-end, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) );--_container-shape-end-start: var( --md-input-chip-container-shape-end-start, var(--md-input-chip-container-shape, calc(var(--_container-height) / 2)) )}.avatar .primary.action{padding-inline-start:4px}.avatar .leading.icon ::slotted(:first-child){border-radius:var(--_avatar-shape);height:var(--_avatar-size);width:var(--_avatar-size)}.disabled.avatar .leading.icon{opacity:var(--_disabled-avatar-opacity)}@media(forced-colors: active){.link .outline{border-color:ActiveText}.disabled.avatar .leading.icon{opacity:1}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ni = class extends Gt {
|
|
};
|
|
ni.styles = [
|
|
Ua,
|
|
Ys,
|
|
Ks,
|
|
gh
|
|
];
|
|
ni = l([
|
|
H("md-input-chip")
|
|
], ni);
|
|
const xh = ee({
|
|
react: J,
|
|
tagName: "md-chip-set",
|
|
elementClass: ii
|
|
}), tf = (r) => /* @__PURE__ */ V.jsx(xh, { children: r.children }), _h = ee({
|
|
react: J,
|
|
tagName: "md-assist-chip",
|
|
elementClass: oi,
|
|
events: {
|
|
onClick: "click",
|
|
onKeyDown: "keydown",
|
|
onFocus: "focus",
|
|
onBlur: "blur"
|
|
}
|
|
}), rf = (r) => {
|
|
const { label: e, elevated: t, href: o, target: i, disabled: a, alwaysFocusable: s } = r;
|
|
return /* @__PURE__ */ V.jsx(_h, { label: e, elevated: t, href: o, target: i, disabled: a, alwaysFocusable: s });
|
|
}, wh = ee({
|
|
react: J,
|
|
tagName: "md-filter-chip",
|
|
elementClass: ai,
|
|
events: {
|
|
onRemove: "remove",
|
|
onUpdateFocus: "update-focus"
|
|
}
|
|
}), of = (r) => {
|
|
const { label: e, elevated: t, removable: o, selected: i, hasSelectedIcon: a, disabled: s, alwaysFocusable: d } = r;
|
|
return /* @__PURE__ */ V.jsx(wh, { label: e, elevated: t, removable: o, selected: i, hasSelectedIcon: a, disabled: s, alwaysFocusable: d });
|
|
}, kh = ee({
|
|
react: J,
|
|
tagName: "md-input-chip",
|
|
elementClass: ni,
|
|
events: {
|
|
onRemove: "remove",
|
|
onUpdateFocus: "update-focus"
|
|
}
|
|
}), af = (r) => {
|
|
const { label: e, avatar: t, href: o, target: i, removeOnly: a, selected: s, disabled: d, alwaysFocusable: h } = r;
|
|
return /* @__PURE__ */ V.jsx(kh, { label: e, avatar: t, href: o, target: i, removeOnly: a, selected: s, disabled: d, alwaysFocusable: h });
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Ch = Je(W);
|
|
class Vr extends Ch {
|
|
constructor() {
|
|
super(...arguments), this.size = "medium", this.label = "", this.lowered = !1;
|
|
}
|
|
render() {
|
|
const { ariaLabel: e } = this;
|
|
return _`
|
|
<button
|
|
class="fab ${ye(this.getRenderClasses())}"
|
|
aria-label=${e || x}>
|
|
<md-elevation part="elevation"></md-elevation>
|
|
<md-focus-ring part="focus-ring"></md-focus-ring>
|
|
<md-ripple class="ripple"></md-ripple>
|
|
${this.renderTouchTarget()} ${this.renderIcon()} ${this.renderLabel()}
|
|
</button>
|
|
`;
|
|
}
|
|
getRenderClasses() {
|
|
const e = !!this.label;
|
|
return {
|
|
lowered: this.lowered,
|
|
small: this.size === "small" && !e,
|
|
large: this.size === "large" && !e,
|
|
extended: e
|
|
};
|
|
}
|
|
renderTouchTarget() {
|
|
return _`<div class="touch-target"></div>`;
|
|
}
|
|
renderLabel() {
|
|
return this.label ? _`<span class="label">${this.label}</span>` : "";
|
|
}
|
|
renderIcon() {
|
|
const { ariaLabel: e } = this;
|
|
return _`<span class="icon">
|
|
<slot
|
|
name="icon"
|
|
aria-hidden=${e || this.label ? "true" : x}>
|
|
<span></span>
|
|
</slot>
|
|
</span>`;
|
|
}
|
|
}
|
|
Vr.shadowRootOptions = {
|
|
mode: "open",
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ reflect: !0 })
|
|
], Vr.prototype, "size", void 0);
|
|
l([
|
|
p()
|
|
], Vr.prototype, "label", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], Vr.prototype, "lowered", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class Va extends Vr {
|
|
constructor() {
|
|
super(...arguments), this.variant = "surface";
|
|
}
|
|
getRenderClasses() {
|
|
return {
|
|
...super.getRenderClasses(),
|
|
primary: this.variant === "primary",
|
|
secondary: this.variant === "secondary",
|
|
tertiary: this.variant === "tertiary"
|
|
};
|
|
}
|
|
}
|
|
l([
|
|
p()
|
|
], Va.prototype, "variant", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Eh = F`:host{--_container-color: var(--md-fab-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-container-elevation, 3);--_container-height: var(--md-fab-container-height, 56px);--_container-shadow-color: var(--md-fab-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-container-width, 56px);--_focus-container-elevation: var(--md-fab-focus-container-elevation, 3);--_focus-icon-color: var(--md-fab-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-container-elevation: var(--md-fab-hover-container-elevation, 4);--_hover-icon-color: var(--md-fab-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-fab-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-hover-state-layer-opacity, 0.08);--_icon-color: var(--md-fab-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-fab-icon-size, 24px);--_lowered-container-color: var(--md-fab-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-pressed-container-elevation, 3);--_pressed-icon-color: var(--md-fab-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-fab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-fab-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-fab-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-fab-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-fab-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-large-container-height, 96px);--_large-container-width: var(--md-fab-large-container-width, 96px);--_large-icon-size: var(--md-fab-large-icon-size, 36px);--_pressed-label-text-color: var(--md-fab-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_primary-container-color: var(--md-fab-primary-container-color, var(--md-sys-color-primary-container, #eaddff));--_primary-focus-icon-color: var(--md-fab-primary-focus-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-focus-label-text-color: var(--md-fab-primary-focus-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-icon-color: var(--md-fab-primary-hover-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-label-text-color: var(--md-fab-primary-hover-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-hover-state-layer-color: var(--md-fab-primary-hover-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-icon-color: var(--md-fab-primary-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-label-text-color: var(--md-fab-primary-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-icon-color: var(--md-fab-primary-pressed-icon-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-label-text-color: var(--md-fab-primary-pressed-label-text-color, var(--md-sys-color-on-primary-container, #21005d));--_primary-pressed-state-layer-color: var(--md-fab-primary-pressed-state-layer-color, var(--md-sys-color-on-primary-container, #21005d));--_secondary-container-color: var(--md-fab-secondary-container-color, var(--md-sys-color-secondary-container, #e8def8));--_secondary-focus-icon-color: var(--md-fab-secondary-focus-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-focus-label-text-color: var(--md-fab-secondary-focus-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-icon-color: var(--md-fab-secondary-hover-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-label-text-color: var(--md-fab-secondary-hover-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-hover-state-layer-color: var(--md-fab-secondary-hover-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-icon-color: var(--md-fab-secondary-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-label-text-color: var(--md-fab-secondary-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-icon-color: var(--md-fab-secondary-pressed-icon-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-label-text-color: var(--md-fab-secondary-pressed-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b));--_secondary-pressed-state-layer-color: var(--md-fab-secondary-pressed-state-layer-color, var(--md-sys-color-on-secondary-container, #1d192b));--_small-container-height: var(--md-fab-small-container-height, 40px);--_small-container-width: var(--md-fab-small-container-width, 40px);--_small-icon-size: var(--md-fab-small-icon-size, 24px);--_tertiary-container-color: var(--md-fab-tertiary-container-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_tertiary-focus-icon-color: var(--md-fab-tertiary-focus-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-focus-label-text-color: var(--md-fab-tertiary-focus-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-icon-color: var(--md-fab-tertiary-hover-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-label-text-color: var(--md-fab-tertiary-hover-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-hover-state-layer-color: var(--md-fab-tertiary-hover-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-icon-color: var(--md-fab-tertiary-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-label-text-color: var(--md-fab-tertiary-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-icon-color: var(--md-fab-tertiary-pressed-icon-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-label-text-color: var(--md-fab-tertiary-pressed-label-text-color, var(--md-sys-color-on-tertiary-container, #31111d));--_tertiary-pressed-state-layer-color: var(--md-fab-tertiary-pressed-state-layer-color, var(--md-sys-color-on-tertiary-container, #31111d));--_container-shape-start-start: var(--md-fab-container-shape-start-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-container-shape-start-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-container-shape-end-end, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-container-shape-end-start, var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-large-container-shape-start-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-large-container-shape-start-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-large-container-shape-end-end, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-large-container-shape-end-start, var(--md-fab-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_small-container-shape-start-start: var(--md-fab-small-container-shape-start-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-start-end: var(--md-fab-small-container-shape-start-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-end: var(--md-fab-small-container-shape-end-end, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));--_small-container-shape-end-start: var(--md-fab-small-container-shape-end-start, var(--md-fab-small-container-shape, var(--md-sys-shape-corner-medium, 12px)));cursor:pointer}:host([size=small][touch-target=wrapper]){margin:max(0px,48px - var(--_small-container-height))}.fab{cursor:inherit}.fab .icon ::slotted(*){color:var(--_icon-color)}.fab:focus{color:var(--_focus-icon-color)}.fab:hover{color:var(--_hover-icon-color)}.fab:active{color:var(--_pressed-icon-color)}.fab.primary{background-color:var(--_primary-container-color);--md-ripple-hover-color: var(--_primary-hover-state-layer-color);--md-ripple-pressed-color: var(--_primary-pressed-state-layer-color)}.fab.primary .icon ::slotted(*){color:var(--_primary-icon-color)}.fab.primary:focus{color:var(--_primary-focus-icon-color)}.fab.primary:hover{color:var(--_primary-hover-icon-color)}.fab.primary:active{color:var(--_primary-pressed-icon-color)}.fab.primary .label{color:var(--_primary-label-text-color)}.fab:hover .fab.primary .label{color:var(--_primary-hover-label-text-color)}.fab:focus .fab.primary .label{color:var(--_primary-focus-label-text-color)}.fab:active .fab.primary .label{color:var(--_primary-pressed-label-text-color)}.fab.secondary{background-color:var(--_secondary-container-color);--md-ripple-hover-color: var(--_secondary-hover-state-layer-color);--md-ripple-pressed-color: var(--_secondary-pressed-state-layer-color)}.fab.secondary .icon ::slotted(*){color:var(--_secondary-icon-color)}.fab.secondary:focus{color:var(--_secondary-focus-icon-color)}.fab.secondary:hover{color:var(--_secondary-hover-icon-color)}.fab.secondary:active{color:var(--_secondary-pressed-icon-color)}.fab.secondary .label{color:var(--_secondary-label-text-color)}.fab:hover .fab.secondary .label{color:var(--_secondary-hover-label-text-color)}.fab:focus .fab.secondary .label{color:var(--_secondary-focus-label-text-color)}.fab:active .fab.secondary .label{color:var(--_secondary-pressed-label-text-color)}.fab.tertiary{background-color:var(--_tertiary-container-color);--md-ripple-hover-color: var(--_tertiary-hover-state-layer-color);--md-ripple-pressed-color: var(--_tertiary-pressed-state-layer-color)}.fab.tertiary .icon ::slotted(*){color:var(--_tertiary-icon-color)}.fab.tertiary:focus{color:var(--_tertiary-focus-icon-color)}.fab.tertiary:hover{color:var(--_tertiary-hover-icon-color)}.fab.tertiary:active{color:var(--_tertiary-pressed-icon-color)}.fab.tertiary .label{color:var(--_tertiary-label-text-color)}.fab:hover .fab.tertiary .label{color:var(--_tertiary-hover-label-text-color)}.fab:focus .fab.tertiary .label{color:var(--_tertiary-focus-label-text-color)}.fab:active .fab.tertiary .label{color:var(--_tertiary-pressed-label-text-color)}.fab.extended slot span{padding-inline-start:4px}.fab.small{width:var(--_small-container-width);height:var(--_small-container-height)}.fab.small .icon ::slotted(*){width:var(--_small-icon-size);height:var(--_small-icon-size);font-size:var(--_small-icon-size)}.fab.small,.fab.small .ripple{border-start-start-radius:var(--_small-container-shape-start-start);border-start-end-radius:var(--_small-container-shape-start-end);border-end-start-radius:var(--_small-container-shape-end-start);border-end-end-radius:var(--_small-container-shape-end-end)}.fab.small md-focus-ring{--md-focus-ring-shape-start-start: var(--_small-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_small-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_small-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_small-container-shape-end-start)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Gs = F`@media(forced-colors: active){.fab{border:1px solid ButtonText}.fab.extended{padding-inline-start:15px;padding-inline-end:19px}md-focus-ring{--md-focus-ring-outward-offset: 3px}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Xs = F`:host{--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);display:inline-flex;-webkit-tap-highlight-color:rgba(0,0,0,0)}:host([size=medium][touch-target=wrapper]){margin:max(0px,48px - var(--_container-height))}:host([size=large][touch-target=wrapper]){margin:max(0px,48px - var(--_large-container-height))}.fab,.icon,.icon ::slotted(*){display:flex}.fab{align-items:center;justify-content:center;vertical-align:middle;padding:0;position:relative;height:var(--_container-height);transition-property:background-color;border-width:0px;outline:none;z-index:0;text-transform:inherit;--md-elevation-level: var(--_container-elevation);--md-elevation-shadow-color: var(--_container-shadow-color);background-color:var(--_container-color);--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color)}.fab.extended{width:inherit;box-sizing:border-box;padding-inline-start:16px;padding-inline-end:20px}.fab:not(.extended){width:var(--_container-width)}.fab.large{width:var(--_large-container-width);height:var(--_large-container-height)}.fab.large .icon ::slotted(*){width:var(--_large-icon-size);height:var(--_large-icon-size);font-size:var(--_large-icon-size)}.fab.large,.fab.large .ripple{border-start-start-radius:var(--_large-container-shape-start-start);border-start-end-radius:var(--_large-container-shape-start-end);border-end-start-radius:var(--_large-container-shape-end-start);border-end-end-radius:var(--_large-container-shape-end-end)}.fab.large md-focus-ring{--md-focus-ring-shape-start-start: var(--_large-container-shape-start-start);--md-focus-ring-shape-start-end: var(--_large-container-shape-start-end);--md-focus-ring-shape-end-end: var(--_large-container-shape-end-end);--md-focus-ring-shape-end-start: var(--_large-container-shape-end-start)}.fab:focus{--md-elevation-level: var(--_focus-container-elevation)}.fab:hover{--md-elevation-level: var(--_hover-container-elevation)}.fab:active{--md-elevation-level: var(--_pressed-container-elevation)}.fab.lowered{background-color:var(--_lowered-container-color);--md-elevation-level: var(--_lowered-container-elevation)}.fab.lowered:focus{--md-elevation-level: var(--_lowered-focus-container-elevation)}.fab.lowered:hover{--md-elevation-level: var(--_lowered-hover-container-elevation)}.fab.lowered:active{--md-elevation-level: var(--_lowered-pressed-container-elevation)}.fab .label{color:var(--_label-text-color)}.fab:hover .fab .label{color:var(--_hover-label-text-color)}.fab:focus .fab .label{color:var(--_focus-label-text-color)}.fab:active .fab .label{color:var(--_pressed-label-text-color)}.label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight)}.fab.extended .icon ::slotted(*){margin-inline-end:12px}.ripple{overflow:hidden}.ripple,md-elevation{z-index:-1}.touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host([touch-target=none]) .touch-target{display:none}md-elevation,.fab{transition-duration:280ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}.fab,.ripple{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}.icon ::slotted(*){width:var(--_icon-size);height:var(--_icon-size);font-size:var(--_icon-size)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let si = class extends Va {
|
|
};
|
|
si.styles = [Xs, Eh, Gs];
|
|
si = l([
|
|
H("md-fab")
|
|
], si);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const $h = F`:host{--_container-color: var(--md-fab-branded-container-color, var(--md-sys-color-surface-container-high, #ece6f0));--_container-elevation: var(--md-fab-branded-container-elevation, 3);--_container-height: var(--md-fab-branded-container-height, 56px);--_container-shadow-color: var(--md-fab-branded-container-shadow-color, var(--md-sys-color-shadow, #000));--_container-width: var(--md-fab-branded-container-width, 56px);--_focus-container-elevation: var(--md-fab-branded-focus-container-elevation, 3);--_hover-container-elevation: var(--md-fab-branded-hover-container-elevation, 4);--_hover-state-layer-color: var(--md-fab-branded-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-fab-branded-hover-state-layer-opacity, 0.08);--_icon-size: var(--md-fab-branded-icon-size, 36px);--_lowered-container-color: var(--md-fab-branded-lowered-container-color, var(--md-sys-color-surface-container-low, #f7f2fa));--_lowered-container-elevation: var(--md-fab-branded-lowered-container-elevation, 1);--_lowered-focus-container-elevation: var(--md-fab-branded-lowered-focus-container-elevation, 1);--_lowered-hover-container-elevation: var(--md-fab-branded-lowered-hover-container-elevation, 2);--_lowered-pressed-container-elevation: var(--md-fab-branded-lowered-pressed-container-elevation, 1);--_pressed-container-elevation: var(--md-fab-branded-pressed-container-elevation, 3);--_pressed-state-layer-color: var(--md-fab-branded-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-fab-branded-pressed-state-layer-opacity, 0.12);--_focus-label-text-color: var(--md-fab-branded-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-fab-branded-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-color: var(--md-fab-branded-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-fab-branded-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-size: var(--md-fab-branded-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-line-height: var(--md-fab-branded-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-weight: var(--md-fab-branded-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_large-container-height: var(--md-fab-branded-large-container-height, 96px);--_large-container-width: var(--md-fab-branded-large-container-width, 96px);--_large-icon-size: var(--md-fab-branded-large-icon-size, 48px);--_pressed-label-text-color: var(--md-fab-branded-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-fab-branded-container-shape-start-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-start-end: var(--md-fab-branded-container-shape-start-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-end: var(--md-fab-branded-container-shape-end-end, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_container-shape-end-start: var(--md-fab-branded-container-shape-end-start, var(--md-fab-branded-container-shape, var(--md-sys-shape-corner-large, 16px)));--_large-container-shape-start-start: var(--md-fab-branded-large-container-shape-start-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-start-end: var(--md-fab-branded-large-container-shape-start-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-end: var(--md-fab-branded-large-container-shape-end-end, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)));--_large-container-shape-end-start: var(--md-fab-branded-large-container-shape-end-start, var(--md-fab-branded-large-container-shape, var(--md-sys-shape-corner-extra-large, 28px)))}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let li = class extends Va {
|
|
getRenderClasses() {
|
|
return {
|
|
...super.getRenderClasses(),
|
|
primary: !1,
|
|
secondary: !1,
|
|
tertiary: !1,
|
|
small: !1
|
|
};
|
|
}
|
|
};
|
|
li.styles = [
|
|
Xs,
|
|
$h,
|
|
Gs
|
|
];
|
|
li = l([
|
|
H("md-branded-fab")
|
|
], li);
|
|
const Th = ee({
|
|
react: J,
|
|
tagName: "md-fab",
|
|
elementClass: si
|
|
}), lf = (r) => {
|
|
const { children: e, className: t, ...o } = r, i = r.variant || "surface", a = r.size || "medium", s = r.label || "", d = r.lowered || !1;
|
|
return /* @__PURE__ */ V.jsx(Th, { ...o, className: t, variant: i, size: a, label: s, lowered: d, children: e });
|
|
}, Sh = ee({
|
|
react: J,
|
|
tagName: "md-branded-fab",
|
|
elementClass: li
|
|
}), df = (r) => {
|
|
const { children: e, className: t, ...o } = r, i = r.variant || "surface", a = r.size || "medium", s = r.label || "", d = r.lowered || !1;
|
|
return /* @__PURE__ */ V.jsx(Sh, { ...o, className: t, variant: i, size: a, label: s, lowered: d, children: e });
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
var Zs;
|
|
const or = Symbol("indicator"), Js = Symbol("animateIndicator"), Ah = bs(W);
|
|
let nt = class extends Ah {
|
|
/**
|
|
* @deprecated use `active`
|
|
*/
|
|
get selected() {
|
|
return this.active;
|
|
}
|
|
set selected(e) {
|
|
this.active = e;
|
|
}
|
|
constructor() {
|
|
super(), this.isTab = !0, this.active = !1, this.hasIcon = !1, this.iconOnly = !1, this.fullWidthIndicator = !1, this.internals = // Cast needed for closure
|
|
this.attachInternals(), this.internals.role = "tab", this.addEventListener("keydown", this.handleKeydown.bind(this));
|
|
}
|
|
render() {
|
|
const e = _`<div class="indicator"></div>`;
|
|
return _`<div
|
|
class="button"
|
|
role="presentation"
|
|
@click=${this.handleContentClick}>
|
|
<md-focus-ring part="focus-ring" inward .control=${this}></md-focus-ring>
|
|
<md-elevation part="elevation"></md-elevation>
|
|
<md-ripple .control=${this}></md-ripple>
|
|
<div
|
|
class="content ${ye(this.getContentClasses())}"
|
|
role="presentation">
|
|
<slot name="icon" @slotchange=${this.handleIconSlotChange}></slot>
|
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
${this.fullWidthIndicator ? x : e}
|
|
</div>
|
|
${this.fullWidthIndicator ? e : x}
|
|
</div>`;
|
|
}
|
|
getContentClasses() {
|
|
return {
|
|
"has-icon": this.hasIcon,
|
|
"has-label": !this.iconOnly
|
|
};
|
|
}
|
|
updated() {
|
|
this.internals.ariaSelected = String(this.active);
|
|
}
|
|
async handleKeydown(e) {
|
|
await 0, !e.defaultPrevented && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.click());
|
|
}
|
|
handleContentClick(e) {
|
|
e.stopPropagation(), this.click();
|
|
}
|
|
[(Zs = or, Js)](e) {
|
|
if (!this[or])
|
|
return;
|
|
this[or].getAnimations().forEach((o) => {
|
|
o.cancel();
|
|
});
|
|
const t = this.getKeyframes(e);
|
|
t !== null && this[or].animate(t, {
|
|
duration: 250,
|
|
easing: at.EMPHASIZED
|
|
});
|
|
}
|
|
getKeyframes(e) {
|
|
var f;
|
|
const t = Rh();
|
|
if (!this.active)
|
|
return t ? [{ opacity: 1 }, { transform: "none" }] : null;
|
|
const o = {}, i = ((f = e[or]) == null ? void 0 : f.getBoundingClientRect()) ?? {}, a = i.left, s = i.width, d = this[or].getBoundingClientRect(), h = d.left, y = d.width, v = s / y;
|
|
return !t && a !== void 0 && h !== void 0 && !isNaN(v) ? o.transform = `translateX(${(a - h).toFixed(4)}px) scaleX(${v.toFixed(4)})` : o.opacity = 0, [o, { transform: "none" }];
|
|
}
|
|
handleSlotChange() {
|
|
this.iconOnly = !1;
|
|
for (const e of this.assignedDefaultNodes) {
|
|
const t = e.nodeType === Node.TEXT_NODE && !!e.wholeText.match(/\S/);
|
|
if (e.nodeType === Node.ELEMENT_NODE || t)
|
|
return;
|
|
}
|
|
this.iconOnly = !0;
|
|
}
|
|
handleIconSlotChange() {
|
|
this.hasIcon = this.assignedIcons.length > 0;
|
|
}
|
|
};
|
|
l([
|
|
p({ type: Boolean, reflect: !0, attribute: "md-tab" })
|
|
], nt.prototype, "isTab", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], nt.prototype, "active", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], nt.prototype, "selected", null);
|
|
l([
|
|
p({ type: Boolean, attribute: "has-icon" })
|
|
], nt.prototype, "hasIcon", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "icon-only" })
|
|
], nt.prototype, "iconOnly", void 0);
|
|
l([
|
|
G(".indicator")
|
|
], nt.prototype, Zs, void 0);
|
|
l([
|
|
se()
|
|
], nt.prototype, "fullWidthIndicator", void 0);
|
|
l([
|
|
Ia({ flatten: !0 })
|
|
], nt.prototype, "assignedDefaultNodes", void 0);
|
|
l([
|
|
We({ slot: "icon", flatten: !0 })
|
|
], nt.prototype, "assignedIcons", void 0);
|
|
function Rh() {
|
|
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let hr = class extends W {
|
|
/**
|
|
* The currently selected tab, `null` only when there are no tab children.
|
|
*
|
|
* @export
|
|
*/
|
|
get activeTab() {
|
|
return this.tabs.find((e) => e.active) ?? null;
|
|
}
|
|
set activeTab(e) {
|
|
e && this.activateTab(e);
|
|
}
|
|
/**
|
|
* The index of the currently selected tab.
|
|
*
|
|
* @export
|
|
*/
|
|
get activeTabIndex() {
|
|
return this.tabs.findIndex((e) => e.active);
|
|
}
|
|
set activeTabIndex(e) {
|
|
const t = () => {
|
|
const o = this.tabs[e];
|
|
o && this.activateTab(o);
|
|
};
|
|
if (!this.slotElement) {
|
|
this.updateComplete.then(t);
|
|
return;
|
|
}
|
|
t();
|
|
}
|
|
get focusedTab() {
|
|
return this.tabs.find((e) => e.matches(":focus-within"));
|
|
}
|
|
constructor() {
|
|
super(), this.autoActivate = !1, this.internals = // Cast needed for closure
|
|
this.attachInternals(), this.internals.role = "tablist", this.addEventListener("keydown", this.handleKeydown.bind(this)), this.addEventListener("keyup", this.handleKeyup.bind(this)), this.addEventListener("focusout", this.handleFocusout.bind(this));
|
|
}
|
|
/**
|
|
* Scrolls the toolbar, if overflowing, to the active tab, or the provided
|
|
* tab.
|
|
*
|
|
* @param tabToScrollTo The tab that should be scrolled to. Defaults to the
|
|
* active tab.
|
|
* @return A Promise that resolves after the tab has been scrolled to.
|
|
*/
|
|
async scrollToTab(e) {
|
|
await this.updateComplete;
|
|
const { tabs: t } = this;
|
|
if (e ?? (e = this.activeTab), !e || !t.includes(e) || !this.tabsScrollerElement)
|
|
return;
|
|
for (const C of this.tabs)
|
|
await C.updateComplete;
|
|
const o = e.offsetLeft, i = e.offsetWidth, a = this.scrollLeft, s = this.offsetWidth, d = 48, h = o - d, y = o + i - s + d, v = Math.min(h, Math.max(y, a)), f = this.focusedTab ? "auto" : "instant";
|
|
this.tabsScrollerElement.scrollTo({ behavior: f, top: 0, left: v });
|
|
}
|
|
render() {
|
|
return _`
|
|
<div class="tabs">
|
|
<slot
|
|
@slotchange=${this.handleSlotChange}
|
|
@click=${this.handleTabClick}></slot>
|
|
</div>
|
|
<md-divider part="divider"></md-divider>
|
|
`;
|
|
}
|
|
async handleTabClick(e) {
|
|
const t = e.target;
|
|
await 0, !(e.defaultPrevented || !Ih(t) || t.active) && this.activateTab(t);
|
|
}
|
|
activateTab(e) {
|
|
const { tabs: t } = this, o = this.activeTab;
|
|
if (!(!t.includes(e) || o === e)) {
|
|
for (const i of t)
|
|
i.active = i === e;
|
|
if (o) {
|
|
if (!this.dispatchEvent(new Event("change", { bubbles: !0, cancelable: !0 }))) {
|
|
for (const a of t)
|
|
a.active = a === o;
|
|
return;
|
|
}
|
|
e[Js](o);
|
|
}
|
|
this.updateFocusableTab(e), this.scrollToTab(e);
|
|
}
|
|
}
|
|
updateFocusableTab(e) {
|
|
for (const t of this.tabs)
|
|
t.tabIndex = t === e ? 0 : -1;
|
|
}
|
|
// focus item on keydown and optionally select it
|
|
async handleKeydown(e) {
|
|
await 0;
|
|
const t = e.key === "ArrowLeft", o = e.key === "ArrowRight", i = e.key === "Home", a = e.key === "End";
|
|
if (e.defaultPrevented || !t && !o && !i && !a)
|
|
return;
|
|
const { tabs: s } = this;
|
|
if (s.length < 2)
|
|
return;
|
|
e.preventDefault();
|
|
let d;
|
|
if (i || a)
|
|
d = i ? 0 : s.length - 1;
|
|
else {
|
|
const v = getComputedStyle(this).direction === "rtl" ? t : o, { focusedTab: f } = this;
|
|
if (!f)
|
|
d = v ? 0 : s.length - 1;
|
|
else {
|
|
const C = this.tabs.indexOf(f);
|
|
d = v ? C + 1 : C - 1, d >= s.length ? d = 0 : d < 0 && (d = s.length - 1);
|
|
}
|
|
}
|
|
const h = s[d];
|
|
h.focus(), this.autoActivate ? this.activateTab(h) : this.updateFocusableTab(h);
|
|
}
|
|
// scroll to item on keyup.
|
|
handleKeyup() {
|
|
this.scrollToTab(this.focusedTab ?? this.activeTab);
|
|
}
|
|
handleFocusout() {
|
|
if (this.matches(":focus-within"))
|
|
return;
|
|
const { activeTab: e } = this;
|
|
e && this.updateFocusableTab(e);
|
|
}
|
|
handleSlotChange() {
|
|
const e = this.tabs[0];
|
|
!this.activeTab && e && this.activateTab(e), this.scrollToTab(this.activeTab);
|
|
}
|
|
};
|
|
l([
|
|
We({ flatten: !0, selector: "[md-tab]" })
|
|
], hr.prototype, "tabs", void 0);
|
|
l([
|
|
p({ type: Number, attribute: "active-tab-index" })
|
|
], hr.prototype, "activeTabIndex", null);
|
|
l([
|
|
p({ type: Boolean, attribute: "auto-activate" })
|
|
], hr.prototype, "autoActivate", void 0);
|
|
l([
|
|
G(".tabs")
|
|
], hr.prototype, "tabsScrollerElement", void 0);
|
|
l([
|
|
G("slot")
|
|
], hr.prototype, "slotElement", void 0);
|
|
function Ih(r) {
|
|
return r instanceof HTMLElement && r.hasAttribute("md-tab");
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Oh = F`:host{box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;position:relative}:host([hidden]){display:none}:host::-webkit-scrollbar{display:none}.tabs{align-items:end;display:flex;height:100%;overflow:inherit;scroll-behavior:inherit;scrollbar-width:inherit;justify-content:space-between;width:100%}::slotted(*){flex:1}::slotted([active]){z-index:1}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let di = class extends hr {
|
|
};
|
|
di.styles = [Oh];
|
|
di = l([
|
|
H("md-tabs")
|
|
], di);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class Qs extends nt {
|
|
constructor() {
|
|
super(...arguments), this.inlineIcon = !1;
|
|
}
|
|
getContentClasses() {
|
|
return {
|
|
...super.getContentClasses(),
|
|
stacked: !this.inlineIcon
|
|
};
|
|
}
|
|
}
|
|
l([
|
|
p({ type: Boolean, attribute: "inline-icon" })
|
|
], Qs.prototype, "inlineIcon", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const zh = F`:host{--_active-indicator-color: var(--md-primary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-primary-tab-active-indicator-height, 3px);--_active-indicator-shape: var(--md-primary-tab-active-indicator-shape, 3px 3px 0px 0px);--_active-hover-state-layer-color: var(--md-primary-tab-active-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-hover-state-layer-opacity: var(--md-primary-tab-active-hover-state-layer-opacity, 0.08);--_active-pressed-state-layer-color: var(--md-primary-tab-active-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-state-layer-opacity: var(--md-primary-tab-active-pressed-state-layer-opacity, 0.12);--_container-color: var(--md-primary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-primary-tab-container-elevation, 0);--_container-height: var(--md-primary-tab-container-height, 48px);--_with-icon-and-label-text-container-height: var(--md-primary-tab-with-icon-and-label-text-container-height, 64px);--_hover-state-layer-color: var(--md-primary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-primary-tab-hover-state-layer-opacity, 0.08);--_pressed-state-layer-color: var(--md-primary-tab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-primary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-primary-tab-active-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_active-hover-icon-color: var(--md-primary-tab-active-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_active-icon-color: var(--md-primary-tab-active-icon-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-icon-color: var(--md-primary-tab-active-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-primary-tab-icon-size, 24px);--_focus-icon-color: var(--md-primary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-primary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-color: var(--md-primary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-primary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-primary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-primary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-primary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-primary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_active-focus-label-text-color: var(--md-primary-tab-active-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-hover-label-text-color: var(--md-primary-tab-active-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-label-text-color: var(--md-primary-tab-active-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-label-text-color: var(--md-primary-tab-active-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-label-text-color: var(--md-primary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-primary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-color: var(--md-primary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-primary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-primary-tab-container-shape-start-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-primary-tab-container-shape-start-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-primary-tab-container-shape-end-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-primary-tab-container-shape-end-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))}.content.stacked{flex-direction:column;gap:2px}.content.stacked.has-icon.has-label{height:var(--_with-icon-and-label-text-container-height)}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const el = F`:host{display:inline-flex;align-items:center;justify-content:center;outline:none;padding:0 16px;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:middle;user-select:none;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);color:var(--_label-text-color);z-index:0;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity);--md-elevation-level: var(--_container-elevation)}md-focus-ring{--md-focus-ring-shape: 8px}:host([active]) md-focus-ring{margin-bottom:calc(var(--_active-indicator-height) + 1px)}.button::before{background:var(--_container-color);content:"";inset:0;position:absolute;z-index:-1}.button::before,md-ripple,md-elevation{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-end-radius:var(--_container-shape-end-end);border-end-start-radius:var(--_container-shape-end-start)}.content{position:relative;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;height:var(--_container-height);gap:8px}.indicator{position:absolute;box-sizing:border-box;z-index:-1;transform-origin:bottom left;background:var(--_active-indicator-color);border-radius:var(--_active-indicator-shape);height:var(--_active-indicator-height);inset:auto 0 0 0;opacity:0}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;color:var(--_icon-color);font-size:var(--_icon-size);width:var(--_icon-size);height:var(--_icon-size)}:host(:hover){color:var(--_hover-label-text-color);cursor:pointer}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus){color:var(--_focus-label-text-color)}:host(:focus) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active){color:var(--_pressed-label-text-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host([active]) .indicator{opacity:1}:host([active]){color:var(--_active-label-text-color);--md-ripple-hover-color: var(--_active-hover-state-layer-color);--md-ripple-hover-opacity: var(--_active-hover-state-layer-opacity);--md-ripple-pressed-color: var(--_active-pressed-state-layer-color);--md-ripple-pressed-opacity: var(--_active-pressed-state-layer-opacity)}:host([active]) ::slotted([slot=icon]){color:var(--_active-icon-color)}:host([active]:hover){color:var(--_active-hover-label-text-color)}:host([active]:hover) ::slotted([slot=icon]){color:var(--_active-hover-icon-color)}:host([active]:focus){color:var(--_active-focus-label-text-color)}:host([active]:focus) ::slotted([slot=icon]){color:var(--_active-focus-icon-color)}:host([active]:active){color:var(--_active-pressed-label-text-color)}:host([active]:active) ::slotted([slot=icon]){color:var(--_active-pressed-icon-color)}:host,::slotted(*){white-space:nowrap}@media(forced-colors: active){.indicator{background:CanvasText}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ci = class extends Qs {
|
|
};
|
|
ci.styles = [el, zh];
|
|
ci = l([
|
|
H("md-primary-tab")
|
|
], ci);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class Ph extends nt {
|
|
constructor() {
|
|
super(...arguments), this.fullWidthIndicator = !0;
|
|
}
|
|
}
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Lh = F`:host{--_active-indicator-color: var(--md-secondary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-secondary-tab-active-indicator-height, 2px);--_active-label-text-color: var(--md-secondary-tab-active-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-color: var(--md-secondary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-secondary-tab-container-elevation, 0);--_container-height: var(--md-secondary-tab-container-height, 48px);--_focus-label-text-color: var(--md-secondary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-secondary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-secondary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-secondary-tab-hover-state-layer-opacity, 0.08);--_label-text-font: var(--md-secondary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-secondary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-secondary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-secondary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-secondary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-secondary-tab-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-secondary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-secondary-tab-active-focus-icon-color, );--_active-focus-label-text-color: var(--md-secondary-tab-active-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--md-secondary-tab-active-hover-icon-color, );--_active-hover-label-text-color: var(--md-secondary-tab-active-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--md-secondary-tab-active-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-opacity: var(--md-secondary-tab-active-hover-state-layer-opacity, 0.08);--_active-icon-color: var(--md-secondary-tab-active-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_active-indicator-shape: var(--md-secondary-tab-active-indicator-shape, 0);--_active-pressed-icon-color: var(--md-secondary-tab-active-pressed-icon-color, );--_active-pressed-label-text-color: var(--md-secondary-tab-active-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--md-secondary-tab-active-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-opacity: var(--md-secondary-tab-active-pressed-state-layer-opacity, 0.12);--_label-text-color: var(--md-secondary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-icon-color: var(--md-secondary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-secondary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-size: var(--md-secondary-tab-icon-size, 24px);--_icon-color: var(--md-secondary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-secondary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-secondary-tab-container-shape-start-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-secondary-tab-container-shape-start-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-secondary-tab-container-shape-end-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-secondary-tab-container-shape-end-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let ui = class extends Ph {
|
|
};
|
|
ui.styles = [el, Lh];
|
|
ui = l([
|
|
H("md-secondary-tab")
|
|
], ui);
|
|
const Fh = ee({
|
|
react: J,
|
|
tagName: "md-tabs",
|
|
elementClass: di
|
|
}), Mh = ee({
|
|
react: J,
|
|
tagName: "md-primary-tab",
|
|
elementClass: ci
|
|
}), Dh = ee({
|
|
react: J,
|
|
tagName: "md-secondary-tab",
|
|
elementClass: ui
|
|
}), vf = (r) => {
|
|
const { children: e, className: t, style: o, id: i, activeTabIndex: a, onChange: s, ...d } = r;
|
|
return /* @__PURE__ */ V.jsx(Fh, { className: t, style: o, id: i, activeTabIndex: a, onChange: s, ...d, children: e });
|
|
}, mf = (r) => {
|
|
const { children: e, className: t, style: o, id: i, selected: a, variant: s = "primary", onClick: d, ...h } = r, y = s === "primary" ? Mh : Dh;
|
|
return /* @__PURE__ */ V.jsx(y, { className: t, style: o, id: i, selected: a, onClick: d, ...h, children: e });
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Nh = Je(W);
|
|
class pr extends Nh {
|
|
constructor() {
|
|
super(...arguments), this.value = 0, this.max = 1, this.indeterminate = !1, this.fourColor = !1;
|
|
}
|
|
render() {
|
|
const { ariaLabel: e } = this;
|
|
return _`
|
|
<div
|
|
class="progress ${ye(this.getRenderClasses())}"
|
|
role="progressbar"
|
|
aria-label="${e || x}"
|
|
aria-valuemin="0"
|
|
aria-valuemax=${this.max}
|
|
aria-valuenow=${this.indeterminate ? x : this.value}
|
|
>${this.renderIndicator()}</div
|
|
>
|
|
`;
|
|
}
|
|
getRenderClasses() {
|
|
return {
|
|
indeterminate: this.indeterminate,
|
|
"four-color": this.fourColor
|
|
};
|
|
}
|
|
}
|
|
l([
|
|
p({ type: Number })
|
|
], pr.prototype, "value", void 0);
|
|
l([
|
|
p({ type: Number })
|
|
], pr.prototype, "max", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], pr.prototype, "indeterminate", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "four-color" })
|
|
], pr.prototype, "fourColor", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let Bh = class extends pr {
|
|
renderIndicator() {
|
|
return this.indeterminate ? this.renderIndeterminateContainer() : this.renderDeterminateContainer();
|
|
}
|
|
// Determinate mode is rendered with an svg so the progress arc can be
|
|
// easily animated via stroke-dashoffset.
|
|
renderDeterminateContainer() {
|
|
const e = (1 - this.value / this.max) * 100;
|
|
return _`
|
|
<svg viewBox="0 0 4800 4800">
|
|
<circle class="track" pathLength="100"></circle>
|
|
<circle
|
|
class="active-track"
|
|
pathLength="100"
|
|
stroke-dashoffset=${e}></circle>
|
|
</svg>
|
|
`;
|
|
}
|
|
// Indeterminate mode rendered with 2 bordered-divs. The borders are
|
|
// clipped into half circles by their containers. The divs are then carefully
|
|
// animated to produce changes to the spinner arc size.
|
|
// This approach has 4.5x the FPS of rendering via svg on Chrome 111.
|
|
// See https://lit.dev/playground/#gist=febb773565272f75408ab06a0eb49746.
|
|
renderIndeterminateContainer() {
|
|
return _` <div class="spinner">
|
|
<div class="left">
|
|
<div class="circle"></div>
|
|
</div>
|
|
<div class="right">
|
|
<div class="circle"></div>
|
|
</div>
|
|
</div>`;
|
|
}
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const jh = F`:host{--_active-indicator-color: var(--md-circular-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-width: var(--md-circular-progress-active-indicator-width, 10);--_four-color-active-indicator-four-color: var(--md-circular-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-circular-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-circular-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-circular-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_size: var(--md-circular-progress-size, 48px);display:inline-flex;vertical-align:middle;width:var(--_size);height:var(--_size);position:relative;align-items:center;justify-content:center;contain:strict;content-visibility:auto}.progress{flex:1;align-self:stretch;margin:4px}.progress,.spinner,.left,.right,.circle,svg,.track,.active-track{position:absolute;inset:0}svg{transform:rotate(-90deg)}circle{cx:50%;cy:50%;r:calc(50%*(1 - var(--_active-indicator-width)/100));stroke-width:calc(var(--_active-indicator-width)*1%);stroke-dasharray:100;fill:rgba(0,0,0,0)}.active-track{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1);stroke:var(--_active-indicator-color)}.track{stroke:rgba(0,0,0,0)}.progress.indeterminate{animation:linear infinite linear-rotate;animation-duration:1568.2352941176ms}.spinner{animation:infinite both rotate-arc;animation-duration:5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.left{overflow:hidden;inset:0 50% 0 0}.right{overflow:hidden;inset:0 0 0 50%}.circle{box-sizing:border-box;border-radius:50%;border:solid calc(var(--_active-indicator-width)/100*(var(--_size) - 8px));border-color:var(--_active-indicator-color) var(--_active-indicator-color) rgba(0,0,0,0) rgba(0,0,0,0);animation:expand-arc;animation-iteration-count:infinite;animation-fill-mode:both;animation-duration:1333ms,5332ms;animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.four-color .circle{animation-name:expand-arc,four-color}.left .circle{rotate:135deg;inset:0 -100% 0 0}.right .circle{rotate:100deg;inset:0 0 0 -100%;animation-delay:-666.5ms,0ms}@media(forced-colors: active){.active-track{stroke:CanvasText}.circle{border-color:CanvasText CanvasText Canvas Canvas}}@keyframes expand-arc{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes rotate-arc{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes linear-rotate{to{transform:rotate(360deg)}}@keyframes four-color{0%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}15%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}25%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}40%{border-top-color:var(--_four-color-active-indicator-two-color);border-right-color:var(--_four-color-active-indicator-two-color)}50%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}65%{border-top-color:var(--_four-color-active-indicator-three-color);border-right-color:var(--_four-color-active-indicator-three-color)}75%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}90%{border-top-color:var(--_four-color-active-indicator-four-color);border-right-color:var(--_four-color-active-indicator-four-color)}100%{border-top-color:var(--_four-color-active-indicator-one-color);border-right-color:var(--_four-color-active-indicator-one-color)}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let hi = class extends Bh {
|
|
};
|
|
hi.styles = [jh];
|
|
hi = l([
|
|
H("md-circular-progress")
|
|
], hi);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class tl extends pr {
|
|
constructor() {
|
|
super(...arguments), this.buffer = 0;
|
|
}
|
|
// Note, the indeterminate animation is rendered with transform %'s
|
|
// Previously, this was optimized to use px calculated with the resizeObserver
|
|
// due to a now fixed Chrome bug: crbug.com/389359.
|
|
renderIndicator() {
|
|
const e = {
|
|
transform: `scaleX(${(this.indeterminate ? 1 : this.value / this.max) * 100}%)`
|
|
}, t = this.buffer ?? 0, o = t > 0, a = {
|
|
transform: `scaleX(${(this.indeterminate || !o ? 1 : t / this.max) * 100}%)`
|
|
}, s = this.indeterminate || !o || t >= this.max || this.value >= this.max;
|
|
return _`
|
|
<div class="dots" ?hidden=${s}></div>
|
|
<div class="inactive-track" style=${qt(a)}></div>
|
|
<div class="bar primary-bar" style=${qt(e)}>
|
|
<div class="bar-inner"></div>
|
|
</div>
|
|
<div class="bar secondary-bar">
|
|
<div class="bar-inner"></div>
|
|
</div>
|
|
`;
|
|
}
|
|
}
|
|
l([
|
|
p({ type: Number })
|
|
], tl.prototype, "buffer", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Uh = F`:host{--_active-indicator-color: var(--md-linear-progress-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-linear-progress-active-indicator-height, 4px);--_four-color-active-indicator-four-color: var(--md-linear-progress-four-color-active-indicator-four-color, var(--md-sys-color-tertiary-container, #ffd8e4));--_four-color-active-indicator-one-color: var(--md-linear-progress-four-color-active-indicator-one-color, var(--md-sys-color-primary, #6750a4));--_four-color-active-indicator-three-color: var(--md-linear-progress-four-color-active-indicator-three-color, var(--md-sys-color-tertiary, #7d5260));--_four-color-active-indicator-two-color: var(--md-linear-progress-four-color-active-indicator-two-color, var(--md-sys-color-primary-container, #eaddff));--_track-color: var(--md-linear-progress-track-color, var(--md-sys-color-surface-container-highest, #e6e0e9));--_track-height: var(--md-linear-progress-track-height, 4px);--_track-shape: var(--md-linear-progress-track-shape, var(--md-sys-shape-corner-none, 0px));border-radius:var(--_track-shape);display:flex;position:relative;min-width:80px;height:var(--_track-height);content-visibility:auto;contain:strict}.progress,.dots,.inactive-track,.bar,.bar-inner{position:absolute}.progress{direction:ltr;inset:0;border-radius:inherit;overflow:hidden;display:flex;align-items:center}.bar{animation:none;width:100%;height:var(--_active-indicator-height);transform-origin:left center;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1)}.secondary-bar{display:none}.bar-inner{inset:0;animation:none;background:var(--_active-indicator-color)}.inactive-track{background:var(--_track-color);inset:0;transition:transform 250ms cubic-bezier(0.4, 0, 0.6, 1);transform-origin:left center}.dots{inset:0;animation:linear infinite 250ms;animation-name:buffering;background-color:var(--_track-color);background-repeat:repeat-x;-webkit-mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");z-index:-1}.dots[hidden]{display:none}.indeterminate .bar{transition:none}.indeterminate .primary-bar{inset-inline-start:-145.167%}.indeterminate .secondary-bar{inset-inline-start:-54.8889%;display:block}.indeterminate .primary-bar{animation:linear infinite 2s;animation-name:primary-indeterminate-translate}.indeterminate .primary-bar>.bar-inner{animation:linear infinite 2s primary-indeterminate-scale}.indeterminate.four-color .primary-bar>.bar-inner{animation-name:primary-indeterminate-scale,four-color;animation-duration:2s,4s}.indeterminate .secondary-bar{animation:linear infinite 2s;animation-name:secondary-indeterminate-translate}.indeterminate .secondary-bar>.bar-inner{animation:linear infinite 2s secondary-indeterminate-scale}.indeterminate.four-color .secondary-bar>.bar-inner{animation-name:secondary-indeterminate-scale,four-color;animation-duration:2s,4s}:host(:dir(rtl)){transform:scale(-1)}@keyframes primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.00432);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes buffering{0%{transform:translateX(calc(var(--_track-height) / 2 * 5))}}@keyframes primary-indeterminate-translate{0%{transform:translateX(0px)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0px)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.6714%)}100%{transform:translateX(200.611%)}}@keyframes secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0px)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.6519%)}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.3862%)}100%{transform:translateX(160.278%)}}@keyframes four-color{0%{background:var(--_four-color-active-indicator-one-color)}15%{background:var(--_four-color-active-indicator-one-color)}25%{background:var(--_four-color-active-indicator-two-color)}40%{background:var(--_four-color-active-indicator-two-color)}50%{background:var(--_four-color-active-indicator-three-color)}65%{background:var(--_four-color-active-indicator-three-color)}75%{background:var(--_four-color-active-indicator-four-color)}90%{background:var(--_four-color-active-indicator-four-color)}100%{background:var(--_four-color-active-indicator-one-color)}}@media(forced-colors: active){:host{outline:1px solid CanvasText}.bar-inner,.dots{background-color:CanvasText}}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let pi = class extends tl {
|
|
};
|
|
pi.styles = [Uh];
|
|
pi = l([
|
|
H("md-linear-progress")
|
|
], pi);
|
|
const Vh = ee({
|
|
react: J,
|
|
tagName: "md-circular-progress",
|
|
elementClass: hi
|
|
});
|
|
ee({
|
|
react: J,
|
|
tagName: "md-linear-progress",
|
|
elementClass: pi
|
|
});
|
|
const xf = (r) => {
|
|
const {
|
|
value: e,
|
|
max: t,
|
|
fourColor: o,
|
|
className: i,
|
|
style: a,
|
|
id: s,
|
|
color: d,
|
|
size: h,
|
|
...y
|
|
} = r;
|
|
return /* @__PURE__ */ V.jsx(
|
|
Vh,
|
|
{
|
|
indeterminate: e === void 0,
|
|
value: e,
|
|
max: t,
|
|
fourColor: o,
|
|
className: i,
|
|
style: {
|
|
...a,
|
|
"--md-circular-progress-color": d || "var(--md-sys-color-primary)",
|
|
"--md-circular-progress-size": h || "48px"
|
|
},
|
|
id: s,
|
|
...y
|
|
}
|
|
);
|
|
};
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const Hh = Je(W);
|
|
class et extends Hh {
|
|
constructor() {
|
|
super(...arguments), this.disabled = !1, this.type = "menuitem", this.href = "", this.target = "", this.keepOpen = !1, this.selected = !1, this.menuItemController = new Ss(this, {
|
|
getHeadlineElements: () => this.headlineElements,
|
|
getSupportingTextElements: () => this.supportingTextElements,
|
|
getDefaultElements: () => this.defaultElements,
|
|
getInteractiveElement: () => this.listItemRoot
|
|
});
|
|
}
|
|
/**
|
|
* The text that is selectable via typeahead. If not set, defaults to the
|
|
* innerText of the item slotted into the `"headline"` slot.
|
|
*/
|
|
get typeaheadText() {
|
|
return this.menuItemController.typeaheadText;
|
|
}
|
|
set typeaheadText(e) {
|
|
this.menuItemController.setTypeaheadText(e);
|
|
}
|
|
render() {
|
|
return this.renderListItem(_`
|
|
<md-item>
|
|
<div slot="container">
|
|
${this.renderRipple()} ${this.renderFocusRing()}
|
|
</div>
|
|
<slot name="start" slot="start"></slot>
|
|
<slot name="end" slot="end"></slot>
|
|
${this.renderBody()}
|
|
</md-item>
|
|
`);
|
|
}
|
|
/**
|
|
* Renders the root list item.
|
|
*
|
|
* @param content the child content of the list item.
|
|
*/
|
|
renderListItem(e) {
|
|
const t = this.type === "link";
|
|
let o;
|
|
switch (this.menuItemController.tagName) {
|
|
case "a":
|
|
o = Xe`a`;
|
|
break;
|
|
case "button":
|
|
o = Xe`button`;
|
|
break;
|
|
default:
|
|
case "li":
|
|
o = Xe`li`;
|
|
break;
|
|
}
|
|
const i = t && this.target ? this.target : x;
|
|
return Fr`
|
|
<${o}
|
|
id="item"
|
|
tabindex=${this.disabled && !t ? -1 : 0}
|
|
role=${this.menuItemController.role}
|
|
aria-label=${this.ariaLabel || x}
|
|
aria-selected=${this.ariaSelected || x}
|
|
aria-checked=${this.ariaChecked || x}
|
|
aria-expanded=${this.ariaExpanded || x}
|
|
aria-haspopup=${this.ariaHasPopup || x}
|
|
class="list-item ${ye(this.getRenderClasses())}"
|
|
href=${this.href || x}
|
|
target=${i}
|
|
@click=${this.menuItemController.onClick}
|
|
@keydown=${this.menuItemController.onKeydown}
|
|
>${e}</${o}>
|
|
`;
|
|
}
|
|
/**
|
|
* Handles rendering of the ripple element.
|
|
*/
|
|
renderRipple() {
|
|
return _` <md-ripple
|
|
part="ripple"
|
|
for="item"
|
|
?disabled=${this.disabled}></md-ripple>`;
|
|
}
|
|
/**
|
|
* Handles rendering of the focus ring.
|
|
*/
|
|
renderFocusRing() {
|
|
return _` <md-focus-ring
|
|
part="focus-ring"
|
|
for="item"
|
|
inward></md-focus-ring>`;
|
|
}
|
|
/**
|
|
* Classes applied to the list item root.
|
|
*/
|
|
getRenderClasses() {
|
|
return {
|
|
disabled: this.disabled,
|
|
selected: this.selected
|
|
};
|
|
}
|
|
/**
|
|
* Handles rendering the headline and supporting text.
|
|
*/
|
|
renderBody() {
|
|
return _`
|
|
<slot></slot>
|
|
<slot name="overline" slot="overline"></slot>
|
|
<slot name="headline" slot="headline"></slot>
|
|
<slot name="supporting-text" slot="supporting-text"></slot>
|
|
<slot
|
|
name="trailing-supporting-text"
|
|
slot="trailing-supporting-text"></slot>
|
|
`;
|
|
}
|
|
focus() {
|
|
var e;
|
|
(e = this.listItemRoot) == null || e.focus();
|
|
}
|
|
}
|
|
et.shadowRootOptions = {
|
|
...W.shadowRootOptions,
|
|
delegatesFocus: !0
|
|
};
|
|
l([
|
|
p({ type: Boolean, reflect: !0 })
|
|
], et.prototype, "disabled", void 0);
|
|
l([
|
|
p()
|
|
], et.prototype, "type", void 0);
|
|
l([
|
|
p()
|
|
], et.prototype, "href", void 0);
|
|
l([
|
|
p()
|
|
], et.prototype, "target", void 0);
|
|
l([
|
|
p({ type: Boolean, attribute: "keep-open" })
|
|
], et.prototype, "keepOpen", void 0);
|
|
l([
|
|
p({ type: Boolean })
|
|
], et.prototype, "selected", void 0);
|
|
l([
|
|
G(".list-item")
|
|
], et.prototype, "listItemRoot", void 0);
|
|
l([
|
|
We({ slot: "headline" })
|
|
], et.prototype, "headlineElements", void 0);
|
|
l([
|
|
We({ slot: "supporting-text" })
|
|
], et.prototype, "supportingTextElements", void 0);
|
|
l([
|
|
Ia({ slot: "" })
|
|
], et.prototype, "defaultElements", void 0);
|
|
l([
|
|
p({ attribute: "typeahead-text" })
|
|
], et.prototype, "typeaheadText", null);
|
|
/**
|
|
* @license
|
|
* Copyright 2022 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let fi = class extends et {
|
|
};
|
|
fi.styles = [Ts];
|
|
fi = l([
|
|
H("md-menu-item")
|
|
], fi);
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
class zt extends W {
|
|
get item() {
|
|
return this.items[0] ?? null;
|
|
}
|
|
get menu() {
|
|
return this.menus[0] ?? null;
|
|
}
|
|
constructor() {
|
|
super(), this.anchorCorner = Uo.START_END, this.menuCorner = Uo.START_START, this.hoverOpenDelay = 400, this.hoverCloseDelay = 400, this.isSubMenu = !0, this.previousOpenTimeout = 0, this.previousCloseTimeout = 0, this.onMouseenter = () => {
|
|
var e;
|
|
clearTimeout(this.previousOpenTimeout), clearTimeout(this.previousCloseTimeout), !((e = this.menu) != null && e.open) && (this.hoverOpenDelay ? this.previousOpenTimeout = setTimeout(() => {
|
|
this.show();
|
|
}, this.hoverOpenDelay) : this.show());
|
|
}, this.onMouseleave = () => {
|
|
clearTimeout(this.previousCloseTimeout), clearTimeout(this.previousOpenTimeout), this.hoverCloseDelay ? this.previousCloseTimeout = setTimeout(() => {
|
|
this.close();
|
|
}, this.hoverCloseDelay) : this.close();
|
|
}, this.addEventListener("mouseenter", this.onMouseenter), this.addEventListener("mouseleave", this.onMouseleave);
|
|
}
|
|
render() {
|
|
return _`
|
|
<slot
|
|
name="item"
|
|
@click=${this.onClick}
|
|
@keydown=${this.onKeydown}
|
|
@slotchange=${this.onSlotchange}>
|
|
</slot>
|
|
<slot
|
|
name="menu"
|
|
@keydown=${this.onSubMenuKeydown}
|
|
@close-menu=${this.onCloseSubmenu}
|
|
@slotchange=${this.onSlotchange}>
|
|
</slot>
|
|
`;
|
|
}
|
|
firstUpdated() {
|
|
this.onSlotchange();
|
|
}
|
|
/**
|
|
* Shows the submenu.
|
|
*/
|
|
async show() {
|
|
const e = this.menu;
|
|
if (!e || e.open)
|
|
return;
|
|
e.addEventListener("closed", () => {
|
|
this.item.ariaExpanded = "false", this.dispatchEvent(na()), this.dispatchEvent(_o()), e.ariaHidden = "true";
|
|
}, { once: !0 }), e.positioning === "document" && (e.positioning = "absolute"), e.quick = !0, e.hasOverflow = !0, e.anchorCorner = this.anchorCorner, e.menuCorner = this.menuCorner, e.anchorElement = this.item, e.defaultFocus = "first-item", e.removeAttribute("aria-hidden"), e.skipRestoreFocus = !1;
|
|
const t = e.open;
|
|
if (e.show(), this.item.ariaExpanded = "true", this.item.ariaHasPopup = "menu", e.id && this.item.setAttribute("aria-controls", e.id), this.dispatchEvent(_o()), this.dispatchEvent(fc()), this.item.selected = !0, !t) {
|
|
let o = (a) => {
|
|
};
|
|
const i = new Promise((a) => {
|
|
o = a;
|
|
});
|
|
e.addEventListener("opened", o, { once: !0 }), await i;
|
|
}
|
|
}
|
|
/**
|
|
* Closes the submenu.
|
|
*/
|
|
async close() {
|
|
const e = this.menu;
|
|
if (!e || !e.open)
|
|
return;
|
|
this.dispatchEvent(na()), e.quick = !0, e.close(), this.dispatchEvent(_o());
|
|
let t = (i) => {
|
|
};
|
|
const o = new Promise((i) => {
|
|
t = i;
|
|
});
|
|
e.addEventListener("closed", t, { once: !0 }), await o;
|
|
}
|
|
onSlotchange() {
|
|
var t;
|
|
if (!this.item)
|
|
return;
|
|
this.item.ariaExpanded = "false", this.item.ariaHasPopup = "menu", (t = this.menu) != null && t.id && this.item.setAttribute("aria-controls", this.menu.id), this.item.keepOpen = !0;
|
|
const e = this.menu;
|
|
e && (e.isSubmenu = !0, e.ariaHidden = "true");
|
|
}
|
|
onClick() {
|
|
this.show();
|
|
}
|
|
/**
|
|
* On item keydown handles opening the submenu.
|
|
*/
|
|
async onKeydown(e) {
|
|
const t = this.isSubmenuOpenKey(e.code);
|
|
if (e.defaultPrevented)
|
|
return;
|
|
const o = t && (Et.LEFT === e.code || Et.RIGHT === e.code);
|
|
if ((e.code === nr.SPACE || o) && (e.preventDefault(), o && e.stopPropagation()), !t)
|
|
return;
|
|
const i = this.menu;
|
|
if (!i)
|
|
return;
|
|
const a = i.items, s = gi(a);
|
|
if (s) {
|
|
await this.show(), s.tabIndex = 0, s.focus();
|
|
return;
|
|
}
|
|
}
|
|
onCloseSubmenu(e) {
|
|
const { itemPath: t, reason: o } = e.detail;
|
|
if (t.push(this.item), this.dispatchEvent(na()), o.kind === ga.KEYDOWN && o.key === xa.ESCAPE) {
|
|
e.stopPropagation(), this.item.dispatchEvent(_s());
|
|
return;
|
|
}
|
|
this.dispatchEvent(_o());
|
|
}
|
|
async onSubMenuKeydown(e) {
|
|
var i;
|
|
if (e.defaultPrevented)
|
|
return;
|
|
const { close: t, keyCode: o } = this.isSubmenuCloseKey(e.code);
|
|
t && (e.preventDefault(), (o === Et.LEFT || o === Et.RIGHT) && e.stopPropagation(), await this.close(), cc(this.menu.items), (i = this.item) == null || i.focus(), this.item.tabIndex = 0, this.item.focus());
|
|
}
|
|
/**
|
|
* Determines whether the given KeyboardEvent code is one that should open
|
|
* the submenu. This is RTL-aware. By default, left, right, space, or enter.
|
|
*
|
|
* @param code The native KeyboardEvent code.
|
|
* @return Whether or not the key code should open the submenu.
|
|
*/
|
|
isSubmenuOpenKey(e) {
|
|
const o = getComputedStyle(this).direction === "rtl" ? Et.LEFT : Et.RIGHT;
|
|
switch (e) {
|
|
case o:
|
|
case nr.SPACE:
|
|
case nr.ENTER:
|
|
return !0;
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
/**
|
|
* Determines whether the given KeyboardEvent code is one that should close
|
|
* the submenu. This is RTL-aware. By default right, left, or escape.
|
|
*
|
|
* @param code The native KeyboardEvent code.
|
|
* @return Whether or not the key code should close the submenu.
|
|
*/
|
|
isSubmenuCloseKey(e) {
|
|
const o = getComputedStyle(this).direction === "rtl" ? Et.RIGHT : Et.LEFT;
|
|
switch (e) {
|
|
case o:
|
|
case xa.ESCAPE:
|
|
return { close: !0, keyCode: e };
|
|
default:
|
|
return { close: !1 };
|
|
}
|
|
}
|
|
}
|
|
l([
|
|
p({ attribute: "anchor-corner" })
|
|
], zt.prototype, "anchorCorner", void 0);
|
|
l([
|
|
p({ attribute: "menu-corner" })
|
|
], zt.prototype, "menuCorner", void 0);
|
|
l([
|
|
p({ type: Number, attribute: "hover-open-delay" })
|
|
], zt.prototype, "hoverOpenDelay", void 0);
|
|
l([
|
|
p({ type: Number, attribute: "hover-close-delay" })
|
|
], zt.prototype, "hoverCloseDelay", void 0);
|
|
l([
|
|
p({ type: Boolean, reflect: !0, attribute: "md-sub-menu" })
|
|
], zt.prototype, "isSubMenu", void 0);
|
|
l([
|
|
We({ slot: "item", flatten: !0 })
|
|
], zt.prototype, "items", void 0);
|
|
l([
|
|
We({ slot: "menu", flatten: !0 })
|
|
], zt.prototype, "menus", void 0);
|
|
/**
|
|
* @license
|
|
* Copyright 2024 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
const qh = F`:host{position:relative;display:flex;flex-direction:column}
|
|
`;
|
|
/**
|
|
* @license
|
|
* Copyright 2023 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
let vi = class extends zt {
|
|
};
|
|
vi.styles = [qh];
|
|
vi = l([
|
|
H("md-sub-menu")
|
|
], vi);
|
|
const Wh = ee({
|
|
react: J,
|
|
tagName: "md-menu",
|
|
elementClass: Vo
|
|
});
|
|
ee({
|
|
react: J,
|
|
tagName: "md-menu-item",
|
|
elementClass: fi,
|
|
events: {
|
|
"close-menu": "onCloseMenu"
|
|
}
|
|
});
|
|
ee({
|
|
react: J,
|
|
tagName: "md-sub-menu",
|
|
elementClass: vi
|
|
});
|
|
const kf = (r) => /* @__PURE__ */ V.jsx(
|
|
Wh,
|
|
{
|
|
...r
|
|
}
|
|
), Cf = ({ children: r, style: e, ...t }) => (console.log(t, e), /* @__PURE__ */ V.jsx(
|
|
Us,
|
|
{
|
|
...t,
|
|
style: {
|
|
borderRadius: "28px",
|
|
backgroundColor: "var(--md-sys-color-surface)",
|
|
color: "var(--md-sys-color-on-surface)",
|
|
padding: "18px",
|
|
display: "flex",
|
|
...e
|
|
},
|
|
children: r
|
|
}
|
|
)), Kh = ee({
|
|
tagName: "label",
|
|
react: J,
|
|
elementClass: HTMLLabelElement
|
|
}), Ef = (r) => {
|
|
const { form: e, ...t } = r;
|
|
return /* @__PURE__ */ V.jsx(
|
|
Kh,
|
|
{
|
|
...t,
|
|
style: {
|
|
display: "flex",
|
|
alignItems: "center",
|
|
gap: "8px",
|
|
...r.style,
|
|
fontFamily: "var(--md-ref-typeface-plain)"
|
|
}
|
|
}
|
|
);
|
|
}, $f = (r) => {
|
|
const { className: e, id: t, children: o, style: i, ...a } = r;
|
|
return /* @__PURE__ */ V.jsx(
|
|
Us,
|
|
{
|
|
className: e,
|
|
id: t,
|
|
style: {
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "space-between",
|
|
padding: "8px 16px",
|
|
backgroundColor: "transparent",
|
|
...i
|
|
},
|
|
...a,
|
|
children: o
|
|
}
|
|
);
|
|
};
|
|
export {
|
|
$f as AppBar,
|
|
rf as AssistChip,
|
|
Us as Box,
|
|
df as BrandedFAB,
|
|
up as Button,
|
|
fp as Checkbox,
|
|
tf as ChipSet,
|
|
xf as CircularProgress,
|
|
Lp as Dialog,
|
|
lf as FAB,
|
|
of as FilterChip,
|
|
Ef as FormLabel,
|
|
Wp as IconButton,
|
|
af as InputChip,
|
|
Np as List,
|
|
kf as Menu,
|
|
Cf as Paper,
|
|
bp as Radio,
|
|
Ep as Select,
|
|
Ip as Slider,
|
|
Sp as Switch,
|
|
mf as Tab,
|
|
vf as Tabs,
|
|
tp as TextField,
|
|
Bp as Typography
|
|
};
|