mealz-components 0.1.1 → 0.2.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.
@@ -3,10 +3,10 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const R = globalThis, V = R.ShadowRoot && (R.ShadyCSS === void 0 || R.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, q = Symbol(), W = /* @__PURE__ */ new WeakMap();
7
- let ot = class {
8
- constructor(t, e, s) {
9
- if (this._$cssResult$ = !0, s !== q)
6
+ const N = globalThis, V = N.ShadowRoot && (N.ShadyCSS === void 0 || N.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, F = Symbol(), W = /* @__PURE__ */ new WeakMap();
7
+ let nt = class {
8
+ constructor(t, e, i) {
9
+ if (this._$cssResult$ = !0, i !== F)
10
10
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
11
11
  this.cssText = t, this.t = e;
12
12
  }
@@ -14,8 +14,8 @@ let ot = class {
14
14
  let t = this.o;
15
15
  const e = this.t;
16
16
  if (V && t === void 0) {
17
- const s = e !== void 0 && e.length === 1;
18
- s && (t = W.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && W.set(e, t));
17
+ const i = e !== void 0 && e.length === 1;
18
+ i && (t = W.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && W.set(e, t));
19
19
  }
20
20
  return t;
21
21
  }
@@ -23,65 +23,65 @@ let ot = class {
23
23
  return this.cssText;
24
24
  }
25
25
  };
26
- const pt = (o) => new ot(typeof o == "string" ? o : o + "", void 0, q), ct = (o, ...t) => {
27
- const e = o.length === 1 ? o[0] : t.reduce((s, i, r) => s + ((n) => {
26
+ const dt = (s) => new nt(typeof s == "string" ? s : s + "", void 0, F), ct = (s, ...t) => {
27
+ const e = s.length === 1 ? s[0] : t.reduce((i, o, r) => i + ((n) => {
28
28
  if (n._$cssResult$ === !0)
29
29
  return n.cssText;
30
30
  if (typeof n == "number")
31
31
  return n;
32
32
  throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
33
- })(i) + o[r + 1], o[0]);
34
- return new ot(e, o, q);
35
- }, ut = (o, t) => {
33
+ })(o) + s[r + 1], s[0]);
34
+ return new nt(e, s, F);
35
+ }, ut = (s, t) => {
36
36
  if (V)
37
- o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
37
+ s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
38
38
  else
39
39
  for (const e of t) {
40
- const s = document.createElement("style"), i = R.litNonce;
41
- i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s);
40
+ const i = document.createElement("style"), o = N.litNonce;
41
+ o !== void 0 && i.setAttribute("nonce", o), i.textContent = e.cssText, s.appendChild(i);
42
42
  }
43
- }, F = V ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
43
+ }, G = V ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
44
44
  let e = "";
45
- for (const s of t.cssRules)
46
- e += s.cssText;
47
- return pt(e);
48
- })(o) : o;
45
+ for (const i of t.cssRules)
46
+ e += i.cssText;
47
+ return dt(e);
48
+ })(s) : s;
49
49
  /**
50
50
  * @license
51
51
  * Copyright 2017 Google LLC
52
52
  * SPDX-License-Identifier: BSD-3-Clause
53
53
  */
54
- const { is: mt, defineProperty: ft, getOwnPropertyDescriptor: gt, getOwnPropertyNames: $t, getOwnPropertySymbols: _t, getPrototypeOf: yt } = Object, g = globalThis, Z = g.trustedTypes, vt = Z ? Z.emptyScript : "", z = g.reactiveElementPolyfillSupport, E = (o, t) => o, L = { toAttribute(o, t) {
54
+ const { is: mt, defineProperty: gt, getOwnPropertyDescriptor: ft, getOwnPropertyNames: _t, getOwnPropertySymbols: $t, getPrototypeOf: bt } = Object, b = globalThis, Z = b.trustedTypes, yt = Z ? Z.emptyScript : "", z = b.reactiveElementPolyfillSupport, P = (s, t) => s, I = { toAttribute(s, t) {
55
55
  switch (t) {
56
56
  case Boolean:
57
- o = o ? vt : null;
57
+ s = s ? yt : null;
58
58
  break;
59
59
  case Object:
60
60
  case Array:
61
- o = o == null ? o : JSON.stringify(o);
61
+ s = s == null ? s : JSON.stringify(s);
62
62
  }
63
- return o;
64
- }, fromAttribute(o, t) {
65
- let e = o;
63
+ return s;
64
+ }, fromAttribute(s, t) {
65
+ let e = s;
66
66
  switch (t) {
67
67
  case Boolean:
68
- e = o !== null;
68
+ e = s !== null;
69
69
  break;
70
70
  case Number:
71
- e = o === null ? null : Number(o);
71
+ e = s === null ? null : Number(s);
72
72
  break;
73
73
  case Object:
74
74
  case Array:
75
75
  try {
76
- e = JSON.parse(o);
76
+ e = JSON.parse(s);
77
77
  } catch {
78
78
  e = null;
79
79
  }
80
80
  }
81
81
  return e;
82
- } }, J = (o, t) => !mt(o, t), K = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: J };
83
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), g.litPropertyMetadata ?? (g.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
84
- class b extends HTMLElement {
82
+ } }, J = (s, t) => !mt(s, t), K = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: J };
83
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), b.litPropertyMetadata ?? (b.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
84
+ class w extends HTMLElement {
85
85
  static addInitializer(t) {
86
86
  this._$Ei(), (this.l ?? (this.l = [])).push(t);
87
87
  }
@@ -90,67 +90,67 @@ class b extends HTMLElement {
90
90
  }
91
91
  static createProperty(t, e = K) {
92
92
  if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
93
- const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
94
- i !== void 0 && ft(this.prototype, t, i);
93
+ const i = Symbol(), o = this.getPropertyDescriptor(t, i, e);
94
+ o !== void 0 && gt(this.prototype, t, o);
95
95
  }
96
96
  }
97
- static getPropertyDescriptor(t, e, s) {
98
- const { get: i, set: r } = gt(this.prototype, t) ?? { get() {
97
+ static getPropertyDescriptor(t, e, i) {
98
+ const { get: o, set: r } = ft(this.prototype, t) ?? { get() {
99
99
  return this[e];
100
100
  }, set(n) {
101
101
  this[e] = n;
102
102
  } };
103
103
  return { get() {
104
- return i == null ? void 0 : i.call(this);
104
+ return o == null ? void 0 : o.call(this);
105
105
  }, set(n) {
106
- const l = i == null ? void 0 : i.call(this);
107
- r.call(this, n), this.requestUpdate(t, l, s);
106
+ const l = o == null ? void 0 : o.call(this);
107
+ r.call(this, n), this.requestUpdate(t, l, i);
108
108
  }, configurable: !0, enumerable: !0 };
109
109
  }
110
110
  static getPropertyOptions(t) {
111
111
  return this.elementProperties.get(t) ?? K;
112
112
  }
113
113
  static _$Ei() {
114
- if (this.hasOwnProperty(E("elementProperties")))
114
+ if (this.hasOwnProperty(P("elementProperties")))
115
115
  return;
116
- const t = yt(this);
116
+ const t = bt(this);
117
117
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
118
118
  }
119
119
  static finalize() {
120
- if (this.hasOwnProperty(E("finalized")))
120
+ if (this.hasOwnProperty(P("finalized")))
121
121
  return;
122
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(E("properties"))) {
123
- const e = this.properties, s = [...$t(e), ..._t(e)];
124
- for (const i of s)
125
- this.createProperty(i, e[i]);
122
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
123
+ const e = this.properties, i = [..._t(e), ...$t(e)];
124
+ for (const o of i)
125
+ this.createProperty(o, e[o]);
126
126
  }
127
127
  const t = this[Symbol.metadata];
128
128
  if (t !== null) {
129
129
  const e = litPropertyMetadata.get(t);
130
130
  if (e !== void 0)
131
- for (const [s, i] of e)
132
- this.elementProperties.set(s, i);
131
+ for (const [i, o] of e)
132
+ this.elementProperties.set(i, o);
133
133
  }
134
134
  this._$Eh = /* @__PURE__ */ new Map();
135
- for (const [e, s] of this.elementProperties) {
136
- const i = this._$Eu(e, s);
137
- i !== void 0 && this._$Eh.set(i, e);
135
+ for (const [e, i] of this.elementProperties) {
136
+ const o = this._$Eu(e, i);
137
+ o !== void 0 && this._$Eh.set(o, e);
138
138
  }
139
139
  this.elementStyles = this.finalizeStyles(this.styles);
140
140
  }
141
141
  static finalizeStyles(t) {
142
142
  const e = [];
143
143
  if (Array.isArray(t)) {
144
- const s = new Set(t.flat(1 / 0).reverse());
145
- for (const i of s)
146
- e.unshift(F(i));
144
+ const i = new Set(t.flat(1 / 0).reverse());
145
+ for (const o of i)
146
+ e.unshift(G(o));
147
147
  } else
148
- t !== void 0 && e.push(F(t));
148
+ t !== void 0 && e.push(G(t));
149
149
  return e;
150
150
  }
151
151
  static _$Eu(t, e) {
152
- const s = e.attribute;
153
- return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
152
+ const i = e.attribute;
153
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
154
154
  }
155
155
  constructor() {
156
156
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
@@ -169,8 +169,8 @@ class b extends HTMLElement {
169
169
  }
170
170
  _$E_() {
171
171
  const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
172
- for (const s of e.keys())
173
- this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
172
+ for (const i of e.keys())
173
+ this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
174
174
  t.size > 0 && (this._$Ep = t);
175
175
  }
176
176
  createRenderRoot() {
@@ -180,8 +180,8 @@ class b extends HTMLElement {
180
180
  connectedCallback() {
181
181
  var t;
182
182
  this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
183
- var s;
184
- return (s = e.hostConnected) == null ? void 0 : s.call(e);
183
+ var i;
184
+ return (i = e.hostConnected) == null ? void 0 : i.call(e);
185
185
  });
186
186
  }
187
187
  enableUpdating(t) {
@@ -189,39 +189,39 @@ class b extends HTMLElement {
189
189
  disconnectedCallback() {
190
190
  var t;
191
191
  (t = this._$EO) == null || t.forEach((e) => {
192
- var s;
193
- return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
192
+ var i;
193
+ return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
194
194
  });
195
195
  }
196
- attributeChangedCallback(t, e, s) {
197
- this._$AK(t, s);
196
+ attributeChangedCallback(t, e, i) {
197
+ this._$AK(t, i);
198
198
  }
199
199
  _$EC(t, e) {
200
200
  var r;
201
- const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
202
- if (i !== void 0 && s.reflect === !0) {
203
- const n = (((r = s.converter) == null ? void 0 : r.toAttribute) !== void 0 ? s.converter : L).toAttribute(e, s.type);
204
- this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
201
+ const i = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, i);
202
+ if (o !== void 0 && i.reflect === !0) {
203
+ const n = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : I).toAttribute(e, i.type);
204
+ this._$Em = t, n == null ? this.removeAttribute(o) : this.setAttribute(o, n), this._$Em = null;
205
205
  }
206
206
  }
207
207
  _$AK(t, e) {
208
208
  var r;
209
- const s = this.constructor, i = s._$Eh.get(t);
210
- if (i !== void 0 && this._$Em !== i) {
211
- const n = s.getPropertyOptions(i), l = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((r = n.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? n.converter : L;
212
- this._$Em = i, this[i] = l.fromAttribute(e, n.type), this._$Em = null;
209
+ const i = this.constructor, o = i._$Eh.get(t);
210
+ if (o !== void 0 && this._$Em !== o) {
211
+ const n = i.getPropertyOptions(o), l = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((r = n.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? n.converter : I;
212
+ this._$Em = o, this[o] = l.fromAttribute(e, n.type), this._$Em = null;
213
213
  }
214
214
  }
215
- requestUpdate(t, e, s) {
215
+ requestUpdate(t, e, i) {
216
216
  if (t !== void 0) {
217
- if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? J)(this[t], e))
217
+ if (i ?? (i = this.constructor.getPropertyOptions(t)), !(i.hasChanged ?? J)(this[t], e))
218
218
  return;
219
- this.P(t, e, s);
219
+ this.P(t, e, i);
220
220
  }
221
221
  this.isUpdatePending === !1 && (this._$ES = this._$ET());
222
222
  }
223
- P(t, e, s) {
224
- this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
223
+ P(t, e, i) {
224
+ this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
225
225
  }
226
226
  async _$ET() {
227
227
  this.isUpdatePending = !0;
@@ -237,7 +237,7 @@ class b extends HTMLElement {
237
237
  return this.performUpdate();
238
238
  }
239
239
  performUpdate() {
240
- var s;
240
+ var i;
241
241
  if (!this.isUpdatePending)
242
242
  return;
243
243
  if (!this.hasUpdated) {
@@ -246,20 +246,20 @@ class b extends HTMLElement {
246
246
  this[r] = n;
247
247
  this._$Ep = void 0;
248
248
  }
249
- const i = this.constructor.elementProperties;
250
- if (i.size > 0)
251
- for (const [r, n] of i)
249
+ const o = this.constructor.elementProperties;
250
+ if (o.size > 0)
251
+ for (const [r, n] of o)
252
252
  n.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.P(r, this[r], n);
253
253
  }
254
254
  let t = !1;
255
255
  const e = this._$AL;
256
256
  try {
257
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((i) => {
257
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((o) => {
258
258
  var r;
259
- return (r = i.hostUpdate) == null ? void 0 : r.call(i);
259
+ return (r = o.hostUpdate) == null ? void 0 : r.call(o);
260
260
  }), this.update(e)) : this._$EU();
261
- } catch (i) {
262
- throw t = !1, this._$EU(), i;
261
+ } catch (o) {
262
+ throw t = !1, this._$EU(), o;
263
263
  }
264
264
  t && this._$AE(e);
265
265
  }
@@ -267,9 +267,9 @@ class b extends HTMLElement {
267
267
  }
268
268
  _$AE(t) {
269
269
  var e;
270
- (e = this._$EO) == null || e.forEach((s) => {
271
- var i;
272
- return (i = s.hostUpdated) == null ? void 0 : i.call(s);
270
+ (e = this._$EO) == null || e.forEach((i) => {
271
+ var o;
272
+ return (o = i.hostUpdated) == null ? void 0 : o.call(i);
273
273
  }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
274
274
  }
275
275
  _$EU() {
@@ -292,86 +292,86 @@ class b extends HTMLElement {
292
292
  firstUpdated(t) {
293
293
  }
294
294
  }
295
- b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[E("elementProperties")] = /* @__PURE__ */ new Map(), b[E("finalized")] = /* @__PURE__ */ new Map(), z == null || z({ ReactiveElement: b }), (g.reactiveElementVersions ?? (g.reactiveElementVersions = [])).push("2.0.4");
295
+ w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, w[P("elementProperties")] = /* @__PURE__ */ new Map(), w[P("finalized")] = /* @__PURE__ */ new Map(), z == null || z({ ReactiveElement: w }), (b.reactiveElementVersions ?? (b.reactiveElementVersions = [])).push("2.0.4");
296
296
  /**
297
297
  * @license
298
298
  * Copyright 2017 Google LLC
299
299
  * SPDX-License-Identifier: BSD-3-Clause
300
300
  */
301
- const S = globalThis, N = S.trustedTypes, Y = N ? N.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, nt = "$lit$", f = `lit$${(Math.random() + "").slice(9)}$`, rt = "?" + f, bt = `<${rt}>`, y = document, P = () => y.createComment(""), U = (o) => o === null || typeof o != "object" && typeof o != "function", at = Array.isArray, At = (o) => at(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", D = `[
302
- \f\r]`, x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, G = /-->/g, Q = />/g, $ = RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
303
- \f\r"'\`<>=]|("|')|))|$)`, "g"), X = /'/g, tt = /"/g, lt = /^(?:script|style|textarea|title)$/i, wt = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), k = wt(1), A = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), et = /* @__PURE__ */ new WeakMap(), _ = y.createTreeWalker(y, 129);
304
- function ht(o, t) {
305
- if (!Array.isArray(o) || !o.hasOwnProperty("raw"))
301
+ const L = globalThis, B = L.trustedTypes, Y = B ? B.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, rt = "$lit$", $ = `lit$${(Math.random() + "").slice(9)}$`, at = "?" + $, vt = `<${at}>`, A = document, U = () => A.createComment(""), M = (s) => s === null || typeof s != "object" && typeof s != "function", lt = Array.isArray, xt = (s) => lt(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", D = `[
302
+ \f\r]`, C = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Q = /-->/g, X = />/g, v = RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
303
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), tt = /'/g, et = /"/g, pt = /^(?:script|style|textarea|title)$/i, At = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), u = At(1), S = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), st = /* @__PURE__ */ new WeakMap(), x = A.createTreeWalker(A, 129);
304
+ function ht(s, t) {
305
+ if (!Array.isArray(s) || !s.hasOwnProperty("raw"))
306
306
  throw Error("invalid template strings array");
307
307
  return Y !== void 0 ? Y.createHTML(t) : t;
308
308
  }
309
- const xt = (o, t) => {
310
- const e = o.length - 1, s = [];
311
- let i, r = t === 2 ? "<svg>" : "", n = x;
309
+ const wt = (s, t) => {
310
+ const e = s.length - 1, i = [];
311
+ let o, r = t === 2 ? "<svg>" : "", n = C;
312
312
  for (let l = 0; l < e; l++) {
313
- const a = o[l];
314
- let d, c, h = -1, u = 0;
315
- for (; u < a.length && (n.lastIndex = u, c = n.exec(a), c !== null); )
316
- u = n.lastIndex, n === x ? c[1] === "!--" ? n = G : c[1] !== void 0 ? n = Q : c[2] !== void 0 ? (lt.test(c[2]) && (i = RegExp("</" + c[2], "g")), n = $) : c[3] !== void 0 && (n = $) : n === $ ? c[0] === ">" ? (n = i ?? x, h = -1) : c[1] === void 0 ? h = -2 : (h = n.lastIndex - c[2].length, d = c[1], n = c[3] === void 0 ? $ : c[3] === '"' ? tt : X) : n === tt || n === X ? n = $ : n === G || n === Q ? n = x : (n = $, i = void 0);
317
- const m = n === $ && o[l + 1].startsWith("/>") ? " " : "";
318
- r += n === x ? a + bt : h >= 0 ? (s.push(d), a.slice(0, h) + nt + a.slice(h) + f + m) : a + f + (h === -2 ? l : m);
319
- }
320
- return [ht(o, r + (o[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
313
+ const a = s[l];
314
+ let h, c, p = -1, f = 0;
315
+ for (; f < a.length && (n.lastIndex = f, c = n.exec(a), c !== null); )
316
+ f = n.lastIndex, n === C ? c[1] === "!--" ? n = Q : c[1] !== void 0 ? n = X : c[2] !== void 0 ? (pt.test(c[2]) && (o = RegExp("</" + c[2], "g")), n = v) : c[3] !== void 0 && (n = v) : n === v ? c[0] === ">" ? (n = o ?? C, p = -1) : c[1] === void 0 ? p = -2 : (p = n.lastIndex - c[2].length, h = c[1], n = c[3] === void 0 ? v : c[3] === '"' ? et : tt) : n === et || n === tt ? n = v : n === Q || n === X ? n = C : (n = v, o = void 0);
317
+ const _ = n === v && s[l + 1].startsWith("/>") ? " " : "";
318
+ r += n === C ? a + vt : p >= 0 ? (i.push(h), a.slice(0, p) + rt + a.slice(p) + $ + _) : a + $ + (p === -2 ? l : _);
319
+ }
320
+ return [ht(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
321
321
  };
322
- class T {
323
- constructor({ strings: t, _$litType$: e }, s) {
324
- let i;
322
+ class R {
323
+ constructor({ strings: t, _$litType$: e }, i) {
324
+ let o;
325
325
  this.parts = [];
326
326
  let r = 0, n = 0;
327
- const l = t.length - 1, a = this.parts, [d, c] = xt(t, e);
328
- if (this.el = T.createElement(d, s), _.currentNode = this.el.content, e === 2) {
329
- const h = this.el.content.firstChild;
330
- h.replaceWith(...h.childNodes);
327
+ const l = t.length - 1, a = this.parts, [h, c] = wt(t, e);
328
+ if (this.el = R.createElement(h, i), x.currentNode = this.el.content, e === 2) {
329
+ const p = this.el.content.firstChild;
330
+ p.replaceWith(...p.childNodes);
331
331
  }
332
- for (; (i = _.nextNode()) !== null && a.length < l; ) {
333
- if (i.nodeType === 1) {
334
- if (i.hasAttributes())
335
- for (const h of i.getAttributeNames())
336
- if (h.endsWith(nt)) {
337
- const u = c[n++], m = i.getAttribute(h).split(f), M = /([.?@])?(.*)/.exec(u);
338
- a.push({ type: 1, index: r, name: M[2], strings: m, ctor: M[1] === "." ? St : M[1] === "?" ? Ct : M[1] === "@" ? Pt : H }), i.removeAttribute(h);
332
+ for (; (o = x.nextNode()) !== null && a.length < l; ) {
333
+ if (o.nodeType === 1) {
334
+ if (o.hasAttributes())
335
+ for (const p of o.getAttributeNames())
336
+ if (p.endsWith(rt)) {
337
+ const f = c[n++], _ = o.getAttribute(p).split($), O = /([.?@])?(.*)/.exec(f);
338
+ a.push({ type: 1, index: r, name: O[2], strings: _, ctor: O[1] === "." ? Et : O[1] === "?" ? Ct : O[1] === "@" ? Pt : H }), o.removeAttribute(p);
339
339
  } else
340
- h.startsWith(f) && (a.push({ type: 6, index: r }), i.removeAttribute(h));
341
- if (lt.test(i.tagName)) {
342
- const h = i.textContent.split(f), u = h.length - 1;
343
- if (u > 0) {
344
- i.textContent = N ? N.emptyScript : "";
345
- for (let m = 0; m < u; m++)
346
- i.append(h[m], P()), _.nextNode(), a.push({ type: 2, index: ++r });
347
- i.append(h[u], P());
340
+ p.startsWith($) && (a.push({ type: 6, index: r }), o.removeAttribute(p));
341
+ if (pt.test(o.tagName)) {
342
+ const p = o.textContent.split($), f = p.length - 1;
343
+ if (f > 0) {
344
+ o.textContent = B ? B.emptyScript : "";
345
+ for (let _ = 0; _ < f; _++)
346
+ o.append(p[_], U()), x.nextNode(), a.push({ type: 2, index: ++r });
347
+ o.append(p[f], U());
348
348
  }
349
349
  }
350
- } else if (i.nodeType === 8)
351
- if (i.data === rt)
350
+ } else if (o.nodeType === 8)
351
+ if (o.data === at)
352
352
  a.push({ type: 2, index: r });
353
353
  else {
354
- let h = -1;
355
- for (; (h = i.data.indexOf(f, h + 1)) !== -1; )
356
- a.push({ type: 7, index: r }), h += f.length - 1;
354
+ let p = -1;
355
+ for (; (p = o.data.indexOf($, p + 1)) !== -1; )
356
+ a.push({ type: 7, index: r }), p += $.length - 1;
357
357
  }
358
358
  r++;
359
359
  }
360
360
  }
361
361
  static createElement(t, e) {
362
- const s = y.createElement("template");
363
- return s.innerHTML = t, s;
362
+ const i = A.createElement("template");
363
+ return i.innerHTML = t, i;
364
364
  }
365
365
  }
366
- function w(o, t, e = o, s) {
366
+ function E(s, t, e = s, i) {
367
367
  var n, l;
368
- if (t === A)
368
+ if (t === S)
369
369
  return t;
370
- let i = s !== void 0 ? (n = e._$Co) == null ? void 0 : n[s] : e._$Cl;
371
- const r = U(t) ? void 0 : t._$litDirective$;
372
- return (i == null ? void 0 : i.constructor) !== r && ((l = i == null ? void 0 : i._$AO) == null || l.call(i, !1), r === void 0 ? i = void 0 : (i = new r(o), i._$AT(o, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = w(o, i._$AS(o, t.values), i, s)), t;
370
+ let o = i !== void 0 ? (n = e._$Co) == null ? void 0 : n[i] : e._$Cl;
371
+ const r = M(t) ? void 0 : t._$litDirective$;
372
+ return (o == null ? void 0 : o.constructor) !== r && ((l = o == null ? void 0 : o._$AO) == null || l.call(o, !1), r === void 0 ? o = void 0 : (o = new r(s), o._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = o : e._$Cl = o), o !== void 0 && (t = E(s, o._$AS(s, t.values), o, i)), t;
373
373
  }
374
- class Et {
374
+ class St {
375
375
  constructor(t, e) {
376
376
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
377
377
  }
@@ -382,31 +382,31 @@ class Et {
382
382
  return this._$AM._$AU;
383
383
  }
384
384
  u(t) {
385
- const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? y).importNode(e, !0);
386
- _.currentNode = i;
387
- let r = _.nextNode(), n = 0, l = 0, a = s[0];
385
+ const { el: { content: e }, parts: i } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? A).importNode(e, !0);
386
+ x.currentNode = o;
387
+ let r = x.nextNode(), n = 0, l = 0, a = i[0];
388
388
  for (; a !== void 0; ) {
389
389
  if (n === a.index) {
390
- let d;
391
- a.type === 2 ? d = new O(r, r.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (d = new Ut(r, this, t)), this._$AV.push(d), a = s[++l];
390
+ let h;
391
+ a.type === 2 ? h = new k(r, r.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (h = new Lt(r, this, t)), this._$AV.push(h), a = i[++l];
392
392
  }
393
- n !== (a == null ? void 0 : a.index) && (r = _.nextNode(), n++);
393
+ n !== (a == null ? void 0 : a.index) && (r = x.nextNode(), n++);
394
394
  }
395
- return _.currentNode = y, i;
395
+ return x.currentNode = A, o;
396
396
  }
397
397
  p(t) {
398
398
  let e = 0;
399
- for (const s of this._$AV)
400
- s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
399
+ for (const i of this._$AV)
400
+ i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
401
401
  }
402
402
  }
403
- class O {
403
+ class k {
404
404
  get _$AU() {
405
405
  var t;
406
406
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
407
407
  }
408
- constructor(t, e, s, i) {
409
- this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
408
+ constructor(t, e, i, o) {
409
+ this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = o, this._$Cv = (o == null ? void 0 : o.isConnected) ?? !0;
410
410
  }
411
411
  get parentNode() {
412
412
  let t = this._$AA.parentNode;
@@ -420,7 +420,7 @@ class O {
420
420
  return this._$AB;
421
421
  }
422
422
  _$AI(t, e = this) {
423
- t = w(this, t, e), U(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== A && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : At(t) ? this.k(t) : this._(t);
423
+ t = E(this, t, e), M(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : xt(t) ? this.k(t) : this._(t);
424
424
  }
425
425
  S(t) {
426
426
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -429,35 +429,35 @@ class O {
429
429
  this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
430
430
  }
431
431
  _(t) {
432
- this._$AH !== p && U(this._$AH) ? this._$AA.nextSibling.data = t : this.T(y.createTextNode(t)), this._$AH = t;
432
+ this._$AH !== d && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
433
433
  }
434
434
  $(t) {
435
435
  var r;
436
- const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = T.createElement(ht(s.h, s.h[0]), this.options)), s);
437
- if (((r = this._$AH) == null ? void 0 : r._$AD) === i)
436
+ const { values: e, _$litType$: i } = t, o = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = R.createElement(ht(i.h, i.h[0]), this.options)), i);
437
+ if (((r = this._$AH) == null ? void 0 : r._$AD) === o)
438
438
  this._$AH.p(e);
439
439
  else {
440
- const n = new Et(i, this), l = n.u(this.options);
440
+ const n = new St(o, this), l = n.u(this.options);
441
441
  n.p(e), this.T(l), this._$AH = n;
442
442
  }
443
443
  }
444
444
  _$AC(t) {
445
- let e = et.get(t.strings);
446
- return e === void 0 && et.set(t.strings, e = new T(t)), e;
445
+ let e = st.get(t.strings);
446
+ return e === void 0 && st.set(t.strings, e = new R(t)), e;
447
447
  }
448
448
  k(t) {
449
- at(this._$AH) || (this._$AH = [], this._$AR());
449
+ lt(this._$AH) || (this._$AH = [], this._$AR());
450
450
  const e = this._$AH;
451
- let s, i = 0;
451
+ let i, o = 0;
452
452
  for (const r of t)
453
- i === e.length ? e.push(s = new O(this.S(P()), this.S(P()), this, this.options)) : s = e[i], s._$AI(r), i++;
454
- i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
453
+ o === e.length ? e.push(i = new k(this.S(U()), this.S(U()), this, this.options)) : i = e[o], i._$AI(r), o++;
454
+ o < e.length && (this._$AR(i && i._$AB.nextSibling, o), e.length = o);
455
455
  }
456
456
  _$AR(t = this._$AA.nextSibling, e) {
457
- var s;
458
- for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
459
- const i = t.nextSibling;
460
- t.remove(), t = i;
457
+ var i;
458
+ for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t && t !== this._$AB; ) {
459
+ const o = t.nextSibling;
460
+ t.remove(), t = o;
461
461
  }
462
462
  }
463
463
  setConnected(t) {
@@ -472,32 +472,32 @@ class H {
472
472
  get _$AU() {
473
473
  return this._$AM._$AU;
474
474
  }
475
- constructor(t, e, s, i, r) {
476
- this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = p;
475
+ constructor(t, e, i, o, r) {
476
+ this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = o, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = d;
477
477
  }
478
- _$AI(t, e = this, s, i) {
478
+ _$AI(t, e = this, i, o) {
479
479
  const r = this.strings;
480
480
  let n = !1;
481
481
  if (r === void 0)
482
- t = w(this, t, e, 0), n = !U(t) || t !== this._$AH && t !== A, n && (this._$AH = t);
482
+ t = E(this, t, e, 0), n = !M(t) || t !== this._$AH && t !== S, n && (this._$AH = t);
483
483
  else {
484
484
  const l = t;
485
- let a, d;
485
+ let a, h;
486
486
  for (t = r[0], a = 0; a < r.length - 1; a++)
487
- d = w(this, l[s + a], e, a), d === A && (d = this._$AH[a]), n || (n = !U(d) || d !== this._$AH[a]), d === p ? t = p : t !== p && (t += (d ?? "") + r[a + 1]), this._$AH[a] = d;
487
+ h = E(this, l[i + a], e, a), h === S && (h = this._$AH[a]), n || (n = !M(h) || h !== this._$AH[a]), h === d ? t = d : t !== d && (t += (h ?? "") + r[a + 1]), this._$AH[a] = h;
488
488
  }
489
- n && !i && this.j(t);
489
+ n && !o && this.j(t);
490
490
  }
491
491
  j(t) {
492
- t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
492
+ t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
493
493
  }
494
494
  }
495
- class St extends H {
495
+ class Et extends H {
496
496
  constructor() {
497
497
  super(...arguments), this.type = 3;
498
498
  }
499
499
  j(t) {
500
- this.element[this.name] = t === p ? void 0 : t;
500
+ this.element[this.name] = t === d ? void 0 : t;
501
501
  }
502
502
  }
503
503
  class Ct extends H {
@@ -505,52 +505,52 @@ class Ct extends H {
505
505
  super(...arguments), this.type = 4;
506
506
  }
507
507
  j(t) {
508
- this.element.toggleAttribute(this.name, !!t && t !== p);
508
+ this.element.toggleAttribute(this.name, !!t && t !== d);
509
509
  }
510
510
  }
511
511
  class Pt extends H {
512
- constructor(t, e, s, i, r) {
513
- super(t, e, s, i, r), this.type = 5;
512
+ constructor(t, e, i, o, r) {
513
+ super(t, e, i, o, r), this.type = 5;
514
514
  }
515
515
  _$AI(t, e = this) {
516
- if ((t = w(this, t, e, 0) ?? p) === A)
516
+ if ((t = E(this, t, e, 0) ?? d) === S)
517
517
  return;
518
- const s = this._$AH, i = t === p && s !== p || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== p && (s === p || i);
519
- i && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
518
+ const i = this._$AH, o = t === d && i !== d || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== d && (i === d || o);
519
+ o && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
520
520
  }
521
521
  handleEvent(t) {
522
522
  var e;
523
523
  typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
524
524
  }
525
525
  }
526
- class Ut {
527
- constructor(t, e, s) {
528
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
526
+ class Lt {
527
+ constructor(t, e, i) {
528
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
529
529
  }
530
530
  get _$AU() {
531
531
  return this._$AM._$AU;
532
532
  }
533
533
  _$AI(t) {
534
- w(this, t);
534
+ E(this, t);
535
535
  }
536
536
  }
537
- const j = S.litHtmlPolyfillSupport;
538
- j == null || j(T, O), (S.litHtmlVersions ?? (S.litHtmlVersions = [])).push("3.1.2");
539
- const Tt = (o, t, e) => {
540
- const s = (e == null ? void 0 : e.renderBefore) ?? t;
541
- let i = s._$litPart$;
542
- if (i === void 0) {
537
+ const j = L.litHtmlPolyfillSupport;
538
+ j == null || j(R, k), (L.litHtmlVersions ?? (L.litHtmlVersions = [])).push("3.1.2");
539
+ const Tt = (s, t, e) => {
540
+ const i = (e == null ? void 0 : e.renderBefore) ?? t;
541
+ let o = i._$litPart$;
542
+ if (o === void 0) {
543
543
  const r = (e == null ? void 0 : e.renderBefore) ?? null;
544
- s._$litPart$ = i = new O(t.insertBefore(P(), r), r, void 0, e ?? {});
544
+ i._$litPart$ = o = new k(t.insertBefore(U(), r), r, void 0, e ?? {});
545
545
  }
546
- return i._$AI(o), i;
546
+ return o._$AI(s), o;
547
547
  };
548
548
  /**
549
549
  * @license
550
550
  * Copyright 2017 Google LLC
551
551
  * SPDX-License-Identifier: BSD-3-Clause
552
552
  */
553
- class C extends b {
553
+ class T extends w {
554
554
  constructor() {
555
555
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
556
556
  }
@@ -572,112 +572,128 @@ class C extends b {
572
572
  super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
573
573
  }
574
574
  render() {
575
- return A;
575
+ return S;
576
576
  }
577
577
  }
578
- var it;
579
- C._$litElement$ = !0, C.finalized = !0, (it = globalThis.litElementHydrateSupport) == null || it.call(globalThis, { LitElement: C });
580
- const B = globalThis.litElementPolyfillSupport;
581
- B == null || B({ LitElement: C });
578
+ var ot;
579
+ T._$litElement$ = !0, T.finalized = !0, (ot = globalThis.litElementHydrateSupport) == null || ot.call(globalThis, { LitElement: T });
580
+ const q = globalThis.litElementPolyfillSupport;
581
+ q == null || q({ LitElement: T });
582
582
  (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
583
583
  /**
584
584
  * @license
585
585
  * Copyright 2017 Google LLC
586
586
  * SPDX-License-Identifier: BSD-3-Clause
587
587
  */
588
- const Ot = (o) => (t, e) => {
588
+ const Ut = (s) => (t, e) => {
589
589
  e !== void 0 ? e.addInitializer(() => {
590
- customElements.define(o, t);
591
- }) : customElements.define(o, t);
590
+ customElements.define(s, t);
591
+ }) : customElements.define(s, t);
592
592
  };
593
593
  /**
594
594
  * @license
595
595
  * Copyright 2017 Google LLC
596
596
  * SPDX-License-Identifier: BSD-3-Clause
597
597
  */
598
- const Mt = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: J }, kt = (o = Mt, t, e) => {
599
- const { kind: s, metadata: i } = e;
600
- let r = globalThis.litPropertyMetadata.get(i);
601
- if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), r.set(e.name, o), s === "accessor") {
598
+ const Mt = { attribute: !0, type: String, converter: I, reflect: !1, hasChanged: J }, Rt = (s = Mt, t, e) => {
599
+ const { kind: i, metadata: o } = e;
600
+ let r = globalThis.litPropertyMetadata.get(o);
601
+ if (r === void 0 && globalThis.litPropertyMetadata.set(o, r = /* @__PURE__ */ new Map()), r.set(e.name, s), i === "accessor") {
602
602
  const { name: n } = e;
603
603
  return { set(l) {
604
604
  const a = t.get.call(this);
605
- t.set.call(this, l), this.requestUpdate(n, a, o);
605
+ t.set.call(this, l), this.requestUpdate(n, a, s);
606
606
  }, init(l) {
607
- return l !== void 0 && this.P(n, void 0, o), l;
607
+ return l !== void 0 && this.P(n, void 0, s), l;
608
608
  } };
609
609
  }
610
- if (s === "setter") {
610
+ if (i === "setter") {
611
611
  const { name: n } = e;
612
612
  return function(l) {
613
613
  const a = this[n];
614
- t.call(this, l), this.requestUpdate(n, a, o);
614
+ t.call(this, l), this.requestUpdate(n, a, s);
615
615
  };
616
616
  }
617
- throw Error("Unsupported decorator location: " + s);
617
+ throw Error("Unsupported decorator location: " + i);
618
618
  };
619
- function dt(o) {
620
- return (t, e) => typeof e == "object" ? kt(o, t, e) : ((s, i, r) => {
621
- const n = i.hasOwnProperty(r);
622
- return i.constructor.createProperty(r, n ? { ...s, wrapped: !0 } : s), n ? Object.getOwnPropertyDescriptor(i, r) : void 0;
623
- })(o, t, e);
619
+ function y(s) {
620
+ return (t, e) => typeof e == "object" ? Rt(s, t, e) : ((i, o, r) => {
621
+ const n = o.hasOwnProperty(r);
622
+ return o.constructor.createProperty(r, n ? { ...i, wrapped: !0 } : i), n ? Object.getOwnPropertyDescriptor(o, r) : void 0;
623
+ })(s, t, e);
624
624
  }
625
625
  /**
626
626
  * @license
627
627
  * Copyright 2017 Google LLC
628
628
  * SPDX-License-Identifier: BSD-3-Clause
629
629
  */
630
- const st = (o, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(o, t, e), e);
630
+ function kt(s) {
631
+ return y({ ...s, state: !0, attribute: !1 });
632
+ }
631
633
  /**
632
634
  * @license
633
635
  * Copyright 2017 Google LLC
634
636
  * SPDX-License-Identifier: BSD-3-Clause
635
637
  */
636
- function Rt(o, t) {
637
- return (e, s, i) => {
638
+ const it = (s, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(s, t, e), e);
639
+ /**
640
+ * @license
641
+ * Copyright 2017 Google LLC
642
+ * SPDX-License-Identifier: BSD-3-Clause
643
+ */
644
+ function Ot(s, t) {
645
+ return (e, i, o) => {
638
646
  const r = (n) => {
639
647
  var l;
640
- return ((l = n.renderRoot) == null ? void 0 : l.querySelector(o)) ?? null;
648
+ return ((l = n.renderRoot) == null ? void 0 : l.querySelector(s)) ?? null;
641
649
  };
642
650
  if (t) {
643
- const { get: n, set: l } = typeof s == "object" ? e : i ?? (() => {
651
+ const { get: n, set: l } = typeof i == "object" ? e : o ?? (() => {
644
652
  const a = Symbol();
645
653
  return { get() {
646
654
  return this[a];
647
- }, set(d) {
648
- this[a] = d;
655
+ }, set(h) {
656
+ this[a] = h;
649
657
  } };
650
658
  })();
651
- return st(e, s, { get() {
659
+ return it(e, i, { get() {
652
660
  let a = n.call(this);
653
661
  return a === void 0 && (a = r(this), (a !== null || this.hasUpdated) && l.call(this, a)), a;
654
662
  } });
655
663
  }
656
- return st(e, s, { get() {
664
+ return it(e, i, { get() {
657
665
  return r(this);
658
666
  } });
659
667
  };
660
668
  }
661
- class Lt {
669
+ class Nt {
662
670
  get extId() {
663
671
  return this.attributes["ext-id"];
664
672
  }
665
673
  }
666
- var Nt = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, I = (o, t, e, s) => {
667
- for (var i = s > 1 ? void 0 : s ? Ht(t, e) : t, r = o.length - 1, n; r >= 0; r--)
668
- (n = o[r]) && (i = (s ? n(t, e, i) : n(i)) || i);
669
- return s && i && Nt(t, e, i), i;
674
+ var It = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, g = (s, t, e, i) => {
675
+ for (var o = i > 1 ? void 0 : i ? Bt(t, e) : t, r = s.length - 1, n; r >= 0; r--)
676
+ (n = s[r]) && (o = (i ? n(t, e, o) : n(o)) || o);
677
+ return i && o && It(t, e, o), o;
670
678
  };
671
- let v = class extends C {
679
+ let m = class extends T {
672
680
  constructor() {
673
- var o, t;
674
- super(...arguments), this.getByAddress = (t = (o = window.miam) == null ? void 0 : o.pos) == null ? void 0 : t.getByAddress, this._posList = [], this._searchingPos = !1;
681
+ var s, t, e, i, o, r;
682
+ super(...arguments), this.selectedRadius = 25, this.radiusOption = [10, 25, 50], this.getByAddress = (t = (s = window.miam) == null ? void 0 : s.pos) == null ? void 0 : t.getByAddress, this.getByCoordinates = (i = (e = window.miam) == null ? void 0 : e.pos) == null ? void 0 : i.getByCoordinates, this.getAffiliateSuppliers = (r = (o = window.miam) == null ? void 0 : o.supplier) == null ? void 0 : r.getAffiliateSuppliers, this._posList = [], this._markers = [], this._searchingPos = !1, this._searchSubmitted = !1, this._previousSearchMethod = () => {
683
+ }, this._suppliers = [], this._selectedSuppliers = [], this._showPosList = !1;
684
+ }
685
+ set geolocationCoordinates(s) {
686
+ var t, e;
687
+ this._geolocationCoordinates = s, (t = s == null ? void 0 : s.coords) != null && t.latitude && ((e = s == null ? void 0 : s.coords) != null && e.longitude) && this.getPosByCoordinates();
675
688
  }
676
- _nameOfStore(o) {
677
- return `${o.supplier.attributes.name} - ${o.attributes.name}`;
689
+ get geolocationCoordinates() {
690
+ return this._geolocationCoordinates;
691
+ }
692
+ _nameOfStore(s) {
693
+ return `${s.supplier.attributes.name} - ${s.attributes.name}`;
678
694
  }
679
695
  connectedCallback() {
680
- super.connectedCallback(), console.debug("[MealzComponents] loading store locator"), this.initLeaflet();
696
+ super.connectedCallback(), console.debug("[MealzComponents] loading store locator"), this.initLeaflet(), this.fetchSuppliers();
681
697
  }
682
698
  disconnectedCallback() {
683
699
  super.disconnectedCallback(), this._leafletCss.remove(), this._miamDs.remove(), this._leafletJs.remove();
@@ -687,82 +703,161 @@ let v = class extends C {
687
703
  return this.posSelectionTemplate();
688
704
  }
689
705
  // Executes after rendering
690
- updated() {
691
- this.loadMap();
706
+ firstUpdated() {
707
+ this.loadMap(), this.geolocationTimeout(), this.listenFormSubmit();
692
708
  }
693
709
  posSelectionTemplate() {
694
- return k`
710
+ return u`
695
711
  <div class="wrapper miam-ds-body">
696
712
  <div class="pos-selection">
697
713
  <div class="title">
698
714
  <button @click=${() => this.dispatchShow(!1)}><</button>
699
715
  <span>Sélectionner un magasin</span>
700
716
  </div>
701
- <div class="address-input-container">
702
- <input class="address-input" type="text" name="address" placeholder="Votre code postal ou ville"
703
- @keydown=${(o) => {
704
- o.stopPropagation();
705
- }}
706
- @change=${this.setAddress}>
707
- <button @click=${this.setAddress} class="miam-ds-button primary search-address-button">OK</button>
708
- </div>
709
- ${this.posListTemplate()}
717
+ <form id="store-locator-form">
718
+ <div class="address-input-container">
719
+ ${this.geolocButtonTemplate()}
720
+ <input required class="address-input" type="text" name="address" placeholder="Votre code postal ou ville">
721
+ <button type="submit" class="miam-ds-button primary search-address-button">OK</button>
722
+ </div>
723
+ ${this.selectRadiusTemplate()}
724
+ ${this.selectSupplierTemplate()}
725
+ </form>
726
+ ${this.posListTemplate()}
727
+ ${this._posList.length > 0 ? u`
728
+ <div id="mobile-buttons-wrapper" class="mobile-buttons-wrapper__see-list">
729
+ <button @click=${() => this.togglePosList(this._showPosList)} class="miam-ds-button primary hide-pos-button">
730
+ ${this.getButtonLabel()}
731
+ </button>
732
+ </div>` : ""}
710
733
  </div>
734
+ </div>
711
735
  ${this.posMapTemplate()}
712
736
  </div>
737
+ `;
738
+ }
739
+ geolocButtonTemplate() {
740
+ var t, e, i, o;
741
+ let s;
742
+ if (this.geolocationCoordinates === void 0)
743
+ s = u`<div class="miam-ds-loader"></div>`;
744
+ else if ((e = (t = this.geolocationCoordinates) == null ? void 0 : t.coords) != null && e.longitude && ((o = (i = this.geolocationCoordinates) == null ? void 0 : i.coords) != null && o.latitude))
745
+ s = u`<img title="Votre position" class="geolocation-icon" src="https://storage.googleapis.com/assets.miam.tech/generic/icons/locate-primary.svg" alt="Geolocaliser"/>`;
746
+ else
747
+ return u``;
748
+ return u`
749
+ <button type="button" ?disabled=${this.geolocationCoordinates === void 0} class="miam-ds-button square ghost locate-button" @click=${this.setGeolocation}>
750
+ ${s}
751
+ </button>
713
752
  `;
714
753
  }
754
+ selectRadiusTemplate() {
755
+ return u`
756
+ <div class="select-radius miam-ds-dropdown">
757
+ <select @change=${this.radiusChanged}>
758
+ ${this.radiusOption.map((s) => u`<option ?selected=${s === this.selectedRadius} value=${s}>${s} km</option>`)}
759
+ </select>
760
+ </div>`;
761
+ }
762
+ radiusChanged(s) {
763
+ this.selectedRadius = parseInt(s.target.value), this._showPosList = !0, this._previousSearchMethod(!0);
764
+ }
715
765
  posMapTemplate() {
716
- return k`
766
+ return u`
717
767
  <div id="map"></div>
718
768
  `;
719
769
  }
770
+ selectSupplierTemplate() {
771
+ return u`
772
+ <div class="select-supplier miam-ds-dropdown">
773
+ <select @change=${this.supplierSelected}>
774
+ <option ?selected=${this._selectedSuppliers.length < 1} value="${null}">Toutes les enseignes</option>
775
+ ${this._suppliers.map((s) => u`
776
+ <option ?selected=${s === this._selectedSuppliers[0]} value=${s.id}>
777
+ ${s.name}
778
+ </option>`)}
779
+ </select>
780
+ </div>`;
781
+ }
782
+ supplierSelected(s) {
783
+ s.target.value ? this._selectedSuppliers[0] = s.target.value : this._selectedSuppliers = [], this._previousSearchMethod(!0);
784
+ }
720
785
  posListTemplate() {
721
- if (!(this._posList.length < 1))
722
- return k`
723
- <div id="pos-list">
724
- ${this._posList.map((o) => k`
786
+ if (this._searchingPos)
787
+ return u`
788
+ <div class="pos-loader">
789
+ <div class="miam-ds-loader"></div>
790
+ </div>
791
+ `;
792
+ if (this._posList.length < 1 && this._searchSubmitted)
793
+ return u`
794
+ <div class="no-pos-found">
795
+ <b>Aucun magasin trouvé à proximité.</b>
796
+ <span>Essayez une autre adresse.</span>
797
+ </div>
798
+ `;
799
+ if (this._posList.length < 1)
800
+ return;
801
+ const s = this.shadowRoot.querySelector(".pos-selection");
802
+ return s && s.classList.toggle("pos-selection__height", this._showPosList), u`
803
+ <div id="pos-list" class="${this._showPosList ? "pos-list__visible" : "pos-list__hidden"}">
804
+ ${this._posList.map((t) => u`
725
805
  <div class="pos-item">
726
806
  <div class="top">
727
- <img src="${o.supplier.attributes.logo}" alt="${o.supplier.attributes.name}"/>
807
+ <img src="${t.supplier.attributes.logo}" alt="${t.supplier.attributes.name}"/>
728
808
  <div class="top-right">
729
- <div class="name">${this._nameOfStore(o)}</div>
730
- <div class="address">${o.attributes.address}</div>
809
+ <div class="name">${this._nameOfStore(t)}</div>
810
+ <div class="address">${t.attributes.address}</div>
731
811
  </div>
732
812
  </div>
733
813
  <div class="bottom">
734
- <button @click=${() => this.dispatchPos(o)} class="miam-ds-button primary select-pos-button">Sélectionner</button>
814
+ <button @click=${() => this.dispatchPos(t)} class="miam-ds-button primary select-pos-button">Sélectionner</button>
735
815
  </div>
736
816
  </div>
737
817
  `)}
738
818
  </div>
739
- <div id="hide-pos-wrapper">
740
- <button @click=${() => this.togglePosList(!1)} class="miam-ds-button primary hide-pos-button">Masquer</button>
741
- </div>
742
819
  `;
743
820
  }
744
- setAddress() {
745
- if (!this._addressInput.value || this._addressInput.value.length < 3 || this._searchingPos)
821
+ getButtonLabel() {
822
+ if (this._showPosList)
823
+ return "Voir la carte";
824
+ const s = this._posList.length;
825
+ return s === 1 ? "Voir le magasin" : `Voir les ${s} magasins`;
826
+ }
827
+ setAddress(s = !1) {
828
+ if (!this._addressInput.value || this._addressInput.value.length < 3 || this._searchingPos || !s && this._prevAddress === this._addressInput.value + ", France")
746
829
  return;
747
- const o = this.shadowRoot.getElementById("pos-list");
748
- o && o.style.display === "none" && this.togglePosList(!0), this._prevAddress !== this._addressInput.value + ", France" && (this._prevAddress = this._addressInput.value + ", France", this._searchingPos = !0, this.getByAddress(this._prevAddress, 10).subscribe((t) => {
749
- this._posList = t.data.map((e) => {
750
- const s = Object.assign(new Lt(), e);
751
- return s.supplier = t.included.find((i) => i.id === s.relationships.supplier.data.id), s;
752
- }), this.requestUpdate();
753
- }));
754
- }
755
- dispatchPos(o) {
830
+ const t = this.shadowRoot.getElementById("pos-list");
831
+ t && t.style.display === "none" && this.togglePosList(!0), this._previousSearchMethod = this.setAddress, this._prevAddress = this._addressInput.value + ", France", this._searchingPos = !0, this.requestUpdate(), this.getByAddress(this._prevAddress, this.selectedRadius, this._selectedSuppliers).subscribe((e) => {
832
+ this.setPosList(e), this.setNewLocation(), this._searchingPos = !1, this._searchSubmitted = !0, this.requestUpdate();
833
+ });
834
+ }
835
+ setGeolocation(s = !1) {
836
+ const t = this.shadowRoot.getElementById("pos-list");
837
+ t && t.style.display === "none" && this.togglePosList(!0), this._prevAddress = "", this._previousSearchMethod = this.setGeolocation, this.getPosByCoordinates();
838
+ }
839
+ getPosByCoordinates() {
840
+ this._searchingPos = !0, this.requestUpdate(), this.getByCoordinates(this.geolocationCoordinates.coords.latitude, this.geolocationCoordinates.coords.longitude, this.selectedRadius, this._selectedSuppliers).subscribe((s) => {
841
+ this._addressInput.value = "", this.setPosList(s), this._searchingPos = !1, this.setNewLocation(), this._searchSubmitted = !0, this.requestUpdate();
842
+ });
843
+ }
844
+ setPosList(s) {
845
+ this._posList = s.data.map((t) => {
846
+ const e = Object.assign(new Nt(), t);
847
+ return e.supplier = s.included.find((i) => i.id === e.relationships.supplier.data.id), e;
848
+ });
849
+ }
850
+ dispatchPos(s) {
756
851
  const t = {
757
- detail: { posId: o.id, posExtId: o.extId, supplierId: o.supplier.id, posName: this._nameOfStore(o) },
852
+ detail: { posId: s.id, posExtId: s.extId, supplierId: s.supplier.id, posName: this._nameOfStore(s) },
758
853
  bubbles: !0,
759
854
  composed: !0
760
855
  };
761
856
  console.debug("[MealzComponents] dispatchEvent posIdChange", t), this.dispatchEvent(new CustomEvent("posIdChange", t));
762
857
  }
763
- dispatchShow(o) {
858
+ dispatchShow(s) {
764
859
  const t = {
765
- detail: { show: o },
860
+ detail: { show: s },
766
861
  bubbles: !0,
767
862
  composed: !0
768
863
  };
@@ -772,31 +867,56 @@ let v = class extends C {
772
867
  initLeaflet() {
773
868
  this._leafletCss = document.createElement("link"), this._leafletCss.setAttribute("rel", "stylesheet"), this._leafletCss.setAttribute("href", "https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"), this._leafletCss.setAttribute("integrity", "sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="), this._leafletCss.setAttribute("crossorigin", ""), this._leafletJs = document.createElement("script"), this._leafletJs.setAttribute("src", "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"), this._leafletJs.setAttribute("integrity", "sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="), this._leafletJs.setAttribute("crossorigin", ""), this._miamDs = document.createElement("link"), this._miamDs.setAttribute("rel", "stylesheet"), this._miamDs.setAttribute("href", "https://unpkg.com/miam-ds@1.2.4/miam-ds.min.css"), this.shadowRoot.appendChild(this._miamDs), this.shadowRoot.appendChild(this._leafletCss), document.head.appendChild(this._leafletJs);
774
869
  }
870
+ waitForLeaflet(s) {
871
+ let i = 50;
872
+ console.debug("[Map] Checking for window.L");
873
+ const o = setInterval(() => {
874
+ window.L !== void 0 || i === 0 ? (clearInterval(o), window.L !== void 0 ? (console.debug("[Map] window.L is defined"), s(!0)) : (console.error("[Map] Failed to load Leaflet after", 50 * 100, "ms"), s(!1))) : i--;
875
+ }, 100);
876
+ }
877
+ initMap() {
878
+ this._map && (this._map.off(), this._map.remove()), this.setNewLocation(), window.L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png", {
879
+ maxZoom: 19,
880
+ attribution: "Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL."
881
+ }).addTo(this._map);
882
+ }
775
883
  loadMap() {
776
- const o = this.shadowRoot.getElementById("map");
777
- o && (this._map && (this._map.off(), this._map.remove()), setTimeout(() => {
778
- this._map = window.L.map(o).setView(this.getCoordinates(), 13), window.L.tileLayer("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png", {
779
- maxZoom: 19,
780
- attribution: "Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL."
781
- }).addTo(this._map), this.addMarkers(), this._searchingPos = !1;
782
- }, 250));
884
+ this.waitForLeaflet((s) => {
885
+ s && this.initMap();
886
+ });
887
+ }
888
+ fetchSuppliers() {
889
+ this.getAffiliateSuppliers().subscribe((s) => {
890
+ this._suppliers = s.map((t) => ({
891
+ id: t.id,
892
+ name: t.attributes.name
893
+ })), this.requestUpdate();
894
+ });
895
+ }
896
+ setNewLocation() {
897
+ var t;
898
+ const s = this.shadowRoot.getElementById("map");
899
+ s && (this._map ? (this._markers.forEach((e) => {
900
+ this._map.removeLayer(e);
901
+ }), this._markers = [], this._map.panTo(this.getCoordinates())) : this._map = (t = window.L) == null ? void 0 : t.map(s).setView(this.getCoordinates(), 13), this.addMarkers());
783
902
  }
784
903
  getCoordinates() {
785
904
  return this._posList.length < 1 ? [48.866667, 2.333333] : [this._posList[0].attributes.latitude, this._posList[0].attributes.longitude];
786
905
  }
787
906
  addMarkers() {
788
- this._posList.length > 0 && this._posList.forEach((o) => {
789
- var t = window.L.marker(
790
- [o.attributes.latitude, o.attributes.longitude],
791
- { icon: this.buildIcon(o.supplier) }
792
- ).addTo(this._map), e = window.L.popup({
907
+ this._posList.length > 0 && this._posList.forEach((s, t) => {
908
+ this._markers.push(window.L.marker(
909
+ [s.attributes.latitude, s.attributes.longitude],
910
+ { icon: this.buildIcon(s.supplier) }
911
+ ).addTo(this._map));
912
+ let e = window.L.popup({
793
913
  content: `
794
914
  <div class="pos-item">
795
915
  <div class="top">
796
- <img class="pos-img" src="${o.supplier.attributes.logo}" alt="${o.supplier.attributes.name}"/>
916
+ <img class="pos-img" src="${s.supplier.attributes.logo}" alt="${s.supplier.attributes.name}"/>
797
917
  <div class="top-right">
798
- <div class="name">${this._nameOfStore(o)}</div>
799
- <div class="address">${o.attributes.address}</div>
918
+ <div class="name">${this._nameOfStore(s)}</div>
919
+ <div class="address">${s.attributes.address}</div>
800
920
  </div>
801
921
  </div>
802
922
  <div class="bottom">
@@ -805,16 +925,16 @@ let v = class extends C {
805
925
  </div>
806
926
  `
807
927
  });
808
- t.bindPopup(e).on("popupopen", (s) => {
809
- s.target.getPopup().getElement().querySelector("#select").addEventListener("click", () => {
810
- this.dispatchPos(o);
928
+ this._markers[t].bindPopup(e).on("popupopen", (i) => {
929
+ i.target.getPopup().getElement().querySelector("#select").addEventListener("click", () => {
930
+ this.dispatchPos(s);
811
931
  });
812
932
  });
813
933
  });
814
934
  }
815
- buildIcon(o) {
935
+ buildIcon(s) {
816
936
  return window.L.icon({
817
- iconUrl: o.attributes.logo || "https://cdn-icons-png.flaticon.com/512/3515/3515146.png",
937
+ iconUrl: s.attributes.logo || "https://cdn-icons-png.flaticon.com/512/3515/3515146.png",
818
938
  shadowUrl: "https://storage.googleapis.com/assets.miam.tech/mealz-components/store-locator/marker.svg",
819
939
  iconSize: [32, 32],
820
940
  // size of the icon
@@ -828,12 +948,22 @@ let v = class extends C {
828
948
  // point from which the popup should open relative to the iconAnchor
829
949
  });
830
950
  }
831
- togglePosList(o) {
832
- const t = this.shadowRoot.getElementById("pos-list"), e = this.shadowRoot.getElementById("hide-pos-wrapper");
833
- !t || !e || (o ? (t.style.display = "flex", e.style.display = "flex") : (t.style.display = "none", e.style.display = "none"));
951
+ togglePosList(s) {
952
+ const t = this.shadowRoot.getElementById("pos-list"), e = this.shadowRoot.getElementById("mobile-buttons-wrapper");
953
+ !t || !e || (s ? (t.style.display = "none", e.className = "mobile-buttons-wrapper__see-list") : (t.style.display = "flex", e.className = "mobile-buttons-wrapper__see-map"), this._showPosList = !this._showPosList, this.requestUpdate());
954
+ }
955
+ geolocationTimeout() {
956
+ setTimeout(() => {
957
+ this.geolocationCoordinates === void 0 && (this.geolocationCoordinates = {});
958
+ }, 2e4);
959
+ }
960
+ listenFormSubmit() {
961
+ this.shadowRoot.getElementById("store-locator-form").addEventListener("submit", (t) => {
962
+ t.preventDefault(), this.setAddress();
963
+ });
834
964
  }
835
965
  };
836
- v.styles = [
966
+ m.styles = [
837
967
  ct`
838
968
  :host {
839
969
  display: block;
@@ -850,12 +980,18 @@ v.styles = [
850
980
  width: 320px;
851
981
  padding: 40px var(--spacing-padding-16-px, 16px);
852
982
  flex-direction: column;
853
- align-items: flex-start;
983
+ align-items: stretch;
854
984
  gap: var(--spacing-padding-16-px, 16px);
855
985
  flex-shrink: 0;
856
986
  background: var(--miam-ds-color-neutral-50, #FFF);
857
987
  box-shadow: 2px 0px 16px 0px rgba(0, 0, 0, 0.15);
858
988
  z-index: 1;
989
+
990
+ form {
991
+ display: flex;
992
+ flex-direction: column;
993
+ gap: var(--spacing-padding-8-px, 8px);
994
+ }
859
995
  }
860
996
 
861
997
  .pos-selection .title {
@@ -872,10 +1008,42 @@ v.styles = [
872
1008
  .pos-selection .address-input-container {
873
1009
  display: flex;
874
1010
  gap: 8px;
1011
+ height: 40px;
1012
+ position: relative;
1013
+ }
1014
+
1015
+ .pos-selection .address-input-container {
1016
+ .address-input {
1017
+ padding-left: 8px;
1018
+ }
1019
+
1020
+ .locate-button + .address-input {
1021
+ padding-left: 40px;
1022
+ }
1023
+
1024
+ .address-input {
1025
+ flex: 1;
1026
+ }
1027
+ }
1028
+
1029
+ .pos-selection .address-input-container .locate-button {
1030
+ position: absolute;
1031
+ background: unset;
1032
+ border: unset;
1033
+ padding: 0;
1034
+ top: 8px;
1035
+ left: 8px;
1036
+ width: 24px;
1037
+ height: 24px;
1038
+ }
1039
+
1040
+ .pos-selection .address-input-container .locate-button img {
1041
+ cursor: pointer;
1042
+ width: 24px;
1043
+ height: 24px;
875
1044
  }
876
1045
 
877
1046
  .pos-selection #pos-list {
878
- display: flex;
879
1047
  flex-direction: column;
880
1048
  align-items: flex-start;
881
1049
  gap: var(--spacing-padding-12-px, 12px);
@@ -883,6 +1051,58 @@ v.styles = [
883
1051
  overflow: auto;
884
1052
  }
885
1053
 
1054
+ .pos-list__visible,
1055
+ .pos-list__hidden {
1056
+ display: flex;
1057
+ }
1058
+
1059
+ .pos-selection .pos-loader {
1060
+ flex: 1;
1061
+ width: 100%;
1062
+ display: flex;
1063
+ justify-content: center;
1064
+ align-items: center;
1065
+ }
1066
+
1067
+ .pos-selection .pos-loader .miam-ds-loader {
1068
+ margin: 16px;
1069
+ display: flex;
1070
+ width: 72px;
1071
+ height: 72px;
1072
+ background-position-x: 36px;
1073
+ background-size: 36px 36px;
1074
+ }
1075
+
1076
+ .pos-selection .no-pos-found {
1077
+ margin-bottom: 16px;
1078
+ width: 100%;
1079
+ flex: 1;
1080
+ display: flex;
1081
+ justify-content: center;
1082
+ align-items: center;
1083
+ flex-direction: column;
1084
+ }
1085
+
1086
+ .pos-selection .select-radius {
1087
+ display: flex;
1088
+ }
1089
+
1090
+ .pos-selection .select-radius select {
1091
+ flex: 1;
1092
+ padding: 10px;
1093
+ max-width: initial;
1094
+ }
1095
+
1096
+ .pos-selection .select-supplier {
1097
+ display: flex;
1098
+
1099
+ select {
1100
+ flex: 1;
1101
+ padding: 10px;
1102
+ max-width: initial;
1103
+ }
1104
+ }
1105
+
886
1106
  .pos-item {
887
1107
  display: flex;
888
1108
  flex-direction: column;
@@ -927,7 +1147,7 @@ v.styles = [
927
1147
  width: 100%;
928
1148
  }
929
1149
 
930
- #hide-pos-wrapper {
1150
+ #mobile-buttons-wrapper {
931
1151
  display: none;
932
1152
  }
933
1153
 
@@ -935,6 +1155,8 @@ v.styles = [
935
1155
  width: 100%;
936
1156
  min-height: 100%;
937
1157
  z-index: 0;
1158
+ position: absolute;
1159
+ top: 0;
938
1160
  }
939
1161
 
940
1162
  #map .pos-item {
@@ -956,13 +1178,16 @@ v.styles = [
956
1178
  width: 100%;
957
1179
  padding: 0;
958
1180
  gap: 0;
1181
+
1182
+ form {
1183
+ padding: 24px 16px;
1184
+ }
959
1185
  }
960
1186
 
961
1187
  .pos-selection .title {
962
1188
  position: relative;
963
- height: 56px;
1189
+ min-height: 56px;
964
1190
  font-size: 16px;
965
- width: 100%;
966
1191
  display: flex;
967
1192
  align-items: center;
968
1193
  justify-content: center;
@@ -978,11 +1203,6 @@ v.styles = [
978
1203
  height: 32px;
979
1204
  }
980
1205
 
981
- .pos-selection .address-input-container {
982
- width: calc(100% - 32px);
983
- padding: 24px 16px;
984
- }
985
-
986
1206
  .pos-selection .address-input-container input {
987
1207
  width: calc(100% - 44px);
988
1208
  }
@@ -990,20 +1210,70 @@ v.styles = [
990
1210
  .pos-selection .address-input-container button {
991
1211
  width: 36px;
992
1212
  }
1213
+
1214
+ .pos-selection .suppliers-selection-container {
1215
+ width: calc(100% - 32px);
1216
+ margin: 8px 16px 24px 16px;
1217
+ }
993
1218
 
994
1219
  .pos-selection #pos-list {
995
1220
  padding: 0 16px 12px;
996
- max-height: 235px;
997
1221
  align-items: center;
998
1222
  }
1223
+
1224
+ .pos-list__visible {
1225
+ display: flex;
1226
+ }
1227
+
1228
+ .pos-list__hidden {
1229
+ display: none;
1230
+ }
1231
+
1232
+ .pos-selection__height {
1233
+ height: 100%;
1234
+ }
1235
+
1236
+ .pos-selection .pos-loader {
1237
+ position: absolute;
1238
+ height: 100%;
1239
+ }
1240
+
1241
+ .suppliers-list-wrapper__not-mobile {
1242
+ display: none;
1243
+ }
1244
+
1245
+ .suppliers-list-wrapper__mobile {
1246
+ display: block;
1247
+
1248
+ .suppliers-list {
1249
+ position: relative;
1250
+ z-index: 1;
1251
+ width: calc(100% - 32px);
1252
+ margin: -16px 16px 8px 16px;
1253
+
1254
+ .suppliers-list__supplier {
1255
+ padding: 8px 16px;
1256
+ }
1257
+ }
1258
+ }
999
1259
 
1000
- #hide-pos-wrapper {
1260
+ #mobile-buttons-wrapper {
1001
1261
  width: 100%;
1002
1262
  display: flex;
1003
1263
  justify-content: center;
1004
1264
  padding: 12px 0;
1005
1265
  }
1006
1266
 
1267
+ .mobile-buttons-wrapper__see-list {
1268
+ z-index: 1;
1269
+ bottom: 40px;
1270
+ position: absolute;
1271
+ }
1272
+
1273
+ .mobile-buttons-wrapper__see-map {
1274
+ margin-top: auto;
1275
+ }
1276
+
1007
1277
  #map {
1008
1278
  min-height: unset;
1009
1279
  position: absolute;
@@ -1013,19 +1283,37 @@ v.styles = [
1013
1283
  }
1014
1284
  `
1015
1285
  ];
1016
- I([
1017
- dt({ type: Boolean })
1018
- ], v.prototype, "show", 2);
1019
- I([
1020
- dt()
1021
- ], v.prototype, "getByAddress", 2);
1022
- I([
1023
- Rt("input")
1024
- ], v.prototype, "_addressInput", 2);
1025
- v = I([
1026
- Ot("mealz-store-locator")
1027
- ], v);
1028
- window.customElements.get("mealz-store-locator") || window.customElements.define("mealz-store-locator", v);
1286
+ g([
1287
+ y({ type: Boolean })
1288
+ ], m.prototype, "show", 2);
1289
+ g([
1290
+ y({ type: Number })
1291
+ ], m.prototype, "selectedRadius", 2);
1292
+ g([
1293
+ y({ type: Array })
1294
+ ], m.prototype, "radiusOption", 2);
1295
+ g([
1296
+ y({ type: GeolocationPosition })
1297
+ ], m.prototype, "geolocationCoordinates", 1);
1298
+ g([
1299
+ y()
1300
+ ], m.prototype, "getByAddress", 2);
1301
+ g([
1302
+ y()
1303
+ ], m.prototype, "getByCoordinates", 2);
1304
+ g([
1305
+ y()
1306
+ ], m.prototype, "getAffiliateSuppliers", 2);
1307
+ g([
1308
+ kt()
1309
+ ], m.prototype, "_geolocationCoordinates", 2);
1310
+ g([
1311
+ Ot("input")
1312
+ ], m.prototype, "_addressInput", 2);
1313
+ m = g([
1314
+ Ut("mealz-store-locator")
1315
+ ], m);
1316
+ window.customElements.get("mealz-store-locator") || window.customElements.define("mealz-store-locator", m);
1029
1317
  export {
1030
- v as MealzStoreLocator
1318
+ m as MealzStoreLocator
1031
1319
  };