import { f, m } from "./chunk.KMHRSCRM.js"; import { e, i, t } from "./chunk.UP75L23G.js"; import { E, T, u } from "./chunk.OOP2EFQH.js"; // src/internal/default-value.ts var defaultValue = (propertyName = "value") => (proto, key) => { const ctor = proto.constructor; const attributeChangedCallback = ctor.prototype.attributeChangedCallback; ctor.prototype.attributeChangedCallback = function(name, old, value) { var _a; const options = ctor.getPropertyOptions(propertyName); const attributeName = typeof options.attribute === "string" ? options.attribute : propertyName; if (name === attributeName) { const converter = options.converter || u; const fromAttribute = typeof converter === "function" ? converter : (_a = converter == null ? void 0 : converter.fromAttribute) != null ? _a : u.fromAttribute; const newValue = fromAttribute(value, options.type); if (this[propertyName] !== newValue) { this[key] = newValue; } } attributeChangedCallback.call(this, name, old, value); }; }; // node_modules/lit-html/directives/live.js var l = e(class extends i { 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 (!f(r)) throw Error("`live` bindings can only contain a single expression"); } render(r) { return r; } update(i2, [t2]) { if (t2 === T || t2 === E) return t2; const o = i2.element, l2 = i2.name; if (i2.type === t.PROPERTY) { if (t2 === o[l2]) return T; } else if (i2.type === t.BOOLEAN_ATTRIBUTE) { if (!!t2 === o.hasAttribute(l2)) return T; } else if (i2.type === t.ATTRIBUTE && o.getAttribute(l2) === t2 + "") return T; return m(i2), t2; } }); export { defaultValue, l }; /*! Bundled license information: lit-html/directives/live.js: (** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) */