Created
April 29, 2021 15:40
-
-
Save swapnilshrikhande/ae42b70d46e6c93fa9075d492bcddec9 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ | |
!function (e, t) { | |
'use strict'; | |
'object' == typeof module && 'object' == typeof module.exports ? module.exports = e.document ? t(e, !0) : function (e) { | |
if (!e.document) throw new Error('jQuery requires a window with a document'); | |
return t(e) | |
} | |
: t(e) | |
}('undefined' != typeof window ? window : this, function (C, e) { | |
'use strict'; | |
var t = [ | |
], | |
r = Object.getPrototypeOf, | |
s = t.slice, | |
g = t.flat ? function (e) { | |
return t.flat.call(e) | |
} | |
: function (e) { | |
return t.concat.apply([], e) | |
}, | |
u = t.push, | |
i = t.indexOf, | |
n = { | |
}, | |
o = n.toString, | |
v = n.hasOwnProperty, | |
a = v.toString, | |
l = a.call(Object), | |
y = { | |
}, | |
m = function (e) { | |
return 'function' == typeof e && 'number' != typeof e.nodeType | |
}, | |
x = function (e) { | |
return null != e && e === e.window | |
}, | |
E = C.document, | |
c = { | |
type: !0, | |
src: !0, | |
nonce: !0, | |
noModule: !0 | |
}; | |
function b(e, t, n) { | |
var r, | |
i, | |
o = (n = n || E).createElement('script'); | |
if (o.text = e, t) for (r in c) (i = t[r] || t.getAttribute && t.getAttribute(r)) && o.setAttribute(r, i); | |
n.head.appendChild(o).parentNode.removeChild(o) | |
} | |
function w(e) { | |
return null == e ? e + '' : 'object' == typeof e || 'function' == typeof e ? n[o.call(e)] || 'object' : typeof e | |
} | |
var f = '3.5.1', | |
S = function (e, t) { | |
return new S.fn.init(e, t) | |
}; | |
function p(e) { | |
var t = !!e && 'length' in e && e.length, | |
n = w(e); | |
return !m(e) && !x(e) && ('array' === n || 0 === t || 'number' == typeof t && 0 < t && t - 1 in e) | |
} | |
S.fn = S.prototype = { | |
jquery: f, | |
constructor: S, | |
length: 0, | |
toArray: function () { | |
return s.call(this) | |
}, | |
get: function (e) { | |
return null == e ? s.call(this) : e < 0 ? this[e + this.length] : this[e] | |
}, | |
pushStack: function (e) { | |
var t = S.merge(this.constructor(), e); | |
return t.prevObject = this, | |
t | |
}, | |
each: function (e) { | |
return S.each(this, e) | |
}, | |
map: function (n) { | |
return this.pushStack(S.map(this, function (e, t) { | |
return n.call(e, t, e) | |
})) | |
}, | |
slice: function () { | |
return this.pushStack(s.apply(this, arguments)) | |
}, | |
first: function () { | |
return this.eq(0) | |
}, | |
last: function () { | |
return this.eq( - 1) | |
}, | |
even: function () { | |
return this.pushStack(S.grep(this, function (e, t) { | |
return (t + 1) % 2 | |
})) | |
}, | |
odd: function () { | |
return this.pushStack(S.grep(this, function (e, t) { | |
return t % 2 | |
})) | |
}, | |
eq: function (e) { | |
var t = this.length, | |
n = + e + (e < 0 ? t : 0); | |
return this.pushStack(0 <= n && n < t ? [ | |
this[n] | |
] : [ | |
]) | |
}, | |
end: function () { | |
return this.prevObject || this.constructor() | |
}, | |
push: u, | |
sort: t.sort, | |
splice: t.splice | |
}, | |
S.extend = S.fn.extend = function () { | |
var e, | |
t, | |
n, | |
r, | |
i, | |
o, | |
a = arguments[0] || { | |
}, | |
s = 1, | |
u = arguments.length, | |
l = !1; | |
for ('boolean' == typeof a && (l = a, a = arguments[s] || { | |
}, s++), 'object' == typeof a || m(a) || (a = { | |
}), s === u && (a = this, s--); s < u; s++) if (null != (e = arguments[s])) for (t in e) r = e[t], | |
'__proto__' !== t && a !== r && (l && r && (S.isPlainObject(r) || (i = Array.isArray(r))) ? (n = a[t], o = i && !Array.isArray(n) ? [ | |
] : i || S.isPlainObject(n) ? n : { | |
}, i = !1, a[t] = S.extend(l, o, r)) : void 0 !== r && (a[t] = r)); | |
return a | |
}, | |
S.extend({ | |
expando: 'jQuery' + (f + Math.random()).replace(/\D/g, ''), | |
isReady: !0, | |
error: function (e) { | |
throw new Error(e) | |
}, | |
noop: function () { | |
}, | |
isPlainObject: function (e) { | |
var t, | |
n; | |
return !(!e || '[object Object]' !== o.call(e)) && (!(t = r(e)) || 'function' == typeof (n = v.call(t, 'constructor') && t.constructor) && a.call(n) === l) | |
}, | |
isEmptyObject: function (e) { | |
var t; | |
for (t in e) return !1; | |
return !0 | |
}, | |
globalEval: function (e, t, n) { | |
b(e, { | |
nonce: t && t.nonce | |
}, n) | |
}, | |
each: function (e, t) { | |
var n, | |
r = 0; | |
if (p(e)) { | |
for (n = e.length; r < n; r++) if (!1 === t.call(e[r], r, e[r])) break | |
} else for (r in e) if (!1 === t.call(e[r], r, e[r])) break; | |
return e | |
}, | |
makeArray: function (e, t) { | |
var n = t || [ | |
]; | |
return null != e && (p(Object(e)) ? S.merge(n, 'string' == typeof e ? [ | |
e | |
] : e) : u.call(n, e)), | |
n | |
}, | |
inArray: function (e, t, n) { | |
return null == t ? - 1 : i.call(t, e, n) | |
}, | |
merge: function (e, t) { | |
for (var n = + t.length, r = 0, i = e.length; r < n; r++) e[i++] = t[r]; | |
return e.length = i, | |
e | |
}, | |
grep: function (e, t, n) { | |
for (var r = [ | |
], i = 0, o = e.length, a = !n; i < o; i++) !t(e[i], i) !== a && r.push(e[i]); | |
return r | |
}, | |
map: function (e, t, n) { | |
var r, | |
i, | |
o = 0, | |
a = [ | |
]; | |
if (p(e)) for (r = e.length; o < r; o++) null != (i = t(e[o], o, n)) && a.push(i); | |
else for (o in e) null != (i = t(e[o], o, n)) && a.push(i); | |
return g(a) | |
}, | |
guid: 1, | |
support: y | |
}), | |
'function' == typeof Symbol && (S.fn[Symbol.iterator] = t[Symbol.iterator]), | |
S.each('Boolean Number String Function Array Date RegExp Object Error Symbol'.split(' '), function (e, t) { | |
n['[object ' + t + ']'] = t.toLowerCase() | |
}); | |
var d = function (n) { | |
var e, | |
d, | |
b, | |
o, | |
i, | |
h, | |
f, | |
g, | |
w, | |
u, | |
l, | |
T, | |
C, | |
a, | |
E, | |
v, | |
s, | |
c, | |
y, | |
S = 'sizzle' + 1 * new Date, | |
p = n.document, | |
k = 0, | |
r = 0, | |
m = ue(), | |
x = ue(), | |
A = ue(), | |
N = ue(), | |
D = function (e, t) { | |
return e === t && (l = !0), | |
0 | |
}, | |
j = { | |
}.hasOwnProperty, | |
t = [ | |
], | |
q = t.pop, | |
L = t.push, | |
H = t.push, | |
O = t.slice, | |
P = function (e, t) { | |
for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; | |
return - 1 | |
}, | |
R = 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped', | |
M = '[\\x20\\t\\r\\n\\f]', | |
I = '(?:\\\\[\\da-fA-F]{1,6}' + M + '?|\\\\[^\\r\\n\\f]|[\\w-]|[^\x00-\\x7f])+', | |
W = '\\[' + M + '*(' + I + ')(?:' + M + '*([*^$|!~]?=)' + M + '*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|(' + I + '))|)' + M + '*\\]', | |
F = ':(' + I + ')(?:\\(((\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|' + W + ')*)|.*)\\)|)', | |
B = new RegExp(M + '+', 'g'), | |
$ = new RegExp('^' + M + '+|((?:^|[^\\\\])(?:\\\\.)*)' + M + '+$', 'g'), | |
_ = new RegExp('^' + M + '*,' + M + '*'), | |
z = new RegExp('^' + M + '*([>+~]|' + M + ')' + M + '*'), | |
U = new RegExp(M + '|>'), | |
X = new RegExp(F), | |
V = new RegExp('^' + I + '$'), | |
G = { | |
ID: new RegExp('^#(' + I + ')'), | |
CLASS: new RegExp('^\\.(' + I + ')'), | |
TAG: new RegExp('^(' + I + '|[*])'), | |
ATTR: new RegExp('^' + W), | |
PSEUDO: new RegExp('^' + F), | |
CHILD: new RegExp('^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' + M + '*(even|odd|(([+-]|)(\\d*)n|)' + M + '*(?:([+-]|)' + M + '*(\\d+)|))' + M + '*\\)|)', 'i'), | |
bool: new RegExp('^(?:' + R + ')$', 'i'), | |
needsContext: new RegExp('^' + M + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + M + '*((?:-\\d)?\\d*)' + M + '*\\)|)(?=[^-]|$)', 'i') | |
}, | |
Y = /HTML$/i, | |
Q = /^(?:input|select|textarea|button)$/i, | |
J = /^h\d$/i, | |
K = /^[^{]+\{\s*\[native \w/, | |
Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, | |
ee = /[+~]/, | |
te = new RegExp('\\\\[\\da-fA-F]{1,6}' + M + '?|\\\\([^\\r\\n\\f])', 'g'), | |
ne = function (e, t) { | |
var n = '0x' + e.slice(1) - 65536; | |
return t || (n < 0 ? String.fromCharCode(n + 65536) : String.fromCharCode(n >> 10 | 55296, 1023 & n | 56320)) | |
}, | |
re = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, | |
ie = function (e, t) { | |
return t ? '\x00' === e ? '�' : e.slice(0, - 1) + '\\' + e.charCodeAt(e.length - 1).toString(16) + ' ' : '\\' + e | |
}, | |
oe = function () { | |
T() | |
}, | |
ae = be(function (e) { | |
return !0 === e.disabled && 'fieldset' === e.nodeName.toLowerCase() | |
}, { | |
dir: 'parentNode', | |
next: 'legend' | |
}); | |
try { | |
H.apply(t = O.call(p.childNodes), p.childNodes), | |
t[p.childNodes.length].nodeType | |
} catch (e) { | |
H = { | |
apply: t.length ? function (e, t) { | |
L.apply(e, O.call(t)) | |
} | |
: function (e, t) { | |
var n = e.length, | |
r = 0; | |
while (e[n++] = t[r++]); | |
e.length = n - 1 | |
} | |
} | |
} | |
function se(t, e, n, r) { | |
var i, | |
o, | |
a, | |
s, | |
u, | |
l, | |
c, | |
f = e && e.ownerDocument, | |
p = e ? e.nodeType : 9; | |
if (n = n || [ | |
], 'string' != typeof t || !t || 1 !== p && 9 !== p && 11 !== p) return n; | |
if (!r && (T(e), e = e || C, E)) { | |
if (11 !== p && (u = Z.exec(t))) if (i = u[1]) { | |
if (9 === p) { | |
if (!(a = e.getElementById(i))) return n; | |
if (a.id === i) return n.push(a), | |
n | |
} else if (f && (a = f.getElementById(i)) && y(e, a) && a.id === i) return n.push(a), | |
n | |
} else { | |
if (u[2]) return H.apply(n, e.getElementsByTagName(t)), | |
n; | |
if ((i = u[3]) && d.getElementsByClassName && e.getElementsByClassName) return H.apply(n, e.getElementsByClassName(i)), | |
n | |
} | |
if (d.qsa && !N[t + ' '] && (!v || !v.test(t)) && (1 !== p || 'object' !== e.nodeName.toLowerCase())) { | |
if (c = t, f = e, 1 === p && (U.test(t) || z.test(t))) { | |
(f = ee.test(t) && ye(e.parentNode) || e) === e && d.scope || ((s = e.getAttribute('id')) ? s = s.replace(re, ie) : e.setAttribute('id', s = S)), | |
o = (l = h(t)).length; | |
while (o--) l[o] = (s ? '#' + s : ':scope') + ' ' + xe(l[o]); | |
c = l.join(',') | |
} | |
try { | |
return H.apply(n, f.querySelectorAll(c)), | |
n | |
} catch (e) { | |
N(t, !0) | |
} finally { | |
s === S && e.removeAttribute('id') | |
} | |
} | |
} | |
return g(t.replace($, '$1'), e, n, r) | |
} | |
function ue() { | |
var r = [ | |
]; | |
return function e(t, n) { | |
return r.push(t + ' ') > b.cacheLength && delete e[r.shift()], | |
e[t + ' '] = n | |
} | |
} | |
function le(e) { | |
return e[S] = !0, | |
e | |
} | |
function ce(e) { | |
var t = C.createElement('fieldset'); | |
try { | |
return !!e(t) | |
} catch (e) { | |
return !1 | |
} finally { | |
t.parentNode && t.parentNode.removeChild(t), | |
t = null | |
} | |
} | |
function fe(e, t) { | |
var n = e.split('|'), | |
r = n.length; | |
while (r--) b.attrHandle[n[r]] = t | |
} | |
function pe(e, t) { | |
var n = t && e, | |
r = n && 1 === e.nodeType && 1 === t.nodeType && e.sourceIndex - t.sourceIndex; | |
if (r) return r; | |
if (n) while (n = n.nextSibling) if (n === t) return - 1; | |
return e ? 1 : - 1 | |
} | |
function de(t) { | |
return function (e) { | |
return 'input' === e.nodeName.toLowerCase() && e.type === t | |
} | |
} | |
function he(n) { | |
return function (e) { | |
var t = e.nodeName.toLowerCase(); | |
return ('input' === t || 'button' === t) && e.type === n | |
} | |
} | |
function ge(t) { | |
return function (e) { | |
return 'form' in e ? e.parentNode && !1 === e.disabled ? 'label' in e ? 'label' in e.parentNode ? e.parentNode.disabled === t : e.disabled === t : e.isDisabled === t || e.isDisabled !== !t && ae(e) === t : e.disabled === t : 'label' in e && e.disabled === t | |
} | |
} | |
function ve(a) { | |
return le(function (o) { | |
return o = + o, | |
le(function (e, t) { | |
var n, | |
r = a([], e.length, o), | |
i = r.length; | |
while (i--) e[n = r[i]] && (e[n] = !(t[n] = e[n])) | |
}) | |
}) | |
} | |
function ye(e) { | |
return e && 'undefined' != typeof e.getElementsByTagName && e | |
} | |
for (e in d = se.support = { | |
}, i = se.isXML = function (e) { | |
var t = e.namespaceURI, | |
n = (e.ownerDocument || e).documentElement; | |
return !Y.test(t || n && n.nodeName || 'HTML') | |
}, T = se.setDocument = function (e) { | |
var t, | |
n, | |
r = e ? e.ownerDocument || e : p; | |
return r != C && 9 === r.nodeType && r.documentElement && (a = (C = r).documentElement, E = !i(C), p != C && (n = C.defaultView) && n.top !== n && (n.addEventListener ? n.addEventListener('unload', oe, !1) : n.attachEvent && n.attachEvent('onunload', oe)), d.scope = ce(function (e) { | |
return a.appendChild(e).appendChild(C.createElement('div')), | |
'undefined' != typeof e.querySelectorAll && !e.querySelectorAll(':scope fieldset div').length | |
}), d.attributes = ce(function (e) { | |
return e.className = 'i', | |
!e.getAttribute('className') | |
}), d.getElementsByTagName = ce(function (e) { | |
return e.appendChild(C.createComment('')), | |
!e.getElementsByTagName('*').length | |
}), d.getElementsByClassName = K.test(C.getElementsByClassName), d.getById = ce(function (e) { | |
return a.appendChild(e).id = S, | |
!C.getElementsByName || !C.getElementsByName(S).length | |
}), d.getById ? (b.filter.ID = function (e) { | |
var t = e.replace(te, ne); | |
return function (e) { | |
return e.getAttribute('id') === t | |
} | |
}, b.find.ID = function (e, t) { | |
if ('undefined' != typeof t.getElementById && E) { | |
var n = t.getElementById(e); | |
return n ? [ | |
n | |
] : [ | |
] | |
} | |
}) : (b.filter.ID = function (e) { | |
var n = e.replace(te, ne); | |
return function (e) { | |
var t = 'undefined' != typeof e.getAttributeNode && e.getAttributeNode('id'); | |
return t && t.value === n | |
} | |
}, b.find.ID = function (e, t) { | |
if ('undefined' != typeof t.getElementById && E) { | |
var n, | |
r, | |
i, | |
o = t.getElementById(e); | |
if (o) { | |
if ((n = o.getAttributeNode('id')) && n.value === e) return [o]; | |
i = t.getElementsByName(e), | |
r = 0; | |
while (o = i[r++]) if ((n = o.getAttributeNode('id')) && n.value === e) return [o] | |
} | |
return [] | |
} | |
}), b.find.TAG = d.getElementsByTagName ? function (e, t) { | |
return 'undefined' != typeof t.getElementsByTagName ? t.getElementsByTagName(e) : d.qsa ? t.querySelectorAll(e) : void 0 | |
} | |
: function (e, t) { | |
var n, | |
r = [ | |
], | |
i = 0, | |
o = t.getElementsByTagName(e); | |
if ('*' === e) { | |
while (n = o[i++]) 1 === n.nodeType && r.push(n); | |
return r | |
} | |
return o | |
}, b.find.CLASS = d.getElementsByClassName && function (e, t) { | |
if ('undefined' != typeof t.getElementsByClassName && E) return t.getElementsByClassName(e) | |
}, s = [ | |
], v = [ | |
], (d.qsa = K.test(C.querySelectorAll)) && (ce(function (e) { | |
var t; | |
a.appendChild(e).innerHTML = '<a id=\'' + S + '\'></a><select id=\'' + S + '-\r\\\' msallowcapture=\'\'><option selected=\'\'></option></select>', | |
e.querySelectorAll('[msallowcapture^=\'\']').length && v.push('[*^$]=' + M + '*(?:\'\'|"")'), | |
e.querySelectorAll('[selected]').length || v.push('\\[' + M + '*(?:value|' + R + ')'), | |
e.querySelectorAll('[id~=' + S + '-]').length || v.push('~='), | |
(t = C.createElement('input')).setAttribute('name', ''), | |
e.appendChild(t), | |
e.querySelectorAll('[name=\'\']').length || v.push('\\[' + M + '*name' + M + '*=' + M + '*(?:\'\'|"")'), | |
e.querySelectorAll(':checked').length || v.push(':checked'), | |
e.querySelectorAll('a#' + S + '+*').length || v.push('.#.+[+~]'), | |
e.querySelectorAll('\\\f'), | |
v.push('[\\r\\n\\f]') | |
}), ce(function (e) { | |
e.innerHTML = '<a href=\'\' disabled=\'disabled\'></a><select disabled=\'disabled\'><option/></select>'; | |
var t = C.createElement('input'); | |
t.setAttribute('type', 'hidden'), | |
e.appendChild(t).setAttribute('name', 'D'), | |
e.querySelectorAll('[name=d]').length && v.push('name' + M + '*[*^$|!~]?='), | |
2 !== e.querySelectorAll(':enabled').length && v.push(':enabled', ':disabled'), | |
a.appendChild(e).disabled = !0, | |
2 !== e.querySelectorAll(':disabled').length && v.push(':enabled', ':disabled'), | |
e.querySelectorAll('*,:x'), | |
v.push(',.*:') | |
})), (d.matchesSelector = K.test(c = a.matches || a.webkitMatchesSelector || a.mozMatchesSelector || a.oMatchesSelector || a.msMatchesSelector)) && ce(function (e) { | |
d.disconnectedMatch = c.call(e, '*'), | |
c.call(e, '[s!=\'\']:x'), | |
s.push('!=', F) | |
}), v = v.length && new RegExp(v.join('|')), s = s.length && new RegExp(s.join('|')), t = K.test(a.compareDocumentPosition), y = t || K.test(a.contains) ? function (e, t) { | |
var n = 9 === e.nodeType ? e.documentElement : e, | |
r = t && t.parentNode; | |
return e === r || !(!r || 1 !== r.nodeType || !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r))) | |
} | |
: function (e, t) { | |
if (t) while (t = t.parentNode) if (t === e) return !0; | |
return !1 | |
}, D = t ? function (e, t) { | |
if (e === t) return l = !0, | |
0; | |
var n = !e.compareDocumentPosition - !t.compareDocumentPosition; | |
return n || (1 & (n = (e.ownerDocument || e) == (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1) || !d.sortDetached && t.compareDocumentPosition(e) === n ? e == C || e.ownerDocument == p && y(p, e) ? - 1 : t == C || t.ownerDocument == p && y(p, t) ? 1 : u ? P(u, e) - P(u, t) : 0 : 4 & n ? - 1 : 1) | |
} | |
: function (e, t) { | |
if (e === t) return l = !0, | |
0; | |
var n, | |
r = 0, | |
i = e.parentNode, | |
o = t.parentNode, | |
a = [ | |
e | |
], | |
s = [ | |
t | |
]; | |
if (!i || !o) return e == C ? - 1 : t == C ? 1 : i ? - 1 : o ? 1 : u ? P(u, e) - P(u, t) : 0; | |
if (i === o) return pe(e, t); | |
n = e; | |
while (n = n.parentNode) a.unshift(n); | |
n = t; | |
while (n = n.parentNode) s.unshift(n); | |
while (a[r] === s[r]) r++; | |
return r ? pe(a[r], s[r]) : a[r] == p ? - 1 : s[r] == p ? 1 : 0 | |
}), | |
C | |
}, se.matches = function (e, t) { | |
return se(e, null, null, t) | |
}, se.matchesSelector = function (e, t) { | |
if (T(e), d.matchesSelector && E && !N[t + ' '] && (!s || !s.test(t)) && (!v || !v.test(t))) try { | |
var n = c.call(e, t); | |
if (n || d.disconnectedMatch || e.document && 11 !== e.document.nodeType) return n | |
} catch (e) { | |
N(t, !0) | |
} | |
return 0 < se(t, C, null, [ | |
e | |
]).length | |
}, se.contains = function (e, t) { | |
return (e.ownerDocument || e) != C && T(e), | |
y(e, t) | |
}, se.attr = function (e, t) { | |
(e.ownerDocument || e) != C && T(e); | |
var n = b.attrHandle[t.toLowerCase()], | |
r = n && j.call(b.attrHandle, t.toLowerCase()) ? n(e, t, !E) : void 0; | |
return void 0 !== r ? r : d.attributes || !E ? e.getAttribute(t) : (r = e.getAttributeNode(t)) && r.specified ? r.value : null | |
}, se.escape = function (e) { | |
return (e + '').replace(re, ie) | |
}, se.error = function (e) { | |
throw new Error('Syntax error, unrecognized expression: ' + e) | |
}, se.uniqueSort = function (e) { | |
var t, | |
n = [ | |
], | |
r = 0, | |
i = 0; | |
if (l = !d.detectDuplicates, u = !d.sortStable && e.slice(0), e.sort(D), l) { | |
while (t = e[i++]) t === e[i] && (r = n.push(i)); | |
while (r--) e.splice(n[r], 1) | |
} | |
return u = null, | |
e | |
}, o = se.getText = function (e) { | |
var t, | |
n = '', | |
r = 0, | |
i = e.nodeType; | |
if (i) { | |
if (1 === i || 9 === i || 11 === i) { | |
if ('string' == typeof e.textContent) return e.textContent; | |
for (e = e.firstChild; e; e = e.nextSibling) n += o(e) | |
} else if (3 === i || 4 === i) return e.nodeValue | |
} else while (t = e[r++]) n += o(t); | |
return n | |
}, (b = se.selectors = { | |
cacheLength: 50, | |
createPseudo: le, | |
match: G, | |
attrHandle: { | |
}, | |
find: { | |
}, | |
relative: { | |
'>': { | |
dir: 'parentNode', | |
first: !0 | |
}, | |
' ': { | |
dir: 'parentNode' | |
}, | |
'+': { | |
dir: 'previousSibling', | |
first: !0 | |
}, | |
'~': { | |
dir: 'previousSibling' | |
} | |
}, | |
preFilter: { | |
ATTR: function (e) { | |
return e[1] = e[1].replace(te, ne), | |
e[3] = (e[3] || e[4] || e[5] || '').replace(te, ne), | |
'~=' === e[2] && (e[3] = ' ' + e[3] + ' '), | |
e.slice(0, 4) | |
}, | |
CHILD: function (e) { | |
return e[1] = e[1].toLowerCase(), | |
'nth' === e[1].slice(0, 3) ? (e[3] || se.error(e[0]), e[4] = + (e[4] ? e[5] + (e[6] || 1) : 2 * ('even' === e[3] || 'odd' === e[3])), e[5] = + (e[7] + e[8] || 'odd' === e[3])) : e[3] && se.error(e[0]), | |
e | |
}, | |
PSEUDO: function (e) { | |
var t, | |
n = !e[6] && e[2]; | |
return G.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || '' : n && X.test(n) && (t = h(n, !0)) && (t = n.indexOf(')', n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3)) | |
} | |
}, | |
filter: { | |
TAG: function (e) { | |
var t = e.replace(te, ne).toLowerCase(); | |
return '*' === e ? function () { | |
return !0 | |
} | |
: function (e) { | |
return e.nodeName && e.nodeName.toLowerCase() === t | |
} | |
}, | |
CLASS: function (e) { | |
var t = m[e + ' ']; | |
return t || (t = new RegExp('(^|' + M + ')' + e + '(' + M + '|$)')) && m(e, function (e) { | |
return t.test('string' == typeof e.className && e.className || 'undefined' != typeof e.getAttribute && e.getAttribute('class') || '') | |
}) | |
}, | |
ATTR: function (n, r, i) { | |
return function (e) { | |
var t = se.attr(e, n); | |
return null == t ? '!=' === r : !r || (t += '', '=' === r ? t === i : '!=' === r ? t !== i : '^=' === r ? i && 0 === t.indexOf(i) : '*=' === r ? i && - 1 < t.indexOf(i) : '$=' === r ? i && t.slice( - i.length) === i : '~=' === r ? - 1 < (' ' + t.replace(B, ' ') + ' ').indexOf(i) : '|=' === r && (t === i || t.slice(0, i.length + 1) === i + '-')) | |
} | |
}, | |
CHILD: function (h, e, t, g, v) { | |
var y = 'nth' !== h.slice(0, 3), | |
m = 'last' !== h.slice( - 4), | |
x = 'of-type' === e; | |
return 1 === g && 0 === v ? function (e) { | |
return !!e.parentNode | |
} | |
: function (e, t, n) { | |
var r, | |
i, | |
o, | |
a, | |
s, | |
u, | |
l = y !== m ? 'nextSibling' : 'previousSibling', | |
c = e.parentNode, | |
f = x && e.nodeName.toLowerCase(), | |
p = !n && !x, | |
d = !1; | |
if (c) { | |
if (y) { | |
while (l) { | |
a = e; | |
while (a = a[l]) if (x ? a.nodeName.toLowerCase() === f : 1 === a.nodeType) return !1; | |
u = l = 'only' === h && !u && 'nextSibling' | |
} | |
return !0 | |
} | |
if (u = [ | |
m ? c.firstChild : c.lastChild | |
], m && p) { | |
d = (s = (r = (i = (o = (a = c) [S] || (a[S] = { | |
})) [a.uniqueID] || (o[a.uniqueID] = { | |
})) [h] || [ | |
]) [0] === k && r[1]) && r[2], | |
a = s && c.childNodes[s]; | |
while (a = ++s && a && a[l] || (d = s = 0) || u.pop()) if (1 === a.nodeType && ++d && a === e) { | |
i[h] = [ | |
k, | |
s, | |
d | |
]; | |
break | |
} | |
} else if (p && (d = s = (r = (i = (o = (a = e) [S] || (a[S] = { | |
})) [a.uniqueID] || (o[a.uniqueID] = { | |
})) [h] || [ | |
]) [0] === k && r[1]), !1 === d) while (a = ++s && a && a[l] || (d = s = 0) || u.pop()) if ((x ? a.nodeName.toLowerCase() === f : 1 === a.nodeType) && ++d && (p && ((i = (o = a[S] || (a[S] = { | |
})) [a.uniqueID] || (o[a.uniqueID] = { | |
})) [h] = [ | |
k, | |
d | |
]), a === e)) break; | |
return (d -= v) === g || d % g == 0 && 0 <= d / g | |
} | |
} | |
}, | |
PSEUDO: function (e, o) { | |
var t, | |
a = b.pseudos[e] || b.setFilters[e.toLowerCase()] || se.error('unsupported pseudo: ' + e); | |
return a[S] ? a(o) : 1 < a.length ? (t = [ | |
e, | |
e, | |
'', | |
o | |
], b.setFilters.hasOwnProperty(e.toLowerCase()) ? le(function (e, t) { | |
var n, | |
r = a(e, o), | |
i = r.length; | |
while (i--) e[n = P(e, r[i])] = !(t[n] = r[i]) | |
}) : function (e) { | |
return a(e, 0, t) | |
}) : a | |
} | |
}, | |
pseudos: { | |
not: le(function (e) { | |
var r = [ | |
], | |
i = [ | |
], | |
s = f(e.replace($, '$1')); | |
return s[S] ? le(function (e, t, n, r) { | |
var i, | |
o = s(e, null, r, [ | |
]), | |
a = e.length; | |
while (a--) (i = o[a]) && (e[a] = !(t[a] = i)) | |
}) : function (e, t, n) { | |
return r[0] = e, | |
s(r, null, n, i), | |
r[0] = null, | |
!i.pop() | |
} | |
}), | |
has: le(function (t) { | |
return function (e) { | |
return 0 < se(t, e).length | |
} | |
}), | |
contains: le(function (t) { | |
return t = t.replace(te, ne), | |
function (e) { | |
return - 1 < (e.textContent || o(e)).indexOf(t) | |
} | |
}), | |
lang: le(function (n) { | |
return V.test(n || '') || se.error('unsupported lang: ' + n), | |
n = n.replace(te, ne).toLowerCase(), | |
function (e) { | |
var t; | |
do { | |
if (t = E ? e.lang : e.getAttribute('xml:lang') || e.getAttribute('lang')) return (t = t.toLowerCase()) === n || 0 === t.indexOf(n + '-') | |
} while ((e = e.parentNode) && 1 === e.nodeType); | |
return !1 | |
} | |
}), | |
target: function (e) { | |
var t = n.location && n.location.hash; | |
return t && t.slice(1) === e.id | |
}, | |
root: function (e) { | |
return e === a | |
}, | |
focus: function (e) { | |
return e === C.activeElement && (!C.hasFocus || C.hasFocus()) && !!(e.type || e.href || ~e.tabIndex) | |
}, | |
enabled: ge(!1), | |
disabled: ge(!0), | |
checked: function (e) { | |
var t = e.nodeName.toLowerCase(); | |
return 'input' === t && !!e.checked || 'option' === t && !!e.selected | |
}, | |
selected: function (e) { | |
return e.parentNode && e.parentNode.selectedIndex, | |
!0 === e.selected | |
}, | |
empty: function (e) { | |
for (e = e.firstChild; e; e = e.nextSibling) if (e.nodeType < 6) return !1; | |
return !0 | |
}, | |
parent: function (e) { | |
return !b.pseudos.empty(e) | |
}, | |
header: function (e) { | |
return J.test(e.nodeName) | |
}, | |
input: function (e) { | |
return Q.test(e.nodeName) | |
}, | |
button: function (e) { | |
var t = e.nodeName.toLowerCase(); | |
return 'input' === t && 'button' === e.type || 'button' === t | |
}, | |
text: function (e) { | |
var t; | |
return 'input' === e.nodeName.toLowerCase() && 'text' === e.type && (null == (t = e.getAttribute('type')) || 'text' === t.toLowerCase()) | |
}, | |
first: ve(function () { | |
return [0] | |
}), | |
last: ve(function (e, t) { | |
return [t - 1] | |
}), | |
eq: ve(function (e, t, n) { | |
return [n < 0 ? n + t : n] | |
}), | |
even: ve(function (e, t) { | |
for (var n = 0; n < t; n += 2) e.push(n); | |
return e | |
}), | |
odd: ve(function (e, t) { | |
for (var n = 1; n < t; n += 2) e.push(n); | |
return e | |
}), | |
lt: ve(function (e, t, n) { | |
for (var r = n < 0 ? n + t : t < n ? t : n; 0 <= --r; ) e.push(r); | |
return e | |
}), | |
gt: ve(function (e, t, n) { | |
for (var r = n < 0 ? n + t : n; ++r < t; ) e.push(r); | |
return e | |
}) | |
} | |
}).pseudos.nth = b.pseudos.eq, { | |
radio: !0, | |
checkbox: !0, | |
file: !0, | |
password: !0, | |
image: !0 | |
}) b.pseudos[e] = de(e); | |
for (e in { | |
submit: !0, | |
reset: !0 | |
}) b.pseudos[e] = he(e); | |
function me() { | |
} | |
function xe(e) { | |
for (var t = 0, n = e.length, r = ''; t < n; t++) r += e[t].value; | |
return r | |
} | |
function be(s, e, t) { | |
var u = e.dir, | |
l = e.next, | |
c = l || u, | |
f = t && 'parentNode' === c, | |
p = r++; | |
return e.first ? function (e, t, n) { | |
while (e = e[u]) if (1 === e.nodeType || f) return s(e, t, n); | |
return !1 | |
} | |
: function (e, t, n) { | |
var r, | |
i, | |
o, | |
a = [ | |
k, | |
p | |
]; | |
if (n) { | |
while (e = e[u]) if ((1 === e.nodeType || f) && s(e, t, n)) return !0 | |
} else while (e = e[u]) if (1 === e.nodeType || f) if (i = (o = e[S] || (e[S] = { | |
})) [e.uniqueID] || (o[e.uniqueID] = { | |
}), l && l === e.nodeName.toLowerCase()) e = e[u] || e; | |
else { | |
if ((r = i[c]) && r[0] === k && r[1] === p) return a[2] = r[2]; | |
if ((i[c] = a) [2] = s(e, t, n)) return !0 | |
} | |
return !1 | |
} | |
} | |
function we(i) { | |
return 1 < i.length ? function (e, t, n) { | |
var r = i.length; | |
while (r--) if (!i[r](e, t, n)) return !1; | |
return !0 | |
} | |
: i[0] | |
} | |
function Te(e, t, n, r, i) { | |
for (var o, a = [ | |
], s = 0, u = e.length, l = null != t; s < u; s++) (o = e[s]) && (n && !n(o, r, i) || (a.push(o), l && t.push(s))); | |
return a | |
} | |
function Ce(d, h, g, v, y, e) { | |
return v && !v[S] && (v = Ce(v)), | |
y && !y[S] && (y = Ce(y, e)), | |
le(function (e, t, n, r) { | |
var i, | |
o, | |
a, | |
s = [ | |
], | |
u = [ | |
], | |
l = t.length, | |
c = e || function (e, t, n) { | |
for (var r = 0, i = t.length; r < i; r++) se(e, t[r], n); | |
return n | |
}(h || '*', n.nodeType ? [ | |
n | |
] : n, [ | |
]), | |
f = !d || !e && h ? c : Te(c, s, d, n, r), | |
p = g ? y || (e ? d : l || v) ? [ | |
] : t : f; | |
if (g && g(f, p, n, r), v) { | |
i = Te(p, u), | |
v(i, [ | |
], n, r), | |
o = i.length; | |
while (o--) (a = i[o]) && (p[u[o]] = !(f[u[o]] = a)) | |
} | |
if (e) { | |
if (y || d) { | |
if (y) { | |
i = [ | |
], | |
o = p.length; | |
while (o--) (a = p[o]) && i.push(f[o] = a); | |
y(null, p = [ | |
], i, r) | |
} | |
o = p.length; | |
while (o--) (a = p[o]) && - 1 < (i = y ? P(e, a) : s[o]) && (e[i] = !(t[i] = a)) | |
} | |
} else p = Te(p === t ? p.splice(l, p.length) : p), | |
y ? y(null, t, p, r) : H.apply(t, p) | |
}) | |
} | |
function Ee(e) { | |
for (var i, t, n, r = e.length, o = b.relative[e[0].type], a = o || b.relative[' '], s = o ? 1 : 0, u = be(function (e) { | |
return e === i | |
}, a, !0), l = be(function (e) { | |
return - 1 < P(i, e) | |
}, a, !0), c = [ | |
function (e, t, n) { | |
var r = !o && (n || t !== w) || ((i = t).nodeType ? u(e, t, n) : l(e, t, n)); | |
return i = null, | |
r | |
} | |
]; s < r; s++) if (t = b.relative[e[s].type]) c = [ | |
be(we(c), t) | |
]; | |
else { | |
if ((t = b.filter[e[s].type].apply(null, e[s].matches)) [S]) { | |
for (n = ++s; n < r; n++) if (b.relative[e[n].type]) break; | |
return Ce(1 < s && we(c), 1 < s && xe(e.slice(0, s - 1).concat({ | |
value: ' ' === e[s - 2].type ? '*' : '' | |
})).replace($, '$1'), t, s < n && Ee(e.slice(s, n)), n < r && Ee(e = e.slice(n)), n < r && xe(e)) | |
} | |
c.push(t) | |
} | |
return we(c) | |
} | |
return me.prototype = b.filters = b.pseudos, | |
b.setFilters = new me, | |
h = se.tokenize = function (e, t) { | |
var n, | |
r, | |
i, | |
o, | |
a, | |
s, | |
u, | |
l = x[e + ' ']; | |
if (l) return t ? 0 : l.slice(0); | |
a = e, | |
s = [ | |
], | |
u = b.preFilter; | |
while (a) { | |
for (o in n && !(r = _.exec(a)) || (r && (a = a.slice(r[0].length) || a), s.push(i = [ | |
])), n = !1, (r = z.exec(a)) && (n = r.shift(), i.push({ | |
value: n, | |
type: r[0].replace($, ' ') | |
}), a = a.slice(n.length)), b.filter) !(r = G[o].exec(a)) || u[o] && !(r = u[o](r)) || (n = r.shift(), i.push({ | |
value: n, | |
type: o, | |
matches: r | |
}), a = a.slice(n.length)); | |
if (!n) break | |
} | |
return t ? a.length : a ? se.error(e) : x(e, s).slice(0) | |
}, | |
f = se.compile = function (e, t) { | |
var n, | |
v, | |
y, | |
m, | |
x, | |
r, | |
i = [ | |
], | |
o = [ | |
], | |
a = A[e + ' ']; | |
if (!a) { | |
t || (t = h(e)), | |
n = t.length; | |
while (n--) (a = Ee(t[n])) [S] ? i.push(a) : o.push(a); | |
(a = A(e, (v = o, m = 0 < (y = i).length, x = 0 < v.length, r = function (e, t, n, r, i) { | |
var o, | |
a, | |
s, | |
u = 0, | |
l = '0', | |
c = e && [ | |
], | |
f = [ | |
], | |
p = w, | |
d = e || x && b.find.TAG('*', i), | |
h = k += null == p ? 1 : Math.random() || 0.1, | |
g = d.length; | |
for (i && (w = t == C || t || i); l !== g && null != (o = d[l]); l++) { | |
if (x && o) { | |
a = 0, | |
t || o.ownerDocument == C || (T(o), n = !E); | |
while (s = v[a++]) if (s(o, t || C, n)) { | |
r.push(o); | |
break | |
} | |
i && (k = h) | |
} | |
m && ((o = !s && o) && u--, e && c.push(o)) | |
} | |
if (u += l, m && l !== u) { | |
a = 0; | |
while (s = y[a++]) s(c, f, t, n); | |
if (e) { | |
if (0 < u) while (l--) c[l] || f[l] || (f[l] = q.call(r)); | |
f = Te(f) | |
} | |
H.apply(r, f), | |
i && !e && 0 < f.length && 1 < u + y.length && se.uniqueSort(r) | |
} | |
return i && (k = h, w = p), | |
c | |
}, m ? le(r) : r))).selector = e | |
} | |
return a | |
}, | |
g = se.select = function (e, t, n, r) { | |
var i, | |
o, | |
a, | |
s, | |
u, | |
l = 'function' == typeof e && e, | |
c = !r && h(e = l.selector || e); | |
if (n = n || [ | |
], 1 === c.length) { | |
if (2 < (o = c[0] = c[0].slice(0)).length && 'ID' === (a = o[0]).type && 9 === t.nodeType && E && b.relative[o[1].type]) { | |
if (!(t = (b.find.ID(a.matches[0].replace(te, ne), t) || [ | |
]) [0])) return n; | |
l && (t = t.parentNode), | |
e = e.slice(o.shift().value.length) | |
} | |
i = G.needsContext.test(e) ? 0 : o.length; | |
while (i--) { | |
if (a = o[i], b.relative[s = a.type]) break; | |
if ((u = b.find[s]) && (r = u(a.matches[0].replace(te, ne), ee.test(o[0].type) && ye(t.parentNode) || t))) { | |
if (o.splice(i, 1), !(e = r.length && xe(o))) return H.apply(n, r), | |
n; | |
break | |
} | |
} | |
} | |
return (l || f(e, c)) (r, t, !E, n, !t || ee.test(e) && ye(t.parentNode) || t), | |
n | |
}, | |
d.sortStable = S.split('').sort(D).join('') === S, | |
d.detectDuplicates = !!l, | |
T(), | |
d.sortDetached = ce(function (e) { | |
return 1 & e.compareDocumentPosition(C.createElement('fieldset')) | |
}), | |
ce(function (e) { | |
return e.innerHTML = '<a href=\'#\'></a>', | |
'#' === e.firstChild.getAttribute('href') | |
}) || fe('type|href|height|width', function (e, t, n) { | |
if (!n) return e.getAttribute(t, 'type' === t.toLowerCase() ? 1 : 2) | |
}), | |
d.attributes && ce(function (e) { | |
return e.innerHTML = '<input/>', | |
e.firstChild.setAttribute('value', ''), | |
'' === e.firstChild.getAttribute('value') | |
}) || fe('value', function (e, t, n) { | |
if (!n && 'input' === e.nodeName.toLowerCase()) return e.defaultValue | |
}), | |
ce(function (e) { | |
return null == e.getAttribute('disabled') | |
}) || fe(R, function (e, t, n) { | |
var r; | |
if (!n) return !0 === e[t] ? t.toLowerCase() : (r = e.getAttributeNode(t)) && r.specified ? r.value : null | |
}), | |
se | |
}(C); | |
S.find = d, | |
S.expr = d.selectors, | |
S.expr[':'] = S.expr.pseudos, | |
S.uniqueSort = S.unique = d.uniqueSort, | |
S.text = d.getText, | |
S.isXMLDoc = d.isXML, | |
S.contains = d.contains, | |
S.escapeSelector = d.escape; | |
var h = function (e, t, n) { | |
var r = [ | |
], | |
i = void 0 !== n; | |
while ((e = e[t]) && 9 !== e.nodeType) if (1 === e.nodeType) { | |
if (i && S(e).is(n)) break; | |
r.push(e) | |
} | |
return r | |
}, | |
T = function (e, t) { | |
for (var n = [ | |
]; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e); | |
return n | |
}, | |
k = S.expr.match.needsContext; | |
function A(e, t) { | |
return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() | |
} | |
var N = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; | |
function D(e, n, r) { | |
return m(n) ? S.grep(e, function (e, t) { | |
return !!n.call(e, t, e) !== r | |
}) : n.nodeType ? S.grep(e, function (e) { | |
return e === n !== r | |
}) : 'string' != typeof n ? S.grep(e, function (e) { | |
return - 1 < i.call(n, e) !== r | |
}) : S.filter(n, e, r) | |
} | |
S.filter = function (e, t, n) { | |
var r = t[0]; | |
return n && (e = ':not(' + e + ')'), | |
1 === t.length && 1 === r.nodeType ? S.find.matchesSelector(r, e) ? [ | |
r | |
] : [ | |
] : S.find.matches(e, S.grep(t, function (e) { | |
return 1 === e.nodeType | |
})) | |
}, | |
S.fn.extend({ | |
find: function (e) { | |
var t, | |
n, | |
r = this.length, | |
i = this; | |
if ('string' != typeof e) return this.pushStack(S(e).filter(function () { | |
for (t = 0; t < r; t++) if (S.contains(i[t], this)) return !0 | |
})); | |
for (n = this.pushStack([]), t = 0; t < r; t++) S.find(e, i[t], n); | |
return 1 < r ? S.uniqueSort(n) : n | |
}, | |
filter: function (e) { | |
return this.pushStack(D(this, e || [ | |
], !1)) | |
}, | |
not: function (e) { | |
return this.pushStack(D(this, e || [ | |
], !0)) | |
}, | |
is: function (e) { | |
return !!D(this, 'string' == typeof e && k.test(e) ? S(e) : e || [ | |
], !1).length | |
} | |
}); | |
var j, | |
q = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/; | |
(S.fn.init = function (e, t, n) { | |
var r, | |
i; | |
if (!e) return this; | |
if (n = n || j, 'string' == typeof e) { | |
if (!(r = '<' === e[0] && '>' === e[e.length - 1] && 3 <= e.length ? [ | |
null, | |
e, | |
null | |
] : q.exec(e)) || !r[1] && t) return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e); | |
if (r[1]) { | |
if (t = t instanceof S ? t[0] : t, S.merge(this, S.parseHTML(r[1], t && t.nodeType ? t.ownerDocument || t : E, !0)), N.test(r[1]) && S.isPlainObject(t)) for (r in t) m(this[r]) ? this[r](t[r]) : this.attr(r, t[r]); | |
return this | |
} | |
return (i = E.getElementById(r[2])) && (this[0] = i, this.length = 1), | |
this | |
} | |
return e.nodeType ? (this[0] = e, this.length = 1, this) : m(e) ? void 0 !== n.ready ? n.ready(e) : e(S) : S.makeArray(e, this) | |
}).prototype = S.fn, | |
j = S(E); | |
var L = /^(?:parents|prev(?:Until|All))/, | |
H = { | |
children: !0, | |
contents: !0, | |
next: !0, | |
prev: !0 | |
}; | |
function O(e, t) { | |
while ((e = e[t]) && 1 !== e.nodeType); | |
return e | |
} | |
S.fn.extend({ | |
has: function (e) { | |
var t = S(e, this), | |
n = t.length; | |
return this.filter(function () { | |
for (var e = 0; e < n; e++) if (S.contains(this, t[e])) return !0 | |
}) | |
}, | |
closest: function (e, t) { | |
var n, | |
r = 0, | |
i = this.length, | |
o = [ | |
], | |
a = 'string' != typeof e && S(e); | |
if (!k.test(e)) for (; r < i; r++) for (n = this[r]; n && n !== t; n = n.parentNode) if (n.nodeType < 11 && (a ? - 1 < a.index(n) : 1 === n.nodeType && S.find.matchesSelector(n, e))) { | |
o.push(n); | |
break | |
} | |
return this.pushStack(1 < o.length ? S.uniqueSort(o) : o) | |
}, | |
index: function (e) { | |
return e ? 'string' == typeof e ? i.call(S(e), this[0]) : i.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : - 1 | |
}, | |
add: function (e, t) { | |
return this.pushStack(S.uniqueSort(S.merge(this.get(), S(e, t)))) | |
}, | |
addBack: function (e) { | |
return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) | |
} | |
}), | |
S.each({ | |
parent: function (e) { | |
var t = e.parentNode; | |
return t && 11 !== t.nodeType ? t : null | |
}, | |
parents: function (e) { | |
return h(e, 'parentNode') | |
}, | |
parentsUntil: function (e, t, n) { | |
return h(e, 'parentNode', n) | |
}, | |
next: function (e) { | |
return O(e, 'nextSibling') | |
}, | |
prev: function (e) { | |
return O(e, 'previousSibling') | |
}, | |
nextAll: function (e) { | |
return h(e, 'nextSibling') | |
}, | |
prevAll: function (e) { | |
return h(e, 'previousSibling') | |
}, | |
nextUntil: function (e, t, n) { | |
return h(e, 'nextSibling', n) | |
}, | |
prevUntil: function (e, t, n) { | |
return h(e, 'previousSibling', n) | |
}, | |
siblings: function (e) { | |
return T((e.parentNode || { | |
}).firstChild, e) | |
}, | |
children: function (e) { | |
return T(e.firstChild) | |
}, | |
contents: function (e) { | |
return null != e.contentDocument && r(e.contentDocument) ? e.contentDocument : (A(e, 'template') && (e = e.content || e), S.merge([], e.childNodes)) | |
} | |
}, function (r, i) { | |
S.fn[r] = function (e, t) { | |
var n = S.map(this, i, e); | |
return 'Until' !== r.slice( - 5) && (t = e), | |
t && 'string' == typeof t && (n = S.filter(t, n)), | |
1 < this.length && (H[r] || S.uniqueSort(n), L.test(r) && n.reverse()), | |
this.pushStack(n) | |
} | |
}); | |
var P = /[^\x20\t\r\n\f]+/g; | |
function R(e) { | |
return e | |
} | |
function M(e) { | |
throw e | |
} | |
function I(e, t, n, r) { | |
var i; | |
try { | |
e && m(i = e.promise) ? i.call(e).done(t).fail(n) : e && m(i = e.then) ? i.call(e, t, n) : t.apply(void 0, [ | |
e | |
].slice(r)) | |
} catch (e) { | |
n.apply(void 0, [ | |
e | |
]) | |
} | |
} | |
S.Callbacks = function (r) { | |
var e, | |
n; | |
r = 'string' == typeof r ? (e = r, n = { | |
}, S.each(e.match(P) || [ | |
], function (e, t) { | |
n[t] = !0 | |
}), n) : S.extend({ | |
}, r); | |
var i, | |
t, | |
o, | |
a, | |
s = [ | |
], | |
u = [ | |
], | |
l = - 1, | |
c = function () { | |
for (a = a || r.once, o = i = !0; u.length; l = - 1) { | |
t = u.shift(); | |
while (++l < s.length) !1 === s[l].apply(t[0], t[1]) && r.stopOnFalse && (l = s.length, t = !1) | |
} | |
r.memory || (t = !1), | |
i = !1, | |
a && (s = t ? [ | |
] : '') | |
}, | |
f = { | |
add: function () { | |
return s && (t && !i && (l = s.length - 1, u.push(t)), function n(e) { | |
S.each(e, function (e, t) { | |
m(t) ? r.unique && f.has(t) || s.push(t) : t && t.length && 'string' !== w(t) && n(t) | |
}) | |
}(arguments), t && !i && c()), | |
this | |
}, | |
remove: function () { | |
return S.each(arguments, function (e, t) { | |
var n; | |
while ( - 1 < (n = S.inArray(t, s, n))) s.splice(n, 1), | |
n <= l && l-- | |
}), | |
this | |
}, | |
has: function (e) { | |
return e ? - 1 < S.inArray(e, s) : 0 < s.length | |
}, | |
empty: function () { | |
return s && (s = [ | |
]), | |
this | |
}, | |
disable: function () { | |
return a = u = [ | |
], | |
s = t = '', | |
this | |
}, | |
disabled: function () { | |
return !s | |
}, | |
lock: function () { | |
return a = u = [ | |
], | |
t || i || (s = t = ''), | |
this | |
}, | |
locked: function () { | |
return !!a | |
}, | |
fireWith: function (e, t) { | |
return a || (t = [ | |
e, | |
(t = t || [ | |
]).slice ? t.slice() : t | |
], u.push(t), i || c()), | |
this | |
}, | |
fire: function () { | |
return f.fireWith(this, arguments), | |
this | |
}, | |
fired: function () { | |
return !!o | |
} | |
}; | |
return f | |
}, | |
S.extend({ | |
Deferred: function (e) { | |
var o = [ | |
['notify', | |
'progress', | |
S.Callbacks('memory'), | |
S.Callbacks('memory'), | |
2], | |
[ | |
'resolve', | |
'done', | |
S.Callbacks('once memory'), | |
S.Callbacks('once memory'), | |
0, | |
'resolved' | |
], | |
[ | |
'reject', | |
'fail', | |
S.Callbacks('once memory'), | |
S.Callbacks('once memory'), | |
1, | |
'rejected' | |
] | |
], | |
i = 'pending', | |
a = { | |
state: function () { | |
return i | |
}, | |
always: function () { | |
return s.done(arguments).fail(arguments), | |
this | |
}, | |
'catch': function (e) { | |
return a.then(null, e) | |
}, | |
pipe: function () { | |
var i = arguments; | |
return S.Deferred(function (r) { | |
S.each(o, function (e, t) { | |
var n = m(i[t[4]]) && i[t[4]]; | |
s[t[1]](function () { | |
var e = n && n.apply(this, arguments); | |
e && m(e.promise) ? e.promise().progress(r.notify).done(r.resolve).fail(r.reject) : r[t[0] + 'With'](this, n ? [ | |
e | |
] : arguments) | |
}) | |
}), | |
i = null | |
}).promise() | |
}, | |
then: function (t, n, r) { | |
var u = 0; | |
function l(i, o, a, s) { | |
return function () { | |
var n = this, | |
r = arguments, | |
e = function () { | |
var e, | |
t; | |
if (!(i < u)) { | |
if ((e = a.apply(n, r)) === o.promise()) throw new TypeError('Thenable self-resolution'); | |
t = e && ('object' == typeof e || 'function' == typeof e) && e.then, | |
m(t) ? s ? t.call(e, l(u, o, R, s), l(u, o, M, s)) : (u++, t.call(e, l(u, o, R, s), l(u, o, M, s), l(u, o, R, o.notifyWith))) : (a !== R && (n = void 0, r = [ | |
e | |
]), (s || o.resolveWith) (n, r)) | |
} | |
}, | |
t = s ? e : function () { | |
try { | |
e() | |
} catch (e) { | |
S.Deferred.exceptionHook && S.Deferred.exceptionHook(e, t.stackTrace), | |
u <= i + 1 && (a !== M && (n = void 0, r = [ | |
e | |
]), o.rejectWith(n, r)) | |
} | |
}; | |
i ? t() : (S.Deferred.getStackHook && (t.stackTrace = S.Deferred.getStackHook()), C.setTimeout(t)) | |
} | |
} | |
return S.Deferred(function (e) { | |
o[0][3].add(l(0, e, m(r) ? r : R, e.notifyWith)), | |
o[1][3].add(l(0, e, m(t) ? t : R)), | |
o[2][3].add(l(0, e, m(n) ? n : M)) | |
}).promise() | |
}, | |
promise: function (e) { | |
return null != e ? S.extend(e, a) : a | |
} | |
}, | |
s = { | |
}; | |
return S.each(o, function (e, t) { | |
var n = t[2], | |
r = t[5]; | |
a[t[1]] = n.add, | |
r && n.add(function () { | |
i = r | |
}, o[3 - e][2].disable, o[3 - e][3].disable, o[0][2].lock, o[0][3].lock), | |
n.add(t[3].fire), | |
s[t[0]] = function () { | |
return s[t[0] + 'With'](this === s ? void 0 : this, arguments), | |
this | |
}, | |
s[t[0] + 'With'] = n.fireWith | |
}), | |
a.promise(s), | |
e && e.call(s, s), | |
s | |
}, | |
when: function (e) { | |
var n = arguments.length, | |
t = n, | |
r = Array(t), | |
i = s.call(arguments), | |
o = S.Deferred(), | |
a = function (t) { | |
return function (e) { | |
r[t] = this, | |
i[t] = 1 < arguments.length ? s.call(arguments) : e, | |
--n || o.resolveWith(r, i) | |
} | |
}; | |
if (n <= 1 && (I(e, o.done(a(t)).resolve, o.reject, !n), 'pending' === o.state() || m(i[t] && i[t].then))) return o.then(); | |
while (t--) I(i[t], a(t), o.reject); | |
return o.promise() | |
} | |
}); | |
var W = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; | |
S.Deferred.exceptionHook = function (e, t) { | |
C.console && C.console.warn && e && W.test(e.name) && C.console.warn('jQuery.Deferred exception: ' + e.message, e.stack, t) | |
}, | |
S.readyException = function (e) { | |
C.setTimeout(function () { | |
throw e | |
}) | |
}; | |
var F = S.Deferred(); | |
function B() { | |
E.removeEventListener('DOMContentLoaded', B), | |
C.removeEventListener('load', B), | |
S.ready() | |
} | |
S.fn.ready = function (e) { | |
return F.then(e) ['catch'](function (e) { | |
S.readyException(e) | |
}), | |
this | |
}, | |
S.extend({ | |
isReady: !1, | |
readyWait: 1, | |
ready: function (e) { | |
(!0 === e ? --S.readyWait : S.isReady) || (S.isReady = !0) !== e && 0 < --S.readyWait || F.resolveWith(E, [ | |
S | |
]) | |
} | |
}), | |
S.ready.then = F.then, | |
'complete' === E.readyState || 'loading' !== E.readyState && !E.documentElement.doScroll ? C.setTimeout(S.ready) : (E.addEventListener('DOMContentLoaded', B), C.addEventListener('load', B)); | |
var $ = function (e, t, n, r, i, o, a) { | |
var s = 0, | |
u = e.length, | |
l = null == n; | |
if ('object' === w(n)) for (s in i = !0, n) $(e, t, s, n[s], !0, o, a); | |
else if (void 0 !== r && (i = !0, m(r) || (a = !0), l && (a ? (t.call(e, r), t = null) : (l = t, t = function (e, t, n) { | |
return l.call(S(e), n) | |
})), t)) for (; s < u; s++) t(e[s], n, a ? r : r.call(e[s], s, t(e[s], n))); | |
return i ? e : l ? t.call(e) : u ? t(e[0], n) : o | |
}, | |
_ = /^-ms-/, | |
z = /-([a-z])/g; | |
function U(e, t) { | |
return t.toUpperCase() | |
} | |
function X(e) { | |
return e.replace(_, 'ms-').replace(z, U) | |
} | |
var V = function (e) { | |
return 1 === e.nodeType || 9 === e.nodeType || ! + e.nodeType | |
}; | |
function G() { | |
this.expando = S.expando + G.uid++ | |
} | |
G.uid = 1, | |
G.prototype = { | |
cache: function (e) { | |
var t = e[this.expando]; | |
return t || (t = { | |
}, V(e) && (e.nodeType ? e[this.expando] = t : Object.defineProperty(e, this.expando, { | |
value: t, | |
configurable: !0 | |
}))), | |
t | |
}, | |
set: function (e, t, n) { | |
var r, | |
i = this.cache(e); | |
if ('string' == typeof t) i[X(t)] = n; | |
else for (r in t) i[X(r)] = t[r]; | |
return i | |
}, | |
get: function (e, t) { | |
return void 0 === t ? this.cache(e) : e[this.expando] && e[this.expando][X(t)] | |
}, | |
access: function (e, t, n) { | |
return void 0 === t || t && 'string' == typeof t && void 0 === n ? this.get(e, t) : (this.set(e, t, n), void 0 !== n ? n : t) | |
}, | |
remove: function (e, t) { | |
var n, | |
r = e[this.expando]; | |
if (void 0 !== r) { | |
if (void 0 !== t) { | |
n = (t = Array.isArray(t) ? t.map(X) : (t = X(t)) in r ? [ | |
t | |
] : t.match(P) || [ | |
]).length; | |
while (n--) delete r[t[n]] | |
}(void 0 === t || S.isEmptyObject(r)) && (e.nodeType ? e[this.expando] = void 0 : delete e[this.expando]) | |
} | |
}, | |
hasData: function (e) { | |
var t = e[this.expando]; | |
return void 0 !== t && !S.isEmptyObject(t) | |
} | |
}; | |
var Y = new G, | |
Q = new G, | |
J = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, | |
K = /[A-Z]/g; | |
function Z(e, t, n) { | |
var r, | |
i; | |
if (void 0 === n && 1 === e.nodeType) if (r = 'data-' + t.replace(K, '-$&').toLowerCase(), 'string' == typeof (n = e.getAttribute(r))) { | |
try { | |
n = 'true' === (i = n) || 'false' !== i && ('null' === i ? null : i === + i + '' ? + i : J.test(i) ? JSON.parse(i) : i) | |
} catch (e) { | |
} | |
Q.set(e, t, n) | |
} else n = void 0; | |
return n | |
} | |
S.extend({ | |
hasData: function (e) { | |
return Q.hasData(e) || Y.hasData(e) | |
}, | |
data: function (e, t, n) { | |
return Q.access(e, t, n) | |
}, | |
removeData: function (e, t) { | |
Q.remove(e, t) | |
}, | |
_data: function (e, t, n) { | |
return Y.access(e, t, n) | |
}, | |
_removeData: function (e, t) { | |
Y.remove(e, t) | |
} | |
}), | |
S.fn.extend({ | |
data: function (n, e) { | |
var t, | |
r, | |
i, | |
o = this[0], | |
a = o && o.attributes; | |
if (void 0 === n) { | |
if (this.length && (i = Q.get(o), 1 === o.nodeType && !Y.get(o, 'hasDataAttrs'))) { | |
t = a.length; | |
while (t--) a[t] && 0 === (r = a[t].name).indexOf('data-') && (r = X(r.slice(5)), Z(o, r, i[r])); | |
Y.set(o, 'hasDataAttrs', !0) | |
} | |
return i | |
} | |
return 'object' == typeof n ? this.each(function () { | |
Q.set(this, n) | |
}) : $(this, function (e) { | |
var t; | |
if (o && void 0 === e) return void 0 !== (t = Q.get(o, n)) ? t : void 0 !== (t = Z(o, n)) ? t : void 0; | |
this.each(function () { | |
Q.set(this, n, e) | |
}) | |
}, null, e, 1 < arguments.length, null, !0) | |
}, | |
removeData: function (e) { | |
return this.each(function () { | |
Q.remove(this, e) | |
}) | |
} | |
}), | |
S.extend({ | |
queue: function (e, t, n) { | |
var r; | |
if (e) return t = (t || 'fx') + 'queue', | |
r = Y.get(e, t), | |
n && (!r || Array.isArray(n) ? r = Y.access(e, t, S.makeArray(n)) : r.push(n)), | |
r || [ | |
] | |
}, | |
dequeue: function (e, t) { | |
t = t || 'fx'; | |
var n = S.queue(e, t), | |
r = n.length, | |
i = n.shift(), | |
o = S._queueHooks(e, t); | |
'inprogress' === i && (i = n.shift(), r--), | |
i && ('fx' === t && n.unshift('inprogress'), delete o.stop, i.call(e, function () { | |
S.dequeue(e, t) | |
}, o)), | |
!r && o && o.empty.fire() | |
}, | |
_queueHooks: function (e, t) { | |
var n = t + 'queueHooks'; | |
return Y.get(e, n) || Y.access(e, n, { | |
empty: S.Callbacks('once memory').add(function () { | |
Y.remove(e, [ | |
t + 'queue', | |
n | |
]) | |
}) | |
}) | |
} | |
}), | |
S.fn.extend({ | |
queue: function (t, n) { | |
var e = 2; | |
return 'string' != typeof t && (n = t, t = 'fx', e--), | |
arguments.length < e ? S.queue(this[0], t) : void 0 === n ? this : this.each(function () { | |
var e = S.queue(this, t, n); | |
S._queueHooks(this, t), | |
'fx' === t && 'inprogress' !== e[0] && S.dequeue(this, t) | |
}) | |
}, | |
dequeue: function (e) { | |
return this.each(function () { | |
S.dequeue(this, e) | |
}) | |
}, | |
clearQueue: function (e) { | |
return this.queue(e || 'fx', [ | |
]) | |
}, | |
promise: function (e, t) { | |
var n, | |
r = 1, | |
i = S.Deferred(), | |
o = this, | |
a = this.length, | |
s = function () { | |
--r || i.resolveWith(o, [ | |
o | |
]) | |
}; | |
'string' != typeof e && (t = e, e = void 0), | |
e = e || 'fx'; | |
while (a--) (n = Y.get(o[a], e + 'queueHooks')) && n.empty && (r++, n.empty.add(s)); | |
return s(), | |
i.promise(t) | |
} | |
}); | |
var ee = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, | |
te = new RegExp('^(?:([+-])=|)(' + ee + ')([a-z%]*)$', 'i'), | |
ne = [ | |
'Top', | |
'Right', | |
'Bottom', | |
'Left' | |
], | |
re = E.documentElement, | |
ie = function (e) { | |
return S.contains(e.ownerDocument, e) | |
}, | |
oe = { | |
composed: !0 | |
}; | |
re.getRootNode && (ie = function (e) { | |
return S.contains(e.ownerDocument, e) || e.getRootNode(oe) === e.ownerDocument | |
}); | |
var ae = function (e, t) { | |
return 'none' === (e = t || e).style.display || '' === e.style.display && ie(e) && 'none' === S.css(e, 'display') | |
}; | |
function se(e, t, n, r) { | |
var i, | |
o, | |
a = 20, | |
s = r ? function () { | |
return r.cur() | |
} | |
: function () { | |
return S.css(e, t, '') | |
}, | |
u = s(), | |
l = n && n[3] || (S.cssNumber[t] ? '' : 'px'), | |
c = e.nodeType && (S.cssNumber[t] || 'px' !== l && + u) && te.exec(S.css(e, t)); | |
if (c && c[3] !== l) { | |
u /= 2, | |
l = l || c[3], | |
c = + u || 1; | |
while (a--) S.style(e, t, c + l), | |
(1 - o) * (1 - (o = s() / u || 0.5)) <= 0 && (a = 0), | |
c /= o; | |
c *= 2, | |
S.style(e, t, c + l), | |
n = n || [ | |
] | |
} | |
return n && (c = + c || + u || 0, i = n[1] ? c + (n[1] + 1) * n[2] : + n[2], r && (r.unit = l, r.start = c, r.end = i)), | |
i | |
} | |
var ue = { | |
}; | |
function le(e, t) { | |
for (var n, r, i, o, a, s, u, l = [ | |
], c = 0, f = e.length; c < f; c++) (r = e[c]).style && (n = r.style.display, t ? ('none' === n && (l[c] = Y.get(r, 'display') || null, l[c] || (r.style.display = '')), '' === r.style.display && ae(r) && (l[c] = (u = a = o = void 0, a = (i = r).ownerDocument, s = i.nodeName, (u = ue[s]) || (o = a.body.appendChild(a.createElement(s)), u = S.css(o, 'display'), o.parentNode.removeChild(o), 'none' === u && (u = 'block'), ue[s] = u)))) : 'none' !== n && (l[c] = 'none', Y.set(r, 'display', n))); | |
for (c = 0; c < f; c++) null != l[c] && (e[c].style.display = l[c]); | |
return e | |
} | |
S.fn.extend({ | |
show: function () { | |
return le(this, !0) | |
}, | |
hide: function () { | |
return le(this) | |
}, | |
toggle: function (e) { | |
return 'boolean' == typeof e ? e ? this.show() : this.hide() : this.each(function () { | |
ae(this) ? S(this).show() : S(this).hide() | |
}) | |
} | |
}); | |
var ce, | |
fe, | |
pe = /^(?:checkbox|radio)$/i, | |
de = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i, | |
he = /^$|^module$|\/(?:java|ecma)script/i; | |
ce = E.createDocumentFragment().appendChild(E.createElement('div')), | |
(fe = E.createElement('input')).setAttribute('type', 'radio'), | |
fe.setAttribute('checked', 'checked'), | |
fe.setAttribute('name', 't'), | |
ce.appendChild(fe), | |
y.checkClone = ce.cloneNode(!0).cloneNode(!0).lastChild.checked, | |
ce.innerHTML = '<textarea>x</textarea>', | |
y.noCloneChecked = !!ce.cloneNode(!0).lastChild.defaultValue, | |
ce.innerHTML = '<option></option>', | |
y.option = !!ce.lastChild; | |
var ge = { | |
thead: [ | |
1, | |
'<table>', | |
'</table>' | |
], | |
col: [ | |
2, | |
'<table><colgroup>', | |
'</colgroup></table>' | |
], | |
tr: [ | |
2, | |
'<table><tbody>', | |
'</tbody></table>' | |
], | |
td: [ | |
3, | |
'<table><tbody><tr>', | |
'</tr></tbody></table>' | |
], | |
_default: [ | |
0, | |
'', | |
'' | |
] | |
}; | |
function ve(e, t) { | |
var n; | |
return n = 'undefined' != typeof e.getElementsByTagName ? e.getElementsByTagName(t || '*') : 'undefined' != typeof e.querySelectorAll ? e.querySelectorAll(t || '*') : [ | |
], | |
void 0 === t || t && A(e, t) ? S.merge([e], n) : n | |
} | |
function ye(e, t) { | |
for (var n = 0, r = e.length; n < r; n++) Y.set(e[n], 'globalEval', !t || Y.get(t[n], 'globalEval')) | |
} | |
ge.tbody = ge.tfoot = ge.colgroup = ge.caption = ge.thead, | |
ge.th = ge.td, | |
y.option || (ge.optgroup = ge.option = [ | |
1, | |
'<select multiple=\'multiple\'>', | |
'</select>' | |
]); | |
var me = /<|&#?\w+;/; | |
function xe(e, t, n, r, i) { | |
for (var o, a, s, u, l, c, f = t.createDocumentFragment(), p = [ | |
], d = 0, h = e.length; d < h; d++) if ((o = e[d]) || 0 === o) if ('object' === w(o)) S.merge(p, o.nodeType ? [ | |
o | |
] : o); | |
else if (me.test(o)) { | |
a = a || f.appendChild(t.createElement('div')), | |
s = (de.exec(o) || [ | |
'', | |
'' | |
]) [1].toLowerCase(), | |
u = ge[s] || ge._default, | |
a.innerHTML = u[1] + S.htmlPrefilter(o) + u[2], | |
c = u[0]; | |
while (c--) a = a.lastChild; | |
S.merge(p, a.childNodes), | |
(a = f.firstChild).textContent = '' | |
} else p.push(t.createTextNode(o)); | |
f.textContent = '', | |
d = 0; | |
while (o = p[d++]) if (r && - 1 < S.inArray(o, r)) i && i.push(o); | |
else if (l = ie(o), a = ve(f.appendChild(o), 'script'), l && ye(a), n) { | |
c = 0; | |
while (o = a[c++]) he.test(o.type || '') && n.push(o) | |
} | |
return f | |
} | |
var be = /^key/, | |
we = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, | |
Te = /^([^.]*)(?:\.(.+)|)/; | |
function Ce() { | |
return !0 | |
} | |
function Ee() { | |
return !1 | |
} | |
function Se(e, t) { | |
return e === function () { | |
try { | |
return E.activeElement | |
} catch (e) { | |
} | |
}() == ('focus' === t) | |
} | |
function ke(e, t, n, r, i, o) { | |
var a, | |
s; | |
if ('object' == typeof t) { | |
for (s in 'string' != typeof n && (r = r || n, n = void 0), t) ke(e, s, n, r, t[s], o); | |
return e | |
} | |
if (null == r && null == i ? (i = n, r = n = void 0) : null == i && ('string' == typeof n ? (i = r, r = void 0) : (i = r, r = n, n = void 0)), !1 === i) i = Ee; | |
else if (!i) return e; | |
return 1 === o && (a = i, (i = function (e) { | |
return S().off(e), | |
a.apply(this, arguments) | |
}).guid = a.guid || (a.guid = S.guid++)), | |
e.each(function () { | |
S.event.add(this, t, i, r, n) | |
}) | |
} | |
function Ae(e, i, o) { | |
o ? (Y.set(e, i, !1), S.event.add(e, i, { | |
namespace: !1, | |
handler: function (e) { | |
var t, | |
n, | |
r = Y.get(this, i); | |
if (1 & e.isTrigger && this[i]) { | |
if (r.length) (S.event.special[i] || { | |
}).delegateType && e.stopPropagation(); | |
else if (r = s.call(arguments), Y.set(this, i, r), t = o(this, i), this[i](), r !== (n = Y.get(this, i)) || t ? Y.set(this, i, !1) : n = { | |
}, r !== n) return e.stopImmediatePropagation(), | |
e.preventDefault(), | |
n.value | |
} else r.length && (Y.set(this, i, { | |
value: S.event.trigger(S.extend(r[0], S.Event.prototype), r.slice(1), this) | |
}), e.stopImmediatePropagation()) | |
} | |
})) : void 0 === Y.get(e, i) && S.event.add(e, i, Ce) | |
} | |
S.event = { | |
global: { | |
}, | |
add: function (t, e, n, r, i) { | |
var o, | |
a, | |
s, | |
u, | |
l, | |
c, | |
f, | |
p, | |
d, | |
h, | |
g, | |
v = Y.get(t); | |
if (V(t)) { | |
n.handler && (n = (o = n).handler, i = o.selector), | |
i && S.find.matchesSelector(re, i), | |
n.guid || (n.guid = S.guid++), | |
(u = v.events) || (u = v.events = Object.create(null)), | |
(a = v.handle) || (a = v.handle = function (e) { | |
return 'undefined' != typeof S && S.event.triggered !== e.type ? S.event.dispatch.apply(t, arguments) : void 0 | |
}), | |
l = (e = (e || '').match(P) || [ | |
'' | |
]).length; | |
while (l--) d = g = (s = Te.exec(e[l]) || [ | |
]) [1], | |
h = (s[2] || '').split('.').sort(), | |
d && (f = S.event.special[d] || { | |
}, d = (i ? f.delegateType : f.bindType) || d, f = S.event.special[d] || { | |
}, c = S.extend({ | |
type: d, | |
origType: g, | |
data: r, | |
handler: n, | |
guid: n.guid, | |
selector: i, | |
needsContext: i && S.expr.match.needsContext.test(i), | |
namespace: h.join('.') | |
}, o), (p = u[d]) || ((p = u[d] = [ | |
]).delegateCount = 0, f.setup && !1 !== f.setup.call(t, r, h, a) || t.addEventListener && t.addEventListener(d, a)), f.add && (f.add.call(t, c), c.handler.guid || (c.handler.guid = n.guid)), i ? p.splice(p.delegateCount++, 0, c) : p.push(c), S.event.global[d] = !0) | |
} | |
}, | |
remove: function (e, t, n, r, i) { | |
var o, | |
a, | |
s, | |
u, | |
l, | |
c, | |
f, | |
p, | |
d, | |
h, | |
g, | |
v = Y.hasData(e) && Y.get(e); | |
if (v && (u = v.events)) { | |
l = (t = (t || '').match(P) || [ | |
'' | |
]).length; | |
while (l--) if (d = g = (s = Te.exec(t[l]) || [ | |
]) [1], h = (s[2] || '').split('.').sort(), d) { | |
f = S.event.special[d] || { | |
}, | |
p = u[d = (r ? f.delegateType : f.bindType) || d] || [ | |
], | |
s = s[2] && new RegExp('(^|\\.)' + h.join('\\.(?:.*\\.|)') + '(\\.|$)'), | |
a = o = p.length; | |
while (o--) c = p[o], | |
!i && g !== c.origType || n && n.guid !== c.guid || s && !s.test(c.namespace) || r && r !== c.selector && ('**' !== r || !c.selector) || (p.splice(o, 1), c.selector && p.delegateCount--, f.remove && f.remove.call(e, c)); | |
a && !p.length && (f.teardown && !1 !== f.teardown.call(e, h, v.handle) || S.removeEvent(e, d, v.handle), delete u[d]) | |
} else for (d in u) S.event.remove(e, d + t[l], n, r, !0); | |
S.isEmptyObject(u) && Y.remove(e, 'handle events') | |
} | |
}, | |
dispatch: function (e) { | |
var t, | |
n, | |
r, | |
i, | |
o, | |
a, | |
s = new Array(arguments.length), | |
u = S.event.fix(e), | |
l = (Y.get(this, 'events') || Object.create(null)) [u.type] || [ | |
], | |
c = S.event.special[u.type] || { | |
}; | |
for (s[0] = u, t = 1; t < arguments.length; t++) s[t] = arguments[t]; | |
if (u.delegateTarget = this, !c.preDispatch || !1 !== c.preDispatch.call(this, u)) { | |
a = S.event.handlers.call(this, u, l), | |
t = 0; | |
while ((i = a[t++]) && !u.isPropagationStopped()) { | |
u.currentTarget = i.elem, | |
n = 0; | |
while ((o = i.handlers[n++]) && !u.isImmediatePropagationStopped()) u.rnamespace && !1 !== o.namespace && !u.rnamespace.test(o.namespace) || (u.handleObj = o, u.data = o.data, void 0 !== (r = ((S.event.special[o.origType] || { | |
}).handle || o.handler).apply(i.elem, s)) && !1 === (u.result = r) && (u.preventDefault(), u.stopPropagation())) | |
} | |
return c.postDispatch && c.postDispatch.call(this, u), | |
u.result | |
} | |
}, | |
handlers: function (e, t) { | |
var n, | |
r, | |
i, | |
o, | |
a, | |
s = [ | |
], | |
u = t.delegateCount, | |
l = e.target; | |
if (u && l.nodeType && !('click' === e.type && 1 <= e.button)) for (; l !== this; l = l.parentNode || this) if (1 === l.nodeType && ('click' !== e.type || !0 !== l.disabled)) { | |
for (o = [ | |
], a = { | |
}, n = 0; n < u; n++) void 0 === a[i = (r = t[n]).selector + ' '] && (a[i] = r.needsContext ? - 1 < S(i, this).index(l) : S.find(i, this, null, [ | |
l | |
]).length), | |
a[i] && o.push(r); | |
o.length && s.push({ | |
elem: l, | |
handlers: o | |
}) | |
} | |
return l = this, | |
u < t.length && s.push({ | |
elem: l, | |
handlers: t.slice(u) | |
}), | |
s | |
}, | |
addProp: function (t, e) { | |
Object.defineProperty(S.Event.prototype, t, { | |
enumerable: !0, | |
configurable: !0, | |
get: m(e) ? function () { | |
if (this.originalEvent) return e(this.originalEvent) | |
} | |
: function () { | |
if (this.originalEvent) return this.originalEvent[t] | |
}, | |
set: function (e) { | |
Object.defineProperty(this, t, { | |
enumerable: !0, | |
configurable: !0, | |
writable: !0, | |
value: e | |
}) | |
} | |
}) | |
}, | |
fix: function (e) { | |
return e[S.expando] ? e : new S.Event(e) | |
}, | |
special: { | |
load: { | |
noBubble: !0 | |
}, | |
click: { | |
setup: function (e) { | |
var t = this || e; | |
return pe.test(t.type) && t.click && A(t, 'input') && Ae(t, 'click', Ce), | |
!1 | |
}, | |
trigger: function (e) { | |
var t = this || e; | |
return pe.test(t.type) && t.click && A(t, 'input') && Ae(t, 'click'), | |
!0 | |
}, | |
_default: function (e) { | |
var t = e.target; | |
return pe.test(t.type) && t.click && A(t, 'input') && Y.get(t, 'click') || A(t, 'a') | |
} | |
}, | |
beforeunload: { | |
postDispatch: function (e) { | |
void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result) | |
} | |
} | |
} | |
}, | |
S.removeEvent = function (e, t, n) { | |
e.removeEventListener && e.removeEventListener(t, n) | |
}, | |
S.Event = function (e, t) { | |
if (!(this instanceof S.Event)) return new S.Event(e, t); | |
e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || void 0 === e.defaultPrevented && !1 === e.returnValue ? Ce : Ee, this.target = e.target && 3 === e.target.nodeType ? e.target.parentNode : e.target, this.currentTarget = e.currentTarget, this.relatedTarget = e.relatedTarget) : this.type = e, | |
t && S.extend(this, t), | |
this.timeStamp = e && e.timeStamp || Date.now(), | |
this[S.expando] = !0 | |
}, | |
S.Event.prototype = { | |
constructor: S.Event, | |
isDefaultPrevented: Ee, | |
isPropagationStopped: Ee, | |
isImmediatePropagationStopped: Ee, | |
isSimulated: !1, | |
preventDefault: function () { | |
var e = this.originalEvent; | |
this.isDefaultPrevented = Ce, | |
e && !this.isSimulated && e.preventDefault() | |
}, | |
stopPropagation: function () { | |
var e = this.originalEvent; | |
this.isPropagationStopped = Ce, | |
e && !this.isSimulated && e.stopPropagation() | |
}, | |
stopImmediatePropagation: function () { | |
var e = this.originalEvent; | |
this.isImmediatePropagationStopped = Ce, | |
e && !this.isSimulated && e.stopImmediatePropagation(), | |
this.stopPropagation() | |
} | |
}, | |
S.each({ | |
altKey: !0, | |
bubbles: !0, | |
cancelable: !0, | |
changedTouches: !0, | |
ctrlKey: !0, | |
detail: !0, | |
eventPhase: !0, | |
metaKey: !0, | |
pageX: !0, | |
pageY: !0, | |
shiftKey: !0, | |
view: !0, | |
'char': !0, | |
code: !0, | |
charCode: !0, | |
key: !0, | |
keyCode: !0, | |
button: !0, | |
buttons: !0, | |
clientX: !0, | |
clientY: !0, | |
offsetX: !0, | |
offsetY: !0, | |
pointerId: !0, | |
pointerType: !0, | |
screenX: !0, | |
screenY: !0, | |
targetTouches: !0, | |
toElement: !0, | |
touches: !0, | |
which: function (e) { | |
var t = e.button; | |
return null == e.which && be.test(e.type) ? null != e.charCode ? e.charCode : e.keyCode : !e.which && void 0 !== t && we.test(e.type) ? 1 & t ? 1 : 2 & t ? 3 : 4 & t ? 2 : 0 : e.which | |
} | |
}, S.event.addProp), | |
S.each({ | |
focus: 'focusin', | |
blur: 'focusout' | |
}, function (e, t) { | |
S.event.special[e] = { | |
setup: function () { | |
return Ae(this, e, Se), | |
!1 | |
}, | |
trigger: function () { | |
return Ae(this, e), | |
!0 | |
}, | |
delegateType: t | |
} | |
}), | |
S.each({ | |
mouseenter: 'mouseover', | |
mouseleave: 'mouseout', | |
pointerenter: 'pointerover', | |
pointerleave: 'pointerout' | |
}, function (e, i) { | |
S.event.special[e] = { | |
delegateType: i, | |
bindType: i, | |
handle: function (e) { | |
var t, | |
n = e.relatedTarget, | |
r = e.handleObj; | |
return n && (n === this || S.contains(this, n)) || (e.type = r.origType, t = r.handler.apply(this, arguments), e.type = i), | |
t | |
} | |
} | |
}), | |
S.fn.extend({ | |
on: function (e, t, n, r) { | |
return ke(this, e, t, n, r) | |
}, | |
one: function (e, t, n, r) { | |
return ke(this, e, t, n, r, 1) | |
}, | |
off: function (e, t, n) { | |
var r, | |
i; | |
if (e && e.preventDefault && e.handleObj) return r = e.handleObj, | |
S(e.delegateTarget).off(r.namespace ? r.origType + '.' + r.namespace : r.origType, r.selector, r.handler), | |
this; | |
if ('object' == typeof e) { | |
for (i in e) this.off(i, t, e[i]); | |
return this | |
} | |
return !1 !== t && 'function' != typeof t || (n = t, t = void 0), | |
!1 === n && (n = Ee), | |
this.each(function () { | |
S.event.remove(this, e, n, t) | |
}) | |
} | |
}); | |
var Ne = /<script|<style|<link/i, | |
De = /checked\s*(?:[^=]|=\s*.checked.)/i, | |
je = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; | |
function qe(e, t) { | |
return A(e, 'table') && A(11 !== t.nodeType ? t : t.firstChild, 'tr') && S(e).children('tbody') [0] || e | |
} | |
function Le(e) { | |
return e.type = (null !== e.getAttribute('type')) + '/' + e.type, | |
e | |
} | |
function He(e) { | |
return 'true/' === (e.type || '').slice(0, 5) ? e.type = e.type.slice(5) : e.removeAttribute('type'), | |
e | |
} | |
function Oe(e, t) { | |
var n, | |
r, | |
i, | |
o, | |
a, | |
s; | |
if (1 === t.nodeType) { | |
if (Y.hasData(e) && (s = Y.get(e).events)) for (i in Y.remove(t, 'handle events'), s) for (n = 0, r = s[i].length; n < r; n++) S.event.add(t, i, s[i][n]); | |
Q.hasData(e) && (o = Q.access(e), a = S.extend({ | |
}, o), Q.set(t, a)) | |
} | |
} | |
function Pe(n, r, i, o) { | |
r = g(r); | |
var e, | |
t, | |
a, | |
s, | |
u, | |
l, | |
c = 0, | |
f = n.length, | |
p = f - 1, | |
d = r[0], | |
h = m(d); | |
if (h || 1 < f && 'string' == typeof d && !y.checkClone && De.test(d)) return n.each(function (e) { | |
var t = n.eq(e); | |
h && (r[0] = d.call(this, e, t.html())), | |
Pe(t, r, i, o) | |
}); | |
if (f && (t = (e = xe(r, n[0].ownerDocument, !1, n, o)).firstChild, 1 === e.childNodes.length && (e = t), t || o)) { | |
for (s = (a = S.map(ve(e, 'script'), Le)).length; c < f; c++) u = e, | |
c !== p && (u = S.clone(u, !0, !0), s && S.merge(a, ve(u, 'script'))), | |
i.call(n[c], u, c); | |
if (s) for (l = a[a.length - 1].ownerDocument, S.map(a, He), c = 0; c < s; c++) u = a[c], | |
he.test(u.type || '') && !Y.access(u, 'globalEval') && S.contains(l, u) && (u.src && 'module' !== (u.type || '').toLowerCase() ? S._evalUrl && !u.noModule && S._evalUrl(u.src, { | |
nonce: u.nonce || u.getAttribute('nonce') | |
}, l) : b(u.textContent.replace(je, ''), u, l)) | |
} | |
return n | |
} | |
function Re(e, t, n) { | |
for (var r, i = t ? S.filter(t, e) : e, o = 0; null != (r = i[o]); o++) n || 1 !== r.nodeType || S.cleanData(ve(r)), | |
r.parentNode && (n && ie(r) && ye(ve(r, 'script')), r.parentNode.removeChild(r)); | |
return e | |
} | |
S.extend({ | |
htmlPrefilter: function (e) { | |
return e | |
}, | |
clone: function (e, t, n) { | |
var r, | |
i, | |
o, | |
a, | |
s, | |
u, | |
l, | |
c = e.cloneNode(!0), | |
f = ie(e); | |
if (!(y.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || S.isXMLDoc(e))) for (a = ve(c), r = 0, i = (o = ve(e)).length; r < i; r++) s = o[r], | |
u = a[r], | |
void 0, | |
'input' === (l = u.nodeName.toLowerCase()) && pe.test(s.type) ? u.checked = s.checked : 'input' !== l && 'textarea' !== l || (u.defaultValue = s.defaultValue); | |
if (t) if (n) for (o = o || ve(e), a = a || ve(c), r = 0, i = o.length; r < i; r++) Oe(o[r], a[r]); | |
else Oe(e, c); | |
return 0 < (a = ve(c, 'script')).length && ye(a, !f && ve(e, 'script')), | |
c | |
}, | |
cleanData: function (e) { | |
for (var t, n, r, i = S.event.special, o = 0; void 0 !== (n = e[o]); o++) if (V(n)) { | |
if (t = n[Y.expando]) { | |
if (t.events) for (r in t.events) i[r] ? S.event.remove(n, r) : S.removeEvent(n, r, t.handle); | |
n[Y.expando] = void 0 | |
} | |
n[Q.expando] && (n[Q.expando] = void 0) | |
} | |
} | |
}), | |
S.fn.extend({ | |
detach: function (e) { | |
return Re(this, e, !0) | |
}, | |
remove: function (e) { | |
return Re(this, e) | |
}, | |
text: function (e) { | |
return $(this, function (e) { | |
return void 0 === e ? S.text(this) : this.empty().each(function () { | |
1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = e) | |
}) | |
}, null, e, arguments.length) | |
}, | |
append: function () { | |
return Pe(this, arguments, function (e) { | |
1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || qe(this, e).appendChild(e) | |
}) | |
}, | |
prepend: function () { | |
return Pe(this, arguments, function (e) { | |
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { | |
var t = qe(this, e); | |
t.insertBefore(e, t.firstChild) | |
} | |
}) | |
}, | |
before: function () { | |
return Pe(this, arguments, function (e) { | |
this.parentNode && this.parentNode.insertBefore(e, this) | |
}) | |
}, | |
after: function () { | |
return Pe(this, arguments, function (e) { | |
this.parentNode && this.parentNode.insertBefore(e, this.nextSibling) | |
}) | |
}, | |
empty: function () { | |
for (var e, t = 0; null != (e = this[t]); t++) 1 === e.nodeType && (S.cleanData(ve(e, !1)), e.textContent = ''); | |
return this | |
}, | |
clone: function (e, t) { | |
return e = null != e && e, | |
t = null == t ? e : t, | |
this.map(function () { | |
return S.clone(this, e, t) | |
}) | |
}, | |
html: function (e) { | |
return $(this, function (e) { | |
var t = this[0] || { | |
}, | |
n = 0, | |
r = this.length; | |
if (void 0 === e && 1 === t.nodeType) return t.innerHTML; | |
if ('string' == typeof e && !Ne.test(e) && !ge[(de.exec(e) || [ | |
'', | |
'' | |
]) [1].toLowerCase()]) { | |
e = S.htmlPrefilter(e); | |
try { | |
for (; n < r; n++) 1 === (t = this[n] || { | |
}).nodeType && (S.cleanData(ve(t, !1)), t.innerHTML = e); | |
t = 0 | |
} catch (e) { | |
} | |
} | |
t && this.empty().append(e) | |
}, null, e, arguments.length) | |
}, | |
replaceWith: function () { | |
var n = [ | |
]; | |
return Pe(this, arguments, function (e) { | |
var t = this.parentNode; | |
S.inArray(this, n) < 0 && (S.cleanData(ve(this)), t && t.replaceChild(e, this)) | |
}, n) | |
} | |
}), | |
S.each({ | |
appendTo: 'append', | |
prependTo: 'prepend', | |
insertBefore: 'before', | |
insertAfter: 'after', | |
replaceAll: 'replaceWith' | |
}, function (e, a) { | |
S.fn[e] = function (e) { | |
for (var t, n = [ | |
], r = S(e), i = r.length - 1, o = 0; o <= i; o++) t = o === i ? this : this.clone(!0), | |
S(r[o]) [a](t), | |
u.apply(n, t.get()); | |
return this.pushStack(n) | |
} | |
}); | |
var Me = new RegExp('^(' + ee + ')(?!px)[a-z%]+$', 'i'), | |
Ie = function (e) { | |
var t = e.ownerDocument.defaultView; | |
return t && t.opener || (t = C), | |
t.getComputedStyle(e) | |
}, | |
We = function (e, t, n) { | |
var r, | |
i, | |
o = { | |
}; | |
for (i in t) o[i] = e.style[i], | |
e.style[i] = t[i]; | |
for (i in r = n.call(e), t) e.style[i] = o[i]; | |
return r | |
}, | |
Fe = new RegExp(ne.join('|'), 'i'); | |
function Be(e, t, n) { | |
var r, | |
i, | |
o, | |
a, | |
s = e.style; | |
return (n = n || Ie(e)) && ('' !== (a = n.getPropertyValue(t) || n[t]) || ie(e) || (a = S.style(e, t)), !y.pixelBoxStyles() && Me.test(a) && Fe.test(t) && (r = s.width, i = s.minWidth, o = s.maxWidth, s.minWidth = s.maxWidth = s.width = a, a = n.width, s.width = r, s.minWidth = i, s.maxWidth = o)), | |
void 0 !== a ? a + '' : a | |
} | |
function $e(e, t) { | |
return { | |
get: function () { | |
if (!e()) return (this.get = t).apply(this, arguments); | |
delete this.get | |
} | |
} | |
} | |
!function () { | |
function e() { | |
if (l) { | |
u.style.cssText = 'position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0', | |
l.style.cssText = 'position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%', | |
re.appendChild(u).appendChild(l); | |
var e = C.getComputedStyle(l); | |
n = '1%' !== e.top, | |
s = 12 === t(e.marginLeft), | |
l.style.right = '60%', | |
o = 36 === t(e.right), | |
r = 36 === t(e.width), | |
l.style.position = 'absolute', | |
i = 12 === t(l.offsetWidth / 3), | |
re.removeChild(u), | |
l = null | |
} | |
} | |
function t(e) { | |
return Math.round(parseFloat(e)) | |
} | |
var n, | |
r, | |
i, | |
o, | |
a, | |
s, | |
u = E.createElement('div'), | |
l = E.createElement('div'); | |
l.style && (l.style.backgroundClip = 'content-box', l.cloneNode(!0).style.backgroundClip = '', y.clearCloneStyle = 'content-box' === l.style.backgroundClip, S.extend(y, { | |
boxSizingReliable: function () { | |
return e(), | |
r | |
}, | |
pixelBoxStyles: function () { | |
return e(), | |
o | |
}, | |
pixelPosition: function () { | |
return e(), | |
n | |
}, | |
reliableMarginLeft: function () { | |
return e(), | |
s | |
}, | |
scrollboxSize: function () { | |
return e(), | |
i | |
}, | |
reliableTrDimensions: function () { | |
var e, | |
t, | |
n, | |
r; | |
return null == a && (e = E.createElement('table'), t = E.createElement('tr'), n = E.createElement('div'), e.style.cssText = 'position:absolute;left:-11111px', t.style.height = '1px', n.style.height = '9px', re.appendChild(e).appendChild(t).appendChild(n), r = C.getComputedStyle(t), a = 3 < parseInt(r.height), re.removeChild(e)), | |
a | |
} | |
})) | |
}(); | |
var _e = [ | |
'Webkit', | |
'Moz', | |
'ms' | |
], | |
ze = E.createElement('div').style, | |
Ue = { | |
}; | |
function Xe(e) { | |
var t = S.cssProps[e] || Ue[e]; | |
return t || (e in ze ? e : Ue[e] = function (e) { | |
var t = e[0].toUpperCase() + e.slice(1), | |
n = _e.length; | |
while (n--) if ((e = _e[n] + t) in ze) return e | |
}(e) || e) | |
} | |
var Ve = /^(none|table(?!-c[ea]).+)/, | |
Ge = /^--/, | |
Ye = { | |
position: 'absolute', | |
visibility: 'hidden', | |
display: 'block' | |
}, | |
Qe = { | |
letterSpacing: '0', | |
fontWeight: '400' | |
}; | |
function Je(e, t, n) { | |
var r = te.exec(t); | |
return r ? Math.max(0, r[2] - (n || 0)) + (r[3] || 'px') : t | |
} | |
function Ke(e, t, n, r, i, o) { | |
var a = 'width' === t ? 1 : 0, | |
s = 0, | |
u = 0; | |
if (n === (r ? 'border' : 'content')) return 0; | |
for (; a < 4; a += 2) 'margin' === n && (u += S.css(e, n + ne[a], !0, i)), | |
r ? ('content' === n && (u -= S.css(e, 'padding' + ne[a], !0, i)), 'margin' !== n && (u -= S.css(e, 'border' + ne[a] + 'Width', !0, i))) : (u += S.css(e, 'padding' + ne[a], !0, i), 'padding' !== n ? u += S.css(e, 'border' + ne[a] + 'Width', !0, i) : s += S.css(e, 'border' + ne[a] + 'Width', !0, i)); | |
return !r && 0 <= o && (u += Math.max(0, Math.ceil(e['offset' + t[0].toUpperCase() + t.slice(1)] - o - u - s - 0.5)) || 0), | |
u | |
} | |
function Ze(e, t, n) { | |
var r = Ie(e), | |
i = (!y.boxSizingReliable() || n) && 'border-box' === S.css(e, 'boxSizing', !1, r), | |
o = i, | |
a = Be(e, t, r), | |
s = 'offset' + t[0].toUpperCase() + t.slice(1); | |
if (Me.test(a)) { | |
if (!n) return a; | |
a = 'auto' | |
} | |
return (!y.boxSizingReliable() && i || !y.reliableTrDimensions() && A(e, 'tr') || 'auto' === a || !parseFloat(a) && 'inline' === S.css(e, 'display', !1, r)) && e.getClientRects().length && (i = 'border-box' === S.css(e, 'boxSizing', !1, r), (o = s in e) && (a = e[s])), | |
(a = parseFloat(a) || 0) + Ke(e, t, n || (i ? 'border' : 'content'), o, r, a) + 'px' | |
} | |
function et(e, t, n, r, i) { | |
return new et.prototype.init(e, t, n, r, i) | |
} | |
S.extend({ | |
cssHooks: { | |
opacity: { | |
get: function (e, t) { | |
if (t) { | |
var n = Be(e, 'opacity'); | |
return '' === n ? '1' : n | |
} | |
} | |
} | |
}, | |
cssNumber: { | |
animationIterationCount: !0, | |
columnCount: !0, | |
fillOpacity: !0, | |
flexGrow: !0, | |
flexShrink: !0, | |
fontWeight: !0, | |
gridArea: !0, | |
gridColumn: !0, | |
gridColumnEnd: !0, | |
gridColumnStart: !0, | |
gridRow: !0, | |
gridRowEnd: !0, | |
gridRowStart: !0, | |
lineHeight: !0, | |
opacity: !0, | |
order: !0, | |
orphans: !0, | |
widows: !0, | |
zIndex: !0, | |
zoom: !0 | |
}, | |
cssProps: { | |
}, | |
style: function (e, t, n, r) { | |
if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { | |
var i, | |
o, | |
a, | |
s = X(t), | |
u = Ge.test(t), | |
l = e.style; | |
if (u || (t = Xe(s)), a = S.cssHooks[t] || S.cssHooks[s], void 0 === n) return a && 'get' in a && void 0 !== (i = a.get(e, !1, r)) ? i : l[t]; | |
'string' === (o = typeof n) && (i = te.exec(n)) && i[1] && (n = se(e, t, i), o = 'number'), | |
null != n && n == n && ('number' !== o || u || (n += i && i[3] || (S.cssNumber[s] ? '' : 'px')), y.clearCloneStyle || '' !== n || 0 !== t.indexOf('background') || (l[t] = 'inherit'), a && 'set' in a && void 0 === (n = a.set(e, n, r)) || (u ? l.setProperty(t, n) : l[t] = n)) | |
} | |
}, | |
css: function (e, t, n, r) { | |
var i, | |
o, | |
a, | |
s = X(t); | |
return Ge.test(t) || (t = Xe(s)), | |
(a = S.cssHooks[t] || S.cssHooks[s]) && 'get' in a && (i = a.get(e, !0, n)), | |
void 0 === i && (i = Be(e, t, r)), | |
'normal' === i && t in Qe && (i = Qe[t]), | |
'' === n || n ? (o = parseFloat(i), !0 === n || isFinite(o) ? o || 0 : i) : i | |
} | |
}), | |
S.each(['height', | |
'width'], function (e, u) { | |
S.cssHooks[u] = { | |
get: function (e, t, n) { | |
if (t) return !Ve.test(S.css(e, 'display')) || e.getClientRects().length && e.getBoundingClientRect().width ? Ze(e, u, n) : We(e, Ye, function () { | |
return Ze(e, u, n) | |
}) | |
}, | |
set: function (e, t, n) { | |
var r, | |
i = Ie(e), | |
o = !y.scrollboxSize() && 'absolute' === i.position, | |
a = (o || n) && 'border-box' === S.css(e, 'boxSizing', !1, i), | |
s = n ? Ke(e, u, n, a, i) : 0; | |
return a && o && (s -= Math.ceil(e['offset' + u[0].toUpperCase() + u.slice(1)] - parseFloat(i[u]) - Ke(e, u, 'border', !1, i) - 0.5)), | |
s && (r = te.exec(t)) && 'px' !== (r[3] || 'px') && (e.style[u] = t, t = S.css(e, u)), | |
Je(0, t, s) | |
} | |
} | |
}), | |
S.cssHooks.marginLeft = $e(y.reliableMarginLeft, function (e, t) { | |
if (t) return (parseFloat(Be(e, 'marginLeft')) || e.getBoundingClientRect().left - We(e, { | |
marginLeft: 0 | |
}, function () { | |
return e.getBoundingClientRect().left | |
})) + 'px' | |
}), | |
S.each({ | |
margin: '', | |
padding: '', | |
border: 'Width' | |
}, function (i, o) { | |
S.cssHooks[i + o] = { | |
expand: function (e) { | |
for (var t = 0, n = { | |
}, r = 'string' == typeof e ? e.split(' ') : [ | |
e | |
]; t < 4; t++) n[i + ne[t] + o] = r[t] || r[t - 2] || r[0]; | |
return n | |
} | |
}, | |
'margin' !== i && (S.cssHooks[i + o].set = Je) | |
}), | |
S.fn.extend({ | |
css: function (e, t) { | |
return $(this, function (e, t, n) { | |
var r, | |
i, | |
o = { | |
}, | |
a = 0; | |
if (Array.isArray(t)) { | |
for (r = Ie(e), i = t.length; a < i; a++) o[t[a]] = S.css(e, t[a], !1, r); | |
return o | |
} | |
return void 0 !== n ? S.style(e, t, n) : S.css(e, t) | |
}, e, t, 1 < arguments.length) | |
} | |
}), | |
((S.Tween = et).prototype = { | |
constructor: et, | |
init: function (e, t, n, r, i, o) { | |
this.elem = e, | |
this.prop = n, | |
this.easing = i || S.easing._default, | |
this.options = t, | |
this.start = this.now = this.cur(), | |
this.end = r, | |
this.unit = o || (S.cssNumber[n] ? '' : 'px') | |
}, | |
cur: function () { | |
var e = et.propHooks[this.prop]; | |
return e && e.get ? e.get(this) : et.propHooks._default.get(this) | |
}, | |
run: function (e) { | |
var t, | |
n = et.propHooks[this.prop]; | |
return this.options.duration ? this.pos = t = S.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, | |
this.now = (this.end - this.start) * t + this.start, | |
this.options.step && this.options.step.call(this.elem, this.now, this), | |
n && n.set ? n.set(this) : et.propHooks._default.set(this), | |
this | |
} | |
}).init.prototype = et.prototype, | |
(et.propHooks = { | |
_default: { | |
get: function (e) { | |
var t; | |
return 1 !== e.elem.nodeType || null != e.elem[e.prop] && null == e.elem.style[e.prop] ? e.elem[e.prop] : (t = S.css(e.elem, e.prop, '')) && 'auto' !== t ? t : 0 | |
}, | |
set: function (e) { | |
S.fx.step[e.prop] ? S.fx.step[e.prop](e) : 1 !== e.elem.nodeType || !S.cssHooks[e.prop] && null == e.elem.style[Xe(e.prop)] ? e.elem[e.prop] = e.now : S.style(e.elem, e.prop, e.now + e.unit) | |
} | |
} | |
}).scrollTop = et.propHooks.scrollLeft = { | |
set: function (e) { | |
e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now) | |
} | |
}, | |
S.easing = { | |
linear: function (e) { | |
return e | |
}, | |
swing: function (e) { | |
return 0.5 - Math.cos(e * Math.PI) / 2 | |
}, | |
_default: 'swing' | |
}, | |
S.fx = et.prototype.init, | |
S.fx.step = { | |
}; | |
var tt, | |
nt, | |
rt, | |
it, | |
ot = /^(?:toggle|show|hide)$/, | |
at = /queueHooks$/; | |
function st() { | |
nt && (!1 === E.hidden && C.requestAnimationFrame ? C.requestAnimationFrame(st) : C.setTimeout(st, S.fx.interval), S.fx.tick()) | |
} | |
function ut() { | |
return C.setTimeout(function () { | |
tt = void 0 | |
}), | |
tt = Date.now() | |
} | |
function lt(e, t) { | |
var n, | |
r = 0, | |
i = { | |
height: e | |
}; | |
for (t = t ? 1 : 0; r < 4; r += 2 - t) i['margin' + (n = ne[r])] = i['padding' + n] = e; | |
return t && (i.opacity = i.width = e), | |
i | |
} | |
function ct(e, t, n) { | |
for (var r, i = (ft.tweeners[t] || [ | |
]).concat(ft.tweeners['*']), o = 0, a = i.length; o < a; o++) if (r = i[o].call(n, t, e)) return r | |
} | |
function ft(o, e, t) { | |
var n, | |
a, | |
r = 0, | |
i = ft.prefilters.length, | |
s = S.Deferred().always(function () { | |
delete u.elem | |
}), | |
u = function () { | |
if (a) return !1; | |
for (var e = tt || ut(), t = Math.max(0, l.startTime + l.duration - e), n = 1 - (t / l.duration || 0), r = 0, i = l.tweens.length; r < i; r++) l.tweens[r].run(n); | |
return s.notifyWith(o, [ | |
l, | |
n, | |
t | |
]), | |
n < 1 && i ? t : (i || s.notifyWith(o, [ | |
l, | |
1, | |
0 | |
]), s.resolveWith(o, [ | |
l | |
]), !1) | |
}, | |
l = s.promise({ | |
elem: o, | |
props: S.extend({ | |
}, e), | |
opts: S.extend(!0, { | |
specialEasing: { | |
}, | |
easing: S.easing._default | |
}, t), | |
originalProperties: e, | |
originalOptions: t, | |
startTime: tt || ut(), | |
duration: t.duration, | |
tweens: [ | |
], | |
createTween: function (e, t) { | |
var n = S.Tween(o, l.opts, e, t, l.opts.specialEasing[e] || l.opts.easing); | |
return l.tweens.push(n), | |
n | |
}, | |
stop: function (e) { | |
var t = 0, | |
n = e ? l.tweens.length : 0; | |
if (a) return this; | |
for (a = !0; t < n; t++) l.tweens[t].run(1); | |
return e ? (s.notifyWith(o, [ | |
l, | |
1, | |
0 | |
]), s.resolveWith(o, [ | |
l, | |
e | |
])) : s.rejectWith(o, [ | |
l, | |
e | |
]), | |
this | |
} | |
}), | |
c = l.props; | |
for (!function (e, t) { | |
var n, | |
r, | |
i, | |
o, | |
a; | |
for (n in e) if (i = t[r = X(n)], o = e[n], Array.isArray(o) && (i = o[1], o = e[n] = o[0]), n !== r && (e[r] = o, delete e[n]), (a = S.cssHooks[r]) && 'expand' in a) for (n in o = a.expand(o), delete e[r], o) n in e || (e[n] = o[n], t[n] = i); | |
else t[r] = i | |
}(c, l.opts.specialEasing); r < i; r++) if (n = ft.prefilters[r].call(l, o, c, l.opts)) return m(n.stop) && (S._queueHooks(l.elem, l.opts.queue).stop = n.stop.bind(n)), | |
n; | |
return S.map(c, ct, l), | |
m(l.opts.start) && l.opts.start.call(o, l), | |
l.progress(l.opts.progress).done(l.opts.done, l.opts.complete).fail(l.opts.fail).always(l.opts.always), | |
S.fx.timer(S.extend(u, { | |
elem: o, | |
anim: l, | |
queue: l.opts.queue | |
})), | |
l | |
} | |
S.Animation = S.extend(ft, { | |
tweeners: { | |
'*': [ | |
function (e, t) { | |
var n = this.createTween(e, t); | |
return se(n.elem, e, te.exec(t), n), | |
n | |
} | |
] | |
}, | |
tweener: function (e, t) { | |
m(e) ? (t = e, e = [ | |
'*' | |
]) : e = e.match(P); | |
for (var n, r = 0, i = e.length; r < i; r++) n = e[r], | |
ft.tweeners[n] = ft.tweeners[n] || [ | |
], | |
ft.tweeners[n].unshift(t) | |
}, | |
prefilters: [ | |
function (e, t, n) { | |
var r, | |
i, | |
o, | |
a, | |
s, | |
u, | |
l, | |
c, | |
f = 'width' in t || 'height' in t, | |
p = this, | |
d = { | |
}, | |
h = e.style, | |
g = e.nodeType && ae(e), | |
v = Y.get(e, 'fxshow'); | |
for (r in n.queue || (null == (a = S._queueHooks(e, 'fx')).unqueued && (a.unqueued = 0, s = a.empty.fire, a.empty.fire = function () { | |
a.unqueued || s() | |
}), a.unqueued++, p.always(function () { | |
p.always(function () { | |
a.unqueued--, | |
S.queue(e, 'fx').length || a.empty.fire() | |
}) | |
})), t) if (i = t[r], ot.test(i)) { | |
if (delete t[r], o = o || 'toggle' === i, i === (g ? 'hide' : 'show')) { | |
if ('show' !== i || !v || void 0 === v[r]) continue; | |
g = !0 | |
} | |
d[r] = v && v[r] || S.style(e, r) | |
} | |
if ((u = !S.isEmptyObject(t)) || !S.isEmptyObject(d)) for (r in f && 1 === e.nodeType && (n.overflow = [ | |
h.overflow, | |
h.overflowX, | |
h.overflowY | |
], null == (l = v && v.display) && (l = Y.get(e, 'display')), 'none' === (c = S.css(e, 'display')) && (l ? c = l : (le([e], !0), l = e.style.display || l, c = S.css(e, 'display'), le([e]))), ('inline' === c || 'inline-block' === c && null != l) && 'none' === S.css(e, 'float') && (u || (p.done(function () { | |
h.display = l | |
}), null == l && (c = h.display, l = 'none' === c ? '' : c)), h.display = 'inline-block')), n.overflow && (h.overflow = 'hidden', p.always(function () { | |
h.overflow = n.overflow[0], | |
h.overflowX = n.overflow[1], | |
h.overflowY = n.overflow[2] | |
})), u = !1, d) u || (v ? 'hidden' in v && (g = v.hidden) : v = Y.access(e, 'fxshow', { | |
display: l | |
}), o && (v.hidden = !g), g && le([e], !0), p.done(function () { | |
for (r in g || le([e]), Y.remove(e, 'fxshow'), d) S.style(e, r, d[r]) | |
})), | |
u = ct(g ? v[r] : 0, r, p), | |
r in v || (v[r] = u.start, g && (u.end = u.start, u.start = 0)) | |
} | |
], | |
prefilter: function (e, t) { | |
t ? ft.prefilters.unshift(e) : ft.prefilters.push(e) | |
} | |
}), | |
S.speed = function (e, t, n) { | |
var r = e && 'object' == typeof e ? S.extend({ | |
}, e) : { | |
complete: n || !n && t || m(e) && e, | |
duration: e, | |
easing: n && t || t && !m(t) && t | |
}; | |
return S.fx.off ? r.duration = 0 : 'number' != typeof r.duration && (r.duration in S.fx.speeds ? r.duration = S.fx.speeds[r.duration] : r.duration = S.fx.speeds._default), | |
null != r.queue && !0 !== r.queue || (r.queue = 'fx'), | |
r.old = r.complete, | |
r.complete = function () { | |
m(r.old) && r.old.call(this), | |
r.queue && S.dequeue(this, r.queue) | |
}, | |
r | |
}, | |
S.fn.extend({ | |
fadeTo: function (e, t, n, r) { | |
return this.filter(ae).css('opacity', 0).show().end().animate({ | |
opacity: t | |
}, e, n, r) | |
}, | |
animate: function (t, e, n, r) { | |
var i = S.isEmptyObject(t), | |
o = S.speed(e, n, r), | |
a = function () { | |
var e = ft(this, S.extend({ | |
}, t), o); | |
(i || Y.get(this, 'finish')) && e.stop(!0) | |
}; | |
return a.finish = a, | |
i || !1 === o.queue ? this.each(a) : this.queue(o.queue, a) | |
}, | |
stop: function (i, e, o) { | |
var a = function (e) { | |
var t = e.stop; | |
delete e.stop, | |
t(o) | |
}; | |
return 'string' != typeof i && (o = e, e = i, i = void 0), | |
e && this.queue(i || 'fx', [ | |
]), | |
this.each(function () { | |
var e = !0, | |
t = null != i && i + 'queueHooks', | |
n = S.timers, | |
r = Y.get(this); | |
if (t) r[t] && r[t].stop && a(r[t]); | |
else for (t in r) r[t] && r[t].stop && at.test(t) && a(r[t]); | |
for (t = n.length; t--; ) n[t].elem !== this || null != i && n[t].queue !== i || (n[t].anim.stop(o), e = !1, n.splice(t, 1)); | |
!e && o || S.dequeue(this, i) | |
}) | |
}, | |
finish: function (a) { | |
return !1 !== a && (a = a || 'fx'), | |
this.each(function () { | |
var e, | |
t = Y.get(this), | |
n = t[a + 'queue'], | |
r = t[a + 'queueHooks'], | |
i = S.timers, | |
o = n ? n.length : 0; | |
for (t.finish = !0, S.queue(this, a, [ | |
]), r && r.stop && r.stop.call(this, !0), e = i.length; e--; ) i[e].elem === this && i[e].queue === a && (i[e].anim.stop(!0), i.splice(e, 1)); | |
for (e = 0; e < o; e++) n[e] && n[e].finish && n[e].finish.call(this); | |
delete t.finish | |
}) | |
} | |
}), | |
S.each(['toggle', | |
'show', | |
'hide'], function (e, r) { | |
var i = S.fn[r]; | |
S.fn[r] = function (e, t, n) { | |
return null == e || 'boolean' == typeof e ? i.apply(this, arguments) : this.animate(lt(r, !0), e, t, n) | |
} | |
}), | |
S.each({ | |
slideDown: lt('show'), | |
slideUp: lt('hide'), | |
slideToggle: lt('toggle'), | |
fadeIn: { | |
opacity: 'show' | |
}, | |
fadeOut: { | |
opacity: 'hide' | |
}, | |
fadeToggle: { | |
opacity: 'toggle' | |
} | |
}, function (e, r) { | |
S.fn[e] = function (e, t, n) { | |
return this.animate(r, e, t, n) | |
} | |
}), | |
S.timers = [ | |
], | |
S.fx.tick = function () { | |
var e, | |
t = 0, | |
n = S.timers; | |
for (tt = Date.now(); t < n.length; t++) (e = n[t]) () || n[t] !== e || n.splice(t--, 1); | |
n.length || S.fx.stop(), | |
tt = void 0 | |
}, | |
S.fx.timer = function (e) { | |
S.timers.push(e), | |
S.fx.start() | |
}, | |
S.fx.interval = 13, | |
S.fx.start = function () { | |
nt || (nt = !0, st()) | |
}, | |
S.fx.stop = function () { | |
nt = null | |
}, | |
S.fx.speeds = { | |
slow: 600, | |
fast: 200, | |
_default: 400 | |
}, | |
S.fn.delay = function (r, e) { | |
return r = S.fx && S.fx.speeds[r] || r, | |
e = e || 'fx', | |
this.queue(e, function (e, t) { | |
var n = C.setTimeout(e, r); | |
t.stop = function () { | |
C.clearTimeout(n) | |
} | |
}) | |
}, | |
rt = E.createElement('input'), | |
it = E.createElement('select').appendChild(E.createElement('option')), | |
rt.type = 'checkbox', | |
y.checkOn = '' !== rt.value, | |
y.optSelected = it.selected, | |
(rt = E.createElement('input')).value = 't', | |
rt.type = 'radio', | |
y.radioValue = 't' === rt.value; | |
var pt, | |
dt = S.expr.attrHandle; | |
S.fn.extend({ | |
attr: function (e, t) { | |
return $(this, S.attr, e, t, 1 < arguments.length) | |
}, | |
removeAttr: function (e) { | |
return this.each(function () { | |
S.removeAttr(this, e) | |
}) | |
} | |
}), | |
S.extend({ | |
attr: function (e, t, n) { | |
var r, | |
i, | |
o = e.nodeType; | |
if (3 !== o && 8 !== o && 2 !== o) return 'undefined' == typeof e.getAttribute ? S.prop(e, t, n) : (1 === o && S.isXMLDoc(e) || (i = S.attrHooks[t.toLowerCase()] || (S.expr.match.bool.test(t) ? pt : void 0)), void 0 !== n ? null === n ? void S.removeAttr(e, t) : i && 'set' in i && void 0 !== (r = i.set(e, n, t)) ? r : (e.setAttribute(t, n + ''), n) : i && 'get' in i && null !== (r = i.get(e, t)) ? r : null == (r = S.find.attr(e, t)) ? void 0 : r) | |
}, | |
attrHooks: { | |
type: { | |
set: function (e, t) { | |
if (!y.radioValue && 'radio' === t && A(e, 'input')) { | |
var n = e.value; | |
return e.setAttribute('type', t), | |
n && (e.value = n), | |
t | |
} | |
} | |
} | |
}, | |
removeAttr: function (e, t) { | |
var n, | |
r = 0, | |
i = t && t.match(P); | |
if (i && 1 === e.nodeType) while (n = i[r++]) e.removeAttribute(n) | |
} | |
}), | |
pt = { | |
set: function (e, t, n) { | |
return !1 === t ? S.removeAttr(e, n) : e.setAttribute(n, n), | |
n | |
} | |
}, | |
S.each(S.expr.match.bool.source.match(/\w+/g), function (e, t) { | |
var a = dt[t] || S.find.attr; | |
dt[t] = function (e, t, n) { | |
var r, | |
i, | |
o = t.toLowerCase(); | |
return n || (i = dt[o], dt[o] = r, r = null != a(e, t, n) ? o : null, dt[o] = i), | |
r | |
} | |
}); | |
var ht = /^(?:input|select|textarea|button)$/i, | |
gt = /^(?:a|area)$/i; | |
function vt(e) { | |
return (e.match(P) || [ | |
]).join(' ') | |
} | |
function yt(e) { | |
return e.getAttribute && e.getAttribute('class') || '' | |
} | |
function mt(e) { | |
return Array.isArray(e) ? e : 'string' == typeof e && e.match(P) || [ | |
] | |
} | |
S.fn.extend({ | |
prop: function (e, t) { | |
return $(this, S.prop, e, t, 1 < arguments.length) | |
}, | |
removeProp: function (e) { | |
return this.each(function () { | |
delete this[S.propFix[e] || e] | |
}) | |
} | |
}), | |
S.extend({ | |
prop: function (e, t, n) { | |
var r, | |
i, | |
o = e.nodeType; | |
if (3 !== o && 8 !== o && 2 !== o) return 1 === o && S.isXMLDoc(e) || (t = S.propFix[t] || t, i = S.propHooks[t]), | |
void 0 !== n ? i && 'set' in i && void 0 !== (r = i.set(e, n, t)) ? r : e[t] = n : i && 'get' in i && null !== (r = i.get(e, t)) ? r : e[t] | |
}, | |
propHooks: { | |
tabIndex: { | |
get: function (e) { | |
var t = S.find.attr(e, 'tabindex'); | |
return t ? parseInt(t, 10) : ht.test(e.nodeName) || gt.test(e.nodeName) && e.href ? 0 : - 1 | |
} | |
} | |
}, | |
propFix: { | |
'for': 'htmlFor', | |
'class': 'className' | |
} | |
}), | |
y.optSelected || (S.propHooks.selected = { | |
get: function (e) { | |
var t = e.parentNode; | |
return t && t.parentNode && t.parentNode.selectedIndex, | |
null | |
}, | |
set: function (e) { | |
var t = e.parentNode; | |
t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex) | |
} | |
}), | |
S.each(['tabIndex', | |
'readOnly', | |
'maxLength', | |
'cellSpacing', | |
'cellPadding', | |
'rowSpan', | |
'colSpan', | |
'useMap', | |
'frameBorder', | |
'contentEditable'], function () { | |
S.propFix[this.toLowerCase()] = this | |
}), | |
S.fn.extend({ | |
addClass: function (t) { | |
var e, | |
n, | |
r, | |
i, | |
o, | |
a, | |
s, | |
u = 0; | |
if (m(t)) return this.each(function (e) { | |
S(this).addClass(t.call(this, e, yt(this))) | |
}); | |
if ((e = mt(t)).length) while (n = this[u++]) if (i = yt(n), r = 1 === n.nodeType && ' ' + vt(i) + ' ') { | |
a = 0; | |
while (o = e[a++]) r.indexOf(' ' + o + ' ') < 0 && (r += o + ' '); | |
i !== (s = vt(r)) && n.setAttribute('class', s) | |
} | |
return this | |
}, | |
removeClass: function (t) { | |
var e, | |
n, | |
r, | |
i, | |
o, | |
a, | |
s, | |
u = 0; | |
if (m(t)) return this.each(function (e) { | |
S(this).removeClass(t.call(this, e, yt(this))) | |
}); | |
if (!arguments.length) return this.attr('class', ''); | |
if ((e = mt(t)).length) while (n = this[u++]) if (i = yt(n), r = 1 === n.nodeType && ' ' + vt(i) + ' ') { | |
a = 0; | |
while (o = e[a++]) while ( - 1 < r.indexOf(' ' + o + ' ')) r = r.replace(' ' + o + ' ', ' '); | |
i !== (s = vt(r)) && n.setAttribute('class', s) | |
} | |
return this | |
}, | |
toggleClass: function (i, t) { | |
var o = typeof i, | |
a = 'string' === o || Array.isArray(i); | |
return 'boolean' == typeof t && a ? t ? this.addClass(i) : this.removeClass(i) : m(i) ? this.each(function (e) { | |
S(this).toggleClass(i.call(this, e, yt(this), t), t) | |
}) : this.each(function () { | |
var e, | |
t, | |
n, | |
r; | |
if (a) { | |
t = 0, | |
n = S(this), | |
r = mt(i); | |
while (e = r[t++]) n.hasClass(e) ? n.removeClass(e) : n.addClass(e) | |
} else void 0 !== i && 'boolean' !== o || ((e = yt(this)) && Y.set(this, '__className__', e), this.setAttribute && this.setAttribute('class', e || !1 === i ? '' : Y.get(this, '__className__') || '')) | |
}) | |
}, | |
hasClass: function (e) { | |
var t, | |
n, | |
r = 0; | |
t = ' ' + e + ' '; | |
while (n = this[r++]) if (1 === n.nodeType && - 1 < (' ' + vt(yt(n)) + ' ').indexOf(t)) return !0; | |
return !1 | |
} | |
}); | |
var xt = /\r/g; | |
S.fn.extend({ | |
val: function (n) { | |
var r, | |
e, | |
i, | |
t = this[0]; | |
return arguments.length ? (i = m(n), this.each(function (e) { | |
var t; | |
1 === this.nodeType && (null == (t = i ? n.call(this, e, S(this).val()) : n) ? t = '' : 'number' == typeof t ? t += '' : Array.isArray(t) && (t = S.map(t, function (e) { | |
return null == e ? '' : e + '' | |
})), (r = S.valHooks[this.type] || S.valHooks[this.nodeName.toLowerCase()]) && 'set' in r && void 0 !== r.set(this, t, 'value') || (this.value = t)) | |
})) : t ? (r = S.valHooks[t.type] || S.valHooks[t.nodeName.toLowerCase()]) && 'get' in r && void 0 !== (e = r.get(t, 'value')) ? e : 'string' == typeof (e = t.value) ? e.replace(xt, '') : null == e ? '' : e : void 0 | |
} | |
}), | |
S.extend({ | |
valHooks: { | |
option: { | |
get: function (e) { | |
var t = S.find.attr(e, 'value'); | |
return null != t ? t : vt(S.text(e)) | |
} | |
}, | |
select: { | |
get: function (e) { | |
var t, | |
n, | |
r, | |
i = e.options, | |
o = e.selectedIndex, | |
a = 'select-one' === e.type, | |
s = a ? null : [ | |
], | |
u = a ? o + 1 : i.length; | |
for (r = o < 0 ? u : a ? o : 0; r < u; r++) if (((n = i[r]).selected || r === o) && !n.disabled && (!n.parentNode.disabled || !A(n.parentNode, 'optgroup'))) { | |
if (t = S(n).val(), a) return t; | |
s.push(t) | |
} | |
return s | |
}, | |
set: function (e, t) { | |
var n, | |
r, | |
i = e.options, | |
o = S.makeArray(t), | |
a = i.length; | |
while (a--) ((r = i[a]).selected = - 1 < S.inArray(S.valHooks.option.get(r), o)) && (n = !0); | |
return n || (e.selectedIndex = - 1), | |
o | |
} | |
} | |
} | |
}), | |
S.each(['radio', | |
'checkbox'], function () { | |
S.valHooks[this] = { | |
set: function (e, t) { | |
if (Array.isArray(t)) return e.checked = - 1 < S.inArray(S(e).val(), t) | |
} | |
}, | |
y.checkOn || (S.valHooks[this].get = function (e) { | |
return null === e.getAttribute('value') ? 'on' : e.value | |
}) | |
}), | |
y.focusin = 'onfocusin' in C; | |
var bt = /^(?:focusinfocus|focusoutblur)$/, | |
wt = function (e) { | |
e.stopPropagation() | |
}; | |
S.extend(S.event, { | |
trigger: function (e, t, n, r) { | |
var i, | |
o, | |
a, | |
s, | |
u, | |
l, | |
c, | |
f, | |
p = [ | |
n || E | |
], | |
d = v.call(e, 'type') ? e.type : e, | |
h = v.call(e, 'namespace') ? e.namespace.split('.') : [ | |
]; | |
if (o = f = a = n = n || E, 3 !== n.nodeType && 8 !== n.nodeType && !bt.test(d + S.event.triggered) && ( - 1 < d.indexOf('.') && (d = (h = d.split('.')).shift(), h.sort()), u = d.indexOf(':') < 0 && 'on' + d, (e = e[S.expando] ? e : new S.Event(d, 'object' == typeof e && e)).isTrigger = r ? 2 : 3, e.namespace = h.join('.'), e.rnamespace = e.namespace ? new RegExp('(^|\\.)' + h.join('\\.(?:.*\\.|)') + '(\\.|$)') : null, e.result = void 0, e.target || (e.target = n), t = null == t ? [ | |
e | |
] : S.makeArray(t, [ | |
e | |
]), c = S.event.special[d] || { | |
}, r || !c.trigger || !1 !== c.trigger.apply(n, t))) { | |
if (!r && !c.noBubble && !x(n)) { | |
for (s = c.delegateType || d, bt.test(s + d) || (o = o.parentNode); o; o = o.parentNode) p.push(o), | |
a = o; | |
a === (n.ownerDocument || E) && p.push(a.defaultView || a.parentWindow || C) | |
} | |
i = 0; | |
while ((o = p[i++]) && !e.isPropagationStopped()) f = o, | |
e.type = 1 < i ? s : c.bindType || d, | |
(l = (Y.get(o, 'events') || Object.create(null)) [e.type] && Y.get(o, 'handle')) && l.apply(o, t), | |
(l = u && o[u]) && l.apply && V(o) && (e.result = l.apply(o, t), !1 === e.result && e.preventDefault()); | |
return e.type = d, | |
r || e.isDefaultPrevented() || c._default && !1 !== c._default.apply(p.pop(), t) || !V(n) || u && m(n[d]) && !x(n) && ((a = n[u]) && (n[u] = null), S.event.triggered = d, e.isPropagationStopped() && f.addEventListener(d, wt), n[d](), e.isPropagationStopped() && f.removeEventListener(d, wt), S.event.triggered = void 0, a && (n[u] = a)), | |
e.result | |
} | |
}, | |
simulate: function (e, t, n) { | |
var r = S.extend(new S.Event, n, { | |
type: e, | |
isSimulated: !0 | |
}); | |
S.event.trigger(r, null, t) | |
} | |
}), | |
S.fn.extend({ | |
trigger: function (e, t) { | |
return this.each(function () { | |
S.event.trigger(e, t, this) | |
}) | |
}, | |
triggerHandler: function (e, t) { | |
var n = this[0]; | |
if (n) return S.event.trigger(e, t, n, !0) | |
} | |
}), | |
y.focusin || S.each({ | |
focus: 'focusin', | |
blur: 'focusout' | |
}, function (n, r) { | |
var i = function (e) { | |
S.event.simulate(r, e.target, S.event.fix(e)) | |
}; | |
S.event.special[r] = { | |
setup: function () { | |
var e = this.ownerDocument || this.document || this, | |
t = Y.access(e, r); | |
t || e.addEventListener(n, i, !0), | |
Y.access(e, r, (t || 0) + 1) | |
}, | |
teardown: function () { | |
var e = this.ownerDocument || this.document || this, | |
t = Y.access(e, r) - 1; | |
t ? Y.access(e, r, t) : (e.removeEventListener(n, i, !0), Y.remove(e, r)) | |
} | |
} | |
}); | |
var Tt = C.location, | |
Ct = { | |
guid: Date.now() | |
}, | |
Et = /\?/; | |
S.parseXML = function (e) { | |
var t; | |
if (!e || 'string' != typeof e) return null; | |
try { | |
t = (new C.DOMParser).parseFromString(e, 'text/xml') | |
} catch (e) { | |
t = void 0 | |
} | |
return t && !t.getElementsByTagName('parsererror').length || S.error('Invalid XML: ' + e), | |
t | |
}; | |
var St = /\[\]$/, | |
kt = /\r?\n/g, | |
At = /^(?:submit|button|image|reset|file)$/i, | |
Nt = /^(?:input|select|textarea|keygen)/i; | |
function Dt(n, e, r, i) { | |
var t; | |
if (Array.isArray(e)) S.each(e, function (e, t) { | |
r || St.test(n) ? i(n, t) : Dt(n + '[' + ('object' == typeof t && null != t ? e : '') + ']', t, r, i) | |
}); | |
else if (r || 'object' !== w(e)) i(n, e); | |
else for (t in e) Dt(n + '[' + t + ']', e[t], r, i) | |
} | |
S.param = function (e, t) { | |
var n, | |
r = [ | |
], | |
i = function (e, t) { | |
var n = m(t) ? t() : t; | |
r[r.length] = encodeURIComponent(e) + '=' + encodeURIComponent(null == n ? '' : n) | |
}; | |
if (null == e) return ''; | |
if (Array.isArray(e) || e.jquery && !S.isPlainObject(e)) S.each(e, function () { | |
i(this.name, this.value) | |
}); | |
else for (n in e) Dt(n, e[n], t, i); | |
return r.join('&') | |
}, | |
S.fn.extend({ | |
serialize: function () { | |
return S.param(this.serializeArray()) | |
}, | |
serializeArray: function () { | |
return this.map(function () { | |
var e = S.prop(this, 'elements'); | |
return e ? S.makeArray(e) : this | |
}).filter(function () { | |
var e = this.type; | |
return this.name && !S(this).is(':disabled') && Nt.test(this.nodeName) && !At.test(e) && (this.checked || !pe.test(e)) | |
}).map(function (e, t) { | |
var n = S(this).val(); | |
return null == n ? null : Array.isArray(n) ? S.map(n, function (e) { | |
return { | |
name: t.name, | |
value: e.replace(kt, '\r\n') | |
} | |
}) : { | |
name: t.name, | |
value: n.replace(kt, '\r\n') | |
} | |
}).get() | |
} | |
}); | |
var jt = /%20/g, | |
qt = /#.*$/, | |
Lt = /([?&])_=[^&]*/, | |
Ht = /^(.*?):[ \t]*([^\r\n]*)$/gm, | |
Ot = /^(?:GET|HEAD)$/, | |
Pt = /^\/\//, | |
Rt = { | |
}, | |
Mt = { | |
}, | |
It = '*/'.concat('*'), | |
Wt = E.createElement('a'); | |
function Ft(o) { | |
return function (e, t) { | |
'string' != typeof e && (t = e, e = '*'); | |
var n, | |
r = 0, | |
i = e.toLowerCase().match(P) || [ | |
]; | |
if (m(t)) while (n = i[r++]) '+' === n[0] ? (n = n.slice(1) || '*', (o[n] = o[n] || [ | |
]).unshift(t)) : (o[n] = o[n] || [ | |
]).push(t) | |
} | |
} | |
function Bt(t, i, o, a) { | |
var s = { | |
}, | |
u = t === Mt; | |
function l(e) { | |
var r; | |
return s[e] = !0, | |
S.each(t[e] || [ | |
], function (e, t) { | |
var n = t(i, o, a); | |
return 'string' != typeof n || u || s[n] ? u ? !(r = n) : void 0 : (i.dataTypes.unshift(n), l(n), !1) | |
}), | |
r | |
} | |
return l(i.dataTypes[0]) || !s['*'] && l('*') | |
} | |
function $t(e, t) { | |
var n, | |
r, | |
i = S.ajaxSettings.flatOptions || { | |
}; | |
for (n in t) void 0 !== t[n] && ((i[n] ? e : r || (r = { | |
})) [n] = t[n]); | |
return r && S.extend(!0, e, r), | |
e | |
} | |
Wt.href = Tt.href, | |
S.extend({ | |
active: 0, | |
lastModified: { | |
}, | |
etag: { | |
}, | |
ajaxSettings: { | |
url: Tt.href, | |
type: 'GET', | |
isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol), | |
global: !0, | |
processData: !0, | |
async: !0, | |
contentType: 'application/x-www-form-urlencoded; charset=UTF-8', | |
accepts: { | |
'*': It, | |
text: 'text/plain', | |
html: 'text/html', | |
xml: 'application/xml, text/xml', | |
json: 'application/json, text/javascript' | |
}, | |
contents: { | |
xml: /\bxml\b/, | |
html: /\bhtml/, | |
json: /\bjson\b/ | |
}, | |
responseFields: { | |
xml: 'responseXML', | |
text: 'responseText', | |
json: 'responseJSON' | |
}, | |
converters: { | |
'* text': String, | |
'text html': !0, | |
'text json': JSON.parse, | |
'text xml': S.parseXML | |
}, | |
flatOptions: { | |
url: !0, | |
context: !0 | |
} | |
}, | |
ajaxSetup: function (e, t) { | |
return t ? $t($t(e, S.ajaxSettings), t) : $t(S.ajaxSettings, e) | |
}, | |
ajaxPrefilter: Ft(Rt), | |
ajaxTransport: Ft(Mt), | |
ajax: function (e, t) { | |
'object' == typeof e && (t = e, e = void 0), | |
t = t || { | |
}; | |
var c, | |
f, | |
p, | |
n, | |
d, | |
r, | |
h, | |
g, | |
i, | |
o, | |
v = S.ajaxSetup({ | |
}, t), | |
y = v.context || v, | |
m = v.context && (y.nodeType || y.jquery) ? S(y) : S.event, | |
x = S.Deferred(), | |
b = S.Callbacks('once memory'), | |
w = v.statusCode || { | |
}, | |
a = { | |
}, | |
s = { | |
}, | |
u = 'canceled', | |
T = { | |
readyState: 0, | |
getResponseHeader: function (e) { | |
var t; | |
if (h) { | |
if (!n) { | |
n = { | |
}; | |
while (t = Ht.exec(p)) n[t[1].toLowerCase() + ' '] = (n[t[1].toLowerCase() + ' '] || [ | |
]).concat(t[2]) | |
} | |
t = n[e.toLowerCase() + ' '] | |
} | |
return null == t ? null : t.join(', ') | |
}, | |
getAllResponseHeaders: function () { | |
return h ? p : null | |
}, | |
setRequestHeader: function (e, t) { | |
return null == h && (e = s[e.toLowerCase()] = s[e.toLowerCase()] || e, a[e] = t), | |
this | |
}, | |
overrideMimeType: function (e) { | |
return null == h && (v.mimeType = e), | |
this | |
}, | |
statusCode: function (e) { | |
var t; | |
if (e) if (h) T.always(e[T.status]); | |
else for (t in e) w[t] = [ | |
w[t], | |
e[t] | |
]; | |
return this | |
}, | |
abort: function (e) { | |
var t = e || u; | |
return c && c.abort(t), | |
l(0, t), | |
this | |
} | |
}; | |
if (x.promise(T), v.url = ((e || v.url || Tt.href) + '').replace(Pt, Tt.protocol + '//'), v.type = t.method || t.type || v.method || v.type, v.dataTypes = (v.dataType || '*').toLowerCase().match(P) || [ | |
'' | |
], null == v.crossDomain) { | |
r = E.createElement('a'); | |
try { | |
r.href = v.url, | |
r.href = r.href, | |
v.crossDomain = Wt.protocol + '//' + Wt.host != r.protocol + '//' + r.host | |
} catch (e) { | |
v.crossDomain = !0 | |
} | |
} | |
if (v.data && v.processData && 'string' != typeof v.data && (v.data = S.param(v.data, v.traditional)), Bt(Rt, v, t, T), h) return T; | |
for (i in (g = S.event && v.global) && 0 == S.active++ && S.event.trigger('ajaxStart'), v.type = v.type.toUpperCase(), v.hasContent = !Ot.test(v.type), f = v.url.replace(qt, ''), v.hasContent ? v.data && v.processData && 0 === (v.contentType || '').indexOf('application/x-www-form-urlencoded') && (v.data = v.data.replace(jt, '+')) : (o = v.url.slice(f.length), v.data && (v.processData || 'string' == typeof v.data) && (f += (Et.test(f) ? '&' : '?') + v.data, delete v.data), !1 === v.cache && (f = f.replace(Lt, '$1'), o = (Et.test(f) ? '&' : '?') + '_=' + Ct.guid++ + o), v.url = f + o), v.ifModified && (S.lastModified[f] && T.setRequestHeader('If-Modified-Since', S.lastModified[f]), S.etag[f] && T.setRequestHeader('If-None-Match', S.etag[f])), (v.data && v.hasContent && !1 !== v.contentType || t.contentType) && T.setRequestHeader('Content-Type', v.contentType), T.setRequestHeader('Accept', v.dataTypes[0] && v.accepts[v.dataTypes[0]] ? v.accepts[v.dataTypes[0]] + ('*' !== v.dataTypes[0] ? ', ' + It + '; q=0.01' : '') : v.accepts['*']), v.headers) T.setRequestHeader(i, v.headers[i]); | |
if (v.beforeSend && (!1 === v.beforeSend.call(y, T, v) || h)) return T.abort(); | |
if (u = 'abort', b.add(v.complete), T.done(v.success), T.fail(v.error), c = Bt(Mt, v, t, T)) { | |
if (T.readyState = 1, g && m.trigger('ajaxSend', [ | |
T, | |
v | |
]), h) return T; | |
v.async && 0 < v.timeout && (d = C.setTimeout(function () { | |
T.abort('timeout') | |
}, v.timeout)); | |
try { | |
h = !1, | |
c.send(a, l) | |
} catch (e) { | |
if (h) throw e; | |
l( - 1, e) | |
} | |
} else l( - 1, 'No Transport'); | |
function l(e, t, n, r) { | |
var i, | |
o, | |
a, | |
s, | |
u, | |
l = t; | |
h || (h = !0, d && C.clearTimeout(d), c = void 0, p = r || '', T.readyState = 0 < e ? 4 : 0, i = 200 <= e && e < 300 || 304 === e, n && (s = function (e, t, n) { | |
var r, | |
i, | |
o, | |
a, | |
s = e.contents, | |
u = e.dataTypes; | |
while ('*' === u[0]) u.shift(), | |
void 0 === r && (r = e.mimeType || t.getResponseHeader('Content-Type')); | |
if (r) for (i in s) if (s[i] && s[i].test(r)) { | |
u.unshift(i); | |
break | |
} | |
if (u[0] in n) o = u[0]; | |
else { | |
for (i in n) { | |
if (!u[0] || e.converters[i + ' ' + u[0]]) { | |
o = i; | |
break | |
} | |
a || (a = i) | |
} | |
o = o || a | |
} | |
if (o) return o !== u[0] && u.unshift(o), | |
n[o] | |
}(v, T, n)), !i && - 1 < S.inArray('script', v.dataTypes) && (v.converters['text script'] = function () { | |
}), s = function (e, t, n, r) { | |
var i, | |
o, | |
a, | |
s, | |
u, | |
l = { | |
}, | |
c = e.dataTypes.slice(); | |
if (c[1]) for (a in e.converters) l[a.toLowerCase()] = e.converters[a]; | |
o = c.shift(); | |
while (o) if (e.responseFields[o] && (n[e.responseFields[o]] = t), !u && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), u = o, o = c.shift()) if ('*' === o) o = u; | |
else if ('*' !== u && u !== o) { | |
if (!(a = l[u + ' ' + o] || l['* ' + o])) for (i in l) if ((s = i.split(' ')) [1] === o && (a = l[u + ' ' + s[0]] || l['* ' + s[0]])) { | |
!0 === a ? a = l[i] : !0 !== l[i] && (o = s[0], c.unshift(s[1])); | |
break | |
} | |
if (!0 !== a) if (a && e['throws']) t = a(t); | |
else try { | |
t = a(t) | |
} catch (e) { | |
return { | |
state: 'parsererror', | |
error: a ? e : 'No conversion from ' + u + ' to ' + o | |
} | |
} | |
} | |
return { | |
state: 'success', | |
data: t | |
} | |
}(v, s, T, i), i ? (v.ifModified && ((u = T.getResponseHeader('Last-Modified')) && (S.lastModified[f] = u), (u = T.getResponseHeader('etag')) && (S.etag[f] = u)), 204 === e || 'HEAD' === v.type ? l = 'nocontent' : 304 === e ? l = 'notmodified' : (l = s.state, o = s.data, i = !(a = s.error))) : (a = l, !e && l || (l = 'error', e < 0 && (e = 0))), T.status = e, T.statusText = (t || l) + '', i ? x.resolveWith(y, [ | |
o, | |
l, | |
T | |
]) : x.rejectWith(y, [ | |
T, | |
l, | |
a | |
]), T.statusCode(w), w = void 0, g && m.trigger(i ? 'ajaxSuccess' : 'ajaxError', [ | |
T, | |
v, | |
i ? o : a | |
]), b.fireWith(y, [ | |
T, | |
l | |
]), g && (m.trigger('ajaxComplete', [ | |
T, | |
v | |
]), --S.active || S.event.trigger('ajaxStop'))) | |
} | |
return T | |
}, | |
getJSON: function (e, t, n) { | |
return S.get(e, t, n, 'json') | |
}, | |
getScript: function (e, t) { | |
return S.get(e, void 0, t, 'script') | |
} | |
}), | |
S.each(['get', | |
'post'], function (e, i) { | |
S[i] = function (e, t, n, r) { | |
return m(t) && (r = r || n, n = t, t = void 0), | |
S.ajax(S.extend({ | |
url: e, | |
type: i, | |
dataType: r, | |
data: t, | |
success: n | |
}, S.isPlainObject(e) && e)) | |
} | |
}), | |
S.ajaxPrefilter(function (e) { | |
var t; | |
for (t in e.headers) 'content-type' === t.toLowerCase() && (e.contentType = e.headers[t] || '') | |
}), | |
S._evalUrl = function (e, t, n) { | |
return S.ajax({ | |
url: e, | |
type: 'GET', | |
dataType: 'script', | |
cache: !0, | |
async: !1, | |
global: !1, | |
converters: { | |
'text script': function () { | |
} | |
}, | |
dataFilter: function (e) { | |
S.globalEval(e, t, n) | |
} | |
}) | |
}, | |
S.fn.extend({ | |
wrapAll: function (e) { | |
var t; | |
return this[0] && (m(e) && (e = e.call(this[0])), t = S(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map(function () { | |
var e = this; | |
while (e.firstElementChild) e = e.firstElementChild; | |
return e | |
}).append(this)), | |
this | |
}, | |
wrapInner: function (n) { | |
return m(n) ? this.each(function (e) { | |
S(this).wrapInner(n.call(this, e)) | |
}) : this.each(function () { | |
var e = S(this), | |
t = e.contents(); | |
t.length ? t.wrapAll(n) : e.append(n) | |
}) | |
}, | |
wrap: function (t) { | |
var n = m(t); | |
return this.each(function (e) { | |
S(this).wrapAll(n ? t.call(this, e) : t) | |
}) | |
}, | |
unwrap: function (e) { | |
return this.parent(e).not('body').each(function () { | |
S(this).replaceWith(this.childNodes) | |
}), | |
this | |
} | |
}), | |
S.expr.pseudos.hidden = function (e) { | |
return !S.expr.pseudos.visible(e) | |
}, | |
S.expr.pseudos.visible = function (e) { | |
return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length) | |
}, | |
S.ajaxSettings.xhr = function () { | |
try { | |
return new C.XMLHttpRequest | |
} catch (e) { | |
} | |
}; | |
var _t = { | |
0: 200, | |
1223: 204 | |
}, | |
zt = S.ajaxSettings.xhr(); | |
y.cors = !!zt && 'withCredentials' in zt, | |
y.ajax = zt = !!zt, | |
S.ajaxTransport(function (i) { | |
var o, | |
a; | |
if (y.cors || zt && !i.crossDomain) return { | |
send: function (e, t) { | |
var n, | |
r = i.xhr(); | |
if (r.open(i.type, i.url, i.async, i.username, i.password), i.xhrFields) for (n in i.xhrFields) r[n] = i.xhrFields[n]; | |
for (n in i.mimeType && r.overrideMimeType && r.overrideMimeType(i.mimeType), i.crossDomain || e['X-Requested-With'] || (e['X-Requested-With'] = 'XMLHttpRequest'), e) r.setRequestHeader(n, e[n]); | |
o = function (e) { | |
return function () { | |
o && (o = a = r.onload = r.onerror = r.onabort = r.ontimeout = r.onreadystatechange = null, 'abort' === e ? r.abort() : 'error' === e ? 'number' != typeof r.status ? t(0, 'error') : t(r.status, r.statusText) : t(_t[r.status] || r.status, r.statusText, 'text' !== (r.responseType || 'text') || 'string' != typeof r.responseText ? { | |
binary: r.response | |
} | |
: { | |
text: r.responseText | |
}, r.getAllResponseHeaders())) | |
} | |
}, | |
r.onload = o(), | |
a = r.onerror = r.ontimeout = o('error'), | |
void 0 !== r.onabort ? r.onabort = a : r.onreadystatechange = function () { | |
4 === r.readyState && C.setTimeout(function () { | |
o && a() | |
}) | |
}, | |
o = o('abort'); | |
try { | |
r.send(i.hasContent && i.data || null) | |
} catch (e) { | |
if (o) throw e | |
} | |
}, | |
abort: function () { | |
o && o() | |
} | |
} | |
}), | |
S.ajaxPrefilter(function (e) { | |
e.crossDomain && (e.contents.script = !1) | |
}), | |
S.ajaxSetup({ | |
accepts: { | |
script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript' | |
}, | |
contents: { | |
script: /\b(?:java|ecma)script\b/ | |
}, | |
converters: { | |
'text script': function (e) { | |
return S.globalEval(e), | |
e | |
} | |
} | |
}), | |
S.ajaxPrefilter('script', function (e) { | |
void 0 === e.cache && (e.cache = !1), | |
e.crossDomain && (e.type = 'GET') | |
}), | |
S.ajaxTransport('script', function (n) { | |
var r, | |
i; | |
if (n.crossDomain || n.scriptAttrs) return { | |
send: function (e, t) { | |
r = S('<script>').attr(n.scriptAttrs || { | |
}).prop({ | |
charset: n.scriptCharset, | |
src: n.url | |
}).on('load error', i = function (e) { | |
r.remove(), | |
i = null, | |
e && t('error' === e.type ? 404 : 200, e.type) | |
}), | |
E.head.appendChild(r[0]) | |
}, | |
abort: function () { | |
i && i() | |
} | |
} | |
}); | |
var Ut, | |
Xt = [ | |
], | |
Vt = /(=)\?(?=&|$)|\?\?/; | |
S.ajaxSetup({ | |
jsonp: 'callback', | |
jsonpCallback: function () { | |
var e = Xt.pop() || S.expando + '_' + Ct.guid++; | |
return this[e] = !0, | |
e | |
} | |
}), | |
S.ajaxPrefilter('json jsonp', function (e, t, n) { | |
var r, | |
i, | |
o, | |
a = !1 !== e.jsonp && (Vt.test(e.url) ? 'url' : 'string' == typeof e.data && 0 === (e.contentType || '').indexOf('application/x-www-form-urlencoded') && Vt.test(e.data) && 'data'); | |
if (a || 'jsonp' === e.dataTypes[0]) return r = e.jsonpCallback = m(e.jsonpCallback) ? e.jsonpCallback() : e.jsonpCallback, | |
a ? e[a] = e[a].replace(Vt, '$1' + r) : !1 !== e.jsonp && (e.url += (Et.test(e.url) ? '&' : '?') + e.jsonp + '=' + r), | |
e.converters['script json'] = function () { | |
return o || S.error(r + ' was not called'), | |
o[0] | |
}, | |
e.dataTypes[0] = 'json', | |
i = C[r], | |
C[r] = function () { | |
o = arguments | |
}, | |
n.always(function () { | |
void 0 === i ? S(C).removeProp(r) : C[r] = i, | |
e[r] && (e.jsonpCallback = t.jsonpCallback, Xt.push(r)), | |
o && m(i) && i(o[0]), | |
o = i = void 0 | |
}), | |
'script' | |
}), | |
y.createHTMLDocument = ((Ut = E.implementation.createHTMLDocument('').body).innerHTML = '<form></form><form></form>', 2 === Ut.childNodes.length), | |
S.parseHTML = function (e, t, n) { | |
return 'string' != typeof e ? [ | |
] : ('boolean' == typeof t && (n = t, t = !1), t || (y.createHTMLDocument ? ((r = (t = E.implementation.createHTMLDocument('')).createElement('base')).href = E.location.href, t.head.appendChild(r)) : t = E), o = !n && [ | |
], (i = N.exec(e)) ? [ | |
t.createElement(i[1]) | |
] : (i = xe([e], t, o), o && o.length && S(o).remove(), S.merge([], i.childNodes))); | |
var r, | |
i, | |
o | |
}, | |
S.fn.load = function (e, t, n) { | |
var r, | |
i, | |
o, | |
a = this, | |
s = e.indexOf(' '); | |
return - 1 < s && (r = vt(e.slice(s)), e = e.slice(0, s)), | |
m(t) ? (n = t, t = void 0) : t && 'object' == typeof t && (i = 'POST'), | |
0 < a.length && S.ajax({ | |
url: e, | |
type: i || 'GET', | |
dataType: 'html', | |
data: t | |
}).done(function (e) { | |
o = arguments, | |
a.html(r ? S('<div>').append(S.parseHTML(e)).find(r) : e) | |
}).always(n && function (e, t) { | |
a.each(function () { | |
n.apply(this, o || [ | |
e.responseText, | |
t, | |
e | |
]) | |
}) | |
}), | |
this | |
}, | |
S.expr.pseudos.animated = function (t) { | |
return S.grep(S.timers, function (e) { | |
return t === e.elem | |
}).length | |
}, | |
S.offset = { | |
setOffset: function (e, t, n) { | |
var r, | |
i, | |
o, | |
a, | |
s, | |
u, | |
l = S.css(e, 'position'), | |
c = S(e), | |
f = { | |
}; | |
'static' === l && (e.style.position = 'relative'), | |
s = c.offset(), | |
o = S.css(e, 'top'), | |
u = S.css(e, 'left'), | |
('absolute' === l || 'fixed' === l) && - 1 < (o + u).indexOf('auto') ? (a = (r = c.position()).top, i = r.left) : (a = parseFloat(o) || 0, i = parseFloat(u) || 0), | |
m(t) && (t = t.call(e, n, S.extend({ | |
}, s))), | |
null != t.top && (f.top = t.top - s.top + a), | |
null != t.left && (f.left = t.left - s.left + i), | |
'using' in t ? t.using.call(e, f) : ('number' == typeof f.top && (f.top += 'px'), 'number' == typeof f.left && (f.left += 'px'), c.css(f)) | |
} | |
}, | |
S.fn.extend({ | |
offset: function (t) { | |
if (arguments.length) return void 0 === t ? this : this.each(function (e) { | |
S.offset.setOffset(this, t, e) | |
}); | |
var e, | |
n, | |
r = this[0]; | |
return r ? r.getClientRects().length ? (e = r.getBoundingClientRect(), n = r.ownerDocument.defaultView, { | |
top: e.top + n.pageYOffset, | |
left: e.left + n.pageXOffset | |
}) : { | |
top: 0, | |
left: 0 | |
} | |
: void 0 | |
}, | |
position: function () { | |
if (this[0]) { | |
var e, | |
t, | |
n, | |
r = this[0], | |
i = { | |
top: 0, | |
left: 0 | |
}; | |
if ('fixed' === S.css(r, 'position')) t = r.getBoundingClientRect(); | |
else { | |
t = this.offset(), | |
n = r.ownerDocument, | |
e = r.offsetParent || n.documentElement; | |
while (e && (e === n.body || e === n.documentElement) && 'static' === S.css(e, 'position')) e = e.parentNode; | |
e && e !== r && 1 === e.nodeType && ((i = S(e).offset()).top += S.css(e, 'borderTopWidth', !0), i.left += S.css(e, 'borderLeftWidth', !0)) | |
} | |
return { | |
top: t.top - i.top - S.css(r, 'marginTop', !0), | |
left: t.left - i.left - S.css(r, 'marginLeft', !0) | |
} | |
} | |
}, | |
offsetParent: function () { | |
return this.map(function () { | |
var e = this.offsetParent; | |
while (e && 'static' === S.css(e, 'position')) e = e.offsetParent; | |
return e || re | |
}) | |
} | |
}), | |
S.each({ | |
scrollLeft: 'pageXOffset', | |
scrollTop: 'pageYOffset' | |
}, function (t, i) { | |
var o = 'pageYOffset' === i; | |
S.fn[t] = function (e) { | |
return $(this, function (e, t, n) { | |
var r; | |
if (x(e) ? r = e : 9 === e.nodeType && (r = e.defaultView), void 0 === n) return r ? r[i] : e[t]; | |
r ? r.scrollTo(o ? r.pageXOffset : n, o ? n : r.pageYOffset) : e[t] = n | |
}, t, e, arguments.length) | |
} | |
}), | |
S.each(['top', | |
'left'], function (e, n) { | |
S.cssHooks[n] = $e(y.pixelPosition, function (e, t) { | |
if (t) return t = Be(e, n), | |
Me.test(t) ? S(e).position() [n] + 'px' : t | |
}) | |
}), | |
S.each({ | |
Height: 'height', | |
Width: 'width' | |
}, function (a, s) { | |
S.each({ | |
padding: 'inner' + a, | |
content: s, | |
'': 'outer' + a | |
}, function (r, o) { | |
S.fn[o] = function (e, t) { | |
var n = arguments.length && (r || 'boolean' != typeof e), | |
i = r || (!0 === e || !0 === t ? 'margin' : 'border'); | |
return $(this, function (e, t, n) { | |
var r; | |
return x(e) ? 0 === o.indexOf('outer') ? e['inner' + a] : e.document.documentElement['client' + a] : 9 === e.nodeType ? (r = e.documentElement, Math.max(e.body['scroll' + a], r['scroll' + a], e.body['offset' + a], r['offset' + a], r['client' + a])) : void 0 === n ? S.css(e, t, i) : S.style(e, t, n, i) | |
}, s, n ? e : void 0, n) | |
} | |
}) | |
}), | |
S.each(['ajaxStart', | |
'ajaxStop', | |
'ajaxComplete', | |
'ajaxError', | |
'ajaxSuccess', | |
'ajaxSend'], function (e, t) { | |
S.fn[t] = function (e) { | |
return this.on(t, e) | |
} | |
}), | |
S.fn.extend({ | |
bind: function (e, t, n) { | |
return this.on(e, null, t, n) | |
}, | |
unbind: function (e, t) { | |
return this.off(e, null, t) | |
}, | |
delegate: function (e, t, n, r) { | |
return this.on(t, e, n, r) | |
}, | |
undelegate: function (e, t, n) { | |
return 1 === arguments.length ? this.off(e, '**') : this.off(t, e || '**', n) | |
}, | |
hover: function (e, t) { | |
return this.mouseenter(e).mouseleave(t || e) | |
} | |
}), | |
S.each('blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu'.split(' '), function (e, n) { | |
S.fn[n] = function (e, t) { | |
return 0 < arguments.length ? this.on(n, null, e, t) : this.trigger(n) | |
} | |
}); | |
var Gt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; | |
S.proxy = function (e, t) { | |
var n, | |
r, | |
i; | |
if ('string' == typeof t && (n = e[t], t = e, e = n), m(e)) return r = s.call(arguments, 2), | |
(i = function () { | |
return e.apply(t || this, r.concat(s.call(arguments))) | |
}).guid = e.guid = e.guid || S.guid++, | |
i | |
}, | |
S.holdReady = function (e) { | |
e ? S.readyWait++ : S.ready(!0) | |
}, | |
S.isArray = Array.isArray, | |
S.parseJSON = JSON.parse, | |
S.nodeName = A, | |
S.isFunction = m, | |
S.isWindow = x, | |
S.camelCase = X, | |
S.type = w, | |
S.now = Date.now, | |
S.isNumeric = function (e) { | |
var t = S.type(e); | |
return ('number' === t || 'string' === t) && !isNaN(e - parseFloat(e)) | |
}, | |
S.trim = function (e) { | |
return null == e ? '' : (e + '').replace(Gt, '') | |
}, | |
'function' == typeof define && define.amd && define('jquery', [ | |
], function () { | |
return S | |
}); | |
var Yt = C.jQuery, | |
Qt = C.$; | |
return S.noConflict = function (e) { | |
return C.$ === S && (C.$ = Qt), | |
e && C.jQuery === S && (C.jQuery = Yt), | |
S | |
}, | |
'undefined' == typeof e && (C.jQuery = C.$ = S), | |
S | |
}); | |
; | |
/*! | |
* jQuery Once v2.2.3 - http://github.com/robloach/jquery-once | |
* @license MIT, GPL-2.0 | |
* http://opensource.org/licenses/MIT | |
* http://opensource.org/licenses/GPL-2.0 | |
*/ | |
(function (e) { | |
'use strict'; | |
if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { | |
e(require('jquery')) | |
} else if (typeof define === 'function' && define.amd) { | |
define(['jquery'], e) | |
} else { | |
e(jQuery) | |
} | |
}) (function (t) { | |
'use strict'; | |
var r = function (e) { | |
e = e || 'once'; | |
if (typeof e !== 'string') { | |
throw new TypeError('The jQuery Once id parameter must be a string') | |
} | |
return e | |
}; | |
t.fn.once = function (e) { | |
var n = 'jquery-once-' + r(e); | |
return this.filter(function () { | |
return t(this).data(n) !== true | |
}).data(n, true) | |
}; | |
t.fn.removeOnce = function (e) { | |
return this.findOnce(e).removeData('jquery-once-' + r(e)) | |
}; | |
t.fn.findOnce = function (e) { | |
var n = 'jquery-once-' + r(e); | |
return this.filter(function () { | |
return t(this).data(n) === true | |
}) | |
} | |
}); | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
(function () { | |
var settingsElement = document.querySelector('head > script[type="application/json"][data-drupal-selector="drupal-settings-json"], body > script[type="application/json"][data-drupal-selector="drupal-settings-json"]'); | |
window.drupalSettings = { | |
}; | |
if (settingsElement !== null) { | |
window.drupalSettings = JSON.parse(settingsElement.textContent); | |
} | |
}) (); | |
; | |
window.drupalTranslations = { | |
'strings': { | |
'': { | |
'Remove': 'Retirer', | |
'Compare': 'Comparer', | |
'View Product': 'Voir le produit', | |
'Start Over': '\r\nRecommencer', | |
'Choose One or More': 'SÉLECTIONNER UNE OU PLUSIEURS RÉPONSES ', | |
'An AJAX HTTP error occurred.': 'Une erreur HTTP AJAX s\'est produite.', | |
'HTTP Result Code: !status': 'Code de statut HTTP : !status', | |
'An AJAX HTTP request terminated abnormally.': 'Une requête HTTP AJAX s\'est terminée anormalement.', | |
'Debugging information follows.': 'Informations de débogage ci-dessous.', | |
'Path: !uri': 'Chemin : !uri', | |
'StatusText: !statusText': 'StatusText: !statusText', | |
'ResponseText: !responseText': 'ResponseText : !responseText', | |
'ReadyState: !readyState': 'ReadyState : !readyState', | |
'CustomMessage: !customMessage': 'Message personalisé : !customMessage', | |
'Please wait...': 'Veuillez patienter...', | |
'The response failed verification so will not be processed.': 'La vérification de la réponse a échoué, elle ne sera pas traitée.', | |
'The callback URL is not local and not trusted: !url': 'L\'URL de retour n\'est pas locale et n\'est pas de confiance : !url', | |
'Changed': 'Modifié', | |
'Yes': 'Oui', | |
'No': 'Non', | |
'Open': 'Ouvert', | |
'Close': 'Fermer', | |
'@action @title configuration options': 'options de configuration @action @title', | |
'Quick edit': 'Modification rapide', | |
'OK': 'OK', | |
'Could not load the form for <q>@field-label</q>, either due to a website problem or a network connection problem.<br>Please try again.': 'Impossible de charger le formulaire de <q>@field-label</q>, soit à cause d\'un problème dans le site web, soit à cause d\'un problème de connexion réseau. <br />Veuillez réessayer.', | |
'Network problem!': 'Problème de réseau !', | |
'Your changes to <q>@entity-title</q> could not be saved, either due to a website problem or a network connection problem.<br>Please try again.': 'Vos modifications dans <q>@entity-title</q> n\'ont pas pu être enregistrées, soit à cause d\'un problème dans le site web, soit à cause d\'un problème de connexion réseau. <br />Veuillez recommencer.', | |
'You have unsaved changes': 'Vous avez des changements non enregistrés', | |
'Discard changes?': 'Annuler les changements ?', | |
'Save': 'Enregistrer', | |
'Discard changes': 'Annuler les changements', | |
'Saving': 'Enregistrement', | |
'Extend': 'Extension', | |
'Collapse': 'Replier', | |
'@label': '@label', | |
'Horizontal orientation': 'Orientation horizontale', | |
'Vertical orientation': 'Orientation verticale', | |
'The toolbar cannot be set to a horizontal orientation when it is locked.': 'La barre d\'outils ne peut être orientée horizontalement lorsqu\'elle est verrouillée.', | |
'Tray orientation changed to @orientation.': 'L\'orientation du sous-menu est maintenant @orientation.', | |
'closed': 'fermé', | |
'opened': 'ouvert', | |
'Tray "@tray" @action.': 'Sous-menu "@tray" @action.', | |
'Tray @action.': 'Sous-menu @action.', | |
'Tabbing is no longer constrained by the Contextual module.': 'La tabulation n\'est plus contrainte par le module Contextual.', | |
'Tabbing is constrained to a set of @contextualsCount and the edit mode toggle.': 'La tabulation est contrainte par un ensemble de @contextualsCount et l\'activation/désaction du mode d\'édition.', | |
'Press the esc key to exit.': 'Pressez la touche Echap pour quitter.', | |
'@count contextual link@count contextual links': '@count lien contextuel@count liens contextuels', | |
'Home': 'Accueil', | |
'New revision': 'Nouvelle révision', | |
'No revision': 'Aucune révision', | |
'Needs to be updated': 'Nécessite une mise à jour', | |
'Does not need to be updated': 'Ne nécessite aucune mise à jour', | |
'Flag other translations as outdated': 'Marquer les autres traductions comme périmées', | |
'Do not flag other translations as outdated': 'Ne pas marquer les autres traductions comme périmées', | |
'By @name on @date': 'Par @name le @date', | |
'By @name': 'Par @name', | |
'Authored on @date': 'Rédigé le @date', | |
'Not promoted': 'Non promu', | |
'Hide': 'Masquer', | |
'Show': 'Afficher', | |
'Done': 'Terminé', | |
'Prev': 'Préc.', | |
'Next': 'Suivant', | |
'Today': 'Aujourd\'hui', | |
'Jan': 'jan', | |
'Feb': 'fév', | |
'Mar': 'mar', | |
'Apr': 'avr', | |
'May': 'mai', | |
'Jun': 'juin', | |
'Jul': 'juil', | |
'Aug': 'aoû', | |
'Sep': 'sep', | |
'Oct': 'oct', | |
'Nov': 'nov', | |
'Dec': 'déc', | |
'Sunday': 'Dimanche', | |
'Monday': 'Lundi', | |
'Tuesday': 'Mardi', | |
'Wednesday': 'Mercredi', | |
'Thursday': 'Jeudi', | |
'Friday': 'Vendredi', | |
'Saturday': 'Samedi', | |
'Sun': 'dim', | |
'Mon': 'lun', | |
'Tue': 'mar', | |
'Wed': 'mer', | |
'Thu': 'jeu', | |
'Fri': 'ven', | |
'Sat': 'sam', | |
'Su': 'Di', | |
'Mo': 'Lu', | |
'Tu': 'Ma', | |
'We': 'Me', | |
'Th': 'Je', | |
'Fr': 'Ve', | |
'Sa': 'Sa', | |
'mm/dd/yy': 'dd/mm/yy', | |
'Alias: @alias': 'Alias : @alias', | |
'No alias': 'Aucun alias', | |
'Insert this token into your form': 'Insérer ce jeton (<em>token</em>) dans votre formulaire', | |
'First click a text field to insert your tokens into.': 'Cliquez d\'abord sur un champ de texte pour insérer vos jetons (<em>tokens</em>) dans celui -ci.', | |
'Not in menu': 'Pas dans le menu', | |
'Show all columns': 'Montrer toutes les colonnes', | |
'Hide lower priority columns': 'Cacher les colonnes de plus faible priorité', | |
'Show table cells that were hidden to make the table fit within a small screen.': 'Montrer les cellules de tableau qui ont été cachées pour que le tableau rentre dans un petit écran.', | |
'Re-order rows by numerical weight instead of dragging.': 'Ré-ordonner les lignes avec des poids numériques plutôt qu\'en les déplaçant.', | |
'Show row weights': 'Afficher le poids des lignes', | |
'Hide row weights': 'Cacher le poids des lignes', | |
'Drag to re-order': 'Cliquer-déposer pour ré-organiser', | |
'You have unsaved changes.': 'Vous avez des changements non enregistrés.', | |
'List additional actions': 'Lister les actions supplémentaires', | |
'The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.': 'Le fichier sélectionné %filename ne peut pas être transféré. Seulement les fichiers avec les extensions suivantes sont permis : %extensions.', | |
'Add': 'Ajouter', | |
'Remove group': 'Supprimer le groupe', | |
'Apply (all displays)': 'Appliquer (tous les affichages)', | |
'Revert to default': 'Rétablir par défaut', | |
'Apply (this display)': 'Appliquer (cet affichage)', | |
'!modules modules are available in the modified list.': 'Les modules !modules sont disponibles dans la liste modifiée.', | |
'Select all rows in this table': 'Sélectionner toutes les lignes du tableau', | |
'Deselect all rows in this table': 'Désélectionner toutes les lignes du tableau', | |
'Link': 'Lien', | |
'Unlink': 'Supprimer le lien', | |
'Edit Link': 'Lien de modification', | |
'Changing the text format to %text_format will permanently remove content that is not allowed in that text format.<br><br>Save your changes before switching the text format to avoid losing data.': 'Basculer le format de texte en %text_format retirera définitivement le contenu qui n\'est pas autorisé dans ce format de texte.<br><br>Pour éviter de perdre des données, enregistrez vos changements avant de basculer le format de texte.', | |
'Change text format?': 'Changer le format de texte ?', | |
'Continue': 'Continuer', | |
'Cancel': 'Annuler', | |
'Rich Text Editor, !label field': 'Éditeur de texte riche, champ !label', | |
'Loading...': 'En cours de chargement...', | |
'Hide summary': 'Masquer le résumé', | |
'Edit summary': 'Modifier le résumé', | |
'Not restricted': 'Non restreint', | |
'Restricted to certain pages': 'Réservé à certaines pages', | |
'The block cannot be placed in this region.': 'Le bloc ne peut pas être placé dans cette région.', | |
'1 block is available in the modified list.@count blocks are available in the modified list.': '1 bloc est disponible dans la liste modifiée.@count blocs sont disponibles dans la liste modifiée.', | |
'Edit': 'Edit', | |
'(active tab)': '(onglet actif)', | |
'Leave preview?': 'Quitter l\'aperçu ?', | |
'Leave preview': 'Quitter l\'aperçu', | |
'Leaving the preview will cause unsaved changes to be lost. Are you sure you want to leave the preview?': 'Quitter la pré-visualisation entraînera la perte des changements non-enregistrés. Êtes-vous sûr(e) de vouloir quitter la pré-visualisation ?', | |
'CTRL+Left click will prevent this dialog from showing and proceed to the clicked link.': 'CTRL + clic gauche empêchera cette fenêtre de dialogue de s\'ouvrir et ouvrira le lien cliqué.', | |
'This permission is inherited from the authenticated user role.': 'Ce droit est héritée du rôle de l\'utilisateur authentifié.', | |
'Enabled': 'Activé', | |
'Disabled': 'Désactivé', | |
'Content limited to @limit characters, remaining: <strong>@remaining</strong>': 'Contenu limité à @limit caractères, restant : <strong>@remaining</strong>', | |
'Zero items selected': 'Zero élément sélectionné', | |
'All @count items selected': 'Tous les @count éléments ont été sélectionnés', | |
'Select all media': 'Sélectionner tous les médias', | |
'Automatic alias': 'Alias automatique', | |
'Collapse all': 'Tout replier', | |
'Expand all': 'Tout déplier', | |
'Hide description': 'Masquer la description', | |
'Show description': 'Afficher la description', | |
'Changes made in this table will not be saved until the form is submitted.': 'Les changements effectués dans ce tableau ne seront pris en compte que lorsque la configuration aura été enregistrée.', | |
'item': 'élément', | |
'items': 'éléments', | |
'Step': 'Étape', | |
'Not published': 'Non publié', | |
'Image': 'Image', | |
'Add group': 'Ajouter un groupe', | |
'Caption': 'Légende', | |
'Apply': 'Apply', | |
'button': 'bouton', | |
'of': 'sur', | |
'New group': 'Nouveau groupe', | |
'Requires a title': 'Titre obligatoire', | |
'Don\'t display post information': 'Ne pas afficher les informations de la contribution', | |
'No styles configured': 'Aucun style configuré', | |
'@count styles configured': '@count styles configurés', | |
'Based on the text editor configuration, these tags have automatically been added: <strong>@tag-list</strong>.': 'Basé sur la configuration de l\'éditeur de texte, ces balises ont automatiquement été ajoutées : <strong>@tag-list</strong>.', | |
'Uploads disabled': 'Transferts désactivés', | |
'Uploads enabled, max size: @size @dimensions': 'Transferts activés, taille max. : @size @dimensions', | |
'Enter caption here': 'Saisir la légende ici', | |
'Hide group names': 'Masquer les noms des groupes', | |
'Show group names': 'Afficher les noms des groupes', | |
'@groupName button group in position @position of @positionCount in row @row of @rowCount.': 'Groupe de boutons @groupName à la position @position de @positionCount à la ligne @row de @rowCount.', | |
'Press the down arrow key to create a new row.': 'Appuyer sur la touche "flèche du bas" pour créer une nouvelle ligne.', | |
'@name @type.': '@name @type.', | |
'Press the down arrow key to activate.': 'Appuyer sur la touche "flèche du bas" pour activer.', | |
'@name @type in position @position of @positionCount in @groupName button group in row @row of @rowCount.': '@name @type à la position @position de @positionCount dans le groupe de boutons @groupName à la ligne @row de @rowCount.', | |
'Press the down arrow key to create a new button group in a new row.': 'Presser la touche flèche bas pour créer un nouveau groupe de bouton dans une nouvelle ligne.', | |
'This is the last group. Move the button forward to create a new group.': 'Ceci est le dernier groupe. Déplacer le bouton vers l\'avant pour créer un nouveau groupe.', | |
'The "@name" button is currently enabled.': 'Le bouton "@name" est actuellement activé.', | |
'Use the keyboard arrow keys to change the position of this button.': 'Utiliser les flèches du clavier pour changer la position de ce bouton.', | |
'Press the up arrow key on the top row to disable the button.': 'Appuyer sur la touche flèche du haut sur la ligne du haut pour désactiver le bouton.', | |
'The "@name" button is currently disabled.': 'Le bouton "@name" est actuellement désactivé.', | |
'Use the down arrow key to move this button into the active toolbar.': 'Utiliser la touche "flèche du bas" pour déplacer ce bouton dans la barre d\'outils active.', | |
'This @name is currently enabled.': 'Ce @name est actuellement activé.', | |
'Use the keyboard arrow keys to change the position of this separator.': 'Utiliser les flèches du clavier pour changer la position de ce séparateur.', | |
'Separators are used to visually split individual buttons.': 'Les séparateurs sont utilisés pour séparer visuellement des boutons individuels.', | |
'This @name is currently disabled.': 'Ce @name est actuellement désactivé', | |
'Use the down arrow key to move this separator into the active toolbar.': 'Utiliser la touche "flèche du bas" pour déplacer ce séparateur dans la barre d\'outils active.', | |
'You may add multiple separators to each button group.': 'Vous pouvez ajouter plusieurs séparateurs à chaque groupe de boutons.', | |
'Please provide a name for the button group.': 'Veuillez fournir un nom pour le groupe de boutons.', | |
'Button group name': 'Nom du groupe de boutons', | |
'Editing the name of the new button group in a dialog.': 'Modification du nom du nouveau groupe de boutons dans une boîte de dialogue.', | |
'Editing the name of the "@groupName" button group in a dialog.': 'Modification du nom du groupe de boutons @groupName dans une boîte de dialogue.', | |
'Place a button to create a new button group.': 'Placer un bouton pour créer un nouveau groupe de boutons.', | |
'Add a CKEditor button group to the end of this row.': 'Ajouter un groupe de boutons CKEditor à la fin de cette ligne.', | |
'Priority': 'Priorité', | |
'Change frequency': 'Fréquence de changement', | |
'Slide': 'Glisser', | |
'Results': 'Résultats', | |
'Do you want to continue?': 'Voulez-vous continuer ?', | |
'See All': 'Voir Tous', | |
'See Less': 'Voir moins', | |
'See My Top Match': 'Voir mon meilleur match', | |
'Scheduled for publishing': 'Planifié pour publication', | |
'Scheduled for unpublishing': 'Planifié pour dépublication', | |
'Not scheduled': 'Non planifié', | |
'Publishing enabled': 'Publication activée', | |
'Unpublishing enabled': 'Dépublication activée' | |
}, | |
'Long month name': { | |
'January': 'janvier', | |
'February': 'février', | |
'March': 'mars', | |
'April': 'avril', | |
'May': 'mai', | |
'June': 'juin', | |
'August': 'août', | |
'September': 'septembre', | |
'October': 'octobre', | |
'November': 'novembre', | |
'December': 'décembre' | |
} | |
}, | |
'pluralFormula': { | |
'0': 0, | |
'1': 0, | |
'default': 1 | |
} | |
}; | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
window.Drupal = { | |
behaviors: { | |
}, | |
locale: { | |
} | |
}; | |
(function (Drupal, drupalSettings, drupalTranslations, console, Proxy, Reflect) { | |
Drupal.throwError = function (error) { | |
setTimeout(function () { | |
throw error; | |
}, 0); | |
}; | |
Drupal.attachBehaviors = function (context, settings) { | |
context = context || document; | |
settings = settings || drupalSettings; | |
var behaviors = Drupal.behaviors; | |
Object.keys(behaviors || { | |
}).forEach(function (i) { | |
if (typeof behaviors[i].attach === 'function') { | |
try { | |
behaviors[i].attach(context, settings); | |
} catch (e) { | |
Drupal.throwError(e); | |
} | |
} | |
}); | |
}; | |
Drupal.detachBehaviors = function (context, settings, trigger) { | |
context = context || document; | |
settings = settings || drupalSettings; | |
trigger = trigger || 'unload'; | |
var behaviors = Drupal.behaviors; | |
Object.keys(behaviors || { | |
}).forEach(function (i) { | |
if (typeof behaviors[i].detach === 'function') { | |
try { | |
behaviors[i].detach(context, settings, trigger); | |
} catch (e) { | |
Drupal.throwError(e); | |
} | |
} | |
}); | |
}; | |
Drupal.checkPlain = function (str) { | |
str = str.toString().replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '''); | |
return str; | |
}; | |
Drupal.formatString = function (str, args) { | |
var processedArgs = { | |
}; | |
Object.keys(args || { | |
}).forEach(function (key) { | |
switch (key.charAt(0)) { | |
case '@': | |
processedArgs[key] = Drupal.checkPlain(args[key]); | |
break; | |
case '!': | |
processedArgs[key] = args[key]; | |
break; | |
default: | |
processedArgs[key] = Drupal.theme('placeholder', args[key]); | |
break; | |
} | |
}); | |
return Drupal.stringReplace(str, processedArgs, null); | |
}; | |
Drupal.stringReplace = function (str, args, keys) { | |
if (str.length === 0) { | |
return str; | |
} | |
if (!Array.isArray(keys)) { | |
keys = Object.keys(args || { | |
}); | |
keys.sort(function (a, b) { | |
return a.length - b.length; | |
}); | |
} | |
if (keys.length === 0) { | |
return str; | |
} | |
var key = keys.pop(); | |
var fragments = str.split(key); | |
if (keys.length) { | |
for (var i = 0; i < fragments.length; i++) { | |
fragments[i] = Drupal.stringReplace(fragments[i], args, keys.slice(0)); | |
} | |
} | |
return fragments.join(args[key]); | |
}; | |
Drupal.t = function (str, args, options) { | |
options = options || { | |
}; | |
options.context = options.context || ''; | |
if (typeof drupalTranslations !== 'undefined' && drupalTranslations.strings && drupalTranslations.strings[options.context] && drupalTranslations.strings[options.context][str]) { | |
str = drupalTranslations.strings[options.context][str]; | |
} | |
if (args) { | |
str = Drupal.formatString(str, args); | |
} | |
return str; | |
}; | |
Drupal.url = function (path) { | |
return drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + path; | |
}; | |
Drupal.url.toAbsolute = function (url) { | |
var urlParsingNode = document.createElement('a'); | |
try { | |
url = decodeURIComponent(url); | |
} catch (e) { | |
} | |
urlParsingNode.setAttribute('href', url); | |
return urlParsingNode.cloneNode(false).href; | |
}; | |
Drupal.url.isLocal = function (url) { | |
var absoluteUrl = Drupal.url.toAbsolute(url); | |
var protocol = window.location.protocol; | |
if (protocol === 'http:' && absoluteUrl.indexOf('https:') === 0) { | |
protocol = 'https:'; | |
} | |
var baseUrl = protocol + '//' + window.location.host + drupalSettings.path.baseUrl.slice(0, - 1); | |
try { | |
absoluteUrl = decodeURIComponent(absoluteUrl); | |
} catch (e) { | |
} | |
try { | |
baseUrl = decodeURIComponent(baseUrl); | |
} catch (e) { | |
} | |
return absoluteUrl === baseUrl || absoluteUrl.indexOf(baseUrl + '/') === 0; | |
}; | |
Drupal.formatPlural = function (count, singular, plural, args, options) { | |
args = args || { | |
}; | |
args['@count'] = count; | |
var pluralDelimiter = drupalSettings.pluralDelimiter; | |
var translations = Drupal.t(singular + pluralDelimiter + plural, args, options).split(pluralDelimiter); | |
var index = 0; | |
if (typeof drupalTranslations !== 'undefined' && drupalTranslations.pluralFormula) { | |
index = count in drupalTranslations.pluralFormula ? drupalTranslations.pluralFormula[count] : drupalTranslations.pluralFormula.default; | |
} else if (args['@count'] !== 1) { | |
index = 1; | |
} | |
return translations[index]; | |
}; | |
Drupal.encodePath = function (item) { | |
return window.encodeURIComponent(item).replace(/%2F/g, '/'); | |
}; | |
Drupal.deprecationError = function (_ref) { | |
var message = _ref.message; | |
if (drupalSettings.suppressDeprecationErrors === false && typeof console !== 'undefined' && console.warn) { | |
console.warn('[Deprecation] ' + message); | |
} | |
}; | |
Drupal.deprecatedProperty = function (_ref2) { | |
var target = _ref2.target, | |
deprecatedProperty = _ref2.deprecatedProperty, | |
message = _ref2.message; | |
if (!Proxy || !Reflect) { | |
return target; | |
} | |
return new Proxy(target, { | |
get: function get(target, key) { | |
for (var _len = arguments.length, rest = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { | |
rest[_key - 2] = arguments[_key]; | |
} | |
if (key === deprecatedProperty) { | |
Drupal.deprecationError({ | |
message: message | |
}); | |
} | |
return Reflect.get.apply(Reflect, [ | |
target, | |
key | |
].concat(rest)); | |
} | |
}); | |
}; | |
Drupal.theme = function (func) { | |
if (func in Drupal.theme) { | |
var _Drupal$theme; | |
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | |
args[_key2 - 1] = arguments[_key2]; | |
} | |
return (_Drupal$theme = Drupal.theme) [func].apply(_Drupal$theme, args); | |
} | |
}; | |
Drupal.theme.placeholder = function (str) { | |
return '<em class="placeholder">' + Drupal.checkPlain(str) + '</em>'; | |
}; | |
}) (Drupal, window.drupalSettings, window.drupalTranslations, window.console, window.Proxy, window.Reflect); | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
if (window.jQuery) { | |
jQuery.noConflict(); | |
} | |
document.documentElement.className += ' js'; | |
(function (Drupal, drupalSettings) { | |
var domReady = function domReady(callback) { | |
if (document.readyState !== 'loading') { | |
callback(); | |
} else { | |
var listener = function listener() { | |
callback(); | |
document.removeEventListener('DOMContentLoaded', listener); | |
}; | |
document.addEventListener('DOMContentLoaded', listener); | |
} | |
}; | |
domReady(function () { | |
Drupal.attachBehaviors(document, drupalSettings); | |
}); | |
}) (Drupal, window.drupalSettings); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.extend(a.expr[':'], { | |
data: a.expr.createPseudo ? a.expr.createPseudo(function (b) { | |
return function (c) { | |
return !!a.data(c, b) | |
} | |
}) : function (b, c, d) { | |
return !!a.data(b, d[3]) | |
} | |
}) | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.fn.extend({ | |
disableSelection: function () { | |
var a = 'onselectstart' in document.createElement('div') ? 'selectstart' : 'mousedown'; | |
return function () { | |
return this.on(a + '.ui-disableSelection', function (a) { | |
a.preventDefault() | |
}) | |
} | |
}(), | |
enableSelection: function () { | |
return this.off('.ui-disableSelection') | |
} | |
}) | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.fn.form = function () { | |
return 'string' == typeof this[0].form ? this.closest('form') : a(this[0].form) | |
} | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version', | |
'./escape-selector'], a) : a(jQuery) | |
}(function (a) { | |
return a.fn.labels = function () { | |
var b, | |
c, | |
d, | |
e, | |
f; | |
return this[0].labels && this[0].labels.length ? this.pushStack(this[0].labels) : (e = this.eq(0).parents('label'), d = this.attr('id'), d && (b = this.eq(0).parents().last(), f = b.add(b.length ? b.siblings() : this.siblings()), c = 'label[for=\'' + a.ui.escapeSelector(d) + '\']', e = e.add(f.find(c).addBack(c))), this.pushStack(e)) | |
} | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
'1.7' === a.fn.jquery.substring(0, 3) && (a.each(['Width', | |
'Height'], function (b, c) { | |
function d(b, c, d, f) { | |
return a.each(e, function () { | |
c -= parseFloat(a.css(b, 'padding' + this)) || 0, | |
d && (c -= parseFloat(a.css(b, 'border' + this + 'Width')) || 0), | |
f && (c -= parseFloat(a.css(b, 'margin' + this)) || 0) | |
}), | |
c | |
} | |
var e = 'Width' === c ? [ | |
'Left', | |
'Right' | |
] : [ | |
'Top', | |
'Bottom' | |
], | |
f = c.toLowerCase(), | |
g = { | |
innerWidth: a.fn.innerWidth, | |
innerHeight: a.fn.innerHeight, | |
outerWidth: a.fn.outerWidth, | |
outerHeight: a.fn.outerHeight | |
}; | |
a.fn['inner' + c] = function (b) { | |
return void 0 === b ? g['inner' + c].call(this) : this.each(function () { | |
a(this).css(f, d(this, b) + 'px') | |
}) | |
}, | |
a.fn['outer' + c] = function (b, e) { | |
return 'number' != typeof b ? g['outer' + c].call(this, b) : this.each(function () { | |
a(this).css(f, d(this, b, !0, e) + 'px') | |
}) | |
} | |
}), a.fn.addBack = function (a) { | |
return this.add(null == a ? this.prevObject : this.prevObject.filter(a)) | |
}) | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.fn.scrollParent = function (b) { | |
var c = this.css('position'), | |
d = 'absolute' === c, | |
e = b ? /(auto|scroll|hidden)/ : /(auto|scroll)/, | |
f = this.parents().filter(function () { | |
var b = a(this); | |
return (!d || 'static' !== b.css('position')) && e.test(b.css('overflow') + b.css('overflow-y') + b.css('overflow-x')) | |
}).eq(0); | |
return 'fixed' !== c && f.length ? f : a(this[0].ownerDocument || document) | |
} | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version', | |
'./focusable'], a) : a(jQuery) | |
}(function (a) { | |
return a.extend(a.expr[':'], { | |
tabbable: function (b) { | |
var c = a.attr(b, 'tabindex'), | |
d = null != c; | |
return (!d || c >= 0) && a.ui.focusable(b, d) | |
} | |
}) | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.fn.extend({ | |
uniqueId: function () { | |
var a = 0; | |
return function () { | |
return this.each(function () { | |
this.id || (this.id = 'ui-id-' + ++a) | |
}) | |
} | |
}(), | |
removeUniqueId: function () { | |
return this.each(function () { | |
/^ui-id-\d+$/.test(this.id) && a(this).removeAttr('id') | |
}) | |
} | |
}) | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery'], a) : a(jQuery) | |
}(function (a) { | |
return a.ui = a.ui || { | |
}, | |
a.ui.version = '1.12.1' | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.ui.escapeSelector = function () { | |
var a = /([!"#$%&'()*+,.\/:;<=>?@[\]^`{|}~])/g; | |
return function (b) { | |
return b.replace(a, '\\$1') | |
} | |
}() | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
function b(a) { | |
for (var b = a.css('visibility'); 'inherit' === b; ) a = a.parent(), | |
b = a.css('visibility'); | |
return 'hidden' !== b | |
} | |
return a.ui.focusable = function (c, d) { | |
var e, | |
f, | |
g, | |
h, | |
i, | |
j = c.nodeName.toLowerCase(); | |
return 'area' === j ? (e = c.parentNode, f = e.name, !(!c.href || !f || 'map' !== e.nodeName.toLowerCase()) && (g = a('img[usemap=\'#' + f + '\']'), g.length > 0 && g.is(':visible'))) : (/^(input|select|textarea|button|object)$/.test(j) ? (h = !c.disabled, h && (i = a(c).closest('fieldset') [0], i && (h = !i.disabled))) : h = 'a' === j ? c.href || d : d, h && a(c).is(':visible') && b(a(c))) | |
}, | |
a.extend(a.expr[':'], { | |
focusable: function (b) { | |
return a.ui.focusable(b, null != a.attr(b, 'tabindex')) | |
} | |
}), | |
a.ui.focusable | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.ui.keyCode = { | |
BACKSPACE: 8, | |
COMMA: 188, | |
DELETE: 46, | |
DOWN: 40, | |
END: 35, | |
ENTER: 13, | |
ESCAPE: 27, | |
HOME: 36, | |
LEFT: 37, | |
PAGE_DOWN: 34, | |
PAGE_UP: 33, | |
PERIOD: 190, | |
RIGHT: 39, | |
SPACE: 32, | |
TAB: 9, | |
UP: 38 | |
} | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.ui.plugin = { | |
add: function (b, c, d) { | |
var e, | |
f = a.ui[b].prototype; | |
for (e in d) f.plugins[e] = f.plugins[e] || [ | |
], | |
f.plugins[e].push([c, | |
d[e]]) | |
}, | |
call: function (a, b, c, d) { | |
var e, | |
f = a.plugins[b]; | |
if (f && (d || a.element[0].parentNode && 11 !== a.element[0].parentNode.nodeType)) for (e = 0; e < f.length; e++) a.options[f[e][0]] && f[e][1].apply(a.element, c) | |
} | |
} | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.ui.safeActiveElement = function (a) { | |
var b; | |
try { | |
b = a.activeElement | |
} catch (c) { | |
b = a.body | |
} | |
return b || (b = a.body), | |
b.nodeName || (b = a.body), | |
b | |
} | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.ui.safeBlur = function (b) { | |
b && 'body' !== b.nodeName.toLowerCase() && a(b).trigger('blur') | |
} | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
var b = 0, | |
c = Array.prototype.slice; | |
return a.cleanData = function (b) { | |
return function (c) { | |
var d, | |
e, | |
f; | |
for (f = 0; null != (e = c[f]); f++) try { | |
d = a._data(e, 'events'), | |
d && d.remove && a(e).triggerHandler('remove') | |
} catch (g) { | |
} | |
b(c) | |
} | |
}(a.cleanData), | |
a.widget = function (b, c, d) { | |
var e, | |
f, | |
g, | |
h = { | |
}, | |
i = b.split('.') [0]; | |
b = b.split('.') [1]; | |
var j = i + '-' + b; | |
return d || (d = c, c = a.Widget), | |
a.isArray(d) && (d = a.extend.apply(null, [ | |
{ | |
} | |
].concat(d))), | |
a.expr[':'][j.toLowerCase()] = function (b) { | |
return !!a.data(b, j) | |
}, | |
a[i] = a[i] || { | |
}, | |
e = a[i][b], | |
f = a[i][b] = function (a, b) { | |
return this._createWidget ? void (arguments.length && this._createWidget(a, b)) : new f(a, b) | |
}, | |
a.extend(f, e, { | |
version: d.version, | |
_proto: a.extend({ | |
}, d), | |
_childConstructors: [ | |
] | |
}), | |
g = new c, | |
g.options = a.widget.extend({ | |
}, g.options), | |
a.each(d, function (b, d) { | |
return a.isFunction(d) ? void (h[b] = function () { | |
function a() { | |
return c.prototype[b].apply(this, arguments) | |
} | |
function e(a) { | |
return c.prototype[b].apply(this, a) | |
} | |
return function () { | |
var b, | |
c = this._super, | |
f = this._superApply; | |
return this._super = a, | |
this._superApply = e, | |
b = d.apply(this, arguments), | |
this._super = c, | |
this._superApply = f, | |
b | |
} | |
}()) : void (h[b] = d) | |
}), | |
f.prototype = a.widget.extend(g, { | |
widgetEventPrefix: e ? g.widgetEventPrefix || b : b | |
}, h, { | |
constructor: f, | |
namespace: i, | |
widgetName: b, | |
widgetFullName: j | |
}), | |
e ? (a.each(e._childConstructors, function (b, c) { | |
var d = c.prototype; | |
a.widget(d.namespace + '.' + d.widgetName, f, c._proto) | |
}), delete e._childConstructors) : c._childConstructors.push(f), | |
a.widget.bridge(b, f), | |
f | |
}, | |
a.widget.extend = function (b) { | |
for (var d, e, f = c.call(arguments, 1), g = 0, h = f.length; g < h; g++) for (d in f[g]) e = f[g][d], | |
f[g].hasOwnProperty(d) && void 0 !== e && (a.isPlainObject(e) ? b[d] = a.isPlainObject(b[d]) ? a.widget.extend({ | |
}, b[d], e) : a.widget.extend({ | |
}, e) : b[d] = e); | |
return b | |
}, | |
a.widget.bridge = function (b, d) { | |
var e = d.prototype.widgetFullName || b; | |
a.fn[b] = function (f) { | |
var g = 'string' == typeof f, | |
h = c.call(arguments, 1), | |
i = this; | |
return g ? this.length || 'instance' !== f ? this.each(function () { | |
var c, | |
d = a.data(this, e); | |
return 'instance' === f ? (i = d, !1) : d ? a.isFunction(d[f]) && '_' !== f.charAt(0) ? (c = d[f].apply(d, h), c !== d && void 0 !== c ? (i = c && c.jquery ? i.pushStack(c.get()) : c, !1) : void 0) : a.error('no such method \'' + f + '\' for ' + b + ' widget instance') : a.error('cannot call methods on ' + b + ' prior to initialization; attempted to call method \'' + f + '\'') | |
}) : i = void 0 : (h.length && (f = a.widget.extend.apply(null, [ | |
f | |
].concat(h))), this.each(function () { | |
var b = a.data(this, e); | |
b ? (b.option(f || { | |
}), b._init && b._init()) : a.data(this, e, new d(f, this)) | |
})), | |
i | |
} | |
}, | |
a.Widget = function () { | |
}, | |
a.Widget._childConstructors = [ | |
], | |
a.Widget.prototype = { | |
widgetName: 'widget', | |
widgetEventPrefix: '', | |
defaultElement: '<div>', | |
options: { | |
classes: { | |
}, | |
disabled: !1, | |
create: null | |
}, | |
_createWidget: function (c, d) { | |
d = a(d || this.defaultElement || this) [0], | |
this.element = a(d), | |
this.uuid = b++, | |
this.eventNamespace = '.' + this.widgetName + this.uuid, | |
this.bindings = a(), | |
this.hoverable = a(), | |
this.focusable = a(), | |
this.classesElementLookup = { | |
}, | |
d !== this && (a.data(d, this.widgetFullName, this), this._on(!0, this.element, { | |
remove: function (a) { | |
a.target === d && this.destroy() | |
} | |
}), this.document = a(d.style ? d.ownerDocument : d.document || d), this.window = a(this.document[0].defaultView || this.document[0].parentWindow)), | |
this.options = a.widget.extend({ | |
}, this.options, this._getCreateOptions(), c), | |
this._create(), | |
this.options.disabled && this._setOptionDisabled(this.options.disabled), | |
this._trigger('create', null, this._getCreateEventData()), | |
this._init() | |
}, | |
_getCreateOptions: function () { | |
return { | |
} | |
}, | |
_getCreateEventData: a.noop, | |
_create: a.noop, | |
_init: a.noop, | |
destroy: function () { | |
var b = this; | |
this._destroy(), | |
a.each(this.classesElementLookup, function (a, c) { | |
b._removeClass(c, a) | |
}), | |
this.element.off(this.eventNamespace).removeData(this.widgetFullName), | |
this.widget().off(this.eventNamespace).removeAttr('aria-disabled'), | |
this.bindings.off(this.eventNamespace) | |
}, | |
_destroy: a.noop, | |
widget: function () { | |
return this.element | |
}, | |
option: function (b, c) { | |
var d, | |
e, | |
f, | |
g = b; | |
if (0 === arguments.length) return a.widget.extend({ | |
}, this.options); | |
if ('string' == typeof b) if (g = { | |
}, d = b.split('.'), b = d.shift(), d.length) { | |
for (e = g[b] = a.widget.extend({ | |
}, this.options[b]), f = 0; f < d.length - 1; f++) e[d[f]] = e[d[f]] || { | |
}, | |
e = e[d[f]]; | |
if (b = d.pop(), 1 === arguments.length) return void 0 === e[b] ? null : e[b]; | |
e[b] = c | |
} else { | |
if (1 === arguments.length) return void 0 === this.options[b] ? null : this.options[b]; | |
g[b] = c | |
} | |
return this._setOptions(g), | |
this | |
}, | |
_setOptions: function (a) { | |
var b; | |
for (b in a) this._setOption(b, a[b]); | |
return this | |
}, | |
_setOption: function (a, b) { | |
return 'classes' === a && this._setOptionClasses(b), | |
this.options[a] = b, | |
'disabled' === a && this._setOptionDisabled(b), | |
this | |
}, | |
_setOptionClasses: function (b) { | |
var c, | |
d, | |
e; | |
for (c in b) e = this.classesElementLookup[c], | |
b[c] !== this.options.classes[c] && e && e.length && (d = a(e.get()), this._removeClass(e, c), d.addClass(this._classes({ | |
element: d, | |
keys: c, | |
classes: b, | |
add: !0 | |
}))) | |
}, | |
_setOptionDisabled: function (a) { | |
this._toggleClass(this.widget(), this.widgetFullName + '-disabled', null, !!a), | |
a && (this._removeClass(this.hoverable, null, 'ui-state-hover'), this._removeClass(this.focusable, null, 'ui-state-focus')) | |
}, | |
enable: function () { | |
return this._setOptions({ | |
disabled: !1 | |
}) | |
}, | |
disable: function () { | |
return this._setOptions({ | |
disabled: !0 | |
}) | |
}, | |
_classes: function (b) { | |
function c(c, f) { | |
var g, | |
h; | |
for (h = 0; h < c.length; h++) g = e.classesElementLookup[c[h]] || a(), | |
g = a(b.add ? a.unique(g.get().concat(b.element.get())) : g.not(b.element).get()), | |
e.classesElementLookup[c[h]] = g, | |
d.push(c[h]), | |
f && b.classes[c[h]] && d.push(b.classes[c[h]]) | |
} | |
var d = [ | |
], | |
e = this; | |
return b = a.extend({ | |
element: this.element, | |
classes: this.options.classes || { | |
} | |
}, b), | |
this._on(b.element, { | |
remove: '_untrackClassesElement' | |
}), | |
b.keys && c(b.keys.match(/\S+/g) || [ | |
], !0), | |
b.extra && c(b.extra.match(/\S+/g) || [ | |
]), | |
d.join(' ') | |
}, | |
_untrackClassesElement: function (b) { | |
var c = this; | |
a.each(c.classesElementLookup, function (d, e) { | |
a.inArray(b.target, e) !== - 1 && (c.classesElementLookup[d] = a(e.not(b.target).get())) | |
}) | |
}, | |
_removeClass: function (a, b, c) { | |
return this._toggleClass(a, b, c, !1) | |
}, | |
_addClass: function (a, b, c) { | |
return this._toggleClass(a, b, c, !0) | |
}, | |
_toggleClass: function (a, b, c, d) { | |
d = 'boolean' == typeof d ? d : c; | |
var e = 'string' == typeof a || null === a, | |
f = { | |
extra: e ? b : c, | |
keys: e ? a : b, | |
element: e ? this.element : a, | |
add: d | |
}; | |
return f.element.toggleClass(this._classes(f), d), | |
this | |
}, | |
_on: function (b, c, d) { | |
var e, | |
f = this; | |
'boolean' != typeof b && (d = c, c = b, b = !1), | |
d ? (c = e = a(c), this.bindings = this.bindings.add(c)) : (d = c, c = this.element, e = this.widget()), | |
a.each(d, function (d, g) { | |
function h() { | |
if (b || f.options.disabled !== !0 && !a(this).hasClass('ui-state-disabled')) return ('string' == typeof g ? f[g] : g).apply(f, arguments) | |
} | |
'string' != typeof g && (h.guid = g.guid = g.guid || h.guid || a.guid++); | |
var i = d.match(/^([\w:-]*)\s*(.*)$/), | |
j = i[1] + f.eventNamespace, | |
k = i[2]; | |
k ? e.on(j, k, h) : c.on(j, h) | |
}) | |
}, | |
_off: function (b, c) { | |
c = (c || '').split(' ').join(this.eventNamespace + ' ') + this.eventNamespace, | |
b.off(c).off(c), | |
this.bindings = a(this.bindings.not(b).get()), | |
this.focusable = a(this.focusable.not(b).get()), | |
this.hoverable = a(this.hoverable.not(b).get()) | |
}, | |
_delay: function (a, b) { | |
function c() { | |
return ('string' == typeof a ? d[a] : a).apply(d, arguments) | |
} | |
var d = this; | |
return setTimeout(c, b || 0) | |
}, | |
_hoverable: function (b) { | |
this.hoverable = this.hoverable.add(b), | |
this._on(b, { | |
mouseenter: function (b) { | |
this._addClass(a(b.currentTarget), null, 'ui-state-hover') | |
}, | |
mouseleave: function (b) { | |
this._removeClass(a(b.currentTarget), null, 'ui-state-hover') | |
} | |
}) | |
}, | |
_focusable: function (b) { | |
this.focusable = this.focusable.add(b), | |
this._on(b, { | |
focusin: function (b) { | |
this._addClass(a(b.currentTarget), null, 'ui-state-focus') | |
}, | |
focusout: function (b) { | |
this._removeClass(a(b.currentTarget), null, 'ui-state-focus') | |
} | |
}) | |
}, | |
_trigger: function (b, c, d) { | |
var e, | |
f, | |
g = this.options[b]; | |
if (d = d || { | |
}, c = a.Event(c), c.type = (b === this.widgetEventPrefix ? b : this.widgetEventPrefix + b).toLowerCase(), c.target = this.element[0], f = c.originalEvent) for (e in f) e in c || (c[e] = f[e]); | |
return this.element.trigger(c, d), | |
!(a.isFunction(g) && g.apply(this.element[0], [ | |
c | |
].concat(d)) === !1 || c.isDefaultPrevented()) | |
} | |
}, | |
a.each({ | |
show: 'fadeIn', | |
hide: 'fadeOut' | |
}, function (b, c) { | |
a.Widget.prototype['_' + b] = function (d, e, f) { | |
'string' == typeof e && (e = { | |
effect: e | |
}); | |
var g, | |
h = e ? e === !0 || 'number' == typeof e ? c : e.effect || c : b; | |
e = e || { | |
}, | |
'number' == typeof e && (e = { | |
duration: e | |
}), | |
g = !a.isEmptyObject(e), | |
e.complete = f, | |
e.delay && d.delay(e.delay), | |
g && a.effects && a.effects.effect[h] ? d[b](e) : h !== b && d[h] ? d[h](e.duration, e.easing, f) : d.queue(function (c) { | |
a(this) [b](), | |
f && f.call(d[0]), | |
c() | |
}) | |
} | |
}), | |
a.widget | |
}); | |
; | |
/*! picturefill - v3.0.2 - 2016-02-12 | |
* https://scottjehl.github.io/picturefill/ | |
* Copyright (c) 2016 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT | |
*/ | |
!function (a) { | |
var b = navigator.userAgent; | |
a.HTMLPictureElement && /ecko/.test(b) && b.match(/rv\:(\d+)/) && RegExp.$1 < 45 && addEventListener('resize', function () { | |
var b, | |
c = document.createElement('source'), | |
d = function (a) { | |
var b, | |
d, | |
e = a.parentNode; | |
'PICTURE' === e.nodeName.toUpperCase() ? (b = c.cloneNode(), e.insertBefore(b, e.firstElementChild), setTimeout(function () { | |
e.removeChild(b) | |
})) : (!a._pfLastSize || a.offsetWidth > a._pfLastSize) && (a._pfLastSize = a.offsetWidth, d = a.sizes, a.sizes += ',100vw', setTimeout(function () { | |
a.sizes = d | |
})) | |
}, | |
e = function () { | |
var a, | |
b = document.querySelectorAll('picture > img, img[srcset][sizes]'); | |
for (a = 0; a < b.length; a++) d(b[a]) | |
}, | |
f = function () { | |
clearTimeout(b), | |
b = setTimeout(e, 99) | |
}, | |
g = a.matchMedia && matchMedia('(orientation: landscape)'), | |
h = function () { | |
f(), | |
g && g.addListener && g.addListener(f) | |
}; | |
return c.srcset = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==', | |
/^[c|i]|d$/.test(document.readyState || '') ? h() : document.addEventListener('DOMContentLoaded', h), | |
f | |
}()) | |
}(window), | |
function (a, b, c) { | |
'use strict'; | |
function d(a) { | |
return ' ' === a || '\t' === a || '\n' === a || '\f' === a || '\r' === a | |
} | |
function e(b, c) { | |
var d = new a.Image; | |
return d.onerror = function () { | |
A[b] = !1, | |
ba() | |
}, | |
d.onload = function () { | |
A[b] = 1 === d.width, | |
ba() | |
}, | |
d.src = c, | |
'pending' | |
} | |
function f() { | |
M = !1, | |
P = a.devicePixelRatio, | |
N = { | |
}, | |
O = { | |
}, | |
s.DPR = P || 1, | |
Q.width = Math.max(a.innerWidth || 0, z.clientWidth), | |
Q.height = Math.max(a.innerHeight || 0, z.clientHeight), | |
Q.vw = Q.width / 100, | |
Q.vh = Q.height / 100, | |
r = [ | |
Q.height, | |
Q.width, | |
P | |
].join('-'), | |
Q.em = s.getEmValue(), | |
Q.rem = Q.em | |
} | |
function g(a, b, c, d) { | |
var e, | |
f, | |
g, | |
h; | |
return 'saveData' === B.algorithm ? a > 2.7 ? h = c + 1 : (f = b - c, e = Math.pow(a - 0.6, 1.5), g = f * e, d && (g += 0.1 * e), h = a + g) : h = c > 1 ? Math.sqrt(a * b) : a, | |
h > c | |
} | |
function h(a) { | |
var b, | |
c = s.getSet(a), | |
d = !1; | |
'pending' !== c && (d = r, c && (b = s.setRes(c), s.applySetCandidate(b, a))), | |
a[s.ns].evaled = d | |
} | |
function i(a, b) { | |
return a.res - b.res | |
} | |
function j(a, b, c) { | |
var d; | |
return !c && b && (c = a[s.ns].sets, c = c && c[c.length - 1]), | |
d = k(b, c), | |
d && (b = s.makeUrl(b), a[s.ns].curSrc = b, a[s.ns].curCan = d, d.res || aa(d, d.set.sizes)), | |
d | |
} | |
function k(a, b) { | |
var c, | |
d, | |
e; | |
if (a && b) for (e = s.parseSet(b), a = s.makeUrl(a), c = 0; c < e.length; c++) if (a === s.makeUrl(e[c].url)) { | |
d = e[c]; | |
break | |
} | |
return d | |
} | |
function l(a, b) { | |
var c, | |
d, | |
e, | |
f, | |
g = a.getElementsByTagName('source'); | |
for (c = 0, d = g.length; d > c; c++) e = g[c], | |
e[s.ns] = !0, | |
f = e.getAttribute('srcset'), | |
f && b.push({ | |
srcset: f, | |
media: e.getAttribute('media'), | |
type: e.getAttribute('type'), | |
sizes: e.getAttribute('sizes') | |
}) | |
} | |
function m(a, b) { | |
function c(b) { | |
var c, | |
d = b.exec(a.substring(m)); | |
return d ? (c = d[0], m += c.length, c) : void 0 | |
} | |
function e() { | |
var a, | |
c, | |
d, | |
e, | |
f, | |
i, | |
j, | |
k, | |
l, | |
m = !1, | |
o = { | |
}; | |
for (e = 0; e < h.length; e++) f = h[e], | |
i = f[f.length - 1], | |
j = f.substring(0, f.length - 1), | |
k = parseInt(j, 10), | |
l = parseFloat(j), | |
X.test(j) && 'w' === i ? ((a || c) && (m = !0), 0 === k ? m = !0 : a = k) : Y.test(j) && 'x' === i ? ((a || c || d) && (m = !0), 0 > l ? m = !0 : c = l) : X.test(j) && 'h' === i ? ((d || c) && (m = !0), 0 === k ? m = !0 : d = k) : m = !0; | |
m || (o.url = g, a && (o.w = a), c && (o.d = c), d && (o.h = d), d || c || a || (o.d = 1), 1 === o.d && (b.has1x = !0), o.set = b, n.push(o)) | |
} | |
function f() { | |
for (c(T), i = '', j = 'in descriptor'; ; ) { | |
if (k = a.charAt(m), 'in descriptor' === j) if (d(k)) i && (h.push(i), i = '', j = 'after descriptor'); | |
else { | |
if (',' === k) return m += 1, | |
i && h.push(i), | |
void e(); | |
if ('(' === k) i += k, | |
j = 'in parens'; | |
else { | |
if ('' === k) return i && h.push(i), | |
void e(); | |
i += k | |
} | |
} else if ('in parens' === j) if (')' === k) i += k, | |
j = 'in descriptor'; | |
else { | |
if ('' === k) return h.push(i), | |
void e(); | |
i += k | |
} else if ('after descriptor' === j) if (d(k)); | |
else { | |
if ('' === k) return void e(); | |
j = 'in descriptor', | |
m -= 1 | |
} | |
m += 1 | |
} | |
} | |
for (var g, h, i, j, k, l = a.length, m = 0, n = [ | |
]; ; ) { | |
if (c(U), m >= l) return n; | |
g = c(V), | |
h = [ | |
], | |
',' === g.slice( - 1) ? (g = g.replace(W, ''), e()) : f() | |
} | |
} | |
function n(a) { | |
function b(a) { | |
function b() { | |
f && (g.push(f), f = '') | |
} | |
function c() { | |
g[0] && (h.push(g), g = [ | |
]) | |
} | |
for (var e, f = '', g = [ | |
], h = [ | |
], i = 0, j = 0, k = !1; ; ) { | |
if (e = a.charAt(j), '' === e) return b(), | |
c(), | |
h; | |
if (k) { | |
if ('*' === e && '/' === a[j + 1]) { | |
k = !1, | |
j += 2, | |
b(); | |
continue | |
} | |
j += 1 | |
} else { | |
if (d(e)) { | |
if (a.charAt(j - 1) && d(a.charAt(j - 1)) || !f) { | |
j += 1; | |
continue | |
} | |
if (0 === i) { | |
b(), | |
j += 1; | |
continue | |
} | |
e = ' ' | |
} else if ('(' === e) i += 1; | |
else if (')' === e) i -= 1; | |
else { | |
if (',' === e) { | |
b(), | |
c(), | |
j += 1; | |
continue | |
} | |
if ('/' === e && '*' === a.charAt(j + 1)) { | |
k = !0, | |
j += 2; | |
continue | |
} | |
} | |
f += e, | |
j += 1 | |
} | |
} | |
} | |
function c(a) { | |
return k.test(a) && parseFloat(a) >= 0 ? !0 : l.test(a) ? !0 : '0' === a || '-0' === a || '+0' === a ? !0 : !1 | |
} | |
var e, | |
f, | |
g, | |
h, | |
i, | |
j, | |
k = /^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i, | |
l = /^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i; | |
for (f = b(a), g = f.length, e = 0; g > e; e++) if (h = f[e], i = h[h.length - 1], c(i)) { | |
if (j = i, h.pop(), 0 === h.length) return j; | |
if (h = h.join(' '), s.matchesMedia(h)) return j | |
} | |
return '100vw' | |
} | |
b.createElement('picture'); | |
var o, | |
p, | |
q, | |
r, | |
s = { | |
}, | |
t = !1, | |
u = function () { | |
}, | |
v = b.createElement('img'), | |
w = v.getAttribute, | |
x = v.setAttribute, | |
y = v.removeAttribute, | |
z = b.documentElement, | |
A = { | |
}, | |
B = { | |
algorithm: '' | |
}, | |
C = 'data-pfsrc', | |
D = C + 'set', | |
E = navigator.userAgent, | |
F = /rident/.test(E) || /ecko/.test(E) && E.match(/rv\:(\d+)/) && RegExp.$1 > 35, | |
G = 'currentSrc', | |
H = /\s+\+?\d+(e\d+)?w/, | |
I = /(\([^)]+\))?\s*(.+)/, | |
J = a.picturefillCFG, | |
K = 'position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)', | |
L = 'font-size:100%!important;', | |
M = !0, | |
N = { | |
}, | |
O = { | |
}, | |
P = a.devicePixelRatio, | |
Q = { | |
px: 1, | |
'in': 96 | |
}, | |
R = b.createElement('a'), | |
S = !1, | |
T = /^[ \t\n\r\u000c]+/, | |
U = /^[, \t\n\r\u000c]+/, | |
V = /^[^ \t\n\r\u000c]+/, | |
W = /[,]+$/, | |
X = /^\d+$/, | |
Y = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/, | |
Z = function (a, b, c, d) { | |
a.addEventListener ? a.addEventListener(b, c, d || !1) : a.attachEvent && a.attachEvent('on' + b, c) | |
}, | |
$ = function (a) { | |
var b = { | |
}; | |
return function (c) { | |
return c in b || (b[c] = a(c)), | |
b[c] | |
} | |
}, | |
_ = function () { | |
var a = /^([\d\.]+)(em|vw|px)$/, | |
b = function () { | |
for (var a = arguments, b = 0, c = a[0]; ++b in a; ) c = c.replace(a[b], a[++b]); | |
return c | |
}, | |
c = $(function (a) { | |
return 'return ' + b((a || '').toLowerCase(), /\band\b/g, '&&', /,/g, '||', /min-([a-z-\s]+):/g, 'e.$1>=', /max-([a-z-\s]+):/g, 'e.$1<=', /calc([^)]+)/g, '($1)', /(\d+[\.]*[\d]*)([a-z]+)/g, '($1 * e.$2)', /^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi, '') + ';' | |
}); | |
return function (b, d) { | |
var e; | |
if (!(b in N)) if (N[b] = !1, d && (e = b.match(a))) N[b] = e[1] * Q[e[2]]; | |
else try { | |
N[b] = new Function('e', c(b)) (Q) | |
} catch (f) { | |
} | |
return N[b] | |
} | |
}(), | |
aa = function (a, b) { | |
return a.w ? (a.cWidth = s.calcListLength(b || '100vw'), a.res = a.w / a.cWidth) : a.res = a.d, | |
a | |
}, | |
ba = function (a) { | |
if (t) { | |
var c, | |
d, | |
e, | |
f = a || { | |
}; | |
if (f.elements && 1 === f.elements.nodeType && ('IMG' === f.elements.nodeName.toUpperCase() ? f.elements = [ | |
f.elements | |
] : (f.context = f.elements, f.elements = null)), c = f.elements || s.qsa(f.context || b, f.reevaluate || f.reselect ? s.sel : s.selShort), e = c.length) { | |
for (s.setupRun(f), S = !0, d = 0; e > d; d++) s.fillImg(c[d], f); | |
s.teardownRun(f) | |
} | |
} | |
}; | |
o = a.console && console.warn ? function (a) { | |
console.warn(a) | |
} | |
: u, | |
G in v || (G = 'src'), | |
A['image/jpeg'] = !0, | |
A['image/gif'] = !0, | |
A['image/png'] = !0, | |
A['image/svg+xml'] = b.implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#Image', '1.1'), | |
s.ns = ('pf' + (new Date).getTime()).substr(0, 9), | |
s.supSrcset = 'srcset' in v, | |
s.supSizes = 'sizes' in v, | |
s.supPicture = !!a.HTMLPictureElement, | |
s.supSrcset && s.supPicture && !s.supSizes && !function (a) { | |
v.srcset = 'data:,a', | |
a.src = 'data:,a', | |
s.supSrcset = v.complete === a.complete, | |
s.supPicture = s.supSrcset && s.supPicture | |
}(b.createElement('img')), | |
s.supSrcset && !s.supSizes ? !function () { | |
var a = 'data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==', | |
c = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==', | |
d = b.createElement('img'), | |
e = function () { | |
var a = d.width; | |
2 === a && (s.supSizes = !0), | |
q = s.supSrcset && !s.supSizes, | |
t = !0, | |
setTimeout(ba) | |
}; | |
d.onload = e, | |
d.onerror = e, | |
d.setAttribute('sizes', '9px'), | |
d.srcset = c + ' 1w,' + a + ' 9w', | |
d.src = c | |
}() : t = !0, | |
s.selShort = 'picture>img,img[srcset]', | |
s.sel = s.selShort, | |
s.cfg = B, | |
s.DPR = P || 1, | |
s.u = Q, | |
s.types = A, | |
s.setSize = u, | |
s.makeUrl = $(function (a) { | |
return R.href = a, | |
R.href | |
}), | |
s.qsa = function (a, b) { | |
return 'querySelector' in a ? a.querySelectorAll(b) : [ | |
] | |
}, | |
s.matchesMedia = function () { | |
return a.matchMedia && (matchMedia('(min-width: 0.1em)') || { | |
}).matches ? s.matchesMedia = function (a) { | |
return !a || matchMedia(a).matches | |
} | |
: s.matchesMedia = s.mMQ, | |
s.matchesMedia.apply(this, arguments) | |
}, | |
s.mMQ = function (a) { | |
return a ? _(a) : !0 | |
}, | |
s.calcLength = function (a) { | |
var b = _(a, !0) || !1; | |
return 0 > b && (b = !1), | |
b | |
}, | |
s.supportsType = function (a) { | |
return a ? A[a] : !0 | |
}, | |
s.parseSize = $(function (a) { | |
var b = (a || '').match(I); | |
return { | |
media: b && b[1], | |
length: b && b[2] | |
} | |
}), | |
s.parseSet = function (a) { | |
return a.cands || (a.cands = m(a.srcset, a)), | |
a.cands | |
}, | |
s.getEmValue = function () { | |
var a; | |
if (!p && (a = b.body)) { | |
var c = b.createElement('div'), | |
d = z.style.cssText, | |
e = a.style.cssText; | |
c.style.cssText = K, | |
z.style.cssText = L, | |
a.style.cssText = L, | |
a.appendChild(c), | |
p = c.offsetWidth, | |
a.removeChild(c), | |
p = parseFloat(p, 10), | |
z.style.cssText = d, | |
a.style.cssText = e | |
} | |
return p || 16 | |
}, | |
s.calcListLength = function (a) { | |
if (!(a in O) || B.uT) { | |
var b = s.calcLength(n(a)); | |
O[a] = b ? b : Q.width | |
} | |
return O[a] | |
}, | |
s.setRes = function (a) { | |
var b; | |
if (a) { | |
b = s.parseSet(a); | |
for (var c = 0, d = b.length; d > c; c++) aa(b[c], a.sizes) | |
} | |
return b | |
}, | |
s.setRes.res = aa, | |
s.applySetCandidate = function (a, b) { | |
if (a.length) { | |
var c, | |
d, | |
e, | |
f, | |
h, | |
k, | |
l, | |
m, | |
n, | |
o = b[s.ns], | |
p = s.DPR; | |
if (k = o.curSrc || b[G], l = o.curCan || j(b, k, a[0].set), l && l.set === a[0].set && (n = F && !b.complete && l.res - 0.1 > p, n || (l.cached = !0, l.res >= p && (h = l))), !h) for (a.sort(i), f = a.length, h = a[f - 1], d = 0; f > d; d++) if (c = a[d], c.res >= p) { | |
e = d - 1, | |
h = a[e] && (n || k !== s.makeUrl(c.url)) && g(a[e].res, c.res, p, a[e].cached) ? a[e] : c; | |
break | |
} | |
h && (m = s.makeUrl(h.url), o.curSrc = m, o.curCan = h, m !== k && s.setSrc(b, h), s.setSize(b)) | |
} | |
}, | |
s.setSrc = function (a, b) { | |
var c; | |
a.src = b.url, | |
'image/svg+xml' === b.set.type && (c = a.style.width, a.style.width = a.offsetWidth + 1 + 'px', a.offsetWidth + 1 && (a.style.width = c)) | |
}, | |
s.getSet = function (a) { | |
var b, | |
c, | |
d, | |
e = !1, | |
f = a[s.ns].sets; | |
for (b = 0; b < f.length && !e; b++) if (c = f[b], c.srcset && s.matchesMedia(c.media) && (d = s.supportsType(c.type))) { | |
'pending' === d && (c = d), | |
e = c; | |
break | |
} | |
return e | |
}, | |
s.parseSets = function (a, b, d) { | |
var e, | |
f, | |
g, | |
h, | |
i = b && 'PICTURE' === b.nodeName.toUpperCase(), | |
j = a[s.ns]; | |
(j.src === c || d.src) && (j.src = w.call(a, 'src'), j.src ? x.call(a, C, j.src) : y.call(a, C)), | |
(j.srcset === c || d.srcset || !s.supSrcset || a.srcset) && (e = w.call(a, 'srcset'), j.srcset = e, h = !0), | |
j.sets = [ | |
], | |
i && (j.pic = !0, l(b, j.sets)), | |
j.srcset ? (f = { | |
srcset: j.srcset, | |
sizes: w.call(a, 'sizes') | |
}, j.sets.push(f), g = (q || j.src) && H.test(j.srcset || ''), g || !j.src || k(j.src, f) || f.has1x || (f.srcset += ', ' + j.src, f.cands.push({ | |
url: j.src, | |
d: 1, | |
set: f | |
}))) : j.src && j.sets.push({ | |
srcset: j.src, | |
sizes: null | |
}), | |
j.curCan = null, | |
j.curSrc = c, | |
j.supported = !(i || f && !s.supSrcset || g && !s.supSizes), | |
h && s.supSrcset && !j.supported && (e ? (x.call(a, D, e), a.srcset = '') : y.call(a, D)), | |
j.supported && !j.srcset && (!j.src && a.src || a.src !== s.makeUrl(j.src)) && (null === j.src ? a.removeAttribute('src') : a.src = j.src), | |
j.parsed = !0 | |
}, | |
s.fillImg = function (a, b) { | |
var c, | |
d = b.reselect || b.reevaluate; | |
a[s.ns] || (a[s.ns] = { | |
}), | |
c = a[s.ns], | |
(d || c.evaled !== r) && ((!c.parsed || b.reevaluate) && s.parseSets(a, a.parentNode, b), c.supported ? c.evaled = r : h(a)) | |
}, | |
s.setupRun = function () { | |
(!S || M || P !== a.devicePixelRatio) && f() | |
}, | |
s.supPicture ? (ba = u, s.fillImg = u) : !function () { | |
var c, | |
d = a.attachEvent ? /d$|^c/ : /d$|^c|^i/, | |
e = function () { | |
var a = b.readyState || ''; | |
f = setTimeout(e, 'loading' === a ? 200 : 999), | |
b.body && (s.fillImgs(), c = c || d.test(a), c && clearTimeout(f)) | |
}, | |
f = setTimeout(e, b.body ? 9 : 99), | |
g = function (a, b) { | |
var c, | |
d, | |
e = function () { | |
var f = new Date - d; | |
b > f ? c = setTimeout(e, b - f) : (c = null, a()) | |
}; | |
return function () { | |
d = new Date, | |
c || (c = setTimeout(e, b)) | |
} | |
}, | |
h = z.clientHeight, | |
i = function () { | |
M = Math.max(a.innerWidth || 0, z.clientWidth) !== Q.width || z.clientHeight !== h, | |
h = z.clientHeight, | |
M && s.fillImgs() | |
}; | |
Z(a, 'resize', g(i, 99)), | |
Z(b, 'readystatechange', e) | |
}(), | |
s.picturefill = ba, | |
s.fillImgs = ba, | |
s.teardownRun = u, | |
ba._ = s, | |
a.picturefillCFG = { | |
pf: s, | |
push: function (a) { | |
var b = a.shift(); | |
'function' == typeof s[b] ? s[b].apply(s, a) : (B[b] = a[0], S && s.fillImgs({ | |
reselect: !0 | |
})) | |
} | |
}; | |
for (; J && J.length; ) a.picturefillCFG.push(J.shift()); | |
a.picturefill = ba, | |
'object' == typeof module && 'object' == typeof module.exports ? module.exports = ba : 'function' == typeof define && define.amd && define('picturefill', function () { | |
return ba | |
}), | |
s.supPicture || (A['image/webp'] = e('image/webp', 'data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==')) | |
}(window, document); | |
; | |
(function ($, Drupal) { | |
Drupal.behaviors.nppe_module_dsu_security = { | |
attach: function (context, settings) { | |
// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) | |
//Please see https://github.com/jquery/jquery/issues/2432 | |
//long term upgrade is to JQuery 3 because this is a breaking change. | |
//however we should be safe if not using $.get(untrusted_url) | |
// | |
jQuery.ajaxPrefilter(function (s) { | |
if (s.crossDomain) { | |
s.contents.script = false; | |
} | |
}); | |
} | |
} | |
}(jQuery, Drupal)); | |
; | |
/** | |
* @file | |
* Scripts that serve to enhance Kraken Webforms with client side validation, | |
* multiple dismiss modal triggers, automatic popup logic, and market field prepopulation. | |
*/ | |
(function ($, Drupal, drupalSettings) { | |
'use strict'; | |
var SELECTOR = { | |
WEBFORM: 'form.webform-submission-form', | |
FIELD: '.js-form-item', | |
FIELD_MARKET: '.js-form-item-market', | |
TRIGGER: '.js-kraken-webform-modal', | |
DISMISS: [ | |
'.js-kraken-dismiss-webform-modal a', | |
'.ui-icon-closethick', | |
'.ui-dialog-titlebar-close' | |
], | |
ERROR_MSG: '.formError-msg', | |
ERROR: '.formError', | |
CONFIRMATION: '.webform-confirmation-modal--content', | |
}; | |
var INPUTS = [ | |
'INPUT', | |
'SELECT', | |
'TEXTAREA' | |
]; | |
/** | |
* Attaches the krakenWebforms behavior to document. | |
* | |
* @type {Drupal~behavior} | |
* | |
* @prop {Drupal~behaviorAttach} attach | |
* Creates instances of KrakenWebform | |
* | |
*/ | |
Drupal.behaviors.krakenWebforms = { | |
attach: function (context, settings) { | |
$(SELECTOR.WEBFORM).once('kraken_webform_init').each(function () { | |
new Drupal.KrakenWebform(this); | |
}); | |
}, | |
}; | |
/** | |
* Attaches the krakenWebformsModal behavior to document. | |
* | |
* @type {Drupal~behavior} | |
* | |
* @prop {Drupal~behaviorAttach} attach | |
* Performs date check on localStorage variable and opens modal form of | |
* designated trigger | |
* | |
*/ | |
Drupal.behaviors.krakenWebformsModals = { | |
attach: function (context, settings) { | |
$(SELECTOR.TRIGGER).once('kraken_webform_modal_init').each(function () { | |
var key = JSON.parse(window.localStorage.getItem('krakenWebform-' + extractFormName(this.href))); | |
if (!key || new Date(key.expiration) < new Date()) { | |
var self = this; | |
setTimeout(function () { | |
self.click(); | |
}, 0); | |
} | |
}); | |
$(SELECTOR.CONFIRMATION).once('kraken_webform_confirmation_init').each(function () { | |
$(this).addClass('quarantine'); | |
}); | |
}, | |
}; | |
/** | |
* Constructs a Kraken Webform object | |
* | |
* Provides ability to prepopulate market field, and simple client side validation. | |
* | |
* @constructor | |
* | |
* @param {HTMLElement} element | |
* DOM element of Drupal Webform | |
*/ | |
Drupal.KrakenWebform = function (element) { | |
this.title = 'krakenWebform-' + extractFormName(element.action); | |
this.element = element; | |
this.modal = getClosest(element, '#drupal-modal'); | |
this.bindEvents(); | |
return this; | |
}; | |
/** | |
* Binds events to form for handling submits and client side validation. | |
*/ | |
Drupal.KrakenWebform.prototype.bindEvents = function () { | |
var handleComplete = this.handleComplete.bind(this); | |
this.element.addEventListener('blur', handleBlur, true); | |
this.element.addEventListener('submit', handleComplete); | |
/** | |
* If Form displays in modal, we must bind events to | |
* the Dialog so we can apply logic to the Dialog generated | |
* submit button. | |
*/ | |
if (this.modal) { | |
var self = this; | |
setTimeout(function () { | |
var dialog = self.modal.parentNode; | |
dialog.addEventListener('click', handleComplete); | |
}, 0); | |
} else { | |
this.element.addEventListener('click', handleComplete); | |
} | |
}; | |
/** | |
* Handles form dismiss / completion. | |
* @param {event} e | |
*/ | |
Drupal.KrakenWebform.prototype.handleComplete = function (e) { | |
var validDismiss = false; | |
var isSubmit = e.target.classList.contains('js-form-submit'); | |
for (var i = 0; i < SELECTOR.DISMISS.length; i++) { | |
if (selectorMatches(e.target, SELECTOR.DISMISS[i])) { | |
validDismiss = true; | |
} | |
} | |
if (validDismiss || isSubmit) { | |
if (!isSubmit) { | |
e.preventDefault(); | |
} | |
var timeDiff = window.drupalSettings.sub_modal_dismissal ? parseInt(window.drupalSettings.sub_modal_dismissal, 10) : 30; | |
var now = new Date(); | |
var data = { | |
expiration: new Date(now.getTime() + timeDiff * 86400 * 1000) | |
}; | |
/** | |
* Assign expiration object to localStorage key that matches form title to | |
* allow the expiration logic on multiple webforms. | |
*/ | |
window.localStorage.setItem(this.title, JSON.stringify(data)); | |
if (this.modal && !isSubmit) { | |
if (this.modal.parentElement) { | |
this.modal.parentElement.querySelector('.ui-dialog-titlebar-close').click(); | |
} | |
} | |
} | |
}; | |
/** | |
* Handles form dismiss / completion. | |
* | |
* @param {event} e | |
*/ | |
function handleBlur(e) { | |
var validInput = INPUTS.indexOf(e.target.tagName) !== - 1; | |
if (validInput) { | |
var validationError = hasError(e.target); | |
if (validationError) { | |
renderError(e.target, validationError); | |
} else { | |
removeError(e.target); | |
} | |
} | |
}; | |
/** | |
* Append error message to webform item. | |
* | |
* @param {HTMLElement} field | |
* @param {string} msg | |
*/ | |
function renderError(field, msg) { | |
var fieldId = field.id || field.name; | |
var errorId = 'kraken-error-for-' + fieldId; | |
var fieldItem = getClosest(field, SELECTOR.FIELD); | |
var errorLabel = fieldItem.querySelector(SELECTOR.ERROR_MSG); | |
if (!errorLabel) { | |
errorLabel = $('<div id="' + errorId + '" class="formError-msg">' + msg + '</div>') [0]; | |
fieldItem.appendChild(errorLabel); | |
field.setAttribute('aria-describedby', errorId); | |
fieldItem.classList.add('formError') | |
} | |
if (errorLabel.innerHTML !== msg) { | |
errorLabel.innerHTML = msg; | |
} | |
} /** | |
* Remove error message from webform item. | |
* | |
* @param {HTMLElement} field | |
*/ | |
function removeError(field) { | |
var fieldItem = getClosest(field, SELECTOR.FIELD); | |
if (!fieldItem) { | |
return; | |
} | |
var errorLabel = fieldItem.querySelector(SELECTOR.ERROR_MSG); | |
if (!errorLabel) { | |
return; | |
} | |
errorLabel.outerHTML = ''; | |
fieldItem.classList.remove('formError'); | |
field.removeAttribute('aria-describedby'); | |
} /** | |
* Find first ancestor element in dom that matches selector. | |
* | |
* @param {HTMLElement} el | |
* @param {string} sel | |
* @return {HTMLElement} | |
*/ | |
var getClosest = function (elem, selector) { | |
// Get the closest matching element | |
for (; elem && elem !== document; elem = elem.parentNode) { | |
if (selectorMatches(elem, selector)) return elem; | |
} | |
return null; | |
}; | |
/** | |
* Given a path or url to form, extracts form name. | |
* | |
* @param {string} path | |
* @return {string} | |
*/ | |
function extractFormName(path) { | |
var name = path.split('?') [0].split('/'); | |
return name[name.length - 1]; | |
} /** | |
* Given element and selector, returns whether or not | |
* element satisfies the selector provided. | |
* | |
* @param {HTMLElement} el | |
* @param {string} sel | |
* @return {boolean} | |
*/ | |
function selectorMatches(el, sel) { | |
var p = Element.prototype; | |
var f = p.matches || p.webkitMatchesSelector || p.mozMatchesSelector || p.msMatchesSelector || function (s) { | |
return [].indexOf.call(document.querySelectorAll(s), this) !== - 1; | |
}; | |
return f.call(el, sel); | |
} /** | |
* Given a form field, checks validity and returns message. | |
* | |
* @param {HTMLElement} field | |
* @return {string} | |
*/ | |
function hasError(field) { | |
if (field.disabled || field.type === 'file' || field.type === 'reset' || field.type === 'submit' || field.type === 'button') { | |
return; | |
} | |
var validity = field.validity; | |
if (validity.valid) { | |
return; | |
} | |
if (validity.valueMissing) { | |
return field.dataset.webformRequiredError; | |
} | |
if (validity.typeMismatch) { | |
if (field.type === 'email') { | |
return field.dataset.patternError; | |
} | |
if (field.type === 'url') { | |
return Drupal.t('Please enter a URL.'); | |
} | |
} | |
if (validity.tooShort) { | |
return Drupal.t('Please lengthen this text to @minLength characters or more. You are currently using @length characters.').replace('@minLength', field.getAttribute('minLength')).replace('@length', field.value.length); | |
} | |
if (validity.tooLong) { | |
return Drupal.t('Please shorten this text to no more than @maxLength characters. You are currently using @length characters.').replace('@maxLength', field.getAttribute('maxLength')).replace('@length', field.value.length); | |
} | |
if (validity.badInput) { | |
return Drupal.t('Please enter a number.'); | |
} | |
if (validity.stepMismatch) { | |
return Drupal.t('Please select a valid value.'); | |
} | |
if (validity.rangeOverflow) { | |
return Drupal.t('Please select a value that is no more than @max.').replace('@max', field.getAttribute('max')); | |
} | |
if (validity.rangeUnderflow) { | |
return Drupal.t('Please select a value that is no less than @min.').replace('@min', field.getAttribute('min')); | |
} | |
if (validity.patternMismatch) { | |
if (field.hasAttribute('title')) { | |
return field.getAttribute('title'); | |
} | |
return Drupal.t('Please match the requested format.'); | |
} | |
return Drupal.t('The value you entered for this field is invalid.'); | |
}; | |
}) (jQuery, Drupal, drupalSettings); | |
; | |
/** | |
* @file | |
* The Lazy-load behavior. | |
*/ | |
(function (Drupal) { | |
'use strict'; | |
Drupal.behaviors.lazy = { | |
attach: function (context, settings) { | |
var utils = { | |
extend: function (obj, src) { | |
Object.keys(src).forEach(function (key) { | |
obj[key] = src[key]; | |
}); | |
return obj; | |
}, | |
hasClass: function (el, className) { | |
return el.classList ? el.classList.contains(className) : new RegExp('\\b' + className + '\\b').test(el.className); | |
}, | |
addClass: function (el, className) { | |
if (el.classList) { | |
el.classList.add(className); | |
} | |
else if (!hasClass(el, className)) { | |
el.className += ' ' + className; | |
} | |
}, | |
removeClass: function (el, className) { | |
if (el.classList) { | |
el.classList.remove(className); | |
} | |
else { | |
el.className = el.className.replace(new RegExp('\\b' + className + '\\b', 'g'), ''); | |
} | |
}, | |
once: function (selector, context) { | |
return (context || document).querySelector(selector); | |
}, | |
loadScript: function (url) { | |
var script = document.createElement('script'), | |
scripts = document.getElementsByTagName('script') [0]; | |
script.src = url; | |
script.async = true; | |
scripts.parentNode.insertBefore(script, scripts); | |
} | |
}; | |
if (utils.once('body', context)) { | |
var lazysizes = settings.lazy.lazysizes || { | |
}; | |
if (('loading' in HTMLImageElement.prototype) && settings.lazy.preferNative) { | |
// Lazy-loading is natively supported and preferred. | |
var element = context.querySelectorAll('[loading="lazy"]'); | |
element.forEach(function (el) { | |
if (el.hasAttribute(lazysizes.srcAttr)) { | |
el.src = el.getAttribute(lazysizes.srcAttr); | |
el.removeAttribute(lazysizes.srcAttr); | |
} | |
if (el.hasAttribute(lazysizes.srcsetAttr)) { | |
el.srcset = el.getAttribute(lazysizes.srcsetAttr); | |
el.removeAttribute(lazysizes.srcsetAttr); | |
} | |
if (el.hasAttribute(lazysizes.sizesAttr)) { | |
el.sizes = el.getAttribute(lazysizes.sizesAttr); | |
el.removeAttribute(lazysizes.sizesAttr); | |
} | |
utils.removeClass(el, lazysizes.lazyClass); | |
utils.addClass(el, lazysizes.loadedClass); | |
// If parent element is a <picture> element, then there should be | |
// <source> element(s) as well. | |
var sources = el.parentNode.querySelectorAll('source'); | |
sources.forEach(function (source) { | |
if (source.hasAttribute(lazysizes.srcsetAttr)) { | |
source.srcset = source.getAttribute(lazysizes.srcsetAttr); | |
source.removeAttribute(lazysizes.srcsetAttr); | |
} | |
if (source.hasAttribute(lazysizes.sizesAttr)) { | |
source.sizes = source.getAttribute(lazysizes.sizesAttr); | |
source.removeAttribute(lazysizes.sizesAttr); | |
} | |
}); | |
}); | |
} | |
else { | |
// 1. Lazysizes configuration. | |
window.lazySizesConfig = window.lazySizesConfig || { | |
}; | |
window.lazySizesConfig = utils.extend(window.lazySizesConfig, lazysizes); | |
// 2. Load all selected lazysizes plugins. | |
if (!Object.entries) { | |
Object.entries = function (obj) { | |
var ownProps = Object.keys(obj), | |
i = ownProps.length, | |
resArray = new Array(i); | |
while (i--) { | |
resArray[i] = [ | |
ownProps[i], | |
obj[ownProps[i]] | |
]; | |
} | |
return resArray; | |
}; | |
} | |
Object.entries(lazysizes.plugins).forEach(function (path) { | |
utils.loadScript(settings.path.baseUrl + 'libraries/lazysizes/plugins/' + path[1] + '.min.js'); | |
}); | |
// 3. Load the lazysizes library. | |
utils.loadScript(settings.path.baseUrl + 'libraries/lazysizes/lazysizes.min.js'); | |
} | |
} | |
} | |
}; | |
}) (Drupal); | |
; | |
/** | |
* @file | |
* Initialize LiveEngage on the page. | |
*/ | |
(function (drupalSettings) { | |
'use strict'; | |
if (!drupalSettings.livePerson) { | |
return; | |
} | |
window.lpTag = window.lpTag || { | |
}; | |
if (typeof window.lpTag._tagCount === 'undefined') { | |
window.lpTag = { | |
site: drupalSettings.livePerson.account || '', | |
section: lpTag.section || '', | |
autoStart: lpTag.autoStart === false ? false : true, | |
ovr: lpTag.ovr || { | |
}, | |
_v: '1.5.1', | |
_tagCount: 1, | |
protocol: location.protocol, | |
events: { | |
bind: function (app, ev, fn) { | |
lpTag.defer(function () { | |
lpTag.events.bind(app, ev, fn); | |
}, 0); | |
}, | |
trigger: function (app, ev, json) { | |
lpTag.defer(function () { | |
lpTag.events.trigger(app, ev, json); | |
}, 1); | |
} | |
}, | |
defer: function (fn, fnType) { | |
if (fnType == 0) { | |
this._defB = this._defB || [ | |
]; | |
this._defB.push(fn); | |
} else if (fnType == 1) { | |
this._defT = this._defT || [ | |
]; | |
this._defT.push(fn); | |
} else { | |
this._defL = this._defL || [ | |
]; | |
this._defL.push(fn); | |
} | |
}, | |
load: function (src, chr, id) { | |
var t = this; | |
setTimeout(function () { | |
t._load(src, chr, id); | |
}, 0); | |
}, | |
_load: function (src, chr, id) { | |
var url = src; | |
if (!src) { | |
url = this.protocol + '//' + ((this.ovr && this.ovr.domain) ? this.ovr.domain : 'lptag.liveperson.net') + '/tag/tag.js?site=' + this.site; | |
} | |
var s = document.createElement('script'); | |
s.setAttribute('charset', chr ? chr : 'UTF-8'); | |
if (id) { | |
s.setAttribute('id', id); | |
} | |
s.setAttribute('src', url); | |
document.getElementsByTagName('head').item(0).appendChild(s); | |
}, | |
init: function () { | |
this._timing = this._timing || { | |
}; | |
this._timing.start = (new Date()).getTime(); | |
var that = this; | |
if (window.attachEvent) { | |
window.attachEvent('onload', function () { | |
that._domReady('domReady'); | |
}); | |
} else { | |
window.addEventListener('DOMContentLoaded', function () { | |
that._domReady('contReady'); | |
}, false); | |
window.addEventListener('load', function () { | |
that._domReady('domReady'); | |
}, false); | |
} | |
if (typeof (window._lptStop) == 'undefined') { | |
this.load(); | |
} | |
}, | |
start: function () { | |
this.autoStart = true; | |
}, | |
_domReady: function (n) { | |
if (!this.isDom) { | |
this.isDom = true; | |
this.events.trigger('LPT', 'DOM_READY', { | |
t: n | |
}); | |
} | |
this._timing[n] = (new Date()).getTime(); | |
}, | |
vars: lpTag.vars || [ | |
], | |
dbs: lpTag.dbs || [ | |
], | |
ctn: lpTag.ctn || [ | |
], | |
sdes: lpTag.sdes || [ | |
], | |
ev: lpTag.ev || [ | |
] | |
}; | |
lpTag.init(); | |
} else { | |
window.lpTag._tagCount += 1; | |
} | |
}) (drupalSettings); | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
(function ($, Drupal) { | |
function TabbingManager() { | |
this.stack = [ | |
]; | |
} | |
function TabbingContext(options) { | |
$.extend(this, { | |
level: null, | |
$tabbableElements: $(), | |
$disabledElements: $(), | |
released: false, | |
active: false | |
}, options); | |
} | |
$.extend(TabbingManager.prototype, { | |
constrain: function constrain(elements) { | |
var il = this.stack.length; | |
for (var i = 0; i < il; i++) { | |
this.stack[i].deactivate(); | |
} | |
var $elements = $(elements).find(':tabbable').addBack(':tabbable'); | |
var tabbingContext = new TabbingContext({ | |
level: this.stack.length, | |
$tabbableElements: $elements | |
}); | |
this.stack.push(tabbingContext); | |
tabbingContext.activate(); | |
$(document).trigger('drupalTabbingConstrained', tabbingContext); | |
return tabbingContext; | |
}, | |
release: function release() { | |
var toActivate = this.stack.length - 1; | |
while (toActivate >= 0 && this.stack[toActivate].released) { | |
toActivate--; | |
} | |
this.stack.splice(toActivate + 1); | |
if (toActivate >= 0) { | |
this.stack[toActivate].activate(); | |
} | |
}, | |
activate: function activate(tabbingContext) { | |
var $set = tabbingContext.$tabbableElements; | |
var level = tabbingContext.level; | |
var $disabledSet = $(':tabbable').not($set); | |
tabbingContext.$disabledElements = $disabledSet; | |
var il = $disabledSet.length; | |
for (var i = 0; i < il; i++) { | |
this.recordTabindex($disabledSet.eq(i), level); | |
} | |
$disabledSet.prop('tabindex', - 1).prop('autofocus', false); | |
var $hasFocus = $set.filter('[autofocus]').eq( - 1); | |
if ($hasFocus.length === 0) { | |
$hasFocus = $set.eq(0); | |
} | |
$hasFocus.trigger('focus'); | |
}, | |
deactivate: function deactivate(tabbingContext) { | |
var $set = tabbingContext.$disabledElements; | |
var level = tabbingContext.level; | |
var il = $set.length; | |
for (var i = 0; i < il; i++) { | |
this.restoreTabindex($set.eq(i), level); | |
} | |
}, | |
recordTabindex: function recordTabindex($el, level) { | |
var tabInfo = $el.data('drupalOriginalTabIndices') || { | |
}; | |
tabInfo[level] = { | |
tabindex: $el[0].getAttribute('tabindex'), | |
autofocus: $el[0].hasAttribute('autofocus') | |
}; | |
$el.data('drupalOriginalTabIndices', tabInfo); | |
}, | |
restoreTabindex: function restoreTabindex($el, level) { | |
var tabInfo = $el.data('drupalOriginalTabIndices'); | |
if (tabInfo && tabInfo[level]) { | |
var data = tabInfo[level]; | |
if (data.tabindex) { | |
$el[0].setAttribute('tabindex', data.tabindex); | |
} else { | |
$el[0].removeAttribute('tabindex'); | |
} | |
if (data.autofocus) { | |
$el[0].setAttribute('autofocus', 'autofocus'); | |
} | |
if (level === 0) { | |
$el.removeData('drupalOriginalTabIndices'); | |
} else { | |
var levelToDelete = level; | |
while (tabInfo.hasOwnProperty(levelToDelete)) { | |
delete tabInfo[levelToDelete]; | |
levelToDelete++; | |
} | |
$el.data('drupalOriginalTabIndices', tabInfo); | |
} | |
} | |
} | |
}); | |
$.extend(TabbingContext.prototype, { | |
release: function release() { | |
if (!this.released) { | |
this.deactivate(); | |
this.released = true; | |
Drupal.tabbingManager.release(this); | |
$(document).trigger('drupalTabbingContextReleased', this); | |
} | |
}, | |
activate: function activate() { | |
if (!this.active && !this.released) { | |
this.active = true; | |
Drupal.tabbingManager.activate(this); | |
$(document).trigger('drupalTabbingContextActivated', this); | |
} | |
}, | |
deactivate: function deactivate() { | |
if (this.active) { | |
this.active = false; | |
Drupal.tabbingManager.deactivate(this); | |
$(document).trigger('drupalTabbingContextDeactivated', this); | |
} | |
} | |
}); | |
if (Drupal.tabbingManager) { | |
return; | |
} | |
Drupal.tabbingManager = new TabbingManager(); | |
}) (jQuery, Drupal); | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
Drupal.debounce = function (func, wait, immediate) { | |
var timeout = void 0; | |
var result = void 0; | |
return function () { | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
var context = this; | |
var later = function later() { | |
timeout = null; | |
if (!immediate) { | |
result = func.apply(context, args); | |
} | |
}; | |
var callNow = immediate && !timeout; | |
clearTimeout(timeout); | |
timeout = setTimeout(later, wait); | |
if (callNow) { | |
result = func.apply(context, args); | |
} | |
return result; | |
}; | |
}; | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
(function (Drupal, debounce) { | |
var liveElement = void 0; | |
var announcements = [ | |
]; | |
Drupal.behaviors.drupalAnnounce = { | |
attach: function attach(context) { | |
if (!liveElement) { | |
liveElement = document.createElement('div'); | |
liveElement.id = 'drupal-live-announce'; | |
liveElement.className = 'visually-hidden'; | |
liveElement.setAttribute('aria-live', 'polite'); | |
liveElement.setAttribute('aria-busy', 'false'); | |
document.body.appendChild(liveElement); | |
} | |
} | |
}; | |
function announce() { | |
var text = [ | |
]; | |
var priority = 'polite'; | |
var announcement = void 0; | |
var il = announcements.length; | |
for (var i = 0; i < il; i++) { | |
announcement = announcements.pop(); | |
text.unshift(announcement.text); | |
if (announcement.priority === 'assertive') { | |
priority = 'assertive'; | |
} | |
} | |
if (text.length) { | |
liveElement.innerHTML = ''; | |
liveElement.setAttribute('aria-busy', 'true'); | |
liveElement.setAttribute('aria-live', priority); | |
liveElement.innerHTML = text.join('\n'); | |
liveElement.setAttribute('aria-busy', 'false'); | |
} | |
} | |
Drupal.announce = function (text, priority) { | |
announcements.push({ | |
text: text, | |
priority: priority | |
}); | |
return debounce(announce, 200) (); | |
}; | |
}) (Drupal, Drupal.debounce); | |
; | |
/** | |
* DO NOT EDIT THIS FILE DIRECTLY | |
* Please make changes in | |
* intersection_observer.es6.js | |
* cd docroot/themes/custom/kraken/build | |
* gulp build or npm run dev | |
*/ | |
!function t(e, n, i) { | |
function o(s, h) { | |
if (!n[s]) { | |
if (!e[s]) { | |
var c = 'function' == typeof require && require; | |
if (!h && c) return c(s, !0); | |
if (r) return r(s, !0); | |
var a = new Error('Cannot find module \'' + s + '\''); | |
throw a.code = 'MODULE_NOT_FOUND', | |
a | |
} | |
var u = n[s] = { | |
exports: { | |
} | |
}; | |
e[s][0].call(u.exports, (function (t) { | |
return o(e[s][1][t] || t) | |
}), u, u.exports, t, e, n, i) | |
} | |
return n[s].exports | |
} | |
for (var r = 'function' == typeof require && require, s = 0; s < i.length; s++) o(i[s]); | |
return o | |
}({ | |
1: [ | |
function (t, e, n) { | |
'use strict'; | |
var i = t('@babel/runtime/helpers/interopRequireDefault'), | |
o = i(t('@babel/runtime/helpers/classCallCheck')), | |
r = i(t('@babel/runtime/helpers/createClass')); | |
!function (e, Drupal) { | |
t('intersection-observer'); | |
var n = function () { | |
function t() { | |
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { | |
rootMargin: '0px', | |
threshold: 0.5 | |
}, | |
n = arguments.length > 1 ? arguments[1] : void 0, | |
i = arguments.length > 2 ? arguments[2] : void 0; | |
(0, o.default) (this, t), | |
e.root && (this.options = e, this.target = n, this.eventName = i, this.prevRatio = 0, this.init()) | |
} | |
return (0, r.default) (t, [ | |
{ | |
key: 'init', | |
value: function () { | |
var t = this; | |
window.addEventListener('DOMContentLoaded', (function () { | |
t.observer = new IntersectionObserver(t.onIntersect.bind(t), t.options), | |
t.observer.observe(t.target) | |
})) | |
} | |
}, | |
{ | |
key: 'onIntersect', | |
value: function (t, e) { | |
var n = this; | |
if (t.forEach((function (t) { | |
t.intersectionRatio > n.prevRatio ? t.target.classList.add('inView') : t.target.classList.remove('inView'), | |
n.prevRatio = t.intersectionRatio | |
})), this.eventName) { | |
var i = new CustomEvent(this.eventName); | |
e.root.dispatchEvent(i) | |
} | |
} | |
} | |
]), | |
t | |
}(); | |
Drupal.KrakenIntersectionObserver = n | |
}(jQuery, Drupal) | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 2, | |
'@babel/runtime/helpers/createClass': 3, | |
'@babel/runtime/helpers/interopRequireDefault': 4, | |
'intersection-observer': 5 | |
} | |
], | |
2: [ | |
function (t, e, n) { | |
e.exports = function (t, e) { | |
if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function') | |
} | |
}, | |
{ | |
} | |
], | |
3: [ | |
function (t, e, n) { | |
function i(t, e) { | |
for (var n = 0; n < e.length; n++) { | |
var i = e[n]; | |
i.enumerable = i.enumerable || !1, | |
i.configurable = !0, | |
'value' in i && (i.writable = !0), | |
Object.defineProperty(t, i.key, i) | |
} | |
} | |
e.exports = function (t, e, n) { | |
return e && i(t.prototype, e), | |
n && i(t, n), | |
t | |
} | |
}, | |
{ | |
} | |
], | |
4: [ | |
function (t, e, n) { | |
e.exports = function (t) { | |
return t && t.__esModule ? t : { | |
default: | |
t | |
} | |
} | |
}, | |
{ | |
} | |
], | |
5: [ | |
function (t, e, n) { | |
!function () { | |
'use strict'; | |
if ('object' == typeof window) if ('IntersectionObserver' in window && 'IntersectionObserverEntry' in window && 'intersectionRatio' in window.IntersectionObserverEntry.prototype) 'isIntersecting' in window.IntersectionObserverEntry.prototype || Object.defineProperty(window.IntersectionObserverEntry.prototype, 'isIntersecting', { | |
get: function () { | |
return this.intersectionRatio > 0 | |
} | |
}); | |
else { | |
var t = window.document, | |
e = [ | |
]; | |
i.prototype.THROTTLE_TIMEOUT = 100, | |
i.prototype.POLL_INTERVAL = null, | |
i.prototype.USE_MUTATION_OBSERVER = !0, | |
i.prototype.observe = function (t) { | |
if (!this._observationTargets.some((function (e) { | |
return e.element == t | |
}))) { | |
if (!t || 1 != t.nodeType) throw new Error('target must be an Element'); | |
this._registerInstance(), | |
this._observationTargets.push({ | |
element: t, | |
entry: null | |
}), | |
this._monitorIntersections(), | |
this._checkForIntersections() | |
} | |
}, | |
i.prototype.unobserve = function (t) { | |
this._observationTargets = this._observationTargets.filter((function (e) { | |
return e.element != t | |
})), | |
this._observationTargets.length || (this._unmonitorIntersections(), this._unregisterInstance()) | |
}, | |
i.prototype.disconnect = function () { | |
this._observationTargets = [ | |
], | |
this._unmonitorIntersections(), | |
this._unregisterInstance() | |
}, | |
i.prototype.takeRecords = function () { | |
var t = this._queuedEntries.slice(); | |
return this._queuedEntries = [ | |
], | |
t | |
}, | |
i.prototype._initThresholds = function (t) { | |
var e = t || [ | |
0 | |
]; | |
return Array.isArray(e) || (e = [ | |
e | |
]), | |
e.sort().filter((function (t, e, n) { | |
if ('number' != typeof t || isNaN(t) || t < 0 || t > 1) throw new Error('threshold must be a number between 0 and 1 inclusively'); | |
return t !== n[e - 1] | |
})) | |
}, | |
i.prototype._parseRootMargin = function (t) { | |
var e = (t || '0px').split(/\s+/).map((function (t) { | |
var e = /^(-?\d*\.?\d+)(px|%)$/.exec(t); | |
if (!e) throw new Error('rootMargin must be specified in pixels or percent'); | |
return { | |
value: parseFloat(e[1]), | |
unit: e[2] | |
} | |
})); | |
return e[1] = e[1] || e[0], | |
e[2] = e[2] || e[0], | |
e[3] = e[3] || e[1], | |
e | |
}, | |
i.prototype._monitorIntersections = function () { | |
this._monitoringIntersections || (this._monitoringIntersections = !0, this.POLL_INTERVAL ? this._monitoringInterval = setInterval(this._checkForIntersections, this.POLL_INTERVAL) : (o(window, 'resize', this._checkForIntersections, !0), o(t, 'scroll', this._checkForIntersections, !0), this.USE_MUTATION_OBSERVER && 'MutationObserver' in window && (this._domObserver = new MutationObserver(this._checkForIntersections), this._domObserver.observe(t, { | |
attributes: !0, | |
childList: !0, | |
characterData: !0, | |
subtree: !0 | |
})))) | |
}, | |
i.prototype._unmonitorIntersections = function () { | |
this._monitoringIntersections && (this._monitoringIntersections = !1, clearInterval(this._monitoringInterval), this._monitoringInterval = null, r(window, 'resize', this._checkForIntersections, !0), r(t, 'scroll', this._checkForIntersections, !0), this._domObserver && (this._domObserver.disconnect(), this._domObserver = null)) | |
}, | |
i.prototype._checkForIntersections = function () { | |
var t = this._rootIsInDom(), | |
e = t ? this._getRootRect() : { | |
top: 0, | |
bottom: 0, | |
left: 0, | |
right: 0, | |
width: 0, | |
height: 0 | |
}; | |
this._observationTargets.forEach((function (i) { | |
var o = i.element, | |
r = s(o), | |
h = this._rootContainsTarget(o), | |
c = i.entry, | |
a = t && h && this._computeTargetAndRootIntersection(o, e), | |
u = i.entry = new n({ | |
time: window.performance && performance.now && performance.now(), | |
target: o, | |
boundingClientRect: r, | |
rootBounds: e, | |
intersectionRect: a | |
}); | |
c ? t && h ? this._hasCrossedThreshold(c, u) && this._queuedEntries.push(u) : c && c.isIntersecting && this._queuedEntries.push(u) : this._queuedEntries.push(u) | |
}), this), | |
this._queuedEntries.length && this._callback(this.takeRecords(), this) | |
}, | |
i.prototype._computeTargetAndRootIntersection = function (e, n) { | |
if ('none' != window.getComputedStyle(e).display) { | |
for (var i, o, r, h, a, u, l, f, p = s(e), d = c(e), v = !1; !v; ) { | |
var g = null, | |
b = 1 == d.nodeType ? window.getComputedStyle(d) : { | |
}; | |
if ('none' == b.display) return; | |
if (d == this.root || d == t ? (v = !0, g = n) : d != t.body && d != t.documentElement && 'visible' != b.overflow && (g = s(d)), g && (i = g, o = p, r = void 0, h = void 0, a = void 0, u = void 0, l = void 0, f = void 0, r = Math.max(i.top, o.top), h = Math.min(i.bottom, o.bottom), a = Math.max(i.left, o.left), u = Math.min(i.right, o.right), f = h - r, !(p = (l = u - a) >= 0 && f >= 0 && { | |
top: r, | |
bottom: h, | |
left: a, | |
right: u, | |
width: l, | |
height: f | |
}))) break; | |
d = c(d) | |
} | |
return p | |
} | |
}, | |
i.prototype._getRootRect = function () { | |
var e; | |
if (this.root) e = s(this.root); | |
else { | |
var n = t.documentElement, | |
i = t.body; | |
e = { | |
top: 0, | |
left: 0, | |
right: n.clientWidth || i.clientWidth, | |
width: n.clientWidth || i.clientWidth, | |
bottom: n.clientHeight || i.clientHeight, | |
height: n.clientHeight || i.clientHeight | |
} | |
} | |
return this._expandRectByRootMargin(e) | |
}, | |
i.prototype._expandRectByRootMargin = function (t) { | |
var e = this._rootMarginValues.map((function (e, n) { | |
return 'px' == e.unit ? e.value : e.value * (n % 2 ? t.width : t.height) / 100 | |
})), | |
n = { | |
top: t.top - e[0], | |
right: t.right + e[1], | |
bottom: t.bottom + e[2], | |
left: t.left - e[3] | |
}; | |
return n.width = n.right - n.left, | |
n.height = n.bottom - n.top, | |
n | |
}, | |
i.prototype._hasCrossedThreshold = function (t, e) { | |
var n = t && t.isIntersecting ? t.intersectionRatio || 0 : - 1, | |
i = e.isIntersecting ? e.intersectionRatio || 0 : - 1; | |
if (n !== i) for (var o = 0; o < this.thresholds.length; o++) { | |
var r = this.thresholds[o]; | |
if (r == n || r == i || r < n != r < i) return !0 | |
} | |
}, | |
i.prototype._rootIsInDom = function () { | |
return !this.root || h(t, this.root) | |
}, | |
i.prototype._rootContainsTarget = function (e) { | |
return h(this.root || t, e) | |
}, | |
i.prototype._registerInstance = function () { | |
e.indexOf(this) < 0 && e.push(this) | |
}, | |
i.prototype._unregisterInstance = function () { | |
var t = e.indexOf(this); | |
- 1 != t && e.splice(t, 1) | |
}, | |
window.IntersectionObserver = i, | |
window.IntersectionObserverEntry = n | |
} | |
function n(t) { | |
this.time = t.time, | |
this.target = t.target, | |
this.rootBounds = t.rootBounds, | |
this.boundingClientRect = t.boundingClientRect, | |
this.intersectionRect = t.intersectionRect || { | |
top: 0, | |
bottom: 0, | |
left: 0, | |
right: 0, | |
width: 0, | |
height: 0 | |
}, | |
this.isIntersecting = !!t.intersectionRect; | |
var e = this.boundingClientRect, | |
n = e.width * e.height, | |
i = this.intersectionRect, | |
o = i.width * i.height; | |
this.intersectionRatio = n ? Number((o / n).toFixed(4)) : this.isIntersecting ? 1 : 0 | |
} | |
function i(t, e) { | |
var n, | |
i, | |
o, | |
r = e || { | |
}; | |
if ('function' != typeof t) throw new Error('callback must be a function'); | |
if (r.root && 1 != r.root.nodeType) throw new Error('root must be an Element'); | |
this._checkForIntersections = (n = this._checkForIntersections.bind(this), i = this.THROTTLE_TIMEOUT, o = null, function () { | |
o || (o = setTimeout((function () { | |
n(), | |
o = null | |
}), i)) | |
}), | |
this._callback = t, | |
this._observationTargets = [ | |
], | |
this._queuedEntries = [ | |
], | |
this._rootMarginValues = this._parseRootMargin(r.rootMargin), | |
this.thresholds = this._initThresholds(r.threshold), | |
this.root = r.root || null, | |
this.rootMargin = this._rootMarginValues.map((function (t) { | |
return t.value + t.unit | |
})).join(' ') | |
} | |
function o(t, e, n, i) { | |
'function' == typeof t.addEventListener ? t.addEventListener(e, n, i || !1) : 'function' == typeof t.attachEvent && t.attachEvent('on' + e, n) | |
} | |
function r(t, e, n, i) { | |
'function' == typeof t.removeEventListener ? t.removeEventListener(e, n, i || !1) : 'function' == typeof t.detatchEvent && t.detatchEvent('on' + e, n) | |
} | |
function s(t) { | |
var e; | |
try { | |
e = t.getBoundingClientRect() | |
} catch (t) { | |
} | |
return e ? (e.width && e.height || (e = { | |
top: e.top, | |
right: e.right, | |
bottom: e.bottom, | |
left: e.left, | |
width: e.right - e.left, | |
height: e.bottom - e.top | |
}), e) : { | |
top: 0, | |
bottom: 0, | |
left: 0, | |
right: 0, | |
width: 0, | |
height: 0 | |
} | |
} | |
function h(t, e) { | |
for (var n = e; n; ) { | |
if (n == t) return !0; | |
n = c(n) | |
} | |
return !1 | |
} | |
function c(t) { | |
var e = t.parentNode; | |
return e && 11 == e.nodeType && e.host ? e.host : e && e.assignedSlot ? e.assignedSlot.parentNode : e | |
} | |
}() | |
}, | |
{ | |
} | |
] | |
}, { | |
}, [ | |
1 | |
]); | |
; | |
!function () { | |
'use strict'; | |
function o() { | |
var o = window, | |
t = document; | |
if (!('scrollBehavior' in t.documentElement.style && !0 !== o.__forceSmoothScrollPolyfill__)) { | |
var l, | |
e = o.HTMLElement || o.Element, | |
r = 468, | |
i = { | |
scroll: o.scroll || o.scrollTo, | |
scrollBy: o.scrollBy, | |
elementScroll: e.prototype.scroll || n, | |
scrollIntoView: e.prototype.scrollIntoView | |
}, | |
s = o.performance && o.performance.now ? o.performance.now.bind(o.performance) : Date.now, | |
c = (l = o.navigator.userAgent, new RegExp(['MSIE ', | |
'Trident/', | |
'Edge/'].join('|')).test(l) ? 1 : 0); | |
o.scroll = o.scrollTo = function () { | |
void 0 !== arguments[0] && (!0 !== f(arguments[0]) ? h.call(o, t.body, void 0 !== arguments[0].left ? ~~arguments[0].left : o.scrollX || o.pageXOffset, void 0 !== arguments[0].top ? ~~arguments[0].top : o.scrollY || o.pageYOffset) : i.scroll.call(o, void 0 !== arguments[0].left ? arguments[0].left : 'object' != typeof arguments[0] ? arguments[0] : o.scrollX || o.pageXOffset, void 0 !== arguments[0].top ? arguments[0].top : void 0 !== arguments[1] ? arguments[1] : o.scrollY || o.pageYOffset)) | |
}, | |
o.scrollBy = function () { | |
void 0 !== arguments[0] && (f(arguments[0]) ? i.scrollBy.call(o, void 0 !== arguments[0].left ? arguments[0].left : 'object' != typeof arguments[0] ? arguments[0] : 0, void 0 !== arguments[0].top ? arguments[0].top : void 0 !== arguments[1] ? arguments[1] : 0) : h.call(o, t.body, ~~arguments[0].left + (o.scrollX || o.pageXOffset), ~~arguments[0].top + (o.scrollY || o.pageYOffset))) | |
}, | |
e.prototype.scroll = e.prototype.scrollTo = function () { | |
if (void 0 !== arguments[0]) if (!0 !== f(arguments[0])) { | |
var o = arguments[0].left, | |
t = arguments[0].top; | |
h.call(this, this, void 0 === o ? this.scrollLeft : ~~o, void 0 === t ? this.scrollTop : ~~t) | |
} else { | |
if ('number' == typeof arguments[0] && void 0 === arguments[1]) throw new SyntaxError('Value could not be converted'); | |
i.elementScroll.call(this, void 0 !== arguments[0].left ? ~~arguments[0].left : 'object' != typeof arguments[0] ? ~~arguments[0] : this.scrollLeft, void 0 !== arguments[0].top ? ~~arguments[0].top : void 0 !== arguments[1] ? ~~arguments[1] : this.scrollTop) | |
} | |
}, | |
e.prototype.scrollBy = function () { | |
void 0 !== arguments[0] && (!0 !== f(arguments[0]) ? this.scroll({ | |
left: ~~arguments[0].left + this.scrollLeft, | |
top: ~~arguments[0].top + this.scrollTop, | |
behavior: arguments[0].behavior | |
}) : i.elementScroll.call(this, void 0 !== arguments[0].left ? ~~arguments[0].left + this.scrollLeft : ~~arguments[0] + this.scrollLeft, void 0 !== arguments[0].top ? ~~arguments[0].top + this.scrollTop : ~~arguments[1] + this.scrollTop)) | |
}, | |
e.prototype.scrollIntoView = function () { | |
if (!0 !== f(arguments[0])) { | |
var l = function (o) { | |
for (; o !== t.body && !1 === (e = p(l = o, 'Y') && a(l, 'Y'), r = p(l, 'X') && a(l, 'X'), e || r); ) o = o.parentNode || o.host; | |
var l, | |
e, | |
r; | |
return o | |
}(this), | |
e = l.getBoundingClientRect(), | |
r = this.getBoundingClientRect(); | |
l !== t.body ? (h.call(this, l, l.scrollLeft + r.left - e.left, l.scrollTop + r.top - e.top), 'fixed' !== o.getComputedStyle(l).position && o.scrollBy({ | |
left: e.left, | |
top: e.top, | |
behavior: 'smooth' | |
})) : o.scrollBy({ | |
left: r.left, | |
top: r.top, | |
behavior: 'smooth' | |
}) | |
} else i.scrollIntoView.call(this, void 0 === arguments[0] || arguments[0]) | |
} | |
} | |
function n(o, t) { | |
this.scrollLeft = o, | |
this.scrollTop = t | |
} | |
function f(o) { | |
if (null === o || 'object' != typeof o || void 0 === o.behavior || 'auto' === o.behavior || 'instant' === o.behavior) return !0; | |
if ('object' == typeof o && 'smooth' === o.behavior) return !1; | |
throw new TypeError('behavior member of ScrollOptions ' + o.behavior + ' is not a valid value for enumeration ScrollBehavior.') | |
} | |
function p(o, t) { | |
return 'Y' === t ? o.clientHeight + c < o.scrollHeight : 'X' === t ? o.clientWidth + c < o.scrollWidth : void 0 | |
} | |
function a(t, l) { | |
var e = o.getComputedStyle(t, null) ['overflow' + l]; | |
return 'auto' === e || 'scroll' === e | |
} | |
function d(t) { | |
var l, | |
e, | |
i, | |
c, | |
n = (s() - t.startTime) / r; | |
c = n = n > 1 ? 1 : n, | |
l = 0.5 * (1 - Math.cos(Math.PI * c)), | |
e = t.startX + (t.x - t.startX) * l, | |
i = t.startY + (t.y - t.startY) * l, | |
t.method.call(t.scrollable, e, i), | |
e === t.x && i === t.y || o.requestAnimationFrame(d.bind(o, t)) | |
} | |
function h(l, e, r) { | |
var c, | |
f, | |
p, | |
a, | |
h = s(); | |
l === t.body ? (c = o, f = o.scrollX || o.pageXOffset, p = o.scrollY || o.pageYOffset, a = i.scroll) : (c = l, f = l.scrollLeft, p = l.scrollTop, a = n), | |
d({ | |
scrollable: c, | |
method: a, | |
startTime: h, | |
startX: f, | |
startY: p, | |
x: e, | |
y: r | |
}) | |
} | |
} | |
'object' == typeof exports && 'undefined' != typeof module ? module.exports = { | |
polyfill: o | |
} | |
: o() | |
}(); | |
; | |
!function e(t, n, r) { | |
function i(a, o) { | |
if (!n[a]) { | |
if (!t[a]) { | |
var l = 'function' == typeof require && require; | |
if (!o && l) return l(a, !0); | |
if (s) return s(a, !0); | |
var u = new Error('Cannot find module \'' + a + '\''); | |
throw u.code = 'MODULE_NOT_FOUND', | |
u | |
} | |
var c = n[a] = { | |
exports: { | |
} | |
}; | |
t[a][0].call(c.exports, (function (e) { | |
return i(t[a][1][e] || e) | |
}), c, c.exports, e, t, n, r) | |
} | |
return n[a].exports | |
} | |
for (var s = 'function' == typeof require && require, a = 0; a < r.length; a++) i(r[a]); | |
return i | |
}({ | |
1: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('components/Components')), | |
a = r(e('components/FormEventTracker/FormEventTracker')), | |
o = window.jQuery, | |
l = window.drupalSettings.formData, | |
u = function e() { | |
(0, i.default) (this, e), | |
this.components = s.default.buildComponents(), | |
l && o.each(l, (function (e, t) { | |
!0 === t.trackForm && new a.default(t) | |
})) | |
}; | |
n.default = u | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'components/Components': 9, | |
'components/FormEventTracker/FormEventTracker': 18 | |
} | |
], | |
2: [ | |
function (e, t, n) { | |
t.exports = '<div class="activeFilters-item">\n <button type="button" class="removeTag">\n <span class="removeTag-label"></span>\n <span class="removeTag-icon">Remove Tag</span>\n </button>\n</div>\n' | |
}, | |
{ | |
} | |
], | |
3: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('../../services/EventBus')), | |
o = window.jQuery, | |
l = e('./ActiveFilters-Filter.template.html'), | |
u = o(l), | |
c = function () { | |
function e(t, n) { | |
(0, i.default) (this, e), | |
this._element = t, | |
this._$element = o(t), | |
this._filters = { | |
}, | |
this._onFilterClick = this._filterClickHandler.bind(this), | |
this._$element.on('click', '.activeFilters-item', this._onFilterClick), | |
this.eventRemoveKey = n | |
} | |
return (0, s.default) (e, [ | |
{ | |
key: 'getElement', | |
value: function () { | |
return this._element | |
} | |
}, | |
{ | |
key: 'getFilters', | |
value: function () { | |
var e = this; | |
return Object.keys(this._filters).filter((function (t) { | |
return e._filters[t].isActive | |
})).map((function (t) { | |
return e._filters[t] | |
})) | |
} | |
}, | |
{ | |
key: 'add', | |
value: function (e, t) { | |
var n = this._filters[e]; | |
if (void 0 === n) { | |
var r = u.clone(); | |
r.data('id', e), | |
r.find('.removeTag-label').text(t), | |
this._filters[e] = { | |
id: e, | |
isActive: !0, | |
label: t, | |
$element: r | |
}, | |
this._$element.append(r) | |
} else !n.label === t && (n.label = t), | |
n.isActive || (n.isActive = !0, this._$element.append(n.$element)) | |
} | |
}, | |
{ | |
key: 'set', | |
value: function (e) { | |
var t = this; | |
Object.keys(e).forEach((function (n) { | |
var r = e[n], | |
i = r.id, | |
s = r.label; | |
t.add(i, s) | |
})) | |
} | |
}, | |
{ | |
key: 'reset', | |
value: function () { | |
var e = this; | |
return Object.keys(this._filters).forEach((function (t) { | |
e._filters[t].$element.detach() | |
})), | |
this._filters = { | |
}, | |
this._filters | |
} | |
}, | |
{ | |
key: 'remove', | |
value: function (e) { | |
var t = this._filters[e]; | |
void 0 !== t && t.isActive && (t.isActive = !1, t.$element.detach(), a.default.broadcast(this.eventRemoveKey, t)) | |
} | |
}, | |
{ | |
key: '_filterClickHandler', | |
value: function (e) { | |
e.preventDefault(); | |
var t = o(e.currentTarget).closest('.js-activeFilterRemovalFocus') [0]; | |
this.remove(o(e.currentTarget).data('id')), | |
o(t).focus() | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
var e = o(this._element[0]).closest('.js-activeFilterRemovalFocus') [0]; | |
this._element[0].parentNode.removeChild(this._element[0]), | |
o(e).focus() | |
} | |
} | |
]), | |
e | |
}(); | |
n.default = c | |
}, | |
{ | |
'../../services/EventBus': 50, | |
'./ActiveFilters-Filter.template.html': 2, | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/interopRequireDefault': 73 | |
} | |
], | |
4: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/toConsumableArray')), | |
s = r(e('@babel/runtime/regenerator')), | |
a = r(e('@babel/runtime/helpers/asyncToGenerator')), | |
o = r(e('@babel/runtime/helpers/classCallCheck')), | |
l = r(e('@babel/runtime/helpers/createClass')), | |
u = r(e('@babel/runtime/helpers/assertThisInitialized')), | |
c = r(e('@babel/runtime/helpers/inherits')), | |
h = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
d = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
f = r(e('@babel/runtime/helpers/defineProperty')), | |
p = r(e('components/Modal/Modal')), | |
v = r(e('services/AjaxService/ArticleAjaxService')), | |
m = r(e('services/SearchParamService/SearchParamService')), | |
g = r(e('services/EventBus')), | |
y = e('./ArticleOverlayModalTemplate'), | |
b = r(e('../SocialShare/SocialShare')); | |
function C(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, d.default) (e); | |
if (t) { | |
var i = (0, d.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, h.default) (this, n) | |
} | |
} | |
var k = window.jQuery, | |
Drupal = window.Drupal, | |
S = 'js-kraken-articleOverlay_trigger', | |
w = 'hasOpenArticleModal', | |
E = { | |
ARTICLE_OVERLAY: '#articleOverlay', | |
BODY: 'body', | |
MODAL_CLOSE: '.js-kraken-modal-close', | |
MODAL_SNEEZEGUARD: '.modal-sneezeguard', | |
MODAL_TRIGGER: '.'.concat(S), | |
MODAL_CARD: '.js-kraken-articleOverlay_card', | |
MODAL_CARD_ANCHOR: '.js-kraken-articleOverlay_media a', | |
CONTENT: '.js-kraken-modal-content', | |
EMAIL_LINK: '.js-article-overlay-email', | |
DISMISS_COPY: '.js-kraken-modal-dismiss-text', | |
TWITTER_BTN: '.js-article-overlay-twitter', | |
FACEBOOK_BTN: '.js-article-overlay-facebook', | |
SOCIAL_SHARE_BTN: '.socialBtn' | |
}, | |
T = { | |
DISMISS: Drupal.t('Dismiss Modal Window') | |
}, | |
L = function (e) { | |
(0, c.default) (r, e); | |
var t, | |
n = C(r); | |
function r(e) { | |
var t; | |
return (0, o.default) (this, r), | |
t = n.call(this, e), | |
(0, f.default) ((0, u.default) (t), 'PARAMS', { | |
ARTICLE: 'article', | |
NID: 'nid' | |
}), | |
t.init(), | |
e ? (t.element = e, t.body, t.modal = null, t.modalClose = null, t.sneezeguard = null, t.shouldPushToHistory = !0, t.isEnabled = !1, t.service = v.default, t.articleListing = [ | |
], t.trigger = null, t.content = null, t.overlayCard = null, t.currentArticleId = null, t.currentArticle = { | |
}, t.emailLink = null, t.twitterBtn = null, t.facebookBtn = null, t.dismissCopy = null, t.shouldTrackPageview = !0, t.shareFriendlyUrl = '', t.socialShareBtn = null, t.socialShareInstance = function () { | |
return new b.default(t.socialShareBtn) | |
}, t.currentArticleParams = [ | |
{ | |
param: null, | |
value: null | |
}, | |
{ | |
param: null, | |
value: null | |
} | |
], t.articleSetupHandlers().articleCreateChildren().articleEnable(), t) : (0, h.default) (t) | |
} | |
return (0, l.default) (r, [ | |
{ | |
key: 'articleSetupHandlers', | |
value: function () { | |
return this.onPopstateHandler = this.onPopstate.bind(this), | |
this.onLoadHandler = this.onLoad.bind(this), | |
this.onPaginationChangeHandler = this.onPaginateUpdate.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'articleCreateChildren', | |
value: function () { | |
return this.body = document.querySelector('body'), | |
this | |
} | |
}, | |
{ | |
key: 'articleEnable', | |
value: function () { | |
return this.isEnabled || (window.addEventListener('load', this.onLoadHandler), window.addEventListener('popstate', this.onPopstateHandler), g.default.on('paginationClick', this.onPaginationChangeHandler), this.isEnabled = !0), | |
this | |
} | |
}, | |
{ | |
key: 'onLoad', | |
value: function () { | |
if (this.currentArticleId = this.getArticleParams(this.PARAMS.NID), this.shouldTrackPageview = this.isInternalReferrer(), this.overlayCard) for (var e = 0; e < this.overlayCard.length; ++e) { | |
var t = this.overlayCard[e].querySelector(E.MODAL_CARD_ANCHOR), | |
n = this.overlayCard[e].querySelectorAll(E.MODAL_TRIGGER), | |
r = n[n.length - 1].dataset.articleNid; | |
t && t.setAttribute('data-article-nid', r) | |
} | |
this.currentArticleId && this.showModal(this.modal) | |
} | |
}, | |
{ | |
key: 'onPopstate', | |
value: function () { | |
this.shouldPushToHistory = !1, | |
this.currentArticleId = this.getArticleParams(this.PARAMS.NID), | |
this.currentArticleId ? this.showModal(this.modal) : !this.currentArticleId && this.modalIsActive && this.hideModal(this.modal) | |
} | |
}, | |
{ | |
key: 'onTriggerClick', | |
value: function (e) { | |
var t = e.target; | |
if (t.classList.contains(S)) { | |
e.preventDefault(), | |
e.stopPropagation(), | |
this.shouldPushToHistory = !0; | |
var n = e.currentTarget; | |
this.currentArticleId = t.dataset.articleNid, | |
this.modal && (null == this.returnFocus && (this.returnFocus = n), n.blur(), this.showModal(this.modal)) | |
} | |
} | |
}, | |
{ | |
key: 'onCloseClick', | |
value: function (e) { | |
var t = e.currentTarget; | |
this.shouldPushToHistory = !0, | |
this.modal && (e.preventDefault(), t.blur(), this.hideModal(this.modal)) | |
} | |
}, | |
{ | |
key: 'onSneezeguardClick', | |
value: function (e) { | |
this.modalIsActive && (this.shouldPushToHistory = !0, this.hideModal(this.modal)) | |
} | |
}, | |
{ | |
key: 'onPaginateUpdate', | |
value: function (e) { | |
this.currentArticleId = e, | |
this.showModal(this.modal) | |
} | |
}, | |
{ | |
key: 'loadModal', | |
value: function () { | |
document.querySelector(E.BODY).insertAdjacentHTML('beforeend', (0, y.articleModal) ()), | |
this.modalIsLoaded = !0 | |
} | |
}, | |
{ | |
key: 'showModal', | |
value: (t = (0, a.default) (s.default.mark((function e(t) { | |
var n; | |
return s.default.wrap((function (e) { | |
for (; ; ) switch (e.prev = e.next) { | |
case 0: | |
return e.next = 2, | |
this.fetchArticleListing(this.currentArticleId); | |
case 2: | |
this.currentArticle = e.sent, | |
this.updateArticleParams(), | |
this.shouldPushToHistory && (n = this.setArticleParams(this.currentArticleParams), this.pushHistoryState({ | |
}, '', n)), | |
this.body.classList.add(w), | |
this.renderArticleContent(), | |
this.modalIsActive = !0, | |
this.toggleModal(t), | |
this.swapEmailLink(), | |
this.updateSharingLinks(), | |
this.shouldTrackPageview && this.trackPageView(), | |
this.modalBroadcast(); | |
case 13: | |
case 'end': | |
return e.stop() | |
} | |
}), e, this) | |
}))), function (e) { | |
return t.apply(this, arguments) | |
}) | |
}, | |
{ | |
key: 'swapEmailLink', | |
value: function () { | |
this.emailLink = this.modal.querySelector(E.EMAIL_LINK); | |
var e = this.emailLink.getAttribute('href'), | |
t = this.getShareFriendlyUrl(e); | |
this.emailLink.setAttribute('href', t) | |
} | |
}, | |
{ | |
key: 'swapSocialUrls', | |
value: function () { | |
this.twitterBtn = this.modal.querySelector(E.TWITTER_BTN), | |
this.facebookBtn = this.modal.querySelector(E.FACEBOOK_BTN), | |
this.setSocialSharingUrl(this.twitterBtn), | |
this.setSocialSharingUrl(this.facebookBtn) | |
} | |
}, | |
{ | |
key: 'setSocialSharingUrl', | |
value: function (e) { | |
var t = e, | |
n = t.dataset.href, | |
r = this.getShareFriendlyUrl(n); | |
t.dataset.href = r | |
} | |
}, | |
{ | |
key: 'updateSharingLinks', | |
value: function () { | |
this.swapEmailLink(), | |
this.swapSocialUrls(), | |
window.fbAsyncInit(), | |
this.socialShareBtn = this.modal.querySelector('.socialBtn'), | |
this.socialShareInstance() | |
} | |
}, | |
{ | |
key: 'getShareFriendlyUrl', | |
value: function (e) { | |
var t = e, | |
n = window.location.protocol, | |
r = window.location.toString(), | |
i = t.split(n).pop(), | |
s = r.split(n).pop().replace('&', '%26'); | |
return t.replace(i, s) | |
} | |
}, | |
{ | |
key: 'hideModal', | |
value: function (e) { | |
if (this.shouldPushToHistory) { | |
var t = this.deleteArticleParams(); | |
this.pushHistoryState({ | |
}, '', t) | |
} | |
this.body.classList.remove(w), | |
this.currentArticleId = null, | |
this.modalIsActive = !1, | |
this.toggleModal(e), | |
this.trackPageView(), | |
this.modalBroadcast() | |
} | |
}, | |
{ | |
key: 'trackPageView', | |
value: function () { | |
window.purinaTrackPageview && window.purinaTrackPageview() | |
} | |
}, | |
{ | |
key: 'fetchArticleListing', | |
value: function (e) { | |
return this.service.do(e).then((function (e) { | |
return e | |
})) | |
} | |
}, | |
{ | |
key: 'updateArticleParams', | |
value: function () { | |
this.currentArticleParams = [ | |
{ | |
param: this.PARAMS.ARTICLE, | |
value: this.currentArticle.meta.url | |
}, | |
{ | |
param: this.PARAMS.NID, | |
value: this.currentArticleId | |
} | |
] | |
} | |
}, | |
{ | |
key: 'renderArticleContent', | |
value: function () { | |
this.content.innerHTML = this.currentArticle.html, | |
this.dismissCopy.innerText = T.DISMISS | |
} | |
}, | |
{ | |
key: 'isInternalReferrer', | |
value: function () { | |
var e = 0 === document.referrer.indexOf(''.concat(window.location.protocol, '\'//\'').concat(window.location.host)); | |
return e | |
} | |
}, | |
{ | |
key: 'getArticleParams', | |
value: function () { | |
return m.default.getUrlParams(this.PARAMS.NID) | |
} | |
}, | |
{ | |
key: 'setArticleParams', | |
value: function (e) { | |
return m.default.setUrlParams((0, i.default) (e)) | |
} | |
}, | |
{ | |
key: 'deleteArticleParams', | |
value: function () { | |
return m.default.deleteUrlParams([this.PARAMS.ARTICLE, | |
this.PARAMS.NID]) | |
} | |
}, | |
{ | |
key: 'pushHistoryState', | |
value: function (e, t, n) { | |
window.history.pushState(e, t, '?'.concat(n)) | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this | |
} | |
}, | |
{ | |
key: 'bindTriggers', | |
value: function () { | |
this.loadModal(), | |
this.modal = document.querySelector(E.ARTICLE_OVERLAY), | |
this.modalClose = this.modal.querySelector(E.MODAL_CLOSE), | |
this.sneezeguard = this.modal.querySelector(E.MODAL_SNEEZEGUARD), | |
this.trigger = this.element.querySelector(E.MODAL_TRIGGER), | |
this.content = this.modal.querySelector(E.CONTENT), | |
this.dismissCopy = this.modal.querySelector(E.DISMISS_COPY), | |
this.overlayCard = this.element.querySelectorAll(E.MODAL_CARD), | |
this._setModalTarget(E.ARTICLE_OVERLAY) | |
} | |
} | |
]), | |
r | |
}(p.default); | |
Drupal.behaviors.articleOverlay = { | |
attach: function (e, t) { | |
var n = k('.js-article-overview', e).once('articleOverlay_init'); | |
if (n.length) { | |
var r = k(E.MODAL_TRIGGER, e).once('bindTriggers'), | |
i = new L(n[0], t); | |
window.krakenInstances = window.krakenInstances ? window.krakenInstances : { | |
}, | |
window.krakenInstances.articleOverlay = { | |
instance: i, | |
element: n | |
}, | |
r.length && i.bindTriggers() | |
} | |
} | |
}; | |
var x = L; | |
n.default = x | |
}, | |
{ | |
'../SocialShare/SocialShare': 29, | |
'./ArticleOverlayModalTemplate': 5, | |
'@babel/runtime/helpers/assertThisInitialized': 66, | |
'@babel/runtime/helpers/asyncToGenerator': 67, | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/defineProperty': 70, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'@babel/runtime/helpers/toConsumableArray': 81, | |
'@babel/runtime/regenerator': 85, | |
'components/Modal/Modal': 23, | |
'services/AjaxService/ArticleAjaxService': 47, | |
'services/EventBus': 50, | |
'services/SearchParamService/SearchParamService': 52 | |
} | |
], | |
5: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.articleModal = void 0; | |
n.articleModal = function () { | |
return '\n <div id="articleOverlay"\n class="modal"\n tabindex="0">\n <div class="modal-sneezeguard"></div>\n <div class="modal-container">\n <button type="button" class="modal-container-dismiss js-kraken-modal-close">\n <span class="isVisuallyHidden js-kraken-modal-dismiss-text"></span>\n </button>\n <div class="js-kraken-modal-title modal-container-bd modal-container-bd_flushTop js-kraken-modal-content"></div>\n </div>\n </div>\n ' | |
} | |
}, | |
{ | |
} | |
], | |
6: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/ComponentBase')), | |
c = r(e('services/WindowListener/WindowListener')); | |
function h(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var d = '.js-video-src', | |
f = '.js-video-ctrl', | |
p = '.js-video-ctrl-play', | |
v = '.js-video-ctrl-pause', | |
m = 'isHidden', | |
g = 'SMALL', | |
y = function (e) { | |
(0, a.default) (n, e); | |
var t = h(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this), | |
e ? (r.element = e, r.isPlaying = null, r.currentBreakpoint = c.default.currentBreakpoint, r.init(), r) : (0, o.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
if (this.createChildren(), this.video) return this.setUpHandlers(), | |
this.bindEvents(), | |
this | |
} | |
}, | |
{ | |
key: 'createChildren', | |
value: function () { | |
return this.video = this.element.querySelector(d), | |
this.controller = this.element.querySelector(f), | |
this.play = this.element.querySelector(p), | |
this.pause = this.element.querySelector(v), | |
this.defaultValues(), | |
this | |
} | |
}, | |
{ | |
key: 'defaultValues', | |
value: function () { | |
return this.play.classList.add(m), | |
this.currentBreakpoint === g ? (this.isPlaying = !1, this.pauseVideo(), this.toggleActive(), this) : (this.isPlaying = !0, this) | |
} | |
}, | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.onControlClickHandler = this.onControlClick.bind(this), | |
this.onBreakpointChangeHandler = this.onBreakpointChange.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'onBreakpointChange', | |
value: function (e) { | |
this.currentBreakpoint = e, | |
this.currentBreakpoint === g && (this.pauseVideo(), this.toggleActive()) | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return this.controller.addEventListener('click', this.onControlClickHandler), | |
c.default.on('currentBreakpoint', this.onBreakpointChangeHandler), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.controller.removeEventListener('click', this.onControlClickHandler), | |
c.default.off('currentBreakpoint', this.onBreakpointChangeHandler), | |
this.video = null, | |
this.controller = null, | |
this.play = null, | |
this.pause = null, | |
this.element = null, | |
this | |
} | |
}, | |
{ | |
key: 'onControlClick', | |
value: function () { | |
return !0 === this.isPlaying ? (this.pauseVideo(), this.toggleActive(), this) : (this.playVideo(), this.toggleActive(), this) | |
} | |
}, | |
{ | |
key: 'toggleActive', | |
value: function () { | |
return !0 === this.isPlaying ? (this.play.classList.add(m), this.pause.classList.remove(m), this) : (this.play.classList.remove(m), this.pause.classList.add(m), this) | |
} | |
}, | |
{ | |
key: 'playVideo', | |
value: function () { | |
return this.video.play(), | |
this.isPlaying = !0, | |
this | |
} | |
}, | |
{ | |
key: 'pauseVideo', | |
value: function () { | |
return this.video.pause(), | |
this.isPlaying = !1, | |
this | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = y | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'services/WindowListener/WindowListener': 56 | |
} | |
], | |
7: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('utils/strToBool')), | |
c = r(e('components/ComponentBase')), | |
h = r(e('services/GoogleTagManagerService')); | |
function d(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var f = 'isHidden', | |
p = '.js-kraken-carousel_progression', | |
v = '.js-kraken-carousel_currentStepProgression', | |
m = '.js-kraken-carousel_currentSlideProgression', | |
g = '.js-kraken-carousel_thumbnail-link', | |
y = '.js-kraken-carousel_btn-next', | |
b = '.js-kraken-carousel_btn-prev', | |
C = '.theDeciderCarouselBtn-txt', | |
k = '.js-kraken-carousel_innerSlides', | |
S = '.js-kraken-carousel_slide', | |
w = function (e) { | |
(0, a.default) (n, e); | |
var t = d(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this), | |
e ? (r.element = e, r.currentSlide = 0, r.dragStart = - 1, r.options = r.element.dataset, r.props = r.setProps({ | |
showNavigation: (0, u.default) (r.options.showNavigation), | |
showPagination: (0, u.default) (r.options.showPagination), | |
useThumbnails: (0, u.default) (r.options.useThumbnails), | |
invert: (0, u.default) (r.options.invert), | |
autoplay: (0, u.default) (r.options.autoplay), | |
pauseOnMouseover: (0, u.default) (r.options.pauseOnMouseover), | |
timeOnSlide: r.options.timeOnSlide, | |
loop: (0, u.default) (r.options.loop), | |
activeClass: r.options.activeClass, | |
swipeDistance: r.options.swipeDistance, | |
trackImgInfo: r.options.trackImgInfo, | |
defaultTrackingCategory: r.options.trackingCategory, | |
defaultTrackingAction: r.options.trackingAction, | |
defaultEventDescription: r.options.eventDescription | |
}), r.carouselNextNav = r.element.querySelector(y), r.carouselPrevNav = r.element.querySelector(b), r.carouselNextNav && r.carouselPrevNav && (r.carouselNextNavText = r.carouselNextNav.querySelector(C), r.carouselPrevNavText = r.carouselPrevNav.querySelector(C)), r.carouselProgression = r.element.querySelector(p), r.carouselCurrentStepProgression = r.element.querySelector(v), r.carouselCurrentSlideProgression = r.element.querySelector(m), r.carouselProgression && (r.progressions = r.carouselProgression.querySelectorAll(g), r.progressions = Array.prototype.slice.call(r.progressions)), r.carouselInnerSlides = r.element.querySelector(k), r.slides = r.element.querySelectorAll(S), r.slides = Array.prototype.slice.call(r.slides), r.slideCount = r.slides.length, r.currentEventId = null, r.updateCurrentProgressionText(r.currentSlide), r.init(), r) : (0, o.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
0 !== this.slideCount && (this.displayNavigation = this.computeDisplayNavigation(), this.displayProgression = this.computeDisplayProgression(), this.setupHandlers(), this.bindEvents(), this.updateActiveState(), this._render()) | |
} | |
}, | |
{ | |
key: 'setupHandlers', | |
value: function () { | |
this.onPlayHandler = this.play.bind(this), | |
this.onPauseHandler = this.pause.bind(this), | |
this.onNextNavClickHandler = this.onNextNavClick.bind(this), | |
this.onPreviousNavClickHandler = this.onPreviousNavClick.bind(this), | |
this.onProgressionNavClickHandler = this.onProgressionNavClick.bind(this), | |
this.onTouchHandler = this.onTouch.bind(this), | |
this.onDragHandler = this.onDrag.bind(this), | |
this.onTouchEndHandler = this.onTouchEnd.bind(this) | |
} | |
}, | |
{ | |
key: '_render', | |
value: function () { | |
this.updateComputedProps(), | |
this.updateNav() | |
} | |
}, | |
{ | |
key: 'updateNav', | |
value: function () { | |
this.displayNavigation && (this.canMoveNext ? this.carouselNextNav.classList.remove(f) : this.carouselNextNav.classList.add(f), this.canMovePrevious ? this.carouselPrevNav.classList.remove(f) : this.carouselPrevNav.classList.add(f)) | |
} | |
}, | |
{ | |
key: 'setProps', | |
value: function () { | |
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { | |
}, | |
t = e.showNavigation, | |
n = void 0 === t || t, | |
r = e.showPagination, | |
i = void 0 === r || r, | |
s = e.useThumbnails, | |
a = void 0 !== s && s, | |
o = e.invert, | |
l = void 0 !== o && o, | |
u = e.autoplay, | |
c = void 0 !== u && u, | |
h = e.pauseOnMouseover, | |
d = void 0 === h || h, | |
f = e.timeOnSlide, | |
p = void 0 === f ? 5000 : f, | |
v = e.loop, | |
m = void 0 === v || v, | |
g = e.activeClass, | |
y = void 0 === g ? 'isActive' : g, | |
b = e.swipeDistance, | |
C = void 0 === b ? 20 : b, | |
k = e.trackImgInfo, | |
S = void 0 !== k && k, | |
w = e.defaultTrackingCategory, | |
E = void 0 === w ? 'product-details page' : w, | |
T = e.defaultTrackingAction, | |
L = void 0 === T ? 'product carousel' : T, | |
x = e.defaultEventDescription, | |
A = void 0 === x ? 'product carousel' : x; | |
return { | |
showNavigation: n, | |
showPagination: i, | |
useThumbnails: a, | |
invert: l, | |
autoplay: c, | |
pauseOnMouseover: d, | |
timeOnSlide: p, | |
loop: m, | |
activeClass: y, | |
swipeDistance: C, | |
trackImgInfo: S, | |
defaultTrackingCategory: E, | |
defaultTrackingAction: L, | |
defaultEventDescription: A | |
} | |
} | |
}, | |
{ | |
key: 'updateComputedProps', | |
value: function () { | |
this.canMoveNext = this.computeCanMoveNext(), | |
this.canMovePrevious = this.computeCanMovePrevious(), | |
this.offset = this.computeOffset() | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
if (this.displayNavigation && (this.carouselNextNav.addEventListener('click', this.onNextNavClickHandler), this.carouselPrevNav.addEventListener('click', this.onPreviousNavClickHandler)), this.displayProgression) for (var e = 0; e < this.progressions.length; e++) this.progressions[e].addEventListener('click', this.onProgressionNavClickHandler); | |
this.props.autoplay && this.props.pauseOnMouseover && this.slideCount > 1 && (this.element.addEventListener('mouseenter', this.onPauseHandler), this.element.addEventListener('mouseleave', this.onPlayHandler), this.play()), | |
'ontouchstart' in window && (this.element.addEventListener('touchstart', this.onTouchHandler), this.element.addEventListener('touchmove', this.onDragHandler), this.element.addEventListener('touchend', this.onTouchEndHandler)) | |
} | |
}, | |
{ | |
key: 'removeHandlers', | |
value: function () { | |
if (this.displayNavigation && (this.carouselNextNav.removeEventListener('click', this.onNextNavClickHandler), this.carouselPrevNav.removeEventListener('click', this.onPreviousNavClickHandler)), this.displayProgression) for (var e = 0; e < this.progressions.length; e++) this.progressions[e].removeEventListener('click', this.onProgressionNavClickHandler); | |
this.props.autoplay && this.props.pausOnMouseover && this.slideCount > 1 && (this.element.removeEventListener('mouseenter', this.onPauseHandler), this.element.removeEventListener('mouseleave', this.onPlayHandler)), | |
'ontouchstart' in window && (this.element.removeEventListener('touchstart', this.onTouchHandler), this.element.removeEventListener('touchmove', this.onDragHandler), this.element.removeEventListener('touchend', this.onTouchEndHandler)) | |
} | |
}, | |
{ | |
key: 'removeChildren', | |
value: function () { | |
this.carouselNextNav = null, | |
this.carouselPrevNav = null, | |
this.carouselNextNavText = null, | |
this.carouselPrevNavText = null, | |
this.carouselProgression = null, | |
this.progressions = null, | |
this.carouselInnerSlides = null, | |
this.slides = null | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.removeHandlers(), | |
this.removeChildren(), | |
this | |
} | |
}, | |
{ | |
key: 'computeCanMoveNext', | |
value: function () { | |
return this.props.loop || this.currentSlide < this.slideCount - 1 | |
} | |
}, | |
{ | |
key: 'computeCanMovePrevious', | |
value: function () { | |
return this.props.loop || this.currentSlide > 0 | |
} | |
}, | |
{ | |
key: 'computeDisplayNavigation', | |
value: function () { | |
return this.props.showNavigation && this.slideCount > 1 && this.carouselPrevNav && this.carouselNextNav | |
} | |
}, | |
{ | |
key: 'computeDisplayProgression', | |
value: function () { | |
return this.props.showPagination && this.slideCount > 1 && this.carouselProgression | |
} | |
}, | |
{ | |
key: 'computeOffset', | |
value: function () { | |
return - 100 * this.currentSlide | |
} | |
}, | |
{ | |
key: 'play', | |
value: function () { | |
var e = this; | |
this.autoplayTimer = setInterval((function () { | |
e.moveToSlide(e.currentSlide + 1), | |
e._render() | |
}), this.props.timeOnSlide) | |
} | |
}, | |
{ | |
key: 'pause', | |
value: function () { | |
this.autoplayTimer && clearInterval(this.autoplayTimer) | |
} | |
}, | |
{ | |
key: 'onNextNavClick', | |
value: function (e) { | |
this.currentEventId = e.currentTarget.dataset.eventId, | |
this.moveToSlide(this.currentSlide + 1), | |
this._render() | |
} | |
}, | |
{ | |
key: 'onPreviousNavClick', | |
value: function (e) { | |
this.currentEventId = e.currentTarget.dataset.eventId, | |
this.moveToSlide(this.currentSlide - 1), | |
this._render() | |
} | |
}, | |
{ | |
key: 'onProgressionNavClick', | |
value: function (e) { | |
e.preventDefault(), | |
this.currentEventId = e.currentTarget.dataset.eventId; | |
var t = Array.prototype.slice.call(this.progressions).indexOf(e.currentTarget); | |
this.moveToSlide(t), | |
this._render() | |
} | |
}, | |
{ | |
key: 'updateCurrentProgressionText', | |
value: function (e) { | |
if (this.carouselCurrentStepProgression) { | |
var t = ''.concat(Drupal.t('Step'), ' ').concat(e + 1, ' ').concat(Drupal.t('of'), ' ').concat(this.slideCount); | |
e + 1 === this.slideCount && (t = Drupal.t('Results')), | |
this.carouselCurrentStepProgression.innerHTML = t | |
} | |
this.carouselCurrentSlideProgression && (this.carouselCurrentSlideProgression.innerHTML = ''.concat(Drupal.t('Slide'), ' ').concat(e + 1, ' ').concat(Drupal.t('of'), ' ').concat(this.slideCount)) | |
} | |
}, | |
{ | |
key: 'moveToSlide', | |
value: function (e) { | |
if (this.updateCurrentProgressionText(e), e !== this.currentSlide) { | |
var t = !1; | |
e >= 0 && e < this.slideCount && (this.currentSlide = e, t = !0), | |
t || !this.props.loop && !this.props.autoplay || (e < 0 && (this.currentSlide = this.slideCount - 1, t = !0), e >= this.slideCount && (this.currentSlide = 0, t = !0)), | |
this.updateComputedProps(), | |
t && this.animate(), | |
this.updateNav(), | |
this.options.trackImgInfo && this.trackImgInfo(this.currentSlide) | |
} | |
} | |
}, | |
{ | |
key: 'animate', | |
value: function () { | |
this.updateActiveState(), | |
this.carouselCurrentSlideProgression && (this.carouselInnerSlides.style.transform = 'translateX('.concat(this.offset, '%)')) | |
} | |
}, | |
{ | |
key: 'updateActiveState', | |
value: function () { | |
var e = this; | |
this.slides.forEach((function (t, n) { | |
n === e.currentSlide ? (t.classList.add(e.props.activeClass), t.setAttribute('aria-hidden', !0)) : (t.classList.remove(e.props.activeClass), t.setAttribute('aria-hidden', !1)) | |
})), | |
this.displayProgression && this.progressions.forEach((function (t, n) { | |
n === e.currentSlide ? (t.classList.add(e.props.activeClass), t.setAttribute('aria-pressed', !0)) : (t.classList.remove(e.props.activeClass), t.setAttribute('aria-pressed', !1)) | |
})) | |
} | |
}, | |
{ | |
key: 'onTouch', | |
value: function (e) { | |
this.dragStart = e.touches[0].clientX | |
} | |
}, | |
{ | |
key: 'onDrag', | |
value: function (e) { | |
- 1 !== this.dragStart && (this.distance = this.dragStart - e.touches[0].clientX) | |
} | |
}, | |
{ | |
key: 'onTouchEnd', | |
value: function () { | |
return this.distance > this.props.swipeDistance ? (this.onNextNavClick(), this.dragStart = - 1, void (this.distance = 0)) : this.distance < - this.props.swipeDistance ? (this.onPreviousNavClick(), this.dragStart = - 1, void (this.distance = 0)) : void 0 | |
} | |
}, | |
{ | |
key: 'trackImgInfo', | |
value: function (e) { | |
var t = this.slides[e].querySelector('img').alt; | |
h.default.defaultDispatch(this.props.defaultTrackingCategory, this.props.defaultTrackingAction, ''.concat(e, ':').concat(t), this.currentEventId, this.props.defaultEventDescription) | |
} | |
} | |
]), | |
n | |
}(c.default); | |
n.default = w | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'services/GoogleTagManagerService': 51, | |
'utils/strToBool': 62 | |
} | |
], | |
8: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = window.jQuery, | |
o = function () { | |
function e() { | |
(0, i.default) (this, e) | |
} | |
return (0, s.default) (e, [ | |
{ | |
key: 'hasClass', | |
value: function (e, t) { | |
return e.classList.contains(t.replace('.', '')) | |
} | |
}, | |
{ | |
key: 'closest', | |
value: function (e, t) { | |
return a(e).closest(t).get(0) | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this | |
} | |
} | |
]), | |
e | |
}(); | |
n.default = o | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/interopRequireDefault': 73 | |
} | |
], | |
9: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('components/BackgroundVideo/BackgroundVideo')), | |
o = r(e('forms/FormValidate')), | |
l = r(e('components/MainNav/MainNav')), | |
u = r(e('components/Trackers/FacetLinkTracker')), | |
c = r(e('components/FilterList/FilterList')), | |
h = r(e('components/FilterList/Compare/FilterListCompareButton/FilterListCompareButton')), | |
d = r(e('components/FilterList/Compare/FilterListCompareModal/FilterListCompareModal')), | |
f = r(e('components/FilterList/Compare/FilterListCompareTray/FilterListCompareTray')), | |
p = r(e('components/Header/Header')), | |
v = r(e('components/Header/HeaderNavToggle')), | |
m = r(e('components/IngredientsModal/IngredientsModal')), | |
g = r(e('components/Modal/Modal')), | |
y = r(e('components/ReviewFeedback/ReviewFeedback')), | |
b = r(e('components/Trackers/SelectTracker')), | |
C = r(e('components/SearchList/SearchList')), | |
k = r(e('components/SearchList/SearchListInput')), | |
S = r(e('components/SocialShare/SocialShare')), | |
w = r(e('components/SortCtrl/SortCtrl')), | |
E = (r(e('components/TheDecider/TheDecider')), r(e('components/Toggle/Toggle'))), | |
T = r(e('components/ViewSwitch/ViewSwitch')), | |
L = r(e('components/ScrollLink/ScrollLink')), | |
x = r(e('components/Toggle/ToggleActivator')), | |
A = r(e('./ArticleOverlay/ArticleOverlay')); | |
window.instances = { | |
}; | |
var _ = window.jQuery, | |
R = [ | |
{ | |
name: p.default, | |
selector: '.js-kraken-header', | |
useContext: !0 | |
}, | |
{ | |
name: v.default, | |
selector: '.js-navToggle', | |
useContext: !0 | |
}, | |
{ | |
name: T.default, | |
selector: '.js-kraken-viewSwitch', | |
useContext: !0 | |
}, | |
{ | |
name: d.default, | |
selector: '.js-kraken-filterListCompare_modal', | |
useContext: !0 | |
}, | |
{ | |
name: h.default, | |
selector: '.js-kraken-filterListCompare_button', | |
useContext: !0 | |
}, | |
{ | |
name: f.default, | |
selector: '.js-kraken-filterListCompare_tray', | |
useContext: !0 | |
}, | |
{ | |
name: c.default, | |
selector: '[class*=\'js-view-\']', | |
useContext: !1 | |
}, | |
{ | |
name: u.default, | |
selector: '[data-facet-query]:not(.is-active)', | |
useContext: !0 | |
}, | |
{ | |
name: w.default, | |
selector: '.js-kraken-sortCtrl', | |
useContext: !0 | |
}, | |
{ | |
name: l.default, | |
selector: '.js-kraken-mainNav', | |
useContext: !0 | |
}, | |
{ | |
name: E.default, | |
selector: '.js-kraken-toggle', | |
useContext: !1 | |
}, | |
{ | |
name: E.default, | |
selector: '.js-kraken-filterToggle', | |
useContext: !0 | |
}, | |
{ | |
name: g.default, | |
selector: '.js-kraken-modal_trigger', | |
useContext: !0 | |
}, | |
{ | |
name: m.default, | |
selector: '.js-kraken-ingredientsModal_trigger', | |
useContext: !0 | |
}, | |
{ | |
name: y.default, | |
selector: '.reviewActions', | |
useContext: !0 | |
}, | |
{ | |
name: S.default, | |
selector: '.socialBtn', | |
useContext: !0 | |
}, | |
{ | |
name: o.default, | |
selector: 'form[data-track-form=true]', | |
useContext: !0 | |
}, | |
{ | |
name: a.default, | |
selector: '.js-video', | |
useContext: !0 | |
}, | |
{ | |
name: C.default, | |
selector: '.js-searchList-group', | |
useContext: !0 | |
}, | |
{ | |
name: k.default, | |
selector: '.js-searchList-input', | |
useContext: !0 | |
}, | |
{ | |
name: b.default, | |
selector: 'select[data-tracking-action]:not([data-should-track])', | |
useContext: !0 | |
}, | |
{ | |
name: L.default, | |
selector: '.js-kraken-scrollLink', | |
useContext: !0 | |
}, | |
{ | |
name: x.default, | |
selector: document, | |
useContext: !1 | |
}, | |
{ | |
name: A.default, | |
selector: '.js-article-overview', | |
useContext: !0 | |
} | |
], | |
D = function () { | |
function e() { | |
(0, i.default) (this, e) | |
} | |
return (0, s.default) (e, null, [ | |
{ | |
key: 'buildComponents', | |
value: function () { | |
window.krakenInstances = { | |
}, | |
R.forEach((function (e) { | |
Drupal.KrakenModal = g.default, | |
Drupal.behaviors[e.selector] = { | |
attach: function (t, n) { | |
var r; | |
r = 'string' == typeof e.selector || e.selector instanceof String ? e.selector : 'document-'.concat(e.name.name), | |
e.useContext ? _(e.selector, t).once(r).each((function (t, i) { | |
window.krakenInstances[r + t] = { | |
instance: new e.name(i, n), | |
element: i | |
}, | |
[ | |
g.default, | |
m.default | |
].includes(e.name) && window.krakenInstances[r + t].instance.init() | |
})) : _(e.selector).once(r).each((function (t, i) { | |
window.krakenInstances[r + t] = { | |
instance: new e.name(i, n), | |
element: i | |
} | |
})) | |
}, | |
detach: function (t, n) { | |
_(t).find(e.selector).each((function (e, t) { | |
var n = window.krakenInstances; | |
for (var r in n) if (n.hasOwnProperty(r)) { | |
var i = n[r]; | |
i.element === t && (i.instance.destroy(), delete window.krakenInstances[r]) | |
} | |
})) | |
} | |
} | |
})) | |
} | |
} | |
]), | |
e | |
}(); | |
n.default = D | |
}, | |
{ | |
'./ArticleOverlay/ArticleOverlay': 4, | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'components/BackgroundVideo/BackgroundVideo': 6, | |
'components/FilterList/Compare/FilterListCompareButton/FilterListCompareButton': 11, | |
'components/FilterList/Compare/FilterListCompareModal/FilterListCompareModal': 12, | |
'components/FilterList/Compare/FilterListCompareTray/FilterListCompareTray': 14, | |
'components/FilterList/FilterList': 17, | |
'components/Header/Header': 19, | |
'components/Header/HeaderNavToggle': 20, | |
'components/IngredientsModal/IngredientsModal': 21, | |
'components/MainNav/MainNav': 22, | |
'components/Modal/Modal': 23, | |
'components/ReviewFeedback/ReviewFeedback': 25, | |
'components/ScrollLink/ScrollLink': 26, | |
'components/SearchList/SearchList': 27, | |
'components/SearchList/SearchListInput': 28, | |
'components/SocialShare/SocialShare': 29, | |
'components/SortCtrl/SortCtrl': 30, | |
'components/TheDecider/TheDecider': 31, | |
'components/Toggle/Toggle': 37, | |
'components/Toggle/ToggleActivator': 38, | |
'components/Trackers/FacetLinkTracker': 39, | |
'components/Trackers/SelectTracker': 40, | |
'components/ViewSwitch/ViewSwitch': 41, | |
'forms/FormValidate': 44 | |
} | |
], | |
10: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')); | |
function a(e, t) { | |
var n; | |
if ('undefined' == typeof Symbol || null == e[Symbol.iterator]) { | |
if (Array.isArray(e) || (n = function (e, t) { | |
if (!e) return; | |
if ('string' == typeof e) return o(e, t); | |
var n = Object.prototype.toString.call(e).slice(8, - 1); | |
'Object' === n && e.constructor && (n = e.constructor.name); | |
if ('Map' === n || 'Set' === n) return Array.from(e); | |
if ('Arguments' === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return o(e, t) | |
}(e)) || t && e && 'number' == typeof e.length) { | |
n && (e = n); | |
var r = 0, | |
i = function () { | |
}; | |
return { | |
s: i, | |
n: function () { | |
return r >= e.length ? { | |
done: !0 | |
} | |
: { | |
done: !1, | |
value: e[r++] | |
} | |
}, | |
e: function (e) { | |
throw e | |
}, | |
f: i | |
} | |
} | |
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.') | |
} | |
var s, | |
a = !0, | |
l = !1; | |
return { | |
s: function () { | |
n = e[Symbol.iterator]() | |
}, | |
n: function () { | |
var e = n.next(); | |
return a = e.done, | |
e | |
}, | |
e: function (e) { | |
l = !0, | |
s = e | |
}, | |
f: function () { | |
try { | |
a || null == n.return || n.return() | |
} finally { | |
if (l) throw s | |
} | |
} | |
} | |
} | |
function o(e, t) { | |
(null == t || t > e.length) && (t = e.length); | |
for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; | |
return r | |
} | |
var l = function () { | |
function e() { | |
(0, i.default) (this, e), | |
this._events = { | |
} | |
} | |
return (0, s.default) (e, [ | |
{ | |
key: 'on', | |
value: function (e, t) { | |
this._events[e] = this._events[e] || [ | |
]; | |
var n = this._events[e]; | |
n.includes(t) || n.push(t) | |
} | |
}, | |
{ | |
key: 'off', | |
value: function (e, t) { | |
var n = this._events[e] || [ | |
], | |
r = n.indexOf(t); | |
r > - 1 && n.splice(r, 1) | |
} | |
}, | |
{ | |
key: '_emit', | |
value: function (e, t) { | |
var n, | |
r = a(this._events[e] || [ | |
]); | |
try { | |
for (r.s(); !(n = r.n()).done; ) { | |
(0, n.value) (t) | |
} | |
} catch (e) { | |
r.e(e) | |
} finally { | |
r.f() | |
} | |
} | |
} | |
]), | |
e | |
}(); | |
n.default = l | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/interopRequireDefault': 73 | |
} | |
], | |
11: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/assertThisInitialized')), | |
o = r(e('@babel/runtime/helpers/inherits')), | |
l = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
u = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
c = r(e('services/EventBus')), | |
h = e('components/FilterList/Compare/FilterListConstants'), | |
d = r(e('components/ComponentBase')), | |
f = r(e('services/GoogleTagManagerService')), | |
p = r(e('../../../../enums/keyboard/keys')); | |
function v(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, u.default) (e); | |
if (t) { | |
var i = (0, u.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, l.default) (this, n) | |
} | |
} | |
var m = window.jQuery, | |
g = window.drupalSettings, | |
y = function (e) { | |
(0, o.default) (n, e); | |
var t = v(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this), | |
e ? (r.compareBtn = e, r.tagManager = f.default, r.maxComparisonLimit = !1, r.onCompareButtonClickHandler = r.onCompareButtonClick.bind((0, a.default) (r)), r.onCompareButtonKeydownHandler = r.onCompareButtonKeydown.bind((0, a.default) (r)), r.hasMaxComparisonsLimitHandler = r.hasMaxComparisonsLimit.bind((0, a.default) (r)), r.toggleCompareButtonClassHandler = r.toggleCompareButtonClass.bind((0, a.default) (r)), r.init(), r) : (0, l.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.bindEvents(), | |
this.updateOnLoad(), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return this.compareBtn.addEventListener('click', this.onCompareButtonClickHandler), | |
this.compareBtn.addEventListener('keydown', this.onCompareButtonKeydownHandler), | |
c.default.on('maxComparisonsLimit', this.hasMaxComparisonsLimitHandler), | |
c.default.on('toggleCompareButtonClass', this.toggleCompareButtonClassHandler), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
this.compareBtn.removeEventListener('click', this.onCompareButtonClickHandler), | |
this.compareBtn.removeEventListener('keydown', this.onCompareButtonKeydownHandler), | |
c.default.off('maxComparisonsLimit', this.hasMaxComparisonsLimitHandler), | |
c.default.off('toggleCompareButtonClass', this.toggleCompareButtonClassHandler), | |
this.$compareBtns = null, | |
this.$compare = null | |
} | |
}, | |
{ | |
key: 'onCompareButtonClick', | |
value: function (e) { | |
this.productRating = '', | |
this.productImage = ''; | |
var t = e.currentTarget; | |
this.productRatingElement = m(t).closest('.productListing').find(h.SELECTORS.COMPARE_PRODUCT_RATING) [0], | |
this.productImageElement = m(t).closest('.productListing').find(h.SELECTORS.COMPARE_PRODUCT_IMAGE) [0], | |
this.productRatingElement && (this.productRating = this.productRatingElement.innerHTML), | |
this.productImageElement && (this.productImage = this.productImageElement.outerHTML); | |
var n = this.buildCompareItem(t.dataset); | |
t.classList.contains(h.CLASSES.COMPARE_CTRL_REMOVE) ? this.removeItemToCompare(n, t) : (this.addItemToCompare(n, t), this.trackCompare(t.dataset)) | |
} | |
}, | |
{ | |
key: 'onCompareButtonKeydown', | |
value: function (e) { | |
e.key === p.default.return && (e.preventDefault(), this.compareBtn.click()) | |
} | |
}, | |
{ | |
key: 'trackCompare', | |
value: function (e) { | |
this.tagManager.defaultDispatch(e.trackingCategory, e.trackingAction, e.productTitle, e.eventId, e.eventDescription) | |
} | |
}, | |
{ | |
key: 'addItemToCompare', | |
value: function (e, t) { | |
e.elementId = t.id, | |
c.default.broadcast('addItemToCompare', e), | |
this.toggleCompareButtonClass(t) | |
} | |
}, | |
{ | |
key: 'removeItemToCompare', | |
value: function (e, t) { | |
c.default.broadcast('removeItemToCompare', e), | |
this.toggleCompareButtonClass(t) | |
} | |
}, | |
{ | |
key: 'toggleCompareButtonClass', | |
value: function (e) { | |
e && (this.maxComparisonLimit || e !== this.compareBtn || (e.classList.toggle(h.CLASSES.COMPARE_CTRL_REMOVE), this.updateCompareButtonText(e))) | |
} | |
}, | |
{ | |
key: 'updateCompareButtonText', | |
value: function (e) { | |
var t = e.querySelector(h.SELECTORS.COMPARE_CTRL_INNER), | |
n = e.querySelector(h.SELECTORS.COMPARE_CTRL_INNER_TEXT), | |
r = (e.querySelector(h.SELECTORS.COMPARE_CTRL_HIDDEN_INNER_TEXT), e.classList.contains(h.CLASSES.COMPARE_CTRL_REMOVE) ? Drupal.t('Remove') : Drupal.t('Compare')), | |
i = !(r === Drupal.t('Compare')); | |
this.maxComparisonLimit || (n.textContent = r, t.setAttribute('aria-pressed', i)) | |
} | |
}, | |
{ | |
key: 'formatGAStringToObj', | |
value: function (e) { | |
return e.split(',').map((function (e) { | |
var t = e.trim().split(' : '); | |
return { | |
key: t[0], | |
value: t[1] | |
} | |
})) | |
} | |
}, | |
{ | |
key: 'buildCompareItem', | |
value: function (e) { | |
var t = this.formatGAStringToObj(e.productGuaranteedAnalysis); | |
return { | |
productId: e.productId, | |
image: this.productImage, | |
description: e.productDescription, | |
url: e.productUrl, | |
productGuaranteedAnalysis: t, | |
title: e.productTitle, | |
rating: this.productRating, | |
brand: e.productBrand | |
} | |
} | |
}, | |
{ | |
key: 'hasMaxComparisonsLimit', | |
value: function (e) { | |
this.maxComparisonLimit = e | |
} | |
}, | |
{ | |
key: 'updateOnLoad', | |
value: function () { | |
var e = this; | |
if (g.comparingItems) return g.comparingItems.some((function (t) { | |
return e.compareBtn.dataset.productId === t.productId | |
})) && this.toggleCompareButtonClass(this.compareBtn), | |
this | |
} | |
} | |
]), | |
n | |
}(d.default); | |
n.default = y | |
}, | |
{ | |
'../../../../enums/keyboard/keys': 42, | |
'@babel/runtime/helpers/assertThisInitialized': 66, | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'components/FilterList/Compare/FilterListConstants': 16, | |
'services/EventBus': 50, | |
'services/GoogleTagManagerService': 51 | |
} | |
], | |
12: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/assertThisInitialized')), | |
o = r(e('@babel/runtime/helpers/inherits')), | |
l = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
u = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
c = r(e('services/EventBus')), | |
h = r(e('components/FilterList/Compare/FilterListCompareModal/FilterListCompareModalTemplate')), | |
d = e('components/FilterList/Compare/FilterListConstants'), | |
f = r(e('components/Modal/Modal')), | |
p = r(e('components/ComponentBase')); | |
function v(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, u.default) (e); | |
if (t) { | |
var i = (0, u.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, l.default) (this, n) | |
} | |
} | |
window.jQuery; | |
var m = function (e) { | |
(0, o.default) (n, e); | |
var t = v(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this), | |
e ? (r.element = e, r.onOpenCompareModalHandler = r.onOpenCompareModal.bind((0, a.default) (r)), r.destroyCompareModalHandler = r.destroyCompareModal.bind((0, a.default) (r)), r.init(), r) : (0, l.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.createChildren(), | |
this.bindEvents(), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return c.default.on('onOpenCompareModal', this.onOpenCompareModalHandler), | |
c.default.on('compareModalHide', this.destroyCompareModalHandler), | |
this | |
} | |
}, | |
{ | |
key: 'createChildren', | |
value: function () { | |
return this.modalTrigger = document.querySelector(d.SELECTORS.COMPARE_MODAL_TRIGGER), | |
this.compareModal = new f.default(this.modalTrigger), | |
this.compareModal.init(), | |
this.modalContent = this.element.querySelector(d.SELECTORS.COMPARE_MODAL_CONTENT), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return c.default.off('onOpenCompareModal', this.onOpenCompareModalHandler), | |
c.default.off('compareModalHide', this.destroyCompareModalHandler), | |
this.compareModal.destroy(), | |
this.compareModal = null, | |
this.modalTrigger = null, | |
this | |
} | |
}, | |
{ | |
key: 'onOpenCompareModal', | |
value: function (e) { | |
this.renderCompareModal(e) | |
} | |
}, | |
{ | |
key: 'renderCompareModal', | |
value: function (e) { | |
this.buildCompareModal(e) | |
} | |
}, | |
{ | |
key: 'closeCompareModal', | |
value: function () { | |
this.destroyCompareModal() | |
} | |
}, | |
{ | |
key: 'buildCompareModal', | |
value: function (e) { | |
this.modalContent.innerHTML = (0, h.default) (e) | |
} | |
}, | |
{ | |
key: 'destroyCompareModal', | |
value: function () { | |
this.modalContent.innerHTML = '' | |
} | |
} | |
]), | |
n | |
}(p.default); | |
n.default = m | |
}, | |
{ | |
'@babel/runtime/helpers/assertThisInitialized': 66, | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'components/FilterList/Compare/FilterListCompareModal/FilterListCompareModalTemplate': 13, | |
'components/FilterList/Compare/FilterListConstants': 16, | |
'components/Modal/Modal': 23, | |
'services/EventBus': 50 | |
} | |
], | |
13: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
n.default = function (e) { | |
return '\n<div class="blocks blocks_3upMD blocks_3upLG">\n '.concat(e.map((function (e) { | |
return '\n <div class="productListing">\n <div class="productListing-media">\n '.concat(e.image, '\n </div>\n <div class="productListing-content">\n ').concat(e.brand ? '\n <div class="productListing-content-category js-kraken-compareModal-brand">\n '.concat(e.brand, '\n </div>\n ') : '', '\n <div class="productListing-content-hd">\n <h3 class="hdg hdg_4 mix-hdg_caps">').concat(e.title, '</h3>\n </div>\n ').concat(e.rating ? '<div class="productListing-content-ratings">\n '.concat(e.rating, '\n </div>') : '', '\n ').concat(e.productGuaranteedAnalysis.length > 0 ? '\n <div class="productListing-content-detail">\n <ul class="vList vList_zebra">\n '.concat(e.productGuaranteedAnalysis.map((function (e, t) { | |
return e.value && t < 4 ? '\n <li>\n <div class="keyValuePair">\n <div class="keyValuePair-key">\n '.concat(e.key, '\n </div>\n <div class="keyValuePair-value">\n ').concat(e.value, '\n </div>\n </div>\n </li>\n ') : '' | |
})).join(''), '\n </ul>\n </div>\n ') : '', '\n\n <div class="productListing-content-bd">\n ').concat(e.description, '\n </div>\n <div class="productListing-content-ft">\n <ul class="vList">\n <li>\n <a href="').concat(e.url, '" class="btn mix-btn_fullWidth" data-event-id="comparison-component-').concat(e.productId, '" data-event-description="product comparison" data-category="Comparison Module" data-action="view more" data-label="').concat(e.title, '">').concat(Drupal.t('View Product'), '</a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n ') | |
})).join(''), '\n</div>\n') | |
} | |
}, | |
{ | |
} | |
], | |
14: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/assertThisInitialized')), | |
o = r(e('@babel/runtime/helpers/inherits')), | |
l = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
u = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
c = r(e('services/EventBus')), | |
h = e('components/FilterList/Compare/FilterListConstants'), | |
d = r(e('../../../../enums/keyboard/nav-keys')), | |
f = r(e('components/ComponentBase')), | |
p = r(e('services/GoogleTagManagerService')), | |
v = r(e('./FilterListCompareTrayTemplate')); | |
function m(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, u.default) (e); | |
if (t) { | |
var i = (0, u.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, l.default) (this, n) | |
} | |
} | |
window.jQuery; | |
var g = window, | |
Drupal = g.Drupal, | |
y = g.drupalSettings, | |
b = function (e) { | |
(0, o.default) (n, e); | |
var t = m(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this), | |
e ? (r.tagManager = p.default, r.element = e, r.trayBtn = null, r.compareComponent = null, r.skipToModalElement = null, y.comparingItems || (y.comparingItems = [ | |
]), r.comparingItems = y.comparingItems, r.maxComparisons = 3, r.compareMsg = null, r.onCompareTrayCompareBtnClickHandler = r.onCompareTrayCompareBtnClick.bind((0, a.default) (r)), r.onSkipLinksHandler = r.onSkipLinksTrigger.bind((0, a.default) (r)), r.onAddItemToCompareHandler = r.onAddItemToCompare.bind((0, a.default) (r)), r.onRemoveItemToCompareHandler = r.onRemoveItemToCompare.bind((0, a.default) (r)), r.onCompareTrayRemoveButtonClickHandler = r.onCompareTrayRemoveButtonClick.bind((0, a.default) (r)), r.onCompareTrayRemoveButtonKeydownHandler = r.onCompareTrayRemoveButtonKeydown.bind((0, a.default) (r)), r.onCloseModalHandler = r.onCloseModal.bind((0, a.default) (r)), r.init(), r) : (0, l.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.createChildren(), | |
this.bindEvents(), | |
this.compareTrayUpdate(), | |
this | |
} | |
}, | |
{ | |
key: 'createChildren', | |
value: function () { | |
return this.compareComponent = document.querySelector(h.SELECTORS.COMPARE_COMPONENT), | |
this.skipLinks = document.querySelectorAll(h.SELECTORS.COMPARE_SKIP_TO_MODAL), | |
this.trayBtn = this.element.querySelector(h.SELECTORS.COMPARE_TRAY_COMPARE_BUTTON), | |
this.compareMsg = this.element.querySelector(h.SELECTORS.COMPARE_TRAY_MSG), | |
this.elementList = document.querySelector(h.SELECTORS.COMPARE_COMPONENT), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return this.trayBtn.addEventListener('click', this.onCompareTrayCompareBtnClickHandler), | |
this.elementList.addEventListener('click', this.onSkipLinksHandler), | |
this.elementList.addEventListener('keydown', this.onSkipLinksHandler), | |
c.default.on('addItemToCompare', this.onAddItemToCompareHandler), | |
c.default.on('removeItemToCompare', this.onRemoveItemToCompareHandler), | |
c.default.on('compareModalHide', this.onCloseModalHandler), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.trayBtn.removeEventListener('click', this.onCompareTrayCompareBtnClickHandler), | |
this.elementList.removeEventListener('click', this.onSkipLinksHandler), | |
this.elementList.removeEventListener('keydown', this.onSkipLinksHandler), | |
c.default.off('addItemToCompare', this.onAddItemToCompareHandler), | |
c.default.off('removeItemToCompare', this.onRemoveItemToCompareHandler), | |
c.default.off('compareModalHide', this.onCloseModalHandler), | |
this.trayBtn = null, | |
this.element = null, | |
this.compareMsg = null, | |
this | |
} | |
}, | |
{ | |
key: 'compareTrayUpdate', | |
value: function () { | |
this.hasComparingItems() ? (this.element.classList.remove(h.CLASSES.HIDDEN), this.renderCompareTrayList(this.comparingItems), this.toggleMsg()) : this.element.classList.add(h.CLASSES.HIDDEN), | |
this.toggleVisualOnFocus(this.skipLinks) | |
} | |
}, | |
{ | |
key: 'toggleVisualOnFocus', | |
value: function (e) { | |
var t = this.hasComparingItems(), | |
n = this.element.classList.contains(h.CLASSES.HIDDEN); | |
Array.prototype.forEach.call(e, (function (e) { | |
var r = e.classList; | |
t && !n ? (r.add(h.CLASSES.VISUAL_ON_FOCUS), r.remove(h.CLASSES.HIDDEN)) : (r.add(h.CLASSES.HIDDEN), r.remove(h.CLASSES.VISUAL_ON_FOCUS)) | |
})) | |
} | |
}, | |
{ | |
key: 'broadcastComparisonLimit', | |
value: function () { | |
this.comparingItems.length !== this.maxComparisons ? c.default.broadcast('maxComparisonsLimit', !1) : c.default.broadcast('maxComparisonsLimit', !0) | |
} | |
}, | |
{ | |
key: 'onAddItemToCompare', | |
value: function (e) { | |
this.element.classList.remove(h.CLASSES.HIDDEN), | |
this.broadcastComparisonLimit(), | |
this.comparingItems.length < this.maxComparisons && this.comparingItems.push(e), | |
this.renderCompareTrayList(this.comparingItems), | |
Drupal.announce(Drupal.t('@title added to the compare product list. @number products are in the compare list.', { | |
'@title': e.title, | |
'@number': this.comparingItems.length | |
})), | |
this.compareTrayUpdate() | |
} | |
}, | |
{ | |
key: 'onRemoveItemToCompare', | |
value: function (e) { | |
this.comparingItems = this.comparingItems.filter((function (t) { | |
return t.productId !== e.productId | |
})), | |
y.comparingItems = this.comparingItems, | |
this.renderCompareTrayList(this.comparingItems), | |
Drupal.announce(Drupal.t('@title removed from the compare product list. @number products remain in the compare list.', { | |
'@title': e.title, | |
'@number': this.comparingItems.length | |
})), | |
this.compareTrayUpdate() | |
} | |
}, | |
{ | |
key: 'onCompareTrayCompareBtnClick', | |
value: function (e) { | |
e.preventDefault(); | |
var t = this.comparingItems.map((function (e) { | |
return e.title | |
})).join(', '); | |
this.trackCompare(e.currentTarget.dataset, t), | |
c.default.broadcast('onOpenCompareModal', this.comparingItems) | |
} | |
}, | |
{ | |
key: 'onCompareTrayRemoveButtonClick', | |
value: function (e) { | |
var t = { | |
title: e.currentTarget.querySelector('.compareItem-label').innerText, | |
productId: e.currentTarget.dataset.productId | |
}; | |
this.onRemoveItemToCompare(t); | |
var n = this.compareComponent.querySelector('[data-product-id=\''.concat(t.productId, '\']')); | |
c.default.broadcast('toggleCompareButtonClass', n) | |
} | |
}, | |
{ | |
key: 'onSkipLinksTrigger', | |
value: function (e) { | |
var t = e.target.classList.contains(h.CLASSES.COMPARE_SKIP_TO_MODAL), | |
n = 'click' === e.type, | |
r = e.key === d.default.RETURN; | |
t && (r || n) && (e.preventDefault(), this.skipToModalElement = e.target, this.trayBtn.click()) | |
} | |
}, | |
{ | |
key: 'onCompareTrayRemoveButtonKeydown', | |
value: function (e) { | |
e.key === d.default.RETURN && (e.preventDefault(), e.target.click()) | |
} | |
}, | |
{ | |
key: 'onCloseModal', | |
value: function () { | |
var e; | |
null === (e = this.skipToModalElement) || void 0 === e || e.focus() | |
} | |
}, | |
{ | |
key: 'renderCompareTrayList', | |
value: function (e) { | |
var t = this; | |
this.element.querySelector(h.SELECTORS.COMPARE_TRAY_LIST).innerHTML = this.renderCompareTrayItem(e), | |
Array.prototype.slice.call(this.element.querySelectorAll(h.SELECTORS.COMPARE_ITEM_REMOVE_BTN)).forEach((function (e) { | |
e.addEventListener('click', t.onCompareTrayRemoveButtonClickHandler), | |
e.addEventListener('keydown', t.onCompareTrayRemoveButtonKeydownHandler) | |
})) | |
} | |
}, | |
{ | |
key: 'renderCompareTrayItem', | |
value: function (e) { | |
return e.map((function (e) { | |
return (0, v.default) (e) | |
})).join('') | |
} | |
}, | |
{ | |
key: 'hasComparingItems', | |
value: function () { | |
return this.comparingItems && this.comparingItems.length > 0 | |
} | |
}, | |
{ | |
key: 'maxComparisonsReached', | |
value: function () { | |
return this.comparingItems && this.comparingItems.length >= this.maxComparisons | |
} | |
}, | |
{ | |
key: 'removeComparison', | |
value: function (e) { | |
this.$emit('removedComparison', e) | |
} | |
}, | |
{ | |
key: 'hideComparisons', | |
value: function () { | |
this.showComparisons = !1 | |
} | |
}, | |
{ | |
key: 'toggleMsg', | |
value: function () { | |
this.maxComparisonsReached() ? this.compareMsg.classList.remove(h.CLASSES.HIDDEN) : this.compareMsg.classList.add(h.CLASSES.HIDDEN) | |
} | |
}, | |
{ | |
key: 'trackCompare', | |
value: function (e, t) { | |
this.tagManager.defaultDispatch(e.trackingCategory, e.trackingAction, t, e.eventId, e.eventDescription) | |
} | |
} | |
]), | |
n | |
}(f.default); | |
n.default = b | |
}, | |
{ | |
'../../../../enums/keyboard/nav-keys': 43, | |
'./FilterListCompareTrayTemplate': 15, | |
'@babel/runtime/helpers/assertThisInitialized': 66, | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'components/FilterList/Compare/FilterListConstants': 16, | |
'services/EventBus': 50, | |
'services/GoogleTagManagerService': 51 | |
} | |
], | |
15: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var r = function (e) { | |
var t = e.productId, | |
n = e.image, | |
r = e.title; | |
return '<li class="compareItem js-kraken-compareItem js-kraken-compareItem-remove-btn"\n data-product-id="'.concat(t, '">\n <div class="compareItem-remove">\n <div class="compareCtrl compareCtrl_remove">\n <button class="compareCtrl-inner">\n <svg class="compareCtrl-inner-icon" viewBox="0 0 32 32" aria-hidden="true">\n <use xlink:href="#icon_plus"></use>\n </svg>\n <div class="compareCtrl-inner-txt">').concat(Drupal.t('Remove'), '</div>\n </button>\n </div>\n </div>\n <div class="compare-img">').concat(n, '</div>\n <span class="compareItem-label">').concat(r, '</span>\n </li>') | |
}; | |
n.default = r | |
}, | |
{ | |
} | |
], | |
16: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.SELECTORS = n.CLASSES = void 0; | |
n.CLASSES = { | |
HIDDEN: 'isHidden', | |
COMPARE_CTRL_REMOVE: 'compareCtrl_remove', | |
SHOW_MODAL: 'modal_isOpen', | |
VISUAL_ON_FOCUS: 'isVisualOnFocus', | |
COMPARE_SKIP_TO_MODAL: 'js-kraken-skip-to-product-compare' | |
}; | |
n.SELECTORS = { | |
COMPARE_COMPONENT: '.js-kraken-filterListCompare', | |
COMPARE_TRAY: '.js-kraken-filterListCompare_tray', | |
COMPARE_TRAY_MSG: '.js-kraken-compare-msg ', | |
COMPARE_TRAY_LIST: '.compareTray-list', | |
COMPARE_TRAY_COMPARE_BUTTON: '.js-kraken-filterListCompare_tray-btn', | |
COMPARE_CTRL_INNER: '.compareCtrl-inner', | |
COMPARE_CTRL_INNER_TEXT: '.compareCtrl-inner-txt', | |
COMPARE_CTRL_HIDDEN_INNER_TEXT: '.compareCtrl-inner-txt_hidden', | |
COMPARE_ITEM_REMOVE_BTN: '.js-kraken-compareItem-remove-btn', | |
COMPARE_ITEM_BTN: '.js-kraken-filterListCompare_button', | |
COMPARE_ITEM: '.js-kraken-compareItem', | |
COMPARE_PRODUCT_RATING: '.js-kraken-productRating', | |
COMPARE_PRODUCT_IMAGE: '.js-kraken-productImage img', | |
COMPARE_MODAL: '.js-kraken-filterListCompare_modal', | |
COMPARE_MODAL_TRIGGER: '.js-kraken-compareModal_trigger', | |
COMPARE_MODAL_CONTENT: '#compareModal .js-kraken-modal-content', | |
COMPARE_MODAL_ITEMS: '.js-kraken-compareModal-items', | |
COMPARE_MODAL_SITENAME: '.js-kraken-compareModal-brand', | |
COMPARE_MODAL_DISMISS: '.js-kraken-compareModal_dismiss', | |
COMPARE_MODAL_SNEEZEGUARD: '.js-kraken-compareModal-sneezeguard', | |
COMPARE_SKIP_TO_MODAL: '.js-kraken-skip-to-product-compare' | |
} | |
}, | |
{ | |
} | |
], | |
17: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/ComponentBase')); | |
function c(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var h = window.jQuery, | |
d = 'data-drupal-facet-item-id', | |
f = '.js-kraken-filterClear', | |
p = '.js-kraken-filterClearFocusTarget', | |
v = window.drupalSettings, | |
m = function (e) { | |
(0, a.default) (n, e); | |
var t = c(n); | |
function n(e, r) { | |
var s; | |
return (0, i.default) (this, n), | |
s = t.call(this), | |
e ? (s.$filterList = h(e), s.$formClearBtn = null, s.setupHandlers(), s.init(), s) : (0, o.default) (s) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.$filters = this.$filterList.find('['.concat(d, ']')), | |
this.$formClearBtn = this.$filterList.find(f), | |
this.bindEvents(), | |
this | |
} | |
}, | |
{ | |
key: 'setupHandlers', | |
value: function () { | |
return this.onFormResetHandler = this.onFormReset.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return this.$formClearBtn.on('click', this.onFormResetHandler), | |
this | |
} | |
}, | |
{ | |
key: 'unbindEvents', | |
value: function () { | |
return this.$formClearBtn && this.$formClearBtn.off('click', this.onFormResetHandler), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.unbindEvents(), | |
this.$formClearBtn = null, | |
this | |
} | |
}, | |
{ | |
key: 'onFormReset', | |
value: function (e) { | |
e.preventDefault(), | |
v.currentFilters = { | |
}; | |
var t = this.$filterList[0], | |
n = Array.from(t.classList).filter((function (e) { | |
return - 1 !== e.indexOf('js-view-dom-id') | |
})) [0].replace('js-view-dom-id-', ''), | |
r = Drupal.views.instances['views_dom_id:'.concat(n)]; | |
r.element_settings.url = v.views.ajax_path, | |
window.history.pushState({ | |
}, document.title, window.location.pathname), | |
Drupal.ajax(r.element_settings).execute(); | |
var i = h(t).closest(p) [0]; | |
h(i).focus() | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = m | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8 | |
} | |
], | |
18: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/ComponentBase')), | |
c = r(e('services/GoogleTagManagerService')); | |
function h(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var d = function (e) { | |
(0, a.default) (n, e); | |
var t = h(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
(r = t.call(this)).formData = e, | |
r.formValues = e.values, | |
r.formErrors = r.formData.errors, | |
r.formId = r.formData.formId, | |
r.init(), | |
r | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
this.pollForTrackEvent().then(this.dispatchEvents.bind(this)) | |
} | |
}, | |
{ | |
key: 'pollForTrackEvent', | |
value: function () { | |
var e = 0; | |
return new Promise((function (t, n) { | |
var r = setInterval((function () { | |
if (e++, window.purinaTrackEvent) return clearInterval(r), | |
void t(); | |
e > 100 && (clearInterval(r), n()) | |
}), 100) | |
})) | |
} | |
}, | |
{ | |
key: 'dispatchEvents', | |
value: function () { | |
var e = this.formErrors.length > 0, | |
t = 0 === this.formErrors.length; | |
if (e) { | |
var n = this.renderFormErrors(this.formErrors); | |
c.default.defaultDispatch(this.formData.formDataAttr['data-tracking-category'], this.formData.formDataAttr['data-tracking-error-action'], n, ''.concat(this.formData.formDataAttr['data-event-id'], '-error'), ''.concat(this.formData.formDataAttr['data-event-description'], ' form error')) | |
} else if (t) { | |
var r = this.formValues; | |
c.default.defaultDispatch(this.formData.formDataAttr['data-tracking-category'], this.formData.formDataAttr['data-tracking-submit-action'], this.formData.formDataAttr['data-tracking-submit-label'], ''.concat(this.formData.formDataAttr['data-event-id'], '-submit'), ''.concat(this.formData.formDataAttr['data-event-description'], ' submit')), | |
r.forEach((function (e) { | |
c.default.defaultDispatch(e.data_attr['data-tracking-category'], e.data_attr['data-tracking-action'], e.data_attr['data-tracking-label'] || e.humanValue, e.data_attr['data-event-id'], e.data_attr['data-event-description']) | |
})) | |
} | |
} | |
}, | |
{ | |
key: 'renderFormErrors', | |
value: function (e) { | |
var t = [ | |
]; | |
return e.forEach((function (e) { | |
var n = ''.concat(e.field); | |
- 1 === t.indexOf(n) && t.push(n) | |
})), | |
t.join(', ') | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = d | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'services/GoogleTagManagerService': 51 | |
} | |
], | |
19: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('services/EventBus')), | |
c = r(e('services/WindowListener/WindowListener')), | |
h = r(e('components/ComponentBase')); | |
function d(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var f = window.jQuery, | |
p = 'navigation_isOpen', | |
v = 'searchIsOpen', | |
m = 'header-mobileSneezeguard_isOpen', | |
g = 'isStarting', | |
y = 'isActive', | |
b = 'isHidden', | |
C = 'searchForm-with-mic', | |
k = '#icon_search', | |
S = '#icon_searchClose', | |
w = '#mainNav', | |
E = '.js-navToggle', | |
T = 'navIsOpen', | |
L = 'navIsEnabled', | |
x = window.drupalSettings, | |
A = function (e) { | |
(0, a.default) (n, e); | |
var t = d(n); | |
function n(e, r) { | |
var s; | |
return (0, i.default) (this, n), | |
s = t.call(this), | |
e ? (r.navIsEnabled || (x.navIsEnabled = !1, x.navIsOpen = !1), s.header = e, s.navBtn = s.header.getElementsByClassName('js-kraken-header_navBtn'), s.navCloseBtn = s.header.getElementsByClassName('js-kraken-header_navCloseBtn'), s.navToggles = s.header.querySelectorAll(E), s.currentBreakpoint = c.default.currentBreakpoint, s.search = s.header.getElementsByClassName('js-kraken-header_search'), s.mobileSearchSlot = s.header.getElementsByClassName('header-inner-search_mobile'), s.desktopSearchSlot = s.header.getElementsByClassName('header-inner-search'), s.search[0] && (s.searchBtn = s.search[0].querySelector('.js-kraken-header_searchBtn'), s.searchBtnIcon = s.searchBtn.querySelector('use'), s.voiceSearchBtn = s.search[0].querySelector('.searchForm-voiceSearch-btn'), s.voiceSearchBtn && (s.searchInput = s.search[0].querySelector('.searchForm-inner-input'), s.initVoiceSearch()), 'SMALL' === s.currentBreakpoint && s.mobileSearchSlot[0].appendChild(s.search[0])), s.sneezeGuard = s.header.getElementsByClassName('js-kraken-header_sneezeGuard') [0], s.navIsOpen = !1, s.searchIsOpen = !1, s.navIsEnabled = !1, s.init(), s) : (0, o.default) (s) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.setUpHandlers(), | |
this.enable(), | |
this | |
} | |
}, | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.onClickToggleHandler = this.onClickToggle.bind(this), | |
this.onClickSearchHandler = this.onClickSearch.bind(this), | |
this.onClickVoiceSearchHandler = this.onClickVoiceSearch.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'enable', | |
value: function () { | |
var e = this; | |
c.default.on('currentBreakpoint', (function (t) { | |
return e.currentBreakpoint = t, | |
e.onBreakpointUpdate() | |
})); | |
for (var t = 0; t < this.navBtn.length; t++) this.navBtn[t].addEventListener('click', this.onClickToggleHandler); | |
for (var n = 0; n < this.navCloseBtn.length; n++) this.navCloseBtn[n].addEventListener('click', this.onClickToggleHandler); | |
this.sneezeGuard.addEventListener('click', this.onClickToggleHandler), | |
this.search[0] && (this.searchBtn.addEventListener('click', this.onClickSearchHandler), this.voiceSearchBtn && this.voiceSearchBtn.addEventListener('click', this.onClickVoiceSearchHandler), this.setAriaSearchTriggerVal(this.searchBtn)), | |
this.setEnabledStatus(), | |
this.setAriaTriggerVal(this.navBtn[0]) | |
} | |
}, | |
{ | |
key: 'removeHandlers', | |
value: function () { | |
c.default.off('currentBreakpoint', this.onBreakpointUpdate); | |
for (var e = 0; e < this.navBtn.length; e++) this.navBtn[e].removeEventListener('click', this.onClickToggleHandler); | |
for (var t = 0; t < this.navCloseBtn.length; t++) this.navCloseBtn[t].removeEventListener('click', this.onClickToggleHandler); | |
this.sneezeGuard.removeEventListener('click', this.onClickToggleHandler), | |
this.searchBtn.removeEventListener('click', this.onClickSearchHandler), | |
this.voiceSearchBtn && this.voiceSearchBtn.removeEventListener('click', this.onClickVoiceSearchHandler) | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.removeHandlers(), | |
this.header = null, | |
this.navBtn = null, | |
this.navCloseBtn = null, | |
this.search && (this.search = null, this.searchBtn = null, this.searchBtnIcon = null, this.voiceSearchBtn && (this.voiceSearchBtn = null, this.searchInput = null)), | |
this.sneezeGuard = null, | |
this | |
} | |
}, | |
{ | |
key: 'onClickToggle', | |
value: function () { | |
this.navIsOpen = !this.navIsOpen, | |
this.updateNav(), | |
this.setAriaTriggerVal(this.navBtn[0]) | |
} | |
}, | |
{ | |
key: 'onClickSearch', | |
value: function (e) { | |
(this.searchIsOpen = !this.searchIsOpen, this.searchIsOpen) && f(e.currentTarget).closest('.searchForm').find('input[type=search]').focus(); | |
this.updateSearch(), | |
this.setAriaSearchTriggerVal(this.searchBtn) | |
} | |
}, | |
{ | |
key: 'updateNav', | |
value: function () { | |
this.navIsEnabled && this.navIsOpen ? (this.header.classList.add(p), this.sneezeGuard.classList.add(m), f(w).removeClass('isNotDisplayedSM'), u.default.broadcast(T, !0)) : this.navIsEnabled && this.navIsOpen || (this.header.classList.remove(p), this.sneezeGuard.classList.remove(m), f(w).addClass('isNotDisplayedSM'), u.default.broadcast(T, !1)), | |
x.navIsOpen = this.navIsOpen | |
} | |
}, | |
{ | |
key: 'updateSearch', | |
value: function () { | |
this.searchIsOpen ? (this.header.classList.add(v), this.search[0].classList.add(y), this.updateSearchIcon(S)) : (this.header.classList.remove(v), this.search[0].classList.remove(y), this.updateSearchIcon(k)) | |
} | |
}, | |
{ | |
key: 'updateSearchIcon', | |
value: function (e) { | |
this.searchBtnIcon.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', e) | |
} | |
}, | |
{ | |
key: 'setEnabledStatus', | |
value: function () { | |
this.navIsEnabled = 'SMALL' === this.currentBreakpoint, | |
u.default.broadcast(L, this.navIsEnabled), | |
x.navIsEnabled = this.navIsEnabled | |
} | |
}, | |
{ | |
key: 'setAriaTriggerVal', | |
value: function (e) { | |
var t = this.navIsOpen || !this.navIsEnabled ? 'true' : 'false'; | |
return e.setAttribute('aria-expanded', t) | |
} | |
}, | |
{ | |
key: 'ariaTargetVal', | |
value: function () { | |
return this.navIsOpen || !this.navIsEnabled ? 'false' : 'true' | |
} | |
}, | |
{ | |
key: 'setAriaSearchTriggerVal', | |
value: function (e) { | |
var t = this.searchIsOpen ? 'true' : 'false'; | |
return e.setAttribute('aria-expanded', t) | |
} | |
}, | |
{ | |
key: 'ariaSearchTargetVal', | |
value: function () { | |
return this.searchIsOpen ? 'false' : 'true' | |
} | |
}, | |
{ | |
key: 'onBreakpointUpdate', | |
value: function () { | |
this.setEnabledStatus(), | |
'SMALL' !== this.currentBreakpoint ? (this.navIsOpen = !1, this.updateNav(), this.search[0] && this.desktopSearchSlot[0].appendChild(this.search[0])) : this.search[0] && this.mobileSearchSlot[0].appendChild(this.search[0]) | |
} | |
}, | |
{ | |
key: 'initVoiceSearch', | |
value: function () { | |
'webkitSpeechRecognition' in window ? this.recognition = new webkitSpeechRecognition : 'SpeechRecognition' in window && (this.recognition = new SpeechRecognition), | |
'recognition' in this ? (this.voiceSearchReset(), this.onVoiceSearchStart = this.onVoiceSearchStart.bind(this), this.voiceSearchReset = this.voiceSearchReset.bind(this), this.onVoiceSearchResult = this.onVoiceSearchResult.bind(this), this.onVoiceSearchError = this.onVoiceSearchError.bind(this), this.recognition.onstart = this.onVoiceSearchStart, this.recognition.onend = this.voiceSearchReset, this.recognition.onresult = this.onVoiceSearchResult, this.recognition.onerror = this.onVoiceSearchError) : (this.voiceSearchBtn.classList.add(b), this.searchInput.classList.remove(C)) | |
} | |
}, | |
{ | |
key: 'onClickVoiceSearch', | |
value: function (e) { | |
this.isRecording ? this.recognition.stop() : (this.isRecording = !0, this.voiceSearchBtn.classList.add(g), this.recognition.start()) | |
} | |
}, | |
{ | |
key: 'onVoiceSearchStart', | |
value: function (e) { | |
this.voiceSearchBtn.classList.add(y), | |
this.voiceSearchBtn.classList.remove(g) | |
} | |
}, | |
{ | |
key: 'voiceSearchReset', | |
value: function () { | |
this.isRecording = !1, | |
this.voiceSearchNextResult = 0, | |
this.voiceSearchBtn.classList.remove(y), | |
this.voiceSearchBtn.classList.remove(g) | |
} | |
}, | |
{ | |
key: 'onVoiceSearchResult', | |
value: function (e) { | |
for (var t = !1; this.voiceSearchNextResult < e.results.length; ++this.voiceSearchNextResult) e.results[this.voiceSearchNextResult].isFinal && (this.searchInput.value = e.results[this.voiceSearchNextResult][0].transcript, t = !0); | |
t && this.search[0].submit() | |
} | |
}, | |
{ | |
key: 'onVoiceSearchError', | |
value: function (e) { | |
'not-allowed' === e.error && (this.voiceSearchBtn.setAttribute('disabled', 'disabled'), this.voiceSearchReset()) | |
} | |
} | |
]), | |
n | |
}(h.default); | |
n.default = A | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'services/EventBus': 50, | |
'services/WindowListener/WindowListener': 56 | |
} | |
], | |
20: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('services/EventBus')), | |
o = '.navigation-main-list-item', | |
l = '.navigation-main-list-item-sub', | |
u = window.jQuery, | |
c = function () { | |
function e(t, n) { | |
(0, i.default) (this, e), | |
this.navToggle = t, | |
this.navIsEnabled = n.navIsEnabled || !1, | |
this.navIsOpen = n.navIsOpen || !1, | |
this.$activeListBtn = null, | |
this.$activeParentListItem = null, | |
this.$activeTarget = null, | |
this.init() | |
} | |
return (0, s.default) (e, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.setUpHandlers(), | |
this.bindEvents(), | |
this | |
} | |
}, | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.onNavEnableUpdateHandler = this.onNavEnableUpdate.bind(this), | |
this.onNavOpenUpdateHandler = this.onNavOpenUpdate.bind(this), | |
this.onClickParentHandler = this.onClickParent.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return a.default.on('navIsEnabled', this.onNavEnableUpdateHandler), | |
a.default.on('navIsOpen', this.onNavOpenUpdateHandler), | |
this.navToggle.addEventListener('click', this.onClickParentHandler), | |
this | |
} | |
}, | |
{ | |
key: 'removeHandlers', | |
value: function () { | |
a.default.off('navIsEnabled', this.onNavEnableUpdateHandler), | |
a.default.off('navIsOpen', this.onNavOpenUpdateHandler), | |
this.navToggle.removeEventListener('click', this.onClickParentHandler) | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.removeHandlers(), | |
this.navToggle = null, | |
this.$activeListBtn = null, | |
this.$activeParentListItem = null, | |
this.$activeTarget = null, | |
this | |
} | |
}, | |
{ | |
key: 'onClickParent', | |
value: function (e) { | |
if (this.navIsEnabled) { | |
e.preventDefault(), | |
e.stopPropagation(); | |
var t = u(e.currentTarget), | |
n = t.closest(o), | |
r = n.find(l); | |
return this.$activeListBtn ? this.$activeListBtn[0] === t[0] ? (this.closeSubMenu(t, r, n), this.$activeListBtn = null, this.$activeParentListItem = null, void (this.$activeTarget = null)) : void (this.$activeListBtn && this.$activeListBtn[0] !== t[0] && (this.closeSubMenu(this.$activeListBtn, this.$activeTarget, this.$activeParentListItem), this.openSubMenu(t, r, n), this.$activeListBtn = t, this.$activeParentListItem = n, this.$activeTarget = r)) : (this.openSubMenu(t, r, n), this.$activeListBtn = t, this.$activeParentListItem = n, void (this.$activeTarget = r)) | |
} | |
} | |
}, | |
{ | |
key: 'openSubMenu', | |
value: function (e, t, n) { | |
e.addClass('isActive'), | |
n.addClass('isActive'), | |
t.removeClass('isHidden'), | |
this.setSubMenuAria(e, t, !0) | |
} | |
}, | |
{ | |
key: 'closeSubMenu', | |
value: function (e, t, n) { | |
e.removeClass('isActive'), | |
n.removeClass('isActive'), | |
t.addClass('isHidden'), | |
this.setSubMenuAria(e, t, !1) | |
} | |
}, | |
{ | |
key: 'closeActiveSubMenu', | |
value: function () { | |
this.$activeListBtn && (this.closeSubMenu(this.$activeListBtn, this.$activeTarget, this.$activeParentListItem), this.setSubMenuAria(this.$activeListBtn, this.$activeTarget, !1), this.$activeListBtn = null, this.$activeParentListItem = null, this.$activeTarget = null) | |
} | |
}, | |
{ | |
key: 'onNavEnableUpdate', | |
value: function (e) { | |
this.navIsEnabled = e | |
} | |
}, | |
{ | |
key: 'onNavOpenUpdate', | |
value: function (e) { | |
this.navIsOpen || this.closeActiveSubMenu() | |
} | |
}, | |
{ | |
key: 'setSubMenuAria', | |
value: function (e, t, n) { | |
e.attr({ | |
'aria-expanded': n | |
}), | |
t.attr({ | |
'aria-hidden': !n | |
}) | |
} | |
} | |
]), | |
e | |
}(); | |
n.default = c | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'services/EventBus': 50 | |
} | |
], | |
21: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/Modal/Modal')); | |
function c(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var h = function (e) { | |
(0, a.default) (n, e); | |
var t = c(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this, e), | |
e ? (r.imageGenerated = !1, r) : (0, o.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'showModal', | |
value: function (e) { | |
this.modalIsActive = !0, | |
this.toggleModal(e); | |
var t = e.querySelector('.js-kraken-modal-image'); | |
t && this.generateImage(t), | |
this.modalBroadcast() | |
} | |
}, | |
{ | |
key: 'generateImage', | |
value: function (e) { | |
if (!this.imageGenerated) { | |
var t = e.dataset.imgSrc, | |
n = e.dataset.imgAlt, | |
r = new Image; | |
r.src = t, | |
r.alt = n, | |
e.appendChild(r), | |
this.imageGenerated = !0 | |
} | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = h | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/Modal/Modal': 23 | |
} | |
], | |
22: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/ComponentBase')), | |
c = r(e('services/WindowListener/WindowListener')); | |
function h(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var d = window.jQuery, | |
f = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style, | |
p = '.navigation-main-list-item', | |
v = '.js-navToggle', | |
m = 'isOpen', | |
g = function (e) { | |
(0, a.default) (n, e); | |
var t = h(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
(r = t.call(this))._$element = d(e), | |
r._$navBtn = r._$element.find(v), | |
r.currentElement = null, | |
r.currentBreakpoint = c.default.currentBreakpoint, | |
r.isTouchEnabled = window.Modernizr.touchevents, | |
r.setupHandlers(), | |
c.default.on('currentBreakpoint', r.onBreakpointUpdateHandler), | |
r.bindEvents(), | |
r | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'setupHandlers', | |
value: function () { | |
this.onNavBtnClickHandler = this.onNavBtnClick.bind(this), | |
this.onMouseEnterHandler = this.onMouseEnter.bind(this), | |
this.onDocumentClickHandler = this.onDocumentClick.bind(this), | |
this.onBreakpointUpdateHandler = this.onBreakpointUpdate.bind(this) | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
'SMALL' !== this.currentBreakpoint && this.isTouchEnabled ? (this._$navBtn.on('touchstart', this.onNavBtnClickHandler), this._$element.on('mouseenter mouseleave', p, this.onMouseEnterHandler), d(document).on('touchstart', this.onDocumentClickHandler)) : 'SMALL' !== this.currentBreakpoint && f && (this._$navBtn.on('click', this.onNavBtnClickHandler), this._$element.on('mouseenter mouseleave', p, this.onMouseEnterHandler), d(document).on('click', this.onDocumentClickHandler)) | |
} | |
}, | |
{ | |
key: 'unbindEvents', | |
value: function () { | |
this._$navBtn.off('touchstart click', this.onNavBtnClickHandler), | |
this._$element.off('mouseenter mouseleave', p, this.onMouseEnterHandler), | |
d(document).off('touchstart click', this.onDocumentClickHandler), | |
this.setOpenStatus(this.currentNavItem, !1) | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.unbindEvents(), | |
this._$element = null, | |
this._$navBtn = null, | |
this | |
} | |
}, | |
{ | |
key: 'onNavBtnClick', | |
value: function (e) { | |
e.preventDefault(); | |
var t = d(e.currentTarget).closest(p) [0]; | |
this.updateNav(t) | |
} | |
}, | |
{ | |
key: 'updateNav', | |
value: function (e) { | |
this.currentNavItem && this.currentNavItem !== e && this.setOpenStatus(this.currentNavItem, !1), | |
this.currentNavItem && this.currentNavItem === e ? this.setOpenStatus(e, !1) : this.setOpenStatus(e, !0) | |
} | |
}, | |
{ | |
key: 'onMouseEnter', | |
value: function (e) { | |
e.preventDefault(), | |
this.updateNav(e.currentTarget) | |
} | |
}, | |
{ | |
key: 'onBreakpointUpdate', | |
value: function (e) { | |
return this.currentBreakpoint = e, | |
'SMALL' !== this.currentBreakpoint ? this.bindEvents() : this.unbindEvents() | |
} | |
}, | |
{ | |
key: 'onDocumentClick', | |
value: function (e) { | |
d(e.target).closest(p).length || this.currentNavItem && this.setOpenStatus(this.currentNavItem, !1) | |
} | |
}, | |
{ | |
key: 'setOpenStatus', | |
value: function (e, t) { | |
e && (t ? (e.classList.add(m), this.currentNavItem = e) : (e.classList.remove(m), this.currentNavItem = null)) | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = g | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'services/WindowListener/WindowListener': 56 | |
} | |
], | |
23: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('services/EventBus')), | |
c = r(e('components/ComponentBase')), | |
h = e('./ModalConstants'); | |
function d(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var f = function (e) { | |
return new CustomEvent('kraken-lazyload', { | |
detail: e | |
}) | |
}, | |
p = function (e) { | |
(0, a.default) (n, e); | |
var t = d(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this), | |
e ? (r.html = null, r.document = null, r.returnFocus = null, r.modal = null, r.trigger = e, r.modalClose = null, r.sneezeguard = null, r.viewIsEnabled = !1, r.modalIsActive = !1, r) : (0, o.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
this.setupHandlers().createChildren().enable() | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.disable().removeChildren(), | |
this | |
} | |
}, | |
{ | |
key: 'setupHandlers', | |
value: function () { | |
return this.onTriggerClickHandler = this.onTriggerClick.bind(this), | |
this.onCloseClickHandler = this.onCloseClick.bind(this), | |
this.onKeyUpHandler = this.onKeyUp.bind(this), | |
this.onSneezeguardClickHandler = this.onSneezeguardClick.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'createChildren', | |
value: function () { | |
return this.html = document.getElementsByTagName('html') [0], | |
this.document = document, | |
this | |
} | |
}, | |
{ | |
key: 'removeChildren', | |
value: function () { | |
return this.html = null, | |
this.document = null, | |
this.modal = null, | |
this.trigger = null, | |
this.modalClose = null, | |
this.sneezeguard = null, | |
this.returnFocus = null, | |
this | |
} | |
}, | |
{ | |
key: 'enable', | |
value: function () { | |
return this.viewIsEnabled || (this.trigger.addEventListener(h.EVENTS.CLICK, this.onTriggerClickHandler), this.document.addEventListener(h.EVENTS.KEY_UP, this.onKeyUpHandler), this.viewIsEnabled = !0), | |
this | |
} | |
}, | |
{ | |
key: 'disable', | |
value: function () { | |
return this.viewIsEnabled ? (this.trigger.removeEventListener(h.EVENTS.CLICK, this.onTriggerClickHandler), this.modalClose && this.modalClose.removeEventListener(h.EVENTS.CLICK, this.onCloseClickHandler), this.document.removeEventListener(h.EVENTS.CLICK, this.onSneezeguardClickHandler), this.document.removeEventListener(h.EVENTS.KEY_UP, this.onKeyUpHandler), this.viewIsEnabled = !1, this) : this | |
} | |
}, | |
{ | |
key: 'modalBroadcast', | |
value: function () { | |
var e = this.modal.getAttribute('id'), | |
t = this.modalIsActive ? ''.concat(e, 'Show') : ''.concat(e, 'Hide'); | |
this.modalIsActive, | |
u.default.broadcast(t) | |
} | |
}, | |
{ | |
key: 'showModal', | |
value: function (e) { | |
this.modalIsActive = !0, | |
this.toggleModal(e), | |
this.modalBroadcast() | |
} | |
}, | |
{ | |
key: 'hideModal', | |
value: function (e) { | |
this.modalIsActive = !1, | |
this.toggleModal(e), | |
this.modalBroadcast() | |
} | |
}, | |
{ | |
key: 'toggleModal', | |
value: function (e) { | |
var t = this; | |
return this.modalIsActive ? (this.html.classList.add(h.CLASSES.HAS_MODAL), e.classList.add(h.CLASSES.MODAL_IS_OPEN), setTimeout((function () { | |
t.tabbingContext = Drupal.tabbingManager.constrain('#'.concat(e.id)) | |
}), 100), Drupal.announce(Drupal.t('Tabbing is constrained to modal.')), void Drupal.announce(Drupal.t('Press the esc key to exit.'))) : (e.classList.remove(h.CLASSES.MODAL_IS_OPEN), this.tabbingContext.release(), this.returnFocus && this.returnFocus.focus(), this) | |
} | |
}, | |
{ | |
key: 'onTriggerClick', | |
value: function (e) { | |
e.preventDefault(), | |
e.stopPropagation(), | |
this._getModalTarget(e), | |
this.modal && (null == this.returnFocus && (this.returnFocus = e.currentTarget), this.showModal(this.modal), window.dispatchEvent(f({ | |
lazyTarget: this.modal | |
}))) | |
} | |
}, | |
{ | |
key: 'onCloseClick', | |
value: function (e) { | |
e.preventDefault(), | |
this.modal && this.hideModal(this.modal) | |
} | |
}, | |
{ | |
key: 'onKeyUp', | |
value: function (e) { | |
'Escape' === e.key && this.modalIsActive && this.hideModal(this.modal) | |
} | |
}, | |
{ | |
key: 'onSneezeguardClick', | |
value: function (e) { | |
this.modalIsActive && this.hideModal(this.modal) | |
} | |
}, | |
{ | |
key: '_getModalTarget', | |
value: function (e) { | |
var t = e.currentTarget.getAttribute('href'); | |
this._setModalTarget(t) | |
} | |
}, | |
{ | |
key: '_setModalTarget', | |
value: function (e) { | |
this.modal = document.querySelector(e), | |
this.modalClose = this.modal.querySelector(h.SELECTORS.MODAL_CLOSE_CLASS), | |
this.modalClose.addEventListener(h.EVENTS.CLICK, this.onCloseClickHandler), | |
this.sneezeguard = this.modal.querySelector(h.SELECTORS.SNEEZEGUARD), | |
this.sneezeguard.addEventListener(h.EVENTS.CLICK, this.onSneezeguardClickHandler) | |
} | |
} | |
]), | |
n | |
}(c.default); | |
n.default = p | |
}, | |
{ | |
'./ModalConstants': 24, | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'services/EventBus': 50 | |
} | |
], | |
24: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.KEYS = n.EVENTS = n.SELECTORS = n.CLASSES = void 0; | |
n.CLASSES = { | |
MODAL_IS_OPEN: 'modal_isOpen', | |
SNEEZEGUARD: 'modal-sneezeguard', | |
IS_ACTIVE: 'isActive', | |
IS_HIDDEN: 'isHidden', | |
HAS_MODAL: 'hasModal', | |
MODAL_TRIGGER_CLASS: 'js-kraken-modal_trigger', | |
MODAL_CLOSE_CLASS: '.js-kraken-modal-close' | |
}; | |
n.SELECTORS = { | |
SNEEZEGUARD: '.modal-sneezeguard', | |
MODAL_TRIGGER_CLASS: '.js-kraken-modal_trigger', | |
MODAL_TARGET_CLASS: '.js-kraken-modal_target', | |
MODAL_CONTENT_CLASS: '.js-kraken-modal-wrapper', | |
MODAL_CLOSE_CLASS: '.js-kraken-modal-close' | |
}; | |
n.EVENTS = { | |
CLICK: 'click', | |
KEY_UP: 'keyup', | |
TRANSITION_END: 'transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd' | |
}; | |
n.KEYS = [ | |
27 | |
] | |
}, | |
{ | |
} | |
], | |
25: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/slicedToArray')), | |
s = r(e('@babel/runtime/helpers/classCallCheck')), | |
a = r(e('@babel/runtime/helpers/createClass')), | |
o = r(e('@babel/runtime/helpers/inherits')), | |
l = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
u = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
c = r(e('components/ComponentBase')), | |
h = r(e('services/AjaxService/HelpfulnessAjaxService')), | |
d = r(e('services/AjaxService/ReportReviewAjaxService')); | |
function f(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, u.default) (e); | |
if (t) { | |
var i = (0, u.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, l.default) (this, n) | |
} | |
} | |
var p = '.reviewActions', | |
v = '.reviewActions-btn_isHelpful', | |
m = '.reviewActions-btn_isNotHelpful', | |
g = '.reviewActions-btn_report', | |
y = '.js-kraken-review-thank-you', | |
b = 'div', | |
C = 'Thank you for your feedback!', | |
k = function (e) { | |
(0, o.default) (n, e); | |
var t = f(n); | |
function n(e) { | |
var r; | |
return (0, s.default) (this, n), | |
r = t.call(this), | |
e ? (r.element = e, r.helpfulnessService = h.default, r.reportReviewService = d.default, r.init(e), r) : (0, l.default) (r) | |
} | |
return (0, a.default) (n, [ | |
{ | |
key: 'init', | |
value: function (e) { | |
this.setUpHandlers(), | |
this.createChildren(), | |
this.bindEvents() | |
} | |
}, | |
{ | |
key: 'createChildren', | |
value: function () { | |
return this.helpfulBtn = this.element.querySelector(v), | |
this.notHelpfulBtn = this.element.querySelector(m), | |
this.reportBtn = this.element.querySelector(g), | |
this | |
} | |
}, | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.helpfulClickedHandler = this.helpfulClicked.bind(this), | |
this.notHelpfulClickedHandler = this.notHelpfulClicked.bind(this), | |
this.reportClickedHandler = this.reportClicked.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return this.helpfulBtn.addEventListener('click', this.helpfulClickedHandler), | |
this.notHelpfulBtn.addEventListener('click', this.notHelpfulClickedHandler), | |
this.reportBtn.addEventListener('click', this.reportClickedHandler), | |
this | |
} | |
}, | |
{ | |
key: 'unBindEvents', | |
value: function () { | |
return this.helpfulBtn.removeEventListener('click', this.helpfulClickedHandler), | |
this.notHelpfulBtn.removeEventListener('click', this.notHelpfulClickedHandler), | |
this.reportBtn.removeEventListener('click', this.reportClickedHandler), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
this.unBindEvents(), | |
this.helpfulBtn = null, | |
this.notHelpfulBtn = null, | |
this.reportBtn = null | |
} | |
}, | |
{ | |
key: 'helpfulClicked', | |
value: function (e) { | |
var t = this, | |
n = this.findReview(e.target), | |
r = (0, i.default) (n, 2), | |
s = r[0], | |
a = r[1]; | |
this.helpfulnessService.do(a, 'Positive').done((function () { | |
t.showThankYou(s) | |
})) | |
} | |
}, | |
{ | |
key: 'notHelpfulClicked', | |
value: function (e) { | |
var t = this, | |
n = this.findReview(e.target), | |
r = (0, i.default) (n, 2), | |
s = r[0], | |
a = r[1]; | |
this.helpfulnessService.do(a, 'Negative').done((function () { | |
t.showThankYou(s) | |
})) | |
} | |
}, | |
{ | |
key: 'reportClicked', | |
value: function (e) { | |
var t = this, | |
n = this.findReview(e.target), | |
r = (0, i.default) (n, 2), | |
s = r[0], | |
a = r[1]; | |
this.reportReviewService.do(a, 'inappropriate').done((function () { | |
t.showThankYou(s) | |
})) | |
} | |
}, | |
{ | |
key: 'showThankYou', | |
value: function (e) { | |
this.thankYouElement = document.createElement(b); | |
var t = document.createTextNode(Drupal.t(C)); | |
for (this.thankYouElement.appendChild(t), this.thankYouElement.className = y; e.firstChild; ) e.removeChild(e.firstChild); | |
e.appendChild(this.thankYouElement) | |
} | |
}, | |
{ | |
key: 'findReview', | |
value: function (e) { | |
var t = this.closest(e, p); | |
return [t, | |
t.dataset.contentId] | |
} | |
} | |
]), | |
n | |
}(c.default); | |
n.default = k | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'@babel/runtime/helpers/slicedToArray': 80, | |
'components/ComponentBase': 8, | |
'services/AjaxService/HelpfulnessAjaxService': 48, | |
'services/AjaxService/ReportReviewAjaxService': 49 | |
} | |
], | |
26: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/ComponentBase')); | |
function c(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var h = window.jQuery, | |
d = 'body, html', | |
f = function (e) { | |
(0, a.default) (n, e); | |
var t = c(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
(r = t.call(this)).scrollLink = e, | |
r.init(), | |
r | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.setUpHandlers(), | |
this.bindEvents(), | |
this | |
} | |
}, | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.scrollToHrefHandler = this.scrollToHref.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return this.scrollLink.addEventListener('click', this.scrollToHrefHandler), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.scrollLink.removeEventListener('click', this.scrollToHrefHandler), | |
this.scrollLink = null, | |
this | |
} | |
}, | |
{ | |
key: 'scrollToHref', | |
value: function (e) { | |
var t = this, | |
n = e.currentTarget.hash; | |
if (n) { | |
var r, | |
i = h(n); | |
h('.navigation-main'); | |
return i.length && (e.preventDefault(), r = i.offset().top, h(d).animate({ | |
scrollTop: ''.concat(r, 'px') | |
}, { | |
duration: 500, | |
done: function () { | |
i.focus(), | |
t.updateHash(n) | |
} | |
})), | |
this | |
} | |
} | |
}, | |
{ | |
key: 'updateHash', | |
value: function (e) { | |
location.hash = e | |
} | |
} | |
], [ | |
{ | |
key: 'scrollToTarget', | |
value: function (e) { | |
if (e) { | |
var t, | |
n = h(e); | |
h('.navigation-main'); | |
return n.length && (t = n.offset().top, h(d).animate({ | |
scrollTop: ''.concat(t, 'px') | |
}, { | |
duration: 500, | |
done: function () { | |
return n.focus() | |
} | |
})), | |
this | |
} | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = f | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8 | |
} | |
], | |
27: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/toConsumableArray')), | |
s = r(e('@babel/runtime/helpers/classCallCheck')), | |
a = r(e('@babel/runtime/helpers/createClass')), | |
o = r(e('services/EventBus')), | |
l = r(e('utils/setMultipleAttributes')), | |
u = '.js-searchList-item', | |
c = '.js-searchList-ft', | |
h = '.js-searchList-group-title', | |
d = '.js-searchList-more-btn', | |
f = 'isNotMatch', | |
p = 'hasNoMatches', | |
v = 'isOverflow', | |
m = 'hasOverflow', | |
g = { | |
QUERY_LENGTH: 3, | |
SHOW_MAX: 12, | |
SHOW_MORE_MSG: window.Drupal.t('See All'), | |
SHOW_LESS_MSG: window.Drupal.t('See Less') | |
}, | |
y = function (e) { | |
return new CustomEvent('kraken-lazyload', { | |
detail: e | |
}) | |
}, | |
b = function () { | |
function e(t) { | |
(0, s.default) (this, e), | |
this.searchList = t, | |
this.searchListItems = { | |
all: null, | |
matches: null, | |
hidden: null, | |
overflow: null | |
}, | |
this.matchCount = null, | |
this.isExpanded = !1, | |
this.groupTitle = null, | |
this.init() | |
} | |
return (0, a.default) (e, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.setUpHandlers(), | |
this.createChildren(), | |
this.bindEvents(), | |
this.searchListItems.all = this.buildItemCatalog(this.searchItems), | |
this.searchListItems.overflow = this.setInitialOverflow(this.searchListItems.all), | |
this.render(), | |
this.searchListItems.matches = null, | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return o.default.on('searchListQueryChange', this.onQueryChangeHandler), | |
this.showMoreBtn.addEventListener('click', this.onShowMoreClickHandler), | |
this | |
} | |
}, | |
{ | |
key: 'createChildren', | |
value: function () { | |
return this.searchItems = (0, i.default) (this.searchList.querySelectorAll(u)), | |
this.searchListFooter = this.searchList.querySelector(c), | |
this.showMoreBtn = this.searchList.querySelector(d), | |
this.groupTitle = this.searchList.querySelector(h).innerText, | |
this.renderBtn(), | |
this | |
} | |
}, | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.onQueryChangeHandler = this.onQueryChange.bind(this), | |
this.onShowMoreClickHandler = this.onShowMoreClick.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return o.default.off('searchListQueryChange', this.onQueryChangeHandler), | |
this.showMoreBtn.removeEventListener('click', this.onShowMoreClickHandler), | |
this.searchItems = null, | |
this.searchListFooter = null, | |
this.showMoreBtn = null, | |
this.groupTitle = null, | |
this | |
} | |
}, | |
{ | |
key: 'onShowMoreClick', | |
value: function () { | |
this.isExpanded = !this.isExpanded, | |
this.toggleOverflow(this.searchListItems.overflow), | |
this.updateBtn(this.isExpanded), | |
window.instances.hasOwnProperty('lazyLoad') && window.dispatchEvent(y(null)) | |
} | |
}, | |
{ | |
key: 'buildItemCatalog', | |
value: function (e) { | |
return e.map((function (e) { | |
var t = { | |
element: e | |
}; | |
return (0, i.default) (e.querySelectorAll('[data-search-item]')).forEach((function (e) { | |
t[e.dataset.searchItem] = e.textContent.trim().toLowerCase() | |
})), | |
t | |
})) | |
} | |
}, | |
{ | |
key: 'updateContainer', | |
value: function (e) { | |
e.matches && e.matches.length <= 0 ? this.searchList.classList.add(p) : this.searchList.classList.remove(p), | |
this.hasOverflow ? this.searchList.classList.remove(m) : this.searchList.classList.add(m) | |
} | |
}, | |
{ | |
key: 'renderList', | |
value: function (e) { | |
e.matches && e.matches.length && e.matches.forEach((function (e) { | |
e.element.classList.remove(f), | |
e.element.classList.remove(v) | |
})), | |
e.overflow && e.overflow.length && e.overflow.forEach((function (e) { | |
e.element.classList.add(v), | |
e.element.classList.remove(f) | |
})), | |
e.hidden && e.hidden.length && e.hidden.forEach((function (e) { | |
e.element.classList.add(f), | |
e.element.classList.remove(v) | |
})) | |
} | |
}, | |
{ | |
key: 'onQueryChange', | |
value: function (e) { | |
e.length >= g.QUERY_LENGTH ? (this.findString(e.toLowerCase(), this.searchListItems.all), window.instances.hasOwnProperty('lazyLoad') && window.setTimeout((function () { | |
window.dispatchEvent(y({ | |
lazyTarget: ''.concat(u, ':not(.isNotMatch)') | |
})) | |
}), 300)) : (this.findString('', this.searchListItems.all), window.instances.hasOwnProperty('lazyLoad') && window.dispatchEvent(y(null))), | |
this.render() | |
} | |
}, | |
{ | |
key: 'render', | |
value: function () { | |
var e = this.searchListItems; | |
this.toggleOverflow(e.overflow), | |
this.updateContainer(e), | |
this.renderList(e) | |
} | |
}, | |
{ | |
key: 'toggleOverflow', | |
value: function (e) { | |
var t = this; | |
return e.forEach((function (e) { | |
t.isExpanded ? e.element.classList.remove(v) : e.element.classList.add(v) | |
})), | |
this.setOverflowStatus(e) | |
} | |
}, | |
{ | |
key: 'setInitialOverflow', | |
value: function (e) { | |
return e.filter((function (e, t) { | |
return t >= g.SHOW_MAX | |
})) | |
} | |
}, | |
{ | |
key: 'setOverflowStatus', | |
value: function (e) { | |
return this.hasOverflow = e.length > 0, | |
this.hasOverflow | |
} | |
}, | |
{ | |
key: 'findString', | |
value: function (e, t) { | |
var n = this; | |
this.searchListItems.matches = [ | |
], | |
this.searchListItems.overflow = [ | |
], | |
this.searchListItems.hidden = [ | |
]; | |
var r = 0; | |
return t.forEach((function (t) { | |
var i = !1; | |
for (var s in t) { | |
if (t.hasOwnProperty(s) && 'element' !== s) if (t[s].indexOf(e) > - 1) return n.searchListItems.matches.push(t), | |
++r > g.SHOW_MAX && n.searchListItems.overflow.push(t), | |
void (i = !0) | |
} | |
if (!i) return n.searchListItems.hidden.push(t) | |
})), | |
this.searchListItems | |
} | |
}, | |
{ | |
key: 'renderBtn', | |
value: function () { | |
var e = ''.concat(g.SHOW_MORE_MSG, ' ').concat(this.groupTitle); | |
this.showMoreBtn.innerHTML = e | |
} | |
}, | |
{ | |
key: 'updateBtn', | |
value: function (e) { | |
var t = e ? g.SHOW_LESS_MSG : g.SHOW_MORE_MSG, | |
n = t.toLowerCase(), | |
r = { | |
'data-event-description': n, | |
'data-label': n | |
}; | |
this.showMoreBtn.innerHTML = ''.concat(t, ' ').concat(this.groupTitle), | |
(0, l.default) (this.showMoreBtn, r) | |
} | |
} | |
]), | |
e | |
}(); | |
n.default = b | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/toConsumableArray': 81, | |
'services/EventBus': 50, | |
'utils/setMultipleAttributes': 61 | |
} | |
], | |
28: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('services/EventBus')), | |
o = r(e('utils/debounce')), | |
l = r(e('services/GoogleTagManagerService')), | |
u = 250, | |
c = 1000, | |
h = function () { | |
function e(t) { | |
(0, i.default) (this, e), | |
this.searchListInput = t, | |
this.init() | |
} | |
return (0, s.default) (e, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.setUpHandlers(), | |
this.bindEvents(), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return this.searchListInput.addEventListener('keydown', this.onEnter), | |
this.searchListInput.addEventListener('keyup', this.onInputChangeHandler), | |
this.searchListInput.addEventListener('keyup', this.onInputTrackHandler), | |
this | |
} | |
}, | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.onInputChangeHandler = (0, o.default) (this.onInputChange.bind(this), u), | |
this.onInputTrackHandler = (0, o.default) (this.onInputTrack.bind(this), c), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.searchListInput.removeEventListener('keyup', this.onInputChangeHandler), | |
this.searchListInput.removeEventListener('keyup', this.onInputTrackHandler), | |
this.searchListInput = null, | |
this | |
} | |
}, | |
{ | |
key: 'onInputChange', | |
value: function (e) { | |
var t = e.target.value; | |
a.default.broadcast('searchListQueryChange', t) | |
} | |
}, | |
{ | |
key: 'onInputTrack', | |
value: function (e) { | |
var t = e.target.value, | |
n = e.target.dataset; | |
l.default.defaultDispatch(n.trackingCategory, n.trackingAction, t, n.eventId, n.eventDescription) | |
} | |
}, | |
{ | |
key: 'onEnter', | |
value: function (e) { | |
'Enter' === e.key && e.preventDefault() | |
} | |
} | |
]), | |
e | |
}(); | |
n.default = h | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'services/EventBus': 50, | |
'services/GoogleTagManagerService': 51, | |
'utils/debounce': 60 | |
} | |
], | |
29: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/ComponentBase')), | |
c = r(e('services/SocialSharingService/TwitterSharingService')), | |
h = r(e('services/SocialSharingService/FacebookSharingService')); | |
function d(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var f = '.socialBtn_like', | |
p = '.socialBtn_tweet', | |
v = function (e) { | |
(0, a.default) (n, e); | |
var t = d(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this), | |
e ? (r.socialBtn = e, r.serviceMap = [ | |
{ | |
selector: f, | |
service: h.default | |
}, | |
{ | |
selector: p, | |
service: c.default | |
} | |
], r.init(), r) : (0, o.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
this.setUpHandlers(), | |
this.bindEvents() | |
} | |
}, | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.onClickHandler = this.onClick.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return this.socialBtn.addEventListener('click', this.onClickHandler), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.socialBtn.removeEventListener('click', this.onClickHandler), | |
this.socialBtn = null, | |
this | |
} | |
}, | |
{ | |
key: 'onClick', | |
value: function (e) { | |
var t = this.determineService(e.currentTarget), | |
n = t.service, | |
r = t.callback, | |
i = this.determineShare(e.currentTarget), | |
s = i.href, | |
a = i.text; | |
n && n.do({ | |
href: s, | |
text: a, | |
callback: r | |
}) | |
} | |
}, | |
{ | |
key: 'determineService', | |
value: function (e) { | |
var t = this, | |
n = function (e) { | |
return console.log(e) | |
}, | |
r = this.serviceMap.filter((function (n) { | |
var r = n.selector; | |
return t.hasClass(e, r) | |
})).map((function (e) { | |
return { | |
service: e.service, | |
callback: e.callback || n | |
} | |
})); | |
if (r) return r[0] | |
} | |
}, | |
{ | |
key: 'determineShare', | |
value: function (e) { | |
return { | |
href: e.dataset.href, | |
text: e.dataset.text | |
} | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = v | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'services/SocialSharingService/FacebookSharingService': 53, | |
'services/SocialSharingService/TwitterSharingService': 55 | |
} | |
], | |
30: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/Toggle/Toggle')); | |
function c(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
window.jQuery; | |
var h = '.js-kraken-sortCtrl-trigger', | |
d = '.js-kraken-sortCtrl-target', | |
f = '.js-kraken-sortCtrl-hiddenTarget', | |
p = 'isActive', | |
v = 'isHidden', | |
m = 'Edit', | |
g = 'Close', | |
y = function (e) { | |
(0, a.default) (n, e); | |
var t = c(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this, e), | |
e ? r : (0, o.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'createChildren', | |
value: function () { | |
return this.toggleTrigger = this.element.querySelector(h), | |
this.toggleTarget = this.element.querySelector(d), | |
this.toggleHiddenTarget = this.element.querySelector(f), | |
this | |
} | |
}, | |
{ | |
key: 'updateToggle', | |
value: function () { | |
var e = this.element; | |
this.isOpen ? (e.classList.add(p), this.toggleTarget.classList.remove(v), this.toggleHiddenTarget && this.toggleHiddenTarget.classList.remove(v)) : (e.classList.remove(p), this.toggleTarget.classList.add(v), this.toggleHiddenTarget && this.toggleHiddenTarget.classList.add(v)), | |
this.updateToggleText(this.toggleTrigger), | |
this.updateAria() | |
} | |
}, | |
{ | |
key: 'updateToggleText', | |
value: function (e) { | |
var t = this.isOpen ? g : m; | |
e.innerHTML = t, | |
e.setAttribute('aria-label', ''.concat(t, ' filter')) | |
} | |
}, | |
{ | |
key: 'closeTogglesAtMobile', | |
value: function () { | |
var e = this.currentBreakpoint && 'SMALL' === this.currentBreakpoint; | |
return this.isOpen = !e, | |
this.isOpen | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = y | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/Toggle/Toggle': 37 | |
} | |
], | |
31: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/toConsumableArray')), | |
s = r(e('@babel/runtime/helpers/classCallCheck')), | |
a = r(e('@babel/runtime/helpers/createClass')), | |
o = r(e('@babel/runtime/helpers/inherits')), | |
l = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
u = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
c = r(e('components/ComponentBase')), | |
h = r(e('utils/createInstances')), | |
d = r(e('components/TheDecider/TheDeciderCarousel')), | |
f = r(e('services/EventBus')), | |
p = r(e('utils/strToBool')), | |
v = r(e('components/ActiveFilters/ActiveFilters')), | |
m = r(e('components/TheDecider/TheDeciderRadio_template.js')), | |
g = r(e('components/TheDecider/TheDeciderCheckbox_template.js')), | |
y = r(e('components/TheDecider/TheDeciderImageSelect_template.js')), | |
b = r(e('components/TheDecider/TheDeciderFilterGroup_template.js')); | |
function C(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, u.default) (e); | |
if (t) { | |
var i = (0, u.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, l.default) (this, n) | |
} | |
} | |
var k = window.jQuery, | |
S = window.drupalSettings, | |
Drupal = window.Drupal, | |
w = ('<button class="theDecider-results-header-subHead-btn">'.concat(Drupal.t('Start Over'), '</button>'), 'theDecider-resultMsg_isVisible'), | |
E = 'isHidden', | |
T = '.js-kraken-carousel_innerSlides', | |
L = '.js-kraken-carousel_progression', | |
x = '.js-kraken-carousel_currentStepProgression', | |
A = '.js-kraken-carousel_currentSlideProgression', | |
_ = '.js-kraken-filterCard-default', | |
R = '.js-layer-deciderResults', | |
D = '.js-kraken-filterCard-result', | |
O = '.filterCard-action', | |
I = '.views-exposed-form .js-form-submit', | |
P = '.js-theDecider-list', | |
M = '.js-theDecider-listItem', | |
j = '.views-exposed-form', | |
H = '.js-theDecider-resultMsg', | |
N = '.js-theDecider-resultMsg-action', | |
B = '.js-kraken-theDecider-action', | |
F = '.js-kraken-filterCard-resultReplace', | |
q = '.js-theDecider-related', | |
$ = '.js-active-filters-hd', | |
V = '.js-activeFilters', | |
U = '.js-activeFilters-target', | |
W = '.js-petfinder-search [data-drupal-selector="edit-breed"]', | |
z = function (e) { | |
(0, o.default) (n, e); | |
var t = C(n); | |
function n(e) { | |
var r; | |
return (0, s.default) (this, n), | |
r = t.call(this, e), | |
e ? (r.theDecider = e, r.filterData = S.selectorFilters, r.filterData ? (r.options = S.selectorFilters.options, r.selectorSlides = null, r.selectorProgression = null, r.defaultResultHTML = null, r.defaultHeaderActionHTML = null, r.currentStep = 0, r.hasStarted = !1, r.noResultsCount = 0, r.relatedBlock = null, r.activeFiltersContainer = r.theDecider.querySelector(''.concat(V)), r.activeFilters = new v.default(r.activeFiltersContainer, 'theDecider_remove'), r.resultLayer = document.querySelector(''.concat(R)), r.init(), r) : (0, l.default) (r)) : (0, l.default) (r) | |
} | |
return (0, a.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.setupHandlers(), | |
this.createChildren(), | |
this.renderFilterGroups(), | |
this.renderProgression(), | |
this.selectorCarousel = new d.default(this.theDecider), | |
this.theDeciderInputs = Array.prototype.slice.call(this.theDecider.querySelectorAll('input')), | |
this.resultMsgAction.addEventListener('click', this.onResultActionClickHandler), | |
this.defaultHeaderActionHTML = this.resultHeaderActions.innerHTML, | |
this.bindTriggerEvents(), | |
this | |
} | |
}, | |
{ | |
key: 'setupHandlers', | |
value: function () { | |
this.onInputChangeHandler = this.onInputChange.bind(this), | |
this.ontheDeciderStepHandler = this.ontheDeciderStep.bind(this), | |
this.onFormResetHandler = this.onFormReset.bind(this), | |
this.onResultActionClickHandler = this.onResultActionClick.bind(this), | |
this.onNextClickHandler = this.onNextClick.bind(this), | |
this.onActiveFiltersRemoveHandler = this.onActiveFiltersRemove.bind(this) | |
} | |
}, | |
{ | |
key: 'bindTriggerEvents', | |
value: function () { | |
var e = this; | |
this.triggerInputs = this.theDecider.querySelectorAll('.js-kraken-viewSelect-trigger'), | |
this.triggerInputs = Array.prototype.slice.call(this.triggerInputs), | |
this.triggerInputs.forEach((function (t) { | |
t.addEventListener('change', e.onInputChangeHandler) | |
})), | |
this.resultHeaderActions.forEach((function (t) { | |
t.addEventListener('click', e.onFormResetHandler) | |
})), | |
f.default.on('theDeciderStep', this.ontheDeciderStepHandler), | |
f.default.on('theDeciderNext', this.onNextClickHandler), | |
f.default.on('theDecider_remove', this.onActiveFiltersRemoveHandler) | |
} | |
}, | |
{ | |
key: 'createChildren', | |
value: function () { | |
return this.selectorSlides = this.theDecider.querySelector(T), | |
this.defaultResult = this.theDecider.querySelector(_), | |
this.resultSlide = this.theDecider.querySelector(D), | |
this.selectorProgression = this.theDecider.querySelector(L), | |
this.selectorCurrentStepProgression = this.theDecider.querySelector(x), | |
this.selectorCurrentSlideProgression = this.theDecider.querySelector(A), | |
this.resultReplace = this.theDecider.querySelector(F), | |
this.resultSlideAction = (0, i.default) (this.theDecider.querySelectorAll(O)), | |
this.resultMsg = document.querySelector(H), | |
this.resultMsgAction = this.resultMsg.querySelector(N), | |
this.resultHeaderActions = (0, i.default) (document.querySelectorAll(B)), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
var e = this; | |
return this.triggerInputs.forEach((function (t) { | |
t.removeEventListener('change', e.onInputChangeHandler) | |
})), | |
this.resultHeaderActions.forEach((function (t) { | |
t.removeEventListener('click', e.onFormResetHandler) | |
})), | |
f.default.off('theDeciderStep', this.ontheDeciderStepHandler), | |
f.default.off('theDeciderResult', this.ontheDeciderResultHandler), | |
f.default.off('theDeciderNext', this.onNextClickHandler), | |
this.triggerInputs = null, | |
this.selectorSlides = null, | |
this.defaultResult = null, | |
this.resultSlide = null, | |
this.selectorProgression = null, | |
this.resultReplace = null, | |
this.resultSlideAction = null, | |
this.resultMsg = null, | |
this.resultMsgAction = null, | |
this.resultHeaderActions = null, | |
this.selectorCarousel.destroy(), | |
this.selectorCarousel = null, | |
this | |
} | |
}, | |
{ | |
key: 'buildFilterGroups', | |
value: function () { | |
var e = this, | |
t = this.filterData.slides, | |
n = this.options; | |
return n.hasImageAnswers = (0, p.default) (n.hasImageAnswers), | |
Object.keys(t).map((function (r) { | |
var i = t[r], | |
s = { | |
filterClass: null, | |
filters: null, | |
image: i.question_image, | |
question: i.question, | |
subtext: null, | |
type: i.type, | |
hasImageAnswers: n.hasImageAnswers | |
}; | |
n.hasImageAnswers && i.inputs.shift(); | |
var a = i.inputs.length; | |
return a > 5 && (a = 4), | |
s.filterClass = n.hasImageAnswers ? 'filterCard-filters_hasImages filterCard-filters_'.concat(a, 'up') : '', | |
s.subText = 'radios' === i.type ? Drupal.t('Choose One') : Drupal.t('Choose One or More'), | |
i.inputs && (s.filters = e.buildFilters(i, r)), | |
(0, b.default) (s) | |
})) | |
} | |
}, | |
{ | |
key: 'buildFilters', | |
value: function (e, t) { | |
var n = this, | |
r = this.options; | |
return r.hasImageAnswers = (0, p.default) (r.hasImageAnswers), | |
e.inputs.map((function (r, i) { | |
var s = { | |
id: ''.concat(t, '_').concat(i), | |
name: t, | |
label: r.label, | |
image: r.image, | |
answerText: r.answer && 'null' !== r.answer ? r.answer : r.label, | |
targetAttr: 'nopref' === r.value ? '' : 'data-target-input="'.concat(r.element_name, '"'), | |
elementType: 'checkboxes' === e.type ? 'checkbox' : 'radio' | |
}; | |
return n.buildFilterMarkup(s) | |
})).join('') | |
} | |
}, | |
{ | |
key: 'buildFilterMarkup', | |
value: function (e) { | |
return (0, p.default) (this.options.hasImageAnswers) ? (0, y.default) (e) : 'checkbox' === e.elementType ? (0, g.default) (e) : 'radio' === e.elementType ? (0, m.default) (e) : void 0 | |
} | |
}, | |
{ | |
key: 'renderFilterGroups', | |
value: function () { | |
this.selectorSlides.insertAdjacentHTML('afterbegin', this.buildFilterGroups().join('')) | |
} | |
}, | |
{ | |
key: 'renderProgression', | |
value: function () { | |
var e = Object.keys(this.filterData.slides).length, | |
t = ''; | |
if (this.selectorProgression) { | |
for (var n = 0; n < e + 1; n++) { | |
var r = ''.concat(Drupal.t('View slide'), ' ').concat(n + 1), | |
i = 0, | |
s = !1; | |
this.selectorCurrentStepProgression && (r = ''.concat(Drupal.t('Step'), ' ').concat(n + 1, ' ').concat(Drupal.t('of'), ' ').concat(e + 1), i = - 1, s = !0), | |
t += '<li> <a href="#" role="button" class="js-kraken-carousel_thumbnail-link theDeciderCarousel-progression-dot" aria-label="'.concat(r, '" tabindex="').concat(i, '" aria-hidden="').concat(s, '">').concat(n + 1, '</a>\n </li>') | |
} | |
this.selectorProgression.innerHTML = t | |
} | |
} | |
}, | |
{ | |
key: 'onInputChange', | |
value: function (e) { | |
var t = e.target.dataset.targetInput; | |
if (t) { | |
var n = e.target; | |
document.querySelector('[data-drupal-selector^='.concat(t, ']')).click(), | |
k(n).attr('aria-checked', e.target.checked), | |
this.toggleActiveClass(n), | |
this.hasStarted = !0 | |
} | |
} | |
}, | |
{ | |
key: 'ontheDeciderStep', | |
value: function (e) { | |
var t = this; | |
if (this.resultCount = this.getItemCount(), 'last' === e || this.resultCount <= 1) { | |
var n = document.querySelectorAll('[data-drupal-selector]:checked:not([type=radio])'); | |
[ | |
].forEach.call(n, (function (e) { | |
t.activeFilters.add(e.dataset.drupalSelector, e.nextElementSibling.innerText) | |
})), | |
this.buildResultSlide(this.resultCount), | |
this.getSelectorItemsOffset() | |
} | |
this.resultCount <= 1 && (e > this.currentStep || 'last' === e) ? (this.selectorCarousel.moveToSlide(this.selectorCarousel.slideCount - 1), this.currentStep = this.selectorCarousel.slideCount - 1) : this.currentStep = e, | |
this.toggleResultMsg(e), | |
(0, p.default) (this.options.isRecommended) && this.toggleRelatedBlock(e) | |
} | |
}, | |
{ | |
key: 'toggleActiveClass', | |
value: function () { | |
(0, p.default) (this.options.hasImageAnswers) && this.triggerInputs.forEach((function (e) { | |
e.checked ? e.parentNode.classList.add(e.dataset.activeClass) : e.parentNode.classList.remove(e.dataset.activeClass) | |
})) | |
} | |
}, | |
{ | |
key: 'onActiveFiltersRemove', | |
value: function (e) { | |
this.activeFilters._filters[e.id] && (this.activeFilters._filters[e.id].isActive = !1), | |
document.querySelector('[data-drupal-selector*='.concat(e.id, ']')).click(), | |
this.resultLayer.children[0].style.opacity = '0' | |
} | |
}, | |
{ | |
key: 'getItemCount', | |
value: function () { | |
return this.theDeciderItems = document.querySelectorAll(M), | |
this.theDeciderItems.length | |
} | |
}, | |
{ | |
key: 'getSelectorItemsOffset', | |
value: function () { | |
if (this.theDeciderItems.length) { | |
var e = window.pageYOffset || document.documentElement.scrollTop; | |
this.selectorItemsOffset = this.theDeciderItems[0].getBoundingClientRect().top + e | |
} | |
} | |
}, | |
{ | |
key: 'buildResultSlide', | |
value: function (e) { | |
var t = this; | |
this.FusepumpComponent && this.FusepumpComponent.length && (this.FusepumpComponent.forEach((function (e) { | |
return e.destroy() | |
})), this.FusepumpComponent = null); | |
var n = this.theDecider.querySelectorAll('\n '.concat(V, ',\n ').concat($, '\n ')); | |
if (this.activeFilters.getFilters().length > 0 && [ | |
].forEach.call(n, (function (e) { | |
e.classList.remove(''.concat(E)) | |
})), e < 1) return this.defaultResult.classList.remove(E), | |
this.resultSlide.classList.add(E), | |
this.resultLayer.classList.add(E), | |
void this.noResultsCount++; | |
this.defaultResult.classList.add(E), | |
this.resultSlide.classList.remove(E), | |
this.resultReplace.innerHTML = this.buildResultMarkup(this.theDeciderItems), | |
this.resultReplace.querySelector(''.concat(B)) && this.resultReplace.querySelector(''.concat(B)).addEventListener('click', this.onFormResetHandler), | |
this.resultReplace.querySelector('.ps-widget') && this.resultReplace.querySelector('.ps-widget').addEventListener('click', (function () { | |
event.preventDefault(), | |
t.bestMatch.querySelector('.ps-widget').click() | |
})); | |
var r = this.resultReplace.querySelector('.js-activeFilters-target'), | |
i = this.activeFilters.getFilters(); | |
i.length && (r = new v.default(r, 'theDecider_remove')).set(i); | |
var s = this.theDecider.querySelectorAll('\n '.concat($, ',\n ').concat(U, '\n ')); | |
this.activeFilters.getFilters().length > 0 && [ | |
].forEach.call(s, (function (e) { | |
e.classList.remove(''.concat(E)) | |
})), | |
k(W).each((function () { | |
var e = k(''.concat(D, ' [data-petfinder-breed]')).data('petfinderBreed'); | |
e && k(this).val(e) | |
})), | |
this.FusepumpComponent = (0, h.default) (Drupal.KrakenFusepump, '.js-kraken-filterCard-resultReplace .js-kraken-fusepump-component'), | |
this.FusepumpComponent && this.FusepumpComponent.length && this.FusepumpComponent.forEach((function (e) { | |
return e.init() | |
})), | |
this.noResultsCount = 0 | |
} | |
}, | |
{ | |
key: 'buildResultMarkup', | |
value: function (e) { | |
var t = this.options.resultCount ? parseInt(this.options.resultCount, 10) : 1, | |
n = Math.floor(Math.random() * (e.length - 1)), | |
r = document.querySelector(''.concat(P)), | |
i = r.children[n], | |
s = '<div class="theDecider-output"><div class="theDecider-output-item">'.concat(i.innerHTML, '</div></div>'); | |
if (t > 1 && r.children.length > 1) { | |
r.removeChild(i); | |
for (var a = r.children.length - 1; a >= 0; a--) r.appendChild(r.children[Math.floor(Math.random() * a)]); | |
for (; r.children.length >= t; ) r.removeChild(r.firstChild); | |
this.resultLayer.classList.remove(''.concat(E)) | |
} | |
return this.bestMatch = i, | |
s | |
} | |
}, | |
{ | |
key: 'onFormReset', | |
value: function (e) { | |
e.preventDefault(), | |
this.resultLayer.classList.add(''.concat(E)), | |
this.activeFilters.reset(); | |
var t = this.theDecider.querySelectorAll('\n '.concat(V, ',\n ').concat($, ',\n ').concat(U, '\n ')); | |
if ([].forEach.call(t, (function (e) { | |
e.classList.add(''.concat(E)) | |
})), 'string' == typeof this.options.resetUrl && this.options.resetUrl.length) window.location.replace(this.options.resetUrl); | |
else { | |
for (var n = Array.prototype.slice.call(document.querySelector(j).elements).concat(this.theDeciderInputs), r = 0; r < n.length; r++) 'checkbox' !== n[r].type && 'radio' !== n[r].type || (n[r].checked = !1), | |
'select' === n[r].type && (n[r].selectedIndex = 0); | |
this.triggerFormUpdate(), | |
f.default.broadcast('deciderReset'), | |
this.selectorCarousel.moveToSlide(0, 'reset'), | |
this.hasStarted = !1, | |
this.toggleActiveClass() | |
} | |
} | |
}, | |
{ | |
key: 'onNextClick', | |
value: function () { | |
var e; | |
'last' === this.currentStep ? (e = this.selectorCarousel.slideCount - 2, document.querySelector(''.concat(T)).childNodes[e]) : (e = this.currentStep - 1, document.querySelector(''.concat(T)).childNodes[e]) | |
} | |
}, | |
{ | |
key: 'onResultActionClick', | |
value: function (e) { | |
e.preventDefault(), | |
k('body, html').animate({ | |
scrollTop: ''.concat(this.selectorItemsOffset, 'px') | |
}, 500) | |
} | |
}, | |
{ | |
key: 'triggerFormUpdate', | |
value: function () { | |
return document.querySelector(I).click() | |
} | |
}, | |
{ | |
key: 'toggleResultMsg', | |
value: function (e) { | |
'last' === e && this.theDeciderItems.length ? this.resultMsg.classList.add(w) : this.resultMsg.classList.remove(w) | |
} | |
}, | |
{ | |
key: 'toggleRelatedBlock', | |
value: function () { | |
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0; | |
if ('last' === e) { | |
var t = document.querySelector(q); | |
if (!t) return; | |
t.classList.remove(E) | |
} else if ('0' === e) { | |
var n = document.querySelector(q); | |
if (!n) return; | |
n.classList.add(E) | |
} | |
} | |
} | |
]), | |
n | |
}(c.default); | |
Drupal.behaviors.theDecider = { | |
attach: function (e, t) { | |
window.krakenInstances = window.krakenInstances ? window.krakenInstances : { | |
}; | |
var n = window.krakenInstances.theDecider || null, | |
r = k('.js-kraken-theDecider', e).once('theDecider_init'); | |
if (r.length && (window.krakenInstances.theDecider = new z(r[0], t)), n) { | |
var i = k(e).hasClass('view-kraken-selector'), | |
s = n.currentStep === Object.keys(n.filterData.slides).length; | |
if (i && s) { | |
var a = n.getItemCount(); | |
a > 0 && (n.buildResultSlide(a), n.resultLayer.children[0].style.opacity = '1') | |
} | |
} | |
} | |
}; | |
var G = z; | |
n.default = G | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'@babel/runtime/helpers/toConsumableArray': 81, | |
'components/ActiveFilters/ActiveFilters': 3, | |
'components/ComponentBase': 8, | |
'components/TheDecider/TheDeciderCarousel': 32, | |
'components/TheDecider/TheDeciderCheckbox_template.js': 33, | |
'components/TheDecider/TheDeciderFilterGroup_template.js': 34, | |
'components/TheDecider/TheDeciderImageSelect_template.js': 35, | |
'components/TheDecider/TheDeciderRadio_template.js': 36, | |
'services/EventBus': 50, | |
'utils/createInstances': 58, | |
'utils/strToBool': 62 | |
} | |
], | |
32: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/Carousel/LegacyCarousel')), | |
c = r(e('services/EventBus')); | |
function h(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var Drupal = window.Drupal, | |
d = 'isCompleted', | |
f = 'isDone', | |
p = 'isHidden', | |
v = { | |
MATCH: Drupal.t('See My Top Match'), | |
DONE: Drupal.t('Done!') | |
}, | |
m = function (e) { | |
(0, a.default) (n, e); | |
var t = h(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
(r = t.call(this, e)).isLastSlide = null, | |
r.isLastFilter = null, | |
r.progressIndex = null, | |
r.setUpHandlers(), | |
c.default.on('deciderReset', r.onDeciderResetHandler), | |
r | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.onDeciderResetHandler = this.onDeciderReset.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'setProgressIndex', | |
value: function (e) { | |
if (!(this.progressIndex >= e)) return this.progressIndex = e, | |
this.progressIndex | |
} | |
}, | |
{ | |
key: 'toggleLastHTML', | |
value: function (e) { | |
this.defaultLastBtnHTML || (this.defaultLastBtnHTML = this.carouselNextNavText.innerHTML); | |
var t = e || this.defaultLastBtnHTML; | |
this.carouselNextNavText.innerHTML = t | |
} | |
}, | |
{ | |
key: 'checkForLastFilter', | |
value: function () { | |
return this.isLastFilter = this.currentSlide === this.slideCount - 2, | |
this.isLastFilter | |
} | |
}, | |
{ | |
key: 'checkForLastSlide', | |
value: function () { | |
return this.isLastSlide = this.currentSlide === this.slideCount - 1, | |
this.isLastSlide | |
} | |
}, | |
{ | |
key: 'onNextNavClick', | |
value: function (e) { | |
this.currentEventId = e.currentTarget.dataset.eventId, | |
this.moveToSlide(this.currentSlide + 1), | |
this._render(), | |
c.default.broadcast('theDeciderNext', ''.concat(this.currentSlide + 1)) | |
} | |
}, | |
{ | |
key: 'onPreviousNavClick', | |
value: function (e) { | |
c.default.broadcast('theDeciderPrevious', ''.concat(this.currentSlide)), | |
this.currentEventId = e.currentTarget.dataset.eventId, | |
this.moveToSlide(this.currentSlide - 1), | |
this._render() | |
} | |
}, | |
{ | |
key: 'onDeciderReset', | |
value: function () { | |
return this.progressIndex = null, | |
this.progressIndex | |
} | |
}, | |
{ | |
key: 'updateNav', | |
value: function () { | |
this.displayNavigation && (this.checkForLastFilter(), this.checkForLastSlide(), this.isLastFilter ? this.toggleLastHTML(v.MATCH) : this.isLastFilter || this.toggleLastHTML(), this.canMoveNext && !this.isLastSlide || this.carouselNextNav.classList.add(p), this.canMovePrevious && !this.isLastSlide || this.carouselPrevNav.classList.add(p), this.canMoveNext && !this.isLastSlide && this.carouselNextNav.classList.remove(p), this.canMovePrevious && !this.isLastSlide && this.carouselPrevNav.classList.remove(p)) | |
} | |
}, | |
{ | |
key: 'updateActiveState', | |
value: function () { | |
var e = this; | |
this.slides.forEach((function (t) { | |
return t.classList.remove(e.props.activeClass) | |
})), | |
this.progressions && this.progressions.forEach((function (t) { | |
t.classList.remove(e.props.activeClass), | |
t.setAttribute('aria-pressed', !1) | |
})), | |
this.slides.forEach((function (t, n) { | |
if (n === e.currentSlide) { | |
var r = t.querySelector('.js-kraken-viewSelect-trigger'); | |
t.classList.add(e.props.activeClass), | |
t.classList.remove(p), | |
t.tabIndex = 0, | |
t.querySelectorAll('.js-kraken-carousel-announce_heading').forEach((function (e) { | |
return Drupal.announce(e.innerText, 'polite') | |
})), | |
0 !== n && r && r.focus() | |
} else t.classList.add(p), | |
t.tabIndex = - 1 | |
})), | |
this.progressions && this.progressions.forEach((function (t, n) { | |
var r = t; | |
n === e.currentSlide && (r.classList.add(e.props.activeClass), r.setAttribute('aria-pressed', !0)), | |
n < e.currentSlide ? r.classList.add(d) : r.classList.remove(d), | |
e.progressIndex && n <= e.progressIndex && r.classList.add(d), | |
n === e.currentSlide && n === e.slideCount - 1 ? (r.classList.add(f), r.classList.remove(d), r.innerHTML = v.DONE) : n !== e.currentSlide && n === e.slideCount - 1 && (r.innerHTML = n + 1, r.classList.remove(f)) | |
})); | |
var t = this.currentSlide === this.slideCount - 1 ? 'last' : this.currentSlide; | |
c.default.broadcast('theDeciderStep', t), | |
'last' === t && c.default.broadcast('theDeciderResult', t), | |
this.setProgressIndex(this.currentSlide) | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = m | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/Carousel/LegacyCarousel': 7, | |
'services/EventBus': 50 | |
} | |
], | |
33: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var r = function (e) { | |
return '<li class="filterCard-filters-filter">\n <div class="formItem formItem_checkbox">\n <input\n id="'.concat(e.id, '"\n name="').concat(e.name, '"\n type="checkbox"\n class="formCheckbox js-kraken-viewSelect-trigger"\n ').concat(e.targetAttr, '\n ').concat(e.trackingAttributes, '\n aria-checked="false"\n >\n <label for="').concat(e.id, '" class="formLabel">\n <span>').concat(e.answerText, '</span>\n </label>\n </div>\n</li>') | |
}; | |
n.default = r | |
}, | |
{ | |
} | |
], | |
34: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var r = function (e) { | |
var t = [ | |
]; | |
return void 0 !== e.attributes && (t = Object.keys(e.attributes).map((function (t) { | |
return ''.concat(t, '="').concat(e.attributes[t], '"') | |
}))), | |
'<div class="carouselSlide js-kraken-carousel_slide" '.concat(t.join(' '), '>\n <div class="filterCard">\n ').concat(e.image ? '<div class="filterCard-img">\n <img src="'.concat(e.image, '" alt="').concat(e.question, ' image"/>\n </div>') : '', '\n <h2 class="filterCard-hd js-kraken-carousel-announce_heading">\n ').concat(e.question, '\n </h2>\n <h3 class="filterCard-subHd js-kraken-carousel-announce_heading">\n ').concat(e.subText, '\n </h3>\n <ul class="filterCard-filters ').concat(e.filterClass, '">\n ').concat(e.filters, '\n </ul>\n </div>\n </div>') | |
}; | |
n.default = r | |
}, | |
{ | |
} | |
], | |
35: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var r = function (e) { | |
return '<li class="filterCard-filters-filter">\n <label for="'.concat(e.id, '" class="imageSelect">\n <input\n id="').concat(e.id, '"\n name="').concat(e.name, '"\n type="').concat(e.elementType, '"\n class="imageSelect-input js-kraken-viewSelect-trigger"\n data-active-class="imageSelect_isActive"\n ').concat(e.targetAttr, ' ').concat(e.trackingAttributes, '\n >\n <img src="').concat(e.image, '" alt="').concat(e.label, '" class="imageSelect-img"/>\n <span class="imageSelect-label">').concat(e.answerText, '</span>\n </label>\n </li>') | |
}; | |
n.default = r | |
}, | |
{ | |
} | |
], | |
36: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var r = function (e) { | |
return '<li class="filterCard-filters-filter">\n <div class="formItem formItem_radio">\n <input id="'.concat(e.id, '" name="').concat(e.name, '" type="radio" class="formRadio formRadio_lg js-kraken-viewSelect-trigger" ').concat(e.targetAttr, ' ').concat(e.trackingAttributes, '>\n <label for="').concat(e.id, '">\n <span>').concat(e.answerText, '</span>\n </label>\n </div>\n</li>') | |
}; | |
n.default = r | |
}, | |
{ | |
} | |
], | |
37: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/assertThisInitialized')), | |
o = r(e('@babel/runtime/helpers/inherits')), | |
l = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
u = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
c = r(e('services/EventBus')), | |
h = r(e('services/WindowListener/WindowListener')), | |
d = r(e('components/ComponentBase')), | |
f = r(e('services/GoogleTagManagerService')); | |
function p(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, u.default) (e); | |
if (t) { | |
var i = (0, u.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, l.default) (this, n) | |
} | |
} | |
var v = window.jQuery, | |
m = '.js-kraken-toggle', | |
g = '.js-kraken-toggle-trigger', | |
y = '.js-kraken-toggle-target', | |
b = '.js-kraken-toggle-hiddenTarget', | |
C = 'isActive', | |
k = 'isEnabled', | |
S = function (e) { | |
(0, o.default) (n, e); | |
var t = p(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this), | |
e ? (r.tagManager = f.default, r.element = e, r.toggleTrigger = null, r.toggleTarget = null, r.toggleHiddenTarget = null, r.options = { | |
}, r.isOpen = !0, r.isEnabled = !1, r.hasTracking = !1, r.options.openOnLoad = !0, r.closeOnFocusOut = !1, r.currentBreakpoint = h.default.currentBreakpoint, r.navIsOpen = !1, r.navIsEnabled = !1, r.onBreakpointChangeHandler = r.onBreakpointChange.bind((0, a.default) (r)), r.onNavIsEnabledHandler = r.onNavIsEnabled.bind((0, a.default) (r)), r.onNavIsOpenHandler = r.onNavIsOpen.bind((0, a.default) (r)), r.onDocumentClickHandler = r.onDocumentClick.bind((0, a.default) (r)), r.toggleStatusHandler = r.toggleStatus.bind((0, a.default) (r)), r.onKeyDownHandler = r.onKeyDown.bind((0, a.default) (r)), r.init(), r) : (0, l.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'enable', | |
value: function (e) { | |
this.element = e, | |
this.getToggleOptions(), | |
this.createChildren(), | |
this.getEnabledStatus(), | |
this.bindEvents(), | |
this.setEnabledStatus(this.element), | |
this.updateToggle() | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
h.default.on('currentBreakpoint', this.onBreakpointChangeHandler), | |
this.toggleTrigger.addEventListener('click', this.toggleStatusHandler), | |
this.toggleTrigger.addEventListener('keydown', this.onKeyDownHandler), | |
document.addEventListener('click', this.onDocumentClickHandler), | |
c.default.on('navIsOpen', this.onNavIsOpenHandler), | |
c.default.on('navIsEnabled', this.onNavIsEnabledHandler) | |
} | |
}, | |
{ | |
key: 'unbindEvents', | |
value: function () { | |
h.default.off('currentBreakpoint', this.onBreakpointChangeHandler), | |
this.toggleTrigger && (this.toggleTrigger.removeEventListener('click', this.toggleStatusHandler), this.toggleTrigger.addEventListener('keydown', this.onKeyDownHandler)), | |
document.removeEventListener('click', this.onDocumentClickHandler), | |
c.default.off('navIsOpen', this.onNavIsOpenHandler), | |
c.default.off('navIsEnabled', this.onNavIsEnabledHandler) | |
} | |
}, | |
{ | |
key: 'init', | |
value: function () { | |
this.getToggleOptions(), | |
this.getEnabledStatus(), | |
this.isOpen = this.options.openOnLoad, | |
this.createChildren(), | |
this.toggleTrigger && (this.bindEvents(), this.setEnabledStatus(this.element), this.setUpHandlers(), this.closeTogglesAtMobile(), this.updateToggle()) | |
} | |
}, | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.enableHandler = this.enable.bind(this), | |
this.destroyHandler = this.destroy.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'createChildren', | |
value: function () { | |
return this.toggleTrigger = this.element.querySelector(g), | |
this.toggleTarget = this.element.querySelector(y), | |
this.toggleHiddenTarget = this.element.querySelector(b), | |
this.body = document.querySelector('body'), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
this.unbindEvents(), | |
this.toggleTrigger = null, | |
this.toggleTarget = null, | |
this.toggleHiddenTarget = null, | |
this.element = null | |
} | |
}, | |
{ | |
key: 'getToggleOptions', | |
value: function () { | |
var e = v(this.element).data(); | |
return this.options = Object.assign(this.options, e), | |
this.options | |
} | |
}, | |
{ | |
key: 'broadcastOptionClass', | |
value: function (e) { | |
this.options.broadcastClass && (e ? this.body.classList.add(this.options.broadcastClass) : this.body.classList.remove(this.options.broadcastClass)) | |
} | |
}, | |
{ | |
key: 'updateCustomEnableClass', | |
value: function (e) { | |
this.options.customEnableClass && (e ? this.element.classList.add(this.options.customEnableClass) : this.element.classList.remove(this.options.customEnableClass)) | |
} | |
}, | |
{ | |
key: 'toggleStatus', | |
value: function (e) { | |
if (e && e.preventDefault(), this.isEnabled) return this.isOpen = !this.isOpen, | |
this.trackToggleClick(e, this.isOpen), | |
this.broadcastOptionClass(this.isOpen), | |
this.updateToggle(e) | |
} | |
}, | |
{ | |
key: 'onKeyDown', | |
value: function (e) { | |
'Enter' === e.key && (e.preventDefault(), e.target.click()) | |
} | |
}, | |
{ | |
key: 'trackToggleClick', | |
value: function (e, t) { | |
if (t && this.options.hasTracking) { | |
var n = e.currentTarget.dataset; | |
this.tagManager.defaultDispatch(n.trackingCategory, n.trackingAction, n.trackingLabel, n.eventid, n.eventDescription) | |
} | |
} | |
}, | |
{ | |
key: 'updateToggle', | |
value: function () { | |
if (this.element) { | |
var e = this.element; | |
this.isOpen ? e.classList.add(C) : e.classList.remove(C), | |
this.updateAria() | |
} | |
} | |
}, | |
{ | |
key: 'closeTogglesAtMobile', | |
value: function () { | |
if (this.currentBreakpoint && 'SMALL' === this.currentBreakpoint) return this.isOpen = !1, | |
this.isOpen | |
} | |
}, | |
{ | |
key: 'getEnabledStatus', | |
value: function () { | |
var e; | |
return this.options.enableAtBreakpoint && (e = this.options.enableAtBreakpoint.toUpperCase()), | |
this.options.enableAtBreakpoint && e !== this.currentBreakpoint ? ('SMALL' !== this.options.currentBreakpoint && (this.isOpen = !0), this.isEnabled = !1, this.isEnabled) : (this.closeTogglesAtMobile(), this.options.enableAtBreakpoint && e !== this.currentBreakpoint ? void 0 : (this.isEnabled = !0, this.isEnabled)) | |
} | |
}, | |
{ | |
key: 'setEnabledStatus', | |
value: function (e) { | |
this.isEnabled ? (e.classList.add(k), this.updateCustomEnableClass(!0)) : (e.classList.remove(k), this.updateCustomEnableClass(!1)) | |
} | |
}, | |
{ | |
key: 'onDocumentClick', | |
value: function (e) { | |
var t = v(e.target).closest(m).length; | |
this.options.closeOnFocusOut && this.isOpen && !t && (this.toggleStatus(), this.updateToggle()) | |
} | |
}, | |
{ | |
key: 'onBreakpointChange', | |
value: function (e) { | |
this.currentBreakpoint = e, | |
this.getEnabledStatus(), | |
this.setEnabledStatus(this.element), | |
this.updateToggle() | |
} | |
}, | |
{ | |
key: 'onNavIsOpen', | |
value: function (e) { | |
if (this.navIsOpen = e, !e && this.options.menuClose) return this.isOpen = !1, | |
this.updateToggle() | |
} | |
}, | |
{ | |
key: 'onNavIsEnabled', | |
value: function (e) { | |
if (!e && this.options.menuClose) return this.isOpen = !0, | |
this.updateToggle() | |
} | |
}, | |
{ | |
key: 'setTriggerAria', | |
value: function (e) { | |
var t = { | |
'aria-expanded': this.isOpen ? 'true' : 'false' | |
}; | |
return this.setAriaRoles(e, t) | |
} | |
}, | |
{ | |
key: 'setTargetAria', | |
value: function (e) { | |
var t = { | |
'aria-hidden': this.isOpen ? 'false' : 'true' | |
}; | |
return this.setAriaRoles(e, t) | |
} | |
}, | |
{ | |
key: 'setAriaRoles', | |
value: function (e, t) { | |
for (var n in t) if (t.hasOwnProperty(n)) { | |
var r = t[n]; | |
e.setAttribute(n, r) | |
} | |
} | |
}, | |
{ | |
key: 'updateAria', | |
value: function () { | |
this.setTriggerAria(this.toggleTrigger), | |
this.setTargetAria(this.toggleTarget), | |
this.toggleHiddenTarget && this.setAriaRoles(this.toggleHiddenTarget, { | |
'aria-hidden': this.isOpen ? 'false' : 'true' | |
}) | |
} | |
} | |
]), | |
n | |
}(d.default); | |
n.default = S | |
}, | |
{ | |
'@babel/runtime/helpers/assertThisInitialized': 66, | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'services/EventBus': 50, | |
'services/GoogleTagManagerService': 51, | |
'services/WindowListener/WindowListener': 56 | |
} | |
], | |
38: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/ComponentBase')); | |
function c(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var h = [ | |
{ | |
hash: '#reviews', | |
buttonSelectors: [ | |
'#reviewsToggle:not(.isActive) .js-kraken-toggle-trigger' | |
] | |
}, | |
{ | |
hash: '#reviewsList', | |
buttonSelectors: [ | |
'#reviewsToggle:not(.isActive) .js-kraken-toggle-trigger' | |
] | |
}, | |
{ | |
hash: '#writeReviewBtn', | |
buttonSelectors: [ | |
'#reviewsToggle:not(.isActive) .js-kraken-toggle-trigger' | |
] | |
}, | |
{ | |
hash: '#overview', | |
buttonSelectors: [ | |
'#ProductDetailsToggle:not(.isActive) .js-kraken-toggle-trigger' | |
] | |
}, | |
{ | |
hash: '#feeding', | |
buttonSelectors: [ | |
'#FeedingInstructionsToggle:not(.isActive) .js-kraken-toggle-trigger' | |
] | |
}, | |
{ | |
hash: '#ingredients', | |
buttonSelectors: [ | |
'#ProductIngredientsToggle:not(.isActive) .js-kraken-toggle-trigger' | |
] | |
}, | |
{ | |
hash: '#related', | |
buttonSelectors: [ | |
'#RelatedProductsToggle:not(.isActive) .js-kraken-toggle-trigger' | |
] | |
} | |
], | |
d = function (e) { | |
(0, a.default) (n, e); | |
var t = c(n); | |
function n() { | |
var e; | |
return (0, i.default) (this, n), | |
(e = t.call(this)).init(), | |
e | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
return window.addEventListener('hashchange', n.checkHash.bind(this)), | |
n.checkHash(), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return window.removeEventListener('hashchange', n.checkHash.bind(this)), | |
this | |
} | |
} | |
], [ | |
{ | |
key: 'triggerToggle', | |
value: function (e) { | |
var t = h.filter((function (t) { | |
return t.hash === e | |
})); | |
t.length && (t[0].buttonSelectors.forEach((function (e) { | |
var t = document.querySelector(e); | |
t && t.click() | |
})), setTimeout((function () { | |
document.getElementById(e.substr(1)).scrollIntoView(!0) | |
}), 0)) | |
} | |
}, | |
{ | |
key: 'checkHash', | |
value: function () { | |
var e = window.location.hash; | |
e && n.triggerToggle(e) | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = d | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8 | |
} | |
], | |
39: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/ComponentBase')), | |
c = r(e('services/GoogleTagManagerService')); | |
function h(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var d = function (e) { | |
(0, a.default) (n, e); | |
var t = h(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this), | |
e ? (r.tracker = e, r.init(), r) : (0, o.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.setUpHandlers(), | |
this.bindEvents(), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function (e) { | |
return this.tracker.addEventListener('click', this.onClickHandler), | |
this | |
} | |
}, | |
{ | |
key: 'unbindEvents', | |
value: function (e) { | |
return this.tracker.removeEventListener('click', this.onClickHandler), | |
this | |
} | |
}, | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.onClickHandler = this.onClick.bind(this), | |
this.bindEventsHandler = this.bindEvents.bind(this), | |
this.unbindEventsHandler = this.unbindEvents.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.unbindEvents(), | |
this.tracker = null, | |
this | |
} | |
}, | |
{ | |
key: 'onClick', | |
value: function (e) { | |
var t = e.currentTarget.dataset; | |
if (t.trackingCategory && t.trackingAction) return c.default.defaultDispatch(t.trackingCategory, t.trackingAction, t.trackingLabel, t.eventId, t.eventDescription) | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = d | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'services/GoogleTagManagerService': 51 | |
} | |
], | |
40: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/ComponentBase')), | |
c = r(e('services/GoogleTagManagerService')); | |
function h(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var d = function (e) { | |
(0, a.default) (n, e); | |
var t = h(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
r = t.call(this), | |
e ? (r.select = e, r.init(), r) : (0, o.default) (r) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
return this.setUpHandlers(), | |
this.bindEvents(), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
return this.select.addEventListener('change', this.onChangeHandler), | |
this | |
} | |
}, | |
{ | |
key: 'unbindEvents', | |
value: function () { | |
return this.select.removeEventListener('change', this.onChangeHandler), | |
this | |
} | |
}, | |
{ | |
key: 'setUpHandlers', | |
value: function () { | |
return this.onChangeHandler = this.onChange.bind(this), | |
this.bindEventsHandler = this.bindEvents.bind(this), | |
this.unbindEventsHandler = this.unbindEvents.bind(this), | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.unbindEvents(), | |
this.select = null, | |
this | |
} | |
}, | |
{ | |
key: 'onChange', | |
value: function (e) { | |
var t = e.currentTarget.selectedOptions[0].label, | |
n = e.currentTarget.dataset; | |
if (n.trackingCategory && n.trackingAction) return c.default.defaultDispatch(n.trackingCategory, n.trackingAction, t, n.eventId, n.eventDescription) | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = d | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
'services/GoogleTagManagerService': 51 | |
} | |
], | |
41: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/toConsumableArray')), | |
s = r(e('@babel/runtime/helpers/classCallCheck')), | |
a = r(e('@babel/runtime/helpers/createClass')), | |
o = r(e('@babel/runtime/helpers/inherits')), | |
l = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
u = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
c = r(e('services/WindowListener/WindowListener')), | |
h = r(e('components/ComponentBase')); | |
function d(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, u.default) (e); | |
if (t) { | |
var i = (0, u.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, l.default) (this, n) | |
} | |
} | |
window.jQuery; | |
var f = '[data-view-switch-target]', | |
p = '.js-kraken-viewSwitch-btn', | |
v = 'isActive', | |
m = function (e) { | |
(0, o.default) (n, e); | |
var t = d(n); | |
function n(e) { | |
var r; | |
return (0, s.default) (this, n), | |
r = t.call(this, 'kraken_viewSwitch'), | |
e ? (r.switch = e, r.switchBtns = null, r.switchTarget = null, r.currentBreakpoint = c.default.currentBreakpoint, r.defaultLayout = null, r.init(), r) : (0, l.default) (r) | |
} | |
return (0, a.default) (n, [ | |
{ | |
key: 'init', | |
value: function () { | |
if (this.setupHandlers(), this.createChildren(), this.switchTarget) return this.bindEvents(), | |
this | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
var e = this; | |
return this.switchBtns.forEach((function (t) { | |
t.addEventListener('click', e.onViewBtnClickHandler) | |
})), | |
c.default.on('currentBreakpoint', this.onBreakpointChangeHandler), | |
this | |
} | |
}, | |
{ | |
key: 'unBindEvents', | |
value: function () { | |
var e = this; | |
return this.switchBtns.forEach((function (t) { | |
t.removeEventListener('click', e.onViewBtnClickHandler) | |
})), | |
c.default.off('currentBreakpoint', this.onBreakpointChangeHandler), | |
this | |
} | |
}, | |
{ | |
key: 'setupHandlers', | |
value: function () { | |
this.onViewBtnClickHandler = this.onViewBtnClick.bind(this), | |
this.onBreakpointChangeHandler = this.onBreakpointChange.bind(this) | |
} | |
}, | |
{ | |
key: 'createChildren', | |
value: function (e, t) { | |
return this.switchBtns = (0, i.default) (this.switch.querySelectorAll(p)), | |
this.defaultBtn = this.switch.querySelector(''.concat(p, '.').concat(v)), | |
this.switchTarget = document.querySelector(f), | |
this | |
} | |
}, | |
{ | |
key: 'removeChildren', | |
value: function () { | |
return this.switch = null, | |
this.switchBtns = null, | |
this.switchTarget = null, | |
this.activeBtn = null, | |
this | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
this.unBindEvents(), | |
this.removeChildren() | |
} | |
}, | |
{ | |
key: 'onViewBtnClick', | |
value: function (e) { | |
e.preventDefault(); | |
var t = e.currentTarget; | |
return this.toggleLayout(t) | |
} | |
}, | |
{ | |
key: 'setActiveClass', | |
value: function (e) { | |
this.activeBtn && !e || (this.activeBtn ? (this.activeBtn.classList.remove(v), e.classList.add(v), this.activeBtn = e) : this.activeBtn = this.defaultBtn) | |
} | |
}, | |
{ | |
key: 'getLayout', | |
value: function (e) { | |
return e.dataset.layout | |
} | |
}, | |
{ | |
key: 'setLayout', | |
value: function (e, t) { | |
return e.setAttribute('class', t) | |
} | |
}, | |
{ | |
key: 'toggleLayout', | |
value: function (e) { | |
var t = this.getLayout(e); | |
this.setLayout(this.switchTarget, t), | |
this.setActiveClass(e) | |
} | |
}, | |
{ | |
key: 'onBreakpointChange', | |
value: function (e) { | |
this.currentBreakpoint = e, | |
'SMALL' !== this.currentBreakpoint && (this.toggleLayout(this.defaultBtn), this.setActiveClass(this.defaultBtn)) | |
} | |
} | |
]), | |
n | |
}(h.default); | |
n.default = m | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'@babel/runtime/helpers/toConsumableArray': 81, | |
'components/ComponentBase': 8, | |
'services/WindowListener/WindowListener': 56 | |
} | |
], | |
42: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = n.KEYS = void 0; | |
var r = Object.freeze({ | |
BACKSPACE: 'Backspace', | |
TAB: 'Tab', | |
RETURN: 'Enter', | |
SHIFT: 'Shift', | |
CTRL: 'Control', | |
ALT: 'Alt', | |
PAUSE: 'Pause', | |
CAPS_LOCK: 'CapsLock', | |
ESCAPE: 'Escape', | |
SPACE: ' ', | |
PAGE_UP: 'PageUp', | |
PAGE_DOWN: 'PageDown', | |
END: 'End', | |
HOME: 'Home', | |
LEFT_ARROW: 'ArrowLeft', | |
UP_ARROW: 'ArrowUp', | |
RIGHT_ARROW: 'ArrowRight', | |
DOWN_ARROW: 'ArrowDown', | |
INSERT: 'Insert', | |
DELETE: 'Delete', | |
KEY_0: '0', | |
KEY_1: '1', | |
KEY_2: '2', | |
KEY_3: '3', | |
KEY_4: '4', | |
KEY_5: '5', | |
KEY_6: '6', | |
KEY_7: '7', | |
KEY_8: '8', | |
KEY_9: '9', | |
META: 'Meta', | |
SELECT: 'Select', | |
PLUS: '+', | |
ASTERISK: '*', | |
F1: 'F1', | |
F2: 'F2', | |
F3: 'F3', | |
F4: 'F4', | |
F5: 'F5', | |
F6: 'F6', | |
F7: 'F7', | |
F8: 'F8', | |
F9: 'F9', | |
F10: 'F10', | |
F11: 'F11', | |
F12: 'F12', | |
NUM_LOCK: 'NumLock', | |
SCROLL_LOCK: 'ScrollLock', | |
SEMICOLON: ';', | |
EQUALS: '=', | |
COMMA: ',', | |
DASH: '-', | |
PERIOD: '.', | |
FORWARD_SLASH: '/', | |
OPEN_BRACKET: '[', | |
BACK_SLASH: '\\', | |
CLOSE_BRACKET: ']', | |
SINGLE_QUOTE: '\'' | |
}); | |
n.KEYS = r; | |
var i = r; | |
n.default = i | |
}, | |
{ | |
} | |
], | |
43: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = n.NAV_KEYS = void 0; | |
var r = Object.freeze({ | |
TAB: 'Tab', | |
RETURN: 'Enter', | |
ESCAPE: 'Escape', | |
SPACE: ' ', | |
PAGE_UP: 'PageUp', | |
PAGE_DOWN: 'PageDown', | |
END: 'End', | |
HOME: 'Home', | |
LEFT_ARROW: 'ArrowLeft', | |
UP_ARROW: 'ArrowUp', | |
RIGHT_ARROW: 'ArrowRight', | |
DOWN_ARROW: 'ArrowDown', | |
DELETE: 'Delete', | |
BACKSPACE: 'Backspace' | |
}); | |
n.NAV_KEYS = r; | |
var i = r; | |
n.default = i | |
}, | |
{ | |
} | |
], | |
44: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('components/ComponentBase')), | |
c = r(e('services/GoogleTagManagerService')), | |
h = r(e('parsleyjs')); | |
function d(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
e('parsleyjs/dist/i18n/fr'), | |
e('parsleyjs/dist/i18n/es'), | |
e('parsleyjs/dist/i18n/en'); | |
var f = { | |
errorClass: 'isInvalid', | |
errorTemplate: '<span></span>', | |
errorsWrapper: '<div class="formError-msg"></div>', | |
successClass: 'isValid' | |
}, | |
p = function (e) { | |
(0, a.default) (n, e); | |
var t = d(n); | |
function n(e) { | |
var r; | |
return (0, i.default) (this, n), | |
(r = t.call(this)).tagManager = c.default, | |
r.defaultTrackingData = { | |
category: e.dataset.trackingCategory, | |
action: e.dataset.trackingErrorAction, | |
label: e.dataset.trackingErrorLabel, | |
eventId: e.dataset.eventId | |
}, | |
r.init(e), | |
r | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'init', | |
value: function (e) { | |
this.form = new h.default.Factory(e, f), | |
this.setLocal(), | |
this.setupHandlers(), | |
this.bindEvents() | |
} | |
}, | |
{ | |
key: 'setupHandlers', | |
value: function () { | |
this.onFormErrorHandler = this.onFormError.bind(this) | |
} | |
}, | |
{ | |
key: 'bindEvents', | |
value: function () { | |
this.form.on('form:error', this.onFormErrorHandler) | |
} | |
}, | |
{ | |
key: 'destroy', | |
value: function () { | |
return this.form.off('form:error', this.onFormErrorHandler), | |
this.form = null, | |
this | |
} | |
}, | |
{ | |
key: 'onFormError', | |
value: function (e) { | |
var t = [ | |
]; | |
e.$element.find('.isInvalid').each((function () { | |
var e = null; | |
if (e = 'SELECT' === this.tagName || 'INPUT' === this.tagName || 'TEXTAREA' === this.tagName ? this : this.querySelector('input, select, textarea')) { | |
var n = e.name || e.id; | |
- 1 === t.indexOf(n) && t.push(n) | |
} | |
})), | |
c.default.defaultDispatch(this.defaultTrackingData.category, this.defaultTrackingData.action, t.join(', '), ''.concat(this.defaultTrackingData.eventId, '-error'), ''.concat(this.defaultTrackingData.category, ' form error')) | |
} | |
} | |
], [ | |
{ | |
key: 'setLocal', | |
value: function () { | |
switch (document.documentElement.lang) { | |
case 'fr': | |
h.default.setLocale('fr'); | |
break; | |
case 'es': | |
h.default.setLocale('es'); | |
break; | |
default: | |
h.default.setLocale('en') | |
} | |
} | |
} | |
]), | |
n | |
}(u.default); | |
n.default = p | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/ComponentBase': 8, | |
parsleyjs: 92, | |
'parsleyjs/dist/i18n/en': 89, | |
'parsleyjs/dist/i18n/es': 90, | |
'parsleyjs/dist/i18n/fr': 91, | |
'services/GoogleTagManagerService': 51 | |
} | |
], | |
45: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'), | |
i = r(e('object-fit-images')); | |
e('./utils/customEventPolyfill'); | |
var s = r(e('App')), | |
a = document.querySelectorAll('img:not(.lazyLoad)'); | |
(0, i.default) (a), | |
window.KrakenApp = new s.default | |
}, | |
{ | |
'./utils/customEventPolyfill': 59, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
App: 1, | |
'object-fit-images': 88 | |
} | |
], | |
46: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = window.jQuery, | |
o = function () { | |
function e(t) { | |
if ((0, i.default) (this, e), this.url = t, !this.do) throw 'AjaxService must implement do()' | |
} | |
return (0, s.default) (e, [ | |
{ | |
key: 'ajaxGet', | |
value: function (e) { | |
var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], | |
n = { | |
}; | |
return t && (n = { | |
javascript: !1 | |
}), | |
a.get({ | |
url: this.url + e, | |
crossDomain: t, | |
contents: n | |
}).fail((function (e) { | |
throw e | |
})) | |
} | |
}, | |
{ | |
key: 'ajaxPost', | |
value: function (e) { | |
return a.post(this.url, e).fail((function (e) { | |
throw e | |
})) | |
} | |
} | |
]), | |
e | |
}(); | |
n.default = o | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/interopRequireDefault': 73 | |
} | |
], | |
47: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')); | |
function u(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var c = new (function (e) { | |
(0, a.default) (n, e); | |
var t = u(n); | |
function n() { | |
return (0, i.default) (this, n), | |
t.call(this, '/article') | |
} | |
return (0, s.default) (n, null, [ | |
{ | |
key: 'create', | |
value: function () { | |
return new n | |
} | |
} | |
]), | |
(0, s.default) (n, [ | |
{ | |
key: 'do', | |
value: function (e) { | |
return this.ajaxGet('/'.concat(e)) | |
} | |
} | |
]), | |
n | |
}(r(e('services/AjaxService/AjaxService')).default)); | |
n.default = c | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'services/AjaxService/AjaxService': 46 | |
} | |
], | |
48: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')); | |
function u(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var c = new (function (e) { | |
(0, a.default) (n, e); | |
var t = u(n); | |
function n() { | |
return (0, i.default) (this, n), | |
t.call(this, '/post/helpfulness-of-review') | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'do', | |
value: function (e, t) { | |
return this.ajaxGet('?ContentId='.concat(e, '&Vote=').concat(t)) | |
} | |
} | |
]), | |
n | |
}(r(e('services/AjaxService/AjaxService')).default)); | |
n.default = c | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'services/AjaxService/AjaxService': 46 | |
} | |
], | |
49: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')); | |
function u(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var c = new (function (e) { | |
(0, a.default) (n, e); | |
var t = u(n); | |
function n() { | |
return (0, i.default) (this, n), | |
t.call(this, '/posts/report-review') | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'do', | |
value: function (e, t) { | |
return this.ajaxGet('?ContentId='.concat(e, '&FeedbackType=').concat(t)) | |
} | |
} | |
]), | |
n | |
}(r(e('services/AjaxService/AjaxService')).default)); | |
n.default = c | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'services/AjaxService/AjaxService': 46 | |
} | |
], | |
50: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')); | |
function u(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var c = new (function (e) { | |
(0, a.default) (n, e); | |
var t = u(n); | |
function n() { | |
return (0, i.default) (this, n), | |
t.apply(this, arguments) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'broadcast', | |
value: function (e, t) { | |
this._emit(e, t) | |
} | |
} | |
]), | |
n | |
}(r(e('components/EventDispatcher/EventDispatcher')).default)); | |
n.default = c | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/EventDispatcher/EventDispatcher': 10 | |
} | |
], | |
51: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = (window.jQuery, window.location.href, new (function () { | |
function e() { | |
var t = this; | |
(0, i.default) (this, e), | |
this.tagEvents = { | |
social: { | |
like: { | |
dispatch: function (e) { | |
var n = e.eventLabel; | |
t.defaultDispatch('content share', 'like', n) | |
} | |
}, | |
share: { | |
dispatch: function (e) { | |
var n = e.eventLabel; | |
t.defaultDispatch('content share', 'share', n) | |
} | |
}, | |
tweet: { | |
dispatch: function (e) { | |
var n = e.eventLabel; | |
t.defaultDispatch('content share', 'tweet', n) | |
} | |
} | |
} | |
} | |
} | |
return (0, s.default) (e, [ | |
{ | |
key: 'dispatch', | |
value: function (e, t) { | |
var n = e.split('.'), | |
r = this.tagEvents; | |
for (var i in n) { | |
if (!n.hasOwnProperty(i)) return; | |
r = r[n[i]] | |
} | |
r.dispatch(t) | |
} | |
}, | |
{ | |
key: 'defaultDispatch', | |
value: function (e, t, n, r, i) { | |
var s = window.purinaTrackEvent; | |
s && s({ | |
eventCategory: e, | |
eventAction: t, | |
eventLabel: n, | |
eventID: r, | |
eventDescription: i | |
}) | |
} | |
} | |
]), | |
e | |
}())); | |
n.default = a | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/interopRequireDefault': 73 | |
} | |
], | |
52: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@ungap/url-search-params')); | |
function o(e, t) { | |
var n; | |
if ('undefined' == typeof Symbol || null == e[Symbol.iterator]) { | |
if (Array.isArray(e) || (n = function (e, t) { | |
if (!e) return; | |
if ('string' == typeof e) return l(e, t); | |
var n = Object.prototype.toString.call(e).slice(8, - 1); | |
'Object' === n && e.constructor && (n = e.constructor.name); | |
if ('Map' === n || 'Set' === n) return Array.from(e); | |
if ('Arguments' === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return l(e, t) | |
}(e)) || t && e && 'number' == typeof e.length) { | |
n && (e = n); | |
var r = 0, | |
i = function () { | |
}; | |
return { | |
s: i, | |
n: function () { | |
return r >= e.length ? { | |
done: !0 | |
} | |
: { | |
done: !1, | |
value: e[r++] | |
} | |
}, | |
e: function (e) { | |
throw e | |
}, | |
f: i | |
} | |
} | |
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.') | |
} | |
var s, | |
a = !0, | |
o = !1; | |
return { | |
s: function () { | |
n = e[Symbol.iterator]() | |
}, | |
n: function () { | |
var e = n.next(); | |
return a = e.done, | |
e | |
}, | |
e: function (e) { | |
o = !0, | |
s = e | |
}, | |
f: function () { | |
try { | |
a || null == n.return || n.return() | |
} finally { | |
if (o) throw s | |
} | |
} | |
} | |
} | |
function l(e, t) { | |
(null == t || t > e.length) && (t = e.length); | |
for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; | |
return r | |
} | |
var u = function () { | |
function e() { | |
(0, i.default) (this, e) | |
} | |
return (0, s.default) (e, null, [ | |
{ | |
key: 'getSearchParams', | |
value: function () { | |
return new a.default(decodeURIComponent(window.location.search)) | |
} | |
}, | |
{ | |
key: 'getUrlParams', | |
value: function (e) { | |
return this.getSearchParams().get(e) | |
} | |
}, | |
{ | |
key: 'setUrlParams', | |
value: function (e) { | |
var t, | |
n = this.getSearchParams(), | |
r = o(e); | |
try { | |
for (r.s(); !(t = r.n()).done; ) { | |
var i = t.value; | |
n.set(i.param, i.value) | |
} | |
} catch (e) { | |
r.e(e) | |
} finally { | |
r.f() | |
} | |
return n | |
} | |
}, | |
{ | |
key: 'deleteUrlParams', | |
value: function (e) { | |
var t, | |
n = this.getSearchParams(), | |
r = o(e); | |
try { | |
for (r.s(); !(t = r.n()).done; ) { | |
var i = t.value; | |
n.delete(i) | |
} | |
} catch (e) { | |
r.e(e) | |
} finally { | |
r.f() | |
} | |
return n | |
} | |
} | |
]), | |
e | |
}(); | |
n.default = u | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@ungap/url-search-params': 86 | |
} | |
], | |
53: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('services/SocialSharingService/SocialSharingService')); | |
function c(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var h = window.drupalSettings.facebook_mcc_local ? window.drupalSettings.facebook_mcc_local : 'en_US', | |
d = new (function (e) { | |
(0, a.default) (n, e); | |
var t = c(n); | |
function n() { | |
var e, | |
r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { | |
}, | |
s = r.localization; | |
return (0, i.default) (this, n), | |
(e = t.call(this)).settings = { | |
appId: null, | |
version: 'v2.9', | |
scriptTag: 'script', | |
facebookTagId: 'facebook-jssdk', | |
facebookJsSrc: 'https://connect.facebook.net/'.concat(s, '/sdk/xfbml.customerchat.js') | |
}, | |
e.settings = Object.assign(e.settings, window.fbConfig), | |
e.facebookInit(e.settings), | |
e | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'facebookInit', | |
value: function (e) { | |
var t, | |
n, | |
r, | |
i, | |
s; | |
window.fbAsyncInit = function () { | |
FB.init({ | |
appId: e.appId, | |
autoLogAppEvents: !0, | |
xfbml: !0, | |
version: e.version | |
}) | |
}, | |
t = document, | |
n = e.scriptTag, | |
r = e.facebookTagId, | |
s = t.getElementsByTagName(n) [0], | |
t.getElementById(r) || ((i = t.createElement(n)).id = r, i.src = e.facebookJsSrc, s.parentNode.insertBefore(i, s)) | |
} | |
}, | |
{ | |
key: 'do', | |
value: function (e) { | |
var t = e.href, | |
n = e.text, | |
r = e.callback; | |
FB.ui({ | |
method: 'share', | |
href: t, | |
quote: n | |
}, r) | |
} | |
} | |
]), | |
n | |
}(u.default)) ({ | |
localization: h | |
}); | |
n.default = d | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'services/SocialSharingService/SocialSharingService': 54 | |
} | |
], | |
54: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')); | |
function u(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var c = function (e) { | |
(0, a.default) (n, e); | |
var t = u(n); | |
function n(e, r) { | |
return (0, i.default) (this, n), | |
t.call(this, e) | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'do', | |
value: function (e) { | |
throw 'Implementations must override do' | |
} | |
} | |
]), | |
n | |
}(r(e('services/AjaxService/AjaxService')).default); | |
n.default = c | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'services/AjaxService/AjaxService': 46 | |
} | |
], | |
55: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')); | |
function u(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var c = new (function (e) { | |
(0, a.default) (n, e); | |
var t = u(n); | |
function n() { | |
var e; | |
return (0, i.default) (this, n), | |
(e = t.call(this)).intentUrl = window.intentUrl || 'https://twitter.com/intent/tweet', | |
e | |
} | |
return (0, s.default) (n, [ | |
{ | |
key: 'do', | |
value: function (e) { | |
var t = [ | |
this.intentUrl, | |
encodeURI(e.href), | |
encodeURI(e.text) | |
], | |
n = t[0], | |
r = t[1], | |
i = t[2]; | |
window.open(''.concat(n, '?url=').concat(r).concat(i ? '&text='.concat(i) : ''), 'popup', 'width=600,height=600'), | |
e.callback && e.callback() | |
} | |
} | |
]), | |
n | |
}(r(e('services/SocialSharingService/SocialSharingService')).default)); | |
n.default = c | |
}, | |
{ | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'services/SocialSharingService/SocialSharingService': 54 | |
} | |
], | |
56: [ | |
function (e, t, n) { | |
(function (t) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var i = r(e('@babel/runtime/helpers/classCallCheck')), | |
s = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('@babel/runtime/helpers/inherits')), | |
o = r(e('@babel/runtime/helpers/possibleConstructorReturn')), | |
l = r(e('@babel/runtime/helpers/getPrototypeOf')), | |
u = r(e('utils/debounce')), | |
c = r(e('components/EventDispatcher/EventDispatcher')), | |
h = e('./WindowListenerConstants'); | |
function d(e) { | |
var t = function () { | |
if ('undefined' == typeof Reflect || !Reflect.construct) return !1; | |
if (Reflect.construct.sham) return !1; | |
if ('function' == typeof Proxy) return !0; | |
try { | |
return Date.prototype.toString.call(Reflect.construct(Date, [ | |
], (function () { | |
}))), | |
!0 | |
} catch (e) { | |
return !1 | |
} | |
}(); | |
return function () { | |
var n, | |
r = (0, l.default) (e); | |
if (t) { | |
var i = (0, l.default) (this).constructor; | |
n = Reflect.construct(r, arguments, i) | |
} else n = r.apply(this, arguments); | |
return (0, o.default) (this, n) | |
} | |
} | |
var f = new (function (e) { | |
(0, a.default) (r, e); | |
var n = d(r); | |
function r() { | |
var e; | |
return (0, i.default) (this, r), | |
(e = n.call(this)).currentBreakpoint = null, | |
e.setupHandlers(), | |
e.init(), | |
e | |
} | |
return (0, s.default) (r, [ | |
{ | |
key: 'init', | |
value: function () { | |
window.addEventListener('resize', this.detectBreakpointHandler), | |
this.detectBreakpoint() | |
} | |
}, | |
{ | |
key: 'beforeDestroy', | |
value: function () { | |
window.removeEventListener('resize', this.detectBreakpointHandler) | |
} | |
}, | |
{ | |
key: 'setupHandlers', | |
value: function () { | |
this.detectBreakpointHandler = (0, u.default) (this.detectBreakpoint.bind(this), 250) | |
} | |
}, | |
{ | |
key: 'detectBreakpoint', | |
value: function () { | |
var e = h.BREAKPOINT_SIZES.filter((function (e) { | |
return t.matchMedia(h.BREAKPOINTS[e]).matches | |
})); | |
if (0 !== e.length) { | |
var n = e[e.length - 1]; | |
n !== this.currentBreakpoint && (this.currentBreakpoint = n, this._emit('currentBreakpoint', this.currentBreakpoint)) | |
} | |
} | |
} | |
]), | |
r | |
}(c.default)); | |
n.default = f | |
}).call(this, 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : { | |
}) | |
}, | |
{ | |
'./WindowListenerConstants': 57, | |
'@babel/runtime/helpers/classCallCheck': 68, | |
'@babel/runtime/helpers/createClass': 69, | |
'@babel/runtime/helpers/getPrototypeOf': 71, | |
'@babel/runtime/helpers/inherits': 72, | |
'@babel/runtime/helpers/interopRequireDefault': 73, | |
'@babel/runtime/helpers/possibleConstructorReturn': 78, | |
'components/EventDispatcher/EventDispatcher': 10, | |
'utils/debounce': 60 | |
} | |
], | |
57: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.BREAKPOINTS = n.BREAKPOINT_SIZES = n.EVENTS = void 0; | |
var i, | |
s = r(e('@babel/runtime/helpers/defineProperty')); | |
n.EVENTS = { | |
BREAKPOINT_CHANGE: 'breakpoint-change' | |
}; | |
var a = [ | |
'SMALL', | |
'MEDIUM', | |
'LARGE' | |
]; | |
n.BREAKPOINT_SIZES = a; | |
var o = (i = { | |
}, (0, s.default) (i, a[0], 'screen and (min-width: 320px)'), (0, s.default) (i, a[1], 'screen and (min-width: 768px)'), (0, s.default) (i, a[2], 'screen and (min-width: 960px)'), i); | |
n.BREAKPOINTS = o | |
}, | |
{ | |
'@babel/runtime/helpers/defineProperty': 70, | |
'@babel/runtime/helpers/interopRequireDefault': 73 | |
} | |
], | |
58: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = function (e, t, n) { | |
var r = document.querySelectorAll(t); | |
if (t && !r.length) return; | |
var i = [ | |
]; | |
if (!t) return new e; | |
for (var s = 0; s < r.length; s++) i[s] = new e(r[s], t, n); | |
return i | |
} | |
}, | |
{ | |
} | |
], | |
59: [ | |
function (e, t, n) { | |
'use strict'; | |
!function () { | |
if ('function' == typeof window.CustomEvent) return !1; | |
function e(e, t) { | |
t = t || { | |
bubbles: !1, | |
cancelable: !1, | |
detail: void 0 | |
}; | |
var n = document.createEvent('CustomEvent'); | |
return n.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), | |
n | |
} | |
e.prototype = window.Event.prototype, | |
window.CustomEvent = e | |
}() | |
}, | |
{ | |
} | |
], | |
60: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = function (e, t, n) { | |
var r; | |
return function () { | |
var i = this, | |
s = arguments, | |
a = function () { | |
r = null, | |
n || e.apply(i, s) | |
}, | |
o = n && !r; | |
clearTimeout(r), | |
r = setTimeout(a, t), | |
o && e.apply(i, s) | |
} | |
} | |
}, | |
{ | |
} | |
], | |
61: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = function (e, t) { | |
for (var n in t) t.hasOwnProperty(n) && e.setAttribute(n, t[n]) | |
} | |
}, | |
{ | |
} | |
], | |
62: [ | |
function (e, t, n) { | |
'use strict'; | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var r = function (e) { | |
if (e) { | |
if ('string' != typeof e) return e; | |
switch (e.toLowerCase()) { | |
case 'true': | |
case '1': | |
return !0; | |
case 'false': | |
case '0': | |
return !1 | |
} | |
throw Error('strToBool parameter is not a string boolean') | |
} | |
}; | |
n.default = r | |
}, | |
{ | |
} | |
], | |
63: [ | |
function (e, t, n) { | |
t.exports = function (e, t) { | |
(null == t || t > e.length) && (t = e.length); | |
for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n]; | |
return r | |
} | |
}, | |
{ | |
} | |
], | |
64: [ | |
function (e, t, n) { | |
t.exports = function (e) { | |
if (Array.isArray(e)) return e | |
} | |
}, | |
{ | |
} | |
], | |
65: [ | |
function (e, t, n) { | |
var r = e('./arrayLikeToArray'); | |
t.exports = function (e) { | |
if (Array.isArray(e)) return r(e) | |
} | |
}, | |
{ | |
'./arrayLikeToArray': 63 | |
} | |
], | |
66: [ | |
function (e, t, n) { | |
t.exports = function (e) { | |
if (void 0 === e) throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called'); | |
return e | |
} | |
}, | |
{ | |
} | |
], | |
67: [ | |
function (e, t, n) { | |
function r(e, t, n, r, i, s, a) { | |
try { | |
var o = e[s](a), | |
l = o.value | |
} catch (e) { | |
return void n(e) | |
} | |
o.done ? t(l) : Promise.resolve(l).then(r, i) | |
} | |
t.exports = function (e) { | |
return function () { | |
var t = this, | |
n = arguments; | |
return new Promise((function (i, s) { | |
var a = e.apply(t, n); | |
function o(e) { | |
r(a, i, s, o, l, 'next', e) | |
} | |
function l(e) { | |
r(a, i, s, o, l, 'throw', e) | |
} | |
o(void 0) | |
})) | |
} | |
} | |
}, | |
{ | |
} | |
], | |
68: [ | |
function (e, t, n) { | |
t.exports = function (e, t) { | |
if (!(e instanceof t)) throw new TypeError('Cannot call a class as a function') | |
} | |
}, | |
{ | |
} | |
], | |
69: [ | |
function (e, t, n) { | |
function r(e, t) { | |
for (var n = 0; n < t.length; n++) { | |
var r = t[n]; | |
r.enumerable = r.enumerable || !1, | |
r.configurable = !0, | |
'value' in r && (r.writable = !0), | |
Object.defineProperty(e, r.key, r) | |
} | |
} | |
t.exports = function (e, t, n) { | |
return t && r(e.prototype, t), | |
n && r(e, n), | |
e | |
} | |
}, | |
{ | |
} | |
], | |
70: [ | |
function (e, t, n) { | |
t.exports = function (e, t, n) { | |
return t in e ? Object.defineProperty(e, t, { | |
value: n, | |
enumerable: !0, | |
configurable: !0, | |
writable: !0 | |
}) : e[t] = n, | |
e | |
} | |
}, | |
{ | |
} | |
], | |
71: [ | |
function (e, t, n) { | |
function r(e) { | |
return t.exports = r = Object.setPrototypeOf ? Object.getPrototypeOf : function (e) { | |
return e.__proto__ || Object.getPrototypeOf(e) | |
}, | |
r(e) | |
} | |
t.exports = r | |
}, | |
{ | |
} | |
], | |
72: [ | |
function (e, t, n) { | |
var r = e('./setPrototypeOf'); | |
t.exports = function (e, t) { | |
if ('function' != typeof t && null !== t) throw new TypeError('Super expression must either be null or a function'); | |
e.prototype = Object.create(t && t.prototype, { | |
constructor: { | |
value: e, | |
writable: !0, | |
configurable: !0 | |
} | |
}), | |
t && r(e, t) | |
} | |
}, | |
{ | |
'./setPrototypeOf': 79 | |
} | |
], | |
73: [ | |
function (e, t, n) { | |
t.exports = function (e) { | |
return e && e.__esModule ? e : { | |
default: | |
e | |
} | |
} | |
}, | |
{ | |
} | |
], | |
74: [ | |
function (e, t, n) { | |
t.exports = function (e) { | |
if ('undefined' != typeof Symbol && Symbol.iterator in Object(e)) return Array.from(e) | |
} | |
}, | |
{ | |
} | |
], | |
75: [ | |
function (e, t, n) { | |
t.exports = function (e, t) { | |
if ('undefined' != typeof Symbol && Symbol.iterator in Object(e)) { | |
var n = [ | |
], | |
r = !0, | |
i = !1, | |
s = void 0; | |
try { | |
for (var a, o = e[Symbol.iterator](); !(r = (a = o.next()).done) && (n.push(a.value), !t || n.length !== t); r = !0); | |
} catch (e) { | |
i = !0, | |
s = e | |
} finally { | |
try { | |
r || null == o.return || o.return() | |
} finally { | |
if (i) throw s | |
} | |
} | |
return n | |
} | |
} | |
}, | |
{ | |
} | |
], | |
76: [ | |
function (e, t, n) { | |
t.exports = 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.') | |
} | |
}, | |
{ | |
} | |
], | |
77: [ | |
function (e, t, n) { | |
t.exports = function () { | |
throw new TypeError('Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.') | |
} | |
}, | |
{ | |
} | |
], | |
78: [ | |
function (e, t, n) { | |
var r = e('../helpers/typeof'), | |
i = e('./assertThisInitialized'); | |
t.exports = function (e, t) { | |
return !t || 'object' !== r(t) && 'function' != typeof t ? i(e) : t | |
} | |
}, | |
{ | |
'../helpers/typeof': 82, | |
'./assertThisInitialized': 66 | |
} | |
], | |
79: [ | |
function (e, t, n) { | |
function r(e, n) { | |
return t.exports = r = Object.setPrototypeOf || function (e, t) { | |
return e.__proto__ = t, | |
e | |
}, | |
r(e, n) | |
} | |
t.exports = r | |
}, | |
{ | |
} | |
], | |
80: [ | |
function (e, t, n) { | |
var r = e('./arrayWithHoles'), | |
i = e('./iterableToArrayLimit'), | |
s = e('./unsupportedIterableToArray'), | |
a = e('./nonIterableRest'); | |
t.exports = function (e, t) { | |
return r(e) || i(e, t) || s(e, t) || a() | |
} | |
}, | |
{ | |
'./arrayWithHoles': 64, | |
'./iterableToArrayLimit': 75, | |
'./nonIterableRest': 76, | |
'./unsupportedIterableToArray': 83 | |
} | |
], | |
81: [ | |
function (e, t, n) { | |
var r = e('./arrayWithoutHoles'), | |
i = e('./iterableToArray'), | |
s = e('./unsupportedIterableToArray'), | |
a = e('./nonIterableSpread'); | |
t.exports = function (e) { | |
return r(e) || i(e) || s(e) || a() | |
} | |
}, | |
{ | |
'./arrayWithoutHoles': 65, | |
'./iterableToArray': 74, | |
'./nonIterableSpread': 77, | |
'./unsupportedIterableToArray': 83 | |
} | |
], | |
82: [ | |
function (e, t, n) { | |
function r(e) { | |
return 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? t.exports = r = function (e) { | |
return typeof e | |
} | |
: t.exports = r = function (e) { | |
return e && 'function' == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? 'symbol' : typeof e | |
}, | |
r(e) | |
} | |
t.exports = r | |
}, | |
{ | |
} | |
], | |
83: [ | |
function (e, t, n) { | |
var r = e('./arrayLikeToArray'); | |
t.exports = function (e, t) { | |
if (e) { | |
if ('string' == typeof e) return r(e, t); | |
var n = Object.prototype.toString.call(e).slice(8, - 1); | |
return 'Object' === n && e.constructor && (n = e.constructor.name), | |
'Map' === n || 'Set' === n ? Array.from(e) : 'Arguments' === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? r(e, t) : void 0 | |
} | |
} | |
}, | |
{ | |
'./arrayLikeToArray': 63 | |
} | |
], | |
84: [ | |
function (e, t, n) { | |
var r = function (e) { | |
'use strict'; | |
var t, | |
n = Object.prototype, | |
r = n.hasOwnProperty, | |
i = 'function' == typeof Symbol ? Symbol : { | |
}, | |
s = i.iterator || '@@iterator', | |
a = i.asyncIterator || '@@asyncIterator', | |
o = i.toStringTag || '@@toStringTag'; | |
function l(e, t, n, r) { | |
var i = t && t.prototype instanceof v ? t : v, | |
s = Object.create(i.prototype), | |
a = new x(r || [ | |
]); | |
return s._invoke = function (e, t, n) { | |
var r = c; | |
return function (i, s) { | |
if (r === d) throw new Error('Generator is already running'); | |
if (r === f) { | |
if ('throw' === i) throw s; | |
return _() | |
} | |
for (n.method = i, n.arg = s; ; ) { | |
var a = n.delegate; | |
if (a) { | |
var o = E(a, n); | |
if (o) { | |
if (o === p) continue; | |
return o | |
} | |
} | |
if ('next' === n.method) n.sent = n._sent = n.arg; | |
else if ('throw' === n.method) { | |
if (r === c) throw r = f, | |
n.arg; | |
n.dispatchException(n.arg) | |
} else 'return' === n.method && n.abrupt('return', n.arg); | |
r = d; | |
var l = u(e, t, n); | |
if ('normal' === l.type) { | |
if (r = n.done ? f : h, l.arg === p) continue; | |
return { | |
value: l.arg, | |
done: n.done | |
} | |
} | |
'throw' === l.type && (r = f, n.method = 'throw', n.arg = l.arg) | |
} | |
} | |
}(e, n, a), | |
s | |
} | |
function u(e, t, n) { | |
try { | |
return { | |
type: 'normal', | |
arg: e.call(t, n) | |
} | |
} catch (e) { | |
return { | |
type: 'throw', | |
arg: e | |
} | |
} | |
} | |
e.wrap = l; | |
var c = 'suspendedStart', | |
h = 'suspendedYield', | |
d = 'executing', | |
f = 'completed', | |
p = { | |
}; | |
function v() { | |
} | |
function m() { | |
} | |
function g() { | |
} | |
var y = { | |
}; | |
y[s] = function () { | |
return this | |
}; | |
var b = Object.getPrototypeOf, | |
C = b && b(b(A([]))); | |
C && C !== n && r.call(C, s) && (y = C); | |
var k = g.prototype = v.prototype = Object.create(y); | |
function S(e) { | |
[ | |
'next', | |
'throw', | |
'return' | |
].forEach((function (t) { | |
e[t] = function (e) { | |
return this._invoke(t, e) | |
} | |
})) | |
} | |
function w(e, t) { | |
var n; | |
this._invoke = function (i, s) { | |
function a() { | |
return new t((function (n, a) { | |
!function n(i, s, a, o) { | |
var l = u(e[i], e, s); | |
if ('throw' !== l.type) { | |
var c = l.arg, | |
h = c.value; | |
return h && 'object' == typeof h && r.call(h, '__await') ? t.resolve(h.__await).then((function (e) { | |
n('next', e, a, o) | |
}), (function (e) { | |
n('throw', e, a, o) | |
})) : t.resolve(h).then((function (e) { | |
c.value = e, | |
a(c) | |
}), (function (e) { | |
return n('throw', e, a, o) | |
})) | |
} | |
o(l.arg) | |
}(i, s, n, a) | |
})) | |
} | |
return n = n ? n.then(a, a) : a() | |
} | |
} | |
function E(e, n) { | |
var r = e.iterator[n.method]; | |
if (r === t) { | |
if (n.delegate = null, 'throw' === n.method) { | |
if (e.iterator.return && (n.method = 'return', n.arg = t, E(e, n), 'throw' === n.method)) return p; | |
n.method = 'throw', | |
n.arg = new TypeError('The iterator does not provide a \'throw\' method') | |
} | |
return p | |
} | |
var i = u(r, e.iterator, n.arg); | |
if ('throw' === i.type) return n.method = 'throw', | |
n.arg = i.arg, | |
n.delegate = null, | |
p; | |
var s = i.arg; | |
return s ? s.done ? (n[e.resultName] = s.value, n.next = e.nextLoc, 'return' !== n.method && (n.method = 'next', n.arg = t), n.delegate = null, p) : s : (n.method = 'throw', n.arg = new TypeError('iterator result is not an object'), n.delegate = null, p) | |
} | |
function T(e) { | |
var t = { | |
tryLoc: e[0] | |
}; | |
1 in e && (t.catchLoc = e[1]), | |
2 in e && (t.finallyLoc = e[2], t.afterLoc = e[3]), | |
this.tryEntries.push(t) | |
} | |
function L(e) { | |
var t = e.completion || { | |
}; | |
t.type = 'normal', | |
delete t.arg, | |
e.completion = t | |
} | |
function x(e) { | |
this.tryEntries = [ | |
{ | |
tryLoc: 'root' | |
} | |
], | |
e.forEach(T, this), | |
this.reset(!0) | |
} | |
function A(e) { | |
if (e) { | |
var n = e[s]; | |
if (n) return n.call(e); | |
if ('function' == typeof e.next) return e; | |
if (!isNaN(e.length)) { | |
var i = - 1, | |
a = function n() { | |
for (; ++i < e.length; ) if (r.call(e, i)) return n.value = e[i], | |
n.done = !1, | |
n; | |
return n.value = t, | |
n.done = !0, | |
n | |
}; | |
return a.next = a | |
} | |
} | |
return { | |
next: _ | |
} | |
} | |
function _() { | |
return { | |
value: t, | |
done: !0 | |
} | |
} | |
return m.prototype = k.constructor = g, | |
g.constructor = m, | |
g[o] = m.displayName = 'GeneratorFunction', | |
e.isGeneratorFunction = function (e) { | |
var t = 'function' == typeof e && e.constructor; | |
return !!t && (t === m || 'GeneratorFunction' === (t.displayName || t.name)) | |
}, | |
e.mark = function (e) { | |
return Object.setPrototypeOf ? Object.setPrototypeOf(e, g) : (e.__proto__ = g, o in e || (e[o] = 'GeneratorFunction')), | |
e.prototype = Object.create(k), | |
e | |
}, | |
e.awrap = function (e) { | |
return { | |
__await: e | |
} | |
}, | |
S(w.prototype), | |
w.prototype[a] = function () { | |
return this | |
}, | |
e.AsyncIterator = w, | |
e.async = function (t, n, r, i, s) { | |
void 0 === s && (s = Promise); | |
var a = new w(l(t, n, r, i), s); | |
return e.isGeneratorFunction(n) ? a : a.next().then((function (e) { | |
return e.done ? e.value : a.next() | |
})) | |
}, | |
S(k), | |
k[o] = 'Generator', | |
k[s] = function () { | |
return this | |
}, | |
k.toString = function () { | |
return '[object Generator]' | |
}, | |
e.keys = function (e) { | |
var t = [ | |
]; | |
for (var n in e) t.push(n); | |
return t.reverse(), | |
function n() { | |
for (; t.length; ) { | |
var r = t.pop(); | |
if (r in e) return n.value = r, | |
n.done = !1, | |
n | |
} | |
return n.done = !0, | |
n | |
} | |
}, | |
e.values = A, | |
x.prototype = { | |
constructor: x, | |
reset: function (e) { | |
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = 'next', this.arg = t, this.tryEntries.forEach(L), !e) for (var n in this) 't' === n.charAt(0) && r.call(this, n) && !isNaN( + n.slice(1)) && (this[n] = t) | |
}, | |
stop: function () { | |
this.done = !0; | |
var e = this.tryEntries[0].completion; | |
if ('throw' === e.type) throw e.arg; | |
return this.rval | |
}, | |
dispatchException: function (e) { | |
if (this.done) throw e; | |
var n = this; | |
function i(r, i) { | |
return o.type = 'throw', | |
o.arg = e, | |
n.next = r, | |
i && (n.method = 'next', n.arg = t), | |
!!i | |
} | |
for (var s = this.tryEntries.length - 1; s >= 0; --s) { | |
var a = this.tryEntries[s], | |
o = a.completion; | |
if ('root' === a.tryLoc) return i('end'); | |
if (a.tryLoc <= this.prev) { | |
var l = r.call(a, 'catchLoc'), | |
u = r.call(a, 'finallyLoc'); | |
if (l && u) { | |
if (this.prev < a.catchLoc) return i(a.catchLoc, !0); | |
if (this.prev < a.finallyLoc) return i(a.finallyLoc) | |
} else if (l) { | |
if (this.prev < a.catchLoc) return i(a.catchLoc, !0) | |
} else { | |
if (!u) throw new Error('try statement without catch or finally'); | |
if (this.prev < a.finallyLoc) return i(a.finallyLoc) | |
} | |
} | |
} | |
}, | |
abrupt: function (e, t) { | |
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 s = i; | |
break | |
} | |
} | |
s && ('break' === e || 'continue' === e) && s.tryLoc <= t && t <= s.finallyLoc && (s = null); | |
var a = s ? s.completion : { | |
}; | |
return a.type = e, | |
a.arg = t, | |
s ? (this.method = 'next', this.next = s.finallyLoc, p) : this.complete(a) | |
}, | |
complete: function (e, t) { | |
if ('throw' === e.type) throw e.arg; | |
return 'break' === e.type || 'continue' === e.type ? this.next = e.arg : 'return' === e.type ? (this.rval = this.arg = e.arg, this.method = 'return', this.next = 'end') : 'normal' === e.type && t && (this.next = t), | |
p | |
}, | |
finish: function (e) { | |
for (var t = this.tryEntries.length - 1; t >= 0; --t) { | |
var n = this.tryEntries[t]; | |
if (n.finallyLoc === e) return this.complete(n.completion, n.afterLoc), | |
L(n), | |
p | |
} | |
}, | |
catch : function (e) { | |
for (var t = this.tryEntries.length - 1; t >= 0; --t) { | |
var n = this.tryEntries[t]; | |
if (n.tryLoc === e) { | |
var r = n.completion; | |
if ('throw' === r.type) { | |
var i = r.arg; | |
L(n) | |
} | |
return i | |
} | |
} | |
throw new Error('illegal catch attempt') | |
}, | |
delegateYield: function (e, n, r) { | |
return this.delegate = { | |
iterator: A(e), | |
resultName: n, | |
nextLoc: r | |
}, | |
'next' === this.method && (this.arg = t), | |
p | |
} | |
}, | |
e | |
}('object' == typeof t ? t.exports : { | |
}); | |
try { | |
regeneratorRuntime = r | |
} catch (e) { | |
Function('r', 'regeneratorRuntime = r') (r) | |
} | |
}, | |
{ | |
} | |
], | |
85: [ | |
function (e, t, n) { | |
t.exports = e('regenerator-runtime') | |
}, | |
{ | |
'regenerator-runtime': 84 | |
} | |
], | |
86: [ | |
function (e, t, n) { | |
/*! (c) Andrea Giammarchi - ISC */ | |
var r = this || { | |
}; | |
try { | |
!function (e, t) { | |
if (new e('q=%2B').get('q') !== t || new e({ | |
q: t | |
}).get('q') !== t || new e([['q', | |
t]]).get('q') !== t || 'q=%0A' !== new e('q=\n').toString() || 'q=+%26' !== new e({ | |
q: ' &' | |
}).toString() || 'q=%25zx' !== new e({ | |
q: '%zx' | |
}).toString()) throw e; | |
r.URLSearchParams = e | |
}(URLSearchParams, '+') | |
} catch (e) { | |
!function (e, t, n) { | |
'use strict'; | |
var i = e.create, | |
s = e.defineProperty, | |
a = /[!'\(\)~]|%20|%00/g, | |
o = /%(?![0-9a-fA-F]{2})/g, | |
l = /\+/g, | |
u = { | |
'!': '%21', | |
'\'': '%27', | |
'(': '%28', | |
')': '%29', | |
'~': '%7E', | |
'%20': '+', | |
'%00': '\x00' | |
}, | |
c = { | |
append: function (e, t) { | |
p(this._ungap, e, t) | |
}, | |
delete : function (e) { | |
delete this._ungap[e] | |
}, | |
get: function (e) { | |
return this.has(e) ? this._ungap[e][0] : null | |
}, | |
getAll: function (e) { | |
return this.has(e) ? this._ungap[e].slice(0) : [ | |
] | |
}, | |
has: function (e) { | |
return e in this._ungap | |
}, | |
set: function (e, n) { | |
this._ungap[e] = [ | |
t(n) | |
] | |
}, | |
forEach: function (e, n) { | |
var r = this; | |
for (var i in r._ungap) r._ungap[i].forEach(s, i); | |
function s(s) { | |
e.call(n, s, t(i), r) | |
} | |
}, | |
toJSON: function () { | |
return { | |
} | |
}, | |
toString: function () { | |
var e = [ | |
]; | |
for (var t in this._ungap) for (var n = m(t), r = 0, i = this._ungap[t]; r < i.length; r++) e.push(n + '=' + m(i[r])); | |
return e.join('&') | |
} | |
}; | |
for (var h in c) s(d.prototype, h, { | |
configurable: !0, | |
writable: !0, | |
value: c[h] | |
}); | |
function d(e) { | |
var t = i(null); | |
switch (s(this, '_ungap', { | |
value: t | |
}), !0) { | |
case !e: | |
break; | |
case 'string' == typeof e: | |
'?' === e.charAt(0) && (e = e.slice(1)); | |
for (var r = e.split('&'), a = 0, o = r.length; a < o; a++) { | |
var l = (u = r[a]).indexOf('='); | |
- 1 < l ? p(t, v(u.slice(0, l)), v(u.slice(l + 1))) : u.length && p(t, v(u), '') | |
} | |
break; | |
case n(e) : | |
for (a = 0, o = e.length; a < o; a++) { | |
var u; | |
p(t, (u = e[a]) [0], u[1]) | |
} | |
break; | |
case 'forEach' in e: | |
e.forEach(f, t); | |
break; | |
default: | |
for (var c in e) p(t, c, e[c]) | |
} | |
} | |
function f(e, t) { | |
p(this, t, e) | |
} | |
function p(e, t, r) { | |
var i = n(r) ? r.join(',') : r; | |
t in e ? e[t].push(i) : e[t] = [ | |
i | |
] | |
} | |
function v(e) { | |
return decodeURIComponent(e.replace(o, '%25').replace(l, ' ')) | |
} | |
function m(e) { | |
return encodeURIComponent(e).replace(a, g) | |
} | |
function g(e) { | |
return u[e] | |
} | |
r.URLSearchParams = d | |
}(Object, String, Array.isArray) | |
} | |
!function (e) { | |
var t = !1; | |
try { | |
t = !!Symbol.iterator | |
} catch (e) { | |
} | |
function n(e, n) { | |
var r = [ | |
]; | |
return e.forEach(n, r), | |
t ? r[Symbol.iterator]() : { | |
next: function () { | |
var e = r.shift(); | |
return { | |
done: void 0 === e, | |
value: e | |
} | |
} | |
} | |
} | |
'forEach' in e || (e.forEach = function (e, t) { | |
var n = this, | |
r = Object.create(null); | |
this.toString().replace(/=[\s\S]*?(?:&|$)/g, '=').split('=').forEach((function (i) { | |
i.length && !(i in r) && (r[i] = n.getAll(i)).forEach((function (r) { | |
e.call(t, r, i, n) | |
})) | |
})) | |
}), | |
'keys' in e || (e.keys = function () { | |
return n(this, (function (e, t) { | |
this.push(t) | |
})) | |
}), | |
'values' in e || (e.values = function () { | |
return n(this, (function (e, t) { | |
this.push(e) | |
})) | |
}), | |
'entries' in e || (e.entries = function () { | |
return n(this, (function (e, t) { | |
this.push([t, | |
e]) | |
})) | |
}), | |
t && !(Symbol.iterator in e) && (e[Symbol.iterator] = e.entries), | |
'sort' in e || (e.sort = function () { | |
for (var e, t, n, r = this.entries(), i = r.next(), s = i.done, a = [ | |
], o = Object.create(null); !s; ) t = (n = i.value) [0], | |
a.push(t), | |
t in o || (o[t] = [ | |
]), | |
o[t].push(n[1]), | |
s = (i = r.next()).done; | |
for (a.sort(), e = 0; e < a.length; e++) this.delete(a[e]); | |
for (e = 0; e < a.length; e++) t = a[e], | |
this.append(t, o[t].shift()) | |
}), | |
function (t) { | |
var n = t.defineProperty, | |
r = t.getOwnPropertyDescriptor, | |
i = function (t) { | |
var n = t.append; | |
t.append = e.append, | |
URLSearchParams.call(t, t._usp.search.slice(1)), | |
t.append = n | |
}, | |
s = function (e, t) { | |
if (!(e instanceof t)) throw new TypeError('\'searchParams\' accessed on an object that does not implement interface ' + t.name) | |
}, | |
a = function (a) { | |
var o, | |
l, | |
u = a.prototype, | |
c = r(u, 'searchParams'), | |
h = r(u, 'href'), | |
d = r(u, 'search'); | |
!c && d && d.set && (l = function (t) { | |
function r(n, r) { | |
e.append.call(this, n, r), | |
n = this.toString(), | |
t.set.call(this._usp, n ? '?' + n : '') | |
} | |
function i(n) { | |
e.delete.call(this, n), | |
n = this.toString(), | |
t.set.call(this._usp, n ? '?' + n : '') | |
} | |
function s(n, r) { | |
e.set.call(this, n, r), | |
n = this.toString(), | |
t.set.call(this._usp, n ? '?' + n : '') | |
} | |
return function (e, t) { | |
return e.append = r, | |
e.delete = i, | |
e.set = s, | |
n(e, '_usp', { | |
configurable: !0, | |
writable: !0, | |
value: t | |
}) | |
} | |
}(d), o = function (e, t) { | |
return n(e, '_searchParams', { | |
configurable: !0, | |
writable: !0, | |
value: l(t, e) | |
}), | |
t | |
}, t.defineProperties(u, { | |
href: { | |
get: function () { | |
return h.get.call(this) | |
}, | |
set: function (e) { | |
var t = this._searchParams; | |
h.set.call(this, e), | |
t && i(t) | |
} | |
}, | |
search: { | |
get: function () { | |
return d.get.call(this) | |
}, | |
set: function (e) { | |
var t = this._searchParams; | |
d.set.call(this, e), | |
t && i(t) | |
} | |
}, | |
searchParams: { | |
get: function () { | |
return s(this, a), | |
this._searchParams || o(this, new URLSearchParams(this.search.slice(1))) | |
}, | |
set: function (e) { | |
s(this, a), | |
o(this, e) | |
} | |
} | |
})) | |
}; | |
try { | |
a(HTMLAnchorElement), | |
/^function|object$/.test(typeof URL) && URL.prototype && a(URL) | |
} catch (e) { | |
} | |
}(Object) | |
}(r.URLSearchParams.prototype), | |
t.exports = r.URLSearchParams | |
}, | |
{ | |
} | |
], | |
87: [ | |
function (e, t, n) { | |
/*! | |
* jQuery JavaScript Library v3.5.1 | |
* https://jquery.com/ | |
* | |
* Includes Sizzle.js | |
* https://sizzlejs.com/ | |
* | |
* Copyright JS Foundation and other contributors | |
* Released under the MIT license | |
* https://jquery.org/license | |
* | |
* Date: 2020-05-04T22:49Z | |
*/ | |
!function (e, n) { | |
'use strict'; | |
'object' == typeof t && 'object' == typeof t.exports ? t.exports = e.document ? n(e, !0) : function (e) { | |
if (!e.document) throw new Error('jQuery requires a window with a document'); | |
return n(e) | |
} | |
: n(e) | |
}('undefined' != typeof window ? window : this, (function (e, t) { | |
'use strict'; | |
var n = [ | |
], | |
r = Object.getPrototypeOf, | |
i = n.slice, | |
s = n.flat ? function (e) { | |
return n.flat.call(e) | |
} | |
: function (e) { | |
return n.concat.apply([], e) | |
}, | |
a = n.push, | |
o = n.indexOf, | |
l = { | |
}, | |
u = l.toString, | |
c = l.hasOwnProperty, | |
h = c.toString, | |
d = h.call(Object), | |
f = { | |
}, | |
p = function (e) { | |
return 'function' == typeof e && 'number' != typeof e.nodeType | |
}, | |
v = function (e) { | |
return null != e && e === e.window | |
}, | |
m = e.document, | |
g = { | |
type: !0, | |
src: !0, | |
nonce: !0, | |
noModule: !0 | |
}; | |
function y(e, t, n) { | |
var r, | |
i, | |
s = (n = n || m).createElement('script'); | |
if (s.text = e, t) for (r in g) (i = t[r] || t.getAttribute && t.getAttribute(r)) && s.setAttribute(r, i); | |
n.head.appendChild(s).parentNode.removeChild(s) | |
} | |
function b(e) { | |
return null == e ? e + '' : 'object' == typeof e || 'function' == typeof e ? l[u.call(e)] || 'object' : typeof e | |
} | |
var C = '3.5.1', | |
k = function (e, t) { | |
return new k.fn.init(e, t) | |
}; | |
function S(e) { | |
var t = !!e && 'length' in e && e.length, | |
n = b(e); | |
return !p(e) && !v(e) && ('array' === n || 0 === t || 'number' == typeof t && t > 0 && t - 1 in e) | |
} | |
k.fn = k.prototype = { | |
jquery: C, | |
constructor: k, | |
length: 0, | |
toArray: function () { | |
return i.call(this) | |
}, | |
get: function (e) { | |
return null == e ? i.call(this) : e < 0 ? this[e + this.length] : this[e] | |
}, | |
pushStack: function (e) { | |
var t = k.merge(this.constructor(), e); | |
return t.prevObject = this, | |
t | |
}, | |
each: function (e) { | |
return k.each(this, e) | |
}, | |
map: function (e) { | |
return this.pushStack(k.map(this, (function (t, n) { | |
return e.call(t, n, t) | |
}))) | |
}, | |
slice: function () { | |
return this.pushStack(i.apply(this, arguments)) | |
}, | |
first: function () { | |
return this.eq(0) | |
}, | |
last: function () { | |
return this.eq( - 1) | |
}, | |
even: function () { | |
return this.pushStack(k.grep(this, (function (e, t) { | |
return (t + 1) % 2 | |
}))) | |
}, | |
odd: function () { | |
return this.pushStack(k.grep(this, (function (e, t) { | |
return t % 2 | |
}))) | |
}, | |
eq: function (e) { | |
var t = this.length, | |
n = + e + (e < 0 ? t : 0); | |
return this.pushStack(n >= 0 && n < t ? [ | |
this[n] | |
] : [ | |
]) | |
}, | |
end: function () { | |
return this.prevObject || this.constructor() | |
}, | |
push: a, | |
sort: n.sort, | |
splice: n.splice | |
}, | |
k.extend = k.fn.extend = function () { | |
var e, | |
t, | |
n, | |
r, | |
i, | |
s, | |
a = arguments[0] || { | |
}, | |
o = 1, | |
l = arguments.length, | |
u = !1; | |
for ('boolean' == typeof a && (u = a, a = arguments[o] || { | |
}, o++), 'object' == typeof a || p(a) || (a = { | |
}), o === l && (a = this, o--); o < l; o++) if (null != (e = arguments[o])) for (t in e) r = e[t], | |
'__proto__' !== t && a !== r && (u && r && (k.isPlainObject(r) || (i = Array.isArray(r))) ? (n = a[t], s = i && !Array.isArray(n) ? [ | |
] : i || k.isPlainObject(n) ? n : { | |
}, i = !1, a[t] = k.extend(u, s, r)) : void 0 !== r && (a[t] = r)); | |
return a | |
}, | |
k.extend({ | |
expando: 'jQuery' + (C + Math.random()).replace(/\D/g, ''), | |
isReady: !0, | |
error: function (e) { | |
throw new Error(e) | |
}, | |
noop: function () { | |
}, | |
isPlainObject: function (e) { | |
var t, | |
n; | |
return !(!e || '[object Object]' !== u.call(e)) && (!(t = r(e)) || 'function' == typeof (n = c.call(t, 'constructor') && t.constructor) && h.call(n) === d) | |
}, | |
isEmptyObject: function (e) { | |
var t; | |
for (t in e) return !1; | |
return !0 | |
}, | |
globalEval: function (e, t, n) { | |
y(e, { | |
nonce: t && t.nonce | |
}, n) | |
}, | |
each: function (e, t) { | |
var n, | |
r = 0; | |
if (S(e)) for (n = e.length; r < n && !1 !== t.call(e[r], r, e[r]); r++); | |
else for (r in e) if (!1 === t.call(e[r], r, e[r])) break; | |
return e | |
}, | |
makeArray: function (e, t) { | |
var n = t || [ | |
]; | |
return null != e && (S(Object(e)) ? k.merge(n, 'string' == typeof e ? [ | |
e | |
] : e) : a.call(n, e)), | |
n | |
}, | |
inArray: function (e, t, n) { | |
return null == t ? - 1 : o.call(t, e, n) | |
}, | |
merge: function (e, t) { | |
for (var n = + t.length, r = 0, i = e.length; r < n; r++) e[i++] = t[r]; | |
return e.length = i, | |
e | |
}, | |
grep: function (e, t, n) { | |
for (var r = [ | |
], i = 0, s = e.length, a = !n; i < s; i++) !t(e[i], i) !== a && r.push(e[i]); | |
return r | |
}, | |
map: function (e, t, n) { | |
var r, | |
i, | |
a = 0, | |
o = [ | |
]; | |
if (S(e)) for (r = e.length; a < r; a++) null != (i = t(e[a], a, n)) && o.push(i); | |
else for (a in e) null != (i = t(e[a], a, n)) && o.push(i); | |
return s(o) | |
}, | |
guid: 1, | |
support: f | |
}), | |
'function' == typeof Symbol && (k.fn[Symbol.iterator] = n[Symbol.iterator]), | |
k.each('Boolean Number String Function Array Date RegExp Object Error Symbol'.split(' '), (function (e, t) { | |
l['[object ' + t + ']'] = t.toLowerCase() | |
})); | |
var w = /*! | |
* Sizzle CSS Selector Engine v2.3.5 | |
* https://sizzlejs.com/ | |
* | |
* Copyright JS Foundation and other contributors | |
* Released under the MIT license | |
* https://js.foundation/ | |
* | |
* Date: 2020-03-14 | |
*/ | |
function (e) { | |
var t, | |
n, | |
r, | |
i, | |
s, | |
a, | |
o, | |
l, | |
u, | |
c, | |
h, | |
d, | |
f, | |
p, | |
v, | |
m, | |
g, | |
y, | |
b, | |
C = 'sizzle' + 1 * new Date, | |
k = e.document, | |
S = 0, | |
w = 0, | |
E = le(), | |
T = le(), | |
L = le(), | |
x = le(), | |
A = function (e, t) { | |
return e === t && (h = !0), | |
0 | |
}, | |
_ = { | |
}.hasOwnProperty, | |
R = [ | |
], | |
D = R.pop, | |
O = R.push, | |
I = R.push, | |
P = R.slice, | |
M = function (e, t) { | |
for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n; | |
return - 1 | |
}, | |
j = 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped', | |
H = '[\\x20\\t\\r\\n\\f]', | |
N = '(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\x00-\\x7f])+', | |
B = '\\[[\\x20\\t\\r\\n\\f]*(' + N + ')(?:' + H + '*([*^$|!~]?=)' + H + '*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|(' + N + '))|)' + H + '*\\]', | |
F = ':(' + N + ')(?:\\(((\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|' + B + ')*)|.*)\\)|)', | |
q = new RegExp(H + '+', 'g'), | |
$ = new RegExp('^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$', 'g'), | |
V = new RegExp('^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*'), | |
U = new RegExp('^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*'), | |
W = new RegExp(H + '|>'), | |
z = new RegExp(F), | |
G = new RegExp('^' + N + '$'), | |
K = { | |
ID: new RegExp('^#(' + N + ')'), | |
CLASS: new RegExp('^\\.(' + N + ')'), | |
TAG: new RegExp('^(' + N + '|[*])'), | |
ATTR: new RegExp('^' + B), | |
PSEUDO: new RegExp('^' + F), | |
CHILD: new RegExp('^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)', 'i'), | |
bool: new RegExp('^(?:' + j + ')$', 'i'), | |
needsContext: new RegExp('^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)', 'i') | |
}, | |
Y = /HTML$/i, | |
Q = /^(?:input|select|textarea|button)$/i, | |
X = /^h\d$/i, | |
Z = /^[^{]+\{\s*\[native \w/, | |
J = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, | |
ee = /[+~]/, | |
te = new RegExp('\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\r\\n\\f])', 'g'), | |
ne = function (e, t) { | |
var n = '0x' + e.slice(1) - 65536; | |
return t || (n < 0 ? String.fromCharCode(n + 65536) : String.fromCharCode(n >> 10 | 55296, 1023 & n | 56320)) | |
}, | |
re = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, | |
ie = function (e, t) { | |
return t ? '\x00' === e ? '�' : e.slice(0, - 1) + '\\' + e.charCodeAt(e.length - 1).toString(16) + ' ' : '\\' + e | |
}, | |
se = function () { | |
d() | |
}, | |
ae = Ce((function (e) { | |
return !0 === e.disabled && 'fieldset' === e.nodeName.toLowerCase() | |
}), { | |
dir: 'parentNode', | |
next: 'legend' | |
}); | |
try { | |
I.apply(R = P.call(k.childNodes), k.childNodes), | |
R[k.childNodes.length].nodeType | |
} catch (e) { | |
I = { | |
apply: R.length ? function (e, t) { | |
O.apply(e, P.call(t)) | |
} | |
: function (e, t) { | |
for (var n = e.length, r = 0; e[n++] = t[r++]; ); | |
e.length = n - 1 | |
} | |
} | |
} | |
function oe(e, t, r, i) { | |
var s, | |
o, | |
u, | |
c, | |
h, | |
p, | |
g, | |
y = t && t.ownerDocument, | |
k = t ? t.nodeType : 9; | |
if (r = r || [ | |
], 'string' != typeof e || !e || 1 !== k && 9 !== k && 11 !== k) return r; | |
if (!i && (d(t), t = t || f, v)) { | |
if (11 !== k && (h = J.exec(e))) if (s = h[1]) { | |
if (9 === k) { | |
if (!(u = t.getElementById(s))) return r; | |
if (u.id === s) return r.push(u), | |
r | |
} else if (y && (u = y.getElementById(s)) && b(t, u) && u.id === s) return r.push(u), | |
r | |
} else { | |
if (h[2]) return I.apply(r, t.getElementsByTagName(e)), | |
r; | |
if ((s = h[3]) && n.getElementsByClassName && t.getElementsByClassName) return I.apply(r, t.getElementsByClassName(s)), | |
r | |
} | |
if (n.qsa && !x[e + ' '] && (!m || !m.test(e)) && (1 !== k || 'object' !== t.nodeName.toLowerCase())) { | |
if (g = e, y = t, 1 === k && (W.test(e) || U.test(e))) { | |
for ((y = ee.test(e) && ge(t.parentNode) || t) === t && n.scope || ((c = t.getAttribute('id')) ? c = c.replace(re, ie) : t.setAttribute('id', c = C)), o = (p = a(e)).length; o--; ) p[o] = (c ? '#' + c : ':scope') + ' ' + be(p[o]); | |
g = p.join(',') | |
} | |
try { | |
return I.apply(r, y.querySelectorAll(g)), | |
r | |
} catch (t) { | |
x(e, !0) | |
} finally { | |
c === C && t.removeAttribute('id') | |
} | |
} | |
} | |
return l(e.replace($, '$1'), t, r, i) | |
} | |
function le() { | |
var e = [ | |
]; | |
return function t(n, i) { | |
return e.push(n + ' ') > r.cacheLength && delete t[e.shift()], | |
t[n + ' '] = i | |
} | |
} | |
function ue(e) { | |
return e[C] = !0, | |
e | |
} | |
function ce(e) { | |
var t = f.createElement('fieldset'); | |
try { | |
return !!e(t) | |
} catch (e) { | |
return !1 | |
} finally { | |
t.parentNode && t.parentNode.removeChild(t), | |
t = null | |
} | |
} | |
function he(e, t) { | |
for (var n = e.split('|'), i = n.length; i--; ) r.attrHandle[n[i]] = t | |
} | |
function de(e, t) { | |
var n = t && e, | |
r = n && 1 === e.nodeType && 1 === t.nodeType && e.sourceIndex - t.sourceIndex; | |
if (r) return r; | |
if (n) for (; n = n.nextSibling; ) if (n === t) return - 1; | |
return e ? 1 : - 1 | |
} | |
function fe(e) { | |
return function (t) { | |
return 'input' === t.nodeName.toLowerCase() && t.type === e | |
} | |
} | |
function pe(e) { | |
return function (t) { | |
var n = t.nodeName.toLowerCase(); | |
return ('input' === n || 'button' === n) && t.type === e | |
} | |
} | |
function ve(e) { | |
return function (t) { | |
return 'form' in t ? t.parentNode && !1 === t.disabled ? 'label' in t ? 'label' in t.parentNode ? t.parentNode.disabled === e : t.disabled === e : t.isDisabled === e || t.isDisabled !== !e && ae(t) === e : t.disabled === e : 'label' in t && t.disabled === e | |
} | |
} | |
function me(e) { | |
return ue((function (t) { | |
return t = + t, | |
ue((function (n, r) { | |
for (var i, s = e([], n.length, t), a = s.length; a--; ) n[i = s[a]] && (n[i] = !(r[i] = n[i])) | |
})) | |
})) | |
} | |
function ge(e) { | |
return e && void 0 !== e.getElementsByTagName && e | |
} | |
for (t in n = oe.support = { | |
}, s = oe.isXML = function (e) { | |
var t = e.namespaceURI, | |
n = (e.ownerDocument || e).documentElement; | |
return !Y.test(t || n && n.nodeName || 'HTML') | |
}, d = oe.setDocument = function (e) { | |
var t, | |
i, | |
a = e ? e.ownerDocument || e : k; | |
return a != f && 9 === a.nodeType && a.documentElement ? (p = (f = a).documentElement, v = !s(f), k != f && (i = f.defaultView) && i.top !== i && (i.addEventListener ? i.addEventListener('unload', se, !1) : i.attachEvent && i.attachEvent('onunload', se)), n.scope = ce((function (e) { | |
return p.appendChild(e).appendChild(f.createElement('div')), | |
void 0 !== e.querySelectorAll && !e.querySelectorAll(':scope fieldset div').length | |
})), n.attributes = ce((function (e) { | |
return e.className = 'i', | |
!e.getAttribute('className') | |
})), n.getElementsByTagName = ce((function (e) { | |
return e.appendChild(f.createComment('')), | |
!e.getElementsByTagName('*').length | |
})), n.getElementsByClassName = Z.test(f.getElementsByClassName), n.getById = ce((function (e) { | |
return p.appendChild(e).id = C, | |
!f.getElementsByName || !f.getElementsByName(C).length | |
})), n.getById ? (r.filter.ID = function (e) { | |
var t = e.replace(te, ne); | |
return function (e) { | |
return e.getAttribute('id') === t | |
} | |
}, r.find.ID = function (e, t) { | |
if (void 0 !== t.getElementById && v) { | |
var n = t.getElementById(e); | |
return n ? [ | |
n | |
] : [ | |
] | |
} | |
}) : (r.filter.ID = function (e) { | |
var t = e.replace(te, ne); | |
return function (e) { | |
var n = void 0 !== e.getAttributeNode && e.getAttributeNode('id'); | |
return n && n.value === t | |
} | |
}, r.find.ID = function (e, t) { | |
if (void 0 !== t.getElementById && v) { | |
var n, | |
r, | |
i, | |
s = t.getElementById(e); | |
if (s) { | |
if ((n = s.getAttributeNode('id')) && n.value === e) return [s]; | |
for (i = t.getElementsByName(e), r = 0; s = i[r++]; ) if ((n = s.getAttributeNode('id')) && n.value === e) return [s] | |
} | |
return [] | |
} | |
}), r.find.TAG = n.getElementsByTagName ? function (e, t) { | |
return void 0 !== t.getElementsByTagName ? t.getElementsByTagName(e) : n.qsa ? t.querySelectorAll(e) : void 0 | |
} | |
: function (e, t) { | |
var n, | |
r = [ | |
], | |
i = 0, | |
s = t.getElementsByTagName(e); | |
if ('*' === e) { | |
for (; n = s[i++]; ) 1 === n.nodeType && r.push(n); | |
return r | |
} | |
return s | |
}, r.find.CLASS = n.getElementsByClassName && function (e, t) { | |
if (void 0 !== t.getElementsByClassName && v) return t.getElementsByClassName(e) | |
}, g = [ | |
], m = [ | |
], (n.qsa = Z.test(f.querySelectorAll)) && (ce((function (e) { | |
var t; | |
p.appendChild(e).innerHTML = '<a id=\'' + C + '\'></a><select id=\'' + C + '-\r\\\' msallowcapture=\'\'><option selected=\'\'></option></select>', | |
e.querySelectorAll('[msallowcapture^=\'\']').length && m.push('[*^$]=[\\x20\\t\\r\\n\\f]*(?:\'\'|"")'), | |
e.querySelectorAll('[selected]').length || m.push('\\[[\\x20\\t\\r\\n\\f]*(?:value|' + j + ')'), | |
e.querySelectorAll('[id~=' + C + '-]').length || m.push('~='), | |
(t = f.createElement('input')).setAttribute('name', ''), | |
e.appendChild(t), | |
e.querySelectorAll('[name=\'\']').length || m.push('\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:\'\'|"")'), | |
e.querySelectorAll(':checked').length || m.push(':checked'), | |
e.querySelectorAll('a#' + C + '+*').length || m.push('.#.+[+~]'), | |
e.querySelectorAll('\\\f'), | |
m.push('[\\r\\n\\f]') | |
})), ce((function (e) { | |
e.innerHTML = '<a href=\'\' disabled=\'disabled\'></a><select disabled=\'disabled\'><option/></select>'; | |
var t = f.createElement('input'); | |
t.setAttribute('type', 'hidden'), | |
e.appendChild(t).setAttribute('name', 'D'), | |
e.querySelectorAll('[name=d]').length && m.push('name[\\x20\\t\\r\\n\\f]*[*^$|!~]?='), | |
2 !== e.querySelectorAll(':enabled').length && m.push(':enabled', ':disabled'), | |
p.appendChild(e).disabled = !0, | |
2 !== e.querySelectorAll(':disabled').length && m.push(':enabled', ':disabled'), | |
e.querySelectorAll('*,:x'), | |
m.push(',.*:') | |
}))), (n.matchesSelector = Z.test(y = p.matches || p.webkitMatchesSelector || p.mozMatchesSelector || p.oMatchesSelector || p.msMatchesSelector)) && ce((function (e) { | |
n.disconnectedMatch = y.call(e, '*'), | |
y.call(e, '[s!=\'\']:x'), | |
g.push('!=', F) | |
})), m = m.length && new RegExp(m.join('|')), g = g.length && new RegExp(g.join('|')), t = Z.test(p.compareDocumentPosition), b = t || Z.test(p.contains) ? function (e, t) { | |
var n = 9 === e.nodeType ? e.documentElement : e, | |
r = t && t.parentNode; | |
return e === r || !(!r || 1 !== r.nodeType || !(n.contains ? n.contains(r) : e.compareDocumentPosition && 16 & e.compareDocumentPosition(r))) | |
} | |
: function (e, t) { | |
if (t) for (; t = t.parentNode; ) if (t === e) return !0; | |
return !1 | |
}, A = t ? function (e, t) { | |
if (e === t) return h = !0, | |
0; | |
var r = !e.compareDocumentPosition - !t.compareDocumentPosition; | |
return r || (1 & (r = (e.ownerDocument || e) == (t.ownerDocument || t) ? e.compareDocumentPosition(t) : 1) || !n.sortDetached && t.compareDocumentPosition(e) === r ? e == f || e.ownerDocument == k && b(k, e) ? - 1 : t == f || t.ownerDocument == k && b(k, t) ? 1 : c ? M(c, e) - M(c, t) : 0 : 4 & r ? - 1 : 1) | |
} | |
: function (e, t) { | |
if (e === t) return h = !0, | |
0; | |
var n, | |
r = 0, | |
i = e.parentNode, | |
s = t.parentNode, | |
a = [ | |
e | |
], | |
o = [ | |
t | |
]; | |
if (!i || !s) return e == f ? - 1 : t == f ? 1 : i ? - 1 : s ? 1 : c ? M(c, e) - M(c, t) : 0; | |
if (i === s) return de(e, t); | |
for (n = e; n = n.parentNode; ) a.unshift(n); | |
for (n = t; n = n.parentNode; ) o.unshift(n); | |
for (; a[r] === o[r]; ) r++; | |
return r ? de(a[r], o[r]) : a[r] == k ? - 1 : o[r] == k ? 1 : 0 | |
}, f) : f | |
}, oe.matches = function (e, t) { | |
return oe(e, null, null, t) | |
}, oe.matchesSelector = function (e, t) { | |
if (d(e), n.matchesSelector && v && !x[t + ' '] && (!g || !g.test(t)) && (!m || !m.test(t))) try { | |
var r = y.call(e, t); | |
if (r || n.disconnectedMatch || e.document && 11 !== e.document.nodeType) return r | |
} catch (e) { | |
x(t, !0) | |
} | |
return oe(t, f, null, [ | |
e | |
]).length > 0 | |
}, oe.contains = function (e, t) { | |
return (e.ownerDocument || e) != f && d(e), | |
b(e, t) | |
}, oe.attr = function (e, t) { | |
(e.ownerDocument || e) != f && d(e); | |
var i = r.attrHandle[t.toLowerCase()], | |
s = i && _.call(r.attrHandle, t.toLowerCase()) ? i(e, t, !v) : void 0; | |
return void 0 !== s ? s : n.attributes || !v ? e.getAttribute(t) : (s = e.getAttributeNode(t)) && s.specified ? s.value : null | |
}, oe.escape = function (e) { | |
return (e + '').replace(re, ie) | |
}, oe.error = function (e) { | |
throw new Error('Syntax error, unrecognized expression: ' + e) | |
}, oe.uniqueSort = function (e) { | |
var t, | |
r = [ | |
], | |
i = 0, | |
s = 0; | |
if (h = !n.detectDuplicates, c = !n.sortStable && e.slice(0), e.sort(A), h) { | |
for (; t = e[s++]; ) t === e[s] && (i = r.push(s)); | |
for (; i--; ) e.splice(r[i], 1) | |
} | |
return c = null, | |
e | |
}, i = oe.getText = function (e) { | |
var t, | |
n = '', | |
r = 0, | |
s = e.nodeType; | |
if (s) { | |
if (1 === s || 9 === s || 11 === s) { | |
if ('string' == typeof e.textContent) return e.textContent; | |
for (e = e.firstChild; e; e = e.nextSibling) n += i(e) | |
} else if (3 === s || 4 === s) return e.nodeValue | |
} else for (; t = e[r++]; ) n += i(t); | |
return n | |
}, (r = oe.selectors = { | |
cacheLength: 50, | |
createPseudo: ue, | |
match: K, | |
attrHandle: { | |
}, | |
find: { | |
}, | |
relative: { | |
'>': { | |
dir: 'parentNode', | |
first: !0 | |
}, | |
' ': { | |
dir: 'parentNode' | |
}, | |
'+': { | |
dir: 'previousSibling', | |
first: !0 | |
}, | |
'~': { | |
dir: 'previousSibling' | |
} | |
}, | |
preFilter: { | |
ATTR: function (e) { | |
return e[1] = e[1].replace(te, ne), | |
e[3] = (e[3] || e[4] || e[5] || '').replace(te, ne), | |
'~=' === e[2] && (e[3] = ' ' + e[3] + ' '), | |
e.slice(0, 4) | |
}, | |
CHILD: function (e) { | |
return e[1] = e[1].toLowerCase(), | |
'nth' === e[1].slice(0, 3) ? (e[3] || oe.error(e[0]), e[4] = + (e[4] ? e[5] + (e[6] || 1) : 2 * ('even' === e[3] || 'odd' === e[3])), e[5] = + (e[7] + e[8] || 'odd' === e[3])) : e[3] && oe.error(e[0]), | |
e | |
}, | |
PSEUDO: function (e) { | |
var t, | |
n = !e[6] && e[2]; | |
return K.CHILD.test(e[0]) ? null : (e[3] ? e[2] = e[4] || e[5] || '' : n && z.test(n) && (t = a(n, !0)) && (t = n.indexOf(')', n.length - t) - n.length) && (e[0] = e[0].slice(0, t), e[2] = n.slice(0, t)), e.slice(0, 3)) | |
} | |
}, | |
filter: { | |
TAG: function (e) { | |
var t = e.replace(te, ne).toLowerCase(); | |
return '*' === e ? function () { | |
return !0 | |
} | |
: function (e) { | |
return e.nodeName && e.nodeName.toLowerCase() === t | |
} | |
}, | |
CLASS: function (e) { | |
var t = E[e + ' ']; | |
return t || (t = new RegExp('(^|[\\x20\\t\\r\\n\\f])' + e + '(' + H + '|$)')) && E(e, (function (e) { | |
return t.test('string' == typeof e.className && e.className || void 0 !== e.getAttribute && e.getAttribute('class') || '') | |
})) | |
}, | |
ATTR: function (e, t, n) { | |
return function (r) { | |
var i = oe.attr(r, e); | |
return null == i ? '!=' === t : !t || (i += '', '=' === t ? i === n : '!=' === t ? i !== n : '^=' === t ? n && 0 === i.indexOf(n) : '*=' === t ? n && i.indexOf(n) > - 1 : '$=' === t ? n && i.slice( - n.length) === n : '~=' === t ? (' ' + i.replace(q, ' ') + ' ').indexOf(n) > - 1 : '|=' === t && (i === n || i.slice(0, n.length + 1) === n + '-')) | |
} | |
}, | |
CHILD: function (e, t, n, r, i) { | |
var s = 'nth' !== e.slice(0, 3), | |
a = 'last' !== e.slice( - 4), | |
o = 'of-type' === t; | |
return 1 === r && 0 === i ? function (e) { | |
return !!e.parentNode | |
} | |
: function (t, n, l) { | |
var u, | |
c, | |
h, | |
d, | |
f, | |
p, | |
v = s !== a ? 'nextSibling' : 'previousSibling', | |
m = t.parentNode, | |
g = o && t.nodeName.toLowerCase(), | |
y = !l && !o, | |
b = !1; | |
if (m) { | |
if (s) { | |
for (; v; ) { | |
for (d = t; d = d[v]; ) if (o ? d.nodeName.toLowerCase() === g : 1 === d.nodeType) return !1; | |
p = v = 'only' === e && !p && 'nextSibling' | |
} | |
return !0 | |
} | |
if (p = [ | |
a ? m.firstChild : m.lastChild | |
], a && y) { | |
for (b = (f = (u = (c = (h = (d = m) [C] || (d[C] = { | |
})) [d.uniqueID] || (h[d.uniqueID] = { | |
})) [e] || [ | |
]) [0] === S && u[1]) && u[2], d = f && m.childNodes[f]; d = ++f && d && d[v] || (b = f = 0) || p.pop(); ) if (1 === d.nodeType && ++b && d === t) { | |
c[e] = [ | |
S, | |
f, | |
b | |
]; | |
break | |
} | |
} else if (y && (b = f = (u = (c = (h = (d = t) [C] || (d[C] = { | |
})) [d.uniqueID] || (h[d.uniqueID] = { | |
})) [e] || [ | |
]) [0] === S && u[1]), !1 === b) for (; (d = ++f && d && d[v] || (b = f = 0) || p.pop()) && ((o ? d.nodeName.toLowerCase() !== g : 1 !== d.nodeType) || !++b || (y && ((c = (h = d[C] || (d[C] = { | |
})) [d.uniqueID] || (h[d.uniqueID] = { | |
})) [e] = [ | |
S, | |
b | |
]), d !== t)); ); | |
return (b -= i) === r || b % r == 0 && b / r >= 0 | |
} | |
} | |
}, | |
PSEUDO: function (e, t) { | |
var n, | |
i = r.pseudos[e] || r.setFilters[e.toLowerCase()] || oe.error('unsupported pseudo: ' + e); | |
return i[C] ? i(t) : i.length > 1 ? (n = [ | |
e, | |
e, | |
'', | |
t | |
], r.setFilters.hasOwnProperty(e.toLowerCase()) ? ue((function (e, n) { | |
for (var r, s = i(e, t), a = s.length; a--; ) e[r = M(e, s[a])] = !(n[r] = s[a]) | |
})) : function (e) { | |
return i(e, 0, n) | |
}) : i | |
} | |
}, | |
pseudos: { | |
not: ue((function (e) { | |
var t = [ | |
], | |
n = [ | |
], | |
r = o(e.replace($, '$1')); | |
return r[C] ? ue((function (e, t, n, i) { | |
for (var s, a = r(e, null, i, [ | |
]), o = e.length; o--; ) (s = a[o]) && (e[o] = !(t[o] = s)) | |
})) : function (e, i, s) { | |
return t[0] = e, | |
r(t, null, s, n), | |
t[0] = null, | |
!n.pop() | |
} | |
})), | |
has: ue((function (e) { | |
return function (t) { | |
return oe(e, t).length > 0 | |
} | |
})), | |
contains: ue((function (e) { | |
return e = e.replace(te, ne), | |
function (t) { | |
return (t.textContent || i(t)).indexOf(e) > - 1 | |
} | |
})), | |
lang: ue((function (e) { | |
return G.test(e || '') || oe.error('unsupported lang: ' + e), | |
e = e.replace(te, ne).toLowerCase(), | |
function (t) { | |
var n; | |
do { | |
if (n = v ? t.lang : t.getAttribute('xml:lang') || t.getAttribute('lang')) return (n = n.toLowerCase()) === e || 0 === n.indexOf(e + '-') | |
} while ((t = t.parentNode) && 1 === t.nodeType); | |
return !1 | |
} | |
})), | |
target: function (t) { | |
var n = e.location && e.location.hash; | |
return n && n.slice(1) === t.id | |
}, | |
root: function (e) { | |
return e === p | |
}, | |
focus: function (e) { | |
return e === f.activeElement && (!f.hasFocus || f.hasFocus()) && !!(e.type || e.href || ~e.tabIndex) | |
}, | |
enabled: ve(!1), | |
disabled: ve(!0), | |
checked: function (e) { | |
var t = e.nodeName.toLowerCase(); | |
return 'input' === t && !!e.checked || 'option' === t && !!e.selected | |
}, | |
selected: function (e) { | |
return e.parentNode && e.parentNode.selectedIndex, | |
!0 === e.selected | |
}, | |
empty: function (e) { | |
for (e = e.firstChild; e; e = e.nextSibling) if (e.nodeType < 6) return !1; | |
return !0 | |
}, | |
parent: function (e) { | |
return !r.pseudos.empty(e) | |
}, | |
header: function (e) { | |
return X.test(e.nodeName) | |
}, | |
input: function (e) { | |
return Q.test(e.nodeName) | |
}, | |
button: function (e) { | |
var t = e.nodeName.toLowerCase(); | |
return 'input' === t && 'button' === e.type || 'button' === t | |
}, | |
text: function (e) { | |
var t; | |
return 'input' === e.nodeName.toLowerCase() && 'text' === e.type && (null == (t = e.getAttribute('type')) || 'text' === t.toLowerCase()) | |
}, | |
first: me((function () { | |
return [0] | |
})), | |
last: me((function (e, t) { | |
return [t - 1] | |
})), | |
eq: me((function (e, t, n) { | |
return [n < 0 ? n + t : n] | |
})), | |
even: me((function (e, t) { | |
for (var n = 0; n < t; n += 2) e.push(n); | |
return e | |
})), | |
odd: me((function (e, t) { | |
for (var n = 1; n < t; n += 2) e.push(n); | |
return e | |
})), | |
lt: me((function (e, t, n) { | |
for (var r = n < 0 ? n + t : n > t ? t : n; --r >= 0; ) e.push(r); | |
return e | |
})), | |
gt: me((function (e, t, n) { | |
for (var r = n < 0 ? n + t : n; ++r < t; ) e.push(r); | |
return e | |
})) | |
} | |
}).pseudos.nth = r.pseudos.eq, { | |
radio: !0, | |
checkbox: !0, | |
file: !0, | |
password: !0, | |
image: !0 | |
}) r.pseudos[t] = fe(t); | |
for (t in { | |
submit: !0, | |
reset: !0 | |
}) r.pseudos[t] = pe(t); | |
function ye() { | |
} | |
function be(e) { | |
for (var t = 0, n = e.length, r = ''; t < n; t++) r += e[t].value; | |
return r | |
} | |
function Ce(e, t, n) { | |
var r = t.dir, | |
i = t.next, | |
s = i || r, | |
a = n && 'parentNode' === s, | |
o = w++; | |
return t.first ? function (t, n, i) { | |
for (; t = t[r]; ) if (1 === t.nodeType || a) return e(t, n, i); | |
return !1 | |
} | |
: function (t, n, l) { | |
var u, | |
c, | |
h, | |
d = [ | |
S, | |
o | |
]; | |
if (l) { | |
for (; t = t[r]; ) if ((1 === t.nodeType || a) && e(t, n, l)) return !0 | |
} else for (; t = t[r]; ) if (1 === t.nodeType || a) if (c = (h = t[C] || (t[C] = { | |
})) [t.uniqueID] || (h[t.uniqueID] = { | |
}), i && i === t.nodeName.toLowerCase()) t = t[r] || t; | |
else { | |
if ((u = c[s]) && u[0] === S && u[1] === o) return d[2] = u[2]; | |
if (c[s] = d, d[2] = e(t, n, l)) return !0 | |
} | |
return !1 | |
} | |
} | |
function ke(e) { | |
return e.length > 1 ? function (t, n, r) { | |
for (var i = e.length; i--; ) if (!e[i](t, n, r)) return !1; | |
return !0 | |
} | |
: e[0] | |
} | |
function Se(e, t, n, r, i) { | |
for (var s, a = [ | |
], o = 0, l = e.length, u = null != t; o < l; o++) (s = e[o]) && (n && !n(s, r, i) || (a.push(s), u && t.push(o))); | |
return a | |
} | |
function we(e, t, n, r, i, s) { | |
return r && !r[C] && (r = we(r)), | |
i && !i[C] && (i = we(i, s)), | |
ue((function (s, a, o, l) { | |
var u, | |
c, | |
h, | |
d = [ | |
], | |
f = [ | |
], | |
p = a.length, | |
v = s || function (e, t, n) { | |
for (var r = 0, i = t.length; r < i; r++) oe(e, t[r], n); | |
return n | |
}(t || '*', o.nodeType ? [ | |
o | |
] : o, [ | |
]), | |
m = !e || !s && t ? v : Se(v, d, e, o, l), | |
g = n ? i || (s ? e : p || r) ? [ | |
] : a : m; | |
if (n && n(m, g, o, l), r) for (u = Se(g, f), r(u, [ | |
], o, l), c = u.length; c--; ) (h = u[c]) && (g[f[c]] = !(m[f[c]] = h)); | |
if (s) { | |
if (i || e) { | |
if (i) { | |
for (u = [ | |
], c = g.length; c--; ) (h = g[c]) && u.push(m[c] = h); | |
i(null, g = [ | |
], u, l) | |
} | |
for (c = g.length; c--; ) (h = g[c]) && (u = i ? M(s, h) : d[c]) > - 1 && (s[u] = !(a[u] = h)) | |
} | |
} else g = Se(g === a ? g.splice(p, g.length) : g), | |
i ? i(null, a, g, l) : I.apply(a, g) | |
})) | |
} | |
function Ee(e) { | |
for (var t, n, i, s = e.length, a = r.relative[e[0].type], o = a || r.relative[' '], l = a ? 1 : 0, c = Ce((function (e) { | |
return e === t | |
}), o, !0), h = Ce((function (e) { | |
return M(t, e) > - 1 | |
}), o, !0), d = [ | |
function (e, n, r) { | |
var i = !a && (r || n !== u) || ((t = n).nodeType ? c(e, n, r) : h(e, n, r)); | |
return t = null, | |
i | |
} | |
]; l < s; l++) if (n = r.relative[e[l].type]) d = [ | |
Ce(ke(d), n) | |
]; | |
else { | |
if ((n = r.filter[e[l].type].apply(null, e[l].matches)) [C]) { | |
for (i = ++l; i < s && !r.relative[e[i].type]; i++); | |
return we(l > 1 && ke(d), l > 1 && be(e.slice(0, l - 1).concat({ | |
value: ' ' === e[l - 2].type ? '*' : '' | |
})).replace($, '$1'), n, l < i && Ee(e.slice(l, i)), i < s && Ee(e = e.slice(i)), i < s && be(e)) | |
} | |
d.push(n) | |
} | |
return ke(d) | |
} | |
return ye.prototype = r.filters = r.pseudos, | |
r.setFilters = new ye, | |
a = oe.tokenize = function (e, t) { | |
var n, | |
i, | |
s, | |
a, | |
o, | |
l, | |
u, | |
c = T[e + ' ']; | |
if (c) return t ? 0 : c.slice(0); | |
for (o = e, l = [ | |
], u = r.preFilter; o; ) { | |
for (a in n && !(i = V.exec(o)) || (i && (o = o.slice(i[0].length) || o), l.push(s = [ | |
])), n = !1, (i = U.exec(o)) && (n = i.shift(), s.push({ | |
value: n, | |
type: i[0].replace($, ' ') | |
}), o = o.slice(n.length)), r.filter) !(i = K[a].exec(o)) || u[a] && !(i = u[a](i)) || (n = i.shift(), s.push({ | |
value: n, | |
type: a, | |
matches: i | |
}), o = o.slice(n.length)); | |
if (!n) break | |
} | |
return t ? o.length : o ? oe.error(e) : T(e, l).slice(0) | |
}, | |
o = oe.compile = function (e, t) { | |
var n, | |
i = [ | |
], | |
s = [ | |
], | |
o = L[e + ' ']; | |
if (!o) { | |
for (t || (t = a(e)), n = t.length; n--; ) (o = Ee(t[n])) [C] ? i.push(o) : s.push(o); | |
(o = L(e, function (e, t) { | |
var n = t.length > 0, | |
i = e.length > 0, | |
s = function (s, a, o, l, c) { | |
var h, | |
p, | |
m, | |
g = 0, | |
y = '0', | |
b = s && [ | |
], | |
C = [ | |
], | |
k = u, | |
w = s || i && r.find.TAG('*', c), | |
E = S += null == k ? 1 : Math.random() || 0.1, | |
T = w.length; | |
for (c && (u = a == f || a || c); y !== T && null != (h = w[y]); y++) { | |
if (i && h) { | |
for (p = 0, a || h.ownerDocument == f || (d(h), o = !v); m = e[p++]; ) if (m(h, a || f, o)) { | |
l.push(h); | |
break | |
} | |
c && (S = E) | |
} | |
n && ((h = !m && h) && g--, s && b.push(h)) | |
} | |
if (g += y, n && y !== g) { | |
for (p = 0; m = t[p++]; ) m(b, C, a, o); | |
if (s) { | |
if (g > 0) for (; y--; ) b[y] || C[y] || (C[y] = D.call(l)); | |
C = Se(C) | |
} | |
I.apply(l, C), | |
c && !s && C.length > 0 && g + t.length > 1 && oe.uniqueSort(l) | |
} | |
return c && (S = E, u = k), | |
b | |
}; | |
return n ? ue(s) : s | |
}(s, i))).selector = e | |
} | |
return o | |
}, | |
l = oe.select = function (e, t, n, i) { | |
var s, | |
l, | |
u, | |
c, | |
h, | |
d = 'function' == typeof e && e, | |
f = !i && a(e = d.selector || e); | |
if (n = n || [ | |
], 1 === f.length) { | |
if ((l = f[0] = f[0].slice(0)).length > 2 && 'ID' === (u = l[0]).type && 9 === t.nodeType && v && r.relative[l[1].type]) { | |
if (!(t = (r.find.ID(u.matches[0].replace(te, ne), t) || [ | |
]) [0])) return n; | |
d && (t = t.parentNode), | |
e = e.slice(l.shift().value.length) | |
} | |
for (s = K.needsContext.test(e) ? 0 : l.length; s-- && (u = l[s], !r.relative[c = u.type]); ) if ((h = r.find[c]) && (i = h(u.matches[0].replace(te, ne), ee.test(l[0].type) && ge(t.parentNode) || t))) { | |
if (l.splice(s, 1), !(e = i.length && be(l))) return I.apply(n, i), | |
n; | |
break | |
} | |
} | |
return (d || o(e, f)) (i, t, !v, n, !t || ee.test(e) && ge(t.parentNode) || t), | |
n | |
}, | |
n.sortStable = C.split('').sort(A).join('') === C, | |
n.detectDuplicates = !!h, | |
d(), | |
n.sortDetached = ce((function (e) { | |
return 1 & e.compareDocumentPosition(f.createElement('fieldset')) | |
})), | |
ce((function (e) { | |
return e.innerHTML = '<a href=\'#\'></a>', | |
'#' === e.firstChild.getAttribute('href') | |
})) || he('type|href|height|width', (function (e, t, n) { | |
if (!n) return e.getAttribute(t, 'type' === t.toLowerCase() ? 1 : 2) | |
})), | |
n.attributes && ce((function (e) { | |
return e.innerHTML = '<input/>', | |
e.firstChild.setAttribute('value', ''), | |
'' === e.firstChild.getAttribute('value') | |
})) || he('value', (function (e, t, n) { | |
if (!n && 'input' === e.nodeName.toLowerCase()) return e.defaultValue | |
})), | |
ce((function (e) { | |
return null == e.getAttribute('disabled') | |
})) || he(j, (function (e, t, n) { | |
var r; | |
if (!n) return !0 === e[t] ? t.toLowerCase() : (r = e.getAttributeNode(t)) && r.specified ? r.value : null | |
})), | |
oe | |
}(e); | |
k.find = w, | |
k.expr = w.selectors, | |
k.expr[':'] = k.expr.pseudos, | |
k.uniqueSort = k.unique = w.uniqueSort, | |
k.text = w.getText, | |
k.isXMLDoc = w.isXML, | |
k.contains = w.contains, | |
k.escapeSelector = w.escape; | |
var E = function (e, t, n) { | |
for (var r = [ | |
], i = void 0 !== n; (e = e[t]) && 9 !== e.nodeType; ) if (1 === e.nodeType) { | |
if (i && k(e).is(n)) break; | |
r.push(e) | |
} | |
return r | |
}, | |
T = function (e, t) { | |
for (var n = [ | |
]; e; e = e.nextSibling) 1 === e.nodeType && e !== t && n.push(e); | |
return n | |
}, | |
L = k.expr.match.needsContext; | |
function x(e, t) { | |
return e.nodeName && e.nodeName.toLowerCase() === t.toLowerCase() | |
} | |
var A = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i; | |
function _(e, t, n) { | |
return p(t) ? k.grep(e, (function (e, r) { | |
return !!t.call(e, r, e) !== n | |
})) : t.nodeType ? k.grep(e, (function (e) { | |
return e === t !== n | |
})) : 'string' != typeof t ? k.grep(e, (function (e) { | |
return o.call(t, e) > - 1 !== n | |
})) : k.filter(t, e, n) | |
} | |
k.filter = function (e, t, n) { | |
var r = t[0]; | |
return n && (e = ':not(' + e + ')'), | |
1 === t.length && 1 === r.nodeType ? k.find.matchesSelector(r, e) ? [ | |
r | |
] : [ | |
] : k.find.matches(e, k.grep(t, (function (e) { | |
return 1 === e.nodeType | |
}))) | |
}, | |
k.fn.extend({ | |
find: function (e) { | |
var t, | |
n, | |
r = this.length, | |
i = this; | |
if ('string' != typeof e) return this.pushStack(k(e).filter((function () { | |
for (t = 0; t < r; t++) if (k.contains(i[t], this)) return !0 | |
}))); | |
for (n = this.pushStack([]), t = 0; t < r; t++) k.find(e, i[t], n); | |
return r > 1 ? k.uniqueSort(n) : n | |
}, | |
filter: function (e) { | |
return this.pushStack(_(this, e || [ | |
], !1)) | |
}, | |
not: function (e) { | |
return this.pushStack(_(this, e || [ | |
], !0)) | |
}, | |
is: function (e) { | |
return !!_(this, 'string' == typeof e && L.test(e) ? k(e) : e || [ | |
], !1).length | |
} | |
}); | |
var R, | |
D = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/; | |
(k.fn.init = function (e, t, n) { | |
var r, | |
i; | |
if (!e) return this; | |
if (n = n || R, 'string' == typeof e) { | |
if (!(r = '<' === e[0] && '>' === e[e.length - 1] && e.length >= 3 ? [ | |
null, | |
e, | |
null | |
] : D.exec(e)) || !r[1] && t) return !t || t.jquery ? (t || n).find(e) : this.constructor(t).find(e); | |
if (r[1]) { | |
if (t = t instanceof k ? t[0] : t, k.merge(this, k.parseHTML(r[1], t && t.nodeType ? t.ownerDocument || t : m, !0)), A.test(r[1]) && k.isPlainObject(t)) for (r in t) p(this[r]) ? this[r](t[r]) : this.attr(r, t[r]); | |
return this | |
} | |
return (i = m.getElementById(r[2])) && (this[0] = i, this.length = 1), | |
this | |
} | |
return e.nodeType ? (this[0] = e, this.length = 1, this) : p(e) ? void 0 !== n.ready ? n.ready(e) : e(k) : k.makeArray(e, this) | |
}).prototype = k.fn, | |
R = k(m); | |
var O = /^(?:parents|prev(?:Until|All))/, | |
I = { | |
children: !0, | |
contents: !0, | |
next: !0, | |
prev: !0 | |
}; | |
function P(e, t) { | |
for (; (e = e[t]) && 1 !== e.nodeType; ); | |
return e | |
} | |
k.fn.extend({ | |
has: function (e) { | |
var t = k(e, this), | |
n = t.length; | |
return this.filter((function () { | |
for (var e = 0; e < n; e++) if (k.contains(this, t[e])) return !0 | |
})) | |
}, | |
closest: function (e, t) { | |
var n, | |
r = 0, | |
i = this.length, | |
s = [ | |
], | |
a = 'string' != typeof e && k(e); | |
if (!L.test(e)) for (; r < i; r++) for (n = this[r]; n && n !== t; n = n.parentNode) if (n.nodeType < 11 && (a ? a.index(n) > - 1 : 1 === n.nodeType && k.find.matchesSelector(n, e))) { | |
s.push(n); | |
break | |
} | |
return this.pushStack(s.length > 1 ? k.uniqueSort(s) : s) | |
}, | |
index: function (e) { | |
return e ? 'string' == typeof e ? o.call(k(e), this[0]) : o.call(this, e.jquery ? e[0] : e) : this[0] && this[0].parentNode ? this.first().prevAll().length : - 1 | |
}, | |
add: function (e, t) { | |
return this.pushStack(k.uniqueSort(k.merge(this.get(), k(e, t)))) | |
}, | |
addBack: function (e) { | |
return this.add(null == e ? this.prevObject : this.prevObject.filter(e)) | |
} | |
}), | |
k.each({ | |
parent: function (e) { | |
var t = e.parentNode; | |
return t && 11 !== t.nodeType ? t : null | |
}, | |
parents: function (e) { | |
return E(e, 'parentNode') | |
}, | |
parentsUntil: function (e, t, n) { | |
return E(e, 'parentNode', n) | |
}, | |
next: function (e) { | |
return P(e, 'nextSibling') | |
}, | |
prev: function (e) { | |
return P(e, 'previousSibling') | |
}, | |
nextAll: function (e) { | |
return E(e, 'nextSibling') | |
}, | |
prevAll: function (e) { | |
return E(e, 'previousSibling') | |
}, | |
nextUntil: function (e, t, n) { | |
return E(e, 'nextSibling', n) | |
}, | |
prevUntil: function (e, t, n) { | |
return E(e, 'previousSibling', n) | |
}, | |
siblings: function (e) { | |
return T((e.parentNode || { | |
}).firstChild, e) | |
}, | |
children: function (e) { | |
return T(e.firstChild) | |
}, | |
contents: function (e) { | |
return null != e.contentDocument && r(e.contentDocument) ? e.contentDocument : (x(e, 'template') && (e = e.content || e), k.merge([], e.childNodes)) | |
} | |
}, (function (e, t) { | |
k.fn[e] = function (n, r) { | |
var i = k.map(this, t, n); | |
return 'Until' !== e.slice( - 5) && (r = n), | |
r && 'string' == typeof r && (i = k.filter(r, i)), | |
this.length > 1 && (I[e] || k.uniqueSort(i), O.test(e) && i.reverse()), | |
this.pushStack(i) | |
} | |
})); | |
var M = /[^\x20\t\r\n\f]+/g; | |
function j(e) { | |
return e | |
} | |
function H(e) { | |
throw e | |
} | |
function N(e, t, n, r) { | |
var i; | |
try { | |
e && p(i = e.promise) ? i.call(e).done(t).fail(n) : e && p(i = e.then) ? i.call(e, t, n) : t.apply(void 0, [ | |
e | |
].slice(r)) | |
} catch (e) { | |
n.apply(void 0, [ | |
e | |
]) | |
} | |
} | |
k.Callbacks = function (e) { | |
e = 'string' == typeof e ? function (e) { | |
var t = { | |
}; | |
return k.each(e.match(M) || [ | |
], (function (e, n) { | |
t[n] = !0 | |
})), | |
t | |
}(e) : k.extend({ | |
}, e); | |
var t, | |
n, | |
r, | |
i, | |
s = [ | |
], | |
a = [ | |
], | |
o = - 1, | |
l = function () { | |
for (i = i || e.once, r = t = !0; a.length; o = - 1) for (n = a.shift(); ++o < s.length; ) !1 === s[o].apply(n[0], n[1]) && e.stopOnFalse && (o = s.length, n = !1); | |
e.memory || (n = !1), | |
t = !1, | |
i && (s = n ? [ | |
] : '') | |
}, | |
u = { | |
add: function () { | |
return s && (n && !t && (o = s.length - 1, a.push(n)), function t(n) { | |
k.each(n, (function (n, r) { | |
p(r) ? e.unique && u.has(r) || s.push(r) : r && r.length && 'string' !== b(r) && t(r) | |
})) | |
}(arguments), n && !t && l()), | |
this | |
}, | |
remove: function () { | |
return k.each(arguments, (function (e, t) { | |
for (var n; (n = k.inArray(t, s, n)) > - 1; ) s.splice(n, 1), | |
n <= o && o-- | |
})), | |
this | |
}, | |
has: function (e) { | |
return e ? k.inArray(e, s) > - 1 : s.length > 0 | |
}, | |
empty: function () { | |
return s && (s = [ | |
]), | |
this | |
}, | |
disable: function () { | |
return i = a = [ | |
], | |
s = n = '', | |
this | |
}, | |
disabled: function () { | |
return !s | |
}, | |
lock: function () { | |
return i = a = [ | |
], | |
n || t || (s = n = ''), | |
this | |
}, | |
locked: function () { | |
return !!i | |
}, | |
fireWith: function (e, n) { | |
return i || (n = [ | |
e, | |
(n = n || [ | |
]).slice ? n.slice() : n | |
], a.push(n), t || l()), | |
this | |
}, | |
fire: function () { | |
return u.fireWith(this, arguments), | |
this | |
}, | |
fired: function () { | |
return !!r | |
} | |
}; | |
return u | |
}, | |
k.extend({ | |
Deferred: function (t) { | |
var n = [ | |
['notify', | |
'progress', | |
k.Callbacks('memory'), | |
k.Callbacks('memory'), | |
2], | |
[ | |
'resolve', | |
'done', | |
k.Callbacks('once memory'), | |
k.Callbacks('once memory'), | |
0, | |
'resolved' | |
], | |
[ | |
'reject', | |
'fail', | |
k.Callbacks('once memory'), | |
k.Callbacks('once memory'), | |
1, | |
'rejected' | |
] | |
], | |
r = 'pending', | |
i = { | |
state: function () { | |
return r | |
}, | |
always: function () { | |
return s.done(arguments).fail(arguments), | |
this | |
}, | |
catch : function (e) { | |
return i.then(null, e) | |
}, | |
pipe: function () { | |
var e = arguments; | |
return k.Deferred((function (t) { | |
k.each(n, (function (n, r) { | |
var i = p(e[r[4]]) && e[r[4]]; | |
s[r[1]]((function () { | |
var e = i && i.apply(this, arguments); | |
e && p(e.promise) ? e.promise().progress(t.notify).done(t.resolve).fail(t.reject) : t[r[0] + 'With'](this, i ? [ | |
e | |
] : arguments) | |
})) | |
})), | |
e = null | |
})).promise() | |
}, | |
then: function (t, r, i) { | |
var s = 0; | |
function a(t, n, r, i) { | |
return function () { | |
var o = this, | |
l = arguments, | |
u = function () { | |
var e, | |
u; | |
if (!(t < s)) { | |
if ((e = r.apply(o, l)) === n.promise()) throw new TypeError('Thenable self-resolution'); | |
u = e && ('object' == typeof e || 'function' == typeof e) && e.then, | |
p(u) ? i ? u.call(e, a(s, n, j, i), a(s, n, H, i)) : (s++, u.call(e, a(s, n, j, i), a(s, n, H, i), a(s, n, j, n.notifyWith))) : (r !== j && (o = void 0, l = [ | |
e | |
]), (i || n.resolveWith) (o, l)) | |
} | |
}, | |
c = i ? u : function () { | |
try { | |
u() | |
} catch (e) { | |
k.Deferred.exceptionHook && k.Deferred.exceptionHook(e, c.stackTrace), | |
t + 1 >= s && (r !== H && (o = void 0, l = [ | |
e | |
]), n.rejectWith(o, l)) | |
} | |
}; | |
t ? c() : (k.Deferred.getStackHook && (c.stackTrace = k.Deferred.getStackHook()), e.setTimeout(c)) | |
} | |
} | |
return k.Deferred((function (e) { | |
n[0][3].add(a(0, e, p(i) ? i : j, e.notifyWith)), | |
n[1][3].add(a(0, e, p(t) ? t : j)), | |
n[2][3].add(a(0, e, p(r) ? r : H)) | |
})).promise() | |
}, | |
promise: function (e) { | |
return null != e ? k.extend(e, i) : i | |
} | |
}, | |
s = { | |
}; | |
return k.each(n, (function (e, t) { | |
var a = t[2], | |
o = t[5]; | |
i[t[1]] = a.add, | |
o && a.add((function () { | |
r = o | |
}), n[3 - e][2].disable, n[3 - e][3].disable, n[0][2].lock, n[0][3].lock), | |
a.add(t[3].fire), | |
s[t[0]] = function () { | |
return s[t[0] + 'With'](this === s ? void 0 : this, arguments), | |
this | |
}, | |
s[t[0] + 'With'] = a.fireWith | |
})), | |
i.promise(s), | |
t && t.call(s, s), | |
s | |
}, | |
when: function (e) { | |
var t = arguments.length, | |
n = t, | |
r = Array(n), | |
s = i.call(arguments), | |
a = k.Deferred(), | |
o = function (e) { | |
return function (n) { | |
r[e] = this, | |
s[e] = arguments.length > 1 ? i.call(arguments) : n, | |
--t || a.resolveWith(r, s) | |
} | |
}; | |
if (t <= 1 && (N(e, a.done(o(n)).resolve, a.reject, !t), 'pending' === a.state() || p(s[n] && s[n].then))) return a.then(); | |
for (; n--; ) N(s[n], o(n), a.reject); | |
return a.promise() | |
} | |
}); | |
var B = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; | |
k.Deferred.exceptionHook = function (t, n) { | |
e.console && e.console.warn && t && B.test(t.name) && e.console.warn('jQuery.Deferred exception: ' + t.message, t.stack, n) | |
}, | |
k.readyException = function (t) { | |
e.setTimeout((function () { | |
throw t | |
})) | |
}; | |
var F = k.Deferred(); | |
function q() { | |
m.removeEventListener('DOMContentLoaded', q), | |
e.removeEventListener('load', q), | |
k.ready() | |
} | |
k.fn.ready = function (e) { | |
return F.then(e).catch((function (e) { | |
k.readyException(e) | |
})), | |
this | |
}, | |
k.extend({ | |
isReady: !1, | |
readyWait: 1, | |
ready: function (e) { | |
(!0 === e ? --k.readyWait : k.isReady) || (k.isReady = !0, !0 !== e && --k.readyWait > 0 || F.resolveWith(m, [ | |
k | |
])) | |
} | |
}), | |
k.ready.then = F.then, | |
'complete' === m.readyState || 'loading' !== m.readyState && !m.documentElement.doScroll ? e.setTimeout(k.ready) : (m.addEventListener('DOMContentLoaded', q), e.addEventListener('load', q)); | |
var $ = function (e, t, n, r, i, s, a) { | |
var o = 0, | |
l = e.length, | |
u = null == n; | |
if ('object' === b(n)) for (o in i = !0, n) $(e, t, o, n[o], !0, s, a); | |
else if (void 0 !== r && (i = !0, p(r) || (a = !0), u && (a ? (t.call(e, r), t = null) : (u = t, t = function (e, t, n) { | |
return u.call(k(e), n) | |
})), t)) for (; o < l; o++) t(e[o], n, a ? r : r.call(e[o], o, t(e[o], n))); | |
return i ? e : u ? t.call(e) : l ? t(e[0], n) : s | |
}, | |
V = /^-ms-/, | |
U = /-([a-z])/g; | |
function W(e, t) { | |
return t.toUpperCase() | |
} | |
function z(e) { | |
return e.replace(V, 'ms-').replace(U, W) | |
} | |
var G = function (e) { | |
return 1 === e.nodeType || 9 === e.nodeType || ! + e.nodeType | |
}; | |
function K() { | |
this.expando = k.expando + K.uid++ | |
} | |
K.uid = 1, | |
K.prototype = { | |
cache: function (e) { | |
var t = e[this.expando]; | |
return t || (t = { | |
}, G(e) && (e.nodeType ? e[this.expando] = t : Object.defineProperty(e, this.expando, { | |
value: t, | |
configurable: !0 | |
}))), | |
t | |
}, | |
set: function (e, t, n) { | |
var r, | |
i = this.cache(e); | |
if ('string' == typeof t) i[z(t)] = n; | |
else for (r in t) i[z(r)] = t[r]; | |
return i | |
}, | |
get: function (e, t) { | |
return void 0 === t ? this.cache(e) : e[this.expando] && e[this.expando][z(t)] | |
}, | |
access: function (e, t, n) { | |
return void 0 === t || t && 'string' == typeof t && void 0 === n ? this.get(e, t) : (this.set(e, t, n), void 0 !== n ? n : t) | |
}, | |
remove: function (e, t) { | |
var n, | |
r = e[this.expando]; | |
if (void 0 !== r) { | |
if (void 0 !== t) { | |
n = (t = Array.isArray(t) ? t.map(z) : (t = z(t)) in r ? [ | |
t | |
] : t.match(M) || [ | |
]).length; | |
for (; n--; ) delete r[t[n]] | |
}(void 0 === t || k.isEmptyObject(r)) && (e.nodeType ? e[this.expando] = void 0 : delete e[this.expando]) | |
} | |
}, | |
hasData: function (e) { | |
var t = e[this.expando]; | |
return void 0 !== t && !k.isEmptyObject(t) | |
} | |
}; | |
var Y = new K, | |
Q = new K, | |
X = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, | |
Z = /[A-Z]/g; | |
function J(e, t, n) { | |
var r; | |
if (void 0 === n && 1 === e.nodeType) if (r = 'data-' + t.replace(Z, '-$&').toLowerCase(), 'string' == typeof (n = e.getAttribute(r))) { | |
try { | |
n = function (e) { | |
return 'true' === e || 'false' !== e && ('null' === e ? null : e === + e + '' ? + e : X.test(e) ? JSON.parse(e) : e) | |
}(n) | |
} catch (e) { | |
} | |
Q.set(e, t, n) | |
} else n = void 0; | |
return n | |
} | |
k.extend({ | |
hasData: function (e) { | |
return Q.hasData(e) || Y.hasData(e) | |
}, | |
data: function (e, t, n) { | |
return Q.access(e, t, n) | |
}, | |
removeData: function (e, t) { | |
Q.remove(e, t) | |
}, | |
_data: function (e, t, n) { | |
return Y.access(e, t, n) | |
}, | |
_removeData: function (e, t) { | |
Y.remove(e, t) | |
} | |
}), | |
k.fn.extend({ | |
data: function (e, t) { | |
var n, | |
r, | |
i, | |
s = this[0], | |
a = s && s.attributes; | |
if (void 0 === e) { | |
if (this.length && (i = Q.get(s), 1 === s.nodeType && !Y.get(s, 'hasDataAttrs'))) { | |
for (n = a.length; n--; ) a[n] && 0 === (r = a[n].name).indexOf('data-') && (r = z(r.slice(5)), J(s, r, i[r])); | |
Y.set(s, 'hasDataAttrs', !0) | |
} | |
return i | |
} | |
return 'object' == typeof e ? this.each((function () { | |
Q.set(this, e) | |
})) : $(this, (function (t) { | |
var n; | |
if (s && void 0 === t) return void 0 !== (n = Q.get(s, e)) || void 0 !== (n = J(s, e)) ? n : void 0; | |
this.each((function () { | |
Q.set(this, e, t) | |
})) | |
}), null, t, arguments.length > 1, null, !0) | |
}, | |
removeData: function (e) { | |
return this.each((function () { | |
Q.remove(this, e) | |
})) | |
} | |
}), | |
k.extend({ | |
queue: function (e, t, n) { | |
var r; | |
if (e) return t = (t || 'fx') + 'queue', | |
r = Y.get(e, t), | |
n && (!r || Array.isArray(n) ? r = Y.access(e, t, k.makeArray(n)) : r.push(n)), | |
r || [ | |
] | |
}, | |
dequeue: function (e, t) { | |
t = t || 'fx'; | |
var n = k.queue(e, t), | |
r = n.length, | |
i = n.shift(), | |
s = k._queueHooks(e, t); | |
'inprogress' === i && (i = n.shift(), r--), | |
i && ('fx' === t && n.unshift('inprogress'), delete s.stop, i.call(e, (function () { | |
k.dequeue(e, t) | |
}), s)), | |
!r && s && s.empty.fire() | |
}, | |
_queueHooks: function (e, t) { | |
var n = t + 'queueHooks'; | |
return Y.get(e, n) || Y.access(e, n, { | |
empty: k.Callbacks('once memory').add((function () { | |
Y.remove(e, [ | |
t + 'queue', | |
n | |
]) | |
})) | |
}) | |
} | |
}), | |
k.fn.extend({ | |
queue: function (e, t) { | |
var n = 2; | |
return 'string' != typeof e && (t = e, e = 'fx', n--), | |
arguments.length < n ? k.queue(this[0], e) : void 0 === t ? this : this.each((function () { | |
var n = k.queue(this, e, t); | |
k._queueHooks(this, e), | |
'fx' === e && 'inprogress' !== n[0] && k.dequeue(this, e) | |
})) | |
}, | |
dequeue: function (e) { | |
return this.each((function () { | |
k.dequeue(this, e) | |
})) | |
}, | |
clearQueue: function (e) { | |
return this.queue(e || 'fx', [ | |
]) | |
}, | |
promise: function (e, t) { | |
var n, | |
r = 1, | |
i = k.Deferred(), | |
s = this, | |
a = this.length, | |
o = function () { | |
--r || i.resolveWith(s, [ | |
s | |
]) | |
}; | |
for ('string' != typeof e && (t = e, e = void 0), e = e || 'fx'; a--; ) (n = Y.get(s[a], e + 'queueHooks')) && n.empty && (r++, n.empty.add(o)); | |
return o(), | |
i.promise(t) | |
} | |
}); | |
var ee = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, | |
te = new RegExp('^(?:([+-])=|)(' + ee + ')([a-z%]*)$', 'i'), | |
ne = [ | |
'Top', | |
'Right', | |
'Bottom', | |
'Left' | |
], | |
re = m.documentElement, | |
ie = function (e) { | |
return k.contains(e.ownerDocument, e) | |
}, | |
se = { | |
composed: !0 | |
}; | |
re.getRootNode && (ie = function (e) { | |
return k.contains(e.ownerDocument, e) || e.getRootNode(se) === e.ownerDocument | |
}); | |
var ae = function (e, t) { | |
return 'none' === (e = t || e).style.display || '' === e.style.display && ie(e) && 'none' === k.css(e, 'display') | |
}; | |
function oe(e, t, n, r) { | |
var i, | |
s, | |
a = 20, | |
o = r ? function () { | |
return r.cur() | |
} | |
: function () { | |
return k.css(e, t, '') | |
}, | |
l = o(), | |
u = n && n[3] || (k.cssNumber[t] ? '' : 'px'), | |
c = e.nodeType && (k.cssNumber[t] || 'px' !== u && + l) && te.exec(k.css(e, t)); | |
if (c && c[3] !== u) { | |
for (l /= 2, u = u || c[3], c = + l || 1; a--; ) k.style(e, t, c + u), | |
(1 - s) * (1 - (s = o() / l || 0.5)) <= 0 && (a = 0), | |
c /= s; | |
c *= 2, | |
k.style(e, t, c + u), | |
n = n || [ | |
] | |
} | |
return n && (c = + c || + l || 0, i = n[1] ? c + (n[1] + 1) * n[2] : + n[2], r && (r.unit = u, r.start = c, r.end = i)), | |
i | |
} | |
var le = { | |
}; | |
function ue(e) { | |
var t, | |
n = e.ownerDocument, | |
r = e.nodeName, | |
i = le[r]; | |
return i || (t = n.body.appendChild(n.createElement(r)), i = k.css(t, 'display'), t.parentNode.removeChild(t), 'none' === i && (i = 'block'), le[r] = i, i) | |
} | |
function ce(e, t) { | |
for (var n, r, i = [ | |
], s = 0, a = e.length; s < a; s++) (r = e[s]).style && (n = r.style.display, t ? ('none' === n && (i[s] = Y.get(r, 'display') || null, i[s] || (r.style.display = '')), '' === r.style.display && ae(r) && (i[s] = ue(r))) : 'none' !== n && (i[s] = 'none', Y.set(r, 'display', n))); | |
for (s = 0; s < a; s++) null != i[s] && (e[s].style.display = i[s]); | |
return e | |
} | |
k.fn.extend({ | |
show: function () { | |
return ce(this, !0) | |
}, | |
hide: function () { | |
return ce(this) | |
}, | |
toggle: function (e) { | |
return 'boolean' == typeof e ? e ? this.show() : this.hide() : this.each((function () { | |
ae(this) ? k(this).show() : k(this).hide() | |
})) | |
} | |
}); | |
var he, | |
de, | |
fe = /^(?:checkbox|radio)$/i, | |
pe = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i, | |
ve = /^$|^module$|\/(?:java|ecma)script/i; | |
he = m.createDocumentFragment().appendChild(m.createElement('div')), | |
(de = m.createElement('input')).setAttribute('type', 'radio'), | |
de.setAttribute('checked', 'checked'), | |
de.setAttribute('name', 't'), | |
he.appendChild(de), | |
f.checkClone = he.cloneNode(!0).cloneNode(!0).lastChild.checked, | |
he.innerHTML = '<textarea>x</textarea>', | |
f.noCloneChecked = !!he.cloneNode(!0).lastChild.defaultValue, | |
he.innerHTML = '<option></option>', | |
f.option = !!he.lastChild; | |
var me = { | |
thead: [ | |
1, | |
'<table>', | |
'</table>' | |
], | |
col: [ | |
2, | |
'<table><colgroup>', | |
'</colgroup></table>' | |
], | |
tr: [ | |
2, | |
'<table><tbody>', | |
'</tbody></table>' | |
], | |
td: [ | |
3, | |
'<table><tbody><tr>', | |
'</tr></tbody></table>' | |
], | |
_default: [ | |
0, | |
'', | |
'' | |
] | |
}; | |
function ge(e, t) { | |
var n; | |
return n = void 0 !== e.getElementsByTagName ? e.getElementsByTagName(t || '*') : void 0 !== e.querySelectorAll ? e.querySelectorAll(t || '*') : [ | |
], | |
void 0 === t || t && x(e, t) ? k.merge([e], n) : n | |
} | |
function ye(e, t) { | |
for (var n = 0, r = e.length; n < r; n++) Y.set(e[n], 'globalEval', !t || Y.get(t[n], 'globalEval')) | |
} | |
me.tbody = me.tfoot = me.colgroup = me.caption = me.thead, | |
me.th = me.td, | |
f.option || (me.optgroup = me.option = [ | |
1, | |
'<select multiple=\'multiple\'>', | |
'</select>' | |
]); | |
var be = /<|&#?\w+;/; | |
function Ce(e, t, n, r, i) { | |
for (var s, a, o, l, u, c, h = t.createDocumentFragment(), d = [ | |
], f = 0, p = e.length; f < p; f++) if ((s = e[f]) || 0 === s) if ('object' === b(s)) k.merge(d, s.nodeType ? [ | |
s | |
] : s); | |
else if (be.test(s)) { | |
for (a = a || h.appendChild(t.createElement('div')), o = (pe.exec(s) || [ | |
'', | |
'' | |
]) [1].toLowerCase(), l = me[o] || me._default, a.innerHTML = l[1] + k.htmlPrefilter(s) + l[2], c = l[0]; c--; ) a = a.lastChild; | |
k.merge(d, a.childNodes), | |
(a = h.firstChild).textContent = '' | |
} else d.push(t.createTextNode(s)); | |
for (h.textContent = '', f = 0; s = d[f++]; ) if (r && k.inArray(s, r) > - 1) i && i.push(s); | |
else if (u = ie(s), a = ge(h.appendChild(s), 'script'), u && ye(a), n) for (c = 0; s = a[c++]; ) ve.test(s.type || '') && n.push(s); | |
return h | |
} | |
var ke = /^key/, | |
Se = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, | |
we = /^([^.]*)(?:\.(.+)|)/; | |
function Ee() { | |
return !0 | |
} | |
function Te() { | |
return !1 | |
} | |
function Le(e, t) { | |
return e === function () { | |
try { | |
return m.activeElement | |
} catch (e) { | |
} | |
}() == ('focus' === t) | |
} | |
function xe(e, t, n, r, i, s) { | |
var a, | |
o; | |
if ('object' == typeof t) { | |
for (o in 'string' != typeof n && (r = r || n, n = void 0), t) xe(e, o, n, r, t[o], s); | |
return e | |
} | |
if (null == r && null == i ? (i = n, r = n = void 0) : null == i && ('string' == typeof n ? (i = r, r = void 0) : (i = r, r = n, n = void 0)), !1 === i) i = Te; | |
else if (!i) return e; | |
return 1 === s && (a = i, (i = function (e) { | |
return k().off(e), | |
a.apply(this, arguments) | |
}).guid = a.guid || (a.guid = k.guid++)), | |
e.each((function () { | |
k.event.add(this, t, i, r, n) | |
})) | |
} | |
function Ae(e, t, n) { | |
n ? (Y.set(e, t, !1), k.event.add(e, t, { | |
namespace: !1, | |
handler: function (e) { | |
var r, | |
s, | |
a = Y.get(this, t); | |
if (1 & e.isTrigger && this[t]) { | |
if (a.length) (k.event.special[t] || { | |
}).delegateType && e.stopPropagation(); | |
else if (a = i.call(arguments), Y.set(this, t, a), r = n(this, t), this[t](), a !== (s = Y.get(this, t)) || r ? Y.set(this, t, !1) : s = { | |
}, a !== s) return e.stopImmediatePropagation(), | |
e.preventDefault(), | |
s.value | |
} else a.length && (Y.set(this, t, { | |
value: k.event.trigger(k.extend(a[0], k.Event.prototype), a.slice(1), this) | |
}), e.stopImmediatePropagation()) | |
} | |
})) : void 0 === Y.get(e, t) && k.event.add(e, t, Ee) | |
} | |
k.event = { | |
global: { | |
}, | |
add: function (e, t, n, r, i) { | |
var s, | |
a, | |
o, | |
l, | |
u, | |
c, | |
h, | |
d, | |
f, | |
p, | |
v, | |
m = Y.get(e); | |
if (G(e)) for (n.handler && (n = (s = n).handler, i = s.selector), i && k.find.matchesSelector(re, i), n.guid || (n.guid = k.guid++), (l = m.events) || (l = m.events = Object.create(null)), (a = m.handle) || (a = m.handle = function (t) { | |
return void 0 !== k && k.event.triggered !== t.type ? k.event.dispatch.apply(e, arguments) : void 0 | |
}), u = (t = (t || '').match(M) || [ | |
'' | |
]).length; u--; ) f = v = (o = we.exec(t[u]) || [ | |
]) [1], | |
p = (o[2] || '').split('.').sort(), | |
f && (h = k.event.special[f] || { | |
}, f = (i ? h.delegateType : h.bindType) || f, h = k.event.special[f] || { | |
}, c = k.extend({ | |
type: f, | |
origType: v, | |
data: r, | |
handler: n, | |
guid: n.guid, | |
selector: i, | |
needsContext: i && k.expr.match.needsContext.test(i), | |
namespace: p.join('.') | |
}, s), (d = l[f]) || ((d = l[f] = [ | |
]).delegateCount = 0, h.setup && !1 !== h.setup.call(e, r, p, a) || e.addEventListener && e.addEventListener(f, a)), h.add && (h.add.call(e, c), c.handler.guid || (c.handler.guid = n.guid)), i ? d.splice(d.delegateCount++, 0, c) : d.push(c), k.event.global[f] = !0) | |
}, | |
remove: function (e, t, n, r, i) { | |
var s, | |
a, | |
o, | |
l, | |
u, | |
c, | |
h, | |
d, | |
f, | |
p, | |
v, | |
m = Y.hasData(e) && Y.get(e); | |
if (m && (l = m.events)) { | |
for (u = (t = (t || '').match(M) || [ | |
'' | |
]).length; u--; ) if (f = v = (o = we.exec(t[u]) || [ | |
]) [1], p = (o[2] || '').split('.').sort(), f) { | |
for (h = k.event.special[f] || { | |
}, d = l[f = (r ? h.delegateType : h.bindType) || f] || [ | |
], o = o[2] && new RegExp('(^|\\.)' + p.join('\\.(?:.*\\.|)') + '(\\.|$)'), a = s = d.length; s--; ) c = d[s], | |
!i && v !== c.origType || n && n.guid !== c.guid || o && !o.test(c.namespace) || r && r !== c.selector && ('**' !== r || !c.selector) || (d.splice(s, 1), c.selector && d.delegateCount--, h.remove && h.remove.call(e, c)); | |
a && !d.length && (h.teardown && !1 !== h.teardown.call(e, p, m.handle) || k.removeEvent(e, f, m.handle), delete l[f]) | |
} else for (f in l) k.event.remove(e, f + t[u], n, r, !0); | |
k.isEmptyObject(l) && Y.remove(e, 'handle events') | |
} | |
}, | |
dispatch: function (e) { | |
var t, | |
n, | |
r, | |
i, | |
s, | |
a, | |
o = new Array(arguments.length), | |
l = k.event.fix(e), | |
u = (Y.get(this, 'events') || Object.create(null)) [l.type] || [ | |
], | |
c = k.event.special[l.type] || { | |
}; | |
for (o[0] = l, t = 1; t < arguments.length; t++) o[t] = arguments[t]; | |
if (l.delegateTarget = this, !c.preDispatch || !1 !== c.preDispatch.call(this, l)) { | |
for (a = k.event.handlers.call(this, l, u), t = 0; (i = a[t++]) && !l.isPropagationStopped(); ) for (l.currentTarget = i.elem, n = 0; (s = i.handlers[n++]) && !l.isImmediatePropagationStopped(); ) l.rnamespace && !1 !== s.namespace && !l.rnamespace.test(s.namespace) || (l.handleObj = s, l.data = s.data, void 0 !== (r = ((k.event.special[s.origType] || { | |
}).handle || s.handler).apply(i.elem, o)) && !1 === (l.result = r) && (l.preventDefault(), l.stopPropagation())); | |
return c.postDispatch && c.postDispatch.call(this, l), | |
l.result | |
} | |
}, | |
handlers: function (e, t) { | |
var n, | |
r, | |
i, | |
s, | |
a, | |
o = [ | |
], | |
l = t.delegateCount, | |
u = e.target; | |
if (l && u.nodeType && !('click' === e.type && e.button >= 1)) for (; u !== this; u = u.parentNode || this) if (1 === u.nodeType && ('click' !== e.type || !0 !== u.disabled)) { | |
for (s = [ | |
], a = { | |
}, n = 0; n < l; n++) void 0 === a[i = (r = t[n]).selector + ' '] && (a[i] = r.needsContext ? k(i, this).index(u) > - 1 : k.find(i, this, null, [ | |
u | |
]).length), | |
a[i] && s.push(r); | |
s.length && o.push({ | |
elem: u, | |
handlers: s | |
}) | |
} | |
return u = this, | |
l < t.length && o.push({ | |
elem: u, | |
handlers: t.slice(l) | |
}), | |
o | |
}, | |
addProp: function (e, t) { | |
Object.defineProperty(k.Event.prototype, e, { | |
enumerable: !0, | |
configurable: !0, | |
get: p(t) ? function () { | |
if (this.originalEvent) return t(this.originalEvent) | |
} | |
: function () { | |
if (this.originalEvent) return this.originalEvent[e] | |
}, | |
set: function (t) { | |
Object.defineProperty(this, e, { | |
enumerable: !0, | |
configurable: !0, | |
writable: !0, | |
value: t | |
}) | |
} | |
}) | |
}, | |
fix: function (e) { | |
return e[k.expando] ? e : new k.Event(e) | |
}, | |
special: { | |
load: { | |
noBubble: !0 | |
}, | |
click: { | |
setup: function (e) { | |
var t = this || e; | |
return fe.test(t.type) && t.click && x(t, 'input') && Ae(t, 'click', Ee), | |
!1 | |
}, | |
trigger: function (e) { | |
var t = this || e; | |
return fe.test(t.type) && t.click && x(t, 'input') && Ae(t, 'click'), | |
!0 | |
}, | |
_default: function (e) { | |
var t = e.target; | |
return fe.test(t.type) && t.click && x(t, 'input') && Y.get(t, 'click') || x(t, 'a') | |
} | |
}, | |
beforeunload: { | |
postDispatch: function (e) { | |
void 0 !== e.result && e.originalEvent && (e.originalEvent.returnValue = e.result) | |
} | |
} | |
} | |
}, | |
k.removeEvent = function (e, t, n) { | |
e.removeEventListener && e.removeEventListener(t, n) | |
}, | |
k.Event = function (e, t) { | |
if (!(this instanceof k.Event)) return new k.Event(e, t); | |
e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || void 0 === e.defaultPrevented && !1 === e.returnValue ? Ee : Te, this.target = e.target && 3 === e.target.nodeType ? e.target.parentNode : e.target, this.currentTarget = e.currentTarget, this.relatedTarget = e.relatedTarget) : this.type = e, | |
t && k.extend(this, t), | |
this.timeStamp = e && e.timeStamp || Date.now(), | |
this[k.expando] = !0 | |
}, | |
k.Event.prototype = { | |
constructor: k.Event, | |
isDefaultPrevented: Te, | |
isPropagationStopped: Te, | |
isImmediatePropagationStopped: Te, | |
isSimulated: !1, | |
preventDefault: function () { | |
var e = this.originalEvent; | |
this.isDefaultPrevented = Ee, | |
e && !this.isSimulated && e.preventDefault() | |
}, | |
stopPropagation: function () { | |
var e = this.originalEvent; | |
this.isPropagationStopped = Ee, | |
e && !this.isSimulated && e.stopPropagation() | |
}, | |
stopImmediatePropagation: function () { | |
var e = this.originalEvent; | |
this.isImmediatePropagationStopped = Ee, | |
e && !this.isSimulated && e.stopImmediatePropagation(), | |
this.stopPropagation() | |
} | |
}, | |
k.each({ | |
altKey: !0, | |
bubbles: !0, | |
cancelable: !0, | |
changedTouches: !0, | |
ctrlKey: !0, | |
detail: !0, | |
eventPhase: !0, | |
metaKey: !0, | |
pageX: !0, | |
pageY: !0, | |
shiftKey: !0, | |
view: !0, | |
char: !0, | |
code: !0, | |
charCode: !0, | |
key: !0, | |
keyCode: !0, | |
button: !0, | |
buttons: !0, | |
clientX: !0, | |
clientY: !0, | |
offsetX: !0, | |
offsetY: !0, | |
pointerId: !0, | |
pointerType: !0, | |
screenX: !0, | |
screenY: !0, | |
targetTouches: !0, | |
toElement: !0, | |
touches: !0, | |
which: function (e) { | |
var t = e.button; | |
return null == e.which && ke.test(e.type) ? null != e.charCode ? e.charCode : e.keyCode : !e.which && void 0 !== t && Se.test(e.type) ? 1 & t ? 1 : 2 & t ? 3 : 4 & t ? 2 : 0 : e.which | |
} | |
}, k.event.addProp), | |
k.each({ | |
focus: 'focusin', | |
blur: 'focusout' | |
}, (function (e, t) { | |
k.event.special[e] = { | |
setup: function () { | |
return Ae(this, e, Le), | |
!1 | |
}, | |
trigger: function () { | |
return Ae(this, e), | |
!0 | |
}, | |
delegateType: t | |
} | |
})), | |
k.each({ | |
mouseenter: 'mouseover', | |
mouseleave: 'mouseout', | |
pointerenter: 'pointerover', | |
pointerleave: 'pointerout' | |
}, (function (e, t) { | |
k.event.special[e] = { | |
delegateType: t, | |
bindType: t, | |
handle: function (e) { | |
var n, | |
r = this, | |
i = e.relatedTarget, | |
s = e.handleObj; | |
return i && (i === r || k.contains(r, i)) || (e.type = s.origType, n = s.handler.apply(this, arguments), e.type = t), | |
n | |
} | |
} | |
})), | |
k.fn.extend({ | |
on: function (e, t, n, r) { | |
return xe(this, e, t, n, r) | |
}, | |
one: function (e, t, n, r) { | |
return xe(this, e, t, n, r, 1) | |
}, | |
off: function (e, t, n) { | |
var r, | |
i; | |
if (e && e.preventDefault && e.handleObj) return r = e.handleObj, | |
k(e.delegateTarget).off(r.namespace ? r.origType + '.' + r.namespace : r.origType, r.selector, r.handler), | |
this; | |
if ('object' == typeof e) { | |
for (i in e) this.off(i, t, e[i]); | |
return this | |
} | |
return !1 !== t && 'function' != typeof t || (n = t, t = void 0), | |
!1 === n && (n = Te), | |
this.each((function () { | |
k.event.remove(this, e, n, t) | |
})) | |
} | |
}); | |
var _e = /<script|<style|<link/i, | |
Re = /checked\s*(?:[^=]|=\s*.checked.)/i, | |
De = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; | |
function Oe(e, t) { | |
return x(e, 'table') && x(11 !== t.nodeType ? t : t.firstChild, 'tr') && k(e).children('tbody') [0] || e | |
} | |
function Ie(e) { | |
return e.type = (null !== e.getAttribute('type')) + '/' + e.type, | |
e | |
} | |
function Pe(e) { | |
return 'true/' === (e.type || '').slice(0, 5) ? e.type = e.type.slice(5) : e.removeAttribute('type'), | |
e | |
} | |
function Me(e, t) { | |
var n, | |
r, | |
i, | |
s, | |
a, | |
o; | |
if (1 === t.nodeType) { | |
if (Y.hasData(e) && (o = Y.get(e).events)) for (i in Y.remove(t, 'handle events'), o) for (n = 0, r = o[i].length; n < r; n++) k.event.add(t, i, o[i][n]); | |
Q.hasData(e) && (s = Q.access(e), a = k.extend({ | |
}, s), Q.set(t, a)) | |
} | |
} | |
function je(e, t) { | |
var n = t.nodeName.toLowerCase(); | |
'input' === n && fe.test(e.type) ? t.checked = e.checked : 'input' !== n && 'textarea' !== n || (t.defaultValue = e.defaultValue) | |
} | |
function He(e, t, n, r) { | |
t = s(t); | |
var i, | |
a, | |
o, | |
l, | |
u, | |
c, | |
h = 0, | |
d = e.length, | |
v = d - 1, | |
m = t[0], | |
g = p(m); | |
if (g || d > 1 && 'string' == typeof m && !f.checkClone && Re.test(m)) return e.each((function (i) { | |
var s = e.eq(i); | |
g && (t[0] = m.call(this, i, s.html())), | |
He(s, t, n, r) | |
})); | |
if (d && (a = (i = Ce(t, e[0].ownerDocument, !1, e, r)).firstChild, 1 === i.childNodes.length && (i = a), a || r)) { | |
for (l = (o = k.map(ge(i, 'script'), Ie)).length; h < d; h++) u = i, | |
h !== v && (u = k.clone(u, !0, !0), l && k.merge(o, ge(u, 'script'))), | |
n.call(e[h], u, h); | |
if (l) for (c = o[o.length - 1].ownerDocument, k.map(o, Pe), h = 0; h < l; h++) u = o[h], | |
ve.test(u.type || '') && !Y.access(u, 'globalEval') && k.contains(c, u) && (u.src && 'module' !== (u.type || '').toLowerCase() ? k._evalUrl && !u.noModule && k._evalUrl(u.src, { | |
nonce: u.nonce || u.getAttribute('nonce') | |
}, c) : y(u.textContent.replace(De, ''), u, c)) | |
} | |
return e | |
} | |
function Ne(e, t, n) { | |
for (var r, i = t ? k.filter(t, e) : e, s = 0; null != (r = i[s]); s++) n || 1 !== r.nodeType || k.cleanData(ge(r)), | |
r.parentNode && (n && ie(r) && ye(ge(r, 'script')), r.parentNode.removeChild(r)); | |
return e | |
} | |
k.extend({ | |
htmlPrefilter: function (e) { | |
return e | |
}, | |
clone: function (e, t, n) { | |
var r, | |
i, | |
s, | |
a, | |
o = e.cloneNode(!0), | |
l = ie(e); | |
if (!(f.noCloneChecked || 1 !== e.nodeType && 11 !== e.nodeType || k.isXMLDoc(e))) for (a = ge(o), r = 0, i = (s = ge(e)).length; r < i; r++) je(s[r], a[r]); | |
if (t) if (n) for (s = s || ge(e), a = a || ge(o), r = 0, i = s.length; r < i; r++) Me(s[r], a[r]); | |
else Me(e, o); | |
return (a = ge(o, 'script')).length > 0 && ye(a, !l && ge(e, 'script')), | |
o | |
}, | |
cleanData: function (e) { | |
for (var t, n, r, i = k.event.special, s = 0; void 0 !== (n = e[s]); s++) if (G(n)) { | |
if (t = n[Y.expando]) { | |
if (t.events) for (r in t.events) i[r] ? k.event.remove(n, r) : k.removeEvent(n, r, t.handle); | |
n[Y.expando] = void 0 | |
} | |
n[Q.expando] && (n[Q.expando] = void 0) | |
} | |
} | |
}), | |
k.fn.extend({ | |
detach: function (e) { | |
return Ne(this, e, !0) | |
}, | |
remove: function (e) { | |
return Ne(this, e) | |
}, | |
text: function (e) { | |
return $(this, (function (e) { | |
return void 0 === e ? k.text(this) : this.empty().each((function () { | |
1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || (this.textContent = e) | |
})) | |
}), null, e, arguments.length) | |
}, | |
append: function () { | |
return He(this, arguments, (function (e) { | |
1 !== this.nodeType && 11 !== this.nodeType && 9 !== this.nodeType || Oe(this, e).appendChild(e) | |
})) | |
}, | |
prepend: function () { | |
return He(this, arguments, (function (e) { | |
if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { | |
var t = Oe(this, e); | |
t.insertBefore(e, t.firstChild) | |
} | |
})) | |
}, | |
before: function () { | |
return He(this, arguments, (function (e) { | |
this.parentNode && this.parentNode.insertBefore(e, this) | |
})) | |
}, | |
after: function () { | |
return He(this, arguments, (function (e) { | |
this.parentNode && this.parentNode.insertBefore(e, this.nextSibling) | |
})) | |
}, | |
empty: function () { | |
for (var e, t = 0; null != (e = this[t]); t++) 1 === e.nodeType && (k.cleanData(ge(e, !1)), e.textContent = ''); | |
return this | |
}, | |
clone: function (e, t) { | |
return e = null != e && e, | |
t = null == t ? e : t, | |
this.map((function () { | |
return k.clone(this, e, t) | |
})) | |
}, | |
html: function (e) { | |
return $(this, (function (e) { | |
var t = this[0] || { | |
}, | |
n = 0, | |
r = this.length; | |
if (void 0 === e && 1 === t.nodeType) return t.innerHTML; | |
if ('string' == typeof e && !_e.test(e) && !me[(pe.exec(e) || [ | |
'', | |
'' | |
]) [1].toLowerCase()]) { | |
e = k.htmlPrefilter(e); | |
try { | |
for (; n < r; n++) 1 === (t = this[n] || { | |
}).nodeType && (k.cleanData(ge(t, !1)), t.innerHTML = e); | |
t = 0 | |
} catch (e) { | |
} | |
} | |
t && this.empty().append(e) | |
}), null, e, arguments.length) | |
}, | |
replaceWith: function () { | |
var e = [ | |
]; | |
return He(this, arguments, (function (t) { | |
var n = this.parentNode; | |
k.inArray(this, e) < 0 && (k.cleanData(ge(this)), n && n.replaceChild(t, this)) | |
}), e) | |
} | |
}), | |
k.each({ | |
appendTo: 'append', | |
prependTo: 'prepend', | |
insertBefore: 'before', | |
insertAfter: 'after', | |
replaceAll: 'replaceWith' | |
}, (function (e, t) { | |
k.fn[e] = function (e) { | |
for (var n, r = [ | |
], i = k(e), s = i.length - 1, o = 0; o <= s; o++) n = o === s ? this : this.clone(!0), | |
k(i[o]) [t](n), | |
a.apply(r, n.get()); | |
return this.pushStack(r) | |
} | |
})); | |
var Be = new RegExp('^(' + ee + ')(?!px)[a-z%]+$', 'i'), | |
Fe = function (t) { | |
var n = t.ownerDocument.defaultView; | |
return n && n.opener || (n = e), | |
n.getComputedStyle(t) | |
}, | |
qe = function (e, t, n) { | |
var r, | |
i, | |
s = { | |
}; | |
for (i in t) s[i] = e.style[i], | |
e.style[i] = t[i]; | |
for (i in r = n.call(e), t) e.style[i] = s[i]; | |
return r | |
}, | |
$e = new RegExp(ne.join('|'), 'i'); | |
function Ve(e, t, n) { | |
var r, | |
i, | |
s, | |
a, | |
o = e.style; | |
return (n = n || Fe(e)) && ('' !== (a = n.getPropertyValue(t) || n[t]) || ie(e) || (a = k.style(e, t)), !f.pixelBoxStyles() && Be.test(a) && $e.test(t) && (r = o.width, i = o.minWidth, s = o.maxWidth, o.minWidth = o.maxWidth = o.width = a, a = n.width, o.width = r, o.minWidth = i, o.maxWidth = s)), | |
void 0 !== a ? a + '' : a | |
} | |
function Ue(e, t) { | |
return { | |
get: function () { | |
if (!e()) return (this.get = t).apply(this, arguments); | |
delete this.get | |
} | |
} | |
} | |
!function () { | |
function t() { | |
if (c) { | |
u.style.cssText = 'position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0', | |
c.style.cssText = 'position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%', | |
re.appendChild(u).appendChild(c); | |
var t = e.getComputedStyle(c); | |
r = '1%' !== t.top, | |
l = 12 === n(t.marginLeft), | |
c.style.right = '60%', | |
a = 36 === n(t.right), | |
i = 36 === n(t.width), | |
c.style.position = 'absolute', | |
s = 12 === n(c.offsetWidth / 3), | |
re.removeChild(u), | |
c = null | |
} | |
} | |
function n(e) { | |
return Math.round(parseFloat(e)) | |
} | |
var r, | |
i, | |
s, | |
a, | |
o, | |
l, | |
u = m.createElement('div'), | |
c = m.createElement('div'); | |
c.style && (c.style.backgroundClip = 'content-box', c.cloneNode(!0).style.backgroundClip = '', f.clearCloneStyle = 'content-box' === c.style.backgroundClip, k.extend(f, { | |
boxSizingReliable: function () { | |
return t(), | |
i | |
}, | |
pixelBoxStyles: function () { | |
return t(), | |
a | |
}, | |
pixelPosition: function () { | |
return t(), | |
r | |
}, | |
reliableMarginLeft: function () { | |
return t(), | |
l | |
}, | |
scrollboxSize: function () { | |
return t(), | |
s | |
}, | |
reliableTrDimensions: function () { | |
var t, | |
n, | |
r, | |
i; | |
return null == o && (t = m.createElement('table'), n = m.createElement('tr'), r = m.createElement('div'), t.style.cssText = 'position:absolute;left:-11111px', n.style.height = '1px', r.style.height = '9px', re.appendChild(t).appendChild(n).appendChild(r), i = e.getComputedStyle(n), o = parseInt(i.height) > 3, re.removeChild(t)), | |
o | |
} | |
})) | |
}(); | |
var We = [ | |
'Webkit', | |
'Moz', | |
'ms' | |
], | |
ze = m.createElement('div').style, | |
Ge = { | |
}; | |
function Ke(e) { | |
var t = k.cssProps[e] || Ge[e]; | |
return t || (e in ze ? e : Ge[e] = function (e) { | |
for (var t = e[0].toUpperCase() + e.slice(1), n = We.length; n--; ) if ((e = We[n] + t) in ze) return e | |
}(e) || e) | |
} | |
var Ye = /^(none|table(?!-c[ea]).+)/, | |
Qe = /^--/, | |
Xe = { | |
position: 'absolute', | |
visibility: 'hidden', | |
display: 'block' | |
}, | |
Ze = { | |
letterSpacing: '0', | |
fontWeight: '400' | |
}; | |
function Je(e, t, n) { | |
var r = te.exec(t); | |
return r ? Math.max(0, r[2] - (n || 0)) + (r[3] || 'px') : t | |
} | |
function et(e, t, n, r, i, s) { | |
var a = 'width' === t ? 1 : 0, | |
o = 0, | |
l = 0; | |
if (n === (r ? 'border' : 'content')) return 0; | |
for (; a < 4; a += 2) 'margin' === n && (l += k.css(e, n + ne[a], !0, i)), | |
r ? ('content' === n && (l -= k.css(e, 'padding' + ne[a], !0, i)), 'margin' !== n && (l -= k.css(e, 'border' + ne[a] + 'Width', !0, i))) : (l += k.css(e, 'padding' + ne[a], !0, i), 'padding' !== n ? l += k.css(e, 'border' + ne[a] + 'Width', !0, i) : o += k.css(e, 'border' + ne[a] + 'Width', !0, i)); | |
return !r && s >= 0 && (l += Math.max(0, Math.ceil(e['offset' + t[0].toUpperCase() + t.slice(1)] - s - l - o - 0.5)) || 0), | |
l | |
} | |
function tt(e, t, n) { | |
var r = Fe(e), | |
i = (!f.boxSizingReliable() || n) && 'border-box' === k.css(e, 'boxSizing', !1, r), | |
s = i, | |
a = Ve(e, t, r), | |
o = 'offset' + t[0].toUpperCase() + t.slice(1); | |
if (Be.test(a)) { | |
if (!n) return a; | |
a = 'auto' | |
} | |
return (!f.boxSizingReliable() && i || !f.reliableTrDimensions() && x(e, 'tr') || 'auto' === a || !parseFloat(a) && 'inline' === k.css(e, 'display', !1, r)) && e.getClientRects().length && (i = 'border-box' === k.css(e, 'boxSizing', !1, r), (s = o in e) && (a = e[o])), | |
(a = parseFloat(a) || 0) + et(e, t, n || (i ? 'border' : 'content'), s, r, a) + 'px' | |
} | |
function nt(e, t, n, r, i) { | |
return new nt.prototype.init(e, t, n, r, i) | |
} | |
k.extend({ | |
cssHooks: { | |
opacity: { | |
get: function (e, t) { | |
if (t) { | |
var n = Ve(e, 'opacity'); | |
return '' === n ? '1' : n | |
} | |
} | |
} | |
}, | |
cssNumber: { | |
animationIterationCount: !0, | |
columnCount: !0, | |
fillOpacity: !0, | |
flexGrow: !0, | |
flexShrink: !0, | |
fontWeight: !0, | |
gridArea: !0, | |
gridColumn: !0, | |
gridColumnEnd: !0, | |
gridColumnStart: !0, | |
gridRow: !0, | |
gridRowEnd: !0, | |
gridRowStart: !0, | |
lineHeight: !0, | |
opacity: !0, | |
order: !0, | |
orphans: !0, | |
widows: !0, | |
zIndex: !0, | |
zoom: !0 | |
}, | |
cssProps: { | |
}, | |
style: function (e, t, n, r) { | |
if (e && 3 !== e.nodeType && 8 !== e.nodeType && e.style) { | |
var i, | |
s, | |
a, | |
o = z(t), | |
l = Qe.test(t), | |
u = e.style; | |
if (l || (t = Ke(o)), a = k.cssHooks[t] || k.cssHooks[o], void 0 === n) return a && 'get' in a && void 0 !== (i = a.get(e, !1, r)) ? i : u[t]; | |
'string' === (s = typeof n) && (i = te.exec(n)) && i[1] && (n = oe(e, t, i), s = 'number'), | |
null != n && n == n && ('number' !== s || l || (n += i && i[3] || (k.cssNumber[o] ? '' : 'px')), f.clearCloneStyle || '' !== n || 0 !== t.indexOf('background') || (u[t] = 'inherit'), a && 'set' in a && void 0 === (n = a.set(e, n, r)) || (l ? u.setProperty(t, n) : u[t] = n)) | |
} | |
}, | |
css: function (e, t, n, r) { | |
var i, | |
s, | |
a, | |
o = z(t); | |
return Qe.test(t) || (t = Ke(o)), | |
(a = k.cssHooks[t] || k.cssHooks[o]) && 'get' in a && (i = a.get(e, !0, n)), | |
void 0 === i && (i = Ve(e, t, r)), | |
'normal' === i && t in Ze && (i = Ze[t]), | |
'' === n || n ? (s = parseFloat(i), !0 === n || isFinite(s) ? s || 0 : i) : i | |
} | |
}), | |
k.each(['height', | |
'width'], (function (e, t) { | |
k.cssHooks[t] = { | |
get: function (e, n, r) { | |
if (n) return !Ye.test(k.css(e, 'display')) || e.getClientRects().length && e.getBoundingClientRect().width ? tt(e, t, r) : qe(e, Xe, (function () { | |
return tt(e, t, r) | |
})) | |
}, | |
set: function (e, n, r) { | |
var i, | |
s = Fe(e), | |
a = !f.scrollboxSize() && 'absolute' === s.position, | |
o = (a || r) && 'border-box' === k.css(e, 'boxSizing', !1, s), | |
l = r ? et(e, t, r, o, s) : 0; | |
return o && a && (l -= Math.ceil(e['offset' + t[0].toUpperCase() + t.slice(1)] - parseFloat(s[t]) - et(e, t, 'border', !1, s) - 0.5)), | |
l && (i = te.exec(n)) && 'px' !== (i[3] || 'px') && (e.style[t] = n, n = k.css(e, t)), | |
Je(0, n, l) | |
} | |
} | |
})), | |
k.cssHooks.marginLeft = Ue(f.reliableMarginLeft, (function (e, t) { | |
if (t) return (parseFloat(Ve(e, 'marginLeft')) || e.getBoundingClientRect().left - qe(e, { | |
marginLeft: 0 | |
}, (function () { | |
return e.getBoundingClientRect().left | |
}))) + 'px' | |
})), | |
k.each({ | |
margin: '', | |
padding: '', | |
border: 'Width' | |
}, (function (e, t) { | |
k.cssHooks[e + t] = { | |
expand: function (n) { | |
for (var r = 0, i = { | |
}, s = 'string' == typeof n ? n.split(' ') : [ | |
n | |
]; r < 4; r++) i[e + ne[r] + t] = s[r] || s[r - 2] || s[0]; | |
return i | |
} | |
}, | |
'margin' !== e && (k.cssHooks[e + t].set = Je) | |
})), | |
k.fn.extend({ | |
css: function (e, t) { | |
return $(this, (function (e, t, n) { | |
var r, | |
i, | |
s = { | |
}, | |
a = 0; | |
if (Array.isArray(t)) { | |
for (r = Fe(e), i = t.length; a < i; a++) s[t[a]] = k.css(e, t[a], !1, r); | |
return s | |
} | |
return void 0 !== n ? k.style(e, t, n) : k.css(e, t) | |
}), e, t, arguments.length > 1) | |
} | |
}), | |
k.Tween = nt, | |
nt.prototype = { | |
constructor: nt, | |
init: function (e, t, n, r, i, s) { | |
this.elem = e, | |
this.prop = n, | |
this.easing = i || k.easing._default, | |
this.options = t, | |
this.start = this.now = this.cur(), | |
this.end = r, | |
this.unit = s || (k.cssNumber[n] ? '' : 'px') | |
}, | |
cur: function () { | |
var e = nt.propHooks[this.prop]; | |
return e && e.get ? e.get(this) : nt.propHooks._default.get(this) | |
}, | |
run: function (e) { | |
var t, | |
n = nt.propHooks[this.prop]; | |
return this.options.duration ? this.pos = t = k.easing[this.easing](e, this.options.duration * e, 0, 1, this.options.duration) : this.pos = t = e, | |
this.now = (this.end - this.start) * t + this.start, | |
this.options.step && this.options.step.call(this.elem, this.now, this), | |
n && n.set ? n.set(this) : nt.propHooks._default.set(this), | |
this | |
} | |
}, | |
nt.prototype.init.prototype = nt.prototype, | |
nt.propHooks = { | |
_default: { | |
get: function (e) { | |
var t; | |
return 1 !== e.elem.nodeType || null != e.elem[e.prop] && null == e.elem.style[e.prop] ? e.elem[e.prop] : (t = k.css(e.elem, e.prop, '')) && 'auto' !== t ? t : 0 | |
}, | |
set: function (e) { | |
k.fx.step[e.prop] ? k.fx.step[e.prop](e) : 1 !== e.elem.nodeType || !k.cssHooks[e.prop] && null == e.elem.style[Ke(e.prop)] ? e.elem[e.prop] = e.now : k.style(e.elem, e.prop, e.now + e.unit) | |
} | |
} | |
}, | |
nt.propHooks.scrollTop = nt.propHooks.scrollLeft = { | |
set: function (e) { | |
e.elem.nodeType && e.elem.parentNode && (e.elem[e.prop] = e.now) | |
} | |
}, | |
k.easing = { | |
linear: function (e) { | |
return e | |
}, | |
swing: function (e) { | |
return 0.5 - Math.cos(e * Math.PI) / 2 | |
}, | |
_default: 'swing' | |
}, | |
k.fx = nt.prototype.init, | |
k.fx.step = { | |
}; | |
var rt, | |
it, | |
st = /^(?:toggle|show|hide)$/, | |
at = /queueHooks$/; | |
function ot() { | |
it && (!1 === m.hidden && e.requestAnimationFrame ? e.requestAnimationFrame(ot) : e.setTimeout(ot, k.fx.interval), k.fx.tick()) | |
} | |
function lt() { | |
return e.setTimeout((function () { | |
rt = void 0 | |
})), | |
rt = Date.now() | |
} | |
function ut(e, t) { | |
var n, | |
r = 0, | |
i = { | |
height: e | |
}; | |
for (t = t ? 1 : 0; r < 4; r += 2 - t) i['margin' + (n = ne[r])] = i['padding' + n] = e; | |
return t && (i.opacity = i.width = e), | |
i | |
} | |
function ct(e, t, n) { | |
for (var r, i = (ht.tweeners[t] || [ | |
]).concat(ht.tweeners['*']), s = 0, a = i.length; s < a; s++) if (r = i[s].call(n, t, e)) return r | |
} | |
function ht(e, t, n) { | |
var r, | |
i, | |
s = 0, | |
a = ht.prefilters.length, | |
o = k.Deferred().always((function () { | |
delete l.elem | |
})), | |
l = function () { | |
if (i) return !1; | |
for (var t = rt || lt(), n = Math.max(0, u.startTime + u.duration - t), r = 1 - (n / u.duration || 0), s = 0, a = u.tweens.length; s < a; s++) u.tweens[s].run(r); | |
return o.notifyWith(e, [ | |
u, | |
r, | |
n | |
]), | |
r < 1 && a ? n : (a || o.notifyWith(e, [ | |
u, | |
1, | |
0 | |
]), o.resolveWith(e, [ | |
u | |
]), !1) | |
}, | |
u = o.promise({ | |
elem: e, | |
props: k.extend({ | |
}, t), | |
opts: k.extend(!0, { | |
specialEasing: { | |
}, | |
easing: k.easing._default | |
}, n), | |
originalProperties: t, | |
originalOptions: n, | |
startTime: rt || lt(), | |
duration: n.duration, | |
tweens: [ | |
], | |
createTween: function (t, n) { | |
var r = k.Tween(e, u.opts, t, n, u.opts.specialEasing[t] || u.opts.easing); | |
return u.tweens.push(r), | |
r | |
}, | |
stop: function (t) { | |
var n = 0, | |
r = t ? u.tweens.length : 0; | |
if (i) return this; | |
for (i = !0; n < r; n++) u.tweens[n].run(1); | |
return t ? (o.notifyWith(e, [ | |
u, | |
1, | |
0 | |
]), o.resolveWith(e, [ | |
u, | |
t | |
])) : o.rejectWith(e, [ | |
u, | |
t | |
]), | |
this | |
} | |
}), | |
c = u.props; | |
for (!function (e, t) { | |
var n, | |
r, | |
i, | |
s, | |
a; | |
for (n in e) if (i = t[r = z(n)], s = e[n], Array.isArray(s) && (i = s[1], s = e[n] = s[0]), n !== r && (e[r] = s, delete e[n]), (a = k.cssHooks[r]) && 'expand' in a) for (n in s = a.expand(s), delete e[r], s) n in e || (e[n] = s[n], t[n] = i); | |
else t[r] = i | |
}(c, u.opts.specialEasing); s < a; s++) if (r = ht.prefilters[s].call(u, e, c, u.opts)) return p(r.stop) && (k._queueHooks(u.elem, u.opts.queue).stop = r.stop.bind(r)), | |
r; | |
return k.map(c, ct, u), | |
p(u.opts.start) && u.opts.start.call(e, u), | |
u.progress(u.opts.progress).done(u.opts.done, u.opts.complete).fail(u.opts.fail).always(u.opts.always), | |
k.fx.timer(k.extend(l, { | |
elem: e, | |
anim: u, | |
queue: u.opts.queue | |
})), | |
u | |
} | |
k.Animation = k.extend(ht, { | |
tweeners: { | |
'*': [ | |
function (e, t) { | |
var n = this.createTween(e, t); | |
return oe(n.elem, e, te.exec(t), n), | |
n | |
} | |
] | |
}, | |
tweener: function (e, t) { | |
p(e) ? (t = e, e = [ | |
'*' | |
]) : e = e.match(M); | |
for (var n, r = 0, i = e.length; r < i; r++) n = e[r], | |
ht.tweeners[n] = ht.tweeners[n] || [ | |
], | |
ht.tweeners[n].unshift(t) | |
}, | |
prefilters: [ | |
function (e, t, n) { | |
var r, | |
i, | |
s, | |
a, | |
o, | |
l, | |
u, | |
c, | |
h = 'width' in t || 'height' in t, | |
d = this, | |
f = { | |
}, | |
p = e.style, | |
v = e.nodeType && ae(e), | |
m = Y.get(e, 'fxshow'); | |
for (r in n.queue || (null == (a = k._queueHooks(e, 'fx')).unqueued && (a.unqueued = 0, o = a.empty.fire, a.empty.fire = function () { | |
a.unqueued || o() | |
}), a.unqueued++, d.always((function () { | |
d.always((function () { | |
a.unqueued--, | |
k.queue(e, 'fx').length || a.empty.fire() | |
})) | |
}))), t) if (i = t[r], st.test(i)) { | |
if (delete t[r], s = s || 'toggle' === i, i === (v ? 'hide' : 'show')) { | |
if ('show' !== i || !m || void 0 === m[r]) continue; | |
v = !0 | |
} | |
f[r] = m && m[r] || k.style(e, r) | |
} | |
if ((l = !k.isEmptyObject(t)) || !k.isEmptyObject(f)) for (r in h && 1 === e.nodeType && (n.overflow = [ | |
p.overflow, | |
p.overflowX, | |
p.overflowY | |
], null == (u = m && m.display) && (u = Y.get(e, 'display')), 'none' === (c = k.css(e, 'display')) && (u ? c = u : (ce([e], !0), u = e.style.display || u, c = k.css(e, 'display'), ce([e]))), ('inline' === c || 'inline-block' === c && null != u) && 'none' === k.css(e, 'float') && (l || (d.done((function () { | |
p.display = u | |
})), null == u && (c = p.display, u = 'none' === c ? '' : c)), p.display = 'inline-block')), n.overflow && (p.overflow = 'hidden', d.always((function () { | |
p.overflow = n.overflow[0], | |
p.overflowX = n.overflow[1], | |
p.overflowY = n.overflow[2] | |
}))), l = !1, f) l || (m ? 'hidden' in m && (v = m.hidden) : m = Y.access(e, 'fxshow', { | |
display: u | |
}), s && (m.hidden = !v), v && ce([e], !0), d.done((function () { | |
for (r in v || ce([e]), Y.remove(e, 'fxshow'), f) k.style(e, r, f[r]) | |
}))), | |
l = ct(v ? m[r] : 0, r, d), | |
r in m || (m[r] = l.start, v && (l.end = l.start, l.start = 0)) | |
} | |
], | |
prefilter: function (e, t) { | |
t ? ht.prefilters.unshift(e) : ht.prefilters.push(e) | |
} | |
}), | |
k.speed = function (e, t, n) { | |
var r = e && 'object' == typeof e ? k.extend({ | |
}, e) : { | |
complete: n || !n && t || p(e) && e, | |
duration: e, | |
easing: n && t || t && !p(t) && t | |
}; | |
return k.fx.off ? r.duration = 0 : 'number' != typeof r.duration && (r.duration in k.fx.speeds ? r.duration = k.fx.speeds[r.duration] : r.duration = k.fx.speeds._default), | |
null != r.queue && !0 !== r.queue || (r.queue = 'fx'), | |
r.old = r.complete, | |
r.complete = function () { | |
p(r.old) && r.old.call(this), | |
r.queue && k.dequeue(this, r.queue) | |
}, | |
r | |
}, | |
k.fn.extend({ | |
fadeTo: function (e, t, n, r) { | |
return this.filter(ae).css('opacity', 0).show().end().animate({ | |
opacity: t | |
}, e, n, r) | |
}, | |
animate: function (e, t, n, r) { | |
var i = k.isEmptyObject(e), | |
s = k.speed(t, n, r), | |
a = function () { | |
var t = ht(this, k.extend({ | |
}, e), s); | |
(i || Y.get(this, 'finish')) && t.stop(!0) | |
}; | |
return a.finish = a, | |
i || !1 === s.queue ? this.each(a) : this.queue(s.queue, a) | |
}, | |
stop: function (e, t, n) { | |
var r = function (e) { | |
var t = e.stop; | |
delete e.stop, | |
t(n) | |
}; | |
return 'string' != typeof e && (n = t, t = e, e = void 0), | |
t && this.queue(e || 'fx', [ | |
]), | |
this.each((function () { | |
var t = !0, | |
i = null != e && e + 'queueHooks', | |
s = k.timers, | |
a = Y.get(this); | |
if (i) a[i] && a[i].stop && r(a[i]); | |
else for (i in a) a[i] && a[i].stop && at.test(i) && r(a[i]); | |
for (i = s.length; i--; ) s[i].elem !== this || null != e && s[i].queue !== e || (s[i].anim.stop(n), t = !1, s.splice(i, 1)); | |
!t && n || k.dequeue(this, e) | |
})) | |
}, | |
finish: function (e) { | |
return !1 !== e && (e = e || 'fx'), | |
this.each((function () { | |
var t, | |
n = Y.get(this), | |
r = n[e + 'queue'], | |
i = n[e + 'queueHooks'], | |
s = k.timers, | |
a = r ? r.length : 0; | |
for (n.finish = !0, k.queue(this, e, [ | |
]), i && i.stop && i.stop.call(this, !0), t = s.length; t--; ) s[t].elem === this && s[t].queue === e && (s[t].anim.stop(!0), s.splice(t, 1)); | |
for (t = 0; t < a; t++) r[t] && r[t].finish && r[t].finish.call(this); | |
delete n.finish | |
})) | |
} | |
}), | |
k.each(['toggle', | |
'show', | |
'hide'], (function (e, t) { | |
var n = k.fn[t]; | |
k.fn[t] = function (e, r, i) { | |
return null == e || 'boolean' == typeof e ? n.apply(this, arguments) : this.animate(ut(t, !0), e, r, i) | |
} | |
})), | |
k.each({ | |
slideDown: ut('show'), | |
slideUp: ut('hide'), | |
slideToggle: ut('toggle'), | |
fadeIn: { | |
opacity: 'show' | |
}, | |
fadeOut: { | |
opacity: 'hide' | |
}, | |
fadeToggle: { | |
opacity: 'toggle' | |
} | |
}, (function (e, t) { | |
k.fn[e] = function (e, n, r) { | |
return this.animate(t, e, n, r) | |
} | |
})), | |
k.timers = [ | |
], | |
k.fx.tick = function () { | |
var e, | |
t = 0, | |
n = k.timers; | |
for (rt = Date.now(); t < n.length; t++) (e = n[t]) () || n[t] !== e || n.splice(t--, 1); | |
n.length || k.fx.stop(), | |
rt = void 0 | |
}, | |
k.fx.timer = function (e) { | |
k.timers.push(e), | |
k.fx.start() | |
}, | |
k.fx.interval = 13, | |
k.fx.start = function () { | |
it || (it = !0, ot()) | |
}, | |
k.fx.stop = function () { | |
it = null | |
}, | |
k.fx.speeds = { | |
slow: 600, | |
fast: 200, | |
_default: 400 | |
}, | |
k.fn.delay = function (t, n) { | |
return t = k.fx && k.fx.speeds[t] || t, | |
n = n || 'fx', | |
this.queue(n, (function (n, r) { | |
var i = e.setTimeout(n, t); | |
r.stop = function () { | |
e.clearTimeout(i) | |
} | |
})) | |
}, | |
function () { | |
var e = m.createElement('input'), | |
t = m.createElement('select').appendChild(m.createElement('option')); | |
e.type = 'checkbox', | |
f.checkOn = '' !== e.value, | |
f.optSelected = t.selected, | |
(e = m.createElement('input')).value = 't', | |
e.type = 'radio', | |
f.radioValue = 't' === e.value | |
}(); | |
var dt, | |
ft = k.expr.attrHandle; | |
k.fn.extend({ | |
attr: function (e, t) { | |
return $(this, k.attr, e, t, arguments.length > 1) | |
}, | |
removeAttr: function (e) { | |
return this.each((function () { | |
k.removeAttr(this, e) | |
})) | |
} | |
}), | |
k.extend({ | |
attr: function (e, t, n) { | |
var r, | |
i, | |
s = e.nodeType; | |
if (3 !== s && 8 !== s && 2 !== s) return void 0 === e.getAttribute ? k.prop(e, t, n) : (1 === s && k.isXMLDoc(e) || (i = k.attrHooks[t.toLowerCase()] || (k.expr.match.bool.test(t) ? dt : void 0)), void 0 !== n ? null === n ? void k.removeAttr(e, t) : i && 'set' in i && void 0 !== (r = i.set(e, n, t)) ? r : (e.setAttribute(t, n + ''), n) : i && 'get' in i && null !== (r = i.get(e, t)) ? r : null == (r = k.find.attr(e, t)) ? void 0 : r) | |
}, | |
attrHooks: { | |
type: { | |
set: function (e, t) { | |
if (!f.radioValue && 'radio' === t && x(e, 'input')) { | |
var n = e.value; | |
return e.setAttribute('type', t), | |
n && (e.value = n), | |
t | |
} | |
} | |
} | |
}, | |
removeAttr: function (e, t) { | |
var n, | |
r = 0, | |
i = t && t.match(M); | |
if (i && 1 === e.nodeType) for (; n = i[r++]; ) e.removeAttribute(n) | |
} | |
}), | |
dt = { | |
set: function (e, t, n) { | |
return !1 === t ? k.removeAttr(e, n) : e.setAttribute(n, n), | |
n | |
} | |
}, | |
k.each(k.expr.match.bool.source.match(/\w+/g), (function (e, t) { | |
var n = ft[t] || k.find.attr; | |
ft[t] = function (e, t, r) { | |
var i, | |
s, | |
a = t.toLowerCase(); | |
return r || (s = ft[a], ft[a] = i, i = null != n(e, t, r) ? a : null, ft[a] = s), | |
i | |
} | |
})); | |
var pt = /^(?:input|select|textarea|button)$/i, | |
vt = /^(?:a|area)$/i; | |
function mt(e) { | |
return (e.match(M) || [ | |
]).join(' ') | |
} | |
function gt(e) { | |
return e.getAttribute && e.getAttribute('class') || '' | |
} | |
function yt(e) { | |
return Array.isArray(e) ? e : 'string' == typeof e && e.match(M) || [ | |
] | |
} | |
k.fn.extend({ | |
prop: function (e, t) { | |
return $(this, k.prop, e, t, arguments.length > 1) | |
}, | |
removeProp: function (e) { | |
return this.each((function () { | |
delete this[k.propFix[e] || e] | |
})) | |
} | |
}), | |
k.extend({ | |
prop: function (e, t, n) { | |
var r, | |
i, | |
s = e.nodeType; | |
if (3 !== s && 8 !== s && 2 !== s) return 1 === s && k.isXMLDoc(e) || (t = k.propFix[t] || t, i = k.propHooks[t]), | |
void 0 !== n ? i && 'set' in i && void 0 !== (r = i.set(e, n, t)) ? r : e[t] = n : i && 'get' in i && null !== (r = i.get(e, t)) ? r : e[t] | |
}, | |
propHooks: { | |
tabIndex: { | |
get: function (e) { | |
var t = k.find.attr(e, 'tabindex'); | |
return t ? parseInt(t, 10) : pt.test(e.nodeName) || vt.test(e.nodeName) && e.href ? 0 : - 1 | |
} | |
} | |
}, | |
propFix: { | |
for : 'htmlFor', | |
class : 'className' | |
} | |
}), | |
f.optSelected || (k.propHooks.selected = { | |
get: function (e) { | |
var t = e.parentNode; | |
return t && t.parentNode && t.parentNode.selectedIndex, | |
null | |
}, | |
set: function (e) { | |
var t = e.parentNode; | |
t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex) | |
} | |
}), | |
k.each(['tabIndex', | |
'readOnly', | |
'maxLength', | |
'cellSpacing', | |
'cellPadding', | |
'rowSpan', | |
'colSpan', | |
'useMap', | |
'frameBorder', | |
'contentEditable'], (function () { | |
k.propFix[this.toLowerCase()] = this | |
})), | |
k.fn.extend({ | |
addClass: function (e) { | |
var t, | |
n, | |
r, | |
i, | |
s, | |
a, | |
o, | |
l = 0; | |
if (p(e)) return this.each((function (t) { | |
k(this).addClass(e.call(this, t, gt(this))) | |
})); | |
if ((t = yt(e)).length) for (; n = this[l++]; ) if (i = gt(n), r = 1 === n.nodeType && ' ' + mt(i) + ' ') { | |
for (a = 0; s = t[a++]; ) r.indexOf(' ' + s + ' ') < 0 && (r += s + ' '); | |
i !== (o = mt(r)) && n.setAttribute('class', o) | |
} | |
return this | |
}, | |
removeClass: function (e) { | |
var t, | |
n, | |
r, | |
i, | |
s, | |
a, | |
o, | |
l = 0; | |
if (p(e)) return this.each((function (t) { | |
k(this).removeClass(e.call(this, t, gt(this))) | |
})); | |
if (!arguments.length) return this.attr('class', ''); | |
if ((t = yt(e)).length) for (; n = this[l++]; ) if (i = gt(n), r = 1 === n.nodeType && ' ' + mt(i) + ' ') { | |
for (a = 0; s = t[a++]; ) for (; r.indexOf(' ' + s + ' ') > - 1; ) r = r.replace(' ' + s + ' ', ' '); | |
i !== (o = mt(r)) && n.setAttribute('class', o) | |
} | |
return this | |
}, | |
toggleClass: function (e, t) { | |
var n = typeof e, | |
r = 'string' === n || Array.isArray(e); | |
return 'boolean' == typeof t && r ? t ? this.addClass(e) : this.removeClass(e) : p(e) ? this.each((function (n) { | |
k(this).toggleClass(e.call(this, n, gt(this), t), t) | |
})) : this.each((function () { | |
var t, | |
i, | |
s, | |
a; | |
if (r) for (i = 0, s = k(this), a = yt(e); t = a[i++]; ) s.hasClass(t) ? s.removeClass(t) : s.addClass(t); | |
else void 0 !== e && 'boolean' !== n || ((t = gt(this)) && Y.set(this, '__className__', t), this.setAttribute && this.setAttribute('class', t || !1 === e ? '' : Y.get(this, '__className__') || '')) | |
})) | |
}, | |
hasClass: function (e) { | |
var t, | |
n, | |
r = 0; | |
for (t = ' ' + e + ' '; n = this[r++]; ) if (1 === n.nodeType && (' ' + mt(gt(n)) + ' ').indexOf(t) > - 1) return !0; | |
return !1 | |
} | |
}); | |
var bt = /\r/g; | |
k.fn.extend({ | |
val: function (e) { | |
var t, | |
n, | |
r, | |
i = this[0]; | |
return arguments.length ? (r = p(e), this.each((function (n) { | |
var i; | |
1 === this.nodeType && (null == (i = r ? e.call(this, n, k(this).val()) : e) ? i = '' : 'number' == typeof i ? i += '' : Array.isArray(i) && (i = k.map(i, (function (e) { | |
return null == e ? '' : e + '' | |
}))), (t = k.valHooks[this.type] || k.valHooks[this.nodeName.toLowerCase()]) && 'set' in t && void 0 !== t.set(this, i, 'value') || (this.value = i)) | |
}))) : i ? (t = k.valHooks[i.type] || k.valHooks[i.nodeName.toLowerCase()]) && 'get' in t && void 0 !== (n = t.get(i, 'value')) ? n : 'string' == typeof (n = i.value) ? n.replace(bt, '') : null == n ? '' : n : void 0 | |
} | |
}), | |
k.extend({ | |
valHooks: { | |
option: { | |
get: function (e) { | |
var t = k.find.attr(e, 'value'); | |
return null != t ? t : mt(k.text(e)) | |
} | |
}, | |
select: { | |
get: function (e) { | |
var t, | |
n, | |
r, | |
i = e.options, | |
s = e.selectedIndex, | |
a = 'select-one' === e.type, | |
o = a ? null : [ | |
], | |
l = a ? s + 1 : i.length; | |
for (r = s < 0 ? l : a ? s : 0; r < l; r++) if (((n = i[r]).selected || r === s) && !n.disabled && (!n.parentNode.disabled || !x(n.parentNode, 'optgroup'))) { | |
if (t = k(n).val(), a) return t; | |
o.push(t) | |
} | |
return o | |
}, | |
set: function (e, t) { | |
for (var n, r, i = e.options, s = k.makeArray(t), a = i.length; a--; ) ((r = i[a]).selected = k.inArray(k.valHooks.option.get(r), s) > - 1) && (n = !0); | |
return n || (e.selectedIndex = - 1), | |
s | |
} | |
} | |
} | |
}), | |
k.each(['radio', | |
'checkbox'], (function () { | |
k.valHooks[this] = { | |
set: function (e, t) { | |
if (Array.isArray(t)) return e.checked = k.inArray(k(e).val(), t) > - 1 | |
} | |
}, | |
f.checkOn || (k.valHooks[this].get = function (e) { | |
return null === e.getAttribute('value') ? 'on' : e.value | |
}) | |
})), | |
f.focusin = 'onfocusin' in e; | |
var Ct = /^(?:focusinfocus|focusoutblur)$/, | |
kt = function (e) { | |
e.stopPropagation() | |
}; | |
k.extend(k.event, { | |
trigger: function (t, n, r, i) { | |
var s, | |
a, | |
o, | |
l, | |
u, | |
h, | |
d, | |
f, | |
g = [ | |
r || m | |
], | |
y = c.call(t, 'type') ? t.type : t, | |
b = c.call(t, 'namespace') ? t.namespace.split('.') : [ | |
]; | |
if (a = f = o = r = r || m, 3 !== r.nodeType && 8 !== r.nodeType && !Ct.test(y + k.event.triggered) && (y.indexOf('.') > - 1 && (b = y.split('.'), y = b.shift(), b.sort()), u = y.indexOf(':') < 0 && 'on' + y, (t = t[k.expando] ? t : new k.Event(y, 'object' == typeof t && t)).isTrigger = i ? 2 : 3, t.namespace = b.join('.'), t.rnamespace = t.namespace ? new RegExp('(^|\\.)' + b.join('\\.(?:.*\\.|)') + '(\\.|$)') : null, t.result = void 0, t.target || (t.target = r), n = null == n ? [ | |
t | |
] : k.makeArray(n, [ | |
t | |
]), d = k.event.special[y] || { | |
}, i || !d.trigger || !1 !== d.trigger.apply(r, n))) { | |
if (!i && !d.noBubble && !v(r)) { | |
for (l = d.delegateType || y, Ct.test(l + y) || (a = a.parentNode); a; a = a.parentNode) g.push(a), | |
o = a; | |
o === (r.ownerDocument || m) && g.push(o.defaultView || o.parentWindow || e) | |
} | |
for (s = 0; (a = g[s++]) && !t.isPropagationStopped(); ) f = a, | |
t.type = s > 1 ? l : d.bindType || y, | |
(h = (Y.get(a, 'events') || Object.create(null)) [t.type] && Y.get(a, 'handle')) && h.apply(a, n), | |
(h = u && a[u]) && h.apply && G(a) && (t.result = h.apply(a, n), !1 === t.result && t.preventDefault()); | |
return t.type = y, | |
i || t.isDefaultPrevented() || d._default && !1 !== d._default.apply(g.pop(), n) || !G(r) || u && p(r[y]) && !v(r) && ((o = r[u]) && (r[u] = null), k.event.triggered = y, t.isPropagationStopped() && f.addEventListener(y, kt), r[y](), t.isPropagationStopped() && f.removeEventListener(y, kt), k.event.triggered = void 0, o && (r[u] = o)), | |
t.result | |
} | |
}, | |
simulate: function (e, t, n) { | |
var r = k.extend(new k.Event, n, { | |
type: e, | |
isSimulated: !0 | |
}); | |
k.event.trigger(r, null, t) | |
} | |
}), | |
k.fn.extend({ | |
trigger: function (e, t) { | |
return this.each((function () { | |
k.event.trigger(e, t, this) | |
})) | |
}, | |
triggerHandler: function (e, t) { | |
var n = this[0]; | |
if (n) return k.event.trigger(e, t, n, !0) | |
} | |
}), | |
f.focusin || k.each({ | |
focus: 'focusin', | |
blur: 'focusout' | |
}, (function (e, t) { | |
var n = function (e) { | |
k.event.simulate(t, e.target, k.event.fix(e)) | |
}; | |
k.event.special[t] = { | |
setup: function () { | |
var r = this.ownerDocument || this.document || this, | |
i = Y.access(r, t); | |
i || r.addEventListener(e, n, !0), | |
Y.access(r, t, (i || 0) + 1) | |
}, | |
teardown: function () { | |
var r = this.ownerDocument || this.document || this, | |
i = Y.access(r, t) - 1; | |
i ? Y.access(r, t, i) : (r.removeEventListener(e, n, !0), Y.remove(r, t)) | |
} | |
} | |
})); | |
var St = e.location, | |
wt = { | |
guid: Date.now() | |
}, | |
Et = /\?/; | |
k.parseXML = function (t) { | |
var n; | |
if (!t || 'string' != typeof t) return null; | |
try { | |
n = (new e.DOMParser).parseFromString(t, 'text/xml') | |
} catch (e) { | |
n = void 0 | |
} | |
return n && !n.getElementsByTagName('parsererror').length || k.error('Invalid XML: ' + t), | |
n | |
}; | |
var Tt = /\[\]$/, | |
Lt = /\r?\n/g, | |
xt = /^(?:submit|button|image|reset|file)$/i, | |
At = /^(?:input|select|textarea|keygen)/i; | |
function _t(e, t, n, r) { | |
var i; | |
if (Array.isArray(t)) k.each(t, (function (t, i) { | |
n || Tt.test(e) ? r(e, i) : _t(e + '[' + ('object' == typeof i && null != i ? t : '') + ']', i, n, r) | |
})); | |
else if (n || 'object' !== b(t)) r(e, t); | |
else for (i in t) _t(e + '[' + i + ']', t[i], n, r) | |
} | |
k.param = function (e, t) { | |
var n, | |
r = [ | |
], | |
i = function (e, t) { | |
var n = p(t) ? t() : t; | |
r[r.length] = encodeURIComponent(e) + '=' + encodeURIComponent(null == n ? '' : n) | |
}; | |
if (null == e) return ''; | |
if (Array.isArray(e) || e.jquery && !k.isPlainObject(e)) k.each(e, (function () { | |
i(this.name, this.value) | |
})); | |
else for (n in e) _t(n, e[n], t, i); | |
return r.join('&') | |
}, | |
k.fn.extend({ | |
serialize: function () { | |
return k.param(this.serializeArray()) | |
}, | |
serializeArray: function () { | |
return this.map((function () { | |
var e = k.prop(this, 'elements'); | |
return e ? k.makeArray(e) : this | |
})).filter((function () { | |
var e = this.type; | |
return this.name && !k(this).is(':disabled') && At.test(this.nodeName) && !xt.test(e) && (this.checked || !fe.test(e)) | |
})).map((function (e, t) { | |
var n = k(this).val(); | |
return null == n ? null : Array.isArray(n) ? k.map(n, (function (e) { | |
return { | |
name: t.name, | |
value: e.replace(Lt, '\r\n') | |
} | |
})) : { | |
name: t.name, | |
value: n.replace(Lt, '\r\n') | |
} | |
})).get() | |
} | |
}); | |
var Rt = /%20/g, | |
Dt = /#.*$/, | |
Ot = /([?&])_=[^&]*/, | |
It = /^(.*?):[ \t]*([^\r\n]*)$/gm, | |
Pt = /^(?:GET|HEAD)$/, | |
Mt = /^\/\//, | |
jt = { | |
}, | |
Ht = { | |
}, | |
Nt = '*/'.concat('*'), | |
Bt = m.createElement('a'); | |
function Ft(e) { | |
return function (t, n) { | |
'string' != typeof t && (n = t, t = '*'); | |
var r, | |
i = 0, | |
s = t.toLowerCase().match(M) || [ | |
]; | |
if (p(n)) for (; r = s[i++]; ) '+' === r[0] ? (r = r.slice(1) || '*', (e[r] = e[r] || [ | |
]).unshift(n)) : (e[r] = e[r] || [ | |
]).push(n) | |
} | |
} | |
function qt(e, t, n, r) { | |
var i = { | |
}, | |
s = e === Ht; | |
function a(o) { | |
var l; | |
return i[o] = !0, | |
k.each(e[o] || [ | |
], (function (e, o) { | |
var u = o(t, n, r); | |
return 'string' != typeof u || s || i[u] ? s ? !(l = u) : void 0 : (t.dataTypes.unshift(u), a(u), !1) | |
})), | |
l | |
} | |
return a(t.dataTypes[0]) || !i['*'] && a('*') | |
} | |
function $t(e, t) { | |
var n, | |
r, | |
i = k.ajaxSettings.flatOptions || { | |
}; | |
for (n in t) void 0 !== t[n] && ((i[n] ? e : r || (r = { | |
})) [n] = t[n]); | |
return r && k.extend(!0, e, r), | |
e | |
} | |
Bt.href = St.href, | |
k.extend({ | |
active: 0, | |
lastModified: { | |
}, | |
etag: { | |
}, | |
ajaxSettings: { | |
url: St.href, | |
type: 'GET', | |
isLocal: /^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(St.protocol), | |
global: !0, | |
processData: !0, | |
async: !0, | |
contentType: 'application/x-www-form-urlencoded; charset=UTF-8', | |
accepts: { | |
'*': Nt, | |
text: 'text/plain', | |
html: 'text/html', | |
xml: 'application/xml, text/xml', | |
json: 'application/json, text/javascript' | |
}, | |
contents: { | |
xml: /\bxml\b/, | |
html: /\bhtml/, | |
json: /\bjson\b/ | |
}, | |
responseFields: { | |
xml: 'responseXML', | |
text: 'responseText', | |
json: 'responseJSON' | |
}, | |
converters: { | |
'* text': String, | |
'text html': !0, | |
'text json': JSON.parse, | |
'text xml': k.parseXML | |
}, | |
flatOptions: { | |
url: !0, | |
context: !0 | |
} | |
}, | |
ajaxSetup: function (e, t) { | |
return t ? $t($t(e, k.ajaxSettings), t) : $t(k.ajaxSettings, e) | |
}, | |
ajaxPrefilter: Ft(jt), | |
ajaxTransport: Ft(Ht), | |
ajax: function (t, n) { | |
'object' == typeof t && (n = t, t = void 0), | |
n = n || { | |
}; | |
var r, | |
i, | |
s, | |
a, | |
o, | |
l, | |
u, | |
c, | |
h, | |
d, | |
f = k.ajaxSetup({ | |
}, n), | |
p = f.context || f, | |
v = f.context && (p.nodeType || p.jquery) ? k(p) : k.event, | |
g = k.Deferred(), | |
y = k.Callbacks('once memory'), | |
b = f.statusCode || { | |
}, | |
C = { | |
}, | |
S = { | |
}, | |
w = 'canceled', | |
E = { | |
readyState: 0, | |
getResponseHeader: function (e) { | |
var t; | |
if (u) { | |
if (!a) for (a = { | |
}; t = It.exec(s); ) a[t[1].toLowerCase() + ' '] = (a[t[1].toLowerCase() + ' '] || [ | |
]).concat(t[2]); | |
t = a[e.toLowerCase() + ' '] | |
} | |
return null == t ? null : t.join(', ') | |
}, | |
getAllResponseHeaders: function () { | |
return u ? s : null | |
}, | |
setRequestHeader: function (e, t) { | |
return null == u && (e = S[e.toLowerCase()] = S[e.toLowerCase()] || e, C[e] = t), | |
this | |
}, | |
overrideMimeType: function (e) { | |
return null == u && (f.mimeType = e), | |
this | |
}, | |
statusCode: function (e) { | |
var t; | |
if (e) if (u) E.always(e[E.status]); | |
else for (t in e) b[t] = [ | |
b[t], | |
e[t] | |
]; | |
return this | |
}, | |
abort: function (e) { | |
var t = e || w; | |
return r && r.abort(t), | |
T(0, t), | |
this | |
} | |
}; | |
if (g.promise(E), f.url = ((t || f.url || St.href) + '').replace(Mt, St.protocol + '//'), f.type = n.method || n.type || f.method || f.type, f.dataTypes = (f.dataType || '*').toLowerCase().match(M) || [ | |
'' | |
], null == f.crossDomain) { | |
l = m.createElement('a'); | |
try { | |
l.href = f.url, | |
l.href = l.href, | |
f.crossDomain = Bt.protocol + '//' + Bt.host != l.protocol + '//' + l.host | |
} catch (e) { | |
f.crossDomain = !0 | |
} | |
} | |
if (f.data && f.processData && 'string' != typeof f.data && (f.data = k.param(f.data, f.traditional)), qt(jt, f, n, E), u) return E; | |
for (h in (c = k.event && f.global) && 0 == k.active++ && k.event.trigger('ajaxStart'), f.type = f.type.toUpperCase(), f.hasContent = !Pt.test(f.type), i = f.url.replace(Dt, ''), f.hasContent ? f.data && f.processData && 0 === (f.contentType || '').indexOf('application/x-www-form-urlencoded') && (f.data = f.data.replace(Rt, '+')) : (d = f.url.slice(i.length), f.data && (f.processData || 'string' == typeof f.data) && (i += (Et.test(i) ? '&' : '?') + f.data, delete f.data), !1 === f.cache && (i = i.replace(Ot, '$1'), d = (Et.test(i) ? '&' : '?') + '_=' + wt.guid++ + d), f.url = i + d), f.ifModified && (k.lastModified[i] && E.setRequestHeader('If-Modified-Since', k.lastModified[i]), k.etag[i] && E.setRequestHeader('If-None-Match', k.etag[i])), (f.data && f.hasContent && !1 !== f.contentType || n.contentType) && E.setRequestHeader('Content-Type', f.contentType), E.setRequestHeader('Accept', f.dataTypes[0] && f.accepts[f.dataTypes[0]] ? f.accepts[f.dataTypes[0]] + ('*' !== f.dataTypes[0] ? ', ' + Nt + '; q=0.01' : '') : f.accepts['*']), f.headers) E.setRequestHeader(h, f.headers[h]); | |
if (f.beforeSend && (!1 === f.beforeSend.call(p, E, f) || u)) return E.abort(); | |
if (w = 'abort', y.add(f.complete), E.done(f.success), E.fail(f.error), r = qt(Ht, f, n, E)) { | |
if (E.readyState = 1, c && v.trigger('ajaxSend', [ | |
E, | |
f | |
]), u) return E; | |
f.async && f.timeout > 0 && (o = e.setTimeout((function () { | |
E.abort('timeout') | |
}), f.timeout)); | |
try { | |
u = !1, | |
r.send(C, T) | |
} catch (e) { | |
if (u) throw e; | |
T( - 1, e) | |
} | |
} else T( - 1, 'No Transport'); | |
function T(t, n, a, l) { | |
var h, | |
d, | |
m, | |
C, | |
S, | |
w = n; | |
u || (u = !0, o && e.clearTimeout(o), r = void 0, s = l || '', E.readyState = t > 0 ? 4 : 0, h = t >= 200 && t < 300 || 304 === t, a && (C = function (e, t, n) { | |
for (var r, i, s, a, o = e.contents, l = e.dataTypes; '*' === l[0]; ) l.shift(), | |
void 0 === r && (r = e.mimeType || t.getResponseHeader('Content-Type')); | |
if (r) for (i in o) if (o[i] && o[i].test(r)) { | |
l.unshift(i); | |
break | |
} | |
if (l[0] in n) s = l[0]; | |
else { | |
for (i in n) { | |
if (!l[0] || e.converters[i + ' ' + l[0]]) { | |
s = i; | |
break | |
} | |
a || (a = i) | |
} | |
s = s || a | |
} | |
if (s) return s !== l[0] && l.unshift(s), | |
n[s] | |
}(f, E, a)), !h && k.inArray('script', f.dataTypes) > - 1 && (f.converters['text script'] = function () { | |
}), C = function (e, t, n, r) { | |
var i, | |
s, | |
a, | |
o, | |
l, | |
u = { | |
}, | |
c = e.dataTypes.slice(); | |
if (c[1]) for (a in e.converters) u[a.toLowerCase()] = e.converters[a]; | |
for (s = c.shift(); s; ) if (e.responseFields[s] && (n[e.responseFields[s]] = t), !l && r && e.dataFilter && (t = e.dataFilter(t, e.dataType)), l = s, s = c.shift()) if ('*' === s) s = l; | |
else if ('*' !== l && l !== s) { | |
if (!(a = u[l + ' ' + s] || u['* ' + s])) for (i in u) if ((o = i.split(' ')) [1] === s && (a = u[l + ' ' + o[0]] || u['* ' + o[0]])) { | |
!0 === a ? a = u[i] : !0 !== u[i] && (s = o[0], c.unshift(o[1])); | |
break | |
} | |
if (!0 !== a) if (a && e.throws) t = a(t); | |
else try { | |
t = a(t) | |
} catch (e) { | |
return { | |
state: 'parsererror', | |
error: a ? e : 'No conversion from ' + l + ' to ' + s | |
} | |
} | |
} | |
return { | |
state: 'success', | |
data: t | |
} | |
}(f, C, E, h), h ? (f.ifModified && ((S = E.getResponseHeader('Last-Modified')) && (k.lastModified[i] = S), (S = E.getResponseHeader('etag')) && (k.etag[i] = S)), 204 === t || 'HEAD' === f.type ? w = 'nocontent' : 304 === t ? w = 'notmodified' : (w = C.state, d = C.data, h = !(m = C.error))) : (m = w, !t && w || (w = 'error', t < 0 && (t = 0))), E.status = t, E.statusText = (n || w) + '', h ? g.resolveWith(p, [ | |
d, | |
w, | |
E | |
]) : g.rejectWith(p, [ | |
E, | |
w, | |
m | |
]), E.statusCode(b), b = void 0, c && v.trigger(h ? 'ajaxSuccess' : 'ajaxError', [ | |
E, | |
f, | |
h ? d : m | |
]), y.fireWith(p, [ | |
E, | |
w | |
]), c && (v.trigger('ajaxComplete', [ | |
E, | |
f | |
]), --k.active || k.event.trigger('ajaxStop'))) | |
} | |
return E | |
}, | |
getJSON: function (e, t, n) { | |
return k.get(e, t, n, 'json') | |
}, | |
getScript: function (e, t) { | |
return k.get(e, void 0, t, 'script') | |
} | |
}), | |
k.each(['get', | |
'post'], (function (e, t) { | |
k[t] = function (e, n, r, i) { | |
return p(n) && (i = i || r, r = n, n = void 0), | |
k.ajax(k.extend({ | |
url: e, | |
type: t, | |
dataType: i, | |
data: n, | |
success: r | |
}, k.isPlainObject(e) && e)) | |
} | |
})), | |
k.ajaxPrefilter((function (e) { | |
var t; | |
for (t in e.headers) 'content-type' === t.toLowerCase() && (e.contentType = e.headers[t] || '') | |
})), | |
k._evalUrl = function (e, t, n) { | |
return k.ajax({ | |
url: e, | |
type: 'GET', | |
dataType: 'script', | |
cache: !0, | |
async: !1, | |
global: !1, | |
converters: { | |
'text script': function () { | |
} | |
}, | |
dataFilter: function (e) { | |
k.globalEval(e, t, n) | |
} | |
}) | |
}, | |
k.fn.extend({ | |
wrapAll: function (e) { | |
var t; | |
return this[0] && (p(e) && (e = e.call(this[0])), t = k(e, this[0].ownerDocument).eq(0).clone(!0), this[0].parentNode && t.insertBefore(this[0]), t.map((function () { | |
for (var e = this; e.firstElementChild; ) e = e.firstElementChild; | |
return e | |
})).append(this)), | |
this | |
}, | |
wrapInner: function (e) { | |
return p(e) ? this.each((function (t) { | |
k(this).wrapInner(e.call(this, t)) | |
})) : this.each((function () { | |
var t = k(this), | |
n = t.contents(); | |
n.length ? n.wrapAll(e) : t.append(e) | |
})) | |
}, | |
wrap: function (e) { | |
var t = p(e); | |
return this.each((function (n) { | |
k(this).wrapAll(t ? e.call(this, n) : e) | |
})) | |
}, | |
unwrap: function (e) { | |
return this.parent(e).not('body').each((function () { | |
k(this).replaceWith(this.childNodes) | |
})), | |
this | |
} | |
}), | |
k.expr.pseudos.hidden = function (e) { | |
return !k.expr.pseudos.visible(e) | |
}, | |
k.expr.pseudos.visible = function (e) { | |
return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length) | |
}, | |
k.ajaxSettings.xhr = function () { | |
try { | |
return new e.XMLHttpRequest | |
} catch (e) { | |
} | |
}; | |
var Vt = { | |
0: 200, | |
1223: 204 | |
}, | |
Ut = k.ajaxSettings.xhr(); | |
f.cors = !!Ut && 'withCredentials' in Ut, | |
f.ajax = Ut = !!Ut, | |
k.ajaxTransport((function (t) { | |
var n, | |
r; | |
if (f.cors || Ut && !t.crossDomain) return { | |
send: function (i, s) { | |
var a, | |
o = t.xhr(); | |
if (o.open(t.type, t.url, t.async, t.username, t.password), t.xhrFields) for (a in t.xhrFields) o[a] = t.xhrFields[a]; | |
for (a in t.mimeType && o.overrideMimeType && o.overrideMimeType(t.mimeType), t.crossDomain || i['X-Requested-With'] || (i['X-Requested-With'] = 'XMLHttpRequest'), i) o.setRequestHeader(a, i[a]); | |
n = function (e) { | |
return function () { | |
n && (n = r = o.onload = o.onerror = o.onabort = o.ontimeout = o.onreadystatechange = null, 'abort' === e ? o.abort() : 'error' === e ? 'number' != typeof o.status ? s(0, 'error') : s(o.status, o.statusText) : s(Vt[o.status] || o.status, o.statusText, 'text' !== (o.responseType || 'text') || 'string' != typeof o.responseText ? { | |
binary: o.response | |
} | |
: { | |
text: o.responseText | |
}, o.getAllResponseHeaders())) | |
} | |
}, | |
o.onload = n(), | |
r = o.onerror = o.ontimeout = n('error'), | |
void 0 !== o.onabort ? o.onabort = r : o.onreadystatechange = function () { | |
4 === o.readyState && e.setTimeout((function () { | |
n && r() | |
})) | |
}, | |
n = n('abort'); | |
try { | |
o.send(t.hasContent && t.data || null) | |
} catch (e) { | |
if (n) throw e | |
} | |
}, | |
abort: function () { | |
n && n() | |
} | |
} | |
})), | |
k.ajaxPrefilter((function (e) { | |
e.crossDomain && (e.contents.script = !1) | |
})), | |
k.ajaxSetup({ | |
accepts: { | |
script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript' | |
}, | |
contents: { | |
script: /\b(?:java|ecma)script\b/ | |
}, | |
converters: { | |
'text script': function (e) { | |
return k.globalEval(e), | |
e | |
} | |
} | |
}), | |
k.ajaxPrefilter('script', (function (e) { | |
void 0 === e.cache && (e.cache = !1), | |
e.crossDomain && (e.type = 'GET') | |
})), | |
k.ajaxTransport('script', (function (e) { | |
var t, | |
n; | |
if (e.crossDomain || e.scriptAttrs) return { | |
send: function (r, i) { | |
t = k('<script>').attr(e.scriptAttrs || { | |
}).prop({ | |
charset: e.scriptCharset, | |
src: e.url | |
}).on('load error', n = function (e) { | |
t.remove(), | |
n = null, | |
e && i('error' === e.type ? 404 : 200, e.type) | |
}), | |
m.head.appendChild(t[0]) | |
}, | |
abort: function () { | |
n && n() | |
} | |
} | |
})); | |
var Wt, | |
zt = [ | |
], | |
Gt = /(=)\?(?=&|$)|\?\?/; | |
k.ajaxSetup({ | |
jsonp: 'callback', | |
jsonpCallback: function () { | |
var e = zt.pop() || k.expando + '_' + wt.guid++; | |
return this[e] = !0, | |
e | |
} | |
}), | |
k.ajaxPrefilter('json jsonp', (function (t, n, r) { | |
var i, | |
s, | |
a, | |
o = !1 !== t.jsonp && (Gt.test(t.url) ? 'url' : 'string' == typeof t.data && 0 === (t.contentType || '').indexOf('application/x-www-form-urlencoded') && Gt.test(t.data) && 'data'); | |
if (o || 'jsonp' === t.dataTypes[0]) return i = t.jsonpCallback = p(t.jsonpCallback) ? t.jsonpCallback() : t.jsonpCallback, | |
o ? t[o] = t[o].replace(Gt, '$1' + i) : !1 !== t.jsonp && (t.url += (Et.test(t.url) ? '&' : '?') + t.jsonp + '=' + i), | |
t.converters['script json'] = function () { | |
return a || k.error(i + ' was not called'), | |
a[0] | |
}, | |
t.dataTypes[0] = 'json', | |
s = e[i], | |
e[i] = function () { | |
a = arguments | |
}, | |
r.always((function () { | |
void 0 === s ? k(e).removeProp(i) : e[i] = s, | |
t[i] && (t.jsonpCallback = n.jsonpCallback, zt.push(i)), | |
a && p(s) && s(a[0]), | |
a = s = void 0 | |
})), | |
'script' | |
})), | |
f.createHTMLDocument = ((Wt = m.implementation.createHTMLDocument('').body).innerHTML = '<form></form><form></form>', 2 === Wt.childNodes.length), | |
k.parseHTML = function (e, t, n) { | |
return 'string' != typeof e ? [ | |
] : ('boolean' == typeof t && (n = t, t = !1), t || (f.createHTMLDocument ? ((r = (t = m.implementation.createHTMLDocument('')).createElement('base')).href = m.location.href, t.head.appendChild(r)) : t = m), s = !n && [ | |
], (i = A.exec(e)) ? [ | |
t.createElement(i[1]) | |
] : (i = Ce([e], t, s), s && s.length && k(s).remove(), k.merge([], i.childNodes))); | |
var r, | |
i, | |
s | |
}, | |
k.fn.load = function (e, t, n) { | |
var r, | |
i, | |
s, | |
a = this, | |
o = e.indexOf(' '); | |
return o > - 1 && (r = mt(e.slice(o)), e = e.slice(0, o)), | |
p(t) ? (n = t, t = void 0) : t && 'object' == typeof t && (i = 'POST'), | |
a.length > 0 && k.ajax({ | |
url: e, | |
type: i || 'GET', | |
dataType: 'html', | |
data: t | |
}).done((function (e) { | |
s = arguments, | |
a.html(r ? k('<div>').append(k.parseHTML(e)).find(r) : e) | |
})).always(n && function (e, t) { | |
a.each((function () { | |
n.apply(this, s || [ | |
e.responseText, | |
t, | |
e | |
]) | |
})) | |
}), | |
this | |
}, | |
k.expr.pseudos.animated = function (e) { | |
return k.grep(k.timers, (function (t) { | |
return e === t.elem | |
})).length | |
}, | |
k.offset = { | |
setOffset: function (e, t, n) { | |
var r, | |
i, | |
s, | |
a, | |
o, | |
l, | |
u = k.css(e, 'position'), | |
c = k(e), | |
h = { | |
}; | |
'static' === u && (e.style.position = 'relative'), | |
o = c.offset(), | |
s = k.css(e, 'top'), | |
l = k.css(e, 'left'), | |
('absolute' === u || 'fixed' === u) && (s + l).indexOf('auto') > - 1 ? (a = (r = c.position()).top, i = r.left) : (a = parseFloat(s) || 0, i = parseFloat(l) || 0), | |
p(t) && (t = t.call(e, n, k.extend({ | |
}, o))), | |
null != t.top && (h.top = t.top - o.top + a), | |
null != t.left && (h.left = t.left - o.left + i), | |
'using' in t ? t.using.call(e, h) : ('number' == typeof h.top && (h.top += 'px'), 'number' == typeof h.left && (h.left += 'px'), c.css(h)) | |
} | |
}, | |
k.fn.extend({ | |
offset: function (e) { | |
if (arguments.length) return void 0 === e ? this : this.each((function (t) { | |
k.offset.setOffset(this, e, t) | |
})); | |
var t, | |
n, | |
r = this[0]; | |
return r ? r.getClientRects().length ? (t = r.getBoundingClientRect(), n = r.ownerDocument.defaultView, { | |
top: t.top + n.pageYOffset, | |
left: t.left + n.pageXOffset | |
}) : { | |
top: 0, | |
left: 0 | |
} | |
: void 0 | |
}, | |
position: function () { | |
if (this[0]) { | |
var e, | |
t, | |
n, | |
r = this[0], | |
i = { | |
top: 0, | |
left: 0 | |
}; | |
if ('fixed' === k.css(r, 'position')) t = r.getBoundingClientRect(); | |
else { | |
for (t = this.offset(), n = r.ownerDocument, e = r.offsetParent || n.documentElement; e && (e === n.body || e === n.documentElement) && 'static' === k.css(e, 'position'); ) e = e.parentNode; | |
e && e !== r && 1 === e.nodeType && ((i = k(e).offset()).top += k.css(e, 'borderTopWidth', !0), i.left += k.css(e, 'borderLeftWidth', !0)) | |
} | |
return { | |
top: t.top - i.top - k.css(r, 'marginTop', !0), | |
left: t.left - i.left - k.css(r, 'marginLeft', !0) | |
} | |
} | |
}, | |
offsetParent: function () { | |
return this.map((function () { | |
for (var e = this.offsetParent; e && 'static' === k.css(e, 'position'); ) e = e.offsetParent; | |
return e || re | |
})) | |
} | |
}), | |
k.each({ | |
scrollLeft: 'pageXOffset', | |
scrollTop: 'pageYOffset' | |
}, (function (e, t) { | |
var n = 'pageYOffset' === t; | |
k.fn[e] = function (r) { | |
return $(this, (function (e, r, i) { | |
var s; | |
if (v(e) ? s = e : 9 === e.nodeType && (s = e.defaultView), void 0 === i) return s ? s[t] : e[r]; | |
s ? s.scrollTo(n ? s.pageXOffset : i, n ? i : s.pageYOffset) : e[r] = i | |
}), e, r, arguments.length) | |
} | |
})), | |
k.each(['top', | |
'left'], (function (e, t) { | |
k.cssHooks[t] = Ue(f.pixelPosition, (function (e, n) { | |
if (n) return n = Ve(e, t), | |
Be.test(n) ? k(e).position() [t] + 'px' : n | |
})) | |
})), | |
k.each({ | |
Height: 'height', | |
Width: 'width' | |
}, (function (e, t) { | |
k.each({ | |
padding: 'inner' + e, | |
content: t, | |
'': 'outer' + e | |
}, (function (n, r) { | |
k.fn[r] = function (i, s) { | |
var a = arguments.length && (n || 'boolean' != typeof i), | |
o = n || (!0 === i || !0 === s ? 'margin' : 'border'); | |
return $(this, (function (t, n, i) { | |
var s; | |
return v(t) ? 0 === r.indexOf('outer') ? t['inner' + e] : t.document.documentElement['client' + e] : 9 === t.nodeType ? (s = t.documentElement, Math.max(t.body['scroll' + e], s['scroll' + e], t.body['offset' + e], s['offset' + e], s['client' + e])) : void 0 === i ? k.css(t, n, o) : k.style(t, n, i, o) | |
}), t, a ? i : void 0, a) | |
} | |
})) | |
})), | |
k.each(['ajaxStart', | |
'ajaxStop', | |
'ajaxComplete', | |
'ajaxError', | |
'ajaxSuccess', | |
'ajaxSend'], (function (e, t) { | |
k.fn[t] = function (e) { | |
return this.on(t, e) | |
} | |
})), | |
k.fn.extend({ | |
bind: function (e, t, n) { | |
return this.on(e, null, t, n) | |
}, | |
unbind: function (e, t) { | |
return this.off(e, null, t) | |
}, | |
delegate: function (e, t, n, r) { | |
return this.on(t, e, n, r) | |
}, | |
undelegate: function (e, t, n) { | |
return 1 === arguments.length ? this.off(e, '**') : this.off(t, e || '**', n) | |
}, | |
hover: function (e, t) { | |
return this.mouseenter(e).mouseleave(t || e) | |
} | |
}), | |
k.each('blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu'.split(' '), (function (e, t) { | |
k.fn[t] = function (e, n) { | |
return arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t) | |
} | |
})); | |
var Kt = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; | |
k.proxy = function (e, t) { | |
var n, | |
r, | |
s; | |
if ('string' == typeof t && (n = e[t], t = e, e = n), p(e)) return r = i.call(arguments, 2), | |
(s = function () { | |
return e.apply(t || this, r.concat(i.call(arguments))) | |
}).guid = e.guid = e.guid || k.guid++, | |
s | |
}, | |
k.holdReady = function (e) { | |
e ? k.readyWait++ : k.ready(!0) | |
}, | |
k.isArray = Array.isArray, | |
k.parseJSON = JSON.parse, | |
k.nodeName = x, | |
k.isFunction = p, | |
k.isWindow = v, | |
k.camelCase = z, | |
k.type = b, | |
k.now = Date.now, | |
k.isNumeric = function (e) { | |
var t = k.type(e); | |
return ('number' === t || 'string' === t) && !isNaN(e - parseFloat(e)) | |
}, | |
k.trim = function (e) { | |
return null == e ? '' : (e + '').replace(Kt, '') | |
}, | |
'function' == typeof define && define.amd && define('jquery', [ | |
], (function () { | |
return k | |
})); | |
var Yt = e.jQuery, | |
Qt = e.$; | |
return k.noConflict = function (t) { | |
return e.$ === k && (e.$ = Qt), | |
t && e.jQuery === k && (e.jQuery = Yt), | |
k | |
}, | |
void 0 === t && (e.jQuery = e.$ = k), | |
k | |
})) | |
}, | |
{ | |
} | |
], | |
88: [ | |
function (e, t, n) { | |
/*! npm.im/object-fit-images 3.2.4 */ | |
'use strict'; | |
var r = 'bfred-it:object-fit-images', | |
i = /(object-fit|object-position)\s*:\s*([-.\w\s%]+)/g, | |
s = 'undefined' == typeof Image ? { | |
style: { | |
'object-position': 1 | |
} | |
} | |
: new Image, | |
a = 'object-fit' in s.style, | |
o = 'object-position' in s.style, | |
l = 'background-size' in s.style, | |
u = 'string' == typeof s.currentSrc, | |
c = s.getAttribute, | |
h = s.setAttribute, | |
d = !1; | |
function f(e, t, n) { | |
var r = 'data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'' + (t || 1) + '\' height=\'' + (n || 0) + '\'%3E%3C/svg%3E'; | |
c.call(e, 'src') !== r && h.call(e, 'src', r) | |
} | |
function p(e, t) { | |
e.naturalWidth ? t(e) : setTimeout(p, 100, e, t) | |
} | |
function v(e) { | |
var t = function (e) { | |
for (var t, n = getComputedStyle(e).fontFamily, r = { | |
}; null !== (t = i.exec(n)); ) r[t[1]] = t[2]; | |
return r | |
}(e), | |
n = e[r]; | |
if (t['object-fit'] = t['object-fit'] || 'fill', !n.img) { | |
if ('fill' === t['object-fit']) return; | |
if (!n.skipTest && a && !t['object-position']) return | |
} | |
if (!n.img) { | |
n.img = new Image(e.width, e.height), | |
n.img.srcset = c.call(e, 'data-ofi-srcset') || e.srcset, | |
n.img.src = c.call(e, 'data-ofi-src') || e.src, | |
h.call(e, 'data-ofi-src', e.src), | |
e.srcset && h.call(e, 'data-ofi-srcset', e.srcset), | |
f(e, e.naturalWidth || e.width, e.naturalHeight || e.height), | |
e.srcset && (e.srcset = ''); | |
try { | |
!function (e) { | |
var t = { | |
get: function (t) { | |
return e[r].img[t || 'src'] | |
}, | |
set: function (t, n) { | |
return e[r].img[n || 'src'] = t, | |
h.call(e, 'data-ofi-' + n, t), | |
v(e), | |
t | |
} | |
}; | |
Object.defineProperty(e, 'src', t), | |
Object.defineProperty(e, 'currentSrc', { | |
get: function () { | |
return t.get('currentSrc') | |
} | |
}), | |
Object.defineProperty(e, 'srcset', { | |
get: function () { | |
return t.get('srcset') | |
}, | |
set: function (e) { | |
return t.set(e, 'srcset') | |
} | |
}) | |
}(e) | |
} catch (e) { | |
window.console && console.warn('https://bit.ly/ofi-old-browser') | |
} | |
} | |
!function (e) { | |
if (e.srcset && !u && window.picturefill) { | |
var t = window.picturefill._; | |
e[t.ns] && e[t.ns].evaled || t.fillImg(e, { | |
reselect: !0 | |
}), | |
e[t.ns].curSrc || (e[t.ns].supported = !1, t.fillImg(e, { | |
reselect: !0 | |
})), | |
e.currentSrc = e[t.ns].curSrc || e.src | |
} | |
}(n.img), | |
e.style.backgroundImage = 'url("' + (n.img.currentSrc || n.img.src).replace(/"/g, '\\"') + '")', | |
e.style.backgroundPosition = t['object-position'] || 'center', | |
e.style.backgroundRepeat = 'no-repeat', | |
e.style.backgroundOrigin = 'content-box', | |
/scale-down/.test(t['object-fit']) ? p(n.img, (function () { | |
n.img.naturalWidth > e.width || n.img.naturalHeight > e.height ? e.style.backgroundSize = 'contain' : e.style.backgroundSize = 'auto' | |
})) : e.style.backgroundSize = t['object-fit'].replace('none', 'auto').replace('fill', '100% 100%'), | |
p(n.img, (function (t) { | |
f(e, t.naturalWidth, t.naturalHeight) | |
})) | |
} | |
function m(e, t) { | |
var n = !d && !e; | |
if (t = t || { | |
}, e = e || 'img', o && !t.skipTest || !l) return !1; | |
'img' === e ? e = document.getElementsByTagName('img') : 'string' == typeof e ? e = document.querySelectorAll(e) : 'length' in e || (e = [ | |
e | |
]); | |
for (var i = 0; i < e.length; i++) e[i][r] = e[i][r] || { | |
skipTest: t.skipTest | |
}, | |
v(e[i]); | |
n && (document.body.addEventListener('load', (function (e) { | |
'IMG' === e.target.tagName && m(e.target, { | |
skipTest: t.skipTest | |
}) | |
}), !0), d = !0, e = 'img'), | |
t.watchMQ && window.addEventListener('resize', m.bind(null, e, { | |
skipTest: t.skipTest | |
})) | |
} | |
m.supportsObjectFit = a, | |
m.supportsObjectPosition = o, | |
function () { | |
function e(e, t) { | |
return e[r] && e[r].img && ('src' === t || 'srcset' === t) ? e[r].img : e | |
} | |
o || (HTMLImageElement.prototype.getAttribute = function (t) { | |
return c.call(e(this, t), t) | |
}, HTMLImageElement.prototype.setAttribute = function (t, n) { | |
return h.call(e(this, t), t, String(n)) | |
}) | |
}(), | |
t.exports = m | |
}, | |
{ | |
} | |
], | |
89: [ | |
function (e, t, n) { | |
Parsley.addMessages('en', { | |
defaultMessage: 'This value seems to be invalid.', | |
type: { | |
email: 'This value should be a valid email.', | |
url: 'This value should be a valid url.', | |
number: 'This value should be a valid number.', | |
integer: 'This value should be a valid integer.', | |
digits: 'This value should be digits.', | |
alphanum: 'This value should be alphanumeric.' | |
}, | |
notblank: 'This value should not be blank.', | |
required: 'This value is required.', | |
pattern: 'This value seems to be invalid.', | |
min: 'This value should be greater than or equal to %s.', | |
max: 'This value should be lower than or equal to %s.', | |
range: 'This value should be between %s and %s.', | |
minlength: 'This value is too short. It should have %s characters or more.', | |
maxlength: 'This value is too long. It should have %s characters or fewer.', | |
length: 'This value length is invalid. It should be between %s and %s characters long.', | |
mincheck: 'You must select at least %s choices.', | |
maxcheck: 'You must select %s choices or fewer.', | |
check: 'You must select between %s and %s choices.', | |
equalto: 'This value should be the same.', | |
euvatin: 'It\'s not a valid VAT Identification Number.' | |
}), | |
Parsley.setLocale('en') | |
}, | |
{ | |
} | |
], | |
90: [ | |
function (e, t, n) { | |
Parsley.addMessages('es', { | |
defaultMessage: 'Este valor parece ser inválido.', | |
type: { | |
email: 'Este valor debe ser un correo válido.', | |
url: 'Este valor debe ser una URL válida.', | |
number: 'Este valor debe ser un número válido.', | |
integer: 'Este valor debe ser un número válido.', | |
digits: 'Este valor debe ser un dígito válido.', | |
alphanum: 'Este valor debe ser alfanumérico.' | |
}, | |
notblank: 'Este valor no debe estar en blanco.', | |
required: 'Este valor es requerido.', | |
pattern: 'Este valor es incorrecto.', | |
min: 'Este valor no debe ser menor que %s.', | |
max: 'Este valor no debe ser mayor que %s.', | |
range: 'Este valor debe estar entre %s y %s.', | |
minlength: 'Este valor es muy corto. La longitud mínima es de %s caracteres.', | |
maxlength: 'Este valor es muy largo. La longitud máxima es de %s caracteres.', | |
length: 'La longitud de este valor debe estar entre %s y %s caracteres.', | |
mincheck: 'Debe seleccionar al menos %s opciones.', | |
maxcheck: 'Debe seleccionar %s opciones o menos.', | |
check: 'Debe seleccionar entre %s y %s opciones.', | |
equalto: 'Este valor debe ser idéntico.' | |
}), | |
Parsley.setLocale('es') | |
}, | |
{ | |
} | |
], | |
91: [ | |
function (e, t, n) { | |
Parsley.addMessages('fr', { | |
defaultMessage: 'Cette valeur semble non valide.', | |
type: { | |
email: 'Cette valeur n\'est pas une adresse email valide.', | |
url: 'Cette valeur n\'est pas une URL valide.', | |
number: 'Cette valeur doit être un nombre.', | |
integer: 'Cette valeur doit être un entier.', | |
digits: 'Cette valeur doit être numérique.', | |
alphanum: 'Cette valeur doit être alphanumérique.' | |
}, | |
notblank: 'Cette valeur ne peut pas être vide.', | |
required: 'Ce champ est requis.', | |
pattern: 'Cette valeur semble non valide.', | |
min: 'Cette valeur ne doit pas être inférieure à %s.', | |
max: 'Cette valeur ne doit pas excéder %s.', | |
range: 'Cette valeur doit être comprise entre %s et %s.', | |
minlength: 'Cette chaîne est trop courte. Elle doit avoir au minimum %s caractères.', | |
maxlength: 'Cette chaîne est trop longue. Elle doit avoir au maximum %s caractères.', | |
length: 'Cette valeur doit contenir entre %s et %s caractères.', | |
mincheck: 'Vous devez sélectionner au moins %s choix.', | |
maxcheck: 'Vous devez sélectionner %s choix maximum.', | |
check: 'Vous devez sélectionner entre %s et %s choix.', | |
equalto: 'Cette valeur devrait être identique.' | |
}), | |
Parsley.setLocale('fr') | |
}, | |
{ | |
} | |
], | |
92: [ | |
function (e, t, n) { | |
(function (r) { | |
/*! | |
* Parsley.js | |
* Version 2.9.2 - built Tue, Dec 10th 2019, 6:18 pm | |
* http://parsleyjs.org | |
* Guillaume Potier - <[email protected]> | |
* Marc-Andre Lafortune - <[email protected]> | |
* MIT Licensed | |
*/ | |
!function (r, i) { | |
'object' == typeof n && void 0 !== t ? t.exports = i(e('jquery')) : 'function' == typeof define && define.amd ? define(['jquery'], i) : (r = r || self).parsley = i(r.jQuery) | |
}(this, (function (e) { | |
'use strict'; | |
function t(e) { | |
return (t = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function (e) { | |
return typeof e | |
} | |
: function (e) { | |
return e && 'function' == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? 'symbol' : typeof e | |
}) (e) | |
} | |
function n() { | |
return (n = Object.assign || function (e) { | |
for (var t = 1; t < arguments.length; t++) { | |
var n = arguments[t]; | |
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) | |
} | |
return e | |
}).apply(this, arguments) | |
} | |
function i(e, t) { | |
return function (e) { | |
if (Array.isArray(e)) return e | |
}(e) || function (e, t) { | |
if (!(Symbol.iterator in Object(e)) && '[object Arguments]' !== Object.prototype.toString.call(e)) return; | |
var n = [ | |
], | |
r = !0, | |
i = !1, | |
s = void 0; | |
try { | |
for (var a, o = e[Symbol.iterator](); !(r = (a = o.next()).done) && (n.push(a.value), !t || n.length !== t); r = !0); | |
} catch (e) { | |
i = !0, | |
s = e | |
} finally { | |
try { | |
r || null == o.return || o.return() | |
} finally { | |
if (i) throw s | |
} | |
} | |
return n | |
}(e, t) || function () { | |
throw new TypeError('Invalid attempt to destructure non-iterable instance') | |
}() | |
} | |
function s(e) { | |
return function (e) { | |
if (Array.isArray(e)) { | |
for (var t = 0, n = new Array(e.length); t < e.length; t++) n[t] = e[t]; | |
return n | |
} | |
}(e) || function (e) { | |
if (Symbol.iterator in Object(e) || '[object Arguments]' === Object.prototype.toString.call(e)) return Array.from(e) | |
}(e) || function () { | |
throw new TypeError('Invalid attempt to spread non-iterable instance') | |
}() | |
} | |
var a = 1, | |
o = { | |
}, | |
l = { | |
attr: function (e, t, n) { | |
var r, | |
i, | |
s, | |
a = new RegExp('^' + t, 'i'); | |
if (void 0 === n) n = { | |
}; | |
else for (r in n) n.hasOwnProperty(r) && delete n[r]; | |
if (!e) return n; | |
for (r = (s = e.attributes).length; r--; ) (i = s[r]) && i.specified && a.test(i.name) && (n[this.camelize(i.name.slice(t.length))] = this.deserializeValue(i.value)); | |
return n | |
}, | |
checkAttr: function (e, t, n) { | |
return e.hasAttribute(t + n) | |
}, | |
setAttr: function (e, t, n, r) { | |
e.setAttribute(this.dasherize(t + n), String(r)) | |
}, | |
getType: function (e) { | |
return e.getAttribute('type') || 'text' | |
}, | |
generateID: function () { | |
return '' + a++ | |
}, | |
deserializeValue: function (e) { | |
var t; | |
try { | |
return e ? 'true' == e || 'false' != e && ('null' == e ? null : isNaN(t = Number(e)) ? /^[\[\{]/.test(e) ? JSON.parse(e) : e : t) : e | |
} catch (t) { | |
return e | |
} | |
}, | |
camelize: function (e) { | |
return e.replace(/-+(.)?/g, (function (e, t) { | |
return t ? t.toUpperCase() : '' | |
})) | |
}, | |
dasherize: function (e) { | |
return e.replace(/::/g, '/').replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2').replace(/([a-z\d])([A-Z])/g, '$1_$2').replace(/_/g, '-').toLowerCase() | |
}, | |
warn: function () { | |
var e; | |
window.console && 'function' == typeof window.console.warn && (e = window.console).warn.apply(e, arguments) | |
}, | |
warnOnce: function (e) { | |
o[e] || (o[e] = !0, this.warn.apply(this, arguments)) | |
}, | |
_resetWarnings: function () { | |
o = { | |
} | |
}, | |
trimString: function (e) { | |
return e.replace(/^\s+|\s+$/g, '') | |
}, | |
parse: { | |
date: function (e) { | |
var t = e.match(/^(\d{4,})-(\d\d)-(\d\d)$/); | |
if (!t) return null; | |
var n = i(t.map((function (e) { | |
return parseInt(e, 10) | |
})), 4), | |
r = (n[0], n[1]), | |
s = n[2], | |
a = n[3], | |
o = new Date(r, s - 1, a); | |
return o.getFullYear() !== r || o.getMonth() + 1 !== s || o.getDate() !== a ? null : o | |
}, | |
string: function (e) { | |
return e | |
}, | |
integer: function (e) { | |
return isNaN(e) ? null : parseInt(e, 10) | |
}, | |
number: function (e) { | |
if (isNaN(e)) throw null; | |
return parseFloat(e) | |
}, | |
boolean: function (e) { | |
return !/^\s*false\s*$/i.test(e) | |
}, | |
object: function (e) { | |
return l.deserializeValue(e) | |
}, | |
regexp: function (e) { | |
var t = ''; | |
return /^\/.*\/(?:[gimy]*)$/.test(e) ? (t = e.replace(/.*\/([gimy]*)$/, '$1'), e = e.replace(new RegExp('^/(.*?)/' + t + '$'), '$1')) : e = '^' + e + '$', | |
new RegExp(e, t) | |
} | |
}, | |
parseRequirement: function (e, t) { | |
var n = this.parse[e || 'string']; | |
if (!n) throw 'Unknown requirement specification: "' + e + '"'; | |
var r = n(t); | |
if (null === r) throw 'Requirement is not a '.concat(e, ': "').concat(t, '"'); | |
return r | |
}, | |
namespaceEvents: function (t, n) { | |
return (t = this.trimString(t || '').split(/\s+/)) [0] ? e.map(t, (function (e) { | |
return ''.concat(e, '.').concat(n) | |
})).join(' ') : '' | |
}, | |
difference: function (t, n) { | |
var r = [ | |
]; | |
return e.each(t, (function (e, t) { | |
- 1 == n.indexOf(t) && r.push(t) | |
})), | |
r | |
}, | |
all: function (t) { | |
return e.when.apply(e, s(t).concat([42, | |
42])) | |
}, | |
objectCreate: Object.create || function () { | |
var e = function () { | |
}; | |
return function (n) { | |
if (arguments.length > 1) throw Error('Second argument not supported'); | |
if ('object' != t(n)) throw TypeError('Argument must be an object'); | |
e.prototype = n; | |
var r = new e; | |
return e.prototype = null, | |
r | |
} | |
}(), | |
_SubmitSelector: 'input[type="submit"], button:submit' | |
}, | |
u = { | |
namespace: 'data-parsley-', | |
inputs: 'input, textarea, select', | |
excluded: 'input[type=button], input[type=submit], input[type=reset], input[type=hidden]', | |
priorityEnabled: !0, | |
multiple: null, | |
group: null, | |
uiEnabled: !0, | |
validationThreshold: 3, | |
focus: 'first', | |
trigger: !1, | |
triggerAfterFailure: 'input', | |
errorClass: 'parsley-error', | |
successClass: 'parsley-success', | |
classHandler: function (e) { | |
}, | |
errorsContainer: function (e) { | |
}, | |
errorsWrapper: '<ul class="parsley-errors-list"></ul>', | |
errorTemplate: '<li></li>' | |
}, | |
c = function () { | |
this.__id__ = l.generateID() | |
}; | |
c.prototype = { | |
asyncSupport: !0, | |
_pipeAccordingToValidationResult: function () { | |
var t = this, | |
n = function () { | |
var n = e.Deferred(); | |
return !0 !== t.validationResult && n.reject(), | |
n.resolve().promise() | |
}; | |
return [n, | |
n] | |
}, | |
actualizeOptions: function () { | |
return l.attr(this.element, this.options.namespace, this.domOptions), | |
this.parent && this.parent.actualizeOptions && this.parent.actualizeOptions(), | |
this | |
}, | |
_resetOptions: function (e) { | |
for (var t in this.domOptions = l.objectCreate(this.parent.options), this.options = l.objectCreate(this.domOptions), e) e.hasOwnProperty(t) && (this.options[t] = e[t]); | |
this.actualizeOptions() | |
}, | |
_listeners: null, | |
on: function (e, t) { | |
return this._listeners = this._listeners || { | |
}, | |
(this._listeners[e] = this._listeners[e] || [ | |
]).push(t), | |
this | |
}, | |
subscribe: function (t, n) { | |
e.listenTo(this, t.toLowerCase(), n) | |
}, | |
off: function (e, t) { | |
var n = this._listeners && this._listeners[e]; | |
if (n) if (t) for (var r = n.length; r--; ) n[r] === t && n.splice(r, 1); | |
else delete this._listeners[e]; | |
return this | |
}, | |
unsubscribe: function (t, n) { | |
e.unsubscribeTo(this, t.toLowerCase()) | |
}, | |
trigger: function (e, t, n) { | |
t = t || this; | |
var r, | |
i = this._listeners && this._listeners[e]; | |
if (i) for (var s = i.length; s--; ) if (!1 === (r = i[s].call(t, t, n))) return r; | |
return !this.parent || this.parent.trigger(e, t, n) | |
}, | |
asyncIsValid: function (e, t) { | |
return l.warnOnce('asyncIsValid is deprecated; please use whenValid instead'), | |
this.whenValid({ | |
group: e, | |
force: t | |
}) | |
}, | |
_findRelated: function () { | |
return this.options.multiple ? e(this.parent.element.querySelectorAll('['.concat(this.options.namespace, 'multiple="').concat(this.options.multiple, '"]'))) : this.$element | |
} | |
}; | |
var h = function (t) { | |
e.extend(!0, this, t) | |
}; | |
h.prototype = { | |
validate: function (e, t) { | |
if (this.fn) return arguments.length > 3 && (t = [ | |
].slice.call(arguments, 1, - 1)), | |
this.fn(e, t); | |
if (Array.isArray(e)) { | |
if (!this.validateMultiple) throw 'Validator `' + this.name + '` does not handle multiple values'; | |
return this.validateMultiple.apply(this, arguments) | |
} | |
var n = arguments[arguments.length - 1]; | |
if (this.validateDate && n._isDateInput()) return arguments[0] = l.parse.date(arguments[0]), | |
null !== arguments[0] && this.validateDate.apply(this, arguments); | |
if (this.validateNumber) return !e || !isNaN(e) && (arguments[0] = parseFloat(arguments[0]), this.validateNumber.apply(this, arguments)); | |
if (this.validateString) return this.validateString.apply(this, arguments); | |
throw 'Validator `' + this.name + '` only handles multiple values' | |
}, | |
parseRequirements: function (t, n) { | |
if ('string' != typeof t) return Array.isArray(t) ? t : [ | |
t | |
]; | |
var r = this.requirementType; | |
if (Array.isArray(r)) { | |
for (var i = function (e, t) { | |
var n = e.match(/^\s*\[(.*)\]\s*$/); | |
if (!n) throw 'Requirement is not an array: "' + e + '"'; | |
var r = n[1].split(',').map(l.trimString); | |
if (r.length !== t) throw 'Requirement has ' + r.length + ' values when ' + t + ' are needed'; | |
return r | |
}(t, r.length), s = 0; s < i.length; s++) i[s] = l.parseRequirement(r[s], i[s]); | |
return i | |
} | |
return e.isPlainObject(r) ? function (e, t, n) { | |
var r = null, | |
i = { | |
}; | |
for (var s in e) if (s) { | |
var a = n(s); | |
'string' == typeof a && (a = l.parseRequirement(e[s], a)), | |
i[s] = a | |
} else r = l.parseRequirement(e[s], t); | |
return [r, | |
i] | |
}(r, t, n) : [ | |
l.parseRequirement(r, t) | |
] | |
}, | |
requirementType: 'string', | |
priority: 2 | |
}; | |
var d = function (e, t) { | |
this.__class__ = 'ValidatorRegistry', | |
this.locale = 'en', | |
this.init(e || { | |
}, t || { | |
}) | |
}, | |
f = { | |
email: /^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))$/, | |
number: /^-?(\d*\.)?\d+(e[-+]?\d+)?$/i, | |
integer: /^-?\d+$/, | |
digits: /^\d+$/, | |
alphanum: /^\w+$/i, | |
date: { | |
test: function (e) { | |
return null !== l.parse.date(e) | |
} | |
}, | |
url: new RegExp('^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-zA-Z\\u00a1-\\uffff0-9]-*)*[a-zA-Z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-zA-Z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$') | |
}; | |
f.range = f.number; | |
var p = function (e) { | |
var t = ('' + e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/); | |
return t ? Math.max(0, (t[1] ? t[1].length : 0) - (t[2] ? + t[2] : 0)) : 0 | |
}, | |
v = function (e, t) { | |
return t.map(l.parse[e]) | |
}, | |
m = function (e, t) { | |
return function (n) { | |
for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++) i[a - 1] = arguments[a]; | |
return i.pop(), | |
t.apply(void 0, [ | |
n | |
].concat(s(v(e, i)))) | |
} | |
}, | |
g = function (e) { | |
return { | |
validateDate: m('date', e), | |
validateNumber: m('number', e), | |
requirementType: e.length <= 2 ? 'string' : [ | |
'string', | |
'string' | |
], | |
priority: 30 | |
} | |
}; | |
d.prototype = { | |
init: function (e, t) { | |
for (var r in this.catalog = t, this.validators = n({ | |
}, this.validators), e) this.addValidator(r, e[r].fn, e[r].priority); | |
window.Parsley.trigger('parsley:validator:init') | |
}, | |
setLocale: function (e) { | |
if (void 0 === this.catalog[e]) throw new Error(e + ' is not available in the catalog'); | |
return this.locale = e, | |
this | |
}, | |
addCatalog: function (e, n, r) { | |
return 'object' === t(n) && (this.catalog[e] = n), | |
!0 === r ? this.setLocale(e) : this | |
}, | |
addMessage: function (e, t, n) { | |
return void 0 === this.catalog[e] && (this.catalog[e] = { | |
}), | |
this.catalog[e][t] = n, | |
this | |
}, | |
addMessages: function (e, t) { | |
for (var n in t) this.addMessage(e, n, t[n]); | |
return this | |
}, | |
addValidator: function (e, t, n) { | |
if (this.validators[e]) l.warn('Validator "' + e + '" is already defined.'); | |
else if (u.hasOwnProperty(e)) return void l.warn('"' + e + '" is a restricted keyword and is not a valid validator name.'); | |
return this._setValidator.apply(this, arguments) | |
}, | |
hasValidator: function (e) { | |
return !!this.validators[e] | |
}, | |
updateValidator: function (e, t, n) { | |
return this.validators[e] ? this._setValidator.apply(this, arguments) : (l.warn('Validator "' + e + '" is not already defined.'), this.addValidator.apply(this, arguments)) | |
}, | |
removeValidator: function (e) { | |
return this.validators[e] || l.warn('Validator "' + e + '" is not defined.'), | |
delete this.validators[e], | |
this | |
}, | |
_setValidator: function (e, n, r) { | |
for (var i in 'object' !== t(n) && (n = { | |
fn: n, | |
priority: r | |
}), n.validate || (n = new h(n)), this.validators[e] = n, n.messages || { | |
}) this.addMessage(i, e, n.messages[i]); | |
return this | |
}, | |
getErrorMessage: function (e) { | |
var t; | |
'type' === e.name ? t = (this.catalog[this.locale][e.name] || { | |
}) [e.requirements] : t = this.formatMessage(this.catalog[this.locale][e.name], e.requirements); | |
return t || this.catalog[this.locale].defaultMessage || this.catalog.en.defaultMessage | |
}, | |
formatMessage: function (e, n) { | |
if ('object' === t(n)) { | |
for (var r in n) e = this.formatMessage(e, n[r]); | |
return e | |
} | |
return 'string' == typeof e ? e.replace(/%s/i, n) : '' | |
}, | |
validators: { | |
notblank: { | |
validateString: function (e) { | |
return /\S/.test(e) | |
}, | |
priority: 2 | |
}, | |
required: { | |
validateMultiple: function (e) { | |
return e.length > 0 | |
}, | |
validateString: function (e) { | |
return /\S/.test(e) | |
}, | |
priority: 512 | |
}, | |
type: { | |
validateString: function (e, t) { | |
var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { | |
}, | |
r = n.step, | |
i = void 0 === r ? 'any' : r, | |
s = n.base, | |
a = void 0 === s ? 0 : s, | |
o = f[t]; | |
if (!o) throw new Error('validator type `' + t + '` is not supported'); | |
if (!e) return !0; | |
if (!o.test(e)) return !1; | |
if ('number' === t && !/^any$/i.test(i || '')) { | |
var l = Number(e), | |
u = Math.max(p(i), p(a)); | |
if (p(l) > u) return !1; | |
var c = function (e) { | |
return Math.round(e * Math.pow(10, u)) | |
}; | |
if ((c(l) - c(a)) % c(i) != 0) return !1 | |
} | |
return !0 | |
}, | |
requirementType: { | |
'': 'string', | |
step: 'string', | |
base: 'number' | |
}, | |
priority: 256 | |
}, | |
pattern: { | |
validateString: function (e, t) { | |
return !e || t.test(e) | |
}, | |
requirementType: 'regexp', | |
priority: 64 | |
}, | |
minlength: { | |
validateString: function (e, t) { | |
return !e || e.length >= t | |
}, | |
requirementType: 'integer', | |
priority: 30 | |
}, | |
maxlength: { | |
validateString: function (e, t) { | |
return e.length <= t | |
}, | |
requirementType: 'integer', | |
priority: 30 | |
}, | |
length: { | |
validateString: function (e, t, n) { | |
return !e || e.length >= t && e.length <= n | |
}, | |
requirementType: [ | |
'integer', | |
'integer' | |
], | |
priority: 30 | |
}, | |
mincheck: { | |
validateMultiple: function (e, t) { | |
return e.length >= t | |
}, | |
requirementType: 'integer', | |
priority: 30 | |
}, | |
maxcheck: { | |
validateMultiple: function (e, t) { | |
return e.length <= t | |
}, | |
requirementType: 'integer', | |
priority: 30 | |
}, | |
check: { | |
validateMultiple: function (e, t, n) { | |
return e.length >= t && e.length <= n | |
}, | |
requirementType: [ | |
'integer', | |
'integer' | |
], | |
priority: 30 | |
}, | |
min: g((function (e, t) { | |
return e >= t | |
})), | |
max: g((function (e, t) { | |
return e <= t | |
})), | |
range: g((function (e, t, n) { | |
return e >= t && e <= n | |
})), | |
equalto: { | |
validateString: function (t, n) { | |
if (!t) return !0; | |
var r = e(n); | |
return r.length ? t === r.val() : t === n | |
}, | |
priority: 256 | |
}, | |
euvatin: { | |
validateString: function (e, t) { | |
if (!e) return !0; | |
return /^[A-Z][A-Z][A-Za-z0-9 -]{2,}$/.test(e) | |
}, | |
priority: 30 | |
} | |
} | |
}; | |
var y = { | |
}; | |
y.Form = { | |
_actualizeTriggers: function () { | |
var e = this; | |
this.$element.on('submit.Parsley', (function (t) { | |
e.onSubmitValidate(t) | |
})), | |
this.$element.on('click.Parsley', l._SubmitSelector, (function (t) { | |
e.onSubmitButton(t) | |
})), | |
!1 !== this.options.uiEnabled && this.element.setAttribute('novalidate', '') | |
}, | |
focus: function () { | |
if (this._focusedField = null, !0 === this.validationResult || 'none' === this.options.focus) return null; | |
for (var e = 0; e < this.fields.length; e++) { | |
var t = this.fields[e]; | |
if (!0 !== t.validationResult && t.validationResult.length > 0 && void 0 === t.options.noFocus && (this._focusedField = t.$element, 'first' === this.options.focus)) break | |
} | |
return null === this._focusedField ? null : this._focusedField.focus() | |
}, | |
_destroyUI: function () { | |
this.$element.off('.Parsley') | |
} | |
}, | |
y.Field = { | |
_reflowUI: function () { | |
if (this._buildUI(), this._ui) { | |
var e = function e(t, n, r) { | |
for (var i = [ | |
], s = [ | |
], a = 0; a < t.length; a++) { | |
for (var o = !1, l = 0; l < n.length; l++) if (t[a].assert.name === n[l].assert.name) { | |
o = !0; | |
break | |
} | |
o ? s.push(t[a]) : i.push(t[a]) | |
} | |
return { | |
kept: s, | |
added: i, | |
removed: r ? [ | |
] : e(n, t, !0).added | |
} | |
}(this.validationResult, this._ui.lastValidationResult); | |
this._ui.lastValidationResult = this.validationResult, | |
this._manageStatusClass(), | |
this._manageErrorsMessages(e), | |
this._actualizeTriggers(), | |
!e.kept.length && !e.added.length || this._failedOnce || (this._failedOnce = !0, this._actualizeTriggers()) | |
} | |
}, | |
getErrorsMessages: function () { | |
if (!0 === this.validationResult) return []; | |
for (var e = [ | |
], t = 0; t < this.validationResult.length; t++) e.push(this.validationResult[t].errorMessage || this._getErrorMessage(this.validationResult[t].assert)); | |
return e | |
}, | |
addError: function (e) { | |
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { | |
}, | |
n = t.message, | |
r = t.assert, | |
i = t.updateClass, | |
s = void 0 === i || i; | |
this._buildUI(), | |
this._addError(e, { | |
message: n, | |
assert: r | |
}), | |
s && this._errorClass() | |
}, | |
updateError: function (e) { | |
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { | |
}, | |
n = t.message, | |
r = t.assert, | |
i = t.updateClass, | |
s = void 0 === i || i; | |
this._buildUI(), | |
this._updateError(e, { | |
message: n, | |
assert: r | |
}), | |
s && this._errorClass() | |
}, | |
removeError: function (e) { | |
var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { | |
}, | |
n = t.updateClass, | |
r = void 0 === n || n; | |
this._buildUI(), | |
this._removeError(e), | |
r && this._manageStatusClass() | |
}, | |
_manageStatusClass: function () { | |
this.hasConstraints() && this.needsValidation() && !0 === this.validationResult ? this._successClass() : this.validationResult.length > 0 ? this._errorClass() : this._resetClass() | |
}, | |
_manageErrorsMessages: function (t) { | |
if (void 0 === this.options.errorsMessagesDisabled) { | |
if (void 0 !== this.options.errorMessage) return t.added.length || t.kept.length ? (this._insertErrorWrapper(), 0 === this._ui.$errorsWrapper.find('.parsley-custom-error-message').length && this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass('parsley-custom-error-message')), this._ui.$errorClassHandler.attr('aria-describedby', this._ui.errorsWrapperId), this._ui.$errorsWrapper.addClass('filled').attr('aria-hidden', 'false').find('.parsley-custom-error-message').html(this.options.errorMessage)) : (this._ui.$errorClassHandler.removeAttr('aria-describedby'), this._ui.$errorsWrapper.removeClass('filled').attr('aria-hidden', 'true').find('.parsley-custom-error-message').remove()); | |
for (var n = 0; n < t.removed.length; n++) this._removeError(t.removed[n].assert.name); | |
for (n = 0; n < t.added.length; n++) this._addError(t.added[n].assert.name, { | |
message: t.added[n].errorMessage, | |
assert: t.added[n].assert | |
}); | |
for (n = 0; n < t.kept.length; n++) this._updateError(t.kept[n].assert.name, { | |
message: t.kept[n].errorMessage, | |
assert: t.kept[n].assert | |
}) | |
} | |
}, | |
_addError: function (t, n) { | |
var r = n.message, | |
i = n.assert; | |
this._insertErrorWrapper(), | |
this._ui.$errorClassHandler.attr('aria-describedby', this._ui.errorsWrapperId), | |
this._ui.$errorsWrapper.addClass('filled').attr('aria-hidden', 'false').append(e(this.options.errorTemplate).addClass('parsley-' + t).html(r || this._getErrorMessage(i))) | |
}, | |
_updateError: function (e, t) { | |
var n = t.message, | |
r = t.assert; | |
this._ui.$errorsWrapper.addClass('filled').find('.parsley-' + e).html(n || this._getErrorMessage(r)) | |
}, | |
_removeError: function (e) { | |
this._ui.$errorClassHandler.removeAttr('aria-describedby'), | |
this._ui.$errorsWrapper.removeClass('filled').attr('aria-hidden', 'true').find('.parsley-' + e).remove() | |
}, | |
_getErrorMessage: function (e) { | |
var t = e.name + 'Message'; | |
return void 0 !== this.options[t] ? window.Parsley.formatMessage(this.options[t], e.requirements) : window.Parsley.getErrorMessage(e) | |
}, | |
_buildUI: function () { | |
if (!this._ui && !1 !== this.options.uiEnabled) { | |
var t = { | |
}; | |
this.element.setAttribute(this.options.namespace + 'id', this.__id__), | |
t.$errorClassHandler = this._manageClassHandler(), | |
t.errorsWrapperId = 'parsley-id-' + (this.options.multiple ? 'multiple-' + this.options.multiple : this.__id__), | |
t.$errorsWrapper = e(this.options.errorsWrapper).attr('id', t.errorsWrapperId), | |
t.lastValidationResult = [ | |
], | |
t.validationInformationVisible = !1, | |
this._ui = t | |
} | |
}, | |
_manageClassHandler: function () { | |
if ('string' == typeof this.options.classHandler && e(this.options.classHandler).length) return e(this.options.classHandler); | |
var n = this.options.classHandler; | |
if ('string' == typeof this.options.classHandler && 'function' == typeof window[this.options.classHandler] && (n = window[this.options.classHandler]), 'function' == typeof n) { | |
var r = n.call(this, this); | |
if (void 0 !== r && r.length) return r | |
} else { | |
if ('object' === t(n) && n instanceof jQuery && n.length) return n; | |
n && l.warn('The class handler `' + n + '` does not exist in DOM nor as a global JS function') | |
} | |
return this._inputHolder() | |
}, | |
_inputHolder: function () { | |
return this.options.multiple && 'SELECT' !== this.element.nodeName ? this.$element.parent() : this.$element | |
}, | |
_insertErrorWrapper: function () { | |
var n = this.options.errorsContainer; | |
if (0 !== this._ui.$errorsWrapper.parent().length) return this._ui.$errorsWrapper.parent(); | |
if ('string' == typeof n) { | |
if (e(n).length) return e(n).append(this._ui.$errorsWrapper); | |
'function' == typeof window[n] ? n = window[n] : l.warn('The errors container `' + n + '` does not exist in DOM nor as a global JS function') | |
} | |
return 'function' == typeof n && (n = n.call(this, this)), | |
'object' === t(n) && n.length ? n.append(this._ui.$errorsWrapper) : this._inputHolder().after(this._ui.$errorsWrapper) | |
}, | |
_actualizeTriggers: function () { | |
var e, | |
t = this, | |
n = this._findRelated(); | |
n.off('.Parsley'), | |
this._failedOnce ? n.on(l.namespaceEvents(this.options.triggerAfterFailure, 'Parsley'), (function () { | |
t._validateIfNeeded() | |
})) : (e = l.namespaceEvents(this.options.trigger, 'Parsley')) && n.on(e, (function (e) { | |
t._validateIfNeeded(e) | |
})) | |
}, | |
_validateIfNeeded: function (e) { | |
var t = this; | |
e && /key|input/.test(e.type) && (!this._ui || !this._ui.validationInformationVisible) && this.getValue().length <= this.options.validationThreshold || (this.options.debounce ? (window.clearTimeout(this._debounced), this._debounced = window.setTimeout((function () { | |
return t.validate() | |
}), this.options.debounce)) : this.validate()) | |
}, | |
_resetUI: function () { | |
this._failedOnce = !1, | |
this._actualizeTriggers(), | |
void 0 !== this._ui && (this._ui.$errorsWrapper.removeClass('filled').children().remove(), this._resetClass(), this._ui.lastValidationResult = [ | |
], this._ui.validationInformationVisible = !1) | |
}, | |
_destroyUI: function () { | |
this._resetUI(), | |
void 0 !== this._ui && this._ui.$errorsWrapper.remove(), | |
delete this._ui | |
}, | |
_successClass: function () { | |
this._ui.validationInformationVisible = !0, | |
this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass) | |
}, | |
_errorClass: function () { | |
this._ui.validationInformationVisible = !0, | |
this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass) | |
}, | |
_resetClass: function () { | |
this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass) | |
} | |
}; | |
var b = function (t, n, r) { | |
this.__class__ = 'Form', | |
this.element = t, | |
this.$element = e(t), | |
this.domOptions = n, | |
this.options = r, | |
this.parent = window.Parsley, | |
this.fields = [ | |
], | |
this.validationResult = null | |
}, | |
C = { | |
pending: null, | |
resolved: !0, | |
rejected: !1 | |
}; | |
b.prototype = { | |
onSubmitValidate: function (e) { | |
var t = this; | |
if (!0 !== e.parsley) { | |
var n = this._submitSource || this.$element.find(l._SubmitSelector) [0]; | |
if (this._submitSource = null, this.$element.find('.parsley-synthetic-submit-button').prop('disabled', !0), !n || null === n.getAttribute('formnovalidate')) { | |
window.Parsley._remoteCache = { | |
}; | |
var r = this.whenValidate({ | |
event: e | |
}); | |
'resolved' === r.state() && !1 !== this._trigger('submit') || (e.stopImmediatePropagation(), e.preventDefault(), 'pending' === r.state() && r.done((function () { | |
t._submit(n) | |
}))) | |
} | |
} | |
}, | |
onSubmitButton: function (e) { | |
this._submitSource = e.currentTarget | |
}, | |
_submit: function (t) { | |
if (!1 !== this._trigger('submit')) { | |
if (t) { | |
var r = this.$element.find('.parsley-synthetic-submit-button').prop('disabled', !1); | |
0 === r.length && (r = e('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)), | |
r.attr({ | |
name: t.getAttribute('name'), | |
value: t.getAttribute('value') | |
}) | |
} | |
this.$element.trigger(n(e.Event('submit'), { | |
parsley: !0 | |
})) | |
} | |
}, | |
validate: function (t) { | |
if (arguments.length >= 1 && !e.isPlainObject(t)) { | |
l.warnOnce('Calling validate on a parsley form without passing arguments as an object is deprecated.'); | |
var n = Array.prototype.slice.call(arguments), | |
r = n[0], | |
i = n[1], | |
s = n[2]; | |
t = { | |
group: r, | |
force: i, | |
event: s | |
} | |
} | |
return C[this.whenValidate(t).state()] | |
}, | |
whenValidate: function () { | |
var t, | |
r = this, | |
i = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { | |
}, | |
a = i.group, | |
o = i.force, | |
u = i.event; | |
this.submitEvent = u, | |
u && (this.submitEvent = n({ | |
}, u, { | |
preventDefault: function () { | |
l.warnOnce('Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`'), | |
r.validationResult = !1 | |
} | |
})), | |
this.validationResult = !0, | |
this._trigger('validate'), | |
this._refreshFields(); | |
var c = this._withoutReactualizingFormOptions((function () { | |
return e.map(r.fields, (function (e) { | |
return e.whenValidate({ | |
force: o, | |
group: a | |
}) | |
})) | |
})); | |
return (t = l.all(c).done((function () { | |
r._trigger('success') | |
})).fail((function () { | |
r.validationResult = !1, | |
r.focus(), | |
r._trigger('error') | |
})).always((function () { | |
r._trigger('validated') | |
}))).pipe.apply(t, s(this._pipeAccordingToValidationResult())) | |
}, | |
isValid: function (t) { | |
if (arguments.length >= 1 && !e.isPlainObject(t)) { | |
l.warnOnce('Calling isValid on a parsley form without passing arguments as an object is deprecated.'); | |
var n = Array.prototype.slice.call(arguments), | |
r = n[0], | |
i = n[1]; | |
t = { | |
group: r, | |
force: i | |
} | |
} | |
return C[this.whenValid(t).state()] | |
}, | |
whenValid: function () { | |
var t = this, | |
n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { | |
}, | |
r = n.group, | |
i = n.force; | |
this._refreshFields(); | |
var s = this._withoutReactualizingFormOptions((function () { | |
return e.map(t.fields, (function (e) { | |
return e.whenValid({ | |
group: r, | |
force: i | |
}) | |
})) | |
})); | |
return l.all(s) | |
}, | |
refresh: function () { | |
return this._refreshFields(), | |
this | |
}, | |
reset: function () { | |
for (var e = 0; e < this.fields.length; e++) this.fields[e].reset(); | |
this._trigger('reset') | |
}, | |
destroy: function () { | |
this._destroyUI(); | |
for (var e = 0; e < this.fields.length; e++) this.fields[e].destroy(); | |
this.$element.removeData('Parsley'), | |
this._trigger('destroy') | |
}, | |
_refreshFields: function () { | |
return this.actualizeOptions()._bindFields() | |
}, | |
_bindFields: function () { | |
var t = this, | |
n = this.fields; | |
return this.fields = [ | |
], | |
this.fieldsMappedById = { | |
}, | |
this._withoutReactualizingFormOptions((function () { | |
t.$element.find(t.options.inputs).not(t.options.excluded).not('['.concat(t.options.namespace, 'excluded=true]')).each((function (e, n) { | |
var r = new window.Parsley.Factory(n, { | |
}, t); | |
if ('Field' === r.__class__ || 'FieldMultiple' === r.__class__) { | |
var i = r.__class__ + '-' + r.__id__; | |
void 0 === t.fieldsMappedById[i] && (t.fieldsMappedById[i] = r, t.fields.push(r)) | |
} | |
})), | |
e.each(l.difference(n, t.fields), (function (e, t) { | |
t.reset() | |
})) | |
})), | |
this | |
}, | |
_withoutReactualizingFormOptions: function (e) { | |
var t = this.actualizeOptions; | |
this.actualizeOptions = function () { | |
return this | |
}; | |
var n = e(); | |
return this.actualizeOptions = t, | |
n | |
}, | |
_trigger: function (e) { | |
return this.trigger('form:' + e) | |
} | |
}; | |
var k = function (e, t, r, i, s) { | |
var a = window.Parsley._validatorRegistry.validators[t], | |
o = new h(a); | |
n(this, { | |
validator: o, | |
name: t, | |
requirements: r, | |
priority: i = i || e.options[t + 'Priority'] || o.priority, | |
isDomConstraint: s = !0 === s | |
}), | |
this._parseRequirements(e.options) | |
}; | |
k.prototype = { | |
validate: function (e, t) { | |
var n; | |
return (n = this.validator).validate.apply(n, [ | |
e | |
].concat(s(this.requirementList), [ | |
t | |
])) | |
}, | |
_parseRequirements: function (e) { | |
var t = this; | |
this.requirementList = this.validator.parseRequirements(this.requirements, (function (n) { | |
return e[t.name + (r = n, r[0].toUpperCase() + r.slice(1))]; | |
var r | |
})) | |
} | |
}; | |
var S = function (t, n, r, i) { | |
this.__class__ = 'Field', | |
this.element = t, | |
this.$element = e(t), | |
void 0 !== i && (this.parent = i), | |
this.options = r, | |
this.domOptions = n, | |
this.constraints = [ | |
], | |
this.constraintsByName = { | |
}, | |
this.validationResult = !0, | |
this._bindConstraints() | |
}, | |
w = { | |
pending: null, | |
resolved: !0, | |
rejected: !1 | |
}; | |
S.prototype = { | |
validate: function (t) { | |
arguments.length >= 1 && !e.isPlainObject(t) && (l.warnOnce('Calling validate on a parsley field without passing arguments as an object is deprecated.'), t = { | |
options: t | |
}); | |
var n = this.whenValidate(t); | |
if (!n) return !0; | |
switch (n.state()) { | |
case 'pending': | |
return null; | |
case 'resolved': | |
return !0; | |
case 'rejected': | |
return this.validationResult | |
} | |
}, | |
whenValidate: function () { | |
var e, | |
t = this, | |
n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { | |
}, | |
r = n.force, | |
i = n.group; | |
if (this.refresh(), !i || this._isInGroup(i)) return this.value = this.getValue(), | |
this._trigger('validate'), | |
(e = this.whenValid({ | |
force: r, | |
value: this.value, | |
_refreshed: !0 | |
}).always((function () { | |
t._reflowUI() | |
})).done((function () { | |
t._trigger('success') | |
})).fail((function () { | |
t._trigger('error') | |
})).always((function () { | |
t._trigger('validated') | |
}))).pipe.apply(e, s(this._pipeAccordingToValidationResult())) | |
}, | |
hasConstraints: function () { | |
return 0 !== this.constraints.length | |
}, | |
needsValidation: function (e) { | |
return void 0 === e && (e = this.getValue()), | |
!(!e.length && !this._isRequired() && void 0 === this.options.validateIfEmpty) | |
}, | |
_isInGroup: function (t) { | |
return Array.isArray(this.options.group) ? - 1 !== e.inArray(t, this.options.group) : this.options.group === t | |
}, | |
isValid: function (t) { | |
if (arguments.length >= 1 && !e.isPlainObject(t)) { | |
l.warnOnce('Calling isValid on a parsley field without passing arguments as an object is deprecated.'); | |
var n = Array.prototype.slice.call(arguments), | |
r = n[0], | |
i = n[1]; | |
t = { | |
force: r, | |
value: i | |
} | |
} | |
var s = this.whenValid(t); | |
return !s || w[s.state()] | |
}, | |
whenValid: function () { | |
var t = this, | |
n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { | |
}, | |
r = n.force, | |
i = void 0 !== r && r, | |
s = n.value, | |
a = n.group, | |
o = n._refreshed; | |
if (o || this.refresh(), !a || this._isInGroup(a)) { | |
if (this.validationResult = !0, !this.hasConstraints()) return e.when(); | |
if (null == s && (s = this.getValue()), !this.needsValidation(s) && !0 !== i) return e.when(); | |
var u = this._getGroupedConstraints(), | |
c = [ | |
]; | |
return e.each(u, (function (n, r) { | |
var i = l.all(e.map(r, (function (e) { | |
return t._validateConstraint(s, e) | |
}))); | |
if (c.push(i), 'rejected' === i.state()) return !1 | |
})), | |
l.all(c) | |
} | |
}, | |
_validateConstraint: function (t, n) { | |
var r = this, | |
i = n.validate(t, this); | |
return !1 === i && (i = e.Deferred().reject()), | |
l.all([i]).fail((function (e) { | |
r.validationResult instanceof Array || (r.validationResult = [ | |
]), | |
r.validationResult.push({ | |
assert: n, | |
errorMessage: 'string' == typeof e && e | |
}) | |
})) | |
}, | |
getValue: function () { | |
var e; | |
return null == (e = 'function' == typeof this.options.value ? this.options.value(this) : void 0 !== this.options.value ? this.options.value : this.$element.val()) ? '' : this._handleWhitespace(e) | |
}, | |
reset: function () { | |
return this._resetUI(), | |
this._trigger('reset') | |
}, | |
destroy: function () { | |
this._destroyUI(), | |
this.$element.removeData('Parsley'), | |
this.$element.removeData('FieldMultiple'), | |
this._trigger('destroy') | |
}, | |
refresh: function () { | |
return this._refreshConstraints(), | |
this | |
}, | |
_refreshConstraints: function () { | |
return this.actualizeOptions()._bindConstraints() | |
}, | |
refreshConstraints: function () { | |
return l.warnOnce('Parsley\'s refreshConstraints is deprecated. Please use refresh'), | |
this.refresh() | |
}, | |
addConstraint: function (e, t, n, r) { | |
if (window.Parsley._validatorRegistry.validators[e]) { | |
var i = new k(this, e, t, n, r); | |
'undefined' !== this.constraintsByName[i.name] && this.removeConstraint(i.name), | |
this.constraints.push(i), | |
this.constraintsByName[i.name] = i | |
} | |
return this | |
}, | |
removeConstraint: function (e) { | |
for (var t = 0; t < this.constraints.length; t++) if (e === this.constraints[t].name) { | |
this.constraints.splice(t, 1); | |
break | |
} | |
return delete this.constraintsByName[e], | |
this | |
}, | |
updateConstraint: function (e, t, n) { | |
return this.removeConstraint(e).addConstraint(e, t, n) | |
}, | |
_bindConstraints: function () { | |
for (var e = [ | |
], t = { | |
}, n = 0; n < this.constraints.length; n++) !1 === this.constraints[n].isDomConstraint && (e.push(this.constraints[n]), t[this.constraints[n].name] = this.constraints[n]); | |
for (var r in this.constraints = e, this.constraintsByName = t, this.options) this.addConstraint(r, this.options[r], void 0, !0); | |
return this._bindHtml5Constraints() | |
}, | |
_bindHtml5Constraints: function () { | |
null !== this.element.getAttribute('required') && this.addConstraint('required', !0, void 0, !0), | |
null !== this.element.getAttribute('pattern') && this.addConstraint('pattern', this.element.getAttribute('pattern'), void 0, !0); | |
var e = this.element.getAttribute('min'), | |
t = this.element.getAttribute('max'); | |
null !== e && null !== t ? this.addConstraint('range', [ | |
e, | |
t | |
], void 0, !0) : null !== e ? this.addConstraint('min', e, void 0, !0) : null !== t && this.addConstraint('max', t, void 0, !0), | |
null !== this.element.getAttribute('minlength') && null !== this.element.getAttribute('maxlength') ? this.addConstraint('length', [ | |
this.element.getAttribute('minlength'), | |
this.element.getAttribute('maxlength') | |
], void 0, !0) : null !== this.element.getAttribute('minlength') ? this.addConstraint('minlength', this.element.getAttribute('minlength'), void 0, !0) : null !== this.element.getAttribute('maxlength') && this.addConstraint('maxlength', this.element.getAttribute('maxlength'), void 0, !0); | |
var n = l.getType(this.element); | |
return 'number' === n ? this.addConstraint('type', [ | |
'number', | |
{ | |
step: this.element.getAttribute('step') || '1', | |
base: e || this.element.getAttribute('value') | |
} | |
], void 0, !0) : /^(email|url|range|date)$/i.test(n) ? this.addConstraint('type', n, void 0, !0) : this | |
}, | |
_isRequired: function () { | |
return void 0 !== this.constraintsByName.required && !1 !== this.constraintsByName.required.requirements | |
}, | |
_trigger: function (e) { | |
return this.trigger('field:' + e) | |
}, | |
_handleWhitespace: function (e) { | |
return !0 === this.options.trimValue && l.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'), | |
'squish' === this.options.whitespace && (e = e.replace(/\s{2,}/g, ' ')), | |
'trim' !== this.options.whitespace && 'squish' !== this.options.whitespace && !0 !== this.options.trimValue || (e = l.trimString(e)), | |
e | |
}, | |
_isDateInput: function () { | |
var e = this.constraintsByName.type; | |
return e && 'date' === e.requirements | |
}, | |
_getGroupedConstraints: function () { | |
if (!1 === this.options.priorityEnabled) return [this.constraints]; | |
for (var e = [ | |
], t = { | |
}, n = 0; n < this.constraints.length; n++) { | |
var r = this.constraints[n].priority; | |
t[r] || e.push(t[r] = [ | |
]), | |
t[r].push(this.constraints[n]) | |
} | |
return e.sort((function (e, t) { | |
return t[0].priority - e[0].priority | |
})), | |
e | |
} | |
}; | |
var E = function () { | |
this.__class__ = 'FieldMultiple' | |
}; | |
E.prototype = { | |
addElement: function (e) { | |
return this.$elements.push(e), | |
this | |
}, | |
_refreshConstraints: function () { | |
var t; | |
if (this.constraints = [ | |
], 'SELECT' === this.element.nodeName) return this.actualizeOptions()._bindConstraints(), | |
this; | |
for (var n = 0; n < this.$elements.length; n++) if (e('html').has(this.$elements[n]).length) { | |
t = this.$elements[n].data('FieldMultiple')._refreshConstraints().constraints; | |
for (var r = 0; r < t.length; r++) this.addConstraint(t[r].name, t[r].requirements, t[r].priority, t[r].isDomConstraint) | |
} else this.$elements.splice(n, 1); | |
return this | |
}, | |
getValue: function () { | |
if ('function' == typeof this.options.value) return this.options.value(this); | |
if (void 0 !== this.options.value) return this.options.value; | |
if ('INPUT' === this.element.nodeName) { | |
var t = l.getType(this.element); | |
if ('radio' === t) return this._findRelated().filter(':checked').val() || ''; | |
if ('checkbox' === t) { | |
var n = [ | |
]; | |
return this._findRelated().filter(':checked').each((function () { | |
n.push(e(this).val()) | |
})), | |
n | |
} | |
} | |
return 'SELECT' === this.element.nodeName && null === this.$element.val() ? [ | |
] : this.$element.val() | |
}, | |
_init: function () { | |
return this.$elements = [ | |
this.$element | |
], | |
this | |
} | |
}; | |
var T = function (r, i, s) { | |
this.element = r, | |
this.$element = e(r); | |
var a = this.$element.data('Parsley'); | |
if (a) return void 0 !== s && a.parent === window.Parsley && (a.parent = s, a._resetOptions(a.options)), | |
'object' === t(i) && n(a.options, i), | |
a; | |
if (!this.$element.length) throw new Error('You must bind Parsley on an existing element.'); | |
if (void 0 !== s && 'Form' !== s.__class__) throw new Error('Parent instance must be a Form instance'); | |
return this.parent = s || window.Parsley, | |
this.init(i) | |
}; | |
T.prototype = { | |
init: function (e) { | |
return this.__class__ = 'Parsley', | |
this.__version__ = '2.9.2', | |
this.__id__ = l.generateID(), | |
this._resetOptions(e), | |
'FORM' === this.element.nodeName || l.checkAttr(this.element, this.options.namespace, 'validate') && !this.$element.is(this.options.inputs) ? this.bind('parsleyForm') : this.isMultiple() ? this.handleMultiple() : this.bind('parsleyField') | |
}, | |
isMultiple: function () { | |
var e = l.getType(this.element); | |
return 'radio' === e || 'checkbox' === e || 'SELECT' === this.element.nodeName && null !== this.element.getAttribute('multiple') | |
}, | |
handleMultiple: function () { | |
var t, | |
n, | |
r = this; | |
if (this.options.multiple = this.options.multiple || (t = this.element.getAttribute('name')) || this.element.getAttribute('id'), 'SELECT' === this.element.nodeName && null !== this.element.getAttribute('multiple')) return this.options.multiple = this.options.multiple || this.__id__, | |
this.bind('parsleyFieldMultiple'); | |
if (!this.options.multiple) return l.warn('To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.', this.$element), | |
this; | |
this.options.multiple = this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g, ''), | |
t && e('input[name="' + t + '"]').each((function (e, t) { | |
var n = l.getType(t); | |
'radio' !== n && 'checkbox' !== n || t.setAttribute(r.options.namespace + 'multiple', r.options.multiple) | |
})); | |
for (var i = this._findRelated(), s = 0; s < i.length; s++) if (void 0 !== (n = e(i.get(s)).data('Parsley'))) { | |
this.$element.data('FieldMultiple') || n.addElement(this.$element); | |
break | |
} | |
return this.bind('parsleyField', !0), | |
n || this.bind('parsleyFieldMultiple') | |
}, | |
bind: function (t, n) { | |
var r; | |
switch (t) { | |
case 'parsleyForm': | |
r = e.extend(new b(this.element, this.domOptions, this.options), new c, window.ParsleyExtend)._bindFields(); | |
break; | |
case 'parsleyField': | |
r = e.extend(new S(this.element, this.domOptions, this.options, this.parent), new c, window.ParsleyExtend); | |
break; | |
case 'parsleyFieldMultiple': | |
r = e.extend(new S(this.element, this.domOptions, this.options, this.parent), new E, new c, window.ParsleyExtend)._init(); | |
break; | |
default: | |
throw new Error(t + 'is not a supported Parsley type') | |
} | |
return this.options.multiple && l.setAttr(this.element, this.options.namespace, 'multiple', this.options.multiple), | |
void 0 !== n ? (this.$element.data('FieldMultiple', r), r) : (this.$element.data('Parsley', r), r._actualizeTriggers(), r._trigger('init'), r) | |
} | |
}; | |
var L = e.fn.jquery.split('.'); | |
if (parseInt(L[0]) <= 1 && parseInt(L[1]) < 8) throw 'The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.'; | |
L.forEach || l.warn('Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim'); | |
var x = n(new c, { | |
element: document, | |
$element: e(document), | |
actualizeOptions: null, | |
_resetOptions: null, | |
Factory: T, | |
version: '2.9.2' | |
}); | |
n(S.prototype, y.Field, c.prototype), | |
n(b.prototype, y.Form, c.prototype), | |
n(T.prototype, c.prototype), | |
e.fn.parsley = e.fn.psly = function (t) { | |
if (this.length > 1) { | |
var n = [ | |
]; | |
return this.each((function () { | |
n.push(e(this).parsley(t)) | |
})), | |
n | |
} | |
if (0 != this.length) return new T(this[0], t) | |
}, | |
void 0 === window.ParsleyExtend && (window.ParsleyExtend = { | |
}), | |
x.options = n(l.objectCreate(u), window.ParsleyConfig), | |
window.ParsleyConfig = x.options, | |
window.Parsley = window.psly = x, | |
x.Utils = l, | |
window.ParsleyUtils = { | |
}, | |
e.each(l, (function (e, t) { | |
'function' == typeof t && (window.ParsleyUtils[e] = function () { | |
return l.warnOnce('Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead.'), | |
l[e].apply(l, arguments) | |
}) | |
})); | |
var A = window.Parsley._validatorRegistry = new d(window.ParsleyConfig.validators, window.ParsleyConfig.i18n); | |
window.ParsleyValidator = { | |
}, | |
e.each('setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator'.split(' '), (function (e, t) { | |
window.Parsley[t] = function () { | |
return A[t].apply(A, arguments) | |
}, | |
window.ParsleyValidator[t] = function () { | |
var e; | |
return l.warnOnce('Accessing the method \''.concat(t, '\' through Validator is deprecated. Simply call \'window.Parsley.').concat(t, '(...)\'')), | |
(e = window.Parsley) [t].apply(e, arguments) | |
} | |
})), | |
window.Parsley.UI = y, | |
window.ParsleyUI = { | |
removeError: function (e, t, n) { | |
var r = !0 !== n; | |
return l.warnOnce('Accessing UI is deprecated. Call \'removeError\' on the instance directly. Please comment in issue 1073 as to your need to call this method.'), | |
e.removeError(t, { | |
updateClass: r | |
}) | |
}, | |
getErrorsMessages: function (e) { | |
return l.warnOnce('Accessing UI is deprecated. Call \'getErrorsMessages\' on the instance directly.'), | |
e.getErrorsMessages() | |
} | |
}, | |
e.each('addError updateError'.split(' '), (function (e, t) { | |
window.ParsleyUI[t] = function (e, n, r, i, s) { | |
var a = !0 !== s; | |
return l.warnOnce('Accessing UI is deprecated. Call \''.concat(t, '\' on the instance directly. Please comment in issue 1073 as to your need to call this method.')), | |
e[t](n, { | |
message: r, | |
assert: i, | |
updateClass: a | |
}) | |
} | |
})), | |
!1 !== window.ParsleyConfig.autoBind && e((function () { | |
e('[data-parsley-validate]').length && e('[data-parsley-validate]').parsley() | |
})); | |
var _ = e({ | |
}), | |
R = function () { | |
l.warnOnce('Parsley\'s pubsub module is deprecated; use the \'on\' and \'off\' methods on parsley instances or window.Parsley') | |
}; | |
function D(e, t) { | |
return e.parsleyAdaptedCallback || (e.parsleyAdaptedCallback = function () { | |
var n = Array.prototype.slice.call(arguments, 0); | |
n.unshift(this), | |
e.apply(t || _, n) | |
}), | |
e.parsleyAdaptedCallback | |
} | |
var O = 'parsley:'; | |
function I(e) { | |
return 0 === e.lastIndexOf(O, 0) ? e.substr(O.length) : e | |
} | |
return e.listen = function (e, n) { | |
var r; | |
if (R(), 'object' === t(arguments[1]) && 'function' == typeof arguments[2] && (r = arguments[1], n = arguments[2]), 'function' != typeof n) throw new Error('Wrong parameters'); | |
window.Parsley.on(I(e), D(n, r)) | |
}, | |
e.listenTo = function (e, t, n) { | |
if (R(), !(e instanceof S || e instanceof b)) throw new Error('Must give Parsley instance'); | |
if ('string' != typeof t || 'function' != typeof n) throw new Error('Wrong parameters'); | |
e.on(I(t), D(n)) | |
}, | |
e.unsubscribe = function (e, t) { | |
if (R(), 'string' != typeof e || 'function' != typeof t) throw new Error('Wrong arguments'); | |
window.Parsley.off(I(e), t.parsleyAdaptedCallback) | |
}, | |
e.unsubscribeTo = function (e, t) { | |
if (R(), !(e instanceof S || e instanceof b)) throw new Error('Must give Parsley instance'); | |
e.off(I(t)) | |
}, | |
e.unsubscribeAll = function (t) { | |
R(), | |
window.Parsley.off(I(t)), | |
e('form,input,textarea,select').each((function () { | |
var n = e(this).data('Parsley'); | |
n && n.off(I(t)) | |
})) | |
}, | |
e.emit = function (e, t) { | |
var n; | |
R(); | |
var r = t instanceof S || t instanceof b, | |
i = Array.prototype.slice.call(arguments, r ? 2 : 1); | |
i.unshift(I(e)), | |
r || (t = window.Parsley), | |
(n = t).trigger.apply(n, s(i)) | |
}, | |
e.extend(!0, x, { | |
asyncValidators: { | |
default: | |
{ | |
fn: function (e) { | |
return e.status >= 200 && e.status < 300 | |
}, | |
url: !1 | |
}, | |
reverse: { | |
fn: function (e) { | |
return e.status < 200 || e.status >= 300 | |
}, | |
url: !1 | |
} | |
}, | |
addAsyncValidator: function (e, t, n, r) { | |
return x.asyncValidators[e] = { | |
fn: t, | |
url: n || !1, | |
options: r || { | |
} | |
}, | |
this | |
} | |
}), | |
x.addValidator('remote', { | |
requirementType: { | |
'': 'string', | |
validator: 'string', | |
reverse: 'boolean', | |
options: 'object' | |
}, | |
validateString: function (t, n, r, i) { | |
var s, | |
a, | |
o = { | |
}, | |
l = r.validator || (!0 === r.reverse ? 'reverse' : 'default'); | |
if (void 0 === x.asyncValidators[l]) throw new Error('Calling an undefined async validator: `' + l + '`'); | |
(n = x.asyncValidators[l].url || n).indexOf('{value}') > - 1 ? n = n.replace('{value}', encodeURIComponent(t)) : o[i.element.getAttribute('name') || i.element.getAttribute('id')] = t; | |
var u = e.extend(!0, r.options || { | |
}, x.asyncValidators[l].options); | |
s = e.extend(!0, { | |
}, { | |
url: n, | |
data: o, | |
type: 'GET' | |
}, u), | |
i.trigger('field:ajaxoptions', i, s), | |
a = e.param(s), | |
void 0 === x._remoteCache && (x._remoteCache = { | |
}); | |
var c = x._remoteCache[a] = x._remoteCache[a] || e.ajax(s), | |
h = function () { | |
var t = x.asyncValidators[l].fn.call(i, c, n, r); | |
return t || (t = e.Deferred().reject()), | |
e.when(t) | |
}; | |
return c.then(h, h) | |
}, | |
priority: - 1 | |
}), | |
x.on('form:submit', (function () { | |
x._remoteCache = { | |
} | |
})), | |
c.prototype.addAsyncValidator = function () { | |
return l.warnOnce('Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`'), | |
x.addAsyncValidator.apply(x, arguments) | |
}, | |
x.addMessages('en', { | |
defaultMessage: 'This value seems to be invalid.', | |
type: { | |
email: 'This value should be a valid email.', | |
url: 'This value should be a valid url.', | |
number: 'This value should be a valid number.', | |
integer: 'This value should be a valid integer.', | |
digits: 'This value should be digits.', | |
alphanum: 'This value should be alphanumeric.' | |
}, | |
notblank: 'This value should not be blank.', | |
required: 'This value is required.', | |
pattern: 'This value seems to be invalid.', | |
min: 'This value should be greater than or equal to %s.', | |
max: 'This value should be lower than or equal to %s.', | |
range: 'This value should be between %s and %s.', | |
minlength: 'This value is too short. It should have %s characters or more.', | |
maxlength: 'This value is too long. It should have %s characters or fewer.', | |
length: 'This value length is invalid. It should be between %s and %s characters long.', | |
mincheck: 'You must select at least %s choices.', | |
maxcheck: 'You must select %s choices or fewer.', | |
check: 'You must select between %s and %s choices.', | |
equalto: 'This value should be the same.', | |
euvatin: 'It\'s not a valid VAT Identification Number.' | |
}), | |
x.setLocale('en'), | |
(new function () { | |
var t = this, | |
i = window || r; | |
n(this, { | |
isNativeEvent: function (e) { | |
return e.originalEvent && !1 !== e.originalEvent.isTrusted | |
}, | |
fakeInputEvent: function (n) { | |
t.isNativeEvent(n) && e(n.target).trigger('input') | |
}, | |
misbehaves: function (n) { | |
t.isNativeEvent(n) && (t.behavesOk(n), e(document).on('change.inputevent', n.data.selector, t.fakeInputEvent), t.fakeInputEvent(n)) | |
}, | |
behavesOk: function (n) { | |
t.isNativeEvent(n) && e(document).off('input.inputevent', n.data.selector, t.behavesOk).off('change.inputevent', n.data.selector, t.misbehaves) | |
}, | |
install: function () { | |
if (!i.inputEventPatched) { | |
i.inputEventPatched = '0.0.3'; | |
for (var n = 0, r = [ | |
'select', | |
'input[type="checkbox"]', | |
'input[type="radio"]', | |
'input[type="file"]' | |
]; n < r.length; n++) { | |
var s = r[n]; | |
e(document).on('input.inputevent', s, { | |
selector: s | |
}, t.behavesOk).on('change.inputevent', s, { | |
selector: s | |
}, t.misbehaves) | |
} | |
} | |
}, | |
uninstall: function () { | |
delete i.inputEventPatched, | |
e(document).off('.inputevent') | |
} | |
}) | |
}).install(), | |
x | |
})) | |
}).call(this, 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : { | |
}) | |
}, | |
{ | |
jquery: 87 | |
} | |
] | |
}, { | |
}, [ | |
45 | |
]); | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
(function ($, Drupal) { | |
Drupal.theme.progressBar = function (id) { | |
return '<div id="' + id + '" class="progress" aria-live="polite">' + '<div class="progress__label"> </div>' + '<div class="progress__track"><div class="progress__bar"></div></div>' + '<div class="progress__percentage"></div>' + '<div class="progress__description"> </div>' + '</div>'; | |
}; | |
Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) { | |
this.id = id; | |
this.method = method || 'GET'; | |
this.updateCallback = updateCallback; | |
this.errorCallback = errorCallback; | |
this.element = $(Drupal.theme('progressBar', id)); | |
}; | |
$.extend(Drupal.ProgressBar.prototype, { | |
setProgress: function setProgress(percentage, message, label) { | |
if (percentage >= 0 && percentage <= 100) { | |
$(this.element).find('div.progress__bar').css('width', percentage + '%'); | |
$(this.element).find('div.progress__percentage').html(percentage + '%'); | |
} | |
$('div.progress__description', this.element).html(message); | |
$('div.progress__label', this.element).html(label); | |
if (this.updateCallback) { | |
this.updateCallback(percentage, message, this); | |
} | |
}, | |
startMonitoring: function startMonitoring(uri, delay) { | |
this.delay = delay; | |
this.uri = uri; | |
this.sendPing(); | |
}, | |
stopMonitoring: function stopMonitoring() { | |
clearTimeout(this.timer); | |
this.uri = null; | |
}, | |
sendPing: function sendPing() { | |
if (this.timer) { | |
clearTimeout(this.timer); | |
} | |
if (this.uri) { | |
var pb = this; | |
var uri = this.uri; | |
if (uri.indexOf('?') === - 1) { | |
uri += '?'; | |
} else { | |
uri += '&'; | |
} | |
uri += '_format=json'; | |
$.ajax({ | |
type: this.method, | |
url: uri, | |
data: '', | |
dataType: 'json', | |
success: function success(progress) { | |
if (progress.status === 0) { | |
pb.displayError(progress.data); | |
return; | |
} | |
pb.setProgress(progress.percentage, progress.message, progress.label); | |
pb.timer = setTimeout(function () { | |
pb.sendPing(); | |
}, pb.delay); | |
}, | |
error: function error(xmlhttp) { | |
var e = new Drupal.AjaxError(xmlhttp, pb.uri); | |
pb.displayError('<pre>' + e.message + '</pre>'); | |
} | |
}); | |
} | |
}, | |
displayError: function displayError(string) { | |
var error = $('<div class="messages messages--error"></div>').html(string); | |
$(this.element).before(error).hide(); | |
if (this.errorCallback) { | |
this.errorCallback(this); | |
} | |
} | |
}); | |
}) (jQuery, Drupal); | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
(function (Drupal) { | |
Drupal.behaviors.responsiveImageAJAX = { | |
attach: function attach() { | |
if (window.picturefill) { | |
window.picturefill(); | |
} | |
} | |
}; | |
}) (Drupal); | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
function _toConsumableArray(arr) { | |
if (Array.isArray(arr)) { | |
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { | |
arr2[i] = arr[i]; | |
} | |
return arr2; | |
} else { | |
return Array.from(arr); | |
} | |
}(function ($, window, Drupal, drupalSettings) { | |
Drupal.behaviors.AJAX = { | |
attach: function attach(context, settings) { | |
function loadAjaxBehavior(base) { | |
var elementSettings = settings.ajax[base]; | |
if (typeof elementSettings.selector === 'undefined') { | |
elementSettings.selector = '#' + base; | |
} | |
$(elementSettings.selector).once('drupal-ajax').each(function () { | |
elementSettings.element = this; | |
elementSettings.base = base; | |
Drupal.ajax(elementSettings); | |
}); | |
} | |
Object.keys(settings.ajax || { | |
}).forEach(function (base) { | |
return loadAjaxBehavior(base); | |
}); | |
Drupal.ajax.bindAjaxLinks(document.body); | |
$('.use-ajax-submit').once('ajax').each(function () { | |
var elementSettings = { | |
}; | |
elementSettings.url = $(this.form).attr('action'); | |
elementSettings.setClick = true; | |
elementSettings.event = 'click'; | |
elementSettings.progress = { | |
type: 'throbber' | |
}; | |
elementSettings.base = $(this).attr('id'); | |
elementSettings.element = this; | |
Drupal.ajax(elementSettings); | |
}); | |
}, | |
detach: function detach(context, settings, trigger) { | |
if (trigger === 'unload') { | |
Drupal.ajax.expired().forEach(function (instance) { | |
Drupal.ajax.instances[instance.instanceIndex] = null; | |
}); | |
} | |
} | |
}; | |
Drupal.AjaxError = function (xmlhttp, uri, customMessage) { | |
var statusCode = void 0; | |
var statusText = void 0; | |
var responseText = void 0; | |
if (xmlhttp.status) { | |
statusCode = '\n' + Drupal.t('An AJAX HTTP error occurred.') + '\n' + Drupal.t('HTTP Result Code: !status', { | |
'!status': xmlhttp.status | |
}); | |
} else { | |
statusCode = '\n' + Drupal.t('An AJAX HTTP request terminated abnormally.'); | |
} | |
statusCode += '\n' + Drupal.t('Debugging information follows.'); | |
var pathText = '\n' + Drupal.t('Path: !uri', { | |
'!uri': uri | |
}); | |
statusText = ''; | |
try { | |
statusText = '\n' + Drupal.t('StatusText: !statusText', { | |
'!statusText': $.trim(xmlhttp.statusText) | |
}); | |
} catch (e) { | |
} | |
responseText = ''; | |
try { | |
responseText = '\n' + Drupal.t('ResponseText: !responseText', { | |
'!responseText': $.trim(xmlhttp.responseText) | |
}); | |
} catch (e) { | |
} | |
responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, ''); | |
responseText = responseText.replace(/[\n]+\s+/g, '\n'); | |
var readyStateText = xmlhttp.status === 0 ? '\n' + Drupal.t('ReadyState: !readyState', { | |
'!readyState': xmlhttp.readyState | |
}) : ''; | |
customMessage = customMessage ? '\n' + Drupal.t('CustomMessage: !customMessage', { | |
'!customMessage': customMessage | |
}) : ''; | |
this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText; | |
this.name = 'AjaxError'; | |
}; | |
Drupal.AjaxError.prototype = new Error(); | |
Drupal.AjaxError.prototype.constructor = Drupal.AjaxError; | |
Drupal.ajax = function (settings) { | |
if (arguments.length !== 1) { | |
throw new Error('Drupal.ajax() function must be called with one configuration object only'); | |
} | |
var base = settings.base || false; | |
var element = settings.element || false; | |
delete settings.base; | |
delete settings.element; | |
if (!settings.progress && !element) { | |
settings.progress = false; | |
} | |
var ajax = new Drupal.Ajax(base, element, settings); | |
ajax.instanceIndex = Drupal.ajax.instances.length; | |
Drupal.ajax.instances.push(ajax); | |
return ajax; | |
}; | |
Drupal.ajax.instances = [ | |
]; | |
Drupal.ajax.expired = function () { | |
return Drupal.ajax.instances.filter(function (instance) { | |
return instance && instance.element !== false && !document.body.contains(instance.element); | |
}); | |
}; | |
Drupal.ajax.bindAjaxLinks = function (element) { | |
$(element).find('.use-ajax').once('ajax').each(function (i, ajaxLink) { | |
var $linkElement = $(ajaxLink); | |
var elementSettings = { | |
progress: { | |
type: 'throbber' | |
}, | |
dialogType: $linkElement.data('dialog-type'), | |
dialog: $linkElement.data('dialog-options'), | |
dialogRenderer: $linkElement.data('dialog-renderer'), | |
base: $linkElement.attr('id'), | |
element: ajaxLink | |
}; | |
var href = $linkElement.attr('href'); | |
if (href) { | |
elementSettings.url = href; | |
elementSettings.event = 'click'; | |
} | |
Drupal.ajax(elementSettings); | |
}); | |
}; | |
Drupal.Ajax = function (base, element, elementSettings) { | |
var defaults = { | |
event: element ? 'mousedown' : null, | |
keypress: true, | |
selector: base ? '#' + base : null, | |
effect: 'none', | |
speed: 'none', | |
method: 'replaceWith', | |
progress: { | |
type: 'throbber', | |
message: Drupal.t('Please wait...') | |
}, | |
submit: { | |
js: true | |
} | |
}; | |
$.extend(this, defaults, elementSettings); | |
this.commands = new Drupal.AjaxCommands(); | |
this.instanceIndex = false; | |
if (this.wrapper) { | |
this.wrapper = '#' + this.wrapper; | |
} | |
this.element = element; | |
this.element_settings = elementSettings; | |
this.elementSettings = elementSettings; | |
if (this.element && this.element.form) { | |
this.$form = $(this.element.form); | |
} | |
if (!this.url) { | |
this.url = ''; | |
var $element = $(this.element); | |
if ($element.is('a')) { | |
this.url = $element.attr('href'); | |
} else if (this.element && element.form) { | |
this.url = this.$form.attr('action'); | |
} | |
} | |
var originalUrl = this.url; | |
this.url = this.url.replace(/\/nojs(\/|$|\?|#)/, '/ajax$1'); | |
if (drupalSettings.ajaxTrustedUrl[originalUrl]) { | |
drupalSettings.ajaxTrustedUrl[this.url] = true; | |
} | |
var ajax = this; | |
ajax.options = { | |
url: ajax.url, | |
data: ajax.submit, | |
beforeSerialize: function beforeSerialize(elementSettings, options) { | |
return ajax.beforeSerialize(elementSettings, options); | |
}, | |
beforeSubmit: function beforeSubmit(formValues, elementSettings, options) { | |
ajax.ajaxing = true; | |
return ajax.beforeSubmit(formValues, elementSettings, options); | |
}, | |
beforeSend: function beforeSend(xmlhttprequest, options) { | |
ajax.ajaxing = true; | |
return ajax.beforeSend(xmlhttprequest, options); | |
}, | |
success: function success(response, status, xmlhttprequest) { | |
if (typeof response === 'string') { | |
response = $.parseJSON(response); | |
} | |
if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) { | |
if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') { | |
var customMessage = Drupal.t('The response failed verification so will not be processed.'); | |
return ajax.error(xmlhttprequest, ajax.url, customMessage); | |
} | |
} | |
return ajax.success(response, status); | |
}, | |
complete: function complete(xmlhttprequest, status) { | |
ajax.ajaxing = false; | |
if (status === 'error' || status === 'parsererror') { | |
return ajax.error(xmlhttprequest, ajax.url); | |
} | |
}, | |
dataType: 'json', | |
jsonp: false, | |
type: 'POST' | |
}; | |
if (elementSettings.dialog) { | |
ajax.options.data.dialogOptions = elementSettings.dialog; | |
} | |
if (ajax.options.url.indexOf('?') === - 1) { | |
ajax.options.url += '?'; | |
} else { | |
ajax.options.url += '&'; | |
} | |
var wrapper = 'drupal_' + (elementSettings.dialogType || 'ajax'); | |
if (elementSettings.dialogRenderer) { | |
wrapper += '.' + elementSettings.dialogRenderer; | |
} | |
ajax.options.url += Drupal.ajax.WRAPPER_FORMAT + '=' + wrapper; | |
$(ajax.element).on(elementSettings.event, function (event) { | |
if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) { | |
throw new Error(Drupal.t('The callback URL is not local and not trusted: !url', { | |
'!url': ajax.url | |
})); | |
} | |
return ajax.eventResponse(this, event); | |
}); | |
if (elementSettings.keypress) { | |
$(ajax.element).on('keypress', function (event) { | |
return ajax.keypressResponse(this, event); | |
}); | |
} | |
if (elementSettings.prevent) { | |
$(ajax.element).on(elementSettings.prevent, false); | |
} | |
}; | |
Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format'; | |
Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax'; | |
Drupal.Ajax.prototype.execute = function () { | |
if (this.ajaxing) { | |
return; | |
} | |
try { | |
this.beforeSerialize(this.element, this.options); | |
return $.ajax(this.options); | |
} catch (e) { | |
this.ajaxing = false; | |
window.alert('An error occurred while attempting to process ' + this.options.url + ': ' + e.message); | |
return $.Deferred().reject(); | |
} | |
}; | |
Drupal.Ajax.prototype.keypressResponse = function (element, event) { | |
var ajax = this; | |
if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') { | |
event.preventDefault(); | |
event.stopPropagation(); | |
$(element).trigger(ajax.elementSettings.event); | |
} | |
}; | |
Drupal.Ajax.prototype.eventResponse = function (element, event) { | |
event.preventDefault(); | |
event.stopPropagation(); | |
var ajax = this; | |
if (ajax.ajaxing) { | |
return; | |
} | |
try { | |
if (ajax.$form) { | |
if (ajax.setClick) { | |
element.form.clk = element; | |
} | |
ajax.$form.ajaxSubmit(ajax.options); | |
} else { | |
ajax.beforeSerialize(ajax.element, ajax.options); | |
$.ajax(ajax.options); | |
} | |
} catch (e) { | |
ajax.ajaxing = false; | |
window.alert('An error occurred while attempting to process ' + ajax.options.url + ': ' + e.message); | |
} | |
}; | |
Drupal.Ajax.prototype.beforeSerialize = function (element, options) { | |
if (this.$form && document.body.contains(this.$form.get(0))) { | |
var settings = this.settings || drupalSettings; | |
Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize'); | |
} | |
options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1; | |
var pageState = drupalSettings.ajaxPageState; | |
options.data['ajax_page_state[theme]'] = pageState.theme; | |
options.data['ajax_page_state[theme_token]'] = pageState.theme_token; | |
options.data['ajax_page_state[libraries]'] = pageState.libraries; | |
}; | |
Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) { | |
}; | |
Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) { | |
if (this.$form) { | |
options.extraData = options.extraData || { | |
}; | |
options.extraData.ajax_iframe_upload = '1'; | |
var v = $.fieldValue(this.element); | |
if (v !== null) { | |
options.extraData[this.element.name] = v; | |
} | |
} | |
$(this.element).prop('disabled', true); | |
if (!this.progress || !this.progress.type) { | |
return; | |
} | |
var progressIndicatorMethod = 'setProgressIndicator' + this.progress.type.slice(0, 1).toUpperCase() + this.progress.type.slice(1).toLowerCase(); | |
if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') { | |
this[progressIndicatorMethod].call(this); | |
} | |
}; | |
Drupal.theme.ajaxProgressThrobber = function (message) { | |
var messageMarkup = typeof message === 'string' ? Drupal.theme('ajaxProgressMessage', message) : ''; | |
var throbber = '<div class="throbber"> </div>'; | |
return '<div class="ajax-progress ajax-progress-throbber">' + throbber + messageMarkup + '</div>'; | |
}; | |
Drupal.theme.ajaxProgressIndicatorFullscreen = function () { | |
return '<div class="ajax-progress ajax-progress-fullscreen"> </div>'; | |
}; | |
Drupal.theme.ajaxProgressMessage = function (message) { | |
return '<div class="message">' + message + '</div>'; | |
}; | |
Drupal.theme.ajaxProgressBar = function ($element) { | |
return $('<div class="ajax-progress ajax-progress-bar"></div>').append($element); | |
}; | |
Drupal.Ajax.prototype.setProgressIndicatorBar = function () { | |
var progressBar = new Drupal.ProgressBar('ajax-progress-' + this.element.id, $.noop, this.progress.method, $.noop); | |
if (this.progress.message) { | |
progressBar.setProgress( - 1, this.progress.message); | |
} | |
if (this.progress.url) { | |
progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500); | |
} | |
this.progress.element = $(Drupal.theme('ajaxProgressBar', progressBar.element)); | |
this.progress.object = progressBar; | |
$(this.element).after(this.progress.element); | |
}; | |
Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () { | |
this.progress.element = $(Drupal.theme('ajaxProgressThrobber', this.progress.message)); | |
$(this.element).after(this.progress.element); | |
}; | |
Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () { | |
this.progress.element = $(Drupal.theme('ajaxProgressIndicatorFullscreen')); | |
$('body').append(this.progress.element); | |
}; | |
Drupal.Ajax.prototype.success = function (response, status) { | |
var _this = this; | |
if (this.progress.element) { | |
$(this.progress.element).remove(); | |
} | |
if (this.progress.object) { | |
this.progress.object.stopMonitoring(); | |
} | |
$(this.element).prop('disabled', false); | |
var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray(); | |
var focusChanged = false; | |
Object.keys(response || { | |
}).forEach(function (i) { | |
if (response[i].command && _this.commands[response[i].command]) { | |
_this.commands[response[i].command](_this, response[i], status); | |
if (response[i].command === 'invoke' && response[i].method === 'focus') { | |
focusChanged = true; | |
} | |
} | |
}); | |
if (!focusChanged && this.element && !$(this.element).data('disable-refocus')) { | |
var target = false; | |
for (var n = elementParents.length - 1; !target && n >= 0; n--) { | |
target = document.querySelector('[data-drupal-selector="' + elementParents[n].getAttribute('data-drupal-selector') + '"]'); | |
} | |
if (target) { | |
$(target).trigger('focus'); | |
} | |
} | |
if (this.$form && document.body.contains(this.$form.get(0))) { | |
var settings = this.settings || drupalSettings; | |
Drupal.attachBehaviors(this.$form.get(0), settings); | |
} | |
this.settings = null; | |
}; | |
Drupal.Ajax.prototype.getEffect = function (response) { | |
var type = response.effect || this.effect; | |
var speed = response.speed || this.speed; | |
var effect = { | |
}; | |
if (type === 'none') { | |
effect.showEffect = 'show'; | |
effect.hideEffect = 'hide'; | |
effect.showSpeed = ''; | |
} else if (type === 'fade') { | |
effect.showEffect = 'fadeIn'; | |
effect.hideEffect = 'fadeOut'; | |
effect.showSpeed = speed; | |
} else { | |
effect.showEffect = type + 'Toggle'; | |
effect.hideEffect = type + 'Toggle'; | |
effect.showSpeed = speed; | |
} | |
return effect; | |
}; | |
Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) { | |
if (this.progress.element) { | |
$(this.progress.element).remove(); | |
} | |
if (this.progress.object) { | |
this.progress.object.stopMonitoring(); | |
} | |
$(this.wrapper).show(); | |
$(this.element).prop('disabled', false); | |
if (this.$form && document.body.contains(this.$form.get(0))) { | |
var settings = this.settings || drupalSettings; | |
Drupal.attachBehaviors(this.$form.get(0), settings); | |
} | |
throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage); | |
}; | |
Drupal.theme.ajaxWrapperNewContent = function ($newContent, ajax, response) { | |
return (response.effect || ajax.effect) !== 'none' && $newContent.filter(function (i) { | |
return !($newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent)); | |
}).length > 1 ? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) : $newContent; | |
}; | |
Drupal.theme.ajaxWrapperMultipleRootElements = function ($elements) { | |
return $('<div></div>').append($elements); | |
}; | |
Drupal.AjaxCommands = function () { | |
}; | |
Drupal.AjaxCommands.prototype = { | |
insert: function insert(ajax, response) { | |
var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper); | |
var method = response.method || ajax.method; | |
var effect = ajax.getEffect(response); | |
var settings = response.settings || ajax.settings || drupalSettings; | |
var $newContent = $($.parseHTML(response.data, document, true)); | |
$newContent = Drupal.theme('ajaxWrapperNewContent', $newContent, ajax, response); | |
switch (method) { | |
case 'html': | |
case 'replaceWith': | |
case 'replaceAll': | |
case 'empty': | |
case 'remove': | |
Drupal.detachBehaviors($wrapper.get(0), settings); | |
break; | |
default: | |
break; | |
} | |
$wrapper[method]($newContent); | |
if (effect.showEffect !== 'show') { | |
$newContent.hide(); | |
} | |
var $ajaxNewContent = $newContent.find('.ajax-new-content'); | |
if ($ajaxNewContent.length) { | |
$ajaxNewContent.hide(); | |
$newContent.show(); | |
$ajaxNewContent[effect.showEffect](effect.showSpeed); | |
} else if (effect.showEffect !== 'show') { | |
$newContent[effect.showEffect](effect.showSpeed); | |
} | |
if ($newContent.parents('html').length) { | |
$newContent.each(function (index, element) { | |
if (element.nodeType === Node.ELEMENT_NODE) { | |
Drupal.attachBehaviors(element, settings); | |
} | |
}); | |
} | |
}, | |
remove: function remove(ajax, response, status) { | |
var settings = response.settings || ajax.settings || drupalSettings; | |
$(response.selector).each(function () { | |
Drupal.detachBehaviors(this, settings); | |
}).remove(); | |
}, | |
changed: function changed(ajax, response, status) { | |
var $element = $(response.selector); | |
if (!$element.hasClass('ajax-changed')) { | |
$element.addClass('ajax-changed'); | |
if (response.asterisk) { | |
$element.find(response.asterisk).append(' <abbr class="ajax-changed" title="' + Drupal.t('Changed') + '">*</abbr> '); | |
} | |
} | |
}, | |
alert: function alert(ajax, response, status) { | |
window.alert(response.text, response.title); | |
}, | |
announce: function announce(ajax, response) { | |
if (response.priority) { | |
Drupal.announce(response.text, response.priority); | |
} else { | |
Drupal.announce(response.text); | |
} | |
}, | |
redirect: function redirect(ajax, response, status) { | |
window.location = response.url; | |
}, | |
css: function css(ajax, response, status) { | |
$(response.selector).css(response.argument); | |
}, | |
settings: function settings(ajax, response, status) { | |
var ajaxSettings = drupalSettings.ajax; | |
if (ajaxSettings) { | |
Drupal.ajax.expired().forEach(function (instance) { | |
if (instance.selector) { | |
var selector = instance.selector.replace('#', ''); | |
if (selector in ajaxSettings) { | |
delete ajaxSettings[selector]; | |
} | |
} | |
}); | |
} | |
if (response.merge) { | |
$.extend(true, drupalSettings, response.settings); | |
} else { | |
ajax.settings = response.settings; | |
} | |
}, | |
data: function data(ajax, response, status) { | |
$(response.selector).data(response.name, response.value); | |
}, | |
invoke: function invoke(ajax, response, status) { | |
var $element = $(response.selector); | |
$element[response.method].apply($element, _toConsumableArray(response.args)); | |
}, | |
restripe: function restripe(ajax, response, status) { | |
$(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even'); | |
}, | |
update_build_id: function update_build_id(ajax, response, status) { | |
$('input[name="form_build_id"][value="' + response.old + '"]').val(response.new); | |
}, | |
add_css: function add_css(ajax, response, status) { | |
$('head').prepend(response.data); | |
}, | |
message: function message(ajax, response) { | |
var messages = new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector)); | |
if (response.clearPrevious) { | |
messages.clear(); | |
} | |
messages.add(response.message, response.messageOptions); | |
} | |
}; | |
}) (jQuery, window, Drupal, drupalSettings); | |
; | |
!function e(r, n, a) { | |
function t(s, i) { | |
if (!n[s]) { | |
if (!r[s]) { | |
var l = 'function' == typeof require && require; | |
if (!i && l) return l(s, !0); | |
if (o) return o(s, !0); | |
var c = new Error('Cannot find module \'' + s + '\''); | |
throw c.code = 'MODULE_NOT_FOUND', | |
c | |
} | |
var u = n[s] = { | |
exports: { | |
} | |
}; | |
r[s][0].call(u.exports, (function (e) { | |
return t(r[s][1][e] || e) | |
}), u, u.exports, e, r, n, a) | |
} | |
return n[s].exports | |
} | |
for (var o = 'function' == typeof require && require, s = 0; s < a.length; s++) t(a[s]); | |
return t | |
}({ | |
1: [ | |
function (e, r, n) { | |
'use strict'; | |
!function (e, Drupal) { | |
var r = '.js-kraken-ajax-loader-fullscreen', | |
n = Drupal.t('Loading, please do not refresh the page'); | |
Drupal.theme.krakenInlineLoader = function () { | |
var r = document.createElement('span'); | |
r.className = 'ajaxLoader ajaxLoader_inline ajaxLoader_marginLeft js-kraken-ajax-loader-inline'; | |
var n = document.createElement('span'); | |
return n.className = 'ajaxLoader-indicator', | |
e(r).append(n), | |
r | |
}, | |
Drupal.theme.krakenFullscreenIndicator = function () { | |
var r = document.createElement('div'); | |
r.className = 'ajaxLoader ajaxLoader_fullscreen js-kraken-ajax-loader-fullscreen'; | |
var n = document.createElement('div'); | |
return n.className = 'ajaxLoader-indicator', | |
e(r).append(n), | |
r | |
}, | |
Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () { | |
if (this.progress.element = e(Drupal.theme('krakenInlineLoader')), Drupal.announce(n, 'assertive'), e(this.element).is(':input')) return this.progress.element[0].classList.add('ajaxLoader_submit'), | |
this.progress.element[0].classList.remove('ajaxLoader_marginLeft'), | |
void e(this.element).after(this.progress.element); | |
e(this.element).append(this.progress.element) | |
}, | |
Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () { | |
e(document.querySelectorAll(r)).remove(), | |
this.progress.element = e(Drupal.theme('krakenFullscreenIndicator')), | |
e('body').append(this.progress.element), | |
Drupal.announce(n, 'polite') | |
} | |
}(jQuery, Drupal) | |
}, | |
{ | |
} | |
] | |
}, { | |
}, [ | |
1 | |
]); | |
; | |
!function e(r, t, n) { | |
function o(b, u) { | |
if (!t[b]) { | |
if (!r[b]) { | |
var c = 'function' == typeof require && require; | |
if (!u && c) return c(b, !0); | |
if (a) return a(b, !0); | |
var i = new Error('Cannot find module \'' + b + '\''); | |
throw i.code = 'MODULE_NOT_FOUND', | |
i | |
} | |
var s = t[b] = { | |
exports: { | |
} | |
}; | |
r[b][0].call(s.exports, (function (e) { | |
return o(r[b][1][e] || e) | |
}), s, s.exports, e, r, t, n) | |
} | |
return t[b].exports | |
} | |
for (var a = 'function' == typeof require && require, b = 0; b < n.length; b++) o(n[b]); | |
return o | |
}({ | |
1: [ | |
function (e, r, t) { | |
'use strict'; | |
!function (e, Drupal) { | |
var r = '.js-kraken-ajax-loader-fullscreen', | |
t = Drupal.t('Loading, please do not refresh the page'); | |
Drupal.theme.purinaFullscreenIndicator = function () { | |
var r = document.createElement('div'); | |
r.className = 'ajaxLoader ajaxLoader_purinaFullscreen js-kraken-ajax-loader-fullscreen'; | |
var t = document.createElement('div'); | |
return t.className = 'ajaxLoader-indicator', | |
t.innerHTML = '\n <div class="throbber-cube throbber-cube_solid"></div>\n <div class="throbber-cube"></div>\n <div class="throbber-cube throbber-cube_solid"></div>\n <div class="throbber-cube"></div>\n <div class="throbber-cube throbber-cube_folding">\n <div class="throbber-cube-quarter_1 throbber-cube-quarter"></div>\n <div class="throbber-cube-quarter_2 throbber-cube-quarter"></div>\n <div class="throbber-cube-quarter_4 throbber-cube-quarter"></div>\n <div class="throbber-cube-quarter_3 throbber-cube-quarter"></div>\n </div>\n <div class="throbber-cube"></div>\n <div class="throbber-cube throbber-cube_solid"></div>\n <div class="throbber-cube"></div>\n <div class="throbber-cube throbber-cube_solid"></div>', | |
e(r).append(t), | |
r | |
}, | |
Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () { | |
e(document.querySelectorAll(r)).remove(), | |
this.progress.element = e(Drupal.theme('purinaFullscreenIndicator')), | |
e('body').append(this.progress.element), | |
Drupal.announce(t, 'assertive') | |
} | |
}(jQuery, Drupal) | |
}, | |
{ | |
} | |
] | |
}, { | |
}, [ | |
1 | |
]); | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
(function ($, Drupal, debounce) { | |
var offsets = { | |
top: 0, | |
right: 0, | |
bottom: 0, | |
left: 0 | |
}; | |
function getRawOffset(el, edge) { | |
var $el = $(el); | |
var documentElement = document.documentElement; | |
var displacement = 0; | |
var horizontal = edge === 'left' || edge === 'right'; | |
var placement = $el.offset() [horizontal ? 'left' : 'top']; | |
placement -= window['scroll' + (horizontal ? 'X' : 'Y')] || document.documentElement['scroll' + (horizontal ? 'Left' : 'Top')] || 0; | |
switch (edge) { | |
case 'top': | |
displacement = placement + $el.outerHeight(); | |
break; | |
case 'left': | |
displacement = placement + $el.outerWidth(); | |
break; | |
case 'bottom': | |
displacement = documentElement.clientHeight - placement; | |
break; | |
case 'right': | |
displacement = documentElement.clientWidth - placement; | |
break; | |
default: | |
displacement = 0; | |
} | |
return displacement; | |
} | |
function calculateOffset(edge) { | |
var edgeOffset = 0; | |
var displacingElements = document.querySelectorAll('[data-offset-' + edge + ']'); | |
var n = displacingElements.length; | |
for (var i = 0; i < n; i++) { | |
var el = displacingElements[i]; | |
if (el.style.display === 'none') { | |
continue; | |
} | |
var displacement = parseInt(el.getAttribute('data-offset-' + edge), 10); | |
if (isNaN(displacement)) { | |
displacement = getRawOffset(el, edge); | |
} | |
edgeOffset = Math.max(edgeOffset, displacement); | |
} | |
return edgeOffset; | |
} | |
function calculateOffsets() { | |
return { | |
top: calculateOffset('top'), | |
right: calculateOffset('right'), | |
bottom: calculateOffset('bottom'), | |
left: calculateOffset('left') | |
}; | |
} | |
function displace(broadcast) { | |
offsets = calculateOffsets(); | |
Drupal.displace.offsets = offsets; | |
if (typeof broadcast === 'undefined' || broadcast) { | |
$(document).trigger('drupalViewportOffsetChange', offsets); | |
} | |
return offsets; | |
} | |
Drupal.behaviors.drupalDisplace = { | |
attach: function attach() { | |
if (this.displaceProcessed) { | |
return; | |
} | |
this.displaceProcessed = true; | |
$(window).on('resize.drupalDisplace', debounce(displace, 200)); | |
} | |
}; | |
Drupal.displace = displace; | |
$.extend(Drupal.displace, { | |
offsets: offsets, | |
calculateOffset: calculateOffset | |
}); | |
}) (jQuery, Drupal, Drupal.debounce); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./form', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.ui.formResetMixin = { | |
_formResetHandler: function () { | |
var b = a(this); | |
setTimeout(function () { | |
var c = b.data('ui-form-reset-instances'); | |
a.each(c, function () { | |
this.refresh() | |
}) | |
}) | |
}, | |
_bindFormResetHandler: function () { | |
if (this.form = this.element.form(), this.form.length) { | |
var a = this.form.data('ui-form-reset-instances') || [ | |
]; | |
a.length || this.form.on('reset.ui-form-reset', this._formResetHandler), | |
a.push(this), | |
this.form.data('ui-form-reset-instances', a) | |
} | |
}, | |
_unbindFormResetHandler: function () { | |
if (this.form.length) { | |
var b = this.form.data('ui-form-reset-instances'); | |
b.splice(a.inArray(this, b), 1), | |
b.length ? this.form.data('ui-form-reset-instances', b) : this.form.removeData('ui-form-reset-instances').off('reset.ui-form-reset') | |
} | |
} | |
} | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'../escape-selector', | |
'../form-reset-mixin', | |
'../labels', | |
'../widget'], a) : a(jQuery) | |
}(function (a) { | |
return a.widget('ui.checkboxradio', [ | |
a.ui.formResetMixin, | |
{ | |
version: '1.12.1', | |
options: { | |
disabled: null, | |
label: null, | |
icon: !0, | |
classes: { | |
'ui-checkboxradio-label': 'ui-corner-all', | |
'ui-checkboxradio-icon': 'ui-corner-all' | |
} | |
}, | |
_getCreateOptions: function () { | |
var b, | |
c, | |
d = this, | |
e = this._super() || { | |
}; | |
return this._readType(), | |
c = this.element.labels(), | |
this.label = a(c[c.length - 1]), | |
this.label.length || a.error('No label found for checkboxradio widget'), | |
this.originalLabel = '', | |
this.label.contents().not(this.element[0]).each(function () { | |
d.originalLabel += 3 === this.nodeType ? a(this).text() : this.outerHTML | |
}), | |
this.originalLabel && (e.label = this.originalLabel), | |
b = this.element[0].disabled, | |
null != b && (e.disabled = b), | |
e | |
}, | |
_create: function () { | |
var a = this.element[0].checked; | |
this._bindFormResetHandler(), | |
null == this.options.disabled && (this.options.disabled = this.element[0].disabled), | |
this._setOption('disabled', this.options.disabled), | |
this._addClass('ui-checkboxradio', 'ui-helper-hidden-accessible'), | |
this._addClass(this.label, 'ui-checkboxradio-label', 'ui-button ui-widget'), | |
'radio' === this.type && this._addClass(this.label, 'ui-checkboxradio-radio-label'), | |
this.options.label && this.options.label !== this.originalLabel ? this._updateLabel() : this.originalLabel && (this.options.label = this.originalLabel), | |
this._enhance(), | |
a && (this._addClass(this.label, 'ui-checkboxradio-checked', 'ui-state-active'), this.icon && this._addClass(this.icon, null, 'ui-state-hover')), | |
this._on({ | |
change: '_toggleClasses', | |
focus: function () { | |
this._addClass(this.label, null, 'ui-state-focus ui-visual-focus') | |
}, | |
blur: function () { | |
this._removeClass(this.label, null, 'ui-state-focus ui-visual-focus') | |
} | |
}) | |
}, | |
_readType: function () { | |
var b = this.element[0].nodeName.toLowerCase(); | |
this.type = this.element[0].type, | |
'input' === b && /radio|checkbox/.test(this.type) || a.error('Can\'t create checkboxradio on element.nodeName=' + b + ' and element.type=' + this.type) | |
}, | |
_enhance: function () { | |
this._updateIcon(this.element[0].checked) | |
}, | |
widget: function () { | |
return this.label | |
}, | |
_getRadioGroup: function () { | |
var b, | |
c = this.element[0].name, | |
d = 'input[name=\'' + a.ui.escapeSelector(c) + '\']'; | |
return c ? (b = this.form.length ? a(this.form[0].elements).filter(d) : a(d).filter(function () { | |
return 0 === a(this).form().length | |
}), b.not(this.element)) : a([]) | |
}, | |
_toggleClasses: function () { | |
var b = this.element[0].checked; | |
this._toggleClass(this.label, 'ui-checkboxradio-checked', 'ui-state-active', b), | |
this.options.icon && 'checkbox' === this.type && this._toggleClass(this.icon, null, 'ui-icon-check ui-state-checked', b)._toggleClass(this.icon, null, 'ui-icon-blank', !b), | |
'radio' === this.type && this._getRadioGroup().each(function () { | |
var b = a(this).checkboxradio('instance'); | |
b && b._removeClass(b.label, 'ui-checkboxradio-checked', 'ui-state-active') | |
}) | |
}, | |
_destroy: function () { | |
this._unbindFormResetHandler(), | |
this.icon && (this.icon.remove(), this.iconSpace.remove()) | |
}, | |
_setOption: function (a, b) { | |
if ('label' !== a || b) return this._super(a, b), | |
'disabled' === a ? (this._toggleClass(this.label, null, 'ui-state-disabled', b), void (this.element[0].disabled = b)) : void this.refresh() | |
}, | |
_updateIcon: function (b) { | |
var c = 'ui-icon ui-icon-background '; | |
this.options.icon ? (this.icon || (this.icon = a('<span>'), this.iconSpace = a('<span> </span>'), this._addClass(this.iconSpace, 'ui-checkboxradio-icon-space')), 'checkbox' === this.type ? (c += b ? 'ui-icon-check ui-state-checked' : 'ui-icon-blank', this._removeClass(this.icon, null, b ? 'ui-icon-blank' : 'ui-icon-check')) : c += 'ui-icon-blank', this._addClass(this.icon, 'ui-checkboxradio-icon', c), b || this._removeClass(this.icon, null, 'ui-icon-check ui-state-checked'), this.icon.prependTo(this.label).after(this.iconSpace)) : void 0 !== this.icon && (this.icon.remove(), this.iconSpace.remove(), delete this.icon) | |
}, | |
_updateLabel: function () { | |
var a = this.label.contents().not(this.element[0]); | |
this.icon && (a = a.not(this.icon[0])), | |
this.iconSpace && (a = a.not(this.iconSpace[0])), | |
a.remove(), | |
this.label.append(this.options.label) | |
}, | |
refresh: function () { | |
var a = this.element[0].checked, | |
b = this.element[0].disabled; | |
this._updateIcon(a), | |
this._toggleClass(this.label, 'ui-checkboxradio-checked', 'ui-state-active', a), | |
null !== this.options.label && this._updateLabel(), | |
b !== this.options.disabled && this._setOptions({ | |
disabled: b | |
}) | |
} | |
} | |
]), | |
a.ui.checkboxradio | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'../widget'], a) : a(jQuery) | |
}(function (a) { | |
var b = /ui-corner-([a-z]){2,6}/g; | |
return a.widget('ui.controlgroup', { | |
version: '1.12.1', | |
defaultElement: '<div>', | |
options: { | |
direction: 'horizontal', | |
disabled: null, | |
onlyVisible: !0, | |
items: { | |
button: 'input[type=button], input[type=submit], input[type=reset], button, a', | |
controlgroupLabel: '.ui-controlgroup-label', | |
checkboxradio: 'input[type=\'checkbox\'], input[type=\'radio\']', | |
selectmenu: 'select', | |
spinner: '.ui-spinner-input' | |
} | |
}, | |
_create: function () { | |
this._enhance() | |
}, | |
_enhance: function () { | |
this.element.attr('role', 'toolbar'), | |
this.refresh() | |
}, | |
_destroy: function () { | |
this._callChildMethod('destroy'), | |
this.childWidgets.removeData('ui-controlgroup-data'), | |
this.element.removeAttr('role'), | |
this.options.items.controlgroupLabel && this.element.find(this.options.items.controlgroupLabel).find('.ui-controlgroup-label-contents').contents().unwrap() | |
}, | |
_initWidgets: function () { | |
var b = this, | |
c = [ | |
]; | |
a.each(this.options.items, function (d, e) { | |
var f, | |
g = { | |
}; | |
if (e) return 'controlgroupLabel' === d ? (f = b.element.find(e), f.each(function () { | |
var b = a(this); | |
b.children('.ui-controlgroup-label-contents').length || b.contents().wrapAll('<span class=\'ui-controlgroup-label-contents\'></span>') | |
}), b._addClass(f, null, 'ui-widget ui-widget-content ui-state-default'), void (c = c.concat(f.get()))) : void (a.fn[d] && (g = b['_' + d + 'Options'] ? b['_' + d + 'Options']('middle') : { | |
classes: { | |
} | |
}, b.element.find(e).each(function () { | |
var e = a(this), | |
f = e[d]('instance'), | |
h = a.widget.extend({ | |
}, g); | |
if ('button' !== d || !e.parent('.ui-spinner').length) { | |
f || (f = e[d]() [d]('instance')), | |
f && (h.classes = b._resolveClassesValues(h.classes, f)), | |
e[d](h); | |
var i = e[d]('widget'); | |
a.data(i[0], 'ui-controlgroup-data', f ? f : e[d]('instance')), | |
c.push(i[0]) | |
} | |
}))) | |
}), | |
this.childWidgets = a(a.unique(c)), | |
this._addClass(this.childWidgets, 'ui-controlgroup-item') | |
}, | |
_callChildMethod: function (b) { | |
this.childWidgets.each(function () { | |
var c = a(this), | |
d = c.data('ui-controlgroup-data'); | |
d && d[b] && d[b]() | |
}) | |
}, | |
_updateCornerClass: function (a, b) { | |
var c = 'ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all', | |
d = this._buildSimpleOptions(b, 'label').classes.label; | |
this._removeClass(a, null, c), | |
this._addClass(a, null, d) | |
}, | |
_buildSimpleOptions: function (a, b) { | |
var c = 'vertical' === this.options.direction, | |
d = { | |
classes: { | |
} | |
}; | |
return d.classes[b] = { | |
middle: '', | |
first: 'ui-corner-' + (c ? 'top' : 'left'), | |
last: 'ui-corner-' + (c ? 'bottom' : 'right'), | |
only: 'ui-corner-all' | |
} | |
[ | |
a | |
], | |
d | |
}, | |
_spinnerOptions: function (a) { | |
var b = this._buildSimpleOptions(a, 'ui-spinner'); | |
return b.classes['ui-spinner-up'] = '', | |
b.classes['ui-spinner-down'] = '', | |
b | |
}, | |
_buttonOptions: function (a) { | |
return this._buildSimpleOptions(a, 'ui-button') | |
}, | |
_checkboxradioOptions: function (a) { | |
return this._buildSimpleOptions(a, 'ui-checkboxradio-label') | |
}, | |
_selectmenuOptions: function (a) { | |
var b = 'vertical' === this.options.direction; | |
return { | |
width: !!b && 'auto', | |
classes: { | |
middle: { | |
'ui-selectmenu-button-open': '', | |
'ui-selectmenu-button-closed': '' | |
}, | |
first: { | |
'ui-selectmenu-button-open': 'ui-corner-' + (b ? 'top' : 'tl'), | |
'ui-selectmenu-button-closed': 'ui-corner-' + (b ? 'top' : 'left') | |
}, | |
last: { | |
'ui-selectmenu-button-open': b ? '' : 'ui-corner-tr', | |
'ui-selectmenu-button-closed': 'ui-corner-' + (b ? 'bottom' : 'right') | |
}, | |
only: { | |
'ui-selectmenu-button-open': 'ui-corner-top', | |
'ui-selectmenu-button-closed': 'ui-corner-all' | |
} | |
} | |
[ | |
a | |
] | |
} | |
}, | |
_resolveClassesValues: function (c, d) { | |
var e = { | |
}; | |
return a.each(c, function (f) { | |
var g = d.options.classes[f] || ''; | |
g = a.trim(g.replace(b, '')), | |
e[f] = (g + ' ' + c[f]).replace(/\s+/g, ' ') | |
}), | |
e | |
}, | |
_setOption: function (a, b) { | |
return 'direction' === a && this._removeClass('ui-controlgroup-' + this.options.direction), | |
this._super(a, b), | |
'disabled' === a ? void this._callChildMethod(b ? 'disable' : 'enable') : void this.refresh() | |
}, | |
refresh: function () { | |
var b, | |
c = this; | |
this._addClass('ui-controlgroup ui-controlgroup-' + this.options.direction), | |
'horizontal' === this.options.direction && this._addClass(null, 'ui-helper-clearfix'), | |
this._initWidgets(), | |
b = this.childWidgets, | |
this.options.onlyVisible && (b = b.filter(':visible')), | |
b.length && (a.each(['first', | |
'last'], function (a, d) { | |
var e = b[d]().data('ui-controlgroup-data'); | |
if (e && c['_' + e.widgetName + 'Options']) { | |
var f = c['_' + e.widgetName + 'Options'](1 === b.length ? 'only' : d); | |
f.classes = c._resolveClassesValues(f.classes, e), | |
e.element[e.widgetName](f) | |
} else c._updateCornerClass(b[d](), d) | |
}), this._callChildMethod('refresh')) | |
} | |
}) | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./controlgroup', | |
'./checkboxradio', | |
'../keycode', | |
'../widget'], a) : a(jQuery) | |
}(function (a) { | |
return a.widget('ui.button', { | |
version: '1.12.1', | |
defaultElement: '<button>', | |
options: { | |
classes: { | |
'ui-button': 'ui-corner-all' | |
}, | |
disabled: null, | |
icon: null, | |
iconPosition: 'beginning', | |
label: null, | |
showLabel: !0 | |
}, | |
_getCreateOptions: function () { | |
var a, | |
b = this._super() || { | |
}; | |
return this.isInput = this.element.is('input'), | |
a = this.element[0].disabled, | |
null != a && (b.disabled = a), | |
this.originalLabel = this.isInput ? this.element.val() : this.element.html(), | |
this.originalLabel && (b.label = this.originalLabel), | |
b | |
}, | |
_create: function () { | |
!this.option.showLabel & !this.options.icon && (this.options.showLabel = !0), | |
null == this.options.disabled && (this.options.disabled = this.element[0].disabled || !1), | |
this.hasTitle = !!this.element.attr('title'), | |
this.options.label && this.options.label !== this.originalLabel && (this.isInput ? this.element.val(this.options.label) : this.element.html(this.options.label)), | |
this._addClass('ui-button', 'ui-widget'), | |
this._setOption('disabled', this.options.disabled), | |
this._enhance(), | |
this.element.is('a') && this._on({ | |
keyup: function (b) { | |
b.keyCode === a.ui.keyCode.SPACE && (b.preventDefault(), this.element[0].click ? this.element[0].click() : this.element.trigger('click')) | |
} | |
}) | |
}, | |
_enhance: function () { | |
this.element.is('button') || this.element.attr('role', 'button'), | |
this.options.icon && (this._updateIcon('icon', this.options.icon), this._updateTooltip()) | |
}, | |
_updateTooltip: function () { | |
this.title = this.element.attr('title'), | |
this.options.showLabel || this.title || this.element.attr('title', this.options.label) | |
}, | |
_updateIcon: function (b, c) { | |
var d = 'iconPosition' !== b, | |
e = d ? this.options.iconPosition : c, | |
f = 'top' === e || 'bottom' === e; | |
this.icon ? d && this._removeClass(this.icon, null, this.options.icon) : (this.icon = a('<span>'), this._addClass(this.icon, 'ui-button-icon', 'ui-icon'), this.options.showLabel || this._addClass('ui-button-icon-only')), | |
d && this._addClass(this.icon, null, c), | |
this._attachIcon(e), | |
f ? (this._addClass(this.icon, null, 'ui-widget-icon-block'), this.iconSpace && this.iconSpace.remove()) : (this.iconSpace || (this.iconSpace = a('<span> </span>'), this._addClass(this.iconSpace, 'ui-button-icon-space')), this._removeClass(this.icon, null, 'ui-wiget-icon-block'), this._attachIconSpace(e)) | |
}, | |
_destroy: function () { | |
this.element.removeAttr('role'), | |
this.icon && this.icon.remove(), | |
this.iconSpace && this.iconSpace.remove(), | |
this.hasTitle || this.element.removeAttr('title') | |
}, | |
_attachIconSpace: function (a) { | |
this.icon[/^(?:end|bottom)/.test(a) ? 'before' : 'after'](this.iconSpace) | |
}, | |
_attachIcon: function (a) { | |
this.element[/^(?:end|bottom)/.test(a) ? 'append' : 'prepend'](this.icon) | |
}, | |
_setOptions: function (a) { | |
var b = void 0 === a.showLabel ? this.options.showLabel : a.showLabel, | |
c = void 0 === a.icon ? this.options.icon : a.icon; | |
b || c || (a.showLabel = !0), | |
this._super(a) | |
}, | |
_setOption: function (a, b) { | |
'icon' === a && (b ? this._updateIcon(a, b) : this.icon && (this.icon.remove(), this.iconSpace && this.iconSpace.remove())), | |
'iconPosition' === a && this._updateIcon(a, b), | |
'showLabel' === a && (this._toggleClass('ui-button-icon-only', null, !b), this._updateTooltip()), | |
'label' === a && (this.isInput ? this.element.val(b) : (this.element.html(b), this.icon && (this._attachIcon(this.options.iconPosition), this._attachIconSpace(this.options.iconPosition)))), | |
this._super(a, b), | |
'disabled' === a && (this._toggleClass(null, 'ui-state-disabled', b), this.element[0].disabled = b, b && this.element.blur()) | |
}, | |
refresh: function () { | |
var a = this.element.is('input, button') ? this.element[0].disabled : this.element.hasClass('ui-button-disabled'); | |
a !== this.options.disabled && this._setOptions({ | |
disabled: a | |
}), | |
this._updateTooltip() | |
} | |
}), | |
a.uiBackCompat !== !1 && (a.widget('ui.button', a.ui.button, { | |
options: { | |
text: !0, | |
icons: { | |
primary: null, | |
secondary: null | |
} | |
}, | |
_create: function () { | |
this.options.showLabel && !this.options.text && (this.options.showLabel = this.options.text), | |
!this.options.showLabel && this.options.text && (this.options.text = this.options.showLabel), | |
this.options.icon || !this.options.icons.primary && !this.options.icons.secondary ? this.options.icon && (this.options.icons.primary = this.options.icon) : this.options.icons.primary ? this.options.icon = this.options.icons.primary : (this.options.icon = this.options.icons.secondary, this.options.iconPosition = 'end'), | |
this._super() | |
}, | |
_setOption: function (a, b) { | |
return 'text' === a ? void this._super('showLabel', b) : ('showLabel' === a && (this.options.text = b), 'icon' === a && (this.options.icons.primary = b), 'icons' === a && (b.primary ? (this._super('icon', b.primary), this._super('iconPosition', 'beginning')) : b.secondary && (this._super('icon', b.secondary), this._super('iconPosition', 'end'))), void this._superApply(arguments)) | |
} | |
}), a.fn.button = function (b) { | |
return function () { | |
return !this.length || this.length && 'INPUT' !== this[0].tagName || this.length && 'INPUT' === this[0].tagName && 'checkbox' !== this.attr('type') && 'radio' !== this.attr('type') ? b.apply(this, arguments) : (a.ui.checkboxradio || a.error('Checkboxradio widget missing'), 0 === arguments.length ? this.checkboxradio({ | |
icon: !1 | |
}) : this.checkboxradio.apply(this, arguments)) | |
} | |
}(a.fn.button), a.fn.buttonset = function () { | |
return a.ui.controlgroup || a.error('Controlgroup widget missing'), | |
'option' === arguments[0] && 'items' === arguments[1] && arguments[2] ? this.controlgroup.apply(this, [ | |
arguments[0], | |
'items.button', | |
arguments[2] | |
]) : 'option' === arguments[0] && 'items' === arguments[1] ? this.controlgroup.apply(this, [ | |
arguments[0], | |
'items.button' | |
]) : ('object' == typeof arguments[0] && arguments[0].items && (arguments[0].items = { | |
button: arguments[0].items | |
}), this.controlgroup.apply(this, arguments)) | |
}), | |
a.ui.button | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return a.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()) | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'../ie', | |
'../version', | |
'../widget'], a) : a(jQuery) | |
}(function (a) { | |
var b = !1; | |
return a(document).on('mouseup', function () { | |
b = !1 | |
}), | |
a.widget('ui.mouse', { | |
version: '1.12.1', | |
options: { | |
cancel: 'input, textarea, button, select, option', | |
distance: 1, | |
delay: 0 | |
}, | |
_mouseInit: function () { | |
var b = this; | |
this.element.on('mousedown.' + this.widgetName, function (a) { | |
return b._mouseDown(a) | |
}).on('click.' + this.widgetName, function (c) { | |
if (!0 === a.data(c.target, b.widgetName + '.preventClickEvent')) return a.removeData(c.target, b.widgetName + '.preventClickEvent'), | |
c.stopImmediatePropagation(), | |
!1 | |
}), | |
this.started = !1 | |
}, | |
_mouseDestroy: function () { | |
this.element.off('.' + this.widgetName), | |
this._mouseMoveDelegate && this.document.off('mousemove.' + this.widgetName, this._mouseMoveDelegate).off('mouseup.' + this.widgetName, this._mouseUpDelegate) | |
}, | |
_mouseDown: function (c) { | |
if (!b) { | |
this._mouseMoved = !1, | |
this._mouseStarted && this._mouseUp(c), | |
this._mouseDownEvent = c; | |
var d = this, | |
e = 1 === c.which, | |
f = !('string' != typeof this.options.cancel || !c.target.nodeName) && a(c.target).closest(this.options.cancel).length; | |
return !(e && !f && this._mouseCapture(c)) || (this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function () { | |
d.mouseDelayMet = !0 | |
}, this.options.delay)), this._mouseDistanceMet(c) && this._mouseDelayMet(c) && (this._mouseStarted = this._mouseStart(c) !== !1, !this._mouseStarted) ? (c.preventDefault(), !0) : (!0 === a.data(c.target, this.widgetName + '.preventClickEvent') && a.removeData(c.target, this.widgetName + '.preventClickEvent'), this._mouseMoveDelegate = function (a) { | |
return d._mouseMove(a) | |
}, this._mouseUpDelegate = function (a) { | |
return d._mouseUp(a) | |
}, this.document.on('mousemove.' + this.widgetName, this._mouseMoveDelegate).on('mouseup.' + this.widgetName, this._mouseUpDelegate), c.preventDefault(), b = !0, !0)) | |
} | |
}, | |
_mouseMove: function (b) { | |
if (this._mouseMoved) { | |
if (a.ui.ie && (!document.documentMode || document.documentMode < 9) && !b.button) return this._mouseUp(b); | |
if (!b.which) if (b.originalEvent.altKey || b.originalEvent.ctrlKey || b.originalEvent.metaKey || b.originalEvent.shiftKey) this.ignoreMissingWhich = !0; | |
else if (!this.ignoreMissingWhich) return this._mouseUp(b) | |
} | |
return (b.which || b.button) && (this._mouseMoved = !0), | |
this._mouseStarted ? (this._mouseDrag(b), b.preventDefault()) : (this._mouseDistanceMet(b) && this._mouseDelayMet(b) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, b) !== !1, this._mouseStarted ? this._mouseDrag(b) : this._mouseUp(b)), !this._mouseStarted) | |
}, | |
_mouseUp: function (c) { | |
this.document.off('mousemove.' + this.widgetName, this._mouseMoveDelegate).off('mouseup.' + this.widgetName, this._mouseUpDelegate), | |
this._mouseStarted && (this._mouseStarted = !1, c.target === this._mouseDownEvent.target && a.data(c.target, this.widgetName + '.preventClickEvent', !0), this._mouseStop(c)), | |
this._mouseDelayTimer && (clearTimeout(this._mouseDelayTimer), delete this._mouseDelayTimer), | |
this.ignoreMissingWhich = !1, | |
b = !1, | |
c.preventDefault() | |
}, | |
_mouseDistanceMet: function (a) { | |
return Math.max(Math.abs(this._mouseDownEvent.pageX - a.pageX), Math.abs(this._mouseDownEvent.pageY - a.pageY)) >= this.options.distance | |
}, | |
_mouseDelayMet: function () { | |
return this.mouseDelayMet | |
}, | |
_mouseStart: function () { | |
}, | |
_mouseDrag: function () { | |
}, | |
_mouseStop: function () { | |
}, | |
_mouseCapture: function () { | |
return !0 | |
} | |
}) | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./mouse', | |
'../data', | |
'../plugin', | |
'../safe-active-element', | |
'../safe-blur', | |
'../scroll-parent', | |
'../version', | |
'../widget'], a) : a(jQuery) | |
}(function (a) { | |
return a.widget('ui.draggable', a.ui.mouse, { | |
version: '1.12.1', | |
widgetEventPrefix: 'drag', | |
options: { | |
addClasses: !0, | |
appendTo: 'parent', | |
axis: !1, | |
connectToSortable: !1, | |
containment: !1, | |
cursor: 'auto', | |
cursorAt: !1, | |
grid: !1, | |
handle: !1, | |
helper: 'original', | |
iframeFix: !1, | |
opacity: !1, | |
refreshPositions: !1, | |
revert: !1, | |
revertDuration: 500, | |
scope: 'default', | |
scroll: !0, | |
scrollSensitivity: 20, | |
scrollSpeed: 20, | |
snap: !1, | |
snapMode: 'both', | |
snapTolerance: 20, | |
stack: !1, | |
zIndex: !1, | |
drag: null, | |
start: null, | |
stop: null | |
}, | |
_create: function () { | |
'original' === this.options.helper && this._setPositionRelative(), | |
this.options.addClasses && this._addClass('ui-draggable'), | |
this._setHandleClassName(), | |
this._mouseInit() | |
}, | |
_setOption: function (a, b) { | |
this._super(a, b), | |
'handle' === a && (this._removeHandleClassName(), this._setHandleClassName()) | |
}, | |
_destroy: function () { | |
return (this.helper || this.element).is('.ui-draggable-dragging') ? void (this.destroyOnClear = !0) : (this._removeHandleClassName(), void this._mouseDestroy()) | |
}, | |
_mouseCapture: function (b) { | |
var c = this.options; | |
return !(this.helper || c.disabled || a(b.target).closest('.ui-resizable-handle').length > 0) && (this.handle = this._getHandle(b), !!this.handle && (this._blurActiveElement(b), this._blockFrames(c.iframeFix === !0 ? 'iframe' : c.iframeFix), !0)) | |
}, | |
_blockFrames: function (b) { | |
this.iframeBlocks = this.document.find(b).map(function () { | |
var b = a(this); | |
return a('<div>').css('position', 'absolute').appendTo(b.parent()).outerWidth(b.outerWidth()).outerHeight(b.outerHeight()).offset(b.offset()) [0] | |
}) | |
}, | |
_unblockFrames: function () { | |
this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks) | |
}, | |
_blurActiveElement: function (b) { | |
var c = a.ui.safeActiveElement(this.document[0]), | |
d = a(b.target); | |
d.closest(c).length || a.ui.safeBlur(c) | |
}, | |
_mouseStart: function (b) { | |
var c = this.options; | |
return this.helper = this._createHelper(b), | |
this._addClass(this.helper, 'ui-draggable-dragging'), | |
this._cacheHelperProportions(), | |
a.ui.ddmanager && (a.ui.ddmanager.current = this), | |
this._cacheMargins(), | |
this.cssPosition = this.helper.css('position'), | |
this.scrollParent = this.helper.scrollParent(!0), | |
this.offsetParent = this.helper.offsetParent(), | |
this.hasFixedAncestor = this.helper.parents().filter(function () { | |
return 'fixed' === a(this).css('position') | |
}).length > 0, | |
this.positionAbs = this.element.offset(), | |
this._refreshOffsets(b), | |
this.originalPosition = this.position = this._generatePosition(b, !1), | |
this.originalPageX = b.pageX, | |
this.originalPageY = b.pageY, | |
c.cursorAt && this._adjustOffsetFromHelper(c.cursorAt), | |
this._setContainment(), | |
this._trigger('start', b) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(), a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b), this._mouseDrag(b, !0), a.ui.ddmanager && a.ui.ddmanager.dragStart(this, b), !0) | |
}, | |
_refreshOffsets: function (a) { | |
this.offset = { | |
top: this.positionAbs.top - this.margins.top, | |
left: this.positionAbs.left - this.margins.left, | |
scroll: !1, | |
parent: this._getParentOffset(), | |
relative: this._getRelativeOffset() | |
}, | |
this.offset.click = { | |
left: a.pageX - this.offset.left, | |
top: a.pageY - this.offset.top | |
} | |
}, | |
_mouseDrag: function (b, c) { | |
if (this.hasFixedAncestor && (this.offset.parent = this._getParentOffset()), this.position = this._generatePosition(b, !0), this.positionAbs = this._convertPositionTo('absolute'), !c) { | |
var d = this._uiHash(); | |
if (this._trigger('drag', b, d) === !1) return this._mouseUp(new a.Event('mouseup', b)), | |
!1; | |
this.position = d.position | |
} | |
return this.helper[0].style.left = this.position.left + 'px', | |
this.helper[0].style.top = this.position.top + 'px', | |
a.ui.ddmanager && a.ui.ddmanager.drag(this, b), | |
!1 | |
}, | |
_mouseStop: function (b) { | |
var c = this, | |
d = !1; | |
return a.ui.ddmanager && !this.options.dropBehaviour && (d = a.ui.ddmanager.drop(this, b)), | |
this.dropped && (d = this.dropped, this.dropped = !1), | |
'invalid' === this.options.revert && !d || 'valid' === this.options.revert && d || this.options.revert === !0 || a.isFunction(this.options.revert) && this.options.revert.call(this.element, d) ? a(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { | |
c._trigger('stop', b) !== !1 && c._clear() | |
}) : this._trigger('stop', b) !== !1 && this._clear(), | |
!1 | |
}, | |
_mouseUp: function (b) { | |
return this._unblockFrames(), | |
a.ui.ddmanager && a.ui.ddmanager.dragStop(this, b), | |
this.handleElement.is(b.target) && this.element.trigger('focus'), | |
a.ui.mouse.prototype._mouseUp.call(this, b) | |
}, | |
cancel: function () { | |
return this.helper.is('.ui-draggable-dragging') ? this._mouseUp(new a.Event('mouseup', { | |
target: this.element[0] | |
})) : this._clear(), | |
this | |
}, | |
_getHandle: function (b) { | |
return !this.options.handle || !!a(b.target).closest(this.element.find(this.options.handle)).length | |
}, | |
_setHandleClassName: function () { | |
this.handleElement = this.options.handle ? this.element.find(this.options.handle) : this.element, | |
this._addClass(this.handleElement, 'ui-draggable-handle') | |
}, | |
_removeHandleClassName: function () { | |
this._removeClass(this.handleElement, 'ui-draggable-handle') | |
}, | |
_createHelper: function (b) { | |
var c = this.options, | |
d = a.isFunction(c.helper), | |
e = d ? a(c.helper.apply(this.element[0], [ | |
b | |
])) : 'clone' === c.helper ? this.element.clone().removeAttr('id') : this.element; | |
return e.parents('body').length || e.appendTo('parent' === c.appendTo ? this.element[0].parentNode : c.appendTo), | |
d && e[0] === this.element[0] && this._setPositionRelative(), | |
e[0] === this.element[0] || /(fixed|absolute)/.test(e.css('position')) || e.css('position', 'absolute'), | |
e | |
}, | |
_setPositionRelative: function () { | |
/^(?:r|a|f)/.test(this.element.css('position')) || (this.element[0].style.position = 'relative') | |
}, | |
_adjustOffsetFromHelper: function (b) { | |
'string' == typeof b && (b = b.split(' ')), | |
a.isArray(b) && (b = { | |
left: + b[0], | |
top: + b[1] || 0 | |
}), | |
'left' in b && (this.offset.click.left = b.left + this.margins.left), | |
'right' in b && (this.offset.click.left = this.helperProportions.width - b.right + this.margins.left), | |
'top' in b && (this.offset.click.top = b.top + this.margins.top), | |
'bottom' in b && (this.offset.click.top = this.helperProportions.height - b.bottom + this.margins.top) | |
}, | |
_isRootNode: function (a) { | |
return /(html|body)/i.test(a.tagName) || a === this.document[0] | |
}, | |
_getParentOffset: function () { | |
var b = this.offsetParent.offset(), | |
c = this.document[0]; | |
return 'absolute' === this.cssPosition && this.scrollParent[0] !== c && a.contains(this.scrollParent[0], this.offsetParent[0]) && (b.left += this.scrollParent.scrollLeft(), b.top += this.scrollParent.scrollTop()), | |
this._isRootNode(this.offsetParent[0]) && (b = { | |
top: 0, | |
left: 0 | |
}), | |
{ | |
top: b.top + (parseInt(this.offsetParent.css('borderTopWidth'), 10) || 0), | |
left: b.left + (parseInt(this.offsetParent.css('borderLeftWidth'), 10) || 0) | |
} | |
}, | |
_getRelativeOffset: function () { | |
if ('relative' !== this.cssPosition) return { | |
top: 0, | |
left: 0 | |
}; | |
var a = this.element.position(), | |
b = this._isRootNode(this.scrollParent[0]); | |
return { | |
top: a.top - (parseInt(this.helper.css('top'), 10) || 0) + (b ? 0 : this.scrollParent.scrollTop()), | |
left: a.left - (parseInt(this.helper.css('left'), 10) || 0) + (b ? 0 : this.scrollParent.scrollLeft()) | |
} | |
}, | |
_cacheMargins: function () { | |
this.margins = { | |
left: parseInt(this.element.css('marginLeft'), 10) || 0, | |
top: parseInt(this.element.css('marginTop'), 10) || 0, | |
right: parseInt(this.element.css('marginRight'), 10) || 0, | |
bottom: parseInt(this.element.css('marginBottom'), 10) || 0 | |
} | |
}, | |
_cacheHelperProportions: function () { | |
this.helperProportions = { | |
width: this.helper.outerWidth(), | |
height: this.helper.outerHeight() | |
} | |
}, | |
_setContainment: function () { | |
var b, | |
c, | |
d, | |
e = this.options, | |
f = this.document[0]; | |
return this.relativeContainer = null, | |
e.containment ? 'window' === e.containment ? void (this.containment = [ | |
a(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, | |
a(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, | |
a(window).scrollLeft() + a(window).width() - this.helperProportions.width - this.margins.left, | |
a(window).scrollTop() + (a(window).height() || f.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top | |
]) : 'document' === e.containment ? void (this.containment = [ | |
0, | |
0, | |
a(f).width() - this.helperProportions.width - this.margins.left, | |
(a(f).height() || f.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top | |
]) : e.containment.constructor === Array ? void (this.containment = e.containment) : ('parent' === e.containment && (e.containment = this.helper[0].parentNode), c = a(e.containment), d = c[0], void (d && (b = /(scroll|auto)/.test(c.css('overflow')), this.containment = [ | |
(parseInt(c.css('borderLeftWidth'), 10) || 0) + (parseInt(c.css('paddingLeft'), 10) || 0), | |
(parseInt(c.css('borderTopWidth'), 10) || 0) + (parseInt(c.css('paddingTop'), 10) || 0), | |
(b ? Math.max(d.scrollWidth, d.offsetWidth) : d.offsetWidth) - (parseInt(c.css('borderRightWidth'), 10) || 0) - (parseInt(c.css('paddingRight'), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, | |
(b ? Math.max(d.scrollHeight, d.offsetHeight) : d.offsetHeight) - (parseInt(c.css('borderBottomWidth'), 10) || 0) - (parseInt(c.css('paddingBottom'), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom | |
], this.relativeContainer = c))) : void (this.containment = null) | |
}, | |
_convertPositionTo: function (a, b) { | |
b || (b = this.position); | |
var c = 'absolute' === a ? 1 : - 1, | |
d = this._isRootNode(this.scrollParent[0]); | |
return { | |
top: b.top + this.offset.relative.top * c + this.offset.parent.top * c - ('fixed' === this.cssPosition ? - this.offset.scroll.top : d ? 0 : this.offset.scroll.top) * c, | |
left: b.left + this.offset.relative.left * c + this.offset.parent.left * c - ('fixed' === this.cssPosition ? - this.offset.scroll.left : d ? 0 : this.offset.scroll.left) * c | |
} | |
}, | |
_generatePosition: function (a, b) { | |
var c, | |
d, | |
e, | |
f, | |
g = this.options, | |
h = this._isRootNode(this.scrollParent[0]), | |
i = a.pageX, | |
j = a.pageY; | |
return h && this.offset.scroll || (this.offset.scroll = { | |
top: this.scrollParent.scrollTop(), | |
left: this.scrollParent.scrollLeft() | |
}), | |
b && (this.containment && (this.relativeContainer ? (d = this.relativeContainer.offset(), c = [ | |
this.containment[0] + d.left, | |
this.containment[1] + d.top, | |
this.containment[2] + d.left, | |
this.containment[3] + d.top | |
]) : c = this.containment, a.pageX - this.offset.click.left < c[0] && (i = c[0] + this.offset.click.left), a.pageY - this.offset.click.top < c[1] && (j = c[1] + this.offset.click.top), a.pageX - this.offset.click.left > c[2] && (i = c[2] + this.offset.click.left), a.pageY - this.offset.click.top > c[3] && (j = c[3] + this.offset.click.top)), g.grid && (e = g.grid[1] ? this.originalPageY + Math.round((j - this.originalPageY) / g.grid[1]) * g.grid[1] : this.originalPageY, j = c ? e - this.offset.click.top >= c[1] || e - this.offset.click.top > c[3] ? e : e - this.offset.click.top >= c[1] ? e - g.grid[1] : e + g.grid[1] : e, f = g.grid[0] ? this.originalPageX + Math.round((i - this.originalPageX) / g.grid[0]) * g.grid[0] : this.originalPageX, i = c ? f - this.offset.click.left >= c[0] || f - this.offset.click.left > c[2] ? f : f - this.offset.click.left >= c[0] ? f - g.grid[0] : f + g.grid[0] : f), 'y' === g.axis && (i = this.originalPageX), 'x' === g.axis && (j = this.originalPageY)), | |
{ | |
top: j - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + ('fixed' === this.cssPosition ? - this.offset.scroll.top : h ? 0 : this.offset.scroll.top), | |
left: i - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + ('fixed' === this.cssPosition ? - this.offset.scroll.left : h ? 0 : this.offset.scroll.left) | |
} | |
}, | |
_clear: function () { | |
this._removeClass(this.helper, 'ui-draggable-dragging'), | |
this.helper[0] === this.element[0] || this.cancelHelperRemoval || this.helper.remove(), | |
this.helper = null, | |
this.cancelHelperRemoval = !1, | |
this.destroyOnClear && this.destroy() | |
}, | |
_trigger: function (b, c, d) { | |
return d = d || this._uiHash(), | |
a.ui.plugin.call(this, b, [ | |
c, | |
d, | |
this | |
], !0), | |
/^(drag|start|stop)/.test(b) && (this.positionAbs = this._convertPositionTo('absolute'), d.offset = this.positionAbs), | |
a.Widget.prototype._trigger.call(this, b, c, d) | |
}, | |
plugins: { | |
}, | |
_uiHash: function () { | |
return { | |
helper: this.helper, | |
position: this.position, | |
originalPosition: this.originalPosition, | |
offset: this.positionAbs | |
} | |
} | |
}), | |
a.ui.plugin.add('draggable', 'connectToSortable', { | |
start: function (b, c, d) { | |
var e = a.extend({ | |
}, c, { | |
item: d.element | |
}); | |
d.sortables = [ | |
], | |
a(d.options.connectToSortable).each(function () { | |
var c = a(this).sortable('instance'); | |
c && !c.options.disabled && (d.sortables.push(c), c.refreshPositions(), c._trigger('activate', b, e)) | |
}) | |
}, | |
stop: function (b, c, d) { | |
var e = a.extend({ | |
}, c, { | |
item: d.element | |
}); | |
d.cancelHelperRemoval = !1, | |
a.each(d.sortables, function () { | |
var a = this; | |
a.isOver ? (a.isOver = 0, d.cancelHelperRemoval = !0, a.cancelHelperRemoval = !1, a._storedCSS = { | |
position: a.placeholder.css('position'), | |
top: a.placeholder.css('top'), | |
left: a.placeholder.css('left') | |
}, a._mouseStop(b), a.options.helper = a.options._helper) : (a.cancelHelperRemoval = !0, a._trigger('deactivate', b, e)) | |
}) | |
}, | |
drag: function (b, c, d) { | |
a.each(d.sortables, function () { | |
var e = !1, | |
f = this; | |
f.positionAbs = d.positionAbs, | |
f.helperProportions = d.helperProportions, | |
f.offset.click = d.offset.click, | |
f._intersectsWith(f.containerCache) && (e = !0, a.each(d.sortables, function () { | |
return this.positionAbs = d.positionAbs, | |
this.helperProportions = d.helperProportions, | |
this.offset.click = d.offset.click, | |
this !== f && this._intersectsWith(this.containerCache) && a.contains(f.element[0], this.element[0]) && (e = !1), | |
e | |
})), | |
e ? (f.isOver || (f.isOver = 1, d._parent = c.helper.parent(), f.currentItem = c.helper.appendTo(f.element).data('ui-sortable-item', !0), f.options._helper = f.options.helper, f.options.helper = function () { | |
return c.helper[0] | |
}, b.target = f.currentItem[0], f._mouseCapture(b, !0), f._mouseStart(b, !0, !0), f.offset.click.top = d.offset.click.top, f.offset.click.left = d.offset.click.left, f.offset.parent.left -= d.offset.parent.left - f.offset.parent.left, f.offset.parent.top -= d.offset.parent.top - f.offset.parent.top, d._trigger('toSortable', b), d.dropped = f.element, a.each(d.sortables, function () { | |
this.refreshPositions() | |
}), d.currentItem = d.element, f.fromOutside = d), f.currentItem && (f._mouseDrag(b), c.position = f.position)) : f.isOver && (f.isOver = 0, f.cancelHelperRemoval = !0, f.options._revert = f.options.revert, f.options.revert = !1, f._trigger('out', b, f._uiHash(f)), f._mouseStop(b, !0), f.options.revert = f.options._revert, f.options.helper = f.options._helper, f.placeholder && f.placeholder.remove(), c.helper.appendTo(d._parent), d._refreshOffsets(b), c.position = d._generatePosition(b, !0), d._trigger('fromSortable', b), d.dropped = !1, a.each(d.sortables, function () { | |
this.refreshPositions() | |
})) | |
}) | |
} | |
}), | |
a.ui.plugin.add('draggable', 'cursor', { | |
start: function (b, c, d) { | |
var e = a('body'), | |
f = d.options; | |
e.css('cursor') && (f._cursor = e.css('cursor')), | |
e.css('cursor', f.cursor) | |
}, | |
stop: function (b, c, d) { | |
var e = d.options; | |
e._cursor && a('body').css('cursor', e._cursor) | |
} | |
}), | |
a.ui.plugin.add('draggable', 'opacity', { | |
start: function (b, c, d) { | |
var e = a(c.helper), | |
f = d.options; | |
e.css('opacity') && (f._opacity = e.css('opacity')), | |
e.css('opacity', f.opacity) | |
}, | |
stop: function (b, c, d) { | |
var e = d.options; | |
e._opacity && a(c.helper).css('opacity', e._opacity) | |
} | |
}), | |
a.ui.plugin.add('draggable', 'scroll', { | |
start: function (a, b, c) { | |
c.scrollParentNotHidden || (c.scrollParentNotHidden = c.helper.scrollParent(!1)), | |
c.scrollParentNotHidden[0] !== c.document[0] && 'HTML' !== c.scrollParentNotHidden[0].tagName && (c.overflowOffset = c.scrollParentNotHidden.offset()) | |
}, | |
drag: function (b, c, d) { | |
var e = d.options, | |
f = !1, | |
g = d.scrollParentNotHidden[0], | |
h = d.document[0]; | |
g !== h && 'HTML' !== g.tagName ? (e.axis && 'x' === e.axis || (d.overflowOffset.top + g.offsetHeight - b.pageY < e.scrollSensitivity ? g.scrollTop = f = g.scrollTop + e.scrollSpeed : b.pageY - d.overflowOffset.top < e.scrollSensitivity && (g.scrollTop = f = g.scrollTop - e.scrollSpeed)), e.axis && 'y' === e.axis || (d.overflowOffset.left + g.offsetWidth - b.pageX < e.scrollSensitivity ? g.scrollLeft = f = g.scrollLeft + e.scrollSpeed : b.pageX - d.overflowOffset.left < e.scrollSensitivity && (g.scrollLeft = f = g.scrollLeft - e.scrollSpeed))) : (e.axis && 'x' === e.axis || (b.pageY - a(h).scrollTop() < e.scrollSensitivity ? f = a(h).scrollTop(a(h).scrollTop() - e.scrollSpeed) : a(window).height() - (b.pageY - a(h).scrollTop()) < e.scrollSensitivity && (f = a(h).scrollTop(a(h).scrollTop() + e.scrollSpeed))), e.axis && 'y' === e.axis || (b.pageX - a(h).scrollLeft() < e.scrollSensitivity ? f = a(h).scrollLeft(a(h).scrollLeft() - e.scrollSpeed) : a(window).width() - (b.pageX - a(h).scrollLeft()) < e.scrollSensitivity && (f = a(h).scrollLeft(a(h).scrollLeft() + e.scrollSpeed)))), | |
f !== !1 && a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(d, b) | |
} | |
}), | |
a.ui.plugin.add('draggable', 'snap', { | |
start: function (b, c, d) { | |
var e = d.options; | |
d.snapElements = [ | |
], | |
a(e.snap.constructor !== String ? e.snap.items || ':data(ui-draggable)' : e.snap).each(function () { | |
var b = a(this), | |
c = b.offset(); | |
this !== d.element[0] && d.snapElements.push({ | |
item: this, | |
width: b.outerWidth(), | |
height: b.outerHeight(), | |
top: c.top, | |
left: c.left | |
}) | |
}) | |
}, | |
drag: function (b, c, d) { | |
var e, | |
f, | |
g, | |
h, | |
i, | |
j, | |
k, | |
l, | |
m, | |
n, | |
o = d.options, | |
p = o.snapTolerance, | |
q = c.offset.left, | |
r = q + d.helperProportions.width, | |
s = c.offset.top, | |
t = s + d.helperProportions.height; | |
for (m = d.snapElements.length - 1; m >= 0; m--) i = d.snapElements[m].left - d.margins.left, | |
j = i + d.snapElements[m].width, | |
k = d.snapElements[m].top - d.margins.top, | |
l = k + d.snapElements[m].height, | |
r < i - p || q > j + p || t < k - p || s > l + p || !a.contains(d.snapElements[m].item.ownerDocument, d.snapElements[m].item) ? (d.snapElements[m].snapping && d.options.snap.release && d.options.snap.release.call(d.element, b, a.extend(d._uiHash(), { | |
snapItem: d.snapElements[m].item | |
})), d.snapElements[m].snapping = !1) : ('inner' !== o.snapMode && (e = Math.abs(k - t) <= p, f = Math.abs(l - s) <= p, g = Math.abs(i - r) <= p, h = Math.abs(j - q) <= p, e && (c.position.top = d._convertPositionTo('relative', { | |
top: k - d.helperProportions.height, | |
left: 0 | |
}).top), f && (c.position.top = d._convertPositionTo('relative', { | |
top: l, | |
left: 0 | |
}).top), g && (c.position.left = d._convertPositionTo('relative', { | |
top: 0, | |
left: i - d.helperProportions.width | |
}).left), h && (c.position.left = d._convertPositionTo('relative', { | |
top: 0, | |
left: j | |
}).left)), n = e || f || g || h, 'outer' !== o.snapMode && (e = Math.abs(k - s) <= p, f = Math.abs(l - t) <= p, g = Math.abs(i - q) <= p, h = Math.abs(j - r) <= p, e && (c.position.top = d._convertPositionTo('relative', { | |
top: k, | |
left: 0 | |
}).top), f && (c.position.top = d._convertPositionTo('relative', { | |
top: l - d.helperProportions.height, | |
left: 0 | |
}).top), g && (c.position.left = d._convertPositionTo('relative', { | |
top: 0, | |
left: i | |
}).left), h && (c.position.left = d._convertPositionTo('relative', { | |
top: 0, | |
left: j - d.helperProportions.width | |
}).left)), !d.snapElements[m].snapping && (e || f || g || h || n) && d.options.snap.snap && d.options.snap.snap.call(d.element, b, a.extend(d._uiHash(), { | |
snapItem: d.snapElements[m].item | |
})), d.snapElements[m].snapping = e || f || g || h || n) | |
} | |
}), | |
a.ui.plugin.add('draggable', 'stack', { | |
start: function (b, c, d) { | |
var e, | |
f = d.options, | |
g = a.makeArray(a(f.stack)).sort(function (b, c) { | |
return (parseInt(a(b).css('zIndex'), 10) || 0) - (parseInt(a(c).css('zIndex'), 10) || 0) | |
}); | |
g.length && (e = parseInt(a(g[0]).css('zIndex'), 10) || 0, a(g).each(function (b) { | |
a(this).css('zIndex', e + b) | |
}), this.css('zIndex', e + g.length)) | |
} | |
}), | |
a.ui.plugin.add('draggable', 'zIndex', { | |
start: function (b, c, d) { | |
var e = a(c.helper), | |
f = d.options; | |
e.css('zIndex') && (f._zIndex = e.css('zIndex')), | |
e.css('zIndex', f.zIndex) | |
}, | |
stop: function (b, c, d) { | |
var e = d.options; | |
e._zIndex && a(c.helper).css('zIndex', e._zIndex) | |
} | |
}), | |
a.ui.draggable | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./version'], a) : a(jQuery) | |
}(function (a) { | |
return function () { | |
function b(a, b, c) { | |
return [parseFloat(a[0]) * (l.test(a[0]) ? b / 100 : 1), | |
parseFloat(a[1]) * (l.test(a[1]) ? c / 100 : 1)] | |
} | |
function c(b, c) { | |
return parseInt(a.css(b, c), 10) || 0 | |
} | |
function d(b) { | |
var c = b[0]; | |
return 9 === c.nodeType ? { | |
width: b.width(), | |
height: b.height(), | |
offset: { | |
top: 0, | |
left: 0 | |
} | |
} | |
: a.isWindow(c) ? { | |
width: b.width(), | |
height: b.height(), | |
offset: { | |
top: b.scrollTop(), | |
left: b.scrollLeft() | |
} | |
} | |
: c.preventDefault ? { | |
width: 0, | |
height: 0, | |
offset: { | |
top: c.pageY, | |
left: c.pageX | |
} | |
} | |
: { | |
width: b.outerWidth(), | |
height: b.outerHeight(), | |
offset: b.offset() | |
} | |
} | |
var e, | |
f = Math.max, | |
g = Math.abs, | |
h = /left|center|right/, | |
i = /top|center|bottom/, | |
j = /[\+\-]\d+(\.[\d]+)?%?/, | |
k = /^\w+/, | |
l = /%$/, | |
m = a.fn.position; | |
a.position = { | |
scrollbarWidth: function () { | |
if (void 0 !== e) return e; | |
var b, | |
c, | |
d = a('<div style=\'display:block;position:absolute;width:50px;height:50px;overflow:hidden;\'><div style=\'height:100px;width:auto;\'></div></div>'), | |
f = d.children() [0]; | |
return a('body').append(d), | |
b = f.offsetWidth, | |
d.css('overflow', 'scroll'), | |
c = f.offsetWidth, | |
b === c && (c = d[0].clientWidth), | |
d.remove(), | |
e = b - c | |
}, | |
getScrollInfo: function (b) { | |
var c = b.isWindow || b.isDocument ? '' : b.element.css('overflow-x'), | |
d = b.isWindow || b.isDocument ? '' : b.element.css('overflow-y'), | |
e = 'scroll' === c || 'auto' === c && b.width < b.element[0].scrollWidth, | |
f = 'scroll' === d || 'auto' === d && b.height < b.element[0].scrollHeight; | |
return { | |
width: f ? a.position.scrollbarWidth() : 0, | |
height: e ? a.position.scrollbarWidth() : 0 | |
} | |
}, | |
getWithinInfo: function (b) { | |
var c = a(b || window), | |
d = a.isWindow(c[0]), | |
e = !!c[0] && 9 === c[0].nodeType, | |
f = !d && !e; | |
return { | |
element: c, | |
isWindow: d, | |
isDocument: e, | |
offset: f ? a(b).offset() : { | |
left: 0, | |
top: 0 | |
}, | |
scrollLeft: c.scrollLeft(), | |
scrollTop: c.scrollTop(), | |
width: c.outerWidth(), | |
height: c.outerHeight() | |
} | |
} | |
}, | |
a.fn.position = function (e) { | |
if (!e || !e.of) return m.apply(this, arguments); | |
e = a.extend({ | |
}, e); | |
var l, | |
n, | |
o, | |
p, | |
q, | |
r, | |
s = a(e.of), | |
t = a.position.getWithinInfo(e.within), | |
u = a.position.getScrollInfo(t), | |
v = (e.collision || 'flip').split(' '), | |
w = { | |
}; | |
return r = d(s), | |
s[0].preventDefault && (e.at = 'left top'), | |
n = r.width, | |
o = r.height, | |
p = r.offset, | |
q = a.extend({ | |
}, p), | |
a.each(['my', | |
'at'], function () { | |
var a, | |
b, | |
c = (e[this] || '').split(' '); | |
1 === c.length && (c = h.test(c[0]) ? c.concat(['center']) : i.test(c[0]) ? [ | |
'center' | |
].concat(c) : [ | |
'center', | |
'center' | |
]), | |
c[0] = h.test(c[0]) ? c[0] : 'center', | |
c[1] = i.test(c[1]) ? c[1] : 'center', | |
a = j.exec(c[0]), | |
b = j.exec(c[1]), | |
w[this] = [ | |
a ? a[0] : 0, | |
b ? b[0] : 0 | |
], | |
e[this] = [ | |
k.exec(c[0]) [0], | |
k.exec(c[1]) [0] | |
] | |
}), | |
1 === v.length && (v[1] = v[0]), | |
'right' === e.at[0] ? q.left += n : 'center' === e.at[0] && (q.left += n / 2), | |
'bottom' === e.at[1] ? q.top += o : 'center' === e.at[1] && (q.top += o / 2), | |
l = b(w.at, n, o), | |
q.left += l[0], | |
q.top += l[1], | |
this.each(function () { | |
var d, | |
h, | |
i = a(this), | |
j = i.outerWidth(), | |
k = i.outerHeight(), | |
m = c(this, 'marginLeft'), | |
r = c(this, 'marginTop'), | |
x = j + m + c(this, 'marginRight') + u.width, | |
y = k + r + c(this, 'marginBottom') + u.height, | |
z = a.extend({ | |
}, q), | |
A = b(w.my, i.outerWidth(), i.outerHeight()); | |
'right' === e.my[0] ? z.left -= j : 'center' === e.my[0] && (z.left -= j / 2), | |
'bottom' === e.my[1] ? z.top -= k : 'center' === e.my[1] && (z.top -= k / 2), | |
z.left += A[0], | |
z.top += A[1], | |
d = { | |
marginLeft: m, | |
marginTop: r | |
}, | |
a.each(['left', | |
'top'], function (b, c) { | |
a.ui.position[v[b]] && a.ui.position[v[b]][c](z, { | |
targetWidth: n, | |
targetHeight: o, | |
elemWidth: j, | |
elemHeight: k, | |
collisionPosition: d, | |
collisionWidth: x, | |
collisionHeight: y, | |
offset: [ | |
l[0] + A[0], | |
l[1] + A[1] | |
], | |
my: e.my, | |
at: e.at, | |
within: t, | |
elem: i | |
}) | |
}), | |
e.using && (h = function (a) { | |
var b = p.left - z.left, | |
c = b + n - j, | |
d = p.top - z.top, | |
h = d + o - k, | |
l = { | |
target: { | |
element: s, | |
left: p.left, | |
top: p.top, | |
width: n, | |
height: o | |
}, | |
element: { | |
element: i, | |
left: z.left, | |
top: z.top, | |
width: j, | |
height: k | |
}, | |
horizontal: c < 0 ? 'left' : b > 0 ? 'right' : 'center', | |
vertical: h < 0 ? 'top' : d > 0 ? 'bottom' : 'middle' | |
}; | |
n < j && g(b + c) < n && (l.horizontal = 'center'), | |
o < k && g(d + h) < o && (l.vertical = 'middle'), | |
f(g(b), g(c)) > f(g(d), g(h)) ? l.important = 'horizontal' : l.important = 'vertical', | |
e.using.call(this, a, l) | |
}), | |
i.offset(a.extend(z, { | |
using: h | |
})) | |
}) | |
}, | |
a.ui.position = { | |
fit: { | |
left: function (a, b) { | |
var c, | |
d = b.within, | |
e = d.isWindow ? d.scrollLeft : d.offset.left, | |
g = d.width, | |
h = a.left - b.collisionPosition.marginLeft, | |
i = e - h, | |
j = h + b.collisionWidth - g - e; | |
b.collisionWidth > g ? i > 0 && j <= 0 ? (c = a.left + i + b.collisionWidth - g - e, a.left += i - c) : j > 0 && i <= 0 ? a.left = e : i > j ? a.left = e + g - b.collisionWidth : a.left = e : i > 0 ? a.left += i : j > 0 ? a.left -= j : a.left = f(a.left - h, a.left) | |
}, | |
top: function (a, b) { | |
var c, | |
d = b.within, | |
e = d.isWindow ? d.scrollTop : d.offset.top, | |
g = b.within.height, | |
h = a.top - b.collisionPosition.marginTop, | |
i = e - h, | |
j = h + b.collisionHeight - g - e; | |
b.collisionHeight > g ? i > 0 && j <= 0 ? (c = a.top + i + b.collisionHeight - g - e, a.top += i - c) : j > 0 && i <= 0 ? a.top = e : i > j ? a.top = e + g - b.collisionHeight : a.top = e : i > 0 ? a.top += i : j > 0 ? a.top -= j : a.top = f(a.top - h, a.top) | |
} | |
}, | |
flip: { | |
left: function (a, b) { | |
var c, | |
d, | |
e = b.within, | |
f = e.offset.left + e.scrollLeft, | |
h = e.width, | |
i = e.isWindow ? e.scrollLeft : e.offset.left, | |
j = a.left - b.collisionPosition.marginLeft, | |
k = j - i, | |
l = j + b.collisionWidth - h - i, | |
m = 'left' === b.my[0] ? - b.elemWidth : 'right' === b.my[0] ? b.elemWidth : 0, | |
n = 'left' === b.at[0] ? b.targetWidth : 'right' === b.at[0] ? - b.targetWidth : 0, | |
o = - 2 * b.offset[0]; | |
k < 0 ? (c = a.left + m + n + o + b.collisionWidth - h - f, (c < 0 || c < g(k)) && (a.left += m + n + o)) : l > 0 && (d = a.left - b.collisionPosition.marginLeft + m + n + o - i, (d > 0 || g(d) < l) && (a.left += m + n + o)) | |
}, | |
top: function (a, b) { | |
var c, | |
d, | |
e = b.within, | |
f = e.offset.top + e.scrollTop, | |
h = e.height, | |
i = e.isWindow ? e.scrollTop : e.offset.top, | |
j = a.top - b.collisionPosition.marginTop, | |
k = j - i, | |
l = j + b.collisionHeight - h - i, | |
m = 'top' === b.my[1], | |
n = m ? - b.elemHeight : 'bottom' === b.my[1] ? b.elemHeight : 0, | |
o = 'top' === b.at[1] ? b.targetHeight : 'bottom' === b.at[1] ? - b.targetHeight : 0, | |
p = - 2 * b.offset[1]; | |
k < 0 ? (d = a.top + n + o + p + b.collisionHeight - h - f, (d < 0 || d < g(k)) && (a.top += n + o + p)) : l > 0 && (c = a.top - b.collisionPosition.marginTop + n + o + p - i, (c > 0 || g(c) < l) && (a.top += n + o + p)) | |
} | |
}, | |
flipfit: { | |
left: function () { | |
a.ui.position.flip.left.apply(this, arguments), | |
a.ui.position.fit.left.apply(this, arguments) | |
}, | |
top: function () { | |
a.ui.position.flip.top.apply(this, arguments), | |
a.ui.position.fit.top.apply(this, arguments) | |
} | |
} | |
} | |
}(), | |
a.ui.position | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./mouse', | |
'../disable-selection', | |
'../plugin', | |
'../version', | |
'../widget'], a) : a(jQuery) | |
}(function (a) { | |
return a.widget('ui.resizable', a.ui.mouse, { | |
version: '1.12.1', | |
widgetEventPrefix: 'resize', | |
options: { | |
alsoResize: !1, | |
animate: !1, | |
animateDuration: 'slow', | |
animateEasing: 'swing', | |
aspectRatio: !1, | |
autoHide: !1, | |
classes: { | |
'ui-resizable-se': 'ui-icon ui-icon-gripsmall-diagonal-se' | |
}, | |
containment: !1, | |
ghost: !1, | |
grid: !1, | |
handles: 'e,s,se', | |
helper: !1, | |
maxHeight: null, | |
maxWidth: null, | |
minHeight: 10, | |
minWidth: 10, | |
zIndex: 90, | |
resize: null, | |
start: null, | |
stop: null | |
}, | |
_num: function (a) { | |
return parseFloat(a) || 0 | |
}, | |
_isNumber: function (a) { | |
return !isNaN(parseFloat(a)) | |
}, | |
_hasScroll: function (b, c) { | |
if ('hidden' === a(b).css('overflow')) return !1; | |
var d = c && 'left' === c ? 'scrollLeft' : 'scrollTop', | |
e = !1; | |
return b[d] > 0 || (b[d] = 1, e = b[d] > 0, b[d] = 0, e) | |
}, | |
_create: function () { | |
var b, | |
c = this.options, | |
d = this; | |
this._addClass('ui-resizable'), | |
a.extend(this, { | |
_aspectRatio: !!c.aspectRatio, | |
aspectRatio: c.aspectRatio, | |
originalElement: this.element, | |
_proportionallyResizeElements: [ | |
], | |
_helper: c.helper || c.ghost || c.animate ? c.helper || 'ui-resizable-helper' : null | |
}), | |
this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i) && (this.element.wrap(a('<div class=\'ui-wrapper\' style=\'overflow: hidden;\'></div>').css({ | |
position: this.element.css('position'), | |
width: this.element.outerWidth(), | |
height: this.element.outerHeight(), | |
top: this.element.css('top'), | |
left: this.element.css('left') | |
})), this.element = this.element.parent().data('ui-resizable', this.element.resizable('instance')), this.elementIsWrapper = !0, b = { | |
marginTop: this.originalElement.css('marginTop'), | |
marginRight: this.originalElement.css('marginRight'), | |
marginBottom: this.originalElement.css('marginBottom'), | |
marginLeft: this.originalElement.css('marginLeft') | |
}, this.element.css(b), this.originalElement.css('margin', 0), this.originalResizeStyle = this.originalElement.css('resize'), this.originalElement.css('resize', 'none'), this._proportionallyResizeElements.push(this.originalElement.css({ | |
position: 'static', | |
zoom: 1, | |
display: 'block' | |
})), this.originalElement.css(b), this._proportionallyResize()), | |
this._setupHandles(), | |
c.autoHide && a(this.element).on('mouseenter', function () { | |
c.disabled || (d._removeClass('ui-resizable-autohide'), d._handles.show()) | |
}).on('mouseleave', function () { | |
c.disabled || d.resizing || (d._addClass('ui-resizable-autohide'), d._handles.hide()) | |
}), | |
this._mouseInit() | |
}, | |
_destroy: function () { | |
this._mouseDestroy(); | |
var b, | |
c = function (b) { | |
a(b).removeData('resizable').removeData('ui-resizable').off('.resizable').find('.ui-resizable-handle').remove() | |
}; | |
return this.elementIsWrapper && (c(this.element), b = this.element, this.originalElement.css({ | |
position: b.css('position'), | |
width: b.outerWidth(), | |
height: b.outerHeight(), | |
top: b.css('top'), | |
left: b.css('left') | |
}).insertAfter(b), b.remove()), | |
this.originalElement.css('resize', this.originalResizeStyle), | |
c(this.originalElement), | |
this | |
}, | |
_setOption: function (a, b) { | |
switch (this._super(a, b), a) { | |
case 'handles': | |
this._removeHandles(), | |
this._setupHandles() | |
} | |
}, | |
_setupHandles: function () { | |
var b, | |
c, | |
d, | |
e, | |
f, | |
g = this.options, | |
h = this; | |
if (this.handles = g.handles || (a('.ui-resizable-handle', this.element).length ? { | |
n: '.ui-resizable-n', | |
e: '.ui-resizable-e', | |
s: '.ui-resizable-s', | |
w: '.ui-resizable-w', | |
se: '.ui-resizable-se', | |
sw: '.ui-resizable-sw', | |
ne: '.ui-resizable-ne', | |
nw: '.ui-resizable-nw' | |
} | |
: 'e,s,se'), this._handles = a(), this.handles.constructor === String) for ('all' === this.handles && (this.handles = 'n,e,s,w,se,sw,ne,nw'), d = this.handles.split(','), this.handles = { | |
}, c = 0; c < d.length; c++) b = a.trim(d[c]), | |
e = 'ui-resizable-' + b, | |
f = a('<div>'), | |
this._addClass(f, 'ui-resizable-handle ' + e), | |
f.css({ | |
zIndex: g.zIndex | |
}), | |
this.handles[b] = '.ui-resizable-' + b, | |
this.element.append(f); | |
this._renderAxis = function (b) { | |
var c, | |
d, | |
e, | |
f; | |
b = b || this.element; | |
for (c in this.handles) this.handles[c].constructor === String ? this.handles[c] = this.element.children(this.handles[c]).first().show() : (this.handles[c].jquery || this.handles[c].nodeType) && (this.handles[c] = a(this.handles[c]), this._on(this.handles[c], { | |
mousedown: h._mouseDown | |
})), | |
this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i) && (d = a(this.handles[c], this.element), f = /sw|ne|nw|se|n|s/.test(c) ? d.outerHeight() : d.outerWidth(), e = [ | |
'padding', | |
/ne|nw|n/.test(c) ? 'Top' : /se|sw|s/.test(c) ? 'Bottom' : /^e$/.test(c) ? 'Right' : 'Left' | |
].join(''), b.css(e, f), this._proportionallyResize()), | |
this._handles = this._handles.add(this.handles[c]) | |
}, | |
this._renderAxis(this.element), | |
this._handles = this._handles.add(this.element.find('.ui-resizable-handle')), | |
this._handles.disableSelection(), | |
this._handles.on('mouseover', function () { | |
h.resizing || (this.className && (f = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)), h.axis = f && f[1] ? f[1] : 'se') | |
}), | |
g.autoHide && (this._handles.hide(), this._addClass('ui-resizable-autohide')) | |
}, | |
_removeHandles: function () { | |
this._handles.remove() | |
}, | |
_mouseCapture: function (b) { | |
var c, | |
d, | |
e = !1; | |
for (c in this.handles) d = a(this.handles[c]) [0], | |
(d === b.target || a.contains(d, b.target)) && (e = !0); | |
return !this.options.disabled && e | |
}, | |
_mouseStart: function (b) { | |
var c, | |
d, | |
e, | |
f = this.options, | |
g = this.element; | |
return this.resizing = !0, | |
this._renderProxy(), | |
c = this._num(this.helper.css('left')), | |
d = this._num(this.helper.css('top')), | |
f.containment && (c += a(f.containment).scrollLeft() || 0, d += a(f.containment).scrollTop() || 0), | |
this.offset = this.helper.offset(), | |
this.position = { | |
left: c, | |
top: d | |
}, | |
this.size = this._helper ? { | |
width: this.helper.width(), | |
height: this.helper.height() | |
} | |
: { | |
width: g.width(), | |
height: g.height() | |
}, | |
this.originalSize = this._helper ? { | |
width: g.outerWidth(), | |
height: g.outerHeight() | |
} | |
: { | |
width: g.width(), | |
height: g.height() | |
}, | |
this.sizeDiff = { | |
width: g.outerWidth() - g.width(), | |
height: g.outerHeight() - g.height() | |
}, | |
this.originalPosition = { | |
left: c, | |
top: d | |
}, | |
this.originalMousePosition = { | |
left: b.pageX, | |
top: b.pageY | |
}, | |
this.aspectRatio = 'number' == typeof f.aspectRatio ? f.aspectRatio : this.originalSize.width / this.originalSize.height || 1, | |
e = a('.ui-resizable-' + this.axis).css('cursor'), | |
a('body').css('cursor', 'auto' === e ? this.axis + '-resize' : e), | |
this._addClass('ui-resizable-resizing'), | |
this._propagate('start', b), | |
!0 | |
}, | |
_mouseDrag: function (b) { | |
var c, | |
d, | |
e = this.originalMousePosition, | |
f = this.axis, | |
g = b.pageX - e.left || 0, | |
h = b.pageY - e.top || 0, | |
i = this._change[f]; | |
return this._updatePrevProperties(), | |
!!i && (c = i.apply(this, [ | |
b, | |
g, | |
h | |
]), this._updateVirtualBoundaries(b.shiftKey), (this._aspectRatio || b.shiftKey) && (c = this._updateRatio(c, b)), c = this._respectSize(c, b), this._updateCache(c), this._propagate('resize', b), d = this._applyChanges(), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), a.isEmptyObject(d) || (this._updatePrevProperties(), this._trigger('resize', b, this.ui()), this._applyChanges()), !1) | |
}, | |
_mouseStop: function (b) { | |
this.resizing = !1; | |
var c, | |
d, | |
e, | |
f, | |
g, | |
h, | |
i, | |
j = this.options, | |
k = this; | |
return this._helper && (c = this._proportionallyResizeElements, d = c.length && /textarea/i.test(c[0].nodeName), e = d && this._hasScroll(c[0], 'left') ? 0 : k.sizeDiff.height, f = d ? 0 : k.sizeDiff.width, g = { | |
width: k.helper.width() - f, | |
height: k.helper.height() - e | |
}, h = parseFloat(k.element.css('left')) + (k.position.left - k.originalPosition.left) || null, i = parseFloat(k.element.css('top')) + (k.position.top - k.originalPosition.top) || null, j.animate || this.element.css(a.extend(g, { | |
top: i, | |
left: h | |
})), k.helper.height(k.size.height), k.helper.width(k.size.width), this._helper && !j.animate && this._proportionallyResize()), | |
a('body').css('cursor', 'auto'), | |
this._removeClass('ui-resizable-resizing'), | |
this._propagate('stop', b), | |
this._helper && this.helper.remove(), | |
!1 | |
}, | |
_updatePrevProperties: function () { | |
this.prevPosition = { | |
top: this.position.top, | |
left: this.position.left | |
}, | |
this.prevSize = { | |
width: this.size.width, | |
height: this.size.height | |
} | |
}, | |
_applyChanges: function () { | |
var a = { | |
}; | |
return this.position.top !== this.prevPosition.top && (a.top = this.position.top + 'px'), | |
this.position.left !== this.prevPosition.left && (a.left = this.position.left + 'px'), | |
this.size.width !== this.prevSize.width && (a.width = this.size.width + 'px'), | |
this.size.height !== this.prevSize.height && (a.height = this.size.height + 'px'), | |
this.helper.css(a), | |
a | |
}, | |
_updateVirtualBoundaries: function (a) { | |
var b, | |
c, | |
d, | |
e, | |
f, | |
g = this.options; | |
f = { | |
minWidth: this._isNumber(g.minWidth) ? g.minWidth : 0, | |
maxWidth: this._isNumber(g.maxWidth) ? g.maxWidth : 1 / 0, | |
minHeight: this._isNumber(g.minHeight) ? g.minHeight : 0, | |
maxHeight: this._isNumber(g.maxHeight) ? g.maxHeight : 1 / 0 | |
}, | |
(this._aspectRatio || a) && (b = f.minHeight * this.aspectRatio, d = f.minWidth / this.aspectRatio, c = f.maxHeight * this.aspectRatio, e = f.maxWidth / this.aspectRatio, b > f.minWidth && (f.minWidth = b), d > f.minHeight && (f.minHeight = d), c < f.maxWidth && (f.maxWidth = c), e < f.maxHeight && (f.maxHeight = e)), | |
this._vBoundaries = f | |
}, | |
_updateCache: function (a) { | |
this.offset = this.helper.offset(), | |
this._isNumber(a.left) && (this.position.left = a.left), | |
this._isNumber(a.top) && (this.position.top = a.top), | |
this._isNumber(a.height) && (this.size.height = a.height), | |
this._isNumber(a.width) && (this.size.width = a.width) | |
}, | |
_updateRatio: function (a) { | |
var b = this.position, | |
c = this.size, | |
d = this.axis; | |
return this._isNumber(a.height) ? a.width = a.height * this.aspectRatio : this._isNumber(a.width) && (a.height = a.width / this.aspectRatio), | |
'sw' === d && (a.left = b.left + (c.width - a.width), a.top = null), | |
'nw' === d && (a.top = b.top + (c.height - a.height), a.left = b.left + (c.width - a.width)), | |
a | |
}, | |
_respectSize: function (a) { | |
var b = this._vBoundaries, | |
c = this.axis, | |
d = this._isNumber(a.width) && b.maxWidth && b.maxWidth < a.width, | |
e = this._isNumber(a.height) && b.maxHeight && b.maxHeight < a.height, | |
f = this._isNumber(a.width) && b.minWidth && b.minWidth > a.width, | |
g = this._isNumber(a.height) && b.minHeight && b.minHeight > a.height, | |
h = this.originalPosition.left + this.originalSize.width, | |
i = this.originalPosition.top + this.originalSize.height, | |
j = /sw|nw|w/.test(c), | |
k = /nw|ne|n/.test(c); | |
return f && (a.width = b.minWidth), | |
g && (a.height = b.minHeight), | |
d && (a.width = b.maxWidth), | |
e && (a.height = b.maxHeight), | |
f && j && (a.left = h - b.minWidth), | |
d && j && (a.left = h - b.maxWidth), | |
g && k && (a.top = i - b.minHeight), | |
e && k && (a.top = i - b.maxHeight), | |
a.width || a.height || a.left || !a.top ? a.width || a.height || a.top || !a.left || (a.left = null) : a.top = null, | |
a | |
}, | |
_getPaddingPlusBorderDimensions: function (a) { | |
for (var b = 0, c = [ | |
], d = [ | |
a.css('borderTopWidth'), | |
a.css('borderRightWidth'), | |
a.css('borderBottomWidth'), | |
a.css('borderLeftWidth') | |
], e = [ | |
a.css('paddingTop'), | |
a.css('paddingRight'), | |
a.css('paddingBottom'), | |
a.css('paddingLeft') | |
]; b < 4; b++) c[b] = parseFloat(d[b]) || 0, | |
c[b] += parseFloat(e[b]) || 0; | |
return { | |
height: c[0] + c[2], | |
width: c[1] + c[3] | |
} | |
}, | |
_proportionallyResize: function () { | |
if (this._proportionallyResizeElements.length) for (var a, b = 0, c = this.helper || this.element; b < this._proportionallyResizeElements.length; b++) a = this._proportionallyResizeElements[b], | |
this.outerDimensions || (this.outerDimensions = this._getPaddingPlusBorderDimensions(a)), | |
a.css({ | |
height: c.height() - this.outerDimensions.height || 0, | |
width: c.width() - this.outerDimensions.width || 0 | |
}) | |
}, | |
_renderProxy: function () { | |
var b = this.element, | |
c = this.options; | |
this.elementOffset = b.offset(), | |
this._helper ? (this.helper = this.helper || a('<div style=\'overflow:hidden;\'></div>'), this._addClass(this.helper, this._helper), this.helper.css({ | |
width: this.element.outerWidth(), | |
height: this.element.outerHeight(), | |
position: 'absolute', | |
left: this.elementOffset.left + 'px', | |
top: this.elementOffset.top + 'px', | |
zIndex: ++c.zIndex | |
}), this.helper.appendTo('body').disableSelection()) : this.helper = this.element | |
}, | |
_change: { | |
e: function (a, b) { | |
return { | |
width: this.originalSize.width + b | |
} | |
}, | |
w: function (a, b) { | |
var c = this.originalSize, | |
d = this.originalPosition; | |
return { | |
left: d.left + b, | |
width: c.width - b | |
} | |
}, | |
n: function (a, b, c) { | |
var d = this.originalSize, | |
e = this.originalPosition; | |
return { | |
top: e.top + c, | |
height: d.height - c | |
} | |
}, | |
s: function (a, b, c) { | |
return { | |
height: this.originalSize.height + c | |
} | |
}, | |
se: function (b, c, d) { | |
return a.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [ | |
b, | |
c, | |
d | |
])) | |
}, | |
sw: function (b, c, d) { | |
return a.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [ | |
b, | |
c, | |
d | |
])) | |
}, | |
ne: function (b, c, d) { | |
return a.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [ | |
b, | |
c, | |
d | |
])) | |
}, | |
nw: function (b, c, d) { | |
return a.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [ | |
b, | |
c, | |
d | |
])) | |
} | |
}, | |
_propagate: function (b, c) { | |
a.ui.plugin.call(this, b, [ | |
c, | |
this.ui() | |
]), | |
'resize' !== b && this._trigger(b, c, this.ui()) | |
}, | |
plugins: { | |
}, | |
ui: function () { | |
return { | |
originalElement: this.originalElement, | |
element: this.element, | |
helper: this.helper, | |
position: this.position, | |
size: this.size, | |
originalSize: this.originalSize, | |
originalPosition: this.originalPosition | |
} | |
} | |
}), | |
a.ui.plugin.add('resizable', 'animate', { | |
stop: function (b) { | |
var c = a(this).resizable('instance'), | |
d = c.options, | |
e = c._proportionallyResizeElements, | |
f = e.length && /textarea/i.test(e[0].nodeName), | |
g = f && c._hasScroll(e[0], 'left') ? 0 : c.sizeDiff.height, | |
h = f ? 0 : c.sizeDiff.width, | |
i = { | |
width: c.size.width - h, | |
height: c.size.height - g | |
}, | |
j = parseFloat(c.element.css('left')) + (c.position.left - c.originalPosition.left) || null, | |
k = parseFloat(c.element.css('top')) + (c.position.top - c.originalPosition.top) || null; | |
c.element.animate(a.extend(i, k && j ? { | |
top: k, | |
left: j | |
} | |
: { | |
}), { | |
duration: d.animateDuration, | |
easing: d.animateEasing, | |
step: function () { | |
var d = { | |
width: parseFloat(c.element.css('width')), | |
height: parseFloat(c.element.css('height')), | |
top: parseFloat(c.element.css('top')), | |
left: parseFloat(c.element.css('left')) | |
}; | |
e && e.length && a(e[0]).css({ | |
width: d.width, | |
height: d.height | |
}), | |
c._updateCache(d), | |
c._propagate('resize', b) | |
} | |
}) | |
} | |
}), | |
a.ui.plugin.add('resizable', 'containment', { | |
start: function () { | |
var b, | |
c, | |
d, | |
e, | |
f, | |
g, | |
h, | |
i = a(this).resizable('instance'), | |
j = i.options, | |
k = i.element, | |
l = j.containment, | |
m = l instanceof a ? l.get(0) : /parent/.test(l) ? k.parent().get(0) : l; | |
m && (i.containerElement = a(m), /document/.test(l) || l === document ? (i.containerOffset = { | |
left: 0, | |
top: 0 | |
}, i.containerPosition = { | |
left: 0, | |
top: 0 | |
}, i.parentData = { | |
element: a(document), | |
left: 0, | |
top: 0, | |
width: a(document).width(), | |
height: a(document).height() || document.body.parentNode.scrollHeight | |
}) : (b = a(m), c = [ | |
], a(['Top', | |
'Right', | |
'Left', | |
'Bottom']).each(function (a, d) { | |
c[a] = i._num(b.css('padding' + d)) | |
}), i.containerOffset = b.offset(), i.containerPosition = b.position(), i.containerSize = { | |
height: b.innerHeight() - c[3], | |
width: b.innerWidth() - c[1] | |
}, d = i.containerOffset, e = i.containerSize.height, f = i.containerSize.width, g = i._hasScroll(m, 'left') ? m.scrollWidth : f, h = i._hasScroll(m) ? m.scrollHeight : e, i.parentData = { | |
element: m, | |
left: d.left, | |
top: d.top, | |
width: g, | |
height: h | |
})) | |
}, | |
resize: function (b) { | |
var c, | |
d, | |
e, | |
f, | |
g = a(this).resizable('instance'), | |
h = g.options, | |
i = g.containerOffset, | |
j = g.position, | |
k = g._aspectRatio || b.shiftKey, | |
l = { | |
top: 0, | |
left: 0 | |
}, | |
m = g.containerElement, | |
n = !0; | |
m[0] !== document && /static/.test(m.css('position')) && (l = i), | |
j.left < (g._helper ? i.left : 0) && (g.size.width = g.size.width + (g._helper ? g.position.left - i.left : g.position.left - l.left), k && (g.size.height = g.size.width / g.aspectRatio, n = !1), g.position.left = h.helper ? i.left : 0), | |
j.top < (g._helper ? i.top : 0) && (g.size.height = g.size.height + (g._helper ? g.position.top - i.top : g.position.top), k && (g.size.width = g.size.height * g.aspectRatio, n = !1), g.position.top = g._helper ? i.top : 0), | |
e = g.containerElement.get(0) === g.element.parent().get(0), | |
f = /relative|absolute/.test(g.containerElement.css('position')), | |
e && f ? (g.offset.left = g.parentData.left + g.position.left, g.offset.top = g.parentData.top + g.position.top) : (g.offset.left = g.element.offset().left, g.offset.top = g.element.offset().top), | |
c = Math.abs(g.sizeDiff.width + (g._helper ? g.offset.left - l.left : g.offset.left - i.left)), | |
d = Math.abs(g.sizeDiff.height + (g._helper ? g.offset.top - l.top : g.offset.top - i.top)), | |
c + g.size.width >= g.parentData.width && (g.size.width = g.parentData.width - c, k && (g.size.height = g.size.width / g.aspectRatio, n = !1)), | |
d + g.size.height >= g.parentData.height && (g.size.height = g.parentData.height - d, k && (g.size.width = g.size.height * g.aspectRatio, n = !1)), | |
n || (g.position.left = g.prevPosition.left, g.position.top = g.prevPosition.top, g.size.width = g.prevSize.width, g.size.height = g.prevSize.height) | |
}, | |
stop: function () { | |
var b = a(this).resizable('instance'), | |
c = b.options, | |
d = b.containerOffset, | |
e = b.containerPosition, | |
f = b.containerElement, | |
g = a(b.helper), | |
h = g.offset(), | |
i = g.outerWidth() - b.sizeDiff.width, | |
j = g.outerHeight() - b.sizeDiff.height; | |
b._helper && !c.animate && /relative/.test(f.css('position')) && a(this).css({ | |
left: h.left - e.left - d.left, | |
width: i, | |
height: j | |
}), | |
b._helper && !c.animate && /static/.test(f.css('position')) && a(this).css({ | |
left: h.left - e.left - d.left, | |
width: i, | |
height: j | |
}) | |
} | |
}), | |
a.ui.plugin.add('resizable', 'alsoResize', { | |
start: function () { | |
var b = a(this).resizable('instance'), | |
c = b.options; | |
a(c.alsoResize).each(function () { | |
var b = a(this); | |
b.data('ui-resizable-alsoresize', { | |
width: parseFloat(b.width()), | |
height: parseFloat(b.height()), | |
left: parseFloat(b.css('left')), | |
top: parseFloat(b.css('top')) | |
}) | |
}) | |
}, | |
resize: function (b, c) { | |
var d = a(this).resizable('instance'), | |
e = d.options, | |
f = d.originalSize, | |
g = d.originalPosition, | |
h = { | |
height: d.size.height - f.height || 0, | |
width: d.size.width - f.width || 0, | |
top: d.position.top - g.top || 0, | |
left: d.position.left - g.left || 0 | |
}; | |
a(e.alsoResize).each(function () { | |
var b = a(this), | |
d = a(this).data('ui-resizable-alsoresize'), | |
e = { | |
}, | |
f = b.parents(c.originalElement[0]).length ? [ | |
'width', | |
'height' | |
] : [ | |
'width', | |
'height', | |
'top', | |
'left' | |
]; | |
a.each(f, function (a, b) { | |
var c = (d[b] || 0) + (h[b] || 0); | |
c && c >= 0 && (e[b] = c || null) | |
}), | |
b.css(e) | |
}) | |
}, | |
stop: function () { | |
a(this).removeData('ui-resizable-alsoresize') | |
} | |
}), | |
a.ui.plugin.add('resizable', 'ghost', { | |
start: function () { | |
var b = a(this).resizable('instance'), | |
c = b.size; | |
b.ghost = b.originalElement.clone(), | |
b.ghost.css({ | |
opacity: 0.25, | |
display: 'block', | |
position: 'relative', | |
height: c.height, | |
width: c.width, | |
margin: 0, | |
left: 0, | |
top: 0 | |
}), | |
b._addClass(b.ghost, 'ui-resizable-ghost'), | |
a.uiBackCompat !== !1 && 'string' == typeof b.options.ghost && b.ghost.addClass(this.options.ghost), | |
b.ghost.appendTo(b.helper) | |
}, | |
resize: function () { | |
var b = a(this).resizable('instance'); | |
b.ghost && b.ghost.css({ | |
position: 'relative', | |
height: b.size.height, | |
width: b.size.width | |
}) | |
}, | |
stop: function () { | |
var b = a(this).resizable('instance'); | |
b.ghost && b.helper && b.helper.get(0).removeChild(b.ghost.get(0)) | |
} | |
}), | |
a.ui.plugin.add('resizable', 'grid', { | |
resize: function () { | |
var b, | |
c = a(this).resizable('instance'), | |
d = c.options, | |
e = c.size, | |
f = c.originalSize, | |
g = c.originalPosition, | |
h = c.axis, | |
i = 'number' == typeof d.grid ? [ | |
d.grid, | |
d.grid | |
] : d.grid, | |
j = i[0] || 1, | |
k = i[1] || 1, | |
l = Math.round((e.width - f.width) / j) * j, | |
m = Math.round((e.height - f.height) / k) * k, | |
n = f.width + l, | |
o = f.height + m, | |
p = d.maxWidth && d.maxWidth < n, | |
q = d.maxHeight && d.maxHeight < o, | |
r = d.minWidth && d.minWidth > n, | |
s = d.minHeight && d.minHeight > o; | |
d.grid = i, | |
r && (n += j), | |
s && (o += k), | |
p && (n -= j), | |
q && (o -= k), | |
/^(se|s|e)$/.test(h) ? (c.size.width = n, c.size.height = o) : /^(ne)$/.test(h) ? (c.size.width = n, c.size.height = o, c.position.top = g.top - m) : /^(sw)$/.test(h) ? (c.size.width = n, c.size.height = o, c.position.left = g.left - l) : ((o - k <= 0 || n - j <= 0) && (b = c._getPaddingPlusBorderDimensions(this)), o - k > 0 ? (c.size.height = o, c.position.top = g.top - m) : (o = k - b.height, c.size.height = o, c.position.top = g.top + f.height - o), n - j > 0 ? (c.size.width = n, c.position.left = g.left - l) : (n = j - b.width, c.size.width = n, c.position.left = g.left + f.width - n)) | |
} | |
}), | |
a.ui.resizable | |
}); | |
; | |
/*! jQuery UI - v1.12.1 - 2017-03-31 | |
* http://jqueryui.com | |
* Copyright jQuery Foundation and other contributors; Licensed */ | |
!function (a) { | |
'function' == typeof define && define.amd ? define(['jquery', | |
'./button', | |
'./draggable', | |
'./mouse', | |
'./resizable', | |
'../focusable', | |
'../keycode', | |
'../position', | |
'../safe-active-element', | |
'../safe-blur', | |
'../tabbable', | |
'../unique-id', | |
'../version', | |
'../widget'], a) : a(jQuery) | |
}(function (a) { | |
return a.widget('ui.dialog', { | |
version: '1.12.1', | |
options: { | |
appendTo: 'body', | |
autoOpen: !0, | |
buttons: [ | |
], | |
classes: { | |
'ui-dialog': 'ui-corner-all', | |
'ui-dialog-titlebar': 'ui-corner-all' | |
}, | |
closeOnEscape: !0, | |
closeText: 'Close', | |
draggable: !0, | |
hide: null, | |
height: 'auto', | |
maxHeight: null, | |
maxWidth: null, | |
minHeight: 150, | |
minWidth: 150, | |
modal: !1, | |
position: { | |
my: 'center', | |
at: 'center', | |
of: window, | |
collision: 'fit', | |
using: function (b) { | |
var c = a(this).css(b).offset().top; | |
c < 0 && a(this).css('top', b.top - c) | |
} | |
}, | |
resizable: !0, | |
show: null, | |
title: null, | |
width: 300, | |
beforeClose: null, | |
close: null, | |
drag: null, | |
dragStart: null, | |
dragStop: null, | |
focus: null, | |
open: null, | |
resize: null, | |
resizeStart: null, | |
resizeStop: null | |
}, | |
sizeRelatedOptions: { | |
buttons: !0, | |
height: !0, | |
maxHeight: !0, | |
maxWidth: !0, | |
minHeight: !0, | |
minWidth: !0, | |
width: !0 | |
}, | |
resizableRelatedOptions: { | |
maxHeight: !0, | |
maxWidth: !0, | |
minHeight: !0, | |
minWidth: !0 | |
}, | |
_create: function () { | |
this.originalCss = { | |
display: this.element[0].style.display, | |
width: this.element[0].style.width, | |
minHeight: this.element[0].style.minHeight, | |
maxHeight: this.element[0].style.maxHeight, | |
height: this.element[0].style.height | |
}, | |
this.originalPosition = { | |
parent: this.element.parent(), | |
index: this.element.parent().children().index(this.element) | |
}, | |
this.originalTitle = this.element.attr('title'), | |
null == this.options.title && null != this.originalTitle && (this.options.title = this.originalTitle), | |
this.options.disabled && (this.options.disabled = !1), | |
this._createWrapper(), | |
this.element.show().removeAttr('title').appendTo(this.uiDialog), | |
this._addClass('ui-dialog-content', 'ui-widget-content'), | |
this._createTitlebar(), | |
this._createButtonPane(), | |
this.options.draggable && a.fn.draggable && this._makeDraggable(), | |
this.options.resizable && a.fn.resizable && this._makeResizable(), | |
this._isOpen = !1, | |
this._trackFocus() | |
}, | |
_init: function () { | |
this.options.autoOpen && this.open() | |
}, | |
_appendTo: function () { | |
var b = this.options.appendTo; | |
return b && (b.jquery || b.nodeType) ? a(b) : this.document.find(b || 'body').eq(0) | |
}, | |
_destroy: function () { | |
var a, | |
b = this.originalPosition; | |
this._untrackInstance(), | |
this._destroyOverlay(), | |
this.element.removeUniqueId().css(this.originalCss).detach(), | |
this.uiDialog.remove(), | |
this.originalTitle && this.element.attr('title', this.originalTitle), | |
a = b.parent.children().eq(b.index), | |
a.length && a[0] !== this.element[0] ? a.before(this.element) : b.parent.append(this.element) | |
}, | |
widget: function () { | |
return this.uiDialog | |
}, | |
disable: a.noop, | |
enable: a.noop, | |
close: function (b) { | |
var c = this; | |
this._isOpen && this._trigger('beforeClose', b) !== !1 && (this._isOpen = !1, this._focusedElement = null, this._destroyOverlay(), this._untrackInstance(), this.opener.filter(':focusable').trigger('focus').length || a.ui.safeBlur(a.ui.safeActiveElement(this.document[0])), this._hide(this.uiDialog, this.options.hide, function () { | |
c._trigger('close', b) | |
})) | |
}, | |
isOpen: function () { | |
return this._isOpen | |
}, | |
moveToTop: function () { | |
this._moveToTop() | |
}, | |
_moveToTop: function (b, c) { | |
var d = !1, | |
e = this.uiDialog.siblings('.ui-front:visible').map(function () { | |
return + a(this).css('z-index') | |
}).get(), | |
f = Math.max.apply(null, e); | |
return f >= + this.uiDialog.css('z-index') && (this.uiDialog.css('z-index', f + 1), d = !0), | |
d && !c && this._trigger('focus', b), | |
d | |
}, | |
open: function () { | |
var b = this; | |
return this._isOpen ? void (this._moveToTop() && this._focusTabbable()) : (this._isOpen = !0, this.opener = a(a.ui.safeActiveElement(this.document[0])), this._size(), this._position(), this._createOverlay(), this._moveToTop(null, !0), this.overlay && this.overlay.css('z-index', this.uiDialog.css('z-index') - 1), this._show(this.uiDialog, this.options.show, function () { | |
b._focusTabbable(), | |
b._trigger('focus') | |
}), this._makeFocusTarget(), void this._trigger('open')) | |
}, | |
_focusTabbable: function () { | |
var a = this._focusedElement; | |
a || (a = this.element.find('[autofocus]')), | |
a.length || (a = this.element.find(':tabbable')), | |
a.length || (a = this.uiDialogButtonPane.find(':tabbable')), | |
a.length || (a = this.uiDialogTitlebarClose.filter(':tabbable')), | |
a.length || (a = this.uiDialog), | |
a.eq(0).trigger('focus') | |
}, | |
_keepFocus: function (b) { | |
function c() { | |
var b = a.ui.safeActiveElement(this.document[0]), | |
c = this.uiDialog[0] === b || a.contains(this.uiDialog[0], b); | |
c || this._focusTabbable() | |
} | |
b.preventDefault(), | |
c.call(this), | |
this._delay(c) | |
}, | |
_createWrapper: function () { | |
this.uiDialog = a('<div>').hide().attr({ | |
tabIndex: - 1, | |
role: 'dialog' | |
}).appendTo(this._appendTo()), | |
this._addClass(this.uiDialog, 'ui-dialog', 'ui-widget ui-widget-content ui-front'), | |
this._on(this.uiDialog, { | |
keydown: function (b) { | |
if (this.options.closeOnEscape && !b.isDefaultPrevented() && b.keyCode && b.keyCode === a.ui.keyCode.ESCAPE) return b.preventDefault(), | |
void this.close(b); | |
if (b.keyCode === a.ui.keyCode.TAB && !b.isDefaultPrevented()) { | |
var c = this.uiDialog.find(':tabbable'), | |
d = c.filter(':first'), | |
e = c.filter(':last'); | |
b.target !== e[0] && b.target !== this.uiDialog[0] || b.shiftKey ? b.target !== d[0] && b.target !== this.uiDialog[0] || !b.shiftKey || (this._delay(function () { | |
e.trigger('focus') | |
}), b.preventDefault()) : (this._delay(function () { | |
d.trigger('focus') | |
}), b.preventDefault()) | |
} | |
}, | |
mousedown: function (a) { | |
this._moveToTop(a) && this._focusTabbable() | |
} | |
}), | |
this.element.find('[aria-describedby]').length || this.uiDialog.attr({ | |
'aria-describedby': this.element.uniqueId().attr('id') | |
}) | |
}, | |
_createTitlebar: function () { | |
var b; | |
this.uiDialogTitlebar = a('<div>'), | |
this._addClass(this.uiDialogTitlebar, 'ui-dialog-titlebar', 'ui-widget-header ui-helper-clearfix'), | |
this._on(this.uiDialogTitlebar, { | |
mousedown: function (b) { | |
a(b.target).closest('.ui-dialog-titlebar-close') || this.uiDialog.trigger('focus') | |
} | |
}), | |
this.uiDialogTitlebarClose = a('<button type=\'button\'></button>').button({ | |
label: a('<a>').text(this.options.closeText).html(), | |
icon: 'ui-icon-closethick', | |
showLabel: !1 | |
}).appendTo(this.uiDialogTitlebar), | |
this._addClass(this.uiDialogTitlebarClose, 'ui-dialog-titlebar-close'), | |
this._on(this.uiDialogTitlebarClose, { | |
click: function (a) { | |
a.preventDefault(), | |
this.close(a) | |
} | |
}), | |
b = a('<span>').uniqueId().prependTo(this.uiDialogTitlebar), | |
this._addClass(b, 'ui-dialog-title'), | |
this._title(b), | |
this.uiDialogTitlebar.prependTo(this.uiDialog), | |
this.uiDialog.attr({ | |
'aria-labelledby': b.attr('id') | |
}) | |
}, | |
_title: function (a) { | |
this.options.title ? a.text(this.options.title) : a.html(' ') | |
}, | |
_createButtonPane: function () { | |
this.uiDialogButtonPane = a('<div>'), | |
this._addClass(this.uiDialogButtonPane, 'ui-dialog-buttonpane', 'ui-widget-content ui-helper-clearfix'), | |
this.uiButtonSet = a('<div>').appendTo(this.uiDialogButtonPane), | |
this._addClass(this.uiButtonSet, 'ui-dialog-buttonset'), | |
this._createButtons() | |
}, | |
_createButtons: function () { | |
var b = this, | |
c = this.options.buttons; | |
return this.uiDialogButtonPane.remove(), | |
this.uiButtonSet.empty(), | |
a.isEmptyObject(c) || a.isArray(c) && !c.length ? void this._removeClass(this.uiDialog, 'ui-dialog-buttons') : (a.each(c, function (c, d) { | |
var e, | |
f; | |
d = a.isFunction(d) ? { | |
click: d, | |
text: c | |
} | |
: d, | |
d = a.extend({ | |
type: 'button' | |
}, d), | |
e = d.click, | |
f = { | |
icon: d.icon, | |
iconPosition: d.iconPosition, | |
showLabel: d.showLabel, | |
icons: d.icons, | |
text: d.text | |
}, | |
delete d.click, | |
delete d.icon, | |
delete d.iconPosition, | |
delete d.showLabel, | |
delete d.icons, | |
'boolean' == typeof d.text && delete d.text, | |
a('<button></button>', d).button(f).appendTo(b.uiButtonSet).on('click', function () { | |
e.apply(b.element[0], arguments) | |
}) | |
}), this._addClass(this.uiDialog, 'ui-dialog-buttons'), void this.uiDialogButtonPane.appendTo(this.uiDialog)) | |
}, | |
_makeDraggable: function () { | |
function b(a) { | |
return { | |
position: a.position, | |
offset: a.offset | |
} | |
} | |
var c = this, | |
d = this.options; | |
this.uiDialog.draggable({ | |
cancel: '.ui-dialog-content, .ui-dialog-titlebar-close', | |
handle: '.ui-dialog-titlebar', | |
containment: 'document', | |
start: function (d, e) { | |
c._addClass(a(this), 'ui-dialog-dragging'), | |
c._blockFrames(), | |
c._trigger('dragStart', d, b(e)) | |
}, | |
drag: function (a, d) { | |
c._trigger('drag', a, b(d)) | |
}, | |
stop: function (e, f) { | |
var g = f.offset.left - c.document.scrollLeft(), | |
h = f.offset.top - c.document.scrollTop(); | |
d.position = { | |
my: 'left top', | |
at: 'left' + (g >= 0 ? '+' : '') + g + ' top' + (h >= 0 ? '+' : '') + h, | |
of: c.window | |
}, | |
c._removeClass(a(this), 'ui-dialog-dragging'), | |
c._unblockFrames(), | |
c._trigger('dragStop', e, b(f)) | |
} | |
}) | |
}, | |
_makeResizable: function () { | |
function b(a) { | |
return { | |
originalPosition: a.originalPosition, | |
originalSize: a.originalSize, | |
position: a.position, | |
size: a.size | |
} | |
} | |
var c = this, | |
d = this.options, | |
e = d.resizable, | |
f = this.uiDialog.css('position'), | |
g = 'string' == typeof e ? e : 'n,e,s,w,se,sw,ne,nw'; | |
this.uiDialog.resizable({ | |
cancel: '.ui-dialog-content', | |
containment: 'document', | |
alsoResize: this.element, | |
maxWidth: d.maxWidth, | |
maxHeight: d.maxHeight, | |
minWidth: d.minWidth, | |
minHeight: this._minHeight(), | |
handles: g, | |
start: function (d, e) { | |
c._addClass(a(this), 'ui-dialog-resizing'), | |
c._blockFrames(), | |
c._trigger('resizeStart', d, b(e)) | |
}, | |
resize: function (a, d) { | |
c._trigger('resize', a, b(d)) | |
}, | |
stop: function (e, f) { | |
var g = c.uiDialog.offset(), | |
h = g.left - c.document.scrollLeft(), | |
i = g.top - c.document.scrollTop(); | |
d.height = c.uiDialog.height(), | |
d.width = c.uiDialog.width(), | |
d.position = { | |
my: 'left top', | |
at: 'left' + (h >= 0 ? '+' : '') + h + ' top' + (i >= 0 ? '+' : '') + i, | |
of: c.window | |
}, | |
c._removeClass(a(this), 'ui-dialog-resizing'), | |
c._unblockFrames(), | |
c._trigger('resizeStop', e, b(f)) | |
} | |
}).css('position', f) | |
}, | |
_trackFocus: function () { | |
this._on(this.widget(), { | |
focusin: function (b) { | |
this._makeFocusTarget(), | |
this._focusedElement = a(b.target) | |
} | |
}) | |
}, | |
_makeFocusTarget: function () { | |
this._untrackInstance(), | |
this._trackingInstances().unshift(this) | |
}, | |
_untrackInstance: function () { | |
var b = this._trackingInstances(), | |
c = a.inArray(this, b); | |
c !== - 1 && b.splice(c, 1) | |
}, | |
_trackingInstances: function () { | |
var a = this.document.data('ui-dialog-instances'); | |
return a || (a = [ | |
], this.document.data('ui-dialog-instances', a)), | |
a | |
}, | |
_minHeight: function () { | |
var a = this.options; | |
return 'auto' === a.height ? a.minHeight : Math.min(a.minHeight, a.height) | |
}, | |
_position: function () { | |
var a = this.uiDialog.is(':visible'); | |
a || this.uiDialog.show(), | |
this.uiDialog.position(this.options.position), | |
a || this.uiDialog.hide() | |
}, | |
_setOptions: function (b) { | |
var c = this, | |
d = !1, | |
e = { | |
}; | |
a.each(b, function (a, b) { | |
c._setOption(a, b), | |
a in c.sizeRelatedOptions && (d = !0), | |
a in c.resizableRelatedOptions && (e[a] = b) | |
}), | |
d && (this._size(), this._position()), | |
this.uiDialog.is(':data(ui-resizable)') && this.uiDialog.resizable('option', e) | |
}, | |
_setOption: function (b, c) { | |
var d, | |
e, | |
f = this.uiDialog; | |
'disabled' !== b && (this._super(b, c), 'appendTo' === b && this.uiDialog.appendTo(this._appendTo()), 'buttons' === b && this._createButtons(), 'closeText' === b && this.uiDialogTitlebarClose.button({ | |
label: a('<a>').text('' + this.options.closeText).html() | |
}), 'draggable' === b && (d = f.is(':data(ui-draggable)'), d && !c && f.draggable('destroy'), !d && c && this._makeDraggable()), 'position' === b && this._position(), 'resizable' === b && (e = f.is(':data(ui-resizable)'), e && !c && f.resizable('destroy'), e && 'string' == typeof c && f.resizable('option', 'handles', c), e || c === !1 || this._makeResizable()), 'title' === b && this._title(this.uiDialogTitlebar.find('.ui-dialog-title'))) | |
}, | |
_size: function () { | |
var a, | |
b, | |
c, | |
d = this.options; | |
this.element.show().css({ | |
width: 'auto', | |
minHeight: 0, | |
maxHeight: 'none', | |
height: 0 | |
}), | |
d.minWidth > d.width && (d.width = d.minWidth), | |
a = this.uiDialog.css({ | |
height: 'auto', | |
width: d.width | |
}).outerHeight(), | |
b = Math.max(0, d.minHeight - a), | |
c = 'number' == typeof d.maxHeight ? Math.max(0, d.maxHeight - a) : 'none', | |
'auto' === d.height ? this.element.css({ | |
minHeight: b, | |
maxHeight: c, | |
height: 'auto' | |
}) : this.element.height(Math.max(0, d.height - a)), | |
this.uiDialog.is(':data(ui-resizable)') && this.uiDialog.resizable('option', 'minHeight', this._minHeight()) | |
}, | |
_blockFrames: function () { | |
this.iframeBlocks = this.document.find('iframe').map(function () { | |
var b = a(this); | |
return a('<div>').css({ | |
position: 'absolute', | |
width: b.outerWidth(), | |
height: b.outerHeight() | |
}).appendTo(b.parent()).offset(b.offset()) [0] | |
}) | |
}, | |
_unblockFrames: function () { | |
this.iframeBlocks && (this.iframeBlocks.remove(), delete this.iframeBlocks) | |
}, | |
_allowInteraction: function (b) { | |
return !!a(b.target).closest('.ui-dialog').length || !!a(b.target).closest('.ui-datepicker').length | |
}, | |
_createOverlay: function () { | |
if (this.options.modal) { | |
var b = !0; | |
this._delay(function () { | |
b = !1 | |
}), | |
this.document.data('ui-dialog-overlays') || this._on(this.document, { | |
focusin: function (a) { | |
b || this._allowInteraction(a) || (a.preventDefault(), this._trackingInstances() [0]._focusTabbable()) | |
} | |
}), | |
this.overlay = a('<div>').appendTo(this._appendTo()), | |
this._addClass(this.overlay, null, 'ui-widget-overlay ui-front'), | |
this._on(this.overlay, { | |
mousedown: '_keepFocus' | |
}), | |
this.document.data('ui-dialog-overlays', (this.document.data('ui-dialog-overlays') || 0) + 1) | |
} | |
}, | |
_destroyOverlay: function () { | |
if (this.options.modal && this.overlay) { | |
var a = this.document.data('ui-dialog-overlays') - 1; | |
a ? this.document.data('ui-dialog-overlays', a) : (this._off(this.document, 'focusin'), this.document.removeData('ui-dialog-overlays')), | |
this.overlay.remove(), | |
this.overlay = null | |
} | |
} | |
}), | |
a.uiBackCompat !== !1 && a.widget('ui.dialog', a.ui.dialog, { | |
options: { | |
dialogClass: '' | |
}, | |
_createWrapper: function () { | |
this._super(), | |
this.uiDialog.addClass(this.options.dialogClass) | |
}, | |
_setOption: function (a, b) { | |
'dialogClass' === a && this.uiDialog.removeClass(this.options.dialogClass).addClass(b), | |
this._superApply(arguments) | |
} | |
}), | |
a.ui.dialog | |
}); | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
(function ($, Drupal, drupalSettings) { | |
drupalSettings.dialog = { | |
autoOpen: true, | |
dialogClass: '', | |
buttonClass: 'button', | |
buttonPrimaryClass: 'button--primary', | |
close: function close(event) { | |
Drupal.dialog(event.target).close(); | |
Drupal.detachBehaviors(event.target, null, 'unload'); | |
} | |
}; | |
Drupal.dialog = function (element, options) { | |
var undef = void 0; | |
var $element = $(element); | |
var dialog = { | |
open: false, | |
returnValue: undef | |
}; | |
function openDialog(settings) { | |
settings = $.extend({ | |
}, drupalSettings.dialog, options, settings); | |
$(window).trigger('dialog:beforecreate', [ | |
dialog, | |
$element, | |
settings | |
]); | |
$element.dialog(settings); | |
dialog.open = true; | |
$(window).trigger('dialog:aftercreate', [ | |
dialog, | |
$element, | |
settings | |
]); | |
} | |
function closeDialog(value) { | |
$(window).trigger('dialog:beforeclose', [ | |
dialog, | |
$element | |
]); | |
$element.dialog('close'); | |
dialog.returnValue = value; | |
dialog.open = false; | |
$(window).trigger('dialog:afterclose', [ | |
dialog, | |
$element | |
]); | |
} | |
dialog.show = function () { | |
openDialog({ | |
modal: false | |
}); | |
}; | |
dialog.showModal = function () { | |
openDialog({ | |
modal: true | |
}); | |
}; | |
dialog.close = closeDialog; | |
return dialog; | |
}; | |
}) (jQuery, Drupal, drupalSettings); | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
(function ($, Drupal, drupalSettings, debounce, displace) { | |
drupalSettings.dialog = $.extend({ | |
autoResize: true, | |
maxHeight: '95%' | |
}, drupalSettings.dialog); | |
function resetPosition(options) { | |
var offsets = displace.offsets; | |
var left = offsets.left - offsets.right; | |
var top = offsets.top - offsets.bottom; | |
var leftString = (left > 0 ? '+' : '-') + Math.abs(Math.round(left / 2)) + 'px'; | |
var topString = (top > 0 ? '+' : '-') + Math.abs(Math.round(top / 2)) + 'px'; | |
options.position = { | |
my: 'center' + (left !== 0 ? leftString : '') + ' center' + (top !== 0 ? topString : ''), | |
of: window | |
}; | |
return options; | |
} | |
function resetSize(event) { | |
var positionOptions = [ | |
'width', | |
'height', | |
'minWidth', | |
'minHeight', | |
'maxHeight', | |
'maxWidth', | |
'position' | |
]; | |
var adjustedOptions = { | |
}; | |
var windowHeight = $(window).height(); | |
var option = void 0; | |
var optionValue = void 0; | |
var adjustedValue = void 0; | |
for (var n = 0; n < positionOptions.length; n++) { | |
option = positionOptions[n]; | |
optionValue = event.data.settings[option]; | |
if (optionValue) { | |
if (typeof optionValue === 'string' && /%$/.test(optionValue) && /height/i.test(option)) { | |
windowHeight -= displace.offsets.top + displace.offsets.bottom; | |
adjustedValue = parseInt(0.01 * parseInt(optionValue, 10) * windowHeight, 10); | |
if (option === 'height' && event.data.$element.parent().outerHeight() < adjustedValue) { | |
adjustedValue = 'auto'; | |
} | |
adjustedOptions[option] = adjustedValue; | |
} | |
} | |
} | |
if (!event.data.settings.modal) { | |
adjustedOptions = resetPosition(adjustedOptions); | |
} | |
event.data.$element.dialog('option', adjustedOptions).trigger('dialogContentResize'); | |
} | |
$(window).on({ | |
'dialog:aftercreate': function dialogAftercreate(event, dialog, $element, settings) { | |
var autoResize = debounce(resetSize, 20); | |
var eventData = { | |
settings: settings, | |
$element: $element | |
}; | |
if (settings.autoResize === true || settings.autoResize === 'true') { | |
$element.dialog('option', { | |
resizable: false, | |
draggable: false | |
}).dialog('widget').css('position', 'fixed'); | |
$(window).on('resize.dialogResize scroll.dialogResize', eventData, autoResize).trigger('resize.dialogResize'); | |
$(document).on('drupalViewportOffsetChange.dialogResize', eventData, autoResize); | |
} | |
}, | |
'dialog:beforeclose': function dialogBeforeclose(event, dialog, $element) { | |
$(window).off('.dialogResize'); | |
$(document).off('.dialogResize'); | |
} | |
}); | |
}) (jQuery, Drupal, drupalSettings, Drupal.debounce, Drupal.displace); | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
(function ($) { | |
$.widget('ui.dialog', $.ui.dialog, { | |
options: { | |
buttonClass: 'button', | |
buttonPrimaryClass: 'button--primary' | |
}, | |
_createButtons: function _createButtons() { | |
var opts = this.options; | |
var primaryIndex = void 0; | |
var index = void 0; | |
var il = opts.buttons.length; | |
for (index = 0; index < il; index++) { | |
if (opts.buttons[index].primary && opts.buttons[index].primary === true) { | |
primaryIndex = index; | |
delete opts.buttons[index].primary; | |
break; | |
} | |
} | |
this._super(); | |
var $buttons = this.uiButtonSet.children().addClass(opts.buttonClass); | |
if (typeof primaryIndex !== 'undefined') { | |
$buttons.eq(index).addClass(opts.buttonPrimaryClass); | |
} | |
} | |
}); | |
}) (jQuery); | |
; | |
/** | |
* DO NOT EDIT THIS FILE. | |
* See the following change record for more information, | |
* https://www.drupal.org/node/2815083 | |
* @preserve | |
**/ | |
(function ($, Drupal) { | |
Drupal.behaviors.dialog = { | |
attach: function attach(context, settings) { | |
var $context = $(context); | |
if (!$('#drupal-modal').length) { | |
$('<div id="drupal-modal" class="ui-front"></div>').hide().appendTo('body'); | |
} | |
var $dialog = $context.closest('.ui-dialog-content'); | |
if ($dialog.length) { | |
if ($dialog.dialog('option', 'drupalAutoButtons')) { | |
$dialog.trigger('dialogButtonsChange'); | |
} | |
$dialog.dialog('widget').trigger('focus'); | |
} | |
var originalClose = settings.dialog.close; | |
settings.dialog.close = function (event) { | |
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
args[_key - 1] = arguments[_key]; | |
} | |
originalClose.apply(settings.dialog, [ | |
event | |
].concat(args)); | |
$(event.target).remove(); | |
}; | |
}, | |
prepareDialogButtons: function prepareDialogButtons($dialog) { | |
var buttons = [ | |
]; | |
var $buttons = $dialog.find('.form-actions input[type=submit], .form-actions a.button'); | |
$buttons.each(function () { | |
var $originalButton = $(this).css({ | |
display: 'none' | |
}); | |
buttons.push({ | |
text: $originalButton.html() || $originalButton.attr('value'), | |
class : $originalButton.attr('class'), | |
click: function click(e) { | |
if ($originalButton.is('a')) { | |
$originalButton[0].click(); | |
} else { | |
$originalButton.trigger('mousedown').trigger('mouseup').trigger('click'); | |
e.preventDefault(); | |
} | |
} | |
}); | |
}); | |
return buttons; | |
} | |
}; | |
Drupal.AjaxCommands.prototype.openDialog = function (ajax, response, status) { | |
if (!response.selector) { | |
return false; | |
} | |
var $dialog = $(response.selector); | |
if (!$dialog.length) { | |
$dialog = $('<div id="' + response.selector.replace(/^#/, '') + '" class="ui-front"></div>').appendTo('body'); | |
} | |
if (!ajax.wrapper) { | |
ajax.wrapper = $dialog.attr('id'); | |
} | |
response.command = 'insert'; | |
response.method = 'html'; | |
ajax.commands.insert(ajax, response, status); | |
if (!response.dialogOptions.buttons) { | |
response.dialogOptions.drupalAutoButtons = true; | |
response.dialogOptions.buttons = Drupal.behaviors.dialog.prepareDialogButtons($dialog); | |
} | |
$dialog.on('dialogButtonsChange', function () { | |
var buttons = Drupal.behaviors.dialog.prepareDialogButtons($dialog); | |
$dialog.dialog('option', 'buttons', buttons); | |
}); | |
response.dialogOptions = response.dialogOptions || { | |
}; | |
var dialog = Drupal.dialog($dialog.get(0), response.dialogOptions); | |
if (response.dialogOptions.modal) { | |
dialog.showModal(); | |
} else { | |
dialog.show(); | |
} | |
$dialog.parent().find('.ui-dialog-buttonset').addClass('form-actions'); | |
}; | |
Drupal.AjaxCommands.prototype.closeDialog = function (ajax, response, status) { | |
var $dialog = $(response.selector); | |
if ($dialog.length) { | |
Drupal.dialog($dialog.get(0)).close(); | |
if (!response.persist) { | |
$dialog.remove(); | |
} | |
} | |
$dialog.off('dialogButtonsChange'); | |
}; | |
Drupal.AjaxCommands.prototype.setDialogOption = function (ajax, response, status) { | |
var $dialog = $(response.selector); | |
if ($dialog.length) { | |
$dialog.dialog('option', response.optionName, response.optionValue); | |
} | |
}; | |
$(window).on('dialog:aftercreate', function (e, dialog, $element, settings) { | |
$element.on('click.dialog', '.dialog-cancel', function (e) { | |
dialog.close('cancel'); | |
e.preventDefault(); | |
e.stopPropagation(); | |
}); | |
}); | |
$(window).on('dialog:beforeclose', function (e, dialog, $element) { | |
$element.off('.dialog'); | |
}); | |
}) (jQuery, Drupal); | |
; | |
/** | |
* @file | |
* JavaScript behaviors to fix jQuery UI dialogs. | |
*/ | |
(function ($, Drupal) { | |
'use strict'; | |
/** | |
* Ensure that ckeditor has focus when displayed inside of jquery-ui dialog widget | |
* | |
* @see http://stackoverflow.com/questions/20533487/how-to-ensure-that-ckeditor-has-focus-when-displayed-inside-of-jquery-ui-dialog | |
*/ | |
var _allowInteraction = $.ui.dialog.prototype._allowInteraction; | |
$.ui.dialog.prototype._allowInteraction = function (event) { | |
if ($(event.target).closest('.cke_dialog').length) { | |
return true; | |
} | |
return _allowInteraction.apply(this, arguments); | |
}; | |
/** | |
* Attaches webform dialog behaviors. | |
* | |
* @type {Drupal~behavior} | |
* | |
* @prop {Drupal~behaviorAttach} attach | |
* Attaches event listeners for webform dialogs. | |
*/ | |
Drupal.behaviors.webformDialogEvents = { | |
attach: function () { | |
$(window).once('webform-dialog').on({ | |
'dialog:aftercreate': function (event, dialog, $element, settings) { | |
setTimeout(function () { | |
var hasFocus = $element.find('[autofocus]:tabbable'); | |
if (!hasFocus.length) { | |
// Move focus to first input which is not a button. | |
hasFocus = $element.find(':input:tabbable:not(:button)'); | |
} | |
if (!hasFocus.length) { | |
// Move focus to close dialog button. | |
hasFocus = $element.parent().find('.ui-dialog-titlebar-close'); | |
} | |
hasFocus.eq(0).focus(); | |
}); | |
} | |
}); | |
} | |
}; | |
}) (jQuery, Drupal); | |
; | |
/** | |
* @file | |
* JavaScript behaviors for webform dialogs. | |
*/ | |
(function ($, Drupal, drupalSettings) { | |
'use strict'; | |
// @see http://api.jqueryui.com/dialog/ | |
Drupal.webform = Drupal.webform || { | |
}; | |
Drupal.webform.dialog = Drupal.webform.dialog || { | |
}; | |
Drupal.webform.dialog.options = Drupal.webform.dialog.options || { | |
}; | |
/** | |
* Open webform dialog using preset options. | |
* | |
* @type {Drupal~behavior} | |
*/ | |
Drupal.behaviors.webformDialog = { | |
attach: function (context) { | |
$('a.webform-dialog', context).once('webform-dialog').each(function () { | |
var $a = $(this); | |
// Get default options. | |
var options = $.extend({ | |
}, Drupal.webform.dialog.options); | |
// Get preset dialog options. | |
if ($a.attr('class').match(/webform-dialog-([a-z0-9_]+)/)) { | |
var dialogOptionsName = RegExp.$1; | |
if (drupalSettings.webform.dialog.options[dialogOptionsName]) { | |
options = drupalSettings.webform.dialog.options[dialogOptionsName]; | |
// Unset title. | |
delete options.title; | |
} | |
} // Get custom dialog options. | |
if ($(this).data('dialog-options')) { | |
$.extend(options, $(this).data('dialog-options')); | |
} | |
var href = $a.attr('href'); | |
// Replace ENTITY_TYPE and ENTITY_ID placeholders and update the href. | |
// @see webform_page_attachments() | |
if (href.indexOf('?source_entity_type=ENTITY_TYPE&source_entity_id=ENTITY_ID') !== - 1) { | |
if (drupalSettings.webform.dialog.entity_type && drupalSettings.webform.dialog.entity_id) { | |
href = href.replace('ENTITY_TYPE', encodeURIComponent(drupalSettings.webform.dialog.entity_type)); | |
href = href.replace('ENTITY_ID', encodeURIComponent(drupalSettings.webform.dialog.entity_id)); | |
} | |
else { | |
href = href.replace('?source_entity_type=ENTITY_TYPE&source_entity_id=ENTITY_ID', ''); | |
} | |
$a.attr('href', href); | |
} // Append _webform_dialog=1 to href to trigger Ajax support. | |
// @see \Drupal\webform\WebformSubmissionForm::setEntity | |
href += (href.indexOf('?') === - 1 ? '?' : '&') + '_webform_dialog=1'; | |
var element_settings = { | |
}; | |
element_settings.progress = { | |
type: 'fullscreen' | |
}; | |
element_settings.url = href; | |
element_settings.event = 'click'; | |
element_settings.dialogType = $a.data('dialog-type') || 'modal'; | |
element_settings.dialog = options; | |
element_settings.element = this; | |
Drupal.ajax(element_settings); | |
}); | |
} | |
}; | |
}) (jQuery, Drupal, drupalSettings); | |
; | |
window.matchMedia || (window.matchMedia = function () { | |
'use strict'; | |
var e = window.styleMedia || window.media; | |
if (!e) { | |
var t = document.createElement('style'), | |
i = document.getElementsByTagName('script') [0], | |
n = null; | |
t.type = 'text/css'; | |
t.id = 'matchmediajs-test'; | |
i.parentNode.insertBefore(t, i); | |
n = 'getComputedStyle' in window && window.getComputedStyle(t, null) || t.currentStyle; | |
e = { | |
matchMedium: function (e) { | |
var i = '@media ' + e + '{ #matchmediajs-test { width: 1px; } }'; | |
if (t.styleSheet) { | |
t.styleSheet.cssText = i | |
} else { | |
t.textContent = i | |
} | |
return n.width === '1px' | |
} | |
} | |
} | |
return function (t) { | |
return { | |
matches: e.matchMedium(t || 'all'), | |
media: t || 'all' | |
} | |
} | |
}()); | |
; | |
/** | |
* DO NOT EDIT THIS FILE DIRECTLY | |
* Please make changes in | |
* kraken_common_structure.es6.js | |
* cd docroot/themes/custom/kraken/build | |
* gulp build or npm run dev | |
*/ | |
!function e(t, n, r) { | |
function o(l, a) { | |
if (!n[l]) { | |
if (!t[l]) { | |
var i = 'function' == typeof require && require; | |
if (!a && i) return i(l, !0); | |
if (u) return u(l, !0); | |
var s = new Error('Cannot find module \'' + l + '\''); | |
throw s.code = 'MODULE_NOT_FOUND', | |
s | |
} | |
var f = n[l] = { | |
exports: { | |
} | |
}; | |
t[l][0].call(f.exports, (function (e) { | |
return o(t[l][1][e] || e) | |
}), f, f.exports, e, t, n, r) | |
} | |
return n[l].exports | |
} | |
for (var u = 'function' == typeof require && require, l = 0; l < r.length; l++) o(r[l]); | |
return o | |
}({ | |
1: [ | |
function (e, t, n) { | |
'use strict'; | |
var r = e('@babel/runtime/helpers/interopRequireDefault'); | |
Object.defineProperty(n, '__esModule', { | |
value: !0 | |
}), | |
n.default = void 0; | |
var o = r(e('@babel/runtime/helpers/defineProperty')), | |
u = r(e('@babel/runtime/helpers/classCallCheck')), | |
l = r(e('@babel/runtime/helpers/createClass')), | |
a = r(e('./models/KrakenCommonModel')), | |
i = r(e('./models/ModuleModel')), | |
s = r(e('./enums/module')), | |
f = r(e('./utils/getByPath')), | |
c = r(e('./utils/extend')), | |
d = function () { | |
function e() { | |
(0, u.default) (this, e), | |
this.common = this._getKrakenCommon(), | |
this._addToModuleList(s.default.NAME) | |
} | |
return (0, l.default) (e, [ | |
{ | |
key: '_getKrakenCommon', | |
value: function () { | |
if (this.common) return this.common; | |
try { | |
if (window.Drupal && window.Drupal.KrakenCommon) return this.common = w |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment