@epigraph/epigraph-std-lib 4.0.2-alpha → 4.1.0
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/Epigraph/epigraph.cjs +1 -0
- package/dist/Epigraph/epigraph.d.ts +2 -3
- package/dist/Epigraph/epigraph.js +18 -21
- package/dist/Epigraph/epigraphBaseSolutions.cjs +1 -0
- package/dist/Epigraph/{epigraphBaseSolution.d.ts → epigraphBaseSolutions.d.ts} +1 -1
- package/dist/{lib/Epigraph/epigraphBaseSolution.js → Epigraph/epigraphBaseSolutions.js} +1 -1
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.cjs +16 -0
- package/dist/EpigraphLibs/EpigraphAnalytics/epigraphAnalytics.js +354 -27
- package/dist/EpigraphLibs/EpigraphLogger/epigraphLogger.cjs +1 -0
- package/dist/EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs +1 -0
- package/dist/EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.cjs +29 -0
- package/dist/EpigraphLibs/EpigraphQrCodeGenerator/epigraphQrCodeGenerator.js +359 -19
- package/dist/EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs +1 -0
- package/dist/EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.cjs +1 -0
- package/dist/EpigraphLibs/EpigraphUnitsConverter/epigraphUnitsConverter.js +51 -30
- package/dist/EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs +1 -0
- package/dist/epigraph-std-lib.cjs +1 -0
- package/dist/epigraph-std-lib.d.ts +9 -1
- package/dist/epigraph-std-lib.js +40 -1
- package/package.json +4 -35
- package/dist/EpigraphLibs/EpigraphAnalytics/types/index.d.ts +0 -7
- package/dist/lib/Epigraph/constants/enums.js +0 -4
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/consent-plugins/consent-plugin-names.js +0 -4
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/consent-plugins/one-trust-consent-plugin.js +0 -29
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/generics/node.js +0 -22
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/generics/queue.js +0 -23
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/generics/single-linked-list.js +0 -30
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/plugins/ga3-analytics-plugin.js +0 -87
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/plugins/ga4-analytics-plugin.js +0 -121
- package/dist/lib/EpigraphLibs/EpigraphAnalytics/plugins/nexus-analytics-plugin.js +0 -45
- package/dist/lib/EpigraphLibs/EpigraphUnitsConverter/conversions.js +0 -26
- package/dist/lib/EpigraphLibs/EpigraphUnitsConverter/enums.js +0 -5
- package/dist/node_modules/lit-html/async-directive.js +0 -67
- package/dist/node_modules/lit-html/directive-helpers.js +0 -10
- package/dist/node_modules/lit-html/directive.js +0 -27
- package/dist/node_modules/lit-html/directives/ref.js +0 -40
- package/dist/node_modules/lit-html/lit-html.js +0 -225
- package/dist/vite-env.d.ts +0 -1
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
class i {
|
|
2
|
-
constructor(t) {
|
|
3
|
-
this.consentSet = !1, this.consent = !1, this.pluginName = "OneTrustConsentPlugin", this.consentIdentifier = t, this.consent = !1, this.addConsentChangedListener();
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Checks to see if the user has consented. If this is false, it will block all analytics
|
|
7
|
-
*/
|
|
8
|
-
hasConsent() {
|
|
9
|
-
if (this.consentSet)
|
|
10
|
-
return this.consent;
|
|
11
|
-
if (window.OnetrustActiveGroup !== void 0) {
|
|
12
|
-
let t = window.OnetrustActiveGroup;
|
|
13
|
-
t !== void 0 && t.split(",").forEach((n) => {
|
|
14
|
-
n === this.consentIdentifier && (this.consent = !0, this.consentSet = !0);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
return this.consent;
|
|
18
|
-
}
|
|
19
|
-
addConsentChangedListener() {
|
|
20
|
-
window.addEventListener("load", () => {
|
|
21
|
-
this.hasConsent(), window.OneTrust !== void 0 && typeof window.OneTrust == "object" && window.OneTrust.OnConsentChanged(() => {
|
|
22
|
-
this.consentSet = !1, this.hasConsent();
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
i as OneTrustConsentPlugin
|
|
29
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
const e = Symbol("data"), s = Symbol("next"), o = class n {
|
|
2
|
-
constructor(t) {
|
|
3
|
-
this[e] = t, this[s] = null;
|
|
4
|
-
}
|
|
5
|
-
get data() {
|
|
6
|
-
return this[e];
|
|
7
|
-
}
|
|
8
|
-
set next(t) {
|
|
9
|
-
if (!(t instanceof n) && t !== null)
|
|
10
|
-
throw new Error(
|
|
11
|
-
"This node is not an instance of the custom class 'Node'."
|
|
12
|
-
);
|
|
13
|
-
this[s] = t;
|
|
14
|
-
}
|
|
15
|
-
get next() {
|
|
16
|
-
return this[s];
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
let a = o;
|
|
20
|
-
export {
|
|
21
|
-
a as default
|
|
22
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import s from "./single-linked-list.js";
|
|
2
|
-
const u = Symbol("queue"), e = Symbol("size");
|
|
3
|
-
class r {
|
|
4
|
-
constructor() {
|
|
5
|
-
this[u] = new s(), this[e] = 0;
|
|
6
|
-
}
|
|
7
|
-
get queue() {
|
|
8
|
-
return this[u];
|
|
9
|
-
}
|
|
10
|
-
get size() {
|
|
11
|
-
return this[e];
|
|
12
|
-
}
|
|
13
|
-
enqueue(t) {
|
|
14
|
-
this.queue.addToTail(t), this[e]++;
|
|
15
|
-
}
|
|
16
|
-
dequeue() {
|
|
17
|
-
const t = this.queue.removeHead();
|
|
18
|
-
return this[e]--, t;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export {
|
|
22
|
-
r as default
|
|
23
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,121 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,67 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
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
|
-
};
|