@thisway/next
Advanced tools
Comparing version 0.9.0 to 0.10.0
1404
index.js
@@ -1,24 +0,24 @@ | ||
var no = Object.defineProperty; | ||
var io = (o, t, e) => t in o ? no(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e; | ||
var et = (o, t, e) => (io(o, typeof t != "symbol" ? t + "" : t, e), e); | ||
import * as Re from "svelte"; | ||
import { onMount as ao, onDestroy as Be, createEventDispatcher as lo } from "svelte"; | ||
import { isValidNumber as Yt, NOOP_TRANSFORM as co, transformX as gt, transformY as vt, deltaTransform as Tt, toPx as it, isElement as Ve, isTextInputElement as Fe, defaults as ce, pick$ as D, clamp as jt, noFinite as pe, animationFrameThrottle as he, resizeObserver as De, reverseX as fe, reverseY as de, getElementsBounding as po, getFrameElement as ho, EMPTY_SIZE as fo } from "@thisway/utils"; | ||
import { get as k, writable as mt, derived as L, readable as wt } from "svelte/store"; | ||
import { PRIMARY_COLOR_WHITE as He, PRIMARY_COLOR_BLACK as We, PRIMARY_COLOR_BLUE as uo, EMPTY_POINT as wo, POSITION_AUTO as Jt, ORIENTATIONS as ue, ALIGNMENTS as _o, NO_ELEMENT as ct, ORIENTATIONS_TO_START_END as go, ORIENTATIONS_Y as vo, popoverDefaultValues as mo, highlightDefaultValues as yo, LAYOUT_MODE_1 as St, LAYOUT_MODE_3 as je } from "@thisway/base"; | ||
var io = Object.defineProperty; | ||
var ao = (o, t, e) => t in o ? io(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e; | ||
var et = (o, t, e) => (ao(o, typeof t != "symbol" ? t + "" : t, e), e); | ||
import * as Le from "svelte"; | ||
import { onMount as lo, onDestroy as Re, createEventDispatcher as co } from "svelte"; | ||
import { isValidNumber as jt, transformX as vt, transformY as yt, toPx as lt, isElement as Be, isTextInputElement as Ve, deltaTransform as Gt, defaults as le, NOOP_TRANSFORM as po, pick$ as V, clamp as Wt, noFinite as ce, animationFrameThrottle as pe, resizeObserver as Fe, reverseX as he, reverseY as fe, getElementsBounding as ho, getFrameElement as fo, EMPTY_SIZE as uo } from "@thisway/utils"; | ||
import { get as k, writable as wt, derived as M, readable as gt } from "svelte/store"; | ||
import { PRIMARY_COLOR_WHITE as De, PRIMARY_COLOR_BLACK as He, PRIMARY_COLOR_BLUE as wo, EMPTY_POINT as _o, POSITION_AUTO as qt, ORIENTATIONS as de, ALIGNMENTS as go, NO_ELEMENT as ht, ORIENTATIONS_TO_START_END as mo, ORIENTATIONS_Y as vo, popoverDefaultValues as yo, highlightDefaultValues as bo, LAYOUT_MODE_1 as St, LAYOUT_MODE_3 as We } from "@thisway/base"; | ||
export * from "@thisway/base"; | ||
import { SvelteComponent as Mt, init as Lt, safe_not_equal as Rt, append_styles as Kt, space as tt, empty as Gt, insert as W, noop as yt, detach as j, component_subscribe as M, svg_element as zt, attr as P, set_style as Y, append as K, listen as Bt, element as U, action_destroyer as Ye, is_function as ze, binding_callbacks as Ke, construct_svelte_component as we, create_component as Ot, mount_component as Et, group_outros as at, transition_out as B, destroy_component as Pt, check_outros as lt, transition_in as O, run_all as bo, text as Vt, set_data as Ft, compute_slots as $o, create_slot as bt, update_slot_base as $t, get_all_dirty_from_scope as Ct, get_slot_changes as xt } from "svelte/internal"; | ||
import { SvelteComponent as It, init as Mt, safe_not_equal as Lt, append_styles as Kt, space as Q, empty as Xt, insert as W, noop as bt, detach as j, component_subscribe as N, svg_element as Yt, attr as S, set_style as Y, append as X, listen as Rt, element as U, action_destroyer as je, is_function as Ye, binding_callbacks as Ge, construct_svelte_component as ue, create_component as Ot, mount_component as Et, group_outros as ct, transition_out as R, destroy_component as Pt, check_outros as pt, transition_in as T, run_all as $o, text as Bt, set_data as Vt, compute_slots as Co, create_slot as $t, update_slot_base as Ct, get_all_dirty_from_scope as xt, get_slot_changes as kt } from "svelte/internal"; | ||
import "svelte/internal/disclose-version"; | ||
import { getHighlightOptions as Co, NO_ELEMENT as xo, CLICK_MASK_ACTION_NEXT as ko, CLICK_MASK_ACTION_CLOSE as To, getRenderIndex as So } from "@thisway/next"; | ||
import { getHighlightOptions as xo, NO_ELEMENT as ko, CLICK_MASK_ACTION_NEXT as To, CLICK_MASK_ACTION_CLOSE as So, getRenderIndex as Oo } from "@thisway/next"; | ||
import { tweened as At } from "svelte/motion"; | ||
import { cubicOut as Nt } from "svelte/easing"; | ||
import { buildScrollFrames as Oo, computeFrameActions as Eo, transformNestedBounding as Po } from "@thisway/scroll"; | ||
const ot = (o) => Symbol(o), V = (o) => { | ||
const t = Re.getContext(o); | ||
import { buildScrollFrames as Eo, computeFrameActions as Po, transformNestedBounding as Ao } from "@thisway/scroll"; | ||
const ot = (o) => Symbol(o), H = (o) => { | ||
const t = Le.getContext(o); | ||
if (!t) | ||
throw new Error(`Context ${o.description} not exist`); | ||
return t; | ||
}, Ao = (o, t) => { | ||
Re.setContext(o, t); | ||
}, Ge = (o) => new Map(o), Dt = ot("Tour"), ee = ot("Options"), oe = ot("ElementBounding"), se = ot("PopoverContainer"), re = ot("PopoverSize"), ne = ot("TotalStepCount"), Xe = ot("PopoverPosition"), Xt = ot("Delegate"), No = ot("ForeignView"), Ut = ot("RenderState"), qt = ot("StepOptions"); | ||
}, Ds = (o, t) => { | ||
Le.setContext(o, t); | ||
}, Ke = (o) => new Map(o), Ft = ot("Tour"), Qt = ot("Options"), Xe = ot("ElementBounding"), te = ot("PopoverContainer"), ze = ot("PopoverSize"), ee = ot("TotalStepCount"), oe = ot("PopoverPosition"), se = ot("Delegate"), No = ot("ForeignView"), re = ot("RenderState"), zt = ot("StepOptions"); | ||
class Io { | ||
@@ -62,3 +62,3 @@ constructor(t) { | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, s = k(t); | ||
if (!Yt(s) || s < 1) | ||
if (!jt(s) || s < 1) | ||
return; | ||
@@ -88,7 +88,7 @@ const n = k(e)[s - 1]; | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, s = k(t), n = k(e); | ||
if (!(!Yt(s) || s === n.length - 1)) | ||
if (!(!jt(s) || s === n.length - 1)) | ||
return n[s + 1].id; | ||
} | ||
} | ||
function Qt([o, t]) { | ||
function Zt([o, t]) { | ||
if (t == null || o.length === 0) | ||
@@ -101,3 +101,3 @@ return; | ||
const Mo = (o, t) => { | ||
const e = mt(o), s = mt(t), n = L(e, (l) => l.filter((c) => !c.isHidden)), r = L([e, s], Qt), i = L([n, s], Qt), a = L([e, r], ([l, c]) => c != null ? l[c] : void 0); | ||
const e = wt(o), s = wt(t), n = M(e, (l) => l.filter((c) => !c.isHidden)), r = M([e, s], Zt), i = M([n, s], Zt), a = M([e, r], ([l, c]) => c != null ? l[c] : void 0); | ||
return { | ||
@@ -112,17 +112,6 @@ steps$: e, | ||
}; | ||
function kt() { | ||
function Tt() { | ||
} | ||
function Lo(o, t) { | ||
let { x: e, y: s, width: n, height: r } = o; | ||
e = gt(e, s, t), s = vt(e, s, t); | ||
const i = Tt(t); | ||
return n = gt(n, 0, i), r = vt(0, r, i), { | ||
x: e, | ||
y: s, | ||
width: n, | ||
height: r | ||
}; | ||
} | ||
const It = wt(co), ie = (o) => { | ||
const t = o.window || window, e = Tt(k(o.transform$ ?? It)), s = gt(t.document.documentElement.clientWidth, 0, e), n = vt(0, t.document.documentElement.clientHeight, e); | ||
const ne = (o, t) => { | ||
const e = o.window || window, s = vt(e.document.documentElement.clientWidth, 0, t), n = yt(0, e.document.documentElement.clientHeight, t); | ||
return { | ||
@@ -132,5 +121,5 @@ width: s, | ||
}; | ||
}, Ro = ({ x: o, y: t, ...e }) => Object.assign(e, { | ||
left: it(o), | ||
top: it(t) | ||
}, Lo = ({ x: o, y: t, ...e }) => Object.assign(e, { | ||
left: lt(o), | ||
top: lt(t) | ||
}); | ||
@@ -148,8 +137,8 @@ function Ue(o) { | ||
} | ||
function ae(o, t) { | ||
function ie(o, t) { | ||
o.signal.addEventListener("abort", t); | ||
} | ||
function _t(o, t, e) { | ||
function mt(o, t, e) { | ||
if (!o) | ||
return kt; | ||
return Tt; | ||
const s = { | ||
@@ -163,4 +152,4 @@ passive: !0, | ||
} | ||
function Bo(o) { | ||
if (!(qe(o.target) && Ve(o.target) && Fe(o.target))) { | ||
function Ro(o) { | ||
if (!(qe(o.target) && Be(o.target) && Ve(o.target))) { | ||
if (o.key === "ArrowRight") | ||
@@ -172,16 +161,16 @@ return "next"; | ||
} | ||
const Vo = (o, t, e, s) => { | ||
const { x: n, y: r, padding: i, borderWidth: a } = o, l = Tt(s); | ||
let c = gt(i, 0, l), u = vt(0, i, l); | ||
const Bo = (o, t, e, s) => { | ||
const { x: n, y: r, padding: i, borderWidth: a } = o, l = Gt(s); | ||
let c = vt(i, 0, l), u = yt(0, i, l); | ||
t && (c += a, u += a); | ||
const p = a * 2, d = n - c + p, m = r - u, f = o.width + (c - p) * 2, w = o.height + (u - p) * 2, _ = e.width, x = e.height; | ||
return `M${_},0L0,0L0,${x}L${_},${x}L${_},0ZM${d},${m}h${f}a${p},${p} 0 0 1 ${p},${p}v${w}a${p},${p} 0 0 1 -${p},${p}h-${f}a${p},${p} 0 0 1 -${p},-${p}v-${w}a${p},${p} 0 0 1 ${p},-${p}z`; | ||
}, Ze = (o, t = o) => o === He ? We : t, Fo = (o, t, e) => { | ||
const s = ce({ ...t }, o); | ||
return e ? ce({ ...e }, s) : s; | ||
}, Do = () => { | ||
const { effectiveSteps$: o } = V(Dt).store, t = V(Ut); | ||
return L([o, t], ([e, { step: s }]) => Qt([e, s == null ? void 0 : s.id])); | ||
}, le = () => V(qt).popover, Ho = () => V(qt).highlight, Wo = (o) => { | ||
const t = (o == null ? void 0 : o.primaryColor) || uo, e = (o == null ? void 0 : o.textColor) || Ze(t, He), s = (o == null ? void 0 : o.descColor) || We; | ||
const p = a * 2, d = n - c + p, v = r - u, h = o.width + (c - p) * 2, _ = o.height + (u - p) * 2, g = e.width, C = e.height; | ||
return `M${g},0L0,0L0,${C}L${g},${C}L${g},0ZM${d},${v}h${h}a${p},${p} 0 0 1 ${p},${p}v${_}a${p},${p} 0 0 1 -${p},${p}h-${h}a${p},${p} 0 0 1 -${p},-${p}v-${_}a${p},${p} 0 0 1 ${p},-${p}z`; | ||
}, Ze = (o, t = o) => o === De ? He : t, Vo = (o, t, e) => { | ||
const s = le({ ...t }, o); | ||
return e ? le({ ...e }, s) : s; | ||
}, Fo = () => { | ||
const { effectiveSteps$: o } = H(Ft).store, t = H(re); | ||
return M([o, t], ([e, { step: s }]) => Zt([e, s == null ? void 0 : s.id])); | ||
}, Je = () => H(zt).popover, Hs = () => H(zt).highlight, Do = (o) => { | ||
const t = (o == null ? void 0 : o.primaryColor) || wo, e = (o == null ? void 0 : o.textColor) || Ze(t, De), s = (o == null ? void 0 : o.descColor) || He; | ||
return { | ||
@@ -192,18 +181,30 @@ primaryColor: t, | ||
}; | ||
}, Je = () => V(qt).theme, Qe = (o, t) => { | ||
}, Qe = () => H(zt).theme, to = (o, t) => { | ||
const { effectiveSteps$: e } = o; | ||
return L([t, e], ([s, n]) => Yt(s) ? n.at(s + 1) : void 0); | ||
}, { assign: _e } = Object, to = (o, t) => (_e(o.style, t), { | ||
return M([t, e], ([s, n]) => jt(s) ? n.at(s + 1) : void 0); | ||
}, { assign: we } = Object, eo = (o, t) => (we(o.style, t), { | ||
update(e) { | ||
_e(o.style, e); | ||
we(o.style, e); | ||
} | ||
}); | ||
function jo(o) { | ||
function Ho(o, t) { | ||
let { x: e, y: s, width: n, height: r } = o; | ||
e = vt(e, s, t), s = yt(e, s, t); | ||
const i = Gt(t); | ||
return n = vt(n, 0, i), r = yt(0, r, i), { | ||
x: e, | ||
y: s, | ||
width: n, | ||
height: r | ||
}; | ||
} | ||
const ae = gt(po); | ||
function Wo(o) { | ||
Kt(o, "svelte-1ge2xpm", ".thisway-mask{position:absolute;top:0;right:0;bottom:0;left:0;display:block}.thisway-mask path{pointer-events:auto}.thisway-highlight{position:absolute;overflow:visible;pointer-events:none;border-style:solid;border-color:var(--thisway-highlight-border-color);box-sizing:content-box;border-width:var(--thisway-highlight-border-width);border-radius:calc(var(--thisway-highlight-border-width) * 2)}.thisway-highlight-pulse{position:absolute;animation:hotspot-pulse 1.5s infinite;opacity:0.4;width:100%;height:100%;top:0;left:0;box-sizing:content-box;padding:var(--thisway-highlight-border-width);border-radius:calc(var(--thisway-highlight-border-width) * 2);transform:translate(calc(var(--thisway-highlight-border-width) * -1), calc(var(--thisway-highlight-border-width) * -1))}@keyframes hotspot-pulse{0%{box-shadow:0 0 0 0 var(--thisway-highlight-border-color, #3082ed)}50%{box-shadow:0 0 0 10px var(--thisway-highlight-border-color, #3082ed)}100%{box-shadow:0 0 0 0 var(--thisway-highlight-border-color, #3082ed)}}"); | ||
} | ||
function ge(o) { | ||
function _e(o) { | ||
let t, e, s, n; | ||
return { | ||
c() { | ||
t = zt("svg"), e = zt("path"), P( | ||
t = Yt("svg"), e = Yt("path"), S( | ||
e, | ||
@@ -218,6 +219,6 @@ "d", | ||
o[3] | ||
), P(t, "class", "thisway-mask"), P(t, "role", "presentation"), P(t, "width", "100%"), P(t, "height", "100%"); | ||
), S(t, "class", "thisway-mask"), S(t, "role", "presentation"), S(t, "width", "100%"), S(t, "height", "100%"); | ||
}, | ||
m(r, i) { | ||
W(r, t, i), K(t, e), o[19](t), s || (n = Bt( | ||
W(r, t, i), X(t, e), o[19](t), s || (n = Rt( | ||
t, | ||
@@ -231,3 +232,3 @@ "click", | ||
i & /*$maskCommand$*/ | ||
4 && P( | ||
4 && S( | ||
e, | ||
@@ -250,3 +251,3 @@ "d", | ||
} | ||
function ve(o) { | ||
function ge(o) { | ||
let t, e, s, n, r = ( | ||
@@ -258,3 +259,3 @@ /*$showHeartbeat$*/ | ||
c() { | ||
t = U("div"), r && r.c(), P(t, "class", "thisway-highlight"), Y( | ||
t = U("div"), r && r.c(), S(t, "class", "thisway-highlight"), Y( | ||
t, | ||
@@ -272,3 +273,3 @@ "--thisway-highlight-border-width", | ||
m(i, a) { | ||
W(i, t, a), r && r.m(t, null), s || (n = Ye(e = to.call( | ||
W(i, t, a), r && r.m(t, null), s || (n = je(e = eo.call( | ||
null, | ||
@@ -282,3 +283,3 @@ t, | ||
/*$showHeartbeat$*/ | ||
i[8] ? r || (r = me(), r.c(), r.m(t, null)) : r && (r.d(1), r = null), e && ze(e.update) && a & /*$borderBoundingStyle$*/ | ||
i[8] ? r || (r = me(), r.c(), r.m(t, null)) : r && (r.d(1), r = null), e && Ye(e.update) && a & /*$borderBoundingStyle$*/ | ||
128 && e.update.call( | ||
@@ -311,3 +312,3 @@ null, | ||
c() { | ||
t = U("div"), P(t, "class", "thisway-highlight-pulse"); | ||
t = U("div"), S(t, "class", "thisway-highlight-pulse"); | ||
}, | ||
@@ -322,13 +323,13 @@ m(e, s) { | ||
} | ||
function Yo(o) { | ||
function jo(o) { | ||
let t, e, s = ( | ||
/*$showMask$*/ | ||
o[0] && ge(o) | ||
o[0] && _e(o) | ||
), n = ( | ||
/*$showBorder$*/ | ||
o[4] && ve(o) | ||
o[4] && ge(o) | ||
); | ||
return { | ||
c() { | ||
s && s.c(), t = tt(), n && n.c(), e = Gt(); | ||
s && s.c(), t = Q(), n && n.c(), e = Xt(); | ||
}, | ||
@@ -340,7 +341,7 @@ m(r, i) { | ||
/*$showMask$*/ | ||
r[0] ? s ? s.p(r, i) : (s = ge(r), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null), /*$showBorder$*/ | ||
r[4] ? n ? n.p(r, i) : (n = ve(r), n.c(), n.m(e.parentNode, e)) : n && (n.d(1), n = null); | ||
r[0] ? s ? s.p(r, i) : (s = _e(r), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null), /*$showBorder$*/ | ||
r[4] ? n ? n.p(r, i) : (n = ge(r), n.c(), n.m(e.parentNode, e)) : n && (n.d(1), n = null); | ||
}, | ||
i: yt, | ||
o: yt, | ||
i: bt, | ||
o: bt, | ||
d(r) { | ||
@@ -351,15 +352,15 @@ r && (j(t), j(e)), s && s.d(r), n && n.d(r); | ||
} | ||
function zo(o, t, e) { | ||
function Yo(o, t, e) { | ||
let s, n, r, i, a, l, c, u, p; | ||
const d = V(Dt), m = V(oe), f = V(Xt), w = Je(), _ = Co(), x = D(_, "showMask"); | ||
M(o, x, (y) => e(0, s = y)); | ||
const b = D(_, "showBorder"); | ||
M(o, b, (y) => e(4, a = y)); | ||
const $ = D(_, "showHeartbeat"), C = D(_, "padding"), R = D(_, "maskOpacity"); | ||
M(o, R, (y) => e(3, i = y)); | ||
const I = D(_, "borderWidth"); | ||
let N, S = mt(void 0); | ||
M(o, S, (y) => e(1, n = y)); | ||
const E = L([m, I, C], ([y, H, X], Z) => { | ||
const G = y ? k(y) : void 0, F = { | ||
const d = H(Ft), v = H(Xe), h = H(se), _ = Qe(), g = xo(), C = V(g, "showMask"); | ||
N(o, C, (y) => e(0, s = y)); | ||
const $ = V(g, "showBorder"); | ||
N(o, $, (y) => e(4, a = y)); | ||
const b = V(g, "showHeartbeat"), x = V(g, "padding"), B = V(g, "maskOpacity"); | ||
N(o, B, (y) => e(3, i = y)); | ||
const L = V(g, "borderWidth"); | ||
let P, A = wt(void 0); | ||
N(o, A, (y) => e(1, n = y)); | ||
const I = h.transform$ ?? ae, O = M([v, L, x], ([y, F, z], tt) => { | ||
const K = y ? k(y) : void 0, D = { | ||
x: 0, | ||
@@ -369,9 +370,9 @@ y: 0, | ||
height: 0, | ||
borderWidth: H, | ||
padding: X | ||
borderWidth: F, | ||
padding: z | ||
}; | ||
if (!G || G === xo) { | ||
const ht = ie(f), st = N ? k(N) : { | ||
x: ht.width / 2, | ||
y: ht.height / 2, | ||
if (!K || K === ko) { | ||
const dt = ne(h, k(I)), w = P ? k(P) : { | ||
x: dt.width / 2, | ||
y: dt.height / 2, | ||
width: 0, | ||
@@ -382,9 +383,9 @@ height: 0, | ||
}; | ||
F.x = st.x + st.width / 2, F.y = st.y + st.height / 2, F.borderWidth = 0, F.padding = 0; | ||
D.x = w.x + w.width / 2, D.y = w.y + w.height / 2, D.borderWidth = 0, D.padding = 0; | ||
} else | ||
F.x = G.x, F.y = G.y, F.width = G.width, F.height = G.height; | ||
N || (N = At( | ||
D.x = K.x, D.y = K.y, D.width = K.width, D.height = K.height; | ||
P || (P = At( | ||
{ | ||
x: F.x + F.width / 2, | ||
y: F.y + F.height / 2, | ||
x: D.x + D.width / 2, | ||
y: D.y + D.height / 2, | ||
width: 0, | ||
@@ -397,45 +398,45 @@ height: 0, | ||
)); | ||
const nt = N.subscribe(Z); | ||
return N.set(F), () => { | ||
nt(); | ||
const it = P.subscribe(tt); | ||
return P.set(D), () => { | ||
it(); | ||
}; | ||
}), A = L([E, b, x, S], ([y, H, X, Z], G) => { | ||
if (!y || !X || !Z) | ||
}), f = M([O, $, C, A], ([y, F, z, tt], K) => { | ||
if (!y || !z || !tt) | ||
return; | ||
const F = Vo(y, H, Z.getBoundingClientRect(), k(f.transform$ ?? It)); | ||
G(F); | ||
const D = Bo(y, F, tt.getBoundingClientRect(), k(I)); | ||
K(D); | ||
}); | ||
M(o, A, (y) => e(2, r = y)); | ||
const h = L(E, (y, H) => { | ||
N(o, f, (y) => e(2, r = y)); | ||
const E = M(O, (y, F) => { | ||
if (!y) | ||
return; | ||
const X = Tt(k(f.transform$ ?? It)), { x: Z, y: G, borderWidth: F, padding: nt, width: ht, height: st } = y, g = gt(nt, 0, X), J = vt(0, nt, X); | ||
H({ | ||
left: it(Z - F - g), | ||
top: it(G - F - J), | ||
width: it(ht), | ||
height: it(st), | ||
padding: `${it(J)} ${it(g)}` | ||
const z = Gt(k(I)), { x: tt, y: K, borderWidth: D, padding: it, width: dt, height: w } = y, J = vt(it, 0, z), _t = yt(0, it, z); | ||
F({ | ||
left: lt(tt - D - J), | ||
top: lt(K - D - _t), | ||
width: lt(dt), | ||
height: lt(w), | ||
padding: `${lt(_t)} ${lt(J)}` | ||
}); | ||
}); | ||
M(o, h, (y) => e(7, u = y)); | ||
const T = L(E, (y) => it(y == null ? void 0 : y.borderWidth)); | ||
M(o, T, (y) => e(5, l = y)); | ||
const q = L([_, w], ([y, H]) => { | ||
N(o, E, (y) => e(7, u = y)); | ||
const q = M(O, (y) => lt(y == null ? void 0 : y.borderWidth)); | ||
N(o, q, (y) => e(5, l = y)); | ||
const st = M([g, _], ([y, F]) => { | ||
if (y != null && y.borderColor) | ||
return y.borderColor; | ||
const { primaryColor: X } = H; | ||
return Ze(X); | ||
const { primaryColor: z } = F; | ||
return Ze(z); | ||
}); | ||
M(o, q, (y) => e(6, c = y)); | ||
const pt = L([$, E], ([y, H]) => !!(y && (H != null && H.width) && (H != null && H.height))); | ||
M(o, pt, (y) => e(8, p = y)); | ||
const dt = () => { | ||
var H; | ||
switch ((H = k(_)) == null ? void 0 : H.clickMask) { | ||
case To: { | ||
N(o, st, (y) => e(6, c = y)); | ||
const Z = M([b, O], ([y, F]) => !!(y && (F != null && F.width) && (F != null && F.height))); | ||
N(o, Z, (y) => e(8, p = y)); | ||
const ft = () => { | ||
var F; | ||
switch ((F = k(g)) == null ? void 0 : F.clickMask) { | ||
case So: { | ||
d.onClose(); | ||
break; | ||
} | ||
case ko: { | ||
case To: { | ||
d.goNextStep(); | ||
@@ -446,5 +447,5 @@ break; | ||
}; | ||
function ut(y) { | ||
Ke[y ? "unshift" : "push"](() => { | ||
n = y, S.set(n); | ||
function nt(y) { | ||
Ge[y ? "unshift" : "push"](() => { | ||
n = y, A.set(n); | ||
}); | ||
@@ -462,45 +463,45 @@ } | ||
p, | ||
x, | ||
b, | ||
R, | ||
S, | ||
C, | ||
$, | ||
B, | ||
A, | ||
h, | ||
T, | ||
f, | ||
E, | ||
q, | ||
pt, | ||
dt, | ||
ut | ||
st, | ||
Z, | ||
ft, | ||
nt | ||
]; | ||
} | ||
class Ko extends Mt { | ||
class Go extends It { | ||
constructor(t) { | ||
super(), Lt(this, t, zo, Yo, Rt, {}, jo); | ||
super(), Mt(this, t, Yo, jo, Lt, {}, Wo); | ||
} | ||
} | ||
const ye = 0.05, eo = (o) => { | ||
if (!o || o === Jt) | ||
return [Jt, void 0]; | ||
const ve = 0.05, oo = (o) => { | ||
if (!o || o === qt) | ||
return [qt, void 0]; | ||
if (Array.isArray(o)) | ||
return o; | ||
const t = o.split("_"); | ||
return t.length === 1 && ue.includes(t[0]) ? [t[0], "CENTER"] : t.length === 2 && ue.includes(t[0]) && _o.includes(t[1]) ? t : [Jt, void 0]; | ||
}, Go = (o, t, e, s, n, r) => { | ||
return t.length === 1 && de.includes(t[0]) ? [t[0], "CENTER"] : t.length === 2 && de.includes(t[0]) && go.includes(t[1]) ? t : [qt, void 0]; | ||
}, Ko = (o, t, e, s, n, r) => { | ||
if (e === "OVER" || e === "SCREEN") | ||
return e; | ||
const i = o.x + o.width, a = o.y + o.height, c = o.y - t.height - n >= 0, p = r.height - (a + t.height) - n >= 0, m = o.x - t.width - s >= 0, w = r.width - (i + t.width) - s >= 0; | ||
const i = o.x + o.width, a = o.y + o.height, c = o.y - t.height - n >= 0, p = r.height - (a + t.height) - n >= 0, v = o.x - t.width - s >= 0, _ = r.width - (i + t.width) - s >= 0; | ||
if (e === "BOTTOM" && p) | ||
return "BOTTOM"; | ||
if (e === "LEFT" && m) | ||
if (e === "LEFT" && v) | ||
return "LEFT"; | ||
if (e === "TOP" && c) | ||
return "TOP"; | ||
if (e === "RIGHT" && w) | ||
if (e === "RIGHT" && _) | ||
return "RIGHT"; | ||
const _ = r.width * ye, x = r.height * ye; | ||
return o.y < x && p ? "BOTTOM" : r.width - i < _ && m ? "LEFT" : r.height - a < x && c ? "TOP" : o.x < _ && w ? "RIGHT" : p ? "BOTTOM" : m ? "LEFT" : c ? "TOP" : w ? "RIGHT" : "SCREEN"; | ||
}, te = { | ||
...wo, | ||
const g = r.width * ve, C = r.height * ve; | ||
return o.y < C && p ? "BOTTOM" : r.width - i < g && v ? "LEFT" : r.height - a < C && c ? "TOP" : o.x < g && _ ? "RIGHT" : p ? "BOTTOM" : v ? "LEFT" : c ? "TOP" : _ ? "RIGHT" : "SCREEN"; | ||
}, Jt = { | ||
..._o, | ||
visibility: "hidden" | ||
}, Xo = (o, t, e, s) => o < e ? e - o : t > s ? t - s : 0, be = (o = "CENTER", t, e, s, n, r) => { | ||
}, Xo = (o, t, e, s) => o < e ? e - o : t > s ? t - s : 0, ye = (o = "CENTER", t, e, s, n, r) => { | ||
if (!s) | ||
@@ -514,8 +515,8 @@ return { adjustAlignment: "CENTER", value: 0 }; | ||
let d; | ||
for (const m of c) { | ||
const f = i[m], w = Xo(f, f + s, u, p); | ||
if (w > 0) | ||
d ? w < d.overflowPx && (d = { adjustAlignment: m, overflowPx: w }) : d = { adjustAlignment: m, overflowPx: w }; | ||
for (const v of c) { | ||
const h = i[v], _ = Xo(h, h + s, u, p); | ||
if (_ > 0) | ||
d ? _ < d.overflowPx && (d = { adjustAlignment: v, overflowPx: _ }) : d = { adjustAlignment: v, overflowPx: _ }; | ||
else | ||
return { adjustAlignment: m, value: f }; | ||
return { adjustAlignment: v, value: h }; | ||
} | ||
@@ -537,16 +538,16 @@ return { | ||
return l; | ||
}, Uo = (o, t, e, s, n, r, i, a, l) => { | ||
}, zo = (o, t, e, s, n, r, i, a, l) => { | ||
const c = { | ||
...te, | ||
...Jt, | ||
visibility: "visible" | ||
}; | ||
let u, p, d; | ||
if (!e || e === ct || o === "SCREEN") | ||
if (!e || e === ht || o === "SCREEN") | ||
p = (i.height - s.height) / 2, d = (i.width - s.width) / 2; | ||
else { | ||
const m = e.x + e.width, f = e.y + e.height, w = () => { | ||
const $ = be( | ||
const v = e.x + e.width, h = e.y + e.height, _ = () => { | ||
const b = ye( | ||
t, | ||
e.x, | ||
m, | ||
v, | ||
s.width, | ||
@@ -556,8 +557,8 @@ i.width, | ||
); | ||
d = $.value, u = $.adjustAlignment; | ||
}, _ = () => { | ||
const $ = be( | ||
d = b.value, u = b.adjustAlignment; | ||
}, g = () => { | ||
const b = ye( | ||
t, | ||
e.y, | ||
f, | ||
h, | ||
s.height, | ||
@@ -567,4 +568,4 @@ i.height, | ||
); | ||
p = $.value, u = $.adjustAlignment; | ||
}, x = i.height - s.height, b = i.width - s.width; | ||
p = b.value, u = b.adjustAlignment; | ||
}, C = i.height - s.height, $ = i.width - s.width; | ||
switch (o) { | ||
@@ -576,15 +577,15 @@ case "OVER": { | ||
case "TOP": { | ||
p = jt(e.y - s.height - l, 0, x), w(); | ||
p = Wt(e.y - s.height - l, 0, C), _(); | ||
break; | ||
} | ||
case "BOTTOM": { | ||
p = jt(f + l, n, x), w(); | ||
p = Wt(h + l, n, C), _(); | ||
break; | ||
} | ||
case "LEFT": { | ||
d = jt(e.x - s.width - a, 0, b), _(); | ||
d = Wt(e.x - s.width - a, 0, $), g(); | ||
break; | ||
} | ||
case "RIGHT": { | ||
d = jt(m + a, n, b), _(); | ||
d = Wt(v + a, n, $), g(); | ||
break; | ||
@@ -594,38 +595,34 @@ } | ||
} | ||
return c.x = pe(d), c.y = pe(p), { style: c, alignment: u || "CENTER" }; | ||
}, qo = () => { | ||
const o = V(oe), t = V(re), e = V(Xt), s = V(Ut), n = le(), r = Ho(); | ||
let i, a; | ||
return L([o], ([l], c) => { | ||
if (!l) | ||
return c.x = ce(d), c.y = ce(p), { style: c, alignment: u || "CENTER" }; | ||
}, Uo = (o, t) => { | ||
let e, s; | ||
return ({ step: n }, r, i, a) => { | ||
if (i.width === 0 || i.height === 0 || !r) | ||
return; | ||
const u = k(n), p = u.offset, d = eo(u.position), m = k(r), { padding: f, borderWidth: w } = m, _ = k(t), x = k(l), { step: b } = k(s), $ = b == null ? void 0 : b.id; | ||
if (_.width === 0 || _.height === 0) | ||
return; | ||
const C = d[0], R = d[1], I = ie(e), N = Tt(k(e.transform$ ?? It)), S = gt(f, 0, N) + p + w, E = vt(0, f, N) + p + w, A = x === ct ? "SCREEN" : Go(x, _, C, S, E, I), { style: h, alignment: T } = Uo( | ||
A, | ||
R === i ? a : R, | ||
x, | ||
_, | ||
const l = k(t.popover), c = l.offset, u = oo(l.position), p = k(t.highlight), { padding: d, borderWidth: v } = p, h = k(r), _ = n == null ? void 0 : n.id, g = u[0], C = u[1], $ = ne(o, a), b = vt(d, 0, a) + c + v, x = yt(0, d, a) + c + v, B = h === ht ? "SCREEN" : Ko(h, i, g, b, x, $), { style: L, alignment: P } = zo( | ||
B, | ||
C === e ? s : C, | ||
h, | ||
i, | ||
c, | ||
p, | ||
m, | ||
I, | ||
S, | ||
E | ||
$, | ||
b, | ||
x | ||
); | ||
i = R, a = T, c({ | ||
orientation: A, | ||
alignment: T, | ||
stepId: $, | ||
stepOrientation: C, | ||
style: h | ||
}); | ||
}); | ||
return e = C, s = P, { | ||
orientation: B, | ||
alignment: P, | ||
stepId: _, | ||
stepOrientation: g, | ||
style: L | ||
}; | ||
}; | ||
}; | ||
function Zo(o) { | ||
function qo(o) { | ||
Kt(o, "svelte-1cl9mhv", ".thisway{--thisway-default-shadow:0 1px 10px rgba(0, 0, 0, 0.4);width:100%;height:100%;top:0;right:0;bottom:0;left:0;max-width:100%;max-height:100%;pointer-events:none}.thisway-popover__container{position:absolute;pointer-events:auto}"); | ||
} | ||
function Jo(o) { | ||
function Zo(o) { | ||
let t, e, s, n, r, i, a, l, c, u, p; | ||
e = new Ko({}); | ||
e = new Go({}); | ||
var d = ( | ||
@@ -635,6 +632,6 @@ /*$popoverComponent$*/ | ||
); | ||
function m(f, w) { | ||
function v(h, _) { | ||
return {}; | ||
} | ||
return d && (r = we(d, m()), r.$on( | ||
return d && (r = ue(d, v()), r.$on( | ||
"close", | ||
@@ -653,4 +650,4 @@ /*onClose*/ | ||
c() { | ||
t = U("div"), Ot(e.$$.fragment), s = tt(), n = U("div"), r && Ot(r.$$.fragment), P(n, "class", i = "thisway-popover__container " + /*$popoverClassName$*/ | ||
o[6]), P(t, "class", l = "thisway " + /*$className$*/ | ||
t = U("div"), Ot(e.$$.fragment), s = Q(), n = U("div"), r && Ot(r.$$.fragment), S(n, "class", i = "thisway-popover__container " + /*$popoverClassName$*/ | ||
o[6]), S(t, "class", l = "thisway " + /*$className$*/ | ||
o[2]), Y( | ||
@@ -688,5 +685,5 @@ t, | ||
}, | ||
m(f, w) { | ||
W(f, t, w), Et(e, t, null), K(t, s), K(t, n), r && Et(r, n, null), o[20](n), c = !0, u || (p = [ | ||
Bt( | ||
m(h, _) { | ||
W(h, t, _), Et(e, t, null), X(t, s), X(t, n), r && Et(r, n, null), o[20](n), c = !0, u || (p = [ | ||
Rt( | ||
window, | ||
@@ -697,3 +694,3 @@ "keydown", | ||
), | ||
Ye(a = to.call( | ||
je(a = eo.call( | ||
null, | ||
@@ -706,37 +703,37 @@ n, | ||
}, | ||
p(f, w) { | ||
if (w[0] & /*$popoverComponent$*/ | ||
p(h, _) { | ||
if (_[0] & /*$popoverComponent$*/ | ||
256 && d !== (d = /*$popoverComponent$*/ | ||
f[8])) { | ||
h[8])) { | ||
if (r) { | ||
at(); | ||
const _ = r; | ||
B(_.$$.fragment, 1, 0, () => { | ||
Pt(_, 1); | ||
}), lt(); | ||
ct(); | ||
const g = r; | ||
R(g.$$.fragment, 1, 0, () => { | ||
Pt(g, 1); | ||
}), pt(); | ||
} | ||
d ? (r = we(d, m()), r.$on( | ||
d ? (r = ue(d, v()), r.$on( | ||
"close", | ||
/*onClose*/ | ||
f[18] | ||
h[18] | ||
), r.$on( | ||
"previous", | ||
/*onPrev*/ | ||
f[16] | ||
h[16] | ||
), r.$on( | ||
"next", | ||
/*onNext*/ | ||
f[17] | ||
), Ot(r.$$.fragment), O(r.$$.fragment, 1), Et(r, n, null)) : r = null; | ||
h[17] | ||
), Ot(r.$$.fragment), T(r.$$.fragment, 1), Et(r, n, null)) : r = null; | ||
} | ||
(!c || w[0] & /*$popoverClassName$*/ | ||
(!c || _[0] & /*$popoverClassName$*/ | ||
64 && i !== (i = "thisway-popover__container " + /*$popoverClassName$*/ | ||
f[6])) && P(n, "class", i), a && ze(a.update) && w[0] & /*$popoverStyle$*/ | ||
h[6])) && S(n, "class", i), a && Ye(a.update) && _[0] & /*$popoverStyle$*/ | ||
128 && a.update.call( | ||
null, | ||
/*$popoverStyle$*/ | ||
f[7] | ||
), (!c || w[0] & /*$className$*/ | ||
h[7] | ||
), (!c || _[0] & /*$className$*/ | ||
4 && l !== (l = "thisway " + /*$className$*/ | ||
f[2])) && P(t, "class", l), w[0] & /*position*/ | ||
h[2])) && S(t, "class", l), _[0] & /*position*/ | ||
1 && Y( | ||
@@ -746,4 +743,4 @@ t, | ||
/*position*/ | ||
f[0] | ||
), w[0] & /*$step$*/ | ||
h[0] | ||
), _[0] & /*$step$*/ | ||
8 && Y( | ||
@@ -753,4 +750,4 @@ t, | ||
/*$step$*/ | ||
f[3] ? "block" : "none" | ||
), w[0] & /*$zIndex$*/ | ||
h[3] ? "block" : "none" | ||
), _[0] & /*$zIndex$*/ | ||
16 && Y( | ||
@@ -760,4 +757,4 @@ t, | ||
/*$zIndex$*/ | ||
f[4] | ||
), w[0] & /*$theme$*/ | ||
h[4] | ||
), _[0] & /*$theme$*/ | ||
32 && Y( | ||
@@ -767,4 +764,4 @@ t, | ||
/*$theme$*/ | ||
f[5].primaryColor | ||
), w[0] & /*$theme$*/ | ||
h[5].primaryColor | ||
), _[0] & /*$theme$*/ | ||
32 && Y( | ||
@@ -774,4 +771,4 @@ t, | ||
/*$theme$*/ | ||
f[5].textColor | ||
), w[0] & /*$theme$*/ | ||
h[5].textColor | ||
), _[0] & /*$theme$*/ | ||
32 && Y( | ||
@@ -781,102 +778,100 @@ t, | ||
/*$theme$*/ | ||
f[5].descColor | ||
h[5].descColor | ||
); | ||
}, | ||
i(f) { | ||
c || (O(e.$$.fragment, f), r && O(r.$$.fragment, f), c = !0); | ||
i(h) { | ||
c || (T(e.$$.fragment, h), r && T(r.$$.fragment, h), c = !0); | ||
}, | ||
o(f) { | ||
B(e.$$.fragment, f), r && B(r.$$.fragment, f), c = !1; | ||
o(h) { | ||
R(e.$$.fragment, h), r && R(r.$$.fragment, h), c = !1; | ||
}, | ||
d(f) { | ||
f && j(t), Pt(e), r && Pt(r), o[20](null), u = !1, bo(p); | ||
d(h) { | ||
h && j(t), Pt(e), r && Pt(r), o[20](null), u = !1, $o(p); | ||
} | ||
}; | ||
} | ||
function Qo(o, t, e) { | ||
function Jo(o, t, e) { | ||
let s, n, r, i, a, l, c, { position: u = "fixed" } = t, p; | ||
const d = V(ee), m = V(se), f = V(Xt), w = le(), _ = V(re), x = V(Ut), b = D(x, "step"); | ||
M(o, b, (v) => e(3, n = v)); | ||
const $ = D(x, "index"), C = L([b, d], ([v, z]) => { | ||
if (v) | ||
return f.getPopoverComponent(v, z); | ||
const d = H(Qt), v = H(te), h = H(se), _ = Je(), g = H(ze), C = H(re), $ = V(C, "step"); | ||
N(o, $, (m) => e(3, n = m)); | ||
const b = V(C, "index"), x = M([$, d], ([m, G]) => { | ||
if (m) | ||
return h.getPopoverComponent(m, G); | ||
}); | ||
M(o, C, (v) => e(8, c = v)); | ||
const R = D(d, "zIndex", 1e4); | ||
M(o, R, (v) => e(4, r = v)); | ||
const I = D(d, "className", ""); | ||
M(o, I, (v) => e(2, s = v)); | ||
const N = D(w, "className", ""); | ||
M(o, N, (v) => e(6, a = v)); | ||
const S = qo(); | ||
Ao(Xe, S); | ||
const E = D(S, "style"); | ||
let A, h, T, q = -1; | ||
const pt = () => { | ||
const v = k(b); | ||
return !(v != null && v.survey || v != null && v.media); | ||
}, dt = () => pt() ? void 0 : "MoveIn", ut = (v, z, rt) => { | ||
const Q = rt ? v.width : -z.width, Zt = (v.height - z.height) / 2; | ||
return { x: Q, y: Zt }; | ||
}; | ||
N(o, x, (m) => e(8, c = m)); | ||
const B = V(d, "zIndex", 1e4); | ||
N(o, B, (m) => e(4, r = m)); | ||
const L = V(d, "className", ""); | ||
N(o, L, (m) => e(2, s = m)); | ||
const P = V(_, "className", ""); | ||
N(o, P, (m) => e(6, a = m)); | ||
const A = H(oe), I = V(A, "style"); | ||
let O, f, E, q = -1; | ||
const st = () => { | ||
const m = k($); | ||
return !(m != null && m.survey || m != null && m.media); | ||
}, Z = () => st() ? void 0 : "MoveIn", ft = (m, G, at) => { | ||
const rt = at ? m.width : -G.width, Ut = (m.height - G.height) / 2; | ||
return { x: rt, y: Ut }; | ||
}, nt = h.transform$ ?? ae; | ||
let y = !0; | ||
const H = L( | ||
E, | ||
(v, z) => { | ||
const rt = k(x).index; | ||
if (!v) { | ||
z(te); | ||
const F = M( | ||
I, | ||
(m, G) => { | ||
const at = k(C).index; | ||
if (!m) { | ||
G(Jt); | ||
return; | ||
} | ||
const Q = ie(f), Zt = k(_), Ht = { x: v.x, y: v.y }; | ||
let so = dt(); | ||
if (q === -1 || q < rt ? y = !0 : q > rt && (y = !1), so) { | ||
const ft = ut(Q, Zt, y), Wt = Math.max(Math.abs(Ht.x - ft.x), Math.abs(Ht.y - ft.y)) / 1e3 * 600; | ||
!h || q !== k($) ? h = At(ft, { duration: Wt, easing: Nt }) : ft.y !== k(h).y && (h = At( | ||
const rt = ne(h, k(nt)), Ut = k(g), Dt = { x: m.x, y: m.y }; | ||
let ro = Z(); | ||
if (q === -1 || q < at ? y = !0 : q > at && (y = !1), ro) { | ||
const ut = ft(rt, Ut, y), Ht = Math.max(Math.abs(Dt.x - ut.x), Math.abs(Dt.y - ut.y)) / 1e3 * 600; | ||
!f || q !== k(b) ? f = At(ut, { duration: Ht, easing: Nt }) : ut.y !== k(f).y && (f = At( | ||
{ | ||
x: k(h).x, | ||
y: ft.y | ||
x: k(f).x, | ||
y: ut.y | ||
}, | ||
{ duration: Wt, easing: Nt } | ||
)), T = h; | ||
{ duration: Ht, easing: Nt } | ||
)), E = f; | ||
} else | ||
A || (z(v), A = At(Ht, { duration: 300, easing: Nt })), T = A; | ||
const ro = T.subscribe(({ x: ft, y: Wt }) => { | ||
z({ ...v, x: ft, y: Wt }); | ||
O || (G(m), O = At(Dt, { duration: 300, easing: Nt })), E = O; | ||
const no = E.subscribe(({ x: ut, y: Ht }) => { | ||
G({ ...m, x: ut, y: Ht }); | ||
}); | ||
return T.set(Ht), q = rt, ro; | ||
return E.set(Dt), q = at, no; | ||
}, | ||
te | ||
), X = L(H, (v) => { | ||
const z = Ro(v); | ||
return k(w).showPopover === !1 && pt() && (z.visibility = "hidden"), z; | ||
Jt | ||
), z = M(F, (m) => { | ||
const G = Lo(m); | ||
return k(_).showPopover === !1 && st() && (G.visibility = "hidden"), G; | ||
}); | ||
M(o, X, (v) => e(7, l = v)); | ||
const Z = Je(); | ||
M(o, Z, (v) => e(5, i = v)); | ||
const G = V(Dt), { onPrev: F, onNext: nt, onClose: ht } = G, st = (v) => { | ||
if (!G.isActive() || k(d).keyboardControl === !1) | ||
N(o, z, (m) => e(7, l = m)); | ||
const tt = Qe(); | ||
N(o, tt, (m) => e(5, i = m)); | ||
const K = H(Ft), { onPrev: D, onNext: it, onClose: dt } = K, w = (m) => { | ||
if (!K.isActive() || k(d).keyboardControl === !1) | ||
return; | ||
const z = f.onKeydown ? f.onKeydown(v) : Bo(v); | ||
G.applyAction(z); | ||
}, g = L(x, ({ element: v }, z) => { | ||
if (!v || v === ct || k(d).interactive === !1 || k(w).position === "SCREEN") | ||
return kt; | ||
const rt = v.ownerDocument.defaultView; | ||
return _t(rt, "click", (Q) => { | ||
z(Q), !(Q.target === document.body || !qe(Q.target) || !Ve(Q.target) || Fe(Q.target) || !v.contains(Q.target)) && nt(); | ||
const G = h.onKeydown ? h.onKeydown(m) : Ro(m); | ||
K.applyAction(G); | ||
}, J = M(C, ({ element: m }, G) => { | ||
if (!m || m === ht || k(d).interactive === !1 || k(_).position === "SCREEN") | ||
return Tt; | ||
const at = m.ownerDocument.defaultView; | ||
return mt(at, "click", (rt) => { | ||
G(rt), !(rt.target === document.body || !qe(rt.target) || !Be(rt.target) || Ve(rt.target) || !m.contains(rt.target)) && it(); | ||
}); | ||
}).subscribe(kt); | ||
ao(() => { | ||
m.set(p); | ||
}), Be(() => { | ||
m.set(void 0), g(); | ||
}).subscribe(Tt); | ||
lo(() => { | ||
v.set(p); | ||
}), Re(() => { | ||
v.set(void 0), J(); | ||
}); | ||
function J(v) { | ||
Ke[v ? "unshift" : "push"](() => { | ||
p = v, e(1, p); | ||
function _t(m) { | ||
Ge[m ? "unshift" : "push"](() => { | ||
p = m, e(1, p); | ||
}); | ||
} | ||
return o.$$set = (v) => { | ||
"position" in v && e(0, u = v.position); | ||
return o.$$set = (m) => { | ||
"position" in m && e(0, u = m.position); | ||
}, [ | ||
@@ -892,22 +887,22 @@ u, | ||
c, | ||
b, | ||
C, | ||
R, | ||
I, | ||
N, | ||
X, | ||
Z, | ||
F, | ||
nt, | ||
ht, | ||
st, | ||
J | ||
$, | ||
x, | ||
B, | ||
L, | ||
P, | ||
z, | ||
tt, | ||
D, | ||
it, | ||
dt, | ||
w, | ||
_t | ||
]; | ||
} | ||
class ts extends Mt { | ||
class Qo extends It { | ||
constructor(t) { | ||
super(), Lt(this, t, Qo, Jo, Rt, { position: 0 }, Zo, [-1, -1]); | ||
super(), Mt(this, t, Jo, Zo, Lt, { position: 0 }, qo, [-1, -1]); | ||
} | ||
} | ||
async function es(o, t) { | ||
async function ts(o, t) { | ||
o.length !== 0 && await Promise.all( | ||
@@ -931,3 +926,3 @@ o.map(({ el: e, top: s, left: n }) => e.scrollTop == s && e.scrollLeft == n ? Promise.resolve() : new Promise((r) => { | ||
} | ||
ae(t, c), a.set({ | ||
ie(t, c), a.set({ | ||
x: n, | ||
@@ -939,4 +934,4 @@ y: s | ||
} | ||
function os(o, t, e, s, n, r, i) { | ||
const a = (o == null ? void 0 : o.scrollOffset) || {}, l = e ? go[e] : "nearest", c = s ? s.toLocaleLowerCase() : "nearest", { padding: u, borderWidth: p } = r, d = (n.offset < 10 ? 10 : n.offset) + p, m = { | ||
function es(o, t, e, s, n, r, i) { | ||
const a = (o == null ? void 0 : o.scrollOffset) || {}, l = e ? mo[e] : "nearest", c = s ? s.toLocaleLowerCase() : "nearest", { padding: u, borderWidth: p } = r, d = (n.offset < 10 ? 10 : n.offset) + p, v = { | ||
left: d + (a.left || 0), | ||
@@ -947,76 +942,76 @@ right: d + (a.right || 0), | ||
}; | ||
let f = "nearest", w = "nearest"; | ||
e && e !== "OVER" && (vo.includes(e) ? (f = l, w = c, m[e.toLocaleLowerCase()] += (t == null ? void 0 : t.height) || 0) : (f = c, w = l, m[e.toLocaleLowerCase()] += (t == null ? void 0 : t.width) || 0)); | ||
const _ = Tt(i); | ||
return m.left = fe(m.left, 0, _) + u, m.right = fe(m.right, 0, _) + u, m.top = de(0, m.top, _) + u, m.bottom = de(0, m.bottom, _) + u, { | ||
let h = "nearest", _ = "nearest"; | ||
e && e !== "OVER" && (vo.includes(e) ? (h = l, _ = c, v[e.toLocaleLowerCase()] += (t == null ? void 0 : t.height) || 0) : (h = c, _ = l, v[e.toLocaleLowerCase()] += (t == null ? void 0 : t.width) || 0)); | ||
const g = Gt(i); | ||
return v.left = he(v.left, 0, g) + u, v.right = he(v.right, 0, g) + u, v.top = fe(0, v.top, g) + u, v.bottom = fe(0, v.bottom, g) + u, { | ||
scrollMode: "if-needed", | ||
block: f, | ||
inline: w, | ||
offset: m | ||
block: h, | ||
inline: _, | ||
offset: v | ||
}; | ||
} | ||
async function ss(o, t, e, s, n, r, i, a, l) { | ||
async function os(o, t, e, s, n, r, i, a, l) { | ||
let c = [], u = []; | ||
const { highlight: p, popover: d } = s, m = k(p), f = k(d), w = eo(f.position), _ = w[0], x = w[1]; | ||
if (o !== ct) { | ||
({ elements: c, iframes: u } = Oo(o, !0, r)); | ||
const b = os( | ||
const { highlight: p, popover: d } = s, v = k(p), h = k(d), _ = oo(h.position), g = _[0], C = _[1]; | ||
if (o !== ht) { | ||
({ elements: c, iframes: u } = Eo(o, !0, r)); | ||
const $ = es( | ||
t, | ||
e, | ||
_, | ||
x, | ||
f, | ||
m, | ||
g, | ||
C, | ||
h, | ||
v, | ||
n | ||
), $ = Eo(c, u, o, b); | ||
await es($, l); | ||
), b = Po(c, u, o, $); | ||
await ts(b, l); | ||
} | ||
return wt(a && wt(a), (b) => { | ||
return gt(a && gt(a), ($) => { | ||
if (!o) | ||
return; | ||
const $ = []; | ||
let C = kt; | ||
if (o === ct || _ === "SCREEN") { | ||
C = he(() => { | ||
l.signal.aborted || b(wt(ct)); | ||
const b = []; | ||
let x = Tt; | ||
if (o === ht || g === "SCREEN") { | ||
x = pe(() => { | ||
l.signal.aborted || $(gt(ht)); | ||
}); | ||
for (const R of u) { | ||
const { contentWindow: I } = R; | ||
I && $.push(_t(window, "resize", C)); | ||
for (const B of u) { | ||
const { contentWindow: L } = B; | ||
L && b.push(mt(window, "resize", x)); | ||
} | ||
} else { | ||
const R = t != null && t.onlyHighlightChildren ? Array.from(o.children) : [o], I = () => Lo(Po(po(R), u), n); | ||
C = he(() => { | ||
const B = t != null && t.onlyHighlightChildren ? Array.from(o.children) : [o], L = () => Ho(Ao(ho(B), u), n); | ||
x = pe(() => { | ||
if (l.signal.aborted) | ||
return; | ||
const N = I(); | ||
N.width === 0 || N.height === 0 ? b(wt(ct)) : b(wt(N)); | ||
}), $.push( | ||
...R.map((N) => De(N, () => { | ||
const S = N.getBoundingClientRect(); | ||
S.width === 0 && S.height === 0 || C(); | ||
const P = L(); | ||
P.width === 0 || P.height === 0 ? $(gt(ht)) : $(gt(P)); | ||
}), b.push( | ||
...B.map((P) => Fe(P, () => { | ||
const A = P.getBoundingClientRect(); | ||
A.width === 0 && A.height === 0 || x(); | ||
})) | ||
); | ||
for (const N of u) { | ||
const { contentWindow: S } = N; | ||
S && $.push(_t(S.window, "resize", C), _t(S.window, "scroll", C)); | ||
for (const P of u) { | ||
const { contentWindow: A } = P; | ||
A && b.push(mt(A.window, "resize", x), mt(A.window, "scroll", x)); | ||
} | ||
} | ||
$.push( | ||
_t(window, "resize", C), | ||
_t(window, "scroll", C), | ||
i.subscribe(C) | ||
), C(), ae(l, () => { | ||
Ue($); | ||
b.push( | ||
mt(window, "resize", x), | ||
mt(window, "scroll", x), | ||
i.subscribe(x) | ||
), x(), ie(l, () => { | ||
Ue(b); | ||
}); | ||
}); | ||
} | ||
const rs = (o, t) => { | ||
const ss = (o, t) => { | ||
let e; | ||
const { activeStep$: s, activeIndex$: n } = o; | ||
return L( | ||
return M( | ||
s, | ||
(r, i) => { | ||
const a = k(n); | ||
if (!r || !Yt(a)) | ||
if (!r || !jt(a)) | ||
return; | ||
@@ -1031,3 +1026,3 @@ i({ | ||
l.signal.aborted || (i({ | ||
element: c ?? ct, | ||
element: c ?? ht, | ||
step: r, | ||
@@ -1046,6 +1041,6 @@ index: a | ||
); | ||
}, ns = (o) => L(o, (t, e) => t ? De(t, () => { | ||
}, rs = (o) => M(o, (t, e) => t ? Fe(t, () => { | ||
e(t.getBoundingClientRect()); | ||
}) : (e(fo), kt)); | ||
class is extends Io { | ||
}) : (e(uo), Tt)); | ||
class ns extends Io { | ||
constructor(e, s, n, r) { | ||
@@ -1056,3 +1051,3 @@ super(e); | ||
et(this, "delegate"); | ||
et(this, "updatePositionSignal$", mt(0)); | ||
et(this, "updatePositionSignal$", wt(0)); | ||
et(this, "renderState$"); | ||
@@ -1064,3 +1059,3 @@ et(this, "onPrev", () => { | ||
var s, n; | ||
const e = k(Qe(this.store, this.store.effectiveIndex$)); | ||
const e = k(to(this.store, this.store.effectiveIndex$)); | ||
if (e) { | ||
@@ -1083,43 +1078,40 @@ const r = (s = this.getActiveStep().step) == null ? void 0 : s.id; | ||
this.delegate = s; | ||
const i = s.container ?? document.body, a = [], l = rs(e, s); | ||
const i = s.container ?? document.body, a = [], l = ss(e, s); | ||
this.renderState$ = l; | ||
const c = D(l, "step"), u = (C, R) => { | ||
const I = D(r, C), N = D(c, C); | ||
return L( | ||
[I, N], | ||
(S) => Fo(R, ...S) | ||
); | ||
}, p = { | ||
popover: u("popover", mo), | ||
highlight: u("highlight", yo), | ||
theme: L(u("theme", {}), Wo) | ||
}, d = mt(void 0), m = ns(d), f = s.transform$ ?? It, w = D(p.popover, "position"); | ||
let _; | ||
const x = L( | ||
[l, m, f, w], | ||
const c = V(l, "step"), u = is(r, c), p = { | ||
popover: u("popover", yo), | ||
highlight: u("highlight", bo), | ||
theme: M(u("theme", {}), Do) | ||
}, d = wt(void 0), v = rs(d); | ||
let h; | ||
const _ = s.transform$ ?? ae, g = V(p.popover, "position"), C = wt(void 0), $ = Uo(s, p), b = M( | ||
[l, v, _, g], | ||
([ | ||
{ element: C, step: R }, | ||
I, | ||
N | ||
L, | ||
P, | ||
A | ||
/* position */ | ||
], S) => { | ||
if (!C || !R) | ||
return kt; | ||
], I) => { | ||
const { element: O, step: f } = L; | ||
if (!O || !f) | ||
return Tt; | ||
const E = new AbortController(); | ||
return ss( | ||
C, | ||
R, | ||
I, | ||
return os( | ||
O, | ||
f, | ||
P, | ||
p, | ||
N, | ||
ho(s.window), | ||
A, | ||
fo(s.window), | ||
this.updatePositionSignal$, | ||
_, | ||
h, | ||
E | ||
).then((A) => { | ||
const h = A.subscribe((T) => { | ||
const q = T && k(T); | ||
S(T), _ = q; | ||
).then((q) => { | ||
const st = q.subscribe((Z) => { | ||
const ft = Z && k(Z); | ||
I(Z), h = ft; | ||
const nt = $(L, Z, P, A); | ||
nt && C.set(nt); | ||
}); | ||
ae(E, h); | ||
ie(E, st); | ||
}), () => { | ||
@@ -1129,6 +1121,6 @@ E.abort(); | ||
} | ||
), b = s.getTotalCount(e), $ = Ge(n); | ||
$.set(Dt, this).set(oe, x).set(ee, r).set(se, d).set(re, m).set(ne, b).set(Xt, s).set(Ut, l).set(qt, p), this.subscriptions = a, this.view = new ts({ | ||
), x = s.getTotalCount(e), B = Ke(n); | ||
B.set(Ft, this).set(Xe, b).set(Qt, r).set(te, d).set(ze, v).set(ee, x).set(se, s).set(re, l).set(zt, p).set(oe, C), this.subscriptions = a, this.view = new Qo({ | ||
target: i, | ||
context: $, | ||
context: B, | ||
props: { | ||
@@ -1160,3 +1152,3 @@ position: i.tagName.toLowerCase() === "body" ? "fixed" : "absolute" | ||
const { element: e } = k(this.renderState$); | ||
return e === ct ? void 0 : e; | ||
return e === ht ? void 0 : e; | ||
} | ||
@@ -1168,2 +1160,8 @@ dispose() { | ||
} | ||
function is(o, t) { | ||
return (e, s) => { | ||
const n = V(o, e), r = V(t, e); | ||
return M([n, r], (i) => Vo(s, ...i)); | ||
}; | ||
} | ||
function as(o) { | ||
@@ -1176,13 +1174,13 @@ Kt(o, "svelte-1fc4ct7", ".thisway-progress{font-size:14px}"); | ||
c() { | ||
t = U("div"), e = Vt( | ||
t = U("div"), e = Bt( | ||
/*$progress$*/ | ||
o[0] | ||
), P(t, "class", "thisway-progress"); | ||
), S(t, "class", "thisway-progress"); | ||
}, | ||
m(s, n) { | ||
W(s, t, n), K(t, e); | ||
W(s, t, n), X(t, e); | ||
}, | ||
p(s, [n]) { | ||
n & /*$progress$*/ | ||
1 && Ft( | ||
1 && Vt( | ||
e, | ||
@@ -1193,4 +1191,4 @@ /*$progress$*/ | ||
}, | ||
i: yt, | ||
o: yt, | ||
i: bt, | ||
o: bt, | ||
d(s) { | ||
@@ -1203,8 +1201,8 @@ s && j(t); | ||
let s; | ||
const n = V(ne), r = So(), i = L([r, n], ([a, l]) => l > 1 ? `${a + 1}/${l}` : ""); | ||
return M(o, i, (a) => e(0, s = a)), [s, i]; | ||
const n = H(ee), r = Oo(), i = M([r, n], ([a, l]) => l > 1 ? `${a + 1}/${l}` : ""); | ||
return N(o, i, (a) => e(0, s = a)), [s, i]; | ||
} | ||
class oo extends Mt { | ||
class so extends It { | ||
constructor(t) { | ||
super(), Lt(this, t, cs, ls, Rt, {}, as); | ||
super(), Mt(this, t, cs, ls, Lt, {}, as); | ||
} | ||
@@ -1215,25 +1213,25 @@ } | ||
} | ||
const hs = (o) => ({}), $e = (o) => ({}), fs = (o) => ({}), Ce = (o) => ({}), ds = (o) => ({}), xe = (o) => ({}), us = (o) => ({}), ke = (o) => ({}), ws = (o) => ({}), Te = (o) => ({}); | ||
function Se(o) { | ||
let t, e, s, n, r, i, a, l, c, u, p, d, m, f, w, _, x = ( | ||
const hs = (o) => ({}), be = (o) => ({}), fs = (o) => ({}), $e = (o) => ({}), ds = (o) => ({}), Ce = (o) => ({}), us = (o) => ({}), xe = (o) => ({}), ws = (o) => ({}), ke = (o) => ({}); | ||
function Te(o) { | ||
let t, e, s, n, r, i, a, l, c, u, p, d, v, h, _, g, C = ( | ||
/*$showCloseButton$*/ | ||
o[6] && Oe(o) | ||
), b = ( | ||
o[6] && Se(o) | ||
), $ = ( | ||
/*$$slots*/ | ||
(o[28].title || /*$title$*/ | ||
o[1]) && Ee(o) | ||
), $ = ( | ||
o[1]) && Oe(o) | ||
), b = ( | ||
/*$$slots*/ | ||
(o[28].description || /*$description$*/ | ||
o[2]) && Pe(o) | ||
), C = ( | ||
o[2]) && Ee(o) | ||
), x = ( | ||
/*$layout$*/ | ||
o[4] !== St && /*$showProgress$*/ | ||
o[7] && Ae() | ||
o[7] && Pe() | ||
); | ||
const R = ( | ||
const B = ( | ||
/*#slots*/ | ||
o[30].default | ||
), I = bt( | ||
R, | ||
), L = $t( | ||
B, | ||
o, | ||
@@ -1243,24 +1241,24 @@ /*$$scope*/ | ||
null | ||
), N = ( | ||
), P = ( | ||
/*#slots*/ | ||
o[30].footer | ||
), S = bt( | ||
N, | ||
), A = $t( | ||
P, | ||
o, | ||
/*$$scope*/ | ||
o[29], | ||
xe | ||
Ce | ||
); | ||
let E = ( | ||
let I = ( | ||
/*$layout$*/ | ||
o[4] === St && /*$showProgress$*/ | ||
o[7] && Ne() | ||
), A = ( | ||
o[7] && Ae() | ||
), O = ( | ||
/*$showCtrlBtns$*/ | ||
o[8] && Ie(o) | ||
o[8] && Ne(o) | ||
); | ||
return { | ||
c() { | ||
t = U("div"), e = U("div"), n = tt(), x && x.c(), r = tt(), b && b.c(), i = tt(), $ && $.c(), a = tt(), C && C.c(), l = tt(), I && I.c(), c = tt(), u = U("div"), S && S.c(), p = tt(), E && E.c(), d = tt(), m = U("div"), f = tt(), A && A.c(), P(e, "class", s = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
o[5]), P(m, "class", "thisway-stretch"), P(u, "class", "thisway-popover-footer"), P(t, "class", w = "thisway-popover " + /*$popoverClass$*/ | ||
t = U("div"), e = U("div"), n = Q(), C && C.c(), r = Q(), $ && $.c(), i = Q(), b && b.c(), a = Q(), x && x.c(), l = Q(), L && L.c(), c = Q(), u = U("div"), A && A.c(), p = Q(), I && I.c(), d = Q(), v = U("div"), h = Q(), O && O.c(), S(e, "class", s = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
o[5]), S(v, "class", "thisway-stretch"), S(u, "class", "thisway-popover-footer"), S(t, "class", _ = "thisway-popover " + /*$popoverClass$*/ | ||
o[3] + " thisway-popover__" + /*$layout$*/ | ||
@@ -1270,94 +1268,94 @@ o[4] + " " + /*cssClassName*/ | ||
}, | ||
m(h, T) { | ||
W(h, t, T), K(t, e), K(t, n), x && x.m(t, null), K(t, r), b && b.m(t, null), K(t, i), $ && $.m(t, null), K(t, a), C && C.m(t, null), K(t, l), I && I.m(t, null), K(t, c), K(t, u), S && S.m(u, null), K(u, p), E && E.m(u, null), K(u, d), K(u, m), K(u, f), A && A.m(u, null), _ = !0; | ||
m(f, E) { | ||
W(f, t, E), X(t, e), X(t, n), C && C.m(t, null), X(t, r), $ && $.m(t, null), X(t, i), b && b.m(t, null), X(t, a), x && x.m(t, null), X(t, l), L && L.m(t, null), X(t, c), X(t, u), A && A.m(u, null), X(u, p), I && I.m(u, null), X(u, d), X(u, v), X(u, h), O && O.m(u, null), g = !0; | ||
}, | ||
p(h, T) { | ||
(!_ || T[0] & /*$arrowClass$*/ | ||
p(f, E) { | ||
(!g || E[0] & /*$arrowClass$*/ | ||
32 && s !== (s = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
h[5])) && P(e, "class", s), /*$showCloseButton$*/ | ||
h[6] ? x ? x.p(h, T) : (x = Oe(h), x.c(), x.m(t, r)) : x && (x.d(1), x = null), /*$$slots*/ | ||
h[28].title || /*$title$*/ | ||
h[1] ? b ? (b.p(h, T), T[0] & /*$$slots, $title$*/ | ||
268435458 && O(b, 1)) : (b = Ee(h), b.c(), O(b, 1), b.m(t, i)) : b && (at(), B(b, 1, 1, () => { | ||
f[5])) && S(e, "class", s), /*$showCloseButton$*/ | ||
f[6] ? C ? C.p(f, E) : (C = Se(f), C.c(), C.m(t, r)) : C && (C.d(1), C = null), /*$$slots*/ | ||
f[28].title || /*$title$*/ | ||
f[1] ? $ ? ($.p(f, E), E[0] & /*$$slots, $title$*/ | ||
268435458 && T($, 1)) : ($ = Oe(f), $.c(), T($, 1), $.m(t, i)) : $ && (ct(), R($, 1, 1, () => { | ||
$ = null; | ||
}), pt()), /*$$slots*/ | ||
f[28].description || /*$description$*/ | ||
f[2] ? b ? (b.p(f, E), E[0] & /*$$slots, $description$*/ | ||
268435460 && T(b, 1)) : (b = Ee(f), b.c(), T(b, 1), b.m(t, a)) : b && (ct(), R(b, 1, 1, () => { | ||
b = null; | ||
}), lt()), /*$$slots*/ | ||
h[28].description || /*$description$*/ | ||
h[2] ? $ ? ($.p(h, T), T[0] & /*$$slots, $description$*/ | ||
268435460 && O($, 1)) : ($ = Pe(h), $.c(), O($, 1), $.m(t, a)) : $ && (at(), B($, 1, 1, () => { | ||
$ = null; | ||
}), lt()), /*$layout$*/ | ||
h[4] !== St && /*$showProgress$*/ | ||
h[7] ? C ? T[0] & /*$layout$, $showProgress$*/ | ||
144 && O(C, 1) : (C = Ae(), C.c(), O(C, 1), C.m(t, l)) : C && (at(), B(C, 1, 1, () => { | ||
C = null; | ||
}), lt()), I && I.p && (!_ || T[0] & /*$$scope*/ | ||
536870912) && $t( | ||
I, | ||
R, | ||
h, | ||
}), pt()), /*$layout$*/ | ||
f[4] !== St && /*$showProgress$*/ | ||
f[7] ? x ? E[0] & /*$layout$, $showProgress$*/ | ||
144 && T(x, 1) : (x = Pe(), x.c(), T(x, 1), x.m(t, l)) : x && (ct(), R(x, 1, 1, () => { | ||
x = null; | ||
}), pt()), L && L.p && (!g || E[0] & /*$$scope*/ | ||
536870912) && Ct( | ||
L, | ||
B, | ||
f, | ||
/*$$scope*/ | ||
h[29], | ||
_ ? xt( | ||
R, | ||
f[29], | ||
g ? kt( | ||
B, | ||
/*$$scope*/ | ||
h[29], | ||
T, | ||
f[29], | ||
E, | ||
null | ||
) : Ct( | ||
) : xt( | ||
/*$$scope*/ | ||
h[29] | ||
f[29] | ||
), | ||
null | ||
), S && S.p && (!_ || T[0] & /*$$scope*/ | ||
536870912) && $t( | ||
S, | ||
N, | ||
h, | ||
), A && A.p && (!g || E[0] & /*$$scope*/ | ||
536870912) && Ct( | ||
A, | ||
P, | ||
f, | ||
/*$$scope*/ | ||
h[29], | ||
_ ? xt( | ||
N, | ||
f[29], | ||
g ? kt( | ||
P, | ||
/*$$scope*/ | ||
h[29], | ||
T, | ||
f[29], | ||
E, | ||
ds | ||
) : Ct( | ||
) : xt( | ||
/*$$scope*/ | ||
h[29] | ||
f[29] | ||
), | ||
xe | ||
Ce | ||
), /*$layout$*/ | ||
h[4] === St && /*$showProgress$*/ | ||
h[7] ? E ? T[0] & /*$layout$, $showProgress$*/ | ||
144 && O(E, 1) : (E = Ne(), E.c(), O(E, 1), E.m(u, d)) : E && (at(), B(E, 1, 1, () => { | ||
E = null; | ||
}), lt()), /*$showCtrlBtns$*/ | ||
h[8] ? A ? (A.p(h, T), T[0] & /*$showCtrlBtns$*/ | ||
256 && O(A, 1)) : (A = Ie(h), A.c(), O(A, 1), A.m(u, null)) : A && (at(), B(A, 1, 1, () => { | ||
A = null; | ||
}), lt()), (!_ || T[0] & /*$popoverClass$, $layout$, cssClassName*/ | ||
25 && w !== (w = "thisway-popover " + /*$popoverClass$*/ | ||
h[3] + " thisway-popover__" + /*$layout$*/ | ||
h[4] + " " + /*cssClassName*/ | ||
h[0])) && P(t, "class", w); | ||
f[4] === St && /*$showProgress$*/ | ||
f[7] ? I ? E[0] & /*$layout$, $showProgress$*/ | ||
144 && T(I, 1) : (I = Ae(), I.c(), T(I, 1), I.m(u, d)) : I && (ct(), R(I, 1, 1, () => { | ||
I = null; | ||
}), pt()), /*$showCtrlBtns$*/ | ||
f[8] ? O ? (O.p(f, E), E[0] & /*$showCtrlBtns$*/ | ||
256 && T(O, 1)) : (O = Ne(f), O.c(), T(O, 1), O.m(u, null)) : O && (ct(), R(O, 1, 1, () => { | ||
O = null; | ||
}), pt()), (!g || E[0] & /*$popoverClass$, $layout$, cssClassName*/ | ||
25 && _ !== (_ = "thisway-popover " + /*$popoverClass$*/ | ||
f[3] + " thisway-popover__" + /*$layout$*/ | ||
f[4] + " " + /*cssClassName*/ | ||
f[0])) && S(t, "class", _); | ||
}, | ||
i(h) { | ||
_ || (O(b), O($), O(C), O(I, h), O(S, h), O(E), O(A), _ = !0); | ||
i(f) { | ||
g || (T($), T(b), T(x), T(L, f), T(A, f), T(I), T(O), g = !0); | ||
}, | ||
o(h) { | ||
B(b), B($), B(C), B(I, h), B(S, h), B(E), B(A), _ = !1; | ||
o(f) { | ||
R($), R(b), R(x), R(L, f), R(A, f), R(I), R(O), g = !1; | ||
}, | ||
d(h) { | ||
h && j(t), x && x.d(), b && b.d(), $ && $.d(), C && C.d(), I && I.d(h), S && S.d(h), E && E.d(), A && A.d(); | ||
d(f) { | ||
f && j(t), C && C.d(), $ && $.d(), b && b.d(), x && x.d(), L && L.d(f), A && A.d(f), I && I.d(), O && O.d(); | ||
} | ||
}; | ||
} | ||
function Oe(o) { | ||
function Se(o) { | ||
let t, e, s; | ||
return { | ||
c() { | ||
t = U("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 = U("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>', S(t, "class", "thisway-popover-close"); | ||
}, | ||
m(n, r) { | ||
W(n, t, r), e || (s = Bt( | ||
W(n, t, r), e || (s = Rt( | ||
t, | ||
@@ -1369,3 +1367,3 @@ "click", | ||
}, | ||
p: yt, | ||
p: bt, | ||
d(n) { | ||
@@ -1376,3 +1374,3 @@ n && j(t), e = !1, s(); | ||
} | ||
function Ee(o) { | ||
function Oe(o) { | ||
let t, e; | ||
@@ -1382,3 +1380,3 @@ const s = ( | ||
o[30].title | ||
), n = bt( | ||
), n = $t( | ||
s, | ||
@@ -1388,7 +1386,7 @@ o, | ||
o[29], | ||
Te | ||
ke | ||
), r = n || _s(o); | ||
return { | ||
c() { | ||
t = U("header"), r && r.c(), P(t, "class", "thisway-popover-title"); | ||
t = U("header"), r && r.c(), S(t, "class", "thisway-popover-title"); | ||
}, | ||
@@ -1400,3 +1398,3 @@ m(i, a) { | ||
n ? n.p && (!e || a[0] & /*$$scope*/ | ||
536870912) && $t( | ||
536870912) && Ct( | ||
n, | ||
@@ -1407,3 +1405,3 @@ s, | ||
i[29], | ||
e ? xt( | ||
e ? kt( | ||
s, | ||
@@ -1414,7 +1412,7 @@ /*$$scope*/ | ||
ws | ||
) : Ct( | ||
) : xt( | ||
/*$$scope*/ | ||
i[29] | ||
), | ||
Te | ||
ke | ||
) : r && r.p && (!e || a[0] & /*$title$*/ | ||
@@ -1424,6 +1422,6 @@ 2) && r.p(i, e ? a : [-1, -1]); | ||
i(i) { | ||
e || (O(r, i), e = !0); | ||
e || (T(r, i), e = !0); | ||
}, | ||
o(i) { | ||
B(r, i), e = !1; | ||
R(r, i), e = !1; | ||
}, | ||
@@ -1439,3 +1437,3 @@ d(i) { | ||
c() { | ||
t = Vt( | ||
t = Bt( | ||
/*$title$*/ | ||
@@ -1450,3 +1448,3 @@ o[1] | ||
s[0] & /*$title$*/ | ||
2 && Ft( | ||
2 && Vt( | ||
t, | ||
@@ -1462,3 +1460,3 @@ /*$title$*/ | ||
} | ||
function Pe(o) { | ||
function Ee(o) { | ||
let t, e; | ||
@@ -1468,3 +1466,3 @@ const s = ( | ||
o[30].description | ||
), n = bt( | ||
), n = $t( | ||
s, | ||
@@ -1474,7 +1472,7 @@ o, | ||
o[29], | ||
ke | ||
xe | ||
), r = n || gs(o); | ||
return { | ||
c() { | ||
t = U("div"), r && r.c(), P(t, "class", "thisway-popover-description"); | ||
t = U("div"), r && r.c(), S(t, "class", "thisway-popover-description"); | ||
}, | ||
@@ -1486,3 +1484,3 @@ m(i, a) { | ||
n ? n.p && (!e || a[0] & /*$$scope*/ | ||
536870912) && $t( | ||
536870912) && Ct( | ||
n, | ||
@@ -1493,3 +1491,3 @@ s, | ||
i[29], | ||
e ? xt( | ||
e ? kt( | ||
s, | ||
@@ -1500,7 +1498,7 @@ /*$$scope*/ | ||
us | ||
) : Ct( | ||
) : xt( | ||
/*$$scope*/ | ||
i[29] | ||
), | ||
ke | ||
xe | ||
) : r && r.p && (!e || a[0] & /*$description$*/ | ||
@@ -1510,6 +1508,6 @@ 4) && r.p(i, e ? a : [-1, -1]); | ||
i(i) { | ||
e || (O(r, i), e = !0); | ||
e || (T(r, i), e = !0); | ||
}, | ||
o(i) { | ||
B(r, i), e = !1; | ||
R(r, i), e = !1; | ||
}, | ||
@@ -1525,3 +1523,3 @@ d(i) { | ||
c() { | ||
t = Vt( | ||
t = Bt( | ||
/*$description$*/ | ||
@@ -1536,3 +1534,3 @@ o[2] | ||
s[0] & /*$description$*/ | ||
4 && Ft( | ||
4 && Vt( | ||
t, | ||
@@ -1548,5 +1546,5 @@ /*$description$*/ | ||
} | ||
function Ae(o) { | ||
function Pe(o) { | ||
let t, e; | ||
return t = new oo({}), { | ||
return t = new so({}), { | ||
c() { | ||
@@ -1559,6 +1557,6 @@ Ot(t.$$.fragment); | ||
i(s) { | ||
e || (O(t.$$.fragment, s), e = !0); | ||
e || (T(t.$$.fragment, s), e = !0); | ||
}, | ||
o(s) { | ||
B(t.$$.fragment, s), e = !1; | ||
R(t.$$.fragment, s), e = !1; | ||
}, | ||
@@ -1570,5 +1568,5 @@ d(s) { | ||
} | ||
function Ne(o) { | ||
function Ae(o) { | ||
let t, e; | ||
return t = new oo({}), { | ||
return t = new so({}), { | ||
c() { | ||
@@ -1581,6 +1579,6 @@ Ot(t.$$.fragment); | ||
i(s) { | ||
e || (O(t.$$.fragment, s), e = !0); | ||
e || (T(t.$$.fragment, s), e = !0); | ||
}, | ||
o(s) { | ||
B(t.$$.fragment, s), e = !1; | ||
R(t.$$.fragment, s), e = !1; | ||
}, | ||
@@ -1592,13 +1590,13 @@ d(s) { | ||
} | ||
function Ie(o) { | ||
function Ne(o) { | ||
let t, e, s, n = ( | ||
/*$previousButtonVisible$*/ | ||
o[9] && Me(o) | ||
o[9] && Ie(o) | ||
), r = ( | ||
/*$hasSteps$*/ | ||
o[11] && Le(o) | ||
o[11] && Me(o) | ||
); | ||
return { | ||
c() { | ||
n && n.c(), t = tt(), r && r.c(), e = Gt(); | ||
n && n.c(), t = Q(), r && r.c(), e = Xt(); | ||
}, | ||
@@ -1611,15 +1609,15 @@ m(i, a) { | ||
i[9] ? n ? (n.p(i, a), a[0] & /*$previousButtonVisible$*/ | ||
512 && O(n, 1)) : (n = Me(i), n.c(), O(n, 1), n.m(t.parentNode, t)) : n && (at(), B(n, 1, 1, () => { | ||
512 && T(n, 1)) : (n = Ie(i), n.c(), T(n, 1), n.m(t.parentNode, t)) : n && (ct(), R(n, 1, 1, () => { | ||
n = null; | ||
}), lt()), /*$hasSteps$*/ | ||
}), pt()), /*$hasSteps$*/ | ||
i[11] ? r ? (r.p(i, a), a[0] & /*$hasSteps$*/ | ||
2048 && O(r, 1)) : (r = Le(i), r.c(), O(r, 1), r.m(e.parentNode, e)) : r && (at(), B(r, 1, 1, () => { | ||
2048 && T(r, 1)) : (r = Me(i), r.c(), T(r, 1), r.m(e.parentNode, e)) : r && (ct(), R(r, 1, 1, () => { | ||
r = null; | ||
}), lt()); | ||
}), pt()); | ||
}, | ||
i(i) { | ||
s || (O(n), O(r), s = !0); | ||
s || (T(n), T(r), s = !0); | ||
}, | ||
o(i) { | ||
B(n), B(r), s = !1; | ||
R(n), R(r), s = !1; | ||
}, | ||
@@ -1631,3 +1629,3 @@ d(i) { | ||
} | ||
function Me(o) { | ||
function Ie(o) { | ||
let t, e, s, n; | ||
@@ -1637,3 +1635,3 @@ const r = ( | ||
o[30].prevText | ||
), i = bt( | ||
), i = $t( | ||
r, | ||
@@ -1643,10 +1641,10 @@ o, | ||
o[29], | ||
Ce | ||
$e | ||
), a = i || ys(o); | ||
return { | ||
c() { | ||
t = U("button"), a && a.c(), P(t, "class", "thisway-popover-prev"); | ||
t = U("button"), a && a.c(), S(t, "class", "thisway-popover-prev"); | ||
}, | ||
m(l, c) { | ||
W(l, t, c), a && a.m(t, null), e = !0, s || (n = Bt( | ||
W(l, t, c), a && a.m(t, null), e = !0, s || (n = Rt( | ||
t, | ||
@@ -1660,3 +1658,3 @@ "click", | ||
i ? i.p && (!e || c[0] & /*$$scope*/ | ||
536870912) && $t( | ||
536870912) && Ct( | ||
i, | ||
@@ -1667,3 +1665,3 @@ r, | ||
l[29], | ||
e ? xt( | ||
e ? kt( | ||
r, | ||
@@ -1674,7 +1672,7 @@ /*$$scope*/ | ||
fs | ||
) : Ct( | ||
) : xt( | ||
/*$$scope*/ | ||
l[29] | ||
), | ||
Ce | ||
$e | ||
) : a && a.p && (!e || c[0] & /*$previousText$, $layout$*/ | ||
@@ -1684,6 +1682,6 @@ 1040) && a.p(l, e ? c : [-1, -1]); | ||
i(l) { | ||
e || (O(a, l), e = !0); | ||
e || (T(a, l), e = !0); | ||
}, | ||
o(l) { | ||
B(a, l), e = !1; | ||
R(a, l), e = !1; | ||
}, | ||
@@ -1695,12 +1693,12 @@ d(l) { | ||
} | ||
function vs(o) { | ||
function ms(o) { | ||
let t, e; | ||
return { | ||
c() { | ||
t = zt("svg"), e = zt("path"), P(e, "d", "M19 12H6M12 5l-7 7 7 7"), Y(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 = Yt("svg"), e = Yt("path"), S(e, "d", "M19 12H6M12 5l-7 7 7 7"), Y(t, "pointer-events", "none"), S(t, "width", "20"), S(t, "height", "14"), S(t, "xmlns", "http://www.w3.org/2000/svg"), S(t, "viewBox", "0 0 24 24"), S(t, "fill", "none"), S(t, "stroke", "currentColor"), S(t, "stroke-width", "2"), S(t, "stroke-linecap", "round"), S(t, "stroke-linejoin", "round"); | ||
}, | ||
m(s, n) { | ||
W(s, t, n), K(t, e); | ||
W(s, t, n), X(t, e); | ||
}, | ||
p: yt, | ||
p: bt, | ||
d(s) { | ||
@@ -1711,7 +1709,7 @@ s && j(t); | ||
} | ||
function ms(o) { | ||
function vs(o) { | ||
let t; | ||
return { | ||
c() { | ||
t = Vt( | ||
t = Bt( | ||
/*$previousText$*/ | ||
@@ -1726,3 +1724,3 @@ o[10] | ||
s[0] & /*$previousText$*/ | ||
1024 && Ft( | ||
1024 && Vt( | ||
t, | ||
@@ -1743,3 +1741,3 @@ /*$previousText$*/ | ||
/*$layout$*/ | ||
r[4] !== je ? ms : vs | ||
r[4] !== We ? vs : ms | ||
); | ||
@@ -1750,3 +1748,3 @@ } | ||
c() { | ||
n.c(), t = Gt(); | ||
n.c(), t = Xt(); | ||
}, | ||
@@ -1764,3 +1762,3 @@ m(r, i) { | ||
} | ||
function Le(o) { | ||
function Me(o) { | ||
let t, e, s, n; | ||
@@ -1770,3 +1768,3 @@ const r = ( | ||
o[30].nextText | ||
), i = bt( | ||
), i = $t( | ||
r, | ||
@@ -1776,10 +1774,10 @@ o, | ||
o[29], | ||
$e | ||
be | ||
), a = i || bs(o); | ||
return { | ||
c() { | ||
t = U("button"), a && a.c(), P(t, "class", "thisway-popover-next"); | ||
t = U("button"), a && a.c(), S(t, "class", "thisway-popover-next"); | ||
}, | ||
m(l, c) { | ||
W(l, t, c), a && a.m(t, null), e = !0, s || (n = Bt( | ||
W(l, t, c), a && a.m(t, null), e = !0, s || (n = Rt( | ||
t, | ||
@@ -1793,3 +1791,3 @@ "click", | ||
i ? i.p && (!e || c[0] & /*$$scope*/ | ||
536870912) && $t( | ||
536870912) && Ct( | ||
i, | ||
@@ -1800,3 +1798,3 @@ r, | ||
l[29], | ||
e ? xt( | ||
e ? kt( | ||
r, | ||
@@ -1807,7 +1805,7 @@ /*$$scope*/ | ||
hs | ||
) : Ct( | ||
) : xt( | ||
/*$$scope*/ | ||
l[29] | ||
), | ||
$e | ||
be | ||
) : a && a.p && (!e || c[0] & /*$nextButtonText$*/ | ||
@@ -1817,6 +1815,6 @@ 4096) && a.p(l, e ? c : [-1, -1]); | ||
i(l) { | ||
e || (O(a, l), e = !0); | ||
e || (T(a, l), e = !0); | ||
}, | ||
o(l) { | ||
B(a, l), e = !1; | ||
R(a, l), e = !1; | ||
}, | ||
@@ -1832,3 +1830,3 @@ d(l) { | ||
c() { | ||
t = Vt( | ||
t = Bt( | ||
/*$nextButtonText$*/ | ||
@@ -1843,3 +1841,3 @@ o[12] | ||
s[0] & /*$nextButtonText$*/ | ||
4096 && Ft( | ||
4096 && Vt( | ||
t, | ||
@@ -1861,7 +1859,7 @@ /*$nextButtonText$*/ | ||
o[28].title || /*$$slots*/ | ||
o[28].description) && Se(o) | ||
o[28].description) && Te(o) | ||
); | ||
return { | ||
c() { | ||
s && s.c(), t = Gt(); | ||
s && s.c(), t = Xt(); | ||
}, | ||
@@ -1877,11 +1875,11 @@ m(n, r) { | ||
n[28].description ? s ? (s.p(n, r), r[0] & /*$title$, $description$, $$slots*/ | ||
268435462 && O(s, 1)) : (s = Se(n), s.c(), O(s, 1), s.m(t.parentNode, t)) : s && (at(), B(s, 1, 1, () => { | ||
268435462 && T(s, 1)) : (s = Te(n), s.c(), T(s, 1), s.m(t.parentNode, t)) : s && (ct(), R(s, 1, 1, () => { | ||
s = null; | ||
}), lt()); | ||
}), pt()); | ||
}, | ||
i(n) { | ||
e || (O(s), e = !0); | ||
e || (T(s), e = !0); | ||
}, | ||
o(n) { | ||
B(s), e = !1; | ||
R(s), e = !1; | ||
}, | ||
@@ -1894,49 +1892,49 @@ d(n) { | ||
function Cs(o, t, e) { | ||
let s, n, r, i, a, l, c, u, p, d, m, f, { $$slots: w = {}, $$scope: _ } = t; | ||
const x = $o(w); | ||
let { cssClassName: b = "" } = t; | ||
const $ = lo(), C = V(Dt), R = Do(), I = V(ne), N = V(Xe), S = V(ee), E = L(N, (g) => { | ||
let s, n, r, i, a, l, c, u, p, d, v, h, { $$slots: _ = {}, $$scope: g } = t; | ||
const C = Co(_); | ||
let { cssClassName: $ = "" } = t; | ||
const b = co(), x = H(Ft), B = Fo(), L = H(ee), P = H(oe), A = H(Qt), I = M(P, (w) => { | ||
var J; | ||
return `thisway-popover-${(J = g == null ? void 0 : g.orientation) == null ? void 0 : J.toLowerCase()}`; | ||
return `thisway-popover-${(J = w == null ? void 0 : w.orientation) == null ? void 0 : J.toLowerCase()}`; | ||
}); | ||
M(o, E, (g) => e(3, r = g)); | ||
const A = L(N, (g) => `thisway-popover__arrow-${g == null ? void 0 : g.alignment.toLowerCase()}`); | ||
M(o, A, (g) => e(5, a = g)); | ||
const h = le(), T = L(I, (g) => g > 1); | ||
M(o, T, (g) => e(11, m = g)); | ||
const q = L([T, R], ([g, J]) => g && (J || 0) > 0); | ||
M(o, q, (g) => e(9, p = g)); | ||
const pt = D(h, "title"); | ||
M(o, pt, (g) => e(1, s = g)); | ||
const dt = D(h, "description"); | ||
M(o, dt, (g) => e(2, n = g)); | ||
const ut = D(h, "showCloseBtn"); | ||
M(o, ut, (g) => e(6, l = g)); | ||
const y = D(h, "showCtrlBtns"); | ||
M(o, y, (g) => e(8, u = g)); | ||
const H = D(h, "showProgress", !0); | ||
M(o, H, (g) => e(7, c = g)); | ||
const X = D(h, "prevBtnText"); | ||
M(o, X, (g) => e(10, d = g)); | ||
const Z = D(S, "layout", St); | ||
M(o, Z, (g) => e(4, i = g)); | ||
const G = Qe(C.store, R), F = L([h, G, R, Z], ([g, J, v, z]) => { | ||
var rt; | ||
if (v === 0) | ||
return g.startBtnText; | ||
N(o, I, (w) => e(3, r = w)); | ||
const O = M(P, (w) => `thisway-popover__arrow-${w == null ? void 0 : w.alignment.toLowerCase()}`); | ||
N(o, O, (w) => e(5, a = w)); | ||
const f = Je(), E = M(L, (w) => w > 1); | ||
N(o, E, (w) => e(11, v = w)); | ||
const q = M([E, B], ([w, J]) => w && (J || 0) > 0); | ||
N(o, q, (w) => e(9, p = w)); | ||
const st = V(f, "title"); | ||
N(o, st, (w) => e(1, s = w)); | ||
const Z = V(f, "description"); | ||
N(o, Z, (w) => e(2, n = w)); | ||
const ft = V(f, "showCloseBtn"); | ||
N(o, ft, (w) => e(6, l = w)); | ||
const nt = V(f, "showCtrlBtns"); | ||
N(o, nt, (w) => e(8, u = w)); | ||
const y = V(f, "showProgress", !0); | ||
N(o, y, (w) => e(7, c = w)); | ||
const F = V(f, "prevBtnText"); | ||
N(o, F, (w) => e(10, d = w)); | ||
const z = V(A, "layout", St); | ||
N(o, z, (w) => e(4, i = w)); | ||
const tt = to(x.store, B), K = M([f, tt, B, z], ([w, J, _t, m]) => { | ||
var G; | ||
if (_t === 0) | ||
return w.startBtnText; | ||
if (J) | ||
if (z === je) { | ||
const Q = ((rt = J.popover) == null ? void 0 : rt.title) ?? ""; | ||
return `${g.nextBtnText} ${Q}`; | ||
if (m === We) { | ||
const at = ((G = J.popover) == null ? void 0 : G.title) ?? ""; | ||
return `${w.nextBtnText} ${at}`; | ||
} else | ||
return g.nextBtnText; | ||
return w.nextBtnText; | ||
else | ||
return g.doneBtnText; | ||
return w.doneBtnText; | ||
}); | ||
M(o, F, (g) => e(12, f = g)); | ||
const nt = () => $("close"), ht = () => $("previous"), st = () => $("next"); | ||
return o.$$set = (g) => { | ||
"cssClassName" in g && e(0, b = g.cssClassName), "$$scope" in g && e(29, _ = g.$$scope); | ||
N(o, K, (w) => e(12, h = w)); | ||
const D = () => b("close"), it = () => b("previous"), dt = () => b("next"); | ||
return o.$$set = (w) => { | ||
"cssClassName" in w && e(0, $ = w.cssClassName), "$$scope" in w && e(29, g = w.$$scope); | ||
}, [ | ||
b, | ||
$, | ||
s, | ||
@@ -1952,27 +1950,27 @@ n, | ||
d, | ||
m, | ||
f, | ||
v, | ||
h, | ||
I, | ||
O, | ||
E, | ||
A, | ||
T, | ||
q, | ||
pt, | ||
dt, | ||
ut, | ||
st, | ||
Z, | ||
ft, | ||
nt, | ||
y, | ||
H, | ||
X, | ||
Z, | ||
F, | ||
nt, | ||
ht, | ||
st, | ||
x, | ||
_, | ||
w | ||
z, | ||
K, | ||
D, | ||
it, | ||
dt, | ||
C, | ||
g, | ||
_ | ||
]; | ||
} | ||
class xs extends Mt { | ||
class xs extends It { | ||
constructor(t) { | ||
super(), Lt(this, t, Cs, $s, Rt, { cssClassName: 0 }, ps, [-1, -1]); | ||
super(), Mt(this, t, Cs, $s, Lt, { cssClassName: 0 }, ps, [-1, -1]); | ||
} | ||
@@ -1986,3 +1984,3 @@ } | ||
getTotalCount(t) { | ||
return L(t.effectiveSteps$, (e) => e.length); | ||
return M(t.effectiveSteps$, (e) => e.length); | ||
} | ||
@@ -1997,5 +1995,5 @@ async waitForElement(t) { | ||
} | ||
class Ts extends is { | ||
class Ts extends ns { | ||
constructor(t) { | ||
const { steps: e } = t, s = mt(t), n = new ks(s); | ||
const { steps: e } = t, s = wt(t), n = new ks(s); | ||
for (const r of [ | ||
@@ -2014,3 +2012,3 @@ "beforeStepChange", | ||
} | ||
super(Mo(Ss(e), void 0), n, Ge(), s); | ||
super(Mo(Ss(e), void 0), n, Ke(), s); | ||
} | ||
@@ -2036,3 +2034,3 @@ } | ||
}); | ||
}, Ds = (o) => { | ||
}, Ws = (o) => { | ||
const t = new Ts({ | ||
@@ -2049,48 +2047,48 @@ steps: [ | ||
function Os(o) { | ||
const t = V(se), { onMount: e, onDestroy: s } = V(No), n = t.subscribe((r) => { | ||
const t = H(te), { onMount: e, onDestroy: s } = H(No), n = t.subscribe((r) => { | ||
r ? e(r) : s(); | ||
}); | ||
return Be(() => { | ||
return Re(() => { | ||
n(), s(); | ||
}), []; | ||
} | ||
class Hs extends Mt { | ||
class js extends It { | ||
constructor(t) { | ||
super(), Lt(this, t, Os, null, Rt, {}); | ||
super(), Mt(this, t, Os, null, Lt, {}); | ||
} | ||
} | ||
export { | ||
Xt as DelegateContext, | ||
oe as ElementBoundingContext, | ||
se as DelegateContext, | ||
Xe as ElementBoundingContext, | ||
No as ForeignViewContext, | ||
Hs as ForeignViewHost, | ||
ee as OptionsContext, | ||
Xe as PlacementContext, | ||
js as ForeignViewHost, | ||
Qt as OptionsContext, | ||
oe as PlacementContext, | ||
xs as PopoverCard, | ||
se as PopoverContainerContext, | ||
re as PopoverSizeContext, | ||
Ut as RenderStateContext, | ||
qt as StepOptionsContext, | ||
te as PopoverContainerContext, | ||
ze as PopoverSizeContext, | ||
re as RenderStateContext, | ||
zt as StepOptionsContext, | ||
Io as StepsController, | ||
Ts as ThisWay, | ||
ks as ThisWayDefaultDelegate, | ||
ne as TotalStepCountContext, | ||
is as Tour, | ||
Dt as TourContext, | ||
Ge as createContexts, | ||
ee as TotalStepCountContext, | ||
ns as Tour, | ||
Ft as TourContext, | ||
Ke as createContexts, | ||
Mo as createStepsStore, | ||
Bo as defaultKeydownAction, | ||
Ro as defaultKeydownAction, | ||
ot as defineContext, | ||
Qt as findStepIndex, | ||
V as getContext, | ||
Ho as getHighlightOptions, | ||
Qe as getNextStep, | ||
le as getPopoverOptions, | ||
Do as getRenderIndex, | ||
Je as getTheme, | ||
Ds as highlight, | ||
Fo as mergeStepOption, | ||
Wo as normalizeTheme, | ||
eo as parsePlacement, | ||
Ao as setContext | ||
Zt as findStepIndex, | ||
H as getContext, | ||
Hs as getHighlightOptions, | ||
to as getNextStep, | ||
Je as getPopoverOptions, | ||
Fo as getRenderIndex, | ||
Qe as getTheme, | ||
Ws as highlight, | ||
Vo as mergeStepOption, | ||
Do as normalizeTheme, | ||
oo as parsePlacement, | ||
Ds as setContext | ||
}; |
@@ -5,2 +5,2 @@ import type { NoElement, Rect, Step } from '@thisway/base'; | ||
import type { IStepOptionsContext } from './context'; | ||
export declare function focusElement(element: Element | NoElement, step: Step, popoverSize: Size, stepOptionsContext: IStepOptionsContext, transform: Transform, boundary: Element | null | undefined, updatePositionSignal$: Readable<number>, previousValue: Rect | NoElement | undefined, abortController: AbortController): Promise<Readable<Readable<Rect | NoElement> | undefined>>; | ||
export declare function focusElement(element: Element | NoElement, step: Step, popoverSize: Size, stepOptionsContext: IStepOptionsContext, transform: Readonly<Transform>, boundary: Element | null | undefined, updatePositionSignal$: Readable<number>, previousValue: Rect | NoElement | undefined, abortController: AbortController): Promise<Readable<Readable<Rect | NoElement> | undefined>>; |
import type { Rect } from '@thisway/base'; | ||
import { type Size, type Transform } from '@thisway/utils'; | ||
import { type Size } from '@thisway/utils'; | ||
export type HighlightRect = Rect & { | ||
@@ -7,2 +7,2 @@ borderWidth: number; | ||
}; | ||
export declare const calculateMaskCommand: (bounding: HighlightRect, showBorder: boolean, viewportSize: Size, transform: Transform) => string; | ||
export declare const calculateMaskCommand: (bounding: HighlightRect, showBorder: boolean, viewportSize: Size, transform: readonly [number, number, number, number, number, number]) => string; |
@@ -1,4 +0,6 @@ | ||
import type { Alignment, HighlightOptionsWithDefaultValues, IComputePlacementState, NoElement, Orientation, PopoverPlacement, PopoverPosition, PopoverPositionParsed, Rect } from '@thisway/base'; | ||
import type { Alignment, HighlightOptionsWithDefaultValues, IComputePlacementState, ITourDelegate, NoElement, Orientation, PopoverPlacement, PopoverPosition, PopoverPositionParsed, Rect } from '@thisway/base'; | ||
import { NO_ELEMENT } from '@thisway/base'; | ||
import { type Size } from '@thisway/utils'; | ||
import type { Readable } from 'svelte/store'; | ||
import { type IStepOptionsContext, type RenderState } from './context'; | ||
export declare const parsePlacement: (position: PopoverPosition | PopoverPositionParsed | string | undefined) => PopoverPositionParsed; | ||
@@ -22,2 +24,2 @@ export declare const getOrientation: (elementRect: Rect, popoverRect: Size, preferredOrientation: Orientation | undefined, offsetX: number, offsetY: number, viewport: Size) => Orientation; | ||
}; | ||
export declare const computePlacement: () => Readable<IComputePlacementState | undefined>; | ||
export declare const makeComputePlacement: (delegate: ITourDelegate, stepOptionsContext: IStepOptionsContext) => ({ step }: RenderState, elementBounding$: Readable<typeof NO_ELEMENT | Rect> | undefined, popoverSize: Size, transform: readonly [number, number, number, number, number, number]) => IComputePlacementState | undefined; |
import { type IStepsStore, type ITourDelegate, type Step, type TourAction, type TourOptions } from '@thisway/base'; | ||
import type { SvelteComponent } from 'svelte'; | ||
import type { Readable, Unsubscriber } from 'svelte/store'; | ||
import type { ITourContexts, RenderState } from './context'; | ||
import { type ITourContexts, type RenderState } from './context'; | ||
import { StepsController } from './steps.controller'; | ||
@@ -6,0 +6,0 @@ export declare class Tour<T extends Step = Step> extends StepsController<T> { |
@@ -7,3 +7,3 @@ /** | ||
import { type Transform } from '@thisway/utils'; | ||
export declare function transformRect(rect: Rect, transform: Transform): Rect; | ||
export declare const NOOP_TRANSFORM$: import("svelte/store").Readable<Transform>; | ||
export declare function transformRect(rect: Rect, transform: Readonly<Transform>): Rect; | ||
export declare const NOOP_TRANSFORM$: import("svelte/store").Readable<readonly [number, number, number, number, number, number]>; |
import type { ITourDelegate, PopoverPlacement } from '@thisway/base'; | ||
import { type Size } from '@thisway/utils'; | ||
export declare const getViewportSize: (delegate: ITourDelegate) => Size; | ||
export declare const getViewportSize: (delegate: ITourDelegate, transform: readonly [number, number, number, number, number, number]) => Size; | ||
export declare const styleFromPlacement: ({ x, y, ...others }: PopoverPlacement) => { | ||
@@ -5,0 +5,0 @@ visibility: string; |
{ | ||
"name": "@thisway/next", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"type": "module", | ||
"dependencies": { | ||
"@thisway/base": "^0.7.0", | ||
"@thisway/base": "^0.8.0", | ||
"@thisway/scroll": "^0.2.0", | ||
@@ -8,0 +8,0 @@ "@thisway/utils": "^0.4.0", |
Sorry, the diff of this file is not supported yet
110720
2392
+ Added@thisway/base@0.8.0(transitive)
- Removed@thisway/base@0.7.0(transitive)
Updated@thisway/base@^0.8.0