next-flow-design 1.6.1 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
- import { createComponent as N } from "@lit/react";
2
- import T from "react";
3
- import { css as C, LitElement as W, html as f } from "lit";
4
- const G = globalThis, se = G.ShadowRoot && (G.ShadyCSS === void 0 || G.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, xe = /* @__PURE__ */ Symbol(), de = /* @__PURE__ */ new WeakMap();
5
- let Pe = class {
6
- constructor(e, o, r) {
7
- if (this._$cssResult$ = !0, r !== xe) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
1
+ import { createComponent as M } from "@lit/react";
2
+ import H from "react";
3
+ import { css as S, LitElement as I, html as f } from "lit";
4
+ const Q = globalThis, ne = Q.ShadowRoot && (Q.ShadyCSS === void 0 || Q.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ee = /* @__PURE__ */ Symbol(), pe = /* @__PURE__ */ new WeakMap();
5
+ let Me = class {
6
+ constructor(e, o, s) {
7
+ if (this._$cssResult$ = !0, s !== Ee) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
8
8
  this.cssText = e, this.t = o;
9
9
  }
10
10
  get styleSheet() {
11
11
  let e = this.o;
12
12
  const o = this.t;
13
- if (se && e === void 0) {
14
- const r = o !== void 0 && o.length === 1;
15
- r && (e = de.get(o)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), r && de.set(o, e));
13
+ if (ne && e === void 0) {
14
+ const s = o !== void 0 && o.length === 1;
15
+ s && (e = pe.get(o)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && pe.set(o, e));
16
16
  }
17
17
  return e;
18
18
  }
@@ -20,21 +20,21 @@ let Pe = class {
20
20
  return this.cssText;
21
21
  }
22
22
  };
23
- const Me = (t) => new Pe(typeof t == "string" ? t : t + "", void 0, xe), De = (t, e) => {
24
- if (se) t.adoptedStyleSheets = e.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
23
+ const He = (t) => new Me(typeof t == "string" ? t : t + "", void 0, Ee), Ne = (t, e) => {
24
+ if (ne) t.adoptedStyleSheets = e.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
25
25
  else for (const o of e) {
26
- const r = document.createElement("style"), s = G.litNonce;
27
- s !== void 0 && r.setAttribute("nonce", s), r.textContent = o.cssText, t.appendChild(r);
26
+ const s = document.createElement("style"), r = Q.litNonce;
27
+ r !== void 0 && s.setAttribute("nonce", r), s.textContent = o.cssText, t.appendChild(s);
28
28
  }
29
- }, ue = se ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
29
+ }, fe = ne ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
30
30
  let o = "";
31
- for (const r of e.cssRules) o += r.cssText;
32
- return Me(o);
31
+ for (const s of e.cssRules) o += s.cssText;
32
+ return He(o);
33
33
  })(t) : t;
34
- const { is: Ne, defineProperty: Te, getOwnPropertyDescriptor: Oe, getOwnPropertyNames: Be, getOwnPropertySymbols: Ve, getPrototypeOf: He } = Object, ee = globalThis, pe = ee.trustedTypes, Ue = pe ? pe.emptyScript : "", Fe = ee.reactiveElementPolyfillSupport, z = (t, e) => t, J = { toAttribute(t, e) {
34
+ const { is: Te, defineProperty: Oe, getOwnPropertyDescriptor: ze, getOwnPropertyNames: Be, getOwnPropertySymbols: Ve, getPrototypeOf: Fe } = Object, oe = globalThis, be = oe.trustedTypes, Re = be ? be.emptyScript : "", Le = oe.reactiveElementPolyfillSupport, K = (t, e) => t, ee = { toAttribute(t, e) {
35
35
  switch (e) {
36
36
  case Boolean:
37
- t = t ? Ue : null;
37
+ t = t ? Re : null;
38
38
  break;
39
39
  case Object:
40
40
  case Array:
@@ -59,69 +59,69 @@ const { is: Ne, defineProperty: Te, getOwnPropertyDescriptor: Oe, getOwnProperty
59
59
  }
60
60
  }
61
61
  return o;
62
- } }, ie = (t, e) => !Ne(t, e), fe = { attribute: !0, type: String, converter: J, reflect: !1, useDefault: !1, hasChanged: ie };
63
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), ee.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
64
- let V = class extends HTMLElement {
62
+ } }, ae = (t, e) => !Te(t, e), me = { attribute: !0, type: String, converter: ee, reflect: !1, useDefault: !1, hasChanged: ae };
63
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), oe.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
64
+ let F = class extends HTMLElement {
65
65
  static addInitializer(e) {
66
66
  this._$Ei(), (this.l ??= []).push(e);
67
67
  }
68
68
  static get observedAttributes() {
69
69
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
70
70
  }
71
- static createProperty(e, o = fe) {
71
+ static createProperty(e, o = me) {
72
72
  if (o.state && (o.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((o = Object.create(o)).wrapped = !0), this.elementProperties.set(e, o), !o.noAccessor) {
73
- const r = /* @__PURE__ */ Symbol(), s = this.getPropertyDescriptor(e, r, o);
74
- s !== void 0 && Te(this.prototype, e, s);
73
+ const s = /* @__PURE__ */ Symbol(), r = this.getPropertyDescriptor(e, s, o);
74
+ r !== void 0 && Oe(this.prototype, e, r);
75
75
  }
76
76
  }
77
- static getPropertyDescriptor(e, o, r) {
78
- const { get: s, set: i } = Oe(this.prototype, e) ?? { get() {
77
+ static getPropertyDescriptor(e, o, s) {
78
+ const { get: r, set: i } = ze(this.prototype, e) ?? { get() {
79
79
  return this[o];
80
80
  }, set(n) {
81
81
  this[o] = n;
82
82
  } };
83
- return { get: s, set(n) {
84
- const l = s?.call(this);
85
- i?.call(this, n), this.requestUpdate(e, l, r);
83
+ return { get: r, set(n) {
84
+ const l = r?.call(this);
85
+ i?.call(this, n), this.requestUpdate(e, l, s);
86
86
  }, configurable: !0, enumerable: !0 };
87
87
  }
88
88
  static getPropertyOptions(e) {
89
- return this.elementProperties.get(e) ?? fe;
89
+ return this.elementProperties.get(e) ?? me;
90
90
  }
91
91
  static _$Ei() {
92
- if (this.hasOwnProperty(z("elementProperties"))) return;
93
- const e = He(this);
92
+ if (this.hasOwnProperty(K("elementProperties"))) return;
93
+ const e = Fe(this);
94
94
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
95
95
  }
96
96
  static finalize() {
97
- if (this.hasOwnProperty(z("finalized"))) return;
98
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(z("properties"))) {
99
- const o = this.properties, r = [...Be(o), ...Ve(o)];
100
- for (const s of r) this.createProperty(s, o[s]);
97
+ if (this.hasOwnProperty(K("finalized"))) return;
98
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(K("properties"))) {
99
+ const o = this.properties, s = [...Be(o), ...Ve(o)];
100
+ for (const r of s) this.createProperty(r, o[r]);
101
101
  }
102
102
  const e = this[Symbol.metadata];
103
103
  if (e !== null) {
104
104
  const o = litPropertyMetadata.get(e);
105
- if (o !== void 0) for (const [r, s] of o) this.elementProperties.set(r, s);
105
+ if (o !== void 0) for (const [s, r] of o) this.elementProperties.set(s, r);
106
106
  }
107
107
  this._$Eh = /* @__PURE__ */ new Map();
108
- for (const [o, r] of this.elementProperties) {
109
- const s = this._$Eu(o, r);
110
- s !== void 0 && this._$Eh.set(s, o);
108
+ for (const [o, s] of this.elementProperties) {
109
+ const r = this._$Eu(o, s);
110
+ r !== void 0 && this._$Eh.set(r, o);
111
111
  }
112
112
  this.elementStyles = this.finalizeStyles(this.styles);
113
113
  }
114
114
  static finalizeStyles(e) {
115
115
  const o = [];
116
116
  if (Array.isArray(e)) {
117
- const r = new Set(e.flat(1 / 0).reverse());
118
- for (const s of r) o.unshift(ue(s));
119
- } else e !== void 0 && o.push(ue(e));
117
+ const s = new Set(e.flat(1 / 0).reverse());
118
+ for (const r of s) o.unshift(fe(r));
119
+ } else e !== void 0 && o.push(fe(e));
120
120
  return o;
121
121
  }
122
122
  static _$Eu(e, o) {
123
- const r = o.attribute;
124
- return r === !1 ? void 0 : typeof r == "string" ? r : typeof e == "string" ? e.toLowerCase() : void 0;
123
+ const s = o.attribute;
124
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0;
125
125
  }
126
126
  constructor() {
127
127
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -137,12 +137,12 @@ let V = class extends HTMLElement {
137
137
  }
138
138
  _$E_() {
139
139
  const e = /* @__PURE__ */ new Map(), o = this.constructor.elementProperties;
140
- for (const r of o.keys()) this.hasOwnProperty(r) && (e.set(r, this[r]), delete this[r]);
140
+ for (const s of o.keys()) this.hasOwnProperty(s) && (e.set(s, this[s]), delete this[s]);
141
141
  e.size > 0 && (this._$Ep = e);
142
142
  }
143
143
  createRenderRoot() {
144
144
  const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
145
- return De(e, this.constructor.elementStyles), e;
145
+ return Ne(e, this.constructor.elementStyles), e;
146
146
  }
147
147
  connectedCallback() {
148
148
  this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
@@ -152,35 +152,35 @@ let V = class extends HTMLElement {
152
152
  disconnectedCallback() {
153
153
  this._$EO?.forEach((e) => e.hostDisconnected?.());
154
154
  }
155
- attributeChangedCallback(e, o, r) {
156
- this._$AK(e, r);
155
+ attributeChangedCallback(e, o, s) {
156
+ this._$AK(e, s);
157
157
  }
158
158
  _$ET(e, o) {
159
- const r = this.constructor.elementProperties.get(e), s = this.constructor._$Eu(e, r);
160
- if (s !== void 0 && r.reflect === !0) {
161
- const i = (r.converter?.toAttribute !== void 0 ? r.converter : J).toAttribute(o, r.type);
162
- this._$Em = e, i == null ? this.removeAttribute(s) : this.setAttribute(s, i), this._$Em = null;
159
+ const s = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, s);
160
+ if (r !== void 0 && s.reflect === !0) {
161
+ const i = (s.converter?.toAttribute !== void 0 ? s.converter : ee).toAttribute(o, s.type);
162
+ this._$Em = e, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
163
163
  }
164
164
  }
165
165
  _$AK(e, o) {
166
- const r = this.constructor, s = r._$Eh.get(e);
167
- if (s !== void 0 && this._$Em !== s) {
168
- const i = r.getPropertyOptions(s), n = typeof i.converter == "function" ? { fromAttribute: i.converter } : i.converter?.fromAttribute !== void 0 ? i.converter : J;
169
- this._$Em = s;
166
+ const s = this.constructor, r = s._$Eh.get(e);
167
+ if (r !== void 0 && this._$Em !== r) {
168
+ const i = s.getPropertyOptions(r), n = typeof i.converter == "function" ? { fromAttribute: i.converter } : i.converter?.fromAttribute !== void 0 ? i.converter : ee;
169
+ this._$Em = r;
170
170
  const l = n.fromAttribute(o, i.type);
171
- this[s] = l ?? this._$Ej?.get(s) ?? l, this._$Em = null;
171
+ this[r] = l ?? this._$Ej?.get(r) ?? l, this._$Em = null;
172
172
  }
173
173
  }
174
- requestUpdate(e, o, r, s = !1, i) {
174
+ requestUpdate(e, o, s, r = !1, i) {
175
175
  if (e !== void 0) {
176
176
  const n = this.constructor;
177
- if (s === !1 && (i = this[e]), r ??= n.getPropertyOptions(e), !((r.hasChanged ?? ie)(i, o) || r.useDefault && r.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, r)))) return;
178
- this.C(e, o, r);
177
+ if (r === !1 && (i = this[e]), s ??= n.getPropertyOptions(e), !((s.hasChanged ?? ae)(i, o) || s.useDefault && s.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(n._$Eu(e, s)))) return;
178
+ this.C(e, o, s);
179
179
  }
180
180
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
181
181
  }
182
- C(e, o, { useDefault: r, reflect: s, wrapped: i }, n) {
183
- r && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, n ?? o ?? this[e]), i !== !0 || n !== void 0) || (this._$AL.has(e) || (this.hasUpdated || r || (o = void 0), this._$AL.set(e, o)), s === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
182
+ C(e, o, { useDefault: s, reflect: r, wrapped: i }, n) {
183
+ s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, n ?? o ?? this[e]), i !== !0 || n !== void 0) || (this._$AL.has(e) || (this.hasUpdated || s || (o = void 0), this._$AL.set(e, o)), r === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
184
184
  }
185
185
  async _$EP() {
186
186
  this.isUpdatePending = !0;
@@ -199,21 +199,21 @@ let V = class extends HTMLElement {
199
199
  if (!this.isUpdatePending) return;
200
200
  if (!this.hasUpdated) {
201
201
  if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
202
- for (const [s, i] of this._$Ep) this[s] = i;
202
+ for (const [r, i] of this._$Ep) this[r] = i;
203
203
  this._$Ep = void 0;
204
204
  }
205
- const r = this.constructor.elementProperties;
206
- if (r.size > 0) for (const [s, i] of r) {
207
- const { wrapped: n } = i, l = this[s];
208
- n !== !0 || this._$AL.has(s) || l === void 0 || this.C(s, void 0, i, l);
205
+ const s = this.constructor.elementProperties;
206
+ if (s.size > 0) for (const [r, i] of s) {
207
+ const { wrapped: n } = i, l = this[r];
208
+ n !== !0 || this._$AL.has(r) || l === void 0 || this.C(r, void 0, i, l);
209
209
  }
210
210
  }
211
211
  let e = !1;
212
212
  const o = this._$AL;
213
213
  try {
214
- e = this.shouldUpdate(o), e ? (this.willUpdate(o), this._$EO?.forEach((r) => r.hostUpdate?.()), this.update(o)) : this._$EM();
215
- } catch (r) {
216
- throw e = !1, this._$EM(), r;
214
+ e = this.shouldUpdate(o), e ? (this.willUpdate(o), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(o)) : this._$EM();
215
+ } catch (s) {
216
+ throw e = !1, this._$EM(), s;
217
217
  }
218
218
  e && this._$AE(o);
219
219
  }
@@ -242,11 +242,11 @@ let V = class extends HTMLElement {
242
242
  firstUpdated(e) {
243
243
  }
244
244
  };
245
- V.elementStyles = [], V.shadowRootOptions = { mode: "open" }, V[z("elementProperties")] = /* @__PURE__ */ new Map(), V[z("finalized")] = /* @__PURE__ */ new Map(), Fe?.({ ReactiveElement: V }), (ee.reactiveElementVersions ??= []).push("2.1.2");
246
- const Le = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: ie }, Ie = (t = Le, e, o) => {
247
- const { kind: r, metadata: s } = o;
248
- let i = globalThis.litPropertyMetadata.get(s);
249
- if (i === void 0 && globalThis.litPropertyMetadata.set(s, i = /* @__PURE__ */ new Map()), r === "setter" && ((t = Object.create(t)).wrapped = !0), i.set(o.name, t), r === "accessor") {
245
+ F.elementStyles = [], F.shadowRootOptions = { mode: "open" }, F[K("elementProperties")] = /* @__PURE__ */ new Map(), F[K("finalized")] = /* @__PURE__ */ new Map(), Le?.({ ReactiveElement: F }), (oe.reactiveElementVersions ??= []).push("2.1.2");
246
+ const Ue = { attribute: !0, type: String, converter: ee, reflect: !1, hasChanged: ae }, je = (t = Ue, e, o) => {
247
+ const { kind: s, metadata: r } = o;
248
+ let i = globalThis.litPropertyMetadata.get(r);
249
+ if (i === void 0 && globalThis.litPropertyMetadata.set(r, i = /* @__PURE__ */ new Map()), s === "setter" && ((t = Object.create(t)).wrapped = !0), i.set(o.name, t), s === "accessor") {
250
250
  const { name: n } = o;
251
251
  return { set(l) {
252
252
  const a = e.get.call(this);
@@ -255,31 +255,31 @@ const Le = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged:
255
255
  return l !== void 0 && this.C(n, void 0, t, l), l;
256
256
  } };
257
257
  }
258
- if (r === "setter") {
258
+ if (s === "setter") {
259
259
  const { name: n } = o;
260
260
  return function(l) {
261
261
  const a = this[n];
262
262
  e.call(this, l), this.requestUpdate(n, a, t, !0, l);
263
263
  };
264
264
  }
265
- throw Error("Unsupported decorator location: " + r);
265
+ throw Error("Unsupported decorator location: " + s);
266
266
  };
267
267
  function h(t) {
268
- return (e, o) => typeof o == "object" ? Ie(t, e, o) : ((r, s, i) => {
269
- const n = s.hasOwnProperty(i);
270
- return s.constructor.createProperty(i, r), n ? Object.getOwnPropertyDescriptor(s, i) : void 0;
268
+ return (e, o) => typeof o == "object" ? je(t, e, o) : ((s, r, i) => {
269
+ const n = r.hasOwnProperty(i);
270
+ return r.constructor.createProperty(i, s), n ? Object.getOwnPropertyDescriptor(r, i) : void 0;
271
271
  })(t, e, o);
272
272
  }
273
- function w(t) {
273
+ function $(t) {
274
274
  return h({ ...t, state: !0, attribute: !1 });
275
275
  }
276
- const K = C`:host{display:inline-flex;align-items:center;position:relative;width:var(--nf-width);height:var(--nf-height);padding:var(--nf-padding);margin:var(--nf-margin);font-size:var(--nf-text-font-size);font-weight:var(--nf-font-weight);color:var(--nf-color);background:var(--nf-background-color);border-radius:var(--nf-border-radius);border:1px solid var(--nf-border-color);outline:0;background-clip:padding-box;box-shadow:0 0 0 .15rem var(--nf-box-shadow-color);transition:color var(--nf-transition) ease-in-out,background-color var(--nf-transition) ease-in-out,border-color var(--nf-transition) ease-in-out,box-shadow var(--nf-transition) ease-in-out}:host(:focus){border-color:var(--nf-border-color-hover);box-shadow:0 0 0 .15rem var(--nf-box-shadow-color-focus);background:var(--nf-background-color-hover)}:host(:hover:not([disabled])){border-color:var(--nf-border-color-hover);background:var(--nf-background-color-hover)}:host([disabled]){cursor:not-allowed;opacity:.6;pointer-events:auto}:host([disabled]:hover){border-color:var(--nf-border-color);background:var(--nf-background-color)}`, ze = C`:host{width:var(--nf-width);position:relative;display:inline-block;--nf-input-padding:0 .75rem}:host([disabled]) .input{cursor:not-allowed;color:var(--nf-color-disabled)}:host([disabled]) .toggle-password{cursor:not-allowed;pointer-events:none;opacity:.5}::slotted(*){position:absolute;top:50%;left:.75rem;transform:translateY(-50%);color:var(--nf-color)}:host([disabled]) ::slotted(*){color:var(--nf-color-disabled)}.input{position:absolute;inset:0;padding:var(--nf-input-padding);outline:0;border:none;background:0 0;box-sizing:border-box;color:var(--nf-color);font-size:var(--nf-font-size);font-weight:var(--nf-font-weight);font-family:var(--nf-font-family),sans-serif}.input:has(.toggle-password){padding-right:2.5rem}.input .toggle-password{position:absolute;top:50%;right:.5rem;transform:translateY(-50%);background:0 0;border:none;cursor:pointer;padding:.25rem;display:flex;align-items:center;justify-content:center;color:var(--nf-select-icon-color);transition:color var(--nf-transition-fast) ease;outline:0}.input .toggle-password:hover{color:var(--nf-icon-color-hover)}.input .toggle-password:active{color:var(--nf-icon-color-active)}.input .toggle-password svg{display:block}`, O = (t) => (e) => (typeof window > "u" || customElements.get(t) || customElements.define(t, e), e);
277
- var je = Object.defineProperty, Re = Object.getOwnPropertyDescriptor, B = (t, e, o, r) => {
278
- for (var s = r > 1 ? void 0 : r ? Re(e, o) : e, i = t.length - 1, n; i >= 0; i--)
279
- (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
280
- return r && s && je(e, o, s), s;
276
+ const q = S`:host{display:inline-flex;align-items:center;position:relative;width:var(--nf-width);height:var(--nf-height);padding:var(--nf-padding);margin:var(--nf-margin);font-size:var(--nf-text-font-size);font-weight:var(--nf-font-weight);color:var(--nf-color);background:var(--nf-background-color);border-radius:var(--nf-border-radius);border:1px solid var(--nf-border-color);outline:0;background-clip:padding-box;box-shadow:0 0 0 .15rem var(--nf-box-shadow-color);transition:color var(--nf-transition) ease-in-out,background-color var(--nf-transition) ease-in-out,border-color var(--nf-transition) ease-in-out,box-shadow var(--nf-transition) ease-in-out}:host(:focus){border-color:var(--nf-border-color-hover);box-shadow:0 0 0 .15rem var(--nf-box-shadow-color-focus);background:var(--nf-background-color-hover)}:host(:hover:not([disabled])){border-color:var(--nf-border-color-hover);background:var(--nf-background-color-hover)}:host([disabled]){cursor:not-allowed;opacity:.6;pointer-events:auto}:host([disabled]:hover){border-color:var(--nf-border-color);background:var(--nf-background-color)}`, Ie = S`:host{width:var(--nf-width);position:relative;display:inline-block;--nf-input-padding:0 .75rem}:host([disabled]) .input{cursor:not-allowed;color:var(--nf-color-disabled)}:host([disabled]) .toggle-password{cursor:not-allowed;pointer-events:none;opacity:.5}::slotted(*){position:absolute;top:50%;left:.75rem;transform:translateY(-50%);color:var(--nf-color)}:host([disabled]) ::slotted(*){color:var(--nf-color-disabled)}.input{position:absolute;inset:0;padding:var(--nf-input-padding);outline:0;border:none;background:0 0;box-sizing:border-box;color:var(--nf-color);font-size:var(--nf-font-size);font-weight:var(--nf-font-weight);font-family:var(--nf-font-family),sans-serif}.input:has(.toggle-password){padding-right:2.5rem}.input .toggle-password{position:absolute;top:50%;right:.5rem;transform:translateY(-50%);background:0 0;border:none;cursor:pointer;padding:.25rem;display:flex;align-items:center;justify-content:center;color:var(--nf-select-icon-color);transition:color var(--nf-transition-fast) ease;outline:0}.input .toggle-password:hover{color:var(--nf-icon-color-hover)}.input .toggle-password:active{color:var(--nf-icon-color-active)}.input .toggle-password svg{display:block}`, N = (t) => (e) => (typeof window > "u" || customElements.get(t) || customElements.define(t, e), e);
277
+ var qe = Object.defineProperty, We = Object.getOwnPropertyDescriptor, V = (t, e, o, s) => {
278
+ for (var r = s > 1 ? void 0 : s ? We(e, o) : e, i = t.length - 1, n; i >= 0; i--)
279
+ (n = t[i]) && (r = (s ? n(e, o, r) : n(r)) || r);
280
+ return s && r && qe(e, o, r), r;
281
281
  };
282
- let $ = class extends W {
282
+ let E = class extends I {
283
283
  constructor() {
284
284
  super(...arguments), this.value = "", this.placeholder = "", this.type = "text", this.disabled = !1, this.showPassword = !1, this.onInput = (t) => {
285
285
  t.stopPropagation();
@@ -339,48 +339,48 @@ let $ = class extends W {
339
339
  });
340
340
  }
341
341
  };
342
- $.styles = [K, ze];
343
- B([
342
+ E.styles = [q, Ie];
343
+ V([
344
344
  h({ type: String })
345
- ], $.prototype, "value", 2);
346
- B([
345
+ ], E.prototype, "value", 2);
346
+ V([
347
347
  h({ type: String })
348
- ], $.prototype, "placeholder", 2);
349
- B([
348
+ ], E.prototype, "placeholder", 2);
349
+ V([
350
350
  h({ type: String })
351
- ], $.prototype, "type", 2);
352
- B([
351
+ ], E.prototype, "type", 2);
352
+ V([
353
353
  h({ type: Number })
354
- ], $.prototype, "maxLength", 2);
355
- B([
354
+ ], E.prototype, "maxLength", 2);
355
+ V([
356
356
  h({ type: Boolean, reflect: !0 })
357
- ], $.prototype, "disabled", 2);
358
- B([
359
- w()
360
- ], $.prototype, "showPassword", 2);
361
- $ = B([
362
- O("nf-input")
363
- ], $);
364
- const Nt = N({
357
+ ], E.prototype, "disabled", 2);
358
+ V([
359
+ $()
360
+ ], E.prototype, "showPassword", 2);
361
+ E = V([
362
+ N("nf-input")
363
+ ], E);
364
+ const Bt = M({
365
365
  tagName: "nf-input",
366
- elementClass: $,
367
- react: T,
366
+ elementClass: E,
367
+ react: H,
368
368
  events: {
369
369
  onInput: "input",
370
370
  onChange: "change",
371
371
  onPressEnter: "pressEnter"
372
372
  }
373
373
  });
374
- async function qe(t) {
374
+ async function Ke(t) {
375
375
  return new Promise((e) => setTimeout(e, t));
376
376
  }
377
- const We = C`:host{width:var(--nf-width);-webkit-user-select:none;user-select:none;cursor:pointer}:host .text{flex-grow:1;display:inline-block;outline:0;white-space:nowrap}:host .icon{width:1.5rem;height:1.5rem;display:inline-block;fill:none;stroke:var(--nf-select-icon-color);stroke-width:1;stroke-linecap:round;margin:0 -.3rem 0 .5rem}:host .dropdown{position:absolute;top:2rem;right:0;left:0;padding:.3rem;background:var(--nf-dropdown-background);-webkit-backdrop-filter:blur(32px);backdrop-filter:blur(32px);border-radius:.5rem;opacity:0;pointer-events:none;color:var(--nf-color);box-shadow:0 0 1rem 0 var(--nf-dropdown-shadow);z-index:1000;transition:opacity var(--nf-transition) ease-out,transform var(--nf-transition) ease-out}:host .dropdown .item{white-space:nowrap;padding:.4rem .7rem;overflow:hidden;text-overflow:ellipsis;border-radius:.3rem;cursor:pointer}:host .dropdown .item-unselected:hover{background:var(--nf-item-background-hover);transition:background-color var(--nf-transition) ease-in-out}:host .dropdown .item-unselected:active{background:var(--nf-item-background-active)}:host .dropdown .item-selected{background-color:color-mix(in srgb,var(--nf-primary-color) 30%,transparent)}:host([disabled]){cursor:not-allowed}:host([disabled]) .text{color:var(--nf-color-disabled)}:host([disabled]) .icon{stroke:var(--nf-color-disabled)}:host([disabled]) .dropdown{display:none}:host(:focus:not([disabled])){color:var(--nf-focus-text-color)}:host(:focus:not([disabled])) .dropdown{transform:translateY(.5rem);opacity:1;pointer-events:auto}:host(:focus:not([disabled])) .cover{pointer-events:auto}`;
378
- var Ke = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, Y = (t, e, o, r) => {
379
- for (var s = r > 1 ? void 0 : r ? Ye(e, o) : e, i = t.length - 1, n; i >= 0; i--)
380
- (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
381
- return r && s && Ke(e, o, s), s;
377
+ const Ye = S`:host{width:var(--nf-width);-webkit-user-select:none;user-select:none;cursor:pointer}:host .text{flex-grow:1;display:inline-block;outline:0;white-space:nowrap}:host .icon{width:1.5rem;height:1.5rem;display:inline-block;fill:none;stroke:var(--nf-select-icon-color);stroke-width:1;stroke-linecap:round;margin:0 -.3rem 0 .5rem}:host .dropdown{position:absolute;top:2rem;right:0;left:0;padding:.3rem;background:var(--nf-dropdown-background);-webkit-backdrop-filter:blur(32px);backdrop-filter:blur(32px);border-radius:.5rem;opacity:0;pointer-events:none;color:var(--nf-color);box-shadow:0 0 1rem 0 var(--nf-dropdown-shadow);z-index:1000;transition:opacity var(--nf-transition) ease-out,transform var(--nf-transition) ease-out}:host .dropdown .item{white-space:nowrap;padding:.4rem .7rem;overflow:hidden;text-overflow:ellipsis;border-radius:.3rem;cursor:pointer}:host .dropdown .item-unselected:hover{background:var(--nf-item-background-hover);transition:background-color var(--nf-transition) ease-in-out}:host .dropdown .item-unselected:active{background:var(--nf-item-background-active)}:host .dropdown .item-selected{background-color:color-mix(in srgb,var(--nf-primary-color) 30%,transparent)}:host([disabled]){cursor:not-allowed}:host([disabled]) .text{color:var(--nf-color-disabled)}:host([disabled]) .icon{stroke:var(--nf-color-disabled)}:host([disabled]) .dropdown{display:none}:host(:focus:not([disabled])){color:var(--nf-focus-text-color)}:host(:focus:not([disabled])) .dropdown{transform:translateY(.5rem);opacity:1;pointer-events:auto}:host(:focus:not([disabled])) .cover{pointer-events:auto}`;
378
+ var Ze = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, G = (t, e, o, s) => {
379
+ for (var r = s > 1 ? void 0 : s ? Xe(e, o) : e, i = t.length - 1, n; i >= 0; i--)
380
+ (n = t[i]) && (r = (s ? n(e, o, r) : n(r)) || r);
381
+ return s && r && Ze(e, o, r), r;
382
382
  };
383
- let A = class extends W {
383
+ let D = class extends I {
384
384
  constructor() {
385
385
  super(...arguments), this.value = "", this.options = [], this.disabled = !1, this.showDropdown = !1, this.jumpCloseFlag = !1, this.timeoutId = null, this.onFocus = () => {
386
386
  this.disabled || (this.timeoutId && clearTimeout(this.timeoutId), this.showDropdown = !0, this.jumpCloseFlag = !0);
@@ -399,7 +399,7 @@ let A = class extends W {
399
399
  };
400
400
  }
401
401
  async set(t) {
402
- this.dispatchEvent(new CustomEvent("input", { detail: t, bubbles: !0, composed: !0 })), this.value !== t && this.dispatchEvent(new CustomEvent("change", { detail: t, bubbles: !0, composed: !0 })), await qe(34), this.blur();
402
+ this.dispatchEvent(new CustomEvent("input", { detail: t, bubbles: !0, composed: !0 })), this.value !== t && this.dispatchEvent(new CustomEvent("change", { detail: t, bubbles: !0, composed: !0 })), await Ke(34), this.blur();
403
403
  }
404
404
  render() {
405
405
  const t = this.options.findIndex((o) => o.value == this.value), e = t > -1 ? this.options[t]?.label : this.value;
@@ -416,11 +416,11 @@ let A = class extends W {
416
416
  super.disconnectedCallback(), this.removeEventListener("focus", this.onFocus), this.removeEventListener("blur", this.onBlur), this.removeEventListener("click", this.onClick);
417
417
  }
418
418
  };
419
- A.styles = [K, We];
420
- Y([
419
+ D.styles = [q, Ye];
420
+ G([
421
421
  h({ type: String })
422
- ], A.prototype, "value", 2);
423
- Y([
422
+ ], D.prototype, "value", 2);
423
+ G([
424
424
  h({
425
425
  type: Array,
426
426
  converter: (t) => {
@@ -435,88 +435,88 @@ Y([
435
435
  return [];
436
436
  }
437
437
  })
438
- ], A.prototype, "options", 2);
439
- Y([
438
+ ], D.prototype, "options", 2);
439
+ G([
440
440
  h({ type: Boolean, reflect: !0 })
441
- ], A.prototype, "disabled", 2);
442
- Y([
443
- w()
444
- ], A.prototype, "showDropdown", 2);
445
- A = Y([
446
- O("nf-select")
447
- ], A);
448
- const Tt = N({
441
+ ], D.prototype, "disabled", 2);
442
+ G([
443
+ $()
444
+ ], D.prototype, "showDropdown", 2);
445
+ D = G([
446
+ N("nf-select")
447
+ ], D);
448
+ const Vt = M({
449
449
  tagName: "nf-select",
450
- elementClass: A,
451
- react: T,
450
+ elementClass: D,
451
+ react: H,
452
452
  events: {
453
453
  onInput: "input",
454
454
  onChange: "change"
455
455
  }
456
456
  });
457
- const ne = globalThis, be = (t) => t, Q = ne.trustedTypes, me = Q ? Q.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, ke = "$lit$", E = `lit$${Math.random().toFixed(9).slice(2)}$`, Ee = "?" + E, Ze = `<${Ee}>`, M = document, j = () => M.createComment(""), R = (t) => t === null || typeof t != "object" && typeof t != "function", ae = Array.isArray, Xe = (t) => ae(t) || typeof t?.[Symbol.iterator] == "function", oe = `[
458
- \f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ge = /-->/g, ve = />/g, S = RegExp(`>|${oe}(?:([^\\s"'>=/]+)(${oe}*=${oe}*(?:[^
459
- \f\r"'\`<>=]|("|')|))|$)`, "g"), _e = /'/g, ye = /"/g, Ae = /^(?:script|style|textarea|title)$/i, Ge = (t) => (e, ...o) => ({ _$litType$: t, strings: e, values: o }), re = Ge(1), D = /* @__PURE__ */ Symbol.for("lit-noChange"), m = /* @__PURE__ */ Symbol.for("lit-nothing"), we = /* @__PURE__ */ new WeakMap(), P = M.createTreeWalker(M, 129);
460
- function Ce(t, e) {
461
- if (!ae(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
462
- return me !== void 0 ? me.createHTML(e) : e;
457
+ const le = globalThis, ge = (t) => t, te = le.trustedTypes, ve = te ? te.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Ce = "$lit$", P = `lit$${Math.random().toFixed(9).slice(2)}$`, Se = "?" + P, Ge = `<${Se}>`, z = document, Y = () => z.createComment(""), Z = (t) => t === null || typeof t != "object" && typeof t != "function", he = Array.isArray, Je = (t) => he(t) || typeof t?.[Symbol.iterator] == "function", re = `[
458
+ \f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ye = /-->/g, we = />/g, T = RegExp(`>|${re}(?:([^\\s"'>=/]+)(${re}*=${re}*(?:[^
459
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), _e = /'/g, $e = /"/g, Ae = /^(?:script|style|textarea|title)$/i, Qe = (t) => (e, ...o) => ({ _$litType$: t, strings: e, values: o }), ie = Qe(1), B = /* @__PURE__ */ Symbol.for("lit-noChange"), b = /* @__PURE__ */ Symbol.for("lit-nothing"), xe = /* @__PURE__ */ new WeakMap(), O = z.createTreeWalker(z, 129);
460
+ function Pe(t, e) {
461
+ if (!he(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
462
+ return ve !== void 0 ? ve.createHTML(e) : e;
463
463
  }
464
- const Je = (t, e) => {
465
- const o = t.length - 1, r = [];
466
- let s, i = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = I;
464
+ const et = (t, e) => {
465
+ const o = t.length - 1, s = [];
466
+ let r, i = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", n = W;
467
467
  for (let l = 0; l < o; l++) {
468
468
  const a = t[l];
469
- let c, p, d = -1, x = 0;
470
- for (; x < a.length && (n.lastIndex = x, p = n.exec(a), p !== null); ) x = n.lastIndex, n === I ? p[1] === "!--" ? n = ge : p[1] !== void 0 ? n = ve : p[2] !== void 0 ? (Ae.test(p[2]) && (s = RegExp("</" + p[2], "g")), n = S) : p[3] !== void 0 && (n = S) : n === S ? p[0] === ">" ? (n = s ?? I, d = -1) : p[1] === void 0 ? d = -2 : (d = n.lastIndex - p[2].length, c = p[1], n = p[3] === void 0 ? S : p[3] === '"' ? ye : _e) : n === ye || n === _e ? n = S : n === ge || n === ve ? n = I : (n = S, s = void 0);
471
- const k = n === S && t[l + 1].startsWith("/>") ? " " : "";
472
- i += n === I ? a + Ze : d >= 0 ? (r.push(c), a.slice(0, d) + ke + a.slice(d) + E + k) : a + E + (d === -2 ? l : k);
469
+ let c, u, d = -1, w = 0;
470
+ for (; w < a.length && (n.lastIndex = w, u = n.exec(a), u !== null); ) w = n.lastIndex, n === W ? u[1] === "!--" ? n = ye : u[1] !== void 0 ? n = we : u[2] !== void 0 ? (Ae.test(u[2]) && (r = RegExp("</" + u[2], "g")), n = T) : u[3] !== void 0 && (n = T) : n === T ? u[0] === ">" ? (n = r ?? W, d = -1) : u[1] === void 0 ? d = -2 : (d = n.lastIndex - u[2].length, c = u[1], n = u[3] === void 0 ? T : u[3] === '"' ? $e : _e) : n === $e || n === _e ? n = T : n === ye || n === we ? n = W : (n = T, r = void 0);
471
+ const k = n === T && t[l + 1].startsWith("/>") ? " " : "";
472
+ i += n === W ? a + Ge : d >= 0 ? (s.push(c), a.slice(0, d) + Ce + a.slice(d) + P + k) : a + P + (d === -2 ? l : k);
473
473
  }
474
- return [Ce(t, i + (t[o] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), r];
474
+ return [Pe(t, i + (t[o] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
475
475
  };
476
- class q {
477
- constructor({ strings: e, _$litType$: o }, r) {
478
- let s;
476
+ class X {
477
+ constructor({ strings: e, _$litType$: o }, s) {
478
+ let r;
479
479
  this.parts = [];
480
480
  let i = 0, n = 0;
481
- const l = e.length - 1, a = this.parts, [c, p] = Je(e, o);
482
- if (this.el = q.createElement(c, r), P.currentNode = this.el.content, o === 2 || o === 3) {
481
+ const l = e.length - 1, a = this.parts, [c, u] = et(e, o);
482
+ if (this.el = X.createElement(c, s), O.currentNode = this.el.content, o === 2 || o === 3) {
483
483
  const d = this.el.content.firstChild;
484
484
  d.replaceWith(...d.childNodes);
485
485
  }
486
- for (; (s = P.nextNode()) !== null && a.length < l; ) {
487
- if (s.nodeType === 1) {
488
- if (s.hasAttributes()) for (const d of s.getAttributeNames()) if (d.endsWith(ke)) {
489
- const x = p[n++], k = s.getAttribute(d).split(E), X = /([.?@])?(.*)/.exec(x);
490
- a.push({ type: 1, index: i, name: X[2], strings: k, ctor: X[1] === "." ? et : X[1] === "?" ? tt : X[1] === "@" ? ot : te }), s.removeAttribute(d);
491
- } else d.startsWith(E) && (a.push({ type: 6, index: i }), s.removeAttribute(d));
492
- if (Ae.test(s.tagName)) {
493
- const d = s.textContent.split(E), x = d.length - 1;
494
- if (x > 0) {
495
- s.textContent = Q ? Q.emptyScript : "";
496
- for (let k = 0; k < x; k++) s.append(d[k], j()), P.nextNode(), a.push({ type: 2, index: ++i });
497
- s.append(d[x], j());
486
+ for (; (r = O.nextNode()) !== null && a.length < l; ) {
487
+ if (r.nodeType === 1) {
488
+ if (r.hasAttributes()) for (const d of r.getAttributeNames()) if (d.endsWith(Ce)) {
489
+ const w = u[n++], k = r.getAttribute(d).split(P), C = /([.?@])?(.*)/.exec(w);
490
+ a.push({ type: 1, index: i, name: C[2], strings: k, ctor: C[1] === "." ? ot : C[1] === "?" ? st : C[1] === "@" ? rt : se }), r.removeAttribute(d);
491
+ } else d.startsWith(P) && (a.push({ type: 6, index: i }), r.removeAttribute(d));
492
+ if (Ae.test(r.tagName)) {
493
+ const d = r.textContent.split(P), w = d.length - 1;
494
+ if (w > 0) {
495
+ r.textContent = te ? te.emptyScript : "";
496
+ for (let k = 0; k < w; k++) r.append(d[k], Y()), O.nextNode(), a.push({ type: 2, index: ++i });
497
+ r.append(d[w], Y());
498
498
  }
499
499
  }
500
- } else if (s.nodeType === 8) if (s.data === Ee) a.push({ type: 2, index: i });
500
+ } else if (r.nodeType === 8) if (r.data === Se) a.push({ type: 2, index: i });
501
501
  else {
502
502
  let d = -1;
503
- for (; (d = s.data.indexOf(E, d + 1)) !== -1; ) a.push({ type: 7, index: i }), d += E.length - 1;
503
+ for (; (d = r.data.indexOf(P, d + 1)) !== -1; ) a.push({ type: 7, index: i }), d += P.length - 1;
504
504
  }
505
505
  i++;
506
506
  }
507
507
  }
508
508
  static createElement(e, o) {
509
- const r = M.createElement("template");
510
- return r.innerHTML = e, r;
509
+ const s = z.createElement("template");
510
+ return s.innerHTML = e, s;
511
511
  }
512
512
  }
513
- function U(t, e, o = t, r) {
514
- if (e === D) return e;
515
- let s = r !== void 0 ? o._$Co?.[r] : o._$Cl;
516
- const i = R(e) ? void 0 : e._$litDirective$;
517
- return s?.constructor !== i && (s?._$AO?.(!1), i === void 0 ? s = void 0 : (s = new i(t), s._$AT(t, o, r)), r !== void 0 ? (o._$Co ??= [])[r] = s : o._$Cl = s), s !== void 0 && (e = U(t, s._$AS(t, e.values), s, r)), e;
513
+ function L(t, e, o = t, s) {
514
+ if (e === B) return e;
515
+ let r = s !== void 0 ? o._$Co?.[s] : o._$Cl;
516
+ const i = Z(e) ? void 0 : e._$litDirective$;
517
+ return r?.constructor !== i && (r?._$AO?.(!1), i === void 0 ? r = void 0 : (r = new i(t), r._$AT(t, o, s)), s !== void 0 ? (o._$Co ??= [])[s] = r : o._$Cl = r), r !== void 0 && (e = L(t, r._$AS(t, e.values), r, s)), e;
518
518
  }
519
- class Qe {
519
+ class tt {
520
520
  constructor(e, o) {
521
521
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = o;
522
522
  }
@@ -527,29 +527,29 @@ class Qe {
527
527
  return this._$AM._$AU;
528
528
  }
529
529
  u(e) {
530
- const { el: { content: o }, parts: r } = this._$AD, s = (e?.creationScope ?? M).importNode(o, !0);
531
- P.currentNode = s;
532
- let i = P.nextNode(), n = 0, l = 0, a = r[0];
530
+ const { el: { content: o }, parts: s } = this._$AD, r = (e?.creationScope ?? z).importNode(o, !0);
531
+ O.currentNode = r;
532
+ let i = O.nextNode(), n = 0, l = 0, a = s[0];
533
533
  for (; a !== void 0; ) {
534
534
  if (n === a.index) {
535
535
  let c;
536
- a.type === 2 ? c = new Z(i, i.nextSibling, this, e) : a.type === 1 ? c = new a.ctor(i, a.name, a.strings, this, e) : a.type === 6 && (c = new rt(i, this, e)), this._$AV.push(c), a = r[++l];
536
+ a.type === 2 ? c = new J(i, i.nextSibling, this, e) : a.type === 1 ? c = new a.ctor(i, a.name, a.strings, this, e) : a.type === 6 && (c = new it(i, this, e)), this._$AV.push(c), a = s[++l];
537
537
  }
538
- n !== a?.index && (i = P.nextNode(), n++);
538
+ n !== a?.index && (i = O.nextNode(), n++);
539
539
  }
540
- return P.currentNode = M, s;
540
+ return O.currentNode = z, r;
541
541
  }
542
542
  p(e) {
543
543
  let o = 0;
544
- for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(e, r, o), o += r.strings.length - 2) : r._$AI(e[o])), o++;
544
+ for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, o), o += s.strings.length - 2) : s._$AI(e[o])), o++;
545
545
  }
546
546
  }
547
- class Z {
547
+ class J {
548
548
  get _$AU() {
549
549
  return this._$AM?._$AU ?? this._$Cv;
550
550
  }
551
- constructor(e, o, r, s) {
552
- this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = e, this._$AB = o, this._$AM = r, this.options = s, this._$Cv = s?.isConnected ?? !0;
551
+ constructor(e, o, s, r) {
552
+ this.type = 2, this._$AH = b, this._$AN = void 0, this._$AA = e, this._$AB = o, this._$AM = s, this.options = r, this._$Cv = r?.isConnected ?? !0;
553
553
  }
554
554
  get parentNode() {
555
555
  let e = this._$AA.parentNode;
@@ -563,7 +563,7 @@ class Z {
563
563
  return this._$AB;
564
564
  }
565
565
  _$AI(e, o = this) {
566
- e = U(this, e, o), R(e) ? e === m || e == null || e === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : e !== this._$AH && e !== D && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Xe(e) ? this.k(e) : this._(e);
566
+ e = L(this, e, o), Z(e) ? e === b || e == null || e === "" ? (this._$AH !== b && this._$AR(), this._$AH = b) : e !== this._$AH && e !== B && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Je(e) ? this.k(e) : this._(e);
567
567
  }
568
568
  O(e) {
569
569
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -572,115 +572,115 @@ class Z {
572
572
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
573
573
  }
574
574
  _(e) {
575
- this._$AH !== m && R(this._$AH) ? this._$AA.nextSibling.data = e : this.T(M.createTextNode(e)), this._$AH = e;
575
+ this._$AH !== b && Z(this._$AH) ? this._$AA.nextSibling.data = e : this.T(z.createTextNode(e)), this._$AH = e;
576
576
  }
577
577
  $(e) {
578
- const { values: o, _$litType$: r } = e, s = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = q.createElement(Ce(r.h, r.h[0]), this.options)), r);
579
- if (this._$AH?._$AD === s) this._$AH.p(o);
578
+ const { values: o, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = X.createElement(Pe(s.h, s.h[0]), this.options)), s);
579
+ if (this._$AH?._$AD === r) this._$AH.p(o);
580
580
  else {
581
- const i = new Qe(s, this), n = i.u(this.options);
581
+ const i = new tt(r, this), n = i.u(this.options);
582
582
  i.p(o), this.T(n), this._$AH = i;
583
583
  }
584
584
  }
585
585
  _$AC(e) {
586
- let o = we.get(e.strings);
587
- return o === void 0 && we.set(e.strings, o = new q(e)), o;
586
+ let o = xe.get(e.strings);
587
+ return o === void 0 && xe.set(e.strings, o = new X(e)), o;
588
588
  }
589
589
  k(e) {
590
- ae(this._$AH) || (this._$AH = [], this._$AR());
590
+ he(this._$AH) || (this._$AH = [], this._$AR());
591
591
  const o = this._$AH;
592
- let r, s = 0;
593
- for (const i of e) s === o.length ? o.push(r = new Z(this.O(j()), this.O(j()), this, this.options)) : r = o[s], r._$AI(i), s++;
594
- s < o.length && (this._$AR(r && r._$AB.nextSibling, s), o.length = s);
592
+ let s, r = 0;
593
+ for (const i of e) r === o.length ? o.push(s = new J(this.O(Y()), this.O(Y()), this, this.options)) : s = o[r], s._$AI(i), r++;
594
+ r < o.length && (this._$AR(s && s._$AB.nextSibling, r), o.length = r);
595
595
  }
596
596
  _$AR(e = this._$AA.nextSibling, o) {
597
597
  for (this._$AP?.(!1, !0, o); e !== this._$AB; ) {
598
- const r = be(e).nextSibling;
599
- be(e).remove(), e = r;
598
+ const s = ge(e).nextSibling;
599
+ ge(e).remove(), e = s;
600
600
  }
601
601
  }
602
602
  setConnected(e) {
603
603
  this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
604
604
  }
605
605
  }
606
- class te {
606
+ class se {
607
607
  get tagName() {
608
608
  return this.element.tagName;
609
609
  }
610
610
  get _$AU() {
611
611
  return this._$AM._$AU;
612
612
  }
613
- constructor(e, o, r, s, i) {
614
- this.type = 1, this._$AH = m, this._$AN = void 0, this.element = e, this.name = o, this._$AM = s, this.options = i, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = m;
613
+ constructor(e, o, s, r, i) {
614
+ this.type = 1, this._$AH = b, this._$AN = void 0, this.element = e, this.name = o, this._$AM = r, this.options = i, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = b;
615
615
  }
616
- _$AI(e, o = this, r, s) {
616
+ _$AI(e, o = this, s, r) {
617
617
  const i = this.strings;
618
618
  let n = !1;
619
- if (i === void 0) e = U(this, e, o, 0), n = !R(e) || e !== this._$AH && e !== D, n && (this._$AH = e);
619
+ if (i === void 0) e = L(this, e, o, 0), n = !Z(e) || e !== this._$AH && e !== B, n && (this._$AH = e);
620
620
  else {
621
621
  const l = e;
622
622
  let a, c;
623
- for (e = i[0], a = 0; a < i.length - 1; a++) c = U(this, l[r + a], o, a), c === D && (c = this._$AH[a]), n ||= !R(c) || c !== this._$AH[a], c === m ? e = m : e !== m && (e += (c ?? "") + i[a + 1]), this._$AH[a] = c;
623
+ for (e = i[0], a = 0; a < i.length - 1; a++) c = L(this, l[s + a], o, a), c === B && (c = this._$AH[a]), n ||= !Z(c) || c !== this._$AH[a], c === b ? e = b : e !== b && (e += (c ?? "") + i[a + 1]), this._$AH[a] = c;
624
624
  }
625
- n && !s && this.j(e);
625
+ n && !r && this.j(e);
626
626
  }
627
627
  j(e) {
628
- e === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
628
+ e === b ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
629
629
  }
630
630
  }
631
- class et extends te {
631
+ class ot extends se {
632
632
  constructor() {
633
633
  super(...arguments), this.type = 3;
634
634
  }
635
635
  j(e) {
636
- this.element[this.name] = e === m ? void 0 : e;
636
+ this.element[this.name] = e === b ? void 0 : e;
637
637
  }
638
638
  }
639
- class tt extends te {
639
+ class st extends se {
640
640
  constructor() {
641
641
  super(...arguments), this.type = 4;
642
642
  }
643
643
  j(e) {
644
- this.element.toggleAttribute(this.name, !!e && e !== m);
644
+ this.element.toggleAttribute(this.name, !!e && e !== b);
645
645
  }
646
646
  }
647
- class ot extends te {
648
- constructor(e, o, r, s, i) {
649
- super(e, o, r, s, i), this.type = 5;
647
+ class rt extends se {
648
+ constructor(e, o, s, r, i) {
649
+ super(e, o, s, r, i), this.type = 5;
650
650
  }
651
651
  _$AI(e, o = this) {
652
- if ((e = U(this, e, o, 0) ?? m) === D) return;
653
- const r = this._$AH, s = e === m && r !== m || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, i = e !== m && (r === m || s);
654
- s && this.element.removeEventListener(this.name, this, r), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
652
+ if ((e = L(this, e, o, 0) ?? b) === B) return;
653
+ const s = this._$AH, r = e === b && s !== b || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, i = e !== b && (s === b || r);
654
+ r && this.element.removeEventListener(this.name, this, s), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
655
655
  }
656
656
  handleEvent(e) {
657
657
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
658
658
  }
659
659
  }
660
- class rt {
661
- constructor(e, o, r) {
662
- this.element = e, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = r;
660
+ class it {
661
+ constructor(e, o, s) {
662
+ this.element = e, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = s;
663
663
  }
664
664
  get _$AU() {
665
665
  return this._$AM._$AU;
666
666
  }
667
667
  _$AI(e) {
668
- U(this, e);
668
+ L(this, e);
669
669
  }
670
670
  }
671
- const st = ne.litHtmlPolyfillSupport;
672
- st?.(q, Z), (ne.litHtmlVersions ??= []).push("3.3.2");
673
- const it = (t, e, o) => {
674
- const r = o?.renderBefore ?? e;
675
- let s = r._$litPart$;
676
- if (s === void 0) {
671
+ const nt = le.litHtmlPolyfillSupport;
672
+ nt?.(X, J), (le.litHtmlVersions ??= []).push("3.3.2");
673
+ const at = (t, e, o) => {
674
+ const s = o?.renderBefore ?? e;
675
+ let r = s._$litPart$;
676
+ if (r === void 0) {
677
677
  const i = o?.renderBefore ?? null;
678
- r._$litPart$ = s = new Z(e.insertBefore(j(), i), i, void 0, o ?? {});
678
+ s._$litPart$ = r = new J(e.insertBefore(Y(), i), i, void 0, o ?? {});
679
679
  }
680
- return s._$AI(t), s;
680
+ return r._$AI(t), r;
681
681
  };
682
- const le = globalThis;
683
- let H = class extends V {
682
+ const ce = globalThis;
683
+ let R = class extends F {
684
684
  constructor() {
685
685
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
686
686
  }
@@ -690,7 +690,7 @@ let H = class extends V {
690
690
  }
691
691
  update(e) {
692
692
  const o = this.render();
693
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = it(o, this.renderRoot, this.renderOptions);
693
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = at(o, this.renderRoot, this.renderOptions);
694
694
  }
695
695
  connectedCallback() {
696
696
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -699,20 +699,20 @@ let H = class extends V {
699
699
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
700
700
  }
701
701
  render() {
702
- return D;
702
+ return B;
703
703
  }
704
704
  };
705
- H._$litElement$ = !0, H.finalized = !0, le.litElementHydrateSupport?.({ LitElement: H });
706
- const nt = le.litElementPolyfillSupport;
707
- nt?.({ LitElement: H });
708
- (le.litElementVersions ??= []).push("4.2.2");
709
- const at = C`:host{display:inline-flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;outline:0;--nf-switch-padding:.1rem}:host[disabled]{cursor:not-allowed;opacity:.6}.switch-wrapper{position:relative;display:inline-block}.switch-container{position:relative;z-index:1;width:3.1rem;height:1.5rem;background-color:var(--nf-background-color);border-radius:.75rem;transition:background-color .2s ease;overflow:hidden}:host(:not([disabled]):not([checked])) .switch-container:hover{background:var(--nf-background-color-hover)}:host([checked]) .switch-container{background-color:var(--nf-primary-color,var(--nf-primary-color))}:host([disabled]) .switch-container{opacity:.5}.ripple{position:absolute;border-radius:.875rem;inset:-.2rem;background-color:#6464641a;animation:ripple-animation 1s ease-out forwards;pointer-events:none;opacity:1}@keyframes ripple-animation{0%{opacity:0}20%{opacity:1}to{opacity:0}}.switch-thumb{position:absolute;top:.125rem;left:0;width:1.25rem;height:1.25rem;transition:transform .2s ease-in-out}.switch-thumb:before{content:\"\";position:absolute;top:0;left:0;width:1.25rem;height:1.25rem;background-color:#fff;border-radius:.625rem;box-shadow:0 .125rem .25rem #0003;transition:width .2s ease-in-out,transform .2s ease-in-out}:host(:not([checked])) .switch-thumb{transform:translate(.125rem)}:host(:not([checked])) .switch-container:active .switch-thumb:before{width:1.625rem;border-radius:.625rem}:host([checked]) .switch-thumb{transform:translate(1.725rem)}:host([checked]) .switch-container:active .switch-thumb:before{width:1.625rem;border-radius:.625rem;transform:translate(-.375rem)}:host(:focus) .switch-container{outline:.125rem solid var(--nf-primary-color,var(--nf-primary-color));outline-offset:.125rem}`;
710
- var lt = Object.defineProperty, ht = Object.getOwnPropertyDescriptor, he = (t, e, o, r) => {
711
- for (var s = r > 1 ? void 0 : r ? ht(e, o) : e, i = t.length - 1, n; i >= 0; i--)
712
- (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
713
- return r && s && lt(e, o, s), s;
705
+ R._$litElement$ = !0, R.finalized = !0, ce.litElementHydrateSupport?.({ LitElement: R });
706
+ const lt = ce.litElementPolyfillSupport;
707
+ lt?.({ LitElement: R });
708
+ (ce.litElementVersions ??= []).push("4.2.2");
709
+ const ht = S`:host{display:inline-flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;outline:0;--nf-switch-padding:.1rem}:host[disabled]{cursor:not-allowed;opacity:.6}.switch-wrapper{position:relative;display:inline-block}.switch-container{position:relative;z-index:1;width:3.1rem;height:1.5rem;background-color:var(--nf-background-color);border-radius:.75rem;transition:background-color .2s ease;overflow:hidden}:host(:not([disabled]):not([checked])) .switch-container:hover{background:var(--nf-background-color-hover)}:host([checked]) .switch-container{background-color:var(--nf-primary-color,var(--nf-primary-color))}:host([disabled]) .switch-container{opacity:.5}.ripple{position:absolute;border-radius:.875rem;inset:-.2rem;background-color:#6464641a;animation:ripple-animation 1s ease-out forwards;pointer-events:none;opacity:1}@keyframes ripple-animation{0%{opacity:0}20%{opacity:1}to{opacity:0}}.switch-thumb{position:absolute;top:.125rem;left:0;width:1.25rem;height:1.25rem;transition:transform .2s ease-in-out}.switch-thumb:before{content:\"\";position:absolute;top:0;left:0;width:1.25rem;height:1.25rem;background-color:#fff;border-radius:.625rem;box-shadow:0 .125rem .25rem #0003;transition:width .2s ease-in-out,transform .2s ease-in-out}:host(:not([checked])) .switch-thumb{transform:translate(.125rem)}:host(:not([checked])) .switch-container:active .switch-thumb:before{width:1.625rem;border-radius:.625rem}:host([checked]) .switch-thumb{transform:translate(1.725rem)}:host([checked]) .switch-container:active .switch-thumb:before{width:1.625rem;border-radius:.625rem;transform:translate(-.375rem)}:host(:focus) .switch-container{outline:.125rem solid var(--nf-primary-color,var(--nf-primary-color));outline-offset:.125rem}`;
710
+ var ct = Object.defineProperty, dt = Object.getOwnPropertyDescriptor, de = (t, e, o, s) => {
711
+ for (var r = s > 1 ? void 0 : s ? dt(e, o) : e, i = t.length - 1, n; i >= 0; i--)
712
+ (n = t[i]) && (r = (s ? n(e, o, r) : n(r)) || r);
713
+ return s && r && ct(e, o, r), r;
714
714
  };
715
- let F = class extends H {
715
+ let U = class extends R {
716
716
  constructor() {
717
717
  super(...arguments), this.checked = !1, this.disabled = !1, this.rippleElement = null;
718
718
  }
@@ -731,14 +731,14 @@ let F = class extends H {
731
731
  if (!e) return;
732
732
  const o = e.querySelector(".ripple");
733
733
  o && e.removeChild(o);
734
- const r = document.createElement("div");
735
- r.classList.add("ripple"), e.appendChild(r), r.addEventListener("animationend", () => {
736
- e.contains(r) && e.removeChild(r);
734
+ const s = document.createElement("div");
735
+ s.classList.add("ripple"), e.appendChild(s), s.addEventListener("animationend", () => {
736
+ e.contains(s) && e.removeChild(s);
737
737
  });
738
738
  }
739
739
  // 渲染开关组件
740
740
  render() {
741
- return re`<div class=switch-wrapper><div class=switch-container @click=${this.toggleSwitch} aria-checked=${this.checked} aria-disabled=${this.disabled} role=switch><div class=switch-thumb></div></div></div>`;
741
+ return ie`<div class=switch-wrapper><div class=switch-container @click=${this.toggleSwitch} aria-checked=${this.checked} aria-disabled=${this.disabled} role=switch><div class=switch-thumb></div></div></div>`;
742
742
  }
743
743
  connectedCallback() {
744
744
  this.style.transition = "none", super.connectedCallback(), requestAnimationFrame(() => {
@@ -746,30 +746,30 @@ let F = class extends H {
746
746
  });
747
747
  }
748
748
  };
749
- F.styles = [at];
750
- he([
749
+ U.styles = [ht];
750
+ de([
751
751
  h({ type: Boolean, reflect: !0 })
752
- ], F.prototype, "checked", 2);
753
- he([
752
+ ], U.prototype, "checked", 2);
753
+ de([
754
754
  h({ type: Boolean, reflect: !0 })
755
- ], F.prototype, "disabled", 2);
756
- F = he([
757
- O("nf-switch")
758
- ], F);
759
- const Bt = N({
755
+ ], U.prototype, "disabled", 2);
756
+ U = de([
757
+ N("nf-switch")
758
+ ], U);
759
+ const Rt = M({
760
760
  tagName: "nf-switch",
761
- elementClass: F,
762
- react: T,
761
+ elementClass: U,
762
+ react: H,
763
763
  events: {
764
764
  onChange: "change"
765
765
  }
766
- }), ct = C`:host{width:10rem;position:relative;display:inline-flex;align-items:center;box-sizing:border-box;padding:0;overflow:hidden;--nf-input-number-color:var(--nf-color);--nf-input-number-prefix-color:color-mix(in srgb, var(--nf-color), transparent 20%);--nf-input-number-surfix-color:color-mix(in srgb, var(--nf-color), transparent 20%)}.input-number{position:relative;padding-right:.6125rem;flex:1;height:100%;outline:0;border:none;background:0 0;box-sizing:border-box;color:var(--nf-input-number-color);font-weight:var(--nf-font-weight);text-align:left;transition:padding-right var(--nf-transition-fast) ease}.input-number .input-number-input-wrapper{height:100%;position:relative;display:flex;align-items:center}.input-number .input-number-input-wrapper .input-number-input{background:0 0;width:100%;height:100%;text-align:start;border:0;outline:0;padding:0;box-sizing:border-box;color:var(--nf-input-number-color);font-size:var(--nf-font-size);font-weight:var(--nf-font-weight);font-family:var(--nf-font-family),sans-serif}.input-number .input-number-input-wrapper .input-unit{position:absolute;right:0;top:50%;transform:translateY(-50%);color:var(--nf-input-number-surfix-color);font-size:var(--nf-font-size);pointer-events:none;-webkit-user-select:none;user-select:none;padding-right:.25rem}.input-number::-webkit-inner-spin-button,.input-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-number[type=number]{appearance:textfield}:host([unit]) .input-number-input{padding-right:2rem}:host([controls]) .input-number:hover{padding-right:1.5rem}:host([controls]) .input-number:hover .controls{width:1.5rem}:host([center]) .input-number{padding-left:1.5rem!important;padding-right:1.5rem!important}:host([center]) .input-number .input-number-input{text-align:center}:host([center]) .input-number:hover{padding-left:1.5rem!important;padding-right:1.5rem!important}:host([center]) .input-prefix{position:absolute;left:0;top:0;bottom:0;z-index:1;pointer-events:none}:host([center]) .input-suffix{position:absolute;right:0;top:0;bottom:0;z-index:1;pointer-events:none}:host([center]) .input-number{flex:1;width:100%}.input-prefix{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding-inline-start:.6125rem;color:var(--nf-input-number-prefix-color);font-size:var(--nf-font-size);pointer-events:none;-webkit-user-select:none;user-select:none}.input-prefix:not(:empty){padding-inline-end:.25rem}.input-suffix{display:flex;align-items:center;justify-content:center;color:var(--nf-input-number-surfix-color);font-size:var(--nf-font-size);pointer-events:none;-webkit-user-select:none;user-select:none}.input-suffix:not(:empty){padding-inline-end:.6125rem;padding-inline-start:.5rem}.controls{position:absolute;top:0;right:0;height:100%;width:0;overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box;transition:width var(--nf-transition-fast) ease}.controls:before{content:\"\";position:absolute;left:0;top:0;bottom:0;width:.67px;background-color:var(--nf-control-divider-color)}:host([suffix]) .controls:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:.67px;background-color:var(--nf-control-divider-color)}.control-btn{flex:1;display:flex;align-items:center;justify-content:center;background:0 0;border:none;cursor:pointer;transition:background-color var(--nf-transition-fast) ease;outline:0;-webkit-user-select:none;user-select:none}.control-btn:hover{background-color:var(--nf-control-btn-background-hover)}.control-btn:active{background-color:var(--nf-control-btn-background-active)}.control-btn:focus-visible{background-color:var(--nf-control-btn-background-hover)}.control-btn svg{display:block;pointer-events:none;fill:none;stroke:var(--nf-select-icon-color);stroke-width:1;stroke-linecap:round}.control-btn-up{border-bottom:.67px solid var(--nf-control-divider-color)}:host(:not([suffix])) .control-btn-up{border-top-right-radius:var(--nf-border-radius)}:host(:not([suffix])) .control-btn-down{border-bottom-right-radius:var(--nf-border-radius)}:host([disabled]) .input-number-input{cursor:not-allowed;color:var(--nf-color-disabled)}:host([disabled]) .input-prefix,:host([disabled]) .input-suffix{color:var(--nf-color-disabled)}:host([disabled]) .controls{display:none}:host([disabled]) .control-btn{cursor:not-allowed;pointer-events:none;opacity:.5}`;
767
- var dt = Object.defineProperty, ut = Object.getOwnPropertyDescriptor, b = (t, e, o, r) => {
768
- for (var s = r > 1 ? void 0 : r ? ut(e, o) : e, i = t.length - 1, n; i >= 0; i--)
769
- (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
770
- return r && s && dt(e, o, s), s;
766
+ }), ut = S`:host{width:10rem;position:relative;display:inline-flex;align-items:center;box-sizing:border-box;padding:0;overflow:hidden;--nf-input-number-color:var(--nf-color);--nf-input-number-prefix-color:color-mix(in srgb, var(--nf-color), transparent 20%);--nf-input-number-surfix-color:color-mix(in srgb, var(--nf-color), transparent 20%)}.input-number{position:relative;padding-right:.6125rem;flex:1;height:100%;outline:0;border:none;background:0 0;box-sizing:border-box;color:var(--nf-input-number-color);font-weight:var(--nf-font-weight);text-align:left;transition:padding-right var(--nf-transition-fast) ease}.input-number .input-number-input-wrapper{height:100%}.input-number .input-number-input-wrapper .input-number-input{background:0 0;width:100%;height:100%;text-align:start;border:0;outline:0;padding:0;box-sizing:border-box;color:var(--nf-input-number-color);font-size:var(--nf-font-size);font-weight:var(--nf-font-weight);font-family:var(--nf-font-family),sans-serif}.input-number::-webkit-inner-spin-button,.input-number::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.input-number[type=number]{appearance:textfield}:host([controls]) .input-number:hover{padding-right:1.5rem}:host([controls]) .input-number:hover .controls{width:1.5rem}:host([center]) .input-number{padding-left:1.5rem!important;padding-right:1.5rem!important}:host([center]) .input-number .input-number-input{text-align:center}:host([center]) .input-number:hover{padding-left:1.5rem!important;padding-right:1.5rem!important}:host([center]) .input-prefix{position:absolute;left:0;top:0;bottom:0;z-index:1;pointer-events:none}:host([center]) .input-suffix{position:absolute;right:0;top:0;bottom:0;z-index:1;pointer-events:none}:host([center]) .input-number{flex:1;width:100%}.input-prefix{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding-inline-start:.6125rem;color:var(--nf-input-number-prefix-color);font-size:var(--nf-font-size);pointer-events:none;-webkit-user-select:none;user-select:none}.input-prefix:not(:empty){padding-inline-end:.25rem}.input-suffix{display:flex;align-items:center;justify-content:center;color:var(--nf-input-number-surfix-color);font-size:var(--nf-font-size);pointer-events:none;-webkit-user-select:none;user-select:none}.input-suffix:not(:empty){padding-inline-end:.6125rem;padding-inline-start:.5rem}.controls{position:absolute;top:0;right:0;height:100%;width:0;overflow:hidden;display:flex;flex-direction:column;box-sizing:border-box;transition:width var(--nf-transition-fast) ease}.controls:before{content:\"\";position:absolute;left:0;top:0;bottom:0;width:.67px;background-color:var(--nf-control-divider-color)}:host([suffix]) .controls:after{content:\"\";position:absolute;right:0;top:0;bottom:0;width:.67px;background-color:var(--nf-control-divider-color)}.control-btn{flex:1;display:flex;align-items:center;justify-content:center;background:0 0;border:none;cursor:pointer;transition:background-color var(--nf-transition-fast) ease;outline:0;-webkit-user-select:none;user-select:none}.control-btn:hover{background-color:var(--nf-control-btn-background-hover)}.control-btn:active{background-color:var(--nf-control-btn-background-active)}.control-btn:focus-visible{background-color:var(--nf-control-btn-background-hover)}.control-btn svg{display:block;pointer-events:none;fill:none;stroke:var(--nf-select-icon-color);stroke-width:1;stroke-linecap:round}.control-btn-up{border-bottom:.67px solid var(--nf-control-divider-color)}:host(:not([suffix])) .control-btn-up{border-top-right-radius:var(--nf-border-radius)}:host(:not([suffix])) .control-btn-down{border-bottom-right-radius:var(--nf-border-radius)}:host([disabled]) .input-number-input{cursor:not-allowed;color:var(--nf-color-disabled)}:host([disabled]) .input-prefix,:host([disabled]) .input-suffix{color:var(--nf-color-disabled)}:host([disabled]) .controls{display:none}:host([disabled]) .control-btn{cursor:not-allowed;pointer-events:none;opacity:.5}`;
767
+ var pt = Object.defineProperty, ft = Object.getOwnPropertyDescriptor, m = (t, e, o, s) => {
768
+ for (var r = s > 1 ? void 0 : s ? ft(e, o) : e, i = t.length - 1, n; i >= 0; i--)
769
+ (n = t[i]) && (r = (s ? n(e, o, r) : n(r)) || r);
770
+ return s && r && pt(e, o, r), r;
771
771
  };
772
- let u = class extends W {
772
+ let p = class extends I {
773
773
  constructor() {
774
774
  super(...arguments), this.value = 0, this.formatter = (t) => {
775
775
  if (t === null) return "";
@@ -784,7 +784,7 @@ let u = class extends W {
784
784
  return null;
785
785
  const e = Number(t);
786
786
  return Number.isNaN(e) ? null : this.clampValue(e);
787
- }, this.prefix = null, this.suffix = null, this.unit = null, this.controls = !0, this.step = 1, this.min = null, this.max = null, this.changeOnWheel = !0, this.disabled = !1, this.noDecimal = !1, this.noZero = !1, this.noNegative = !1, this.center = !1, this.text = "", this.isTyping = !1, this.isFocused = !1;
787
+ }, this.prefix = null, this.suffix = null, this.controls = !0, this.step = 1, this.min = null, this.max = null, this.changeOnWheel = !0, this.disabled = !1, this.noDecimal = !1, this.noZero = !1, this.noNegative = !1, this.center = !1, this.text = "", this.isTyping = !1, this.isFocused = !1;
788
788
  }
789
789
  // 对解析结果进行额外验证
790
790
  validateParsed(t) {
@@ -857,8 +857,8 @@ let u = class extends W {
857
857
  this.value = e;
858
858
  let o = this.fixFloatingPoint(this.value + t * this.step);
859
859
  o = this.clampValue(o);
860
- const r = this.validateParsed(o);
861
- r !== null && (o = r, o !== this.value && (this.value = o, this.setText(this.formatter(o)), this.dispatchEvent(
860
+ const s = this.validateParsed(o);
861
+ s !== null && (o = s, o !== this.value && (this.value = o, this.setText(this.formatter(o)), this.dispatchEvent(
862
862
  new CustomEvent("change", {
863
863
  detail: o
864
864
  })
@@ -871,29 +871,26 @@ let u = class extends W {
871
871
  }
872
872
  /* ================== Render ================== */
873
873
  render() {
874
- return f`<div class=input-prefix>${this.prefix}</div><div class=input-number><div class=input-number-input-wrapper><input inputmode=decimal class=input-number-input .value=${this.text} ?disabled=${this.disabled} @blur=${this.onBlur} @focus=${this.onFocus} @input=${this.onInput} @keydown=${this.onKeyDown} @wheel=${this.onWheel} @keyup=${this.onKeyUp}> ${this.unit ? f`<div class=input-unit>${this.unit}</div>` : ""}</div>${this.controls ? f`<div class=controls><button class="control-btn control-btn-up"type=button ?disabled=${this.disabled} @click=${() => this.handleStepChange(1)} aria-label="Increase value"><svg width=12 height=12 viewBox="0 0 24 24"><path d="M6 14.6l6-6.6 6 6.6"/></svg></button><button class="control-btn control-btn-down"type=button ?disabled=${this.disabled} @click=${() => this.handleStepChange(-1)} aria-label="Decrease value"><svg width=12 height=12 viewBox="0 0 24 24"><path d="M18 9.4l-6 6.6-6-6.6"/></svg></button></div>` : ""}</div>${this.suffix ? f`<div class=input-suffix>${this.suffix}</div>` : ""}`;
874
+ return f`<div class=input-prefix>${this.prefix}</div><div class=input-number><div class=input-number-input-wrapper><input inputmode=decimal class=input-number-input .value=${this.text} ?disabled=${this.disabled} @blur=${this.onBlur} @focus=${this.onFocus} @input=${this.onInput} @keydown=${this.onKeyDown} @wheel=${this.onWheel} @keyup=${this.onKeyUp}></div>${this.controls ? f`<div class=controls><button class="control-btn control-btn-up"type=button ?disabled=${this.disabled} @click=${() => this.handleStepChange(1)} aria-label="Increase value"><svg width=12 height=12 viewBox="0 0 24 24"><path d="M6 14.6l6-6.6 6 6.6"/></svg></button><button class="control-btn control-btn-down"type=button ?disabled=${this.disabled} @click=${() => this.handleStepChange(-1)} aria-label="Decrease value"><svg width=12 height=12 viewBox="0 0 24 24"><path d="M18 9.4l-6 6.6-6-6.6"/></svg></button></div>` : ""}</div>${this.suffix ? f`<div class=input-suffix>${this.suffix}</div>` : ""}`;
875
875
  }
876
876
  };
877
- u.styles = [K, ct];
878
- b([
877
+ p.styles = [q, ut];
878
+ m([
879
879
  h({ type: Number })
880
- ], u.prototype, "value", 2);
881
- b([
880
+ ], p.prototype, "value", 2);
881
+ m([
882
882
  h({ attribute: !1 })
883
- ], u.prototype, "formatter", 2);
884
- b([
883
+ ], p.prototype, "formatter", 2);
884
+ m([
885
885
  h({ attribute: !1 })
886
- ], u.prototype, "parser", 2);
887
- b([
886
+ ], p.prototype, "parser", 2);
887
+ m([
888
888
  h({ type: String, reflect: !0 })
889
- ], u.prototype, "prefix", 2);
890
- b([
889
+ ], p.prototype, "prefix", 2);
890
+ m([
891
891
  h({ type: String, reflect: !0 })
892
- ], u.prototype, "suffix", 2);
893
- b([
894
- h({ type: String, reflect: !0 })
895
- ], u.prototype, "unit", 2);
896
- b([
892
+ ], p.prototype, "suffix", 2);
893
+ m([
897
894
  h({
898
895
  type: Boolean,
899
896
  reflect: !0,
@@ -902,17 +899,17 @@ b([
902
899
  toAttribute: (t) => t ? "" : null
903
900
  }
904
901
  })
905
- ], u.prototype, "controls", 2);
906
- b([
902
+ ], p.prototype, "controls", 2);
903
+ m([
907
904
  h({ type: Number })
908
- ], u.prototype, "step", 2);
909
- b([
905
+ ], p.prototype, "step", 2);
906
+ m([
910
907
  h({ type: Number })
911
- ], u.prototype, "min", 2);
912
- b([
908
+ ], p.prototype, "min", 2);
909
+ m([
913
910
  h({ type: Number })
914
- ], u.prototype, "max", 2);
915
- b([
911
+ ], p.prototype, "max", 2);
912
+ m([
916
913
  h({
917
914
  type: Boolean,
918
915
  attribute: "change-on-wheel",
@@ -921,45 +918,45 @@ b([
921
918
  toAttribute: (t) => t ? "" : null
922
919
  }
923
920
  })
924
- ], u.prototype, "changeOnWheel", 2);
925
- b([
921
+ ], p.prototype, "changeOnWheel", 2);
922
+ m([
926
923
  h({ type: Boolean, reflect: !0 })
927
- ], u.prototype, "disabled", 2);
928
- b([
924
+ ], p.prototype, "disabled", 2);
925
+ m([
929
926
  h({ type: Boolean, attribute: "no-decimal" })
930
- ], u.prototype, "noDecimal", 2);
931
- b([
927
+ ], p.prototype, "noDecimal", 2);
928
+ m([
932
929
  h({ type: Boolean, attribute: "no-zero" })
933
- ], u.prototype, "noZero", 2);
934
- b([
930
+ ], p.prototype, "noZero", 2);
931
+ m([
935
932
  h({ type: Boolean, attribute: "no-negative" })
936
- ], u.prototype, "noNegative", 2);
937
- b([
933
+ ], p.prototype, "noNegative", 2);
934
+ m([
938
935
  h({ type: Boolean, reflect: !0 })
939
- ], u.prototype, "center", 2);
940
- b([
941
- w()
942
- ], u.prototype, "text", 2);
943
- b([
944
- w()
945
- ], u.prototype, "isFocused", 2);
946
- u = b([
947
- O("nf-input-number")
948
- ], u);
949
- const pt = N({
936
+ ], p.prototype, "center", 2);
937
+ m([
938
+ $()
939
+ ], p.prototype, "text", 2);
940
+ m([
941
+ $()
942
+ ], p.prototype, "isFocused", 2);
943
+ p = m([
944
+ N("nf-input-number")
945
+ ], p);
946
+ const bt = M({
950
947
  tagName: "nf-input-number",
951
- elementClass: u,
952
- react: T,
948
+ elementClass: p,
949
+ react: H,
953
950
  events: {
954
951
  onChange: "change"
955
952
  }
956
- }), Vt = pt, ft = C`:host{cursor:pointer;-webkit-user-select:none;user-select:none;width:calc(1rem + 2px);height:calc(1rem + 2px)}:host([disabled]){cursor:not-allowed;opacity:.6}.checkbox-container{position:relative;transition:opacity .2s ease}.checkbox-box{width:1rem;height:1rem;border-radius:.25rem;background-color:var(--nf-background-color);border:1px solid var(--nf-border-color);display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,border-color .2s ease}:host(:hover:not([checked]):not([disabled])) .checkbox-box{border-color:var(--nf-primary-color,var(--nf-primary-color))}:host([checked]) .checkbox-box{background-color:var(--nf-primary-color,var(--nf-primary-color));border-color:var(--nf-primary-color,var(--nf-primary-color))}:host([disabled]) .checkbox-box{border-color:#fffc;background:#fffc;cursor:not-allowed;pointer-events:none}:host([disabled][checked]) .checkbox-box{background-color:#fffc;border-color:#fffc}.checkbox-icon{color:#fff;font-size:.75rem;line-height:1;font-weight:700;transition:transform .2s ease;display:flex;align-items:center}:host([checked]) .checkbox-icon{transform:scale(1)}:host(:focus) .checkbox-container{outline:.125rem solid var(--nf-primary-color,var(--nf-primary-color));outline-offset:.125rem}`;
957
- var bt = Object.defineProperty, mt = Object.getOwnPropertyDescriptor, ce = (t, e, o, r) => {
958
- for (var s = r > 1 ? void 0 : r ? mt(e, o) : e, i = t.length - 1, n; i >= 0; i--)
959
- (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
960
- return r && s && bt(e, o, s), s;
953
+ }), Lt = bt, mt = S`:host{cursor:pointer;-webkit-user-select:none;user-select:none;width:calc(1rem + 2px);height:calc(1rem + 2px)}:host([disabled]){cursor:not-allowed;opacity:.6}.checkbox-container{position:relative;transition:opacity .2s ease}.checkbox-box{width:1rem;height:1rem;border-radius:.25rem;background-color:var(--nf-background-color);border:1px solid var(--nf-border-color);display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,border-color .2s ease}:host(:hover:not([checked]):not([disabled])) .checkbox-box{border-color:var(--nf-primary-color,var(--nf-primary-color))}:host([checked]) .checkbox-box{background-color:var(--nf-primary-color,var(--nf-primary-color));border-color:var(--nf-primary-color,var(--nf-primary-color))}:host([disabled]) .checkbox-box{border-color:#fffc;background:#fffc;cursor:not-allowed;pointer-events:none}:host([disabled][checked]) .checkbox-box{background-color:#fffc;border-color:#fffc}.checkbox-icon{color:#fff;font-size:.75rem;line-height:1;font-weight:700;transition:transform .2s ease;display:flex;align-items:center}:host([checked]) .checkbox-icon{transform:scale(1)}:host(:focus) .checkbox-container{outline:.125rem solid var(--nf-primary-color,var(--nf-primary-color));outline-offset:.125rem}`;
954
+ var gt = Object.defineProperty, vt = Object.getOwnPropertyDescriptor, ue = (t, e, o, s) => {
955
+ for (var r = s > 1 ? void 0 : s ? vt(e, o) : e, i = t.length - 1, n; i >= 0; i--)
956
+ (n = t[i]) && (r = (s ? n(e, o, r) : n(r)) || r);
957
+ return s && r && gt(e, o, r), r;
961
958
  };
962
- let L = class extends H {
959
+ let j = class extends R {
963
960
  constructor() {
964
961
  super(...arguments), this.checked = !1, this.disabled = !1;
965
962
  }
@@ -975,7 +972,7 @@ let L = class extends H {
975
972
  }
976
973
  // 渲染复选框组件
977
974
  render() {
978
- return re`<div class=checkbox-container @click=${this.toggleCheckbox} aria-checked=${this.checked} aria-disabled=${this.disabled} role=checkbox><div class=checkbox-box>${this.checked ? re`<div class=checkbox-icon><svg viewBox="64 64 896 896"focusable=false data-icon=check width=0.625rem height=0.625rem fill=currentColor aria-hidden=true><path d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"></path></svg></div>` : ""}</div></div>`;
975
+ return ie`<div class=checkbox-container @click=${this.toggleCheckbox} aria-checked=${this.checked} aria-disabled=${this.disabled} role=checkbox><div class=checkbox-box>${this.checked ? ie`<div class=checkbox-icon><svg viewBox="64 64 896 896"focusable=false data-icon=check width=0.625rem height=0.625rem fill=currentColor aria-hidden=true><path d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"></path></svg></div>` : ""}</div></div>`;
979
976
  }
980
977
  connectedCallback() {
981
978
  this.style.transition = "none", super.connectedCallback(), requestAnimationFrame(() => {
@@ -983,30 +980,30 @@ let L = class extends H {
983
980
  });
984
981
  }
985
982
  };
986
- L.styles = [ft];
987
- ce([
983
+ j.styles = [mt];
984
+ ue([
988
985
  h({ type: Boolean, reflect: !0 })
989
- ], L.prototype, "checked", 2);
990
- ce([
986
+ ], j.prototype, "checked", 2);
987
+ ue([
991
988
  h({ type: Boolean, reflect: !0 })
992
- ], L.prototype, "disabled", 2);
993
- L = ce([
994
- O("nf-checkbox")
995
- ], L);
996
- const Ht = N({
989
+ ], j.prototype, "disabled", 2);
990
+ j = ue([
991
+ N("nf-checkbox")
992
+ ], j);
993
+ const Ut = M({
997
994
  tagName: "nf-checkbox",
998
- elementClass: L,
999
- react: T,
995
+ elementClass: j,
996
+ react: H,
1000
997
  events: {
1001
998
  onChange: "change"
1002
999
  }
1003
- }), gt = C`:host{display:inline-block;position:relative;width:calc(.9rem + (var(--nf-height) - 1.25rem)/ 2 + 7ch)}:host(:not([disabled-alpha])){width:calc(.9rem + (var(--nf-height) - 1.25rem)/ 2 + 9ch)}:host([disabled]){cursor:not-allowed;opacity:.6}:host([disabled]:hover){border-color:var(--nf-border-color);background:var(--nf-background-color)}:host([open]){border-color:var(--nf-border-color-hover);box-shadow:0 0 0 .15rem var(--nf-box-shadow-color-focus)}.trigger{width:calc(100% + 1.5rem + 2px);height:calc(100% + 2px);margin:-1px -.75rem;padding:1px .75rem;box-sizing:border-box;display:flex;align-items:center;cursor:pointer;transition:all .2s;font-size:.875rem;position:relative}:host(:not([disabled])) .trigger:hover{border-color:var(--nf-color-primary)}.trigger[disabled]{cursor:not-allowed;opacity:.6}:host([disabled]) .trigger{cursor:not-allowed;color:var(--nf-color-disabled)}.color-block{width:1.25rem;height:1.25rem;border-radius:.125rem;margin-left:calc((var(--nf-height) - 1.25rem)/ 2 - .75rem);margin-right:.4rem}:host(.hide-text) .color-block{margin-right:calc((var(--nf-height) - 1.25rem)/ 2 - .75rem)}.color-text{flex:1;text-align:center;text-transform:uppercase}.panel{position:absolute;z-index:1000;background:var(--nf-color-picker-card-background,var(--nf-dropdown-background));-webkit-backdrop-filter:blur(64px);backdrop-filter:blur(64px);border-radius:var(--nf-border-radius);box-shadow:0 6px 16px 0 var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow)),0 3px 6px -4px var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow)),0 9px 28px 8px var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow));-webkit-user-select:none;user-select:none}.panel-content{padding:.75rem;width:15rem}.color-selector{height:9.375rem;position:relative;margin-bottom:.75rem;border-radius:var(--nf-border-radius);overflow:hidden}.color-sb{width:100%;height:100%;position:relative;cursor:pointer}.sb-white{position:absolute;inset:0;background:linear-gradient(to right,#fff,#fff0)}.sb-black{position:absolute;inset:0;background:linear-gradient(to top,#000,#0000)}.selector{position:absolute;width:.625rem;height:.625rem;border:.125rem solid #fff;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 .125rem #00000080;pointer-events:none}.slider-container{margin-bottom:.5rem}.slider-container:last-child{margin-bottom:0}.sliders-row{display:flex;align-items:center;gap:.75rem}.sliders{flex:1}.slider{position:relative;height:.75rem;border-radius:.375rem}.hue-slider{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.alpha-slider{position:relative;background-image:linear-gradient(45deg,var(--nf-color-picker-card-checker,#ccc) 25%,transparent 25%),linear-gradient(-45deg,var(--nf-color-picker-card-checker,#ccc) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--nf-color-picker-card-checker,#ccc) 75%),linear-gradient(-45deg,transparent 75%,var(--nf-color-picker-card-checker,#ccc) 75%);background-size:.375rem .375rem;background-position:0 0,0 .1875rem,.1875rem -.1875rem,-.1875rem 0;background-color:var(--nf-color-picker-card-checker-bg,#fff);border-radius:.375rem}.alpha-slider-input{position:relative;z-index:2}.alpha-gradient{position:absolute;inset:0;border-radius:.375rem}input[type=range]{-webkit-appearance:none;width:100%;height:100%;background:0 0;outline:0;position:absolute;top:0;left:0;margin:0;padding:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:1rem;height:1rem;border-radius:50%;background:#fff;border:.125rem solid var(--nf-color-border);cursor:pointer;box-shadow:0 0 .125rem #00000080;position:relative;z-index:1}input[type=range]::-moz-range-thumb{width:1rem;height:1rem;border-radius:50%;background:#fff;border:.125rem solid var(--nf-color-border);cursor:pointer;box-shadow:0 0 .125rem #00000080}.current-color-container{display:flex}.current-color{width:2rem;height:2rem;border-radius:var(--nf-border-radius);border:.0625rem solid var(--nf-color-border)}:host(:not([disabled-alpha])) .current-color{width:2.5rem;height:2.5rem}`;
1004
- var vt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, _ = (t, e, o, r) => {
1005
- for (var s = r > 1 ? void 0 : r ? _t(e, o) : e, i = t.length - 1, n; i >= 0; i--)
1006
- (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
1007
- return r && s && vt(e, o, s), s;
1000
+ }), yt = S`:host{display:inline-block;position:relative;width:calc(.9rem + (var(--nf-height) - 1.25rem)/ 2 + 7ch)}:host(:not([disabled-alpha])){width:calc(.9rem + (var(--nf-height) - 1.25rem)/ 2 + 9ch)}:host([disabled]){cursor:not-allowed;opacity:.6}:host([disabled]:hover){border-color:var(--nf-border-color);background:var(--nf-background-color)}:host([open]){border-color:var(--nf-border-color-hover);box-shadow:0 0 0 .15rem var(--nf-box-shadow-color-focus)}.trigger{width:calc(100% + 1.5rem + 2px);height:calc(100% + 2px);margin:-1px -.75rem;padding:1px .75rem;box-sizing:border-box;display:flex;align-items:center;cursor:pointer;transition:all .2s;font-size:.875rem;position:relative}:host(:not([disabled])) .trigger:hover{border-color:var(--nf-color-primary)}.trigger[disabled]{cursor:not-allowed;opacity:.6}:host([disabled]) .trigger{cursor:not-allowed;color:var(--nf-color-disabled)}.color-block{width:1.25rem;height:1.25rem;border-radius:.125rem;margin-left:calc((var(--nf-height) - 1.25rem)/ 2 - .75rem);margin-right:.4rem}:host(.hide-text) .color-block{margin-right:calc((var(--nf-height) - 1.25rem)/ 2 - .75rem)}.color-text{flex:1;text-align:center;text-transform:uppercase}.panel{position:absolute;z-index:1000;background:var(--nf-color-picker-card-background,var(--nf-dropdown-background));-webkit-backdrop-filter:blur(64px);backdrop-filter:blur(64px);border-radius:var(--nf-border-radius);box-shadow:0 6px 16px 0 var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow)),0 3px 6px -4px var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow)),0 9px 28px 8px var(--nf-color-picker-card-shadow,var(--nf-dropdown-shadow));-webkit-user-select:none;user-select:none}.panel-content{padding:.75rem;width:15rem}.color-selector{height:9.375rem;position:relative;margin-bottom:.75rem;border-radius:var(--nf-border-radius);overflow:hidden}.color-sb{width:100%;height:100%;position:relative;cursor:pointer}.sb-white{position:absolute;inset:0;background:linear-gradient(to right,#fff,#fff0)}.sb-black{position:absolute;inset:0;background:linear-gradient(to top,#000,#0000)}.selector{position:absolute;width:.625rem;height:.625rem;border:.125rem solid #fff;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 .125rem #00000080;pointer-events:none}.slider-container{margin-bottom:.5rem}.slider-container:last-child{margin-bottom:0}.sliders-row{display:flex;align-items:center;gap:.75rem}.sliders{flex:1}.slider{position:relative;height:.75rem;border-radius:.375rem}.hue-slider{background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.alpha-slider{position:relative;background-image:linear-gradient(45deg,var(--nf-color-picker-card-checker,#ccc) 25%,transparent 25%),linear-gradient(-45deg,var(--nf-color-picker-card-checker,#ccc) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--nf-color-picker-card-checker,#ccc) 75%),linear-gradient(-45deg,transparent 75%,var(--nf-color-picker-card-checker,#ccc) 75%);background-size:.375rem .375rem;background-position:0 0,0 .1875rem,.1875rem -.1875rem,-.1875rem 0;background-color:var(--nf-color-picker-card-checker-bg,#fff);border-radius:.375rem}.alpha-slider-input{position:relative;z-index:2}.alpha-gradient{position:absolute;inset:0;border-radius:.375rem}input[type=range]{-webkit-appearance:none;width:100%;height:100%;background:0 0;outline:0;position:absolute;top:0;left:0;margin:0;padding:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:1rem;height:1rem;border-radius:50%;background:#fff;border:.125rem solid var(--nf-color-border);cursor:pointer;box-shadow:0 0 .125rem #00000080;position:relative;z-index:1}input[type=range]::-moz-range-thumb{width:1rem;height:1rem;border-radius:50%;background:#fff;border:.125rem solid var(--nf-color-border);cursor:pointer;box-shadow:0 0 .125rem #00000080}.current-color-container{display:flex}.current-color{width:2rem;height:2rem;border-radius:var(--nf-border-radius);border:.0625rem solid var(--nf-color-border)}:host(:not([disabled-alpha])) .current-color{width:2.5rem;height:2.5rem}`;
1001
+ var wt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, y = (t, e, o, s) => {
1002
+ for (var r = s > 1 ? void 0 : s ? _t(e, o) : e, i = t.length - 1, n; i >= 0; i--)
1003
+ (n = t[i]) && (r = (s ? n(e, o, r) : n(r)) || r);
1004
+ return s && r && wt(e, o, r), r;
1008
1005
  };
1009
- let g = class extends W {
1006
+ let g = class extends I {
1010
1007
  constructor() {
1011
1008
  super(...arguments), this.value = "#FF0000", this.disabled = !1, this.disabledAlpha = !1, this.open = !1, this.showText = !0, this.placement = "bottom", this.align = "left", this.autoAdjust = !0, this._panelVisible = !1, this._internalValue = "#FF0000FF", this._hsb = { h: 0, s: 100, b: 100 }, this._panelPosition = { top: 0, left: 0 }, this._handleGlobalClick = (t) => {
1012
1009
  this._panelVisible && !this.contains(t.target) && this._closePanel();
@@ -1046,34 +1043,34 @@ let g = class extends W {
1046
1043
  }
1047
1044
  // 从HEX颜色值更新HSB值
1048
1045
  _updateHSBFromHex(t) {
1049
- const e = parseInt(t.slice(1, 3), 16) / 255, o = parseInt(t.slice(3, 5), 16) / 255, r = parseInt(t.slice(5, 7), 16) / 255, s = Math.max(e, o, r), i = Math.min(e, o, r), n = s - i;
1046
+ const e = parseInt(t.slice(1, 3), 16) / 255, o = parseInt(t.slice(3, 5), 16) / 255, s = parseInt(t.slice(5, 7), 16) / 255, r = Math.max(e, o, s), i = Math.min(e, o, s), n = r - i;
1050
1047
  let l = 0, a = 0;
1051
- const c = s;
1052
- n !== 0 && (a = n / s, s === e ? l = (o - r) / n % 6 : s === o ? l = (r - e) / n + 2 : l = (e - o) / n + 4, l *= 60, l < 0 && (l += 360)), this._hsb = {
1048
+ const c = r;
1049
+ n !== 0 && (a = n / r, r === e ? l = (o - s) / n % 6 : r === o ? l = (s - e) / n + 2 : l = (e - o) / n + 4, l *= 60, l < 0 && (l += 360)), this._hsb = {
1053
1050
  h: Math.round(l),
1054
1051
  s: Math.round(a * 100),
1055
1052
  b: Math.round(c * 100)
1056
1053
  };
1057
1054
  }
1058
1055
  // 从HSB值生成HEX颜色值
1059
- _generateHexFromHSB(t, e, o, r = "FF") {
1056
+ _generateHexFromHSB(t, e, o, s = "FF") {
1060
1057
  e /= 100, o /= 100;
1061
- const s = o * e, i = s * (1 - Math.abs(t / 60 % 2 - 1)), n = o - s;
1058
+ const r = o * e, i = r * (1 - Math.abs(t / 60 % 2 - 1)), n = o - r;
1062
1059
  let l = 0, a = 0, c = 0;
1063
- return 0 <= t && t < 60 ? (l = s, a = i, c = 0) : 60 <= t && t < 120 ? (l = i, a = s, c = 0) : 120 <= t && t < 180 ? (l = 0, a = s, c = i) : 180 <= t && t < 240 ? (l = 0, a = i, c = s) : 240 <= t && t < 300 ? (l = i, a = 0, c = s) : 300 <= t && t < 360 && (l = s, a = 0, c = i), l = Math.round((l + n) * 255), a = Math.round((a + n) * 255), c = Math.round((c + n) * 255), "#" + l.toString(16).padStart(2, "0") + a.toString(16).padStart(2, "0") + c.toString(16).padStart(2, "0") + r;
1060
+ return 0 <= t && t < 60 ? (l = r, a = i, c = 0) : 60 <= t && t < 120 ? (l = i, a = r, c = 0) : 120 <= t && t < 180 ? (l = 0, a = r, c = i) : 180 <= t && t < 240 ? (l = 0, a = i, c = r) : 240 <= t && t < 300 ? (l = i, a = 0, c = r) : 300 <= t && t < 360 && (l = r, a = 0, c = i), l = Math.round((l + n) * 255), a = Math.round((a + n) * 255), c = Math.round((c + n) * 255), "#" + l.toString(16).padStart(2, "0") + a.toString(16).padStart(2, "0") + c.toString(16).padStart(2, "0") + s;
1064
1061
  }
1065
1062
  // 计算面板位置
1066
1063
  _updatePanelPosition() {
1067
1064
  requestAnimationFrame(() => {
1068
1065
  const t = this.getBoundingClientRect(), e = this.shadowRoot?.querySelector(".panel");
1069
1066
  if (!e) return;
1070
- const o = 0.15 * 16, r = 8, s = e.offsetWidth || 240, i = e.offsetHeight || 300;
1067
+ const o = 0.15 * 16, s = 8, r = e.offsetWidth || 240, i = e.offsetHeight || 300;
1071
1068
  let n = this.placement, l = this.align;
1072
- this.autoAdjust && (n === "bottom" ? window.innerHeight - t.bottom - r < i && t.top - r >= i && (n = "top") : t.top - r < i && window.innerHeight - t.bottom - r >= i && (n = "bottom"), l === "right" ? t.right - o < s && t.left + t.width + o + s <= window.innerWidth && (l = "left") : t.left - o + s > window.innerWidth && t.right - o >= s && (l = "right"));
1069
+ this.autoAdjust && (n === "bottom" ? window.innerHeight - t.bottom - s < i && t.top - s >= i && (n = "top") : t.top - s < i && window.innerHeight - t.bottom - s >= i && (n = "bottom"), l === "right" ? t.right - o < r && t.left + t.width + o + r <= window.innerWidth && (l = "left") : t.left - o + r > window.innerWidth && t.right - o >= r && (l = "right"));
1073
1070
  let a;
1074
- n === "bottom" ? a = t.height + r : a = -i - r;
1071
+ n === "bottom" ? a = t.height + s : a = -i - s;
1075
1072
  let c;
1076
- l === "right" ? c = t.width - s + o : c = -o, this._panelPosition = { top: a, left: c };
1073
+ l === "right" ? c = t.width - r + o : c = -o, this._panelPosition = { top: a, left: c };
1077
1074
  });
1078
1075
  }
1079
1076
  // 打开面板
@@ -1101,8 +1098,8 @@ let g = class extends W {
1101
1098
  // 处理HSB颜色变化
1102
1099
  _handleHSBChange(t, e, o) {
1103
1100
  this._hsb = { h: t, s: e, b: o };
1104
- const r = this._internalValue.slice(7), s = this._generateHexFromHSB(t, e, o, r);
1105
- this._handleColorChange(s);
1101
+ const s = this._internalValue.slice(7), r = this._generateHexFromHSB(t, e, o, s);
1102
+ this._handleColorChange(r);
1106
1103
  }
1107
1104
  // 处理Alpha值变化
1108
1105
  _handleAlphaChange(t) {
@@ -1128,7 +1125,7 @@ let g = class extends W {
1128
1125
  _handleSBChange(t) {
1129
1126
  const e = this.shadowRoot?.querySelector(".color-sb");
1130
1127
  if (!e) return;
1131
- const o = e.getBoundingClientRect(), r = t instanceof MouseEvent ? t.clientX : t.touches[0].clientX, s = t instanceof MouseEvent ? t.clientY : t.touches[0].clientY, i = Math.max(0, Math.min(100, Math.round((r - o.left) / o.width * 100))), n = Math.max(0, Math.min(100, Math.round((1 - (s - o.top) / o.height) * 100)));
1128
+ const o = e.getBoundingClientRect(), s = t instanceof MouseEvent ? t.clientX : t.touches[0].clientX, r = t instanceof MouseEvent ? t.clientY : t.touches[0].clientY, i = Math.max(0, Math.min(100, Math.round((s - o.left) / o.width * 100))), n = Math.max(0, Math.min(100, Math.round((1 - (r - o.top) / o.height) * 100)));
1132
1129
  this._handleHSBChange(this._hsb.h, i, n);
1133
1130
  }
1134
1131
  // 处理透明度选择
@@ -1253,20 +1250,20 @@ let g = class extends W {
1253
1250
  `;
1254
1251
  }
1255
1252
  };
1256
- g.styles = [K, gt];
1257
- _([
1253
+ g.styles = [q, yt];
1254
+ y([
1258
1255
  h({ type: String })
1259
1256
  ], g.prototype, "value", 2);
1260
- _([
1257
+ y([
1261
1258
  h({ type: Boolean, reflect: !0 })
1262
1259
  ], g.prototype, "disabled", 2);
1263
- _([
1260
+ y([
1264
1261
  h({ type: Boolean, reflect: !0, attribute: "disabled-alpha" })
1265
1262
  ], g.prototype, "disabledAlpha", 2);
1266
- _([
1263
+ y([
1267
1264
  h({ type: Boolean, reflect: !0 })
1268
1265
  ], g.prototype, "open", 2);
1269
- _([
1266
+ y([
1270
1267
  h({
1271
1268
  attribute: "show-text",
1272
1269
  reflect: !0,
@@ -1276,13 +1273,13 @@ _([
1276
1273
  }
1277
1274
  })
1278
1275
  ], g.prototype, "showText", 2);
1279
- _([
1276
+ y([
1280
1277
  h({ type: String })
1281
1278
  ], g.prototype, "placement", 2);
1282
- _([
1279
+ y([
1283
1280
  h({ type: String })
1284
1281
  ], g.prototype, "align", 2);
1285
- _([
1282
+ y([
1286
1283
  h({
1287
1284
  attribute: "auto-adjust",
1288
1285
  converter: {
@@ -1291,39 +1288,39 @@ _([
1291
1288
  }
1292
1289
  })
1293
1290
  ], g.prototype, "autoAdjust", 2);
1294
- _([
1295
- w()
1291
+ y([
1292
+ $()
1296
1293
  ], g.prototype, "_panelVisible", 2);
1297
- _([
1298
- w()
1294
+ y([
1295
+ $()
1299
1296
  ], g.prototype, "_internalValue", 2);
1300
- _([
1301
- w()
1297
+ y([
1298
+ $()
1302
1299
  ], g.prototype, "_hsb", 2);
1303
- _([
1304
- w()
1300
+ y([
1301
+ $()
1305
1302
  ], g.prototype, "_panelPosition", 2);
1306
- g = _([
1307
- O("nf-color-picker")
1303
+ g = y([
1304
+ N("nf-color-picker")
1308
1305
  ], g);
1309
- const Ut = N({
1306
+ const jt = M({
1310
1307
  tagName: "nf-color-picker",
1311
1308
  elementClass: g,
1312
- react: T,
1309
+ react: H,
1313
1310
  events: {
1314
1311
  onChange: "change",
1315
1312
  onOpenChange: "openChange"
1316
1313
  }
1317
1314
  });
1318
- const yt = { ATTRIBUTE: 1 }, wt = (t) => (...e) => ({ _$litDirective$: t, values: e });
1319
- let $t = class {
1315
+ const $t = { ATTRIBUTE: 1 }, xt = (t) => (...e) => ({ _$litDirective$: t, values: e });
1316
+ let kt = class {
1320
1317
  constructor(e) {
1321
1318
  }
1322
1319
  get _$AU() {
1323
1320
  return this._$AM._$AU;
1324
1321
  }
1325
- _$AT(e, o, r) {
1326
- this._$Ct = e, this._$AM = o, this._$Ci = r;
1322
+ _$AT(e, o, s) {
1323
+ this._$Ct = e, this._$AM = o, this._$Ci = s;
1327
1324
  }
1328
1325
  _$AS(e, o) {
1329
1326
  return this.update(e, o);
@@ -1332,37 +1329,37 @@ let $t = class {
1332
1329
  return this.render(...o);
1333
1330
  }
1334
1331
  };
1335
- const Se = "important", xt = " !" + Se, $e = wt(class extends $t {
1332
+ const De = "important", Et = " !" + De, ke = xt(class extends kt {
1336
1333
  constructor(t) {
1337
- if (super(t), t.type !== yt.ATTRIBUTE || t.name !== "style" || t.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
1334
+ if (super(t), t.type !== $t.ATTRIBUTE || t.name !== "style" || t.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
1338
1335
  }
1339
1336
  render(t) {
1340
1337
  return Object.keys(t).reduce((e, o) => {
1341
- const r = t[o];
1342
- return r == null ? e : e + `${o = o.includes("-") ? o : o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${r};`;
1338
+ const s = t[o];
1339
+ return s == null ? e : e + `${o = o.includes("-") ? o : o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s};`;
1343
1340
  }, "");
1344
1341
  }
1345
1342
  update(t, [e]) {
1346
1343
  const { style: o } = t.element;
1347
1344
  if (this.ft === void 0) return this.ft = new Set(Object.keys(e)), this.render(e);
1348
- for (const r of this.ft) e[r] == null && (this.ft.delete(r), r.includes("-") ? o.removeProperty(r) : o[r] = null);
1349
- for (const r in e) {
1350
- const s = e[r];
1351
- if (s != null) {
1352
- this.ft.add(r);
1353
- const i = typeof s == "string" && s.endsWith(xt);
1354
- r.includes("-") || i ? o.setProperty(r, i ? s.slice(0, -11) : s, i ? Se : "") : o[r] = s;
1345
+ for (const s of this.ft) e[s] == null && (this.ft.delete(s), s.includes("-") ? o.removeProperty(s) : o[s] = null);
1346
+ for (const s in e) {
1347
+ const r = e[s];
1348
+ if (r != null) {
1349
+ this.ft.add(s);
1350
+ const i = typeof r == "string" && r.endsWith(Et);
1351
+ s.includes("-") || i ? o.setProperty(s, i ? r.slice(0, -11) : r, i ? De : "") : o[s] = r;
1355
1352
  }
1356
1353
  }
1357
- return D;
1354
+ return B;
1358
1355
  }
1359
- }), kt = C`:host{display:inline-flex;align-items:center;position:relative;width:100%;height:1.25rem;background-color:var(--nf-border-color,#e0e0e0);border-radius:.625rem;cursor:pointer;-webkit-user-select:none;user-select:none;border:none;box-shadow:none;padding:0}:host:hover{background-color:var(--nf-border-color,#e0e0e0);border:none}:host:focus{box-shadow:none;outline:0}:host([disabled]){cursor:not-allowed;opacity:.6}.slider-fill{position:absolute;left:0;top:0;height:100%;background-color:var(--nf-primary-color,#5e72f9);border-radius:.625rem 0 0 .625rem;pointer-events:none}.slider-handle{position:absolute;width:1.25rem;height:1.25rem;background-color:#fff;border-radius:50%;top:50%;transform:translate(-50%,-50%);cursor:grab;outline:0;box-shadow:0 1px 3px #0000004d;transition:transform .15s ease,box-shadow .15s ease;z-index:1}:host([disabled]) .slider-handle{cursor:not-allowed}:host(:not([disabled])) .slider-handle:hover{transform:translate(-50%,-50%) scale(1.05)}:host(:not([disabled])) .slider-handle:active{cursor:grabbing;transform:translate(-50%,-50%) scale(1.15);box-shadow:0 3px 8px #0006}.slider-handle:focus{box-shadow:0 0 0 3px #5e72f94d}.slider-tooltip{position:absolute;bottom:calc(100% + .5rem);left:50%;transform:translate(-50%);background-color:var(--nf-slider-tooltip-background);color:var(--nf-color);padding:.25rem .5rem;border-radius:.25rem;font-size:.75rem;white-space:nowrap;opacity:0;transition:opacity .2s ease;pointer-events:none;box-shadow:0 0 .4rem .1rem #0000001a}.slider-tooltip.visible{opacity:1}`;
1360
- var Et = Object.defineProperty, At = Object.getOwnPropertyDescriptor, y = (t, e, o, r) => {
1361
- for (var s = r > 1 ? void 0 : r ? At(e, o) : e, i = t.length - 1, n; i >= 0; i--)
1362
- (n = t[i]) && (s = (r ? n(e, o, s) : n(s)) || s);
1363
- return r && s && Et(e, o, s), s;
1356
+ }), Ct = S`:host{display:inline-flex;align-items:center;position:relative;width:100%;height:1.25rem;background-color:var(--nf-border-color,#e0e0e0);border-radius:.625rem;cursor:pointer;-webkit-user-select:none;user-select:none;border:none;box-shadow:none;padding:0}:host:hover{background-color:var(--nf-border-color,#e0e0e0);border:none}:host:focus{box-shadow:none;outline:0}:host([disabled]){cursor:not-allowed;opacity:.6}.slider-fill{position:absolute;left:0;top:0;height:100%;background-color:var(--nf-primary-color,#5e72f9);border-radius:.625rem 0 0 .625rem;pointer-events:none}.slider-handle{position:absolute;width:1.25rem;height:1.25rem;background-color:#fff;border-radius:50%;top:50%;transform:translate(-50%,-50%);cursor:grab;outline:0;box-shadow:0 1px 3px #0000004d;transition:transform .15s ease,box-shadow .15s ease;z-index:1}:host([disabled]) .slider-handle{cursor:not-allowed}:host(:not([disabled])) .slider-handle:hover{transform:translate(-50%,-50%) scale(1.05)}:host(:not([disabled])) .slider-handle:active{cursor:grabbing;transform:translate(-50%,-50%) scale(1.15);box-shadow:0 3px 8px #0006}.slider-handle:focus{box-shadow:0 0 0 3px #5e72f94d}.slider-tooltip{position:absolute;bottom:calc(100% + .5rem);left:50%;transform:translate(-50%);background-color:var(--nf-slider-tooltip-background);color:var(--nf-color);padding:.25rem .5rem;border-radius:.25rem;font-size:.75rem;white-space:nowrap;opacity:0;transition:opacity .2s ease;pointer-events:none;box-shadow:0 0 .4rem .1rem #0000001a}.slider-tooltip.visible{opacity:1}`;
1357
+ var St = Object.defineProperty, At = Object.getOwnPropertyDescriptor, x = (t, e, o, s) => {
1358
+ for (var r = s > 1 ? void 0 : s ? At(e, o) : e, i = t.length - 1, n; i >= 0; i--)
1359
+ (n = t[i]) && (r = (s ? n(e, o, r) : n(r)) || r);
1360
+ return s && r && St(e, o, r), r;
1364
1361
  };
1365
- let v = class extends W {
1362
+ let v = class extends I {
1366
1363
  constructor() {
1367
1364
  super(...arguments), this.value = 0, this.defaultValue = 0, this.min = 0, this.max = 100, this.step = 1, this.disabled = !1, this.range = !1, this.tooltip = !1, this._currentValue = 0, this._isDragging = !1, this._showTooltip = !1, this._handleHostMouseDown = (t) => {
1368
1365
  this.disabled || (t.preventDefault(), this._startDrag(t));
@@ -1433,7 +1430,7 @@ let v = class extends W {
1433
1430
  this._isDragging = !0, this._showTooltip = !0, this._updateValue(t), document.addEventListener("mousemove", this._handleDrag), document.addEventListener("touchmove", this._handleDrag, { passive: !1 }), document.addEventListener("mouseup", this._stopDrag), document.addEventListener("touchend", this._stopDrag);
1434
1431
  }
1435
1432
  _updateValue(t) {
1436
- const e = this.getBoundingClientRect(), o = t instanceof MouseEvent ? t.clientX : t.touches[0].clientX, r = Math.max(0, Math.min(1, (o - e.left) / e.width)), s = this.max - this.min, i = this.min + r * s, n = Math.round((i - this.min) / this.step), l = this.min + n * this.step;
1433
+ const e = this.getBoundingClientRect(), o = t instanceof MouseEvent ? t.clientX : t.touches[0].clientX, s = Math.max(0, Math.min(1, (o - e.left) / e.width)), r = this.max - this.min, i = this.min + s * r, n = Math.round((i - this.min) / this.step), l = this.min + n * this.step;
1437
1434
  this._currentValue = Math.min(this.max, Math.max(this.min, l)), this.requestUpdate();
1438
1435
  }
1439
1436
  _getValuePercentage() {
@@ -1441,66 +1438,197 @@ let v = class extends W {
1441
1438
  return t === 0 ? 0 : (this._currentValue - this.min) / t * 100;
1442
1439
  }
1443
1440
  render() {
1444
- const t = this._getValuePercentage(), e = `${t}%`, o = `${t}%`, r = `slider-tooltip ${this._showTooltip || this.tooltip ? "visible" : ""}`;
1445
- return f`<div class=slider-fill style=${$e({ width: o })}></div><div class=slider-handle style=${$e({ left: e })} tabindex=${this.disabled ? -1 : 0} @mousedown=${this._handleMouseDown} @touchstart=${this._handleTouchStart} @keydown=${this._handleKeyDown}><div class=${r}>${this._currentValue}</div></div>`;
1441
+ const t = this._getValuePercentage(), e = `${t}%`, o = `${t}%`, s = `slider-tooltip ${this._showTooltip || this.tooltip ? "visible" : ""}`;
1442
+ return f`<div class=slider-fill style=${ke({ width: o })}></div><div class=slider-handle style=${ke({ left: e })} tabindex=${this.disabled ? -1 : 0} @mousedown=${this._handleMouseDown} @touchstart=${this._handleTouchStart} @keydown=${this._handleKeyDown}><div class=${s}>${this._currentValue}</div></div>`;
1446
1443
  }
1447
1444
  };
1448
- v.styles = [K, kt];
1449
- y([
1445
+ v.styles = [q, Ct];
1446
+ x([
1450
1447
  h({ type: Number })
1451
1448
  ], v.prototype, "value", 2);
1452
- y([
1449
+ x([
1453
1450
  h({ type: Number })
1454
1451
  ], v.prototype, "defaultValue", 2);
1455
- y([
1452
+ x([
1456
1453
  h({ type: Number })
1457
1454
  ], v.prototype, "min", 2);
1458
- y([
1455
+ x([
1459
1456
  h({ type: Number })
1460
1457
  ], v.prototype, "max", 2);
1461
- y([
1458
+ x([
1462
1459
  h({ type: Number })
1463
1460
  ], v.prototype, "step", 2);
1464
- y([
1461
+ x([
1465
1462
  h({ type: Boolean, reflect: !0 })
1466
1463
  ], v.prototype, "disabled", 2);
1467
- y([
1464
+ x([
1468
1465
  h({ type: Boolean })
1469
1466
  ], v.prototype, "range", 2);
1470
- y([
1467
+ x([
1471
1468
  h({ type: Boolean })
1472
1469
  ], v.prototype, "tooltip", 2);
1473
- y([
1474
- w()
1470
+ x([
1471
+ $()
1475
1472
  ], v.prototype, "_currentValue", 2);
1476
- y([
1477
- w()
1473
+ x([
1474
+ $()
1478
1475
  ], v.prototype, "_isDragging", 2);
1479
- y([
1480
- w()
1476
+ x([
1477
+ $()
1481
1478
  ], v.prototype, "_showTooltip", 2);
1482
- v = y([
1483
- O("nf-slider")
1479
+ v = x([
1480
+ N("nf-slider")
1484
1481
  ], v);
1485
- const Lt = N({
1482
+ const qt = M({
1486
1483
  tagName: "nf-slider",
1487
1484
  elementClass: v,
1488
- react: T,
1485
+ react: H,
1489
1486
  events: {
1490
1487
  onChange: "change"
1491
1488
  }
1489
+ }), Pt = S`:host{width:var(--nf-width);position:relative;display:inline-block;--nf-textarea-padding:.4rem .75rem}:host([disabled]) .textarea{cursor:not-allowed;color:var(--nf-color-disabled)}::slotted(*){position:absolute;top:.75rem;left:.75rem;color:var(--nf-color)}:host([disabled]) ::slotted(*){color:var(--nf-color-disabled)}.textarea{position:absolute;inset:0;padding:var(--nf-textarea-padding);outline:0;border:none;background:0 0;box-sizing:border-box;color:var(--nf-color);font-size:var(--nf-font-size);font-weight:var(--nf-font-weight);font-family:var(--nf-font-family),sans-serif;resize:vertical;line-height:1.5715;overflow-y:auto;overflow-x:hidden}.textarea::-webkit-scrollbar{width:6px}.textarea::-webkit-scrollbar-track{background:0 0}.textarea::-webkit-scrollbar-thumb{background:var(--nf-scrollbar-thumb-color,rgba(0,0,0,.2));border-radius:3px}.textarea::-webkit-scrollbar-thumb:hover{background:var(--nf-scrollbar-thumb-hover-color,rgba(0,0,0,.3))}:host([autoSize]) .textarea{resize:none;overflow-y:hidden}.counter{position:absolute;bottom:.5rem;right:.75rem;font-size:.75rem;color:var(--nf-color-secondary,rgba(0,0,0,.45));pointer-events:none;-webkit-user-select:none;user-select:none}`;
1490
+ var Dt = Object.defineProperty, Mt = Object.getOwnPropertyDescriptor, A = (t, e, o, s) => {
1491
+ for (var r = s > 1 ? void 0 : s ? Mt(e, o) : e, i = t.length - 1, n; i >= 0; i--)
1492
+ (n = t[i]) && (r = (s ? n(e, o, r) : n(r)) || r);
1493
+ return s && r && Dt(e, o, r), r;
1494
+ };
1495
+ let _ = class extends I {
1496
+ constructor() {
1497
+ super(...arguments), this.value = "", this.placeholder = "", this.rows = 3, this.disabled = !1, this.showCount = !1, this.autoSize = !1, this.onInput = (t) => {
1498
+ t.stopPropagation();
1499
+ const e = t.target, o = e.value;
1500
+ this.textareaRef = e, this.dispatchEvent(
1501
+ new CustomEvent("input", {
1502
+ detail: o,
1503
+ bubbles: !0,
1504
+ composed: !0
1505
+ })
1506
+ ), o !== void 0 && this.value !== o && (this.value = o, this.dispatchEvent(
1507
+ new CustomEvent("change", {
1508
+ detail: o,
1509
+ bubbles: !0,
1510
+ composed: !0
1511
+ })
1512
+ ));
1513
+ }, this.onChange = (t) => {
1514
+ t.stopPropagation();
1515
+ const e = t.target?.value;
1516
+ e !== void 0 && this.value !== e && this.dispatchEvent(
1517
+ new CustomEvent("change", {
1518
+ detail: e,
1519
+ bubbles: !0,
1520
+ composed: !0
1521
+ })
1522
+ );
1523
+ }, this.onKeyDown = (t) => {
1524
+ if (t.key === "Enter" && (t.ctrlKey || t.metaKey)) {
1525
+ t.stopPropagation();
1526
+ const e = t.target?.value;
1527
+ e !== void 0 && this.dispatchEvent(
1528
+ new CustomEvent("pressEnter", {
1529
+ detail: e,
1530
+ bubbles: !0,
1531
+ composed: !0
1532
+ })
1533
+ );
1534
+ }
1535
+ };
1536
+ }
1537
+ render() {
1538
+ const t = this.showCount && this.maxLength !== void 0;
1539
+ return f`<slot></slot><textarea class=textarea .value=${this.value} placeholder=${this.placeholder} maxlength=${this.maxLength ?? ""} rows=${this.autoSize ? void 0 : this.rows} ?disabled=${this.disabled} @input=${this.onInput} @change=${this.onChange} @keydown=${this.onKeyDown}></textarea>${t ? f`<div class=counter>${this.value.length} / ${this.maxLength}</div>` : ""}`;
1540
+ }
1541
+ adjustHeight() {
1542
+ if (!this.textareaRef || !this.autoSize) return;
1543
+ const t = this.textareaRef;
1544
+ t.style.height = "0", t.style.overflowY = "hidden";
1545
+ const e = t.scrollHeight, o = getComputedStyle(t), s = parseFloat(o.lineHeight), r = parseFloat(o.paddingTop), i = parseFloat(o.paddingBottom);
1546
+ let n = e, l = !1;
1547
+ const a = typeof this.autoSize == "object" ? this.autoSize : {}, c = a.minRows, u = a.maxRows;
1548
+ if (c !== void 0) {
1549
+ const C = s * c + r + i;
1550
+ n = Math.max(n, C);
1551
+ }
1552
+ if (u !== void 0) {
1553
+ const C = s * u + r + i;
1554
+ e > C && (l = !0), n = Math.min(n, C);
1555
+ }
1556
+ const d = parseFloat(getComputedStyle(document.documentElement).fontSize), w = n / d, k = 0.125;
1557
+ t.style.height = `${w}rem`, t.style.overflowY = l ? "auto" : "hidden", this.style.height = `${w + k}rem`;
1558
+ }
1559
+ updated(t) {
1560
+ t.has("value") && this.autoSize && this.textareaRef && this.adjustHeight(), (t.has("rows") || t.has("autoSize")) && (this.updateHostHeight(), t.has("autoSize") && this.autoSize && this.textareaRef && this.adjustHeight());
1561
+ }
1562
+ firstUpdated() {
1563
+ this.textareaRef = this.shadowRoot?.querySelector(".textarea"), this.updateHostHeight(), this.autoSize && this.textareaRef && this.adjustHeight();
1564
+ }
1565
+ updateHostHeight() {
1566
+ if (this.autoSize) {
1567
+ if (!this.textareaRef) {
1568
+ const e = (typeof this.autoSize == "object" ? this.autoSize : {}).minRows ?? 2, n = 0.875 * 1.5715 * e + 0.8 + 0.125;
1569
+ this.style.height = `${n}rem`;
1570
+ }
1571
+ } else {
1572
+ const r = 1.3750624999999999 * this.rows + 0.8 + 0.125;
1573
+ this.style.height = `${r}rem`;
1574
+ }
1575
+ }
1576
+ connectedCallback() {
1577
+ this.style.transition = "none", super.connectedCallback(), requestAnimationFrame(() => {
1578
+ this.style.transition = "";
1579
+ });
1580
+ }
1581
+ };
1582
+ _.styles = [q, Pt];
1583
+ A([
1584
+ h({ type: String })
1585
+ ], _.prototype, "value", 2);
1586
+ A([
1587
+ h({ type: String })
1588
+ ], _.prototype, "placeholder", 2);
1589
+ A([
1590
+ h({ type: Number })
1591
+ ], _.prototype, "maxLength", 2);
1592
+ A([
1593
+ h({ type: Number })
1594
+ ], _.prototype, "rows", 2);
1595
+ A([
1596
+ h({ type: Boolean, reflect: !0 })
1597
+ ], _.prototype, "disabled", 2);
1598
+ A([
1599
+ h({ type: Boolean })
1600
+ ], _.prototype, "showCount", 2);
1601
+ A([
1602
+ h({ type: Object })
1603
+ ], _.prototype, "autoSize", 2);
1604
+ A([
1605
+ $()
1606
+ ], _.prototype, "textareaRef", 2);
1607
+ _ = A([
1608
+ N("nf-textarea")
1609
+ ], _);
1610
+ const Wt = M({
1611
+ tagName: "nf-textarea",
1612
+ elementClass: _,
1613
+ react: H,
1614
+ events: {
1615
+ onInput: "input",
1616
+ onChange: "change",
1617
+ onPressEnter: "pressEnter"
1618
+ }
1492
1619
  });
1493
- function It(t) {
1494
- const { children: e, className: o, ...r } = t;
1495
- return /* @__PURE__ */ React.createElement("div", { theme: "light", "theme-color": "blue", className: "nf-root" + (o ? ` ${o}` : ""), ...r }, e);
1620
+ function Kt(t) {
1621
+ const { children: e, className: o, ...s } = t;
1622
+ return /* @__PURE__ */ React.createElement("div", { theme: "light", "theme-color": "blue", className: "nf-root" + (o ? ` ${o}` : ""), ...s }, e);
1496
1623
  }
1497
1624
  export {
1498
- Ht as NfCheckbox,
1499
- Ut as NfColorPicker,
1500
- Nt as NfInput,
1501
- Vt as NfInputNumber,
1502
- It as NfRoot,
1503
- Tt as NfSelect,
1504
- Lt as NfSlider,
1505
- Bt as NfSwitch
1625
+ Ut as NfCheckbox,
1626
+ jt as NfColorPicker,
1627
+ Bt as NfInput,
1628
+ Lt as NfInputNumber,
1629
+ Kt as NfRoot,
1630
+ Vt as NfSelect,
1631
+ qt as NfSlider,
1632
+ Rt as NfSwitch,
1633
+ Wt as NfTextarea
1506
1634
  };