@progressive-development/pd-order 0.1.130 → 0.5.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/index.js +12 -0
- package/dist/locales/be.js +10 -0
- package/dist/locales/de.js +14 -4
- package/dist/locales/en.js +10 -0
- package/dist/pd-order-contacts.js +3 -1
- package/dist/pd-order-summary.js +3 -1
- package/dist/src/PdOrderContacts.js +155 -33
- package/dist/src/PdOrderSummary.js +8 -8
- package/package.json +18 -16
- package/dist/node_modules/@progressive-development/pd-contact/pd-contact.js +0 -2
- package/dist/node_modules/@progressive-development/pd-contact/src/PdContact.js +0 -566
- package/dist/node_modules/@progressive-development/pd-content/pd-collapse.js +0 -2
- package/dist/node_modules/@progressive-development/pd-content/pd-edit-content.js +0 -2
- package/dist/node_modules/@progressive-development/pd-content/src/PdCollapse.js +0 -135
- package/dist/node_modules/@progressive-development/pd-content/src/PdEditContent.js +0 -223
- package/dist/node_modules/@progressive-development/pd-dialog/pd-popup.js +0 -2
- package/dist/node_modules/@progressive-development/pd-dialog/src/PdPopup.js +0 -112
- package/dist/node_modules/@progressive-development/pd-forms/pd-checkbox.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-form-container.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-form-row.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-hover-box.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-input.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/pd-radio-group.js +0 -2
- package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseInputElement.js +0 -86
- package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUi.js +0 -33
- package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUiInput.js +0 -229
- package/dist/node_modules/@progressive-development/pd-forms/src/PdCheckbox.js +0 -230
- package/dist/node_modules/@progressive-development/pd-forms/src/PdFormContainer.js +0 -167
- package/dist/node_modules/@progressive-development/pd-forms/src/PdFormRow.js +0 -92
- package/dist/node_modules/@progressive-development/pd-forms/src/PdHoverBox.js +0 -108
- package/dist/node_modules/@progressive-development/pd-forms/src/PdInput.js +0 -79
- package/dist/node_modules/@progressive-development/pd-forms/src/PdRadioGroup.js +0 -72
- package/dist/node_modules/@progressive-development/pd-forms/src/shared-input-field-styles.js +0 -152
- package/dist/node_modules/@progressive-development/pd-forms/src/shared-input-styles.js +0 -64
- package/dist/node_modules/@progressive-development/pd-icon/pd-icon.js +0 -4
- package/dist/node_modules/@progressive-development/pd-icon/src/PdIcon.js +0 -595
- package/dist/node_modules/@progressive-development/pd-price/pd-pricetable.js +0 -2
- package/dist/node_modules/@progressive-development/pd-price/src/PdPricetable.js +0 -149
- package/dist/node_modules/fecha/lib/fecha.js +0 -200
- package/dist/node_modules/lit/node_modules/lit-html/directive.js +0 -27
- package/dist/node_modules/lit/node_modules/lit-html/directives/class-map.js +0 -36
- package/dist/node_modules/lit/node_modules/lit-html/lit-html.js +0 -242
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { LitElement, css, html } from "lit";
|
|
2
|
-
import { classMap as o } from "../../../lit/node_modules/lit-html/directives/class-map.js";
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright (c) 2021 PD Progressive Development UG. All rights reserved.
|
|
6
|
-
*/
|
|
7
|
-
class PdPricetable extends LitElement {
|
|
8
|
-
static get styles() {
|
|
9
|
-
return css`
|
|
10
|
-
:host {
|
|
11
|
-
display: block;
|
|
12
|
-
max-width: 100%;
|
|
13
|
-
--table-spacing: 1rem;
|
|
14
|
-
--table-radius: 1rem;
|
|
15
|
-
|
|
16
|
-
--table-bg: var(--game-color-dark, #fefefe);
|
|
17
|
-
|
|
18
|
-
--table-header-color: var(--game-color-light, #fefefe);
|
|
19
|
-
--table-header-bg: var(--game-color-dark, #177e89);
|
|
20
|
-
|
|
21
|
-
--table-row-odd-bg: var(--game-color-light, #fefefe);
|
|
22
|
-
|
|
23
|
-
--table-small-cell-bg: var(--game-color-light, lightgrey);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.table {
|
|
27
|
-
position: relative;
|
|
28
|
-
z-index: 1;
|
|
29
|
-
width: 100%;
|
|
30
|
-
background: var(--table-bg);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.table_expanded {
|
|
34
|
-
border-bottom: 2px solid var(--table-small-cell-bg);
|
|
35
|
-
}
|
|
36
|
-
.table_expanded .table__header .table__cell {
|
|
37
|
-
position: relative;
|
|
38
|
-
z-index: 10;
|
|
39
|
-
background-color: var(--table-header-bg);
|
|
40
|
-
box-shadow: 0 2px 0 var(--table-small-cell-bg);
|
|
41
|
-
font-weight: bold;
|
|
42
|
-
color: var(--table-header-color);
|
|
43
|
-
|
|
44
|
-
font-family: Oswald;
|
|
45
|
-
}
|
|
46
|
-
.table_expanded .table__body .table__row:nth-child(odd) {
|
|
47
|
-
background-color: var(--table-row-odd-bg);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.table_expanded .table__cell {
|
|
51
|
-
padding: calc(var(--table-spacing) / 2);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.text-left {
|
|
55
|
-
text-align: left;
|
|
56
|
-
}
|
|
57
|
-
.text-center {
|
|
58
|
-
text-align: center;
|
|
59
|
-
}
|
|
60
|
-
.text-right {
|
|
61
|
-
text-align: right;
|
|
62
|
-
}
|
|
63
|
-
.bold {
|
|
64
|
-
font-size: 1.2em;
|
|
65
|
-
font-family: Oswald;
|
|
66
|
-
color: #084c61;
|
|
67
|
-
}
|
|
68
|
-
.light {
|
|
69
|
-
color: grey;
|
|
70
|
-
}
|
|
71
|
-
.border-row {
|
|
72
|
-
border-bottom: 1px solid black;
|
|
73
|
-
}
|
|
74
|
-
`;
|
|
75
|
-
}
|
|
76
|
-
static get properties() {
|
|
77
|
-
return {
|
|
78
|
-
priceData: { type: Object }
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
constructor() {
|
|
82
|
-
super();
|
|
83
|
-
this.priceData = { articles: [], tax: 0 };
|
|
84
|
-
this.tableCssClasses = { table: true, table_expanded: true };
|
|
85
|
-
this._totalPrice = 0;
|
|
86
|
-
}
|
|
87
|
-
render() {
|
|
88
|
-
return this.loading ? html`Loading...` : html` <table class="${o(this.tableCssClasses)}">
|
|
89
|
-
<thead class="table__header">
|
|
90
|
-
<tr class="table__row">
|
|
91
|
-
<th class="table__cell" scope="col">Artikel</th>
|
|
92
|
-
<th class="table__cell" scope="col">Prijs</th>
|
|
93
|
-
</tr>
|
|
94
|
-
</thead>
|
|
95
|
-
<tbody class="table__body">
|
|
96
|
-
${this._renderBody()}
|
|
97
|
-
</tbody>
|
|
98
|
-
<tfoot>
|
|
99
|
-
<tr>
|
|
100
|
-
<td class="table__cell text-right bold" role="cell">Total:</td>
|
|
101
|
-
<td class="table__cell text-right bold" role="cell">
|
|
102
|
-
${(this._totalPrice + this._totalPrice * this.priceData.tax).toFixed(2)}
|
|
103
|
-
€
|
|
104
|
-
</td>
|
|
105
|
-
</tr>
|
|
106
|
-
</tfoot>
|
|
107
|
-
</table>
|
|
108
|
-
<p>* ${this._getTaxInfo()}</p>`;
|
|
109
|
-
}
|
|
110
|
-
_renderBody() {
|
|
111
|
-
this._totalPrice = 0;
|
|
112
|
-
return html`
|
|
113
|
-
${this.priceData.articles.map((article) => {
|
|
114
|
-
this._totalPrice += article.price ? Number(article.price) : 0;
|
|
115
|
-
return html`
|
|
116
|
-
<tr class="table__row">
|
|
117
|
-
<td class="table__cell text-left" role="cell">${article.name}</td>
|
|
118
|
-
<td class="table__cell text-right" role="cell">
|
|
119
|
-
${article.price ? Number(article.price).toFixed(2) : "--"} €
|
|
120
|
-
</td>
|
|
121
|
-
</tr>
|
|
122
|
-
`;
|
|
123
|
-
})}
|
|
124
|
-
<tr class="table__row">
|
|
125
|
-
<td class="table__cell text-right border-row light" role="cell">
|
|
126
|
-
${this.priceData.tax * 100}% BTW*
|
|
127
|
-
</td>
|
|
128
|
-
<td class="table__cell text-right border-row light" role="cell">
|
|
129
|
-
${(this._totalPrice * this.priceData.tax).toFixed(2)} €
|
|
130
|
-
</td>
|
|
131
|
-
</tr>
|
|
132
|
-
`;
|
|
133
|
-
}
|
|
134
|
-
_getTaxInfo() {
|
|
135
|
-
switch (this.priceData.tax) {
|
|
136
|
-
case 0:
|
|
137
|
-
return "BTW verlegd";
|
|
138
|
-
case 0.06:
|
|
139
|
-
return "6% BTW voor woningen ouder dan 10 jaar.";
|
|
140
|
-
case 0.21:
|
|
141
|
-
return "21% BTW voor woningen jonger dan 10 jaar.";
|
|
142
|
-
default:
|
|
143
|
-
return "--";
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
export {
|
|
148
|
-
PdPricetable
|
|
149
|
-
};
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
|
|
2
|
-
var literal = /\[([^]*?)\]/gm;
|
|
3
|
-
function shorten(arr, sLen) {
|
|
4
|
-
var newArr = [];
|
|
5
|
-
for (var i = 0, len = arr.length; i < len; i++) {
|
|
6
|
-
newArr.push(arr[i].substr(0, sLen));
|
|
7
|
-
}
|
|
8
|
-
return newArr;
|
|
9
|
-
}
|
|
10
|
-
function assign(origObj) {
|
|
11
|
-
var args = [];
|
|
12
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
13
|
-
args[_i - 1] = arguments[_i];
|
|
14
|
-
}
|
|
15
|
-
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
|
|
16
|
-
var obj = args_1[_a];
|
|
17
|
-
for (var key in obj) {
|
|
18
|
-
origObj[key] = obj[key];
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return origObj;
|
|
22
|
-
}
|
|
23
|
-
var dayNames = [
|
|
24
|
-
"Sunday",
|
|
25
|
-
"Monday",
|
|
26
|
-
"Tuesday",
|
|
27
|
-
"Wednesday",
|
|
28
|
-
"Thursday",
|
|
29
|
-
"Friday",
|
|
30
|
-
"Saturday"
|
|
31
|
-
];
|
|
32
|
-
var monthNames = [
|
|
33
|
-
"January",
|
|
34
|
-
"February",
|
|
35
|
-
"March",
|
|
36
|
-
"April",
|
|
37
|
-
"May",
|
|
38
|
-
"June",
|
|
39
|
-
"July",
|
|
40
|
-
"August",
|
|
41
|
-
"September",
|
|
42
|
-
"October",
|
|
43
|
-
"November",
|
|
44
|
-
"December"
|
|
45
|
-
];
|
|
46
|
-
var monthNamesShort = shorten(monthNames, 3);
|
|
47
|
-
var dayNamesShort = shorten(dayNames, 3);
|
|
48
|
-
var defaultI18n = {
|
|
49
|
-
dayNamesShort,
|
|
50
|
-
dayNames,
|
|
51
|
-
monthNamesShort,
|
|
52
|
-
monthNames,
|
|
53
|
-
amPm: ["am", "pm"],
|
|
54
|
-
DoFn: function(dayOfMonth) {
|
|
55
|
-
return dayOfMonth + ["th", "st", "nd", "rd"][dayOfMonth % 10 > 3 ? 0 : (dayOfMonth - dayOfMonth % 10 !== 10 ? 1 : 0) * dayOfMonth % 10];
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
var globalI18n = assign({}, defaultI18n);
|
|
59
|
-
var pad = function(val, len) {
|
|
60
|
-
if (len === void 0) {
|
|
61
|
-
len = 2;
|
|
62
|
-
}
|
|
63
|
-
val = String(val);
|
|
64
|
-
while (val.length < len) {
|
|
65
|
-
val = "0" + val;
|
|
66
|
-
}
|
|
67
|
-
return val;
|
|
68
|
-
};
|
|
69
|
-
var formatFlags = {
|
|
70
|
-
D: function(dateObj) {
|
|
71
|
-
return String(dateObj.getDate());
|
|
72
|
-
},
|
|
73
|
-
DD: function(dateObj) {
|
|
74
|
-
return pad(dateObj.getDate());
|
|
75
|
-
},
|
|
76
|
-
Do: function(dateObj, i18n) {
|
|
77
|
-
return i18n.DoFn(dateObj.getDate());
|
|
78
|
-
},
|
|
79
|
-
d: function(dateObj) {
|
|
80
|
-
return String(dateObj.getDay());
|
|
81
|
-
},
|
|
82
|
-
dd: function(dateObj) {
|
|
83
|
-
return pad(dateObj.getDay());
|
|
84
|
-
},
|
|
85
|
-
ddd: function(dateObj, i18n) {
|
|
86
|
-
return i18n.dayNamesShort[dateObj.getDay()];
|
|
87
|
-
},
|
|
88
|
-
dddd: function(dateObj, i18n) {
|
|
89
|
-
return i18n.dayNames[dateObj.getDay()];
|
|
90
|
-
},
|
|
91
|
-
M: function(dateObj) {
|
|
92
|
-
return String(dateObj.getMonth() + 1);
|
|
93
|
-
},
|
|
94
|
-
MM: function(dateObj) {
|
|
95
|
-
return pad(dateObj.getMonth() + 1);
|
|
96
|
-
},
|
|
97
|
-
MMM: function(dateObj, i18n) {
|
|
98
|
-
return i18n.monthNamesShort[dateObj.getMonth()];
|
|
99
|
-
},
|
|
100
|
-
MMMM: function(dateObj, i18n) {
|
|
101
|
-
return i18n.monthNames[dateObj.getMonth()];
|
|
102
|
-
},
|
|
103
|
-
YY: function(dateObj) {
|
|
104
|
-
return pad(String(dateObj.getFullYear()), 4).substr(2);
|
|
105
|
-
},
|
|
106
|
-
YYYY: function(dateObj) {
|
|
107
|
-
return pad(dateObj.getFullYear(), 4);
|
|
108
|
-
},
|
|
109
|
-
h: function(dateObj) {
|
|
110
|
-
return String(dateObj.getHours() % 12 || 12);
|
|
111
|
-
},
|
|
112
|
-
hh: function(dateObj) {
|
|
113
|
-
return pad(dateObj.getHours() % 12 || 12);
|
|
114
|
-
},
|
|
115
|
-
H: function(dateObj) {
|
|
116
|
-
return String(dateObj.getHours());
|
|
117
|
-
},
|
|
118
|
-
HH: function(dateObj) {
|
|
119
|
-
return pad(dateObj.getHours());
|
|
120
|
-
},
|
|
121
|
-
m: function(dateObj) {
|
|
122
|
-
return String(dateObj.getMinutes());
|
|
123
|
-
},
|
|
124
|
-
mm: function(dateObj) {
|
|
125
|
-
return pad(dateObj.getMinutes());
|
|
126
|
-
},
|
|
127
|
-
s: function(dateObj) {
|
|
128
|
-
return String(dateObj.getSeconds());
|
|
129
|
-
},
|
|
130
|
-
ss: function(dateObj) {
|
|
131
|
-
return pad(dateObj.getSeconds());
|
|
132
|
-
},
|
|
133
|
-
S: function(dateObj) {
|
|
134
|
-
return String(Math.round(dateObj.getMilliseconds() / 100));
|
|
135
|
-
},
|
|
136
|
-
SS: function(dateObj) {
|
|
137
|
-
return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
|
|
138
|
-
},
|
|
139
|
-
SSS: function(dateObj) {
|
|
140
|
-
return pad(dateObj.getMilliseconds(), 3);
|
|
141
|
-
},
|
|
142
|
-
a: function(dateObj, i18n) {
|
|
143
|
-
return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1];
|
|
144
|
-
},
|
|
145
|
-
A: function(dateObj, i18n) {
|
|
146
|
-
return dateObj.getHours() < 12 ? i18n.amPm[0].toUpperCase() : i18n.amPm[1].toUpperCase();
|
|
147
|
-
},
|
|
148
|
-
ZZ: function(dateObj) {
|
|
149
|
-
var offset = dateObj.getTimezoneOffset();
|
|
150
|
-
return (offset > 0 ? "-" : "+") + pad(Math.floor(Math.abs(offset) / 60) * 100 + Math.abs(offset) % 60, 4);
|
|
151
|
-
},
|
|
152
|
-
Z: function(dateObj) {
|
|
153
|
-
var offset = dateObj.getTimezoneOffset();
|
|
154
|
-
return (offset > 0 ? "-" : "+") + pad(Math.floor(Math.abs(offset) / 60), 2) + ":" + pad(Math.abs(offset) % 60, 2);
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
var globalMasks = {
|
|
158
|
-
default: "ddd MMM DD YYYY HH:mm:ss",
|
|
159
|
-
shortDate: "M/D/YY",
|
|
160
|
-
mediumDate: "MMM D, YYYY",
|
|
161
|
-
longDate: "MMMM D, YYYY",
|
|
162
|
-
fullDate: "dddd, MMMM D, YYYY",
|
|
163
|
-
isoDate: "YYYY-MM-DD",
|
|
164
|
-
isoDateTime: "YYYY-MM-DDTHH:mm:ssZ",
|
|
165
|
-
shortTime: "HH:mm",
|
|
166
|
-
mediumTime: "HH:mm:ss",
|
|
167
|
-
longTime: "HH:mm:ss.SSS"
|
|
168
|
-
};
|
|
169
|
-
var format = function(dateObj, mask, i18n) {
|
|
170
|
-
if (mask === void 0) {
|
|
171
|
-
mask = globalMasks["default"];
|
|
172
|
-
}
|
|
173
|
-
if (i18n === void 0) {
|
|
174
|
-
i18n = {};
|
|
175
|
-
}
|
|
176
|
-
if (typeof dateObj === "number") {
|
|
177
|
-
dateObj = new Date(dateObj);
|
|
178
|
-
}
|
|
179
|
-
if (Object.prototype.toString.call(dateObj) !== "[object Date]" || isNaN(dateObj.getTime())) {
|
|
180
|
-
throw new Error("Invalid Date pass to format");
|
|
181
|
-
}
|
|
182
|
-
mask = globalMasks[mask] || mask;
|
|
183
|
-
var literals = [];
|
|
184
|
-
mask = mask.replace(literal, function($0, $1) {
|
|
185
|
-
literals.push($1);
|
|
186
|
-
return "@@@";
|
|
187
|
-
});
|
|
188
|
-
var combinedI18nSettings = assign(assign({}, globalI18n), i18n);
|
|
189
|
-
mask = mask.replace(token, function($0) {
|
|
190
|
-
return formatFlags[$0](dateObj, combinedI18nSettings);
|
|
191
|
-
});
|
|
192
|
-
return mask.replace(/@@@/g, function() {
|
|
193
|
-
return literals.shift();
|
|
194
|
-
});
|
|
195
|
-
};
|
|
196
|
-
export {
|
|
197
|
-
assign,
|
|
198
|
-
defaultI18n,
|
|
199
|
-
format
|
|
200
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
const t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
|
|
7
|
-
class i {
|
|
8
|
-
constructor(t2) {
|
|
9
|
-
}
|
|
10
|
-
get _$AU() {
|
|
11
|
-
return this._$AM._$AU;
|
|
12
|
-
}
|
|
13
|
-
_$AT(t2, e2, i2) {
|
|
14
|
-
this._$Ct = t2, this._$AM = e2, this._$Ci = i2;
|
|
15
|
-
}
|
|
16
|
-
_$AS(t2, e2) {
|
|
17
|
-
return this.update(t2, e2);
|
|
18
|
-
}
|
|
19
|
-
update(t2, e2) {
|
|
20
|
-
return this.render(...e2);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
i as Directive,
|
|
25
|
-
t as PartType,
|
|
26
|
-
e as directive
|
|
27
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { noChange as T } from "../lit-html.js";
|
|
2
|
-
import { directive as e, Directive as i, PartType as t } from "../directive.js";
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright 2018 Google LLC
|
|
6
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
7
|
-
*/
|
|
8
|
-
const o = e(class extends i {
|
|
9
|
-
constructor(t$1) {
|
|
10
|
-
var i2;
|
|
11
|
-
if (super(t$1), t$1.type !== t.ATTRIBUTE || "class" !== t$1.name || (null === (i2 = t$1.strings) || void 0 === i2 ? void 0 : i2.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
12
|
-
}
|
|
13
|
-
render(t2) {
|
|
14
|
-
return " " + Object.keys(t2).filter((i2) => t2[i2]).join(" ") + " ";
|
|
15
|
-
}
|
|
16
|
-
update(i2, [s]) {
|
|
17
|
-
var r, o2;
|
|
18
|
-
if (void 0 === this.it) {
|
|
19
|
-
this.it = /* @__PURE__ */ new Set(), void 0 !== i2.strings && (this.nt = new Set(i2.strings.join(" ").split(/\s/).filter((t2) => "" !== t2)));
|
|
20
|
-
for (const t2 in s) s[t2] && !(null === (r = this.nt) || void 0 === r ? void 0 : r.has(t2)) && this.it.add(t2);
|
|
21
|
-
return this.render(s);
|
|
22
|
-
}
|
|
23
|
-
const e2 = i2.element.classList;
|
|
24
|
-
this.it.forEach((t2) => {
|
|
25
|
-
t2 in s || (e2.remove(t2), this.it.delete(t2));
|
|
26
|
-
});
|
|
27
|
-
for (const t2 in s) {
|
|
28
|
-
const i3 = !!s[t2];
|
|
29
|
-
i3 === this.it.has(t2) || (null === (o2 = this.nt) || void 0 === o2 ? void 0 : o2.has(t2)) || (i3 ? (e2.add(t2), this.it.add(t2)) : (e2.remove(t2), this.it.delete(t2)));
|
|
30
|
-
}
|
|
31
|
-
return T;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
export {
|
|
35
|
-
o as classMap
|
|
36
|
-
};
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
var t;
|
|
7
|
-
const i = window, s = i.trustedTypes, e = s ? s.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, o = "$lit$", n = `lit$${(Math.random() + "").slice(9)}$`, l = "?" + n, h = `<${l}>`, 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}*(?:[^
|
|
8
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y = /^(?:script|style|textarea|title)$/i, T = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), E = /* @__PURE__ */ new WeakMap(), C = r.createTreeWalker(r, 129, null, false);
|
|
9
|
-
function P(t2, i2) {
|
|
10
|
-
if (!Array.isArray(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
11
|
-
return void 0 !== e ? e.createHTML(i2) : i2;
|
|
12
|
-
}
|
|
13
|
-
const V = (t2, i2) => {
|
|
14
|
-
const s2 = t2.length - 1, e2 = [];
|
|
15
|
-
let l2, r2 = 2 === i2 ? "<svg>" : "", u2 = f;
|
|
16
|
-
for (let i3 = 0; i3 < s2; i3++) {
|
|
17
|
-
const s3 = t2[i3];
|
|
18
|
-
let d2, c2, v2 = -1, a2 = 0;
|
|
19
|
-
for (; a2 < s3.length && (u2.lastIndex = a2, c2 = u2.exec(s3), null !== c2); ) 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);
|
|
20
|
-
const w = u2 === p && t2[i3 + 1].startsWith("/>") ? " " : "";
|
|
21
|
-
r2 += u2 === f ? s3 + h : v2 >= 0 ? (e2.push(d2), s3.slice(0, v2) + o + s3.slice(v2) + n + w) : s3 + n + (-2 === v2 ? (e2.push(void 0), i3) : w);
|
|
22
|
-
}
|
|
23
|
-
return [P(t2, r2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : "")), e2];
|
|
24
|
-
};
|
|
25
|
-
class N {
|
|
26
|
-
constructor({ strings: t2, _$litType$: i2 }, e2) {
|
|
27
|
-
let h2;
|
|
28
|
-
this.parts = [];
|
|
29
|
-
let r2 = 0, d2 = 0;
|
|
30
|
-
const c2 = t2.length - 1, v2 = this.parts, [a2, f2] = V(t2, i2);
|
|
31
|
-
if (this.el = N.createElement(a2, e2), C.currentNode = this.el.content, 2 === i2) {
|
|
32
|
-
const t3 = this.el.content, i3 = t3.firstChild;
|
|
33
|
-
i3.remove(), t3.append(...i3.childNodes);
|
|
34
|
-
}
|
|
35
|
-
for (; null !== (h2 = C.nextNode()) && v2.length < c2; ) {
|
|
36
|
-
if (1 === h2.nodeType) {
|
|
37
|
-
if (h2.hasAttributes()) {
|
|
38
|
-
const t3 = [];
|
|
39
|
-
for (const i3 of h2.getAttributeNames()) if (i3.endsWith(o) || i3.startsWith(n)) {
|
|
40
|
-
const s2 = f2[d2++];
|
|
41
|
-
if (t3.push(i3), void 0 !== s2) {
|
|
42
|
-
const t4 = h2.getAttribute(s2.toLowerCase() + o).split(n), i4 = /([.?@])?(.*)/.exec(s2);
|
|
43
|
-
v2.push({ type: 1, index: r2, name: i4[2], strings: t4, ctor: "." === i4[1] ? H : "?" === i4[1] ? L : "@" === i4[1] ? z : k });
|
|
44
|
-
} else v2.push({ type: 6, index: r2 });
|
|
45
|
-
}
|
|
46
|
-
for (const i3 of t3) h2.removeAttribute(i3);
|
|
47
|
-
}
|
|
48
|
-
if (y.test(h2.tagName)) {
|
|
49
|
-
const t3 = h2.textContent.split(n), i3 = t3.length - 1;
|
|
50
|
-
if (i3 > 0) {
|
|
51
|
-
h2.textContent = s ? s.emptyScript : "";
|
|
52
|
-
for (let s2 = 0; s2 < i3; s2++) h2.append(t3[s2], u()), C.nextNode(), v2.push({ type: 2, index: ++r2 });
|
|
53
|
-
h2.append(t3[i3], u());
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
} else if (8 === h2.nodeType) if (h2.data === l) v2.push({ type: 2, index: r2 });
|
|
57
|
-
else {
|
|
58
|
-
let t3 = -1;
|
|
59
|
-
for (; -1 !== (t3 = h2.data.indexOf(n, t3 + 1)); ) v2.push({ type: 7, index: r2 }), t3 += n.length - 1;
|
|
60
|
-
}
|
|
61
|
-
r2++;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
static createElement(t2, i2) {
|
|
65
|
-
const s2 = r.createElement("template");
|
|
66
|
-
return s2.innerHTML = t2, s2;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function S(t2, i2, s2 = t2, e2) {
|
|
70
|
-
var o2, n2, l2, h2;
|
|
71
|
-
if (i2 === T) return i2;
|
|
72
|
-
let r2 = void 0 !== e2 ? null === (o2 = s2._$Co) || void 0 === o2 ? void 0 : o2[e2] : s2._$Cl;
|
|
73
|
-
const u2 = d(i2) ? void 0 : i2._$litDirective$;
|
|
74
|
-
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;
|
|
75
|
-
}
|
|
76
|
-
class M {
|
|
77
|
-
constructor(t2, i2) {
|
|
78
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
|
|
79
|
-
}
|
|
80
|
-
get parentNode() {
|
|
81
|
-
return this._$AM.parentNode;
|
|
82
|
-
}
|
|
83
|
-
get _$AU() {
|
|
84
|
-
return this._$AM._$AU;
|
|
85
|
-
}
|
|
86
|
-
u(t2) {
|
|
87
|
-
var i2;
|
|
88
|
-
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);
|
|
89
|
-
C.currentNode = o2;
|
|
90
|
-
let n2 = C.nextNode(), l2 = 0, h2 = 0, u2 = e2[0];
|
|
91
|
-
for (; void 0 !== u2; ) {
|
|
92
|
-
if (l2 === u2.index) {
|
|
93
|
-
let i3;
|
|
94
|
-
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];
|
|
95
|
-
}
|
|
96
|
-
l2 !== (null == u2 ? void 0 : u2.index) && (n2 = C.nextNode(), l2++);
|
|
97
|
-
}
|
|
98
|
-
return C.currentNode = r, o2;
|
|
99
|
-
}
|
|
100
|
-
v(t2) {
|
|
101
|
-
let i2 = 0;
|
|
102
|
-
for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
class R {
|
|
106
|
-
constructor(t2, i2, s2, e2) {
|
|
107
|
-
var o2;
|
|
108
|
-
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;
|
|
109
|
-
}
|
|
110
|
-
get _$AU() {
|
|
111
|
-
var t2, i2;
|
|
112
|
-
return null !== (i2 = null === (t2 = this._$AM) || void 0 === t2 ? void 0 : t2._$AU) && void 0 !== i2 ? i2 : this._$Cp;
|
|
113
|
-
}
|
|
114
|
-
get parentNode() {
|
|
115
|
-
let t2 = this._$AA.parentNode;
|
|
116
|
-
const i2 = this._$AM;
|
|
117
|
-
return void 0 !== i2 && 11 === (null == t2 ? void 0 : t2.nodeType) && (t2 = i2.parentNode), t2;
|
|
118
|
-
}
|
|
119
|
-
get startNode() {
|
|
120
|
-
return this._$AA;
|
|
121
|
-
}
|
|
122
|
-
get endNode() {
|
|
123
|
-
return this._$AB;
|
|
124
|
-
}
|
|
125
|
-
_$AI(t2, i2 = this) {
|
|
126
|
-
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);
|
|
127
|
-
}
|
|
128
|
-
k(t2) {
|
|
129
|
-
return this._$AA.parentNode.insertBefore(t2, this._$AB);
|
|
130
|
-
}
|
|
131
|
-
$(t2) {
|
|
132
|
-
this._$AH !== t2 && (this._$AR(), this._$AH = this.k(t2));
|
|
133
|
-
}
|
|
134
|
-
_(t2) {
|
|
135
|
-
this._$AH !== A && d(this._$AH) ? this._$AA.nextSibling.data = t2 : this.$(r.createTextNode(t2)), this._$AH = t2;
|
|
136
|
-
}
|
|
137
|
-
g(t2) {
|
|
138
|
-
var i2;
|
|
139
|
-
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);
|
|
140
|
-
if ((null === (i2 = this._$AH) || void 0 === i2 ? void 0 : i2._$AD) === o2) this._$AH.v(s2);
|
|
141
|
-
else {
|
|
142
|
-
const t3 = new M(o2, this), i3 = t3.u(this.options);
|
|
143
|
-
t3.v(s2), this.$(i3), this._$AH = t3;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
_$AC(t2) {
|
|
147
|
-
let i2 = E.get(t2.strings);
|
|
148
|
-
return void 0 === i2 && E.set(t2.strings, i2 = new N(t2)), i2;
|
|
149
|
-
}
|
|
150
|
-
T(t2) {
|
|
151
|
-
c(this._$AH) || (this._$AH = [], this._$AR());
|
|
152
|
-
const i2 = this._$AH;
|
|
153
|
-
let s2, e2 = 0;
|
|
154
|
-
for (const o2 of t2) e2 === i2.length ? i2.push(s2 = new R(this.k(u()), this.k(u()), this, this.options)) : s2 = i2[e2], s2._$AI(o2), e2++;
|
|
155
|
-
e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
|
|
156
|
-
}
|
|
157
|
-
_$AR(t2 = this._$AA.nextSibling, i2) {
|
|
158
|
-
var s2;
|
|
159
|
-
for (null === (s2 = this._$AP) || void 0 === s2 || s2.call(this, false, true, i2); t2 && t2 !== this._$AB; ) {
|
|
160
|
-
const i3 = t2.nextSibling;
|
|
161
|
-
t2.remove(), t2 = i3;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
setConnected(t2) {
|
|
165
|
-
var i2;
|
|
166
|
-
void 0 === this._$AM && (this._$Cp = t2, null === (i2 = this._$AP) || void 0 === i2 || i2.call(this, t2));
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
class k {
|
|
170
|
-
constructor(t2, i2, s2, e2, o2) {
|
|
171
|
-
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;
|
|
172
|
-
}
|
|
173
|
-
get tagName() {
|
|
174
|
-
return this.element.tagName;
|
|
175
|
-
}
|
|
176
|
-
get _$AU() {
|
|
177
|
-
return this._$AM._$AU;
|
|
178
|
-
}
|
|
179
|
-
_$AI(t2, i2 = this, s2, e2) {
|
|
180
|
-
const o2 = this.strings;
|
|
181
|
-
let n2 = false;
|
|
182
|
-
if (void 0 === o2) t2 = S(this, t2, i2, 0), n2 = !d(t2) || t2 !== this._$AH && t2 !== T, n2 && (this._$AH = t2);
|
|
183
|
-
else {
|
|
184
|
-
const e3 = t2;
|
|
185
|
-
let l2, h2;
|
|
186
|
-
for (t2 = o2[0], l2 = 0; l2 < o2.length - 1; l2++) 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;
|
|
187
|
-
}
|
|
188
|
-
n2 && !e2 && this.j(t2);
|
|
189
|
-
}
|
|
190
|
-
j(t2) {
|
|
191
|
-
t2 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t2 ? t2 : "");
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
class H extends k {
|
|
195
|
-
constructor() {
|
|
196
|
-
super(...arguments), this.type = 3;
|
|
197
|
-
}
|
|
198
|
-
j(t2) {
|
|
199
|
-
this.element[this.name] = t2 === A ? void 0 : t2;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
const I = s ? s.emptyScript : "";
|
|
203
|
-
class L extends k {
|
|
204
|
-
constructor() {
|
|
205
|
-
super(...arguments), this.type = 4;
|
|
206
|
-
}
|
|
207
|
-
j(t2) {
|
|
208
|
-
t2 && t2 !== A ? this.element.setAttribute(this.name, I) : this.element.removeAttribute(this.name);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
class z extends k {
|
|
212
|
-
constructor(t2, i2, s2, e2, o2) {
|
|
213
|
-
super(t2, i2, s2, e2, o2), this.type = 5;
|
|
214
|
-
}
|
|
215
|
-
_$AI(t2, i2 = this) {
|
|
216
|
-
var s2;
|
|
217
|
-
if ((t2 = null !== (s2 = S(this, t2, i2, 0)) && void 0 !== s2 ? s2 : A) === T) return;
|
|
218
|
-
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);
|
|
219
|
-
o2 && this.element.removeEventListener(this.name, this, e2), n2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
|
|
220
|
-
}
|
|
221
|
-
handleEvent(t2) {
|
|
222
|
-
var i2, s2;
|
|
223
|
-
"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);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
class Z {
|
|
227
|
-
constructor(t2, i2, s2) {
|
|
228
|
-
this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
|
|
229
|
-
}
|
|
230
|
-
get _$AU() {
|
|
231
|
-
return this._$AM._$AU;
|
|
232
|
-
}
|
|
233
|
-
_$AI(t2) {
|
|
234
|
-
S(this, t2);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
const B = i.litHtmlPolyfillSupport;
|
|
238
|
-
null == B || B(N, R), (null !== (t = i.litHtmlVersions) && void 0 !== t ? t : i.litHtmlVersions = []).push("2.8.0");
|
|
239
|
-
export {
|
|
240
|
-
T as noChange,
|
|
241
|
-
A as nothing
|
|
242
|
-
};
|