@epigraph/epigraph-std-lib 4.0.0-alpha → 4.0.2-alpha
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/README.md +0 -14
- package/dist/Epigraph/epigraph.js +20 -84
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js +69 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/generics/queue.d.ts +3 -2
- package/dist/EpigraphLibs/EpigraphAnalytics/types/index.d.ts +7 -0
- package/dist/EpigraphLibs/{epigraphLogger.js → EpigraphLogger/epigraphLogger.js} +19 -19
- package/dist/EpigraphLibs/{epigraphNexusApi.js → EpigraphNexusApi/epigraphNexusApi.js} +1 -1
- package/dist/EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js +69 -0
- package/dist/EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js +67 -0
- package/dist/lib/Epigraph/constants/enums.js +4 -0
- package/dist/lib/Epigraph/epigraphBaseSolution.js +70 -0
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/consent-plugins/consent-plugin-names.js +4 -0
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/consent-plugins/one-trust-consent-plugin.js +29 -0
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/generics/node.js +22 -0
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/generics/queue.js +23 -0
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/generics/single-linked-list.js +30 -0
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/plugins/ga3-analytics-plugin.js +87 -0
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/plugins/ga4-analytics-plugin.js +121 -0
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/plugins/nexus-analytics-plugin.js +45 -0
- package/dist/lib/EpigraphLibs/EpigraphUnitsConverter/conversions.js +26 -0
- package/dist/lib/EpigraphLibs/EpigraphUnitsConverter/enums.js +5 -0
- package/dist/node_modules/lit-html/async-directive.js +67 -0
- package/dist/node_modules/lit-html/directive-helpers.js +10 -0
- package/dist/node_modules/lit-html/directive.js +27 -0
- package/dist/node_modules/lit-html/directives/ref.js +40 -0
- package/dist/node_modules/lit-html/lit-html.js +225 -0
- package/dist/vite-env.d.ts +1 -0
- package/package.json +41 -74
- package/dist/EpigraphLibs/epigraphAnalytics.js +0 -399
- package/dist/EpigraphLibs/epigraphQrCodeGenerator.js +0 -938
- package/dist/EpigraphLibs/epigraphUnitsConverter.js +0 -88
- package/dist/ThirdPartyLibs/modelViewer.d.ts +0 -2
- package/dist/ThirdPartyLibs/modelViewer.js +0 -8608
- package/dist/ThirdPartyLibs/three-gltf-extensions/exporters/KHR_materials_variants/KHR_materials_variants_exporter.d.ts +0 -9
- package/dist/ThirdPartyLibs/three-gltf-extensions/loaders/KHR_materials_variants/KHR_materials_variants.d.ts +0 -6
- package/dist/ThirdPartyLibs/threejs.d.ts +0 -13
- package/dist/ThirdPartyLibs/threejs.js +0 -800
- package/dist/chunks/VerticalBlurShader.B0rdEBFu.js +0 -26381
- /package/dist/EpigraphLibs/{epigraphResultFactory.js → EpigraphResultFactory/epigraphResultFactory.js} +0 -0
- /package/dist/EpigraphLibs/{epigraphUrlProcessor.js → EpigraphUrlProcessor/epigraphUrlProcessor.js} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import h from "./node.js";
|
|
2
|
+
const r = Symbol("head");
|
|
3
|
+
class d {
|
|
4
|
+
constructor() {
|
|
5
|
+
this[r] = null;
|
|
6
|
+
}
|
|
7
|
+
set head(e) {
|
|
8
|
+
this[r] = e;
|
|
9
|
+
}
|
|
10
|
+
get head() {
|
|
11
|
+
return this[r];
|
|
12
|
+
}
|
|
13
|
+
addToTail(e) {
|
|
14
|
+
let t = this.head;
|
|
15
|
+
if (t) {
|
|
16
|
+
for (; t.next !== null; )
|
|
17
|
+
t = t?.next;
|
|
18
|
+
return t.next = new h(e);
|
|
19
|
+
}
|
|
20
|
+
return this.head = new h(e);
|
|
21
|
+
}
|
|
22
|
+
removeHead() {
|
|
23
|
+
const e = this.head;
|
|
24
|
+
if (e)
|
|
25
|
+
return this.head = e.next, e.data;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
d as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import n from "../generics/queue.js";
|
|
2
|
+
class o {
|
|
3
|
+
constructor(e, r, t, i) {
|
|
4
|
+
this.name = this.pluginName = "GA3-PLUGIN", this.trackingID = e, this.verboseLogging = r, this.user = t, this.trackerName = i, this.queue = new n(), this.trackerInterval = 0, this.trackerCreated = !1;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* This function will send an Event to GA3.
|
|
8
|
+
*
|
|
9
|
+
* @param eventData AnalyticsEvent The event to be tracked
|
|
10
|
+
*/
|
|
11
|
+
sendEvent(e) {
|
|
12
|
+
if (this.queue.enqueue(e), window.ga !== void 0 && typeof ga == "function")
|
|
13
|
+
try {
|
|
14
|
+
this.dequeueAndSendEvents();
|
|
15
|
+
} catch (r) {
|
|
16
|
+
this.logger(r);
|
|
17
|
+
}
|
|
18
|
+
else
|
|
19
|
+
this.logger("Cannot send Google Analytics 3 event: ga function is not defined.");
|
|
20
|
+
return !0;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Send all events that are in the queue
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
dequeueAndSendEvents() {
|
|
27
|
+
if (this.trackerCreated) {
|
|
28
|
+
let e = this.queue.size;
|
|
29
|
+
for (let r = 0; r < e; r++) {
|
|
30
|
+
const t = this.queue.dequeue();
|
|
31
|
+
ga(
|
|
32
|
+
`${this.trackerName}.send`,
|
|
33
|
+
t.type,
|
|
34
|
+
t.category,
|
|
35
|
+
t.action,
|
|
36
|
+
t.label,
|
|
37
|
+
t.interaction
|
|
38
|
+
), this.logger(`Google Analytics 3 event successfully sent: ${t.action}`);
|
|
39
|
+
}
|
|
40
|
+
} else
|
|
41
|
+
this.logger("Cannot sent Google Analytics 3 event: tracker was not created.");
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* GA3 requires that a tracker be created prior to being sent. This is called from the constructor. It is
|
|
45
|
+
* important to note that the promise that is inherently returned is ignored in the constructor at this
|
|
46
|
+
* time. This is due to the events that are added will be queued from the page. This script requires
|
|
47
|
+
* that the GA script has been imported on the page already as it does not check for it today.
|
|
48
|
+
*
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
async createTracker() {
|
|
52
|
+
if (window.ga !== void 0 && typeof ga == "function")
|
|
53
|
+
try {
|
|
54
|
+
ga("create", this.trackingID, "auto", this.trackerName, {
|
|
55
|
+
userId: this.user
|
|
56
|
+
});
|
|
57
|
+
const e = new URL(window.location.href);
|
|
58
|
+
ga(`${this.trackerName}.set`, "page", e.pathname), ga(`${this.trackerName}.set`, "location", e.href), this.trackerCreated = !0, this.logger("Google Analytics 3 tracker successfully created."), this.dequeueAndSendEvents(), window.clearInterval(this.trackerInterval);
|
|
59
|
+
} catch (e) {
|
|
60
|
+
this.logger(e);
|
|
61
|
+
}
|
|
62
|
+
else
|
|
63
|
+
this.logger("Error: Cannot create tracker, ga function is not defined.");
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Checks if verboseLogging is enabled, then logs the error
|
|
67
|
+
* @param err
|
|
68
|
+
*/
|
|
69
|
+
logger(e) {
|
|
70
|
+
this.verboseLogging && console.warn(e);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Returns a unique plugin identifier so that tracking ID's can be the same across multiple plugins.
|
|
74
|
+
*/
|
|
75
|
+
getUniquePluginIdentifier() {
|
|
76
|
+
return this.pluginName + "-" + this.trackingID;
|
|
77
|
+
}
|
|
78
|
+
setupPlugin() {
|
|
79
|
+
var e = 0;
|
|
80
|
+
this.trackerInterval = window.setInterval(() => {
|
|
81
|
+
this.createTracker(), ++e === 10 && (window.clearInterval(this.trackerInterval), this.logger("Error: Failed to create Google Analytics tracker in the allotted timeframe."));
|
|
82
|
+
}, 1e3);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
o as GA3AnalyticsPlugin
|
|
87
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import r from "../generics/queue.js";
|
|
2
|
+
class g {
|
|
3
|
+
constructor(n, e) {
|
|
4
|
+
this.name = this.pluginName = "GA4-PLUGIN", this.trackingID = n, this.verboseLogging = e, this.queue = new r(), this.dataLayer = window.dataLayer, this.dataLayerName = "dataLayer", this.setupDataLayer(), this.initGtag(this.dataLayerName, this.trackingID);
|
|
5
|
+
}
|
|
6
|
+
setupDataLayer() {
|
|
7
|
+
if (this.dataLayer) return;
|
|
8
|
+
const e = this.findGA4ScriptInfo(this.trackingID)?.l;
|
|
9
|
+
e && (this.dataLayerName = e, this.dataLayer = window[e]);
|
|
10
|
+
}
|
|
11
|
+
initGtag(n = "dataLayer", e) {
|
|
12
|
+
typeof window.gtag != "function" && (window.gtag = function() {
|
|
13
|
+
window[n].push(arguments), gtag("js", /* @__PURE__ */ new Date()), gtag("config", e);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* This function will send an Event to GA3.
|
|
18
|
+
*
|
|
19
|
+
* @param eventData AnalyticsEvent The event to be tracked
|
|
20
|
+
* @param consentPlugin
|
|
21
|
+
*/
|
|
22
|
+
async sendEvent(n, e) {
|
|
23
|
+
this.queue.enqueue(n);
|
|
24
|
+
let t = !0;
|
|
25
|
+
if (e && (t = e.hasConsent()), this.dataLayer !== void 0 && t)
|
|
26
|
+
try {
|
|
27
|
+
await this.dequeueAndSendEvents();
|
|
28
|
+
} catch (a) {
|
|
29
|
+
this.logger(a);
|
|
30
|
+
}
|
|
31
|
+
else
|
|
32
|
+
this.logger("Cannot send Google Analytics 4 event: dataLayer is not defined.");
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Send all events that are in the queue
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
async dequeueAndSendEvents() {
|
|
39
|
+
let n = this.queue.size;
|
|
40
|
+
for (let e = 0; e < n; e++) {
|
|
41
|
+
const t = this.queue.dequeue();
|
|
42
|
+
let a = {
|
|
43
|
+
send_to: this.trackingID,
|
|
44
|
+
event_action: t.action,
|
|
45
|
+
event_category: t.category,
|
|
46
|
+
event_label: t.label,
|
|
47
|
+
epg_event_tag: ""
|
|
48
|
+
};
|
|
49
|
+
if ("parameters" in t && Object.assign(a, t.parameters), JSON.stringify(a).length > 459)
|
|
50
|
+
try {
|
|
51
|
+
let s = await this.sendGA4LongParameters(a);
|
|
52
|
+
a = {
|
|
53
|
+
send_to: this.trackingID,
|
|
54
|
+
event_action: t.action,
|
|
55
|
+
event_category: t.category,
|
|
56
|
+
event_label: t.label,
|
|
57
|
+
epg_event_tag: s
|
|
58
|
+
};
|
|
59
|
+
} catch {
|
|
60
|
+
}
|
|
61
|
+
gtag("event", t.action, a), this.logger(`Google Analytics 4 event successfully sent: ${t.action}`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Checks if verboseLogging is enabled, then logs the error
|
|
66
|
+
* @param err
|
|
67
|
+
*/
|
|
68
|
+
logger(n) {
|
|
69
|
+
this.verboseLogging && console.warn(n);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Returns a unique plugin identifier so that tracking ID's can be the same across multiple plugins.
|
|
73
|
+
*/
|
|
74
|
+
getUniquePluginIdentifier() {
|
|
75
|
+
return this.name + "-" + this.trackingID;
|
|
76
|
+
}
|
|
77
|
+
setupPlugin() {
|
|
78
|
+
this.dataLayer !== void 0 && this.dequeueAndSendEvents();
|
|
79
|
+
}
|
|
80
|
+
async sendGA4LongParameters(n) {
|
|
81
|
+
const e = "https://api.myepigraph.com/api/analytics/ga4/custom", t = {
|
|
82
|
+
parameters: n
|
|
83
|
+
};
|
|
84
|
+
try {
|
|
85
|
+
const a = await fetch(e, {
|
|
86
|
+
method: "POST",
|
|
87
|
+
// Assuming it's a POST request, adjust if necessary
|
|
88
|
+
headers: {
|
|
89
|
+
"Content-Type": "application/json",
|
|
90
|
+
Accept: "application/json"
|
|
91
|
+
},
|
|
92
|
+
body: JSON.stringify(t)
|
|
93
|
+
});
|
|
94
|
+
if (a.ok) {
|
|
95
|
+
const i = await a.json();
|
|
96
|
+
return i && i.id ? i.id : "";
|
|
97
|
+
} else
|
|
98
|
+
return "";
|
|
99
|
+
} catch {
|
|
100
|
+
return "";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
findGA4ScriptInfo(n) {
|
|
104
|
+
const e = document.querySelectorAll("script[src]");
|
|
105
|
+
for (const t of e) {
|
|
106
|
+
const a = t.getAttribute("src");
|
|
107
|
+
if (a && a.includes(n)) {
|
|
108
|
+
const i = new URL(a, location.href), s = Object.fromEntries(i.searchParams.entries());
|
|
109
|
+
return {
|
|
110
|
+
fullSrc: i.href,
|
|
111
|
+
id: s.id || void 0,
|
|
112
|
+
l: s.l || void 0
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
g as GA4AnalyticsPlugin
|
|
121
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import r from "../generics/queue.js";
|
|
2
|
+
class o {
|
|
3
|
+
constructor(t, e, i, n, s = !1) {
|
|
4
|
+
this.sessionId = e, this.xPath = i, this.name = this.pluginName = "NEXUS-PLUGIN", this.trackingID = t, this.verboseLogging = n, this.queue = new r(), this.url = s ? "https://nexus.epigraph.dev/api/analytics/event" : "https://api.myepigraph.com/api/analytics/event";
|
|
5
|
+
}
|
|
6
|
+
async sendEvent(t, e) {
|
|
7
|
+
this.queue.enqueue(t);
|
|
8
|
+
let i = !0;
|
|
9
|
+
e && (i = e.hasConsent()), i && await this.dequeueAndSendEvents();
|
|
10
|
+
}
|
|
11
|
+
async dequeueAndSendEvents() {
|
|
12
|
+
for (let t = 0; t < this.queue.size; t++) {
|
|
13
|
+
const e = this.queue.dequeue(), i = {
|
|
14
|
+
experience_id: this.trackingID,
|
|
15
|
+
action: e.action,
|
|
16
|
+
parameters: e.parameters
|
|
17
|
+
};
|
|
18
|
+
try {
|
|
19
|
+
return (await fetch(this.url, {
|
|
20
|
+
method: "POST",
|
|
21
|
+
// Assuming it's a POST request, adjust if necessary
|
|
22
|
+
headers: {
|
|
23
|
+
"Content-Type": "application/json",
|
|
24
|
+
Accept: "application/json",
|
|
25
|
+
"EPG-SESSION-ID": this.sessionId,
|
|
26
|
+
"EPG-XPATH": this.xPath,
|
|
27
|
+
Origin: typeof window < "u" ? window.location.origin : ""
|
|
28
|
+
},
|
|
29
|
+
body: JSON.stringify(i)
|
|
30
|
+
})).status === 204, "";
|
|
31
|
+
} catch {
|
|
32
|
+
return "";
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return "";
|
|
36
|
+
}
|
|
37
|
+
getUniquePluginIdentifier() {
|
|
38
|
+
return this.name + "-" + this.trackingID;
|
|
39
|
+
}
|
|
40
|
+
setupPlugin() {
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
o as NexusAnalyticsPlugin
|
|
45
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DistanceUnits as e } from "./enums.js";
|
|
2
|
+
let t = {};
|
|
3
|
+
t[`${e.millimeter}-${e.meter}`] = 1e-3;
|
|
4
|
+
t[`${e.meter}-${e.millimeter}`] = 1e3;
|
|
5
|
+
t[`${e.centimeter}-${e.meter}`] = 0.01;
|
|
6
|
+
t[`${e.meter}-${e.centimeter}`] = 100;
|
|
7
|
+
t[`${e.decimeter}-${e.meter}`] = 0.1;
|
|
8
|
+
t[`${e.meter}-${e.decimeter}`] = 10;
|
|
9
|
+
t[`${e.meter}-${e.meter}`] = 1;
|
|
10
|
+
t[`${e.decameter}-${e.meter}`] = 10;
|
|
11
|
+
t[`${e.meter}-${e.decameter}`] = 0.1;
|
|
12
|
+
t[`${e.hectometer}-${e.meter}`] = 100;
|
|
13
|
+
t[`${e.meter}-${e.hectometer}`] = 0.01;
|
|
14
|
+
t[`${e.kilometer}-${e.meter}`] = 1e3;
|
|
15
|
+
t[`${e.meter}-${e.kilometer}`] = 1e-3;
|
|
16
|
+
t[`${e.inch}-${e.meter}`] = 0.0254;
|
|
17
|
+
t[`${e.meter}-${e.inch}`] = 39.3701;
|
|
18
|
+
t[`${e.foot}-${e.meter}`] = 0.3048;
|
|
19
|
+
t[`${e.meter}-${e.foot}`] = 3.28084;
|
|
20
|
+
t[`${e.yard}-${e.meter}`] = 0.9144;
|
|
21
|
+
t[`${e.meter}-${e.yard}`] = 1.09361;
|
|
22
|
+
t[`${e.mile}-${e.meter}`] = 1609.34;
|
|
23
|
+
t[`${e.meter}-${e.mile}`] = 621371e-9;
|
|
24
|
+
export {
|
|
25
|
+
t as ConversionFactors
|
|
26
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var r = /* @__PURE__ */ ((m) => (m.RAW = "raw", m.DISTANCE = "distance", m.WEIGHT = "weight", m))(r || {}), e = /* @__PURE__ */ ((m) => (m.millimeter = "mm", m.centimeter = "cm", m.decimeter = "dm", m.meter = "m", m.decameter = "dam", m.hectometer = "hm", m.kilometer = "km", m.inch = "in", m.foot = "ft", m.yard = "yd", m.mile = "mi", m))(e || {});
|
|
2
|
+
export {
|
|
3
|
+
e as DistanceUnits,
|
|
4
|
+
r as UnitTypes
|
|
5
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { isSingleExpression as $ } from "./directive-helpers.js";
|
|
2
|
+
import { Directive as _, PartType as A } from "./directive.js";
|
|
3
|
+
import { directive as N } from "./directive.js";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2017 Google LLC
|
|
7
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
8
|
+
*/
|
|
9
|
+
const r = (t, e) => {
|
|
10
|
+
const s = t._$AN;
|
|
11
|
+
if (s === void 0) return !1;
|
|
12
|
+
for (const i of s) i._$AO?.(e, !1), r(i, e);
|
|
13
|
+
return !0;
|
|
14
|
+
}, n = (t) => {
|
|
15
|
+
let e, s;
|
|
16
|
+
do {
|
|
17
|
+
if ((e = t._$AM) === void 0) break;
|
|
18
|
+
s = e._$AN, s.delete(t), t = e;
|
|
19
|
+
} while (s?.size === 0);
|
|
20
|
+
}, c = (t) => {
|
|
21
|
+
for (let e; e = t._$AM; t = e) {
|
|
22
|
+
let s = e._$AN;
|
|
23
|
+
if (s === void 0) e._$AN = s = /* @__PURE__ */ new Set();
|
|
24
|
+
else if (s.has(t)) break;
|
|
25
|
+
s.add(t), d(e);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
function f(t) {
|
|
29
|
+
this._$AN !== void 0 ? (n(this), this._$AM = t, c(this)) : this._$AM = t;
|
|
30
|
+
}
|
|
31
|
+
function a(t, e = !1, s = 0) {
|
|
32
|
+
const i = this._$AH, h = this._$AN;
|
|
33
|
+
if (h !== void 0 && h.size !== 0) if (e) if (Array.isArray(i)) for (let o = s; o < i.length; o++) r(i[o], !1), n(i[o]);
|
|
34
|
+
else i != null && (r(i, !1), n(i));
|
|
35
|
+
else r(this, t);
|
|
36
|
+
}
|
|
37
|
+
const d = (t) => {
|
|
38
|
+
t.type == A.CHILD && (t._$AP ??= a, t._$AQ ??= f);
|
|
39
|
+
};
|
|
40
|
+
class p extends _ {
|
|
41
|
+
constructor() {
|
|
42
|
+
super(...arguments), this._$AN = void 0;
|
|
43
|
+
}
|
|
44
|
+
_$AT(e, s, i) {
|
|
45
|
+
super._$AT(e, s, i), c(this), this.isConnected = e._$AU;
|
|
46
|
+
}
|
|
47
|
+
_$AO(e, s = !0) {
|
|
48
|
+
e !== this.isConnected && (this.isConnected = e, e ? this.reconnected?.() : this.disconnected?.()), s && (r(this, e), n(this));
|
|
49
|
+
}
|
|
50
|
+
setValue(e) {
|
|
51
|
+
if ($(this._$Ct)) this._$Ct._$AI(e, this);
|
|
52
|
+
else {
|
|
53
|
+
const s = [...this._$Ct._$AH];
|
|
54
|
+
s[this._$Ci] = e, this._$Ct._$AI(s, this, 0);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
disconnected() {
|
|
58
|
+
}
|
|
59
|
+
reconnected() {
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
p as AsyncDirective,
|
|
64
|
+
_ as Directive,
|
|
65
|
+
A as PartType,
|
|
66
|
+
N as directive
|
|
67
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const s = { CHILD: 2 }, $ = (i) => (...t) => ({ _$litDirective$: i, values: t });
|
|
7
|
+
class _ {
|
|
8
|
+
constructor(t) {
|
|
9
|
+
}
|
|
10
|
+
get _$AU() {
|
|
11
|
+
return this._$AM._$AU;
|
|
12
|
+
}
|
|
13
|
+
_$AT(t, e, r) {
|
|
14
|
+
this._$Ct = t, this._$AM = e, this._$Ci = r;
|
|
15
|
+
}
|
|
16
|
+
_$AS(t, e) {
|
|
17
|
+
return this.update(t, e);
|
|
18
|
+
}
|
|
19
|
+
update(t, e) {
|
|
20
|
+
return this.render(...e);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
_ as Directive,
|
|
25
|
+
s as PartType,
|
|
26
|
+
$ as directive
|
|
27
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { nothing as h } from "../lit-html.js";
|
|
2
|
+
import { AsyncDirective as o } from "../async-directive.js";
|
|
3
|
+
import { directive as n } from "../directive.js";
|
|
4
|
+
/**
|
|
5
|
+
* @license
|
|
6
|
+
* Copyright 2020 Google LLC
|
|
7
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
8
|
+
*/
|
|
9
|
+
const d = () => new r();
|
|
10
|
+
class r {
|
|
11
|
+
}
|
|
12
|
+
const e = /* @__PURE__ */ new WeakMap(), v = n(class extends o {
|
|
13
|
+
render(t) {
|
|
14
|
+
return h;
|
|
15
|
+
}
|
|
16
|
+
update(t, [s]) {
|
|
17
|
+
const i = s !== this.G;
|
|
18
|
+
return i && this.G !== void 0 && this.rt(void 0), (i || this.lt !== this.ct) && (this.G = s, this.ht = t.options?.host, this.rt(this.ct = t.element)), h;
|
|
19
|
+
}
|
|
20
|
+
rt(t) {
|
|
21
|
+
if (this.isConnected || (t = void 0), typeof this.G == "function") {
|
|
22
|
+
const s = this.ht ?? globalThis;
|
|
23
|
+
let i = e.get(s);
|
|
24
|
+
i === void 0 && (i = /* @__PURE__ */ new WeakMap(), e.set(s, i)), i.get(this.G) !== void 0 && this.G.call(this.ht, void 0), i.set(this.G, t), t !== void 0 && this.G.call(this.ht, t);
|
|
25
|
+
} else this.G.value = t;
|
|
26
|
+
}
|
|
27
|
+
get lt() {
|
|
28
|
+
return typeof this.G == "function" ? e.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
|
|
29
|
+
}
|
|
30
|
+
disconnected() {
|
|
31
|
+
this.lt === this.ct && this.rt(void 0);
|
|
32
|
+
}
|
|
33
|
+
reconnected() {
|
|
34
|
+
this.rt(this.ct);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
d as createRef,
|
|
39
|
+
v as ref
|
|
40
|
+
};
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/
|
|
6
|
+
const w = globalThis, T = w.trustedTypes, I = T ? T.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, L = "$lit$", p = `lit$${Math.random().toFixed(9).slice(2)}$`, P = "?" + p, V = `<${P}>`, f = document, b = () => f.createComment(""), y = (r) => r === null || typeof r != "object" && typeof r != "function", E = Array.isArray, D = (r) => E(r) || typeof r?.[Symbol.iterator] == "function", S = `[
|
|
7
|
+
\f\r]`, v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, U = /-->/g, O = />/g, u = RegExp(`>|${S}(?:([^\\s"'>=/]+)(${S}*=${S}*(?:[^
|
|
8
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), R = /'/g, j = /"/g, W = /^(?:script|style|textarea|title)$/i, x = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), B = /* @__PURE__ */ new WeakMap(), g = f.createTreeWalker(f, 129);
|
|
9
|
+
function k(r, t) {
|
|
10
|
+
if (!E(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
11
|
+
return I !== void 0 ? I.createHTML(t) : t;
|
|
12
|
+
}
|
|
13
|
+
const z = (r, t) => {
|
|
14
|
+
const s = r.length - 1, e = [];
|
|
15
|
+
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = v;
|
|
16
|
+
for (let _ = 0; _ < s; _++) {
|
|
17
|
+
const h = r[_];
|
|
18
|
+
let $, a, l = -1, c = 0;
|
|
19
|
+
for (; c < h.length && (o.lastIndex = c, a = o.exec(h), a !== null); ) c = o.lastIndex, o === v ? a[1] === "!--" ? o = U : a[1] !== void 0 ? o = O : a[2] !== void 0 ? (W.test(a[2]) && (i = RegExp("</" + a[2], "g")), o = u) : a[3] !== void 0 && (o = u) : o === u ? a[0] === ">" ? (o = i ?? v, l = -1) : a[1] === void 0 ? l = -2 : (l = o.lastIndex - a[2].length, $ = a[1], o = a[3] === void 0 ? u : a[3] === '"' ? j : R) : o === j || o === R ? o = u : o === U || o === O ? o = v : (o = u, i = void 0);
|
|
20
|
+
const d = o === u && r[_ + 1].startsWith("/>") ? " " : "";
|
|
21
|
+
n += o === v ? h + V : l >= 0 ? (e.push($), h.slice(0, l) + L + h.slice(l) + p + d) : h + p + (l === -2 ? _ : d);
|
|
22
|
+
}
|
|
23
|
+
return [k(r, n + (r[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), e];
|
|
24
|
+
};
|
|
25
|
+
class H {
|
|
26
|
+
constructor({ strings: t, _$litType$: s }, e) {
|
|
27
|
+
let i;
|
|
28
|
+
this.parts = [];
|
|
29
|
+
let n = 0, o = 0;
|
|
30
|
+
const _ = t.length - 1, h = this.parts, [$, a] = z(t, s);
|
|
31
|
+
if (this.el = H.createElement($, e), g.currentNode = this.el.content, s === 2 || s === 3) {
|
|
32
|
+
const l = this.el.content.firstChild;
|
|
33
|
+
l.replaceWith(...l.childNodes);
|
|
34
|
+
}
|
|
35
|
+
for (; (i = g.nextNode()) !== null && h.length < _; ) {
|
|
36
|
+
if (i.nodeType === 1) {
|
|
37
|
+
if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(L)) {
|
|
38
|
+
const c = a[o++], d = i.getAttribute(l).split(p), N = /([.?@])?(.*)/.exec(c);
|
|
39
|
+
h.push({ type: 1, index: n, name: N[2], strings: d, ctor: N[1] === "." ? F : N[1] === "?" ? q : N[1] === "@" ? G : M }), i.removeAttribute(l);
|
|
40
|
+
} else l.startsWith(p) && (h.push({ type: 6, index: n }), i.removeAttribute(l));
|
|
41
|
+
if (W.test(i.tagName)) {
|
|
42
|
+
const l = i.textContent.split(p), c = l.length - 1;
|
|
43
|
+
if (c > 0) {
|
|
44
|
+
i.textContent = T ? T.emptyScript : "";
|
|
45
|
+
for (let d = 0; d < c; d++) i.append(l[d], b()), g.nextNode(), h.push({ type: 2, index: ++n });
|
|
46
|
+
i.append(l[c], b());
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} else if (i.nodeType === 8) if (i.data === P) h.push({ type: 2, index: n });
|
|
50
|
+
else {
|
|
51
|
+
let l = -1;
|
|
52
|
+
for (; (l = i.data.indexOf(p, l + 1)) !== -1; ) h.push({ type: 7, index: n }), l += p.length - 1;
|
|
53
|
+
}
|
|
54
|
+
n++;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
static createElement(t, s) {
|
|
58
|
+
const e = f.createElement("template");
|
|
59
|
+
return e.innerHTML = t, e;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
function m(r, t, s = r, e) {
|
|
63
|
+
if (t === x) return t;
|
|
64
|
+
let i = e !== void 0 ? s._$Co?.[e] : s._$Cl;
|
|
65
|
+
const n = y(t) ? void 0 : t._$litDirective$;
|
|
66
|
+
return i?.constructor !== n && (i?._$AO?.(!1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, s, e)), e !== void 0 ? (s._$Co ??= [])[e] = i : s._$Cl = i), i !== void 0 && (t = m(r, i._$AS(r, t.values), i, e)), t;
|
|
67
|
+
}
|
|
68
|
+
class Z {
|
|
69
|
+
constructor(t, s) {
|
|
70
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = s;
|
|
71
|
+
}
|
|
72
|
+
get parentNode() {
|
|
73
|
+
return this._$AM.parentNode;
|
|
74
|
+
}
|
|
75
|
+
get _$AU() {
|
|
76
|
+
return this._$AM._$AU;
|
|
77
|
+
}
|
|
78
|
+
u(t) {
|
|
79
|
+
const { el: { content: s }, parts: e } = this._$AD, i = (t?.creationScope ?? f).importNode(s, !0);
|
|
80
|
+
g.currentNode = i;
|
|
81
|
+
let n = g.nextNode(), o = 0, _ = 0, h = e[0];
|
|
82
|
+
for (; h !== void 0; ) {
|
|
83
|
+
if (o === h.index) {
|
|
84
|
+
let $;
|
|
85
|
+
h.type === 2 ? $ = new C(n, n.nextSibling, this, t) : h.type === 1 ? $ = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && ($ = new J(n, this, t)), this._$AV.push($), h = e[++_];
|
|
86
|
+
}
|
|
87
|
+
o !== h?.index && (n = g.nextNode(), o++);
|
|
88
|
+
}
|
|
89
|
+
return g.currentNode = f, i;
|
|
90
|
+
}
|
|
91
|
+
p(t) {
|
|
92
|
+
let s = 0;
|
|
93
|
+
for (const e of this._$AV) e !== void 0 && (e.strings !== void 0 ? (e._$AI(t, e, s), s += e.strings.length - 2) : e._$AI(t[s])), s++;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
class C {
|
|
97
|
+
get _$AU() {
|
|
98
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
99
|
+
}
|
|
100
|
+
constructor(t, s, e, i) {
|
|
101
|
+
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = e, this.options = i, this._$Cv = i?.isConnected ?? !0;
|
|
102
|
+
}
|
|
103
|
+
get parentNode() {
|
|
104
|
+
let t = this._$AA.parentNode;
|
|
105
|
+
const s = this._$AM;
|
|
106
|
+
return s !== void 0 && t?.nodeType === 11 && (t = s.parentNode), t;
|
|
107
|
+
}
|
|
108
|
+
get startNode() {
|
|
109
|
+
return this._$AA;
|
|
110
|
+
}
|
|
111
|
+
get endNode() {
|
|
112
|
+
return this._$AB;
|
|
113
|
+
}
|
|
114
|
+
_$AI(t, s = this) {
|
|
115
|
+
t = m(this, t, s), y(t) ? t === A || t == null || t === "" ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : D(t) ? this.k(t) : this._(t);
|
|
116
|
+
}
|
|
117
|
+
O(t) {
|
|
118
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
119
|
+
}
|
|
120
|
+
T(t) {
|
|
121
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
122
|
+
}
|
|
123
|
+
_(t) {
|
|
124
|
+
this._$AH !== A && y(this._$AH) ? this._$AA.nextSibling.data = t : this.T(f.createTextNode(t)), this._$AH = t;
|
|
125
|
+
}
|
|
126
|
+
$(t) {
|
|
127
|
+
const { values: s, _$litType$: e } = t, i = typeof e == "number" ? this._$AC(t) : (e.el === void 0 && (e.el = H.createElement(k(e.h, e.h[0]), this.options)), e);
|
|
128
|
+
if (this._$AH?._$AD === i) this._$AH.p(s);
|
|
129
|
+
else {
|
|
130
|
+
const n = new Z(i, this), o = n.u(this.options);
|
|
131
|
+
n.p(s), this.T(o), this._$AH = n;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
_$AC(t) {
|
|
135
|
+
let s = B.get(t.strings);
|
|
136
|
+
return s === void 0 && B.set(t.strings, s = new H(t)), s;
|
|
137
|
+
}
|
|
138
|
+
k(t) {
|
|
139
|
+
E(this._$AH) || (this._$AH = [], this._$AR());
|
|
140
|
+
const s = this._$AH;
|
|
141
|
+
let e, i = 0;
|
|
142
|
+
for (const n of t) i === s.length ? s.push(e = new C(this.O(b()), this.O(b()), this, this.options)) : e = s[i], e._$AI(n), i++;
|
|
143
|
+
i < s.length && (this._$AR(e && e._$AB.nextSibling, i), s.length = i);
|
|
144
|
+
}
|
|
145
|
+
_$AR(t = this._$AA.nextSibling, s) {
|
|
146
|
+
for (this._$AP?.(!1, !0, s); t && t !== this._$AB; ) {
|
|
147
|
+
const e = t.nextSibling;
|
|
148
|
+
t.remove(), t = e;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
setConnected(t) {
|
|
152
|
+
this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
class M {
|
|
156
|
+
get tagName() {
|
|
157
|
+
return this.element.tagName;
|
|
158
|
+
}
|
|
159
|
+
get _$AU() {
|
|
160
|
+
return this._$AM._$AU;
|
|
161
|
+
}
|
|
162
|
+
constructor(t, s, e, i, n) {
|
|
163
|
+
this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = s, this._$AM = i, this.options = n, e.length > 2 || e[0] !== "" || e[1] !== "" ? (this._$AH = Array(e.length - 1).fill(new String()), this.strings = e) : this._$AH = A;
|
|
164
|
+
}
|
|
165
|
+
_$AI(t, s = this, e, i) {
|
|
166
|
+
const n = this.strings;
|
|
167
|
+
let o = !1;
|
|
168
|
+
if (n === void 0) t = m(this, t, s, 0), o = !y(t) || t !== this._$AH && t !== x, o && (this._$AH = t);
|
|
169
|
+
else {
|
|
170
|
+
const _ = t;
|
|
171
|
+
let h, $;
|
|
172
|
+
for (t = n[0], h = 0; h < n.length - 1; h++) $ = m(this, _[e + h], s, h), $ === x && ($ = this._$AH[h]), o ||= !y($) || $ !== this._$AH[h], $ === A ? t = A : t !== A && (t += ($ ?? "") + n[h + 1]), this._$AH[h] = $;
|
|
173
|
+
}
|
|
174
|
+
o && !i && this.j(t);
|
|
175
|
+
}
|
|
176
|
+
j(t) {
|
|
177
|
+
t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
class F extends M {
|
|
181
|
+
constructor() {
|
|
182
|
+
super(...arguments), this.type = 3;
|
|
183
|
+
}
|
|
184
|
+
j(t) {
|
|
185
|
+
this.element[this.name] = t === A ? void 0 : t;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
class q extends M {
|
|
189
|
+
constructor() {
|
|
190
|
+
super(...arguments), this.type = 4;
|
|
191
|
+
}
|
|
192
|
+
j(t) {
|
|
193
|
+
this.element.toggleAttribute(this.name, !!t && t !== A);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
class G extends M {
|
|
197
|
+
constructor(t, s, e, i, n) {
|
|
198
|
+
super(t, s, e, i, n), this.type = 5;
|
|
199
|
+
}
|
|
200
|
+
_$AI(t, s = this) {
|
|
201
|
+
if ((t = m(this, t, s, 0) ?? A) === x) return;
|
|
202
|
+
const e = this._$AH, i = t === A && e !== A || t.capture !== e.capture || t.once !== e.once || t.passive !== e.passive, n = t !== A && (e === A || i);
|
|
203
|
+
i && this.element.removeEventListener(this.name, this, e), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
204
|
+
}
|
|
205
|
+
handleEvent(t) {
|
|
206
|
+
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
class J {
|
|
210
|
+
constructor(t, s, e) {
|
|
211
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = e;
|
|
212
|
+
}
|
|
213
|
+
get _$AU() {
|
|
214
|
+
return this._$AM._$AU;
|
|
215
|
+
}
|
|
216
|
+
_$AI(t) {
|
|
217
|
+
m(this, t);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
const K = w.litHtmlPolyfillSupport;
|
|
221
|
+
K?.(H, C), (w.litHtmlVersions ??= []).push("3.3.0");
|
|
222
|
+
export {
|
|
223
|
+
x as noChange,
|
|
224
|
+
A as nothing
|
|
225
|
+
};
|