| 1 |
!(function (e, t) { |
| 2 |
"object" == typeof exports && "object" == typeof module ? (module.exports = t()) : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? (exports.rexWizard = t()) : (e.rexWizard = t()); |
| 3 |
})(this, () => { |
| 4 |
return ( |
| 5 |
(e = { |
| 6 |
987: (e) => { |
| 7 |
function t(e, t) { |
| 8 |
var n = document.createElement("style"); |
| 9 |
(n.type = "text/css"), (n.innerHTML = "." + e + " {" + t + "}"), document.head.appendChild(n); |
| 10 |
} |
| 11 |
e.exports = function e(n) { |
| 12 |
var i = n.general, |
| 13 |
r = n.steps, |
| 14 |
o = document.getElementById(null == i ? void 0 : i.targetElement) || d(null == i ? void 0 : i.targetElement, document.body), |
| 15 |
l = document.getElementById("progressBarContainer") || d("progressBarContainer", null == o ? void 0 : o.parentNode, o); |
| 16 |
function d(e, t) { |
| 17 |
var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null, |
| 18 |
i = document.createElement("div"); |
| 19 |
return (i.id = e), i.setAttribute("style", "display:flex; align-items:center; justify-content:space-around"), n ? t.insertBefore(i, n) : t.appendChild(i), i; |
| 20 |
} |
| 21 |
function a(e, n, i) { |
| 22 |
e.innerHTML = ""; |
| 23 |
var r, |
| 24 |
o, |
| 25 |
l = document.createElement("div"), |
| 26 |
d = "setup-wizard__pregress-bar"; |
| 27 |
t(d, "width:100%; text-align: center; display:flex;"), |
| 28 |
(o = d), |
| 29 |
(r = l).classList ? r.classList.add(o) : (r.className += " " + o), |
| 30 |
null == n || |
| 31 |
n.forEach(function (e, n) { |
| 32 |
var r = document.createElement("div"); |
| 33 |
(r.innerHTML = ""), |
| 34 |
(r.innerHTML = |
| 35 |
n === i || n > i |
| 36 |
? " <p> <span> ".concat(n + 1, " </span> ").concat(null == e ? void 0 : e.stepText, " </p> ") |
| 37 |
: '\n <p>\n <span>\n <svg width="8" height="8" viewBox="0 0 9 9" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M0.935499 4.11026C0.75836 4.11077 0.584981 4.16272 0.435422 4.26009C0.285862 4.35746 0.166233 4.49629 0.0903747 4.66049C0.0145167 4.8247 -0.0144703 5.00759 0.00676735 5.18799C0.028005 5.36839 0.0985994 5.53894 0.210383 5.67991L2.59335 8.67442C2.67832 8.78265 2.78723 8.86851 2.91104 8.92489C3.03485 8.98127 3.16999 9.00652 3.30522 8.99857C3.59447 8.98263 3.8556 8.82391 4.02209 8.56294L8.97213 0.385047L8.97465 0.380997C9.0211 0.307842 9.00604 0.162868 8.91017 0.0717941C8.88383 0.0467839 8.85279 0.0275693 8.81894 0.0153333C8.78509 0.00309728 8.74916 -0.00190095 8.71336 0.00064652C8.67755 0.00319399 8.64264 0.0132332 8.61076 0.0301458C8.57888 0.0470584 8.55072 0.0704864 8.528 0.0989868C8.52623 0.101228 8.5244 0.103435 8.52251 0.105608L3.53034 5.89168C3.51134 5.91369 3.48827 5.93162 3.46246 5.94442C3.43666 5.95721 3.40863 5.96462 3.38001 5.9662C3.35139 5.96779 3.32274 5.96353 3.29574 5.95367C3.26874 5.9438 3.24392 5.92853 3.22272 5.90874L1.56591 4.3621C1.39384 4.20029 1.16893 4.11044 0.935499 4.11026Z"\n fill="white" />\n </svg> \n </span> \n '.concat( |
| 38 |
null == e ? void 0 : e.stepText, |
| 39 |
"\n </p>\n " |
| 40 |
)); |
| 41 |
var o = "setup-wizard__pregress-step"; |
| 42 |
t(o, "display: inline-block; position: relative; padding: 15px 68.5px 15px 16px; background: #E5E8F3;"), |
| 43 |
r.classList.add(o), |
| 44 |
r.classList.add(n < i ? "step-visited" : n === i ? "step-active" : "step-not-visited"), |
| 45 |
l.appendChild(r); |
| 46 |
}), |
| 47 |
e.appendChild(l); |
| 48 |
} |
| 49 |
function p(e, t, n) { |
| 50 |
var i, r, o; |
| 51 |
if (((e.innerHTML = ""), null !== (i = t[null == n ? void 0 : n.currentStep]) && void 0 !== i && i.title)) { |
| 52 |
var l, |
| 53 |
d = document.createElement("h1"); |
| 54 |
(d.textContent = null === (l = t[null == n ? void 0 : n.currentStep]) || void 0 === l ? void 0 : l.title), e.appendChild(d); |
| 55 |
} |
| 56 |
if (null !== (r = t[null == n ? void 0 : n.currentStep]) && void 0 !== r && r.description) { |
| 57 |
var a, |
| 58 |
p = document.createElement("p"); |
| 59 |
(p.textContent = null === (a = t[null == n ? void 0 : n.currentStep]) || void 0 === a ? void 0 : a.description), e.appendChild(p); |
| 60 |
} |
| 61 |
var u = document.createElement("div"); |
| 62 |
(u.innerHTML = null === (o = t[null == n ? void 0 : n.currentStep]) || void 0 === o ? void 0 : o.html), (u.className = "active-step"), e.appendChild(u); |
| 63 |
} |
| 64 |
function u(e) { |
| 65 |
e < r.length && e >= 0 && ((i.currentStep = e), p(o, r, i), a(l, r, null == i ? void 0 : i.currentStep)); |
| 66 |
} |
| 67 |
return ( |
| 68 |
(function (e, t, n) { |
| 69 |
var i = e.logo, |
| 70 |
r = e.logoStyles, |
| 71 |
o = document.getElementById("wizardLogo"); |
| 72 |
!o && i ? (((o = document.createElement("img")).id = "wizardLogo"), (o.src = i), (o.alt = "Wizard Logo"), o.classList.add(r || ""), t.insertBefore(o, n)) : o && i && ((o.src = i), o.classList.add(r || "")); |
| 73 |
})(i, null == l ? void 0 : l.parentNode, l), |
| 74 |
a(l, r, null == i ? void 0 : i.currentStep), |
| 75 |
p(o, r, i), |
| 76 |
{ |
| 77 |
rexWizard: e, |
| 78 |
previousStep: function () { |
| 79 |
u((null == i ? void 0 : i.currentStep) - 1); |
| 80 |
}, |
| 81 |
nextStep: function () { |
| 82 |
u((null == i ? void 0 : i.currentStep) + 1); |
| 83 |
}, |
| 84 |
skipStep: function () { |
| 85 |
var e, t; |
| 86 |
(e = null == i ? void 0 : i.currentStep), |
| 87 |
u( |
| 88 |
-1 !== |
| 89 |
(t = |
| 90 |
null == r |
| 91 |
? void 0 |
| 92 |
: r.findIndex(function (t, n) { |
| 93 |
return n > e && !t.isSkip; |
| 94 |
})) |
| 95 |
? t |
| 96 |
: (null == r ? void 0 : r.length) - 1 |
| 97 |
); |
| 98 |
}, |
| 99 |
getCurrentStep: function () { |
| 100 |
return null == i ? void 0 : i.currentStep; |
| 101 |
}, |
| 102 |
} |
| 103 |
); |
| 104 |
}; |
| 105 |
}, |
| 106 |
}), |
| 107 |
(t = {}), |
| 108 |
(function n(i) { |
| 109 |
var r = t[i]; |
| 110 |
if (void 0 !== r) return r.exports; |
| 111 |
var o = (t[i] = { exports: {} }); |
| 112 |
return e[i](o, o.exports, n), o.exports; |
| 113 |
})(987) |
| 114 |
); |
| 115 |
var e, t; |
| 116 |
}); |
| 117 |
|