Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@thisway/next

Package Overview
Dependencies
Maintainers
2
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thisway/next - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

1299

index.js
var Je = Object.defineProperty;
var Qe = (e, t, o) => t in e ? Je(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
var dt = (e, t, o) => (Qe(e, typeof t != "symbol" ? t + "" : t, o), o);
import * as Le from "svelte";
import { onMount as to, onDestroy as Ae, createEventDispatcher as eo } from "svelte";
import { isValidNumber as qt, toPx as it, defaults as ae, pick$ as j, clamp as At, noFinite as ce, getKeyByValue as oo, animationFrameThrottle as ro, resizeObserver as We, EMPTY_SIZE as so } from "@thisway/utils";
import { get as H, writable as Tt, derived as E, readable as Wt } from "svelte/store";
import { PRIMARY_COLOR_WHITE as He, PRIMARY_COLOR_BLACK as Ve, PRIMARY_COLOR_BLUE as no, EMPTY_POINT as io, POSITION_AUTO as Xt, ORIENTATIONS as pe, ALIGNMENTS as lo, NO_ELEMENT as lt, ORIENTATIONS_TO_START_END as ao, ORIENTATIONS_Y as co, popoverDefaultValues as po, highlightDefaultValues as fo, LAYOUT_MODE_1 as yt, LAYOUT_MODE_3 as Re } from "@thisway/base";
import * as Ae from "svelte";
import { onMount as to, onDestroy as We, createEventDispatcher as eo } from "svelte";
import { isValidNumber as qt, toPx as lt, defaults as ce, pick$ as D, clamp as At, noFinite as pe, getKeyByValue as oo, animationFrameThrottle as ro, resizeObserver as He, EMPTY_SIZE as so } from "@thisway/utils";
import { get as R, writable as Tt, derived as M, readable as Wt } from "svelte/store";
import { PRIMARY_COLOR_WHITE as Ve, PRIMARY_COLOR_BLACK as Re, PRIMARY_COLOR_BLUE as no, EMPTY_POINT as io, POSITION_AUTO as Xt, ORIENTATIONS as fe, ALIGNMENTS as lo, NO_ELEMENT as at, ORIENTATIONS_TO_START_END as ao, ORIENTATIONS_Y as co, popoverDefaultValues as po, highlightDefaultValues as fo, LAYOUT_MODE_1 as yt, LAYOUT_MODE_3 as Fe } from "@thisway/base";
export * from "@thisway/base";
import { SvelteComponent as kt, init as xt, safe_not_equal as St, append_styles as Rt, space as et, empty as Ft, insert as D, noop as ut, detach as Y, component_subscribe as L, svg_element as Vt, attr as P, set_style as G, append as U, listen as Ot, element as Z, action_destroyer as Fe, is_function as Be, construct_svelte_component as fe, create_component as bt, mount_component as $t, group_outros as st, transition_out as A, destroy_component as Ct, check_outros as nt, transition_in as S, run_all as ho, binding_callbacks as uo, text as Nt, set_data as It, compute_slots as wo, create_slot as wt, update_slot_base as _t, get_all_dirty_from_scope as mt, get_slot_changes as gt } from "svelte/internal";
import { SvelteComponent as kt, init as xt, safe_not_equal as St, append_styles as Rt, space as ot, empty as Ft, insert as Y, noop as ut, detach as j, component_subscribe as L, svg_element as Vt, attr as I, set_style as G, append as K, listen as Ot, element as Q, action_destroyer as Be, is_function as De, construct_svelte_component as he, create_component as bt, mount_component as $t, group_outros as st, transition_out as W, destroy_component as Ct, check_outros as nt, transition_in as S, run_all as ho, binding_callbacks as uo, text as Nt, set_data as It, compute_slots as wo, create_slot as wt, update_slot_base as _t, get_all_dirty_from_scope as mt, get_slot_changes as vt } from "svelte/internal";
import "svelte/internal/disclose-version";
import { getHighlightOptions as _o, NO_ELEMENT as mo, CLICK_MASK_ACTION_NEXT as go, CLICK_MASK_ACTION_CLOSE as vo, getRenderIndex as yo } from "@thisway/next";
import { getHighlightOptions as _o, NO_ELEMENT as mo, CLICK_MASK_ACTION_NEXT as vo, CLICK_MASK_ACTION_CLOSE as go, getRenderIndex as yo } from "@thisway/next";
import { tweened as Qt } from "svelte/motion";
import { cubicOut as te } from "svelte/easing";
const rt = (e) => Symbol(e), F = (e) => {
const t = Le.getContext(e);
const rt = (e) => Symbol(e), B = (e) => {
const t = Ae.getContext(e);
if (!t)

@@ -21,4 +21,4 @@ throw new Error(`Context ${e.description} not exist`);

}, bo = (e, t) => {
Le.setContext(e, t);
}, De = (e) => new Map(e), Pt = rt("Tour"), ee = rt("Options"), oe = rt("ElementBounding"), re = rt("PopoverContainer"), Ye = rt("PopoverSize"), se = rt("TotalStepCount"), je = rt("PopoverPosition"), Bt = rt("Delegate"), $o = rt("ForeignView"), Dt = rt("RenderState"), Yt = rt("StepOptions");
Ae.setContext(e, t);
}, Ye = (e) => new Map(e), Pt = rt("Tour"), ee = rt("Options"), oe = rt("ElementBounding"), re = rt("PopoverContainer"), je = rt("PopoverSize"), se = rt("TotalStepCount"), Ge = rt("PopoverPosition"), Bt = rt("Delegate"), $o = rt("ForeignView"), Dt = rt("RenderState"), Yt = rt("StepOptions");
class Co {

@@ -35,3 +35,3 @@ constructor(t) {

getAllSteps(t = !1) {
return t ? H(this.store.steps$) : H(this.store.effectiveSteps$);
return t ? R(this.store.steps$) : R(this.store.effectiveSteps$);
}

@@ -43,3 +43,3 @@ /**

getActiveStep() {
return { step: H(this.store.activeStep$), index: H(this.store.activeIndex$) };
return { step: R(this.store.activeStep$), index: R(this.store.activeIndex$) };
}

@@ -56,13 +56,13 @@ // public getStep(id: string): Step | undefined {

const { effectiveSteps$: t } = this.store;
return H(t)[0];
return R(t)[0];
}
getLastStep() {
const { effectiveSteps$: t } = this.store;
return H(t).at(-1);
return R(t).at(-1);
}
goPrevStep() {
const { effectiveIndex$: t, effectiveSteps$: o } = this.store, r = H(t);
const { effectiveIndex$: t, effectiveSteps$: o } = this.store, r = R(t);
if (!qt(r) || r < 1)
return;
const n = H(o)[r - 1];
const n = R(o)[r - 1];
this.goStep(n.id);

@@ -86,6 +86,6 @@ }

isActive() {
return H(this.store.activeStep$) !== void 0;
return R(this.store.activeStep$) !== void 0;
}
getNextStepId() {
const { effectiveIndex$: t, effectiveSteps$: o } = this.store, r = H(t), n = H(o);
const { effectiveIndex$: t, effectiveSteps$: o } = this.store, r = R(t), n = R(o);
if (!(!qt(r) || r === n.length - 1))

@@ -103,3 +103,3 @@ return n[r + 1].id;

const To = (e, t) => {
const o = Tt(e), r = Tt(t), n = E(o, (a) => a.filter((c) => !c.isHidden)), s = E([o, r], zt), i = E([n, r], zt), l = E([o, s], ([a, c]) => c != null ? a[c] : void 0);
const o = Tt(e), r = Tt(t), n = M(o, (a) => a.filter((p) => !p.isHidden)), s = M([o, r], zt), i = M([n, r], zt), l = M([o, s], ([a, p]) => p != null ? a[p] : void 0);
return {

@@ -123,17 +123,17 @@ steps$: o,

}, ko = ({ x: e, y: t, ...o }) => Object.assign(o, {
left: it(e),
top: it(t)
left: lt(e),
top: lt(t)
}), xo = (e, t, o, r, n) => {
if (!e)
return "";
const s = r ? o + t : o, i = t * 2, l = e.x - s + i, a = e.y - s, c = e.width + (s - i) * 2, f = e.height + (s - i) * 2, w = n.width, b = n.height;
return `M${w},0L0,0L0,${b}L${w},${b}L${w},0ZM${l},${a}h${c}a${i},${i} 0 0 1 ${i},${i}v${f}a${i},${i} 0 0 1 -${i},${i}h-${c}a${i},${i} 0 0 1 -${i},-${i}v-${f}a${i},${i} 0 0 1 ${i},-${i}z`;
}, Ge = (e, t = e) => e === He ? Ve : t, So = (e, t, o) => {
const r = ae({ ...t }, e);
return o ? ae({ ...o }, r) : r;
}, Xe = () => {
const { effectiveSteps$: e } = F(Pt).store, t = F(Dt);
return E([e, t], ([o, { step: r }]) => zt([o, r == null ? void 0 : r.id]));
}, Ke = () => F(Yt).popover, Oo = () => F(Yt).highlight, No = (e) => {
const t = (e == null ? void 0 : e.primaryColor) || no, o = (e == null ? void 0 : e.textColor) || Ge(t, He), r = (e == null ? void 0 : e.descColor) || Ve;
const s = r ? o + t : o, i = t * 2, l = e.x - s + i, a = e.y - s, p = e.width + (s - i) * 2, f = e.height + (s - i) * 2, w = n.width, _ = n.height;
return `M${w},0L0,0L0,${_}L${w},${_}L${w},0ZM${l},${a}h${p}a${i},${i} 0 0 1 ${i},${i}v${f}a${i},${i} 0 0 1 -${i},${i}h-${p}a${i},${i} 0 0 1 -${i},-${i}v-${f}a${i},${i} 0 0 1 ${i},-${i}z`;
}, Xe = (e, t = e) => e === Ve ? Re : t, So = (e, t, o) => {
const r = ce({ ...t }, e);
return o ? ce({ ...o }, r) : r;
}, Ke = () => {
const { effectiveSteps$: e } = B(Pt).store, t = B(Dt);
return M([e, t], ([o, { step: r }]) => zt([o, r == null ? void 0 : r.id]));
}, ie = () => B(Yt).popover, Oo = () => B(Yt).highlight, No = (e) => {
const t = (e == null ? void 0 : e.primaryColor) || no, o = (e == null ? void 0 : e.textColor) || Xe(t, Ve), r = (e == null ? void 0 : e.descColor) || Re;
return {

@@ -144,11 +144,11 @@ primaryColor: t,

};
}, Ue = () => F(Yt).theme, Io = () => {
const e = Xe(), { effectiveSteps$: t } = F(Pt).store;
return E([e, t], ([o, r]) => qt(o) && o < r.length - 1 ? r[o + 1] : void 0);
}, Ue = () => B(Yt).theme, Io = () => {
const e = Ke(), { effectiveSteps$: t } = B(Pt).store;
return M([e, t], ([o, r]) => qt(o) && o < r.length - 1 ? r[o + 1] : void 0);
}, Po = () => {
const e = F(Dt);
return j(e, "step");
}, { assign: he } = Object, qe = (e, t) => (he(e.style, t), {
const e = B(Dt);
return D(e, "step");
}, { assign: de } = Object, qe = (e, t) => (de(e.style, t), {
update(o) {
he(e.style, o);
de(e.style, o);
}

@@ -159,7 +159,7 @@ });

}
function de(e) {
function ue(e) {
let t, o, r, n;
return {
c() {
t = Vt("svg"), o = Vt("path"), P(
t = Vt("svg"), o = Vt("path"), I(
o,

@@ -174,6 +174,6 @@ "d",

e[2]
), P(t, "class", "thisway-mask"), P(t, "role", "presentation"), P(t, "width", "100%"), P(t, "height", "100%");
), I(t, "class", "thisway-mask"), I(t, "role", "presentation"), I(t, "width", "100%"), I(t, "height", "100%");
},
m(s, i) {
D(s, t, i), U(t, o), r || (n = Ot(
Y(s, t, i), K(t, o), r || (n = Ot(
t,

@@ -187,3 +187,3 @@ "click",

i & /*$maskCommand$*/
2 && P(
2 && I(
o,

@@ -202,14 +202,14 @@ "d",

d(s) {
s && Y(t), r = !1, n();
s && j(t), r = !1, n();
}
};
}
function ue(e) {
function we(e) {
let t, o, r, n, s = (
/*$showHeartbeat$*/
e[7] && we()
e[7] && _e()
);
return {
c() {
t = Z("div"), s && s.c(), P(t, "class", "thisway-highlight"), G(
t = Q("div"), s && s.c(), I(t, "class", "thisway-highlight"), G(
t,

@@ -227,3 +227,3 @@ "--thisway-highlight-border-width",

m(i, l) {
D(i, t, l), s && s.m(t, null), r || (n = Fe(o = qe.call(
Y(i, t, l), s && s.m(t, null), r || (n = Be(o = qe.call(
null,

@@ -237,3 +237,3 @@ t,

/*$showHeartbeat$*/
i[7] ? s || (s = we(), s.c(), s.m(t, null)) : s && (s.d(1), s = null), o && Be(o.update) && l & /*$borderBoundingStyle$*/
i[7] ? s || (s = _e(), s.c(), s.m(t, null)) : s && (s.d(1), s = null), o && De(o.update) && l & /*$borderBoundingStyle$*/
64 && o.update.call(

@@ -258,17 +258,17 @@ null,

d(i) {
i && Y(t), s && s.d(), r = !1, n();
i && j(t), s && s.d(), r = !1, n();
}
};
}
function we(e) {
function _e(e) {
let t;
return {
c() {
t = Z("div"), P(t, "class", "thisway-highlight-pulse");
t = Q("div"), I(t, "class", "thisway-highlight-pulse");
},
m(o, r) {
D(o, t, r);
Y(o, t, r);
},
d(o) {
o && Y(t);
o && j(t);
}

@@ -280,18 +280,18 @@ };

/*$showMask$*/
e[0] && de(e)
e[0] && ue(e)
), n = (
/*$showBorder$*/
e[3] && ue(e)
e[3] && we(e)
);
return {
c() {
r && r.c(), t = et(), n && n.c(), o = Ft();
r && r.c(), t = ot(), n && n.c(), o = Ft();
},
m(s, i) {
r && r.m(s, i), D(s, t, i), n && n.m(s, i), D(s, o, i);
r && r.m(s, i), Y(s, t, i), n && n.m(s, i), Y(s, o, i);
},
p(s, [i]) {
/*$showMask$*/
s[0] ? r ? r.p(s, i) : (r = de(s), r.c(), r.m(t.parentNode, t)) : r && (r.d(1), r = null), /*$showBorder$*/
s[3] ? n ? n.p(s, i) : (n = ue(s), n.c(), n.m(o.parentNode, o)) : n && (n.d(1), n = null);
s[0] ? r ? r.p(s, i) : (r = ue(s), r.c(), r.m(t.parentNode, t)) : r && (r.d(1), r = null), /*$showBorder$*/
s[3] ? n ? n.p(s, i) : (n = we(s), n.c(), n.m(o.parentNode, o)) : n && (n.d(1), n = null);
},

@@ -301,3 +301,3 @@ i: ut,

d(s) {
s && (Y(t), Y(o)), r && r.d(s), n && n.d(s);
s && (j(t), j(o)), r && r.d(s), n && n.d(s);
}

@@ -307,13 +307,13 @@ };

function Lo(e, t, o) {
let r, n, s, i, l, a, c, f;
const w = F(Pt), b = F(oe), h = F(Bt), m = Ue(), u = _o(), $ = j(u, "showMask");
L(e, $, (_) => o(0, r = _));
const C = j(u, "showBorder");
L(e, C, (_) => o(3, i = _));
const v = j(u, "showHeartbeat"), T = j(u, "padding"), k = j(u, "maskOpacity");
L(e, k, (_) => o(2, s = _));
const V = j(u, "borderWidth");
let r, n, s, i, l, a, p, f;
const w = B(Pt), _ = B(oe), $ = B(Bt), d = Ue(), h = _o(), b = D(h, "showMask");
L(e, b, (u) => o(0, r = u));
const T = D(h, "showBorder");
L(e, T, (u) => o(3, i = u));
const g = D(h, "showHeartbeat"), C = D(h, "padding"), k = D(h, "maskOpacity");
L(e, k, (u) => o(2, s = u));
const H = D(h, "borderWidth");
let x;
const R = E([b, V, T], ([_, d, B], K) => {
const X = _ ? H(_) : void 0, M = {
const V = M([_, H, C], ([u, A, U], z) => {
const y = u ? R(u) : void 0, P = {
x: 0,

@@ -323,9 +323,9 @@ y: 0,

height: 0,
borderWidth: d,
padding: B
borderWidth: A,
padding: U
};
if (!X || X === mo) {
const Q = Zt(h.window || window), ot = x ? H(x) : {
x: Q.width / 2,
y: Q.height / 2,
if (!y || y === mo) {
const X = Zt($.window || window), q = x ? R(x) : {
x: X.width / 2,
y: X.height / 2,
width: 0,

@@ -336,9 +336,9 @@ height: 0,

};
M.x = ot.x + ot.width / 2, M.y = ot.y + ot.height / 2, M.borderWidth = 0, M.padding = 0;
P.x = q.x + q.width / 2, P.y = q.y + q.height / 2, P.borderWidth = 0, P.padding = 0;
} else
M.x = X.x, M.y = X.y, M.width = X.width, M.height = X.height;
P.x = y.x, P.y = y.y, P.width = y.width, P.height = y.height;
x || (x = Qt(
{
x: M.x + M.width / 2,
y: M.y + M.height / 2,
x: P.x + P.width / 2,
y: P.y + P.height / 2,
width: 0,

@@ -351,36 +351,36 @@ height: 0,

));
const W = x.subscribe((Q) => {
K(Q);
const E = x.subscribe((X) => {
z(X);
});
return x.set(M), () => {
W();
return x.set(P), () => {
E();
};
}), O = E([R, C, $], ([_, d, B], K) => {
if (!_ || !B)
}), F = M([V, T, b], ([u, A, U], z) => {
if (!u || !U)
return;
const X = xo(_, _.borderWidth, _.padding, d, Zt(h.window || window));
K(X);
const y = xo(u, u.borderWidth, u.padding, A, Zt($.window || window));
z(y);
});
L(e, O, (_) => o(1, n = _));
const I = E(R, (_, d) => {
_ && d({
left: it(_.x - _.borderWidth - _.padding),
top: it(_.y - _.borderWidth - _.padding),
width: it(_.width),
height: it(_.height),
padding: it(_.padding)
L(e, F, (u) => o(1, n = u));
const O = M(V, (u, A) => {
u && A({
left: lt(u.x - u.borderWidth - u.padding),
top: lt(u.y - u.borderWidth - u.padding),
width: lt(u.width),
height: lt(u.height),
padding: lt(u.padding)
});
});
L(e, I, (_) => o(6, c = _));
const y = E(R, (_) => it(_ == null ? void 0 : _.borderWidth));
L(e, y, (_) => o(4, l = _));
const p = E([u, m], ([_, d]) => {
if (_ != null && _.borderColor)
return _.borderColor;
const { primaryColor: B } = d;
return Ge(B);
L(e, O, (u) => o(6, p = u));
const m = M(V, (u) => lt(u == null ? void 0 : u.borderWidth));
L(e, m, (u) => o(4, l = u));
const c = M([h, d], ([u, A]) => {
if (u != null && u.borderColor)
return u.borderColor;
const { primaryColor: U } = A;
return Xe(U);
});
L(e, p, (_) => o(5, a = _));
const N = E([v, R], ([_, d]) => !!(_ && (d != null && d.width) && (d != null && d.height)));
return L(e, N, (_) => o(7, f = _)), [
L(e, c, (u) => o(5, a = u));
const N = M([g, V], ([u, A]) => !!(u && (A != null && A.width) && (A != null && A.height)));
return L(e, N, (u) => o(7, f = u)), [
r,

@@ -392,20 +392,20 @@ n,

a,
c,
p,
f,
$,
C,
b,
T,
k,
F,
O,
I,
y,
p,
m,
c,
N,
() => {
var d;
switch ((d = H(u)) == null ? void 0 : d.clickMask) {
case vo: {
var A;
switch ((A = R(h)) == null ? void 0 : A.clickMask) {
case go: {
w.onClose();
break;
}
case go: {
case vo: {
w.goNextStep();

@@ -423,3 +423,3 @@ break;

}
const _e = 0.05, ze = (e) => {
const me = 0.05, ze = (e) => {
if (!e || e === Xt)

@@ -430,21 +430,21 @@ return [Xt, void 0];

const t = e.split("_");
return t.length === 1 && pe.includes(t[0]) ? [t[0], "CENTER"] : t.length === 2 && pe.includes(t[0]) && lo.includes(t[1]) ? t : [Xt, void 0];
return t.length === 1 && fe.includes(t[0]) ? [t[0], "CENTER"] : t.length === 2 && fe.includes(t[0]) && lo.includes(t[1]) ? t : [Xt, void 0];
}, Wo = (e, t, o, r, n) => {
if (o === "OVER" || o === "SCREEN")
return o;
const s = e.x + e.width, i = e.y + e.height, a = e.y - t.height - r >= 0, f = n.height - (i + t.height) - r >= 0, b = e.x - t.width - r >= 0, m = n.width - (s + t.width) - r >= 0;
const s = e.x + e.width, i = e.y + e.height, a = e.y - t.height - r >= 0, f = n.height - (i + t.height) - r >= 0, _ = e.x - t.width - r >= 0, d = n.width - (s + t.width) - r >= 0;
if (o === "BOTTOM" && f)
return "BOTTOM";
if (o === "LEFT" && b)
if (o === "LEFT" && _)
return "LEFT";
if (o === "TOP" && a)
return "TOP";
if (o === "RIGHT" && m)
if (o === "RIGHT" && d)
return "RIGHT";
const u = n.width * _e, $ = n.height * _e;
return e.y < $ && f ? "BOTTOM" : n.width - s < u && b ? "LEFT" : n.height - i < $ && a ? "TOP" : e.x < u && m ? "RIGHT" : f ? "BOTTOM" : b ? "LEFT" : a ? "TOP" : m ? "RIGHT" : "SCREEN";
const h = n.width * me, b = n.height * me;
return e.y < b && f ? "BOTTOM" : n.width - s < h && _ ? "LEFT" : n.height - i < b && a ? "TOP" : e.x < h && d ? "RIGHT" : f ? "BOTTOM" : _ ? "LEFT" : a ? "TOP" : d ? "RIGHT" : "SCREEN";
}, Jt = {
...io,
visibility: "hidden"
}, Ho = (e, t, o, r) => e >= o && t <= r, me = (e = "CENTER", t, o, r, n, s) => {
}, Ho = (e, t, o, r) => e >= o && t <= r, ve = (e = "CENTER", t, o, r, n, s) => {
if (!r)

@@ -456,9 +456,9 @@ return { adjustAlignment: "CENTER", value: 0 };

END: o - r + s.borderWidth + s.padding
}, l = (f, w, b, h) => {
if (Ho(f, f + r, b, h))
}, l = (f, w, _, $) => {
if (Ho(f, f + r, _, $))
return f;
const m = w.shift();
return m ? l(m, w, b, h) : f;
}, a = l(i[e], Object.values(i), 0, n), c = oo(i, a);
return { adjustAlignment: c, value: i[c] };
const d = w.shift();
return d ? l(d, w, _, $) : f;
}, a = l(i[e], Object.values(i), 0, n), p = oo(i, a);
return { adjustAlignment: p, value: i[p] };
}, Vo = (e, t, o, r, n, s, i) => {

@@ -469,11 +469,11 @@ const l = n + s.padding + s.borderWidth, a = {

};
let c, f, w;
if (!o || o === lt || e == "SCREEN")
let p, f, w;
if (!o || o === at || e == "SCREEN")
f = (i.height - r.height) / 2, w = (i.width - r.width) / 2;
else {
const b = o.x + o.width, h = o.y + o.height, m = () => {
const v = me(
const _ = o.x + o.width, $ = o.y + o.height, d = () => {
const g = ve(
t,
o.x,
b,
_,
r.width,

@@ -483,8 +483,8 @@ i.width,

);
w = v.value, c = v.adjustAlignment;
}, u = () => {
const v = me(
w = g.value, p = g.adjustAlignment;
}, h = () => {
const g = ve(
t,
o.y,
h,
$,
r.height,

@@ -494,4 +494,4 @@ i.height,

);
f = v.value, c = v.adjustAlignment;
}, $ = i.height - r.height, C = i.width - r.width;
f = g.value, p = g.adjustAlignment;
}, b = i.height - r.height, T = i.width - r.width;
switch (e) {

@@ -503,15 +503,15 @@ case "OVER": {

case "TOP": {
f = At(o.y - r.height - l, 0, $), m();
f = At(o.y - r.height - l, 0, b), d();
break;
}
case "BOTTOM": {
f = At(h + l, n, $), m();
f = At($ + l, n, b), d();
break;
}
case "LEFT": {
w = At(o.x - r.width - l, 0, C), u();
w = At(o.x - r.width - l, 0, T), h();
break;
}
case "RIGHT": {
w = At(b + l, n, C), u();
w = At(_ + l, n, T), h();
break;

@@ -521,32 +521,32 @@ }

}
return a.x = ce(w), a.y = ce(f), { style: a, alignment: c || "CENTER" };
return a.x = pe(w), a.y = pe(f), { style: a, alignment: p || "CENTER" };
}, Ro = () => {
const e = F(oe), t = F(Ye), o = F(Bt), r = F(Dt), n = Ke(), s = H(Oo());
return E([e], ([i], l) => {
const e = B(oe), t = B(je), o = B(Bt), r = B(Dt), n = ie(), s = R(Oo());
return M([e], ([i], l) => {
if (!i)
return;
const a = H(n), c = a.offset, f = ze(a.position), w = H(t), b = H(i), { step: h } = H(r), m = h == null ? void 0 : h.id;
const a = R(n), p = a.offset, f = ze(a.position), w = R(t), _ = R(i), { step: $ } = R(r), d = $ == null ? void 0 : $.id;
if (w.width === 0 || w.height === 0)
return;
const u = f[0], $ = Zt(o.window || window), C = b === lt ? "SCREEN" : Wo(
b,
const h = f[0], b = Zt(o.window || window), T = _ === at ? "SCREEN" : Wo(
_,
w,
u,
c + s.padding + s.borderWidth,
$
), { style: v, alignment: T } = Vo(
C,
h,
p + s.padding + s.borderWidth,
b
), { style: g, alignment: C } = Vo(
T,
f[1],
b,
_,
w,
c,
p,
{ padding: s.padding, borderWidth: s.borderWidth },
$
b
);
l({
orientation: C,
alignment: T,
stepId: m,
stepOrientation: u,
style: v
orientation: T,
alignment: C,
stepId: d,
stepOrientation: h,
style: g
});

@@ -559,31 +559,32 @@ });

function Bo(e) {
let t, o, r, n, s, i, l, a, c, f;
let t, o, r, n, s, i, l, a, p, f, w;
o = new Ao({});
var w = (
var _ = (
/*$popoverComponent$*/
e[7]
e[8]
);
function b(h, m) {
function $(d, h) {
return {};
}
return w && (s = fe(w, b()), s.$on(
return _ && (s = he(_, $()), s.$on(
"close",
/*onClose*/
e[15]
e[17]
), s.$on(
"previous",
/*onPrevious*/
e[16]
e[18]
), s.$on(
"done",
/*onDone*/
e[17]
e[19]
), s.$on(
"next",
/*onNext*/
e[18]
e[20]
)), {
c() {
t = Z("div"), bt(o.$$.fragment), r = et(), n = Z("div"), s && bt(s.$$.fragment), P(n, "class", i = "thisway-popover__container " + /*$className*/
e[5]), P(t, "class", "thisway"), G(
t = Q("div"), bt(o.$$.fragment), r = ot(), n = Q("div"), s && bt(s.$$.fragment), I(n, "class", i = "thisway-popover__container " + /*$popoverClassName$*/
e[6]), I(t, "class", a = "thisway " + /*$className$*/
e[2]), G(
t,

@@ -597,3 +598,3 @@ "position",

/*$step$*/
e[2] ? "block" : "none"
e[3] ? "block" : "none"
), G(

@@ -603,3 +604,3 @@ t,

/*$zIndex$*/
e[3]
e[4]
), G(

@@ -609,3 +610,3 @@ t,

/*$theme$*/
e[4].primaryColor
e[5].primaryColor
), G(

@@ -615,3 +616,3 @@ t,

/*$theme$*/
e[4].textColor
e[5].textColor
), G(

@@ -621,7 +622,7 @@ t,

/*$theme$*/
e[4].descColor
e[5].descColor
);
},
m(h, m) {
D(h, t, m), $t(o, t, null), U(t, r), U(t, n), s && $t(s, n, null), e[19](n), a = !0, c || (f = [
m(d, h) {
Y(d, t, h), $t(o, t, null), K(t, r), K(t, n), s && $t(s, n, null), e[21](n), p = !0, f || (w = [
Ot(

@@ -631,49 +632,51 @@ window,

/*handleKeydown*/
e[14]
e[16]
),
Fe(l = qe.call(
Be(l = qe.call(
null,
n,
/*$popoverStyle$*/
e[6]
e[7]
))
], c = !0);
], f = !0);
},
p(h, [m]) {
if (m & /*$popoverComponent$*/
128 && w !== (w = /*$popoverComponent$*/
h[7])) {
p(d, [h]) {
if (h & /*$popoverComponent$*/
256 && _ !== (_ = /*$popoverComponent$*/
d[8])) {
if (s) {
st();
const u = s;
A(u.$$.fragment, 1, 0, () => {
Ct(u, 1);
const b = s;
W(b.$$.fragment, 1, 0, () => {
Ct(b, 1);
}), nt();
}
w ? (s = fe(w, b()), s.$on(
_ ? (s = he(_, $()), s.$on(
"close",
/*onClose*/
h[15]
d[17]
), s.$on(
"previous",
/*onPrevious*/
h[16]
d[18]
), s.$on(
"done",
/*onDone*/
h[17]
d[19]
), s.$on(
"next",
/*onNext*/
h[18]
d[20]
), bt(s.$$.fragment), S(s.$$.fragment, 1), $t(s, n, null)) : s = null;
}
(!a || m & /*$className*/
32 && i !== (i = "thisway-popover__container " + /*$className*/
h[5])) && P(n, "class", i), l && Be(l.update) && m & /*$popoverStyle$*/
64 && l.update.call(
(!p || h & /*$popoverClassName$*/
64 && i !== (i = "thisway-popover__container " + /*$popoverClassName$*/
d[6])) && I(n, "class", i), l && De(l.update) && h & /*$popoverStyle$*/
128 && l.update.call(
null,
/*$popoverStyle$*/
h[6]
), m & /*position*/
d[7]
), (!p || h & /*$className$*/
4 && a !== (a = "thisway " + /*$className$*/
d[2])) && I(t, "class", a), h & /*position*/
1 && G(

@@ -683,43 +686,43 @@ t,

/*position*/
h[0]
), m & /*$step$*/
4 && G(
d[0]
), h & /*$step$*/
8 && G(
t,
"display",
/*$step$*/
h[2] ? "block" : "none"
), m & /*$zIndex$*/
8 && G(
d[3] ? "block" : "none"
), h & /*$zIndex$*/
16 && G(
t,
"z-index",
/*$zIndex$*/
h[3]
), m & /*$theme$*/
16 && G(
d[4]
), h & /*$theme$*/
32 && G(
t,
"--thisway-color-primary",
/*$theme$*/
h[4].primaryColor
), m & /*$theme$*/
16 && G(
d[5].primaryColor
), h & /*$theme$*/
32 && G(
t,
"--thisway-color-text",
/*$theme$*/
h[4].textColor
), m & /*$theme$*/
16 && G(
d[5].textColor
), h & /*$theme$*/
32 && G(
t,
"--thisway-color-desc",
/*$theme$*/
h[4].descColor
d[5].descColor
);
},
i(h) {
a || (S(o.$$.fragment, h), s && S(s.$$.fragment, h), a = !0);
i(d) {
p || (S(o.$$.fragment, d), s && S(s.$$.fragment, d), p = !0);
},
o(h) {
A(o.$$.fragment, h), s && A(s.$$.fragment, h), a = !1;
o(d) {
W(o.$$.fragment, d), s && W(s.$$.fragment, d), p = !1;
},
d(h) {
h && Y(t), Ct(o), s && Ct(s), e[19](null), c = !1, ho(f);
d(d) {
d && j(t), Ct(o), s && Ct(s), e[21](null), f = !1, ho(w);
}

@@ -729,72 +732,74 @@ };

function Do(e, t, o) {
let r, n, s, i, l, a, c, { position: f = "fixed" } = t;
const w = Po();
L(e, w, (d) => o(2, r = d));
const b = F(ee), h = F(re), m = F(Bt), u = E([w, b], ([d, B]) => {
if (d)
return m.getPopoverComponent(d, B);
let r, n, s, i, l, a, p, f, { position: w = "fixed" } = t;
const _ = Po();
L(e, _, (y) => o(3, n = y));
const $ = B(ee), d = B(re), h = B(Bt), b = ie(), T = M([_, $], ([y, P]) => {
if (y)
return h.getPopoverComponent(y, P);
});
L(e, u, (d) => o(7, a = d));
const $ = j(b, "zIndex", 1e4);
L(e, $, (d) => o(3, n = d));
const C = j(b, "className", "");
L(e, C, (d) => o(5, i = d));
const v = Ro();
bo(je, v);
const T = j(v, "style");
let k;
const V = E(
T,
(d, B) => {
if (!d) {
B(Jt);
L(e, T, (y) => o(8, p = y));
const g = D($, "zIndex", 1e4);
L(e, g, (y) => o(4, s = y));
const C = D($, "className", "");
L(e, C, (y) => o(2, r = y));
const k = D(b, "className", "");
L(e, k, (y) => o(6, l = y));
const H = Ro();
bo(Ge, H);
const x = D(H, "style");
let V;
const F = M(
x,
(y, P) => {
if (!y) {
P(Jt);
return;
}
const K = { x: d.x, y: d.y };
if (!k) {
k = Qt(K, { duration: 300, easing: te }), B(d);
const E = { x: y.x, y: y.y };
if (!V) {
V = Qt(E, { duration: 300, easing: te }), P(y);
return;
}
const X = k.subscribe(({ x: M, y: W }) => {
B({ ...d, x: M, y: W });
const X = V.subscribe(({ x: q, y: it }) => {
P({ ...y, x: q, y: it });
});
return k.set(K), X;
return V.set(E), X;
},
Jt
), x = E(V, ko);
L(e, x, (d) => o(6, l = d));
const R = Ue();
L(e, R, (d) => o(4, s = d));
const O = F(Pt), I = (d) => {
!O.isActive() || H(b).keyboardControl === !1 || d.key !== "Escape" && (d.key === "ArrowRight" ? O.goNextStep() : d.key === "ArrowLeft" && O.goPrevStep());
}, y = () => O.onClose(), p = () => O.goPrevStep(), N = () => {
m.onDone ? m.onDone() : O.onClose();
}, J = async () => {
var K, X;
const d = O.getNextStepId();
if (d === void 0)
), O = M(F, ko);
L(e, O, (y) => o(7, a = y));
const m = Ue();
L(e, m, (y) => o(5, i = y));
const c = B(Pt), N = (y) => {
!c.isActive() || R($).keyboardControl === !1 || y.key !== "Escape" && (y.key === "ArrowRight" ? c.goNextStep() : y.key === "ArrowLeft" && c.goPrevStep());
}, tt = () => c.onClose(), u = () => c.goPrevStep(), A = () => {
h.onDone ? h.onDone() : c.onClose();
}, U = async () => {
var E, X;
const y = c.getNextStepId();
if (y === void 0)
return;
const B = (K = O.getActiveStep().step) == null ? void 0 : K.id;
if (m.beforeStepChange) {
const M = new AbortController();
if (await m.beforeStepChange(d, B, M), M.signal.aborted || ((X = O.getActiveStep().step) == null ? void 0 : X.id) !== B)
const P = (E = c.getActiveStep().step) == null ? void 0 : E.id;
if (h.beforeStepChange) {
const q = new AbortController();
if (await h.beforeStepChange(y, P, q), q.signal.aborted || ((X = c.getActiveStep().step) == null ? void 0 : X.id) !== P)
return;
}
O.goNextStep();
c.goNextStep();
};
to(() => {
h.set(c);
}), Ae(() => {
h.set(void 0);
d.set(f);
}), We(() => {
d.set(void 0);
});
function _(d) {
uo[d ? "unshift" : "push"](() => {
c = d, o(1, c);
function z(y) {
uo[y ? "unshift" : "push"](() => {
f = y, o(1, f);
});
}
return e.$$set = (d) => {
"position" in d && o(0, f = d.position);
return e.$$set = (y) => {
"position" in y && o(0, w = y.position);
}, [
w,
f,
c,
r,

@@ -806,14 +811,16 @@ n,

a,
w,
u,
$,
p,
_,
T,
g,
C,
x,
R,
I,
y,
p,
k,
O,
m,
N,
J,
_
tt,
u,
A,
U,
z
];

@@ -826,3 +833,3 @@ }

}
const ge = (e) => typeof e == "object" && e != null && e.nodeType === 1, ve = (e, t) => t && e === "hidden" ? !1 : e !== "visible" && e !== "clip", jo = (e) => {
const ge = (e) => typeof e == "object" && e != null && e.nodeType === 1, ye = (e, t) => t && e === "hidden" ? !1 : e !== "visible" && e !== "clip", jo = (e) => {
if (!e.ownerDocument || !e.ownerDocument.defaultView)

@@ -841,3 +848,3 @@ return null;

const o = getComputedStyle(e, null);
return ve(o.overflowY, t) || ve(o.overflowX, t) || Go(e);
return ye(o.overflowY, t) || ye(o.overflowX, t) || Go(e);
}

@@ -857,115 +864,115 @@ return !1;

}, Uo = (e, t) => {
var J, _, d, B, K, X;
var tt, u, A, U, z, y;
if (typeof document > "u")
return [];
const { scrollMode: o, block: r, inline: n, boundary: s, skipOverflowHiddenElements: i } = t, l = typeof s == "function" ? s : (M) => M !== s;
const { scrollMode: o, block: r, inline: n, boundary: s, skipOverflowHiddenElements: i } = t, l = typeof s == "function" ? s : (P) => P !== s;
if (!ge(e))
throw new TypeError("Invalid target");
const a = document.scrollingElement || document.documentElement, c = [];
const a = document.scrollingElement || document.documentElement, p = [];
let f = e;
for (; ge(f) && l(f); ) {
if (f = Xo(f), f === a) {
c.push(f);
p.push(f);
break;
}
f != null && f === document.body && Kt(f) && !Kt(document.documentElement) || f != null && Kt(f, i) && c.push(f);
f != null && f === document.body && Kt(f) && !Kt(document.documentElement) || f != null && Kt(f, i) && p.push(f);
}
const w = ((J = window.visualViewport) == null ? void 0 : J.width) ?? innerWidth, b = ((_ = window.visualViewport) == null ? void 0 : _.height) ?? innerHeight, { scrollX: h, scrollY: m } = window, u = e.getBoundingClientRect(), $ = u.top - (((d = t.offset) == null ? void 0 : d.top) ?? 0), C = u.bottom + (((B = t.offset) == null ? void 0 : B.bottom) ?? 0), v = u.left - (((K = t.offset) == null ? void 0 : K.left) ?? 0), T = u.right + (((X = t.offset) == null ? void 0 : X.right) ?? 0), k = C - $, V = T - v, { top: x, right: R, bottom: O, left: I } = Ko(e);
let y = r === "start" || r === "nearest" ? $ - x : r === "end" ? C + O : $ + k / 2 - x + O, p = n === "center" ? v + V / 2 - I + R : n === "end" ? T + R : v - I;
const w = ((tt = window.visualViewport) == null ? void 0 : tt.width) ?? innerWidth, _ = ((u = window.visualViewport) == null ? void 0 : u.height) ?? innerHeight, { scrollX: $, scrollY: d } = window, h = e.getBoundingClientRect(), b = h.top - (((A = t.offset) == null ? void 0 : A.top) ?? 0), T = h.bottom + (((U = t.offset) == null ? void 0 : U.bottom) ?? 0), g = h.left - (((z = t.offset) == null ? void 0 : z.left) ?? 0), C = h.right + (((y = t.offset) == null ? void 0 : y.right) ?? 0), k = T - b, H = C - g, { top: x, right: V, bottom: F, left: O } = Ko(e);
let m = r === "start" || r === "nearest" ? b - x : r === "end" ? T + F : b + k / 2 - x + F, c = n === "center" ? g + H / 2 - O + V : n === "end" ? C + V : g - O;
const N = [];
for (let M = 0; M < c.length; M++) {
const W = c[M], { height: Q, width: ot, top: ct, right: vt, bottom: g, left: tt } = W.getBoundingClientRect();
if (o === "if-needed" && $ >= 0 && v >= 0 && C <= b && T <= w && $ >= ct && C <= g && v >= tt && T <= vt)
for (let P = 0; P < p.length; P++) {
const E = p[P], { height: X, width: q, top: it, right: gt, bottom: v, left: et } = E.getBoundingClientRect();
if (o === "if-needed" && b >= 0 && g >= 0 && T <= _ && C <= w && b >= it && T <= v && g >= et && C <= gt)
return N;
const pt = getComputedStyle(W), ft = parseInt(pt.borderLeftWidth, 10), at = parseInt(pt.borderTopWidth, 10), ht = parseInt(pt.borderRightWidth, 10), Et = parseInt(pt.borderBottomWidth, 10);
let q = 0, z = 0;
const Mt = "offsetWidth" in W ? W.offsetWidth - W.clientWidth - ft - ht : 0, Lt = "offsetHeight" in W ? W.offsetHeight - W.clientHeight - at - Et : 0, jt = "offsetWidth" in W ? W.offsetWidth === 0 ? 0 : ot / W.offsetWidth : 0, Gt = "offsetHeight" in W ? W.offsetHeight === 0 ? 0 : Q / W.offsetHeight : 0;
if (a === W)
r === "start" ? q = y : r === "end" ? q = y - b : r === "nearest" ? q = Ht(
m,
m + b,
b,
at,
const pt = getComputedStyle(E), ft = parseInt(pt.borderLeftWidth, 10), ct = parseInt(pt.borderTopWidth, 10), ht = parseInt(pt.borderRightWidth, 10), Et = parseInt(pt.borderBottomWidth, 10);
let Z = 0, J = 0;
const Mt = "offsetWidth" in E ? E.offsetWidth - E.clientWidth - ft - ht : 0, Lt = "offsetHeight" in E ? E.offsetHeight - E.clientHeight - ct - Et : 0, jt = "offsetWidth" in E ? E.offsetWidth === 0 ? 0 : q / E.offsetWidth : 0, Gt = "offsetHeight" in E ? E.offsetHeight === 0 ? 0 : X / E.offsetHeight : 0;
if (a === E)
r === "start" ? Z = m : r === "end" ? Z = m - _ : r === "nearest" ? Z = Ht(
d,
d + _,
_,
ct,
Et,
m + y,
m + y + k,
d + m,
d + m + k,
k
) : q = y - b / 2, n === "start" ? z = p : n === "center" ? z = p - w / 2 : n === "end" ? z = p - w : z = Ht(
h,
h + w,
) : Z = m - _ / 2, n === "start" ? J = c : n === "center" ? J = c - w / 2 : n === "end" ? J = c - w : J = Ht(
$,
$ + w,
w,
ft,
ht,
h + p,
h + p + V,
V
), q = Math.max(0, q + m), z = Math.max(0, z + h);
$ + c,
$ + c + H,
H
), Z = Math.max(0, Z + d), J = Math.max(0, J + $);
else {
r === "start" ? q = y - ct - at : r === "end" ? q = y - g + Et + Lt : r === "nearest" ? q = Ht(
r === "start" ? Z = m - it - ct : r === "end" ? Z = m - v + Et + Lt : r === "nearest" ? Z = Ht(
it,
v,
X,
ct,
g,
Q,
at,
Et + Lt,
y,
y + k,
m,
m + k,
k
) : q = y - (ct + Q / 2) + Lt / 2, n === "start" ? z = p - tt - ft : n === "center" ? z = p - (tt + ot / 2) + Mt / 2 : n === "end" ? z = p - vt + ht + Mt : z = Ht(
tt,
vt,
ot,
) : Z = m - (it + X / 2) + Lt / 2, n === "start" ? J = c - et - ft : n === "center" ? J = c - (et + q / 2) + Mt / 2 : n === "end" ? J = c - gt + ht + Mt : J = Ht(
et,
gt,
q,
ft,
ht + Mt,
p,
p + V,
V
c,
c + H,
H
);
const { scrollLeft: ie, scrollTop: le } = W;
q = Gt === 0 ? 0 : Math.max(
const { scrollLeft: le, scrollTop: ae } = E;
Z = Gt === 0 ? 0 : Math.max(
0,
Math.min(le + q / Gt, W.scrollHeight - Q / Gt + Lt)
), z = jt === 0 ? 0 : Math.max(
Math.min(ae + Z / Gt, E.scrollHeight - X / Gt + Lt)
), J = jt === 0 ? 0 : Math.max(
0,
Math.min(ie + z / jt, W.scrollWidth - ot / jt + Mt)
), y += le - q, p += ie - z;
Math.min(le + J / jt, E.scrollWidth - q / jt + Mt)
), m += ae - Z, c += le - J;
}
N.push({ el: W, top: q, left: z });
N.push({ el: E, top: Z, left: J });
}
return N;
}, qo = (e, t, o) => {
const r = o.popover, n = o.highlight, s = j(r, "position");
return E([e, t, s], ([{ element: i, step: l }, a, c], f) => {
if (!i || i === lt) {
const r = o.popover, n = o.highlight, s = D(r, "position");
return M([e, t, s], ([{ element: i, step: l }, a, p], f) => {
if (!i || i === at) {
f({ status: "STOP" });
return;
}
const w = H(r), b = ze(c), h = b[0], m = b[1], u = H(n), $ = (w.offset < 10 ? 10 : w.offset) + u.padding + u.borderWidth, C = h ? ao[h] : "nearest", v = m ? m.toLocaleLowerCase() : "nearest";
let T = "nearest", k = "nearest";
const V = (l == null ? void 0 : l.scrollOffset) || {}, x = {
left: $ + (V.left || 0),
right: $ + (V.right || 0),
top: $ + (V.top || 0),
bottom: $ + (V.bottom || 0)
const w = R(r), _ = ze(p), $ = _[0], d = _[1], h = R(n), b = (w.offset < 10 ? 10 : w.offset) + h.padding + h.borderWidth, T = $ ? ao[$] : "nearest", g = d ? d.toLocaleLowerCase() : "nearest";
let C = "nearest", k = "nearest";
const H = (l == null ? void 0 : l.scrollOffset) || {}, x = {
left: b + (H.left || 0),
right: b + (H.right || 0),
top: b + (H.top || 0),
bottom: b + (H.bottom || 0)
};
h && h !== "OVER" && (co.includes(h) ? (T = C, k = v, x[h.toLocaleLowerCase()] += (a == null ? void 0 : a.height) || 0) : (T = v, k = C, x[h.toLocaleLowerCase()] += (a == null ? void 0 : a.width) || 0));
const R = Uo(i, {
$ && $ !== "OVER" && (co.includes($) ? (C = T, k = g, x[$.toLocaleLowerCase()] += (a == null ? void 0 : a.height) || 0) : (C = g, k = T, x[$.toLocaleLowerCase()] += (a == null ? void 0 : a.width) || 0));
const V = Uo(i, {
scrollMode: "if-needed",
block: T,
block: C,
inline: k,
offset: x
}), O = [], I = [];
if (R.length > 0) {
}), F = [], O = [];
if (V.length > 0) {
f({ status: "SCROLLING" });
let y = -1;
for (const { el: p, top: N, left: J } of R) {
if (y++, p.scrollTop == N && p.scrollLeft == J)
let m = -1;
for (const { el: c, top: N, left: tt } of V) {
if (m++, c.scrollTop == N && c.scrollLeft == tt)
continue;
const _ = Math.max(Math.abs(N - p.scrollTop), Math.abs(J - p.scrollLeft));
I[y] = Qt(
const u = Math.max(Math.abs(N - c.scrollTop), Math.abs(tt - c.scrollLeft));
O[m] = Qt(
{
top: p.scrollTop,
left: p.scrollTop
top: c.scrollTop,
left: c.scrollTop
},
{
duration: Math.min(_, 200),
duration: Math.min(u, 200),
// 300ms maximum

@@ -975,13 +982,13 @@ easing: te

);
const d = I[y].subscribe(({ top: B, left: K }) => {
p.scrollTop = B, p.scrollLeft = K, K == J && B === N && f({ status: "STOP" });
const A = O[m].subscribe(({ top: U, left: z }) => {
c.scrollTop = U, c.scrollLeft = z, z == tt && U === N && f({ status: "STOP" });
});
O.push(d), I[y].set({ top: N, left: J });
F.push(A), O[m].set({ top: N, left: tt });
}
I.length === 0 && f({ status: "STOP" });
O.length === 0 && f({ status: "STOP" });
} else
f({ status: "STOP" });
return () => {
for (const y of O)
y();
for (const m of F)
m();
};

@@ -991,3 +998,3 @@ });

let r;
return E(
return M(
e.activeStep$,

@@ -1000,3 +1007,3 @@ (n, s) => {

i.signal.aborted || (o.set(!0), s({
element: l ?? lt,
element: l ?? at,
step: n

@@ -1026,40 +1033,40 @@ }), t.afterStepChanged && t.afterStepChanged(n.id, r == null ? void 0 : r.id));

let n;
return E(e, (s, i) => {
const { element: l, step: a } = H(t);
return M(e, (s, i) => {
const { element: l, step: a } = R(t);
if (!l)
return i(l), ne;
if (l === lt || H(o.popover).position === "SCREEN") {
const u = Ut(n || window, "resize", () => {
i(Wt(lt));
if (l === at || R(o.popover).position === "SCREEN") {
const h = Ut(n || window, "resize", () => {
i(Wt(at));
});
return i(Wt(lt)), u;
return i(Wt(at)), h;
}
const c = a != null && a.onlyHighlightChildren ? Array.from(l.children) : [l], f = () => {
let u = Number.POSITIVE_INFINITY, $ = Number.POSITIVE_INFINITY, C = Number.NEGATIVE_INFINITY, v = Number.NEGATIVE_INFINITY;
for (const T of c) {
const { x: k, y: V, right: x, bottom: R } = T.getBoundingClientRect();
k < u && (u = k), V < $ && ($ = V), x > C && (C = x), R > v && (v = R);
const p = a != null && a.onlyHighlightChildren ? Array.from(l.children) : [l], f = () => {
let h = Number.POSITIVE_INFINITY, b = Number.POSITIVE_INFINITY, T = Number.NEGATIVE_INFINITY, g = Number.NEGATIVE_INFINITY;
for (const C of p) {
const { x: k, y: H, right: x, bottom: V } = C.getBoundingClientRect();
k < h && (h = k), H < b && (b = H), x > T && (T = x), V > g && (g = V);
}
return {
x: u,
y: $,
width: C - u,
height: v - $
x: h,
y: b,
width: T - h,
height: g - b
};
}, w = ro(() => {
if (H(r) && s.status === "STOP") {
const u = f();
u.width === 0 || u.height === 0 ? i(Wt(lt)) : i(Wt(u));
if (R(r) && s.status === "STOP") {
const h = f();
h.width === 0 || h.height === 0 ? i(Wt(at)) : i(Wt(h));
}
});
n || (n = l.ownerDocument.defaultView);
const b = Ut(n || window, "resize", w), h = Ut(n || window, "scroll", w), m = c.map((u) => We(u, w));
const _ = Ut(n || window, "resize", w), $ = Ut(n || window, "scroll", w), d = p.map((h) => He(h, w));
return () => {
b(), h();
for (const u of m)
u();
_(), $();
for (const h of d)
h();
};
});
}
const Jo = (e) => E(e, (t, o) => t ? We(t, () => {
const Jo = (e) => M(e, (t, o) => t ? He(t, () => {
const r = t.clientWidth, n = t.clientHeight;

@@ -1078,21 +1085,21 @@ o({

this.delegate = r;
const i = r.container ?? document.body, l = [], a = Tt(!0), c = zo(o, r, a), f = j(c, "step"), w = (T, k) => {
const V = j(s, T), x = j(f, T);
return E(
[V, x],
(R) => So(k, ...R)
const i = r.container ?? document.body, l = [], a = Tt(!0), p = zo(o, r, a), f = D(p, "step"), w = (C, k) => {
const H = D(s, C), x = D(f, C);
return M(
[H, x],
(V) => So(k, ...V)
);
}, b = {
}, _ = {
popover: w("popover", po),
highlight: w("highlight", fo),
theme: E(w("theme", {}), No)
}, h = Tt(void 0), m = Jo(h), u = qo(c, m, b), $ = Zo(
u,
c,
b,
theme: M(w("theme", {}), No)
}, $ = Tt(void 0), d = Jo($), h = qo(p, d, _), b = Zo(
h,
p,
_,
a
), C = r.getTotalCount(o), v = De(n);
v.set(Pt, this).set(oe, $).set(ee, s).set(re, h).set(Ye, m).set(se, C).set(Bt, r).set(Dt, c).set(Yt, b), this.subscriptions = l, this.view = new Yo({
), T = r.getTotalCount(o), g = Ye(n);
g.set(Pt, this).set(oe, b).set(ee, s).set(re, $).set(je, d).set(se, T).set(Bt, r).set(Dt, p).set(Yt, _), this.subscriptions = l, this.view = new Yo({
target: i,
context: v,
context: g,
props: {

@@ -1120,9 +1127,9 @@ position: i.tagName.toLowerCase() === "body" ? "fixed" : "absolute"

c() {
t = Z("div"), o = Nt(
t = Q("div"), o = Nt(
/*$progress$*/
e[0]
), P(t, "class", "thisway-progress");
), I(t, "class", "thisway-progress");
},
m(r, n) {
D(r, t, n), U(t, o);
Y(r, t, n), K(t, o);
},

@@ -1140,3 +1147,3 @@ p(r, [n]) {

d(r) {
r && Y(t);
r && j(t);
}

@@ -1147,3 +1154,3 @@ };

let r;
const n = F(se), s = yo(), i = E([s, n], ([l, a]) => a > 1 ? `${l + 1}/${a}` : "");
const n = B(se), s = yo(), i = M([s, n], ([l, a]) => a > 1 ? `${l + 1}/${a}` : "");
return L(e, i, (l) => o(0, r = l)), [r, i];

@@ -1159,25 +1166,25 @@ }

}
const sr = (e) => ({}), ye = (e) => ({}), nr = (e) => ({}), be = (e) => ({}), ir = (e) => ({}), $e = (e) => ({}), lr = (e) => ({}), Ce = (e) => ({}), ar = (e) => ({}), Te = (e) => ({});
function ke(e) {
let t, o, r, n, s, i, l, a, c, f, w, b, h, m, u, $, C = (
const sr = (e) => ({}), be = (e) => ({}), nr = (e) => ({}), $e = (e) => ({}), ir = (e) => ({}), Ce = (e) => ({}), lr = (e) => ({}), Te = (e) => ({}), ar = (e) => ({}), ke = (e) => ({});
function xe(e) {
let t, o, r, n, s, i, l, a, p, f, w, _, $, d, h, b, T = (
/*$showCloseButton$*/
e[6] && xe(e)
), v = (
e[6] && Se(e)
), g = (
/*$$slots*/
(e[28].title || /*$title$*/
e[1]) && Se(e)
), T = (
e[1]) && Oe(e)
), C = (
/*$$slots*/
(e[28].description || /*$description$*/
e[2]) && Oe(e)
e[2]) && Ne(e)
), k = (
/*$layout$*/
e[4] !== yt && /*$showProgress$*/
e[7] && Ne()
e[7] && Ie()
);
const V = (
const H = (
/*#slots*/
e[30].default
), x = wt(
V,
H,
e,

@@ -1187,24 +1194,24 @@ /*$$scope*/

null
), R = (
), V = (
/*#slots*/
e[30].footer
), O = wt(
R,
), F = wt(
V,
e,
/*$$scope*/
e[29],
$e
Ce
);
let I = (
let O = (
/*$layout$*/
e[4] === yt && /*$showProgress$*/
e[7] && Ie()
), y = (
e[7] && Pe()
), m = (
/*$showCtrlBtns$*/
e[8] && Pe(e)
e[8] && Ee(e)
);
return {
c() {
t = Z("div"), o = Z("div"), n = et(), C && C.c(), s = et(), v && v.c(), i = et(), T && T.c(), l = et(), k && k.c(), a = et(), x && x.c(), c = et(), f = Z("div"), O && O.c(), w = et(), I && I.c(), b = et(), h = Z("div"), m = et(), y && y.c(), P(o, "class", r = "thisway-popover__arrow " + /*$arrowClass$*/
e[5]), P(h, "class", "thisway-stretch"), P(f, "class", "thisway-popover-footer"), P(t, "class", u = "thisway-popover " + /*$popoverClass$*/
t = Q("div"), o = Q("div"), n = ot(), T && T.c(), s = ot(), g && g.c(), i = ot(), C && C.c(), l = ot(), k && k.c(), a = ot(), x && x.c(), p = ot(), f = Q("div"), F && F.c(), w = ot(), O && O.c(), _ = ot(), $ = Q("div"), d = ot(), m && m.c(), I(o, "class", r = "thisway-popover__arrow " + /*$arrowClass$*/
e[5]), I($, "class", "thisway-stretch"), I(f, "class", "thisway-popover-footer"), I(t, "class", h = "thisway-popover " + /*$popoverClass$*/
e[3] + " thisway-popover__" + /*$layout$*/

@@ -1214,35 +1221,35 @@ e[4] + " " + /*cssClassName*/

},
m(p, N) {
D(p, t, N), U(t, o), U(t, n), C && C.m(t, null), U(t, s), v && v.m(t, null), U(t, i), T && T.m(t, null), U(t, l), k && k.m(t, null), U(t, a), x && x.m(t, null), U(t, c), U(t, f), O && O.m(f, null), U(f, w), I && I.m(f, null), U(f, b), U(f, h), U(f, m), y && y.m(f, null), $ = !0;
m(c, N) {
Y(c, t, N), K(t, o), K(t, n), T && T.m(t, null), K(t, s), g && g.m(t, null), K(t, i), C && C.m(t, null), K(t, l), k && k.m(t, null), K(t, a), x && x.m(t, null), K(t, p), K(t, f), F && F.m(f, null), K(f, w), O && O.m(f, null), K(f, _), K(f, $), K(f, d), m && m.m(f, null), b = !0;
},
p(p, N) {
(!$ || N[0] & /*$arrowClass$*/
p(c, N) {
(!b || N[0] & /*$arrowClass$*/
32 && r !== (r = "thisway-popover__arrow " + /*$arrowClass$*/
p[5])) && P(o, "class", r), /*$showCloseButton$*/
p[6] ? C ? C.p(p, N) : (C = xe(p), C.c(), C.m(t, s)) : C && (C.d(1), C = null), /*$$slots*/
p[28].title || /*$title$*/
p[1] ? v ? (v.p(p, N), N[0] & /*$$slots, $title$*/
268435458 && S(v, 1)) : (v = Se(p), v.c(), S(v, 1), v.m(t, i)) : v && (st(), A(v, 1, 1, () => {
v = null;
c[5])) && I(o, "class", r), /*$showCloseButton$*/
c[6] ? T ? T.p(c, N) : (T = Se(c), T.c(), T.m(t, s)) : T && (T.d(1), T = null), /*$$slots*/
c[28].title || /*$title$*/
c[1] ? g ? (g.p(c, N), N[0] & /*$$slots, $title$*/
268435458 && S(g, 1)) : (g = Oe(c), g.c(), S(g, 1), g.m(t, i)) : g && (st(), W(g, 1, 1, () => {
g = null;
}), nt()), /*$$slots*/
p[28].description || /*$description$*/
p[2] ? T ? (T.p(p, N), N[0] & /*$$slots, $description$*/
268435460 && S(T, 1)) : (T = Oe(p), T.c(), S(T, 1), T.m(t, l)) : T && (st(), A(T, 1, 1, () => {
T = null;
c[28].description || /*$description$*/
c[2] ? C ? (C.p(c, N), N[0] & /*$$slots, $description$*/
268435460 && S(C, 1)) : (C = Ne(c), C.c(), S(C, 1), C.m(t, l)) : C && (st(), W(C, 1, 1, () => {
C = null;
}), nt()), /*$layout$*/
p[4] !== yt && /*$showProgress$*/
p[7] ? k ? N[0] & /*$layout$, $showProgress$*/
144 && S(k, 1) : (k = Ne(), k.c(), S(k, 1), k.m(t, a)) : k && (st(), A(k, 1, 1, () => {
c[4] !== yt && /*$showProgress$*/
c[7] ? k ? N[0] & /*$layout$, $showProgress$*/
144 && S(k, 1) : (k = Ie(), k.c(), S(k, 1), k.m(t, a)) : k && (st(), W(k, 1, 1, () => {
k = null;
}), nt()), x && x.p && (!$ || N[0] & /*$$scope*/
}), nt()), x && x.p && (!b || N[0] & /*$$scope*/
536870912) && _t(
x,
V,
p,
H,
c,
/*$$scope*/
p[29],
$ ? gt(
V,
c[29],
b ? vt(
H,
/*$$scope*/
p[29],
c[29],
N,

@@ -1252,16 +1259,16 @@ null

/*$$scope*/
p[29]
c[29]
),
null
), O && O.p && (!$ || N[0] & /*$$scope*/
), F && F.p && (!b || N[0] & /*$$scope*/
536870912) && _t(
O,
R,
p,
F,
V,
c,
/*$$scope*/
p[29],
$ ? gt(
R,
c[29],
b ? vt(
V,
/*$$scope*/
p[29],
c[29],
N,

@@ -1271,39 +1278,39 @@ ir

/*$$scope*/
p[29]
c[29]
),
$e
Ce
), /*$layout$*/
p[4] === yt && /*$showProgress$*/
p[7] ? I ? N[0] & /*$layout$, $showProgress$*/
144 && S(I, 1) : (I = Ie(), I.c(), S(I, 1), I.m(f, b)) : I && (st(), A(I, 1, 1, () => {
I = null;
c[4] === yt && /*$showProgress$*/
c[7] ? O ? N[0] & /*$layout$, $showProgress$*/
144 && S(O, 1) : (O = Pe(), O.c(), S(O, 1), O.m(f, _)) : O && (st(), W(O, 1, 1, () => {
O = null;
}), nt()), /*$showCtrlBtns$*/
p[8] ? y ? (y.p(p, N), N[0] & /*$showCtrlBtns$*/
256 && S(y, 1)) : (y = Pe(p), y.c(), S(y, 1), y.m(f, null)) : y && (st(), A(y, 1, 1, () => {
y = null;
}), nt()), (!$ || N[0] & /*$popoverClass$, $layout$, cssClassName*/
25 && u !== (u = "thisway-popover " + /*$popoverClass$*/
p[3] + " thisway-popover__" + /*$layout$*/
p[4] + " " + /*cssClassName*/
p[0])) && P(t, "class", u);
c[8] ? m ? (m.p(c, N), N[0] & /*$showCtrlBtns$*/
256 && S(m, 1)) : (m = Ee(c), m.c(), S(m, 1), m.m(f, null)) : m && (st(), W(m, 1, 1, () => {
m = null;
}), nt()), (!b || N[0] & /*$popoverClass$, $layout$, cssClassName*/
25 && h !== (h = "thisway-popover " + /*$popoverClass$*/
c[3] + " thisway-popover__" + /*$layout$*/
c[4] + " " + /*cssClassName*/
c[0])) && I(t, "class", h);
},
i(p) {
$ || (S(v), S(T), S(k), S(x, p), S(O, p), S(I), S(y), $ = !0);
i(c) {
b || (S(g), S(C), S(k), S(x, c), S(F, c), S(O), S(m), b = !0);
},
o(p) {
A(v), A(T), A(k), A(x, p), A(O, p), A(I), A(y), $ = !1;
o(c) {
W(g), W(C), W(k), W(x, c), W(F, c), W(O), W(m), b = !1;
},
d(p) {
p && Y(t), C && C.d(), v && v.d(), T && T.d(), k && k.d(), x && x.d(p), O && O.d(p), I && I.d(), y && y.d();
d(c) {
c && j(t), T && T.d(), g && g.d(), C && C.d(), k && k.d(), x && x.d(c), F && F.d(c), O && O.d(), m && m.d();
}
};
}
function xe(e) {
function Se(e) {
let t, o, r;
return {
c() {
t = Z("button"), t.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 10.586l-4.293-4.293a1 1 0 0 0-1.414 1.414L10.586 12l-4.293 4.293a1 1 0 1 0 1.414 1.414L12 13.414l4.293 4.293a1 1 0 1 0 1.414-1.414L13.414 12l4.293-4.293a1 1 0 0 0-1.414-1.414L12 10.586z"></path></svg>', P(t, "class", "thisway-popover-close");
t = Q("button"), t.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 10.586l-4.293-4.293a1 1 0 0 0-1.414 1.414L10.586 12l-4.293 4.293a1 1 0 1 0 1.414 1.414L12 13.414l4.293 4.293a1 1 0 1 0 1.414-1.414L13.414 12l4.293-4.293a1 1 0 0 0-1.414-1.414L12 10.586z"></path></svg>', I(t, "class", "thisway-popover-close");
},
m(n, s) {
D(n, t, s), o || (r = Ot(
Y(n, t, s), o || (r = Ot(
t,

@@ -1317,7 +1324,7 @@ "click",

d(n) {
n && Y(t), o = !1, r();
n && j(t), o = !1, r();
}
};
}
function Se(e) {
function Oe(e) {
let t, o;

@@ -1332,10 +1339,10 @@ const r = (

e[29],
Te
ke
), s = n || cr(e);
return {
c() {
t = Z("header"), s && s.c(), P(t, "class", "thisway-popover-title");
t = Q("header"), s && s.c(), I(t, "class", "thisway-popover-title");
},
m(i, l) {
D(i, t, l), s && s.m(t, null), o = !0;
Y(i, t, l), s && s.m(t, null), o = !0;
},

@@ -1350,3 +1357,3 @@ p(i, l) {

i[29],
o ? gt(
o ? vt(
r,

@@ -1361,3 +1368,3 @@ /*$$scope*/

),
Te
ke
) : s && s.p && (!o || l[0] & /*$title$*/

@@ -1370,6 +1377,6 @@ 2) && s.p(i, o ? l : [-1, -1]);

o(i) {
A(s, i), o = !1;
W(s, i), o = !1;
},
d(i) {
i && Y(t), s && s.d(i);
i && j(t), s && s.d(i);
}

@@ -1388,3 +1395,3 @@ };

m(o, r) {
D(o, t, r);
Y(o, t, r);
},

@@ -1400,7 +1407,7 @@ p(o, r) {

d(o) {
o && Y(t);
o && j(t);
}
};
}
function Oe(e) {
function Ne(e) {
let t, o;

@@ -1415,10 +1422,10 @@ const r = (

e[29],
Ce
Te
), s = n || pr(e);
return {
c() {
t = Z("div"), s && s.c(), P(t, "class", "thisway-popover-description");
t = Q("div"), s && s.c(), I(t, "class", "thisway-popover-description");
},
m(i, l) {
D(i, t, l), s && s.m(t, null), o = !0;
Y(i, t, l), s && s.m(t, null), o = !0;
},

@@ -1433,3 +1440,3 @@ p(i, l) {

i[29],
o ? gt(
o ? vt(
r,

@@ -1444,3 +1451,3 @@ /*$$scope*/

),
Ce
Te
) : s && s.p && (!o || l[0] & /*$description$*/

@@ -1453,6 +1460,6 @@ 4) && s.p(i, o ? l : [-1, -1]);

o(i) {
A(s, i), o = !1;
W(s, i), o = !1;
},
d(i) {
i && Y(t), s && s.d(i);
i && j(t), s && s.d(i);
}

@@ -1471,3 +1478,3 @@ };

m(o, r) {
D(o, t, r);
Y(o, t, r);
},

@@ -1483,7 +1490,7 @@ p(o, r) {

d(o) {
o && Y(t);
o && j(t);
}
};
}
function Ne(e) {
function Ie(e) {
let t, o;

@@ -1501,3 +1508,3 @@ return t = new Ze({}), {

o(r) {
A(t.$$.fragment, r), o = !1;
W(t.$$.fragment, r), o = !1;
},

@@ -1509,3 +1516,3 @@ d(r) {

}
function Ie(e) {
function Pe(e) {
let t, o;

@@ -1523,3 +1530,3 @@ return t = new Ze({}), {

o(r) {
A(t.$$.fragment, r), o = !1;
W(t.$$.fragment, r), o = !1;
},

@@ -1531,16 +1538,16 @@ d(r) {

}
function Pe(e) {
function Ee(e) {
let t, o, r, n = (
/*$previousButtonVisible$*/
e[9] && Ee(e)
e[9] && Me(e)
), s = (
/*$hasSteps$*/
e[11] && Me(e)
e[11] && Le(e)
);
return {
c() {
n && n.c(), t = et(), s && s.c(), o = Ft();
n && n.c(), t = ot(), s && s.c(), o = Ft();
},
m(i, l) {
n && n.m(i, l), D(i, t, l), s && s.m(i, l), D(i, o, l), r = !0;
n && n.m(i, l), Y(i, t, l), s && s.m(i, l), Y(i, o, l), r = !0;
},

@@ -1550,7 +1557,7 @@ p(i, l) {

i[9] ? n ? (n.p(i, l), l[0] & /*$previousButtonVisible$*/
512 && S(n, 1)) : (n = Ee(i), n.c(), S(n, 1), n.m(t.parentNode, t)) : n && (st(), A(n, 1, 1, () => {
512 && S(n, 1)) : (n = Me(i), n.c(), S(n, 1), n.m(t.parentNode, t)) : n && (st(), W(n, 1, 1, () => {
n = null;
}), nt()), /*$hasSteps$*/
i[11] ? s ? (s.p(i, l), l[0] & /*$hasSteps$*/
2048 && S(s, 1)) : (s = Me(i), s.c(), S(s, 1), s.m(o.parentNode, o)) : s && (st(), A(s, 1, 1, () => {
2048 && S(s, 1)) : (s = Le(i), s.c(), S(s, 1), s.m(o.parentNode, o)) : s && (st(), W(s, 1, 1, () => {
s = null;

@@ -1563,10 +1570,10 @@ }), nt());

o(i) {
A(n), A(s), r = !1;
W(n), W(s), r = !1;
},
d(i) {
i && (Y(t), Y(o)), n && n.d(i), s && s.d(i);
i && (j(t), j(o)), n && n.d(i), s && s.d(i);
}
};
}
function Ee(e) {
function Me(e) {
let t, o, r, n;

@@ -1581,10 +1588,10 @@ const s = (

e[29],
be
$e
), l = i || dr(e);
return {
c() {
t = Z("button"), l && l.c(), P(t, "class", "thisway-popover-prev");
t = Q("button"), l && l.c(), I(t, "class", "thisway-popover-prev");
},
m(a, c) {
D(a, t, c), l && l.m(t, null), o = !0, r || (n = Ot(
m(a, p) {
Y(a, t, p), l && l.m(t, null), o = !0, r || (n = Ot(
t,

@@ -1596,4 +1603,4 @@ "click",

},
p(a, c) {
i ? i.p && (!o || c[0] & /*$$scope*/
p(a, p) {
i ? i.p && (!o || p[0] & /*$$scope*/
536870912) && _t(

@@ -1605,7 +1612,7 @@ i,

a[29],
o ? gt(
o ? vt(
s,
/*$$scope*/
a[29],
c,
p,
nr

@@ -1616,5 +1623,5 @@ ) : mt(

),
be
) : l && l.p && (!o || c[0] & /*$previousText$, $layout$*/
1040) && l.p(a, o ? c : [-1, -1]);
$e
) : l && l.p && (!o || p[0] & /*$previousText$, $layout$*/
1040) && l.p(a, o ? p : [-1, -1]);
},

@@ -1625,6 +1632,6 @@ i(a) {

o(a) {
A(l, a), o = !1;
W(l, a), o = !1;
},
d(a) {
a && Y(t), l && l.d(a), r = !1, n();
a && j(t), l && l.d(a), r = !1, n();
}

@@ -1637,10 +1644,10 @@ };

c() {
t = Vt("svg"), o = Vt("path"), P(o, "d", "M19 12H6M12 5l-7 7 7 7"), G(t, "pointer-events", "none"), P(t, "width", "20"), P(t, "height", "14"), P(t, "xmlns", "http://www.w3.org/2000/svg"), P(t, "viewBox", "0 0 24 24"), P(t, "fill", "none"), P(t, "stroke", "currentColor"), P(t, "stroke-width", "2"), P(t, "stroke-linecap", "round"), P(t, "stroke-linejoin", "round");
t = Vt("svg"), o = Vt("path"), I(o, "d", "M19 12H6M12 5l-7 7 7 7"), G(t, "pointer-events", "none"), I(t, "width", "20"), I(t, "height", "14"), I(t, "xmlns", "http://www.w3.org/2000/svg"), I(t, "viewBox", "0 0 24 24"), I(t, "fill", "none"), I(t, "stroke", "currentColor"), I(t, "stroke-width", "2"), I(t, "stroke-linecap", "round"), I(t, "stroke-linejoin", "round");
},
m(r, n) {
D(r, t, n), U(t, o);
Y(r, t, n), K(t, o);
},
p: ut,
d(r) {
r && Y(t);
r && j(t);
}

@@ -1659,3 +1666,3 @@ };

m(o, r) {
D(o, t, r);
Y(o, t, r);
},

@@ -1671,3 +1678,3 @@ p(o, r) {

d(o) {
o && Y(t);
o && j(t);
}

@@ -1681,3 +1688,3 @@ };

/*$layout$*/
s[4] !== Re ? hr : fr
s[4] !== Fe ? hr : fr
);

@@ -1691,3 +1698,3 @@ }

m(s, i) {
n.m(s, i), D(s, t, i);
n.m(s, i), Y(s, t, i);
},

@@ -1698,7 +1705,7 @@ p(s, i) {

d(s) {
s && Y(t), n.d(s);
s && j(t), n.d(s);
}
};
}
function Me(e) {
function Le(e) {
let t, o, r, n;

@@ -1713,10 +1720,10 @@ const s = (

e[29],
ye
be
), l = i || ur(e);
return {
c() {
t = Z("button"), l && l.c(), P(t, "class", "thisway-popover-next");
t = Q("button"), l && l.c(), I(t, "class", "thisway-popover-next");
},
m(a, c) {
D(a, t, c), l && l.m(t, null), o = !0, r || (n = Ot(
m(a, p) {
Y(a, t, p), l && l.m(t, null), o = !0, r || (n = Ot(
t,

@@ -1728,4 +1735,4 @@ "click",

},
p(a, c) {
i ? i.p && (!o || c[0] & /*$$scope*/
p(a, p) {
i ? i.p && (!o || p[0] & /*$$scope*/
536870912) && _t(

@@ -1737,7 +1744,7 @@ i,

a[29],
o ? gt(
o ? vt(
s,
/*$$scope*/
a[29],
c,
p,
sr

@@ -1748,5 +1755,5 @@ ) : mt(

),
ye
) : l && l.p && (!o || c[0] & /*$nextButtonText$*/
4096) && l.p(a, o ? c : [-1, -1]);
be
) : l && l.p && (!o || p[0] & /*$nextButtonText$*/
4096) && l.p(a, o ? p : [-1, -1]);
},

@@ -1757,6 +1764,6 @@ i(a) {

o(a) {
A(l, a), o = !1;
W(l, a), o = !1;
},
d(a) {
a && Y(t), l && l.d(a), r = !1, n();
a && j(t), l && l.d(a), r = !1, n();
}

@@ -1775,3 +1782,3 @@ };

m(o, r) {
D(o, t, r);
Y(o, t, r);
},

@@ -1787,3 +1794,3 @@ p(o, r) {

d(o) {
o && Y(t);
o && j(t);
}

@@ -1798,3 +1805,3 @@ };

e[28].title || /*$$slots*/
e[28].description) && ke(e)
e[28].description) && xe(e)
);

@@ -1806,3 +1813,3 @@ return {

m(n, s) {
r && r.m(n, s), D(n, t, s), o = !0;
r && r.m(n, s), Y(n, t, s), o = !0;
},

@@ -1815,3 +1822,3 @@ p(n, s) {

n[28].description ? r ? (r.p(n, s), s[0] & /*$title$, $description$, $$slots*/
268435462 && S(r, 1)) : (r = ke(n), r.c(), S(r, 1), r.m(t.parentNode, t)) : r && (st(), A(r, 1, 1, () => {
268435462 && S(r, 1)) : (r = xe(n), r.c(), S(r, 1), r.m(t.parentNode, t)) : r && (st(), W(r, 1, 1, () => {
r = null;

@@ -1824,6 +1831,6 @@ }), nt());

o(n) {
A(r), o = !1;
W(r), o = !1;
},
d(n) {
n && Y(t), r && r.d(n);
n && j(t), r && r.d(n);
}

@@ -1833,52 +1840,52 @@ };

function _r(e, t, o) {
let r, n, s, i, l, a, c, f, w, b, h, m, { $$slots: u = {}, $$scope: $ } = t;
const C = wo(u);
let { cssClassName: v = "" } = t;
const T = eo(), k = Xe(), V = F(se), x = F(je), R = F(ee), O = E(x, (g) => {
var tt;
return `thisway-popover-${(tt = g == null ? void 0 : g.orientation) == null ? void 0 : tt.toLowerCase()}`;
let r, n, s, i, l, a, p, f, w, _, $, d, { $$slots: h = {}, $$scope: b } = t;
const T = wo(h);
let { cssClassName: g = "" } = t;
const C = eo(), k = Ke(), H = B(se), x = B(Ge), V = B(ee), F = M(x, (v) => {
var et;
return `thisway-popover-${(et = v == null ? void 0 : v.orientation) == null ? void 0 : et.toLowerCase()}`;
});
L(e, O, (g) => o(3, s = g));
const I = E(x, (g) => `thisway-popover__arrow-${g == null ? void 0 : g.alignment.toLowerCase()}`);
L(e, I, (g) => o(5, l = g));
const y = Ke(), p = E(V, (g) => g > 1);
L(e, p, (g) => o(11, h = g));
const N = E([p, k], ([g, tt]) => g && (tt || 0) > 0);
L(e, N, (g) => o(9, w = g));
const J = j(y, "title");
L(e, J, (g) => o(1, r = g));
const _ = j(y, "description");
L(e, _, (g) => o(2, n = g));
const d = j(y, "showCloseBtn");
L(e, d, (g) => o(6, a = g));
const B = j(y, "showCtrlBtns");
L(e, B, (g) => o(8, f = g));
const K = j(y, "showProgress", !0);
L(e, K, (g) => o(7, c = g));
const X = j(y, "prevBtnText");
L(e, X, (g) => o(10, b = g));
const M = j(R, "layout", yt);
L(e, M, (g) => o(4, i = g));
const W = Io(), Q = E([y, W, k, M], ([g, tt, pt, ft]) => {
var at;
L(e, F, (v) => o(3, s = v));
const O = M(x, (v) => `thisway-popover__arrow-${v == null ? void 0 : v.alignment.toLowerCase()}`);
L(e, O, (v) => o(5, l = v));
const m = ie(), c = M(H, (v) => v > 1);
L(e, c, (v) => o(11, $ = v));
const N = M([c, k], ([v, et]) => v && (et || 0) > 0);
L(e, N, (v) => o(9, w = v));
const tt = D(m, "title");
L(e, tt, (v) => o(1, r = v));
const u = D(m, "description");
L(e, u, (v) => o(2, n = v));
const A = D(m, "showCloseBtn");
L(e, A, (v) => o(6, a = v));
const U = D(m, "showCtrlBtns");
L(e, U, (v) => o(8, f = v));
const z = D(m, "showProgress", !0);
L(e, z, (v) => o(7, p = v));
const y = D(m, "prevBtnText");
L(e, y, (v) => o(10, _ = v));
const P = D(V, "layout", yt);
L(e, P, (v) => o(4, i = v));
const E = Io(), X = M([m, E, k, P], ([v, et, pt, ft]) => {
var ct;
if (pt === 0)
return g.startBtnText;
if (tt)
if (ft === Re) {
const ht = ((at = tt.popover) == null ? void 0 : at.title) ?? "";
return `${g.nextBtnText} ${ht}`;
return v.startBtnText;
if (et)
if (ft === Fe) {
const ht = ((ct = et.popover) == null ? void 0 : ct.title) ?? "";
return `${v.nextBtnText} ${ht}`;
} else
return g.nextBtnText;
return v.nextBtnText;
else
return g.doneBtnText;
return v.doneBtnText;
});
L(e, Q, (g) => o(12, m = g));
const ot = () => T("close"), ct = () => T("previous"), vt = () => {
const g = H(W);
T(g ? "next" : "done");
L(e, X, (v) => o(12, d = v));
const q = () => C("close"), it = () => C("previous"), gt = () => {
const v = R(E);
C(v ? "next" : "done");
};
return e.$$set = (g) => {
"cssClassName" in g && o(0, v = g.cssClassName), "$$scope" in g && o(29, $ = g.$$scope);
return e.$$set = (v) => {
"cssClassName" in v && o(0, g = v.cssClassName), "$$scope" in v && o(29, b = v.$$scope);
}, [
v,
g,
r,

@@ -1890,26 +1897,26 @@ n,

a,
c,
p,
f,
w,
b,
h,
m,
_,
$,
d,
F,
O,
I,
p,
c,
N,
J,
_,
d,
B,
K,
tt,
u,
A,
U,
z,
y,
P,
X,
M,
Q,
ot,
ct,
vt,
C,
$,
u
q,
it,
gt,
T,
b,
h
];

@@ -1922,3 +1929,3 @@ }

}
class gr {
class vr {
constructor(t) {

@@ -1929,3 +1936,3 @@ dt(this, "options$");

getTotalCount(t) {
return E(t.effectiveSteps$, (o) => o.length);
return M(t.effectiveSteps$, (o) => o.length);
}

@@ -1939,6 +1946,6 @@ async waitForElement(t) {

}
class vr extends Qo {
class gr extends Qo {
constructor(t) {
const { steps: o, beforeStepChange: r, waitForElement: n, afterStepChanged: s, onClose: i, onDone: l } = t, a = Tt(t), c = new gr(a);
r && (c.beforeStepChange = r), n && (c.waitForElement = n), s && (c.afterStepChanged = s), i && (c.onClose = i), l && (c.onDone = l), super(To(yr(o), void 0), c, De(), a);
const { steps: o, beforeStepChange: r, waitForElement: n, afterStepChanged: s, onClose: i, onDone: l } = t, a = Tt(t), p = new vr(a);
r && (p.beforeStepChange = r), n && (p.waitForElement = n), s && (p.afterStepChanged = s), i && (p.onClose = i), l && (p.onDone = l), super(To(yr(o), void 0), p, Ye(), a);
}

@@ -1965,3 +1972,3 @@ }

}, Er = (e) => {
const t = new vr({
const t = new gr({
steps: [

@@ -1977,6 +1984,6 @@ {

function br(e) {
const t = F(re), { onMount: o, onDestroy: r } = F($o), n = t.subscribe((s) => {
const t = B(re), { onMount: o, onDestroy: r } = B($o), n = t.subscribe((s) => {
s ? o(s) : r();
});
return Ae(() => {
return We(() => {
n(), r();

@@ -1996,23 +2003,23 @@ }), [];

ee as OptionsContext,
je as PlacementContext,
Ge as PlacementContext,
mr as PopoverCard,
re as PopoverContainerContext,
Ye as PopoverSizeContext,
je as PopoverSizeContext,
Dt as RenderStateContext,
Yt as StepOptionsContext,
Co as StepsController,
vr as ThisWay,
gr as ThisWayDefaultDelegate,
gr as ThisWay,
vr as ThisWayDefaultDelegate,
se as TotalStepCountContext,
Qo as Tour,
Pt as TourContext,
De as createContexts,
Ye as createContexts,
To as createStepsStore,
rt as defineContext,
zt as findStepIndex,
F as getContext,
B as getContext,
Oo as getHighlightOptions,
Io as getNextStep,
Ke as getPopoverOptions,
Xe as getRenderIndex,
ie as getPopoverOptions,
Ke as getRenderIndex,
Po as getRenderStep,

@@ -2019,0 +2026,0 @@ Ue as getTheme,

@@ -7,2 +7,3 @@ /// <reference types="svelte" />

export declare const getPopoverOptions: () => import("svelte/store").Readable<{
className?: string | undefined;
position?: import("@thisway/base").PopoverPositionParsed | import("@thisway/base").PopoverPosition | undefined;

@@ -9,0 +10,0 @@ animateClass?: string | undefined;

{
"name": "@thisway/next",
"version": "0.3.3",
"version": "0.3.4",
"type": "module",

@@ -5,0 +5,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc