").appendTo(i)
, n = i.uniqueId().attr("id");
return this._addClass(s, "ui-tooltip-content"),
this._addClass(i, "ui-tooltip", "ui-widget ui-widget-content"),
i.appendTo(this._appendTo(e)),
this.tooltips[n] = {
element: e,
tooltip: i
}
},
_find: function(t) {
var e = t.data("ui-tooltip-id");
return e ? this.tooltips[e] : null
},
_removeTooltip: function(t) {
t.remove(),
delete this.tooltips[t.attr("id")]
},
_appendTo: function(t) {
var e = t.closest(".ui-front, dialog");
return e.length || (e = this.document[0].body),
e
},
_destroy: function() {
var e = this;
t.each(this.tooltips, function(i, s) {
var n = t.Event("blur")
, o = s.element;
n.target = n.currentTarget = o[0],
e.close(n, !0),
t("#" + i).remove(),
o.data("ui-tooltip-title") && (o.attr("title") || o.attr("title", o.data("ui-tooltip-title")),
o.removeData("ui-tooltip-title"))
}),
this.liveRegion.remove()
}
}),
t.uiBackCompat !== !1 && t.widget("ui.tooltip", t.ui.tooltip, {
options: {
tooltipClass: null
},
_tooltip: function() {
var t = this._superApply(arguments);
return this.options.tooltipClass && t.tooltip.addClass(this.options.tooltipClass),
t
}
}),
t.ui.tooltip
});
/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20
* http://trentrichardson.com/examples/timepicker
* Copyright (c) 2016 Trent Richardson; Licensed MIT */
!function(a) {
"function" == typeof define && define.amd ? define(["jquery", "jquery-ui"], a) : a(jQuery)
}(function($) {
if ($.ui.timepicker = $.ui.timepicker || {},
!$.ui.timepicker.version) {
$.extend($.ui, {
timepicker: {
version: "1.6.3"
}
});
var Timepicker = function() {
this.regional = [],
this.regional[""] = {
currentText: "Now",
closeText: "Done",
amNames: ["AM", "A"],
pmNames: ["PM", "P"],
timeFormat: "HH:mm",
timeSuffix: "",
timeOnlyTitle: "Choose Time",
timeText: "Time",
hourText: "Hour",
minuteText: "Minute",
secondText: "Second",
millisecText: "Millisecond",
microsecText: "Microsecond",
timezoneText: "Time Zone",
isRTL: !1
},
this._defaults = {
showButtonPanel: !0,
timeOnly: !1,
timeOnlyShowDate: !1,
showHour: null,
showMinute: null,
showSecond: null,
showMillisec: null,
showMicrosec: null,
showTimezone: null,
showTime: !0,
stepHour: 1,
stepMinute: 1,
stepSecond: 1,
stepMillisec: 1,
stepMicrosec: 1,
hour: 0,
minute: 0,
second: 0,
millisec: 0,
microsec: 0,
timezone: null,
hourMin: 0,
minuteMin: 0,
secondMin: 0,
millisecMin: 0,
microsecMin: 0,
hourMax: 23,
minuteMax: 59,
secondMax: 59,
millisecMax: 999,
microsecMax: 999,
minDateTime: null,
maxDateTime: null,
maxTime: null,
minTime: null,
onSelect: null,
hourGrid: 0,
minuteGrid: 0,
secondGrid: 0,
millisecGrid: 0,
microsecGrid: 0,
alwaysSetTime: !0,
separator: " ",
altFieldTimeOnly: !0,
altTimeFormat: null,
altSeparator: null,
altTimeSuffix: null,
altRedirectFocus: !0,
pickerTimeFormat: null,
pickerTimeSuffix: null,
showTimepicker: !0,
timezoneList: null,
addSliderAccess: !1,
sliderAccessArgs: null,
controlType: "slider",
oneLine: !1,
defaultValue: null,
parse: "strict",
afterInject: null
},
$.extend(this._defaults, this.regional[""])
};
$.extend(Timepicker.prototype, {
$input: null,
$altInput: null,
$timeObj: null,
inst: null,
hour_slider: null,
minute_slider: null,
second_slider: null,
millisec_slider: null,
microsec_slider: null,
timezone_select: null,
maxTime: null,
minTime: null,
hour: 0,
minute: 0,
second: 0,
millisec: 0,
microsec: 0,
timezone: null,
hourMinOriginal: null,
minuteMinOriginal: null,
secondMinOriginal: null,
millisecMinOriginal: null,
microsecMinOriginal: null,
hourMaxOriginal: null,
minuteMaxOriginal: null,
secondMaxOriginal: null,
millisecMaxOriginal: null,
microsecMaxOriginal: null,
ampm: "",
formattedDate: "",
formattedTime: "",
formattedDateTime: "",
timezoneList: null,
units: ["hour", "minute", "second", "millisec", "microsec"],
support: {},
control: null,
setDefaults: function(a) {
return extendRemove(this._defaults, a || {}),
this
},
_newInst: function($input, opts) {
var tp_inst = new Timepicker, inlineSettings = {}, fns = {}, overrides, i;
for (var attrName in this._defaults)
if (this._defaults.hasOwnProperty(attrName)) {
var attrValue = $input.attr("time:" + attrName);
if (attrValue)
try {
inlineSettings[attrName] = eval(attrValue)
} catch (err) {
inlineSettings[attrName] = attrValue
}
}
overrides = {
beforeShow: function(a, b) {
return $.isFunction(tp_inst._defaults.evnts.beforeShow) ? tp_inst._defaults.evnts.beforeShow.call($input[0], a, b, tp_inst) : void 0
},
onChangeMonthYear: function(a, b, c) {
$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear) && tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], a, b, c, tp_inst)
},
onClose: function(a, b) {
tp_inst.timeDefined === !0 && "" !== $input.val() && tp_inst._updateDateTime(b),
$.isFunction(tp_inst._defaults.evnts.onClose) && tp_inst._defaults.evnts.onClose.call($input[0], a, b, tp_inst)
}
};
for (i in overrides)
overrides.hasOwnProperty(i) && (fns[i] = opts[i] || this._defaults[i] || null);
tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts, overrides, {
evnts: fns,
timepicker: tp_inst
}),
tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(a) {
return a.toUpperCase()
}),
tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(a) {
return a.toUpperCase()
}),
tp_inst.support = detectSupport(tp_inst._defaults.timeFormat + (tp_inst._defaults.pickerTimeFormat ? tp_inst._defaults.pickerTimeFormat : "") + (tp_inst._defaults.altTimeFormat ? tp_inst._defaults.altTimeFormat : "")),
"string" == typeof tp_inst._defaults.controlType ? ("slider" === tp_inst._defaults.controlType && "undefined" == typeof $.ui.slider && (tp_inst._defaults.controlType = "select"),
tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType]) : tp_inst.control = tp_inst._defaults.controlType;
var timezoneList = [-720, -660, -600, -570, -540, -480, -420, -360, -300, -270, -240, -210, -180, -120, -60, 0, 60, 120, 180, 210, 240, 270, 300, 330, 345, 360, 390, 420, 480, 525, 540, 570, 600, 630, 660, 690, 720, 765, 780, 840];
null !== tp_inst._defaults.timezoneList && (timezoneList = tp_inst._defaults.timezoneList);
var tzl = timezoneList.length
, tzi = 0
, tzv = null;
if (tzl > 0 && "object" != typeof timezoneList[0])
for (; tzl > tzi; tzi++)
tzv = timezoneList[tzi],
timezoneList[tzi] = {
value: tzv,
label: $.timepicker.timezoneOffsetString(tzv, tp_inst.support.iso8601)
};
return tp_inst._defaults.timezoneList = timezoneList,
tp_inst.timezone = null !== tp_inst._defaults.timezone ? $.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone) : -1 * (new Date).getTimezoneOffset(),
tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin ? tp_inst._defaults.hourMin : tp_inst._defaults.hour > tp_inst._defaults.hourMax ? tp_inst._defaults.hourMax : tp_inst._defaults.hour,
tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin ? tp_inst._defaults.minuteMin : tp_inst._defaults.minute > tp_inst._defaults.minuteMax ? tp_inst._defaults.minuteMax : tp_inst._defaults.minute,
tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin ? tp_inst._defaults.secondMin : tp_inst._defaults.second > tp_inst._defaults.secondMax ? tp_inst._defaults.secondMax : tp_inst._defaults.second,
tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin ? tp_inst._defaults.millisecMin : tp_inst._defaults.millisec > tp_inst._defaults.millisecMax ? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec,
tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin ? tp_inst._defaults.microsecMin : tp_inst._defaults.microsec > tp_inst._defaults.microsecMax ? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec,
tp_inst.ampm = "",
tp_inst.$input = $input,
tp_inst._defaults.altField && (tp_inst.$altInput = $(tp_inst._defaults.altField),
tp_inst._defaults.altRedirectFocus === !0 && tp_inst.$altInput.css({
cursor: "pointer"
}).focus(function() {
$input.trigger("focus")
})),
(0 === tp_inst._defaults.minDate || 0 === tp_inst._defaults.minDateTime) && (tp_inst._defaults.minDate = new Date),
(0 === tp_inst._defaults.maxDate || 0 === tp_inst._defaults.maxDateTime) && (tp_inst._defaults.maxDate = new Date),
void 0 !== tp_inst._defaults.minDate && tp_inst._defaults.minDate instanceof Date && (tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime())),
void 0 !== tp_inst._defaults.minDateTime && tp_inst._defaults.minDateTime instanceof Date && (tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime())),
void 0 !== tp_inst._defaults.maxDate && tp_inst._defaults.maxDate instanceof Date && (tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime())),
void 0 !== tp_inst._defaults.maxDateTime && tp_inst._defaults.maxDateTime instanceof Date && (tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime())),
tp_inst.$input.bind("focus", function() {
tp_inst._onFocus()
}),
tp_inst
},
_addTimePicker: function(a) {
var b = $.trim(this.$altInput && this._defaults.altFieldTimeOnly ? this.$input.val() + " " + this.$altInput.val() : this.$input.val());
this.timeDefined = this._parseTime(b),
this._limitMinMaxDateTime(a, !1),
this._injectTimePicker(),
this._afterInject()
},
_parseTime: function(a, b) {
if (this.inst || (this.inst = $.datepicker._getInst(this.$input[0])),
b || !this._defaults.timeOnly) {
var c = $.datepicker._get(this.inst, "dateFormat");
try {
var d = parseDateTimeInternal(c, this._defaults.timeFormat, a, $.datepicker._getFormatConfig(this.inst), this._defaults);
if (!d.timeObj)
return !1;
$.extend(this, d.timeObj)
} catch (e) {
return $.timepicker.log("Error parsing the date/time string: " + e + "\ndate/time string = " + a + "\ntimeFormat = " + this._defaults.timeFormat + "\ndateFormat = " + c),
!1
}
return !0
}
var f = $.datepicker.parseTime(this._defaults.timeFormat, a, this._defaults);
return f ? ($.extend(this, f),
!0) : !1
},
_afterInject: function() {
var a = this.inst.settings;
$.isFunction(a.afterInject) && a.afterInject.call(this)
},
_injectTimePicker: function() {
var a = this.inst.dpDiv
, b = this.inst.settings
, c = this
, d = ""
, e = ""
, f = null
, g = {}
, h = {}
, i = null
, j = 0
, k = 0;
if (0 === a.find("div.ui-timepicker-div").length && b.showTimepicker) {
var l = " ui_tpicker_unit_hide"
, m = '
- ' + b.timeText + '
";
for (j = 0,
k = this.units.length; k > j; j++) {
if (d = this.units[j],
e = d.substr(0, 1).toUpperCase() + d.substr(1),
f = null !== b["show" + e] ? b["show" + e] : this.support[d],
g[d] = parseInt(b[d + "Max"] - (b[d + "Max"] - b[d + "Min"]) % b["step" + e], 10),
h[d] = 0,
m += '- ' + b[d + "Text"] + '
- ',
f && b[d + "Grid"] > 0) {
if (m += '
',
"hour" === d)
for (var n = b[d + "Min"]; n <= g[d]; n += parseInt(b[d + "Grid"], 10)) {
h[d]++;
var o = $.datepicker.formatTime(this.support.ampm ? "hht" : "HH", {
hour: n
}, b);
m += '| ' + o + " | "
}
else
for (var p = b[d + "Min"]; p <= g[d]; p += parseInt(b[d + "Grid"], 10))
h[d]++,
m += '' + (10 > p ? "0" : "") + p + " | ";
m += "
"
}
m += " "
}
var q = null !== b.showTimezone ? b.showTimezone : this.support.timezone;
m += '- ' + b.timezoneText + "
",
m += '',
m += "
";
var r = $(m);
for (b.timeOnly === !0 && (r.prepend('"),
a.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),
j = 0,
k = c.units.length; k > j; j++)
d = c.units[j],
e = d.substr(0, 1).toUpperCase() + d.substr(1),
f = null !== b["show" + e] ? b["show" + e] : this.support[d],
c[d + "_slider"] = c.control.create(c, r.find(".ui_tpicker_" + d + "_slider"), d, c[d], b[d + "Min"], g[d], b["step" + e]),
f && b[d + "Grid"] > 0 && (i = 100 * h[d] * b[d + "Grid"] / (g[d] - b[d + "Min"]),
r.find(".ui_tpicker_" + d + " table").css({
width: i + "%",
marginLeft: b.isRTL ? "0" : i / (-2 * h[d]) + "%",
marginRight: b.isRTL ? i / (-2 * h[d]) + "%" : "0",
borderCollapse: "collapse"
}).find("td").click(function(a) {
var b = $(this)
, e = b.html()
, f = parseInt(e.replace(/[^0-9]/g), 10)
, g = e.replace(/[^apm]/gi)
, h = b.data("for");
"hour" === h && (-1 !== g.indexOf("p") && 12 > f ? f += 12 : -1 !== g.indexOf("a") && 12 === f && (f = 0)),
c.control.value(c, c[h + "_slider"], d, f),
c._onTimeChange(),
c._onSelectHandler()
}).css({
cursor: "pointer",
width: 100 / h[d] + "%",
textAlign: "center",
overflow: "hidden"
}));
if (this.timezone_select = r.find(".ui_tpicker_timezone").append("
").find("select"),
$.fn.append.apply(this.timezone_select, $.map(b.timezoneList, function(a, b) {
return $("
").val("object" == typeof a ? a.value : a).text("object" == typeof a ? a.label : a)
})),
"undefined" != typeof this.timezone && null !== this.timezone && "" !== this.timezone) {
var s = -1 * new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset();
s === this.timezone ? selectLocalTimezone(c) : this.timezone_select.val(this.timezone)
} else
"undefined" != typeof this.hour && null !== this.hour && "" !== this.hour ? this.timezone_select.val(b.timezone) : selectLocalTimezone(c);
this.timezone_select.change(function() {
c._onTimeChange(),
c._onSelectHandler(),
c._afterInject()
});
var t = a.find(".ui-datepicker-buttonpane");
if (t.length ? t.before(r) : a.append(r),
this.$timeObj = r.find(".ui_tpicker_time_input"),
this.$timeObj.change(function() {
var a = c.inst.settings.timeFormat
, b = $.datepicker.parseTime(a, this.value)
, d = new Date;
b ? (d.setHours(b.hour),
d.setMinutes(b.minute),
d.setSeconds(b.second),
$.datepicker._setTime(c.inst, d)) : (this.value = c.formattedTime,
this.blur())
}),
null !== this.inst) {
var u = this.timeDefined;
this._onTimeChange(),
this.timeDefined = u
}
if (this._defaults.addSliderAccess) {
var v = this._defaults.sliderAccessArgs
, w = this._defaults.isRTL;
v.isRTL = w,
setTimeout(function() {
if (0 === r.find(".ui-slider-access").length) {
r.find(".ui-slider:visible").sliderAccess(v);
var a = r.find(".ui-slider-access:eq(0)").outerWidth(!0);
a && r.find("table:visible").each(function() {
var b = $(this)
, c = b.outerWidth()
, d = b.css(w ? "marginRight" : "marginLeft").toString().replace("%", "")
, e = c - a
, f = d * e / c + "%"
, g = {
width: e,
marginRight: 0,
marginLeft: 0
};
g[w ? "marginRight" : "marginLeft"] = f,
b.css(g)
})
}
}, 10)
}
c._limitMinMaxDateTime(this.inst, !0)
}
},
_limitMinMaxDateTime: function(a, b) {
var c = this._defaults
, d = new Date(a.selectedYear,a.selectedMonth,a.selectedDay);
if (this._defaults.showTimepicker) {
if (null !== $.datepicker._get(a, "minDateTime") && void 0 !== $.datepicker._get(a, "minDateTime") && d) {
var e = $.datepicker._get(a, "minDateTime")
, f = new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0);
(null === this.hourMinOriginal || null === this.minuteMinOriginal || null === this.secondMinOriginal || null === this.millisecMinOriginal || null === this.microsecMinOriginal) && (this.hourMinOriginal = c.hourMin,
this.minuteMinOriginal = c.minuteMin,
this.secondMinOriginal = c.secondMin,
this.millisecMinOriginal = c.millisecMin,
this.microsecMinOriginal = c.microsecMin),
a.settings.timeOnly || f.getTime() === d.getTime() ? (this._defaults.hourMin = e.getHours(),
this.hour <= this._defaults.hourMin ? (this.hour = this._defaults.hourMin,
this._defaults.minuteMin = e.getMinutes(),
this.minute <= this._defaults.minuteMin ? (this.minute = this._defaults.minuteMin,
this._defaults.secondMin = e.getSeconds(),
this.second <= this._defaults.secondMin ? (this.second = this._defaults.secondMin,
this._defaults.millisecMin = e.getMilliseconds(),
this.millisec <= this._defaults.millisecMin ? (this.millisec = this._defaults.millisecMin,
this._defaults.microsecMin = e.getMicroseconds()) : (this.microsec < this._defaults.microsecMin && (this.microsec = this._defaults.microsecMin),
this._defaults.microsecMin = this.microsecMinOriginal)) : (this._defaults.millisecMin = this.millisecMinOriginal,
this._defaults.microsecMin = this.microsecMinOriginal)) : (this._defaults.secondMin = this.secondMinOriginal,
this._defaults.millisecMin = this.millisecMinOriginal,
this._defaults.microsecMin = this.microsecMinOriginal)) : (this._defaults.minuteMin = this.minuteMinOriginal,
this._defaults.secondMin = this.secondMinOriginal,
this._defaults.millisecMin = this.millisecMinOriginal,
this._defaults.microsecMin = this.microsecMinOriginal)) : (this._defaults.hourMin = this.hourMinOriginal,
this._defaults.minuteMin = this.minuteMinOriginal,
this._defaults.secondMin = this.secondMinOriginal,
this._defaults.millisecMin = this.millisecMinOriginal,
this._defaults.microsecMin = this.microsecMinOriginal)
}
if (null !== $.datepicker._get(a, "maxDateTime") && void 0 !== $.datepicker._get(a, "maxDateTime") && d) {
var g = $.datepicker._get(a, "maxDateTime")
, h = new Date(g.getFullYear(),g.getMonth(),g.getDate(),0,0,0,0);
(null === this.hourMaxOriginal || null === this.minuteMaxOriginal || null === this.secondMaxOriginal || null === this.millisecMaxOriginal) && (this.hourMaxOriginal = c.hourMax,
this.minuteMaxOriginal = c.minuteMax,
this.secondMaxOriginal = c.secondMax,
this.millisecMaxOriginal = c.millisecMax,
this.microsecMaxOriginal = c.microsecMax),
a.settings.timeOnly || h.getTime() === d.getTime() ? (this._defaults.hourMax = g.getHours(),
this.hour >= this._defaults.hourMax ? (this.hour = this._defaults.hourMax,
this._defaults.minuteMax = g.getMinutes(),
this.minute >= this._defaults.minuteMax ? (this.minute = this._defaults.minuteMax,
this._defaults.secondMax = g.getSeconds(),
this.second >= this._defaults.secondMax ? (this.second = this._defaults.secondMax,
this._defaults.millisecMax = g.getMilliseconds(),
this.millisec >= this._defaults.millisecMax ? (this.millisec = this._defaults.millisecMax,
this._defaults.microsecMax = g.getMicroseconds()) : (this.microsec > this._defaults.microsecMax && (this.microsec = this._defaults.microsecMax),
this._defaults.microsecMax = this.microsecMaxOriginal)) : (this._defaults.millisecMax = this.millisecMaxOriginal,
this._defaults.microsecMax = this.microsecMaxOriginal)) : (this._defaults.secondMax = this.secondMaxOriginal,
this._defaults.millisecMax = this.millisecMaxOriginal,
this._defaults.microsecMax = this.microsecMaxOriginal)) : (this._defaults.minuteMax = this.minuteMaxOriginal,
this._defaults.secondMax = this.secondMaxOriginal,
this._defaults.millisecMax = this.millisecMaxOriginal,
this._defaults.microsecMax = this.microsecMaxOriginal)) : (this._defaults.hourMax = this.hourMaxOriginal,
this._defaults.minuteMax = this.minuteMaxOriginal,
this._defaults.secondMax = this.secondMaxOriginal,
this._defaults.millisecMax = this.millisecMaxOriginal,
this._defaults.microsecMax = this.microsecMaxOriginal)
}
if (null !== a.settings.minTime) {
var i = new Date("01/01/1970 " + a.settings.minTime);
this.hour < i.getHours() ? (this.hour = this._defaults.hourMin = i.getHours(),
this.minute = this._defaults.minuteMin = i.getMinutes()) : this.hour === i.getHours() && this.minute < i.getMinutes() ? this.minute = this._defaults.minuteMin = i.getMinutes() : this._defaults.hourMin < i.getHours() ? (this._defaults.hourMin = i.getHours(),
this._defaults.minuteMin = i.getMinutes()) : this._defaults.hourMin === i.getHours() === this.hour && this._defaults.minuteMin < i.getMinutes() ? this._defaults.minuteMin = i.getMinutes() : this._defaults.minuteMin = 0
}
if (null !== a.settings.maxTime) {
var j = new Date("01/01/1970 " + a.settings.maxTime);
this.hour > j.getHours() ? (this.hour = this._defaults.hourMax = j.getHours(),
this.minute = this._defaults.minuteMax = j.getMinutes()) : this.hour === j.getHours() && this.minute > j.getMinutes() ? this.minute = this._defaults.minuteMax = j.getMinutes() : this._defaults.hourMax > j.getHours() ? (this._defaults.hourMax = j.getHours(),
this._defaults.minuteMax = j.getMinutes()) : this._defaults.hourMax === j.getHours() === this.hour && this._defaults.minuteMax > j.getMinutes() ? this._defaults.minuteMax = j.getMinutes() : this._defaults.minuteMax = 59
}
if (void 0 !== b && b === !0) {
var k = parseInt(this._defaults.hourMax - (this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour, 10)
, l = parseInt(this._defaults.minuteMax - (this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute, 10)
, m = parseInt(this._defaults.secondMax - (this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond, 10)
, n = parseInt(this._defaults.millisecMax - (this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec, 10)
, o = parseInt(this._defaults.microsecMax - (this._defaults.microsecMax - this._defaults.microsecMin) % this._defaults.stepMicrosec, 10);
this.hour_slider && (this.control.options(this, this.hour_slider, "hour", {
min: this._defaults.hourMin,
max: k,
step: this._defaults.stepHour
}),
this.control.value(this, this.hour_slider, "hour", this.hour - this.hour % this._defaults.stepHour)),
this.minute_slider && (this.control.options(this, this.minute_slider, "minute", {
min: this._defaults.minuteMin,
max: l,
step: this._defaults.stepMinute
}),
this.control.value(this, this.minute_slider, "minute", this.minute - this.minute % this._defaults.stepMinute)),
this.second_slider && (this.control.options(this, this.second_slider, "second", {
min: this._defaults.secondMin,
max: m,
step: this._defaults.stepSecond
}),
this.control.value(this, this.second_slider, "second", this.second - this.second % this._defaults.stepSecond)),
this.millisec_slider && (this.control.options(this, this.millisec_slider, "millisec", {
min: this._defaults.millisecMin,
max: n,
step: this._defaults.stepMillisec
}),
this.control.value(this, this.millisec_slider, "millisec", this.millisec - this.millisec % this._defaults.stepMillisec)),
this.microsec_slider && (this.control.options(this, this.microsec_slider, "microsec", {
min: this._defaults.microsecMin,
max: o,
step: this._defaults.stepMicrosec
}),
this.control.value(this, this.microsec_slider, "microsec", this.microsec - this.microsec % this._defaults.stepMicrosec))
}
}
},
_onTimeChange: function() {
if (this._defaults.showTimepicker) {
var a = this.hour_slider ? this.control.value(this, this.hour_slider, "hour") : !1
, b = this.minute_slider ? this.control.value(this, this.minute_slider, "minute") : !1
, c = this.second_slider ? this.control.value(this, this.second_slider, "second") : !1
, d = this.millisec_slider ? this.control.value(this, this.millisec_slider, "millisec") : !1
, e = this.microsec_slider ? this.control.value(this, this.microsec_slider, "microsec") : !1
, f = this.timezone_select ? this.timezone_select.val() : !1
, g = this._defaults
, h = g.pickerTimeFormat || g.timeFormat
, i = g.pickerTimeSuffix || g.timeSuffix;
"object" == typeof a && (a = !1),
"object" == typeof b && (b = !1),
"object" == typeof c && (c = !1),
"object" == typeof d && (d = !1),
"object" == typeof e && (e = !1),
"object" == typeof f && (f = !1),
a !== !1 && (a = parseInt(a, 10)),
b !== !1 && (b = parseInt(b, 10)),
c !== !1 && (c = parseInt(c, 10)),
d !== !1 && (d = parseInt(d, 10)),
e !== !1 && (e = parseInt(e, 10)),
f !== !1 && (f = f.toString());
var j = g[12 > a ? "amNames" : "pmNames"][0]
, k = a !== parseInt(this.hour, 10) || b !== parseInt(this.minute, 10) || c !== parseInt(this.second, 10) || d !== parseInt(this.millisec, 10) || e !== parseInt(this.microsec, 10) || this.ampm.length > 0 && 12 > a != (-1 !== $.inArray(this.ampm.toUpperCase(), this.amNames)) || null !== this.timezone && f !== this.timezone.toString();
if (k && (a !== !1 && (this.hour = a),
b !== !1 && (this.minute = b),
c !== !1 && (this.second = c),
d !== !1 && (this.millisec = d),
e !== !1 && (this.microsec = e),
f !== !1 && (this.timezone = f),
this.inst || (this.inst = $.datepicker._getInst(this.$input[0])),
this._limitMinMaxDateTime(this.inst, !0)),
this.support.ampm && (this.ampm = j),
this.formattedTime = $.datepicker.formatTime(g.timeFormat, this, g),
this.$timeObj && (this.$timeObj.val(h === g.timeFormat ? this.formattedTime + i : $.datepicker.formatTime(h, this, g) + i),
this.$timeObj[0].setSelectionRange)) {
var l = this.$timeObj[0].selectionStart
, m = this.$timeObj[0].selectionEnd;
this.$timeObj[0].setSelectionRange(l, m)
}
this.timeDefined = !0,
k && this._updateDateTime()
}
},
_onSelectHandler: function() {
var a = this._defaults.onSelect || this.inst.settings.onSelect
, b = this.$input ? this.$input[0] : null;
a && b && a.apply(b, [this.formattedDateTime, this])
},
_updateDateTime: function(a) {
a = this.inst || a;
var b = a.currentYear > 0 ? new Date(a.currentYear,a.currentMonth,a.currentDay) : new Date(a.selectedYear,a.selectedMonth,a.selectedDay)
, c = $.datepicker._daylightSavingAdjust(b)
, d = $.datepicker._get(a, "dateFormat")
, e = $.datepicker._getFormatConfig(a)
, f = null !== c && this.timeDefined;
this.formattedDate = $.datepicker.formatDate(d, null === c ? new Date : c, e);
var g = this.formattedDate;
if ("" === a.lastVal && (a.currentYear = a.selectedYear,
a.currentMonth = a.selectedMonth,
a.currentDay = a.selectedDay),
this._defaults.timeOnly === !0 && this._defaults.timeOnlyShowDate === !1 ? g = this.formattedTime : (this._defaults.timeOnly !== !0 && (this._defaults.alwaysSetTime || f) || this._defaults.timeOnly === !0 && this._defaults.timeOnlyShowDate === !0) && (g += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix),
this.formattedDateTime = g,
this._defaults.showTimepicker)
if (this.$altInput && this._defaults.timeOnly === !1 && this._defaults.altFieldTimeOnly === !0)
this.$altInput.val(this.formattedTime),
this.$input.val(this.formattedDate);
else if (this.$altInput) {
this.$input.val(g);
var h = ""
, i = null !== this._defaults.altSeparator ? this._defaults.altSeparator : this._defaults.separator
, j = null !== this._defaults.altTimeSuffix ? this._defaults.altTimeSuffix : this._defaults.timeSuffix;
this._defaults.timeOnly || (h = this._defaults.altFormat ? $.datepicker.formatDate(this._defaults.altFormat, null === c ? new Date : c, e) : this.formattedDate,
h && (h += i)),
h += null !== this._defaults.altTimeFormat ? $.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults) + j : this.formattedTime + j,
this.$altInput.val(h)
} else
this.$input.val(g);
else
this.$input.val(this.formattedDate);
this.$input.trigger("change")
},
_onFocus: function() {
if (!this.$input.val() && this._defaults.defaultValue) {
this.$input.val(this._defaults.defaultValue);
var a = $.datepicker._getInst(this.$input.get(0))
, b = $.datepicker._get(a, "timepicker");
if (b && b._defaults.timeOnly && a.input.val() !== a.lastVal)
try {
$.datepicker._updateDatepicker(a)
} catch (c) {
$.timepicker.log(c)
}
}
},
_controls: {
slider: {
create: function(a, b, c, d, e, f, g) {
var h = a._defaults.isRTL;
return b.prop("slide", null).slider({
orientation: "horizontal",
value: h ? -1 * d : d,
min: h ? -1 * f : e,
max: h ? -1 * e : f,
step: g,
slide: function(b, d) {
a.control.value(a, $(this), c, h ? -1 * d.value : d.value),
a._onTimeChange()
},
stop: function(b, c) {
a._onSelectHandler()
}
})
},
options: function(a, b, c, d, e) {
if (a._defaults.isRTL) {
if ("string" == typeof d)
return "min" === d || "max" === d ? void 0 !== e ? b.slider(d, -1 * e) : Math.abs(b.slider(d)) : b.slider(d);
var f = d.min
, g = d.max;
return d.min = d.max = null,
void 0 !== f && (d.max = -1 * f),
void 0 !== g && (d.min = -1 * g),
b.slider(d)
}
return "string" == typeof d && void 0 !== e ? b.slider(d, e) : b.slider(d)
},
value: function(a, b, c, d) {
return a._defaults.isRTL ? void 0 !== d ? b.slider("value", -1 * d) : Math.abs(b.slider("value")) : void 0 !== d ? b.slider("value", d) : b.slider("value")
}
},
select: {
create: function(a, b, c, d, e, f, g) {
for (var h = '
",
b.children("select").remove(),
$(h).appendTo(b).change(function(b) {
a._onTimeChange(),
a._onSelectHandler(),
a._afterInject()
}),
b
},
options: function(a, b, c, d, e) {
var f = {}
, g = b.children("select");
if ("string" == typeof d) {
if (void 0 === e)
return g.data(d);
f[d] = e
} else
f = d;
return a.control.create(a, b, g.data("unit"), g.val(), f.min >= 0 ? f.min : g.data("min"), f.max || g.data("max"), f.step || g.data("step"))
},
value: function(a, b, c, d) {
var e = b.children("select");
return void 0 !== d ? e.val(d) : e.val()
}
}
}
}),
$.fn.extend({
timepicker: function(a) {
a = a || {};
var b = Array.prototype.slice.call(arguments);
return "object" == typeof a && (b[0] = $.extend(a, {
timeOnly: !0
})),
$(this).each(function() {
$.fn.datetimepicker.apply($(this), b)
})
},
datetimepicker: function(a) {
a = a || {};
var b = arguments;
return "string" == typeof a ? "getDate" === a || "option" === a && 2 === b.length && "string" == typeof b[1] ? $.fn.datepicker.apply($(this[0]), b) : this.each(function() {
var a = $(this);
a.datepicker.apply(a, b)
}) : this.each(function() {
var b = $(this);
b.datepicker($.timepicker._newInst(b, a)._defaults)
})
}
}),
$.datepicker.parseDateTime = function(a, b, c, d, e) {
var f = parseDateTimeInternal(a, b, c, d, e);
if (f.timeObj) {
var g = f.timeObj;
f.date.setHours(g.hour, g.minute, g.second, g.millisec),
f.date.setMicroseconds(g.microsec)
}
return f.date
}
,
$.datepicker.parseTime = function(a, b, c) {
var d = extendRemove(extendRemove({}, $.timepicker._defaults), c || {})
, e = (-1 !== a.replace(/\'.*?\'/g, "").indexOf("Z"),
function(a, b, c) {
var d, e = function(a, b) {
var c = [];
return a && $.merge(c, a),
b && $.merge(c, b),
c = $.map(c, function(a) {
return a.replace(/[.*+?|()\[\]{}\\]/g, "\\$&")
}),
"(" + c.join("|") + ")?"
}, f = function(a) {
var b = a.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g)
, c = {
h: -1,
m: -1,
s: -1,
l: -1,
c: -1,
t: -1,
z: -1
};
if (b)
for (var d = 0; d < b.length; d++)
-1 === c[b[d].toString().charAt(0)] && (c[b[d].toString().charAt(0)] = d + 1);
return c
}, g = "^" + a.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function(a) {
var b = a.length;
switch (a.charAt(0).toLowerCase()) {
case "h":
return 1 === b ? "(\\d?\\d)" : "(\\d{" + b + "})";
case "m":
return 1 === b ? "(\\d?\\d)" : "(\\d{" + b + "})";
case "s":
return 1 === b ? "(\\d?\\d)" : "(\\d{" + b + "})";
case "l":
return "(\\d?\\d?\\d)";
case "c":
return "(\\d?\\d?\\d)";
case "z":
return "(z|[-+]\\d\\d:?\\d\\d|\\S+)?";
case "t":
return e(c.amNames, c.pmNames);
default:
return "(" + a.replace(/\'/g, "").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g, function(a) {
return "\\" + a
}) + ")?"
}
}).replace(/\s/g, "\\s?") + c.timeSuffix + "$", h = f(a), i = "";
d = b.match(new RegExp(g,"i"));
var j = {
hour: 0,
minute: 0,
second: 0,
millisec: 0,
microsec: 0
};
return d ? (-1 !== h.t && (void 0 === d[h.t] || 0 === d[h.t].length ? (i = "",
j.ampm = "") : (i = -1 !== $.inArray(d[h.t].toUpperCase(), $.map(c.amNames, function(a, b) {
return a.toUpperCase()
})) ? "AM" : "PM",
j.ampm = c["AM" === i ? "amNames" : "pmNames"][0])),
-1 !== h.h && ("AM" === i && "12" === d[h.h] ? j.hour = 0 : "PM" === i && "12" !== d[h.h] ? j.hour = parseInt(d[h.h], 10) + 12 : j.hour = Number(d[h.h])),
-1 !== h.m && (j.minute = Number(d[h.m])),
-1 !== h.s && (j.second = Number(d[h.s])),
-1 !== h.l && (j.millisec = Number(d[h.l])),
-1 !== h.c && (j.microsec = Number(d[h.c])),
-1 !== h.z && void 0 !== d[h.z] && (j.timezone = $.timepicker.timezoneOffsetNumber(d[h.z])),
j) : !1
}
)
, f = function(a, b, c) {
try {
var d = new Date("2012-01-01 " + b);
if (isNaN(d.getTime()) && (d = new Date("2012-01-01T" + b),
isNaN(d.getTime()) && (d = new Date("01/01/2012 " + b),
isNaN(d.getTime()))))
throw "Unable to parse time with native Date: " + b;
return {
hour: d.getHours(),
minute: d.getMinutes(),
second: d.getSeconds(),
millisec: d.getMilliseconds(),
microsec: d.getMicroseconds(),
timezone: -1 * d.getTimezoneOffset()
}
} catch (f) {
try {
return e(a, b, c)
} catch (g) {
$.timepicker.log("Unable to parse \ntimeString: " + b + "\ntimeFormat: " + a)
}
}
return !1
};
return "function" == typeof d.parse ? d.parse(a, b, d) : "loose" === d.parse ? f(a, b, d) : e(a, b, d)
}
,
$.datepicker.formatTime = function(a, b, c) {
c = c || {},
c = $.extend({}, $.timepicker._defaults, c),
b = $.extend({
hour: 0,
minute: 0,
second: 0,
millisec: 0,
microsec: 0,
timezone: null
}, b);
var d = a
, e = c.amNames[0]
, f = parseInt(b.hour, 10);
return f > 11 && (e = c.pmNames[0]),
d = d.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function(a) {
switch (a) {
case "HH":
return ("0" + f).slice(-2);
case "H":
return f;
case "hh":
return ("0" + convert24to12(f)).slice(-2);
case "h":
return convert24to12(f);
case "mm":
return ("0" + b.minute).slice(-2);
case "m":
return b.minute;
case "ss":
return ("0" + b.second).slice(-2);
case "s":
return b.second;
case "l":
return ("00" + b.millisec).slice(-3);
case "c":
return ("00" + b.microsec).slice(-3);
case "z":
return $.timepicker.timezoneOffsetString(null === b.timezone ? c.timezone : b.timezone, !1);
case "Z":
return $.timepicker.timezoneOffsetString(null === b.timezone ? c.timezone : b.timezone, !0);
case "T":
return e.charAt(0).toUpperCase();
case "TT":
return e.toUpperCase();
case "t":
return e.charAt(0).toLowerCase();
case "tt":
return e.toLowerCase();
default:
return a.replace(/'/g, "")
}
})
}
,
$.datepicker._base_selectDate = $.datepicker._selectDate,
$.datepicker._selectDate = function(a, b) {
var c, d = this._getInst($(a)[0]), e = this._get(d, "timepicker");
e && d.settings.showTimepicker ? (e._limitMinMaxDateTime(d, !0),
c = d.inline,
d.inline = d.stay_open = !0,
this._base_selectDate(a, b),
d.inline = c,
d.stay_open = !1,
this._notifyChange(d),
this._updateDatepicker(d)) : this._base_selectDate(a, b)
}
,
$.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker,
$.datepicker._updateDatepicker = function(a) {
var b = a.input[0];
if (!($.datepicker._curInst && $.datepicker._curInst !== a && $.datepicker._datepickerShowing && $.datepicker._lastInput !== b || "boolean" == typeof a.stay_open && a.stay_open !== !1)) {
this._base_updateDatepicker(a);
var c = this._get(a, "timepicker");
c && c._addTimePicker(a)
}
}
,
$.datepicker._base_doKeyPress = $.datepicker._doKeyPress,
$.datepicker._doKeyPress = function(a) {
var b = $.datepicker._getInst(a.target)
, c = $.datepicker._get(b, "timepicker");
if (c && $.datepicker._get(b, "constrainInput")) {
var d = c.support.ampm
, e = null !== c._defaults.showTimezone ? c._defaults.showTimezone : c.support.timezone
, f = $.datepicker._possibleChars($.datepicker._get(b, "dateFormat"))
, g = c._defaults.timeFormat.toString().replace(/[hms]/g, "").replace(/TT/g, d ? "APM" : "").replace(/Tt/g, d ? "AaPpMm" : "").replace(/tT/g, d ? "AaPpMm" : "").replace(/T/g, d ? "AP" : "").replace(/tt/g, d ? "apm" : "").replace(/t/g, d ? "ap" : "") + " " + c._defaults.separator + c._defaults.timeSuffix + (e ? c._defaults.timezoneList.join("") : "") + c._defaults.amNames.join("") + c._defaults.pmNames.join("") + f
, h = String.fromCharCode(void 0 === a.charCode ? a.keyCode : a.charCode);
return a.ctrlKey || " " > h || !f || g.indexOf(h) > -1
}
return $.datepicker._base_doKeyPress(a)
}
,
$.datepicker._base_updateAlternate = $.datepicker._updateAlternate,
$.datepicker._updateAlternate = function(a) {
var b = this._get(a, "timepicker");
if (b) {
var c = b._defaults.altField;
if (c) {
var d = (b._defaults.altFormat || b._defaults.dateFormat,
this._getDate(a))
, e = $.datepicker._getFormatConfig(a)
, f = ""
, g = b._defaults.altSeparator ? b._defaults.altSeparator : b._defaults.separator
, h = b._defaults.altTimeSuffix ? b._defaults.altTimeSuffix : b._defaults.timeSuffix
, i = null !== b._defaults.altTimeFormat ? b._defaults.altTimeFormat : b._defaults.timeFormat;
f += $.datepicker.formatTime(i, b, b._defaults) + h,
b._defaults.timeOnly || b._defaults.altFieldTimeOnly || null === d || (f = b._defaults.altFormat ? $.datepicker.formatDate(b._defaults.altFormat, d, e) + g + f : b.formattedDate + g + f),
$(c).val(a.input.val() ? f : "")
}
} else
$.datepicker._base_updateAlternate(a)
}
,
$.datepicker._base_doKeyUp = $.datepicker._doKeyUp,
$.datepicker._doKeyUp = function(a) {
var b = $.datepicker._getInst(a.target)
, c = $.datepicker._get(b, "timepicker");
if (c && c._defaults.timeOnly && b.input.val() !== b.lastVal)
try {
$.datepicker._updateDatepicker(b)
} catch (d) {
$.timepicker.log(d)
}
return $.datepicker._base_doKeyUp(a)
}
,
$.datepicker._base_gotoToday = $.datepicker._gotoToday,
$.datepicker._gotoToday = function(a) {
var b = this._getInst($(a)[0]);
this._base_gotoToday(a);
var c = this._get(b, "timepicker");
if (c) {
var d = $.timepicker.timezoneOffsetNumber(c.timezone)
, e = new Date;
e.setMinutes(e.getMinutes() + e.getTimezoneOffset() + parseInt(d, 10)),
this._setTime(b, e),
this._setDate(b, e),
c._onSelectHandler()
}
}
,
$.datepicker._disableTimepickerDatepicker = function(a) {
var b = this._getInst(a);
if (b) {
var c = this._get(b, "timepicker");
$(a).datepicker("getDate"),
c && (b.settings.showTimepicker = !1,
c._defaults.showTimepicker = !1,
c._updateDateTime(b))
}
}
,
$.datepicker._enableTimepickerDatepicker = function(a) {
var b = this._getInst(a);
if (b) {
var c = this._get(b, "timepicker");
$(a).datepicker("getDate"),
c && (b.settings.showTimepicker = !0,
c._defaults.showTimepicker = !0,
c._addTimePicker(b),
c._updateDateTime(b))
}
}
,
$.datepicker._setTime = function(a, b) {
var c = this._get(a, "timepicker");
if (c) {
var d = c._defaults;
c.hour = b ? b.getHours() : d.hour,
c.minute = b ? b.getMinutes() : d.minute,
c.second = b ? b.getSeconds() : d.second,
c.millisec = b ? b.getMilliseconds() : d.millisec,
c.microsec = b ? b.getMicroseconds() : d.microsec,
c._limitMinMaxDateTime(a, !0),
c._onTimeChange(),
c._updateDateTime(a)
}
}
,
$.datepicker._setTimeDatepicker = function(a, b, c) {
var d = this._getInst(a);
if (d) {
var e = this._get(d, "timepicker");
if (e) {
this._setDateFromField(d);
var f;
b && ("string" == typeof b ? (e._parseTime(b, c),
f = new Date,
f.setHours(e.hour, e.minute, e.second, e.millisec),
f.setMicroseconds(e.microsec)) : (f = new Date(b.getTime()),
f.setMicroseconds(b.getMicroseconds())),
"Invalid Date" === f.toString() && (f = void 0),
this._setTime(d, f))
}
}
}
,
$.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker,
$.datepicker._setDateDatepicker = function(a, b) {
var c = this._getInst(a)
, d = b;
if (c) {
"string" == typeof b && (d = new Date(b),
d.getTime() || (this._base_setDateDatepicker.apply(this, arguments),
d = $(a).datepicker("getDate")));
var e, f = this._get(c, "timepicker");
d instanceof Date ? (e = new Date(d.getTime()),
e.setMicroseconds(d.getMicroseconds())) : e = d,
f && e && (f.support.timezone || null !== f._defaults.timezone || (f.timezone = -1 * e.getTimezoneOffset()),
d = $.timepicker.timezoneAdjust(d, $.timepicker.timezoneOffsetString(-d.getTimezoneOffset()), f.timezone),
e = $.timepicker.timezoneAdjust(e, $.timepicker.timezoneOffsetString(-e.getTimezoneOffset()), f.timezone)),
this._updateDatepicker(c),
this._base_setDateDatepicker.apply(this, arguments),
this._setTimeDatepicker(a, e, !0)
}
}
,
$.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker,
$.datepicker._getDateDatepicker = function(a, b) {
var c = this._getInst(a);
if (c) {
var d = this._get(c, "timepicker");
if (d) {
void 0 === c.lastVal && this._setDateFromField(c, b);
var e = this._getDate(c)
, f = null;
return f = d.$altInput && d._defaults.altFieldTimeOnly ? d.$input.val() + " " + d.$altInput.val() : "INPUT" !== d.$input.get(0).tagName && d.$altInput ? d.$altInput.val() : d.$input.val(),
e && d._parseTime(f, !c.settings.timeOnly) && (e.setHours(d.hour, d.minute, d.second, d.millisec),
e.setMicroseconds(d.microsec),
null != d.timezone && (d.support.timezone || null !== d._defaults.timezone || (d.timezone = -1 * e.getTimezoneOffset()),
e = $.timepicker.timezoneAdjust(e, d.timezone, $.timepicker.timezoneOffsetString(-e.getTimezoneOffset())))),
e
}
return this._base_getDateDatepicker(a, b)
}
}
,
$.datepicker._base_parseDate = $.datepicker.parseDate,
$.datepicker.parseDate = function(a, b, c) {
var d;
try {
d = this._base_parseDate(a, b, c)
} catch (e) {
if (!(e.indexOf(":") >= 0))
throw e;
d = this._base_parseDate(a, b.substring(0, b.length - (e.length - e.indexOf(":") - 2)), c),
$.timepicker.log("Error parsing the date string: " + e + "\ndate string = " + b + "\ndate format = " + a)
}
return d
}
,
$.datepicker._base_formatDate = $.datepicker._formatDate,
$.datepicker._formatDate = function(a, b, c, d) {
var e = this._get(a, "timepicker");
return e ? (e._updateDateTime(a),
e.$input.val()) : this._base_formatDate(a)
}
,
$.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker,
$.datepicker._optionDatepicker = function(a, b, c) {
var d, e = this._getInst(a);
if (!e)
return null;
var f = this._get(e, "timepicker");
if (f) {
var g, h, i, j, k = null, l = null, m = null, n = f._defaults.evnts, o = {};
if ("string" == typeof b) {
if ("minDate" === b || "minDateTime" === b)
k = c;
else if ("maxDate" === b || "maxDateTime" === b)
l = c;
else if ("onSelect" === b)
m = c;
else if (n.hasOwnProperty(b)) {
if ("undefined" == typeof c)
return n[b];
o[b] = c,
d = {}
}
} else if ("object" == typeof b) {
b.minDate ? k = b.minDate : b.minDateTime ? k = b.minDateTime : b.maxDate ? l = b.maxDate : b.maxDateTime && (l = b.maxDateTime);
for (g in n)
n.hasOwnProperty(g) && b[g] && (o[g] = b[g])
}
for (g in o)
o.hasOwnProperty(g) && (n[g] = o[g],
d || (d = $.extend({}, b)),
delete d[g]);
if (d && isEmptyObject(d))
return;
if (k ? (k = 0 === k ? new Date : new Date(k),
f._defaults.minDate = k,
f._defaults.minDateTime = k) : l ? (l = 0 === l ? new Date : new Date(l),
f._defaults.maxDate = l,
f._defaults.maxDateTime = l) : m && (f._defaults.onSelect = m),
k || l)
return j = $(a),
i = j.datetimepicker("getDate"),
h = this._base_optionDatepicker.call($.datepicker, a, d || b, c),
j.datetimepicker("setDate", i),
h
}
return void 0 === c ? this._base_optionDatepicker.call($.datepicker, a, b) : this._base_optionDatepicker.call($.datepicker, a, d || b, c)
}
;
var isEmptyObject = function(a) {
var b;
for (b in a)
if (a.hasOwnProperty(b))
return !1;
return !0
}
, extendRemove = function(a, b) {
$.extend(a, b);
for (var c in b)
(null === b[c] || void 0 === b[c]) && (a[c] = b[c]);
return a
}
, detectSupport = function(a) {
var b = a.replace(/'.*?'/g, "").toLowerCase()
, c = function(a, b) {
return -1 !== a.indexOf(b) ? !0 : !1
};
return {
hour: c(b, "h"),
minute: c(b, "m"),
second: c(b, "s"),
millisec: c(b, "l"),
microsec: c(b, "c"),
timezone: c(b, "z"),
ampm: c(b, "t") && c(a, "h"),
iso8601: c(a, "Z")
}
}
, convert24to12 = function(a) {
return a %= 12,
0 === a && (a = 12),
String(a)
}
, computeEffectiveSetting = function(a, b) {
return a && a[b] ? a[b] : $.timepicker._defaults[b]
}
, splitDateTime = function(a, b) {
var c = computeEffectiveSetting(b, "separator")
, d = computeEffectiveSetting(b, "timeFormat")
, e = d.split(c)
, f = e.length
, g = a.split(c)
, h = g.length;
return h > 1 ? {
dateString: g.splice(0, h - f).join(c),
timeString: g.splice(0, f).join(c)
} : {
dateString: a,
timeString: ""
}
}
, parseDateTimeInternal = function(a, b, c, d, e) {
var f, g, h;
if (g = splitDateTime(c, e),
f = $.datepicker._base_parseDate(a, g.dateString, d),
"" === g.timeString)
return {
date: f
};
if (h = $.datepicker.parseTime(b, g.timeString, e),
!h)
throw "Wrong time format";
return {
date: f,
timeObj: h
}
}
, selectLocalTimezone = function(a, b) {
if (a && a.timezone_select) {
var c = b || new Date;
a.timezone_select.val(-c.getTimezoneOffset())
}
};
$.timepicker = new Timepicker,
$.timepicker.timezoneOffsetString = function(a, b) {
if (isNaN(a) || a > 840 || -720 > a)
return a;
var c = a
, d = c % 60
, e = (c - d) / 60
, f = b ? ":" : ""
, g = (c >= 0 ? "+" : "-") + ("0" + Math.abs(e)).slice(-2) + f + ("0" + Math.abs(d)).slice(-2);
return "+00:00" === g ? "Z" : g
}
,
$.timepicker.timezoneOffsetNumber = function(a) {
var b = a.toString().replace(":", "");
return "Z" === b.toUpperCase() ? 0 : /^(\-|\+)\d{4}$/.test(b) ? ("-" === b.substr(0, 1) ? -1 : 1) * (60 * parseInt(b.substr(1, 2), 10) + parseInt(b.substr(3, 2), 10)) : parseInt(a, 10)
}
,
$.timepicker.timezoneAdjust = function(a, b, c) {
var d = $.timepicker.timezoneOffsetNumber(b)
, e = $.timepicker.timezoneOffsetNumber(c);
return isNaN(e) || a.setMinutes(a.getMinutes() + -d - -e),
a
}
,
$.timepicker.timeRange = function(a, b, c) {
return $.timepicker.handleRange("timepicker", a, b, c)
}
,
$.timepicker.datetimeRange = function(a, b, c) {
$.timepicker.handleRange("datetimepicker", a, b, c)
}
,
$.timepicker.dateRange = function(a, b, c) {
$.timepicker.handleRange("datepicker", a, b, c)
}
,
$.timepicker.handleRange = function(a, b, c, d) {
function e(e, f) {
var g = b[a]("getDate")
, h = c[a]("getDate")
, i = e[a]("getDate");
if (null !== g) {
var j = new Date(g.getTime())
, k = new Date(g.getTime());
j.setMilliseconds(j.getMilliseconds() + d.minInterval),
k.setMilliseconds(k.getMilliseconds() + d.maxInterval),
d.minInterval > 0 && j > h ? c[a]("setDate", j) : d.maxInterval > 0 && h > k ? c[a]("setDate", k) : g > h && f[a]("setDate", i)
}
}
function f(b, c, e) {
if (b.val()) {
var f = b[a].call(b, "getDate");
null !== f && d.minInterval > 0 && ("minDate" === e && f.setMilliseconds(f.getMilliseconds() + d.minInterval),
"maxDate" === e && f.setMilliseconds(f.getMilliseconds() - d.minInterval)),
f.getTime && c[a].call(c, "option", e, f)
}
}
d = $.extend({}, {
minInterval: 0,
maxInterval: 0,
start: {},
end: {}
}, d);
var g = !1;
return "timepicker" === a && (g = !0,
a = "datetimepicker"),
$.fn[a].call(b, $.extend({
timeOnly: g,
onClose: function(a, b) {
e($(this), c)
},
onSelect: function(a) {
f($(this), c, "minDate")
}
}, d, d.start)),
$.fn[a].call(c, $.extend({
timeOnly: g,
onClose: function(a, c) {
e($(this), b)
},
onSelect: function(a) {
f($(this), b, "maxDate")
}
}, d, d.end)),
e(b, c),
f(b, c, "minDate"),
f(c, b, "maxDate"),
$([b.get(0), c.get(0)])
}
,
$.timepicker.log = function() {
window.console && window.console.log && window.console.log.apply && window.console.log.apply(window.console, Array.prototype.slice.call(arguments))
}
,
$.timepicker._util = {
_extendRemove: extendRemove,
_isEmptyObject: isEmptyObject,
_convert24to12: convert24to12,
_detectSupport: detectSupport,
_selectLocalTimezone: selectLocalTimezone,
_computeEffectiveSetting: computeEffectiveSetting,
_splitDateTime: splitDateTime,
_parseDateTimeInternal: parseDateTimeInternal
},
Date.prototype.getMicroseconds || (Date.prototype.microseconds = 0,
Date.prototype.getMicroseconds = function() {
return this.microseconds
}
,
Date.prototype.setMicroseconds = function(a) {
return this.setMilliseconds(this.getMilliseconds() + Math.floor(a / 1e3)),
this.microseconds = a % 1e3,
this
}
),
$.timepicker.version = "1.6.3"
}
});
!function(n) {
"use strict";
n.fn.LineProgressbar = function(r) {
return r = n.extend({
percentage: null,
ShowProgressCount: !0,
duration: 1e3,
fillBackgroundColor: "#c9ddf5",
backgroundColor: "#3c4b72",
radius: "0px",
height: "10px",
width: "100%",
level: 5
}, r),
n.options = r,
this.each(function(o, t) {
n(t).html('
');
var e = n(t).find(".proggress")
, i = n(t).find(".progressbar")
, s = parseInt(r.percentage * r.level);
e.css({
backgroundColor: r.fillBackgroundColor,
height: r.height,
borderRadius: r.radius
}),
i.css({
width: r.width,
backgroundColor: r.backgroundColor,
borderRadius: r.radius
}),
s > 100 ? e.animate({
width: "100%"
}, {
step: function(o) {
r.ShowProgressCount && n(t).find(".percentCount").html(Math.round(o / r.level) + "
Min")
},
duration: r.duration
}) : e.animate({
width: parseInt(r.percentage * r.level) + "%"
}, {
step: function(o) {
r.ShowProgressCount && n(t).find(".percentCount").html(Math.round(o / r.level) + "
Min")
},
duration: r.duration
})
})
}
,
n.fn.progressTo = function(r) {
let o = n.options;
return this.each(function(t, e) {
var i = n(e).find(".proggress");
n(e).find(".progressbar");
i.animate({
width: r + "%"
}, {
step: function(r) {
o.ShowProgressCount && n(e).find(".percentCount").text(Math.round(r) + "%")
},
duration: o.duration
})
})
}
}(jQuery);
(function(n) {
"use strict";
n.fn.zTip = function(t) {
var u, r, i, f;
return this.length > 1 ? (this.each(function() {
n(this).zTip(t)
}),
this) : (u = n.extend({
theme: "default",
source: "attr:title",
position: "top"
}, t),
r = this,
n.each(u, function(n) {
var i = n.replace(/([A-Z])/g, "-$1").toLowerCase().toString()
, t = r.data(i);
(t || !1 === t) && (u[n] = t)
}),
f = function() {
r.firstInit();
r.build()
}
,
this.firstInit = function() {
if (n("body").find(".ztip-holder").length < 1)
n("body").append('
<\/span><\/span><\/div>');
i = n("body").find(".ztip-holder")
}
,
this.build = function() {
r.on("mouseover", function() {
var u = n(this), f = r.getElemTip(u), t;
f && (r.refreshHolderTheme(),
i.children(".zt-text").html(f),
t = r.getElementCoordinates(u),
i.outerWidth() < t.width && i.css({
"max-width": t.width + "px"
}),
r.autoPosition(t),
i.addClass("ztip-show"))
});
r.on("mouseout", function() {
i && i.removeClass("ztip-show").css({
top: 0,
right: "",
bottom: "",
left: "-110%",
"max-width": ""
})
});
n(window).on("scroll resize", function() {
i && i.removeClass("ztip-show")
})
}
,
this.getElemTip = function(t) {
var i = t.attr("title");
return i && t.attr("data-ztip-title", i).removeAttr("title"),
typeof u.source == "function" ? u.source.call(this, t) : r.stringStartsWith(u.source, "attr:title") ? t.attr("data-ztip-title") : r.stringStartsWith(u.source, "attr:") ? t.attr(u.source.replace("attr:", "")) : r.stringStartsWith(u.source, ">") ? t.children(u.source.replace(">", "")).html() : n(u.source).html()
}
,
this.autoPosition = function(n) {
var f = ""
, t = ""
, e = r.getViewport();
i.outerWidth() > e.width && i.css({
"max-width": e.width
});
"bottom" === u.position ? i.outerHeight() + 10 > n.fromBottom ? (f = n.top - i.outerHeight() - 10,
r.changeHolderPosition("top")) : (f = n.bottom + 10,
r.changeHolderPosition("bottom")) : i.outerHeight() + 10 < n.top ? (f = n.top - i.outerHeight() - 10,
r.changeHolderPosition("top")) : (f = n.bottom + 10,
r.changeHolderPosition("bottom"));
var s = i.outerWidth() / 2
, h = i.outerWidth() < e.width
, o = (e.width - i.outerWidth()) / 2;
s > n.centerX ? (t = 0,
h && o < n.left ? t = o : n.fromRight + n.width > i.outerWidth() && (t = n.left)) : s < n.centerX && e.width - n.centerX < s ? (t = e.width - i.outerWidth(),
h && o < n.fromRight ? t = o : n.right > i.outerWidth() && (t = n.right - i.outerWidth())) : t = n.centerX - i.outerWidth() / 2;
r.holderCss({
top: f !== "" ? f + "px" : "",
left: t !== "" ? t + "px" : ""
});
var l = i[0].getBoundingClientRect()
, a = n.centerX - l.left
, c = i.children(".zt-arrow");
c.css({
left: a,
"margin-left": -c.outerWidth() / 2
})
}
,
this.holderCss = function(n) {
var t = {
top: n.top || "",
right: n.right || "",
bottom: n.bottom || "",
left: n.left || ""
};
i.css(t)
}
,
this.getElementCoordinates = function(t) {
var r = t;
t instanceof jQuery && (r = t[0]);
var i = r.getBoundingClientRect()
, u = i.right - i.left
, f = i.bottom - i.top;
return {
width: u,
height: f,
top: i.top,
left: i.left,
bottom: i.bottom,
right: i.right,
fromTop: i.top,
fromLeft: i.left,
fromBottom: n(window).innerHeight() - i.bottom,
fromRight: n(window).innerWidth() - i.right,
centerX: i.left + u / 2,
centerY: i.top + f / 2
}
}
,
this.getViewport = function() {
return {
width: n(window).innerWidth(),
height: n(window).innerHeight()
}
}
,
this.changeHolderPosition = function(n) {
r.replaceClass(/\bztip-position-\S+/g, "ztip-position-" + n)
}
,
this.refreshHolderTheme = function() {
r.replaceClass(/\bztip-theme-\S+/g, "ztip-theme-" + u.theme)
}
,
this.replaceClass = function(n, t) {
i.hasClass(t) || i.removeClass(function(t, i) {
return (i.match(n) || []).join(" ")
}).addClass(t)
}
,
this.stringStartsWith = function(n, t, i) {
return n.substr(i || 0, t.length) === t
}
,
f(),
this)
}
}
)(jQuery);
$( () => {
window.onAjaxRequestSuccess = n => {
registerPopup({
contentTitle: n.statusText,
content: n.message,
onClose: () => {
if (n.status === !0) {
const i = window.location.pathname.toLowerCase();
let t = n.url;
i.startsWith("/desktop") && (t = n.desktopUrl);
i.startsWith("/mobile") && (t = n.mobileUrl);
window.location.href = t
}
}
})
}
,
window.onAjaxRequestBegin = () => {
const n = document.querySelectorAll(".btn-primary");
$(n).prop("disabled", !0)
}
,
window.onAjaxRequestComplete = () => {
const n = document.querySelectorAll(".btn-primary");
$(n).prop("disabled", !1)
}
}
);
!function() {
const n = document.querySelectorAll(".js_live_chat_link");
n.forEach(n => {
n.onclick = () => {
if (window.chatbot && window.chatbot.maximize) {
window.chatbot.maximize();
return
}
if (n.dataset.url) {
window.open(n.dataset.url, "live-chat");
return
}
if (window.Tawk_API && window.Tawk_API.maximize) {
window.Tawk_API.maximize();
return
}
if (window.LC_API && window.LC_API.open_chat_window) {
window.LC_API.open_chat_window();
return
}
if (window.zE && window.zE.activate) {
window.zE.activate({
hideOnClose: !1
});
return
}
if (window.beacon && window.beacon.chat && window.beacon.chat.showChatCtrl) {
window.beacon.chat.showChatCtrl();
return
}
}
}
)
}();
$( () => {
window.changeLanguage = n => {
const t = new Date
, i = t.setTime(t.getTime() + 6048e5)
, r = [`language=${n}`, `expires=${new Date(i)}`, `path=/`, `SameSite=Strict`];
document.cookie = r.join(";");
location.reload()
}
;
const n = document.querySelector("#language_selector_trigger");
if (n) {
const t = document.querySelectorAll(".language_selector");
n.onclick = () => {
if (!n.dataset.active) {
n.dataset.active = !0;
return
}
n.dataset.active = !JSON.parse(n.dataset.active)
}
;
Array.prototype.slice.call(t).forEach(t => {
t.onclick = () => {
if (t.dataset.language === n.dataset.language) {
n.dataset.active = !1;
return
}
window.changeLanguage(t.dataset.language)
}
}
)
}
}
);
$( () => {
const i = new Set
, t = () => {
i.forEach(n => n.close()),
i.clear()
}
;
window.closeWindows = t;
window.closeWindowsAndIframe = () => {
t();
const n = document.querySelector("#game_iframe");
n && (window.location = "/home")
}
;
window.openPopup = (n, r) => {
t();
const u = screen.availWidth / 1.5
, f = screen.availHeight / 1.5
, e = parseInt(screen.availWidth / 2 - u / 2, 10)
, o = parseInt(screen.availHeight / 2 - f / 2, 10)
, s = "width=" + u + ",height=" + f + ",status,resizable,left=" + e + ",top=" + o + "screenX=" + e + ",screenY=" + o;
i.add(window.open(n, r, s))
}
;
window.openNewTab = (n, r) => {
t(),
i.add(window.open(n, r))
}
;
window.dispatchInternally = n => {
t(),
window.location = n
}
;
const n = document.querySelector("#popup_modal")
, s = document.querySelector("#popup_modal_title")
, r = document.querySelector("#popup_modal_body")
, f = document.querySelector("#popup_modal_dismiss_button")
, e = document.querySelector("#popup_modal_cancel_button")
, u = document.querySelector("#popup_modal_confirm_button")
, o = [];
window.registerPopup = ({contentTitle: i, content: t, title: a, onClose: c, onConfirm: l, cssClass: h}) => {
if (n.dataset.title = a || "",
s.innerText = a || "",
r.innerHTML = "",
i != "") {
const n = document.createElement("p");
n.textContent = i;
r.appendChild(n)
}
const v = document.createElement("p");
v.innerHTML = t;
r.appendChild(v);
f.style.display = "";
e.style.display = "none";
u.style.display = "none";
u.onclick = null;
c && o.push(c);
l && (f.style.display = "none",
e.style.display = "",
u.style.display = "",
u.onclick = l);
n.className = "modal popup-modal";
h && n.classList.add(h);
$(".modal").modal("hide");
$(n).modal("show")
}
;
$(n).on("hidden.bs.modal", () => {
const n = o.pop();
n && n()
}
);
r.childElementCount > 0 && ($(n).modal("show"),
n.style.display = "block");
window.setInnerHtmlWithScripts = (n, t) => {
n.innerHTML = t,
n.querySelectorAll("script").forEach(n => {
const t = document.createElement("script");
Array.from(n.attributes).forEach(n => {
t.setAttribute(n.name, n.value)
}
);
const i = document.createTextNode(n.innerHTML);
t.appendChild(i);
n.parentNode.replaceChild(t, n)
}
)
}
}
);
$( () => {
const n = document.querySelector("#unread_announcements_button");
if (n) {
const i = document.querySelector("#unread_announcements_popup")
, t = i.querySelector("iframe")
, r = document.querySelector("#loader");
n.onclick = () => {
r.style.display = "",
t.src = t.dataset.src,
t.onload = () => r.style.display = "none",
i.classList.toggle("show")
}
;
const u = document.querySelector("#unread_announcements_popup_overlay");
u && (u.onclick = () => {
i.classList.remove("show"),
t.src = "about:blank"
}
)
}
window.displayPendingTransactionPopup = function(n, t, i, r) {
$.ajax({
type: "POST",
data: JSON.stringify({
ticketNumber: n,
messageId: t,
messageSubCategory: i
}),
url: "/message/pending-transaction",
contentType: "application/json; charset=utf-8",
dataType: "html",
success: n => {
n ? registerPopup({
content: n,
cssClass: "concise-transaction-popup"
}) : window.location.href = r
}
})
}
}
);
$( () => {
const n = [];
setInterval( () => {
n.forEach(n => n.update())
}
, 1e3);
window.initializeExpirations = t => {
const i = document.querySelectorAll(t);
i.forEach(t => {
if (t.dataset.expirationDate) {
const i = {
time: (Date.parse(t.dataset.expirationDate) - Date.now()) / 1e3,
elements: {
seconds: t.querySelector('[data-value="seconds"]'),
minutes: t.querySelector('[data-value="minutes"]'),
hours: t.querySelector('[data-value="hours"]'),
days: t.querySelector('[data-value="days"]')
}
}
, r = (n, t) => {
const i = n.querySelectorAll("[data-time-fragment]");
if (i.length) {
i.forEach( (n, i) => n.innerText = t[i]);
return
}
n.innerText = t
}
;
i.update = () => {
i.time -= 1;
const n = i.time < 0 ? 0 : i.time
, t = n / 60
, u = t / 60
, f = u / 24;
if (i.elements.seconds) {
const t = Math.floor(n % 60).toString().padStart(2, "0");
r(i.elements.seconds, t)
}
if (i.elements.minutes) {
const n = Math.floor(t % 60).toString().padStart(2, "0");
r(i.elements.minutes, n)
}
if (i.elements.hours) {
const n = Math.floor(u % 24).toString().padStart(2, "0");
r(i.elements.hours, n)
}
if (i.elements.days) {
const n = Math.floor(f).toString().padStart(2, "0");
r(i.elements.days, n)
}
}
;
n.push(i)
}
}
)
}
;
window.initializeExpirations(".expiration_countdown")
}
);
$( () => {
window.initializeCaptcha = ({button: n, image: t}) => {
n && t && (n.onclick = () => {
let i = "/captcha/refresh";
n.dataset.captchaOrigin && (i += "/" + n.dataset.captchaOrigin);
t.src = `${i}?${Math.random()}`
}
)
}
,
initializeCaptcha({
button: document.querySelector("#refresh_captcha_button"),
image: document.querySelector("#captcha_image")
})
}
);
$( () => {
window.readCookie = n => {
const t = document.cookie.split(";");
for (let i = 0; i < t.length; i += 1) {
const [r,u] = t[i].split("=");
if (r.trim() === n.trim())
return u
}
return null
}
,
window.writeCookie = (n, t) => {
const i = new Date;
i.setDate(i.getDate() + 7);
document.cookie = `${n}=${t || ""}; Path=/; expires=${i.toUTCString()};`
}
}
);
$( () => {
const t = 6e4
, n = async i => {
setTimeout(async () => {
await window.$.ajax({
type: "POST",
url: "/session/online",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(n) {
if (n.closeCurrentGame && window.closeWindowsAndIframe(),
n.logout) {
registerPopup({
content: n.message,
onClose: function() {
window.location = "/home"
}
});
return
}
},
error: function(n) {
const t = n.getResponseHeader("Redirect-Reason");
n.status === 200 && t && (window.closeWindows(),
window.location.href = "/home/" + t)
}
}),
n()
}
, i || t)
}
;
n(5e3)
}
);
/*!
* Intro.js v7.0.1
* https://introjs.com
*
* Copyright (C) 2012-2023 Afshin Mehrabani (@afshinmeh).
* https://introjs.com
*
* Date: Sat, 25 Mar 2023 14:24:34 GMT
*/
!function(t, e) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).introJs = e()
}(this, (function() {
"use strict";
function t() {
t = function() {
return e
}
;
var e = {}
, n = Object.prototype
, r = n.hasOwnProperty
, i = Object.defineProperty || function(t, e, n) {
t[e] = n.value
}
, o = "function" == typeof Symbol ? Symbol : {}
, a = o.iterator || "@@iterator"
, s = o.asyncIterator || "@@asyncIterator"
, l = o.toStringTag || "@@toStringTag";
function c(t, e, n) {
return Object.defineProperty(t, e, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}),
t[e]
}
try {
c({}, "")
} catch (t) {
c = function(t, e, n) {
return t[e] = n
}
}
function u(t, e, n, r) {
var o = e && e.prototype instanceof f ? e : f
, a = Object.create(o.prototype)
, s = new j(r || []);
return i(a, "_invoke", {
value: x(t, n, s)
}),
a
}
function h(t, e, n) {
try {
return {
type: "normal",
arg: t.call(e, n)
}
} catch (t) {
return {
type: "throw",
arg: t
}
}
}
e.wrap = u;
var p = {};
function f() {}
function d() {}
function m() {}
var b = {};
c(b, a, (function() {
return this
}
));
var v = Object.getPrototypeOf
, y = v && v(v(A([])));
y && y !== n && r.call(y, a) && (b = y);
var g = m.prototype = f.prototype = Object.create(b);
function w(t) {
["next", "throw", "return"].forEach((function(e) {
c(t, e, (function(t) {
return this._invoke(e, t)
}
))
}
))
}
function _(t, e) {
function n(i, o, a, s) {
var l = h(t[i], t, o);
if ("throw" !== l.type) {
var c = l.arg
, u = c.value;
return u && "object" == typeof u && r.call(u, "__await") ? e.resolve(u.__await).then((function(t) {
n("next", t, a, s)
}
), (function(t) {
n("throw", t, a, s)
}
)) : e.resolve(u).then((function(t) {
c.value = t,
a(c)
}
), (function(t) {
return n("throw", t, a, s)
}
))
}
s(l.arg)
}
var o;
i(this, "_invoke", {
value: function(t, r) {
function i() {
return new e((function(e, i) {
n(t, r, e, i)
}
))
}
return o = o ? o.then(i, i) : i()
}
})
}
function x(t, e, n) {
var r = "suspendedStart";
return function(i, o) {
if ("executing" === r)
throw new Error("Generator is already running");
if ("completed" === r) {
if ("throw" === i)
throw o;
return E()
}
for (n.method = i,
n.arg = o; ; ) {
var a = n.delegate;
if (a) {
var s = k(a, n);
if (s) {
if (s === p)
continue;
return s
}
}
if ("next" === n.method)
n.sent = n._sent = n.arg;
else if ("throw" === n.method) {
if ("suspendedStart" === r)
throw r = "completed",
n.arg;
n.dispatchException(n.arg)
} else
"return" === n.method && n.abrupt("return", n.arg);
r = "executing";
var l = h(t, e, n);
if ("normal" === l.type) {
if (r = n.done ? "completed" : "suspendedYield",
l.arg === p)
continue;
return {
value: l.arg,
done: n.done
}
}
"throw" === l.type && (r = "completed",
n.method = "throw",
n.arg = l.arg)
}
}
}
function k(t, e) {
var n = t.iterator[e.method];
if (void 0 === n) {
if (e.delegate = null,
"throw" === e.method) {
if (t.iterator.return && (e.method = "return",
e.arg = void 0,
k(t, e),
"throw" === e.method))
return p;
e.method = "throw",
e.arg = new TypeError("The iterator does not provide a 'throw' method")
}
return p
}
var r = h(n, t.iterator, e.arg);
if ("throw" === r.type)
return e.method = "throw",
e.arg = r.arg,
e.delegate = null,
p;
var i = r.arg;
return i ? i.done ? (e[t.resultName] = i.value,
e.next = t.nextLoc,
"return" !== e.method && (e.method = "next",
e.arg = void 0),
e.delegate = null,
p) : i : (e.method = "throw",
e.arg = new TypeError("iterator result is not an object"),
e.delegate = null,
p)
}
function C(t) {
var e = {
tryLoc: t[0]
};
1 in t && (e.catchLoc = t[1]),
2 in t && (e.finallyLoc = t[2],
e.afterLoc = t[3]),
this.tryEntries.push(e)
}
function S(t) {
var e = t.completion || {};
e.type = "normal",
delete e.arg,
t.completion = e
}
function j(t) {
this.tryEntries = [{
tryLoc: "root"
}],
t.forEach(C, this),
this.reset(!0)
}
function A(t) {
if (t) {
var e = t[a];
if (e)
return e.call(t);
if ("function" == typeof t.next)
return t;
if (!isNaN(t.length)) {
var n = -1
, i = function e() {
for (; ++n < t.length; )
if (r.call(t, n))
return e.value = t[n],
e.done = !1,
e;
return e.value = void 0,
e.done = !0,
e
};
return i.next = i
}
}
return {
next: E
}
}
function E() {
return {
value: void 0,
done: !0
}
}
return d.prototype = m,
i(g, "constructor", {
value: m,
configurable: !0
}),
i(m, "constructor", {
value: d,
configurable: !0
}),
d.displayName = c(m, l, "GeneratorFunction"),
e.isGeneratorFunction = function(t) {
var e = "function" == typeof t && t.constructor;
return !!e && (e === d || "GeneratorFunction" === (e.displayName || e.name))
}
,
e.mark = function(t) {
return Object.setPrototypeOf ? Object.setPrototypeOf(t, m) : (t.__proto__ = m,
c(t, l, "GeneratorFunction")),
t.prototype = Object.create(g),
t
}
,
e.awrap = function(t) {
return {
__await: t
}
}
,
w(_.prototype),
c(_.prototype, s, (function() {
return this
}
)),
e.AsyncIterator = _,
e.async = function(t, n, r, i, o) {
void 0 === o && (o = Promise);
var a = new _(u(t, n, r, i),o);
return e.isGeneratorFunction(n) ? a : a.next().then((function(t) {
return t.done ? t.value : a.next()
}
))
}
,
w(g),
c(g, l, "Generator"),
c(g, a, (function() {
return this
}
)),
c(g, "toString", (function() {
return "[object Generator]"
}
)),
e.keys = function(t) {
var e = Object(t)
, n = [];
for (var r in e)
n.push(r);
return n.reverse(),
function t() {
for (; n.length; ) {
var r = n.pop();
if (r in e)
return t.value = r,
t.done = !1,
t
}
return t.done = !0,
t
}
}
,
e.values = A,
j.prototype = {
constructor: j,
reset: function(t) {
if (this.prev = 0,
this.next = 0,
this.sent = this._sent = void 0,
this.done = !1,
this.delegate = null,
this.method = "next",
this.arg = void 0,
this.tryEntries.forEach(S),
!t)
for (var e in this)
"t" === e.charAt(0) && r.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = void 0)
},
stop: function() {
this.done = !0;
var t = this.tryEntries[0].completion;
if ("throw" === t.type)
throw t.arg;
return this.rval
},
dispatchException: function(t) {
if (this.done)
throw t;
var e = this;
function n(n, r) {
return a.type = "throw",
a.arg = t,
e.next = n,
r && (e.method = "next",
e.arg = void 0),
!!r
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var o = this.tryEntries[i]
, a = o.completion;
if ("root" === o.tryLoc)
return n("end");
if (o.tryLoc <= this.prev) {
var s = r.call(o, "catchLoc")
, l = r.call(o, "finallyLoc");
if (s && l) {
if (this.prev < o.catchLoc)
return n(o.catchLoc, !0);
if (this.prev < o.finallyLoc)
return n(o.finallyLoc)
} else if (s) {
if (this.prev < o.catchLoc)
return n(o.catchLoc, !0)
} else {
if (!l)
throw new Error("try statement without catch or finally");
if (this.prev < o.finallyLoc)
return n(o.finallyLoc)
}
}
}
},
abrupt: function(t, e) {
for (var n = this.tryEntries.length - 1; n >= 0; --n) {
var i = this.tryEntries[n];
if (i.tryLoc <= this.prev && r.call(i, "finallyLoc") && this.prev < i.finallyLoc) {
var o = i;
break
}
}
o && ("break" === t || "continue" === t) && o.tryLoc <= e && e <= o.finallyLoc && (o = null);
var a = o ? o.completion : {};
return a.type = t,
a.arg = e,
o ? (this.method = "next",
this.next = o.finallyLoc,
p) : this.complete(a)
},
complete: function(t, e) {
if ("throw" === t.type)
throw t.arg;
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg,
this.method = "return",
this.next = "end") : "normal" === t.type && e && (this.next = e),
p
},
finish: function(t) {
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
var n = this.tryEntries[e];
if (n.finallyLoc === t)
return this.complete(n.completion, n.afterLoc),
S(n),
p
}
},
catch: function(t) {
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
var n = this.tryEntries[e];
if (n.tryLoc === t) {
var r = n.completion;
if ("throw" === r.type) {
var i = r.arg;
S(n)
}
return i
}
}
throw new Error("illegal catch attempt")
},
delegateYield: function(t, e, n) {
return this.delegate = {
iterator: A(t),
resultName: e,
nextLoc: n
},
"next" === this.method && (this.arg = void 0),
p
}
},
e
}
function e(t) {
return e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
return typeof t
}
: function(t) {
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t
}
,
e(t)
}
function n(t, e, n, r, i, o, a) {
try {
var s = t[o](a)
, l = s.value
} catch (t) {
return void n(t)
}
s.done ? e(l) : Promise.resolve(l).then(r, i)
}
function r(t) {
return function() {
var e = this
, r = arguments;
return new Promise((function(i, o) {
var a = t.apply(e, r);
function s(t) {
n(a, i, o, s, l, "next", t)
}
function l(t) {
n(a, i, o, s, l, "throw", t)
}
s(void 0)
}
))
}
}
function i(t, e) {
for (var n = 0; n < e.length; n++) {
var r = e[n];
r.enumerable = r.enumerable || !1,
r.configurable = !0,
"value"in r && (r.writable = !0),
Object.defineProperty(t, r.key, r)
}
}
function o(t, e, n) {
return e in t ? Object.defineProperty(t, e, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[e] = n,
t
}
function a(t, e) {
return function(t) {
if (Array.isArray(t))
return t
}(t) || function(t, e) {
var n = null == t ? null : "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
if (null == n)
return;
var r, i, o = [], a = !0, s = !1;
try {
for (n = n.call(t); !(a = (r = n.next()).done) && (o.push(r.value),
!e || o.length !== e); a = !0)
;
} catch (t) {
s = !0,
i = t
} finally {
try {
a || null == n.return || n.return()
} finally {
if (s)
throw i
}
}
return o
}(t, e) || function(t, e) {
if (!t)
return;
if ("string" == typeof t)
return s(t, e);
var n = Object.prototype.toString.call(t).slice(8, -1);
"Object" === n && t.constructor && (n = t.constructor.name);
if ("Map" === n || "Set" === n)
return Array.from(t);
if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
return s(t, e)
}(t, e) || function() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
}()
}
function s(t, e) {
(null == e || e > t.length) && (e = t.length);
for (var n = 0, r = new Array(e); n < e; n++)
r[n] = t[n];
return r
}
var l, c = (l = {},
function(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "introjs-stamp";
return l[e] = l[e] || 0,
void 0 === t[e] && (t[e] = l[e]++),
t[e]
}
);
function u(t, e, n) {
if (t)
for (var r = 0, i = t.length; r < i; r++)
e(t[r], r);
"function" == typeof n && n()
}
var h = new function() {
var t = "introjs_event";
this._id = function(t, e, n) {
return t + c(e) + (n ? "_".concat(c(n)) : "")
}
,
this.on = function(e, n, r, i, o) {
var a = this._id.apply(this, [n, r, i])
, s = function(t) {
return r.call(i || e, t || window.event)
};
"addEventListener"in e ? e.addEventListener(n, s, o) : "attachEvent"in e && e.attachEvent("on".concat(n), s),
e[t] = e[t] || {},
e[t][a] = s
}
,
this.off = function(e, n, r, i, o) {
var a = this._id.apply(this, [n, r, i])
, s = e[t] && e[t][a];
s && ("removeEventListener"in e ? e.removeEventListener(n, s, o) : "detachEvent"in e && e.detachEvent("on".concat(n), s),
e[t][a] = null)
}
}
;
function p(t, e) {
if (t instanceof SVGElement) {
var n = t.getAttribute("class") || "";
n.match(e) || t.setAttribute("class", "".concat(n, " ").concat(e))
} else {
if (void 0 !== t.classList)
u(e.split(" "), (function(e) {
t.classList.add(e)
}
));
else
t.className.match(e) || (t.className += " ".concat(e))
}
}
function f(t, e) {
var n = "";
return "currentStyle"in t ? n = t.currentStyle[e] : document.defaultView && document.defaultView.getComputedStyle && (n = document.defaultView.getComputedStyle(t, null).getPropertyValue(e)),
n && n.toLowerCase ? n.toLowerCase() : n
}
function d(t) {
p(t, "introjs-showElement");
var e = f(t, "position");
"absolute" !== e && "relative" !== e && "sticky" !== e && "fixed" !== e && p(t, "introjs-relativePosition")
}
function m(t) {
if (this._options.scrollToElement) {
var e = function(t) {
var e = window.getComputedStyle(t)
, n = "absolute" === e.position
, r = /(auto|scroll)/;
if ("fixed" === e.position)
return document.body;
for (var i = t; i = i.parentElement; )
if (e = window.getComputedStyle(i),
(!n || "static" !== e.position) && r.test(e.overflow + e.overflowY + e.overflowX))
return i;
return document.body
}(t);
e !== document.body && (e.scrollTop = t.offsetTop - e.offsetTop)
}
}
function b() {
if (void 0 !== window.innerWidth)
return {
width: window.innerWidth,
height: window.innerHeight
};
var t = document.documentElement;
return {
width: t.clientWidth,
height: t.clientHeight
}
}
function v(t, e, n) {
var r;
if ("off" !== t && (this._options.scrollToElement && (r = "tooltip" === t ? n.getBoundingClientRect() : e.getBoundingClientRect(),
!function(t) {
var e = t.getBoundingClientRect();
return e.top >= 0 && e.left >= 0 && e.bottom + 80 <= window.innerHeight && e.right <= window.innerWidth
}(e)))) {
var i = b().height;
r.bottom - (r.bottom - r.top) < 0 || e.clientHeight > i ? window.scrollBy(0, r.top - (i / 2 - r.height / 2) - this._options.scrollPadding) : window.scrollBy(0, r.top - (i / 2 - r.height / 2) + this._options.scrollPadding)
}
}
function y(t) {
t.setAttribute("role", "button"),
t.tabIndex = 0
}
function g(t) {
var e = t.parentElement;
return !(!e || "HTML" === e.nodeName) && ("fixed" === f(t, "position") || g(e))
}
function w(t, e) {
var n = document.body
, r = document.documentElement
, i = window.pageYOffset || r.scrollTop || n.scrollTop
, o = window.pageXOffset || r.scrollLeft || n.scrollLeft;
e = e || n;
var a = t.getBoundingClientRect()
, s = e.getBoundingClientRect()
, l = f(e, "position")
, c = {
width: a.width,
height: a.height
};
return "body" !== e.tagName.toLowerCase() && "relative" === l || "sticky" === l ? Object.assign(c, {
top: a.top - s.top,
left: a.left - s.left
}) : g(t) ? Object.assign(c, {
top: a.top,
left: a.left
}) : Object.assign(c, {
top: a.top + i,
left: a.left + o
})
}
function _(t, e) {
if (t instanceof SVGElement) {
var n = t.getAttribute("class") || "";
t.setAttribute("class", n.replace(e, "").replace(/^\s+|\s+$/g, ""))
} else
t.className = t.className.replace(e, "").replace(/^\s+|\s+$/g, "")
}
function x(t, e) {
var n = "";
if (t.style.cssText && (n += t.style.cssText),
"string" == typeof e)
n += e;
else
for (var r in e)
n += "".concat(r, ":").concat(e[r], ";");
t.style.cssText = n
}
function k(t) {
if (t) {
if (!this._introItems[this._currentStep])
return;
var e = this._introItems[this._currentStep]
, n = w(e.element, this._targetElement)
, r = this._options.helperElementPadding;
g(e.element) ? p(t, "introjs-fixedTooltip") : _(t, "introjs-fixedTooltip"),
"floating" === e.position && (r = 0),
x(t, {
width: "".concat(n.width + r, "px"),
height: "".concat(n.height + r, "px"),
top: "".concat(n.top - r / 2, "px"),
left: "".concat(n.left - r / 2, "px")
})
}
}
function C(t, e, n, r, i) {
return t.left + e + n.width > r.width ? (i.style.left = "".concat(r.width - n.width - t.left, "px"),
!1) : (i.style.left = "".concat(e, "px"),
!0)
}
function S(t, e, n, r) {
return t.left + t.width - e - n.width < 0 ? (r.style.left = "".concat(-t.left, "px"),
!1) : (r.style.right = "".concat(e, "px"),
!0)
}
function j(t, e) {
t.includes(e) && t.splice(t.indexOf(e), 1)
}
function A(t, e, n) {
var r = this._options.positionPrecedence.slice()
, i = b()
, o = w(e).height + 10
, a = w(e).width + 20
, s = t.getBoundingClientRect()
, l = "floating";
s.bottom + o > i.height && j(r, "bottom"),
s.top - o < 0 && j(r, "top"),
s.right + a > i.width && j(r, "right"),
s.left - a < 0 && j(r, "left");
var c, u, h = -1 !== (u = (c = n || "").indexOf("-")) ? c.substr(u) : "";
return n && (n = n.split("-")[0]),
r.length && (l = r.includes(n) ? n : r[0]),
["top", "bottom"].includes(l) && (l += function(t, e, n, r) {
var i = e / 2
, o = Math.min(n, window.screen.width)
, a = ["-left-aligned", "-middle-aligned", "-right-aligned"];
return o - t < e && j(a, "-left-aligned"),
(t < i || o - t < i) && j(a, "-middle-aligned"),
t < e && j(a, "-right-aligned"),
a.length ? a.includes(r) ? r : a[0] : "-middle-aligned"
}(s.left, a, i.width, h)),
l
}
function E(t, e, n, r) {
var i, o, a, s, l, c = "";
if (r = r || !1,
e.style.top = null,
e.style.right = null,
e.style.bottom = null,
e.style.left = null,
e.style.marginLeft = null,
e.style.marginTop = null,
n.style.display = "inherit",
this._introItems[this._currentStep]) {
c = "string" == typeof (i = this._introItems[this._currentStep]).tooltipClass ? i.tooltipClass : this._options.tooltipClass,
e.className = ["introjs-tooltip", c].filter(Boolean).join(" "),
e.setAttribute("role", "dialog"),
"floating" !== (l = this._introItems[this._currentStep].position) && this._options.autoPosition && (l = A.call(this, t, e, l)),
a = w(t),
o = w(e),
s = b(),
p(e, "introjs-".concat(l));
var u = a.width / 2 - o.width / 2;
switch (l) {
case "top-right-aligned":
n.className = "introjs-arrow bottom-right";
var h = 0;
S(a, h, o, e),
e.style.bottom = "".concat(a.height + 20, "px");
break;
case "top-middle-aligned":
n.className = "introjs-arrow bottom-middle",
r && (u += 5),
S(a, u, o, e) && (e.style.right = null,
C(a, u, o, s, e)),
e.style.bottom = "".concat(a.height + 20, "px");
break;
case "top-left-aligned":
case "top":
n.className = "introjs-arrow bottom",
C(a, r ? 0 : 15, o, s, e),
e.style.bottom = "".concat(a.height + 20, "px");
break;
case "right":
e.style.left = "".concat(a.width + 20, "px"),
a.top + o.height > s.height ? (n.className = "introjs-arrow left-bottom",
e.style.top = "-".concat(o.height - a.height - 20, "px")) : n.className = "introjs-arrow left";
break;
case "left":
r || !0 !== this._options.showStepNumbers || (e.style.top = "15px"),
a.top + o.height > s.height ? (e.style.top = "-".concat(o.height - a.height - 20, "px"),
n.className = "introjs-arrow right-bottom") : n.className = "introjs-arrow right",
e.style.right = "".concat(a.width + 20, "px");
break;
case "floating":
n.style.display = "none",
e.style.left = "50%",
e.style.top = "50%",
e.style.marginLeft = "-".concat(o.width / 2, "px"),
e.style.marginTop = "-".concat(o.height / 2, "px");
break;
case "bottom-right-aligned":
n.className = "introjs-arrow top-right",
S(a, h = 0, o, e),
e.style.top = "".concat(a.height + 20, "px");
break;
case "bottom-middle-aligned":
n.className = "introjs-arrow top-middle",
r && (u += 5),
S(a, u, o, e) && (e.style.right = null,
C(a, u, o, s, e)),
e.style.top = "".concat(a.height + 20, "px");
break;
default:
n.className = "introjs-arrow top",
C(a, 0, o, s, e),
e.style.top = "".concat(a.height + 20, "px")
}
}
}
function N() {
u(Array.from(document.querySelectorAll(".introjs-showElement")), (function(t) {
_(t, /introjs-[a-zA-Z]+/g)
}
))
}
function L(t, e) {
var n = document.createElement(t);
e = e || {};
var r = /^(?:role|data-|aria-)/;
for (var i in e) {
var o = e[i];
"style" === i ? x(n, o) : i.match(r) ? n.setAttribute(i, o) : n[i] = o
}
return n
}
function T(t, e) {
var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
if (n) {
var r = e.style.opacity || "1";
x(e, {
opacity: "0"
}),
window.setTimeout((function() {
x(e, {
opacity: r
})
}
), 10)
}
t.appendChild(e)
}
function I() {
return parseInt(this._currentStep + 1, 10) / this._introItems.length * 100
}
function P() {
var t = document.querySelector(".introjs-disableInteraction");
null === t && (t = L("div", {
className: "introjs-disableInteraction"
}),
this._targetElement.appendChild(t)),
k.call(this, t)
}
function q(t) {
var e = this
, n = L("div", {
className: "introjs-bullets"
});
!1 === this._options.showBullets && (n.style.display = "none");
var r = L("ul");
r.setAttribute("role", "tablist");
var i = function() {
e.goToStep(this.getAttribute("data-step-number"))
};
return u(this._introItems, (function(e, n) {
var o = e.step
, a = L("li")
, s = L("a");
a.setAttribute("role", "presentation"),
s.setAttribute("role", "tab"),
s.onclick = i,
n === t.step - 1 && (s.className = "active"),
y(s),
s.innerHTML = " ",
s.setAttribute("data-step-number", o),
a.appendChild(s),
r.appendChild(a)
}
)),
n.appendChild(r),
n
}
function O(t) {
if (this._options.showBullets) {
var e = document.querySelector(".introjs-bullets");
e && e.parentNode.replaceChild(q.call(this, t), e)
}
}
function B(t, e) {
this._options.showBullets && (t.querySelector(".introjs-bullets li > a.active").className = "",
t.querySelector('.introjs-bullets li > a[data-step-number="'.concat(e.step, '"]')).className = "active")
}
function H() {
var t = L("div");
t.className = "introjs-progress",
!1 === this._options.showProgress && (t.style.display = "none");
var e = L("div", {
className: "introjs-progressbar"
});
return this._options.progressBarAdditionalClass && (e.className += " " + this._options.progressBarAdditionalClass),
e.setAttribute("role", "progress"),
e.setAttribute("aria-valuemin", "0"),
e.setAttribute("aria-valuemax", "100"),
e.setAttribute("aria-valuenow", I.call(this)),
e.style.cssText = "width:".concat(I.call(this), "%;"),
t.appendChild(e),
t
}
function R(t) {
t.querySelector(".introjs-progress .introjs-progressbar").style.cssText = "width:".concat(I.call(this), "%;"),
t.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow", I.call(this))
}
function M(t) {
return F.apply(this, arguments)
}
function F() {
return (F = r(t().mark((function e(n) {
var i, o, a, s, l, c, u, h, f, b, g, w, _, C, S, j, A, I, O, M, F, D, G, V, z, Y = this;
return t().wrap((function(e) {
for (; ; )
switch (e.prev = e.next) {
case 0:
if (void 0 === this._introChangeCallback) {
e.next = 3;
break
}
return e.next = 3,
this._introChangeCallback.call(this, n.element);
case 3:
if (i = this,
o = document.querySelector(".introjs-helperLayer"),
a = document.querySelector(".introjs-tooltipReferenceLayer"),
s = "introjs-helperLayer",
"string" == typeof n.highlightClass && (s += " ".concat(n.highlightClass)),
"string" == typeof this._options.highlightClass && (s += " ".concat(this._options.highlightClass)),
null !== o && null !== a ? (h = a.querySelector(".introjs-helperNumberLayer"),
f = a.querySelector(".introjs-tooltiptext"),
b = a.querySelector(".introjs-tooltip-title"),
g = a.querySelector(".introjs-arrow"),
w = a.querySelector(".introjs-tooltip"),
u = a.querySelector(".introjs-skipbutton"),
c = a.querySelector(".introjs-prevbutton"),
l = a.querySelector(".introjs-nextbutton"),
o.className = s,
w.style.opacity = "0",
w.style.display = "none",
m.call(i, n.element),
k.call(i, o),
k.call(i, a),
N(),
i._lastShowElementTimer && window.clearTimeout(i._lastShowElementTimer),
i._lastShowElementTimer = window.setTimeout((function() {
null !== h && (h.innerHTML = "".concat(n.step, " ").concat(Y._options.stepNumbersOfLabel, " ").concat(Y._introItems.length)),
f.innerHTML = n.intro,
b.innerHTML = n.title,
w.style.display = "block",
E.call(i, n.element, w, g),
B.call(i, a, n),
R.call(i, a),
w.style.opacity = "1",
(null != l && /introjs-donebutton/gi.test(l.className) || null != l) && l.focus(),
v.call(i, n.scrollTo, n.element, f)
}
), 350)) : (_ = L("div", {
className: s
}),
C = L("div", {
className: "introjs-tooltipReferenceLayer"
}),
S = L("div", {
className: "introjs-arrow"
}),
j = L("div", {
className: "introjs-tooltip"
}),
A = L("div", {
className: "introjs-tooltiptext"
}),
I = L("div", {
className: "introjs-tooltip-header"
}),
O = L("h1", {
className: "introjs-tooltip-title"
}),
M = L("div"),
x(_, {
"box-shadow": "0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(i._options.overlayOpacity.toString(), ") 0 0 0 5000px")
}),
m.call(i, n.element),
k.call(i, _),
k.call(i, C),
T(this._targetElement, _, !0),
T(this._targetElement, C),
A.innerHTML = n.intro,
O.innerHTML = n.title,
M.className = "introjs-tooltipbuttons",
!1 === this._options.showButtons && (M.style.display = "none"),
I.appendChild(O),
j.appendChild(I),
j.appendChild(A),
this._options.dontShowAgain && (F = L("div", {
className: "introjs-dontShowAgain"
}),
(D = L("input", {
type: "checkbox",
id: "introjs-dontShowAgain",
name: "introjs-dontShowAgain"
})).onchange = function(t) {
Y.setDontShowAgain(t.target.checked)
}
,
(G = L("label", {
htmlFor: "introjs-dontShowAgain"
})).innerText = this._options.dontShowAgainLabel,
F.appendChild(D),
F.appendChild(G),
j.appendChild(F)),
j.appendChild(q.call(this, n)),
j.appendChild(H.call(this)),
V = L("div"),
!0 === this._options.showStepNumbers && (V.className = "introjs-helperNumberLayer",
V.innerHTML = "".concat(n.step, " ").concat(this._options.stepNumbersOfLabel, " ").concat(this._introItems.length),
j.appendChild(V)),
j.appendChild(S),
C.appendChild(j),
(l = L("a")).onclick = r(t().mark((function e() {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (i._introItems.length - 1 === i._currentStep) {
t.next = 5;
break
}
return t.next = 3,
W.call(i);
case 3:
t.next = 11;
break;
case 5:
if (!/introjs-donebutton/gi.test(l.className)) {
t.next = 11;
break
}
if ("function" != typeof i._introCompleteCallback) {
t.next = 9;
break
}
return t.next = 9,
i._introCompleteCallback.call(i, i._currentStep, "done");
case 9:
return t.next = 11,
xt.call(i, i._targetElement);
case 11:
case "end":
return t.stop()
}
}
), e)
}
))),
y(l),
l.innerHTML = this._options.nextLabel,
(c = L("a")).onclick = r(t().mark((function e() {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (0 === i._currentStep) {
t.next = 3;
break
}
return t.next = 3,
$.call(i);
case 3:
case "end":
return t.stop()
}
}
), e)
}
))),
y(c),
c.innerHTML = this._options.prevLabel,
y(u = L("a", {
className: "introjs-skipbutton"
})),
u.innerHTML = this._options.skipLabel,
u.onclick = r(t().mark((function e() {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (i._introItems.length - 1 !== i._currentStep || "function" != typeof i._introCompleteCallback) {
t.next = 3;
break
}
return t.next = 3,
i._introCompleteCallback.call(i, i._currentStep, "skip");
case 3:
if ("function" != typeof i._introSkipCallback) {
t.next = 6;
break
}
return t.next = 6,
i._introSkipCallback.call(i);
case 6:
return t.next = 8,
xt.call(i, i._targetElement);
case 8:
case "end":
return t.stop()
}
}
), e)
}
))),
I.appendChild(u),
this._introItems.length > 1 && M.appendChild(c),
M.appendChild(l),
j.appendChild(M),
E.call(i, n.element, j, S),
v.call(this, n.scrollTo, n.element, j)),
(z = i._targetElement.querySelector(".introjs-disableInteraction")) && z.parentNode.removeChild(z),
n.disableInteraction && P.call(i),
0 === this._currentStep && this._introItems.length > 1 ? (null != l && (l.className = "".concat(this._options.buttonClass, " introjs-nextbutton"),
l.innerHTML = this._options.nextLabel),
!0 === this._options.hidePrev ? (null != c && (c.className = "".concat(this._options.buttonClass, " introjs-prevbutton introjs-hidden")),
null != l && p(l, "introjs-fullbutton")) : null != c && (c.className = "".concat(this._options.buttonClass, " introjs-prevbutton introjs-disabled"))) : this._introItems.length - 1 === this._currentStep || 1 === this._introItems.length ? (null != c && (c.className = "".concat(this._options.buttonClass, " introjs-prevbutton")),
!0 === this._options.hideNext ? (null != l && (l.className = "".concat(this._options.buttonClass, " introjs-nextbutton introjs-hidden")),
null != c && p(c, "introjs-fullbutton")) : null != l && (!0 === this._options.nextToDone ? (l.innerHTML = this._options.doneLabel,
p(l, "".concat(this._options.buttonClass, " introjs-nextbutton introjs-donebutton"))) : l.className = "".concat(this._options.buttonClass, " introjs-nextbutton introjs-disabled"))) : (null != c && (c.className = "".concat(this._options.buttonClass, " introjs-prevbutton")),
null != l && (l.className = "".concat(this._options.buttonClass, " introjs-nextbutton"),
l.innerHTML = this._options.nextLabel)),
null != c && c.setAttribute("role", "button"),
null != l && l.setAttribute("role", "button"),
null != u && u.setAttribute("role", "button"),
null != l && l.focus(),
d(n.element),
void 0 === this._introAfterChangeCallback) {
e.next = 22;
break
}
return e.next = 22,
this._introAfterChangeCallback.call(this, n.element);
case 22:
case "end":
return e.stop()
}
}
), e, this)
}
)))).apply(this, arguments)
}
function D(t) {
return G.apply(this, arguments)
}
function G() {
return (G = r(t().mark((function e(n) {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (this._currentStep = n - 2,
void 0 === this._introItems) {
t.next = 4;
break
}
return t.next = 4,
W.call(this);
case 4:
case "end":
return t.stop()
}
}
), e, this)
}
)))).apply(this, arguments)
}
function V(t) {
return z.apply(this, arguments)
}
function z() {
return (z = r(t().mark((function e(n) {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (this._currentStepNumber = n,
void 0 === this._introItems) {
t.next = 4;
break
}
return t.next = 4,
W.call(this);
case 4:
case "end":
return t.stop()
}
}
), e, this)
}
)))).apply(this, arguments)
}
function W() {
return Y.apply(this, arguments)
}
function Y() {
return Y = r(t().mark((function e() {
var n, r, i = this;
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (this._direction = "forward",
void 0 !== this._currentStepNumber && u(this._introItems, (function(t, e) {
t.step === i._currentStepNumber && (i._currentStep = e - 1,
i._currentStepNumber = void 0)
}
)),
void 0 === this._currentStep ? this._currentStep = 0 : ++this._currentStep,
n = this._introItems[this._currentStep],
r = !0,
void 0 === this._introBeforeChangeCallback) {
t.next = 9;
break
}
return t.next = 8,
this._introBeforeChangeCallback.call(this, n && n.element);
case 8:
r = t.sent;
case 9:
if (!1 !== r) {
t.next = 12;
break
}
return --this._currentStep,
t.abrupt("return", !1);
case 12:
if (!(this._introItems.length <= this._currentStep)) {
t.next = 19;
break
}
if ("function" != typeof this._introCompleteCallback) {
t.next = 16;
break
}
return t.next = 16,
this._introCompleteCallback.call(this, this._currentStep, "end");
case 16:
return t.next = 18,
xt.call(this, this._targetElement);
case 18:
return t.abrupt("return", !1);
case 19:
return t.next = 21,
M.call(this, n);
case 21:
return t.abrupt("return", !0);
case 22:
case "end":
return t.stop()
}
}
), e, this)
}
))),
Y.apply(this, arguments)
}
function $() {
return Q.apply(this, arguments)
}
function Q() {
return Q = r(t().mark((function e() {
var n, r;
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (this._direction = "backward",
0 !== this._currentStep) {
t.next = 3;
break
}
return t.abrupt("return", !1);
case 3:
if (--this._currentStep,
n = this._introItems[this._currentStep],
r = !0,
void 0 === this._introBeforeChangeCallback) {
t.next = 10;
break
}
return t.next = 9,
this._introBeforeChangeCallback.call(this, n && n.element);
case 9:
r = t.sent;
case 10:
if (!1 !== r) {
t.next = 13;
break
}
return ++this._currentStep,
t.abrupt("return", !1);
case 13:
return t.next = 15,
M.call(this, n);
case 15:
return t.abrupt("return", !0);
case 16:
case "end":
return t.stop()
}
}
), e, this)
}
))),
Q.apply(this, arguments)
}
function U() {
return this._currentStep
}
function X(t) {
return J.apply(this, arguments)
}
function J() {
return (J = r(t().mark((function e(n) {
var r, i;
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (null === (r = void 0 === n.code ? n.which : n.code) && (r = null === n.charCode ? n.keyCode : n.charCode),
"Escape" !== r && 27 !== r || !0 !== this._options.exitOnEsc) {
t.next = 7;
break
}
return t.next = 5,
xt.call(this, this._targetElement);
case 5:
t.next = 39;
break;
case 7:
if ("ArrowLeft" !== r && 37 !== r) {
t.next = 12;
break
}
return t.next = 10,
$.call(this);
case 10:
t.next = 39;
break;
case 12:
if ("ArrowRight" !== r && 39 !== r) {
t.next = 17;
break
}
return t.next = 15,
W.call(this);
case 15:
t.next = 39;
break;
case 17:
if ("Enter" !== r && "NumpadEnter" !== r && 13 !== r) {
t.next = 39;
break
}
if (!(i = n.target || n.srcElement) || !i.className.match("introjs-prevbutton")) {
t.next = 24;
break
}
return t.next = 22,
$.call(this);
case 22:
t.next = 38;
break;
case 24:
if (!i || !i.className.match("introjs-skipbutton")) {
t.next = 32;
break
}
if (this._introItems.length - 1 !== this._currentStep || "function" != typeof this._introCompleteCallback) {
t.next = 28;
break
}
return t.next = 28,
this._introCompleteCallback.call(this, this._currentStep, "skip");
case 28:
return t.next = 30,
xt.call(this, this._targetElement);
case 30:
t.next = 38;
break;
case 32:
if (!i || !i.getAttribute("data-step-number")) {
t.next = 36;
break
}
i.click(),
t.next = 38;
break;
case 36:
return t.next = 38,
W.call(this);
case 38:
n.preventDefault ? n.preventDefault() : n.returnValue = !1;
case 39:
case "end":
return t.stop()
}
}
), e, this)
}
)))).apply(this, arguments)
}
function Z(t) {
if (null === t || "object" !== e(t) || "nodeType"in t)
return t;
var n = {};
for (var r in t)
"jQuery"in window && t[r]instanceof window.jQuery ? n[r] = t[r] : n[r] = Z(t[r]);
return n
}
function K(t, e) {
var n, r = this;
return function() {
for (var i = arguments.length, o = new Array(i), a = 0; a < i; a++)
o[a] = arguments[a];
clearTimeout(n),
n = setTimeout((function() {
t.apply(r, o)
}
), e)
}
}
function tt(t) {
var e = document.querySelector(".introjs-hints");
return e ? Array.from(e.querySelectorAll(t)) : []
}
function et(t) {
return nt.apply(this, arguments)
}
function nt() {
return (nt = r(t().mark((function e(n) {
var r;
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (r = tt('.introjs-hint[data-step="'.concat(n, '"]'))[0],
dt.call(this),
r && p(r, "introjs-hidehint"),
void 0 === this._hintCloseCallback) {
t.next = 6;
break
}
return t.next = 6,
this._hintCloseCallback.call(this, n);
case 6:
case "end":
return t.stop()
}
}
), e, this)
}
)))).apply(this, arguments)
}
function rt() {
var e = this;
u(tt(".introjs-hint"), function() {
var n = r(t().mark((function n(r) {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
et.call(e, r.getAttribute("data-step"));
case 2:
case "end":
return t.stop()
}
}
), n)
}
)));
return function(t) {
return n.apply(this, arguments)
}
}())
}
function it() {
return ot.apply(this, arguments)
}
function ot() {
return (ot = r(t().mark((function e() {
var n, r = this;
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (!(n = tt(".introjs-hint")) || !n.length) {
t.next = 5;
break
}
u(n, (function(t) {
at.call(r, t.getAttribute("data-step"))
}
)),
t.next = 7;
break;
case 5:
return t.next = 7,
mt.call(this, this._targetElement);
case 7:
case "end":
return t.stop()
}
}
), e, this)
}
)))).apply(this, arguments)
}
function at(t) {
var e = tt('.introjs-hint[data-step="'.concat(t, '"]'))[0];
e && _(e, /introjs-hidehint/g)
}
function st() {
var t = this;
u(tt(".introjs-hint"), (function(e) {
lt.call(t, e.getAttribute("data-step"))
}
)),
h.off(document, "click", dt, this, !1),
h.off(window, "resize", vt, this, !0),
this._hintsAutoRefreshFunction && h.off(window, "scroll", this._hintsAutoRefreshFunction, this, !0)
}
function lt(t) {
var e = tt('.introjs-hint[data-step="'.concat(t, '"]'))[0];
e && e.parentNode.removeChild(e)
}
function ct() {
return ut.apply(this, arguments)
}
function ut() {
return (ut = r(t().mark((function e() {
var n, r, i, o = this;
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (n = this,
null === (r = document.querySelector(".introjs-hints")) && (r = L("div", {
className: "introjs-hints"
})),
i = function(t) {
return function(e) {
var r = e || window.event;
r.stopPropagation && r.stopPropagation(),
null !== r.cancelBubble && (r.cancelBubble = !0),
pt.call(n, t)
}
}
,
u(this._introItems, (function(t, e) {
if (!document.querySelector('.introjs-hint[data-step="'.concat(e, '"]'))) {
var n = L("a", {
className: "introjs-hint"
});
y(n),
n.onclick = i(e),
t.hintAnimation || p(n, "introjs-hint-no-anim"),
g(t.element) && p(n, "introjs-fixedhint");
var a = L("div", {
className: "introjs-hint-dot"
})
, s = L("div", {
className: "introjs-hint-pulse"
});
n.appendChild(a),
n.appendChild(s),
n.setAttribute("data-step", e.toString());
var l = t.element;
t.element = n,
ht.call(o, t.hintPosition, n, l),
r.appendChild(n)
}
}
)),
document.body.appendChild(r),
void 0 === this._hintsAddedCallback) {
t.next = 9;
break
}
return t.next = 9,
this._hintsAddedCallback.call(this);
case 9:
this._options.hintAutoRefreshInterval >= 0 && (this._hintsAutoRefreshFunction = K((function() {
return vt.call(o)
}
), this._options.hintAutoRefreshInterval),
h.on(window, "scroll", this._hintsAutoRefreshFunction, this, !0));
case 10:
case "end":
return t.stop()
}
}
), e, this)
}
)))).apply(this, arguments)
}
function ht(t, e, n) {
var r = w.call(this, n)
, i = 20
, o = 20;
switch (t) {
default:
case "top-left":
e.style.left = "".concat(r.left, "px"),
e.style.top = "".concat(r.top, "px");
break;
case "top-right":
e.style.left = "".concat(r.left + r.width - i, "px"),
e.style.top = "".concat(r.top, "px");
break;
case "bottom-left":
e.style.left = "".concat(r.left, "px"),
e.style.top = "".concat(r.top + r.height - o, "px");
break;
case "bottom-right":
e.style.left = "".concat(r.left + r.width - i, "px"),
e.style.top = "".concat(r.top + r.height - o, "px");
break;
case "middle-left":
e.style.left = "".concat(r.left, "px"),
e.style.top = "".concat(r.top + (r.height - o) / 2, "px");
break;
case "middle-right":
e.style.left = "".concat(r.left + r.width - i, "px"),
e.style.top = "".concat(r.top + (r.height - o) / 2, "px");
break;
case "middle-middle":
e.style.left = "".concat(r.left + (r.width - i) / 2, "px"),
e.style.top = "".concat(r.top + (r.height - o) / 2, "px");
break;
case "bottom-middle":
e.style.left = "".concat(r.left + (r.width - i) / 2, "px"),
e.style.top = "".concat(r.top + r.height - o, "px");
break;
case "top-middle":
e.style.left = "".concat(r.left + (r.width - i) / 2, "px"),
e.style.top = "".concat(r.top, "px")
}
}
function pt(t) {
return ft.apply(this, arguments)
}
function ft() {
return (ft = r(t().mark((function e(n) {
var r, i, o, a, s, l, c, u, h;
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (r = document.querySelector('.introjs-hint[data-step="'.concat(n, '"]')),
i = this._introItems[n],
void 0 === this._hintClickCallback) {
t.next = 5;
break
}
return t.next = 5,
this._hintClickCallback.call(this, r, i, n);
case 5:
if (o = dt.call(this),
parseInt(o, 10) !== n) {
t.next = 8;
break
}
return t.abrupt("return");
case 8:
a = L("div", {
className: "introjs-tooltip"
}),
s = L("div"),
l = L("div"),
c = L("div"),
a.onclick = function(t) {
t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0
}
,
s.className = "introjs-tooltiptext",
(u = L("p")).innerHTML = i.hint,
s.appendChild(u),
this._options.hintShowButton && ((h = L("a")).className = this._options.buttonClass,
h.setAttribute("role", "button"),
h.innerHTML = this._options.hintButtonLabel,
h.onclick = et.bind(this, n),
s.appendChild(h)),
l.className = "introjs-arrow",
a.appendChild(l),
a.appendChild(s),
this._currentStep = r.getAttribute("data-step"),
c.className = "introjs-tooltipReferenceLayer introjs-hintReference",
c.setAttribute("data-step", r.getAttribute("data-step")),
k.call(this, c),
c.appendChild(a),
document.body.appendChild(c),
E.call(this, r, a, l, !0);
case 28:
case "end":
return t.stop()
}
}
), e, this)
}
)))).apply(this, arguments)
}
function dt() {
var t = document.querySelector(".introjs-hintReference");
if (t) {
var e = t.getAttribute("data-step");
return t.parentNode.removeChild(t),
e
}
}
function mt(t) {
return bt.apply(this, arguments)
}
function bt() {
return (bt = r(t().mark((function e(n) {
var r, i = this;
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (this._introItems = [],
!this._options.hints) {
t.next = 5;
break
}
u(this._options.hints, (function(t) {
var e = Z(t);
"string" == typeof e.element && (e.element = document.querySelector(e.element)),
e.hintPosition = e.hintPosition || i._options.hintPosition,
e.hintAnimation = e.hintAnimation || i._options.hintAnimation,
null !== e.element && i._introItems.push(e)
}
)),
t.next = 9;
break;
case 5:
if ((r = Array.from(n.querySelectorAll("*[data-hint]"))) && r.length) {
t.next = 8;
break
}
return t.abrupt("return", !1);
case 8:
u(r, (function(t) {
var e = t.getAttribute("data-hint-animation");
e = e ? "true" === e : i._options.hintAnimation,
i._introItems.push({
element: t,
hint: t.getAttribute("data-hint"),
hintPosition: t.getAttribute("data-hint-position") || i._options.hintPosition,
hintAnimation: e,
tooltipClass: t.getAttribute("data-tooltip-class"),
position: t.getAttribute("data-position") || i._options.tooltipPosition
})
}
));
case 9:
return t.next = 11,
ct.call(this);
case 11:
return h.on(document, "click", dt, this, !1),
h.on(window, "resize", vt, this, !0),
t.abrupt("return", !0);
case 14:
case "end":
return t.stop()
}
}
), e, this)
}
)))).apply(this, arguments)
}
function vt() {
var t = this;
u(this._introItems, (function(e) {
var n = e.targetElement
, r = e.hintPosition
, i = e.element;
void 0 !== n && ht.call(t, r, i, n)
}
))
}
function yt(t) {
var e = this
, n = Array.from(t.querySelectorAll("*[data-intro]"))
, r = [];
if (this._options.steps)
u(this._options.steps, (function(t) {
var n = Z(t);
if (n.step = r.length + 1,
n.title = n.title || "",
"string" == typeof n.element && (n.element = document.querySelector(n.element)),
void 0 === n.element || null === n.element) {
var i = document.querySelector(".introjsFloatingElement");
null === i && (i = L("div", {
className: "introjsFloatingElement"
}),
document.body.appendChild(i)),
n.element = i,
n.position = "floating"
}
n.position = n.position || e._options.tooltipPosition,
n.scrollTo = n.scrollTo || e._options.scrollTo,
void 0 === n.disableInteraction && (n.disableInteraction = e._options.disableInteraction),
null !== n.element && r.push(n)
}
));
else {
var i;
if (n.length < 1)
return [];
u(n, (function(t) {
if ((!e._options.group || t.getAttribute("data-intro-group") === e._options.group) && "none" !== t.style.display) {
var n = parseInt(t.getAttribute("data-step"), 10);
i = t.hasAttribute("data-disable-interaction") ? !!t.getAttribute("data-disable-interaction") : e._options.disableInteraction,
n > 0 && (r[n - 1] = {
element: t,
title: t.getAttribute("data-title") || "",
intro: t.getAttribute("data-intro"),
step: parseInt(t.getAttribute("data-step"), 10),
tooltipClass: t.getAttribute("data-tooltip-class"),
highlightClass: t.getAttribute("data-highlight-class"),
position: t.getAttribute("data-position") || e._options.tooltipPosition,
scrollTo: t.getAttribute("data-scroll-to") || e._options.scrollTo,
disableInteraction: i
})
}
}
));
var o = 0;
u(n, (function(t) {
if ((!e._options.group || t.getAttribute("data-intro-group") === e._options.group) && null === t.getAttribute("data-step")) {
for (; void 0 !== r[o]; )
o++;
i = t.hasAttribute("data-disable-interaction") ? !!t.getAttribute("data-disable-interaction") : e._options.disableInteraction,
r[o] = {
element: t,
title: t.getAttribute("data-title") || "",
intro: t.getAttribute("data-intro"),
step: o + 1,
tooltipClass: t.getAttribute("data-tooltip-class"),
highlightClass: t.getAttribute("data-highlight-class"),
position: t.getAttribute("data-position") || e._options.tooltipPosition,
scrollTo: t.getAttribute("data-scroll-to") || e._options.scrollTo,
disableInteraction: i
}
}
}
))
}
for (var a = [], s = 0; s < r.length; s++)
r[s] && a.push(r[s]);
return (r = a).sort((function(t, e) {
return t.step - e.step
}
)),
r
}
function gt(t) {
var e = document.querySelector(".introjs-tooltipReferenceLayer")
, n = document.querySelector(".introjs-helperLayer")
, r = document.querySelector(".introjs-disableInteraction");
if (k.call(this, n),
k.call(this, e),
k.call(this, r),
t && (this._introItems = yt.call(this, this._targetElement),
O.call(this, this._introItems[this._currentStep]),
R.call(this, e)),
void 0 !== this._currentStep && null !== this._currentStep) {
var i = document.querySelector(".introjs-arrow")
, o = document.querySelector(".introjs-tooltip");
o && i && E.call(this, this._introItems[this._currentStep].element, o, i)
}
return vt.call(this),
this
}
function wt() {
gt.call(this)
}
function _t(t) {
var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
if (t && t.parentElement) {
var n = t.parentElement;
e ? (x(t, {
opacity: "0"
}),
window.setTimeout((function() {
try {
n.removeChild(t)
} catch (t) {}
}
), 500)) : n.removeChild(t)
}
}
function xt(t, e) {
return kt.apply(this, arguments)
}
function kt() {
return (kt = r(t().mark((function e(n, r) {
var i, o;
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (i = !0,
void 0 === this._introBeforeExitCallback) {
t.next = 5;
break
}
return t.next = 4,
this._introBeforeExitCallback.call(this);
case 4:
i = t.sent;
case 5:
if (r || !1 !== i) {
t.next = 7;
break
}
return t.abrupt("return");
case 7:
if ((o = Array.from(n.querySelectorAll(".introjs-overlay"))) && o.length && u(o, (function(t) {
return _t(t)
}
)),
_t(n.querySelector(".introjs-helperLayer"), !0),
_t(n.querySelector(".introjs-tooltipReferenceLayer")),
_t(n.querySelector(".introjs-disableInteraction")),
_t(document.querySelector(".introjsFloatingElement")),
N(),
h.off(window, "keydown", X, this, !0),
h.off(window, "resize", wt, this, !0),
void 0 === this._introExitCallback) {
t.next = 23;
break
}
return t.next = 23,
this._introExitCallback.call(this);
case 23:
this._currentStep = void 0;
case 24:
case "end":
return t.stop()
}
}
), e, this)
}
)))).apply(this, arguments)
}
function Ct(e) {
var n = this
, i = L("div", {
className: "introjs-overlay"
});
return x(i, {
top: 0,
bottom: 0,
left: 0,
right: 0,
position: "fixed"
}),
e.appendChild(i),
!0 === this._options.exitOnOverlayClick && (x(i, {
cursor: "pointer"
}),
i.onclick = r(t().mark((function r() {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
xt.call(n, e);
case 2:
case "end":
return t.stop()
}
}
), r)
}
)))),
!0
}
function St(t) {
return jt.apply(this, arguments)
}
function jt() {
return (jt = r(t().mark((function e(n) {
var r;
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
if (this.isActive()) {
t.next = 2;
break
}
return t.abrupt("return", !1);
case 2:
if (void 0 === this._introStartCallback) {
t.next = 5;
break
}
return t.next = 5,
this._introStartCallback.call(this, n);
case 5:
if (0 !== (r = yt.call(this, n)).length) {
t.next = 8;
break
}
return t.abrupt("return", !1);
case 8:
if (this._introItems = r,
!Ct.call(this, n)) {
t.next = 14;
break
}
return t.next = 12,
W.call(this);
case 12:
this._options.keyboardNavigation && h.on(window, "keydown", X, this, !0),
h.on(window, "resize", wt, this, !0);
case 14:
return t.abrupt("return", !1);
case 15:
case "end":
return t.stop()
}
}
), e, this)
}
)))).apply(this, arguments)
}
function At(t, e, n) {
var r, i = (o(r = {}, t, e),
o(r, "path", "/"),
o(r, "expires", void 0),
r);
if (n) {
var a = new Date;
a.setTime(a.getTime() + 24 * n * 60 * 60 * 1e3),
i.expires = a.toUTCString()
}
var s = [];
for (var l in i)
s.push("".concat(l, "=").concat(i[l]));
return document.cookie = s.join("; "),
Et(t)
}
function Et(t) {
return (e = {},
document.cookie.split(";").forEach((function(t) {
var n = a(t.split("="), 2)
, r = n[0]
, i = n[1];
e[r.trim()] = i
}
)),
e)[t];
var e
}
var Nt = "true";
function Lt(t) {
t ? At(this._options.dontShowAgainCookie, Nt, this._options.dontShowAgainCookieDays) : At(this._options.dontShowAgainCookie, "", -1)
}
function Tt() {
var t = Et(this._options.dontShowAgainCookie);
return t && t === Nt
}
var It = function() {
function e(t) {
!function(t, e) {
if (!(t instanceof e))
throw new TypeError("Cannot call a class as a function")
}(this, e),
o(this, "_targetElement", void 0),
o(this, "_introItems", []),
o(this, "_options", void 0),
o(this, "_introBeforeChangeCallback", void 0),
o(this, "_introChangeCallback", void 0),
o(this, "_introAfterChangeCallback", void 0),
o(this, "_introCompleteCallback", void 0),
o(this, "_hintsAddedCallback", void 0),
o(this, "_hintClickCallback", void 0),
o(this, "_hintCloseCallback", void 0),
o(this, "_introStartCallback", void 0),
o(this, "_introExitCallback", void 0),
o(this, "_introSkipCallback", void 0),
o(this, "_introBeforeExitCallback", void 0),
this._targetElement = t,
this._options = {
isActive: !0,
nextLabel: "Next",
prevLabel: "Back",
skipLabel: "×",
doneLabel: "Done",
hidePrev: !1,
hideNext: !1,
nextToDone: !0,
tooltipPosition: "bottom",
tooltipClass: "",
group: "",
highlightClass: "",
exitOnEsc: !0,
exitOnOverlayClick: !0,
showStepNumbers: !1,
stepNumbersOfLabel: "of",
keyboardNavigation: !0,
showButtons: !0,
showBullets: !0,
showProgress: !1,
scrollToElement: !0,
scrollTo: "element",
scrollPadding: 30,
overlayOpacity: .5,
autoPosition: !0,
positionPrecedence: ["bottom", "top", "right", "left"],
disableInteraction: !1,
dontShowAgain: !1,
dontShowAgainLabel: "Don't show this again",
dontShowAgainCookie: "introjs-dontShowAgain",
dontShowAgainCookieDays: 365,
helperElementPadding: 10,
hintPosition: "top-middle",
hintButtonLabel: "Got it",
hintShowButton: !0,
hintAutoRefreshInterval: 10,
hintAnimation: !0,
buttonClass: "introjs-button",
progressBarAdditionalClass: !1
}
}
var n, a, s, l, c, u, h, p, f, d, m, b, v;
return n = e,
a = [{
key: "isActive",
value: function() {
return (!this._options.dontShowAgain || !Tt.call(this)) && this._options.isActive
}
}, {
key: "clone",
value: function() {
return new e(this._targetElement)
}
}, {
key: "setOption",
value: function(t, e) {
return this._options[t] = e,
this
}
}, {
key: "setOptions",
value: function(t) {
return this._options = function(t, e) {
var n, r = {};
for (n in t)
r[n] = t[n];
for (n in e)
r[n] = e[n];
return r
}(this._options, t),
this
}
}, {
key: "start",
value: (v = r(t().mark((function e() {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
St.call(this, this._targetElement);
case 2:
return t.abrupt("return", this);
case 3:
case "end":
return t.stop()
}
}
), e, this)
}
))),
function() {
return v.apply(this, arguments)
}
)
}, {
key: "goToStep",
value: (b = r(t().mark((function e(n) {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
D.call(this, n);
case 2:
return t.abrupt("return", this);
case 3:
case "end":
return t.stop()
}
}
), e, this)
}
))),
function(t) {
return b.apply(this, arguments)
}
)
}, {
key: "addStep",
value: function(t) {
return this._options.steps || (this._options.steps = []),
this._options.steps.push(t),
this
}
}, {
key: "addSteps",
value: function(t) {
if (!t.length)
return this;
for (var e = 0; e < t.length; e++)
this.addStep(t[e]);
return this
}
}, {
key: "goToStepNumber",
value: (m = r(t().mark((function e(n) {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
V.call(this, n);
case 2:
return t.abrupt("return", this);
case 3:
case "end":
return t.stop()
}
}
), e, this)
}
))),
function(t) {
return m.apply(this, arguments)
}
)
}, {
key: "nextStep",
value: (d = r(t().mark((function e() {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
W.call(this);
case 2:
return t.abrupt("return", this);
case 3:
case "end":
return t.stop()
}
}
), e, this)
}
))),
function() {
return d.apply(this, arguments)
}
)
}, {
key: "previousStep",
value: (f = r(t().mark((function e() {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
$.call(this);
case 2:
return t.abrupt("return", this);
case 3:
case "end":
return t.stop()
}
}
), e, this)
}
))),
function() {
return f.apply(this, arguments)
}
)
}, {
key: "currentStep",
value: function() {
return U.call(this)
}
}, {
key: "exit",
value: (p = r(t().mark((function e(n) {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
xt.call(this, this._targetElement, n);
case 2:
return t.abrupt("return", this);
case 3:
case "end":
return t.stop()
}
}
), e, this)
}
))),
function(t) {
return p.apply(this, arguments)
}
)
}, {
key: "refresh",
value: function(t) {
return gt.call(this, t),
this
}
}, {
key: "setDontShowAgain",
value: function(t) {
return Lt.call(this, t),
this
}
}, {
key: "onbeforechange",
value: function(t) {
if ("function" != typeof t)
throw new Error("Provided callback for onbeforechange was not a function");
return this._introBeforeChangeCallback = t,
this
}
}, {
key: "onchange",
value: function(t) {
if ("function" != typeof t)
throw new Error("Provided callback for onchange was not a function.");
return this._introChangeCallback = t,
this
}
}, {
key: "onafterchange",
value: function(t) {
if ("function" != typeof t)
throw new Error("Provided callback for onafterchange was not a function");
return this._introAfterChangeCallback = t,
this
}
}, {
key: "oncomplete",
value: function(t) {
if ("function" != typeof t)
throw new Error("Provided callback for oncomplete was not a function.");
return this._introCompleteCallback = t,
this
}
}, {
key: "onhintsadded",
value: function(t) {
if ("function" != typeof t)
throw new Error("Provided callback for onhintsadded was not a function.");
return this._hintsAddedCallback = t,
this
}
}, {
key: "onhintclick",
value: function(t) {
if ("function" != typeof t)
throw new Error("Provided callback for onhintclick was not a function.");
return this._hintClickCallback = t,
this
}
}, {
key: "onhintclose",
value: function(t) {
if ("function" != typeof t)
throw new Error("Provided callback for onhintclose was not a function.");
return this._hintCloseCallback = t,
this
}
}, {
key: "onstart",
value: function(t) {
if ("function" != typeof t)
throw new Error("Provided callback for onstart was not a function.");
return this._introStartCallback = t,
this
}
}, {
key: "onexit",
value: function(t) {
if ("function" != typeof t)
throw new Error("Provided callback for onexit was not a function.");
return this._introExitCallback = t,
this
}
}, {
key: "onskip",
value: function(t) {
if ("function" != typeof t)
throw new Error("Provided callback for onskip was not a function.");
return this._introSkipCallback = t,
this
}
}, {
key: "onbeforeexit",
value: function(t) {
if ("function" != typeof t)
throw new Error("Provided callback for onbeforeexit was not a function.");
return this._introBeforeExitCallback = t,
this
}
}, {
key: "addHints",
value: function() {
var e = r(t().mark((function e() {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
mt.call(this, this._targetElement);
case 2:
return t.abrupt("return", this);
case 3:
case "end":
return t.stop()
}
}
), e, this)
}
)));
return function() {
return e.apply(this, arguments)
}
}()
}, {
key: "hideHint",
value: (h = r(t().mark((function e(n) {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
et.call(this, n);
case 2:
return t.abrupt("return", this);
case 3:
case "end":
return t.stop()
}
}
), e, this)
}
))),
function(t) {
return h.apply(this, arguments)
}
)
}, {
key: "hideHints",
value: (u = r(t().mark((function e() {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
rt.call(this);
case 2:
return t.abrupt("return", this);
case 3:
case "end":
return t.stop()
}
}
), e, this)
}
))),
function() {
return u.apply(this, arguments)
}
)
}, {
key: "showHint",
value: function(t) {
return at.call(this, t),
this
}
}, {
key: "showHints",
value: (c = r(t().mark((function e() {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
it.call(this);
case 2:
return t.abrupt("return", this);
case 3:
case "end":
return t.stop()
}
}
), e, this)
}
))),
function() {
return c.apply(this, arguments)
}
)
}, {
key: "removeHints",
value: function() {
return st.call(this),
this
}
}, {
key: "removeHint",
value: function(t) {
return lt.call(this, t),
this
}
}, {
key: "showHintDialog",
value: (l = r(t().mark((function e(n) {
return t().wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
pt.call(this, n);
case 2:
return t.abrupt("return", this);
case 3:
case "end":
return t.stop()
}
}
), e, this)
}
))),
function(t) {
return l.apply(this, arguments)
}
)
}],
a && i(n.prototype, a),
s && i(n, s),
Object.defineProperty(n, "prototype", {
writable: !1
}),
e
}()
, Pt = function t(n) {
var r;
if ("object" === e(n))
r = new It(n);
else if ("string" == typeof n) {
var i = document.querySelector(n);
if (!i)
throw new Error("There is no element with given selector.");
r = new It(i)
} else
r = new It(document.body);
return t.instances[c(r, "introjs-instance")] = r,
r
};
return Pt.version = "7.0.1",
Pt.instances = {},
Pt
}
));
//# sourceMappingURL=intro.min.js.map;
/* decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */
!function(r) {
"use strict";
function e(r, e) {
var t, n, i, o, s, u, f, c, l = r.constructor, d = l.precision;
if (!r.s || !e.s)
return e.s || (e = new l(r)),
E ? h(e, d) : e;
if (f = r.d,
c = e.d,
s = r.e,
i = e.e,
f = f.slice(),
o = s - i) {
for (0 > o ? (n = f,
o = -o,
u = c.length) : (n = c,
i = s,
u = f.length),
s = Math.ceil(d / y),
u = s > u ? s + 1 : u + 1,
o > u && (o = u,
n.length = 1),
n.reverse(); o--; )
n.push(0);
n.reverse()
}
for (u = f.length,
o = c.length,
0 > u - o && (o = u,
n = c,
c = f,
f = n),
t = 0; o; )
t = (f[--o] = f[o] + c[o] + t) / q | 0,
f[o] %= q;
for (t && (f.unshift(t),
++i),
u = f.length; 0 == f[--u]; )
f.pop();
return e.d = f,
e.e = i,
E ? h(e, d) : e
}
function t(r, e, t) {
if (r !== ~~r || e > r || r > t)
throw Error(x + r)
}
function n(r) {
var e, t, n, i = r.length - 1, o = "", s = r[0];
if (i > 0) {
for (o += s,
e = 1; i > e; e++)
n = r[e] + "",
t = y - n.length,
t && (o += u(t)),
o += n;
s = r[e],
n = s + "",
t = y - n.length,
t && (o += u(t))
} else if (0 === s)
return "0";
for (; s % 10 === 0; )
s /= 10;
return o + s
}
function i(r, e) {
var t, i, s, u, f, c, l = 0, d = 0, a = r.constructor, g = a.precision;
if (o(r) > 16)
throw Error(O + o(r));
if (!r.s)
return new a(v);
for (null == e ? (E = !1,
c = g) : c = e,
f = new a(.03125); r.abs().gte(.1); )
r = r.times(f),
d += 5;
for (i = Math.log(L(2, d)) / Math.LN10 * 2 + 5 | 0,
c += i,
t = s = u = new a(v),
a.precision = c; ; ) {
if (s = h(s.times(r), c),
t = t.times(++l),
f = u.plus(P(s, t, c)),
n(f.d).slice(0, c) === n(u.d).slice(0, c)) {
for (; d--; )
u = h(u.times(u), c);
return a.precision = g,
null == e ? (E = !0,
h(u, g)) : u
}
u = f
}
}
function o(r) {
for (var e = r.e * y, t = r.d[0]; t >= 10; t /= 10)
e++;
return e
}
function s(r, e, t) {
if (e > r.LN10.sd())
throw E = !0,
t && (r.precision = t),
Error(N + "LN10 precision limit exceeded");
return h(new r(r.LN10), e)
}
function u(r) {
for (var e = ""; r--; )
e += "0";
return e
}
function f(r, e) {
var t, i, u, c, l, d, a, g, p, w = 1, m = 10, x = r, O = x.d, b = x.constructor, L = b.precision;
if (x.s < 1)
throw Error(N + (x.s ? "NaN" : "-Infinity"));
if (x.eq(v))
return new b(0);
if (null == e ? (E = !1,
g = L) : g = e,
x.eq(10))
return null == e && (E = !0),
s(b, g);
if (g += m,
b.precision = g,
t = n(O),
i = t.charAt(0),
c = o(x),
!(Math.abs(c) < 15e14))
return a = s(b, g + 2, L).times(c + ""),
x = f(new b(i + "." + t.slice(1)), g - m).plus(a),
b.precision = L,
null == e ? (E = !0,
h(x, L)) : x;
for (; 7 > i && 1 != i || 1 == i && t.charAt(1) > 3; )
x = x.times(r),
t = n(x.d),
i = t.charAt(0),
w++;
for (c = o(x),
i > 1 ? (x = new b("0." + t),
c++) : x = new b(i + "." + t.slice(1)),
d = l = x = P(x.minus(v), x.plus(v), g),
p = h(x.times(x), g),
u = 3; ; ) {
if (l = h(l.times(p), g),
a = d.plus(P(l, new b(u), g)),
n(a.d).slice(0, g) === n(d.d).slice(0, g))
return d = d.times(2),
0 !== c && (d = d.plus(s(b, g + 2, L).times(c + ""))),
d = P(d, new b(w), g),
b.precision = L,
null == e ? (E = !0,
h(d, L)) : d;
d = a,
u += 2
}
}
function c(r, e) {
var t, n, i;
for ((t = e.indexOf(".")) > -1 && (e = e.replace(".", "")),
(n = e.search(/e/i)) > 0 ? (0 > t && (t = n),
t += +e.slice(n + 1),
e = e.substring(0, n)) : 0 > t && (t = e.length),
n = 0; 48 === e.charCodeAt(n); )
++n;
for (i = e.length; 48 === e.charCodeAt(i - 1); )
--i;
if (e = e.slice(n, i)) {
if (i -= n,
t = t - n - 1,
r.e = b(t / y),
r.d = [],
n = (t + 1) % y,
0 > t && (n += y),
i > n) {
for (n && r.d.push(+e.slice(0, n)),
i -= y; i > n; )
r.d.push(+e.slice(n, n += y));
e = e.slice(n),
n = y - e.length
} else
n -= i;
for (; n--; )
e += "0";
if (r.d.push(+e),
E && (r.e > _ || r.e < -_))
throw Error(O + t)
} else
r.s = 0,
r.e = 0,
r.d = [0];
return r
}
function h(r, e, t) {
var n, i, s, u, f, c, h, l, d = r.d;
for (u = 1,
s = d[0]; s >= 10; s /= 10)
u++;
if (n = e - u,
0 > n)
n += y,
i = e,
h = d[l = 0];
else {
if (l = Math.ceil((n + 1) / y),
s = d.length,
l >= s)
return r;
for (h = s = d[l],
u = 1; s >= 10; s /= 10)
u++;
n %= y,
i = n - y + u
}
if (void 0 !== t && (s = L(10, u - i - 1),
f = h / s % 10 | 0,
c = 0 > e || void 0 !== d[l + 1] || h % s,
c = 4 > t ? (f || c) && (0 == t || t == (r.s < 0 ? 3 : 2)) : f > 5 || 5 == f && (4 == t || c || 6 == t && (n > 0 ? i > 0 ? h / L(10, u - i) : 0 : d[l - 1]) % 10 & 1 || t == (r.s < 0 ? 8 : 7))),
1 > e || !d[0])
return c ? (s = o(r),
d.length = 1,
e = e - s - 1,
d[0] = L(10, (y - e % y) % y),
r.e = b(-e / y) || 0) : (d.length = 1,
d[0] = r.e = r.s = 0),
r;
if (0 == n ? (d.length = l,
s = 1,
l--) : (d.length = l + 1,
s = L(10, y - n),
d[l] = i > 0 ? (h / L(10, u - i) % L(10, i) | 0) * s : 0),
c)
for (; ; ) {
if (0 == l) {
(d[0] += s) == q && (d[0] = 1,
++r.e);
break
}
if (d[l] += s,
d[l] != q)
break;
d[l--] = 0,
s = 1
}
for (n = d.length; 0 === d[--n]; )
d.pop();
if (E && (r.e > _ || r.e < -_))
throw Error(O + o(r));
return r
}
function l(r, e) {
var t, n, i, o, s, u, f, c, l, d, a = r.constructor, g = a.precision;
if (!r.s || !e.s)
return e.s ? e.s = -e.s : e = new a(r),
E ? h(e, g) : e;
if (f = r.d,
d = e.d,
n = e.e,
c = r.e,
f = f.slice(),
s = c - n) {
for (l = 0 > s,
l ? (t = f,
s = -s,
u = d.length) : (t = d,
n = c,
u = f.length),
i = Math.max(Math.ceil(g / y), u) + 2,
s > i && (s = i,
t.length = 1),
t.reverse(),
i = s; i--; )
t.push(0);
t.reverse()
} else {
for (i = f.length,
u = d.length,
l = u > i,
l && (u = i),
i = 0; u > i; i++)
if (f[i] != d[i]) {
l = f[i] < d[i];
break
}
s = 0
}
for (l && (t = f,
f = d,
d = t,
e.s = -e.s),
u = f.length,
i = d.length - u; i > 0; --i)
f[u++] = 0;
for (i = d.length; i > s; ) {
if (f[--i] < d[i]) {
for (o = i; o && 0 === f[--o]; )
f[o] = q - 1;
--f[o],
f[i] += q
}
f[i] -= d[i]
}
for (; 0 === f[--u]; )
f.pop();
for (; 0 === f[0]; f.shift())
--n;
return f[0] ? (e.d = f,
e.e = n,
E ? h(e, g) : e) : new a(0)
}
function d(r, e, t) {
var i, s = o(r), f = n(r.d), c = f.length;
return e ? (t && (i = t - c) > 0 ? f = f.charAt(0) + "." + f.slice(1) + u(i) : c > 1 && (f = f.charAt(0) + "." + f.slice(1)),
f = f + (0 > s ? "e" : "e+") + s) : 0 > s ? (f = "0." + u(-s - 1) + f,
t && (i = t - c) > 0 && (f += u(i))) : s >= c ? (f += u(s + 1 - c),
t && (i = t - s - 1) > 0 && (f = f + "." + u(i))) : ((i = s + 1) < c && (f = f.slice(0, i) + "." + f.slice(i)),
t && (i = t - c) > 0 && (s + 1 === c && (f += "."),
f += u(i))),
r.s < 0 ? "-" + f : f
}
function a(r, e) {
return r.length > e ? (r.length = e,
!0) : void 0
}
function g(r) {
function e(r) {
var t = this;
if (!(t instanceof e))
return new e(r);
if (t.constructor = e,
r instanceof e)
return t.s = r.s,
t.e = r.e,
void (t.d = (r = r.d) ? r.slice() : r);
if ("number" == typeof r) {
if (0 * r !== 0)
throw Error(x + r);
if (r > 0)
t.s = 1;
else {
if (!(0 > r))
return t.s = 0,
t.e = 0,
void (t.d = [0]);
r = -r,
t.s = -1
}
return r === ~~r && 1e7 > r ? (t.e = 0,
void (t.d = [r])) : c(t, r.toString())
}
if ("string" != typeof r)
throw Error(x + r);
if (45 === r.charCodeAt(0) ? (r = r.slice(1),
t.s = -1) : t.s = 1,
!D.test(r))
throw Error(x + r);
c(t, r)
}
var t, n, i;
if (e.prototype = A,
e.ROUND_UP = 0,
e.ROUND_DOWN = 1,
e.ROUND_CEIL = 2,
e.ROUND_FLOOR = 3,
e.ROUND_HALF_UP = 4,
e.ROUND_HALF_DOWN = 5,
e.ROUND_HALF_EVEN = 6,
e.ROUND_HALF_CEIL = 7,
e.ROUND_HALF_FLOOR = 8,
e.clone = g,
e.config = e.set = p,
void 0 === r && (r = {}),
r)
for (i = ["precision", "rounding", "toExpNeg", "toExpPos", "LN10"],
t = 0; t < i.length; )
r.hasOwnProperty(n = i[t++]) || (r[n] = this[n]);
return e.config(r),
e
}
function p(r) {
if (!r || "object" != typeof r)
throw Error(N + "Object expected");
var e, t, n, i = ["precision", 1, w, "rounding", 0, 8, "toExpNeg", -1 / 0, 0, "toExpPos", 0, 1 / 0];
for (e = 0; e < i.length; e += 3)
if (void 0 !== (n = r[t = i[e]])) {
if (!(b(n) === n && n >= i[e + 1] && n <= i[e + 2]))
throw Error(x + t + ": " + n);
this[t] = n
}
if (void 0 !== (n = r[t = "LN10"])) {
if (n != Math.LN10)
throw Error(x + t + ": " + n);
this[t] = new this(n)
}
return this
}
var v, w = 1e9, m = {
precision: 20,
rounding: 4,
toExpNeg: -7,
toExpPos: 21,
LN10: "2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"
}, E = !0, N = "[DecimalError] ", x = N + "Invalid argument: ", O = N + "Exponent out of range: ", b = Math.floor, L = Math.pow, D = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, q = 1e7, y = 7, M = 9007199254740991, _ = b(M / y), A = {};
A.absoluteValue = A.abs = function() {
var r = new this.constructor(this);
return r.s && (r.s = 1),
r
}
,
A.comparedTo = A.cmp = function(r) {
var e, t, n, i, o = this;
if (r = new o.constructor(r),
o.s !== r.s)
return o.s || -r.s;
if (o.e !== r.e)
return o.e > r.e ^ o.s < 0 ? 1 : -1;
for (n = o.d.length,
i = r.d.length,
e = 0,
t = i > n ? n : i; t > e; ++e)
if (o.d[e] !== r.d[e])
return o.d[e] > r.d[e] ^ o.s < 0 ? 1 : -1;
return n === i ? 0 : n > i ^ o.s < 0 ? 1 : -1
}
,
A.decimalPlaces = A.dp = function() {
var r = this
, e = r.d.length - 1
, t = (e - r.e) * y;
if (e = r.d[e])
for (; e % 10 == 0; e /= 10)
t--;
return 0 > t ? 0 : t
}
,
A.dividedBy = A.div = function(r) {
return P(this, new this.constructor(r))
}
,
A.dividedToIntegerBy = A.idiv = function(r) {
var e = this
, t = e.constructor;
return h(P(e, new t(r), 0, 1), t.precision)
}
,
A.equals = A.eq = function(r) {
return !this.cmp(r)
}
,
A.exponent = function() {
return o(this)
}
,
A.greaterThan = A.gt = function(r) {
return this.cmp(r) > 0
}
,
A.greaterThanOrEqualTo = A.gte = function(r) {
return this.cmp(r) >= 0
}
,
A.isInteger = A.isint = function() {
return this.e > this.d.length - 2
}
,
A.isNegative = A.isneg = function() {
return this.s < 0
}
,
A.isPositive = A.ispos = function() {
return this.s > 0
}
,
A.isZero = function() {
return 0 === this.s
}
,
A.lessThan = A.lt = function(r) {
return this.cmp(r) < 0
}
,
A.lessThanOrEqualTo = A.lte = function(r) {
return this.cmp(r) < 1
}
,
A.logarithm = A.log = function(r) {
var e, t = this, n = t.constructor, i = n.precision, o = i + 5;
if (void 0 === r)
r = new n(10);
else if (r = new n(r),
r.s < 1 || r.eq(v))
throw Error(N + "NaN");
if (t.s < 1)
throw Error(N + (t.s ? "NaN" : "-Infinity"));
return t.eq(v) ? new n(0) : (E = !1,
e = P(f(t, o), f(r, o), o),
E = !0,
h(e, i))
}
,
A.minus = A.sub = function(r) {
var t = this;
return r = new t.constructor(r),
t.s == r.s ? l(t, r) : e(t, (r.s = -r.s,
r))
}
,
A.modulo = A.mod = function(r) {
var e, t = this, n = t.constructor, i = n.precision;
if (r = new n(r),
!r.s)
throw Error(N + "NaN");
return t.s ? (E = !1,
e = P(t, r, 0, 1).times(r),
E = !0,
t.minus(e)) : h(new n(t), i)
}
,
A.naturalExponential = A.exp = function() {
return i(this)
}
,
A.naturalLogarithm = A.ln = function() {
return f(this)
}
,
A.negated = A.neg = function() {
var r = new this.constructor(this);
return r.s = -r.s || 0,
r
}
,
A.plus = A.add = function(r) {
var t = this;
return r = new t.constructor(r),
t.s == r.s ? e(t, r) : l(t, (r.s = -r.s,
r))
}
,
A.precision = A.sd = function(r) {
var e, t, n, i = this;
if (void 0 !== r && r !== !!r && 1 !== r && 0 !== r)
throw Error(x + r);
if (e = o(i) + 1,
n = i.d.length - 1,
t = n * y + 1,
n = i.d[n]) {
for (; n % 10 == 0; n /= 10)
t--;
for (n = i.d[0]; n >= 10; n /= 10)
t++
}
return r && e > t ? e : t
}
,
A.squareRoot = A.sqrt = function() {
var r, e, t, i, s, u, f, c = this, l = c.constructor;
if (c.s < 1) {
if (!c.s)
return new l(0);
throw Error(N + "NaN")
}
for (r = o(c),
E = !1,
s = Math.sqrt(+c),
0 == s || s == 1 / 0 ? (e = n(c.d),
(e.length + r) % 2 == 0 && (e += "0"),
s = Math.sqrt(e),
r = b((r + 1) / 2) - (0 > r || r % 2),
s == 1 / 0 ? e = "5e" + r : (e = s.toExponential(),
e = e.slice(0, e.indexOf("e") + 1) + r),
i = new l(e)) : i = new l(s.toString()),
t = l.precision,
s = f = t + 3; ; )
if (u = i,
i = u.plus(P(c, u, f + 2)).times(.5),
n(u.d).slice(0, f) === (e = n(i.d)).slice(0, f)) {
if (e = e.slice(f - 3, f + 1),
s == f && "4999" == e) {
if (h(u, t + 1, 0),
u.times(u).eq(c)) {
i = u;
break
}
} else if ("9999" != e)
break;
f += 4
}
return E = !0,
h(i, t)
}
,
A.times = A.mul = function(r) {
var e, t, n, i, o, s, u, f, c, l = this, d = l.constructor, a = l.d, g = (r = new d(r)).d;
if (!l.s || !r.s)
return new d(0);
for (r.s *= l.s,
t = l.e + r.e,
f = a.length,
c = g.length,
c > f && (o = a,
a = g,
g = o,
s = f,
f = c,
c = s),
o = [],
s = f + c,
n = s; n--; )
o.push(0);
for (n = c; --n >= 0; ) {
for (e = 0,
i = f + n; i > n; )
u = o[i] + g[n] * a[i - n - 1] + e,
o[i--] = u % q | 0,
e = u / q | 0;
o[i] = (o[i] + e) % q | 0
}
for (; !o[--s]; )
o.pop();
return e ? ++t : o.shift(),
r.d = o,
r.e = t,
E ? h(r, d.precision) : r
}
,
A.toDecimalPlaces = A.todp = function(r, e) {
var n = this
, i = n.constructor;
return n = new i(n),
void 0 === r ? n : (t(r, 0, w),
void 0 === e ? e = i.rounding : t(e, 0, 8),
h(n, r + o(n) + 1, e))
}
,
A.toExponential = function(r, e) {
var n, i = this, o = i.constructor;
return void 0 === r ? n = d(i, !0) : (t(r, 0, w),
void 0 === e ? e = o.rounding : t(e, 0, 8),
i = h(new o(i), r + 1, e),
n = d(i, !0, r + 1)),
n
}
,
A.toFixed = function(r, e) {
var n, i, s = this, u = s.constructor;
return void 0 === r ? d(s) : (t(r, 0, w),
void 0 === e ? e = u.rounding : t(e, 0, 8),
i = h(new u(s), r + o(s) + 1, e),
n = d(i.abs(), !1, r + o(i) + 1),
s.isneg() && !s.isZero() ? "-" + n : n)
}
,
A.toInteger = A.toint = function() {
var r = this
, e = r.constructor;
return h(new e(r), o(r) + 1, e.rounding)
}
,
A.toNumber = function() {
return +this
}
,
A.toPower = A.pow = function(r) {
var e, t, n, o, s, u, c = this, l = c.constructor, d = 12, g = +(r = new l(r));
if (!r.s)
return new l(v);
if (c = new l(c),
!c.s) {
if (r.s < 1)
throw Error(N + "Infinity");
return c
}
if (c.eq(v))
return c;
if (n = l.precision,
r.eq(v))
return h(c, n);
if (e = r.e,
t = r.d.length - 1,
u = e >= t,
s = c.s,
u) {
if ((t = 0 > g ? -g : g) <= M) {
for (o = new l(v),
e = Math.ceil(n / y + 4),
E = !1; t % 2 && (o = o.times(c),
a(o.d, e)),
t = b(t / 2),
0 !== t; )
c = c.times(c),
a(c.d, e);
return E = !0,
r.s < 0 ? new l(v).div(o) : h(o, n)
}
} else if (0 > s)
throw Error(N + "NaN");
return s = 0 > s && 1 & r.d[Math.max(e, t)] ? -1 : 1,
c.s = 1,
E = !1,
o = r.times(f(c, n + d)),
E = !0,
o = i(o),
o.s = s,
o
}
,
A.toPrecision = function(r, e) {
var n, i, s = this, u = s.constructor;
return void 0 === r ? (n = o(s),
i = d(s, n <= u.toExpNeg || n >= u.toExpPos)) : (t(r, 1, w),
void 0 === e ? e = u.rounding : t(e, 0, 8),
s = h(new u(s), r, e),
n = o(s),
i = d(s, n >= r || n <= u.toExpNeg, r)),
i
}
,
A.toSignificantDigits = A.tosd = function(r, e) {
var n = this
, i = n.constructor;
return void 0 === r ? (r = i.precision,
e = i.rounding) : (t(r, 1, w),
void 0 === e ? e = i.rounding : t(e, 0, 8)),
h(new i(n), r, e)
}
,
A.toString = A.valueOf = A.val = A.toJSON = function() {
var r = this
, e = o(r)
, t = r.constructor;
return d(r, e <= t.toExpNeg || e >= t.toExpPos)
}
;
var P = function() {
function r(r, e) {
var t, n = 0, i = r.length;
for (r = r.slice(); i--; )
t = r[i] * e + n,
r[i] = t % q | 0,
n = t / q | 0;
return n && r.unshift(n),
r
}
function e(r, e, t, n) {
var i, o;
if (t != n)
o = t > n ? 1 : -1;
else
for (i = o = 0; t > i; i++)
if (r[i] != e[i]) {
o = r[i] > e[i] ? 1 : -1;
break
}
return o
}
function t(r, e, t) {
for (var n = 0; t--; )
r[t] -= n,
n = r[t] < e[t] ? 1 : 0,
r[t] = n * q + r[t] - e[t];
for (; !r[0] && r.length > 1; )
r.shift()
}
return function(n, i, s, u) {
var f, c, l, d, a, g, p, v, w, m, E, x, O, b, L, D, M, _, A = n.constructor, P = n.s == i.s ? 1 : -1, R = n.d, U = i.d;
if (!n.s)
return new A(n);
if (!i.s)
throw Error(N + "Division by zero");
for (c = n.e - i.e,
M = U.length,
L = R.length,
p = new A(P),
v = p.d = [],
l = 0; U[l] == (R[l] || 0); )
++l;
if (U[l] > (R[l] || 0) && --c,
x = null == s ? s = A.precision : u ? s + (o(n) - o(i)) + 1 : s,
0 > x)
return new A(0);
if (x = x / y + 2 | 0,
l = 0,
1 == M)
for (d = 0,
U = U[0],
x++; (L > l || d) && x--; l++)
O = d * q + (R[l] || 0),
v[l] = O / U | 0,
d = O % U | 0;
else {
for (d = q / (U[0] + 1) | 0,
d > 1 && (U = r(U, d),
R = r(R, d),
M = U.length,
L = R.length),
b = M,
w = R.slice(0, M),
m = w.length; M > m; )
w[m++] = 0;
_ = U.slice(),
_.unshift(0),
D = U[0],
U[1] >= q / 2 && ++D;
do
d = 0,
f = e(U, w, M, m),
0 > f ? (E = w[0],
M != m && (E = E * q + (w[1] || 0)),
d = E / D | 0,
d > 1 ? (d >= q && (d = q - 1),
a = r(U, d),
g = a.length,
m = w.length,
f = e(a, w, g, m),
1 == f && (d--,
t(a, g > M ? _ : U, g))) : (0 == d && (f = d = 1),
a = U.slice()),
g = a.length,
m > g && a.unshift(0),
t(w, a, m),
-1 == f && (m = w.length,
f = e(U, w, M, m),
1 > f && (d++,
t(w, m > M ? _ : U, m))),
m = w.length) : 0 === f && (d++,
w = [0]),
v[l++] = d,
f && w[0] ? w[m++] = R[b] || 0 : (w = [R[b]],
m = 1);
while ((b++ < L || void 0 !== w[0]) && x--)
}
return v[0] || v.shift(),
p.e = c,
h(p, u ? s + o(p) + 1 : s)
}
}();
m = g(m),
m["default"] = m.Decimal = m,
v = new m(1),
"function" == typeof define && define.amd ? define(function() {
return m
}) : "undefined" != typeof module && module.exports ? module.exports = m : (r || (r = "undefined" != typeof self && self && self.self == self ? self : Function("return this")()),
r.Decimal = m)
}(this);
//# sourceMappingURL=doc/decimal.js.map;
$( () => {
window.initializeCurrency = n => {
window.formatCurrency = (n, t="en-US", i=2) => {
const r = new Decimal(n);
return n.toLocaleString(t, {
style: "decimal",
minimumFractionDigits: i,
maximumFractionDigits: i
})
}
,
window.formatNumber = (n, t=2) => Number.isFinite(n) === !1 ? n : n.toLocaleString(undefined, {
maximumFractionDigits: t,
roundingMode: "trunc"
}),
window.thousandSeparator = n.thousandSeparator,
window.conversionRate = n.conversionRate,
window.toLocalCurrencyFormat = t => window.formatCurrency(t, n.locale, 2)
}
}
);
$( () => {
if (window.readCookie("client-timezone") === null) {
const n = (new Date).getTimezoneOffset() / -60;
window.writeCookie("client-timezone", n)
}
}
);
$( () => {
const r = document.querySelector("#deposit_progress");
r && $(r).LineProgressbar({
percentage: parseFloat(r.dataset.averageTime),
radius: "6px",
height: "10px",
fillBackgroundColor: "#c9ddf5",
level: 5
});
const u = document.querySelector("#withdrawal_progress");
u && $(u).LineProgressbar({
percentage: parseFloat(u.dataset.averageTime),
radius: "6px",
height: "10px",
fillBackgroundColor: "#c9ddf5",
level: 6
});
const f = document.querySelectorAll("[data-ztip-title]");
f.length > 0 && $(f).zTip();
const e = document.querySelector("#register_modal");
if (e) {
const n = document.querySelector("#register_alert")
, t = document.querySelector("#register_success_alert");
n.hidden = !0;
t.hidden = !0;
window.onRegisterAjaxRequestSuccess = i => {
if (n.hidden = !0,
t.hidden = !0,
registerPopup({
contentTitle: i.statusText,
content: i.message
}),
i.status !== !0) {
n.innerText = i.message;
n.hidden = !1;
return
}
t.innerText = i.message;
t.hidden = !1;
window.location.href = i.externalUrl;
setTimeout( () => {
const n = document.querySelectorAll(".btn-primary");
$(n).prop("disabled", !0)
}
)
}
;
$(e).on("shown.bs.modal", () => {
const n = document.querySelector("#ajax_register_popup_container");
n && $.ajax({
type: "GET",
url: "/Register/AjaxRegisterPopup",
contentType: "application/json; charset=utf-8",
dataType: "html",
success: t => {
n.innerHTML = t,
n.querySelector("#register_form") && $.validator.unobtrusive.parse("#register_form"),
initializeBonusSelection(),
initializeRegisterInfo()
}
})
}
)
}
const n = document.querySelectorAll(".refresh_balance");
if (n.length) {
const i = document.querySelector("#wallet_container")
, r = document.querySelectorAll(".locked_balance_container")
, t = document.querySelectorAll(".total_balance")
, u = document.querySelectorAll(".total_locked_balance")
, f = document.querySelector("#unread_announcements_button")
, h = document.querySelectorAll(".loyalty_level")
, c = document.querySelectorAll(".loyalty_point")
, l = document.querySelectorAll(".loyalty_experience_progress")
, a = document.querySelector("#loyalty_xp")
, v = document.querySelector("#loyalty_next_level_xp")
, e = document.querySelector("#loyalty_experience_amount")
, y = () => {
const n = document.querySelector("#resolved_ticket_ids");
n && window.$.ajax({
type: "POST",
url: "/Session/ReadResolvedTransactions",
data: JSON.stringify({
ticketNumbers: n.value.split(",")
}),
contentType: "application/json; charset=utf-8",
dataType: "json"
})
}
, p = () => {
window.$.ajax({
type: "POST",
url: "/Session/ResolvedTransactionsPopup",
success: n => {
registerPopup({
content: n,
cssClass: "concise-transaction-popup",
onClose: y
})
}
})
}
, o = async () => {
Array.prototype.slice.call(n).some(n => n.dataset.loading === "true") || (Array.prototype.slice.call(n).forEach(n => n.dataset.loading = !0),
await window.$.ajax({
type: "GET",
url: "/Account/ScheduledUpdate",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: n => {
const o = n.wallet
, w = window.formatCurrency(o.balance)
, b = window.formatCurrency(o.lockedBalance);
i && (i.dataset.lockedBalance = o.hasLockedBalance);
t.length && Array.prototype.slice.call(t).forEach(n => {
n.innerText = w
}
);
u.length && Array.prototype.slice.call(u).forEach(n => {
n.innerText = b
}
);
r.length && Array.prototype.slice.call(r).forEach(n => {
n.hidden = !o.hasLockedBalance
}
);
o.isBalanceStuck && (t.innerText = "[Please contact CS]");
o.hasNewResolvedTransactions && p();
o.vendorBalanceCategories.length && o.vendorBalanceCategories.forEach(n => {
n.vendorBalances.forEach(n => {
Array.prototype.slice.call(document.querySelectorAll(`[data-vendor-game-code="${n.gameCode}"]`)).forEach(t => {
t.innerText = n.success ? window.formatCurrency(n.balance) : n.errorMessage
}
)
}
)
}
);
const y = n.notification;
f && y && (f.dataset.announcementCount = y.newMessageCount);
const s = n.loyalty;
if (s) {
const n = {
"0": "bronze",
"1": "silver",
"2": "gold",
"3": "platinum",
"4": "diamond"
};
Array.prototype.slice.call(h).forEach(t => {
t.src = `${t.dataset.imagePath}${n[s.loyaltyLevel]}.svg`
}
);
Array.prototype.slice.call(c).forEach(n => {
n.innerText = s.loyaltyPoint.toLocaleString()
}
);
Array.prototype.slice.call(l).forEach(n => {
n.style.width = `${s.experiencePercentage}%`
}
);
a.innerText = s.experiencePoint.toLocaleString();
v.innerText = s.nextLevelExperiencePoint.toLocaleString();
e && (e.innerHTML = `${s.experiencePoint.toLocaleString()}/${s.nextLevelExperiencePoint.toLocaleString()} EXP`)
}
}
,
error: function(n) {
const t = n.getResponseHeader("Redirect-Reason");
n.status === 200 && t && (window.closeWindows(),
window.location.href = "/home/" + t)
}
}),
Array.prototype.slice.call(n).forEach(n => n.dataset.loading = !1))
}
;
Array.prototype.slice.call(n).forEach(n => n.onclick = o);
const w = 1e4
, s = async () => {
setTimeout(async () => {
await o(),
s()
}
, w)
}
;
s()
}
window.initializeIntro = n => {
const i = document.querySelector("#loyalty_level_container");
if (i) {
const i = async () => {
await window.$.ajax({
type: "POST",
url: "/Profile/UpdateUserAction",
data: JSON.stringify({
userAction: "GuidanceForLoyaltyHomePage"
}),
contentType: "application/json; charset=utf-8",
dataType: "json"
})
}
, r = () => {
n.redemptionStore == !0 ? introJs().setOptions({
steps: [{
title: n.loyaltyLevelTitle,
element: document.querySelector("#loyalty_level_container"),
intro: `${n.loyaltyLevelSubtitle}
${n.loyaltyLevelContent}
`
}, {
title: n.loyaltyPointTitle,
element: document.querySelector("#loyalty_point_info"),
intro: `${n.loyaltyPointSubtitle}
${n.loyaltyPointContent}
`
}, {
title: n.loyaltyExperienceTitle,
element: document.querySelector("#loyalty_experience"),
intro: `${n.loyaltyExperienceSubtitle}
${n.loyaltyExperienceContent}
`
}]
}).start() : introJs().setOptions({
steps: [{
title: n.loyaltyLevelTitle,
element: document.querySelector("#loyalty_level_container"),
intro: `${n.loyaltyLevelSubtitle}
${n.loyaltyLevelContent}
`
}, {
title: n.loyaltyExperienceTitle,
element: document.querySelector("#loyalty_experience"),
intro: `${n.loyaltyExperienceSubtitle}
${n.loyaltyExperienceContent}
`
}]
}).start(),
i(),
clearInterval(u)
}
;
t();
const u = setInterval( () => {
t() == !1 && r()
}
, 2e3)
}
}
;
window.initializeWalletIntro = n => {
const i = document.querySelector("#wallet_container");
if (i) {
const r = async () => {
await window.$.ajax({
type: "POST",
url: "/Profile/UpdateUserAction",
data: JSON.stringify({
userAction: "GuidanceForWallet"
}),
contentType: "application/json; charset=utf-8",
dataType: "json"
})
}
, u = () => {
introJs().setOptions({
steps: [{
element: i,
intro: `${n.translations.walletUpdateTitle}
${n.translations.walletUpdateContent}
`,
tooltipClass: "wallet-guidance-tooltip"
}],
scrollToElement: !1,
doneLabel: "OK"
}).start(),
r(),
clearInterval(f)
}
;
t();
const f = setInterval( () => {
t() == !1 && u()
}
, 2e3)
}
}
;
const t = () => {
const n = document.querySelectorAll(".introjs-tooltip");
return n.length > 0 || document.querySelectorAll(".modal.show").length > 0 || document.querySelectorAll(".modal.in").length > 0 ? !0 : !1
}
, o = document.querySelector("#floating_action_button_trigger");
if (o) {
const n = document.querySelector("#floating_action_button_list");
o.onclick = () => {
n.classList.toggle("visible")
}
}
const s = document.querySelector("#contact_verification_popup")
, h = document.querySelectorAll(".open_contact_verification_popup_button");
s && h.length && Array.from(h).forEach(n => {
n.onclick || (n.onclick = () => s.classList.add("open"))
}
);
const c = document.querySelector("#close_contact_verification_popup_button");
if (c) {
const n = document.querySelector("#contact_verification_popup");
c.onclick = () => n.classList.remove("open")
}
const i = document.querySelector("#menu_slides");
if (i) {
const n = i.querySelector("ul")
, u = i.querySelector(".left_trigger")
, f = i.querySelector(".right_trigger")
, t = n.querySelector("li");
u.onclick = () => n.scrollLeft -= t.clientWidth;
f.onclick = () => n.scrollLeft += t.clientWidth;
const r = n.querySelector('li[data-active="true"]');
r && r.scrollIntoView(!1)
}
}
);
// jQuery Mask Plugin v1.14.16
// github.com/igorescobar/jQuery-Mask-Plugin
var $jscomp = $jscomp || {};
$jscomp.scope = {};
$jscomp.findInternal = function(a, n, f) {
a instanceof String && (a = String(a));
for (var p = a.length, k = 0; k < p; k++) {
var b = a[k];
if (n.call(f, b, k, a))
return {
i: k,
v: b
}
}
return {
i: -1,
v: void 0
}
}
;
$jscomp.ASSUME_ES5 = !1;
$jscomp.ASSUME_NO_NATIVE_MAP = !1;
$jscomp.ASSUME_NO_NATIVE_SET = !1;
$jscomp.SIMPLE_FROUND_POLYFILL = !1;
$jscomp.defineProperty = $jscomp.ASSUME_ES5 || "function" == typeof Object.defineProperties ? Object.defineProperty : function(a, n, f) {
a != Array.prototype && a != Object.prototype && (a[n] = f.value)
}
;
$jscomp.getGlobal = function(a) {
return "undefined" != typeof window && window === a ? a : "undefined" != typeof global && null != global ? global : a
}
;
$jscomp.global = $jscomp.getGlobal(this);
$jscomp.polyfill = function(a, n, f, p) {
if (n) {
f = $jscomp.global;
a = a.split(".");
for (p = 0; p < a.length - 1; p++) {
var k = a[p];
k in f || (f[k] = {});
f = f[k]
}
a = a[a.length - 1];
p = f[a];
n = n(p);
n != p && null != n && $jscomp.defineProperty(f, a, {
configurable: !0,
writable: !0,
value: n
})
}
}
;
$jscomp.polyfill("Array.prototype.find", function(a) {
return a ? a : function(a, f) {
return $jscomp.findInternal(this, a, f).v
}
}, "es6", "es3");
(function(a, n, f) {
"function" === typeof define && define.amd ? define(["jquery"], a) : "object" === typeof exports && "undefined" === typeof Meteor ? module.exports = a(require("jquery")) : a(n || f)
}
)(function(a) {
var n = function(b, d, e) {
var c = {
invalid: [],
getCaret: function() {
try {
var a = 0
, r = b.get(0)
, h = document.selection
, d = r.selectionStart;
if (h && -1 === navigator.appVersion.indexOf("MSIE 10")) {
var e = h.createRange();
e.moveStart("character", -c.val().length);
a = e.text.length
} else if (d || "0" === d)
a = d;
return a
} catch (C) {}
},
setCaret: function(a) {
try {
if (b.is(":focus")) {
var c = b.get(0);
if (c.setSelectionRange)
c.setSelectionRange(a, a);
else {
var g = c.createTextRange();
g.collapse(!0);
g.moveEnd("character", a);
g.moveStart("character", a);
g.select()
}
}
} catch (B) {}
},
events: function() {
b.on("keydown.mask", function(a) {
b.data("mask-keycode", a.keyCode || a.which);
b.data("mask-previus-value", b.val());
b.data("mask-previus-caret-pos", c.getCaret());
c.maskDigitPosMapOld = c.maskDigitPosMap
}).on(a.jMaskGlobals.useInput ? "input.mask" : "keyup.mask", c.behaviour).on("paste.mask drop.mask", function() {
setTimeout(function() {
b.keydown().keyup()
}, 100)
}).on("change.mask", function() {
b.data("changed", !0)
}).on("blur.mask", function() {
f === c.val() || b.data("changed") || b.trigger("change");
b.data("changed", !1)
}).on("blur.mask", function() {
f = c.val()
}).on("focus.mask", function(b) {
!0 === e.selectOnFocus && a(b.target).select()
}).on("focusout.mask", function() {
e.clearIfNotMatch && !k.test(c.val()) && c.val("")
})
},
getRegexMask: function() {
for (var a = [], b, c, e, t, f = 0; f < d.length; f++)
(b = l.translation[d.charAt(f)]) ? (c = b.pattern.toString().replace(/.{1}$|^.{1}/g, ""),
e = b.optional,
(b = b.recursive) ? (a.push(d.charAt(f)),
t = {
digit: d.charAt(f),
pattern: c
}) : a.push(e || b ? c + "?" : c)) : a.push(d.charAt(f).replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
a = a.join("");
t && (a = a.replace(new RegExp("(" + t.digit + "(.*" + t.digit + ")?)"), "($1)?").replace(new RegExp(t.digit,"g"), t.pattern));
return new RegExp(a)
},
destroyEvents: function() {
b.off("input keydown keyup paste drop blur focusout ".split(" ").join(".mask "))
},
val: function(a) {
var c = b.is("input") ? "val" : "text";
if (0 < arguments.length) {
if (b[c]() !== a)
b[c](a);
c = b
} else
c = b[c]();
return c
},
calculateCaretPosition: function(a) {
var d = c.getMasked()
, h = c.getCaret();
if (a !== d) {
var e = b.data("mask-previus-caret-pos") || 0;
d = d.length;
var g = a.length, f = a = 0, l = 0, k = 0, m;
for (m = h; m < d && c.maskDigitPosMap[m]; m++)
f++;
for (m = h - 1; 0 <= m && c.maskDigitPosMap[m]; m--)
a++;
for (m = h - 1; 0 <= m; m--)
c.maskDigitPosMap[m] && l++;
for (m = e - 1; 0 <= m; m--)
c.maskDigitPosMapOld[m] && k++;
h > g ? h = 10 * d : e >= h && e !== g ? c.maskDigitPosMapOld[h] || (e = h,
h = h - (k - l) - a,
c.maskDigitPosMap[h] && (h = e)) : h > e && (h = h + (l - k) + f)
}
return h
},
behaviour: function(d) {
d = d || window.event;
c.invalid = [];
var e = b.data("mask-keycode");
if (-1 === a.inArray(e, l.byPassKeys)) {
e = c.getMasked();
var h = c.getCaret()
, g = b.data("mask-previus-value") || "";
setTimeout(function() {
c.setCaret(c.calculateCaretPosition(g))
}, a.jMaskGlobals.keyStrokeCompensation);
c.val(e);
c.setCaret(h);
return c.callbacks(d)
}
},
getMasked: function(a, b) {
var h = []
, f = void 0 === b ? c.val() : b + ""
, g = 0
, k = d.length
, n = 0
, p = f.length
, m = 1
, r = "push"
, u = -1
, w = 0;
b = [];
if (e.reverse) {
r = "unshift";
m = -1;
var x = 0;
g = k - 1;
n = p - 1;
var A = function() {
return -1 < g && -1 < n
}
} else
x = k - 1,
A = function() {
return g < k && n < p
}
;
for (var z; A(); ) {
var y = d.charAt(g)
, v = f.charAt(n)
, q = l.translation[y];
if (q)
v.match(q.pattern) ? (h[r](v),
q.recursive && (-1 === u ? u = g : g === x && g !== u && (g = u - m),
x === u && (g -= m)),
g += m) : v === z ? (w--,
z = void 0) : q.optional ? (g += m,
n -= m) : q.fallback ? (h[r](q.fallback),
g += m,
n -= m) : c.invalid.push({
p: n,
v: v,
e: q.pattern
}),
n += m;
else {
if (!a)
h[r](y);
v === y ? (b.push(n),
n += m) : (z = y,
b.push(n + w),
w++);
g += m
}
}
a = d.charAt(x);
k !== p + 1 || l.translation[a] || h.push(a);
h = h.join("");
c.mapMaskdigitPositions(h, b, p);
return h
},
mapMaskdigitPositions: function(a, b, d) {
a = e.reverse ? a.length - d : 0;
c.maskDigitPosMap = {};
for (d = 0; d < b.length; d++)
c.maskDigitPosMap[b[d] + a] = 1
},
callbacks: function(a) {
var g = c.val()
, h = g !== f
, k = [g, a, b, e]
, l = function(a, b, c) {
"function" === typeof e[a] && b && e[a].apply(this, c)
};
l("onChange", !0 === h, k);
l("onKeyPress", !0 === h, k);
l("onComplete", g.length === d.length, k);
l("onInvalid", 0 < c.invalid.length, [g, a, b, c.invalid, e])
}
};
b = a(b);
var l = this, f = c.val(), k;
d = "function" === typeof d ? d(c.val(), void 0, b, e) : d;
l.mask = d;
l.options = e;
l.remove = function() {
var a = c.getCaret();
l.options.placeholder && b.removeAttr("placeholder");
b.data("mask-maxlength") && b.removeAttr("maxlength");
c.destroyEvents();
c.val(l.getCleanVal());
c.setCaret(a);
return b
}
;
l.getCleanVal = function() {
return c.getMasked(!0)
}
;
l.getMaskedVal = function(a) {
return c.getMasked(!1, a)
}
;
l.init = function(g) {
g = g || !1;
e = e || {};
l.clearIfNotMatch = a.jMaskGlobals.clearIfNotMatch;
l.byPassKeys = a.jMaskGlobals.byPassKeys;
l.translation = a.extend({}, a.jMaskGlobals.translation, e.translation);
l = a.extend(!0, {}, l, e);
k = c.getRegexMask();
if (g)
c.events(),
c.val(c.getMasked());
else {
e.placeholder && b.attr("placeholder", e.placeholder);
b.data("mask") && b.attr("autocomplete", "off");
g = 0;
for (var f = !0; g < d.length; g++) {
var h = l.translation[d.charAt(g)];
if (h && h.recursive) {
f = !1;
break
}
}
f && b.attr("maxlength", d.length).data("mask-maxlength", !0);
c.destroyEvents();
c.events();
g = c.getCaret();
c.val(c.getMasked());
c.setCaret(g)
}
}
;
l.init(!b.is("input"))
};
a.maskWatchers = {};
var f = function() {
var b = a(this)
, d = {}
, e = b.attr("data-mask");
b.attr("data-mask-reverse") && (d.reverse = !0);
b.attr("data-mask-clearifnotmatch") && (d.clearIfNotMatch = !0);
"true" === b.attr("data-mask-selectonfocus") && (d.selectOnFocus = !0);
if (p(b, e, d))
return b.data("mask", new n(this,e,d))
}
, p = function(b, d, e) {
e = e || {};
var c = a(b).data("mask")
, f = JSON.stringify;
b = a(b).val() || a(b).text();
try {
return "function" === typeof d && (d = d(b)),
"object" !== typeof c || f(c.options) !== f(e) || c.mask !== d
} catch (w) {}
}
, k = function(a) {
var b = document.createElement("div");
a = "on" + a;
var e = a in b;
e || (b.setAttribute(a, "return;"),
e = "function" === typeof b[a]);
return e
};
a.fn.mask = function(b, d) {
d = d || {};
var e = this.selector
, c = a.jMaskGlobals
, f = c.watchInterval;
c = d.watchInputs || c.watchInputs;
var k = function() {
if (p(this, b, d))
return a(this).data("mask", new n(this,b,d))
};
a(this).each(k);
e && "" !== e && c && (clearInterval(a.maskWatchers[e]),
a.maskWatchers[e] = setInterval(function() {
a(document).find(e).each(k)
}, f));
return this
}
;
a.fn.masked = function(a) {
return this.data("mask").getMaskedVal(a)
}
;
a.fn.unmask = function() {
clearInterval(a.maskWatchers[this.selector]);
delete a.maskWatchers[this.selector];
return this.each(function() {
var b = a(this).data("mask");
b && b.remove().removeData("mask")
})
}
;
a.fn.cleanVal = function() {
return this.data("mask").getCleanVal()
}
;
a.applyDataMask = function(b) {
b = b || a.jMaskGlobals.maskElements;
(b instanceof a ? b : a(b)).filter(a.jMaskGlobals.dataMaskAttr).each(f)
}
;
k = {
maskElements: "input,td,span,div",
dataMaskAttr: "*[data-mask]",
dataMask: !0,
watchInterval: 300,
watchInputs: !0,
keyStrokeCompensation: 10,
useInput: !/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent) && k("input"),
watchDataMask: !1,
byPassKeys: [9, 16, 17, 18, 36, 37, 38, 39, 40, 91],
translation: {
0: {
pattern: /\d/
},
9: {
pattern: /\d/,
optional: !0
},
"#": {
pattern: /\d/,
recursive: !0
},
A: {
pattern: /[a-zA-Z0-9]/
},
S: {
pattern: /[a-zA-Z]/
}
}
};
a.jMaskGlobals = a.jMaskGlobals || {};
k = a.jMaskGlobals = a.extend(!0, {}, k, a.jMaskGlobals);
k.dataMask && a.applyDataMask();
setInterval(function() {
a.jMaskGlobals.watchDataMask && a.applyDataMask()
}, k.watchInterval)
}, window.jQuery, window.Zepto);
$(document).ready(function() {
$(".format_phone").mask("0000-0000-0000-0");
$(".format_account_number").mask("0000-0000-0000-0000-0000");
window.formatAccountNumber = (n, t=4) => {
const r = [];
for (var i = 0, u = n.length; i < u; i += t)
r.push(n.substring(i, i + t));
return r.join("-")
}
});
$( () => {
const n = () => registerPopup({
content: "Server Error."
})
, i = document.querySelector("body")
, t = document.querySelector("#search_popup_container");
if (t) {
const u = document.querySelectorAll(".search_popup_button");
u && u.length > 0 && u.forEach(u => {
u.onclick || (u.onclick = () => {
$.ajax({
type: "POST",
url: "/Search/SearchPopup",
contentType: "application/json; charset=utf-8",
dataType: "html",
success: n => {
t.innerHTML = n,
t.classList.add("open"),
i.classList.add("no-scroll"),
r()
}
,
error: n
})
}
)
}
)
}
const r = () => {
const r = document.querySelector("#search_input")
, u = document.querySelector("#search_result_container")
, f = document.querySelector("#recent_searches_container")
, o = document.querySelector("#search_result_popular_games_container")
, e = document.querySelector("#loader_container")
, s = document.querySelector("#request_verification_token");
if (r) {
const a = (n, t) => {
let i;
return function(...r) {
clearTimeout(i);
i = setTimeout( () => n.apply(this, r), t)
}
}
;
let i = null;
const v = t => {
i && i.readyState !== 4 && i.abort(),
i = $.ajax({
type: "POST",
url: "/Search/Search",
data: JSON.stringify({
keyword: t
}),
contentType: "application/json; charset=utf-8",
dataType: "html",
success: n => {
(e.style.display = "none",
r.value.trim() !== "") && (u.innerHTML = n,
u.style.display = "block")
}
,
error: function(t, i) {
i !== "abort" && n()
}
})
}
, y = a(v, 250)
, c = document.querySelector("#input_search_icon")
, h = document.querySelector("#input_close_icon");
h && (h.onclick = () => {
r.value = "",
r.dispatchEvent(new Event("input",{
bubbles: !0
}))
}
);
r.oninput = n => {
if (c.style.display = "none",
h.style.display = "block",
e.style.display = "block",
f && (f.style.display = "none"),
o.style.display = "none",
u.innerHTML = "",
u.style.display = "none",
n.target.value.trim() === "") {
c.style.display = "block";
h.style.display = "none";
e.style.display = "none";
f && (f.style.display = "flex");
o.style.display = "flex";
return
}
y(n.target.value)
}
;
const t = document.querySelectorAll(".search_history_item");
t && t.length > 0 && t.forEach(t => {
t.onclick || (t.onclick = i => {
var u = t.dataset.keyword;
i.target.classList.contains("remove_keyword_button") ? (t.remove(),
$.ajax({
type: "POST",
url: "/Search/RemoveKeyword",
headers: {
requestVerificationToken: s.value
},
data: JSON.stringify({
keyword: u
}),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: n => {
n.status == !1 && registerPopup({
contentTitle: n.statusText,
content: n.message
})
}
,
error: () => n()
})) : (r.value = u,
r.dispatchEvent(new Event("input",{
bubbles: !0
})))
}
)
}
);
const l = document.querySelector("#clear_searches_button");
l && (l.onclick = () => {
t.length > 0 && t.forEach(n => n.remove()),
$.ajax({
type: "POST",
url: "/Search/RemoveAllKeywords",
headers: {
requestVerificationToken: s.value
},
contentType: "application/json; charset=utf-8",
dataType: "json",
success: n => {
n.status == !1 && registerPopup({
contentTitle: n.statusText,
content: n.message
})
}
,
error: () => n()
})
}
)
}
const h = document.querySelector("#close_search_popup_button");
h && (h.onclick = () => {
t.classList.remove("open"),
i.classList.remove("no-scroll")
}
)
}
}
);
$( () => {
String.prototype.padStart || (String.prototype.padStart = function(n, t) {
return n = n >> 0,
t = String(typeof t != "undefined" ? t : " "),
this.length > n ? String(this) : (n = n - this.length,
n > t.length && (t += t.repeat(n / t.length)),
t.slice(0, n) + String(this))
}
);
const n = (n, t, i) => {
n = n + 1;
const u = n => Math.floor(n / 60).toString().padStart(2, "0") + ":" + Math.floor(n % 60).toString().padStart(2, "0")
, r = function() {
if (n -= 1,
t) {
if (n < 0) {
t.disabled = !1;
t.classList.remove("disabled");
t.innerText = t.dataset.title;
return
}
t.innerText = i + ` [${u(n)}]`
}
setTimeout(r, 1e3)
};
r()
}
, t = (n, t) => {
n.innerText = t;
const i = parseInt(n.dataset.intervalInSeconds) * 1e3 || 3e4;
setTimeout( () => {
n.disabled = !1,
n.classList.remove("disabled"),
n.innerText = n.dataset.title
}
, i)
}
;
window.initializeOtp = (i=false, r=0, u, f={}, e="") => {
const o = document.querySelectorAll(".request_otp_button");
Array.prototype.slice.call(o).forEach(o => {
if (!o.onclick && (o.onclick = i => {
i.preventDefault();
o.disabled = !0;
o.classList.add("disabled");
const u = o.dataset.otpAction;
let r = o.dataset.otpType;
if (!r) {
const n = document.querySelector(`.otp_type_select[data-otp-action="${u}"]`);
r = n.value
}
e === "" && (e = `/otp/request/${r}/${u}`);
window.$.ajax({
type: "POST",
url: e,
data: JSON.stringify(f),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: i => {
if (isNaN(i.expiryInSeconds) || i.expiryInSeconds <= 0) {
t(o, i.message);
return
}
const r = document.querySelector("#otp_code_id_container");
r && (i.otpId !== null || i.otpId !== "") && (r.innerHTML = `${i.otpId}-`);
n(i.expiryInSeconds, o, i.message)
}
})
}
,
i)) {
if (isNaN(r) || r <= 0) {
t(o, u);
return
}
n(r, o, u)
}
}
)
}
;
window.initializeOtp()
}
);
$( () => {
const n = () => registerPopup({
content: "Please try again in few minutes. Code:007OR"
})
, t = (t, i, r, u) => {
$.ajax({
type: "POST",
url: `/OtpV2/OtpPopup`,
data: JSON.stringify({
channelType: r,
actionName: u
}),
contentType: "application/json; charset=utf-8",
dataType: "html",
success: n => {
t.innerHTML = n;
i.disabled = !1;
const r = t.querySelector("#otp_popup");
r.classList.add("open");
window.initializeOtp();
window.initializeOtpPopup();
window.initializeChangeOtpChannelButton()
}
,
error: n
})
}
;
window.initializeOtpPopupButton = () => {
const u = document.querySelectorAll(".show_otp_popup_button")
, i = document.querySelector("#otp_popup_container");
u.length > 0 && i && Array.from(u).forEach(u => {
const f = document.querySelector(`.input_verification_value[data-channel-type="${u.dataset.otpChannelType}"]`);
u.onclick || (u.onclick = () => {
const e = document.querySelector("#contact_verification_form")
, o = document.querySelector("#withdrawal_form");
e ? $("#contact_verification_form").valid() && (i.innerHTML = "",
u.disabled = !0,
$.ajax({
type: "POST",
url: `/OtpV2/UpdateContact`,
data: JSON.stringify({
channelType: u.dataset.otpChannelType,
value: f.value
}),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: n => {
if (n.errorCode === 0)
t(i, u, u.dataset.otpChannelType, u.dataset.otpActionName);
else {
const t = document.querySelector("#verification_form_group");
if (t) {
const r = document.querySelector("#verification_input_note")
, i = document.createElement("span");
i.className = "error";
i.id = "contact_verification_error";
i.innerText = n.message;
t.insertBefore(i, r);
u.disabled = !1
}
}
}
,
error: n
})) : o ? r({
onSuccess: () => t(i, u, u.dataset.otpChannelType, u.dataset.otpActionName)
}) : t(i, u, u.dataset.otpChannelType, u.dataset.otpActionName)
}
)
}
)
}
;
window.initializeOtpPopupButton();
const i = (t, i, r, u, f, e) => {
const o = document.querySelector("#loader_container");
o.classList.remove("hide");
o.classList.add("display");
t.innerHTML = "";
$.ajax({
type: "POST",
url: `/OtpV2/ContactVerificationForm`,
data: JSON.stringify({
channelType: i,
actionName: r,
redirectRoute: u,
showDismissButton: f
}),
contentType: "application/json; charset=utf-8",
dataType: "html",
success: i => {
o.classList.remove("display");
o.classList.add("hide");
t.innerHTML = i;
const r = document.querySelector("#contact_verification_form")
, u = document.querySelector(".show_otp_popup_button");
r && u && ($("#contact_verification_form").validate(),
r.addEventListener("keydown", n => {
n.key === "Enter" && n.target.nodeName === "INPUT" && (n.preventDefault(),
u.click())
}
));
const f = document.querySelector("#whatsapp_verification_input");
f && ($("#whatsapp_verification_input").rules("add", {
required: !0,
regex: /^(?=.*[0-9])[0-9\-]+$/,
messages: {
required: e.translations.whatsappRequiredMessage,
regex: e.translations.whatsappDigitErrorMessage
}
}),
f.onfocus = () => {
const n = document.querySelector("#contact_verification_error");
n && n.remove()
}
);
const s = document.querySelector("#email_verification_input");
s && ($("#email_verification_input").rules("add", {
required: !0,
email: !0,
messages: {
required: e.translations.emailRequiredMessage,
email: e.translations.emailErrorMessage
}
}),
s.onfocus = () => {
const n = document.querySelector("#contact_verification_error");
n && n.remove()
}
);
r.onsubmit = t => {
t.preventDefault();
const e = document.querySelector("#request_verification_token")
, i = document.querySelector(".otp_hidden_input")
, o = document.querySelector(".input_verification_value")
, r = document.querySelector("#otp_popup_container .otp-popup-content .field-validation-error")
, f = document.querySelector("#otp_submit_button");
r && r.remove();
u.disabled = !0;
f.disabled = !0;
$.ajax({
type: "POST",
url: `/OtpV2/SubmitVerification`,
headers: {
requestVerificationToken: e.value
},
data: JSON.stringify({
otp: i.value,
value: o.value,
channelType: i.dataset.channelType
}),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: n => {
if (n.errorCode === 0) {
const r = document.querySelector("#otp_popup");
r.classList.remove("open");
const t = document.querySelector("#verification_success_popup")
, u = document.querySelector("#verification_success_message")
, i = document.querySelector("#close_verification_success_btn");
t && (t.classList.add("open"),
u.innerText = n.message,
i && (i.onclick = () => {
window.location.reload()
}
))
} else {
const t = document.querySelector("#otp_popup_container .otp-popup-content")
, i = document.querySelector(".otp-input-outer-container");
if (t) {
const r = document.createElement("span");
r.className = "field-validation-error";
r.innerText = n.message;
t.insertBefore(r, i)
}
f.disabled = !1
}
}
,
error: n
})
}
;
window.initializeChangeVerificationMethod(e);
window.initializeOtp();
window.initializeOtpPopup();
window.initializeOtpPopupButton();
const h = document.querySelector("#dismiss_verification_popup_button");
if (h) {
const n = document.querySelector("#contact_verification_popup");
h.onclick = () => {
console.log("dongo"),
n.classList.remove("open")
}
}
}
,
error: n
})
}
;
window.initializeVerificationForm = n => {
const t = document.querySelector("#contact_verification_container");
t && i(t, t.dataset.channelType, t.dataset.actionName, t.dataset.redirectRoute, t.dataset.showDismissButton, n)
}
;
window.initializeChangeVerificationMethod = n => {
const t = document.querySelector("#contact_verification_container")
, r = document.querySelectorAll(".change_verification_method_button");
t && r.length > 0 && Array.from(r).forEach(r => {
r.onclick || (r.onclick = () => {
i(t, r.dataset.channelType, r.dataset.actionName, r.dataset.redirectRoute, r.dataset.showDismissButton, n)
}
)
}
)
}
;
window.initializeChangeOtpChannelButton = () => {
const t = document.querySelectorAll(".change_otp_channel_button")
, n = document.querySelector(".show_otp_popup_button")
, i = document.querySelector(`.otp_hidden_input`);
t && Array.from(t).forEach(t => {
t.onclick || (t.onclick = () => {
i.dataset.channelType = t.dataset.channelType,
n.dataset.otpChannelType = t.dataset.channelType,
n.dataset.otpActionName = t.dataset.actionName,
n.click()
}
)
}
)
}
;
const r = ({onSuccess: t}) => {
const i = document.querySelector("#withdrawal_form")
, r = document.querySelector("#withdrawal_container")
, u = document.querySelector("#error_container")
, f = document.querySelector("#otp_popup");
if (u && u.remove(),
i) {
const u = Object.fromEntries(new FormData(i).entries());
$.ajax({
type: "POST",
url: `/Wallet/PreWithdrawalCheck`,
data: JSON.stringify(u),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: n => {
if (n.errorCode === 0)
t();
else if (f && f.classList.remove("open"),
r) {
const t = document.createElement("div");
t.className = "form-group";
t.id = "error_container";
const u = document.createElement("div");
u.className = "alert-danger";
u.innerText = n.message;
t.appendChild(u);
r.insertBefore(t, i)
}
}
,
error: n
})
}
}
;
window.initializeOtpPopup = (t=true) => {
const i = document.querySelector("#otp_popup")
, u = document.querySelector(".request_otp_button");
if (i) {
u && t && u.click();
const f = document.querySelector("#otp_input");
if (f) {
const o = i.dataset.channelType
, t = document.querySelectorAll("#otp_fake_inputs div")
, u = document.querySelector(`.otp_hidden_input[data-channel-type="${o}"]`)
, e = document.querySelector("#otp_submit_button")
, c = document.querySelector(`.show_otp_popup_button[data-otp-channel-type="${o}"]`)
, l = document.querySelector("#close_otp_popup_button")
, s = function() {
t.forEach(n => n.classList.remove("focused"))
}
, h = function(n) {
s();
n < t.length && t[n].classList.add("focused")
};
f.addEventListener("input", n => {
const i = n.target.value;
for (let n = 0; n < t.length; n++)
i[n] ? (t[n].textContent = i[n],
t[n].classList.add("filled")) : (t[n].textContent = "",
t[n].classList.remove("filled"));
h(i.length);
u.value = i;
e.disabled = u.value.length < 6 ? !0 : !1
}
);
f.addEventListener("focus", () => {
h(f.value.length)
}
);
f.addEventListener("blur", () => {
s()
}
);
e.onclick = () => {
const t = document.querySelector("#withdrawal_form");
u.value.length == 6 && (t ? r({
onSuccess: () => {
const u = Object.fromEntries(new FormData(t).entries())
, i = document.querySelector("input[name=__RequestVerificationToken]")
, f = document.querySelector("input[type=radio][name=PaymentType]:checked").value
, r = document.querySelector(".otp-popup-content .field-validation-error");
r && r.remove();
$.ajax({
type: "POST",
url: `/Wallet/${f}WithdrawalAsync`,
headers: {
__RequestVerificationToken: i.value
},
data: u,
dataType: "json",
success: n => {
if (n.errorCode === 0)
registerPopup({
content: n.message
}),
window.location.replace("/home");
else {
const t = document.querySelector(".otp-popup-content")
, r = document.querySelector(".otp-input-outer-container");
if (i.outerHTML = n.antiForgeryHtmlInput,
t) {
const i = document.createElement("span");
i.className = "field-validation-error";
i.innerText = n.message;
t.insertBefore(i, r)
}
}
}
,
error: n
})
}
}) : c.closest("form").dispatchEvent(new Event("submit",{
bubbles: !0,
cancelable: !0
})))
}
;
l.onclick = () => {
i.classList.remove("open")
}
}
}
}
;
window.initializeOtpPopup();
window.initializeLoginOtpPopupButton = () => {
const i = document.querySelector("#telegram_login_get_otp_submit_button")
, f = document.querySelector("#login_otp_username")
, t = document.querySelector("#login_otp_form")
, e = document.querySelector("#telegram_login_popup_modal")
, r = document.querySelector("#telegram_error_popup_modal")
, u = document.querySelector("#login_otp_popup_container");
i && (i.onclick = () => {
if (t) {
if ($(t).valid() == !1)
return;
const h = i.dataset.otpChannel
, o = f.value
, s = `/login-otp/request/${h}`;
$.ajax({
type: "POST",
url: s,
data: JSON.stringify({
username: o
}),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: t => {
switch (t.errorCode) {
case 400:
case 0:
$.ajax({
type: "POST",
url: `/Account/LoginOtpPopup`,
data: JSON.stringify({
channelType: i.dataset.otpChannel,
receiver: t.receiver
}),
contentType: "application/json; charset=utf-8",
dataType: "html",
success: n => {
u.innerHTML = n;
$(".modal").modal("hide");
const r = u.querySelector("#otp_popup");
r.classList.add("open");
window.initializeOtp(!0, t.expiryInSeconds, t.message, {
username: o
}, s);
window.initializeOtpPopup(!1);
const i = document.querySelector("#otp_code_id_container");
i && (t.otpId !== null || t.otpId !== "") && (i.innerHTML = `${t.otpId}-`)
}
,
error: n
});
break;
default:
if (r) {
const n = r.querySelector("#otp_login_error");
n.innerHTML = t.message;
$(e).modal("hide");
$(r).modal("show")
} else
registerPopup({
content: t.message
})
}
}
,
error: n
})
}
}
);
t && (t.addEventListener("submit", n => {
n.preventDefault(),
t.submit()
}
),
t.addEventListener("keydown", n => {
n.key === "Enter" && (n.preventDefault(),
i.click())
}
))
}
;
window.initializeLoginOtpPopupButton()
}
);
window.addEventListener("DOMContentLoaded", () => {
$("body").on("click", "[data-require-login]", function(n) {
if (n.preventDefault(),
document.body.dataset.loggedIn === "true") {
const n = this.dataset.requireLogin;
n && (window.location.href = n);
return
}
$(".modal").modal("hide");
$("#login_modal").modal("show")
})
}
);