@nextrap/nte-nav 0.2.11 → 0.2.12
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.
- package/CHANGELOG.md +4 -0
- package/index.js +254 -222
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var zt = function(s, t, e, i) {
|
|
2
2
|
function n(r) {
|
|
3
3
|
return r instanceof e ? r : new e(function(o) {
|
|
4
4
|
o(r);
|
|
@@ -25,8 +25,8 @@ var Dt = function(s, t, e, i) {
|
|
|
25
25
|
d((i = i.apply(s, t || [])).next());
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function It() {
|
|
29
|
+
return zt(this, void 0, void 0, function* () {
|
|
30
30
|
return new Promise((s) => {
|
|
31
31
|
if (document.readyState === "complete" || document.readyState === "interactive")
|
|
32
32
|
return s("loaded");
|
|
@@ -34,7 +34,7 @@ function jt() {
|
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var Wt = function(s, t, e, i) {
|
|
38
38
|
function n(r) {
|
|
39
39
|
return r instanceof e ? r : new e(function(o) {
|
|
40
40
|
o(r);
|
|
@@ -61,14 +61,14 @@ var zt = function(s, t, e, i) {
|
|
|
61
61
|
d((i = i.apply(s, t || [])).next());
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
-
function
|
|
65
|
-
return
|
|
64
|
+
function dt(s) {
|
|
65
|
+
return Wt(this, void 0, void 0, function* () {
|
|
66
66
|
return new Promise((t) => {
|
|
67
67
|
window.setTimeout(() => t(), s);
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
class
|
|
71
|
+
class Ct {
|
|
72
72
|
/**
|
|
73
73
|
*
|
|
74
74
|
* @param delay Debounce delay in milliseconds
|
|
@@ -90,7 +90,7 @@ class Et {
|
|
|
90
90
|
}, this.delay);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
const
|
|
93
|
+
const T = {
|
|
94
94
|
xs: { name: "xs", minWidth: 0 },
|
|
95
95
|
sm: { name: "sm", minWidth: 576 },
|
|
96
96
|
md: { name: "md", minWidth: 768 },
|
|
@@ -98,39 +98,39 @@ const C = {
|
|
|
98
98
|
xl: { name: "xl", minWidth: 1200 },
|
|
99
99
|
xxl: { name: "xxl", minWidth: 1400 }
|
|
100
100
|
};
|
|
101
|
-
let
|
|
102
|
-
function
|
|
101
|
+
let O = T.xs;
|
|
102
|
+
function Z() {
|
|
103
103
|
const s = window.innerWidth;
|
|
104
|
-
let t =
|
|
105
|
-
for (const e in
|
|
106
|
-
const i =
|
|
104
|
+
let t = T.xs;
|
|
105
|
+
for (const e in T) {
|
|
106
|
+
const i = T[e];
|
|
107
107
|
s >= i.minWidth && (t = i);
|
|
108
108
|
}
|
|
109
109
|
return t;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function pt(s) {
|
|
112
112
|
if (typeof s == "string" && s.endsWith("px") && (s = parseInt(s.replace("px", ""))), typeof s == "string") {
|
|
113
|
-
if (s =
|
|
113
|
+
if (s = T[s], !s)
|
|
114
114
|
throw new Error(
|
|
115
|
-
`Breakpoint ${s} not found. Defined breakpoints are: ${Object.keys(
|
|
115
|
+
`Breakpoint ${s} not found. Defined breakpoints are: ${Object.keys(T).join(", ")}`
|
|
116
116
|
);
|
|
117
117
|
} else typeof s == "number" && (s = { name: "c", minWidth: s });
|
|
118
118
|
return window.innerWidth >= s.minWidth;
|
|
119
119
|
}
|
|
120
120
|
if (!window.__nextrap_current_breakpoint) {
|
|
121
|
-
window.__nextrap_current_breakpoint =
|
|
122
|
-
const s = new
|
|
121
|
+
window.__nextrap_current_breakpoint = Z();
|
|
122
|
+
const s = new Ct(200, 500);
|
|
123
123
|
window.addEventListener("resize", async () => {
|
|
124
|
-
if (await s.wait(),
|
|
125
|
-
|
|
124
|
+
if (await s.wait(), O !== Z()) {
|
|
125
|
+
O = Z(), window.__nextrap_current_breakpoint = O;
|
|
126
126
|
const t = new CustomEvent("breakpoint-changed", {
|
|
127
|
-
detail: { breakpoint:
|
|
127
|
+
detail: { breakpoint: O }
|
|
128
128
|
});
|
|
129
|
-
console.log("Breakpoint changed",
|
|
129
|
+
console.log("Breakpoint changed", O), window.dispatchEvent(t);
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
class
|
|
133
|
+
class rt {
|
|
134
134
|
/**
|
|
135
135
|
* Checks recursively if the element is visible.
|
|
136
136
|
*
|
|
@@ -175,12 +175,12 @@ class it {
|
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function Bt() {
|
|
179
179
|
return document.readyState === "loading" ? new Promise((s) => {
|
|
180
180
|
document.addEventListener("DOMContentLoaded", () => s());
|
|
181
181
|
}) : Promise.resolve();
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function Gt() {
|
|
184
184
|
return document.readyState === "complete" ? Promise.resolve() : new Promise((s) => {
|
|
185
185
|
window.addEventListener("load", () => s());
|
|
186
186
|
});
|
|
@@ -190,18 +190,18 @@ function Wt() {
|
|
|
190
190
|
* Copyright 2019 Google LLC
|
|
191
191
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
192
192
|
*/
|
|
193
|
-
const
|
|
194
|
-
let
|
|
193
|
+
const B = globalThis, ot = B.ShadowRoot && (B.ShadyCSS === void 0 || B.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Tt = Symbol(), ut = /* @__PURE__ */ new WeakMap();
|
|
194
|
+
let Pt = class {
|
|
195
195
|
constructor(t, e, i) {
|
|
196
|
-
if (this._$cssResult$ = !0, i !==
|
|
196
|
+
if (this._$cssResult$ = !0, i !== Tt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
197
197
|
this.cssText = t, this.t = e;
|
|
198
198
|
}
|
|
199
199
|
get styleSheet() {
|
|
200
200
|
let t = this.o;
|
|
201
201
|
const e = this.t;
|
|
202
|
-
if (
|
|
202
|
+
if (ot && t === void 0) {
|
|
203
203
|
const i = e !== void 0 && e.length === 1;
|
|
204
|
-
i && (t =
|
|
204
|
+
i && (t = ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ut.set(e, t));
|
|
205
205
|
}
|
|
206
206
|
return t;
|
|
207
207
|
}
|
|
@@ -209,26 +209,26 @@ let Ct = class {
|
|
|
209
209
|
return this.cssText;
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
|
-
const
|
|
213
|
-
if (
|
|
212
|
+
const C = (s) => new Pt(typeof s == "string" ? s : s + "", void 0, Tt), qt = (s, t) => {
|
|
213
|
+
if (ot) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
214
214
|
else for (const e of t) {
|
|
215
|
-
const i = document.createElement("style"), n =
|
|
215
|
+
const i = document.createElement("style"), n = B.litNonce;
|
|
216
216
|
n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, s.appendChild(i);
|
|
217
217
|
}
|
|
218
|
-
},
|
|
218
|
+
}, ft = ot ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
|
219
219
|
let e = "";
|
|
220
220
|
for (const i of t.cssRules) e += i.cssText;
|
|
221
|
-
return
|
|
221
|
+
return C(e);
|
|
222
222
|
})(s) : s;
|
|
223
223
|
/**
|
|
224
224
|
* @license
|
|
225
225
|
* Copyright 2017 Google LLC
|
|
226
226
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
227
227
|
*/
|
|
228
|
-
const { is:
|
|
228
|
+
const { is: Vt, defineProperty: Yt, getOwnPropertyDescriptor: Ft, getOwnPropertyNames: Jt, getOwnPropertySymbols: Kt, getPrototypeOf: Zt } = Object, g = globalThis, vt = g.trustedTypes, Qt = vt ? vt.emptyScript : "", Q = g.reactiveElementPolyfillSupport, M = (s, t) => s, G = { toAttribute(s, t) {
|
|
229
229
|
switch (t) {
|
|
230
230
|
case Boolean:
|
|
231
|
-
s = s ?
|
|
231
|
+
s = s ? Qt : null;
|
|
232
232
|
break;
|
|
233
233
|
case Object:
|
|
234
234
|
case Array:
|
|
@@ -253,23 +253,23 @@ const { is: Gt, defineProperty: qt, getOwnPropertyDescriptor: Vt, getOwnProperty
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
return e;
|
|
256
|
-
} },
|
|
257
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
258
|
-
let
|
|
256
|
+
} }, at = (s, t) => !Vt(s, t), mt = { attribute: !0, type: String, converter: G, reflect: !1, useDefault: !1, hasChanged: at };
|
|
257
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), g.litPropertyMetadata ?? (g.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
258
|
+
let b = class extends HTMLElement {
|
|
259
259
|
static addInitializer(t) {
|
|
260
260
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
261
261
|
}
|
|
262
262
|
static get observedAttributes() {
|
|
263
263
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
264
264
|
}
|
|
265
|
-
static createProperty(t, e =
|
|
265
|
+
static createProperty(t, e = mt) {
|
|
266
266
|
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
267
267
|
const i = Symbol(), n = this.getPropertyDescriptor(t, i, e);
|
|
268
|
-
n !== void 0 &&
|
|
268
|
+
n !== void 0 && Yt(this.prototype, t, n);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
static getPropertyDescriptor(t, e, i) {
|
|
272
|
-
const { get: n, set: r } =
|
|
272
|
+
const { get: n, set: r } = Ft(this.prototype, t) ?? { get() {
|
|
273
273
|
return this[e];
|
|
274
274
|
}, set(o) {
|
|
275
275
|
this[e] = o;
|
|
@@ -280,17 +280,17 @@ let y = class extends HTMLElement {
|
|
|
280
280
|
}, configurable: !0, enumerable: !0 };
|
|
281
281
|
}
|
|
282
282
|
static getPropertyOptions(t) {
|
|
283
|
-
return this.elementProperties.get(t) ??
|
|
283
|
+
return this.elementProperties.get(t) ?? mt;
|
|
284
284
|
}
|
|
285
285
|
static _$Ei() {
|
|
286
286
|
if (this.hasOwnProperty(M("elementProperties"))) return;
|
|
287
|
-
const t =
|
|
287
|
+
const t = Zt(this);
|
|
288
288
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
289
289
|
}
|
|
290
290
|
static finalize() {
|
|
291
291
|
if (this.hasOwnProperty(M("finalized"))) return;
|
|
292
292
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
|
|
293
|
-
const e = this.properties, i = [...
|
|
293
|
+
const e = this.properties, i = [...Jt(e), ...Kt(e)];
|
|
294
294
|
for (const n of i) this.createProperty(n, e[n]);
|
|
295
295
|
}
|
|
296
296
|
const t = this[Symbol.metadata];
|
|
@@ -309,8 +309,8 @@ let y = class extends HTMLElement {
|
|
|
309
309
|
const e = [];
|
|
310
310
|
if (Array.isArray(t)) {
|
|
311
311
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
312
|
-
for (const n of i) e.unshift(
|
|
313
|
-
} else t !== void 0 && e.push(
|
|
312
|
+
for (const n of i) e.unshift(ft(n));
|
|
313
|
+
} else t !== void 0 && e.push(ft(t));
|
|
314
314
|
return e;
|
|
315
315
|
}
|
|
316
316
|
static _$Eu(t, e) {
|
|
@@ -339,7 +339,7 @@ let y = class extends HTMLElement {
|
|
|
339
339
|
}
|
|
340
340
|
createRenderRoot() {
|
|
341
341
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
342
|
-
return
|
|
342
|
+
return qt(t, this.constructor.elementStyles), t;
|
|
343
343
|
}
|
|
344
344
|
connectedCallback() {
|
|
345
345
|
var t;
|
|
@@ -364,7 +364,7 @@ let y = class extends HTMLElement {
|
|
|
364
364
|
var r;
|
|
365
365
|
const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
|
|
366
366
|
if (n !== void 0 && i.reflect === !0) {
|
|
367
|
-
const o = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter :
|
|
367
|
+
const o = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : G).toAttribute(e, i.type);
|
|
368
368
|
this._$Em = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$Em = null;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
@@ -372,7 +372,7 @@ let y = class extends HTMLElement {
|
|
|
372
372
|
var r, o;
|
|
373
373
|
const i = this.constructor, n = i._$Eh.get(t);
|
|
374
374
|
if (n !== void 0 && this._$Em !== n) {
|
|
375
|
-
const l = i.getPropertyOptions(n), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((r = l.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? l.converter :
|
|
375
|
+
const l = i.getPropertyOptions(n), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((r = l.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? l.converter : G;
|
|
376
376
|
this._$Em = n;
|
|
377
377
|
const d = a.fromAttribute(e, l.type);
|
|
378
378
|
this[n] = d ?? ((o = this._$Ej) == null ? void 0 : o.get(n)) ?? d, this._$Em = null;
|
|
@@ -382,7 +382,7 @@ let y = class extends HTMLElement {
|
|
|
382
382
|
var n;
|
|
383
383
|
if (t !== void 0) {
|
|
384
384
|
const r = this.constructor, o = this[t];
|
|
385
|
-
if (i ?? (i = r.getPropertyOptions(t)), !((i.hasChanged ??
|
|
385
|
+
if (i ?? (i = r.getPropertyOptions(t)), !((i.hasChanged ?? at)(o, e) || i.useDefault && i.reflect && o === ((n = this._$Ej) == null ? void 0 : n.get(t)) && !this.hasAttribute(r._$Eu(t, i)))) return;
|
|
386
386
|
this.C(t, e, i);
|
|
387
387
|
}
|
|
388
388
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -458,76 +458,76 @@ let y = class extends HTMLElement {
|
|
|
458
458
|
firstUpdated(t) {
|
|
459
459
|
}
|
|
460
460
|
};
|
|
461
|
-
|
|
461
|
+
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[M("elementProperties")] = /* @__PURE__ */ new Map(), b[M("finalized")] = /* @__PURE__ */ new Map(), Q == null || Q({ ReactiveElement: b }), (g.reactiveElementVersions ?? (g.reactiveElementVersions = [])).push("2.1.1");
|
|
462
462
|
/**
|
|
463
463
|
* @license
|
|
464
464
|
* Copyright 2017 Google LLC
|
|
465
465
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
466
466
|
*/
|
|
467
|
-
const U = globalThis,
|
|
468
|
-
\f\r]`,
|
|
469
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
470
|
-
function
|
|
471
|
-
if (!
|
|
472
|
-
return
|
|
467
|
+
const U = globalThis, q = U.trustedTypes, gt = q ? q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Ot = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, kt = "?" + m, Xt = `<${kt}>`, E = document, H = () => E.createComment(""), L = (s) => s === null || typeof s != "object" && typeof s != "function", lt = Array.isArray, te = (s) => lt(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", X = `[
|
|
468
|
+
\f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _t = /-->/g, $t = />/g, y = RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
|
|
469
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), yt = /'/g, bt = /"/g, Mt = /^(?:script|style|textarea|title)$/i, ee = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), R = ee(1), S = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), wt = /* @__PURE__ */ new WeakMap(), w = E.createTreeWalker(E, 129);
|
|
470
|
+
function Ut(s, t) {
|
|
471
|
+
if (!lt(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
472
|
+
return gt !== void 0 ? gt.createHTML(t) : t;
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const se = (s, t) => {
|
|
475
475
|
const e = s.length - 1, i = [];
|
|
476
|
-
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o =
|
|
476
|
+
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = k;
|
|
477
477
|
for (let l = 0; l < e; l++) {
|
|
478
478
|
const a = s[l];
|
|
479
479
|
let d, h, c = -1, u = 0;
|
|
480
|
-
for (; u < a.length && (o.lastIndex = u, h = o.exec(a), h !== null); ) u = o.lastIndex, o ===
|
|
481
|
-
const
|
|
482
|
-
r += o ===
|
|
480
|
+
for (; u < a.length && (o.lastIndex = u, h = o.exec(a), h !== null); ) u = o.lastIndex, o === k ? h[1] === "!--" ? o = _t : h[1] !== void 0 ? o = $t : h[2] !== void 0 ? (Mt.test(h[2]) && (n = RegExp("</" + h[2], "g")), o = y) : h[3] !== void 0 && (o = y) : o === y ? h[0] === ">" ? (o = n ?? k, c = -1) : h[1] === void 0 ? c = -2 : (c = o.lastIndex - h[2].length, d = h[1], o = h[3] === void 0 ? y : h[3] === '"' ? bt : yt) : o === bt || o === yt ? o = y : o === _t || o === $t ? o = k : (o = y, n = void 0);
|
|
481
|
+
const v = o === y && s[l + 1].startsWith("/>") ? " " : "";
|
|
482
|
+
r += o === k ? a + Xt : c >= 0 ? (i.push(d), a.slice(0, c) + Ot + a.slice(c) + m + v) : a + m + (c === -2 ? l : v);
|
|
483
483
|
}
|
|
484
|
-
return [
|
|
484
|
+
return [Ut(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
485
485
|
};
|
|
486
486
|
class D {
|
|
487
487
|
constructor({ strings: t, _$litType$: e }, i) {
|
|
488
488
|
let n;
|
|
489
489
|
this.parts = [];
|
|
490
490
|
let r = 0, o = 0;
|
|
491
|
-
const l = t.length - 1, a = this.parts, [d, h] =
|
|
492
|
-
if (this.el = D.createElement(d, i),
|
|
491
|
+
const l = t.length - 1, a = this.parts, [d, h] = se(t, e);
|
|
492
|
+
if (this.el = D.createElement(d, i), w.currentNode = this.el.content, e === 2 || e === 3) {
|
|
493
493
|
const c = this.el.content.firstChild;
|
|
494
494
|
c.replaceWith(...c.childNodes);
|
|
495
495
|
}
|
|
496
|
-
for (; (n =
|
|
496
|
+
for (; (n = w.nextNode()) !== null && a.length < l; ) {
|
|
497
497
|
if (n.nodeType === 1) {
|
|
498
|
-
if (n.hasAttributes()) for (const c of n.getAttributeNames()) if (c.endsWith(
|
|
499
|
-
const u = h[o++],
|
|
500
|
-
a.push({ type: 1, index: r, name:
|
|
501
|
-
} else c.startsWith(
|
|
502
|
-
if (
|
|
503
|
-
const c = n.textContent.split(
|
|
498
|
+
if (n.hasAttributes()) for (const c of n.getAttributeNames()) if (c.endsWith(Ot)) {
|
|
499
|
+
const u = h[o++], v = n.getAttribute(c).split(m), W = /([.?@])?(.*)/.exec(u);
|
|
500
|
+
a.push({ type: 1, index: r, name: W[2], strings: v, ctor: W[1] === "." ? ne : W[1] === "?" ? re : W[1] === "@" ? oe : J }), n.removeAttribute(c);
|
|
501
|
+
} else c.startsWith(m) && (a.push({ type: 6, index: r }), n.removeAttribute(c));
|
|
502
|
+
if (Mt.test(n.tagName)) {
|
|
503
|
+
const c = n.textContent.split(m), u = c.length - 1;
|
|
504
504
|
if (u > 0) {
|
|
505
|
-
n.textContent =
|
|
506
|
-
for (let
|
|
505
|
+
n.textContent = q ? q.emptyScript : "";
|
|
506
|
+
for (let v = 0; v < u; v++) n.append(c[v], H()), w.nextNode(), a.push({ type: 2, index: ++r });
|
|
507
507
|
n.append(c[u], H());
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
|
-
} else if (n.nodeType === 8) if (n.data ===
|
|
510
|
+
} else if (n.nodeType === 8) if (n.data === kt) a.push({ type: 2, index: r });
|
|
511
511
|
else {
|
|
512
512
|
let c = -1;
|
|
513
|
-
for (; (c = n.data.indexOf(
|
|
513
|
+
for (; (c = n.data.indexOf(m, c + 1)) !== -1; ) a.push({ type: 7, index: r }), c += m.length - 1;
|
|
514
514
|
}
|
|
515
515
|
r++;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
static createElement(t, e) {
|
|
519
|
-
const i =
|
|
519
|
+
const i = E.createElement("template");
|
|
520
520
|
return i.innerHTML = t, i;
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function P(s, t, e = s, i) {
|
|
524
524
|
var o, l;
|
|
525
|
-
if (t ===
|
|
525
|
+
if (t === S) return t;
|
|
526
526
|
let n = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
|
527
527
|
const r = L(t) ? void 0 : t._$litDirective$;
|
|
528
|
-
return (n == null ? void 0 : n.constructor) !== r && ((l = n == null ? void 0 : n._$AO) == null || l.call(n, !1), r === void 0 ? n = void 0 : (n = new r(s), n._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t =
|
|
528
|
+
return (n == null ? void 0 : n.constructor) !== r && ((l = n == null ? void 0 : n._$AO) == null || l.call(n, !1), r === void 0 ? n = void 0 : (n = new r(s), n._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t = P(s, n._$AS(s, t.values), n, i)), t;
|
|
529
529
|
}
|
|
530
|
-
class
|
|
530
|
+
class ie {
|
|
531
531
|
constructor(t, e) {
|
|
532
532
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
533
533
|
}
|
|
@@ -538,17 +538,17 @@ class ee {
|
|
|
538
538
|
return this._$AM._$AU;
|
|
539
539
|
}
|
|
540
540
|
u(t) {
|
|
541
|
-
const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ??
|
|
542
|
-
|
|
543
|
-
let r =
|
|
541
|
+
const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? E).importNode(e, !0);
|
|
542
|
+
w.currentNode = n;
|
|
543
|
+
let r = w.nextNode(), o = 0, l = 0, a = i[0];
|
|
544
544
|
for (; a !== void 0; ) {
|
|
545
545
|
if (o === a.index) {
|
|
546
546
|
let d;
|
|
547
|
-
a.type === 2 ? d = new j(r, r.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (d = new
|
|
547
|
+
a.type === 2 ? d = new j(r, r.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (d = new ae(r, this, t)), this._$AV.push(d), a = i[++l];
|
|
548
548
|
}
|
|
549
|
-
o !== (a == null ? void 0 : a.index) && (r =
|
|
549
|
+
o !== (a == null ? void 0 : a.index) && (r = w.nextNode(), o++);
|
|
550
550
|
}
|
|
551
|
-
return
|
|
551
|
+
return w.currentNode = E, n;
|
|
552
552
|
}
|
|
553
553
|
p(t) {
|
|
554
554
|
let e = 0;
|
|
@@ -575,7 +575,7 @@ class j {
|
|
|
575
575
|
return this._$AB;
|
|
576
576
|
}
|
|
577
577
|
_$AI(t, e = this) {
|
|
578
|
-
t =
|
|
578
|
+
t = P(this, t, e), L(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : te(t) ? this.k(t) : this._(t);
|
|
579
579
|
}
|
|
580
580
|
O(t) {
|
|
581
581
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -584,23 +584,23 @@ class j {
|
|
|
584
584
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
585
585
|
}
|
|
586
586
|
_(t) {
|
|
587
|
-
this._$AH !== p && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
587
|
+
this._$AH !== p && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(E.createTextNode(t)), this._$AH = t;
|
|
588
588
|
}
|
|
589
589
|
$(t) {
|
|
590
590
|
var r;
|
|
591
|
-
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = D.createElement(
|
|
591
|
+
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = D.createElement(Ut(i.h, i.h[0]), this.options)), i);
|
|
592
592
|
if (((r = this._$AH) == null ? void 0 : r._$AD) === n) this._$AH.p(e);
|
|
593
593
|
else {
|
|
594
|
-
const o = new
|
|
594
|
+
const o = new ie(n, this), l = o.u(this.options);
|
|
595
595
|
o.p(e), this.T(l), this._$AH = o;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
_$AC(t) {
|
|
599
|
-
let e =
|
|
600
|
-
return e === void 0 &&
|
|
599
|
+
let e = wt.get(t.strings);
|
|
600
|
+
return e === void 0 && wt.set(t.strings, e = new D(t)), e;
|
|
601
601
|
}
|
|
602
602
|
k(t) {
|
|
603
|
-
|
|
603
|
+
lt(this._$AH) || (this._$AH = [], this._$AR());
|
|
604
604
|
const e = this._$AH;
|
|
605
605
|
let i, n = 0;
|
|
606
606
|
for (const r of t) n === e.length ? e.push(i = new j(this.O(H()), this.O(H()), this, this.options)) : i = e[n], i._$AI(r), n++;
|
|
@@ -618,7 +618,7 @@ class j {
|
|
|
618
618
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
class
|
|
621
|
+
class J {
|
|
622
622
|
get tagName() {
|
|
623
623
|
return this.element.tagName;
|
|
624
624
|
}
|
|
@@ -631,11 +631,11 @@ class Y {
|
|
|
631
631
|
_$AI(t, e = this, i, n) {
|
|
632
632
|
const r = this.strings;
|
|
633
633
|
let o = !1;
|
|
634
|
-
if (r === void 0) t =
|
|
634
|
+
if (r === void 0) t = P(this, t, e, 0), o = !L(t) || t !== this._$AH && t !== S, o && (this._$AH = t);
|
|
635
635
|
else {
|
|
636
636
|
const l = t;
|
|
637
637
|
let a, d;
|
|
638
|
-
for (t = r[0], a = 0; a < r.length - 1; a++) d =
|
|
638
|
+
for (t = r[0], a = 0; a < r.length - 1; a++) d = P(this, l[i + a], e, a), d === S && (d = this._$AH[a]), o || (o = !L(d) || d !== this._$AH[a]), d === p ? t = p : t !== p && (t += (d ?? "") + r[a + 1]), this._$AH[a] = d;
|
|
639
639
|
}
|
|
640
640
|
o && !n && this.j(t);
|
|
641
641
|
}
|
|
@@ -643,7 +643,7 @@ class Y {
|
|
|
643
643
|
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
|
-
class
|
|
646
|
+
class ne extends J {
|
|
647
647
|
constructor() {
|
|
648
648
|
super(...arguments), this.type = 3;
|
|
649
649
|
}
|
|
@@ -651,7 +651,7 @@ class se extends Y {
|
|
|
651
651
|
this.element[this.name] = t === p ? void 0 : t;
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
|
-
class
|
|
654
|
+
class re extends J {
|
|
655
655
|
constructor() {
|
|
656
656
|
super(...arguments), this.type = 4;
|
|
657
657
|
}
|
|
@@ -659,12 +659,12 @@ class ie extends Y {
|
|
|
659
659
|
this.element.toggleAttribute(this.name, !!t && t !== p);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
class
|
|
662
|
+
class oe extends J {
|
|
663
663
|
constructor(t, e, i, n, r) {
|
|
664
664
|
super(t, e, i, n, r), this.type = 5;
|
|
665
665
|
}
|
|
666
666
|
_$AI(t, e = this) {
|
|
667
|
-
if ((t =
|
|
667
|
+
if ((t = P(this, t, e, 0) ?? p) === S) return;
|
|
668
668
|
const i = this._$AH, n = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== p && (i === p || n);
|
|
669
669
|
n && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
670
670
|
}
|
|
@@ -673,7 +673,7 @@ class ne extends Y {
|
|
|
673
673
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
|
-
class
|
|
676
|
+
class ae {
|
|
677
677
|
constructor(t, e, i) {
|
|
678
678
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
679
679
|
}
|
|
@@ -681,12 +681,12 @@ class re {
|
|
|
681
681
|
return this._$AM._$AU;
|
|
682
682
|
}
|
|
683
683
|
_$AI(t) {
|
|
684
|
-
|
|
684
|
+
P(this, t);
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
const
|
|
688
|
-
|
|
689
|
-
const
|
|
687
|
+
const tt = U.litHtmlPolyfillSupport;
|
|
688
|
+
tt == null || tt(D, j), (U.litHtmlVersions ?? (U.litHtmlVersions = [])).push("3.3.1");
|
|
689
|
+
const le = (s, t, e) => {
|
|
690
690
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
691
691
|
let n = i._$litPart$;
|
|
692
692
|
if (n === void 0) {
|
|
@@ -700,8 +700,8 @@ const oe = (s, t, e) => {
|
|
|
700
700
|
* Copyright 2017 Google LLC
|
|
701
701
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
702
702
|
*/
|
|
703
|
-
const
|
|
704
|
-
let
|
|
703
|
+
const A = globalThis;
|
|
704
|
+
let _ = class extends b {
|
|
705
705
|
constructor() {
|
|
706
706
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
707
707
|
}
|
|
@@ -712,7 +712,7 @@ let g = class extends y {
|
|
|
712
712
|
}
|
|
713
713
|
update(t) {
|
|
714
714
|
const e = this.render();
|
|
715
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
715
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = le(e, this.renderRoot, this.renderOptions);
|
|
716
716
|
}
|
|
717
717
|
connectedCallback() {
|
|
718
718
|
var t;
|
|
@@ -723,20 +723,20 @@ let g = class extends y {
|
|
|
723
723
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
724
724
|
}
|
|
725
725
|
render() {
|
|
726
|
-
return
|
|
726
|
+
return S;
|
|
727
727
|
}
|
|
728
728
|
};
|
|
729
|
-
var
|
|
730
|
-
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
(
|
|
729
|
+
var St;
|
|
730
|
+
_._$litElement$ = !0, _.finalized = !0, (St = A.litElementHydrateSupport) == null || St.call(A, { LitElement: _ });
|
|
731
|
+
const et = A.litElementPolyfillSupport;
|
|
732
|
+
et == null || et({ LitElement: _ });
|
|
733
|
+
(A.litElementVersions ?? (A.litElementVersions = [])).push("4.2.1");
|
|
734
734
|
/**
|
|
735
735
|
* @license
|
|
736
736
|
* Copyright 2017 Google LLC
|
|
737
737
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
738
738
|
*/
|
|
739
|
-
const
|
|
739
|
+
const z = (s) => (t, e) => {
|
|
740
740
|
e !== void 0 ? e.addInitializer(() => {
|
|
741
741
|
customElements.define(s, t);
|
|
742
742
|
}) : customElements.define(s, t);
|
|
@@ -746,7 +746,7 @@ const F = (s) => (t, e) => {
|
|
|
746
746
|
* Copyright 2017 Google LLC
|
|
747
747
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
748
748
|
*/
|
|
749
|
-
const
|
|
749
|
+
const he = { attribute: !0, type: String, converter: G, reflect: !1, hasChanged: at }, ce = (s = he, t, e) => {
|
|
750
750
|
const { kind: i, metadata: n } = e;
|
|
751
751
|
let r = globalThis.litPropertyMetadata.get(n);
|
|
752
752
|
if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), r.set(e.name, s), i === "accessor") {
|
|
@@ -767,8 +767,8 @@ const ae = { attribute: !0, type: String, converter: B, reflect: !1, hasChanged:
|
|
|
767
767
|
}
|
|
768
768
|
throw Error("Unsupported decorator location: " + i);
|
|
769
769
|
};
|
|
770
|
-
function
|
|
771
|
-
return (t, e) => typeof e == "object" ?
|
|
770
|
+
function f(s) {
|
|
771
|
+
return (t, e) => typeof e == "object" ? ce(s, t, e) : ((i, n, r) => {
|
|
772
772
|
const o = n.hasOwnProperty(r);
|
|
773
773
|
return n.constructor.createProperty(r, i), o ? Object.getOwnPropertyDescriptor(n, r) : void 0;
|
|
774
774
|
})(s, t, e);
|
|
@@ -778,10 +778,10 @@ function S(s) {
|
|
|
778
778
|
* Copyright 2017 Google LLC
|
|
779
779
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
780
780
|
*/
|
|
781
|
-
function
|
|
782
|
-
return
|
|
781
|
+
function Nt(s) {
|
|
782
|
+
return f({ ...s, state: !0, attribute: !1 });
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function de(s, t) {
|
|
785
785
|
const e = document.createElement("template");
|
|
786
786
|
return e.innerHTML = s.trim(), t.append(e.content.cloneNode(!0)), new Proxy({}, {
|
|
787
787
|
get(i, n) {
|
|
@@ -796,32 +796,32 @@ function he(s, t) {
|
|
|
796
796
|
}
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
|
-
const
|
|
799
|
+
const ct = class ct extends b {
|
|
800
800
|
constructor(t) {
|
|
801
801
|
super();
|
|
802
802
|
const e = this.createRenderRoot();
|
|
803
|
-
this.$ =
|
|
803
|
+
this.$ = de(t, e);
|
|
804
804
|
}
|
|
805
805
|
connectedCallback() {
|
|
806
806
|
super.connectedCallback();
|
|
807
807
|
let t = this.css;
|
|
808
808
|
Array.isArray(t) || (t = [t]);
|
|
809
|
-
const e = t.map((i) => i instanceof
|
|
809
|
+
const e = t.map((i) => i instanceof Pt ? i.styleSheet : C(i).styleSheet);
|
|
810
810
|
this.shadowRoot.adoptedStyleSheets = e;
|
|
811
811
|
}
|
|
812
812
|
};
|
|
813
|
-
|
|
813
|
+
ct.DEFINITION = {
|
|
814
814
|
classes: [],
|
|
815
815
|
attributes: {}
|
|
816
816
|
};
|
|
817
|
-
let
|
|
817
|
+
let it = ct;
|
|
818
818
|
/**
|
|
819
819
|
* @license
|
|
820
820
|
* Copyright 2017 Google LLC
|
|
821
821
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
822
822
|
*/
|
|
823
|
-
const
|
|
824
|
-
class
|
|
823
|
+
const Ht = { ATTRIBUTE: 1, CHILD: 2 }, Lt = (s) => (...t) => ({ _$litDirective$: s, values: t });
|
|
824
|
+
class Rt {
|
|
825
825
|
constructor(t) {
|
|
826
826
|
}
|
|
827
827
|
get _$AU() {
|
|
@@ -842,10 +842,10 @@ class Ht {
|
|
|
842
842
|
* Copyright 2018 Google LLC
|
|
843
843
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
844
844
|
*/
|
|
845
|
-
const
|
|
845
|
+
const At = Lt(class extends Rt {
|
|
846
846
|
constructor(s) {
|
|
847
847
|
var t;
|
|
848
|
-
if (super(s), s.type !==
|
|
848
|
+
if (super(s), s.type !== Ht.ATTRIBUTE || s.name !== "class" || ((t = s.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
849
849
|
}
|
|
850
850
|
render(s) {
|
|
851
851
|
return " " + Object.keys(s).filter((t) => s[t]).join(" ") + " ";
|
|
@@ -863,15 +863,15 @@ const bt = Nt(class extends Ht {
|
|
|
863
863
|
const o = !!t[r];
|
|
864
864
|
o === this.st.has(r) || (n = this.nt) != null && n.has(r) || (o ? (e.add(r), this.st.add(r)) : (e.remove(r), this.st.delete(r)));
|
|
865
865
|
}
|
|
866
|
-
return
|
|
866
|
+
return S;
|
|
867
867
|
}
|
|
868
|
-
}),
|
|
869
|
-
var
|
|
870
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
868
|
+
}), pe = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--backdrop: rgba(var(--nt-dark-rgb), .5);--header-background: var(--nt-soft-primary);--background-color: var(--nt-white);--shadow-color: rgba(var(--nt-dark-rgb), .5);--padding: var(--nt-space);position:fixed;top:0;right:0;bottom:0;width:50%;min-width:300px;max-width:500px;z-index:2000;padding:0;isolation:isolate;display:block}:host[opened]{display:block}#offcanvas{display:flex;flex-direction:column;width:100%;height:100%;overflow:scroll;background-color:var(--background-color);box-shadow:0 0 10px var(--shadow-color);transition:transform .2s ease-in-out;transform:translate(0)}#offcanvas.closed{transform:translate(100%)}#header{display:flex;width:100%;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--header-background);flex-grow:0;padding:var(--padding)}#header:has(>slot[empty]){display:none}#main{display:flex;width:100%;flex-grow:1;padding:var(--padding);min-height:200px;overflow:auto;height:100%}#footer{display:flex;width:100%;flex-direction:row;justify-content:space-between;align-items:center;margin-top:auto;flex-grow:0;padding:var(--padding)}#footer:has(>slot[empty]){display:none}#backdrop{opacity:1;transition:opacity .2s ease-in-out;position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--backdrop);z-index:-1;display:block}#backdrop.closed{opacity:0}";
|
|
869
|
+
var ue = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, K = (s, t, e, i) => {
|
|
870
|
+
for (var n = i > 1 ? void 0 : i ? fe(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
871
871
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
872
|
-
return i && n &&
|
|
872
|
+
return i && n && ue(t, e, n), n;
|
|
873
873
|
};
|
|
874
|
-
let
|
|
874
|
+
let x = class extends _ {
|
|
875
875
|
constructor() {
|
|
876
876
|
super(), this.backdrop = !0, this.opened = !1, this.closedClass = !0, this.addEventListener("click", (s) => {
|
|
877
877
|
s === void 0 || !s.target || !(s.target instanceof HTMLElement) || s.target.closest("[data-nt-dismiss='offcanvas']") !== null && this.close();
|
|
@@ -893,7 +893,7 @@ let A = class extends g {
|
|
|
893
893
|
this.opened = !this.opened;
|
|
894
894
|
}
|
|
895
895
|
async updated(s) {
|
|
896
|
-
s.has("opened") && (this.opened ? (this.style.display = "block", await
|
|
896
|
+
s.has("opened") && (this.opened ? (this.style.display = "block", await dt(1), rt.observeEmptySlots(this), this.closedClass = !1) : (this.closedClass = !0, await dt(400), this.style.display = "none"));
|
|
897
897
|
}
|
|
898
898
|
render() {
|
|
899
899
|
return R`
|
|
@@ -901,14 +901,14 @@ let A = class extends g {
|
|
|
901
901
|
id="backdrop"
|
|
902
902
|
part="backdrop"
|
|
903
903
|
@click=${() => this.opened = !1}
|
|
904
|
-
class=${
|
|
904
|
+
class=${At({ closed: this.closedClass })}
|
|
905
905
|
></div>
|
|
906
906
|
<div
|
|
907
907
|
id="offcanvas"
|
|
908
908
|
part="offcanvas"
|
|
909
909
|
role="dialog"
|
|
910
910
|
aria-modal="true"
|
|
911
|
-
class=${
|
|
911
|
+
class=${At({ closed: this.closedClass })}
|
|
912
912
|
?backdrop="${this.backdrop}"
|
|
913
913
|
>
|
|
914
914
|
<div id="header">
|
|
@@ -926,26 +926,26 @@ let A = class extends g {
|
|
|
926
926
|
`;
|
|
927
927
|
}
|
|
928
928
|
};
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
],
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
],
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
],
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
],
|
|
942
|
-
const
|
|
943
|
-
var
|
|
944
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
929
|
+
x.styles = [C(pe)];
|
|
930
|
+
K([
|
|
931
|
+
f({ type: Boolean, reflect: !0 })
|
|
932
|
+
], x.prototype, "backdrop", 2);
|
|
933
|
+
K([
|
|
934
|
+
f({ type: Boolean, reflect: !0 })
|
|
935
|
+
], x.prototype, "opened", 2);
|
|
936
|
+
K([
|
|
937
|
+
Nt()
|
|
938
|
+
], x.prototype, "closedClass", 2);
|
|
939
|
+
x = K([
|
|
940
|
+
z(x.is)
|
|
941
|
+
], x);
|
|
942
|
+
const ve = ":host{--container-width: var(--nt-container-width);--text-color: var(--nt-text-color);--hover-color: var(--nt-primary);--hover-text-color: var(--nt-text-on-primary);--transition: .2s ease-in-out;--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text);--justify-content: center;--sidemenu-bg: var(--nt-soft-primary);--justify-sidebar-burger: flex-end;--height: auto;height:var(--height);display:block}nav{height:100%}#main{height:100%}";
|
|
943
|
+
var me = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, I = (s, t, e, i) => {
|
|
944
|
+
for (var n = i > 1 ? void 0 : i ? ge(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
945
945
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
946
|
-
return i && n &&
|
|
946
|
+
return i && n && me(t, e, n), n;
|
|
947
947
|
};
|
|
948
|
-
let $ = class extends
|
|
948
|
+
let $ = class extends _ {
|
|
949
949
|
constructor() {
|
|
950
950
|
super(), this.mode = "slave", this.breakpoint = "99999px", this.transferTo = "", this._isTransferred = !1;
|
|
951
951
|
}
|
|
@@ -1004,8 +1004,8 @@ let $ = class extends g {
|
|
|
1004
1004
|
!t.contains("nav-vertical") && !t.contains("nav-horizontal") && t.add(this.closest("nte-offcanvas") === null ? "nav-horizontal" : "nav-vertical");
|
|
1005
1005
|
}
|
|
1006
1006
|
async connectedCallback() {
|
|
1007
|
-
await
|
|
1008
|
-
|
|
1007
|
+
await It(), super.connectedCallback(), this.mode !== "slave" && this.transferTo !== "" && (this._isTransferred = !1, this.breakpoint !== "" && (pt(this.breakpoint) || (this._isTransferred = !0), window.addEventListener("breakpoint-changed", (s) => {
|
|
1008
|
+
pt(this.breakpoint) ? this._isTransferred = !1 : this._isTransferred = !0;
|
|
1009
1009
|
})));
|
|
1010
1010
|
}
|
|
1011
1011
|
};
|
|
@@ -1013,28 +1013,28 @@ $.DEFINITION = {
|
|
|
1013
1013
|
classes: ["align-left", "align-right", "align-center"],
|
|
1014
1014
|
attributes: {}
|
|
1015
1015
|
};
|
|
1016
|
-
$.styles = [
|
|
1017
|
-
|
|
1018
|
-
|
|
1016
|
+
$.styles = [C(ve)];
|
|
1017
|
+
I([
|
|
1018
|
+
f({ type: String, reflect: !0 })
|
|
1019
1019
|
], $.prototype, "mode", 2);
|
|
1020
|
-
|
|
1021
|
-
|
|
1020
|
+
I([
|
|
1021
|
+
f({ type: String, reflect: !0 })
|
|
1022
1022
|
], $.prototype, "breakpoint", 2);
|
|
1023
|
-
|
|
1024
|
-
|
|
1023
|
+
I([
|
|
1024
|
+
f({ type: String, reflect: !0, attribute: "transfer-to" })
|
|
1025
1025
|
], $.prototype, "transferTo", 2);
|
|
1026
|
-
|
|
1027
|
-
|
|
1026
|
+
I([
|
|
1027
|
+
Nt()
|
|
1028
1028
|
], $.prototype, "_isTransferred", 2);
|
|
1029
|
-
$ =
|
|
1030
|
-
|
|
1029
|
+
$ = I([
|
|
1030
|
+
z("nte-nav")
|
|
1031
1031
|
], $);
|
|
1032
1032
|
/**
|
|
1033
1033
|
* @license
|
|
1034
1034
|
* Copyright 2020 Google LLC
|
|
1035
1035
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1036
1036
|
*/
|
|
1037
|
-
const
|
|
1037
|
+
const _e = (s) => s.strings === void 0;
|
|
1038
1038
|
/**
|
|
1039
1039
|
* @license
|
|
1040
1040
|
* Copyright 2017 Google LLC
|
|
@@ -1046,45 +1046,45 @@ const N = (s, t) => {
|
|
|
1046
1046
|
if (e === void 0) return !1;
|
|
1047
1047
|
for (const n of e) (i = n._$AO) == null || i.call(n, t, !1), N(n, t);
|
|
1048
1048
|
return !0;
|
|
1049
|
-
},
|
|
1049
|
+
}, V = (s) => {
|
|
1050
1050
|
let t, e;
|
|
1051
1051
|
do {
|
|
1052
1052
|
if ((t = s._$AM) === void 0) break;
|
|
1053
1053
|
e = t._$AN, e.delete(s), s = t;
|
|
1054
1054
|
} while ((e == null ? void 0 : e.size) === 0);
|
|
1055
|
-
},
|
|
1055
|
+
}, Dt = (s) => {
|
|
1056
1056
|
for (let t; t = s._$AM; s = t) {
|
|
1057
1057
|
let e = t._$AN;
|
|
1058
1058
|
if (e === void 0) t._$AN = e = /* @__PURE__ */ new Set();
|
|
1059
1059
|
else if (e.has(s)) break;
|
|
1060
|
-
e.add(s),
|
|
1060
|
+
e.add(s), be(t);
|
|
1061
1061
|
}
|
|
1062
1062
|
};
|
|
1063
|
-
function
|
|
1064
|
-
this._$AN !== void 0 ? (
|
|
1063
|
+
function $e(s) {
|
|
1064
|
+
this._$AN !== void 0 ? (V(this), this._$AM = s, Dt(this)) : this._$AM = s;
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function ye(s, t = !1, e = 0) {
|
|
1067
1067
|
const i = this._$AH, n = this._$AN;
|
|
1068
|
-
if (n !== void 0 && n.size !== 0) if (t) if (Array.isArray(i)) for (let r = e; r < i.length; r++) N(i[r], !1),
|
|
1069
|
-
else i != null && (N(i, !1),
|
|
1068
|
+
if (n !== void 0 && n.size !== 0) if (t) if (Array.isArray(i)) for (let r = e; r < i.length; r++) N(i[r], !1), V(i[r]);
|
|
1069
|
+
else i != null && (N(i, !1), V(i));
|
|
1070
1070
|
else N(this, s);
|
|
1071
1071
|
}
|
|
1072
|
-
const
|
|
1073
|
-
s.type ==
|
|
1072
|
+
const be = (s) => {
|
|
1073
|
+
s.type == Ht.CHILD && (s._$AP ?? (s._$AP = ye), s._$AQ ?? (s._$AQ = $e));
|
|
1074
1074
|
};
|
|
1075
|
-
class
|
|
1075
|
+
class we extends Rt {
|
|
1076
1076
|
constructor() {
|
|
1077
1077
|
super(...arguments), this._$AN = void 0;
|
|
1078
1078
|
}
|
|
1079
1079
|
_$AT(t, e, i) {
|
|
1080
|
-
super._$AT(t, e, i),
|
|
1080
|
+
super._$AT(t, e, i), Dt(this), this.isConnected = t._$AU;
|
|
1081
1081
|
}
|
|
1082
1082
|
_$AO(t, e = !0) {
|
|
1083
1083
|
var i, n;
|
|
1084
|
-
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (N(this, t),
|
|
1084
|
+
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (N(this, t), V(this));
|
|
1085
1085
|
}
|
|
1086
1086
|
setValue(t) {
|
|
1087
|
-
if (
|
|
1087
|
+
if (_e(this._$Ct)) this._$Ct._$AI(t, this);
|
|
1088
1088
|
else {
|
|
1089
1089
|
const e = [...this._$Ct._$AH];
|
|
1090
1090
|
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
|
@@ -1100,10 +1100,10 @@ class ye extends Ht {
|
|
|
1100
1100
|
* Copyright 2020 Google LLC
|
|
1101
1101
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1102
1102
|
*/
|
|
1103
|
-
const
|
|
1104
|
-
class
|
|
1103
|
+
const xt = () => new Ae();
|
|
1104
|
+
class Ae {
|
|
1105
1105
|
}
|
|
1106
|
-
const
|
|
1106
|
+
const st = /* @__PURE__ */ new WeakMap(), Et = Lt(class extends we {
|
|
1107
1107
|
render(s) {
|
|
1108
1108
|
return p;
|
|
1109
1109
|
}
|
|
@@ -1115,13 +1115,13 @@ const et = /* @__PURE__ */ new WeakMap(), At = Nt(class extends ye {
|
|
|
1115
1115
|
rt(s) {
|
|
1116
1116
|
if (this.isConnected || (s = void 0), typeof this.G == "function") {
|
|
1117
1117
|
const t = this.ht ?? globalThis;
|
|
1118
|
-
let e =
|
|
1119
|
-
e === void 0 && (e = /* @__PURE__ */ new WeakMap(),
|
|
1118
|
+
let e = st.get(t);
|
|
1119
|
+
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), st.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ht, void 0), e.set(this.G, s), s !== void 0 && this.G.call(this.ht, s);
|
|
1120
1120
|
} else this.G.value = s;
|
|
1121
1121
|
}
|
|
1122
1122
|
get lt() {
|
|
1123
1123
|
var s, t;
|
|
1124
|
-
return typeof this.G == "function" ? (s =
|
|
1124
|
+
return typeof this.G == "function" ? (s = st.get(this.ht ?? globalThis)) == null ? void 0 : s.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
|
1125
1125
|
}
|
|
1126
1126
|
disconnected() {
|
|
1127
1127
|
this.lt === this.ct && this.rt(void 0);
|
|
@@ -1129,15 +1129,15 @@ const et = /* @__PURE__ */ new WeakMap(), At = Nt(class extends ye {
|
|
|
1129
1129
|
reconnected() {
|
|
1130
1130
|
this.rt(this.ct);
|
|
1131
1131
|
}
|
|
1132
|
-
}),
|
|
1133
|
-
var
|
|
1134
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
1132
|
+
}), xe = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--bg: transparent;--spacer-bg: transparent;--container-width: var(--nt-container-width, 100%);--brand-height: 80px;isolation:isolate;margin:0}:host(a){height:85px;width:auto}#wrapper{position:relative;left:0;top:0;right:0;width:100%}#spacer{position:relative;top:0;left:0;width:100%;height:var(--brand-height);background-color:var(--spacer-bg)}#navbar{position:absolute;top:0;width:100%;height:auto;background-color:var(--bg);z-index:1000}#main{width:100%;display:block}";
|
|
1133
|
+
var Ee = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, jt = (s, t, e, i) => {
|
|
1134
|
+
for (var n = i > 1 ? void 0 : i ? Se(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1135
1135
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
1136
|
-
return i && n &&
|
|
1136
|
+
return i && n && Ee(t, e, n), n;
|
|
1137
1137
|
};
|
|
1138
|
-
let
|
|
1138
|
+
let Y = class extends _ {
|
|
1139
1139
|
constructor() {
|
|
1140
|
-
super(), this.navbarRef =
|
|
1140
|
+
super(), this.navbarRef = xt(), this.spacerRef = xt(), this.scrollThreshold = 0, this._lastScrollY = window.scrollY, this._scrollUpPixels = 0, this._debouncer = new Ct(100, 300), document.addEventListener(
|
|
1141
1141
|
"scroll",
|
|
1142
1142
|
async () => {
|
|
1143
1143
|
this.updateScrollState();
|
|
@@ -1153,22 +1153,22 @@ let V = class extends g {
|
|
|
1153
1153
|
s > 1 ? this.classList.add("is-scrolled") : this.classList.remove("is-scrolled"), s < this._lastScrollY ? (this._scrollUpPixels += this._lastScrollY - s, this._scrollUpPixels > 10 && s < this.scrollThreshold && this.classList.add("is-scrolling-up")) : (this._scrollUpPixels = 0, this.classList.remove("is-scrolling-up")), s > this.scrollThreshold ? this.classList.add("is-below-threshold") : this.classList.remove("is-below-threshold"), this._lastScrollY = s;
|
|
1154
1154
|
}
|
|
1155
1155
|
async connectedCallback() {
|
|
1156
|
-
this.updateScrollState(), await
|
|
1156
|
+
this.updateScrollState(), await Bt(), super.connectedCallback();
|
|
1157
1157
|
}
|
|
1158
1158
|
// Adjust the spacer height on every render
|
|
1159
1159
|
async updated(s) {
|
|
1160
|
-
await
|
|
1160
|
+
await Gt(), super.updated(s);
|
|
1161
1161
|
const t = this.navbarRef.value, e = this.spacerRef.value;
|
|
1162
1162
|
console.log("Updating spacer height", t == null ? void 0 : t.offsetHeight, e), t && e && (e.style.height = `${t.offsetHeight}px`);
|
|
1163
1163
|
}
|
|
1164
1164
|
firstUpdated(s) {
|
|
1165
|
-
|
|
1165
|
+
rt.observeEmptySlots(this);
|
|
1166
1166
|
}
|
|
1167
1167
|
render() {
|
|
1168
1168
|
return R`
|
|
1169
1169
|
<div id="wrapper" part="wrapper">
|
|
1170
|
-
<div id="spacer" part="spacer" ${
|
|
1171
|
-
<div id="navbar" part="navbar" ${
|
|
1170
|
+
<div id="spacer" part="spacer" ${Et(this.spacerRef)}></div>
|
|
1171
|
+
<div id="navbar" part="navbar" ${Et(this.navbarRef)}>
|
|
1172
1172
|
<div id="brand" part="brand">
|
|
1173
1173
|
<slot name="brand"></slot>
|
|
1174
1174
|
</div>
|
|
@@ -1180,20 +1180,20 @@ let V = class extends g {
|
|
|
1180
1180
|
`;
|
|
1181
1181
|
}
|
|
1182
1182
|
};
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
],
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
],
|
|
1190
|
-
const
|
|
1191
|
-
var
|
|
1192
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
1183
|
+
Y.styles = [C(xe)];
|
|
1184
|
+
jt([
|
|
1185
|
+
f({ type: Number, attribute: "scroll-threshold", reflect: !0 })
|
|
1186
|
+
], Y.prototype, "scrollThreshold", 2);
|
|
1187
|
+
Y = jt([
|
|
1188
|
+
z("nte-navbar")
|
|
1189
|
+
], Y);
|
|
1190
|
+
const Ce = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--container-width: var(--nt-container-width, 100%);--background: transparent;--text-color: var(--nt-text);--height: auto;--brand-height: 80px;display:block;height:100%}:host(.hide-on-scroll){transition:max-height .3s ease-in-out;max-height:100px}:host(.hide-on-scroll.is-scrolled){max-height:0;overflow:hidden}#main{height:var(--height);transition:height .2s ease-in-out;overflow:visible;width:100%;display:flex;background:var(--background)}#container{width:var(--container-width);margin:0 auto;display:flex}#container #brand{width:auto;align-items:start;display:flex;height:100%;justify-items:center}#container #brand:has(slot[empty]){display:none}#container #nav{display:flex;flex-grow:1;justify-content:end;align-items:center;gap:1rem}";
|
|
1191
|
+
var Te = Object.getOwnPropertyDescriptor, Pe = (s, t, e, i) => {
|
|
1192
|
+
for (var n = i > 1 ? void 0 : i ? Te(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1193
1193
|
(o = s[r]) && (n = o(n) || n);
|
|
1194
1194
|
return n;
|
|
1195
1195
|
};
|
|
1196
|
-
let
|
|
1196
|
+
let nt = class extends _ {
|
|
1197
1197
|
static get is() {
|
|
1198
1198
|
return "nte-navbar-line";
|
|
1199
1199
|
}
|
|
@@ -1207,7 +1207,7 @@ let st = class extends g {
|
|
|
1207
1207
|
);
|
|
1208
1208
|
}
|
|
1209
1209
|
firstUpdated(s) {
|
|
1210
|
-
|
|
1210
|
+
rt.observeEmptySlots(this);
|
|
1211
1211
|
}
|
|
1212
1212
|
render() {
|
|
1213
1213
|
return R`
|
|
@@ -1224,12 +1224,44 @@ let st = class extends g {
|
|
|
1224
1224
|
`;
|
|
1225
1225
|
}
|
|
1226
1226
|
};
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
],
|
|
1227
|
+
nt.styles = [C(Ce)];
|
|
1228
|
+
nt = Pe([
|
|
1229
|
+
z("nte-navbar-line")
|
|
1230
|
+
], nt);
|
|
1231
|
+
const Oe = ":host{--size: 40px;--color: #666;--color-hover: #000;height:var(--size);width:var(--size)}.hamburger{display:block;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0 none;background:none;transition:transform .4s}.hamburger:hover{--color: var(--color-hover)}:host([open]) .hamburger .bar:nth-of-type(1){--translate: calc(var(--size) / 4);transform:translateY(var(--translate)) rotate(45deg)}:host([open]) .hamburger .bar:nth-of-type(2){opacity:0}:host([open]) .hamburger .bar:nth-of-type(3){--translate: calc(var(--size) / -4);transform:translateY(var(--translate)) rotate(-45deg)}.bar{height:3px;width:var(--size);display:block;margin:calc(var(--size) / 5.2) auto;position:relative;background-color:var(--color);transition:.4s}";
|
|
1232
|
+
var ke = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, ht = (s, t, e, i) => {
|
|
1233
|
+
for (var n = i > 1 ? void 0 : i ? Me(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1234
|
+
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
1235
|
+
return i && n && ke(t, e, n), n;
|
|
1236
|
+
};
|
|
1237
|
+
const Ue = `
|
|
1238
|
+
<div id="wrapper">
|
|
1239
|
+
<button id="button" class="hamburger">
|
|
1240
|
+
<div class="bar"></div>
|
|
1241
|
+
<div class="bar"></div>
|
|
1242
|
+
<div class="bar"></div>
|
|
1243
|
+
</button>
|
|
1244
|
+
</div>
|
|
1245
|
+
`;
|
|
1246
|
+
let F = class extends it {
|
|
1247
|
+
constructor() {
|
|
1248
|
+
super(Ue), this.open = !1, this.text = "Menu";
|
|
1249
|
+
}
|
|
1250
|
+
get css() {
|
|
1251
|
+
return C(Oe);
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1254
|
+
ht([
|
|
1255
|
+
f({ type: Boolean, attribute: "open", reflect: !0 })
|
|
1256
|
+
], F.prototype, "open", 2);
|
|
1257
|
+
ht([
|
|
1258
|
+
f({ type: String, reflect: !0 })
|
|
1259
|
+
], F.prototype, "text", 2);
|
|
1260
|
+
F = ht([
|
|
1261
|
+
z("nte-burger")
|
|
1262
|
+
], F);
|
|
1231
1263
|
console.log("Loading nte-nav...");
|
|
1232
1264
|
export {
|
|
1233
1265
|
$ as NteNav,
|
|
1234
|
-
|
|
1266
|
+
Y as NteNavbar
|
|
1235
1267
|
};
|