joe-header 2.0.11 → 2.0.13
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/dist/joe-header.js +167 -147
- package/package.json +4 -3
- package/types/joe-header.d.ts +1 -0
package/dist/joe-header.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const t$1 = window, e$4 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$3 = Symbol(), n$
|
|
6
|
+
const t$1 = window, e$4 = t$1.ShadowRoot && (void 0 === t$1.ShadyCSS || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$3 = Symbol(), n$5 = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
class o$3 {
|
|
8
8
|
constructor(t2, e2, n2) {
|
|
9
9
|
if (this._$cssResult$ = true, n2 !== s$3)
|
|
@@ -15,7 +15,7 @@ class o$3 {
|
|
|
15
15
|
const s2 = this.t;
|
|
16
16
|
if (e$4 && void 0 === t2) {
|
|
17
17
|
const e2 = void 0 !== s2 && 1 === s2.length;
|
|
18
|
-
e2 && (t2 = n$
|
|
18
|
+
e2 && (t2 = n$5.get(s2)), void 0 === t2 && ((this.o = t2 = new CSSStyleSheet()).replaceSync(this.cssText), e2 && n$5.set(s2, t2));
|
|
19
19
|
}
|
|
20
20
|
return t2;
|
|
21
21
|
}
|
|
@@ -49,7 +49,7 @@ const r$2 = (t2) => new o$3("string" == typeof t2 ? t2 : t2 + "", void 0, s$3),
|
|
|
49
49
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
50
50
|
*/
|
|
51
51
|
var s$2;
|
|
52
|
-
const e$3 = window, r$1 = e$3.trustedTypes, h$1 = r$1 ? r$1.emptyScript : "", o$2 = e$3.reactiveElementPolyfillSupport, n$
|
|
52
|
+
const e$3 = window, r$1 = e$3.trustedTypes, h$1 = r$1 ? r$1.emptyScript : "", o$2 = e$3.reactiveElementPolyfillSupport, n$4 = { toAttribute(t2, i2) {
|
|
53
53
|
switch (i2) {
|
|
54
54
|
case Boolean:
|
|
55
55
|
t2 = t2 ? h$1 : null;
|
|
@@ -77,14 +77,14 @@ const e$3 = window, r$1 = e$3.trustedTypes, h$1 = r$1 ? r$1.emptyScript : "", o$
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
return s2;
|
|
80
|
-
} }, a$1 = (t2, i2) => i2 !== t2 && (i2 == i2 || t2 == t2), l$2 = { attribute: true, type: String, converter: n$
|
|
81
|
-
class
|
|
80
|
+
} }, a$1 = (t2, i2) => i2 !== t2 && (i2 == i2 || t2 == t2), l$2 = { attribute: true, type: String, converter: n$4, reflect: false, hasChanged: a$1 }, d$1 = "finalized";
|
|
81
|
+
class u$1 extends HTMLElement {
|
|
82
82
|
constructor() {
|
|
83
|
-
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$El = null, this.
|
|
83
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = false, this.hasUpdated = false, this._$El = null, this._$Eu();
|
|
84
84
|
}
|
|
85
85
|
static addInitializer(t2) {
|
|
86
86
|
var i2;
|
|
87
|
-
null !== (i2 = this.h) && void 0 !== i2
|
|
87
|
+
this.finalize(), (null !== (i2 = this.h) && void 0 !== i2 ? i2 : this.h = []).push(t2);
|
|
88
88
|
}
|
|
89
89
|
static get observedAttributes() {
|
|
90
90
|
this.finalize();
|
|
@@ -112,11 +112,11 @@ class d$1 extends HTMLElement {
|
|
|
112
112
|
return this.elementProperties.get(t2) || l$2;
|
|
113
113
|
}
|
|
114
114
|
static finalize() {
|
|
115
|
-
if (this.hasOwnProperty(
|
|
115
|
+
if (this.hasOwnProperty(d$1))
|
|
116
116
|
return false;
|
|
117
|
-
this
|
|
117
|
+
this[d$1] = true;
|
|
118
118
|
const t2 = Object.getPrototypeOf(this);
|
|
119
|
-
if (t2.finalize(), this.elementProperties = new Map(t2.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
119
|
+
if (t2.finalize(), void 0 !== t2.h && (this.h = [...t2.h]), this.elementProperties = new Map(t2.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
120
120
|
const t3 = this.properties, i2 = [...Object.getOwnPropertyNames(t3), ...Object.getOwnPropertySymbols(t3)];
|
|
121
121
|
for (const s2 of i2)
|
|
122
122
|
this.createProperty(s2, t3[s2]);
|
|
@@ -137,7 +137,7 @@ class d$1 extends HTMLElement {
|
|
|
137
137
|
const s2 = i2.attribute;
|
|
138
138
|
return false === s2 ? void 0 : "string" == typeof s2 ? s2 : "string" == typeof t2 ? t2.toLowerCase() : void 0;
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
_$Eu() {
|
|
141
141
|
var t2;
|
|
142
142
|
this._$E_ = new Promise((t3) => this.enableUpdating = t3), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), null === (t2 = this.constructor.h) || void 0 === t2 || t2.forEach((t3) => t3(this));
|
|
143
143
|
}
|
|
@@ -182,7 +182,7 @@ class d$1 extends HTMLElement {
|
|
|
182
182
|
var e2;
|
|
183
183
|
const r2 = this.constructor._$Ep(t2, s2);
|
|
184
184
|
if (void 0 !== r2 && true === s2.reflect) {
|
|
185
|
-
const h2 = (void 0 !== (null === (e2 = s2.converter) || void 0 === e2 ? void 0 : e2.toAttribute) ? s2.converter : n$
|
|
185
|
+
const h2 = (void 0 !== (null === (e2 = s2.converter) || void 0 === e2 ? void 0 : e2.toAttribute) ? s2.converter : n$4).toAttribute(i2, s2.type);
|
|
186
186
|
this._$El = t2, null == h2 ? this.removeAttribute(r2) : this.setAttribute(r2, h2), this._$El = null;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
@@ -190,7 +190,7 @@ class d$1 extends HTMLElement {
|
|
|
190
190
|
var s2;
|
|
191
191
|
const e2 = this.constructor, r2 = e2._$Ev.get(t2);
|
|
192
192
|
if (void 0 !== r2 && this._$El !== r2) {
|
|
193
|
-
const t3 = e2.getPropertyOptions(r2), h2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== (null === (s2 = t3.converter) || void 0 === s2 ? void 0 : s2.fromAttribute) ? t3.converter : n$
|
|
193
|
+
const t3 = e2.getPropertyOptions(r2), h2 = "function" == typeof t3.converter ? { fromAttribute: t3.converter } : void 0 !== (null === (s2 = t3.converter) || void 0 === s2 ? void 0 : s2.fromAttribute) ? t3.converter : n$4;
|
|
194
194
|
this._$El = r2, this[r2] = h2.fromAttribute(i2, t3.type), this._$El = null;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
@@ -257,104 +257,95 @@ class d$1 extends HTMLElement {
|
|
|
257
257
|
firstUpdated(t2) {
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
d$1
|
|
260
|
+
u$1[d$1] = true, u$1.elementProperties = /* @__PURE__ */ new Map(), u$1.elementStyles = [], u$1.shadowRootOptions = { mode: "open" }, null == o$2 || o$2({ ReactiveElement: u$1 }), (null !== (s$2 = e$3.reactiveElementVersions) && void 0 !== s$2 ? s$2 : e$3.reactiveElementVersions = []).push("1.6.3");
|
|
261
261
|
/**
|
|
262
262
|
* @license
|
|
263
263
|
* Copyright 2017 Google LLC
|
|
264
264
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
265
265
|
*/
|
|
266
266
|
var t;
|
|
267
|
-
const i$1 = window, s$1 = i$1.trustedTypes, e$2 = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, o$1 = `lit$${(Math.random() + "").slice(9)}$`,
|
|
268
|
-
\f\r](?:(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
n2._$litPart$ = l2 = new S(i2.insertBefore(r(), t3), t3, void 0, null != s2 ? s2 : {});
|
|
278
|
-
}
|
|
279
|
-
return l2._$AI(t2), l2;
|
|
280
|
-
}, E = h.createTreeWalker(h, 129, null, false), C = (t2, i2) => {
|
|
281
|
-
const s2 = t2.length - 1, n2 = [];
|
|
282
|
-
let h2, r2 = 2 === i2 ? "<svg>" : "", d2 = v;
|
|
267
|
+
const i$1 = window, s$1 = i$1.trustedTypes, e$2 = s$1 ? s$1.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, o$1 = "$lit$", n$3 = `lit$${(Math.random() + "").slice(9)}$`, l$1 = "?" + n$3, h = `<${l$1}>`, r = document, u = () => r.createComment(""), d = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, c = Array.isArray, v = (t2) => c(t2) || "function" == typeof (null == t2 ? void 0 : t2[Symbol.iterator]), a = "[ \n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^
|
|
268
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y = /^(?:script|style|textarea|title)$/i, w = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), x = w(1), T = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), E = /* @__PURE__ */ new WeakMap(), C = r.createTreeWalker(r, 129, null, false);
|
|
269
|
+
function P(t2, i2) {
|
|
270
|
+
if (!Array.isArray(t2) || !t2.hasOwnProperty("raw"))
|
|
271
|
+
throw Error("invalid template strings array");
|
|
272
|
+
return void 0 !== e$2 ? e$2.createHTML(i2) : i2;
|
|
273
|
+
}
|
|
274
|
+
const V = (t2, i2) => {
|
|
275
|
+
const s2 = t2.length - 1, e2 = [];
|
|
276
|
+
let l2, r2 = 2 === i2 ? "<svg>" : "", u2 = f;
|
|
283
277
|
for (let i3 = 0; i3 < s2; i3++) {
|
|
284
278
|
const s3 = t2[i3];
|
|
285
|
-
let
|
|
286
|
-
for (;
|
|
287
|
-
|
|
288
|
-
const
|
|
289
|
-
r2 +=
|
|
279
|
+
let d2, c2, v2 = -1, a2 = 0;
|
|
280
|
+
for (; a2 < s3.length && (u2.lastIndex = a2, c2 = u2.exec(s3), null !== c2); )
|
|
281
|
+
a2 = u2.lastIndex, u2 === f ? "!--" === c2[1] ? u2 = _ : void 0 !== c2[1] ? u2 = m : void 0 !== c2[2] ? (y.test(c2[2]) && (l2 = RegExp("</" + c2[2], "g")), u2 = p) : void 0 !== c2[3] && (u2 = p) : u2 === p ? ">" === c2[0] ? (u2 = null != l2 ? l2 : f, v2 = -1) : void 0 === c2[1] ? v2 = -2 : (v2 = u2.lastIndex - c2[2].length, d2 = c2[1], u2 = void 0 === c2[3] ? p : '"' === c2[3] ? $ : g) : u2 === $ || u2 === g ? u2 = p : u2 === _ || u2 === m ? u2 = f : (u2 = p, l2 = void 0);
|
|
282
|
+
const w2 = u2 === p && t2[i3 + 1].startsWith("/>") ? " " : "";
|
|
283
|
+
r2 += u2 === f ? s3 + h : v2 >= 0 ? (e2.push(d2), s3.slice(0, v2) + o$1 + s3.slice(v2) + n$3 + w2) : s3 + n$3 + (-2 === v2 ? (e2.push(void 0), i3) : w2);
|
|
290
284
|
}
|
|
291
|
-
|
|
292
|
-
if (!Array.isArray(t2) || !t2.hasOwnProperty("raw"))
|
|
293
|
-
throw Error("invalid template strings array");
|
|
294
|
-
return [void 0 !== e$2 ? e$2.createHTML(u2) : u2, n2];
|
|
285
|
+
return [P(t2, r2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : "")), e2];
|
|
295
286
|
};
|
|
296
|
-
class
|
|
287
|
+
class N {
|
|
297
288
|
constructor({ strings: t2, _$litType$: i2 }, e2) {
|
|
298
|
-
let
|
|
289
|
+
let h2;
|
|
299
290
|
this.parts = [];
|
|
300
|
-
let
|
|
301
|
-
const
|
|
302
|
-
if (this.el =
|
|
291
|
+
let r2 = 0, d2 = 0;
|
|
292
|
+
const c2 = t2.length - 1, v2 = this.parts, [a2, f2] = V(t2, i2);
|
|
293
|
+
if (this.el = N.createElement(a2, e2), C.currentNode = this.el.content, 2 === i2) {
|
|
303
294
|
const t3 = this.el.content, i3 = t3.firstChild;
|
|
304
295
|
i3.remove(), t3.append(...i3.childNodes);
|
|
305
296
|
}
|
|
306
|
-
for (; null !== (
|
|
307
|
-
if (1 ===
|
|
308
|
-
if (
|
|
297
|
+
for (; null !== (h2 = C.nextNode()) && v2.length < c2; ) {
|
|
298
|
+
if (1 === h2.nodeType) {
|
|
299
|
+
if (h2.hasAttributes()) {
|
|
309
300
|
const t3 = [];
|
|
310
|
-
for (const i3 of
|
|
311
|
-
if (i3.endsWith(
|
|
312
|
-
const s2 =
|
|
301
|
+
for (const i3 of h2.getAttributeNames())
|
|
302
|
+
if (i3.endsWith(o$1) || i3.startsWith(n$3)) {
|
|
303
|
+
const s2 = f2[d2++];
|
|
313
304
|
if (t3.push(i3), void 0 !== s2) {
|
|
314
|
-
const t4 =
|
|
315
|
-
|
|
305
|
+
const t4 = h2.getAttribute(s2.toLowerCase() + o$1).split(n$3), i4 = /([.?@])?(.*)/.exec(s2);
|
|
306
|
+
v2.push({ type: 1, index: r2, name: i4[2], strings: t4, ctor: "." === i4[1] ? H : "?" === i4[1] ? L : "@" === i4[1] ? z : k });
|
|
316
307
|
} else
|
|
317
|
-
|
|
308
|
+
v2.push({ type: 6, index: r2 });
|
|
318
309
|
}
|
|
319
310
|
for (const i3 of t3)
|
|
320
|
-
|
|
311
|
+
h2.removeAttribute(i3);
|
|
321
312
|
}
|
|
322
|
-
if (
|
|
323
|
-
const t3 =
|
|
313
|
+
if (y.test(h2.tagName)) {
|
|
314
|
+
const t3 = h2.textContent.split(n$3), i3 = t3.length - 1;
|
|
324
315
|
if (i3 > 0) {
|
|
325
|
-
|
|
316
|
+
h2.textContent = s$1 ? s$1.emptyScript : "";
|
|
326
317
|
for (let s2 = 0; s2 < i3; s2++)
|
|
327
|
-
|
|
328
|
-
|
|
318
|
+
h2.append(t3[s2], u()), C.nextNode(), v2.push({ type: 2, index: ++r2 });
|
|
319
|
+
h2.append(t3[i3], u());
|
|
329
320
|
}
|
|
330
321
|
}
|
|
331
|
-
} else if (8 ===
|
|
332
|
-
if (
|
|
333
|
-
|
|
322
|
+
} else if (8 === h2.nodeType)
|
|
323
|
+
if (h2.data === l$1)
|
|
324
|
+
v2.push({ type: 2, index: r2 });
|
|
334
325
|
else {
|
|
335
326
|
let t3 = -1;
|
|
336
|
-
for (; -1 !== (t3 =
|
|
337
|
-
|
|
327
|
+
for (; -1 !== (t3 = h2.data.indexOf(n$3, t3 + 1)); )
|
|
328
|
+
v2.push({ type: 7, index: r2 }), t3 += n$3.length - 1;
|
|
338
329
|
}
|
|
339
|
-
|
|
330
|
+
r2++;
|
|
340
331
|
}
|
|
341
332
|
}
|
|
342
333
|
static createElement(t2, i2) {
|
|
343
|
-
const s2 =
|
|
334
|
+
const s2 = r.createElement("template");
|
|
344
335
|
return s2.innerHTML = t2, s2;
|
|
345
336
|
}
|
|
346
337
|
}
|
|
347
|
-
function
|
|
338
|
+
function S(t2, i2, s2 = t2, e2) {
|
|
348
339
|
var o2, n2, l2, h2;
|
|
349
|
-
if (i2 ===
|
|
340
|
+
if (i2 === T)
|
|
350
341
|
return i2;
|
|
351
|
-
let r2 = void 0 !== e2 ? null === (o2 = s2._$
|
|
342
|
+
let r2 = void 0 !== e2 ? null === (o2 = s2._$Co) || void 0 === o2 ? void 0 : o2[e2] : s2._$Cl;
|
|
352
343
|
const u2 = d(i2) ? void 0 : i2._$litDirective$;
|
|
353
|
-
return (null == r2 ? void 0 : r2.constructor) !== u2 && (null === (n2 = null == r2 ? void 0 : r2._$AO) || void 0 === n2 || n2.call(r2, false), void 0 === u2 ? r2 = void 0 : (r2 = new u2(t2), r2._$AT(t2, s2, e2)), void 0 !== e2 ? (null !== (l2 = (h2 = s2)._$
|
|
344
|
+
return (null == r2 ? void 0 : r2.constructor) !== u2 && (null === (n2 = null == r2 ? void 0 : r2._$AO) || void 0 === n2 || n2.call(r2, false), void 0 === u2 ? r2 = void 0 : (r2 = new u2(t2), r2._$AT(t2, s2, e2)), void 0 !== e2 ? (null !== (l2 = (h2 = s2)._$Co) && void 0 !== l2 ? l2 : h2._$Co = [])[e2] = r2 : s2._$Cl = r2), void 0 !== r2 && (i2 = S(t2, r2._$AS(t2, i2.values), r2, e2)), i2;
|
|
354
345
|
}
|
|
355
|
-
class
|
|
346
|
+
class M {
|
|
356
347
|
constructor(t2, i2) {
|
|
357
|
-
this.
|
|
348
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
|
|
358
349
|
}
|
|
359
350
|
get parentNode() {
|
|
360
351
|
return this._$AM.parentNode;
|
|
@@ -362,39 +353,39 @@ class N {
|
|
|
362
353
|
get _$AU() {
|
|
363
354
|
return this._$AM._$AU;
|
|
364
355
|
}
|
|
365
|
-
|
|
356
|
+
u(t2) {
|
|
366
357
|
var i2;
|
|
367
|
-
const { el: { content: s2 }, parts: e2 } = this._$AD, o2 = (null !== (i2 = null == t2 ? void 0 : t2.creationScope) && void 0 !== i2 ? i2 :
|
|
368
|
-
|
|
369
|
-
let n2 =
|
|
370
|
-
for (; void 0 !==
|
|
371
|
-
if (l2 ===
|
|
358
|
+
const { el: { content: s2 }, parts: e2 } = this._$AD, o2 = (null !== (i2 = null == t2 ? void 0 : t2.creationScope) && void 0 !== i2 ? i2 : r).importNode(s2, true);
|
|
359
|
+
C.currentNode = o2;
|
|
360
|
+
let n2 = C.nextNode(), l2 = 0, h2 = 0, u2 = e2[0];
|
|
361
|
+
for (; void 0 !== u2; ) {
|
|
362
|
+
if (l2 === u2.index) {
|
|
372
363
|
let i3;
|
|
373
|
-
2 ===
|
|
364
|
+
2 === u2.type ? i3 = new R(n2, n2.nextSibling, this, t2) : 1 === u2.type ? i3 = new u2.ctor(n2, u2.name, u2.strings, this, t2) : 6 === u2.type && (i3 = new Z(n2, this, t2)), this._$AV.push(i3), u2 = e2[++h2];
|
|
374
365
|
}
|
|
375
|
-
l2 !== (null ==
|
|
366
|
+
l2 !== (null == u2 ? void 0 : u2.index) && (n2 = C.nextNode(), l2++);
|
|
376
367
|
}
|
|
377
|
-
return o2;
|
|
368
|
+
return C.currentNode = r, o2;
|
|
378
369
|
}
|
|
379
|
-
|
|
370
|
+
v(t2) {
|
|
380
371
|
let i2 = 0;
|
|
381
|
-
for (const s2 of this.
|
|
372
|
+
for (const s2 of this._$AV)
|
|
382
373
|
void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
|
|
383
374
|
}
|
|
384
375
|
}
|
|
385
|
-
class
|
|
376
|
+
class R {
|
|
386
377
|
constructor(t2, i2, s2, e2) {
|
|
387
378
|
var o2;
|
|
388
|
-
this.type = 2, this._$AH =
|
|
379
|
+
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cp = null === (o2 = null == e2 ? void 0 : e2.isConnected) || void 0 === o2 || o2;
|
|
389
380
|
}
|
|
390
381
|
get _$AU() {
|
|
391
382
|
var t2, i2;
|
|
392
|
-
return null !== (i2 = null === (t2 = this._$AM) || void 0 === t2 ? void 0 : t2._$AU) && void 0 !== i2 ? i2 : this._$
|
|
383
|
+
return null !== (i2 = null === (t2 = this._$AM) || void 0 === t2 ? void 0 : t2._$AU) && void 0 !== i2 ? i2 : this._$Cp;
|
|
393
384
|
}
|
|
394
385
|
get parentNode() {
|
|
395
386
|
let t2 = this._$AA.parentNode;
|
|
396
387
|
const i2 = this._$AM;
|
|
397
|
-
return void 0 !== i2 && 11 === t2.nodeType && (t2 = i2.parentNode), t2;
|
|
388
|
+
return void 0 !== i2 && 11 === (null == t2 ? void 0 : t2.nodeType) && (t2 = i2.parentNode), t2;
|
|
398
389
|
}
|
|
399
390
|
get startNode() {
|
|
400
391
|
return this._$AA;
|
|
@@ -403,37 +394,37 @@ class S {
|
|
|
403
394
|
return this._$AB;
|
|
404
395
|
}
|
|
405
396
|
_$AI(t2, i2 = this) {
|
|
406
|
-
t2 =
|
|
407
|
-
}
|
|
408
|
-
S(t2, i2 = this._$AB) {
|
|
409
|
-
return this._$AA.parentNode.insertBefore(t2, i2);
|
|
397
|
+
t2 = S(this, t2, i2), d(t2) ? t2 === A || null == t2 || "" === t2 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t2 !== this._$AH && t2 !== T && this._(t2) : void 0 !== t2._$litType$ ? this.g(t2) : void 0 !== t2.nodeType ? this.$(t2) : v(t2) ? this.T(t2) : this._(t2);
|
|
410
398
|
}
|
|
411
399
|
k(t2) {
|
|
412
|
-
this._$
|
|
400
|
+
return this._$AA.parentNode.insertBefore(t2, this._$AB);
|
|
413
401
|
}
|
|
414
402
|
$(t2) {
|
|
415
|
-
this._$AH !==
|
|
403
|
+
this._$AH !== t2 && (this._$AR(), this._$AH = this.k(t2));
|
|
416
404
|
}
|
|
417
|
-
|
|
405
|
+
_(t2) {
|
|
406
|
+
this._$AH !== A && d(this._$AH) ? this._$AA.nextSibling.data = t2 : this.$(r.createTextNode(t2)), this._$AH = t2;
|
|
407
|
+
}
|
|
408
|
+
g(t2) {
|
|
418
409
|
var i2;
|
|
419
|
-
const { values: s2, _$litType$: e2 } = t2, o2 = "number" == typeof e2 ? this._$AC(t2) : (void 0 === e2.el && (e2.el =
|
|
410
|
+
const { values: s2, _$litType$: e2 } = t2, o2 = "number" == typeof e2 ? this._$AC(t2) : (void 0 === e2.el && (e2.el = N.createElement(P(e2.h, e2.h[0]), this.options)), e2);
|
|
420
411
|
if ((null === (i2 = this._$AH) || void 0 === i2 ? void 0 : i2._$AD) === o2)
|
|
421
|
-
this._$AH.
|
|
412
|
+
this._$AH.v(s2);
|
|
422
413
|
else {
|
|
423
|
-
const t3 = new
|
|
424
|
-
t3.
|
|
414
|
+
const t3 = new M(o2, this), i3 = t3.u(this.options);
|
|
415
|
+
t3.v(s2), this.$(i3), this._$AH = t3;
|
|
425
416
|
}
|
|
426
417
|
}
|
|
427
418
|
_$AC(t2) {
|
|
428
|
-
let i2 =
|
|
429
|
-
return void 0 === i2 &&
|
|
419
|
+
let i2 = E.get(t2.strings);
|
|
420
|
+
return void 0 === i2 && E.set(t2.strings, i2 = new N(t2)), i2;
|
|
430
421
|
}
|
|
431
|
-
|
|
432
|
-
|
|
422
|
+
T(t2) {
|
|
423
|
+
c(this._$AH) || (this._$AH = [], this._$AR());
|
|
433
424
|
const i2 = this._$AH;
|
|
434
425
|
let s2, e2 = 0;
|
|
435
426
|
for (const o2 of t2)
|
|
436
|
-
e2 === i2.length ? i2.push(s2 = new
|
|
427
|
+
e2 === i2.length ? i2.push(s2 = new R(this.k(u()), this.k(u()), this, this.options)) : s2 = i2[e2], s2._$AI(o2), e2++;
|
|
437
428
|
e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
|
|
438
429
|
}
|
|
439
430
|
_$AR(t2 = this._$AA.nextSibling, i2) {
|
|
@@ -445,12 +436,12 @@ class S {
|
|
|
445
436
|
}
|
|
446
437
|
setConnected(t2) {
|
|
447
438
|
var i2;
|
|
448
|
-
void 0 === this._$AM && (this._$
|
|
439
|
+
void 0 === this._$AM && (this._$Cp = t2, null === (i2 = this._$AP) || void 0 === i2 || i2.call(this, t2));
|
|
449
440
|
}
|
|
450
441
|
}
|
|
451
|
-
class
|
|
442
|
+
class k {
|
|
452
443
|
constructor(t2, i2, s2, e2, o2) {
|
|
453
|
-
this.type = 1, this._$AH =
|
|
444
|
+
this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = o2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = A;
|
|
454
445
|
}
|
|
455
446
|
get tagName() {
|
|
456
447
|
return this.element.tagName;
|
|
@@ -462,45 +453,45 @@ class M {
|
|
|
462
453
|
const o2 = this.strings;
|
|
463
454
|
let n2 = false;
|
|
464
455
|
if (void 0 === o2)
|
|
465
|
-
t2 =
|
|
456
|
+
t2 = S(this, t2, i2, 0), n2 = !d(t2) || t2 !== this._$AH && t2 !== T, n2 && (this._$AH = t2);
|
|
466
457
|
else {
|
|
467
458
|
const e3 = t2;
|
|
468
459
|
let l2, h2;
|
|
469
460
|
for (t2 = o2[0], l2 = 0; l2 < o2.length - 1; l2++)
|
|
470
|
-
h2 =
|
|
461
|
+
h2 = S(this, e3[s2 + l2], i2, l2), h2 === T && (h2 = this._$AH[l2]), n2 || (n2 = !d(h2) || h2 !== this._$AH[l2]), h2 === A ? t2 = A : t2 !== A && (t2 += (null != h2 ? h2 : "") + o2[l2 + 1]), this._$AH[l2] = h2;
|
|
471
462
|
}
|
|
472
|
-
n2 && !e2 && this.
|
|
463
|
+
n2 && !e2 && this.j(t2);
|
|
473
464
|
}
|
|
474
|
-
|
|
475
|
-
t2 ===
|
|
465
|
+
j(t2) {
|
|
466
|
+
t2 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t2 ? t2 : "");
|
|
476
467
|
}
|
|
477
468
|
}
|
|
478
|
-
class
|
|
469
|
+
class H extends k {
|
|
479
470
|
constructor() {
|
|
480
471
|
super(...arguments), this.type = 3;
|
|
481
472
|
}
|
|
482
|
-
|
|
483
|
-
this.element[this.name] = t2 ===
|
|
473
|
+
j(t2) {
|
|
474
|
+
this.element[this.name] = t2 === A ? void 0 : t2;
|
|
484
475
|
}
|
|
485
476
|
}
|
|
486
|
-
const
|
|
487
|
-
class
|
|
477
|
+
const I = s$1 ? s$1.emptyScript : "";
|
|
478
|
+
class L extends k {
|
|
488
479
|
constructor() {
|
|
489
480
|
super(...arguments), this.type = 4;
|
|
490
481
|
}
|
|
491
|
-
|
|
492
|
-
t2 && t2 !==
|
|
482
|
+
j(t2) {
|
|
483
|
+
t2 && t2 !== A ? this.element.setAttribute(this.name, I) : this.element.removeAttribute(this.name);
|
|
493
484
|
}
|
|
494
485
|
}
|
|
495
|
-
class
|
|
486
|
+
class z extends k {
|
|
496
487
|
constructor(t2, i2, s2, e2, o2) {
|
|
497
488
|
super(t2, i2, s2, e2, o2), this.type = 5;
|
|
498
489
|
}
|
|
499
490
|
_$AI(t2, i2 = this) {
|
|
500
491
|
var s2;
|
|
501
|
-
if ((t2 = null !== (s2 =
|
|
492
|
+
if ((t2 = null !== (s2 = S(this, t2, i2, 0)) && void 0 !== s2 ? s2 : A) === T)
|
|
502
493
|
return;
|
|
503
|
-
const e2 = this._$AH, o2 = t2 ===
|
|
494
|
+
const e2 = this._$AH, o2 = t2 === A && e2 !== A || t2.capture !== e2.capture || t2.once !== e2.once || t2.passive !== e2.passive, n2 = t2 !== A && (e2 === A || o2);
|
|
504
495
|
o2 && this.element.removeEventListener(this.name, this, e2), n2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
|
|
505
496
|
}
|
|
506
497
|
handleEvent(t2) {
|
|
@@ -508,7 +499,7 @@ class I extends M {
|
|
|
508
499
|
"function" == typeof this._$AH ? this._$AH.call(null !== (s2 = null === (i2 = this.options) || void 0 === i2 ? void 0 : i2.host) && void 0 !== s2 ? s2 : this.element, t2) : this._$AH.handleEvent(t2);
|
|
509
500
|
}
|
|
510
501
|
}
|
|
511
|
-
class
|
|
502
|
+
class Z {
|
|
512
503
|
constructor(t2, i2, s2) {
|
|
513
504
|
this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
|
|
514
505
|
}
|
|
@@ -516,18 +507,28 @@ class L {
|
|
|
516
507
|
return this._$AM._$AU;
|
|
517
508
|
}
|
|
518
509
|
_$AI(t2) {
|
|
519
|
-
|
|
510
|
+
S(this, t2);
|
|
520
511
|
}
|
|
521
512
|
}
|
|
522
|
-
const
|
|
523
|
-
null ==
|
|
513
|
+
const B = i$1.litHtmlPolyfillSupport;
|
|
514
|
+
null == B || B(N, R), (null !== (t = i$1.litHtmlVersions) && void 0 !== t ? t : i$1.litHtmlVersions = []).push("2.8.0");
|
|
515
|
+
const D = (t2, i2, s2) => {
|
|
516
|
+
var e2, o2;
|
|
517
|
+
const n2 = null !== (e2 = null == s2 ? void 0 : s2.renderBefore) && void 0 !== e2 ? e2 : i2;
|
|
518
|
+
let l2 = n2._$litPart$;
|
|
519
|
+
if (void 0 === l2) {
|
|
520
|
+
const t3 = null !== (o2 = null == s2 ? void 0 : s2.renderBefore) && void 0 !== o2 ? o2 : null;
|
|
521
|
+
n2._$litPart$ = l2 = new R(i2.insertBefore(u(), t3), t3, void 0, null != s2 ? s2 : {});
|
|
522
|
+
}
|
|
523
|
+
return l2._$AI(t2), l2;
|
|
524
|
+
};
|
|
524
525
|
/**
|
|
525
526
|
* @license
|
|
526
527
|
* Copyright 2017 Google LLC
|
|
527
528
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
528
529
|
*/
|
|
529
530
|
var l, o;
|
|
530
|
-
class s extends
|
|
531
|
+
class s extends u$1 {
|
|
531
532
|
constructor() {
|
|
532
533
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
533
534
|
}
|
|
@@ -538,7 +539,7 @@ class s extends d$1 {
|
|
|
538
539
|
}
|
|
539
540
|
update(t2) {
|
|
540
541
|
const i2 = this.render();
|
|
541
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Do =
|
|
542
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t2), this._$Do = D(i2, this.renderRoot, this.renderOptions);
|
|
542
543
|
}
|
|
543
544
|
connectedCallback() {
|
|
544
545
|
var t2;
|
|
@@ -549,13 +550,13 @@ class s extends d$1 {
|
|
|
549
550
|
super.disconnectedCallback(), null === (t2 = this._$Do) || void 0 === t2 || t2.setConnected(false);
|
|
550
551
|
}
|
|
551
552
|
render() {
|
|
552
|
-
return
|
|
553
|
+
return T;
|
|
553
554
|
}
|
|
554
555
|
}
|
|
555
556
|
s.finalized = true, s._$litElement$ = true, null === (l = globalThis.litElementHydrateSupport) || void 0 === l || l.call(globalThis, { LitElement: s });
|
|
556
|
-
const n$
|
|
557
|
-
null == n$
|
|
558
|
-
(null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.
|
|
557
|
+
const n$2 = globalThis.litElementPolyfillSupport;
|
|
558
|
+
null == n$2 || n$2({ LitElement: s });
|
|
559
|
+
(null !== (o = globalThis.litElementVersions) && void 0 !== o ? o : globalThis.litElementVersions = []).push("3.3.3");
|
|
559
560
|
/**
|
|
560
561
|
* @license
|
|
561
562
|
* Copyright 2017 Google LLC
|
|
@@ -578,11 +579,11 @@ const i = (i2, e2) => "method" === e2.kind && e2.descriptor && !("value" in e2.d
|
|
|
578
579
|
"function" == typeof e2.initializer && (this[e2.key] = e2.initializer.call(this));
|
|
579
580
|
}, finisher(n2) {
|
|
580
581
|
n2.createProperty(e2.key, i2);
|
|
581
|
-
} }
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
582
|
+
} }, e = (i2, e2, n2) => {
|
|
583
|
+
e2.constructor.createProperty(n2, i2);
|
|
584
|
+
};
|
|
585
|
+
function n$1(n2) {
|
|
586
|
+
return (t2, o2) => void 0 !== o2 ? e(n2, t2, o2) : i(n2, t2);
|
|
586
587
|
}
|
|
587
588
|
/**
|
|
588
589
|
* @license
|
|
@@ -938,26 +939,36 @@ let JoeHeader = class extends s {
|
|
|
938
939
|
this.links = [
|
|
939
940
|
{
|
|
940
941
|
label: "Home",
|
|
942
|
+
gtm: "nav_menu_home",
|
|
941
943
|
href: "https://www.joejuice.com/"
|
|
942
944
|
},
|
|
943
945
|
{
|
|
944
946
|
label: "Menu",
|
|
947
|
+
gtm: "nav_menu_menu",
|
|
945
948
|
href: "https://gtly.ink/Csp5K56vz"
|
|
946
949
|
},
|
|
947
950
|
{
|
|
948
951
|
label: "Stores",
|
|
952
|
+
gtm: "nav_menu_stores",
|
|
949
953
|
href: "https://gtly.ink/Xh7TCljV2"
|
|
950
954
|
},
|
|
955
|
+
{
|
|
956
|
+
label: "Catering",
|
|
957
|
+
href: "https://catering.joejuice.com/",
|
|
958
|
+
gtm: "nav_menu_catering"
|
|
959
|
+
},
|
|
951
960
|
{
|
|
952
961
|
label: "App",
|
|
953
962
|
href: "https://www.joejuice.com/app"
|
|
954
963
|
},
|
|
955
964
|
{
|
|
956
965
|
label: "Careers",
|
|
966
|
+
gtm: "nav_menu_careers",
|
|
957
967
|
href: "https://www.joejuice.com/apply"
|
|
958
968
|
},
|
|
959
969
|
{
|
|
960
970
|
label: "Event Bookings",
|
|
971
|
+
gtm: "nav_menu_events",
|
|
961
972
|
href: "https://www.joejuice.com/events",
|
|
962
973
|
collapsed: [
|
|
963
974
|
{
|
|
@@ -977,6 +988,7 @@ let JoeHeader = class extends s {
|
|
|
977
988
|
},
|
|
978
989
|
{
|
|
979
990
|
label: "Request Booking",
|
|
991
|
+
gtm: "request_event_booking",
|
|
980
992
|
href: "https://joejuice.typeform.com/events",
|
|
981
993
|
hideMobile: true,
|
|
982
994
|
target: "_blank"
|
|
@@ -986,6 +998,7 @@ let JoeHeader = class extends s {
|
|
|
986
998
|
{
|
|
987
999
|
label: "& MORE",
|
|
988
1000
|
hideMobile: true,
|
|
1001
|
+
gtm: "nav_menu_more",
|
|
989
1002
|
collapsed: [
|
|
990
1003
|
{
|
|
991
1004
|
label: "Culture",
|
|
@@ -1004,7 +1017,7 @@ let JoeHeader = class extends s {
|
|
|
1004
1017
|
];
|
|
1005
1018
|
}
|
|
1006
1019
|
render() {
|
|
1007
|
-
return
|
|
1020
|
+
return x`
|
|
1008
1021
|
<div class="container">
|
|
1009
1022
|
<div class="navigation">
|
|
1010
1023
|
<button
|
|
@@ -1024,10 +1037,11 @@ let JoeHeader = class extends s {
|
|
|
1024
1037
|
>
|
|
1025
1038
|
<ul>
|
|
1026
1039
|
${this.links.map(
|
|
1027
|
-
(link) => link.collapsed ?
|
|
1028
|
-
${link.href ?
|
|
1040
|
+
(link) => link.collapsed ? x`<li class="collapsed">
|
|
1041
|
+
${link.href ? x`<a
|
|
1029
1042
|
href=${link.href}
|
|
1030
1043
|
target=${link.target}
|
|
1044
|
+
data-gtm-id=${link.gtm}
|
|
1031
1045
|
itemprop="url"
|
|
1032
1046
|
>
|
|
1033
1047
|
<span
|
|
@@ -1037,20 +1051,21 @@ let JoeHeader = class extends s {
|
|
|
1037
1051
|
${link.label}
|
|
1038
1052
|
<div class="arrow"></div
|
|
1039
1053
|
></span>
|
|
1040
|
-
</a>` :
|
|
1054
|
+
</a>` : x`<span
|
|
1041
1055
|
class=${link.hideMobile ? "collapsed__title hide-on-mobile" : "collapsed__title"}
|
|
1042
1056
|
>${link.label}</span
|
|
1043
1057
|
>`}
|
|
1044
1058
|
|
|
1045
1059
|
<ul class="collapsed__list">
|
|
1046
1060
|
${link.collapsed.map(
|
|
1047
|
-
(link2) =>
|
|
1061
|
+
(link2) => x`<li
|
|
1048
1062
|
itemprop="name"
|
|
1049
1063
|
class=${link2.hideMobile ? "hide-on-mobile" : ""}
|
|
1050
1064
|
>
|
|
1051
1065
|
<a
|
|
1052
1066
|
href=${link2.href}
|
|
1053
1067
|
target=${link2.target}
|
|
1068
|
+
data-gtm-id=${link2.gtm}
|
|
1054
1069
|
itemprop="url"
|
|
1055
1070
|
>
|
|
1056
1071
|
<span
|
|
@@ -1061,11 +1076,16 @@ let JoeHeader = class extends s {
|
|
|
1061
1076
|
</li>`
|
|
1062
1077
|
)}
|
|
1063
1078
|
</ul>
|
|
1064
|
-
</li>` :
|
|
1079
|
+
</li>` : x`<li
|
|
1065
1080
|
itemprop="name"
|
|
1066
1081
|
class=${link.hideMobile ? "hide-on-mobile" : ""}
|
|
1067
1082
|
>
|
|
1068
|
-
<a
|
|
1083
|
+
<a
|
|
1084
|
+
href=${link.href}
|
|
1085
|
+
target=${link.target}
|
|
1086
|
+
data-gtm-id=${link.gtm}
|
|
1087
|
+
itemprop="url"
|
|
1088
|
+
>
|
|
1069
1089
|
<span itemprop="name">
|
|
1070
1090
|
${link.label}
|
|
1071
1091
|
<div class="arrow"></div
|
|
@@ -1090,7 +1110,7 @@ let JoeHeader = class extends s {
|
|
|
1090
1110
|
|
|
1091
1111
|
<div class="slot">
|
|
1092
1112
|
<slot></slot>
|
|
1093
|
-
${this.showOrderButton ?
|
|
1113
|
+
${this.showOrderButton ? x`
|
|
1094
1114
|
<a
|
|
1095
1115
|
class="order-button"
|
|
1096
1116
|
rel="follow"
|
|
@@ -1108,13 +1128,13 @@ let JoeHeader = class extends s {
|
|
|
1108
1128
|
};
|
|
1109
1129
|
JoeHeader.styles = styles;
|
|
1110
1130
|
__decorateClass([
|
|
1111
|
-
|
|
1131
|
+
n$1()
|
|
1112
1132
|
], JoeHeader.prototype, "expanded", 2);
|
|
1113
1133
|
__decorateClass([
|
|
1114
|
-
|
|
1134
|
+
n$1()
|
|
1115
1135
|
], JoeHeader.prototype, "showOrderButton", 2);
|
|
1116
1136
|
__decorateClass([
|
|
1117
|
-
|
|
1137
|
+
n$1()
|
|
1118
1138
|
], JoeHeader.prototype, "links", 2);
|
|
1119
1139
|
JoeHeader = __decorateClass([
|
|
1120
1140
|
e$1("joe-header")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "joe-header",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/joe-header.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "vite",
|
|
12
|
-
"build": "tsc && vite build"
|
|
12
|
+
"build": "tsc && vite build",
|
|
13
|
+
"build:gzip": "tsc && vite build && gzip -k dist/joe-header.js"
|
|
13
14
|
},
|
|
14
15
|
"types": "types/joe-header.d.ts",
|
|
15
16
|
"files": [
|
|
@@ -22,6 +23,6 @@
|
|
|
22
23
|
"vite": "^3.0.6"
|
|
23
24
|
},
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"lit": "^2.
|
|
26
|
+
"lit": "^2.8.0"
|
|
26
27
|
}
|
|
27
28
|
}
|