@steppy/player 0.5.0 → 0.6.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,18 +3,18 @@
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const de = globalThis, Me = de.ShadowRoot && (de.ShadyCSS === void 0 || de.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ce = Symbol(), Be = /* @__PURE__ */ new WeakMap();
7
- let kt = class {
6
+ const ce = globalThis, Ce = ce.ShadowRoot && (ce.ShadyCSS === void 0 || ce.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ue = Symbol(), Ke = /* @__PURE__ */ new WeakMap();
7
+ let Tt = class {
8
8
  constructor(e, n, s) {
9
- if (this._$cssResult$ = !0, s !== Ce) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
9
+ if (this._$cssResult$ = !0, s !== Ue) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
10
  this.cssText = e, this.t = n;
11
11
  }
12
12
  get styleSheet() {
13
13
  let e = this.o;
14
14
  const n = this.t;
15
- if (Me && e === void 0) {
15
+ if (Ce && e === void 0) {
16
16
  const s = n !== void 0 && n.length === 1;
17
- s && (e = Be.get(n)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Be.set(n, e));
17
+ s && (e = Ke.get(n)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && Ke.set(n, e));
18
18
  }
19
19
  return e;
20
20
  }
@@ -22,33 +22,33 @@ let kt = class {
22
22
  return this.cssText;
23
23
  }
24
24
  };
25
- const St = (t) => new kt(typeof t == "string" ? t : t + "", void 0, Ce), zt = (t, ...e) => {
25
+ const It = (t) => new Tt(typeof t == "string" ? t : t + "", void 0, Ue), Wt = (t, ...e) => {
26
26
  const n = t.length === 1 ? t[0] : e.reduce((s, i, r) => s + ((o) => {
27
27
  if (o._$cssResult$ === !0) return o.cssText;
28
28
  if (typeof o == "number") return o;
29
29
  throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
30
  })(i) + t[r + 1], t[0]);
31
- return new kt(n, t, Ce);
32
- }, Ht = (t, e) => {
33
- if (Me) t.adoptedStyleSheets = e.map((n) => n instanceof CSSStyleSheet ? n : n.styleSheet);
31
+ return new Tt(n, t, Ue);
32
+ }, Gt = (t, e) => {
33
+ if (Ce) t.adoptedStyleSheets = e.map((n) => n instanceof CSSStyleSheet ? n : n.styleSheet);
34
34
  else for (const n of e) {
35
- const s = document.createElement("style"), i = de.litNonce;
35
+ const s = document.createElement("style"), i = ce.litNonce;
36
36
  i !== void 0 && s.setAttribute("nonce", i), s.textContent = n.cssText, t.appendChild(s);
37
37
  }
38
- }, Ve = Me ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
38
+ }, We = Ce ? (t) => t : (t) => t instanceof CSSStyleSheet ? ((e) => {
39
39
  let n = "";
40
40
  for (const s of e.cssRules) n += s.cssText;
41
- return St(n);
41
+ return It(n);
42
42
  })(t) : t;
43
43
  /**
44
44
  * @license
45
45
  * Copyright 2017 Google LLC
46
46
  * SPDX-License-Identifier: BSD-3-Clause
47
47
  */
48
- const { is: Ft, defineProperty: jt, getOwnPropertyDescriptor: Bt, getOwnPropertyNames: Vt, getOwnPropertySymbols: Gt, getPrototypeOf: Kt } = Object, _e = globalThis, Ge = _e.trustedTypes, Wt = Ge ? Ge.emptyScript : "", qt = _e.reactiveElementPolyfillSupport, te = (t, e) => t, ke = { toAttribute(t, e) {
48
+ const { is: qt, defineProperty: Zt, getOwnPropertyDescriptor: Xt, getOwnPropertyNames: Yt, getOwnPropertySymbols: Jt, getPrototypeOf: Qt } = Object, ge = globalThis, Ge = ge.trustedTypes, en = Ge ? Ge.emptyScript : "", tn = ge.reactiveElementPolyfillSupport, Q = (t, e) => t, ke = { toAttribute(t, e) {
49
49
  switch (e) {
50
50
  case Boolean:
51
- t = t ? Wt : null;
51
+ t = t ? en : null;
52
52
  break;
53
53
  case Object:
54
54
  case Array:
@@ -73,23 +73,23 @@ const { is: Ft, defineProperty: jt, getOwnPropertyDescriptor: Bt, getOwnProperty
73
73
  }
74
74
  }
75
75
  return n;
76
- } }, xt = (t, e) => !Ft(t, e), Ke = { attribute: !0, type: String, converter: ke, reflect: !1, useDefault: !1, hasChanged: xt };
77
- Symbol.metadata ??= Symbol("metadata"), _e.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
- let F = class extends HTMLElement {
76
+ } }, Rt = (t, e) => !qt(t, e), qe = { attribute: !0, type: String, converter: ke, reflect: !1, useDefault: !1, hasChanged: Rt };
77
+ Symbol.metadata ??= Symbol("metadata"), ge.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
+ let D = class extends HTMLElement {
79
79
  static addInitializer(e) {
80
80
  this._$Ei(), (this.l ??= []).push(e);
81
81
  }
82
82
  static get observedAttributes() {
83
83
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
84
84
  }
85
- static createProperty(e, n = Ke) {
85
+ static createProperty(e, n = qe) {
86
86
  if (n.state && (n.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((n = Object.create(n)).wrapped = !0), this.elementProperties.set(e, n), !n.noAccessor) {
87
87
  const s = Symbol(), i = this.getPropertyDescriptor(e, s, n);
88
- i !== void 0 && jt(this.prototype, e, i);
88
+ i !== void 0 && Zt(this.prototype, e, i);
89
89
  }
90
90
  }
91
91
  static getPropertyDescriptor(e, n, s) {
92
- const { get: i, set: r } = Bt(this.prototype, e) ?? { get() {
92
+ const { get: i, set: r } = Xt(this.prototype, e) ?? { get() {
93
93
  return this[n];
94
94
  }, set(o) {
95
95
  this[n] = o;
@@ -100,17 +100,17 @@ let F = class extends HTMLElement {
100
100
  }, configurable: !0, enumerable: !0 };
101
101
  }
102
102
  static getPropertyOptions(e) {
103
- return this.elementProperties.get(e) ?? Ke;
103
+ return this.elementProperties.get(e) ?? qe;
104
104
  }
105
105
  static _$Ei() {
106
- if (this.hasOwnProperty(te("elementProperties"))) return;
107
- const e = Kt(this);
106
+ if (this.hasOwnProperty(Q("elementProperties"))) return;
107
+ const e = Qt(this);
108
108
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
109
109
  }
110
110
  static finalize() {
111
- if (this.hasOwnProperty(te("finalized"))) return;
112
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(te("properties"))) {
113
- const n = this.properties, s = [...Vt(n), ...Gt(n)];
111
+ if (this.hasOwnProperty(Q("finalized"))) return;
112
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Q("properties"))) {
113
+ const n = this.properties, s = [...Yt(n), ...Jt(n)];
114
114
  for (const i of s) this.createProperty(i, n[i]);
115
115
  }
116
116
  const e = this[Symbol.metadata];
@@ -129,8 +129,8 @@ let F = class extends HTMLElement {
129
129
  const n = [];
130
130
  if (Array.isArray(e)) {
131
131
  const s = new Set(e.flat(1 / 0).reverse());
132
- for (const i of s) n.unshift(Ve(i));
133
- } else e !== void 0 && n.push(Ve(e));
132
+ for (const i of s) n.unshift(We(i));
133
+ } else e !== void 0 && n.push(We(e));
134
134
  return n;
135
135
  }
136
136
  static _$Eu(e, n) {
@@ -156,7 +156,7 @@ let F = class extends HTMLElement {
156
156
  }
157
157
  createRenderRoot() {
158
158
  const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
159
- return Ht(e, this.constructor.elementStyles), e;
159
+ return Gt(e, this.constructor.elementStyles), e;
160
160
  }
161
161
  connectedCallback() {
162
162
  this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
@@ -188,7 +188,7 @@ let F = class extends HTMLElement {
188
188
  requestUpdate(e, n, s, i = !1, r) {
189
189
  if (e !== void 0) {
190
190
  const o = this.constructor;
191
- if (i === !1 && (r = this[e]), s ??= o.getPropertyOptions(e), !((s.hasChanged ?? xt)(r, n) || s.useDefault && s.reflect && r === this._$Ej?.get(e) && !this.hasAttribute(o._$Eu(e, s)))) return;
191
+ if (i === !1 && (r = this[e]), s ??= o.getPropertyOptions(e), !((s.hasChanged ?? Rt)(r, n) || s.useDefault && s.reflect && r === this._$Ej?.get(e) && !this.hasAttribute(o._$Eu(e, s)))) return;
192
192
  this.C(e, n, s);
193
193
  }
194
194
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
@@ -256,75 +256,75 @@ let F = class extends HTMLElement {
256
256
  firstUpdated(e) {
257
257
  }
258
258
  };
259
- F.elementStyles = [], F.shadowRootOptions = { mode: "open" }, F[te("elementProperties")] = /* @__PURE__ */ new Map(), F[te("finalized")] = /* @__PURE__ */ new Map(), qt?.({ ReactiveElement: F }), (_e.reactiveElementVersions ??= []).push("2.1.2");
259
+ D.elementStyles = [], D.shadowRootOptions = { mode: "open" }, D[Q("elementProperties")] = /* @__PURE__ */ new Map(), D[Q("finalized")] = /* @__PURE__ */ new Map(), tn?.({ ReactiveElement: D }), (ge.reactiveElementVersions ??= []).push("2.1.2");
260
260
  /**
261
261
  * @license
262
262
  * Copyright 2017 Google LLC
263
263
  * SPDX-License-Identifier: BSD-3-Clause
264
264
  */
265
- const Pe = globalThis, We = (t) => t, pe = Pe.trustedTypes, qe = pe ? pe.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Tt = "$lit$", C = `lit$${Math.random().toFixed(9).slice(2)}$`, It = "?" + C, Zt = `<${It}>`, H = document, se = () => H.createComment(""), ie = (t) => t === null || typeof t != "object" && typeof t != "function", Ue = Array.isArray, Xt = (t) => Ue(t) || typeof t?.[Symbol.iterator] == "function", we = `[
266
- \f\r]`, W = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ze = /-->/g, Xe = />/g, U = RegExp(`>|${we}(?:([^\\s"'>=/]+)(${we}*=${we}*(?:[^
267
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Ye = /'/g, Je = /"/g, Rt = /^(?:script|style|textarea|title)$/i, Yt = (t) => (e, ...n) => ({ _$litType$: t, strings: e, values: n }), I = Yt(1), V = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), Qe = /* @__PURE__ */ new WeakMap(), D = H.createTreeWalker(H, 129);
268
- function Ot(t, e) {
269
- if (!Ue(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
270
- return qe !== void 0 ? qe.createHTML(e) : e;
271
- }
272
- const Jt = (t, e) => {
265
+ const Ne = globalThis, Ze = (t) => t, de = Ne.trustedTypes, Xe = de ? de.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Ot = "$lit$", L = `lit$${Math.random().toFixed(9).slice(2)}$`, Lt = "?" + L, nn = `<${Lt}>`, N = document, te = () => N.createComment(""), ne = (t) => t === null || typeof t != "object" && typeof t != "function", De = Array.isArray, sn = (t) => De(t) || typeof t?.[Symbol.iterator] == "function", be = `[
266
+ \f\r]`, V = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ye = /-->/g, Je = />/g, P = RegExp(`>|${be}(?:([^\\s"'>=/]+)(${be}*=${be}*(?:[^
267
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Qe = /'/g, et = /"/g, Mt = /^(?:script|style|textarea|title)$/i, rn = (t) => (e, ...n) => ({ _$litType$: t, strings: e, values: n }), T = rn(1), H = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), tt = /* @__PURE__ */ new WeakMap(), C = N.createTreeWalker(N, 129);
268
+ function Pt(t, e) {
269
+ if (!De(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
270
+ return Xe !== void 0 ? Xe.createHTML(e) : e;
271
+ }
272
+ const on = (t, e) => {
273
273
  const n = t.length - 1, s = [];
274
- let i, r = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", o = W;
274
+ let i, r = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", o = V;
275
275
  for (let l = 0; l < n; l++) {
276
276
  const a = t[l];
277
- let f, h, c = -1, b = 0;
278
- for (; b < a.length && (o.lastIndex = b, h = o.exec(a), h !== null); ) b = o.lastIndex, o === W ? h[1] === "!--" ? o = Ze : h[1] !== void 0 ? o = Xe : h[2] !== void 0 ? (Rt.test(h[2]) && (i = RegExp("</" + h[2], "g")), o = U) : h[3] !== void 0 && (o = U) : o === U ? h[0] === ">" ? (o = i ?? W, c = -1) : h[1] === void 0 ? c = -2 : (c = o.lastIndex - h[2].length, f = h[1], o = h[3] === void 0 ? U : h[3] === '"' ? Je : Ye) : o === Je || o === Ye ? o = U : o === Ze || o === Xe ? o = W : (o = U, i = void 0);
279
- const _ = o === U && t[l + 1].startsWith("/>") ? " " : "";
280
- r += o === W ? a + Zt : c >= 0 ? (s.push(f), a.slice(0, c) + Tt + a.slice(c) + C + _) : a + C + (c === -2 ? l : _);
277
+ let f, h, c = -1, y = 0;
278
+ for (; y < a.length && (o.lastIndex = y, h = o.exec(a), h !== null); ) y = o.lastIndex, o === V ? h[1] === "!--" ? o = Ye : h[1] !== void 0 ? o = Je : h[2] !== void 0 ? (Mt.test(h[2]) && (i = RegExp("</" + h[2], "g")), o = P) : h[3] !== void 0 && (o = P) : o === P ? h[0] === ">" ? (o = i ?? V, c = -1) : h[1] === void 0 ? c = -2 : (c = o.lastIndex - h[2].length, f = h[1], o = h[3] === void 0 ? P : h[3] === '"' ? et : Qe) : o === et || o === Qe ? o = P : o === Ye || o === Je ? o = V : (o = P, i = void 0);
279
+ const _ = o === P && t[l + 1].startsWith("/>") ? " " : "";
280
+ r += o === V ? a + nn : c >= 0 ? (s.push(f), a.slice(0, c) + Ot + a.slice(c) + L + _) : a + L + (c === -2 ? l : _);
281
281
  }
282
- return [Ot(t, r + (t[n] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
282
+ return [Pt(t, r + (t[n] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
283
283
  };
284
- class re {
284
+ class se {
285
285
  constructor({ strings: e, _$litType$: n }, s) {
286
286
  let i;
287
287
  this.parts = [];
288
288
  let r = 0, o = 0;
289
- const l = e.length - 1, a = this.parts, [f, h] = Jt(e, n);
290
- if (this.el = re.createElement(f, s), D.currentNode = this.el.content, n === 2 || n === 3) {
289
+ const l = e.length - 1, a = this.parts, [f, h] = on(e, n);
290
+ if (this.el = se.createElement(f, s), C.currentNode = this.el.content, n === 2 || n === 3) {
291
291
  const c = this.el.content.firstChild;
292
292
  c.replaceWith(...c.childNodes);
293
293
  }
294
- for (; (i = D.nextNode()) !== null && a.length < l; ) {
294
+ for (; (i = C.nextNode()) !== null && a.length < l; ) {
295
295
  if (i.nodeType === 1) {
296
- if (i.hasAttributes()) for (const c of i.getAttributeNames()) if (c.endsWith(Tt)) {
297
- const b = h[o++], _ = i.getAttribute(c).split(C), m = /([.?@])?(.*)/.exec(b);
298
- a.push({ type: 1, index: r, name: m[2], strings: _, ctor: m[1] === "." ? en : m[1] === "?" ? tn : m[1] === "@" ? nn : ye }), i.removeAttribute(c);
299
- } else c.startsWith(C) && (a.push({ type: 6, index: r }), i.removeAttribute(c));
300
- if (Rt.test(i.tagName)) {
301
- const c = i.textContent.split(C), b = c.length - 1;
302
- if (b > 0) {
303
- i.textContent = pe ? pe.emptyScript : "";
304
- for (let _ = 0; _ < b; _++) i.append(c[_], se()), D.nextNode(), a.push({ type: 2, index: ++r });
305
- i.append(c[b], se());
296
+ if (i.hasAttributes()) for (const c of i.getAttributeNames()) if (c.endsWith(Ot)) {
297
+ const y = h[o++], _ = i.getAttribute(c).split(L), m = /([.?@])?(.*)/.exec(y);
298
+ a.push({ type: 1, index: r, name: m[2], strings: _, ctor: m[1] === "." ? ln : m[1] === "?" ? cn : m[1] === "@" ? un : me }), i.removeAttribute(c);
299
+ } else c.startsWith(L) && (a.push({ type: 6, index: r }), i.removeAttribute(c));
300
+ if (Mt.test(i.tagName)) {
301
+ const c = i.textContent.split(L), y = c.length - 1;
302
+ if (y > 0) {
303
+ i.textContent = de ? de.emptyScript : "";
304
+ for (let _ = 0; _ < y; _++) i.append(c[_], te()), C.nextNode(), a.push({ type: 2, index: ++r });
305
+ i.append(c[y], te());
306
306
  }
307
307
  }
308
- } else if (i.nodeType === 8) if (i.data === It) a.push({ type: 2, index: r });
308
+ } else if (i.nodeType === 8) if (i.data === Lt) a.push({ type: 2, index: r });
309
309
  else {
310
310
  let c = -1;
311
- for (; (c = i.data.indexOf(C, c + 1)) !== -1; ) a.push({ type: 7, index: r }), c += C.length - 1;
311
+ for (; (c = i.data.indexOf(L, c + 1)) !== -1; ) a.push({ type: 7, index: r }), c += L.length - 1;
312
312
  }
313
313
  r++;
314
314
  }
315
315
  }
316
316
  static createElement(e, n) {
317
- const s = H.createElement("template");
317
+ const s = N.createElement("template");
318
318
  return s.innerHTML = e, s;
319
319
  }
320
320
  }
321
- function G(t, e, n = t, s) {
322
- if (e === V) return e;
321
+ function j(t, e, n = t, s) {
322
+ if (e === H) return e;
323
323
  let i = s !== void 0 ? n._$Co?.[s] : n._$Cl;
324
- const r = ie(e) ? void 0 : e._$litDirective$;
325
- return i?.constructor !== r && (i?._$AO?.(!1), r === void 0 ? i = void 0 : (i = new r(t), i._$AT(t, n, s)), s !== void 0 ? (n._$Co ??= [])[s] = i : n._$Cl = i), i !== void 0 && (e = G(t, i._$AS(t, e.values), i, s)), e;
324
+ const r = ne(e) ? void 0 : e._$litDirective$;
325
+ return i?.constructor !== r && (i?._$AO?.(!1), r === void 0 ? i = void 0 : (i = new r(t), i._$AT(t, n, s)), s !== void 0 ? (n._$Co ??= [])[s] = i : n._$Cl = i), i !== void 0 && (e = j(t, i._$AS(t, e.values), i, s)), e;
326
326
  }
327
- class Qt {
327
+ class an {
328
328
  constructor(e, n) {
329
329
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = n;
330
330
  }
@@ -335,24 +335,24 @@ class Qt {
335
335
  return this._$AM._$AU;
336
336
  }
337
337
  u(e) {
338
- const { el: { content: n }, parts: s } = this._$AD, i = (e?.creationScope ?? H).importNode(n, !0);
339
- D.currentNode = i;
340
- let r = D.nextNode(), o = 0, l = 0, a = s[0];
338
+ const { el: { content: n }, parts: s } = this._$AD, i = (e?.creationScope ?? N).importNode(n, !0);
339
+ C.currentNode = i;
340
+ let r = C.nextNode(), o = 0, l = 0, a = s[0];
341
341
  for (; a !== void 0; ) {
342
342
  if (o === a.index) {
343
343
  let f;
344
- a.type === 2 ? f = new ae(r, r.nextSibling, this, e) : a.type === 1 ? f = new a.ctor(r, a.name, a.strings, this, e) : a.type === 6 && (f = new sn(r, this, e)), this._$AV.push(f), a = s[++l];
344
+ a.type === 2 ? f = new re(r, r.nextSibling, this, e) : a.type === 1 ? f = new a.ctor(r, a.name, a.strings, this, e) : a.type === 6 && (f = new dn(r, this, e)), this._$AV.push(f), a = s[++l];
345
345
  }
346
- o !== a?.index && (r = D.nextNode(), o++);
346
+ o !== a?.index && (r = C.nextNode(), o++);
347
347
  }
348
- return D.currentNode = H, i;
348
+ return C.currentNode = N, i;
349
349
  }
350
350
  p(e) {
351
351
  let n = 0;
352
352
  for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, n), n += s.strings.length - 2) : s._$AI(e[n])), n++;
353
353
  }
354
354
  }
355
- class ae {
355
+ class re {
356
356
  get _$AU() {
357
357
  return this._$AM?._$AU ?? this._$Cv;
358
358
  }
@@ -371,7 +371,7 @@ class ae {
371
371
  return this._$AB;
372
372
  }
373
373
  _$AI(e, n = this) {
374
- e = G(this, e, n), ie(e) ? e === A || e == null || e === "" ? (this._$AH !== A && this._$AR(), this._$AH = A) : e !== this._$AH && e !== V && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Xt(e) ? this.k(e) : this._(e);
374
+ e = j(this, e, n), ne(e) ? e === A || e == null || e === "" ? (this._$AH !== A && this._$AR(), this._$AH = A) : e !== this._$AH && e !== H && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : sn(e) ? this.k(e) : this._(e);
375
375
  }
376
376
  O(e) {
377
377
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -380,38 +380,38 @@ class ae {
380
380
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
381
381
  }
382
382
  _(e) {
383
- this._$AH !== A && ie(this._$AH) ? this._$AA.nextSibling.data = e : this.T(H.createTextNode(e)), this._$AH = e;
383
+ this._$AH !== A && ne(this._$AH) ? this._$AA.nextSibling.data = e : this.T(N.createTextNode(e)), this._$AH = e;
384
384
  }
385
385
  $(e) {
386
- const { values: n, _$litType$: s } = e, i = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = re.createElement(Ot(s.h, s.h[0]), this.options)), s);
386
+ const { values: n, _$litType$: s } = e, i = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = se.createElement(Pt(s.h, s.h[0]), this.options)), s);
387
387
  if (this._$AH?._$AD === i) this._$AH.p(n);
388
388
  else {
389
- const r = new Qt(i, this), o = r.u(this.options);
389
+ const r = new an(i, this), o = r.u(this.options);
390
390
  r.p(n), this.T(o), this._$AH = r;
391
391
  }
392
392
  }
393
393
  _$AC(e) {
394
- let n = Qe.get(e.strings);
395
- return n === void 0 && Qe.set(e.strings, n = new re(e)), n;
394
+ let n = tt.get(e.strings);
395
+ return n === void 0 && tt.set(e.strings, n = new se(e)), n;
396
396
  }
397
397
  k(e) {
398
- Ue(this._$AH) || (this._$AH = [], this._$AR());
398
+ De(this._$AH) || (this._$AH = [], this._$AR());
399
399
  const n = this._$AH;
400
400
  let s, i = 0;
401
- for (const r of e) i === n.length ? n.push(s = new ae(this.O(se()), this.O(se()), this, this.options)) : s = n[i], s._$AI(r), i++;
401
+ for (const r of e) i === n.length ? n.push(s = new re(this.O(te()), this.O(te()), this, this.options)) : s = n[i], s._$AI(r), i++;
402
402
  i < n.length && (this._$AR(s && s._$AB.nextSibling, i), n.length = i);
403
403
  }
404
404
  _$AR(e = this._$AA.nextSibling, n) {
405
405
  for (this._$AP?.(!1, !0, n); e !== this._$AB; ) {
406
- const s = We(e).nextSibling;
407
- We(e).remove(), e = s;
406
+ const s = Ze(e).nextSibling;
407
+ Ze(e).remove(), e = s;
408
408
  }
409
409
  }
410
410
  setConnected(e) {
411
411
  this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
412
412
  }
413
413
  }
414
- class ye {
414
+ class me {
415
415
  get tagName() {
416
416
  return this.element.tagName;
417
417
  }
@@ -424,11 +424,11 @@ class ye {
424
424
  _$AI(e, n = this, s, i) {
425
425
  const r = this.strings;
426
426
  let o = !1;
427
- if (r === void 0) e = G(this, e, n, 0), o = !ie(e) || e !== this._$AH && e !== V, o && (this._$AH = e);
427
+ if (r === void 0) e = j(this, e, n, 0), o = !ne(e) || e !== this._$AH && e !== H, o && (this._$AH = e);
428
428
  else {
429
429
  const l = e;
430
430
  let a, f;
431
- for (e = r[0], a = 0; a < r.length - 1; a++) f = G(this, l[s + a], n, a), f === V && (f = this._$AH[a]), o ||= !ie(f) || f !== this._$AH[a], f === A ? e = A : e !== A && (e += (f ?? "") + r[a + 1]), this._$AH[a] = f;
431
+ for (e = r[0], a = 0; a < r.length - 1; a++) f = j(this, l[s + a], n, a), f === H && (f = this._$AH[a]), o ||= !ne(f) || f !== this._$AH[a], f === A ? e = A : e !== A && (e += (f ?? "") + r[a + 1]), this._$AH[a] = f;
432
432
  }
433
433
  o && !i && this.j(e);
434
434
  }
@@ -436,7 +436,7 @@ class ye {
436
436
  e === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
437
437
  }
438
438
  }
439
- class en extends ye {
439
+ class ln extends me {
440
440
  constructor() {
441
441
  super(...arguments), this.type = 3;
442
442
  }
@@ -444,7 +444,7 @@ class en extends ye {
444
444
  this.element[this.name] = e === A ? void 0 : e;
445
445
  }
446
446
  }
447
- class tn extends ye {
447
+ class cn extends me {
448
448
  constructor() {
449
449
  super(...arguments), this.type = 4;
450
450
  }
@@ -452,12 +452,12 @@ class tn extends ye {
452
452
  this.element.toggleAttribute(this.name, !!e && e !== A);
453
453
  }
454
454
  }
455
- class nn extends ye {
455
+ class un extends me {
456
456
  constructor(e, n, s, i, r) {
457
457
  super(e, n, s, i, r), this.type = 5;
458
458
  }
459
459
  _$AI(e, n = this) {
460
- if ((e = G(this, e, n, 0) ?? A) === V) return;
460
+ if ((e = j(this, e, n, 0) ?? A) === H) return;
461
461
  const s = this._$AH, i = e === A && s !== A || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, r = e !== A && (s === A || i);
462
462
  i && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
463
463
  }
@@ -465,7 +465,7 @@ class nn extends ye {
465
465
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
466
466
  }
467
467
  }
468
- class sn {
468
+ class dn {
469
469
  constructor(e, n, s) {
470
470
  this.element = e, this.type = 6, this._$AN = void 0, this._$AM = n, this.options = s;
471
471
  }
@@ -473,17 +473,17 @@ class sn {
473
473
  return this._$AM._$AU;
474
474
  }
475
475
  _$AI(e) {
476
- G(this, e);
476
+ j(this, e);
477
477
  }
478
478
  }
479
- const rn = Pe.litHtmlPolyfillSupport;
480
- rn?.(re, ae), (Pe.litHtmlVersions ??= []).push("3.3.3");
481
- const on = (t, e, n) => {
479
+ const hn = Ne.litHtmlPolyfillSupport;
480
+ hn?.(se, re), (Ne.litHtmlVersions ??= []).push("3.3.3");
481
+ const pn = (t, e, n) => {
482
482
  const s = n?.renderBefore ?? e;
483
483
  let i = s._$litPart$;
484
484
  if (i === void 0) {
485
485
  const r = n?.renderBefore ?? null;
486
- s._$litPart$ = i = new ae(e.insertBefore(se(), r), r, void 0, n ?? {});
486
+ s._$litPart$ = i = new re(e.insertBefore(te(), r), r, void 0, n ?? {});
487
487
  }
488
488
  return i._$AI(t), i;
489
489
  };
@@ -492,8 +492,8 @@ const on = (t, e, n) => {
492
492
  * Copyright 2017 Google LLC
493
493
  * SPDX-License-Identifier: BSD-3-Clause
494
494
  */
495
- const Ne = globalThis;
496
- class ne extends F {
495
+ const ze = globalThis;
496
+ class ee extends D {
497
497
  constructor() {
498
498
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
499
499
  }
@@ -503,7 +503,7 @@ class ne extends F {
503
503
  }
504
504
  update(e) {
505
505
  const n = this.render();
506
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = on(n, this.renderRoot, this.renderOptions);
506
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = pn(n, this.renderRoot, this.renderOptions);
507
507
  }
508
508
  connectedCallback() {
509
509
  super.connectedCallback(), this._$Do?.setConnected(!0);
@@ -512,18 +512,18 @@ class ne extends F {
512
512
  super.disconnectedCallback(), this._$Do?.setConnected(!1);
513
513
  }
514
514
  render() {
515
- return V;
515
+ return H;
516
516
  }
517
517
  }
518
- ne._$litElement$ = !0, ne.finalized = !0, Ne.litElementHydrateSupport?.({ LitElement: ne });
519
- const an = Ne.litElementPolyfillSupport;
520
- an?.({ LitElement: ne });
521
- (Ne.litElementVersions ??= []).push("4.2.2");
522
- const ve = "steppy-tour-host", ln = "steppy-tours-manifest", cn = "steppy-tour", un = "__STEPPY_TOURS_DISABLED__", De = "steppy:tour", dn = "steppy.tour.active", et = 1, hn = ["click", "input", "change", "visible", "manual"], pn = ["click", "input", "change", "visible"], fn = ["top", "bottom", "left", "right", "auto"], zs = ["tour-start", "tour-step", "tour-complete", "tour-dismiss", "tour-offpath", "tour-error"], Hs = ["target-timeout", "entry-params", "load-failed", "schema-unsupported", "invalid-data"], Fs = ["layer", "spotlight", "bubble", "title", "body", "progress", "button", "primary", "secondary", "next", "close", "skip", "end", "resume", "pill", "guide-link"], gn = "^[A-Za-z0-9_.:/-]{1,128}$", mn = "^[A-Za-z0-9_.:/-]{1,128}$", _n = "^data-[a-z0-9-]+$", yn = "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$", bn = "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$", wn = "^[A-Za-z0-9_-]{1,64}$", vn = "^[A-Za-z]{2,3}(?:[-_][A-Za-z0-9]{1,8}){0,5}$", $n = "^sha384-[A-Za-z0-9+/]{64}$", En = "^/$|^(?:/(?::[A-Za-z_][A-Za-z0-9_]{0,63}|[A-Za-z0-9._~%!$&()*+,;=@-]{1,128})){1,32}$", An = "^[A-Za-z0-9 :().,<>=/_-]{1,256}$", kn = "^[A-Za-z0-9](?:[A-Za-z0-9._-]{0,62}[A-Za-z0-9])?$", tt = 500, Lt = 100, nt = 32, fe = 16, Se = 200, Sn = 2e3, xn = 512, Tn = 2048, In = 256, $e = 262144, Rn = 1048576, st = 8e3, On = 2147483e3, it = { top: "bottom", bottom: "top", left: "right", right: "left" };
523
- function Ln(t, e, n, s = 8, i) {
524
- return i === void 0 ? Mn(t, e, n, s) : Cn(t, e, n, s, i);
518
+ ee._$litElement$ = !0, ee.finalized = !0, ze.litElementHydrateSupport?.({ LitElement: ee });
519
+ const fn = ze.litElementPolyfillSupport;
520
+ fn?.({ LitElement: ee });
521
+ (ze.litElementVersions ??= []).push("4.2.2");
522
+ const ye = "steppy-tour-host", gn = "steppy-tours-manifest", mn = "steppy-tour", _n = "__STEPPY_TOURS_DISABLED__", Fe = "steppy:tour", bn = "steppy.tour.active", nt = 1, yn = ["click", "input", "change", "visible", "manual"], wn = ["click", "input", "change", "visible"], vn = ["top", "bottom", "left", "right", "auto"], Ys = ["tour-start", "tour-step", "tour-complete", "tour-dismiss", "tour-offpath", "tour-error"], Js = ["target-timeout", "entry-params", "load-failed", "schema-unsupported", "invalid-data"], Qs = ["layer", "spotlight", "bubble", "title", "body", "progress", "button", "primary", "secondary", "next", "close", "skip", "end", "resume", "pill", "guide-link"], $n = "^[A-Za-z0-9_.:/-]{1,128}$", En = "^[A-Za-z0-9_.:/-]{1,128}$", An = "^data-[a-z0-9-]+$", kn = "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$", Sn = "^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$", xn = "^[A-Za-z0-9_-]{1,64}$", Tn = "^[A-Za-z]{2,3}(?:[-_][A-Za-z0-9]{1,8}){0,5}$", In = "^sha384-[A-Za-z0-9+/]{64}$", Rn = "^/$|^(?:/(?::[A-Za-z_][A-Za-z0-9_]{0,63}|[A-Za-z0-9._~%!$&()*+,;=@-]{1,128})){1,32}$", On = "^[A-Za-z0-9 :().,<>=/_-]{1,256}$", Ln = "^[A-Za-z0-9](?:[A-Za-z0-9._-]{0,62}[A-Za-z0-9])?$", st = 500, Ct = 100, it = 32, he = 16, Se = 200, Mn = 2e3, Pn = 512, Cn = 2048, Un = 256, we = 262144, Nn = 1048576, rt = 8e3, Dn = 2147483e3, ot = { top: "bottom", bottom: "top", left: "right", right: "left" };
523
+ function zn(t, e, n, s = 8, i) {
524
+ return i === void 0 ? Fn(t, e, n, s) : Hn(t, e, n, s, i);
525
525
  }
526
- function Mn(t, e, n, s) {
526
+ function Fn(t, e, n, s) {
527
527
  const i = t.y, r = n.height - (t.y + t.height), o = t.x, l = n.width - (t.x + t.width), a = e.height + s, f = e.width + s, h = r >= i ? { side: "bottom", room: r } : { side: "top", room: i };
528
528
  let c;
529
529
  if (h.room >= a)
@@ -532,46 +532,46 @@ function Mn(t, e, n, s) {
532
532
  const p = l >= o ? { side: "right", room: l } : { side: "left", room: o };
533
533
  c = p.room >= f ? p.side : h.side;
534
534
  }
535
- const b = t.x + t.width / 2, _ = t.y + t.height / 2;
535
+ const y = t.x + t.width / 2, _ = t.y + t.height / 2;
536
536
  let m = 0, u = 0;
537
- return c === "bottom" ? (m = P(b - e.width / 2, 0, n.width - e.width), u = Math.min(t.y + t.height + s, n.height - e.height)) : c === "top" ? (m = P(b - e.width / 2, 0, n.width - e.width), u = Math.max(0, t.y - e.height - s)) : c === "right" ? (m = Math.min(t.x + t.width + s, n.width - e.width), u = P(_ - e.height / 2, 0, n.height - e.height)) : (m = Math.max(0, t.x - e.width - s), u = P(_ - e.height / 2, 0, n.height - e.height)), { side: c, x: m, y: u };
537
+ return c === "bottom" ? (m = M(y - e.width / 2, 0, n.width - e.width), u = Math.min(t.y + t.height + s, n.height - e.height)) : c === "top" ? (m = M(y - e.width / 2, 0, n.width - e.width), u = Math.max(0, t.y - e.height - s)) : c === "right" ? (m = Math.min(t.x + t.width + s, n.width - e.width), u = M(_ - e.height / 2, 0, n.height - e.height)) : (m = Math.max(0, t.x - e.width - s), u = M(_ - e.height / 2, 0, n.height - e.height)), { side: c, x: m, y: u };
538
538
  }
539
- function Cn(t, e, n, s, i) {
539
+ function Hn(t, e, n, s, i) {
540
540
  const r = i.margin, o = {
541
541
  top: t.y - r,
542
542
  bottom: n.height - (t.y + t.height) - r,
543
543
  left: t.x - r,
544
544
  right: n.width - (t.x + t.width) - r
545
- }, l = Pn(o, i.preferred ?? "auto"), a = (d) => {
546
- const w = d === "top" || d === "bottom", y = w ? e.height : e.width, $ = w ? e.width : e.height, E = w ? n.width : n.height;
547
- return o[d] >= y + s && $ <= E - 2 * r;
545
+ }, l = jn(o, i.preferred ?? "auto"), a = (d) => {
546
+ const w = d === "top" || d === "bottom", b = w ? e.height : e.width, $ = w ? e.width : e.height, E = w ? n.width : n.height;
547
+ return o[d] >= b + s && $ <= E - 2 * r;
548
548
  }, f = (d) => {
549
- const w = t.x + t.width / 2, y = t.y + t.height / 2, $ = P(w - e.width / 2, r, n.width - e.width - r), E = P(y - e.height / 2, r, n.height - e.height - r);
549
+ const w = t.x + t.width / 2, b = t.y + t.height / 2, $ = M(w - e.width / 2, r, n.width - e.width - r), E = M(b - e.height / 2, r, n.height - e.height - r);
550
550
  return d === "bottom" ? { side: d, x: $, y: t.y + t.height + s } : d === "top" ? { side: d, x: $, y: t.y - s - e.height } : d === "right" ? { side: d, x: t.x + t.width + s, y: E } : { side: d, x: t.x - s - e.width, y: E };
551
- }, h = i.avoid ?? [], c = (d) => h.some((w) => xe({ x: d.x, y: d.y, width: e.width, height: e.height }, w)), b = l.filter(a).map(f), m = b.filter((d) => !c(d))[0] ?? b[0];
551
+ }, h = i.avoid ?? [], c = (d) => h.some((w) => xe({ x: d.x, y: d.y, width: e.width, height: e.height }, w)), y = l.filter(a).map(f), m = y.filter((d) => !c(d))[0] ?? y[0];
552
552
  if (m) return { ...m, overlaps: !1 };
553
- const u = f(l[0]), p = P(u.x, r, n.width - e.width - r), v = P(u.y, r, n.height - e.height - r), g = xe({ x: p, y: v, width: e.width, height: e.height }, t);
553
+ const u = f(l[0]), p = M(u.x, r, n.width - e.width - r), v = M(u.y, r, n.height - e.height - r), g = xe({ x: p, y: v, width: e.width, height: e.height }, t);
554
554
  return { side: u.side, x: p, y: v, overlaps: g };
555
555
  }
556
- function Pn(t, e) {
556
+ function jn(t, e) {
557
557
  if (e === "auto") {
558
558
  const s = t.bottom >= t.top ? ["bottom", "top"] : ["top", "bottom"], i = t.right >= t.left ? ["right", "left"] : ["left", "right"];
559
559
  return [...s, ...i];
560
560
  }
561
- const n = ["top", "bottom", "left", "right"].filter((s) => s !== e && s !== it[e]).sort((s, i) => t[i] - t[s]);
562
- return [e, it[e], ...n];
561
+ const n = ["top", "bottom", "left", "right"].filter((s) => s !== e && s !== ot[e]).sort((s, i) => t[i] - t[s]);
562
+ return [e, ot[e], ...n];
563
563
  }
564
- function P(t, e, n) {
564
+ function M(t, e, n) {
565
565
  return Math.max(e, Math.min(n, t));
566
566
  }
567
567
  function xe(t, e) {
568
568
  return t.x < e.x + e.width && e.x < t.x + t.width && t.y < e.y + e.height && e.y < t.y + t.height;
569
569
  }
570
- function rt(t, e) {
570
+ function at(t, e) {
571
571
  const n = Math.max(t.x, e.x), s = Math.max(t.y, e.y), i = Math.min(t.x + t.width, e.x + e.width), r = Math.min(t.y + t.height, e.y + e.height);
572
572
  return i > n && r > s ? { x: n, y: s, width: i - n, height: r - s } : null;
573
573
  }
574
- function Un(t, e) {
574
+ function Bn(t, e) {
575
575
  const n = Math.min(t.x, e.x), s = Math.min(t.y, e.y);
576
576
  return {
577
577
  x: n,
@@ -580,11 +580,11 @@ function Un(t, e) {
580
580
  height: Math.max(t.y + t.height, e.y + e.height) - s
581
581
  };
582
582
  }
583
- function ot(t, e) {
583
+ function lt(t, e) {
584
584
  return { x: t.x - e, y: t.y - e, width: t.width + 2 * e, height: t.height + 2 * e };
585
585
  }
586
- const Nn = 'button,input,select,textarea,a[href],[role=button],[role=combobox],[tabindex]:not([tabindex="-1"])';
587
- function at(t) {
586
+ const Vn = 'button,input,select,textarea,a[href],[role=button],[role=combobox],[tabindex]:not([tabindex="-1"])';
587
+ function ct(t) {
588
588
  const e = t.getBoundingClientRect();
589
589
  return e.width > 0 && e.height > 0 ? { x: e.left, y: e.top, width: e.width, height: e.height } : null;
590
590
  }
@@ -595,19 +595,19 @@ function Te(t, e = 0) {
595
595
  let i = null;
596
596
  for (const r of t.children) {
597
597
  const o = Te(r, e + 1);
598
- o && (i = i ? Un(i, o) : o);
598
+ o && (i = i ? Bn(i, o) : o);
599
599
  }
600
600
  return i;
601
601
  }
602
- const s = at(t);
602
+ const s = ct(t);
603
603
  if (s || e >= 3) return s;
604
- for (const i of t.querySelectorAll(Nn)) {
605
- const r = at(i);
604
+ for (const i of t.querySelectorAll(Vn)) {
605
+ const r = ct(i);
606
606
  if (r && getComputedStyle(i).visibility !== "hidden") return r;
607
607
  }
608
608
  return null;
609
609
  }
610
- const Dn = {
610
+ const Kn = {
611
611
  now: () => performance.now(),
612
612
  raf: (t) => requestAnimationFrame(t),
613
613
  cancelRaf: (t) => cancelAnimationFrame(t),
@@ -615,8 +615,8 @@ const Dn = {
615
615
  clearTimeout: (t) => window.clearTimeout(t),
616
616
  setInterval: (t, e) => window.setInterval(t, e),
617
617
  clearInterval: (t) => window.clearInterval(t)
618
- }, Mt = {
619
- scheduler: Dn,
618
+ }, Ut = {
619
+ scheduler: Kn,
620
620
  rect: (t) => Te(t),
621
621
  isVisible: (t) => Te(t) !== null,
622
622
  viewport: () => {
@@ -630,63 +630,63 @@ const Dn = {
630
630
  return !1;
631
631
  }
632
632
  },
633
- reducedMotion: () => Mt.matchMedia("(prefers-reduced-motion: reduce)"),
633
+ reducedMotion: () => Ut.matchMedia("(prefers-reduced-motion: reduce)"),
634
634
  scrollIntoView: (t, e) => t.scrollIntoView({ block: "center", inline: "nearest", behavior: e ? "instant" : "smooth" }),
635
635
  supportsPopover: () => typeof HTMLElement.prototype.showPopover == "function"
636
636
  };
637
- function z() {
637
+ function U() {
638
638
  return { phase: "idle", token: 0, loaded: null, index: 0, reason: "start", fieldNonEmpty: !1 };
639
639
  }
640
- const J = (t) => t.phase !== "idle" && t.phase !== "loading";
641
- function oe(t, e = t.index) {
640
+ const X = (t) => t.phase !== "idle" && t.phase !== "loading";
641
+ function ie(t, e = t.index) {
642
642
  const n = t.loaded?.applicable ?? [];
643
643
  return { index: n.slice(0, e).filter(Boolean).length, total: n.filter(Boolean).length };
644
644
  }
645
- function ge(t) {
645
+ function pe(t) {
646
646
  const e = t.loaded.tour;
647
647
  return { tourId: e.id, buildId: e.buildId, locale: e.locale };
648
648
  }
649
- function q(t) {
649
+ function K(t) {
650
650
  const e = t.loaded.tour.steps[t.index];
651
- return { ...ge(t), stepId: e.id, ...oe(t) };
651
+ return { ...pe(t), stepId: e.id, ...ie(t) };
652
652
  }
653
- const L = (t, e) => ({ type: "emit", name: t, detail: e });
654
- function Q(t, e, n) {
653
+ const O = (t, e) => ({ type: "emit", name: t, detail: e });
654
+ function Y(t, e, n) {
655
655
  const s = { ...t, phase: "resolving", index: e, reason: n, token: t.token + 1, fieldNonEmpty: !1 };
656
656
  return { state: s, effects: [{ type: "persist", index: e }, { type: "wait", mode: "resolve", index: e, token: s.token }] };
657
657
  }
658
- function Z(t, e, n) {
658
+ function W(t, e, n) {
659
659
  const i = t.loaded.applicable.findIndex((r, o) => r && o > e);
660
660
  return i === -1 ? {
661
- state: { ...z(), token: t.token + 1 },
662
- effects: [L("tour-complete", { ...ge(t), total: oe(t).total }), { type: "clearPersist" }, { type: "teardown" }]
663
- } : Q(t, i, n);
661
+ state: { ...U(), token: t.token + 1 },
662
+ effects: [O("tour-complete", { ...pe(t), total: ie(t).total }), { type: "clearPersist" }, { type: "teardown" }]
663
+ } : Y(t, i, n);
664
664
  }
665
- function X(t) {
665
+ function G(t) {
666
666
  return t.loaded.tour.steps[t.index];
667
667
  }
668
- const zn = {
668
+ const Wn = {
669
669
  click: "click",
670
670
  "input-commit": "input",
671
671
  change: "change",
672
672
  visible: "visible"
673
673
  };
674
- function Hn(t, e) {
674
+ function Gn(t, e) {
675
675
  const n = { state: t, effects: [] };
676
676
  if ("token" in e && e.token !== void 0 && e.token !== t.token) return n;
677
677
  switch (e.type) {
678
678
  case "REQUEST":
679
- return { state: { ...z(), phase: "loading", token: t.token + 1 }, effects: [{ type: "load" }] };
679
+ return { state: { ...U(), phase: "loading", token: t.token + 1 }, effects: [{ type: "load" }] };
680
680
  case "LOAD_FAILED":
681
681
  return t.phase !== "loading" ? n : {
682
- state: { ...z(), token: t.token + 1 },
683
- effects: [L("tour-error", e.error), { type: "clearPersist" }, { type: "teardown" }]
682
+ state: { ...U(), token: t.token + 1 },
683
+ effects: [O("tour-error", e.error), { type: "clearPersist" }, { type: "teardown" }]
684
684
  };
685
685
  case "LOADED": {
686
686
  if (t.phase !== "loading") return n;
687
- const s = e.loaded, i = { ...t, loaded: s, index: s.start }, r = L("tour-start", {
688
- ...ge(i),
689
- total: oe(i).total,
687
+ const s = e.loaded, i = { ...t, loaded: s, index: s.start }, r = O("tour-start", {
688
+ ...pe(i),
689
+ total: ie(i).total,
690
690
  source: s.source,
691
691
  resumed: s.resumed,
692
692
  entryNavigated: s.navigate
@@ -695,58 +695,58 @@ function Hn(t, e) {
695
695
  const a = { ...i, phase: "entering", reason: o, token: t.token + 1 };
696
696
  return { state: a, effects: [r, { type: "persist", index: s.start }, { type: "navigate", token: a.token }] };
697
697
  }
698
- const l = Q(i, s.start, o);
698
+ const l = Y(i, s.start, o);
699
699
  return { state: l.state, effects: [r, ...l.effects] };
700
700
  }
701
701
  case "ENTER_DONE":
702
- return t.phase === "entering" ? Q(t, t.index, t.reason) : n;
702
+ return t.phase === "entering" ? Y(t, t.index, t.reason) : n;
703
703
  case "ENTER_FAILED":
704
704
  return t.phase !== "entering" ? n : {
705
- state: { ...z(), token: t.token + 1 },
705
+ state: { ...U(), token: t.token + 1 },
706
706
  effects: [
707
- L("tour-error", { reason: "entry-params", fatal: !0, message: e.message, ...ge(t) }),
707
+ O("tour-error", { reason: "entry-params", fatal: !0, message: e.message, ...pe(t) }),
708
708
  { type: "clearPersist" },
709
709
  { type: "teardown" }
710
710
  ]
711
711
  };
712
712
  case "RESOLVED": {
713
713
  if (t.phase !== "resolving" && t.phase !== "fallback") return n;
714
- const s = t.phase === "fallback" ? "recovered" : t.reason, i = { ...t, phase: "showing", reason: s, token: t.token + 1, fieldNonEmpty: e.fieldNonEmpty ?? !1 }, r = X(i), o = [L("tour-step", { ...q(i), advance: r.advance, reason: s })];
714
+ const s = t.phase === "fallback" ? "recovered" : t.reason, i = { ...t, phase: "showing", reason: s, token: t.token + 1, fieldNonEmpty: e.fieldNonEmpty ?? !1 }, r = G(i), o = [O("tour-step", { ...K(i), advance: r.advance, reason: s })];
715
715
  return r.advance === "manual" && o.push({ type: "focus" }), r.advance === "visible" && o.push({ type: "wait", mode: "visible", index: t.index, token: i.token }), { state: i, effects: o };
716
716
  }
717
717
  case "RESOLVE_TIMEOUT": {
718
- const s = t.phase === "showing" && X(t).advance === "visible";
718
+ const s = t.phase === "showing" && G(t).advance === "visible";
719
719
  if (t.phase !== "resolving" && !s) return n;
720
- const i = { ...t, phase: "fallback", token: t.token + 1 }, r = { ...q(i), reason: "target-timeout", fatal: !1, message: "the target did not appear in time" };
720
+ const i = { ...t, phase: "fallback", token: t.token + 1 }, r = { ...K(i), reason: "target-timeout", fatal: !1, message: "the target did not appear in time" };
721
721
  return {
722
722
  state: i,
723
723
  effects: [
724
- L("tour-error", { ...r, ...e.testId ? { testId: e.testId } : {}, kind: e.kind }),
724
+ O("tour-error", { ...r, ...e.testId ? { testId: e.testId } : {}, kind: e.kind }),
725
725
  { type: "wait", mode: "fallback", index: t.index, token: i.token },
726
726
  { type: "focus" }
727
727
  ]
728
728
  };
729
729
  }
730
730
  case "TRIGGER":
731
- return t.phase !== "showing" || X(t).advance !== zn[e.kind] ? n : Z(t, t.index, "advance");
731
+ return t.phase !== "showing" || G(t).advance !== Wn[e.kind] ? n : W(t, t.index, "advance");
732
732
  case "NEXT": {
733
733
  const s = e.token === void 0;
734
- return t.phase === "fallback" && s ? Z(t, t.index, "skip") : t.phase !== "showing" || !s && X(t).advance === "input" && !t.fieldNonEmpty ? n : Z(t, t.index, "advance");
734
+ return t.phase === "fallback" && s ? W(t, t.index, "skip") : t.phase !== "showing" || !s && G(t).advance === "input" && !t.fieldNonEmpty ? n : W(t, t.index, "advance");
735
735
  }
736
736
  case "SKIP":
737
- return t.phase === "fallback" ? Z(t, t.index, "skip") : n;
737
+ return t.phase === "fallback" ? W(t, t.index, "skip") : n;
738
738
  case "FIELD":
739
739
  return t.phase === "showing" && t.fieldNonEmpty !== e.nonEmpty ? { state: { ...t, fieldNonEmpty: e.nonEmpty }, effects: [] } : n;
740
740
  case "JUMP":
741
- return !(t.phase === "showing" || t.phase === "lost" || t.phase === "paused" || t.phase === "fallback") || e.to <= t.index || !t.loaded.applicable[e.to] ? n : e.performed ? Z(t, e.to, "jump") : Q(t, e.to, "jump");
741
+ return !(t.phase === "showing" || t.phase === "lost" || t.phase === "paused" || t.phase === "fallback") || e.to <= t.index || !t.loaded.applicable[e.to] ? n : e.performed ? W(t, e.to, "jump") : Y(t, e.to, "jump");
742
742
  case "TARGET_LOST":
743
- return t.phase !== "showing" ? n : Fn(t);
743
+ return t.phase !== "showing" ? n : qn(t);
744
744
  case "TARGET_BACK": {
745
745
  if (t.phase !== "lost" && t.phase !== "paused") return n;
746
746
  const s = { ...t, phase: "showing", token: t.token + 1 };
747
747
  return t.phase === "lost" ? { state: s, effects: [] } : {
748
748
  state: { ...s, reason: "resume" },
749
- effects: [L("tour-step", { ...q(s), advance: X(s).advance, reason: "resume" })]
749
+ effects: [O("tour-step", { ...K(s), advance: G(s).advance, reason: "resume" })]
750
750
  };
751
751
  }
752
752
  case "LOST_TIMEOUT": {
@@ -755,103 +755,103 @@ function Hn(t, e) {
755
755
  return {
756
756
  state: s,
757
757
  effects: [
758
- L("tour-offpath", { ...q(s), reason: "target-lost" }),
758
+ O("tour-offpath", { ...K(s), reason: "target-lost" }),
759
759
  { type: "wait", mode: "paused", index: t.index, token: s.token }
760
760
  ]
761
761
  };
762
762
  }
763
763
  case "RESUME":
764
- return t.phase === "paused" ? Q(t, t.index, "resume") : n;
764
+ return t.phase === "paused" ? Y(t, t.index, "resume") : n;
765
765
  case "DISMISS": {
766
766
  if (t.phase === "idle") return n;
767
767
  const s = [];
768
- return t.loaded && t.phase !== "loading" && s.push(L("tour-dismiss", { ...q(t), via: e.via, ...e.reason ? { reason: e.reason } : {} })), s.push({ type: "clearPersist" }, { type: "teardown" }), { state: { ...z(), token: t.token + 1 }, effects: s };
768
+ return t.loaded && t.phase !== "loading" && s.push(O("tour-dismiss", { ...K(t), via: e.via, ...e.reason ? { reason: e.reason } : {} })), s.push({ type: "clearPersist" }, { type: "teardown" }), { state: { ...U(), token: t.token + 1 }, effects: s };
769
769
  }
770
770
  case "LOCALE": {
771
- if (!J(t)) return n;
771
+ if (!X(t)) return n;
772
772
  const s = t.loaded.tour.steps;
773
773
  return e.tour.steps.length === s.length && e.tour.steps.every((r, o) => r.id === s[o].id && r.target === s[o].target && r.advance === s[o].advance) ? { state: { ...t, loaded: { ...t.loaded, tour: e.tour } }, effects: [] } : n;
774
774
  }
775
775
  }
776
776
  }
777
- function Fn(t) {
777
+ function qn(t) {
778
778
  const e = { ...t, phase: "lost", token: t.token + 1 };
779
779
  return { state: e, effects: [{ type: "wait", mode: "lost", index: t.index, token: e.token }] };
780
780
  }
781
- function jn(t, e, n) {
781
+ function Zn(t, e, n) {
782
782
  t.dispatchEvent(new CustomEvent(e, { detail: n, bubbles: !0, composed: !0 }));
783
783
  }
784
- function lt() {
784
+ function ut() {
785
785
  let t = document.activeElement;
786
786
  for (; t?.shadowRoot?.activeElement; ) t = t.shadowRoot.activeElement;
787
787
  return t;
788
788
  }
789
- function Ct(t) {
789
+ function Nt(t) {
790
790
  try {
791
791
  return t.matches(":popover-open");
792
792
  } catch {
793
793
  return !1;
794
794
  }
795
795
  }
796
- function Bn(t, e) {
797
- if (!(!e.supportsPopover() || Ct(t)))
796
+ function Xn(t, e) {
797
+ if (!(!e.supportsPopover() || Nt(t)))
798
798
  try {
799
799
  t.showPopover();
800
800
  } catch {
801
801
  }
802
802
  }
803
- function Vn(t, e) {
803
+ function Yn(t, e) {
804
804
  if (!e.supportsPopover()) return;
805
- const n = lt();
805
+ const n = ut();
806
806
  try {
807
- Ct(t) && t.hidePopover(), t.showPopover();
807
+ Nt(t) && t.hidePopover(), t.showPopover();
808
808
  } catch {
809
809
  return;
810
810
  }
811
- n instanceof HTMLElement && n.isConnected && lt() !== n && n.focus({ preventScroll: !0 });
811
+ n instanceof HTMLElement && n.isConnected && ut() !== n && n.focus({ preventScroll: !0 });
812
812
  }
813
- function Gn(t, e) {
813
+ function Jn(t, e) {
814
814
  return t.replace(/\{(\w+)\}/g, (n, s) => s in e ? String(e[s]) : `{${s}}`);
815
815
  }
816
- function Kn(t) {
816
+ function Qn(t) {
817
817
  return t.replace(/_/g, "-").split("-", 1)[0].toLowerCase();
818
818
  }
819
819
  function Ie(t, e) {
820
820
  if (!e) return null;
821
821
  const n = (l) => l.replace(/_/g, "-").toLowerCase(), s = [...t], i = n(e), r = s.find((l) => n(l) === i);
822
822
  if (r !== void 0) return r;
823
- const o = Kn(e);
823
+ const o = Qn(e);
824
824
  return s.find((l) => n(l) === o) ?? null;
825
825
  }
826
- function Wn(t, e, n, s = "en") {
826
+ function es(t, e, n, s = "en") {
827
827
  const i = Ie(Object.keys(t), e), r = (i !== null ? t[i] : void 0) ?? t[s], o = n ? Ie(Object.keys(n), e) : null, l = o !== null ? n[o] : void 0;
828
828
  return l ? { ...r, ...l } : r;
829
829
  }
830
- const ce = {
830
+ const ae = {
831
831
  en: { next: "Next", progress: "Step {current} of {total}" },
832
832
  fr: { next: "Suivant", progress: "Étape {current} sur {total}" },
833
833
  nl: { next: "Volgende", progress: "Stap {current} van {total}" },
834
834
  de: { next: "Weiter", progress: "Schritt {current} von {total}" }
835
- }, qn = 20, R = {
836
- testId: new RegExp(gn),
837
- stepId: new RegExp(mn),
838
- tourId: new RegExp(yn),
839
- attr: new RegExp(_n),
840
- locale: new RegExp(vn),
841
- layout: new RegExp(bn),
842
- role: new RegExp(wn),
843
- route: new RegExp(En),
844
- media: new RegExp(An),
845
- sri: new RegExp($n),
846
- buildId: new RegExp(kn)
847
- }, Zn = /^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])$/i, Xn = /%(?![0-9A-Fa-f]{2})/;
848
- function Yn(t) {
849
- return typeof t == "string" && t.length <= xn && R.route.test(t) && !Xn.test(t) && t.split("/").slice(1).every((e) => !/^\.\.?$/.test(e.replace(/%2e/gi, ".")));
850
- }
851
- function Pt(t) {
852
- return typeof t == "string" && R.buildId.test(t) && !Zn.test(t.split(".")[0]);
853
- }
854
- function be(t) {
835
+ }, ts = 20, I = {
836
+ testId: new RegExp($n),
837
+ stepId: new RegExp(En),
838
+ tourId: new RegExp(kn),
839
+ attr: new RegExp(An),
840
+ locale: new RegExp(Tn),
841
+ layout: new RegExp(Sn),
842
+ role: new RegExp(xn),
843
+ route: new RegExp(Rn),
844
+ media: new RegExp(On),
845
+ sri: new RegExp(In),
846
+ buildId: new RegExp(Ln)
847
+ }, ns = /^(?:con|prn|aux|nul|com[1-9]|lpt[1-9])$/i, ss = /%(?![0-9A-Fa-f]{2})/;
848
+ function is(t) {
849
+ return typeof t == "string" && t.length <= Pn && I.route.test(t) && !ss.test(t) && t.split("/").slice(1).every((e) => !/^\.\.?$/.test(e.replace(/%2e/gi, ".")));
850
+ }
851
+ function Dt(t) {
852
+ return typeof t == "string" && I.buildId.test(t) && !ns.test(t.split(".")[0]);
853
+ }
854
+ function _e(t) {
855
855
  let e;
856
856
  try {
857
857
  e = new URL(t);
@@ -860,12 +860,12 @@ function be(t) {
860
860
  }
861
861
  return e.protocol !== "https:" && e.protocol !== "http:" || e.username || e.password ? null : e.origin;
862
862
  }
863
- class ze {
863
+ class He {
864
864
  constructor() {
865
865
  this.issues = [];
866
866
  }
867
867
  fail(e, n) {
868
- this.issues.length < qn && this.issues.push({ path: e, message: n });
868
+ this.issues.length < ts && this.issues.push({ path: e, message: n });
869
869
  }
870
870
  get ok() {
871
871
  return this.issues.length === 0;
@@ -893,7 +893,7 @@ class ze {
893
893
  entry(e, n) {
894
894
  if (e === null) return null;
895
895
  const s = this.obj(e, n);
896
- return s ? Yn(s.route) ? Object.freeze({ route: s.route }) : (this.fail(`${n}.route`, "is not a same-origin, base-relative route pattern"), null) : null;
896
+ return s ? is(s.route) ? Object.freeze({ route: s.route }) : (this.fail(`${n}.route`, "is not a same-origin, base-relative route pattern"), null) : null;
897
897
  }
898
898
  stringMap(e, n, s) {
899
899
  const i = {}, r = this.obj(e, n);
@@ -905,10 +905,10 @@ class ze {
905
905
  return Object.freeze(i);
906
906
  }
907
907
  }
908
- function Ut(t, e, n) {
908
+ function zt(t, e, n) {
909
909
  return e.kind !== n && t.fail("kind", `must be "${n}"`), t.ok;
910
910
  }
911
- function Ee(t) {
911
+ function ve(t) {
912
912
  if (/^\s*</.test(t))
913
913
  return { ok: !1, reason: "load-failed", issues: [{ path: "", message: "received HTML (missing file or SPA fallback?)" }] };
914
914
  try {
@@ -917,65 +917,65 @@ function Ee(t) {
917
917
  return { ok: !1, reason: "invalid-data", issues: [{ path: "", message: `not JSON: ${String(e)}` }] };
918
918
  }
919
919
  }
920
- function Nt(t) {
921
- const e = new ze(), n = e.obj(t, "");
920
+ function Ft(t) {
921
+ const e = new He(), n = e.obj(t, "");
922
922
  if (!n) return { ok: !1, reason: "invalid-data", issues: e.issues };
923
923
  const s = n.schema;
924
- return typeof s != "number" || !Number.isInteger(s) ? { ok: !1, reason: "invalid-data", issues: [{ path: "schema", message: "must be an integer" }] } : s !== et ? {
924
+ return typeof s != "number" || !Number.isInteger(s) ? { ok: !1, reason: "invalid-data", issues: [{ path: "schema", message: "must be an integer" }] } : s !== nt ? {
925
925
  ok: !1,
926
926
  reason: "schema-unsupported",
927
- issues: [{ path: "schema", message: `schema ${s} is not supported (this overlay reads ${et})` }]
927
+ issues: [{ path: "schema", message: `schema ${s} is not supported (this overlay reads ${nt})` }]
928
928
  } : { ok: !0, value: n };
929
929
  }
930
- function Jn(t) {
931
- const e = Nt(t);
930
+ function rs(t) {
931
+ const e = Ft(t);
932
932
  if (!e.ok) return e;
933
- const n = e.value, s = new ze();
934
- if (!Ut(s, n, ln)) return { ok: !1, reason: "invalid-data", issues: s.issues };
935
- const i = Pt(n.buildId) ? n.buildId : (s.fail("buildId", "is not a build id"), ""), r = s.str(n.testIdAttribute, "testIdAttribute", R.attr) ?? "", o = [], l = (_) => _.replace(/_/g, "-").toLowerCase();
936
- !Array.isArray(n.locales) || n.locales.length < 1 || n.locales.length > nt ? s.fail("locales", `must list 1..${nt} locales`) : n.locales.forEach((_, m) => {
937
- const u = s.str(_, `locales.${m}`, R.locale);
933
+ const n = e.value, s = new He();
934
+ if (!zt(s, n, gn)) return { ok: !1, reason: "invalid-data", issues: s.issues };
935
+ const i = Dt(n.buildId) ? n.buildId : (s.fail("buildId", "is not a build id"), ""), r = s.str(n.testIdAttribute, "testIdAttribute", I.attr) ?? "", o = [], l = (_) => _.replace(/_/g, "-").toLowerCase();
936
+ !Array.isArray(n.locales) || n.locales.length < 1 || n.locales.length > it ? s.fail("locales", `must list 1..${it} locales`) : n.locales.forEach((_, m) => {
937
+ const u = s.str(_, `locales.${m}`, I.locale);
938
938
  u !== null && (o.some((p) => l(p) === l(u)) ? s.fail(`locales.${m}`, "is listed twice") : o.push(u));
939
939
  });
940
- const a = s.str(n.defaultLocale, "defaultLocale", R.locale) ?? "";
940
+ const a = s.str(n.defaultLocale, "defaultLocale", I.locale) ?? "";
941
941
  a && !o.includes(a) && s.fail("defaultLocale", "must be one of locales");
942
942
  let f = null;
943
943
  if (n.guideOrigin !== void 0 && n.guideOrigin !== null) {
944
944
  const _ = s.str(n.guideOrigin, "guideOrigin");
945
- _ !== null && be(_) !== _ ? s.fail("guideOrigin", "must be an origin only (scheme://host[:port])") : f = _;
945
+ _ !== null && _e(_) !== _ ? s.fail("guideOrigin", "must be an origin only (scheme://host[:port])") : f = _;
946
946
  }
947
947
  let h = null;
948
948
  if (n.layouts !== void 0 && n.layouts !== null) {
949
- h = s.stringMap(n.layouts, "layouts", (m, u, p) => R.layout.test(m) ? typeof u != "string" || u.length > In || !R.media.test(u) ? (s.fail(p, "is not a media query"), null) : u : (s.fail(p, "is not a layout name"), null));
949
+ h = s.stringMap(n.layouts, "layouts", (m, u, p) => I.layout.test(m) ? typeof u != "string" || u.length > Un || !I.media.test(u) ? (s.fail(p, "is not a media query"), null) : u : (s.fail(p, "is not a layout name"), null));
950
950
  const _ = Object.keys(h).length;
951
- (_ < 1 || _ > fe) && s.fail("layouts", `must map 1..${fe} layouts`);
951
+ (_ < 1 || _ > he) && s.fail("layouts", `must map 1..${he} layouts`);
952
952
  }
953
- const c = [], b = /* @__PURE__ */ new Set();
954
- return !Array.isArray(n.tours) || n.tours.length > tt ? s.fail("tours", `must be a list of at most ${tt} tours`) : n.tours.forEach((_, m) => {
953
+ const c = [], y = /* @__PURE__ */ new Set();
954
+ return !Array.isArray(n.tours) || n.tours.length > st ? s.fail("tours", `must be a list of at most ${st} tours`) : n.tours.forEach((_, m) => {
955
955
  const u = `tours.${m}`, p = s.obj(_, u);
956
956
  if (!p) return;
957
- const v = s.str(p.id, `${u}.id`, R.tourId);
958
- v !== null && (b.has(v.toLowerCase()) && s.fail(`${u}.id`, "is not unique"), b.add(v.toLowerCase()));
957
+ const v = s.str(p.id, `${u}.id`, I.tourId);
958
+ v !== null && (y.has(v.toLowerCase()) && s.fail(`${u}.id`, "is not unique"), y.add(v.toLowerCase()));
959
959
  const g = (E, k) => o.includes(E) || (s.fail(k, "is not one of locales"), !1), d = s.stringMap(
960
960
  p.files,
961
961
  `${u}.files`,
962
962
  (E, k, S) => g(E, S) ? k !== `${v}.${E}.json` ? (s.fail(S, `must be "${v}.${E}.json"`), null) : k : null
963
963
  );
964
964
  a && !Object.hasOwn(d, a) && s.fail(`${u}.files`, "has no file for the default locale");
965
- const w = s.stringMap(p.title, `${u}.title`, (E, k, S) => g(E, S) ? s.text(k, S, Se, !1) : null), y = s.stringMap(
965
+ const w = s.stringMap(p.title, `${u}.title`, (E, k, S) => g(E, S) ? s.text(k, S, Se, !1) : null), b = s.stringMap(
966
966
  p.integrity,
967
967
  `${u}.integrity`,
968
- (E, k, S) => Object.hasOwn(d, E) ? s.str(k, S, R.sri) : (s.fail(S, "has no matching file"), null)
968
+ (E, k, S) => Object.hasOwn(d, E) ? s.str(k, S, I.sri) : (s.fail(S, "has no matching file"), null)
969
969
  );
970
- for (const E in d) Object.hasOwn(y, E) || s.fail(`${u}.integrity`, `has no hash for "${E}"`);
970
+ for (const E in d) Object.hasOwn(b, E) || s.fail(`${u}.integrity`, `has no hash for "${E}"`);
971
971
  const $ = Object.freeze({
972
972
  id: v ?? "",
973
- role: s.str(p.role, `${u}.role`, R.role) ?? "",
973
+ role: s.str(p.role, `${u}.role`, I.role) ?? "",
974
974
  title: w,
975
975
  entry: s.entry(p.entry, `${u}.entry`),
976
- steps: s.int(p.steps, `${u}.steps`, 1, Lt) ?? 0,
976
+ steps: s.int(p.steps, `${u}.steps`, 1, Ct) ?? 0,
977
977
  files: d,
978
- integrity: y
978
+ integrity: b
979
979
  });
980
980
  c.push($);
981
981
  }), s.ok ? {
@@ -991,43 +991,43 @@ function Jn(t) {
991
991
  })
992
992
  } : { ok: !1, reason: "invalid-data", issues: s.issues };
993
993
  }
994
- function Qn(t, e) {
995
- const n = Nt(t);
994
+ function os(t, e) {
995
+ const n = Ft(t);
996
996
  if (!n.ok) return n;
997
- const s = n.value, i = new ze();
998
- if (!Ut(i, s, cn)) return { ok: !1, reason: "invalid-data", issues: i.issues };
997
+ const s = n.value, i = new He();
998
+ if (!zt(i, s, mn)) return { ok: !1, reason: "invalid-data", issues: i.issues };
999
999
  const { manifest: r, entry: o } = e;
1000
- s.id !== o.id && i.fail("id", `must be "${o.id}"`), (!Pt(s.buildId) || s.buildId !== r.buildId) && i.fail("buildId", `must be the manifest's "${r.buildId}"`), s.locale !== e.locale && i.fail("locale", `must be "${e.locale}"`);
1000
+ s.id !== o.id && i.fail("id", `must be "${o.id}"`), (!Dt(s.buildId) || s.buildId !== r.buildId) && i.fail("buildId", `must be the manifest's "${r.buildId}"`), s.locale !== e.locale && i.fail("locale", `must be "${e.locale}"`);
1001
1001
  const l = i.text(s.title, "title", Se, !1) ?? "";
1002
1002
  let a = null;
1003
1003
  if (s.guideUrl !== void 0 && s.guideUrl !== null) {
1004
1004
  const _ = i.str(s.guideUrl, "guideUrl");
1005
1005
  if (_ !== null) {
1006
- const m = _.length <= Tn ? be(_) : null;
1006
+ const m = _.length <= Cn ? _e(_) : null;
1007
1007
  m === null || e.guideOrigin === null || m !== e.guideOrigin ? i.fail("guideUrl", "must be an http(s) URL on the trusted guide origin") : a = _;
1008
1008
  }
1009
1009
  }
1010
1010
  const f = s.entry === void 0 ? (i.fail("entry", "is required (null for none)"), null) : i.entry(s.entry, "entry");
1011
1011
  (f?.route ?? null) !== (o.entry?.route ?? null) && i.fail("entry", "must equal the manifest's entry");
1012
- const h = [], c = /* @__PURE__ */ new Set(), b = Object.keys(r.layouts ?? {});
1013
- return !Array.isArray(s.steps) || s.steps.length !== o.steps || s.steps.length > Lt ? i.fail("steps", `must be a list of exactly ${o.steps} steps`) : s.steps.forEach((_, m) => {
1012
+ const h = [], c = /* @__PURE__ */ new Set(), y = Object.keys(r.layouts ?? {});
1013
+ return !Array.isArray(s.steps) || s.steps.length !== o.steps || s.steps.length > Ct ? i.fail("steps", `must be a list of exactly ${o.steps} steps`) : s.steps.forEach((_, m) => {
1014
1014
  const u = `steps.${m}`, p = i.obj(_, u);
1015
1015
  if (!p) return;
1016
- const v = i.str(p.id, `${u}.id`, R.stepId) ?? "";
1016
+ const v = i.str(p.id, `${u}.id`, I.stepId) ?? "";
1017
1017
  c.has(v) && i.fail(`${u}.id`, "is not unique"), c.add(v);
1018
- const g = p.target === null ? null : i.str(p.target, `${u}.target`, R.testId), d = i.obj(p.advance, `${u}.advance`), w = d ? i.oneOf(d.on, `${u}.advance.on`, hn) : null;
1019
- w && pn.includes(w) && g === null && i.fail(`${u}.target`, `is required for advance "${w}"`);
1020
- let y = null;
1021
- p.layouts !== void 0 && p.layouts !== null && (!Array.isArray(p.layouts) || p.layouts.length < 1 || p.layouts.length > fe ? i.fail(`${u}.layouts`, `must list 1..${fe} layouts`) : (y = p.layouts.filter(($) => typeof $ == "string" && b.includes($)), y.length !== p.layouts.length && i.fail(`${u}.layouts`, "must name the manifest's layouts"))), h.push(
1018
+ const g = p.target === null ? null : i.str(p.target, `${u}.target`, I.testId), d = i.obj(p.advance, `${u}.advance`), w = d ? i.oneOf(d.on, `${u}.advance.on`, yn) : null;
1019
+ w && wn.includes(w) && g === null && i.fail(`${u}.target`, `is required for advance "${w}"`);
1020
+ let b = null;
1021
+ p.layouts !== void 0 && p.layouts !== null && (!Array.isArray(p.layouts) || p.layouts.length < 1 || p.layouts.length > he ? i.fail(`${u}.layouts`, `must list 1..${he} layouts`) : (b = p.layouts.filter(($) => typeof $ == "string" && y.includes($)), b.length !== p.layouts.length && i.fail(`${u}.layouts`, "must name the manifest's layouts"))), h.push(
1022
1022
  Object.freeze({
1023
1023
  id: v,
1024
1024
  target: g,
1025
1025
  advance: w ?? "manual",
1026
- waitFor: i.optStr(p.waitFor, `${u}.waitFor`, R.testId),
1026
+ waitFor: i.optStr(p.waitFor, `${u}.waitFor`, I.testId),
1027
1027
  title: i.text(p.title, `${u}.title`, Se, !0),
1028
- text: i.text(p.text, `${u}.text`, Sn, !0),
1029
- placement: p.placement === void 0 || p.placement === null ? null : i.oneOf(p.placement, `${u}.placement`, fn),
1030
- layouts: y && Object.freeze(y)
1028
+ text: i.text(p.text, `${u}.text`, Mn, !0),
1029
+ placement: p.placement === void 0 || p.placement === null ? null : i.oneOf(p.placement, `${u}.placement`, vn),
1030
+ layouts: b && Object.freeze(b)
1031
1031
  })
1032
1032
  );
1033
1033
  }), i.ok ? {
@@ -1043,28 +1043,28 @@ function Qn(t, e) {
1043
1043
  })
1044
1044
  } : { ok: !1, reason: "invalid-data", issues: i.issues };
1045
1045
  }
1046
- const ct = { "load-failed": 0, "invalid-data": 1, "schema-unsupported": 2 };
1047
- class O extends Error {
1046
+ const dt = { "load-failed": 0, "invalid-data": 1, "schema-unsupported": 2 };
1047
+ class R extends Error {
1048
1048
  constructor(e, n) {
1049
1049
  super(n), this.reason = e;
1050
1050
  }
1051
1051
  }
1052
- function es(t, e, n) {
1052
+ function as(t, e, n) {
1053
1053
  return Ie(t, e) ?? (t.includes(n) ? n : t[0]);
1054
1054
  }
1055
- async function ut(t, e) {
1056
- if (!t.ok) throw new O("load-failed", `HTTP ${t.status}`);
1057
- if (Number(t.headers.get("content-length") ?? NaN) > e) throw new O("invalid-data", `the file is larger than ${e} bytes`);
1055
+ async function ht(t, e) {
1056
+ if (!t.ok) throw new R("load-failed", `HTTP ${t.status}`);
1057
+ if (Number(t.headers.get("content-length") ?? NaN) > e) throw new R("invalid-data", `the file is larger than ${e} bytes`);
1058
1058
  const s = new TextDecoder("utf-8", { fatal: !0 }), i = (h) => {
1059
1059
  try {
1060
1060
  return s.decode(h);
1061
1061
  } catch {
1062
- throw new O("invalid-data", "the file is not valid UTF-8");
1062
+ throw new R("invalid-data", "the file is not valid UTF-8");
1063
1063
  }
1064
1064
  };
1065
1065
  if (!t.body) {
1066
1066
  const h = new Uint8Array(await t.arrayBuffer());
1067
- if (h.byteLength > e) throw new O("invalid-data", `the file is larger than ${e} bytes`);
1067
+ if (h.byteLength > e) throw new R("invalid-data", `the file is larger than ${e} bytes`);
1068
1068
  return i(h);
1069
1069
  }
1070
1070
  const r = t.body.getReader(), o = [];
@@ -1073,7 +1073,7 @@ async function ut(t, e) {
1073
1073
  const { done: h, value: c } = await r.read();
1074
1074
  if (h) break;
1075
1075
  if (l += c.byteLength, l > e)
1076
- throw r.cancel(), new O("invalid-data", `the file is larger than ${e} bytes`);
1076
+ throw r.cancel(), new R("invalid-data", `the file is larger than ${e} bytes`);
1077
1077
  o.push(c);
1078
1078
  }
1079
1079
  const a = new Uint8Array(l);
@@ -1082,16 +1082,16 @@ async function ut(t, e) {
1082
1082
  a.set(h, f), f += h.byteLength;
1083
1083
  return i(a);
1084
1084
  }
1085
- async function dt(t, e) {
1085
+ async function pt(t, e) {
1086
1086
  const n = t.origin ?? location.origin, s = t.baseURI ?? document.baseURI, i = t.fetch ?? globalThis.fetch.bind(globalThis), r = t.cache ?? /* @__PURE__ */ new Map(), o = (g) => new URL(g, s), l = (g) => o(g).origin !== n, a = t.timeoutMs ?? 1e4;
1087
1087
  async function f(g, d, w) {
1088
- const y = l(g), $ = new AbortController(), E = setTimeout(() => $.abort(), a);
1088
+ const b = l(g), $ = new AbortController(), E = setTimeout(() => $.abort(), a);
1089
1089
  try {
1090
1090
  const k = {
1091
- credentials: y ? "omit" : "same-origin",
1092
- mode: y ? "cors" : "same-origin",
1093
- redirect: y ? "error" : "follow",
1094
- cache: d === "manifest" || !y ? "no-cache" : "default",
1091
+ credentials: b ? "omit" : "same-origin",
1092
+ mode: b ? "cors" : "same-origin",
1093
+ redirect: b ? "error" : "follow",
1094
+ cache: d === "manifest" || !b ? "no-cache" : "default",
1095
1095
  signal: $.signal
1096
1096
  };
1097
1097
  w && (k.integrity = w);
@@ -1099,9 +1099,9 @@ async function dt(t, e) {
1099
1099
  try {
1100
1100
  S = await i(o(g).href, k);
1101
1101
  } catch (x) {
1102
- throw new O("load-failed", `could not fetch ${g}: ${String(x)}`);
1102
+ throw new R("load-failed", `could not fetch ${g}: ${String(x)}`);
1103
1103
  }
1104
- return await ut(S, d === "manifest" ? Rn : $e);
1104
+ return await ht(S, d === "manifest" ? Nn : we);
1105
1105
  } finally {
1106
1106
  clearTimeout(E);
1107
1107
  }
@@ -1111,22 +1111,22 @@ async function dt(t, e) {
1111
1111
  let w = r.get(d);
1112
1112
  return w || (w = (async () => {
1113
1113
  try {
1114
- const y = Ee(await f(g, "manifest"));
1115
- return { ...y.ok ? Jn(y.value) : y, url: d };
1116
- } catch (y) {
1117
- const $ = y instanceof O ? y : new O("load-failed", String(y));
1114
+ const b = ve(await f(g, "manifest"));
1115
+ return { ...b.ok ? rs(b.value) : b, url: d };
1116
+ } catch (b) {
1117
+ const $ = b instanceof R ? b : new R("load-failed", String(b));
1118
1118
  return $.reason === "load-failed" && r.delete(d), { ok: !1, reason: $.reason, message: $.message, url: d };
1119
1119
  }
1120
1120
  })(), r.set(d, w)), w;
1121
1121
  }
1122
- const c = [], b = (g, d) => c.push({ ok: !1, reason: g.reason, message: g.message ?? `${d}: ${g.issues?.[0]?.path ?? ""} ${g.issues?.[0]?.message ?? ""}`.trim(), issues: g.issues });
1122
+ const c = [], y = (g, d) => c.push({ ok: !1, reason: g.reason, message: g.message ?? `${d}: ${g.issues?.[0]?.path ?? ""} ${g.issues?.[0]?.message ?? ""}`.trim(), issues: g.issues });
1123
1123
  let _ = null;
1124
1124
  if (t.fallbackManifest)
1125
1125
  if (l(t.fallbackManifest))
1126
1126
  c.push({ ok: !1, reason: "load-failed", message: "fallbackManifest must be same-origin" });
1127
1127
  else {
1128
1128
  const g = await h(t.fallbackManifest);
1129
- g.ok ? _ = { ...g.value, url: g.url } : b(g, "bundled manifest");
1129
+ g.ok ? _ = { ...g.value, url: g.url } : y(g, "bundled manifest");
1130
1130
  }
1131
1131
  const m = t.buildId || _?.buildId || "";
1132
1132
  let u = null;
@@ -1135,66 +1135,66 @@ async function dt(t, e) {
1135
1135
  c.push({ ok: !1, reason: "load-failed", message: "the manifest URL needs a build id ({buildId}) and none is known" });
1136
1136
  else {
1137
1137
  const g = await h(t.manifest.split("{buildId}").join(encodeURIComponent(m)));
1138
- g.ok ? m && g.value.buildId !== m ? c.push({ ok: !1, reason: "invalid-data", message: `the manifest is for build "${g.value.buildId}", expected "${m}"` }) : u = { ...g.value, url: g.url } : b(g, "manifest"), !g.ok && _ && console.warn(`[steppy-tour] remote manifest unavailable, using the bundled copy: ${c.at(-1)?.message}`);
1138
+ g.ok ? m && g.value.buildId !== m ? c.push({ ok: !1, reason: "invalid-data", message: `the manifest is for build "${g.value.buildId}", expected "${m}"` }) : u = { ...g.value, url: g.url } : y(g, "manifest"), !g.ok && _ && console.warn(`[steppy-tour] remote manifest unavailable, using the bundled copy: ${c.at(-1)?.message}`);
1139
1139
  }
1140
1140
  if (!t.manifest && !t.fallbackManifest)
1141
1141
  return { ok: !1, reason: "load-failed", message: "no manifest is configured (set manifest or fallback-manifest)" };
1142
- const p = u ? new URL(u.url).origin : null, v = t.guideOrigin && (be(t.guideOrigin) ?? t.guideOrigin) || _?.guideOrigin || (u && (!l(u.url) || u.guideOrigin === p) ? u.guideOrigin : null);
1142
+ const p = u ? new URL(u.url).origin : null, v = t.guideOrigin && (_e(t.guideOrigin) ?? t.guideOrigin) || _?.guideOrigin || (u && (!l(u.url) || u.guideOrigin === p) ? u.guideOrigin : null);
1143
1143
  for (const g of [u, _]) {
1144
1144
  if (!g) continue;
1145
- const d = g !== _ && _?.buildId === g.buildId ? _ : g, w = d.tours.find((y) => y.id === e);
1145
+ const d = g !== _ && _?.buildId === g.buildId ? _ : g, w = d.tours.find((b) => b.id === e);
1146
1146
  if (!w)
1147
1147
  c.push({ ok: !1, reason: "load-failed", message: `no tour "${e}" in ${d.url}` });
1148
1148
  else {
1149
- const y = es(Object.keys(w.files), t.locale, d.defaultLocale), $ = l(g.url), E = d !== g || $ ? w.integrity[y] : void 0;
1149
+ const b = as(Object.keys(w.files), t.locale, d.defaultLocale), $ = l(g.url), E = d !== g || $ ? w.integrity[b] : void 0;
1150
1150
  try {
1151
1151
  let k;
1152
1152
  if (t.source) {
1153
- const x = await t.source(e, y, { buildId: g.buildId, manifestUrl: g.url });
1153
+ const x = await t.source(e, b, { buildId: g.buildId, manifestUrl: g.url });
1154
1154
  if (typeof x == "string" || x instanceof Response) {
1155
- const K = typeof x == "string" ? x : await ut(x, $e);
1156
- if (new TextEncoder().encode(K).byteLength > $e) throw new O("invalid-data", "the tour file is too large");
1157
- const le = Ee(K);
1158
- if (!le.ok) throw new O(le.reason, le.issues[0]?.message ?? "");
1159
- k = le.value;
1155
+ const B = typeof x == "string" ? x : await ht(x, we);
1156
+ if (new TextEncoder().encode(B).byteLength > we) throw new R("invalid-data", "the tour file is too large");
1157
+ const oe = ve(B);
1158
+ if (!oe.ok) throw new R(oe.reason, oe.issues[0]?.message ?? "");
1159
+ k = oe.value;
1160
1160
  } else k = x;
1161
1161
  } else {
1162
- const x = Ee(await f(new URL(w.files[y], g.url).href, "tour", E));
1163
- if (!x.ok) throw new O(x.reason, x.issues[0]?.message ?? "");
1162
+ const x = ve(await f(new URL(w.files[b], g.url).href, "tour", E));
1163
+ if (!x.ok) throw new R(x.reason, x.issues[0]?.message ?? "");
1164
1164
  k = x.value;
1165
1165
  }
1166
- const S = Qn(k, { manifest: d, entry: w, locale: y, guideOrigin: v });
1166
+ const S = os(k, { manifest: d, entry: w, locale: b, guideOrigin: v });
1167
1167
  if (S.ok)
1168
1168
  return {
1169
1169
  ok: !0,
1170
1170
  manifest: d,
1171
1171
  manifestUrl: g.url,
1172
1172
  tour: S.value,
1173
- locale: y,
1173
+ locale: b,
1174
1174
  source: t.source ? "custom" : g === u && $ ? "remote" : "bundled",
1175
1175
  testIdAttribute: _?.testIdAttribute ?? g.testIdAttribute,
1176
1176
  guideOrigin: v
1177
1177
  };
1178
- b(S, `tour ${e} (${y})`);
1178
+ y(S, `tour ${e} (${b})`);
1179
1179
  } catch (k) {
1180
- const S = k instanceof O ? k : new O("load-failed", String(k));
1180
+ const S = k instanceof R ? k : new R("load-failed", String(k));
1181
1181
  c.push({ ok: !1, reason: S.reason, message: S.message });
1182
1182
  }
1183
1183
  }
1184
1184
  g === u && _ && console.warn(`[steppy-tour] remote tour rejected, trying the bundled copy: ${c.at(-1)?.message}`);
1185
1185
  }
1186
- return c.reduce((g, d) => ct[d.reason] > ct[g.reason] ? d : g, c[0] ?? {
1186
+ return c.reduce((g, d) => dt[d.reason] > dt[g.reason] ? d : g, c[0] ?? {
1187
1187
  ok: !1,
1188
1188
  reason: "load-failed",
1189
1189
  message: `tour "${e}" could not be loaded`
1190
1190
  });
1191
1191
  }
1192
- const ts = 250, ns = 500;
1193
- function ss(t) {
1192
+ const ls = 250, cs = 500;
1193
+ function us(t) {
1194
1194
  const { attr: e, host: n, dom: s } = t, i = s.scheduler;
1195
1195
  function r(l) {
1196
1196
  const a = `[${e}="${CSS.escape(l)}"]`, f = document.querySelectorAll(a);
1197
- for (let h = 0; h < f.length && h < ns; h++) {
1197
+ for (let h = 0; h < f.length && h < cs; h++) {
1198
1198
  const c = f[h];
1199
1199
  if (!(c === n || n.contains(c)) && s.isVisible(c))
1200
1200
  return c;
@@ -1203,27 +1203,27 @@ function ss(t) {
1203
1203
  }
1204
1204
  function o(l) {
1205
1205
  let a = !1, f = 0, h = document.hidden ? i.now() : null, c = 0;
1206
- const b = i.now(), _ = [e, "class", "style", "hidden", "open", "aria-hidden", "aria-expanded"], m = () => {
1206
+ const y = i.now(), _ = [e, "class", "style", "hidden", "open", "aria-hidden", "aria-expanded"], m = () => {
1207
1207
  if (f = 0, a) return !0;
1208
1208
  const w = /* @__PURE__ */ new Map();
1209
- let y = null;
1209
+ let b = null;
1210
1210
  for (const $ of l.ids) {
1211
1211
  const E = r($);
1212
- E ? w.set($, E) : y === null && (y = $);
1212
+ E ? w.set($, E) : b === null && (b = $);
1213
1213
  }
1214
- if (y === null)
1214
+ if (b === null)
1215
1215
  return d(), l.onFound(w), !0;
1216
1216
  if (l.timeoutMs !== null) {
1217
1217
  const $ = h !== null ? i.now() - h : 0;
1218
- if (h === null && i.now() - b - c - $ >= l.timeoutMs)
1219
- return d(), l.onTimeout(y), !0;
1218
+ if (h === null && i.now() - y - c - $ >= l.timeoutMs)
1219
+ return d(), l.onTimeout(b), !0;
1220
1220
  }
1221
1221
  return !1;
1222
1222
  }, u = () => {
1223
1223
  !f && !a && (f = i.raf(m));
1224
1224
  }, p = () => {
1225
1225
  document.hidden ? h ??= i.now() : h !== null && (c += i.now() - h, h = null);
1226
- }, v = new MutationObserver(u), g = i.setInterval(() => m(), ts);
1226
+ }, v = new MutationObserver(u), g = i.setInterval(() => m(), ls);
1227
1227
  function d() {
1228
1228
  a = !0, v.disconnect(), i.clearInterval(g), f && i.cancelRaf(f), document.removeEventListener("visibilitychange", p);
1229
1229
  }
@@ -1231,17 +1231,17 @@ function ss(t) {
1231
1231
  }
1232
1232
  return { find: r, wait: o };
1233
1233
  }
1234
- const He = /^:([A-Za-z_][A-Za-z0-9_]{0,63})$/;
1235
- function me(t) {
1234
+ const je = /^:([A-Za-z_][A-Za-z0-9_]{0,63})$/;
1235
+ function fe(t) {
1236
1236
  const e = t.length > 1 && t.endsWith("/") ? t.slice(0, -1) : t;
1237
1237
  return e === "/" ? [] : e.split("/").slice(1);
1238
1238
  }
1239
- function ht(t, e) {
1240
- const n = me(t), s = me(e);
1239
+ function ft(t, e) {
1240
+ const n = fe(t), s = fe(e);
1241
1241
  if (n.length !== s.length) return null;
1242
1242
  const i = {};
1243
1243
  for (let r = 0; r < n.length; r++) {
1244
- const o = He.exec(n[r]);
1244
+ const o = je.exec(n[r]);
1245
1245
  if (!o) {
1246
1246
  if (n[r] !== s[r]) return null;
1247
1247
  continue;
@@ -1255,20 +1255,20 @@ function ht(t, e) {
1255
1255
  }
1256
1256
  return i;
1257
1257
  }
1258
- function is(t) {
1259
- return me(t).flatMap((e) => {
1260
- const n = He.exec(e);
1258
+ function ds(t) {
1259
+ return fe(t).flatMap((e) => {
1260
+ const n = je.exec(e);
1261
1261
  return n ? [n[1]] : [];
1262
1262
  });
1263
1263
  }
1264
- function rs(t, e) {
1265
- const n = is(t).filter((i) => e[i] === void 0 || e[i] === null || String(e[i]) === "");
1266
- return n.length ? { missing: n } : { path: `/${me(t).map((i) => {
1267
- const r = He.exec(i);
1264
+ function hs(t, e) {
1265
+ const n = ds(t).filter((i) => e[i] === void 0 || e[i] === null || String(e[i]) === "");
1266
+ return n.length ? { missing: n } : { path: `/${fe(t).map((i) => {
1267
+ const r = je.exec(i);
1268
1268
  return r ? encodeURIComponent(String(e[r[1]])) : i;
1269
1269
  }).join("/")}` };
1270
1270
  }
1271
- function pt(t, e) {
1271
+ function gt(t, e) {
1272
1272
  try {
1273
1273
  const n = new URL(t);
1274
1274
  return n.origin !== e ? "/" : (n.pathname.endsWith("/") ? n.pathname : n.pathname.replace(/[^/]*$/, "")) || "/";
@@ -1276,78 +1276,78 @@ function pt(t, e) {
1276
1276
  return "/";
1277
1277
  }
1278
1278
  }
1279
- function Ae(t, e) {
1279
+ function $e(t, e) {
1280
1280
  if (e === "/" || !t.startsWith(e.slice(0, -1))) return t;
1281
1281
  const n = t.slice(e.length - 1);
1282
1282
  return n !== "" && !n.startsWith("/") ? t : n || "/";
1283
1283
  }
1284
- function Dt(t, e) {
1284
+ function Ht(t, e) {
1285
1285
  return e === "/" ? t : e.slice(0, -1) + t;
1286
1286
  }
1287
- function ft(t) {
1287
+ function mt(t) {
1288
1288
  return /^\/(?![/\\])/.test(t) && !/[\\\s\u0000-\u001f\u007f]/.test(t);
1289
1289
  }
1290
- function os(t, e, n) {
1291
- if (!ft(t)) return null;
1290
+ function ps(t, e, n) {
1291
+ if (!mt(t)) return null;
1292
1292
  try {
1293
- const s = new URL(t, n), i = Dt(s.pathname, e) + s.search + s.hash;
1294
- return ft(i) && new URL(i, n).origin === n ? i : null;
1293
+ const s = new URL(t, n), i = Ht(s.pathname, e) + s.search + s.hash;
1294
+ return mt(i) && new URL(i, n).origin === n ? i : null;
1295
1295
  } catch {
1296
1296
  return null;
1297
1297
  }
1298
1298
  }
1299
- const Re = "input,select,textarea", gt = "[aria-checked],[aria-pressed],[aria-selected]", mt = 50;
1300
- function as(t) {
1299
+ const Re = "input,select,textarea", _t = "[aria-checked],[aria-pressed],[aria-selected]", bt = 50;
1300
+ function fs(t) {
1301
1301
  return t instanceof HTMLInputElement ? t.type === "checkbox" || t.type === "radio" ? `c:${t.checked}` : t.type === "file" ? `f:${t.files?.length ?? 0}` : `v:${t.value}` : t instanceof HTMLSelectElement ? `s:${t.multiple ? [...t.options].filter((e) => e.selected).map((e) => e.value).join("|") : t.value}` : t instanceof HTMLTextAreaElement ? `v:${t.value}` : "";
1302
1302
  }
1303
- function ls(t) {
1304
- const e = [...t.matches(Re) ? [t] : [], ...[...t.querySelectorAll(Re)].slice(0, mt)], n = [...t.matches(gt) ? [t] : [], ...[...t.querySelectorAll(gt)].slice(0, mt)].map(
1303
+ function gs(t) {
1304
+ const e = [...t.matches(Re) ? [t] : [], ...[...t.querySelectorAll(Re)].slice(0, bt)], n = [...t.matches(_t) ? [t] : [], ...[...t.querySelectorAll(_t)].slice(0, bt)].map(
1305
1305
  (i) => `a:${i.getAttribute("aria-checked") ?? ""}${i.getAttribute("aria-pressed") ?? ""}${i.getAttribute("aria-selected") ?? ""}`
1306
1306
  ), s = `t:${(t.textContent ?? "").replace(/\s+/g, " ").trim().slice(0, 500)}`;
1307
- return [...e.map(as), ...n, s].join("");
1307
+ return [...e.map(fs), ...n, s].join("");
1308
1308
  }
1309
- function Fe(t) {
1309
+ function Be(t) {
1310
1310
  return t.matches('[aria-expanded="true"]') || t.querySelector('[aria-expanded="true"]') !== null;
1311
1311
  }
1312
- function _t(t) {
1312
+ function yt(t) {
1313
1313
  if (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement) return t.value;
1314
1314
  const e = t.getAttribute("contenteditable");
1315
1315
  return t instanceof HTMLElement && (t.isContentEditable || e !== null && e !== "false") ? t.textContent ?? "" : null;
1316
1316
  }
1317
1317
  function Oe(t) {
1318
- const e = _t(t);
1318
+ const e = yt(t);
1319
1319
  if (e !== null) return e;
1320
1320
  const n = t.querySelector(`${Re},[contenteditable]:not([contenteditable="false"])`);
1321
- return (n && _t(n)) ?? "";
1321
+ return (n && yt(n)) ?? "";
1322
1322
  }
1323
- function cs(t) {
1323
+ function ms(t) {
1324
1324
  const e = 'select,[role=combobox],[aria-haspopup]:not([aria-haspopup="false"])';
1325
1325
  return t.matches(e) || t.querySelector(e) !== null;
1326
1326
  }
1327
- const us = 30 * 60 * 1e3;
1328
- function je() {
1327
+ const _s = 30 * 60 * 1e3;
1328
+ function Ve() {
1329
1329
  try {
1330
1330
  return globalThis.sessionStorage ?? null;
1331
1331
  } catch {
1332
1332
  return null;
1333
1333
  }
1334
1334
  }
1335
- function ds(t) {
1335
+ function bs(t) {
1336
1336
  try {
1337
- je()?.setItem(De, JSON.stringify(t));
1337
+ Ve()?.setItem(Fe, JSON.stringify(t));
1338
1338
  } catch {
1339
1339
  }
1340
1340
  }
1341
- function he() {
1341
+ function ue() {
1342
1342
  try {
1343
- je()?.removeItem(De);
1343
+ Ve()?.removeItem(Fe);
1344
1344
  } catch {
1345
1345
  }
1346
1346
  }
1347
- function hs(t, e) {
1347
+ function ys(t, e) {
1348
1348
  let n = null;
1349
1349
  try {
1350
- n = je()?.getItem(De) ?? null;
1350
+ n = Ve()?.getItem(Fe) ?? null;
1351
1351
  } catch {
1352
1352
  return null;
1353
1353
  }
@@ -1357,12 +1357,12 @@ function hs(t, e) {
1357
1357
  s = JSON.parse(n);
1358
1358
  } catch {
1359
1359
  }
1360
- const i = typeof s?.savedAt == "number" && e - s.savedAt >= 0 && e - s.savedAt < us;
1361
- return !(s !== null && typeof s == "object" && s.v === 1 && typeof s.tourId == "string" && typeof s.stepId == "string" && typeof s.locale == "string" && typeof s.buildId == "string" && s.params !== null && typeof s.params == "object" && Object.values(s.params).every((o) => typeof o == "string")) || !i ? (he(), null) : s.manifestKey === t ? s : null;
1360
+ const i = typeof s?.savedAt == "number" && e - s.savedAt >= 0 && e - s.savedAt < _s;
1361
+ return !(s !== null && typeof s == "object" && s.v === 1 && typeof s.tourId == "string" && typeof s.stepId == "string" && typeof s.locale == "string" && typeof s.buildId == "string" && s.params !== null && typeof s.params == "object" && Object.values(s.params).every((o) => typeof o == "string")) || !i ? (ue(), null) : s.manifestKey === t ? s : null;
1362
1362
  }
1363
- const ps = {
1363
+ const ws = {
1364
1364
  en: {
1365
- ...ce.en,
1365
+ ...ae.en,
1366
1366
  done: "Done",
1367
1367
  close: "Close the tour",
1368
1368
  skipStep: "Skip this step",
@@ -1380,7 +1380,7 @@ const ps = {
1380
1380
  instructionManual: "Select Next to continue."
1381
1381
  },
1382
1382
  fr: {
1383
- ...ce.fr,
1383
+ ...ae.fr,
1384
1384
  done: "Terminer",
1385
1385
  close: "Fermer la visite",
1386
1386
  skipStep: "Passer cette étape",
@@ -1398,7 +1398,7 @@ const ps = {
1398
1398
  instructionManual: "Sélectionnez Suivant pour continuer."
1399
1399
  },
1400
1400
  nl: {
1401
- ...ce.nl,
1401
+ ...ae.nl,
1402
1402
  done: "Klaar",
1403
1403
  close: "Rondleiding sluiten",
1404
1404
  skipStep: "Deze stap overslaan",
@@ -1416,7 +1416,7 @@ const ps = {
1416
1416
  instructionManual: "Kies Volgende om verder te gaan."
1417
1417
  },
1418
1418
  de: {
1419
- ...ce.de,
1419
+ ...ae.de,
1420
1420
  done: "Fertig",
1421
1421
  close: "Tour schließen",
1422
1422
  skipStep: "Diesen Schritt überspringen",
@@ -1434,53 +1434,127 @@ const ps = {
1434
1434
  instructionManual: "Wählen Sie Weiter, um fortzufahren."
1435
1435
  }
1436
1436
  };
1437
- function yt(t, e) {
1438
- return Wn(ps, t, e, "en");
1437
+ function wt(t, e) {
1438
+ return es(ws, t, e, "en");
1439
1439
  }
1440
- function fs(t) {
1440
+ function vs(t) {
1441
1441
  const [e, n = ""] = t.toLowerCase().split(/[-_]/);
1442
1442
  return (/^[a-z]{4}$/.test(n) ? /^(arab|hebr|thaa|syrc|nkoo|adlm|rohg)$/.test(n) : /^(ar|he|iw|fa|ur|ps|sd|ug|yi|ckb|dv)$/.test(e)) ? "rtl" : "ltr";
1443
1443
  }
1444
- const gs = {
1444
+ const $s = {
1445
1445
  click: "instructionClick",
1446
1446
  input: "instructionInput",
1447
1447
  change: "instructionChange",
1448
1448
  visible: "instructionVisible",
1449
1449
  manual: "instructionManual"
1450
1450
  };
1451
- function ms(t, e) {
1452
- return e[gs[t]];
1451
+ function Es(t, e) {
1452
+ return e[$s[t]];
1453
1453
  }
1454
- const bt = {
1454
+ const Le = {
1455
1455
  surface: "#fbf9f4",
1456
1456
  fg: "#1f1d1a"
1457
- }, N = {
1457
+ }, q = {
1458
1458
  padding: "8px 12px",
1459
1459
  radius: "6px",
1460
1460
  fontSize: "14px",
1461
1461
  lineHeight: "1.4",
1462
1462
  shadow: "0 4px 12px rgba(0, 0, 0, 0.2)"
1463
- }, wt = {
1463
+ }, vt = {
1464
1464
  radius: "4px",
1465
1465
  padding: "4px 10px"
1466
- }, M = {
1467
- bubbleBg: bt.fg,
1468
- bubbleFg: bt.surface,
1466
+ }, jt = {
1467
+ bubbleBg: Le.fg,
1468
+ bubbleFg: Le.surface,
1469
1469
  muted: "#c9c5bd",
1470
1470
  accent: "#a8410e",
1471
1471
  accentFg: "#ffffff",
1472
1472
  focus: "#f09a6a",
1473
1473
  scrim: "rgba(31, 29, 26, 0.45)",
1474
- radius: N.radius
1475
- }, T = (t) => St(t), _s = zt` :host{display:contents;--_pw-bg:var(--steppy-tour-bubble-bg,var(--steppy-tooltip-bg,${T(M.bubbleBg)}));--_pw-fg:var(--steppy-tour-bubble-fg,var(--steppy-tooltip-fg,${T(M.bubbleFg)}));--_pw-muted:var(--steppy-tour-muted,${T(M.muted)});--_pw-accent:var(--steppy-tour-accent,${T(M.accent)});--_pw-accent-fg:var(--steppy-tour-accent-fg,${T(M.accentFg)});--_pw-focus:var(--steppy-tour-focus,${T(M.focus)});--_pw-scrim:var(--steppy-tour-scrim,${T(M.scrim)});--_pw-radius:var(--steppy-tour-radius,${T(M.radius)})}.layer{position:fixed;inset:0;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:visible;pointer-events:none;z-index:var(--_pw-z,2147483000)}.layer::backdrop{pointer-events:none;background:transparent}.spotlight{position:absolute;left:var(--_pw-sx,0);top:var(--_pw-sy,0);width:var(--_pw-sw,0);height:var(--_pw-sh,0);border-radius:var(--_pw-radius);box-shadow:0 0 0 2px var(--_pw-accent),0 0 0 max(100vw,100vh) var(--_pw-scrim);pointer-events:none;transition:left 0.15s ease,top 0.15s ease,width 0.15s ease,height 0.15s ease}.bubble{position:absolute;box-sizing:border-box;width:min(320px,calc(100vw - 16px));max-height:calc(100vh - 16px);overflow:auto;padding:${T(N.padding)};border-radius:var(--_pw-radius);background:var(--_pw-bg);color:var(--_pw-fg);box-shadow:${T(N.shadow)};font-family:var(--steppy-font-family,inherit);font-size:${T(N.fontSize)};line-height:${T(N.lineHeight)};pointer-events:auto;visibility:hidden;outline:none}.bubble[data-placed]{visibility:visible}.bubble[data-mode='anchored']{left:var(--_pw-x,0);top:var(--_pw-y,0)}.bubble[data-mode='centered']{left:50%;top:50%;transform:translate(-50%,-50%)}.bubble[data-mode='sheet-bottom'],.bubble[data-mode='sheet-top']{left:50%;transform:translateX(-50%)}.bubble[data-mode='sheet-bottom']{bottom:calc(8px + var(--_pw-kb,0px))}.bubble[data-mode='sheet-top']{top:8px}.bubble[data-yield]{pointer-events:none;opacity:0.15}.layer[data-offscreen] .spotlight{display:none}header{display:flex;align-items:flex-start;gap:8px}h2{flex:1;margin:0 0 4px;font-size:1em;font-weight:600}.body{margin:0;overflow-wrap:anywhere}.body a,.guide{color:var(--_pw-fg);text-decoration:underline}.guide{display:inline-block;margin-top:6px}code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:0.92em}footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px}.progress{margin-inline-end:auto;color:var(--_pw-muted);font-variant-numeric:tabular-nums}button{font:inherit;cursor:pointer;border-radius:${T(wt.radius)};padding:${T(wt.padding)};border:1px solid transparent}button:focus-visible,a:focus-visible{outline:2px solid var(--_pw-focus);outline-offset:2px}button:disabled{opacity:0.5;cursor:not-allowed}.primary{background:var(--_pw-accent);color:var(--_pw-accent-fg)}.secondary{background:transparent;color:var(--_pw-fg);border-color:var(--_pw-muted)}.close{margin-inline-start:auto;padding:0 6px;background:transparent;color:var(--_pw-fg);font-size:1.25em;line-height:1}.pill{position:absolute;inset-inline-end:16px;bottom:16px;display:flex;gap:4px;padding:4px;border-radius:999px;background:var(--_pw-bg);color:var(--_pw-fg);box-shadow:${T(N.shadow)};font-family:var(--steppy-font-family,inherit);font-size:${T(N.fontSize)};pointer-events:auto}.pill .primary{border-radius:999px}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@media (prefers-reduced-motion:reduce){.spotlight{transition:none}}@media (forced-colors:active){.spotlight{outline:3px solid Highlight;box-shadow:none}.bubble,.pill{border:1px solid CanvasText}}@media print{.layer{display:none}}`, ys = /^(?:https?:\/\/[^\s)]+|mailto:[^\s)]+|\/(?![/\\])[^\s)]*|#[^\s)]*)$/, bs = {
1474
+ border: "none",
1475
+ radius: q.radius,
1476
+ width: "320px",
1477
+ padding: q.padding,
1478
+ shadow: q.shadow,
1479
+ fontFamily: "inherit",
1480
+ fontSize: q.fontSize,
1481
+ lineHeight: q.lineHeight,
1482
+ titleSize: "1em",
1483
+ titleWeight: "600",
1484
+ buttonRadius: vt.radius,
1485
+ buttonPadding: vt.padding,
1486
+ buttonWeight: "inherit",
1487
+ ringWidth: "2px"
1488
+ }, As = {
1489
+ ...jt,
1490
+ bubbleBg: "#ffffff",
1491
+ bubbleFg: Le.fg,
1492
+ muted: "#5b6b64",
1493
+ focus: "#a8410e",
1494
+ border: "1px solid #e1ddd1"
1495
+ }, ks = (t) => It(t), Bt = [
1496
+ // Colour
1497
+ "bubbleBg",
1498
+ "bubbleFg",
1499
+ "muted",
1500
+ "accent",
1501
+ "accentFg",
1502
+ "focus",
1503
+ "scrim",
1504
+ "link",
1505
+ "border",
1506
+ // Shape and type
1507
+ "radius",
1508
+ "width",
1509
+ "padding",
1510
+ "shadow",
1511
+ "fontFamily",
1512
+ "fontSize",
1513
+ "lineHeight",
1514
+ "titleSize",
1515
+ "titleWeight",
1516
+ "buttonRadius",
1517
+ "buttonPadding",
1518
+ "buttonWeight",
1519
+ // Spotlight
1520
+ "ringWidth",
1521
+ "spotlightRadius"
1522
+ ], ei = ["dark", "light", "auto"], Ss = new Set(Bt), Vt = (t) => t.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Kt = (t) => `--steppy-tour-${Vt(t)}`, Me = (t) => `--_pw-${Vt(t)}`;
1523
+ function xs(t) {
1524
+ const e = /* @__PURE__ */ new Map();
1525
+ if (!t || typeof t != "object") return e;
1526
+ for (const [n, s] of Object.entries(t))
1527
+ !Ss.has(n) || typeof s != "string" || s.trim() === "" || e.set(Kt(n), s.trim());
1528
+ return e;
1529
+ }
1530
+ const $t = {
1531
+ link: `var(${Me("bubbleFg")})`,
1532
+ spotlightRadius: `var(${Me("radius")})`
1533
+ }, Ts = {
1534
+ bubbleBg: "--steppy-tooltip-bg",
1535
+ bubbleFg: "--steppy-tooltip-fg",
1536
+ fontFamily: "--steppy-font-family"
1537
+ }, Ee = jt, Et = As;
1538
+ function Ae(t, e) {
1539
+ const n = [];
1540
+ for (const s of Bt) {
1541
+ const i = s in $t;
1542
+ if (e && (i || e[s] === t[s])) continue;
1543
+ const r = i ? $t[s] : t[s], o = Ts[s], l = o ? `var(${o}, ${r})` : r;
1544
+ n.push(`${Me(s)}: var(${Kt(s)}, ${l});`);
1545
+ }
1546
+ return ks(n.join(`
1547
+ `));
1548
+ }
1549
+ const Is = Wt` :host{display:contents;${Ae(Ee)}}:host([appearance='light']){${Ae(Et, Ee)}}@media (prefers-color-scheme:light){:host([appearance='auto']){${Ae(Et, Ee)}}}.layer{position:fixed;inset:0;width:auto;height:auto;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:visible;pointer-events:none;z-index:var(--_pw-z,2147483000)}.layer::backdrop{pointer-events:none;background:transparent}.spotlight{position:absolute;left:var(--_pw-sx,0);top:var(--_pw-sy,0);width:var(--_pw-sw,0);height:var(--_pw-sh,0);border-radius:var(--_pw-spotlight-radius);box-shadow:0 0 0 var(--_pw-ring-width) var(--_pw-accent),0 0 0 max(100vw,100vh) var(--_pw-scrim);pointer-events:none;transition:left 0.15s ease,top 0.15s ease,width 0.15s ease,height 0.15s ease}.bubble{position:absolute;box-sizing:border-box;width:min(var(--_pw-width),calc(100vw - 16px));max-height:calc(100vh - 16px);overflow:auto;padding:var(--_pw-padding);border:var(--_pw-border);border-radius:var(--_pw-radius);background:var(--_pw-bubble-bg);color:var(--_pw-bubble-fg);box-shadow:var(--_pw-shadow);font-family:var(--_pw-font-family);font-size:var(--_pw-font-size);line-height:var(--_pw-line-height);pointer-events:auto;visibility:hidden;outline:none}.bubble[data-placed]{visibility:visible}.bubble[data-mode='anchored']{left:var(--_pw-x,0);top:var(--_pw-y,0)}.bubble[data-mode='centered']{left:50%;top:50%;transform:translate(-50%,-50%)}.bubble[data-mode='sheet-bottom'],.bubble[data-mode='sheet-top']{left:50%;transform:translateX(-50%)}.bubble[data-mode='sheet-bottom']{bottom:calc(8px + var(--_pw-kb,0px))}.bubble[data-mode='sheet-top']{top:8px}.bubble[data-yield]{pointer-events:none;opacity:0.15}.layer[data-offscreen] .spotlight{display:none}header{display:flex;align-items:flex-start;gap:8px}h2{flex:1;margin:0 0 4px;font-size:var(--_pw-title-size);font-weight:var(--_pw-title-weight)}.body{margin:0;overflow-wrap:anywhere}.body a,.guide{color:var(--_pw-link);text-decoration:underline}.guide{display:inline-block;margin-top:6px}code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:0.92em}footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px}.progress{margin-inline-end:auto;color:var(--_pw-muted);font-variant-numeric:tabular-nums}button{font:inherit;font-weight:var(--_pw-button-weight);cursor:pointer;border-radius:var(--_pw-button-radius);padding:var(--_pw-button-padding);border:1px solid transparent}button:focus-visible,a:focus-visible{outline:2px solid var(--_pw-focus);outline-offset:2px}button:disabled{opacity:0.5;cursor:not-allowed}.primary{background:var(--_pw-accent);color:var(--_pw-accent-fg)}.secondary{background:transparent;color:var(--_pw-bubble-fg);border-color:var(--_pw-muted)}.close{margin-inline-start:auto;padding:0 6px;background:transparent;color:var(--_pw-bubble-fg);font-size:1.25em;line-height:1}.pill{position:absolute;inset-inline-end:16px;bottom:16px;display:flex;gap:4px;padding:4px;border-radius:999px;border:var(--_pw-border);background:var(--_pw-bubble-bg);color:var(--_pw-bubble-fg);box-shadow:var(--_pw-shadow);font-family:var(--_pw-font-family);font-size:var(--_pw-font-size);pointer-events:auto}.pill .primary{border-radius:999px}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@media (prefers-reduced-motion:reduce){.spotlight{transition:none}}@media (forced-colors:active){.spotlight{outline:3px solid Highlight;box-shadow:none}.bubble,.pill{border:1px solid CanvasText}}@media print{.layer{display:none}}`, Rs = /^(?:https?:\/\/[^\s)]+|mailto:[^\s)]+|\/(?![/\\])[^\s)]*|#[^\s)]*)$/, Os = {
1476
1550
  autolink: !0,
1477
- link: (t) => ys.test(t) ? { kind: "external", href: t } : null
1478
- }, ws = "`([^`]+)`|\\[([^\\]]+)\\]\\(([^\\s)]+)\\)|(\\*\\*|__)(\\S(?:.*?\\S)?)\\4|(\\*|_)([^*_\\s](?:[^*_]*?[^*_\\s])?)\\6|(https?:\\/\\/[^\\s<>()]+|www\\.[^\\s<>()]+)|([\\w.+-]+@[\\w-]+\\.[\\w.-]+\\w)";
1479
- function ee(t, e = bs) {
1551
+ link: (t) => Rs.test(t) ? { kind: "external", href: t } : null
1552
+ }, Ls = "`([^`]+)`|\\[([^\\]]+)\\]\\(([^\\s)]+)\\)|(\\*\\*|__)(\\S(?:.*?\\S)?)\\4|(\\*|_)([^*_\\s](?:[^*_]*?[^*_\\s])?)\\6|(https?:\\/\\/[^\\s<>()]+|www\\.[^\\s<>()]+)|([\\w.+-]+@[\\w-]+\\.[\\w.-]+\\w)";
1553
+ function J(t, e = Os) {
1480
1554
  const n = [], s = (l) => l.split(`
1481
1555
  `).forEach((a, f) => {
1482
- f > 0 && n.push(I`<br />`), a && n.push(a);
1483
- }), i = new RegExp(ws, "g");
1556
+ f > 0 && n.push(T`<br />`), a && n.push(a);
1557
+ }), i = new RegExp(Ls, "g");
1484
1558
  let r = 0, o;
1485
1559
  for (; o = i.exec(t); ) {
1486
1560
  if (o[2] != null) {
@@ -1490,34 +1564,34 @@ function ee(t, e = bs) {
1490
1564
  continue;
1491
1565
  }
1492
1566
  o.index > r && s(t.slice(r, o.index)), n.push(
1493
- l.kind === "external" ? I`<a href=${l.href} target="_blank" rel="noopener noreferrer"
1494
- >${ee(o[2], e)}</a
1495
- >` : I`<a href=${l.href} @click=${l.onActivate}>${ee(o[2], e)}</a>`
1567
+ l.kind === "external" ? T`<a href=${l.href} target="_blank" rel="noopener noreferrer"
1568
+ >${J(o[2], e)}</a
1569
+ >` : T`<a href=${l.href} @click=${l.onActivate}>${J(o[2], e)}</a>`
1496
1570
  ), r = o.index + o[0].length;
1497
1571
  continue;
1498
1572
  }
1499
1573
  if (!((o[8] != null || o[9] != null) && !e.autolink)) {
1500
1574
  if (o.index > r && s(t.slice(r, o.index)), o[1] != null)
1501
- n.push(I`<code>${o[1]}</code>`);
1575
+ n.push(T`<code>${o[1]}</code>`);
1502
1576
  else if (o[4] != null)
1503
- n.push(I`<strong>${ee(o[5], e)}</strong>`);
1577
+ n.push(T`<strong>${J(o[5], e)}</strong>`);
1504
1578
  else if (o[6] != null)
1505
- n.push(I`<em>${ee(o[7], e)}</em>`);
1579
+ n.push(T`<em>${J(o[7], e)}</em>`);
1506
1580
  else if (o[8] != null) {
1507
1581
  const l = o[8], a = (l.match(/[.,;:!?]+$/) ?? [""])[0], f = a ? l.slice(0, -a.length) : l, h = f.startsWith("www.") ? `https://${f}` : f;
1508
- n.push(I`<a href=${h} target="_blank" rel="noopener noreferrer">${f}</a>`), a && s(a);
1509
- } else o[9] != null && n.push(I`<a href=${`mailto:${o[9]}`}>${o[9]}</a>`);
1582
+ n.push(T`<a href=${h} target="_blank" rel="noopener noreferrer">${f}</a>`), a && s(a);
1583
+ } else o[9] != null && n.push(T`<a href=${`mailto:${o[9]}`}>${o[9]}</a>`);
1510
1584
  r = o.index + o[0].length;
1511
1585
  }
1512
1586
  }
1513
1587
  return r < t.length && s(t.slice(r)), n;
1514
1588
  }
1515
- const B = (t) => t.stopPropagation();
1516
- function vs(t, e) {
1589
+ const F = (t) => t.stopPropagation();
1590
+ function Ms(t, e) {
1517
1591
  const n = t.step.advance;
1518
1592
  if (n === "click" || n === "visible") return A;
1519
1593
  const s = t.last && n === "manual" ? t.strings.done : t.strings.next, i = n === "change" ? "secondary" : "primary";
1520
- return I`<button
1594
+ return T`<button
1521
1595
  part="button next ${i}"
1522
1596
  class=${i}
1523
1597
  ?disabled=${!t.nextEnabled}
@@ -1528,9 +1602,9 @@ function vs(t, e) {
1528
1602
  ${s}
1529
1603
  </button>`;
1530
1604
  }
1531
- function $s(t, e) {
1532
- const n = t.strings, s = t.state === "fallback", i = s ? n.notFoundTitle : t.step.title, r = s ? n.notFoundBody : t.step.text ?? ms(t.step.advance, n), o = t.guideUrl !== null && (s || t.last);
1533
- return I`<section
1605
+ function Ps(t, e) {
1606
+ const n = t.strings, s = t.state === "fallback", i = s ? n.notFoundTitle : t.step.title, r = s ? n.notFoundBody : t.step.text ?? Es(t.step.advance, n), o = t.guideUrl !== null && (s || t.last);
1607
+ return T`<section
1534
1608
  part="bubble"
1535
1609
  class="bubble"
1536
1610
  role="dialog"
@@ -1543,32 +1617,32 @@ function $s(t, e) {
1543
1617
  data-step-id=${t.step.id}
1544
1618
  data-state=${t.state}
1545
1619
  data-advance=${t.step.advance}
1546
- @pointerdown=${B}
1547
- @mousedown=${B}
1548
- @click=${B}
1620
+ @pointerdown=${F}
1621
+ @mousedown=${F}
1622
+ @click=${F}
1549
1623
  >
1550
1624
  <header>
1551
- ${i ? I`<h2 part="title" id="pw-title">${i}</h2>` : A}
1625
+ ${i ? T`<h2 part="title" id="pw-title">${i}</h2>` : A}
1552
1626
  <button part="button close" class="close" aria-label=${n.close} @pointerdown=${e.press} @mousedown=${e.press} @click=${e.close}>
1553
1627
  ×
1554
1628
  </button>
1555
1629
  </header>
1556
- <p part="body" class="body" id="pw-body">${s ? r : ee(r, t.policy)}</p>
1557
- ${o ? I`<a part="guide-link" class="guide" href=${t.guideUrl} target="_blank" rel="noopener noreferrer">${n.openGuide}</a>` : A}
1630
+ <p part="body" class="body" id="pw-body">${s ? r : J(r, t.policy)}</p>
1631
+ ${o ? T`<a part="guide-link" class="guide" href=${t.guideUrl} target="_blank" rel="noopener noreferrer">${n.openGuide}</a>` : A}
1558
1632
  <footer>
1559
- <span part="progress" class="progress">${Gn(n.progress, { current: t.position.index + 1, total: t.position.total })}</span>
1560
- ${s ? I`<button part="button skip" class="secondary" @pointerdown=${e.press} @mousedown=${e.press} @click=${e.skip}>
1633
+ <span part="progress" class="progress">${Jn(n.progress, { current: t.position.index + 1, total: t.position.total })}</span>
1634
+ ${s ? T`<button part="button skip" class="secondary" @pointerdown=${e.press} @mousedown=${e.press} @click=${e.skip}>
1561
1635
  ${n.skipStep}
1562
1636
  </button>
1563
1637
  <button part="button end primary" class="primary" @pointerdown=${e.press} @mousedown=${e.press} @click=${e.end}>
1564
1638
  ${n.endTour}
1565
- </button>` : vs(t, e)}
1639
+ </button>` : Ms(t, e)}
1566
1640
  </footer>
1567
1641
  </section>`;
1568
1642
  }
1569
- function Es(t, e) {
1643
+ function Cs(t, e) {
1570
1644
  const n = t.strings;
1571
- return I`<div part="pill" class="pill" role="group" aria-label=${n.paused} @pointerdown=${B} @mousedown=${B} @click=${B}>
1645
+ return T`<div part="pill" class="pill" role="group" aria-label=${n.paused} @pointerdown=${F} @mousedown=${F} @click=${F}>
1572
1646
  <button part="button resume primary" class="primary" @pointerdown=${e.press} @mousedown=${e.press} @click=${e.resume}>
1573
1647
  ${n.resume}
1574
1648
  </button>
@@ -1577,23 +1651,23 @@ function Es(t, e) {
1577
1651
  </button>
1578
1652
  </div>`;
1579
1653
  }
1580
- function As(t, e) {
1581
- return I`<div part="layer" class="layer" lang=${t.lang} dir=${t.dir} popover=${t.popover ? "manual" : A}>
1582
- ${t.mode === "bubble" && t.anchored && t.state === "shown" ? I`<div part="spotlight" class="spotlight"></div>` : A}
1583
- ${t.mode === "bubble" ? $s(t, e) : t.mode === "pill" ? Es(t, e) : A}
1654
+ function Us(t, e) {
1655
+ return T`<div part="layer" class="layer" lang=${t.lang} dir=${t.dir} popover=${t.popover ? "manual" : A}>
1656
+ ${t.mode === "bubble" && t.anchored && t.state === "shown" ? T`<div part="spotlight" class="spotlight"></div>` : A}
1657
+ ${t.mode === "bubble" ? Ps(t, e) : t.mode === "pill" ? Cs(t, e) : A}
1584
1658
  <div class="sr-only" role="status" aria-live="polite" aria-atomic="true"></div>
1585
1659
  </div>`;
1586
1660
  }
1587
- const vt = 6, ks = 10, Ss = 8, xs = 640, Ts = 250, $t = /^(?:hidden|auto|scroll|clip)$/;
1588
- function Is(t) {
1661
+ const At = 6, Ns = 10, Ds = 8, zs = 640, Fs = 250, kt = /^(?:hidden|auto|scroll|clip)$/;
1662
+ function Hs(t) {
1589
1663
  const e = [];
1590
1664
  for (let n = t.parentElement; n && n !== document.body && n !== document.documentElement; n = n.parentElement) {
1591
1665
  const s = getComputedStyle(n);
1592
- ($t.test(s.overflowX) || $t.test(s.overflowY)) && e.push(n);
1666
+ (kt.test(s.overflowX) || kt.test(s.overflowY)) && e.push(n);
1593
1667
  }
1594
1668
  return e;
1595
1669
  }
1596
- function Rs(t) {
1670
+ function js(t) {
1597
1671
  const e = t.dom.scheduler;
1598
1672
  let n = !1, s = 0, i = 0, r = [], o = null, l = null;
1599
1673
  const a = (m) => `${Math.round(m * 100) / 100}px`;
@@ -1609,23 +1683,23 @@ function Rs(t) {
1609
1683
  return;
1610
1684
  }
1611
1685
  if (u.removeAttribute("data-offscreen"), m.removeAttribute("data-offscreen"), m.style.setProperty("--_pw-kb", a(Math.max(0, window.innerHeight - (p.y + p.height)))), !v) return h(u, p);
1612
- o !== v && (r = Is(v), o = v, l?.disconnect(), l?.observe(v), l?.observe(u));
1613
- let d = ot(t.dom.rect(v) ?? { x: 0, y: 0, width: 0, height: 0 }, vt);
1686
+ o !== v && (r = Hs(v), o = v, l?.disconnect(), l?.observe(v), l?.observe(u));
1687
+ let d = lt(t.dom.rect(v) ?? { x: 0, y: 0, width: 0, height: 0 }, At);
1614
1688
  for (const x of r) {
1615
- const K = t.dom.rect(x);
1616
- K && d && (d = rt(d, ot(K, vt)));
1689
+ const B = t.dom.rect(x);
1690
+ B && d && (d = at(d, lt(B, At)));
1617
1691
  }
1618
- if (d = d && rt(d, { x: p.x, y: p.y, width: p.width, height: p.height }), !d)
1692
+ if (d = d && at(d, { x: p.x, y: p.y, width: p.width, height: p.height }), !d)
1619
1693
  return u.setAttribute("data-offscreen", ""), m.setAttribute("data-offscreen", ""), h(u, p);
1620
- m.style.setProperty("--_pw-sx", a(d.x)), m.style.setProperty("--_pw-sy", a(d.y)), m.style.setProperty("--_pw-sw", a(d.width)), m.style.setProperty("--_pw-sh", a(d.height)), u.toggleAttribute("data-yield", Fe(v));
1621
- const w = d.y + d.height / 2, y = () => c(u, w > p.y + p.height / 2 ? "sheet-top" : "sheet-bottom", null);
1622
- if (p.width <= xs) return y();
1623
- const $ = t.dom.rect(u) ?? { width: 320, height: 120 }, E = t.avoid(), k = (x) => ({ x: x.x - p.x, y: x.y - p.y, width: x.width, height: x.height }), S = Ln(k(d), $, p, ks, {
1694
+ m.style.setProperty("--_pw-sx", a(d.x)), m.style.setProperty("--_pw-sy", a(d.y)), m.style.setProperty("--_pw-sw", a(d.width)), m.style.setProperty("--_pw-sh", a(d.height)), u.toggleAttribute("data-yield", Be(v));
1695
+ const w = d.y + d.height / 2, b = () => c(u, w > p.y + p.height / 2 ? "sheet-top" : "sheet-bottom", null);
1696
+ if (p.width <= zs) return b();
1697
+ const $ = t.dom.rect(u) ?? { width: 320, height: 120 }, E = t.avoid(), k = (x) => ({ x: x.x - p.x, y: x.y - p.y, width: x.width, height: x.height }), S = zn(k(d), $, p, Ns, {
1624
1698
  preferred: t.preferred(),
1625
- margin: Ss,
1699
+ margin: Ds,
1626
1700
  avoid: E ? [k(E)] : []
1627
1701
  });
1628
- if (S.overlaps) return y();
1702
+ if (S.overlaps) return b();
1629
1703
  m.style.setProperty("--_pw-x", a(S.x + p.x)), m.style.setProperty("--_pw-y", a(S.y + p.y)), c(u, "anchored", S.side);
1630
1704
  }
1631
1705
  function h(m, u) {
@@ -1634,98 +1708,98 @@ function Rs(t) {
1634
1708
  y: u.y + (u.height - p.height) / 2,
1635
1709
  width: p.width,
1636
1710
  height: p.height
1637
- }, g = (t.dialogs?.() ?? []).filter((y) => xe(y, v));
1711
+ }, g = (t.dialogs?.() ?? []).filter((b) => xe(b, v));
1638
1712
  if (!g.length) return c(m, "centered", null);
1639
- const d = Math.min(...g.map((y) => y.y)) - u.y, w = u.y + u.height - Math.max(...g.map((y) => y.y + y.height));
1713
+ const d = Math.min(...g.map((b) => b.y)) - u.y, w = u.y + u.height - Math.max(...g.map((b) => b.y + b.height));
1640
1714
  c(m, d >= w ? "sheet-top" : "sheet-bottom", null);
1641
1715
  }
1642
1716
  function c(m, u, p) {
1643
1717
  m.setAttribute("data-mode", u), p ? m.setAttribute("data-side", p) : m.removeAttribute("data-side"), m.setAttribute("data-placed", ""), t.onPlaced?.();
1644
1718
  }
1645
- function b() {
1719
+ function y() {
1646
1720
  n && !s && (s = e.raf(f));
1647
1721
  }
1648
- const _ = () => b();
1722
+ const _ = () => y();
1649
1723
  return {
1650
1724
  start() {
1651
- if (n) return b();
1652
- n = !0, o = null, document.addEventListener("scroll", _, { capture: !0, passive: !0 }), window.addEventListener("resize", _, { passive: !0 }), window.visualViewport?.addEventListener("resize", _, { passive: !0 }), window.visualViewport?.addEventListener("scroll", _, { passive: !0 }), l = typeof ResizeObserver == "function" ? new ResizeObserver(_) : null, i = e.setInterval(b, Ts), b();
1725
+ if (n) return y();
1726
+ n = !0, o = null, document.addEventListener("scroll", _, { capture: !0, passive: !0 }), window.addEventListener("resize", _, { passive: !0 }), window.visualViewport?.addEventListener("resize", _, { passive: !0 }), window.visualViewport?.addEventListener("scroll", _, { passive: !0 }), l = typeof ResizeObserver == "function" ? new ResizeObserver(_) : null, i = e.setInterval(y, Fs), y();
1653
1727
  },
1654
1728
  stop() {
1655
1729
  n = !1, s && e.cancelRaf(s), s = 0, e.clearInterval(i), l?.disconnect(), l = null, o = null, document.removeEventListener("scroll", _, { capture: !0 }), window.removeEventListener("resize", _), window.visualViewport?.removeEventListener("resize", _), window.visualViewport?.removeEventListener("scroll", _);
1656
1730
  },
1657
- notify: b
1731
+ notify: y
1658
1732
  };
1659
1733
  }
1660
- const Le = 'dialog,[role=dialog],[role=alertdialog],[aria-modal="true"]';
1661
- function ue(t, e) {
1734
+ const Pe = 'dialog,[role=dialog],[role=alertdialog],[aria-modal="true"]';
1735
+ function le(t, e) {
1662
1736
  const n = t.composedPath().slice(0, 64);
1663
1737
  return n.includes(e) ? null : n.filter((s) => s instanceof Element);
1664
1738
  }
1665
- function Os(t) {
1739
+ function Bs(t) {
1666
1740
  const { host: e, attr: n } = t, s = () => {
1667
1741
  const c = t.state();
1668
1742
  return !c.loaded || c.phase === "idle" || c.phase === "loading" || c.phase === "entering" ? null : { s: c, step: c.loaded.tour.steps[c.index] };
1669
1743
  }, i = (c) => {
1670
- const b = ue(c, e);
1671
- if (!b) return;
1744
+ const y = le(c, e);
1745
+ if (!y) return;
1672
1746
  t.interacted(), t.tick();
1673
1747
  const _ = s();
1674
1748
  if (!_) return;
1675
- const { s: m, step: u } = _, p = new Set(b.map((y) => y.getAttribute(n)).filter((y) => y !== null)), v = m.token;
1749
+ const { s: m, step: u } = _, p = new Set(y.map((b) => b.getAttribute(n)).filter((b) => b !== null)), v = m.token;
1676
1750
  if (m.phase === "showing" && u.advance === "click" && u.target !== null && p.has(u.target)) {
1677
1751
  t.persistAhead(m.index), t.defer(() => t.dispatch({ type: "TRIGGER", token: v, kind: "click" }));
1678
1752
  return;
1679
1753
  }
1680
- const g = m.loaded.tour.steps, d = g.findIndex((y, $) => $ > m.index && m.loaded.applicable[$] && y.target !== null && p.has(y.target));
1754
+ const g = m.loaded.tour.steps, d = g.findIndex((b, $) => $ > m.index && m.loaded.applicable[$] && b.target !== null && p.has(b.target));
1681
1755
  if (d === -1) return;
1682
1756
  const w = g[d].advance === "click";
1683
1757
  w && t.persistAhead(d), t.defer(() => t.dispatch({ type: "JUMP", token: v, to: d, performed: w }));
1684
1758
  }, r = (c) => {
1685
- const b = t.target();
1686
- return b !== null && c.composedPath().includes(b);
1759
+ const y = t.target();
1760
+ return y !== null && c.composedPath().includes(y);
1687
1761
  }, o = (c) => {
1688
- if (!ue(c, e)) return;
1762
+ if (!le(c, e)) return;
1689
1763
  t.interacted();
1690
- const b = s();
1691
- b?.s.phase === "showing" && b.step.advance === "input" && r(c) && t.dispatch({ type: "FIELD", token: b.s.token, nonEmpty: Oe(t.target()).trim() !== "" });
1764
+ const y = s();
1765
+ y?.s.phase === "showing" && y.step.advance === "input" && r(c) && t.dispatch({ type: "FIELD", token: y.s.token, nonEmpty: Oe(t.target()).trim() !== "" });
1692
1766
  }, l = (c) => {
1693
- if (!ue(c, e)) return;
1767
+ if (!le(c, e)) return;
1694
1768
  t.interacted(), t.tick();
1695
- const b = s();
1696
- if (b?.s.phase === "showing" && b.step.advance === "input" && r(c)) {
1697
- const _ = b.s.token;
1769
+ const y = s();
1770
+ if (y?.s.phase === "showing" && y.step.advance === "input" && r(c)) {
1771
+ const _ = y.s.token;
1698
1772
  Oe(t.target()).trim() !== "" && t.defer(() => t.dispatch({ type: "TRIGGER", token: _, kind: "input-commit" }));
1699
1773
  }
1700
1774
  }, a = (c) => {
1701
- ue(c, e) && t.interacted();
1775
+ le(c, e) && t.interacted();
1702
1776
  }, f = (c) => {
1703
- const b = c;
1704
- if (b.key !== "Escape" || b.defaultPrevented || b.isComposing || !s()) return;
1705
- const m = b.composedPath(), u = m.indexOf(e);
1706
- if ((u === -1 ? m : m.slice(u + 1)).filter((g) => g instanceof Element).some((g) => g.matches(`${Le},[aria-expanded="true"]`))) return;
1777
+ const y = c;
1778
+ if (y.key !== "Escape" || y.defaultPrevented || y.isComposing || !s()) return;
1779
+ const m = y.composedPath(), u = m.indexOf(e);
1780
+ if ((u === -1 ? m : m.slice(u + 1)).filter((g) => g instanceof Element).some((g) => g.matches(`${Pe},[aria-expanded="true"]`))) return;
1707
1781
  const v = t.target();
1708
- v?.isConnected && (v.closest(Le) || Fe(v)) || t.dispatch({ type: "DISMISS", via: "escape" });
1782
+ v?.isConnected && (v.closest(Pe) || Be(v)) || t.dispatch({ type: "DISMISS", via: "escape" });
1709
1783
  }, h = { capture: !0 };
1710
1784
  return document.addEventListener("click", i, h), document.addEventListener("input", o, h), document.addEventListener("change", l, h), document.addEventListener("pointerdown", a, h), document.addEventListener("mousedown", a, h), document.addEventListener("keydown", a, h), window.addEventListener("keydown", f), () => {
1711
1785
  document.removeEventListener("click", i, h), document.removeEventListener("input", o, h), document.removeEventListener("change", l, h), document.removeEventListener("pointerdown", a, h), document.removeEventListener("mousedown", a, h), document.removeEventListener("keydown", a, h), window.removeEventListener("keydown", f);
1712
1786
  };
1713
1787
  }
1714
- function Ls(t, e, n, s) {
1788
+ function Vs(t, e, n, s) {
1715
1789
  let i = e(t), r = !1, o = !1, l = !1;
1716
1790
  const a = () => {
1717
- if (l = !1, o || Fe(t)) return;
1791
+ if (l = !1, o || Be(t)) return;
1718
1792
  const _ = e(t);
1719
1793
  if (!r) {
1720
1794
  i = _;
1721
1795
  return;
1722
1796
  }
1723
- _ !== i && (o = !0, b(), n());
1797
+ _ !== i && (o = !0, y(), n());
1724
1798
  }, f = () => {
1725
1799
  !l && !o && (l = !0, s.raf(a));
1726
1800
  }, h = new MutationObserver(f);
1727
1801
  h.observe(t, { attributes: !0, characterData: !0, childList: !0, subtree: !0 });
1728
- const c = s.setInterval(a, 300), b = () => {
1802
+ const c = s.setInterval(a, 300), y = () => {
1729
1803
  h.disconnect(), s.clearInterval(c);
1730
1804
  };
1731
1805
  return {
@@ -1734,14 +1808,14 @@ function Ls(t, e, n, s) {
1734
1808
  },
1735
1809
  tick: f,
1736
1810
  stop() {
1737
- o = !0, b();
1811
+ o = !0, y();
1738
1812
  }
1739
1813
  };
1740
1814
  }
1741
- const Y = Symbol.for(dn), Ms = 300, Cs = 500, Ps = 12e4, j = globalThis, Et = () => j[un] === !0;
1742
- class At extends ne {
1815
+ const Z = Symbol.for(bn), Ks = 300, Ws = 500, Gs = 12e4, z = globalThis, St = () => z[_n] === !0;
1816
+ class xt extends ee {
1743
1817
  constructor() {
1744
- super(...arguments), this.manifest = "", this.fallbackManifest = "", this.buildId = "", this.locale = "", this.guideOrigin = "", this.baseZIndex = On, this.targetTimeout = st, this.disabled = !1, this.source = null, this.navigate = null, this.strings = void 0, this._s = z(), this._queue = [], this._dispatching = !1, this._run = null, this._cache = /* @__PURE__ */ new Map(), this._resolver = null, this._cancelWait = null, this._target = null, this._tracker = null, this._detach = null, this._change = null, this._shownKey = "", this._shownAt = 0, this._pressToken = -1, this._focusPending = !1, this._appFocus = null, this._swapSeq = 0, this._lang = new MutationObserver(() => {
1818
+ super(...arguments), this.manifest = "", this.fallbackManifest = "", this.buildId = "", this.locale = "", this.guideOrigin = "", this.baseZIndex = Dn, this.targetTimeout = rt, this.disabled = !1, this.source = null, this.navigate = null, this.strings = void 0, this.theme = void 0, this.appearance = "dark", this._s = U(), this._queue = [], this._dispatching = !1, this._run = null, this._cache = /* @__PURE__ */ new Map(), this._resolver = null, this._cancelWait = null, this._target = null, this._tracker = null, this._detach = null, this._change = null, this._shownKey = "", this._shownAt = 0, this._pressToken = -1, this._focusPending = !1, this._appFocus = null, this._swapSeq = 0, this._themed = /* @__PURE__ */ new Set(), this._lang = new MutationObserver(() => {
1745
1819
  this.locale || this._swapLocale();
1746
1820
  }), this._policy = { autolink: !1, link: (e) => this._link(e) }, this._handlers = {
1747
1821
  press: () => {
@@ -1757,7 +1831,7 @@ class At extends ne {
1757
1831
  };
1758
1832
  }
1759
1833
  static {
1760
- this.styles = _s;
1834
+ this.styles = Is;
1761
1835
  }
1762
1836
  static {
1763
1837
  this.properties = {
@@ -1771,23 +1845,25 @@ class At extends ne {
1771
1845
  disabled: { type: Boolean, reflect: !0 },
1772
1846
  source: { attribute: !1 },
1773
1847
  navigate: { attribute: !1 },
1774
- strings: { attribute: !1 }
1848
+ strings: { attribute: !1 },
1849
+ theme: { attribute: !1 },
1850
+ appearance: { type: String, reflect: !0 }
1775
1851
  };
1776
1852
  }
1777
1853
  static {
1778
- this.dom = Mt;
1854
+ this.dom = Ut;
1779
1855
  }
1780
1856
  get _dom() {
1781
1857
  return this.constructor.dom;
1782
1858
  }
1783
1859
  // ── Public API ──────────────────────────────────────────────────────────
1784
1860
  get isActive() {
1785
- return J(this._s);
1861
+ return X(this._s);
1786
1862
  }
1787
1863
  get current() {
1788
- if (!J(this._s) || !this._s.loaded) return null;
1864
+ if (!X(this._s) || !this._s.loaded) return null;
1789
1865
  const e = this._s.loaded.tour.steps[this._s.index];
1790
- return { tourId: this._s.loaded.tour.id, stepId: e.id, ...oe(this._s) };
1866
+ return { tourId: this._s.loaded.tour.id, stepId: e.id, ...ie(this._s) };
1791
1867
  }
1792
1868
  async start(e, n = {}) {
1793
1869
  return this._start(e, n, !1);
@@ -1808,7 +1884,7 @@ class At extends ne {
1808
1884
  });
1809
1885
  }
1810
1886
  willUpdate(e) {
1811
- (e.has("manifest") || e.has("fallbackManifest") || e.has("buildId")) && this._cache.clear(), e.has("baseZIndex") && this.style.setProperty("--_pw-z", String(this.baseZIndex)), e.has("disabled") && this.disabled && this._s.phase !== "idle" && this._dispatch({ type: "DISMISS", via: "disabled" });
1887
+ (e.has("manifest") || e.has("fallbackManifest") || e.has("buildId")) && this._cache.clear(), e.has("baseZIndex") && this.style.setProperty("--_pw-z", String(this.baseZIndex)), e.has("theme") && this._applyTheme(), e.has("disabled") && this.disabled && this._s.phase !== "idle" && this._dispatch({ type: "DISMISS", via: "disabled" });
1812
1888
  }
1813
1889
  updated(e) {
1814
1890
  e.has("locale") && this.isActive && this._swapLocale(), (e.has("manifest") || e.has("fallbackManifest")) && this.hasUpdated && this._tryResume(), this._afterRender();
@@ -1818,13 +1894,13 @@ class At extends ne {
1818
1894
  }
1819
1895
  render() {
1820
1896
  const e = this._s;
1821
- if (!this._run || !e.loaded || !J(e)) return A;
1822
- const n = e.loaded.tour.steps[e.index], s = e.phase === "showing" || e.phase === "fallback" ? "bubble" : e.phase === "paused" ? "pill" : "none", i = oe(e);
1823
- return As(
1897
+ if (!this._run || !e.loaded || !X(e)) return A;
1898
+ const n = e.loaded.tour.steps[e.index], s = e.phase === "showing" || e.phase === "fallback" ? "bubble" : e.phase === "paused" ? "pill" : "none", i = ie(e);
1899
+ return Us(
1824
1900
  {
1825
1901
  mode: s,
1826
1902
  lang: e.loaded.tour.locale.replace(/_/g, "-"),
1827
- dir: fs(e.loaded.tour.locale),
1903
+ dir: vs(e.loaded.tour.locale),
1828
1904
  tourId: e.loaded.tour.id,
1829
1905
  step: n,
1830
1906
  state: e.phase === "fallback" ? "fallback" : "shown",
@@ -1833,50 +1909,57 @@ class At extends ne {
1833
1909
  last: i.index === i.total - 1,
1834
1910
  nextEnabled: n.advance !== "input" || e.fieldNonEmpty,
1835
1911
  guideUrl: e.loaded.tour.guideUrl,
1836
- strings: yt(e.loaded.tour.locale, this.strings),
1912
+ strings: wt(e.loaded.tour.locale, this.strings),
1837
1913
  policy: this._policy,
1838
1914
  popover: this._dom.supportsPopover()
1839
1915
  },
1840
1916
  this._handlers
1841
1917
  );
1842
1918
  }
1919
+ /** Inline custom properties win over the page's ``:root`` and element rules. */
1920
+ _applyTheme() {
1921
+ const e = xs(this.theme);
1922
+ for (const n of this._themed) e.has(n) || this.style.removeProperty(n);
1923
+ for (const [n, s] of e) this.style.setProperty(n, s);
1924
+ this._themed = new Set(e.keys());
1925
+ }
1843
1926
  // ── Starting ────────────────────────────────────────────────────────────
1844
1927
  async _start(e, n, s) {
1845
1928
  try {
1846
- if (Et() || this.disabled)
1929
+ if (St() || this.disabled)
1847
1930
  return console.info(`[steppy-tour] "${e}" not started: tours are disabled on this page`), !1;
1848
- const i = j[Y];
1931
+ const i = z[Z];
1849
1932
  i && i !== this && i._dispatch({ type: "DISMISS", via: "replaced" }), this._s.phase !== "idle" && this._dispatch({ type: "DISMISS", via: "replaced" }), this._dispatch({ type: "REQUEST" });
1850
- const r = this._s.token, o = Object.fromEntries(Object.entries(n.params ?? {}).map(([d, w]) => [d, String(w)])), l = this._preferredLocale(), a = await dt(this._cfg(l), e);
1933
+ const r = this._s.token, o = Object.fromEntries(Object.entries(n.params ?? {}).map(([d, w]) => [d, String(w)])), l = this._preferredLocale(), a = await pt(this._cfg(l), e);
1851
1934
  if (this._s.token !== r) return !1;
1852
1935
  if (!a.ok) return this._fail({ reason: a.reason, fatal: !0, message: a.message, tourId: e, issues: a.issues });
1853
- const { tour: f, manifest: h } = a, c = this._dom, b = h.layouts ?? {}, _ = f.steps.map((d) => !d.layouts || d.layouts.some((w) => c.matchMedia(b[w]))), m = { tourId: e, buildId: f.buildId, locale: f.locale };
1936
+ const { tour: f, manifest: h } = a, c = this._dom, y = h.layouts ?? {}, _ = f.steps.map((d) => !d.layouts || d.layouts.some((w) => c.matchMedia(y[w]))), m = { tourId: e, buildId: f.buildId, locale: f.locale };
1854
1937
  if (!_.some(Boolean)) return this._fail({ reason: "load-failed", fatal: !0, message: "no steps apply to this layout", ...m });
1855
1938
  let u = _.indexOf(!0);
1856
1939
  if (n.step !== void 0) {
1857
1940
  const d = f.steps.findIndex((w) => w.id === n.step);
1858
1941
  if (d >= 0 && _[d]) u = d;
1859
1942
  else if (s)
1860
- return he(), this._fail(null);
1943
+ return ue(), this._fail(null);
1861
1944
  }
1862
- const p = pt(document.baseURI, location.origin);
1945
+ const p = gt(document.baseURI, location.origin);
1863
1946
  let v = null, g = o;
1864
1947
  if (f.entry && !s) {
1865
- const d = f.entry.route, w = ht(d, Ae(location.pathname, p)) ?? ht(d, location.pathname);
1866
- if (g = { ...w ?? {}, ...o }, !w || Object.entries(o).some(([y, $]) => w[y] !== $)) {
1867
- const y = rs(d, g);
1868
- if ("missing" in y)
1948
+ const d = f.entry.route, w = ft(d, $e(location.pathname, p)) ?? ft(d, location.pathname);
1949
+ if (g = { ...w ?? {}, ...o }, !w || Object.entries(o).some(([b, $]) => w[b] !== $)) {
1950
+ const b = hs(d, g);
1951
+ if ("missing" in b)
1869
1952
  return this._fail({
1870
1953
  reason: "entry-params",
1871
1954
  fatal: !0,
1872
- message: `route ${d} needs ${y.missing.join(", ")}`,
1873
- missing: y.missing,
1955
+ message: `route ${d} needs ${b.missing.join(", ")}`,
1956
+ missing: b.missing,
1874
1957
  ...m
1875
1958
  });
1876
- v = Dt(y.path, p);
1959
+ v = Ht(b.path, p);
1877
1960
  }
1878
1961
  }
1879
- return this._run = { tourId: e, params: g, load: a, entryPath: v, base: p }, this._resolver = ss({ attr: a.testIdAttribute, host: this, dom: c }), j[Y] = this, this._dispatch({
1962
+ return this._run = { tourId: e, params: g, load: a, entryPath: v, base: p }, this._resolver = us({ attr: a.testIdAttribute, host: this, dom: c }), z[Z] = this, this._dispatch({
1880
1963
  type: "LOADED",
1881
1964
  loaded: { tour: f, source: a.source, applicable: _, start: u, resumed: s, navigate: v !== null }
1882
1965
  }), this._lang.observe(document.documentElement, { attributeFilter: ["lang"] }), this._preferredLocale() !== l && this._swapLocale(), !0;
@@ -1888,8 +1971,8 @@ class At extends ne {
1888
1971
  return e ? this._dispatch({ type: "LOAD_FAILED", error: e }) : this._dispatch({ type: "DISMISS", via: "api" }), !1;
1889
1972
  }
1890
1973
  _tryResume() {
1891
- if (this.disabled || Et() || this._s.phase !== "idle" || j[Y]) return;
1892
- const e = this._manifestKey(), n = e ? hs(e, Date.now()) : null;
1974
+ if (this.disabled || St() || this._s.phase !== "idle" || z[Z]) return;
1975
+ const e = this._manifestKey(), n = e ? ys(e, Date.now()) : null;
1893
1976
  n && this._start(n.tourId, { params: n.params, step: n.stepId }, !0);
1894
1977
  }
1895
1978
  _manifestKey() {
@@ -1907,7 +1990,7 @@ class At extends ne {
1907
1990
  async _swapLocale() {
1908
1991
  const e = this._run;
1909
1992
  if (!e) return;
1910
- const n = ++this._swapSeq, s = this._preferredLocale(), i = await dt(this._cfg(s), e.tourId);
1993
+ const n = ++this._swapSeq, s = this._preferredLocale(), i = await pt(this._cfg(s), e.tourId);
1911
1994
  if (!(n !== this._swapSeq || this._run !== e)) {
1912
1995
  if (i.ok && i.tour.buildId === e.load.tour.buildId) {
1913
1996
  if (i.tour.locale === e.load.tour.locale) return;
@@ -1926,7 +2009,7 @@ class At extends ne {
1926
2009
  const n = this._s;
1927
2010
  try {
1928
2011
  for (; this._queue.length; ) {
1929
- const s = Hn(this._s, this._queue.shift());
2012
+ const s = Gn(this._s, this._queue.shift());
1930
2013
  this._s = s.state;
1931
2014
  for (const i of s.effects) this._effect(i);
1932
2015
  }
@@ -1939,13 +2022,13 @@ class At extends ne {
1939
2022
  const n = this._run;
1940
2023
  switch (e.type) {
1941
2024
  case "emit":
1942
- jn(this, e.name, e.detail);
2025
+ Zn(this, e.name, e.detail);
1943
2026
  break;
1944
2027
  case "persist":
1945
2028
  n && this._persist(e.index);
1946
2029
  break;
1947
2030
  case "clearPersist":
1948
- he();
2031
+ ue();
1949
2032
  break;
1950
2033
  case "navigate":
1951
2034
  this._enter(e.token);
@@ -1963,7 +2046,7 @@ class At extends ne {
1963
2046
  }
1964
2047
  _persist(e) {
1965
2048
  const n = this._run, s = n.load.tour;
1966
- ds({
2049
+ bs({
1967
2050
  v: 1,
1968
2051
  tourId: s.id,
1969
2052
  stepId: s.steps[e].id,
@@ -1975,7 +2058,7 @@ class At extends ne {
1975
2058
  });
1976
2059
  }
1977
2060
  async _enter(e) {
1978
- const n = this._run, s = n.entryPath, i = { appPath: Ae(s, n.base), tourId: n.tourId };
2061
+ const n = this._run, s = n.entryPath, i = { appPath: $e(s, n.base), tourId: n.tourId };
1979
2062
  try {
1980
2063
  const r = this.navigate ?? ((o) => location.assign(o));
1981
2064
  await Promise.race([
@@ -1988,7 +2071,7 @@ class At extends ne {
1988
2071
  }
1989
2072
  _timeout() {
1990
2073
  const e = Number(this.targetTimeout);
1991
- return Number.isFinite(e) ? Math.min(Ps, Math.max(Cs, e)) : st;
2074
+ return Number.isFinite(e) ? Math.min(Gs, Math.max(Ws, e)) : rt;
1992
2075
  }
1993
2076
  _wait(e, n, s) {
1994
2077
  this._cancelWait?.();
@@ -2018,12 +2101,12 @@ class At extends ne {
2018
2101
  _afterRender() {
2019
2102
  const e = this._s, n = this._layer(), s = e.phase === "showing" || e.phase === "fallback" || e.phase === "paused";
2020
2103
  if (!n || !s || !e.loaded) {
2021
- this._tracker?.stop(), this._change?.stop(), this._change = null, J(e) || (this._shownKey = "");
2104
+ this._tracker?.stop(), this._change?.stop(), this._change = null, X(e) || (this._shownKey = "");
2022
2105
  return;
2023
2106
  }
2024
- Bn(n, this._dom), this._ensureTriggers();
2107
+ Xn(n, this._dom), this._ensureTriggers();
2025
2108
  const i = e.loaded.tour.steps[e.index], r = `${e.loaded.tour.id}/${e.index}/${e.phase}`;
2026
- r !== this._shownKey && (this._shownKey = r, this._shownAt = this._dom.scheduler.now(), Vn(n, this._dom), e.phase === "showing" && this._onStepShown(i), this._announce()), e.phase === "showing" || e.phase === "fallback" ? (this._tracker || (this._tracker = this._makeTracker()), this._tracker.start(), this._tracker.notify()) : this._tracker?.stop();
2109
+ r !== this._shownKey && (this._shownKey = r, this._shownAt = this._dom.scheduler.now(), Yn(n, this._dom), e.phase === "showing" && this._onStepShown(i), this._announce()), e.phase === "showing" || e.phase === "fallback" ? (this._tracker || (this._tracker = this._makeTracker()), this._tracker.start(), this._tracker.notify()) : this._tracker?.stop();
2027
2110
  }
2028
2111
  /** Manual and fallback steps take focus — once placed: a hidden bubble cannot be focused. */
2029
2112
  _applyPendingFocus() {
@@ -2034,7 +2117,7 @@ class At extends ne {
2034
2117
  const n = this._target;
2035
2118
  if (this._change?.stop(), this._change = null, n && e.advance === "change") {
2036
2119
  const i = this._s.token;
2037
- this._change = Ls(n, ls, () => this._dispatch({ type: "TRIGGER", token: i, kind: "change" }), this._dom.scheduler);
2120
+ this._change = Vs(n, gs, () => this._dispatch({ type: "TRIGGER", token: i, kind: "change" }), this._dom.scheduler);
2038
2121
  }
2039
2122
  if (n) {
2040
2123
  const i = this._dom.rect(n), r = this._dom.viewport();
@@ -2047,7 +2130,7 @@ class At extends ne {
2047
2130
  this._dom.scheduler.raf(() => {
2048
2131
  const e = this.renderRoot.querySelector('[role="status"]'), n = this._bubble();
2049
2132
  if (e) {
2050
- if (e.textContent = "", this._s.phase === "paused") e.textContent = yt(this._s.loaded?.tour.locale ?? "en", this.strings).paused;
2133
+ if (e.textContent = "", this._s.phase === "paused") e.textContent = wt(this._s.loaded?.tour.locale ?? "en", this.strings).paused;
2051
2134
  else if (n) {
2052
2135
  const s = (i) => n.querySelector(`[part~="${i}"]`)?.textContent?.trim() ?? "";
2053
2136
  e.textContent = [s("title"), s("body"), s("progress")].filter(Boolean).join(" ");
@@ -2056,7 +2139,7 @@ class At extends ne {
2056
2139
  });
2057
2140
  }
2058
2141
  _makeTracker() {
2059
- return Rs({
2142
+ return js({
2060
2143
  dom: this._dom,
2061
2144
  layer: () => this._layer(),
2062
2145
  bubble: () => this._bubble(),
@@ -2077,7 +2160,7 @@ class At extends ne {
2077
2160
  }
2078
2161
  _preferredSide() {
2079
2162
  const e = this._s.loaded?.tour.steps[this._s.index];
2080
- return e?.placement && e.placement !== "auto" ? e.placement : e?.advance === "change" && this._target && cs(this._target) ? "top" : "auto";
2163
+ return e?.placement && e.placement !== "auto" ? e.placement : e?.advance === "change" && this._target && ms(this._target) ? "top" : "auto";
2081
2164
  }
2082
2165
  _nextTargetRect() {
2083
2166
  const e = this._s, s = (e.loaded?.tour.steps ?? []).find((r, o) => o > e.index && e.loaded.applicable[o]), i = s?.target && this._resolver ? this._resolver.find(s.target) : null;
@@ -2086,14 +2169,14 @@ class At extends ne {
2086
2169
  /** The app's open dialogs (the overlay's own bubble is in the shadow root, so never one of them). */
2087
2170
  _openDialogs() {
2088
2171
  const e = [];
2089
- for (const n of document.querySelectorAll(Le)) {
2172
+ for (const n of document.querySelectorAll(Pe)) {
2090
2173
  const s = this._dom.rect(n);
2091
2174
  s && e.push(s);
2092
2175
  }
2093
2176
  return e;
2094
2177
  }
2095
2178
  _ensureTriggers() {
2096
- this._detach || !this._run || (this._detach = Os({
2179
+ this._detach || !this._run || (this._detach = Bs({
2097
2180
  host: this,
2098
2181
  attr: this._run.load.testIdAttribute,
2099
2182
  state: () => this._s,
@@ -2101,7 +2184,7 @@ class At extends ne {
2101
2184
  target: () => this._target,
2102
2185
  persistAhead: (e) => {
2103
2186
  const s = this._s.loaded.applicable.findIndex((i, r) => i && r > e);
2104
- s === -1 ? he() : this._persist(s);
2187
+ s === -1 ? ue() : this._persist(s);
2105
2188
  },
2106
2189
  interacted: () => this._change?.arm(),
2107
2190
  tick: () => this._change?.tick(),
@@ -2110,7 +2193,7 @@ class At extends ne {
2110
2193
  }
2111
2194
  /** Our buttons: a click counts only if it was pressed on this step (or, by keyboard, after a short grace). */
2112
2195
  _guarded(e, n) {
2113
- e.stopPropagation(), !(e.detail === 0 ? this._dom.scheduler.now() - this._shownAt < Ms : this._pressToken !== this._s.token) && n();
2196
+ e.stopPropagation(), !(e.detail === 0 ? this._dom.scheduler.now() - this._shownAt < Ks : this._pressToken !== this._s.token) && n();
2114
2197
  }
2115
2198
  _deepActive() {
2116
2199
  let e = document.activeElement;
@@ -2120,11 +2203,11 @@ class At extends ne {
2120
2203
  _teardown(e) {
2121
2204
  this._cancelWait?.(), this._cancelWait = null, this._tracker?.stop(), this._tracker = null, this._change?.stop(), this._change = null, this._detach?.(), this._detach = null, document.removeEventListener("focusin", this._onFocusIn, !0), this._lang.disconnect();
2122
2205
  const n = this._deepActive();
2123
- e && n && this.renderRoot.contains(n) && this._appFocus instanceof HTMLElement && this._appFocus.focus({ preventScroll: !0 }), this._target = null, this._run = null, this._resolver = null, this._shownKey = "", j[Y] === this && (j[Y] = null), !e && this._s.phase !== "idle" && (this._s = { ...z(), token: this._s.token + 1 });
2206
+ e && n && this.renderRoot.contains(n) && this._appFocus instanceof HTMLElement && this._appFocus.focus({ preventScroll: !0 }), this._target = null, this._run = null, this._resolver = null, this._shownKey = "", z[Z] === this && (z[Z] = null), !e && this._s.phase !== "idle" && (this._s = { ...U(), token: this._s.token + 1 });
2124
2207
  }
2125
2208
  // ── Links in step text ──────────────────────────────────────────────────
2126
2209
  _link(e) {
2127
- const n = this._run, s = n?.base ?? pt(document.baseURI, location.origin), i = os(e, s, location.origin);
2210
+ const n = this._run, s = n?.base ?? gt(document.baseURI, location.origin), i = ps(e, s, location.origin);
2128
2211
  if (i !== null)
2129
2212
  return {
2130
2213
  kind: "internal",
@@ -2133,32 +2216,35 @@ class At extends ne {
2133
2216
  if (l.defaultPrevented || l.button !== 0 || l.metaKey || l.ctrlKey || l.shiftKey || l.altKey) return;
2134
2217
  l.preventDefault();
2135
2218
  const a = this.navigate ?? ((f) => location.assign(f));
2136
- Promise.resolve(a(i, { appPath: Ae(i, s), tourId: n?.tourId ?? "" })).catch(() => {
2219
+ Promise.resolve(a(i, { appPath: $e(i, s), tourId: n?.tourId ?? "" })).catch(() => {
2137
2220
  });
2138
2221
  }
2139
2222
  };
2140
- const r = be(e), o = n?.load.guideOrigin ?? null;
2223
+ const r = _e(e), o = n?.load.guideOrigin ?? null;
2141
2224
  return r && o && r === o ? { kind: "external", href: e } : null;
2142
2225
  }
2143
2226
  }
2144
- function Us() {
2145
- const t = customElements.get(ve);
2146
- t ? t !== At && console.warn(`[steppy-tour] <${ve}> is already defined by another copy of the overlay; keeping that one`) : customElements.define(ve, At);
2227
+ function qs() {
2228
+ const t = customElements.get(ye);
2229
+ t ? t !== xt && console.warn(`[steppy-tour] <${ye}> is already defined by another copy of the overlay; keeping that one`) : customElements.define(ye, xt);
2147
2230
  }
2148
- Us();
2231
+ qs();
2149
2232
  export {
2150
- hn as ADVANCE_KINDS,
2151
- ps as DEFAULT_TOUR_STRINGS,
2152
- fn as PLACEMENTS,
2153
- At as SteppyTourHost,
2154
- un as TOURS_KILL_SWITCH_GLOBAL,
2155
- Hs as TOUR_ERROR_REASONS,
2156
- zs as TOUR_EVENTS,
2157
- ve as TOUR_HOST_TAG,
2158
- Fs as TOUR_PARTS,
2159
- et as TOUR_SCHEMA_VERSION,
2160
- Us as defineTourHost,
2161
- Jn as validateManifest,
2162
- Qn as validateTour
2233
+ yn as ADVANCE_KINDS,
2234
+ ws as DEFAULT_TOUR_STRINGS,
2235
+ vn as PLACEMENTS,
2236
+ xt as SteppyTourHost,
2237
+ _n as TOURS_KILL_SWITCH_GLOBAL,
2238
+ ei as TOUR_APPEARANCES,
2239
+ Js as TOUR_ERROR_REASONS,
2240
+ Ys as TOUR_EVENTS,
2241
+ ye as TOUR_HOST_TAG,
2242
+ Qs as TOUR_PARTS,
2243
+ nt as TOUR_SCHEMA_VERSION,
2244
+ Bt as TOUR_THEME_KEYS,
2245
+ qs as defineTourHost,
2246
+ Kt as themeProperty,
2247
+ rs as validateManifest,
2248
+ os as validateTour
2163
2249
  };
2164
2250
  //# sourceMappingURL=steppy-tour.js.map