@thisway/next
Advanced tools
Comparing version 0.10.1-beta.0 to 0.10.1-beta.10
1849
index.js
@@ -1,27 +0,27 @@ | ||
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 _t, transformY as gt, 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, finite 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 L, readable as mt } 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 vo, ORIENTATIONS_Y as mo, popoverDefaultValues as yo, highlightDefaultValues as bo, LAYOUT_MODE_1 as St, LAYOUT_MODE_3 as We } from "@thisway/base"; | ||
var ao = Object.defineProperty; | ||
var lo = (o, t, e) => t in o ? ao(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e; | ||
var st = (o, t, e) => (lo(o, typeof t != "symbol" ? t + "" : t, e), e); | ||
import * as Me from "svelte"; | ||
import { onMount as co, onDestroy as Le, createEventDispatcher as po } from "svelte"; | ||
import { isValidNumber as Dt, toPx as at, isElement as Re, isTextInputElement as Be, deltaTransform as Zt, transformX as Xt, transformY as zt, defaults as ae, NOOP_TRANSFORM as ho, pick$ as F, clamp as Ft, finite as le, animationFrameThrottle as ce, resizeObserver as Ve, reverseX as pe, reverseY as he, getElementsBounding as fo, getFrameElement as uo, EMPTY_SIZE as wo } from "@thisway/utils"; | ||
import { get as O, writable as wt, derived as L, readable as gt } from "svelte/store"; | ||
import { PRIMARY_COLOR_WHITE as Fe, PRIMARY_COLOR_BLACK as De, PRIMARY_COLOR_BLUE as go, EMPTY_POINT as _o, POSITION_AUTO as Kt, ORIENTATIONS as fe, ALIGNMENTS as vo, NO_ELEMENT as pt, ORIENTATIONS_TO_START_END as mo, ORIENTATIONS_Y as yo, popoverDefaultValues as bo, highlightDefaultValues as $o, LAYOUT_MODE_1 as xt, LAYOUT_MODE_3 as He } from "@thisway/base"; | ||
export * from "@thisway/base"; | ||
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 I, 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 B, 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 { SvelteComponent as Et, init as At, safe_not_equal as Nt, append_styles as jt, space as et, empty as Wt, insert as j, noop as vt, detach as W, component_subscribe as I, svg_element as Ht, attr as P, set_style as Y, append as K, listen as It, element as U, action_destroyer as je, is_function as We, binding_callbacks as Ye, construct_svelte_component as de, create_component as kt, mount_component as Tt, group_outros as lt, transition_out as R, destroy_component as St, check_outros as ct, transition_in as S, run_all as Co, text as Mt, set_data as Lt, compute_slots as xo, create_slot as mt, update_slot_base as yt, get_all_dirty_from_scope as bt, get_slot_changes as $t } from "svelte/internal"; | ||
import "svelte/internal/disclose-version"; | ||
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 Eo, computeFrameActions as Po, transformNestedBounding as Ao } from "@thisway/scroll"; | ||
const ot = (o) => Symbol(o), H = (o) => { | ||
const t = Le.getContext(o); | ||
import { getHighlightOptions as ko, NO_ELEMENT as To, CLICK_MASK_ACTION_NEXT as So, CLICK_MASK_ACTION_CLOSE as Oo, getRenderIndex as Po } from "@thisway/next"; | ||
import { tweened as Ot } from "svelte/motion"; | ||
import { cubicOut as Pt } from "svelte/easing"; | ||
import { buildScrollFrames as Eo, computeFrameActions as Ao, transformNestedBounding as No } from "@thisway/scroll"; | ||
const rt = (o) => Symbol(o), H = (o) => { | ||
const t = Me.getContext(o); | ||
if (!t) | ||
throw new Error(`Context ${o.description} not exist`); | ||
return t; | ||
}, 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 { | ||
}, Hs = (o, t) => { | ||
Me.setContext(o, t); | ||
}, Ge = (o) => new Map(o), Rt = rt("Tour"), Jt = rt("Options"), Ke = rt("ElementBounding"), Qt = rt("PopoverContainer"), Xe = rt("PopoverSize"), te = rt("TotalStepCount"), ee = rt("PopoverPosition"), oe = rt("Delegate"), Io = rt("ForeignView"), se = rt("RenderState"), Yt = rt("StepOptions"); | ||
class Mo { | ||
constructor(t) { | ||
et(this, "store"); | ||
st(this, "store"); | ||
this.store = t; | ||
@@ -35,3 +35,3 @@ } | ||
getAllSteps(t = !1) { | ||
return t ? k(this.store.steps$) : k(this.store.effectiveSteps$); | ||
return t ? O(this.store.steps$) : O(this.store.effectiveSteps$); | ||
} | ||
@@ -43,3 +43,3 @@ /** | ||
getActiveStep() { | ||
return { step: k(this.store.activeStep$), index: k(this.store.activeIndex$) }; | ||
return { step: O(this.store.activeStep$), index: O(this.store.activeIndex$) }; | ||
} | ||
@@ -56,14 +56,14 @@ // public getStep(id: string): Step | undefined { | ||
const { effectiveSteps$: t } = this.store; | ||
return k(t)[0]; | ||
return O(t)[0]; | ||
} | ||
getLastStep() { | ||
const { effectiveSteps$: t } = this.store; | ||
return k(t).at(-1); | ||
return O(t).at(-1); | ||
} | ||
goPrevStep() { | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, s = k(t); | ||
if (!jt(s) || s < 1) | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, s = O(t); | ||
if (!Dt(s) || s < 1) | ||
return; | ||
const n = k(e)[s - 1]; | ||
this.goStep(n.id); | ||
const i = O(e)[s - 1]; | ||
this.goStep(i.id); | ||
} | ||
@@ -86,11 +86,11 @@ goNextStep() { | ||
isActive() { | ||
return k(this.store.activeStep$) !== void 0; | ||
return O(this.store.activeStep$) !== void 0; | ||
} | ||
getNextStepId() { | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, s = k(t), n = k(e); | ||
if (!(!jt(s) || s === n.length - 1)) | ||
return n[s + 1].id; | ||
const { effectiveIndex$: t, effectiveSteps$: e } = this.store, s = O(t), i = O(e); | ||
if (!(!Dt(s) || s === i.length - 1)) | ||
return i[s + 1].id; | ||
} | ||
} | ||
function Zt([o, t]) { | ||
function Ut([o, t]) { | ||
if (t == null || o.length === 0) | ||
@@ -102,24 +102,27 @@ return; | ||
} | ||
const Mo = (o, t) => { | ||
const e = wt(o), s = wt(t), n = L(e, (l) => l.filter((c) => !c.isHidden)), r = L([e, s], Zt), i = L([n, s], Zt), a = L([e, r], ([l, c]) => c != null ? l[c] : void 0); | ||
const Lo = (o, t) => { | ||
const e = wt(o), s = wt(t), i = L(e, (l) => l.filter((p) => !p.isHidden)), r = L([e, s], Ut), n = L([i, s], Ut), a = L([e, r], ([l, p]) => p != null ? l[p] : void 0); | ||
return { | ||
steps$: e, | ||
activeStepId$: s, | ||
effectiveSteps$: n, | ||
effectiveSteps$: i, | ||
activeIndex$: r, | ||
effectiveIndex$: i, | ||
effectiveIndex$: n, | ||
activeStep$: a | ||
}; | ||
}; | ||
function Tt() { | ||
function Ct() { | ||
} | ||
const ne = (o, t) => { | ||
const e = o.window || window, s = _t(e.document.documentElement.clientWidth, 0, t), n = gt(0, e.document.documentElement.clientHeight, t); | ||
function ze(o) { | ||
return o.container || document.body; | ||
} | ||
const re = (o) => { | ||
const t = ze(o), e = t.clientWidth, s = t.clientHeight; | ||
return { | ||
width: s, | ||
height: n | ||
width: e, | ||
height: s | ||
}; | ||
}, Lo = ({ x: o, y: t, ...e }) => Object.assign(e, { | ||
left: lt(o), | ||
top: lt(t) | ||
}, Ro = ({ x: o, y: t, ...e }) => Object.assign(e, { | ||
left: at(o), | ||
top: at(t) | ||
}); | ||
@@ -140,5 +143,5 @@ function Ue(o) { | ||
} | ||
function yt(o, t, e) { | ||
function _t(o, t, e) { | ||
if (!o) | ||
return Tt; | ||
return Ct; | ||
const s = { | ||
@@ -152,4 +155,4 @@ passive: !0, | ||
} | ||
function Ro(o) { | ||
if (!(qe(o.target) && Be(o.target) && Ve(o.target))) { | ||
function Bo(o) { | ||
if (!(qe(o.target) && Re(o.target) && Be(o.target))) { | ||
if (o.key === "ArrowRight") | ||
@@ -161,16 +164,20 @@ return "next"; | ||
} | ||
const Bo = (o, t, e, s) => { | ||
const { x: n, y: r, padding: i, borderWidth: a } = o, l = Gt(s); | ||
let c = _t(i, 0, l), u = gt(0, i, l); | ||
t && (c += a, u += a); | ||
const f = a * 2, d = n - c + f, g = r - u, p = o.width + (c - f) * 2, _ = o.height + (u - f) * 2, v = e.width, $ = e.height; | ||
return `M${v},0L0,0L0,${$}L${v},${$}L${v},0ZM${d},${g}h${p}a${f},${f} 0 0 1 ${f},${f}v${_}a${f},${f} 0 0 1 -${f},${f}h-${p}a${f},${f} 0 0 1 -${f},-${f}v-${_}a${f},${f} 0 0 1 ${f},-${f}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 L([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; | ||
function ne(o, t) { | ||
const e = Zt(t), s = Xt(o, 0, e), i = zt(0, o, e); | ||
return [s, i]; | ||
} | ||
const Vo = (o, t, e, s) => { | ||
const { x: i, y: r, padding: n, borderWidth: a } = o; | ||
let [l, p] = ne(n, s); | ||
t && (l += a, p += a); | ||
const c = a * 2, b = i - l + c, u = r - p, _ = o.width + (l - c) * 2, h = o.height + (p - c) * 2, w = e.width, v = e.height; | ||
return `M${w},0L0,0L0,${v}L${w},${v}L${w},0ZM${b},${u}h${_}a${c},${c} 0 0 1 ${c},${c}v${h}a${c},${c} 0 0 1 -${c},${c}h-${_}a${c},${c} 0 0 1 -${c},-${c}v-${h}a${c},${c} 0 0 1 ${c},-${c}z`; | ||
}, Ze = (o, t = o) => o === Fe ? De : t, Fo = (o, t, e) => { | ||
const s = ae({ ...t }, o); | ||
return e ? ae({ ...e }, s) : s; | ||
}, Do = () => { | ||
const { effectiveSteps$: o } = H(Rt).store, t = H(se); | ||
return L([o, t], ([e, { step: s }]) => Ut([e, s == null ? void 0 : s.id])); | ||
}, Je = () => H(Yt).popover, js = () => H(Yt).highlight, Ho = (o) => { | ||
const t = (o == null ? void 0 : o.primaryColor) || go, e = (o == null ? void 0 : o.textColor) || Ze(t, Fe), s = (o == null ? void 0 : o.descColor) || De; | ||
return { | ||
@@ -181,30 +188,30 @@ primaryColor: t, | ||
}; | ||
}, Qe = () => H(zt).theme, to = (o, t) => { | ||
}, Qe = () => H(Yt).theme, to = (o, t) => { | ||
const { effectiveSteps$: e } = o; | ||
return L([t, e], ([s, n]) => jt(s) ? n.at(s + 1) : void 0); | ||
}, { assign: we } = Object, eo = (o, t) => (we(o.style, t), { | ||
return L([t, e], ([s, i]) => Dt(s) ? i.at(s + 1) : void 0); | ||
}, { assign: ue } = Object, eo = (o, t) => (ue(o.style, t), { | ||
update(e) { | ||
we(o.style, e); | ||
ue(o.style, e); | ||
} | ||
}); | ||
function Ho(o, t) { | ||
let { x: e, y: s, width: n, height: r } = o; | ||
e = _t(e, s, t), s = gt(e, s, t); | ||
const i = Gt(t); | ||
return n = _t(n, 0, i), r = gt(0, r, i), { | ||
function jo(o, t) { | ||
let { x: e, y: s, width: i, height: r } = o; | ||
e = Xt(e, s, t), s = zt(e, s, t); | ||
const n = Zt(t); | ||
return i = Xt(i, 0, n), r = zt(0, r, n), { | ||
x: e, | ||
y: s, | ||
width: n, | ||
width: i, | ||
height: r | ||
}; | ||
} | ||
const ae = mt(po); | ||
const oo = gt(ho); | ||
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)}}"); | ||
jt(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 _e(o) { | ||
let t, e, s, n; | ||
function we(o) { | ||
let t, e, s, i; | ||
return { | ||
c() { | ||
t = Yt("svg"), e = Yt("path"), S( | ||
t = Ht("svg"), e = Ht("path"), P( | ||
e, | ||
@@ -219,6 +226,6 @@ "d", | ||
o[3] | ||
), S(t, "class", "thisway-mask"), S(t, "role", "presentation"), S(t, "width", "100%"), S(t, "height", "100%"); | ||
), P(t, "class", "thisway-mask"), P(t, "role", "presentation"), P(t, "width", "100%"), P(t, "height", "100%"); | ||
}, | ||
m(r, i) { | ||
W(r, t, i), X(t, e), o[19](t), s || (n = Rt( | ||
m(r, n) { | ||
j(r, t, n), K(t, e), o[19](t), s || (i = It( | ||
t, | ||
@@ -230,5 +237,5 @@ "click", | ||
}, | ||
p(r, i) { | ||
i & /*$maskCommand$*/ | ||
4 && S( | ||
p(r, n) { | ||
n & /*$maskCommand$*/ | ||
4 && P( | ||
e, | ||
@@ -238,3 +245,3 @@ "d", | ||
r[2] | ||
), i & /*$opacity$*/ | ||
), n & /*$opacity$*/ | ||
8 && Y( | ||
@@ -248,3 +255,3 @@ e, | ||
d(r) { | ||
r && j(t), o[19](null), s = !1, n(); | ||
r && W(t), o[19](null), s = !1, i(); | ||
} | ||
@@ -254,9 +261,9 @@ }; | ||
function ge(o) { | ||
let t, e, s, n, r = ( | ||
let t, e, s, i, r = ( | ||
/*$showHeartbeat$*/ | ||
o[8] && ve() | ||
o[8] && _e() | ||
); | ||
return { | ||
c() { | ||
t = U("div"), r && r.c(), S(t, "class", "thisway-highlight"), Y( | ||
t = U("div"), r && r.c(), P(t, "class", "thisway-highlight"), Y( | ||
t, | ||
@@ -273,4 +280,4 @@ "--thisway-highlight-border-width", | ||
}, | ||
m(i, a) { | ||
W(i, t, a), r && r.m(t, null), s || (n = je(e = eo.call( | ||
m(n, a) { | ||
j(n, t, a), r && r.m(t, null), s || (i = je(e = eo.call( | ||
null, | ||
@@ -282,9 +289,9 @@ t, | ||
}, | ||
p(i, a) { | ||
p(n, a) { | ||
/*$showHeartbeat$*/ | ||
i[8] ? r || (r = ve(), r.c(), r.m(t, null)) : r && (r.d(1), r = null), e && Ye(e.update) && a & /*$borderBoundingStyle$*/ | ||
n[8] ? r || (r = _e(), r.c(), r.m(t, null)) : r && (r.d(1), r = null), e && We(e.update) && a & /*$borderBoundingStyle$*/ | ||
128 && e.update.call( | ||
null, | ||
/*$borderBoundingStyle$*/ | ||
i[7] | ||
n[7] | ||
), a & /*$borderWidthPx$*/ | ||
@@ -295,3 +302,3 @@ 32 && Y( | ||
/*$borderWidthPx$*/ | ||
i[5] | ||
n[5] | ||
), a & /*$borderColor$*/ | ||
@@ -302,29 +309,29 @@ 64 && Y( | ||
/*$borderColor$*/ | ||
i[6] | ||
n[6] | ||
); | ||
}, | ||
d(i) { | ||
i && j(t), r && r.d(), s = !1, n(); | ||
d(n) { | ||
n && W(t), r && r.d(), s = !1, i(); | ||
} | ||
}; | ||
} | ||
function ve(o) { | ||
function _e(o) { | ||
let t; | ||
return { | ||
c() { | ||
t = U("div"), S(t, "class", "thisway-highlight-pulse"); | ||
t = U("div"), P(t, "class", "thisway-highlight-pulse"); | ||
}, | ||
m(e, s) { | ||
W(e, t, s); | ||
j(e, t, s); | ||
}, | ||
d(e) { | ||
e && j(t); | ||
e && W(t); | ||
} | ||
}; | ||
} | ||
function jo(o) { | ||
function Yo(o) { | ||
let t, e, s = ( | ||
/*$showMask$*/ | ||
o[0] && _e(o) | ||
), n = ( | ||
o[0] && we(o) | ||
), i = ( | ||
/*$showBorder$*/ | ||
@@ -335,32 +342,32 @@ o[4] && ge(o) | ||
c() { | ||
s && s.c(), t = Q(), n && n.c(), e = Xt(); | ||
s && s.c(), t = et(), i && i.c(), e = Wt(); | ||
}, | ||
m(r, i) { | ||
s && s.m(r, i), W(r, t, i), n && n.m(r, i), W(r, e, i); | ||
m(r, n) { | ||
s && s.m(r, n), j(r, t, n), i && i.m(r, n), j(r, e, n); | ||
}, | ||
p(r, [i]) { | ||
p(r, [n]) { | ||
/*$showMask$*/ | ||
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); | ||
r[0] ? s ? s.p(r, n) : (s = we(r), s.c(), s.m(t.parentNode, t)) : s && (s.d(1), s = null), /*$showBorder$*/ | ||
r[4] ? i ? i.p(r, n) : (i = ge(r), i.c(), i.m(e.parentNode, e)) : i && (i.d(1), i = null); | ||
}, | ||
i: bt, | ||
o: bt, | ||
i: vt, | ||
o: vt, | ||
d(r) { | ||
r && (j(t), j(e)), s && s.d(r), n && n.d(r); | ||
r && (W(t), W(e)), s && s.d(r), i && i.d(r); | ||
} | ||
}; | ||
} | ||
function Yo(o, t, e) { | ||
let s, n, r, i, a, l, c, u, f; | ||
const d = H(Ft), g = H(Xe), p = H(se), _ = Qe(), v = xo(), $ = V(v, "showMask"); | ||
function Go(o, t, e) { | ||
let s, i, r, n, a, l, p, c, b; | ||
const u = H(Rt), _ = H(Ke), h = H(oe), w = Qe(), v = ko(), $ = F(v, "showMask"); | ||
I(o, $, (y) => e(0, s = y)); | ||
const b = V(v, "showBorder"); | ||
I(o, b, (y) => e(4, a = y)); | ||
const x = V(v, "showHeartbeat"), C = V(v, "padding"), R = V(v, "maskOpacity"); | ||
I(o, R, (y) => e(3, i = y)); | ||
const O = V(v, "borderWidth"); | ||
let A, N = wt(void 0); | ||
I(o, N, (y) => e(1, n = y)); | ||
const M = p.transform$ ?? ae, E = L([g, O, C], ([y, F, z], tt) => { | ||
const K = y ? k(y) : void 0, D = { | ||
const m = F(v, "showBorder"); | ||
I(o, m, (y) => e(4, a = y)); | ||
const T = F(v, "showHeartbeat"), x = F(v, "padding"), B = F(v, "maskOpacity"); | ||
I(o, B, (y) => e(3, n = y)); | ||
const M = F(v, "borderWidth"); | ||
let N, k = wt(void 0); | ||
I(o, k, (y) => e(1, i = y)); | ||
const C = h.transform$ ?? oo, E = L([_, M, x], ([y, V, z], J) => { | ||
const X = y ? O(y) : void 0, D = { | ||
x: 0, | ||
@@ -370,9 +377,9 @@ y: 0, | ||
height: 0, | ||
borderWidth: F, | ||
borderWidth: V, | ||
padding: z | ||
}; | ||
if (!K || K === ko) { | ||
const dt = ne(p, k(M)), w = A ? k(A) : { | ||
x: dt.width / 2, | ||
y: dt.height / 2, | ||
if (!X || X === To) { | ||
const ft = re(h), d = N ? O(N) : { | ||
x: ft.width / 2, | ||
y: ft.height / 2, | ||
width: 0, | ||
@@ -383,6 +390,6 @@ height: 0, | ||
}; | ||
D.x = w.x + w.width / 2, D.y = w.y + w.height / 2, D.borderWidth = 0, D.padding = 0; | ||
D.x = d.x + d.width / 2, D.y = d.y + d.height / 2, D.borderWidth = 0, D.padding = 0; | ||
} else | ||
D.x = K.x, D.y = K.y, D.width = K.width, D.height = K.height; | ||
A || (A = At( | ||
D.x = X.x, D.y = X.y, D.width = X.width, D.height = X.height; | ||
N || (N = Ot( | ||
{ | ||
@@ -396,48 +403,48 @@ x: D.x + D.width / 2, | ||
}, | ||
{ duration: 300, easing: Nt } | ||
{ duration: 300, easing: Pt } | ||
)); | ||
const it = A.subscribe(tt); | ||
return A.set(D), () => { | ||
it(); | ||
const dt = N.subscribe(J); | ||
return N.set(D), () => { | ||
dt(); | ||
}; | ||
}), h = L([E, b, $, N], ([y, F, z, tt], K) => { | ||
if (!y || !z || !tt) | ||
}), f = L([E, m, $, k], ([y, V, z, J], X) => { | ||
if (!y || !z || !J) | ||
return; | ||
const D = Bo(y, F, tt.getBoundingClientRect(), k(M)); | ||
K(D); | ||
const D = Vo(y, V, J.getBoundingClientRect(), O(C)); | ||
X(D); | ||
}); | ||
I(o, h, (y) => e(2, r = y)); | ||
const P = L(E, (y, F) => { | ||
I(o, f, (y) => e(2, r = y)); | ||
const A = L(E, (y, V) => { | ||
if (!y) | ||
return; | ||
const z = Gt(k(M)), { x: tt, y: K, borderWidth: D, padding: it, width: dt, height: w } = y, J = _t(it, 0, z), vt = gt(0, it, z); | ||
F({ | ||
left: lt(tt - D - J), | ||
top: lt(K - D - vt), | ||
width: lt(dt), | ||
height: lt(w), | ||
padding: `${lt(vt)} ${lt(J)}` | ||
const { x: z, y: J, borderWidth: X, padding: D, width: dt, height: ft } = y, [d, Q] = ne(D, O(C)); | ||
V({ | ||
left: at(z - X - d), | ||
top: at(J - X - Q), | ||
width: at(dt), | ||
height: at(ft), | ||
padding: `${at(Q)} ${at(d)}` | ||
}); | ||
}); | ||
I(o, P, (y) => e(7, u = y)); | ||
const q = L(E, (y) => lt(y == null ? void 0 : y.borderWidth)); | ||
I(o, A, (y) => e(7, c = y)); | ||
const q = L(E, (y) => at(y == null ? void 0 : y.borderWidth)); | ||
I(o, q, (y) => e(5, l = y)); | ||
const st = L([v, _], ([y, F]) => { | ||
const it = L([v, w], ([y, V]) => { | ||
if (y != null && y.borderColor) | ||
return y.borderColor; | ||
const { primaryColor: z } = F; | ||
const { primaryColor: z } = V; | ||
return Ze(z); | ||
}); | ||
I(o, st, (y) => e(6, c = y)); | ||
const Z = L([x, E], ([y, F]) => !!(y && (F != null && F.width) && (F != null && F.height))); | ||
I(o, Z, (y) => e(8, f = y)); | ||
const ft = () => { | ||
var F; | ||
switch ((F = k(v)) == null ? void 0 : F.clickMask) { | ||
case So: { | ||
d.onClose(); | ||
I(o, it, (y) => e(6, p = y)); | ||
const Z = L([T, E], ([y, V]) => !!(y && (V != null && V.width) && (V != null && V.height))); | ||
I(o, Z, (y) => e(8, b = y)); | ||
const ht = () => { | ||
var V; | ||
switch ((V = O(v)) == null ? void 0 : V.clickMask) { | ||
case Oo: { | ||
u.onClose(); | ||
break; | ||
} | ||
case To: { | ||
d.goNextStep(); | ||
case So: { | ||
u.goNextStep(); | ||
break; | ||
@@ -447,5 +454,5 @@ } | ||
}; | ||
function nt(y) { | ||
Ge[y ? "unshift" : "push"](() => { | ||
n = y, N.set(n); | ||
function ot(y) { | ||
Ye[y ? "unshift" : "push"](() => { | ||
i = y, k.set(i); | ||
}); | ||
@@ -455,132 +462,132 @@ } | ||
s, | ||
i, | ||
r, | ||
n, | ||
r, | ||
i, | ||
a, | ||
l, | ||
p, | ||
c, | ||
u, | ||
b, | ||
$, | ||
m, | ||
B, | ||
k, | ||
f, | ||
$, | ||
b, | ||
R, | ||
N, | ||
h, | ||
P, | ||
A, | ||
q, | ||
st, | ||
it, | ||
Z, | ||
ft, | ||
nt | ||
ht, | ||
ot | ||
]; | ||
} | ||
class Go extends It { | ||
class Ko extends Et { | ||
constructor(t) { | ||
super(), Mt(this, t, Yo, jo, Lt, {}, Wo); | ||
super(), At(this, t, Go, Yo, Nt, {}, Wo); | ||
} | ||
} | ||
const me = 0.05, oo = (o) => { | ||
if (!o || o === qt) | ||
return [qt, void 0]; | ||
const ve = 0.05, so = (o) => { | ||
if (!o || o === Kt) | ||
return [Kt, void 0]; | ||
if (Array.isArray(o)) | ||
return o; | ||
const t = o.split("_"); | ||
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) => { | ||
return t.length === 1 && fe.includes(t[0]) ? [t[0], "CENTER"] : t.length === 2 && fe.includes(t[0]) && vo.includes(t[1]) ? t : [Kt, void 0]; | ||
}, Xo = (o, t, e, s, i, 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, f = r.height - (a + t.height) - n >= 0, g = o.x - t.width - s >= 0, _ = r.width - (i + t.width) - s >= 0; | ||
if (e === "BOTTOM" && f) | ||
const n = o.x + o.width, a = o.y + o.height, p = o.y - t.height - i >= 0, b = r.height - (a + t.height) - i >= 0, _ = o.x - t.width - s >= 0, w = r.width - (n + t.width) - s >= 0; | ||
if (e === "BOTTOM" && b) | ||
return "BOTTOM"; | ||
if (e === "LEFT" && g) | ||
if (e === "LEFT" && _) | ||
return "LEFT"; | ||
if (e === "TOP" && c) | ||
if (e === "TOP" && p) | ||
return "TOP"; | ||
if (e === "RIGHT" && _) | ||
if (e === "RIGHT" && w) | ||
return "RIGHT"; | ||
const v = r.width * me, $ = r.height * me; | ||
return o.y < $ && f ? "BOTTOM" : r.width - i < v && g ? "LEFT" : r.height - a < $ && c ? "TOP" : o.x < v && _ ? "RIGHT" : f ? "BOTTOM" : g ? "LEFT" : c ? "TOP" : _ ? "RIGHT" : "SCREEN"; | ||
}, Jt = { | ||
const v = r.width * ve, $ = r.height * ve; | ||
return o.y < $ && b ? "BOTTOM" : r.width - n < v && _ ? "LEFT" : r.height - a < $ && p ? "TOP" : o.x < v && w ? "RIGHT" : b ? "BOTTOM" : _ ? "LEFT" : p ? "TOP" : w ? "RIGHT" : "SCREEN"; | ||
}, qt = { | ||
..._o, | ||
visibility: "hidden" | ||
}, Xo = (o, t, e, s) => o < e ? e - o : t > s ? t - s : 0, ye = (o = "CENTER", t, e, s, n, r) => { | ||
}, zo = (o, t, e, s) => o < e ? e - o : t > s ? t - s : 0, me = (o = "CENTER", t, e, s, i, r) => { | ||
if (!s) | ||
return { adjustAlignment: "CENTER", value: 0 }; | ||
const i = { | ||
START: t - r.borderWidth - r.padding, | ||
const n = { | ||
START: t - r, | ||
CENTER: (t + e - s) / 2, | ||
END: e - s + r.borderWidth + r.padding | ||
}, l = ((c, u, f) => { | ||
let d; | ||
for (const g of c) { | ||
const p = i[g], _ = Xo(p, p + s, u, f); | ||
if (_ > 0) | ||
d ? _ < d.overflowPx && (d = { adjustAlignment: g, overflowPx: _ }) : d = { adjustAlignment: g, overflowPx: _ }; | ||
END: e - s + r | ||
}, l = ((p, c, b) => { | ||
let u; | ||
for (const _ of p) { | ||
const h = n[_], w = zo(h, h + s, c, b); | ||
if (w > 0) | ||
u ? w < u.overflowPx && (u = { adjustAlignment: _, overflowPx: w }) : u = { adjustAlignment: _, overflowPx: w }; | ||
else | ||
return { adjustAlignment: g, value: p }; | ||
return { adjustAlignment: _, value: h }; | ||
} | ||
return { | ||
adjustAlignment: (d == null ? void 0 : d.adjustAlignment) || o, | ||
value: i[(d == null ? void 0 : d.adjustAlignment) || o], | ||
overflowPx: d == null ? void 0 : d.overflowPx | ||
adjustAlignment: (u == null ? void 0 : u.adjustAlignment) || o, | ||
value: n[(u == null ? void 0 : u.adjustAlignment) || o], | ||
overflowPx: u == null ? void 0 : u.overflowPx | ||
}; | ||
})( | ||
[o, ...["CENTER", "START", "END"].filter((c) => c !== o)], | ||
[o, ...["CENTER", "START", "END"].filter((p) => p !== o)], | ||
0, | ||
n | ||
i | ||
); | ||
if (l.overflowPx && l.overflowPx > 0) { | ||
let c = 0; | ||
l.adjustAlignment === "START" ? c = l.overflowPx : l.adjustAlignment === "END" && (c = 0 - l.overflowPx), l.value = l.value + c; | ||
let p = 0; | ||
l.adjustAlignment === "START" ? p = l.overflowPx : l.adjustAlignment === "END" && (p = 0 - l.overflowPx), l.value = l.value + p; | ||
} | ||
return l; | ||
}, zo = (o, t, e, s, n, r, i, a, l, c) => { | ||
const u = { | ||
...Jt, | ||
}, Uo = (o, t, e, s, i, r, n, a) => { | ||
const l = { | ||
...qt, | ||
visibility: "visible" | ||
}; | ||
let f, d, g; | ||
if (!e || e === ht || o === "SCREEN") | ||
d = (i.height - s.height) / 2, g = (i.width - s.width) / 2; | ||
let p, c, b; | ||
if (!e || e === pt || o === "SCREEN") | ||
c = (r.height - s.height) / 2, b = (r.width - s.width) / 2; | ||
else { | ||
const v = e.x + e.width, $ = e.y + e.height, b = () => { | ||
const O = ye( | ||
const u = e.x + e.width, _ = e.y + e.height, h = () => { | ||
const m = me( | ||
t, | ||
e.x, | ||
v, | ||
u, | ||
s.width, | ||
i.width, | ||
r | ||
r.width, | ||
n | ||
); | ||
g = O.value, f = O.adjustAlignment; | ||
}, x = () => { | ||
const O = ye( | ||
b = m.value, p = m.adjustAlignment; | ||
}, w = () => { | ||
const m = me( | ||
t, | ||
e.y, | ||
$, | ||
_, | ||
s.height, | ||
i.height, | ||
r | ||
r.height, | ||
a | ||
); | ||
d = O.value, f = O.adjustAlignment; | ||
}, C = i.height - s.height, R = i.width - s.width; | ||
c = m.value, p = m.adjustAlignment; | ||
}, v = r.height - s.height, $ = r.width - s.width; | ||
switch (o) { | ||
case "OVER": { | ||
d = e.y + (e.height - s.height) / 2, g = e.x + (e.width - s.width) / 2; | ||
c = e.y + (e.height - s.height) / 2, b = e.x + (e.width - s.width) / 2; | ||
break; | ||
} | ||
case "TOP": { | ||
d = Wt(e.y - s.height - l, 0, C), b(); | ||
c = Ft(e.y - s.height - a, 0, v), h(); | ||
break; | ||
} | ||
case "BOTTOM": { | ||
d = Wt($ + l, n, C), b(); | ||
c = Ft(_ + a, i, v), h(); | ||
break; | ||
} | ||
case "LEFT": { | ||
g = Wt(e.x - s.width - a, 0, R), x(); | ||
b = Ft(e.x - s.width - n, 0, $), w(); | ||
break; | ||
} | ||
case "RIGHT": { | ||
g = Wt(v + a, n, R), x(); | ||
b = Ft(u + n, i, $), w(); | ||
break; | ||
@@ -590,44 +597,41 @@ } | ||
} | ||
const p = ce(g), _ = ce(d); | ||
return u.x = _t(p, _, c), u.y = gt(p, _, c), { style: u, alignment: f || "CENTER" }; | ||
}, Uo = (o, t) => { | ||
return l.x = le(b), l.y = le(c), { style: l, alignment: p || "CENTER" }; | ||
}, qo = (o, t) => { | ||
let e, s; | ||
return ({ step: n }, r, i, a) => { | ||
if (i.width === 0 || i.height === 0 || !r) | ||
return ({ step: i }, r, n, a) => { | ||
if (n.width === 0 || n.height === 0 || !r) | ||
return; | ||
const l = k(t.popover), c = l.offset, u = oo(l.position), f = k(t.highlight), { padding: d, borderWidth: g } = f, p = k(r), _ = n == null ? void 0 : n.id, v = u[0], $ = u[1], b = ne(o, a), x = _t(d, 0, a) + c + g, C = gt(0, d, a) + c + g, R = p === ht ? "SCREEN" : Ko(p, i, v, x, C, b), { style: O, alignment: A } = zo( | ||
R, | ||
const l = O(t.popover), p = l.offset, c = so(l.position), b = O(t.highlight), { padding: u, borderWidth: _ } = b, h = O(r), w = i == null ? void 0 : i.id, v = c[0], $ = c[1], m = re(o), [T, x] = ne(u, a), B = T + p + _, M = x + p + _, N = h === pt ? "SCREEN" : Xo(h, n, v, B, M, m), { style: k, alignment: C } = Uo( | ||
N, | ||
$ === e ? s : $, | ||
h, | ||
n, | ||
p, | ||
i, | ||
c, | ||
f, | ||
b, | ||
x, | ||
C, | ||
a | ||
m, | ||
B, | ||
M | ||
); | ||
return e = $, s = A, { | ||
orientation: R, | ||
alignment: A, | ||
stepId: _, | ||
return e = $, s = C, { | ||
orientation: N, | ||
alignment: C, | ||
stepId: w, | ||
stepOrientation: v, | ||
style: O | ||
style: k | ||
}; | ||
}; | ||
}; | ||
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 Zo(o) { | ||
jt(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 Zo(o) { | ||
let t, e, s, n, r, i, a, l, c, u, f; | ||
e = new Go({}); | ||
var d = ( | ||
function Jo(o) { | ||
let t, e, s, i, r, n, a, l, p, c, b; | ||
e = new Ko({}); | ||
var u = ( | ||
/*$popoverComponent$*/ | ||
o[8] | ||
); | ||
function g(p, _) { | ||
function _(h, w) { | ||
return {}; | ||
} | ||
return d && (r = ue(d, g()), r.$on( | ||
return u && (r = de(u, _()), r.$on( | ||
"close", | ||
@@ -646,4 +650,4 @@ /*onClose*/ | ||
c() { | ||
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$*/ | ||
t = U("div"), kt(e.$$.fragment), s = et(), i = U("div"), r && kt(r.$$.fragment), P(i, "class", n = "thisway-popover__container " + /*$popoverClassName$*/ | ||
o[6]), P(t, "class", l = "thisway " + /*$className$*/ | ||
o[2]), Y( | ||
@@ -681,5 +685,5 @@ t, | ||
}, | ||
m(p, _) { | ||
W(p, t, _), Et(e, t, null), X(t, s), X(t, n), r && Et(r, n, null), o[20](n), c = !0, u || (f = [ | ||
Rt( | ||
m(h, w) { | ||
j(h, t, w), Tt(e, t, null), K(t, s), K(t, i), r && Tt(r, i, null), o[20](i), p = !0, c || (b = [ | ||
It( | ||
window, | ||
@@ -692,43 +696,43 @@ "keydown", | ||
null, | ||
n, | ||
i, | ||
/*$popoverStyle$*/ | ||
o[7] | ||
)) | ||
], u = !0); | ||
], c = !0); | ||
}, | ||
p(p, _) { | ||
if (_[0] & /*$popoverComponent$*/ | ||
256 && d !== (d = /*$popoverComponent$*/ | ||
p[8])) { | ||
p(h, w) { | ||
if (w[0] & /*$popoverComponent$*/ | ||
256 && u !== (u = /*$popoverComponent$*/ | ||
h[8])) { | ||
if (r) { | ||
ct(); | ||
lt(); | ||
const v = r; | ||
B(v.$$.fragment, 1, 0, () => { | ||
Pt(v, 1); | ||
}), pt(); | ||
R(v.$$.fragment, 1, 0, () => { | ||
St(v, 1); | ||
}), ct(); | ||
} | ||
d ? (r = ue(d, g()), r.$on( | ||
u ? (r = de(u, _()), r.$on( | ||
"close", | ||
/*onClose*/ | ||
p[18] | ||
h[18] | ||
), r.$on( | ||
"previous", | ||
/*onPrev*/ | ||
p[16] | ||
h[16] | ||
), r.$on( | ||
"next", | ||
/*onNext*/ | ||
p[17] | ||
), Ot(r.$$.fragment), T(r.$$.fragment, 1), Et(r, n, null)) : r = null; | ||
h[17] | ||
), kt(r.$$.fragment), S(r.$$.fragment, 1), Tt(r, i, null)) : r = null; | ||
} | ||
(!c || _[0] & /*$popoverClassName$*/ | ||
64 && i !== (i = "thisway-popover__container " + /*$popoverClassName$*/ | ||
p[6])) && S(n, "class", i), a && Ye(a.update) && _[0] & /*$popoverStyle$*/ | ||
(!p || w[0] & /*$popoverClassName$*/ | ||
64 && n !== (n = "thisway-popover__container " + /*$popoverClassName$*/ | ||
h[6])) && P(i, "class", n), a && We(a.update) && w[0] & /*$popoverStyle$*/ | ||
128 && a.update.call( | ||
null, | ||
/*$popoverStyle$*/ | ||
p[7] | ||
), (!c || _[0] & /*$className$*/ | ||
h[7] | ||
), (!p || w[0] & /*$className$*/ | ||
4 && l !== (l = "thisway " + /*$className$*/ | ||
p[2])) && S(t, "class", l), _[0] & /*position*/ | ||
h[2])) && P(t, "class", l), w[0] & /*position*/ | ||
1 && Y( | ||
@@ -738,4 +742,4 @@ t, | ||
/*position*/ | ||
p[0] | ||
), _[0] & /*$step$*/ | ||
h[0] | ||
), w[0] & /*$step$*/ | ||
8 && Y( | ||
@@ -745,4 +749,4 @@ t, | ||
/*$step$*/ | ||
p[3] ? "block" : "none" | ||
), _[0] & /*$zIndex$*/ | ||
h[3] ? "block" : "none" | ||
), w[0] & /*$zIndex$*/ | ||
16 && Y( | ||
@@ -752,4 +756,4 @@ t, | ||
/*$zIndex$*/ | ||
p[4] | ||
), _[0] & /*$theme$*/ | ||
h[4] | ||
), w[0] & /*$theme$*/ | ||
32 && Y( | ||
@@ -759,4 +763,4 @@ t, | ||
/*$theme$*/ | ||
p[5].primaryColor | ||
), _[0] & /*$theme$*/ | ||
h[5].primaryColor | ||
), w[0] & /*$theme$*/ | ||
32 && Y( | ||
@@ -766,4 +770,4 @@ t, | ||
/*$theme$*/ | ||
p[5].textColor | ||
), _[0] & /*$theme$*/ | ||
h[5].textColor | ||
), w[0] & /*$theme$*/ | ||
32 && Y( | ||
@@ -773,133 +777,133 @@ t, | ||
/*$theme$*/ | ||
p[5].descColor | ||
h[5].descColor | ||
); | ||
}, | ||
i(p) { | ||
c || (T(e.$$.fragment, p), r && T(r.$$.fragment, p), c = !0); | ||
i(h) { | ||
p || (S(e.$$.fragment, h), r && S(r.$$.fragment, h), p = !0); | ||
}, | ||
o(p) { | ||
B(e.$$.fragment, p), r && B(r.$$.fragment, p), c = !1; | ||
o(h) { | ||
R(e.$$.fragment, h), r && R(r.$$.fragment, h), p = !1; | ||
}, | ||
d(p) { | ||
p && j(t), Pt(e), r && Pt(r), o[20](null), u = !1, $o(f); | ||
d(h) { | ||
h && W(t), St(e), r && St(r), o[20](null), c = !1, Co(b); | ||
} | ||
}; | ||
} | ||
function Jo(o, t, e) { | ||
let s, n, r, i, a, l, c, { position: u = "fixed" } = t, f; | ||
const d = H(Qt), g = H(te), p = H(se), _ = Je(), v = H(ze), $ = H(re), b = V($, "step"); | ||
I(o, b, (m) => e(3, n = m)); | ||
const x = V($, "index"), C = L([b, d], ([m, G]) => { | ||
if (m) | ||
return p.getPopoverComponent(m, G); | ||
function Qo(o, t, e) { | ||
let s, i, r, n, a, l, p, { position: c = "fixed" } = t, b; | ||
const u = H(Jt), _ = H(Qt), h = H(oe), w = Je(), v = H(Xe), $ = H(se), m = F($, "step"); | ||
I(o, m, (g) => e(3, i = g)); | ||
const T = F($, "index"), x = L([m, u], ([g, G]) => { | ||
if (g) | ||
return h.getPopoverComponent(g, G); | ||
}); | ||
I(o, C, (m) => e(8, c = m)); | ||
const R = V(d, "zIndex", 1e4); | ||
I(o, R, (m) => e(4, r = m)); | ||
const O = V(d, "className", ""); | ||
I(o, O, (m) => e(2, s = m)); | ||
const A = V(_, "className", ""); | ||
I(o, A, (m) => e(6, a = m)); | ||
const N = H(oe), M = V(N, "style"); | ||
let E, h, P, q = -1; | ||
const st = () => { | ||
const m = k(b); | ||
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 = p.transform$ ?? ae; | ||
let y = !0; | ||
const F = L( | ||
M, | ||
(m, G) => { | ||
const at = k($).index; | ||
if (!m) { | ||
G(Jt); | ||
I(o, x, (g) => e(8, p = g)); | ||
const B = F(u, "zIndex", 1e4); | ||
I(o, B, (g) => e(4, r = g)); | ||
const M = F(u, "className", ""); | ||
I(o, M, (g) => e(2, s = g)); | ||
const N = F(w, "className", ""); | ||
I(o, N, (g) => e(6, a = g)); | ||
const k = H(ee), C = F(k, "style"); | ||
let E, f, A, q = -1; | ||
const it = () => { | ||
const g = O(m); | ||
return !(g != null && g.survey || g != null && g.media); | ||
}, Z = () => it() ? void 0 : "MoveIn", ht = (g, G, nt) => { | ||
const tt = nt ? g.width : -G.width, Gt = (g.height - G.height) / 2; | ||
return { x: tt, y: Gt }; | ||
}; | ||
let ot = !0; | ||
const y = L( | ||
C, | ||
(g, G) => { | ||
const nt = O($).index; | ||
if (!g) { | ||
G(qt); | ||
return; | ||
} | ||
const rt = ne(p, k(nt)), Ut = k(v), 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; | ||
!h || q !== k(x) ? h = At(ut, { duration: Ht, easing: Nt }) : ut.y !== k(h).y && (h = At( | ||
const tt = re(h), Gt = O(v), Bt = { x: g.x, y: g.y }; | ||
let io = Z(); | ||
if (q === -1 || q < nt ? ot = !0 : q > nt && (ot = !1), io) { | ||
const ut = ht(tt, Gt, ot), Vt = Math.max(Math.abs(Bt.x - ut.x), Math.abs(Bt.y - ut.y)) / 1e3 * 600; | ||
!f || q !== O(T) ? f = Ot(ut, { duration: Vt, easing: Pt }) : ut.y !== O(f).y && (f = Ot( | ||
{ | ||
x: k(h).x, | ||
x: O(f).x, | ||
y: ut.y | ||
}, | ||
{ duration: Ht, easing: Nt } | ||
)), P = h; | ||
{ duration: Vt, easing: Pt } | ||
)), A = f; | ||
} else | ||
E || (G(m), E = At(Dt, { duration: 300, easing: Nt })), P = E; | ||
const no = P.subscribe(({ x: ut, y: Ht }) => { | ||
G({ ...m, x: ut, y: Ht }); | ||
E || (G(g), E = Ot(Bt, { duration: 300, easing: Pt })), A = E; | ||
const no = A.subscribe(({ x: ut, y: Vt }) => { | ||
G({ ...g, x: ut, y: Vt }); | ||
}); | ||
return P.set(Dt), q = at, no; | ||
return A.set(Bt), q = nt, no; | ||
}, | ||
Jt | ||
), z = L(F, (m) => { | ||
const G = Lo(m); | ||
return k(_).showPopover === !1 && st() && (G.visibility = "hidden"), G; | ||
qt | ||
), V = L(y, (g) => { | ||
const G = Ro(g); | ||
return O(w).showPopover === !1 && it() && (G.visibility = "hidden"), G; | ||
}); | ||
I(o, z, (m) => e(7, l = m)); | ||
const tt = Qe(); | ||
I(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) | ||
I(o, V, (g) => e(7, l = g)); | ||
const z = Qe(); | ||
I(o, z, (g) => e(5, n = g)); | ||
const J = H(Rt), { onPrev: X, onNext: D, onClose: dt } = J, ft = (g) => { | ||
if (!J.isActive() || O(u).keyboardControl === !1) | ||
return; | ||
const G = p.onKeydown ? p.onKeydown(m) : Ro(m); | ||
K.applyAction(G); | ||
}, J = L($, ({ element: m }, G) => { | ||
if (!m || m === ht || k(d).interactive === !1 || k(_).position === "SCREEN") | ||
return Tt; | ||
const at = m.ownerDocument.defaultView; | ||
return yt(at, "click", (rt) => { | ||
G(rt), !(rt.target === document.body || !qe(rt.target) || !Be(rt.target) || Ve(rt.target) || !m.contains(rt.target)) && it(); | ||
const G = h.onKeydown ? h.onKeydown(g) : Bo(g); | ||
J.applyAction(G); | ||
}, d = L($, ({ element: g }, G) => { | ||
if (!g || g === pt || O(u).interactive === !1 || O(w).position === "SCREEN") | ||
return Ct; | ||
const nt = g.ownerDocument.defaultView; | ||
return _t(nt, "click", (tt) => { | ||
G(tt), !(tt.target === document.body || !qe(tt.target) || !Re(tt.target) || Be(tt.target) || !g.contains(tt.target)) && D(); | ||
}); | ||
}).subscribe(Tt); | ||
lo(() => { | ||
g.set(f); | ||
}), Re(() => { | ||
g.set(void 0), J(); | ||
}).subscribe(Ct); | ||
co(() => { | ||
_.set(b); | ||
}), Le(() => { | ||
_.set(void 0), d(); | ||
}); | ||
function vt(m) { | ||
Ge[m ? "unshift" : "push"](() => { | ||
f = m, e(1, f); | ||
function Q(g) { | ||
Ye[g ? "unshift" : "push"](() => { | ||
b = g, e(1, b); | ||
}); | ||
} | ||
return o.$$set = (m) => { | ||
"position" in m && e(0, u = m.position); | ||
return o.$$set = (g) => { | ||
"position" in g && e(0, c = g.position); | ||
}, [ | ||
u, | ||
f, | ||
c, | ||
b, | ||
s, | ||
i, | ||
r, | ||
n, | ||
r, | ||
i, | ||
a, | ||
l, | ||
c, | ||
b, | ||
C, | ||
R, | ||
O, | ||
A, | ||
p, | ||
m, | ||
x, | ||
B, | ||
M, | ||
N, | ||
V, | ||
z, | ||
tt, | ||
X, | ||
D, | ||
it, | ||
dt, | ||
w, | ||
vt | ||
ft, | ||
Q | ||
]; | ||
} | ||
class Qo extends It { | ||
class ts extends Et { | ||
constructor(t) { | ||
super(), Mt(this, t, Jo, Zo, Lt, { position: 0 }, qo, [-1, -1]); | ||
super(), At(this, t, Qo, Jo, Nt, { position: 0 }, Zo, [-1, -1]); | ||
} | ||
} | ||
async function ts(o, t) { | ||
async function es(o, t) { | ||
o.length !== 0 && await Promise.all( | ||
o.map(({ el: e, top: s, left: n }) => e.scrollTop == s && e.scrollLeft == n ? Promise.resolve() : new Promise((r) => { | ||
const i = Math.max(Math.abs(s - e.scrollTop), Math.abs(n - e.scrollLeft)), a = At( | ||
o.map(({ el: e, top: s, left: i }) => e.scrollTop == s && e.scrollLeft == i ? Promise.resolve() : new Promise((r) => { | ||
const n = Math.max(Math.abs(s - e.scrollTop), Math.abs(i - e.scrollLeft)), a = Ot( | ||
{ | ||
@@ -910,14 +914,14 @@ x: e.scrollLeft, | ||
{ | ||
duration: Math.min(i, 200), | ||
duration: Math.min(n, 200), | ||
// 300ms maximum | ||
easing: Nt | ||
easing: Pt | ||
} | ||
), l = a.subscribe(({ x: u, y: f }) => { | ||
e.scrollLeft = u, e.scrollTop = f, u === n && f === s && c(); | ||
), l = a.subscribe(({ x: c, y: b }) => { | ||
e.scrollLeft = c, e.scrollTop = b, c === i && b === s && p(); | ||
}); | ||
function c() { | ||
function p() { | ||
l(), r(); | ||
} | ||
ie(t, c), a.set({ | ||
x: n, | ||
ie(t, p), a.set({ | ||
x: i, | ||
y: s | ||
@@ -928,25 +932,25 @@ }); | ||
} | ||
function es(o, t, e, s, n, r, i) { | ||
const a = (o == null ? void 0 : o.scrollOffset) || {}, l = e ? vo[e] : "nearest", c = s ? s.toLocaleLowerCase() : "nearest", { padding: u, borderWidth: f } = r, d = (n.offset < 10 ? 10 : n.offset) + f, g = { | ||
left: d + (a.left || 0), | ||
right: d + (a.right || 0), | ||
top: d + (a.top || 0), | ||
bottom: d + (a.bottom || 0) | ||
function os(o, t, e, s, i, r, n) { | ||
const a = (o == null ? void 0 : o.scrollOffset) || {}, l = e ? mo[e] : "nearest", p = s ? s.toLocaleLowerCase() : "nearest", { padding: c, borderWidth: b } = r, u = (i.offset < 10 ? 10 : i.offset) + b, _ = { | ||
left: u + (a.left || 0), | ||
right: u + (a.right || 0), | ||
top: u + (a.top || 0), | ||
bottom: u + (a.bottom || 0) | ||
}; | ||
let p = "nearest", _ = "nearest"; | ||
e && e !== "OVER" && (mo.includes(e) ? (p = l, _ = c, g[e.toLocaleLowerCase()] += (t == null ? void 0 : t.height) || 0) : (p = c, _ = l, g[e.toLocaleLowerCase()] += (t == null ? void 0 : t.width) || 0)); | ||
const v = Gt(i); | ||
return g.left = he(g.left, 0, v) + u, g.right = he(g.right, 0, v) + u, g.top = fe(0, g.top, v) + u, g.bottom = fe(0, g.bottom, v) + u, { | ||
let h = "nearest", w = "nearest"; | ||
e && e !== "OVER" && (yo.includes(e) ? (h = l, w = p, _[e.toLocaleLowerCase()] += (t == null ? void 0 : t.height) || 0) : (h = p, w = l, _[e.toLocaleLowerCase()] += (t == null ? void 0 : t.width) || 0)); | ||
const v = Zt(n); | ||
return _.left = pe(_.left, 0, v) + c, _.right = pe(_.right, 0, v) + c, _.top = he(0, _.top, v) + c, _.bottom = he(0, _.bottom, v) + c, { | ||
scrollMode: "if-needed", | ||
block: p, | ||
inline: _, | ||
offset: g | ||
block: h, | ||
inline: w, | ||
offset: _ | ||
}; | ||
} | ||
async function os(o, t, e, s, n, r, i, a, l) { | ||
let c = [], u = []; | ||
const { highlight: f, popover: d } = s, g = k(f), p = k(d), _ = oo(p.position), v = _[0], $ = _[1]; | ||
if (o !== ht) { | ||
({ elements: c, iframes: u } = Eo(o, !0, r)); | ||
const b = es( | ||
async function ss(o, t, e, s, i, r, n, a, l) { | ||
let p = [], c = []; | ||
const { highlight: b, popover: u } = s, _ = O(b), h = O(u), w = so(h.position), v = w[0], $ = w[1]; | ||
if (o !== pt) { | ||
({ elements: p, iframes: c } = Eo(o, !0, r)); | ||
const m = os( | ||
t, | ||
@@ -956,58 +960,59 @@ e, | ||
$, | ||
p, | ||
g, | ||
n | ||
), x = Po(c, u, o, b); | ||
await ts(x, l); | ||
h, | ||
_, | ||
i | ||
), T = Ao(p, c, o, m); | ||
await es(T, l); | ||
} | ||
return mt(a && mt(a), (b) => { | ||
return gt(a && gt(a), (m) => { | ||
if (!o) | ||
return; | ||
const x = []; | ||
let C = Tt; | ||
if (o === ht || v === "SCREEN") { | ||
C = pe(() => { | ||
l.signal.aborted || b(mt(ht)); | ||
const T = []; | ||
let x = Ct; | ||
if (o === pt || v === "SCREEN") { | ||
x = ce(() => { | ||
l.signal.aborted || m(gt(pt)); | ||
}); | ||
for (const R of u) { | ||
const { contentWindow: O } = R; | ||
O && x.push(yt(window, "resize", C)); | ||
for (const B of c) { | ||
const { contentWindow: M } = B; | ||
M && T.push(_t(window, "resize", x)); | ||
} | ||
} else { | ||
const R = t != null && t.onlyHighlightChildren ? Array.from(o.children) : [o], O = () => Ho(Ao(ho(R), u), n); | ||
C = pe(() => { | ||
const B = t != null && t.onlyHighlightChildren ? Array.from(o.children) : [o], M = () => jo(No(fo(B), c), i); | ||
let N; | ||
x = ce(() => { | ||
if (l.signal.aborted) | ||
return; | ||
const A = O(); | ||
A.width === 0 || A.height === 0 ? b(mt(ht)) : b(mt(A)); | ||
}), x.push( | ||
...R.map((A) => Fe(A, () => { | ||
const N = A.getBoundingClientRect(); | ||
N.width === 0 && N.height === 0 || C(); | ||
const k = M(), C = k.width === 0 || k.height === 0; | ||
N && k.width === N.width && k.height === N.height && (C || k.x === N.x && k.y === N.y) || (N = k, m(C ? gt(pt) : gt(k))); | ||
}), T.push( | ||
...B.map((k) => Ve(k, () => { | ||
const C = k.getBoundingClientRect(); | ||
C.width === 0 && C.height === 0 || x(); | ||
})) | ||
); | ||
for (const A of u) { | ||
const { contentWindow: N } = A; | ||
N && x.push(yt(N.window, "resize", C), yt(N.window, "scroll", C)); | ||
for (const k of c) { | ||
const { contentWindow: C } = k; | ||
C && T.push(_t(C.window, "resize", x), _t(C.window, "scroll", x)); | ||
} | ||
} | ||
x.push( | ||
yt(window, "resize", C), | ||
yt(window, "scroll", C), | ||
i.subscribe(C) | ||
), C(), ie(l, () => { | ||
Ue(x); | ||
T.push( | ||
_t(window, "resize", x), | ||
_t(window, "scroll", x), | ||
n.subscribe(x) | ||
), x(), ie(l, () => { | ||
Ue(T); | ||
}); | ||
}); | ||
} | ||
const ss = (o, t) => { | ||
const rs = (o, t) => { | ||
let e; | ||
const { activeStep$: s, activeIndex$: n } = o; | ||
const { activeStep$: s, activeIndex$: i } = o; | ||
return L( | ||
s, | ||
(r, i) => { | ||
const a = k(n); | ||
if (!r || !jt(a)) | ||
(r, n) => { | ||
const a = O(i); | ||
if (!r || !Dt(a)) | ||
return; | ||
i({ | ||
n({ | ||
element: void 0, | ||
@@ -1018,5 +1023,5 @@ step: r, | ||
const l = new AbortController(); | ||
return t.waitForElement(r, l).then((c) => { | ||
l.signal.aborted || (i({ | ||
element: c ?? ht, | ||
return t.waitForElement(r, l).then((p) => { | ||
l.signal.aborted || (n({ | ||
element: p ?? pt, | ||
step: r, | ||
@@ -1035,26 +1040,26 @@ index: a | ||
); | ||
}, rs = (o) => L(o, (t, e) => t ? Fe(t, () => { | ||
}, is = (o) => L(o, (t, e) => t ? Ve(t, () => { | ||
e(t.getBoundingClientRect()); | ||
}) : (e(uo), Tt)); | ||
class ns extends Io { | ||
constructor(e, s, n, r) { | ||
}) : (e(wo), Ct)); | ||
class ns extends Mo { | ||
constructor(e, s, i, r) { | ||
super(e); | ||
et(this, "subscriptions", []); | ||
et(this, "view"); | ||
et(this, "delegate"); | ||
et(this, "updatePositionSignal$", wt(0)); | ||
et(this, "renderState$"); | ||
et(this, "onPrev", () => { | ||
st(this, "subscriptions", []); | ||
st(this, "view"); | ||
st(this, "delegate"); | ||
st(this, "updatePositionSignal$", wt(0)); | ||
st(this, "renderState$"); | ||
st(this, "onPrev", () => { | ||
this.goPrevStep(); | ||
}); | ||
et(this, "onNext", async () => { | ||
var s, n; | ||
const e = k(to(this.store, this.store.effectiveIndex$)); | ||
st(this, "onNext", async () => { | ||
var s, i; | ||
const e = O(to(this.store, this.store.effectiveIndex$)); | ||
if (e) { | ||
const r = (s = this.getActiveStep().step) == null ? void 0 : s.id; | ||
if (this.delegate.beforeStepChange) { | ||
const i = new AbortController(); | ||
if (await this.delegate.beforeStepChange(e.id, r, i).catch(() => { | ||
i.abort(); | ||
}), i.signal.aborted || ((n = this.getActiveStep().step) == null ? void 0 : n.id) !== r) | ||
const n = new AbortController(); | ||
if (await this.delegate.beforeStepChange(e.id, r, n).catch(() => { | ||
n.abort(); | ||
}), n.signal.aborted || ((i = this.getActiveStep().step) == null ? void 0 : i.id) !== r) | ||
return; | ||
@@ -1066,54 +1071,54 @@ } | ||
}); | ||
et(this, "onClose", () => { | ||
st(this, "onClose", () => { | ||
this.delegate.onClose ? this.delegate.onClose() : this.dispose(); | ||
}); | ||
this.delegate = s; | ||
const i = s.container ?? document.body, a = [], l = ss(e, s); | ||
const n = ze(s), a = [], l = rs(e, s); | ||
this.renderState$ = l; | ||
const c = V(l, "step"), u = is(r, c), f = { | ||
popover: u("popover", yo), | ||
highlight: u("highlight", bo), | ||
theme: L(u("theme", {}), Do) | ||
}, d = wt(void 0), g = rs(d); | ||
let p; | ||
const _ = s.transform$ ?? ae, v = V(f.popover, "position"), $ = wt(void 0), b = Uo(s, f), x = L( | ||
[l, g, _, v], | ||
const p = F(l, "step"), c = as(r, p), b = { | ||
popover: c("popover", bo), | ||
highlight: c("highlight", $o), | ||
theme: L(c("theme", {}), Ho) | ||
}, u = wt(void 0), _ = is(u); | ||
let h; | ||
const w = s.transform$ ?? oo, v = F(b.popover, "position"), $ = wt(void 0), m = qo(s, b), T = L( | ||
[l, _, w, v], | ||
([ | ||
O, | ||
A, | ||
N | ||
M, | ||
N, | ||
k | ||
/* position */ | ||
], M) => { | ||
const { element: E, step: h } = O; | ||
if (!E || !h) | ||
return Tt; | ||
const P = new AbortController(); | ||
return os( | ||
], C) => { | ||
const { element: E, step: f } = M; | ||
if (!E || !f) | ||
return Ct; | ||
const A = new AbortController(); | ||
return ss( | ||
E, | ||
h, | ||
A, | ||
f, | ||
N, | ||
fo(s.window), | ||
b, | ||
k, | ||
uo(s.window), | ||
this.updatePositionSignal$, | ||
p, | ||
P | ||
h, | ||
A | ||
).then((q) => { | ||
const st = q.subscribe((Z) => { | ||
const ft = Z && k(Z); | ||
M(Z), p = ft; | ||
const nt = b(O, Z, A, N); | ||
nt && $.set(nt); | ||
const it = q.subscribe((Z) => { | ||
const ht = Z && O(Z); | ||
C(Z), h = ht; | ||
const ot = m(M, Z, N, k); | ||
ot && $.set(ot); | ||
}); | ||
ie(P, st); | ||
ie(A, it); | ||
}), () => { | ||
P.abort(); | ||
A.abort(); | ||
}; | ||
} | ||
), C = s.getTotalCount(e), R = Ke(n); | ||
R.set(Ft, this).set(Xe, x).set(Qt, r).set(te, d).set(ze, g).set(ee, C).set(se, s).set(re, l).set(zt, f).set(oe, $), this.subscriptions = a, this.view = new Qo({ | ||
target: i, | ||
context: R, | ||
), x = s.getTotalCount(e), B = Ge(i); | ||
B.set(Rt, this).set(Ke, T).set(Jt, r).set(Qt, u).set(Xe, _).set(te, x).set(oe, s).set(se, l).set(Yt, b).set(ee, $), this.subscriptions = a, this.view = new ts({ | ||
target: n, | ||
context: B, | ||
props: { | ||
position: i.tagName.toLowerCase() === "body" ? "fixed" : "absolute" | ||
position: n.tagName.toLowerCase() === "body" ? "fixed" : "absolute" | ||
} | ||
@@ -1142,4 +1147,4 @@ }); | ||
getCurrentElement() { | ||
const { element: e } = k(this.renderState$); | ||
return e === ht ? void 0 : e; | ||
const { element: e } = O(this.renderState$); | ||
return e === pt ? void 0 : e; | ||
} | ||
@@ -1151,26 +1156,26 @@ dispose() { | ||
} | ||
function is(o, t) { | ||
function as(o, t) { | ||
return (e, s) => { | ||
const n = V(o, e), r = V(t, e); | ||
return L([n, r], (i) => Vo(s, ...i)); | ||
const i = F(o, e), r = F(t, e); | ||
return L([i, r], (n) => Fo(s, ...n)); | ||
}; | ||
} | ||
function as(o) { | ||
Kt(o, "svelte-1fc4ct7", ".thisway-progress{font-size:14px}"); | ||
function ls(o) { | ||
jt(o, "svelte-1fc4ct7", ".thisway-progress{font-size:14px}"); | ||
} | ||
function ls(o) { | ||
function cs(o) { | ||
let t, e; | ||
return { | ||
c() { | ||
t = U("div"), e = Bt( | ||
t = U("div"), e = Mt( | ||
/*$progress$*/ | ||
o[0] | ||
), S(t, "class", "thisway-progress"); | ||
), P(t, "class", "thisway-progress"); | ||
}, | ||
m(s, n) { | ||
W(s, t, n), X(t, e); | ||
m(s, i) { | ||
j(s, t, i), K(t, e); | ||
}, | ||
p(s, [n]) { | ||
n & /*$progress$*/ | ||
1 && Vt( | ||
p(s, [i]) { | ||
i & /*$progress$*/ | ||
1 && Lt( | ||
e, | ||
@@ -1181,45 +1186,45 @@ /*$progress$*/ | ||
}, | ||
i: bt, | ||
o: bt, | ||
i: vt, | ||
o: vt, | ||
d(s) { | ||
s && j(t); | ||
s && W(t); | ||
} | ||
}; | ||
} | ||
function cs(o, t, e) { | ||
function ps(o, t, e) { | ||
let s; | ||
const n = H(ee), r = Oo(), i = L([r, n], ([a, l]) => l > 1 ? `${a + 1}/${l}` : ""); | ||
return I(o, i, (a) => e(0, s = a)), [s, i]; | ||
const i = H(te), r = Po(), n = L([r, i], ([a, l]) => l > 1 ? `${a + 1}/${l}` : ""); | ||
return I(o, n, (a) => e(0, s = a)), [s, n]; | ||
} | ||
class so extends It { | ||
class ro extends Et { | ||
constructor(t) { | ||
super(), Mt(this, t, cs, ls, Lt, {}, as); | ||
super(), At(this, t, ps, cs, Nt, {}, ls); | ||
} | ||
} | ||
function ps(o) { | ||
Kt(o, "svelte-yaniy4", "@keyframes reduction{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}.thisway-stretch{margin:auto}.thisway-popover{animation:reduction 200ms linear;display:flex;flex-direction:column;padding:16px;max-width:280px;min-width:280px;border-radius:10px;overflow:visible;background-color:var(--thisway-color-primary);color:var(--thisway-color-text);position:relative;box-shadow:var(--thisway-default-shadow);box-sizing:border-box}.thisway-popover.thisway-popover__mode-1 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text)}.thisway-popover.thisway-popover__mode-1 .thisway-progress{margin-right:auto}.thisway-popover.thisway-popover__mode-2 .thisway-popover-title{order:2}.thisway-popover.thisway-popover__mode-2 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);order:3}.thisway-popover.thisway-popover__mode-2 .thisway-popover-footer{order:4;justify-content:flex-end}.thisway-popover.thisway-popover__mode-2 .thisway-popover-close{top:14px;right:14px}.thisway-popover.thisway-popover__mode-2 .thisway-progress{font-size:20px;order:1}.thisway-popover.thisway-popover__mode-3{padding-top:0;background:linear-gradient(to bottom, var(--thisway-color-primary) 40px, var(--thisway-color-text) 40px)}.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-end,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3 .thisway-popover-title{line-height:40px;height:40px;font-size:18px;order:1;background-color:var(--thisway-color-primary)}.thisway-popover.thisway-popover__mode-3 .thisway-popover-description{color:#333333;order:3}.thisway-popover.thisway-popover__mode-3 .thisway-popover-footer{order:4}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary);flex:0 0 30px;height:30px;border-radius:50%;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev svg{display:inline-block;margin:4px 0 0;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-next{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text);max-width:210px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.thisway-popover.thisway-popover__mode-3 .thisway-popover-close{top:8px;right:10px}.thisway-popover.thisway-popover__mode-3 .thisway-progress{color:#999;margin:10px 0 5px;order:2}.thisway-popover-title{font-size:18px;font-style:normal;font-weight:500;line-height:24px;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}@supports (-webkit-line-clamp: 2){.thisway-popover-title{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.thisway-popover-description{margin-top:5px;margin-bottom:0;white-space:pre-line;font-size:14px;line-height:20px;font-style:normal;word-wrap:break-word}.thisway-popover-description a{text-decoration:underline}.thisway-popover-footer{margin-top:10px;display:flex;align-items:center}.thisway-popover-footer button{text-decoration:none;cursor:pointer;outline:0;height:30px;border-radius:50px;padding:0 18px;font-size:13px;line-height:20px}.thisway-popover-footer button:not(:last-child){margin-right:10px}.thisway-popover-top .thisway-popover__arrow{bottom:0;transform:translate(-50%, 50%) rotate(45deg)}.thisway-popover-bottom .thisway-popover__arrow{top:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover-left .thisway-popover__arrow{right:0;transform:translate(50%, -50%) rotate(45deg)}.thisway-popover-right .thisway-popover__arrow{left:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover__arrow{position:absolute;width:10px;height:10px;display:block;background-color:var(--thisway-color-primary)}.thisway-popover-right .thisway-popover__arrow-start,.thisway-popover-left .thisway-popover__arrow-start{top:20px}.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover-left .thisway-popover__arrow-center{top:50%}.thisway-popover-right .thisway-popover__arrow-end,.thisway-popover-left .thisway-popover__arrow-end{bottom:10px}.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover-bottom .thisway-popover__arrow-start{left:20px}.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover-bottom .thisway-popover__arrow-center{left:50%}.thisway-popover-top .thisway-popover__arrow-end,.thisway-popover-bottom .thisway-popover__arrow-end{right:10px}.thisway-popover-screen .thisway-popover__arrow,.thisway-popover-over .thisway-popover__arrow{display:none}.thisway-popover-prev{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text)}.thisway-popover-next{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary)}.thisway-popover-close{width:24px;height:24px;position:absolute;opacity:0.8;display:flex;align-items:center;justify-content:center;padding:0;border:none;color:var(--thisway-color-text);background-color:transparent;top:8px;right:8px;z-index:1}.thisway-popover-close:hover{opacity:1;border:none}"); | ||
function hs(o) { | ||
jt(o, "svelte-yaniy4", "@keyframes reduction{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}.thisway-stretch{margin:auto}.thisway-popover{animation:reduction 200ms linear;display:flex;flex-direction:column;padding:16px;max-width:280px;min-width:280px;border-radius:10px;overflow:visible;background-color:var(--thisway-color-primary);color:var(--thisway-color-text);position:relative;box-shadow:var(--thisway-default-shadow);box-sizing:border-box}.thisway-popover.thisway-popover__mode-1 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text)}.thisway-popover.thisway-popover__mode-1 .thisway-progress{margin-right:auto}.thisway-popover.thisway-popover__mode-2 .thisway-popover-title{order:2}.thisway-popover.thisway-popover__mode-2 .thisway-popover-description{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);order:3}.thisway-popover.thisway-popover__mode-2 .thisway-popover-footer{order:4;justify-content:flex-end}.thisway-popover.thisway-popover__mode-2 .thisway-popover-close{top:14px;right:14px}.thisway-popover.thisway-popover__mode-2 .thisway-progress{font-size:20px;order:1}.thisway-popover.thisway-popover__mode-3{padding-top:0;background:linear-gradient(to bottom, var(--thisway-color-primary) 40px, var(--thisway-color-text) 40px)}.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-left .thisway-popover__arrow-end,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-right .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover.thisway-popover__mode-3.thisway-popover-top .thisway-popover__arrow-end{background-color:white}.thisway-popover.thisway-popover__mode-3 .thisway-popover-title{line-height:40px;height:40px;font-size:18px;order:1;background-color:var(--thisway-color-primary)}.thisway-popover.thisway-popover__mode-3 .thisway-popover-description{color:#333333;order:3}.thisway-popover.thisway-popover__mode-3 .thisway-popover-footer{order:4}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary);flex:0 0 30px;height:30px;border-radius:50%;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-prev svg{display:inline-block;margin:4px 0 0;padding:0}.thisway-popover.thisway-popover__mode-3 .thisway-popover-next{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text);max-width:210px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.thisway-popover.thisway-popover__mode-3 .thisway-popover-close{top:8px;right:10px}.thisway-popover.thisway-popover__mode-3 .thisway-progress{color:#999;margin:10px 0 5px;order:2}.thisway-popover-title{font-size:18px;font-style:normal;font-weight:500;line-height:24px;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}@supports (-webkit-line-clamp: 2){.thisway-popover-title{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.thisway-popover-description{margin-top:5px;margin-bottom:0;white-space:pre-line;font-size:14px;line-height:20px;font-style:normal;word-wrap:break-word}.thisway-popover-description a{text-decoration:underline}.thisway-popover-footer{margin-top:10px;display:flex;align-items:center}.thisway-popover-footer button{text-decoration:none;cursor:pointer;outline:0;height:30px;border-radius:50px;padding:0 18px;font-size:13px;line-height:20px}.thisway-popover-footer button:not(:last-child){margin-right:10px}.thisway-popover-top .thisway-popover__arrow{bottom:0;transform:translate(-50%, 50%) rotate(45deg)}.thisway-popover-bottom .thisway-popover__arrow{top:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover-left .thisway-popover__arrow{right:0;transform:translate(50%, -50%) rotate(45deg)}.thisway-popover-right .thisway-popover__arrow{left:0;transform:translate(-50%, -50%) rotate(45deg)}.thisway-popover__arrow{position:absolute;width:10px;height:10px;display:block;background-color:var(--thisway-color-primary)}.thisway-popover-right .thisway-popover__arrow-start,.thisway-popover-left .thisway-popover__arrow-start{top:20px}.thisway-popover-right .thisway-popover__arrow-center,.thisway-popover-left .thisway-popover__arrow-center{top:50%}.thisway-popover-right .thisway-popover__arrow-end,.thisway-popover-left .thisway-popover__arrow-end{bottom:10px}.thisway-popover-top .thisway-popover__arrow-start,.thisway-popover-bottom .thisway-popover__arrow-start{left:20px}.thisway-popover-top .thisway-popover__arrow-center,.thisway-popover-bottom .thisway-popover__arrow-center{left:50%}.thisway-popover-top .thisway-popover__arrow-end,.thisway-popover-bottom .thisway-popover__arrow-end{right:10px}.thisway-popover-screen .thisway-popover__arrow,.thisway-popover-over .thisway-popover__arrow{display:none}.thisway-popover-prev{background-color:var(--thisway-color-primary);color:var(--thisway-color-text);border:1px solid var(--thisway-color-text)}.thisway-popover-next{background-color:var(--thisway-color-text);color:var(--thisway-color-primary);border:1px solid var(--thisway-color-primary)}.thisway-popover-close{width:24px;height:24px;position:absolute;opacity:0.8;display:flex;align-items:center;justify-content:center;padding:0;border:none;color:var(--thisway-color-text);background-color:transparent;top:8px;right:8px;z-index:1}.thisway-popover-close:hover{opacity:1;border:none}"); | ||
} | ||
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, f, d, g, p, _, v, $ = ( | ||
const fs = (o) => ({}), ye = (o) => ({}), ds = (o) => ({}), be = (o) => ({}), us = (o) => ({}), $e = (o) => ({}), ws = (o) => ({}), Ce = (o) => ({}), gs = (o) => ({}), xe = (o) => ({}); | ||
function ke(o) { | ||
let t, e, s, i, r, n, a, l, p, c, b, u, _, h, w, v, $ = ( | ||
/*$showCloseButton$*/ | ||
o[6] && Se(o) | ||
), b = ( | ||
o[6] && Te(o) | ||
), m = ( | ||
/*$$slots*/ | ||
(o[28].title || /*$title$*/ | ||
o[1]) && Oe(o) | ||
), x = ( | ||
o[1]) && Se(o) | ||
), T = ( | ||
/*$$slots*/ | ||
(o[28].description || /*$description$*/ | ||
o[2]) && Ee(o) | ||
), C = ( | ||
o[2]) && Oe(o) | ||
), x = ( | ||
/*$layout$*/ | ||
o[4] !== St && /*$showProgress$*/ | ||
o[4] !== xt && /*$showProgress$*/ | ||
o[7] && Pe() | ||
); | ||
const R = ( | ||
const B = ( | ||
/*#slots*/ | ||
o[30].default | ||
), O = $t( | ||
R, | ||
), M = mt( | ||
B, | ||
o, | ||
@@ -1229,24 +1234,24 @@ /*$$scope*/ | ||
null | ||
), A = ( | ||
), N = ( | ||
/*#slots*/ | ||
o[30].footer | ||
), N = $t( | ||
A, | ||
), k = mt( | ||
N, | ||
o, | ||
/*$$scope*/ | ||
o[29], | ||
Ce | ||
$e | ||
); | ||
let M = ( | ||
let C = ( | ||
/*$layout$*/ | ||
o[4] === St && /*$showProgress$*/ | ||
o[7] && Ae() | ||
o[4] === xt && /*$showProgress$*/ | ||
o[7] && Ee() | ||
), E = ( | ||
/*$showCtrlBtns$*/ | ||
o[8] && Ne(o) | ||
o[8] && Ae(o) | ||
); | ||
return { | ||
c() { | ||
t = U("div"), e = U("div"), n = Q(), $ && $.c(), r = Q(), b && b.c(), i = Q(), x && x.c(), a = Q(), C && C.c(), l = Q(), O && O.c(), c = Q(), u = U("div"), N && N.c(), f = Q(), M && M.c(), d = Q(), g = U("div"), p = Q(), E && E.c(), S(e, "class", s = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
o[5]), S(g, "class", "thisway-stretch"), S(u, "class", "thisway-popover-footer"), S(t, "class", _ = "thisway-popover " + /*$popoverClass$*/ | ||
t = U("div"), e = U("div"), i = et(), $ && $.c(), r = et(), m && m.c(), n = et(), T && T.c(), a = et(), x && x.c(), l = et(), M && M.c(), p = et(), c = U("div"), k && k.c(), b = et(), C && C.c(), u = et(), _ = U("div"), h = et(), E && E.c(), P(e, "class", s = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
o[5]), P(_, "class", "thisway-stretch"), P(c, "class", "thisway-popover-footer"), P(t, "class", w = "thisway-popover " + /*$popoverClass$*/ | ||
o[3] + " thisway-popover__" + /*$layout$*/ | ||
@@ -1256,94 +1261,94 @@ o[4] + " " + /*cssClassName*/ | ||
}, | ||
m(h, P) { | ||
W(h, t, P), X(t, e), X(t, n), $ && $.m(t, null), X(t, r), b && b.m(t, null), X(t, i), x && x.m(t, null), X(t, a), C && C.m(t, null), X(t, l), O && O.m(t, null), X(t, c), X(t, u), N && N.m(u, null), X(u, f), M && M.m(u, null), X(u, d), X(u, g), X(u, p), E && E.m(u, null), v = !0; | ||
m(f, A) { | ||
j(f, t, A), K(t, e), K(t, i), $ && $.m(t, null), K(t, r), m && m.m(t, null), K(t, n), T && T.m(t, null), K(t, a), x && x.m(t, null), K(t, l), M && M.m(t, null), K(t, p), K(t, c), k && k.m(c, null), K(c, b), C && C.m(c, null), K(c, u), K(c, _), K(c, h), E && E.m(c, null), v = !0; | ||
}, | ||
p(h, P) { | ||
(!v || P[0] & /*$arrowClass$*/ | ||
p(f, A) { | ||
(!v || A[0] & /*$arrowClass$*/ | ||
32 && s !== (s = "thisway-popover__arrow " + /*$arrowClass$*/ | ||
h[5])) && S(e, "class", s), /*$showCloseButton$*/ | ||
h[6] ? $ ? $.p(h, P) : ($ = Se(h), $.c(), $.m(t, r)) : $ && ($.d(1), $ = null), /*$$slots*/ | ||
h[28].title || /*$title$*/ | ||
h[1] ? b ? (b.p(h, P), P[0] & /*$$slots, $title$*/ | ||
268435458 && T(b, 1)) : (b = Oe(h), b.c(), T(b, 1), b.m(t, i)) : b && (ct(), B(b, 1, 1, () => { | ||
b = null; | ||
}), pt()), /*$$slots*/ | ||
h[28].description || /*$description$*/ | ||
h[2] ? x ? (x.p(h, P), P[0] & /*$$slots, $description$*/ | ||
268435460 && T(x, 1)) : (x = Ee(h), x.c(), T(x, 1), x.m(t, a)) : x && (ct(), B(x, 1, 1, () => { | ||
f[5])) && P(e, "class", s), /*$showCloseButton$*/ | ||
f[6] ? $ ? $.p(f, A) : ($ = Te(f), $.c(), $.m(t, r)) : $ && ($.d(1), $ = null), /*$$slots*/ | ||
f[28].title || /*$title$*/ | ||
f[1] ? m ? (m.p(f, A), A[0] & /*$$slots, $title$*/ | ||
268435458 && S(m, 1)) : (m = Se(f), m.c(), S(m, 1), m.m(t, n)) : m && (lt(), R(m, 1, 1, () => { | ||
m = null; | ||
}), ct()), /*$$slots*/ | ||
f[28].description || /*$description$*/ | ||
f[2] ? T ? (T.p(f, A), A[0] & /*$$slots, $description$*/ | ||
268435460 && S(T, 1)) : (T = Oe(f), T.c(), S(T, 1), T.m(t, a)) : T && (lt(), R(T, 1, 1, () => { | ||
T = null; | ||
}), ct()), /*$layout$*/ | ||
f[4] !== xt && /*$showProgress$*/ | ||
f[7] ? x ? A[0] & /*$layout$, $showProgress$*/ | ||
144 && S(x, 1) : (x = Pe(), x.c(), S(x, 1), x.m(t, l)) : x && (lt(), R(x, 1, 1, () => { | ||
x = null; | ||
}), pt()), /*$layout$*/ | ||
h[4] !== St && /*$showProgress$*/ | ||
h[7] ? C ? P[0] & /*$layout$, $showProgress$*/ | ||
144 && T(C, 1) : (C = Pe(), C.c(), T(C, 1), C.m(t, l)) : C && (ct(), B(C, 1, 1, () => { | ||
C = null; | ||
}), pt()), O && O.p && (!v || P[0] & /*$$scope*/ | ||
536870912) && Ct( | ||
O, | ||
R, | ||
h, | ||
}), ct()), M && M.p && (!v || A[0] & /*$$scope*/ | ||
536870912) && yt( | ||
M, | ||
B, | ||
f, | ||
/*$$scope*/ | ||
h[29], | ||
v ? kt( | ||
R, | ||
f[29], | ||
v ? $t( | ||
B, | ||
/*$$scope*/ | ||
h[29], | ||
P, | ||
f[29], | ||
A, | ||
null | ||
) : xt( | ||
) : bt( | ||
/*$$scope*/ | ||
h[29] | ||
f[29] | ||
), | ||
null | ||
), N && N.p && (!v || P[0] & /*$$scope*/ | ||
536870912) && Ct( | ||
), k && k.p && (!v || A[0] & /*$$scope*/ | ||
536870912) && yt( | ||
k, | ||
N, | ||
A, | ||
h, | ||
f, | ||
/*$$scope*/ | ||
h[29], | ||
v ? kt( | ||
f[29], | ||
v ? $t( | ||
N, | ||
/*$$scope*/ | ||
f[29], | ||
A, | ||
us | ||
) : bt( | ||
/*$$scope*/ | ||
h[29], | ||
P, | ||
ds | ||
) : xt( | ||
/*$$scope*/ | ||
h[29] | ||
f[29] | ||
), | ||
Ce | ||
$e | ||
), /*$layout$*/ | ||
h[4] === St && /*$showProgress$*/ | ||
h[7] ? M ? P[0] & /*$layout$, $showProgress$*/ | ||
144 && T(M, 1) : (M = Ae(), M.c(), T(M, 1), M.m(u, d)) : M && (ct(), B(M, 1, 1, () => { | ||
M = null; | ||
}), pt()), /*$showCtrlBtns$*/ | ||
h[8] ? E ? (E.p(h, P), P[0] & /*$showCtrlBtns$*/ | ||
256 && T(E, 1)) : (E = Ne(h), E.c(), T(E, 1), E.m(u, null)) : E && (ct(), B(E, 1, 1, () => { | ||
f[4] === xt && /*$showProgress$*/ | ||
f[7] ? C ? A[0] & /*$layout$, $showProgress$*/ | ||
144 && S(C, 1) : (C = Ee(), C.c(), S(C, 1), C.m(c, u)) : C && (lt(), R(C, 1, 1, () => { | ||
C = null; | ||
}), ct()), /*$showCtrlBtns$*/ | ||
f[8] ? E ? (E.p(f, A), A[0] & /*$showCtrlBtns$*/ | ||
256 && S(E, 1)) : (E = Ae(f), E.c(), S(E, 1), E.m(c, null)) : E && (lt(), R(E, 1, 1, () => { | ||
E = null; | ||
}), pt()), (!v || P[0] & /*$popoverClass$, $layout$, cssClassName*/ | ||
25 && _ !== (_ = "thisway-popover " + /*$popoverClass$*/ | ||
h[3] + " thisway-popover__" + /*$layout$*/ | ||
h[4] + " " + /*cssClassName*/ | ||
h[0])) && S(t, "class", _); | ||
}), ct()), (!v || A[0] & /*$popoverClass$, $layout$, cssClassName*/ | ||
25 && w !== (w = "thisway-popover " + /*$popoverClass$*/ | ||
f[3] + " thisway-popover__" + /*$layout$*/ | ||
f[4] + " " + /*cssClassName*/ | ||
f[0])) && P(t, "class", w); | ||
}, | ||
i(h) { | ||
v || (T(b), T(x), T(C), T(O, h), T(N, h), T(M), T(E), v = !0); | ||
i(f) { | ||
v || (S(m), S(T), S(x), S(M, f), S(k, f), S(C), S(E), v = !0); | ||
}, | ||
o(h) { | ||
B(b), B(x), B(C), B(O, h), B(N, h), B(M), B(E), v = !1; | ||
o(f) { | ||
R(m), R(T), R(x), R(M, f), R(k, f), R(C), R(E), v = !1; | ||
}, | ||
d(h) { | ||
h && j(t), $ && $.d(), b && b.d(), x && x.d(), C && C.d(), O && O.d(h), N && N.d(h), M && M.d(), E && E.d(); | ||
d(f) { | ||
f && W(t), $ && $.d(), m && m.d(), T && T.d(), x && x.d(), M && M.d(f), k && k.d(f), C && C.d(), E && E.d(); | ||
} | ||
}; | ||
} | ||
function Se(o) { | ||
function Te(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>', S(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>', P(t, "class", "thisway-popover-close"); | ||
}, | ||
m(n, r) { | ||
W(n, t, r), e || (s = Rt( | ||
m(i, r) { | ||
j(i, t, r), e || (s = It( | ||
t, | ||
@@ -1355,9 +1360,9 @@ "click", | ||
}, | ||
p: bt, | ||
d(n) { | ||
n && j(t), e = !1, s(); | ||
p: vt, | ||
d(i) { | ||
i && W(t), e = !1, s(); | ||
} | ||
}; | ||
} | ||
function Oe(o) { | ||
function Se(o) { | ||
let t, e; | ||
@@ -1367,3 +1372,3 @@ const s = ( | ||
o[30].title | ||
), n = $t( | ||
), i = mt( | ||
s, | ||
@@ -1373,41 +1378,41 @@ o, | ||
o[29], | ||
ke | ||
), r = n || _s(o); | ||
xe | ||
), r = i || _s(o); | ||
return { | ||
c() { | ||
t = U("header"), r && r.c(), S(t, "class", "thisway-popover-title"); | ||
t = U("header"), r && r.c(), P(t, "class", "thisway-popover-title"); | ||
}, | ||
m(i, a) { | ||
W(i, t, a), r && r.m(t, null), e = !0; | ||
m(n, a) { | ||
j(n, t, a), r && r.m(t, null), e = !0; | ||
}, | ||
p(i, a) { | ||
n ? n.p && (!e || a[0] & /*$$scope*/ | ||
536870912) && Ct( | ||
p(n, a) { | ||
i ? i.p && (!e || a[0] & /*$$scope*/ | ||
536870912) && yt( | ||
i, | ||
s, | ||
n, | ||
s, | ||
i, | ||
/*$$scope*/ | ||
i[29], | ||
e ? kt( | ||
n[29], | ||
e ? $t( | ||
s, | ||
/*$$scope*/ | ||
i[29], | ||
n[29], | ||
a, | ||
ws | ||
) : xt( | ||
gs | ||
) : bt( | ||
/*$$scope*/ | ||
i[29] | ||
n[29] | ||
), | ||
ke | ||
xe | ||
) : r && r.p && (!e || a[0] & /*$title$*/ | ||
2) && r.p(i, e ? a : [-1, -1]); | ||
2) && r.p(n, e ? a : [-1, -1]); | ||
}, | ||
i(i) { | ||
e || (T(r, i), e = !0); | ||
i(n) { | ||
e || (S(r, n), e = !0); | ||
}, | ||
o(i) { | ||
B(r, i), e = !1; | ||
o(n) { | ||
R(r, n), e = !1; | ||
}, | ||
d(i) { | ||
i && j(t), r && r.d(i); | ||
d(n) { | ||
n && W(t), r && r.d(n); | ||
} | ||
@@ -1420,3 +1425,3 @@ }; | ||
c() { | ||
t = Bt( | ||
t = Mt( | ||
/*$title$*/ | ||
@@ -1427,7 +1432,7 @@ o[1] | ||
m(e, s) { | ||
W(e, t, s); | ||
j(e, t, s); | ||
}, | ||
p(e, s) { | ||
s[0] & /*$title$*/ | ||
2 && Vt( | ||
2 && Lt( | ||
t, | ||
@@ -1439,7 +1444,7 @@ /*$title$*/ | ||
d(e) { | ||
e && j(t); | ||
e && W(t); | ||
} | ||
}; | ||
} | ||
function Ee(o) { | ||
function Oe(o) { | ||
let t, e; | ||
@@ -1449,3 +1454,3 @@ const s = ( | ||
o[30].description | ||
), n = $t( | ||
), i = mt( | ||
s, | ||
@@ -1455,49 +1460,49 @@ o, | ||
o[29], | ||
xe | ||
), r = n || gs(o); | ||
Ce | ||
), r = i || vs(o); | ||
return { | ||
c() { | ||
t = U("div"), r && r.c(), S(t, "class", "thisway-popover-description"); | ||
t = U("div"), r && r.c(), P(t, "class", "thisway-popover-description"); | ||
}, | ||
m(i, a) { | ||
W(i, t, a), r && r.m(t, null), e = !0; | ||
m(n, a) { | ||
j(n, t, a), r && r.m(t, null), e = !0; | ||
}, | ||
p(i, a) { | ||
n ? n.p && (!e || a[0] & /*$$scope*/ | ||
536870912) && Ct( | ||
p(n, a) { | ||
i ? i.p && (!e || a[0] & /*$$scope*/ | ||
536870912) && yt( | ||
i, | ||
s, | ||
n, | ||
s, | ||
i, | ||
/*$$scope*/ | ||
i[29], | ||
e ? kt( | ||
n[29], | ||
e ? $t( | ||
s, | ||
/*$$scope*/ | ||
i[29], | ||
n[29], | ||
a, | ||
us | ||
) : xt( | ||
ws | ||
) : bt( | ||
/*$$scope*/ | ||
i[29] | ||
n[29] | ||
), | ||
xe | ||
Ce | ||
) : r && r.p && (!e || a[0] & /*$description$*/ | ||
4) && r.p(i, e ? a : [-1, -1]); | ||
4) && r.p(n, e ? a : [-1, -1]); | ||
}, | ||
i(i) { | ||
e || (T(r, i), e = !0); | ||
i(n) { | ||
e || (S(r, n), e = !0); | ||
}, | ||
o(i) { | ||
B(r, i), e = !1; | ||
o(n) { | ||
R(r, n), e = !1; | ||
}, | ||
d(i) { | ||
i && j(t), r && r.d(i); | ||
d(n) { | ||
n && W(t), r && r.d(n); | ||
} | ||
}; | ||
} | ||
function gs(o) { | ||
function vs(o) { | ||
let t; | ||
return { | ||
c() { | ||
t = Bt( | ||
t = Mt( | ||
/*$description$*/ | ||
@@ -1508,7 +1513,7 @@ o[2] | ||
m(e, s) { | ||
W(e, t, s); | ||
j(e, t, s); | ||
}, | ||
p(e, s) { | ||
s[0] & /*$description$*/ | ||
4 && Vt( | ||
4 && Lt( | ||
t, | ||
@@ -1520,3 +1525,3 @@ /*$description$*/ | ||
d(e) { | ||
e && j(t); | ||
e && W(t); | ||
} | ||
@@ -1527,83 +1532,83 @@ }; | ||
let t, e; | ||
return t = new so({}), { | ||
return t = new ro({}), { | ||
c() { | ||
Ot(t.$$.fragment); | ||
kt(t.$$.fragment); | ||
}, | ||
m(s, n) { | ||
Et(t, s, n), e = !0; | ||
m(s, i) { | ||
Tt(t, s, i), e = !0; | ||
}, | ||
i(s) { | ||
e || (T(t.$$.fragment, s), e = !0); | ||
e || (S(t.$$.fragment, s), e = !0); | ||
}, | ||
o(s) { | ||
B(t.$$.fragment, s), e = !1; | ||
R(t.$$.fragment, s), e = !1; | ||
}, | ||
d(s) { | ||
Pt(t, s); | ||
St(t, s); | ||
} | ||
}; | ||
} | ||
function Ae(o) { | ||
function Ee(o) { | ||
let t, e; | ||
return t = new so({}), { | ||
return t = new ro({}), { | ||
c() { | ||
Ot(t.$$.fragment); | ||
kt(t.$$.fragment); | ||
}, | ||
m(s, n) { | ||
Et(t, s, n), e = !0; | ||
m(s, i) { | ||
Tt(t, s, i), e = !0; | ||
}, | ||
i(s) { | ||
e || (T(t.$$.fragment, s), e = !0); | ||
e || (S(t.$$.fragment, s), e = !0); | ||
}, | ||
o(s) { | ||
B(t.$$.fragment, s), e = !1; | ||
R(t.$$.fragment, s), e = !1; | ||
}, | ||
d(s) { | ||
Pt(t, s); | ||
St(t, s); | ||
} | ||
}; | ||
} | ||
function Ne(o) { | ||
let t, e, s, n = ( | ||
function Ae(o) { | ||
let t, e, s, i = ( | ||
/*$previousButtonVisible$*/ | ||
o[9] && Ie(o) | ||
o[9] && Ne(o) | ||
), r = ( | ||
/*$hasSteps$*/ | ||
o[11] && Me(o) | ||
o[11] && Ie(o) | ||
); | ||
return { | ||
c() { | ||
n && n.c(), t = Q(), r && r.c(), e = Xt(); | ||
i && i.c(), t = et(), r && r.c(), e = Wt(); | ||
}, | ||
m(i, a) { | ||
n && n.m(i, a), W(i, t, a), r && r.m(i, a), W(i, e, a), s = !0; | ||
m(n, a) { | ||
i && i.m(n, a), j(n, t, a), r && r.m(n, a), j(n, e, a), s = !0; | ||
}, | ||
p(i, a) { | ||
p(n, a) { | ||
/*$previousButtonVisible$*/ | ||
i[9] ? n ? (n.p(i, a), a[0] & /*$previousButtonVisible$*/ | ||
512 && T(n, 1)) : (n = Ie(i), n.c(), T(n, 1), n.m(t.parentNode, t)) : n && (ct(), B(n, 1, 1, () => { | ||
n = null; | ||
}), pt()), /*$hasSteps$*/ | ||
i[11] ? r ? (r.p(i, a), a[0] & /*$hasSteps$*/ | ||
2048 && T(r, 1)) : (r = Me(i), r.c(), T(r, 1), r.m(e.parentNode, e)) : r && (ct(), B(r, 1, 1, () => { | ||
n[9] ? i ? (i.p(n, a), a[0] & /*$previousButtonVisible$*/ | ||
512 && S(i, 1)) : (i = Ne(n), i.c(), S(i, 1), i.m(t.parentNode, t)) : i && (lt(), R(i, 1, 1, () => { | ||
i = null; | ||
}), ct()), /*$hasSteps$*/ | ||
n[11] ? r ? (r.p(n, a), a[0] & /*$hasSteps$*/ | ||
2048 && S(r, 1)) : (r = Ie(n), r.c(), S(r, 1), r.m(e.parentNode, e)) : r && (lt(), R(r, 1, 1, () => { | ||
r = null; | ||
}), pt()); | ||
}), ct()); | ||
}, | ||
i(i) { | ||
s || (T(n), T(r), s = !0); | ||
i(n) { | ||
s || (S(i), S(r), s = !0); | ||
}, | ||
o(i) { | ||
B(n), B(r), s = !1; | ||
o(n) { | ||
R(i), R(r), s = !1; | ||
}, | ||
d(i) { | ||
i && (j(t), j(e)), n && n.d(i), r && r.d(i); | ||
d(n) { | ||
n && (W(t), W(e)), i && i.d(n), r && r.d(n); | ||
} | ||
}; | ||
} | ||
function Ie(o) { | ||
let t, e, s, n; | ||
function Ne(o) { | ||
let t, e, s, i; | ||
const r = ( | ||
/*#slots*/ | ||
o[30].prevText | ||
), i = $t( | ||
), n = mt( | ||
r, | ||
@@ -1613,10 +1618,10 @@ o, | ||
o[29], | ||
$e | ||
), a = i || ys(o); | ||
be | ||
), a = n || bs(o); | ||
return { | ||
c() { | ||
t = U("button"), a && a.c(), S(t, "class", "thisway-popover-prev"); | ||
t = U("button"), a && a.c(), P(t, "class", "thisway-popover-prev"); | ||
}, | ||
m(l, c) { | ||
W(l, t, c), a && a.m(t, null), e = !0, s || (n = Rt( | ||
m(l, p) { | ||
j(l, t, p), a && a.m(t, null), e = !0, s || (i = It( | ||
t, | ||
@@ -1628,6 +1633,6 @@ "click", | ||
}, | ||
p(l, c) { | ||
i ? i.p && (!e || c[0] & /*$$scope*/ | ||
536870912) && Ct( | ||
i, | ||
p(l, p) { | ||
n ? n.p && (!e || p[0] & /*$$scope*/ | ||
536870912) && yt( | ||
n, | ||
r, | ||
@@ -1637,47 +1642,47 @@ l, | ||
l[29], | ||
e ? kt( | ||
e ? $t( | ||
r, | ||
/*$$scope*/ | ||
l[29], | ||
c, | ||
fs | ||
) : xt( | ||
p, | ||
ds | ||
) : bt( | ||
/*$$scope*/ | ||
l[29] | ||
), | ||
$e | ||
) : a && a.p && (!e || c[0] & /*$previousText$, $layout$*/ | ||
1040) && a.p(l, e ? c : [-1, -1]); | ||
be | ||
) : a && a.p && (!e || p[0] & /*$previousText$, $layout$*/ | ||
1040) && a.p(l, e ? p : [-1, -1]); | ||
}, | ||
i(l) { | ||
e || (T(a, l), e = !0); | ||
e || (S(a, l), e = !0); | ||
}, | ||
o(l) { | ||
B(a, l), e = !1; | ||
R(a, l), e = !1; | ||
}, | ||
d(l) { | ||
l && j(t), a && a.d(l), s = !1, n(); | ||
l && W(t), a && a.d(l), s = !1, i(); | ||
} | ||
}; | ||
} | ||
function vs(o) { | ||
function ms(o) { | ||
let t, e; | ||
return { | ||
c() { | ||
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"); | ||
t = Ht("svg"), e = Ht("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"); | ||
}, | ||
m(s, n) { | ||
W(s, t, n), X(t, e); | ||
m(s, i) { | ||
j(s, t, i), K(t, e); | ||
}, | ||
p: bt, | ||
p: vt, | ||
d(s) { | ||
s && j(t); | ||
s && W(t); | ||
} | ||
}; | ||
} | ||
function ms(o) { | ||
function ys(o) { | ||
let t; | ||
return { | ||
c() { | ||
t = Bt( | ||
t = Mt( | ||
/*$previousText$*/ | ||
@@ -1688,7 +1693,7 @@ o[10] | ||
m(e, s) { | ||
W(e, t, s); | ||
j(e, t, s); | ||
}, | ||
p(e, s) { | ||
s[0] & /*$previousText$*/ | ||
1024 && Vt( | ||
1024 && Lt( | ||
t, | ||
@@ -1700,36 +1705,36 @@ /*$previousText$*/ | ||
d(e) { | ||
e && j(t); | ||
e && W(t); | ||
} | ||
}; | ||
} | ||
function ys(o) { | ||
function bs(o) { | ||
let t; | ||
function e(r, i) { | ||
function e(r, n) { | ||
return ( | ||
/*$layout$*/ | ||
r[4] !== We ? ms : vs | ||
r[4] !== He ? ys : ms | ||
); | ||
} | ||
let s = e(o), n = s(o); | ||
let s = e(o), i = s(o); | ||
return { | ||
c() { | ||
n.c(), t = Xt(); | ||
i.c(), t = Wt(); | ||
}, | ||
m(r, i) { | ||
n.m(r, i), W(r, t, i); | ||
m(r, n) { | ||
i.m(r, n), j(r, t, n); | ||
}, | ||
p(r, i) { | ||
s === (s = e(r)) && n ? n.p(r, i) : (n.d(1), n = s(r), n && (n.c(), n.m(t.parentNode, t))); | ||
p(r, n) { | ||
s === (s = e(r)) && i ? i.p(r, n) : (i.d(1), i = s(r), i && (i.c(), i.m(t.parentNode, t))); | ||
}, | ||
d(r) { | ||
r && j(t), n.d(r); | ||
r && W(t), i.d(r); | ||
} | ||
}; | ||
} | ||
function Me(o) { | ||
let t, e, s, n; | ||
function Ie(o) { | ||
let t, e, s, i; | ||
const r = ( | ||
/*#slots*/ | ||
o[30].nextText | ||
), i = $t( | ||
), n = mt( | ||
r, | ||
@@ -1739,10 +1744,10 @@ o, | ||
o[29], | ||
be | ||
), a = i || bs(o); | ||
ye | ||
), a = n || $s(o); | ||
return { | ||
c() { | ||
t = U("button"), a && a.c(), S(t, "class", "thisway-popover-next"); | ||
t = U("button"), a && a.c(), P(t, "class", "thisway-popover-next"); | ||
}, | ||
m(l, c) { | ||
W(l, t, c), a && a.m(t, null), e = !0, s || (n = Rt( | ||
m(l, p) { | ||
j(l, t, p), a && a.m(t, null), e = !0, s || (i = It( | ||
t, | ||
@@ -1754,6 +1759,6 @@ "click", | ||
}, | ||
p(l, c) { | ||
i ? i.p && (!e || c[0] & /*$$scope*/ | ||
536870912) && Ct( | ||
i, | ||
p(l, p) { | ||
n ? n.p && (!e || p[0] & /*$$scope*/ | ||
536870912) && yt( | ||
n, | ||
r, | ||
@@ -1763,32 +1768,32 @@ l, | ||
l[29], | ||
e ? kt( | ||
e ? $t( | ||
r, | ||
/*$$scope*/ | ||
l[29], | ||
c, | ||
hs | ||
) : xt( | ||
p, | ||
fs | ||
) : bt( | ||
/*$$scope*/ | ||
l[29] | ||
), | ||
be | ||
) : a && a.p && (!e || c[0] & /*$nextButtonText$*/ | ||
4096) && a.p(l, e ? c : [-1, -1]); | ||
ye | ||
) : a && a.p && (!e || p[0] & /*$nextButtonText$*/ | ||
4096) && a.p(l, e ? p : [-1, -1]); | ||
}, | ||
i(l) { | ||
e || (T(a, l), e = !0); | ||
e || (S(a, l), e = !0); | ||
}, | ||
o(l) { | ||
B(a, l), e = !1; | ||
R(a, l), e = !1; | ||
}, | ||
d(l) { | ||
l && j(t), a && a.d(l), s = !1, n(); | ||
l && W(t), a && a.d(l), s = !1, i(); | ||
} | ||
}; | ||
} | ||
function bs(o) { | ||
function $s(o) { | ||
let t; | ||
return { | ||
c() { | ||
t = Bt( | ||
t = Mt( | ||
/*$nextButtonText$*/ | ||
@@ -1799,7 +1804,7 @@ o[12] | ||
m(e, s) { | ||
W(e, t, s); | ||
j(e, t, s); | ||
}, | ||
p(e, s) { | ||
s[0] & /*$nextButtonText$*/ | ||
4096 && Vt( | ||
4096 && Lt( | ||
t, | ||
@@ -1811,7 +1816,7 @@ /*$nextButtonText$*/ | ||
d(e) { | ||
e && j(t); | ||
e && W(t); | ||
} | ||
}; | ||
} | ||
function $s(o) { | ||
function Cs(o) { | ||
let t, e, s = ( | ||
@@ -1822,120 +1827,120 @@ /*$title$*/ | ||
o[28].title || /*$$slots*/ | ||
o[28].description) && Te(o) | ||
o[28].description) && ke(o) | ||
); | ||
return { | ||
c() { | ||
s && s.c(), t = Xt(); | ||
s && s.c(), t = Wt(); | ||
}, | ||
m(n, r) { | ||
s && s.m(n, r), W(n, t, r), e = !0; | ||
m(i, r) { | ||
s && s.m(i, r), j(i, t, r), e = !0; | ||
}, | ||
p(n, r) { | ||
p(i, r) { | ||
/*$title$*/ | ||
n[1] || /*$description$*/ | ||
n[2] || /*$$slots*/ | ||
n[28].title || /*$$slots*/ | ||
n[28].description ? s ? (s.p(n, r), r[0] & /*$title$, $description$, $$slots*/ | ||
268435462 && T(s, 1)) : (s = Te(n), s.c(), T(s, 1), s.m(t.parentNode, t)) : s && (ct(), B(s, 1, 1, () => { | ||
i[1] || /*$description$*/ | ||
i[2] || /*$$slots*/ | ||
i[28].title || /*$$slots*/ | ||
i[28].description ? s ? (s.p(i, r), r[0] & /*$title$, $description$, $$slots*/ | ||
268435462 && S(s, 1)) : (s = ke(i), s.c(), S(s, 1), s.m(t.parentNode, t)) : s && (lt(), R(s, 1, 1, () => { | ||
s = null; | ||
}), pt()); | ||
}), ct()); | ||
}, | ||
i(n) { | ||
e || (T(s), e = !0); | ||
i(i) { | ||
e || (S(s), e = !0); | ||
}, | ||
o(n) { | ||
B(s), e = !1; | ||
o(i) { | ||
R(s), e = !1; | ||
}, | ||
d(n) { | ||
n && j(t), s && s.d(n); | ||
d(i) { | ||
i && W(t), s && s.d(i); | ||
} | ||
}; | ||
} | ||
function Cs(o, t, e) { | ||
let s, n, r, i, a, l, c, u, f, d, g, p, { $$slots: _ = {}, $$scope: v } = t; | ||
const $ = Co(_); | ||
let { cssClassName: b = "" } = t; | ||
const x = co(), C = H(Ft), R = Fo(), O = H(ee), A = H(oe), N = H(Qt), M = L(A, (w) => { | ||
var J; | ||
return `thisway-popover-${(J = w == null ? void 0 : w.orientation) == null ? void 0 : J.toLowerCase()}`; | ||
function xs(o, t, e) { | ||
let s, i, r, n, a, l, p, c, b, u, _, h, { $$slots: w = {}, $$scope: v } = t; | ||
const $ = xo(w); | ||
let { cssClassName: m = "" } = t; | ||
const T = po(), x = H(Rt), B = Do(), M = H(te), N = H(ee), k = H(Jt), C = L(N, (d) => { | ||
var Q; | ||
return `thisway-popover-${(Q = d == null ? void 0 : d.orientation) == null ? void 0 : Q.toLowerCase()}`; | ||
}); | ||
I(o, M, (w) => e(3, r = w)); | ||
const E = L(A, (w) => `thisway-popover__arrow-${w == null ? void 0 : w.alignment.toLowerCase()}`); | ||
I(o, E, (w) => e(5, a = w)); | ||
const h = Je(), P = L(O, (w) => w > 1); | ||
I(o, P, (w) => e(11, g = w)); | ||
const q = L([P, R], ([w, J]) => w && (J || 0) > 0); | ||
I(o, q, (w) => e(9, f = w)); | ||
const st = V(h, "title"); | ||
I(o, st, (w) => e(1, s = w)); | ||
const Z = V(h, "description"); | ||
I(o, Z, (w) => e(2, n = w)); | ||
const ft = V(h, "showCloseBtn"); | ||
I(o, ft, (w) => e(6, l = w)); | ||
const nt = V(h, "showCtrlBtns"); | ||
I(o, nt, (w) => e(8, u = w)); | ||
const y = V(h, "showProgress", !0); | ||
I(o, y, (w) => e(7, c = w)); | ||
const F = V(h, "prevBtnText"); | ||
I(o, F, (w) => e(10, d = w)); | ||
const z = V(N, "layout", St); | ||
I(o, z, (w) => e(4, i = w)); | ||
const tt = to(C.store, R), K = L([h, tt, R, z], ([w, J, vt, m]) => { | ||
var G; | ||
if (vt === 0) | ||
return w.startBtnText; | ||
if (J) | ||
if (m === We) { | ||
const at = ((G = J.popover) == null ? void 0 : G.title) ?? ""; | ||
return `${w.nextBtnText} ${at}`; | ||
I(o, C, (d) => e(3, r = d)); | ||
const E = L(N, (d) => `thisway-popover__arrow-${d == null ? void 0 : d.alignment.toLowerCase()}`); | ||
I(o, E, (d) => e(5, a = d)); | ||
const f = Je(), A = L(M, (d) => d > 1); | ||
I(o, A, (d) => e(11, _ = d)); | ||
const q = L([A, B], ([d, Q]) => d && (Q || 0) > 0); | ||
I(o, q, (d) => e(9, b = d)); | ||
const it = F(f, "title"); | ||
I(o, it, (d) => e(1, s = d)); | ||
const Z = F(f, "description"); | ||
I(o, Z, (d) => e(2, i = d)); | ||
const ht = F(f, "showCloseBtn"); | ||
I(o, ht, (d) => e(6, l = d)); | ||
const ot = F(f, "showCtrlBtns"); | ||
I(o, ot, (d) => e(8, c = d)); | ||
const y = F(f, "showProgress", !0); | ||
I(o, y, (d) => e(7, p = d)); | ||
const V = F(f, "prevBtnText"); | ||
I(o, V, (d) => e(10, u = d)); | ||
const z = F(k, "layout", xt); | ||
I(o, z, (d) => e(4, n = d)); | ||
const J = to(x.store, B), X = L([f, J, B, z], ([d, Q, g, G]) => { | ||
var nt; | ||
if (g === 0) | ||
return d.startBtnText; | ||
if (Q) | ||
if (G === He) { | ||
const tt = ((nt = Q.popover) == null ? void 0 : nt.title) ?? ""; | ||
return `${d.nextBtnText} ${tt}`; | ||
} else | ||
return w.nextBtnText; | ||
return d.nextBtnText; | ||
else | ||
return w.doneBtnText; | ||
return d.doneBtnText; | ||
}); | ||
I(o, K, (w) => e(12, p = w)); | ||
const D = () => x("close"), it = () => x("previous"), dt = () => x("next"); | ||
return o.$$set = (w) => { | ||
"cssClassName" in w && e(0, b = w.cssClassName), "$$scope" in w && e(29, v = w.$$scope); | ||
I(o, X, (d) => e(12, h = d)); | ||
const D = () => T("close"), dt = () => T("previous"), ft = () => T("next"); | ||
return o.$$set = (d) => { | ||
"cssClassName" in d && e(0, m = d.cssClassName), "$$scope" in d && e(29, v = d.$$scope); | ||
}, [ | ||
b, | ||
m, | ||
s, | ||
i, | ||
r, | ||
n, | ||
r, | ||
i, | ||
a, | ||
l, | ||
p, | ||
c, | ||
b, | ||
u, | ||
f, | ||
d, | ||
g, | ||
p, | ||
M, | ||
_, | ||
h, | ||
C, | ||
E, | ||
P, | ||
A, | ||
q, | ||
st, | ||
it, | ||
Z, | ||
ft, | ||
nt, | ||
ht, | ||
ot, | ||
y, | ||
F, | ||
V, | ||
z, | ||
K, | ||
X, | ||
D, | ||
it, | ||
dt, | ||
ft, | ||
$, | ||
v, | ||
_ | ||
w | ||
]; | ||
} | ||
class xs extends It { | ||
class ks extends Et { | ||
constructor(t) { | ||
super(), Mt(this, t, Cs, $s, Lt, { cssClassName: 0 }, ps, [-1, -1]); | ||
super(), At(this, t, xs, Cs, Nt, { cssClassName: 0 }, hs, [-1, -1]); | ||
} | ||
} | ||
class ks { | ||
class Ts { | ||
constructor(t) { | ||
et(this, "options$"); | ||
st(this, "options$"); | ||
this.options$ = t; | ||
@@ -1951,8 +1956,8 @@ } | ||
getPopoverComponent(t, e) { | ||
return xs; | ||
return ks; | ||
} | ||
} | ||
class Ts extends ns { | ||
class Ss extends ns { | ||
constructor(t) { | ||
const { steps: e } = t, s = wt(t), n = new ks(s); | ||
const { steps: e } = t, s = wt(t), i = new Ts(s); | ||
for (const r of [ | ||
@@ -1968,11 +1973,11 @@ "beforeStepChange", | ||
continue; | ||
const i = t[r]; | ||
typeof i == "function" && (n[r] = i); | ||
const n = t[r]; | ||
typeof n == "function" && (i[r] = n); | ||
} | ||
super(Mo(Ss(e), void 0), n, Ke(), s); | ||
super(Lo(Os(e), void 0), i, Ge(), s); | ||
} | ||
} | ||
const Ss = (o) => { | ||
const Os = (o) => { | ||
let t = o.length; | ||
const e = /* @__PURE__ */ new Set(), s = (r) => typeof r == "string" || Number.isFinite(r) && !e.has(r), n = (r) => { | ||
const e = /* @__PURE__ */ new Set(), s = (r) => typeof r == "string" || Number.isFinite(r) && !e.has(r), i = (r) => { | ||
if (!e.has(r)) | ||
@@ -1986,4 +1991,4 @@ return e.add(r), r; | ||
s(r.id) && e.add(r.id); | ||
return o.map((r, i) => { | ||
const a = s(r.id) ? r.id : n(i); | ||
return o.map((r, n) => { | ||
const a = s(r.id) ? r.id : i(n); | ||
return { | ||
@@ -1995,3 +2000,3 @@ ...r, | ||
}, Ws = (o) => { | ||
const t = new Ts({ | ||
const t = new Ss({ | ||
steps: [ | ||
@@ -2006,49 +2011,49 @@ { | ||
}; | ||
function Os(o) { | ||
const t = H(te), { onMount: e, onDestroy: s } = H(No), n = t.subscribe((r) => { | ||
function Ps(o) { | ||
const t = H(Qt), { onMount: e, onDestroy: s } = H(Io), i = t.subscribe((r) => { | ||
r ? e(r) : s(); | ||
}); | ||
return Re(() => { | ||
n(), s(); | ||
return Le(() => { | ||
i(), s(); | ||
}), []; | ||
} | ||
class js extends It { | ||
class Ys extends Et { | ||
constructor(t) { | ||
super(), Mt(this, t, Os, null, Lt, {}); | ||
super(), At(this, t, Ps, null, Nt, {}); | ||
} | ||
} | ||
export { | ||
se as DelegateContext, | ||
Xe as ElementBoundingContext, | ||
No as ForeignViewContext, | ||
js as ForeignViewHost, | ||
Qt as OptionsContext, | ||
oe as PlacementContext, | ||
xs as PopoverCard, | ||
te as PopoverContainerContext, | ||
ze as PopoverSizeContext, | ||
re as RenderStateContext, | ||
zt as StepOptionsContext, | ||
Io as StepsController, | ||
Ts as ThisWay, | ||
ks as ThisWayDefaultDelegate, | ||
ee as TotalStepCountContext, | ||
oe as DelegateContext, | ||
Ke as ElementBoundingContext, | ||
Io as ForeignViewContext, | ||
Ys as ForeignViewHost, | ||
Jt as OptionsContext, | ||
ee as PlacementContext, | ||
ks as PopoverCard, | ||
Qt as PopoverContainerContext, | ||
Xe as PopoverSizeContext, | ||
se as RenderStateContext, | ||
Yt as StepOptionsContext, | ||
Mo as StepsController, | ||
Ss as ThisWay, | ||
Ts as ThisWayDefaultDelegate, | ||
te as TotalStepCountContext, | ||
ns as Tour, | ||
Ft as TourContext, | ||
Ke as createContexts, | ||
Mo as createStepsStore, | ||
Ro as defaultKeydownAction, | ||
ot as defineContext, | ||
Zt as findStepIndex, | ||
Rt as TourContext, | ||
Ge as createContexts, | ||
Lo as createStepsStore, | ||
Bo as defaultKeydownAction, | ||
rt as defineContext, | ||
Ut as findStepIndex, | ||
H as getContext, | ||
Hs as getHighlightOptions, | ||
js as getHighlightOptions, | ||
to as getNextStep, | ||
Je as getPopoverOptions, | ||
Fo as getRenderIndex, | ||
Do as getRenderIndex, | ||
Qe as getTheme, | ||
Ws as highlight, | ||
Vo as mergeStepOption, | ||
Do as normalizeTheme, | ||
oo as parsePlacement, | ||
Ds as setContext | ||
Fo as mergeStepOption, | ||
Ho as normalizeTheme, | ||
so as parsePlacement, | ||
Hs as setContext | ||
}; |
import type { Rect } from '@thisway/base'; | ||
import { type Size } from '@thisway/utils'; | ||
import { type Size, type Transform } from '@thisway/utils'; | ||
export type HighlightRect = Rect & { | ||
@@ -7,2 +7,3 @@ borderWidth: number; | ||
}; | ||
export declare function calculateHighlightPadding(padding: number, transform: Readonly<Transform>): [number, number]; | ||
export declare const calculateMaskCommand: (bounding: HighlightRect, showBorder: boolean, viewportSize: Size, transform: readonly [number, number, number, number, number, number]) => string; |
@@ -1,2 +0,2 @@ | ||
import type { Alignment, HighlightOptionsWithDefaultValues, IComputePlacementState, ITourDelegate, NoElement, Orientation, PopoverPlacement, PopoverPosition, PopoverPositionParsed, Rect } from '@thisway/base'; | ||
import type { Alignment, IComputePlacementState, ITourDelegate, NoElement, Orientation, PopoverPlacement, PopoverPosition, PopoverPositionParsed, Rect } from '@thisway/base'; | ||
import { NO_ELEMENT } from '@thisway/base'; | ||
@@ -20,3 +20,3 @@ import { type Size } from '@thisway/utils'; | ||
*/ | ||
export declare const getStyleFromOrientation: (orientation: Orientation, stepAlignment: Alignment | undefined, elementRect: Rect | NoElement | undefined, popoverSize: Size, popoverOffset: number, highlightOption: HighlightOptionsWithDefaultValues, viewport: Size, offsetX: number, offsetY: number, transform: readonly [number, number, number, number, number, number]) => { | ||
export declare const getStyleFromOrientation: (orientation: Orientation, stepAlignment: Alignment | undefined, elementRect: Rect | NoElement | undefined, popoverSize: Size, popoverOffset: number, viewport: Size, offsetX: number, offsetY: number) => { | ||
style: PopoverPlacement; | ||
@@ -23,0 +23,0 @@ alignment: Alignment; |
import type { ITourDelegate, PopoverPlacement } from '@thisway/base'; | ||
import { type Size } from '@thisway/utils'; | ||
export declare const getViewportSize: (delegate: ITourDelegate, transform: readonly [number, number, number, number, number, number]) => Size; | ||
export declare function getContainer(delegate: ITourDelegate): HTMLElement; | ||
export declare const getViewportSize: (delegate: ITourDelegate) => Size; | ||
export declare const styleFromPlacement: ({ x, y, ...others }: PopoverPlacement) => { | ||
@@ -5,0 +6,0 @@ visibility: string; |
{ | ||
"name": "@thisway/next", | ||
"version": "0.10.1-beta.0", | ||
"version": "0.10.1-beta.10", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
2399
110665