Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.___tp = function () {
- var tp,
- __tp;
- if (window.tp !== undefined) {
- if (window.tp.isInitialized !== undefined) {
- window.tp.loadRequireJs();
- return
- }
- __tp = window.tp
- }
- tp = function () {
- function t() {
- function i(e, t, r) {
- var i,
- s,
- o;
- for (var u = 0; u < n.length; u++) {
- var a = n[u];
- e == a.module && t.substring(0, a.prefix.length) == a.prefix && (i = t.substring(a.prefix.length, a.prefix.length + 1).toLowerCase() + t.substring(a.prefix.length + 1, t.length), s = tp[e].registerCallback(i, r), s != undefined && (o = s))
- }
- return o
- }
- var t = [
- 'offer',
- 'template',
- 'meter',
- 'experience',
- 'myaccount',
- 'pianoId',
- 'tinypassLogin',
- 'swg'
- ],
- n = [
- {
- module: 'offer',
- prefix: 'checkout'
- },
- {
- module: 'pianoId',
- prefix: 'pianoId'
- }
- ],
- r = function (e, n) {
- return function () {
- var r;
- for (var s = 0; s < t.length; s++) {
- var o = t[s],
- u = tp[o].registerCallback(e, n);
- u != undefined && (r = u),
- u = i(o, e, n),
- u != undefined && (r = u)
- }
- return r
- }
- };
- e.addHandler = function () {
- var t = r.apply(null, arguments);
- tp.isInitialized ? t() : e.events.push(t)
- }
- }
- var e = this;
- this.aid = '',
- this.setAid = function (e) {
- this.aid = e
- },
- this.reload = function () {
- location.href = tp.util.removeVoucherCodeFromUrl(location.href)
- },
- this.gaClientId = null,
- this.setGAClientId = function (e) {
- this.gaClientId = e,
- this.gaService && this.gaService.setClientId(e)
- },
- this.getGAClientId = function () {
- return this.gaClientId
- },
- this.gaCrossDomainLinking = null,
- this.enableGACrossDomainLinking = function () {
- this.gaCrossDomainLinking = !0;
- var e = this,
- t = 500,
- n = 60000,
- r = setInterval(function () {
- var t = window.ga;
- if (t && typeof t == 'function') {
- clearInterval(r);
- try {
- t(function (t) {
- e.setGAClientId(t.get('clientId'))
- })
- } catch (n) {
- }
- }
- }, t);
- setTimeout(function () {
- clearInterval(r)
- }, n)
- },
- this.tags = '',
- this.setTags = function (e) {
- e instanceof Array ? this.tags = e.join(',') : this.tags = e
- },
- this.useExperience = !1,
- this.setUseExperience = function (e) {
- this.useExperience = e
- },
- this.experimentalIosModal = !1,
- this.setExperimentalIosModal = function (e) {
- },
- this.contentIsNative = '',
- this.setContentIsNative = function (e) {
- this.contentIsNative = e
- },
- this.endpoint = '',
- this.setEndpoint = function (e) {
- this.endpoint = e
- },
- this.espEndpoint = '',
- this.setEspEndpoint = function (e) {
- this.espEndpoint = e
- },
- this.contentId = '',
- this.setContentId = function (e) {
- this.contentId = e
- },
- this.trackPages = !0,
- this.setTrackPages = function (e) {
- this.trackPages = e
- },
- this.debug = !1,
- this.setDebug = function (e) {
- this.debug = e
- },
- this.userRef = '',
- this.setUserRef = function (e) {
- this.userRef = e
- },
- this.useTinypassAccounts = !1,
- this.setUseTinypassAccounts = function (e) {
- this.useTinypassAccounts = e
- },
- this.useCondeUserProvider = !1,
- this.setUseCondeUserProvider = function (e) {
- this.useCondeUserProvider = e
- },
- this.useGigyaUserProvider = !1,
- this.setUseGigyaUserProvider = function (e) {
- this.useGigyaUserProvider = e
- },
- this.usePianoIdUserProvider = !1,
- this.setUsePianoIdUserProvider = function (e) {
- this.usePianoIdUserProvider = e
- },
- this.pianoIdUrl = '',
- this.setPianoIdUrl = function (e) {
- this.pianoIdUrl = e
- },
- this.useAidSpecifiedCookies = !1,
- this.setUseAidSpecifiedCookies = function (e) {
- this.useAidSpecifiedCookies = e
- },
- this.sandbox = !1,
- this.setSandbox = function (e) {
- this.sandbox = e
- },
- this.isNonProdEndpoint = function () {
- var e = /^https?:\/\/(.*sandbox.*|\d+\.dev)\.(tinypass\.com|piano\.io)/i;
- return this.endpoint === 'sandbox' ? !0 : e.test(this.endpoint)
- },
- this.contentCreatedSelector = '',
- this.setContentCreatedSelector = function (e) {
- this.contentCreatedSelector = e
- },
- this.contentCreated = '',
- this.setContentCreated = function (e) {
- this.contentCreated = e
- },
- this.contentAuthor = '',
- this.setContentAuthor = function (e) {
- this.contentAuthor = e
- },
- this.contentSection = '',
- this.setContentSection = function (e) {
- this.contentSection = e
- },
- this.zone = '',
- this.setZone = function (e) {
- this.zone = e || ''
- },
- this.zIndexes = {
- backdrop: 300000,
- modal: 300050,
- close: 300100
- },
- this.setZIndexes = function (e) {
- this.zIndexes = e
- },
- this.customPreChecks = [
- ],
- this.setCustomPreCheck = function (e) {
- this.customPreChecks.push(e)
- },
- this.customParams = {
- },
- this.setCustomParam = function (e, t, n, r) {
- var i = [
- 'content',
- 'user',
- 'request'
- ];
- n || (n = 'content'),
- n = n.toLowerCase();
- if (i.indexOf(n) < 0) throw new Error('Undefined scope ' + n + '\nAvailable scopes: ' + i.join(', '));
- this.customParams[n] === undefined && (this.customParams[n] = {
- });
- if (this.customParams[n][e] === undefined || r) this.customParams[n][e] = [
- ];
- var s = [
- ].concat(t);
- for (var o = 0; o < s.length; o++) {
- if (typeof s[o] != 'string') throw new Error('setCustomParam accept only string values or array of strings');
- this.customParams[n][e].push(s[o])
- }
- },
- this.resetCustomParam = function (e) {
- e || (e = 'content'),
- delete this.customParams[e]
- },
- this.externalLibraries = [
- ],
- this.externalLibrariesCallbacks = [
- ],
- this.addExternalLibrary = function (e, t) {
- if (this.isInitialized) e = typeof e == 'string' ? [
- e
- ] : e,
- this.require(e, function () {
- t && t()
- });
- else {
- if (typeof e == 'string') this.externalLibraries.push(e);
- else for (var n = 0; n < e.length; ++n) this.externalLibraries.push(e[n]);
- t && this.externalLibrariesCallbacks.push(t)
- }
- },
- this.customVariables = {
- },
- this.setCustomVariable = function (e, t) {
- this.customVariables[e] = t
- },
- this.trackPageView = !0,
- this.setTrackPageView = function (e) {
- this.trackPageView = e
- },
- this.setTrackPageview = function (e) {
- this.trackPageView = e
- },
- this.customPageUrl = '',
- this.setPageURL = function (e) {
- this.customPageUrl = e
- },
- this.adblockerCookieName = '',
- this.setAdblockerCookieName = function (e) {
- this.adblockerCookieName = e
- },
- this.maxCookieExpirationInDays = null,
- this.setMaxCookieExpirationInDays = function (e) {
- var e = parseInt(e, 10);
- if (!(isFinite(e) && e > 0)) throw new Error('maxCookieExpirationInDays must be a positive number');
- this.maxCookieExpirationInDays = e
- },
- this.getMaxCookieExpirationInDays = function () {
- return this.maxCookieExpirationInDays
- },
- this.fbPixelId = null,
- this.setFbPixelId = function (e) {
- this.fbPixelId = e
- },
- this.getFbPixelId = function () {
- return this.fbPixelId
- },
- this.isMockMode = !1,
- this.events = [
- ],
- t()
- },
- function () {
- var require,
- requirejs,
- define;
- (function (ba) {
- function G(e) {
- return '[object Function]' === K.call(e)
- }
- function H(e) {
- return '[object Array]' === K.call(e)
- }
- function v(e, t) {
- if (e) {
- var n;
- for (n = 0; n < e.length && (!e[n] || !t(e[n], n, e)); n += 1);
- }
- }
- function T(e, t) {
- if (e) {
- var n;
- for (n = e.length - 1; - 1 < n && (!e[n] || !t(e[n], n, e)); n -= 1);
- }
- }
- function t(e, t) {
- return fa.call(e, t)
- }
- function m(e, n) {
- return t(e, n) && e[n]
- }
- function B(e, n) {
- for (var r in e) if (t(e, r) && n(e[r], r)) break
- }
- function U(e, n, r, i) {
- return n && B(n, function (n, s) {
- if (r || !t(e, s)) i && 'object' == typeof n && n && !H(n) && !G(n) && !(n instanceof RegExp) ? (e[s] || (e[s] = {
- }), U(e[s], n, r, i)) : e[s] = n
- }),
- e
- }
- function u(e, t) {
- return function () {
- return t.apply(e, arguments)
- }
- }
- function ca(e) {
- throw e
- }
- function da(e) {
- if (!e) return e;
- var t = ba;
- return v(e.split('.'), function (e) {
- t = t[e]
- }),
- t
- }
- function C(e, t, n, r) {
- return t = Error(t + '\nhttp://requirejs.org/docs/errors.html#' + e),
- t.requireType = e,
- t.requireModules = r,
- n && (t.originalError = n),
- t
- }
- function ga(e) {
- function n(e, t, n) {
- var r,
- i,
- s,
- o,
- u,
- a,
- f,
- l,
- t = t && t.split('/'),
- c = A.map,
- h = c && c['*'];
- if (e) {
- e = e.split('/'),
- i = e.length - 1,
- A.nodeIdCompat && Q.test(e[i]) && (e[i] = e[i].replace(Q, '')),
- '.' === e[0].charAt(0) && t && (i = t.slice(0, t.length - 1), e = i.concat(e)),
- i = e;
- for (s = 0; s < i.length; s++) (o = i[s], '.' === o) ? (i.splice(s, 1), s -= 1) : '..' === o && 0 !== s && (1 != s || '..' !== i[2]) && '..' !== i[s - 1] && 0 < s && (i.splice(s - 1, 2), s -= 2);
- e = e.join('/')
- }
- if (n && c && (t || h)) {
- i = e.split('/'),
- s = i.length;
- e: for (; 0 < s; s -= 1) {
- u = i.slice(0, s).join('/');
- if (t) for (o = t.length; 0 < o; o -= 1) if (n = m(c, t.slice(0, o).join('/'))) if (n = m(n, u)) {
- r = n,
- a = s;
- break e
- }
- !f && h && m(h, u) && (f = m(h, u), l = s)
- }
- !r && f && (r = f, a = l),
- r && (i.splice(0, a, r), e = i.join('/'))
- }
- return (r = m(A.pkgs, e)) ? r : e
- }
- function r(e) {
- z && v(document.getElementsByTagName('script'), function (t) {
- if (t.getAttribute('data-requiremodule') === e && t.getAttribute('data-requirecontext') === x.contextName) return t.parentNode.removeChild(t),
- !0
- })
- }
- function i(e) {
- var t = m(A.paths, e);
- if (t && H(t) && 1 < t.length) return t.shift(),
- x.require.undef(e),
- x.makeRequire(null, {
- skipMap: !0
- }) ([e]),
- !0
- }
- function s(e) {
- var t,
- n = e ? e.indexOf('!') : - 1;
- return - 1 < n && (t = e.substring(0, n), e = e.substring(n + 1, e.length)),
- [
- t,
- e
- ]
- }
- function o(e, t, r, i) {
- var o,
- u,
- a = null,
- f = t ? t.name : null,
- l = e,
- c = !0,
- h = '';
- return e || (c = !1, e = '_@r' + (q += 1)),
- e = s(e),
- a = e[0],
- e = e[1],
- a && (a = n(a, f, i), u = m(j, a)),
- e && (a ? h = u && u.normalize ? u.normalize(e, function (e) {
- return n(e, f, i)
- }) : - 1 === e.indexOf('!') ? n(e, f, i) : e : (h = n(e, f, i), e = s(h), a = e[0], h = e[1], r = !0, o = x.nameToUrl(h))),
- r = a && !u && !r ? '_unnormalized' + (W += 1) : '',
- {
- prefix: a,
- name: h,
- parentMap: t,
- unnormalized: !!r,
- url: o,
- originalName: l,
- isDefine: c,
- id: (a ? a + '!' + h : h) + r
- }
- }
- function a(e) {
- var t = e.id,
- n = m(O, t);
- return n || (n = O[t] = new x.Module(e)),
- n
- }
- function f(e, n, r) {
- var i = e.id,
- s = m(O, i);
- t(j, i) && (!s || s.defineEmitComplete) ? 'defined' === n && r(j[i]) : (s = a(e), s.error && 'error' === n) ? r(s.error) : s.on(n, r)
- }
- function l(e, t) {
- var n = e.requireModules,
- r = !1;
- t ? t(e) : (v(n, function (t) {
- if (t = m(O, t)) t.error = e,
- t.events.error && (r = !0, t.emit('error', e))
- }), !r) && g.onError(e)
- }
- function c() {
- R.length && (ha.apply(P, [
- P.length,
- 0
- ].concat(R)), R = [
- ])
- }
- function h(e) {
- delete O[e],
- delete _[e]
- }
- function p(e, t, n) {
- var r = e.map.id;
- e.error ? e.emit('error', e.error) : (t[r] = !0, v(e.depMaps, function (r, i) {
- var s = r.id,
- o = m(O, s);
- o && !e.depMatched[i] && !n[s] && (m(t, s) ? (e.defineDep(i, j[s]), e.check()) : p(o, t, n))
- }), n[r] = !0)
- }
- function d() {
- var e,
- t,
- n = (e = 1000 * A.waitSeconds) && x.startTime + e < (new Date).getTime(),
- s = [
- ],
- o = [
- ],
- u = !1,
- a = !0;
- if (!E) {
- E = !0,
- B(_, function (e) {
- var f = e.map,
- l = f.id;
- if (e.enabled && (f.isDefine || o.push(e), !e.error)) if (!e.inited && n) i(l) ? u = t = !0 : (s.push(l), r(l));
- else if (!e.inited && e.fetched && f.isDefine && (u = !0, !f.prefix)) return a = !1
- });
- if (n && s.length) return e = C('timeout', 'Load timeout for modules: ' + s, null, s),
- e.contextName = x.contextName,
- l(e);
- a && v(o, function (e) {
- p(e, {
- }, {
- })
- }),
- (!n || t) && u && (z || ea) && !L && (L = setTimeout(function () {
- L = 0,
- d()
- }, 50)),
- E = !1
- }
- }
- function y(e) {
- t(j, e[0]) || a(o(e[0], null, !0)).init(e[1], e[2])
- }
- function b(e) {
- var e = e.currentTarget || e.srcElement,
- t = x.onScriptLoad;
- return e.detachEvent && !Y ? e.detachEvent('onreadystatechange', t) : e.removeEventListener('load', t, !1),
- t = x.onScriptError,
- (!e.detachEvent || Y) && e.removeEventListener('error', t, !1),
- {
- node: e,
- id: e && e.getAttribute('data-requiremodule')
- }
- }
- function w() {
- var e;
- for (c(); P.length; ) {
- e = P.shift();
- if (null === e[0]) return l(C('mismatch', 'Mismatched anonymous define() module: ' + e[e.length - 1]));
- y(e)
- }
- }
- var E,
- S,
- x,
- k,
- L,
- A = {
- waitSeconds: 7,
- baseUrl: './',
- paths: {
- },
- bundles: {
- },
- pkgs: {
- },
- shim: {
- },
- config: {
- }
- },
- O = {
- },
- _ = {
- },
- D = {
- },
- P = [
- ],
- j = {
- },
- F = {
- },
- I = {
- },
- q = 1,
- W = 1;
- return k = {
- require: function (e) {
- return e.require ? e.require : e.require = x.makeRequire(e.map)
- },
- exports: function (e) {
- e.usingExports = !0;
- if (e.map.isDefine) return e.exports ? j[e.map.id] = e.exports : e.exports = j[e.map.id] = {
- }
- },
- module: function (e) {
- return e.module ? e.module : e.module = {
- id: e.map.id,
- uri: e.map.url,
- config: function () {
- return m(A.config, e.map.id) || {
- }
- },
- exports: e.exports || (e.exports = {
- })
- }
- }
- },
- S = function (e) {
- this.events = m(D, e.id) || {
- },
- this.map = e,
- this.shim = m(A.shim, e.id),
- this.depExports = [
- ],
- this.depMaps = [
- ],
- this.depMatched = [
- ],
- this.pluginMaps = {
- },
- this.depCount = 0
- },
- S.prototype = {
- init: function (e, t, n, r) {
- r = r || {
- },
- this.inited || (this.factory = t, n ? this.on('error', n) : this.events.error && (n = u(this, function (e) {
- this.emit('error', e)
- })), this.depMaps = e && e.slice(0), this.errback = n, this.inited = !0, this.ignore = r.ignore, r.enabled || this.enabled ? this.enable() : this.check())
- },
- defineDep: function (e, t) {
- this.depMatched[e] || (this.depMatched[e] = !0, this.depCount -= 1, this.depExports[e] = t)
- },
- fetch: function () {
- if (!this.fetched) {
- this.fetched = !0,
- x.startTime = (new Date).getTime();
- var e = this.map;
- if (!this.shim) return e.prefix ? this.callPlugin() : this.load();
- x.makeRequire(this.map, {
- enableBuildCallback: !0
- }) (this.shim.deps || [
- ], u(this, function () {
- return e.prefix ? this.callPlugin() : this.load()
- }))
- }
- },
- load: function () {
- var e = this.map.url;
- F[e] || (F[e] = !0, x.load(this.map.id, e))
- },
- check: function () {
- if (this.enabled && !this.enabling) {
- var e,
- t,
- n = this.map.id;
- t = this.depExports;
- var r = this.exports,
- i = this.factory;
- if (this.inited) {
- if (this.error) this.emit('error', this.error);
- else if (!this.defining) {
- this.defining = !0;
- if (1 > this.depCount && !this.defined) {
- if (G(i)) {
- if (this.events.error && this.map.isDefine || g.onError !== ca) try {
- r = x.execCb(n, i, t, r)
- } catch (s) {
- e = s
- } else r = x.execCb(n, i, t, r);
- this.map.isDefine && void 0 === r && ((t = this.module) ? r = t.exports : this.usingExports && (r = this.exports));
- if (e) return e.requireMap = this.map,
- e.requireModules = this.map.isDefine ? [
- this.map.id
- ] : null,
- e.requireType = this.map.isDefine ? 'define' : 'require',
- l(this.error = e)
- } else r = i;
- this.exports = r,
- this.map.isDefine && !this.ignore && (j[n] = r, g.onResourceLoad) && g.onResourceLoad(x, this.map, this.depMaps),
- h(n),
- this.defined = !0
- }
- this.defining = !1,
- this.defined && !this.defineEmitted && (this.defineEmitted = !0, this.emit('defined', this.exports), this.defineEmitComplete = !0)
- }
- } else this.fetch()
- }
- },
- callPlugin: function () {
- var e = this.map,
- r = e.id,
- i = o(e.prefix);
- this.depMaps.push(i),
- f(i, 'defined', u(this, function (i) {
- var s,
- c;
- c = m(I, this.map.id);
- var p = this.map.name,
- d = this.map.parentMap ? this.map.parentMap.name : null,
- v = x.makeRequire(e.parentMap, {
- enableBuildCallback: !0
- });
- if (this.map.unnormalized) {
- if (i.normalize && (p = i.normalize(p, function (e) {
- return n(e, d, !0)
- }) || ''), i = o(e.prefix + '!' + p, this.map.parentMap), f(i, 'defined', u(this, function (e) {
- this.init([], function () {
- return e
- }, null, {
- enabled: !0,
- ignore: !0
- })
- })), c = m(O, i.id)) this.depMaps.push(i),
- this.events.error && c.on('error', u(this, function (e) {
- this.emit('error', e)
- })),
- c.enable()
- } else c ? (this.map.url = x.nameToUrl(c), this.load()) : (s = u(this, function (e) {
- this.init([], function () {
- return e
- }, null, {
- enabled: !0
- })
- }), s.error = u(this, function (e) {
- this.inited = !0,
- this.error = e,
- e.requireModules = [
- r
- ],
- B(O, function (e) {
- 0 === e.map.id.indexOf(r + '_unnormalized') && h(e.map.id)
- }),
- l(e)
- }), s.fromText = u(this, function (n, i) {
- var u = e.name,
- f = o(u),
- c = M;
- i && (n = i),
- c && (M = !1),
- a(f),
- t(A.config, r) && (A.config[u] = A.config[r]);
- try {
- g.exec(n)
- } catch (h) {
- return l(C('fromtexteval', 'fromText eval for ' + r + ' failed: ' + h, h, [
- r
- ]))
- }
- c && (M = !0),
- this.depMaps.push(f),
- x.completeLoad(u),
- v([u], s)
- }), i.load(e.name, v, s, A))
- })),
- x.enable(i, this),
- this.pluginMaps[i.id] = i
- },
- enable: function () {
- _[this.map.id] = this,
- this.enabling = this.enabled = !0,
- v(this.depMaps, u(this, function (e, n) {
- var r,
- i;
- if ('string' == typeof e) {
- e = o(e, this.map.isDefine ? this.map : this.map.parentMap, !1, !this.skipMap),
- this.depMaps[n] = e;
- if (r = m(k, e.id)) {
- this.depExports[n] = r(this);
- return
- }
- this.depCount += 1,
- f(e, 'defined', u(this, function (e) {
- this.defineDep(n, e),
- this.check()
- })),
- this.errback && f(e, 'error', u(this, this.errback))
- }
- r = e.id,
- i = O[r],
- !t(k, r) && i && !i.enabled && x.enable(e, this)
- })),
- B(this.pluginMaps, u(this, function (e) {
- var t = m(O, e.id);
- t && !t.enabled && x.enable(e, this)
- })),
- this.enabling = !1,
- this.check()
- },
- on: function (e, t) {
- var n = this.events[e];
- n || (n = this.events[e] = [
- ]),
- n.push(t)
- },
- emit: function (e, t) {
- v(this.events[e], function (e) {
- e(t)
- }),
- 'error' === e && delete this.events[e]
- }
- },
- x = {
- config: A,
- contextName: e,
- registry: O,
- defined: j,
- urlFetched: F,
- defQueue: P,
- Module: S,
- makeModuleMap: o,
- nextTick: g.nextTick,
- onError: l,
- configure: function (e) {
- e.baseUrl && '/' !== e.baseUrl.charAt(e.baseUrl.length - 1) && (e.baseUrl += '/');
- var t = A.shim,
- n = {
- paths: !0,
- bundles: !0,
- config: !0,
- map: !0
- };
- B(e, function (e, t) {
- n[t] ? (A[t] || (A[t] = {
- }), U(A[t], e, !0, !0)) : A[t] = e
- }),
- e.bundles && B(e.bundles, function (e, t) {
- v(e, function (e) {
- e !== t && (I[e] = t)
- })
- }),
- e.shim && (B(e.shim, function (e, n) {
- H(e) && (e = {
- deps: e
- }),
- (e.exports || e.init) && !e.exportsFn && (e.exportsFn = x.makeShimExports(e)),
- t[n] = e
- }), A.shim = t),
- e.packages && v(e.packages, function (e) {
- var t,
- e = 'string' == typeof e ? {
- name: e
- }
- : e;
- t = e.name,
- e.location && (A.paths[t] = e.location),
- A.pkgs[t] = e.name + '/' + (e.main || 'main').replace(ia, '').replace(Q, '')
- }),
- B(O, function (e, t) {
- !e.inited && !e.map.unnormalized && (e.map = o(t))
- }),
- (e.deps || e.callback) && x.require(e.deps || [
- ], e.callback)
- },
- makeShimExports: function (e) {
- return function () {
- var t;
- return e.init && (t = e.init.apply(ba, arguments)),
- t || e.exports && da(e.exports)
- }
- },
- makeRequire: function (i, s) {
- function u(n, r, f) {
- var c,
- h;
- return s.enableBuildCallback && r && G(r) && (r.__requireJsBuild = !0),
- 'string' == typeof n ? G(r) ? l(C('requireargs', 'Invalid require call'), f) : i && t(k, n) ? k[n](O[i.id]) : g.get ? g.get(x, n, i, u) : (c = o(n, i, !1, !0), c = c.id, t(j, c) ? j[c] : l(C('notloaded', 'Module name "' + c + '" has not been loaded yet for context: ' + e + (i ? '' : '. Use require([])')))) : (w(), x.nextTick(function () {
- w(),
- h = a(o(null, i)),
- h.skipMap = s.skipMap,
- h.init(n, r, f, {
- enabled: !0
- }),
- d()
- }), u)
- }
- return s = s || {
- },
- U(u, {
- isBrowser: z,
- toUrl: function (e) {
- var t,
- r = e.lastIndexOf('.'),
- s = e.split('/') [0];
- return - 1 !== r && ('.' !== s && '..' !== s || 1 < r) && (t = e.substring(r, e.length), e = e.substring(0, r)),
- x.nameToUrl(n(e, i && i.id, !0), t, !0)
- },
- defined: function (e) {
- return t(j, o(e, i, !1, !0).id)
- },
- specified: function (e) {
- return e = o(e, i, !1, !0).id,
- t(j, e) || t(O, e)
- }
- }),
- i || (u.undef = function (e) {
- c();
- var t = o(e, i, !0),
- n = m(O, e);
- r(e),
- delete j[e],
- delete F[t.url],
- delete D[e],
- T(P, function (t, n) {
- t[0] === e && P.splice(n, 1)
- }),
- n && (n.events.defined && (D[e] = n.events), h(e))
- }),
- u
- },
- enable: function (e) {
- m(O, e.id) && a(e).enable()
- },
- completeLoad: function (e) {
- var n,
- r,
- s = m(A.shim, e) || {
- },
- o = s.exports;
- for (c(); P.length; ) {
- r = P.shift();
- if (null === r[0]) {
- r[0] = e;
- if (n) break;
- n = !0
- } else r[0] === e && (n = !0);
- y(r)
- }
- r = m(O, e);
- if (!n && !t(j, e) && r && !r.inited) {
- if (A.enforceDefine && (!o || !da(o))) return i(e) ? void 0 : l(C('nodefine', 'No define call for ' + e, null, [
- e
- ]));
- y([e,
- s.deps || [
- ],
- s.exportsFn])
- }
- d()
- },
- nameToUrl: function (e, t, n) {
- var r,
- i,
- s;
- (r = m(A.pkgs, e)) && (e = r);
- if (r = m(I, e)) return x.nameToUrl(r, t, n);
- if (g.jsExtRegExp.test(e)) r = e + (t || '');
- else {
- r = A.paths,
- e = e.split('/');
- for (i = e.length; 0 < i; i -= 1) if (s = e.slice(0, i).join('/'), s = m(r, s)) {
- H(s) && (s = s[0]),
- e.splice(0, i, s);
- break
- }
- r = e.join('/'),
- r += t || (/^data\:|\?/.test(r) || n ? '' : '.js'),
- r = ('/' === r.charAt(0) || r.match(/^[\w\+\.\-]+:/) ? '' : A.baseUrl) + r
- }
- return A.urlArgs ? r + (( - 1 === r.indexOf('?') ? '?' : '&') + A.urlArgs) : r
- },
- load: function (e, t) {
- g.load(x, e, t)
- },
- execCb: function (e, t, n, r) {
- return t.apply(r, n)
- },
- onScriptLoad: function (e) {
- if ('load' === e.type || ja.test((e.currentTarget || e.srcElement).readyState)) N = null,
- e = b(e),
- x.completeLoad(e.id)
- },
- onScriptError: function (e) {
- var t = b(e);
- if (!i(t.id)) return l(C('scripterror', 'Script error for: ' + t.id, e, [
- t.id
- ]))
- }
- },
- x.require = x.makeRequire(),
- x
- }
- var g,
- x,
- y,
- D,
- I,
- E,
- N,
- J,
- s,
- O,
- ka = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,
- la = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
- Q = /\.js$/,
- ia = /^\.\//;
- x = Object.prototype;
- var K = x.toString,
- fa = x.hasOwnProperty,
- ha = Array.prototype.splice,
- z = 'undefined' != typeof window && 'undefined' != typeof navigator && !!window.document,
- ea = !z && 'undefined' != typeof importScripts,
- ja = z && 'PLAYSTATION 3' === navigator.platform ? /^complete$/ : /^(complete|loaded)$/,
- Y = 'undefined' != typeof opera && '[object Opera]' === opera.toString(),
- F = {
- },
- q = {
- },
- R = [
- ],
- M = !1;
- if ('undefined' == typeof define) {
- if ('undefined' != typeof requirejs) {
- if (G(requirejs)) return;
- q = requirejs,
- requirejs = void 0
- }
- 'undefined' != typeof require && !G(require) && (q = require, require = void 0),
- g = requirejs = function (e, t, n, r) {
- var i,
- s = '_';
- return !H(e) && 'string' != typeof e && (i = e, H(t) ? (e = t, t = n, n = r) : e = [
- ]),
- i && i.context && (s = i.context),
- (r = m(F, s)) || (r = F[s] = g.s.newContext(s)),
- i && r.configure(i),
- r.require(e, t, n)
- },
- g.config = function (e) {
- return g(e)
- },
- g.nextTick = 'undefined' != typeof setTimeout ? function (e) {
- setTimeout(e, 4)
- }
- : function (e) {
- e()
- },
- require || (require = g),
- g.version = '2.1.14',
- g.jsExtRegExp = /^\/|:|\?|\.js$/,
- g.isBrowser = z,
- x = g.s = {
- contexts: F,
- newContext: ga
- },
- g({
- }),
- v(['toUrl',
- 'undef',
- 'defined',
- 'specified'], function (e) {
- g[e] = function () {
- var t = F._;
- return t.require[e].apply(t, arguments)
- }
- }),
- z && (y = x.head = document.getElementsByTagName('head') [0], D = document.getElementsByTagName('base') [0]) && (y = x.head = D.parentNode),
- g.onError = ca,
- g.createNode = function (e) {
- var t = e.xhtml ? document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : document.createElement('script');
- return t.type = e.scriptType || 'text/javascript',
- t.charset = 'utf-8',
- t.async = !0,
- t
- },
- g.load = function (e, t, n) {
- var r = e && e.config || {
- };
- if (z) return r = g.createNode(r, t, n),
- r.setAttribute('data-requirecontext', e.contextName),
- r.setAttribute('data-requiremodule', t),
- r.attachEvent && !(r.attachEvent.toString && 0 > r.attachEvent.toString().indexOf('[native code')) && !Y ? (M = !0, r.attachEvent('onreadystatechange', e.onScriptLoad)) : (r.addEventListener('load', e.onScriptLoad, !1), r.addEventListener('error', e.onScriptError, !1)),
- r.src = n,
- J = r,
- D ? y.insertBefore(r, D) : y.appendChild(r),
- J = null,
- r;
- if (ea) try {
- importScripts(n),
- e.completeLoad(t)
- } catch (i) {
- e.onError(C('importscripts', 'importScripts failed for ' + t + ' at ' + n, i, [
- t
- ]))
- }
- },
- q.skipDataMain = !0,
- z && !q.skipDataMain && T(document.getElementsByTagName('script'), function (e) {
- y || (y = e.parentNode);
- if (I = e.getAttribute('data-main')) return s = I,
- q.baseUrl || (E = s.split('/'), s = E.pop(), O = E.length ? E.join('/') + '/' : './', q.baseUrl = O),
- s = s.replace(Q, ''),
- g.jsExtRegExp.test(s) && (s = I),
- q.deps = q.deps ? q.deps.concat(s) : [
- s
- ],
- !0
- }),
- define = function (e, t, n) {
- var r,
- i;
- 'string' != typeof e && (n = t, t = e, e = null),
- H(t) || (n = t, t = null),
- !t && G(n) && (t = [
- ], n.length && (n.toString().replace(ka, '').replace(la, function (e, n) {
- t.push(n)
- }), t = (1 === n.length ? [
- 'require'
- ] : [
- 'require',
- 'exports',
- 'module'
- ]).concat(t))),
- M && ((r = J) || (N && 'interactive' === N.readyState || T(document.getElementsByTagName('script'), function (e) {
- if ('interactive' === e.readyState) return N = e
- }), r = N), r && (e || (e = r.getAttribute('data-requiremodule')), i = F[r.getAttribute('data-requirecontext')])),
- (i ? i.defQueue : R).push([e,
- t,
- n])
- },
- define.amd = {
- jQuery: !0
- },
- g.exec = function (b) {
- return eval(b)
- },
- g(q)
- }
- tp.prototype = function () {
- function t(e, t) {
- return e.lastIndexOf('/') == e.length - 1 && (e = e.substr(0, e.length - 1)),
- e.match(/\/v3$/) && (e = e.substr(0, e.lastIndexOf('/v3'))),
- e.match(/\/api$/) && (e = e.substr(0, e.lastIndexOf('/api'))),
- e.match(/^(http[s]?:)?\/\//) || (e = '//' + e),
- typeof t != 'undefined' && t && !e.match(/^http[s]?:/) && (e = 'https:' + e),
- e
- }
- var e = [
- ],
- n = function (e) {
- var n = 'https://buy.tinypass.com';
- return tp.sandbox === !0 && (tp.endpoint = 'sandbox'),
- tp.endpoint && (tp.endpoint === 'sandbox' ? n = 'https://sandbox.tinypass.com' : tp.endpoint !== 'prod' && tp.endpoint !== 'production' && (n = tp.endpoint)),
- t(n, e)
- },
- r = function () {
- return n() + '/api/v3'
- },
- s = function (e) {
- var n = 'https://experience.tinypass.com';
- return tp.sandbox === !0 && (tp.endpoint = 'sandbox'),
- tp.endpoint && (tp.endpoint === 'sandbox' ? n = 'https://sandbox.tinypass.com' : tp.endpoint !== 'prod' && tp.endpoint !== 'production' && (n = tp.endpoint, n = n.replace('//buy.tinypass.com', '//experience.tinypass.com'), n = n.replace('//api.tinypass.com', '//experience.tinypass.com'), n = n.replace('//buy-au.piano.io', '//experience-au.piano.io'), n = n.replace('//api-au.piano.io', '//experience-au.piano.io'))),
- t(n, e)
- },
- o = function () {
- return tp.sandbox === !0 || tp.endpoint === 'sandbox' || tp.endpoint.indexOf('//sandbox.tinypass.com') !== - 1
- },
- u = {
- constructor: tp,
- pageTrack: function (e, t) {
- tp.require(['main'], function (n) {
- n.pageTrack(e, t)
- })
- },
- trackPage: function (e, t) {
- tp.require(['main'], function (n) {
- n.pageTrack(e, t)
- })
- },
- trackPageUnload: function () {
- tp.require(['main'], function (e) {
- e.trackPageUnload()
- })
- },
- trackAds: function (e) {
- tp.require(['main'], function (t) {
- t.trackAds(e)
- })
- },
- trackAd: function (e, t, n) {
- tp.require(['main'], function (r) {
- r.trackAd(e, t, n)
- })
- },
- onLoad: function (t) {
- e.push(t)
- },
- getEndpointRoot: function (e) {
- return n(e)
- },
- getExperienceEndpoint: function (e) {
- return s(e)
- },
- getApiEndpoint: function () {
- return r()
- },
- isSandbox: function () {
- return o()
- }
- };
- return u.require = require,
- u.define = define,
- u.loadRequireJs = function (e) {
- u.isInitRequired = !0;
- var t = [
- 'jq',
- 'main',
- 'api',
- 'offer',
- 'template',
- 'myaccount',
- 'require-css/css',
- 'util',
- 'postmessage',
- 'user',
- 'meter',
- 'fingerprint',
- 'murmurhash3',
- 'jwtDecode',
- 'janrain',
- 'gigya',
- 'tinypassAccounts',
- 'tinypassLogin',
- 'containerUtils',
- 'eventUtils',
- 'experience',
- 'activetimer',
- 'scrollDepth',
- 'ifvisible',
- 'doubleClickForPublisher',
- 'viewportExit',
- 'condeUserProvider',
- 'log',
- 'pianoId',
- 'observer',
- 'applePay',
- 'idle',
- 'gaService',
- 'interaction',
- 'pianoEsp',
- 'versionService',
- 'amp',
- 'performanceMetrics',
- 'swg',
- 'fbpixel',
- 'fbsubscriptions'
- ];
- for (var n = t.length; n--; ) window.tp[t[n]] = null;
- var r = function () {
- var e = tp.getEndpointRoot();
- return e.indexOf('//buy.tinypass.com') != - 1 && (e = e.replace(/\/\/buy.tinypass.com/, '//cdn.tinypass.com')),
- e + '/api/libs'
- },
- i = function () {
- var e = tp.getEndpointRoot();
- return e.indexOf('//buy.tinypass.com') != - 1 && (e = e.replace(/\/\/buy.tinypass.com/, '//cdn.tinypass.com')),
- e + '/api/libs/external'
- };
- window.tp.require.config({
- baseUrl: r(),
- urlArgs: tp.debug ? 'cachebust=' + (new Date).getTime() : ''
- }),
- tp.require(['jq',
- 'main',
- 'api',
- 'offer',
- 'template',
- 'myaccount',
- 'require-css/css',
- 'util',
- 'postmessage',
- 'user',
- 'meter',
- 'fingerprint',
- 'murmurhash3',
- 'jwtDecode',
- 'janrain',
- 'gigya',
- 'tinypassAccounts',
- 'tinypassLogin',
- 'containerUtils',
- 'eventUtils',
- 'experience',
- 'activetimer',
- 'scrollDepth',
- 'ifvisible',
- 'doubleClickForPublisher',
- 'viewportExit',
- 'condeUserProvider',
- 'pianoId',
- 'observer',
- 'applePay',
- 'idle',
- 'interaction',
- 'require-css/css!styles/offer',
- 'log',
- 'gaService',
- 'pianoEsp',
- 'versionService',
- 'amp',
- 'performanceMetrics',
- 'swg',
- 'fbpixel',
- 'fbsubscriptions'], function (t) {
- var n;
- window.tp.require.config({
- baseUrl: i(),
- urlArgs: tp.debug ? 'cachebust=' + (new Date).getTime() : ''
- });
- for (n = 0; n < arguments.length; ++n) {
- if (!arguments[n] || !arguments[n].name) continue;
- if (arguments[n].name === 'main' && !arguments[n].init) continue;
- window.tp[arguments[n].name] = arguments[n]
- }
- window.tp.jq = t,
- window.tp.isRequireLoaded = !0;
- if (__tp) {
- var r = [
- ];
- for (n = 0; n < __tp.length; n++) __tp[n][0] === 'init' && r.push(__tp[n][1]);
- r.length && tp._init(r),
- __tp = null
- }
- tp.externalLibraries.length ? require(tp.externalLibraries, function () {
- tp.externalLibraries = [
- ];
- if (tp.externalLibrariesCallbacks) for (var t = 0; t < tp.externalLibrariesCallbacks.length; ++t) tp.externalLibrariesCallbacks[t]();
- tp.externalLibrariesCallbacks = [
- ],
- e && e()
- }) : e && e(),
- tp.loadRequireReady(),
- window.tp.getGAClientId() && window.tp.gaService.setClientId(window.tp.getGAClientId())
- })
- },
- u.loadRequireReady = function () {
- u.isInitRequireFinished = !0;
- for (i = 0; i < u.initFinishedCallbacks.length; ++i) u.initFinishedCallbacks[i]();
- u.initFinishedCallbacks = [
- ]
- },
- u.push = function () {
- var e,
- t,
- n;
- for (e = 0; e < arguments.length; e++) {
- n = arguments[e],
- t = n.shift();
- if (typeof t == 'string' || t instanceof String) {
- if (!window.tp[t]) throw new Error('Undefined method ' + t);
- window.tp[t].apply(window.tp, n)
- } else t.apply(window.tp, n)
- }
- },
- u.appList = [
- ],
- u.isInitRequired = !1,
- u.isInitRequireFinished = !1,
- u.isRequireLoaded = !1,
- u.isInitialized = !1,
- u.initCallbacks = [
- ],
- u.initFinishedCallbacks = [
- ],
- u._init = function (e) {
- tp.aid === 'B6sIXKLiin' && (tp.usePianoIdUserProvider = !0, tp.setUseTinypassAccounts = !1);
- var t,
- n = [
- ];
- Array.isArray(e) ? n = e : e && n.push(e);
- if (!tp.isRequireLoaded) {
- for (var r = 0; r < n.length; r++) tp.initCallbacks.push(n[r]);
- setTimeout(function () {
- tp._init()
- }, 50)
- } else {
- window.tp.util && window.tp.util.hasQueryParamByName('xpdebug') && tp.setDebug(!0),
- tp.api.setUserProvider(tp.user.getProvider()),
- tp.util.setTpccCookies();
- if (tp.util.isIOsUiWebView() && !tp.user.isUserValid() && tp.util.getQueryParamByName('userToken')) {
- var i = tp.util.getQueryParamByName('cookieDomain'),
- s = tp.util.getQueryParamByName('userToken'),
- o = tp.util.getQueryParamByName('tokenListValue');
- tp.util.setAccessTokenListCookie({
- cookie_domain: i,
- value: o
- }, s)
- }
- tp.user.providerInit();
- for (t = 0; t < tp.initCallbacks.length; ++t) tp.initCallbacks[t]();
- tp.isInitialized = !0,
- tp.initCallbacks = [
- ];
- if (tp.events) {
- for (t = 0; t < tp.events.length; t++) tp.events[t]();
- tp.events = [
- ]
- }
- for (var r = 0; r < n.length; r++) n[r]();
- tp.appList.indexOf(tp.aid) < 0 && (tp.appList.push(tp.aid), tp.main.init())
- }
- },
- u.init = function (e) {
- var t = function () {
- u._init(e)
- };
- u.isInitRequired ? u.isInitRequireFinished ? t() : u.initFinishedCallbacks.push(t) : window.tp.loadRequireJs(t)
- },
- u
- }()
- }) (this)
- }(),
- tp = new tp,
- window.tp = tp;
- if (__tp) {
- for (var i = 0; i < __tp.length; i++) __tp[i][0] != 'init' && tp.push(__tp[i]);
- tp.loadRequireJs()
- }
- },
- window.___tp(),
- tp.define('tinypass', function () {
- }),
- function (e, t) {
- function n(e) {
- return B.isWindow(e) ? e : e.nodeType === 9 ? e.defaultView || e.parentWindow : !1
- }
- function r(e) {
- if (!mn[e]) {
- var t = D.body,
- n = B('<' + e + '>').appendTo(t),
- r = n.css('display');
- n.remove();
- if (r === 'none' || r === '') {
- gn || (gn = D.createElement('iframe'), gn.frameBorder = gn.width = gn.height = 0),
- t.appendChild(gn);
- if (!yn || !gn.createElement) yn = (gn.contentWindow || gn.contentDocument).document,
- yn.write((D.compatMode === 'CSS1Compat' ? '<!doctype html>' : '') + '<html><body>'),
- yn.close();
- n = yn.createElement(e),
- yn.body.appendChild(n),
- r = B.css(n, 'display'),
- t.removeChild(gn)
- }
- mn[e] = r
- }
- return mn[e]
- }
- function i(e, t) {
- var n = {
- };
- return B.each(Sn.concat.apply([], Sn.slice(0, t)), function () {
- n[this] = e
- }),
- n
- }
- function s() {
- xn = t
- }
- function o() {
- return setTimeout(s, 0),
- xn = B.now()
- }
- function u() {
- try {
- return new e.ActiveXObject('Microsoft.XMLHTTP')
- } catch (t) {
- }
- }
- function a() {
- try {
- return new e.XMLHttpRequest
- } catch (t) {
- }
- }
- function f(e, n) {
- e.dataFilter && (n = e.dataFilter(n, e.dataType));
- var r = e.dataTypes,
- i = {
- },
- s,
- o,
- u = r.length,
- a,
- f = r[0],
- l,
- c,
- h,
- p,
- d;
- for (s = 1; s < u; s++) {
- if (s === 1) for (o in e.converters) typeof o == 'string' && (i[o.toLowerCase()] = e.converters[o]);
- l = f,
- f = r[s];
- if (f === '*') f = l;
- else if (l !== '*' && l !== f) {
- c = l + ' ' + f,
- h = i[c] || i['* ' + f];
- if (!h) {
- d = t;
- for (p in i) {
- a = p.split(' ');
- if (a[0] === l || a[0] === '*') {
- d = i[a[1] + ' ' + f];
- if (d) {
- p = i[p],
- p === !0 ? h = d : d === !0 && (h = p);
- break
- }
- }
- }
- }
- !h && !d && B.error('No conversion from ' + c.replace(' ', ' to ')),
- h !== !0 && (n = h ? h(n) : d(p(n)))
- }
- }
- return n
- }
- function l(e, n, r) {
- var i = e.contents,
- s = e.dataTypes,
- o = e.responseFields,
- u,
- a,
- f,
- l;
- for (a in o) a in r && (n[o[a]] = r[a]);
- while (s[0] === '*') s.shift(),
- u === t && (u = e.mimeType || n.getResponseHeader('content-type'));
- if (u) for (a in i) if (i[a] && i[a].test(u)) {
- s.unshift(a);
- break
- }
- if (s[0] in r) f = s[0];
- else {
- for (a in r) {
- if (!s[0] || e.converters[a + ' ' + s[0]]) {
- f = a;
- break
- }
- l || (l = a)
- }
- f = f || l
- }
- if (f) return f !== s[0] && s.unshift(f),
- r[f]
- }
- function c(e, t, n, r) {
- if (B.isArray(t)) B.each(t, function (t, i) {
- n || zt.test(e) ? r(e, i) : c(e + '[' + (typeof i == 'object' || B.isArray(i) ? t : '') + ']', i, n, r)
- });
- else if (!n && t != null && typeof t == 'object') for (var i in t) c(e + '[' + i + ']', t[i], n, r);
- else r(e, t)
- }
- function h(e, n) {
- var r,
- i,
- s = B.ajaxSettings.flatOptions || {
- };
- for (r in n) n[r] !== t && ((s[r] ? e : i || (i = {
- })) [r] = n[r]);
- i && B.extend(!0, e, i)
- }
- function p(e, n, r, i, s, o) {
- s = s || n.dataTypes[0],
- o = o || {
- },
- o[s] = !0;
- var u = e[s],
- a = 0,
- f = u ? u.length : 0,
- l = e === sn,
- c;
- for (; a < f && (l || !c); a++) c = u[a](n, r, i),
- typeof c == 'string' && (!l || o[c] ? c = t : (n.dataTypes.unshift(c), c = p(e, n, r, i, c, o)));
- return (l || !c) && !o['*'] && (c = p(e, n, r, i, '*', o)),
- c
- }
- function d(e) {
- return function (t, n) {
- typeof t != 'string' && (n = t, t = '*');
- if (B.isFunction(n)) {
- var r = t.toLowerCase().split(en),
- i = 0,
- s = r.length,
- o,
- u,
- a;
- for (; i < s; i++) o = r[i],
- a = /^\+/.test(o),
- a && (o = o.substr(1) || '*'),
- u = e[o] = e[o] || [
- ],
- u[a ? 'unshift' : 'push'](n)
- }
- }
- }
- function v(e, t, n) {
- var r = t === 'width' ? e.offsetWidth : e.offsetHeight,
- i = t === 'width' ? jt : Ft,
- s = 0,
- o = i.length;
- if (r > 0) {
- if (n !== 'border') for (; s < o; s++) n || (r -= parseFloat(B.css(e, 'padding' + i[s])) || 0),
- n === 'margin' ? r += parseFloat(B.css(e, n + i[s])) || 0 : r -= parseFloat(B.css(e, 'border' + i[s] + 'Width')) || 0;
- return r + 'px'
- }
- r = It(e, t, t);
- if (r < 0 || r == null) r = e.style[t] || 0;
- r = parseFloat(r) || 0;
- if (n) for (; s < o; s++) r += parseFloat(B.css(e, 'padding' + i[s])) || 0,
- n !== 'padding' && (r += parseFloat(B.css(e, 'border' + i[s] + 'Width')) || 0),
- n === 'margin' && (r += parseFloat(B.css(e, n + i[s])) || 0);
- return r + 'px'
- }
- function m(e, t) {
- t.src ? B.ajax({
- url: t.src,
- async: !1,
- dataType: 'script'
- }) : B.globalEval((t.text || t.textContent || t.innerHTML || '').replace(kt, '/*$0*/')),
- t.parentNode && t.parentNode.removeChild(t)
- }
- function g(e) {
- var t = D.createElement('div');
- return At.appendChild(t),
- t.innerHTML = e.outerHTML,
- t.firstChild
- }
- function y(e) {
- var t = (e.nodeName || '').toLowerCase();
- t === 'input' ? b(e) : t !== 'script' && typeof e.getElementsByTagName != 'undefined' && B.grep(e.getElementsByTagName('input'), b)
- }
- function b(e) {
- if (e.type === 'checkbox' || e.type === 'radio') e.defaultChecked = e.checked
- }
- function w(e) {
- return typeof e.getElementsByTagName != 'undefined' ? e.getElementsByTagName('*') : typeof e.querySelectorAll != 'undefined' ? e.querySelectorAll('*') : [
- ]
- }
- function E(e, t) {
- var n;
- if (t.nodeType === 1) {
- t.clearAttributes && t.clearAttributes(),
- t.mergeAttributes && t.mergeAttributes(e),
- n = t.nodeName.toLowerCase();
- if (n === 'object') t.outerHTML = e.outerHTML;
- else if (n !== 'input' || e.type !== 'checkbox' && e.type !== 'radio') {
- if (n === 'option') t.selected = e.defaultSelected;
- else if (n === 'input' || n === 'textarea') t.defaultValue = e.defaultValue
- } else e.checked && (t.defaultChecked = t.checked = e.checked),
- t.value !== e.value && (t.value = e.value);
- t.removeAttribute(B.expando)
- }
- }
- function S(e, t) {
- if (t.nodeType === 1 && !!B.hasData(e)) {
- var n,
- r,
- i,
- s = B._data(e),
- o = B._data(t, s),
- u = s.events;
- if (u) {
- delete o.handle,
- o.events = {
- };
- for (n in u) for (r = 0, i = u[n].length; r < i; r++) B.event.add(t, n + (u[n][r].namespace ? '.' : '') + u[n][r].namespace, u[n][r], u[n][r].data)
- }
- o.data && (o.data = B.extend({
- }, o.data))
- }
- }
- function x(e, t) {
- return B.nodeName(e, 'table') ? e.getElementsByTagName('tbody') [0] || e.appendChild(e.ownerDocument.createElement('tbody')) : e
- }
- function T(e) {
- var t = vt.split('|'),
- n = e.createDocumentFragment();
- if (n.createElement) while (t.length) n.createElement(t.pop());
- return n
- }
- function N(e, t, n) {
- t = t || 0;
- if (B.isFunction(t)) return B.grep(e, function (e, r) {
- var i = !!t.call(e, r, e);
- return i === n
- });
- if (t.nodeType) return B.grep(e, function (e, r) {
- return e === t === n
- });
- if (typeof t == 'string') {
- var r = B.grep(e, function (e) {
- return e.nodeType === 1
- });
- if (ct.test(t)) return B.filter(t, r, !n);
- t = B.filter(t, r)
- }
- return B.grep(e, function (e, r) {
- return B.inArray(e, t) >= 0 === n
- })
- }
- function C(e) {
- return !e || !e.parentNode || e.parentNode.nodeType === 11
- }
- function k() {
- return !0
- }
- function L() {
- return !1
- }
- function A(e, t, n) {
- var r = t + 'defer',
- i = t + 'queue',
- s = t + 'mark',
- o = B._data(e, r);
- o && (n === 'queue' || !B._data(e, i)) && (n === 'mark' || !B._data(e, s)) && setTimeout(function () {
- !B._data(e, i) && !B._data(e, s) && (B.removeData(e, r, !0), o.fire())
- }, 0)
- }
- function O(e) {
- for (var t in e) {
- if (t === 'data' && B.isEmptyObject(e[t])) continue;
- if (t !== 'toJSON') return !1
- }
- return !0
- }
- function M(e, n, r) {
- if (r === t && e.nodeType === 1) {
- var i = 'data-' + n.replace(q, '-$1').toLowerCase();
- r = e.getAttribute(i);
- if (typeof r == 'string') {
- try {
- r = r === 'true' ? !0 : r === 'false' ? !1 : r === 'null' ? null : B.isNumeric(r) ? parseFloat(r) : I.test(r) ? B.parseJSON(r) : r
- } catch (s) {
- }
- B.data(e, n, r)
- } else r = t
- }
- return r
- }
- function _(e) {
- var t = j[e] = {
- },
- n,
- r;
- e = e.split(/\s+/);
- for (n = 0, r = e.length; n < r; n++) t[e[n]] = !0;
- return t
- }
- var D = e.document,
- P = e.navigator,
- H = e.location,
- B = function () {
- function n() {
- if (!r.isReady) {
- try {
- D.documentElement.doScroll('left')
- } catch (e) {
- setTimeout(n, 1);
- return
- }
- r.ready()
- }
- }
- var r = function (e, t) {
- return new r.fn.init(e, t, o)
- },
- i = e.jQuery,
- s = e.$,
- o,
- u = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
- a = /\S/,
- f = /^\s+/,
- l = /\s+$/,
- c = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
- h = /^[\],:{}\s]*$/,
- p = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
- d = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
- v = /(?:^|:|,)(?:\s*\[)+/g,
- m = /(webkit)[ \/]([\w.]+)/,
- g = /(opera)(?:.*version)?[ \/]([\w.]+)/,
- y = /(msie) ([\w.]+)/,
- b = /(mozilla)(?:.*? rv:([\w.]+))?/,
- w = /-([a-z]|[0-9])/gi,
- E = /^-ms-/,
- S = function (e, t) {
- return (t + '').toUpperCase()
- },
- x = P.userAgent,
- T,
- N,
- C,
- k = Object.prototype.toString,
- L = Object.prototype.hasOwnProperty,
- A = Array.prototype.push,
- O = Array.prototype.slice,
- M = String.prototype.trim,
- _ = Array.prototype.indexOf,
- H = {
- };
- return r.fn = r.prototype = {
- constructor: r,
- init: function (e, n, i) {
- var s,
- o,
- a,
- f;
- if (!e) return this;
- if (e.nodeType) return this.context = this[0] = e,
- this.length = 1,
- this;
- if (e === 'body' && !n && D.body) return this.context = D,
- this[0] = D.body,
- this.selector = e,
- this.length = 1,
- this;
- if (typeof e == 'string') {
- e.charAt(0) !== '<' || e.charAt(e.length - 1) !== '>' || e.length < 3 ? s = u.exec(e) : s = [
- null,
- e,
- null
- ];
- if (s && (s[1] || !n)) {
- if (s[1]) return n = n instanceof r ? n[0] : n,
- f = n ? n.ownerDocument || n : D,
- a = c.exec(e),
- a ? r.isPlainObject(n) ? (e = [
- D.createElement(a[1])
- ], r.fn.attr.call(e, n, !0)) : e = [
- f.createElement(a[1])
- ] : (a = r.buildFragment([s[1]], [
- f
- ]), e = (a.cacheable ? r.clone(a.fragment) : a.fragment).childNodes),
- r.merge(this, e);
- o = D.getElementById(s[2]);
- if (o && o.parentNode) {
- if (o.id !== s[2]) return i.find(e);
- this.length = 1,
- this[0] = o
- }
- return this.context = D,
- this.selector = e,
- this
- }
- return !n || n.jquery ? (n || i).find(e) : this.constructor(n).find(e)
- }
- return r.isFunction(e) ? i.ready(e) : (e.selector !== t && (this.selector = e.selector, this.context = e.context), r.makeArray(e, this))
- },
- selector: '',
- jquery: '1.7.1',
- length: 0,
- size: function () {
- return this.length
- },
- toArray: function () {
- return O.call(this, 0)
- },
- get: function (e) {
- return e == null ? this.toArray() : e < 0 ? this[this.length + e] : this[e]
- },
- pushStack: function (e, t, n) {
- var i = this.constructor();
- return r.isArray(e) ? A.apply(i, e) : r.merge(i, e),
- i.prevObject = this,
- i.context = this.context,
- t === 'find' ? i.selector = this.selector + (this.selector ? ' ' : '') + n : t && (i.selector = this.selector + '.' + t + '(' + n + ')'),
- i
- },
- each: function (e, t) {
- return r.each(this, e, t)
- },
- ready: function (e) {
- return r.bindReady(),
- N.add(e),
- this
- },
- eq: function (e) {
- return e = + e,
- e === - 1 ? this.slice(e) : this.slice(e, e + 1)
- },
- first: function () {
- return this.eq(0)
- },
- last: function () {
- return this.eq( - 1)
- },
- slice: function () {
- return this.pushStack(O.apply(this, arguments), 'slice', O.call(arguments).join(','))
- },
- map: function (e) {
- return this.pushStack(r.map(this, function (t, n) {
- return e.call(t, n, t)
- }))
- },
- end: function () {
- return this.prevObject || this.constructor(null)
- },
- push: A,
- sort: [
- ].sort,
- splice: [
- ].splice
- },
- r.fn.init.prototype = r.fn,
- r.extend = r.fn.extend = function () {
- var e,
- n,
- i,
- s,
- o,
- u,
- a = arguments[0] || {
- },
- f = 1,
- l = arguments.length,
- c = !1;
- typeof a == 'boolean' && (c = a, a = arguments[1] || {
- }, f = 2),
- typeof a != 'object' && !r.isFunction(a) && (a = {
- }),
- l === f && (a = this, --f);
- for (; f < l; f++) if ((e = arguments[f]) != null) for (n in e) {
- i = a[n],
- s = e[n];
- if (a === s) continue;
- c && s && (r.isPlainObject(s) || (o = r.isArray(s))) ? (o ? (o = !1, u = i && r.isArray(i) ? i : [
- ]) : u = i && r.isPlainObject(i) ? i : {
- }, a[n] = r.extend(c, u, s)) : s !== t && (a[n] = s)
- }
- return a
- },
- r.extend({
- noConflict: function (t) {
- return e.$ === r && (e.$ = s),
- t && e.jQuery === r && (e.jQuery = i),
- r
- },
- isReady: !1,
- readyWait: 1,
- holdReady: function (e) {
- e ? r.readyWait++ : r.ready(!0)
- },
- ready: function (e) {
- if (e === !0 && !--r.readyWait || e !== !0 && !r.isReady) {
- if (!D.body) return setTimeout(r.ready, 1);
- r.isReady = !0;
- if (e !== !0 && --r.readyWait > 0) return;
- N.fireWith(D, [
- r
- ]),
- r.fn.trigger && r(D).trigger('ready').off('ready')
- }
- },
- bindReady: function () {
- if (!N) {
- N = r.Callbacks('once memory');
- if (D.readyState === 'complete') return setTimeout(r.ready, 1);
- if (D.addEventListener) D.addEventListener('DOMContentLoaded', C, !1),
- e.addEventListener('load', r.ready, !1);
- else if (D.attachEvent) {
- D.attachEvent('onreadystatechange', C),
- e.attachEvent('onload', r.ready);
- var t = !1;
- try {
- t = e.frameElement == null
- } catch (i) {
- }
- D.documentElement.doScroll && t && n()
- }
- }
- },
- isFunction: function (e) {
- return r.type(e) === 'function'
- },
- isArray: Array.isArray || function (e) {
- return r.type(e) === 'array'
- },
- isWindow: function (e) {
- return e && typeof e == 'object' && 'setInterval' in e
- },
- isNumeric: function (e) {
- return !isNaN(parseFloat(e)) && isFinite(e)
- },
- type: function (e) {
- return e == null ? String(e) : H[k.call(e)] || 'object'
- },
- isPlainObject: function (e) {
- if (!e || r.type(e) !== 'object' || e.nodeType || r.isWindow(e)) return !1;
- try {
- if (e.constructor && !L.call(e, 'constructor') && !L.call(e.constructor.prototype, 'isPrototypeOf')) return !1
- } catch (n) {
- return !1
- }
- var i;
- for (i in e);
- return i === t || L.call(e, i)
- },
- isEmptyObject: function (e) {
- for (var t in e) return !1;
- return !0
- },
- error: function (e) {
- throw new Error(e)
- },
- parseJSON: function (t) {
- if (typeof t != 'string' || !t) return null;
- t = r.trim(t);
- if (e.JSON && e.JSON.parse) return e.JSON.parse(t);
- if (h.test(t.replace(p, '@').replace(d, ']').replace(v, ''))) return (new Function('return ' + t)) ();
- r.error('Invalid JSON: ' + t)
- },
- parseXML: function (n) {
- var i,
- s;
- try {
- e.DOMParser ? (s = new DOMParser, i = s.parseFromString(n, 'text/xml')) : (i = new ActiveXObject('Microsoft.XMLDOM'), i.async = 'false', i.loadXML(n))
- } catch (o) {
- i = t
- }
- return (!i || !i.documentElement || i.getElementsByTagName('parsererror').length) && r.error('Invalid XML: ' + n),
- i
- },
- noop: function () {
- },
- globalEval: function (t) {
- t && a.test(t) && (e.execScript || function (t) {
- e.eval.call(e, t)
- }) (t)
- },
- camelCase: function (e) {
- return e.replace(E, 'ms-').replace(w, S)
- },
- nodeName: function (e, t) {
- return e.nodeName && e.nodeName.toUpperCase() === t.toUpperCase()
- },
- each: function (e, n, i) {
- var s,
- o = 0,
- u = e.length,
- a = u === t || r.isFunction(e);
- if (i) {
- if (a) {
- for (s in e) if (n.apply(e[s], i) === !1) break
- } else for (; o < u; ) if (n.apply(e[o++], i) === !1) break
- } else if (a) {
- for (s in e) if (n.call(e[s], s, e[s]) === !1) break
- } else for (; o < u; ) if (n.call(e[o], o, e[o++]) === !1) break;
- return e
- },
- trim: M ? function (e) {
- return e == null ? '' : M.call(e)
- }
- : function (e) {
- return e == null ? '' : (e + '').replace(f, '').replace(l, '')
- },
- makeArray: function (e, t) {
- var n = t || [
- ];
- if (e != null) {
- var i = r.type(e);
- e.length == null || i === 'string' || i === 'function' || i === 'regexp' || r.isWindow(e) ? A.call(n, e) : r.merge(n, e)
- }
- return n
- },
- inArray: function (e, t, n) {
- var r;
- if (t) {
- if (_) return _.call(t, e, n);
- r = t.length,
- n = n ? n < 0 ? Math.max(0, r + n) : n : 0;
- for (; n < r; n++) if (n in t && t[n] === e) return n
- }
- return - 1
- },
- merge: function (e, n) {
- var r = e.length,
- i = 0;
- if (typeof n.length == 'number') for (var s = n.length; i < s; i++) e[r++] = n[i];
- else while (n[i] !== t) e[r++] = n[i++];
- return e.length = r,
- e
- },
- grep: function (e, t, n) {
- var r = [
- ],
- i;
- n = !!n;
- for (var s = 0, o = e.length; s < o; s++) i = !!t(e[s], s),
- n !== i && r.push(e[s]);
- return r
- },
- map: function (e, n, i) {
- var s,
- o,
- u = [
- ],
- a = 0,
- f = e.length,
- l = e instanceof r || f !== t && typeof f == 'number' && (f > 0 && e[0] && e[f - 1] || f === 0 || r.isArray(e));
- if (l) for (; a < f; a++) s = n(e[a], a, i),
- s != null && (u[u.length] = s);
- else for (o in e) s = n(e[o], o, i),
- s != null && (u[u.length] = s);
- return u.concat.apply([], u)
- },
- guid: 1,
- proxy: function (e, n) {
- if (typeof n == 'string') {
- var i = e[n];
- n = e,
- e = i
- }
- if (!r.isFunction(e)) return t;
- var s = O.call(arguments, 2),
- o = function () {
- return e.apply(n, s.concat(O.call(arguments)))
- };
- return o.guid = e.guid = e.guid || o.guid || r.guid++,
- o
- },
- access: function (e, n, i, s, o, u) {
- var a = e.length;
- if (typeof n == 'object') {
- for (var f in n) r.access(e, f, n[f], s, o, i);
- return e
- }
- if (i !== t) {
- s = !u && s && r.isFunction(i);
- for (var l = 0; l < a; l++) o(e[l], n, s ? i.call(e[l], l, o(e[l], n)) : i, u);
- return e
- }
- return a ? o(e[0], n) : t
- },
- now: function () {
- return (new Date).getTime()
- },
- uaMatch: function (e) {
- e = e.toLowerCase();
- var t = m.exec(e) || g.exec(e) || y.exec(e) || e.indexOf('compatible') < 0 && b.exec(e) || [
- ];
- return {
- browser: t[1] || '',
- version: t[2] || '0'
- }
- },
- sub: function () {
- function e(t, n) {
- return new e.fn.init(t, n)
- }
- r.extend(!0, e, this),
- e.superclass = this,
- e.fn = e.prototype = this(),
- e.fn.constructor = e,
- e.sub = this.sub,
- e.fn.init = function (n, i) {
- return i && i instanceof r && !(i instanceof e) && (i = e(i)),
- r.fn.init.call(this, n, i, t)
- },
- e.fn.init.prototype = e.fn;
- var t = e(D);
- return e
- },
- browser: {
- }
- }),
- r.each('Boolean Number String Function Array Date RegExp Object'.split(' '), function (e, t) {
- H['[object ' + t + ']'] = t.toLowerCase()
- }),
- T = r.uaMatch(x),
- T.browser && (r.browser[T.browser] = !0, r.browser.version = T.version),
- r.browser.webkit && (r.browser.safari = !0),
- a.test('Â ') && (f = /^[\s\xA0]+/, l = /[\s\xA0]+$/),
- o = r(D),
- D.addEventListener ? C = function () {
- D.removeEventListener('DOMContentLoaded', C, !1),
- r.ready()
- }
- : D.attachEvent && (C = function () {
- D.readyState === 'complete' && (D.detachEvent('onreadystatechange', C), r.ready())
- }),
- r
- }(),
- j = {
- };
- B.Callbacks = function (e) {
- e = e ? j[e] || _(e) : {
- };
- var n = [
- ],
- r = [
- ],
- i,
- s,
- o,
- u,
- a,
- f = function (t) {
- var r,
- i,
- s,
- o,
- u;
- for (r = 0, i = t.length; r < i; r++) s = t[r],
- o = B.type(s),
- o === 'array' ? f(s) : o === 'function' && (!e.unique || !c.has(s)) && n.push(s)
- },
- l = function (t, f) {
- f = f || [
- ],
- i = !e.memory || [
- t,
- f
- ],
- s = !0,
- a = o || 0,
- o = 0,
- u = n.length;
- for (; n && a < u; a++) if (n[a].apply(t, f) === !1 && e.stopOnFalse) {
- i = !0;
- break
- }
- s = !1,
- n && (e.once ? i === !0 ? c.disable() : n = [
- ] : r && r.length && (i = r.shift(), c.fireWith(i[0], i[1])))
- },
- c = {
- add: function () {
- if (n) {
- var e = n.length;
- f(arguments),
- s ? u = n.length : i && i !== !0 && (o = e, l(i[0], i[1]))
- }
- return this
- },
- remove: function () {
- if (n) {
- var t = arguments,
- r = 0,
- i = t.length;
- for (; r < i; r++) for (var o = 0; o < n.length; o++) if (t[r] === n[o]) {
- s && o <= u && (u--, o <= a && a--),
- n.splice(o--, 1);
- if (e.unique) break
- }
- }
- return this
- },
- has: function (e) {
- if (n) {
- var t = 0,
- r = n.length;
- for (; t < r; t++) if (e === n[t]) return !0
- }
- return !1
- },
- empty: function () {
- return n = [
- ],
- this
- },
- disable: function () {
- return n = r = i = t,
- this
- },
- disabled: function () {
- return !n
- },
- lock: function () {
- return r = t,
- (!i || i === !0) && c.disable(),
- this
- },
- locked: function () {
- return !r
- },
- fireWith: function (t, n) {
- return r && (s ? e.once || r.push([t,
- n]) : (!e.once || !i) && l(t, n)),
- this
- },
- fire: function () {
- return c.fireWith(this, arguments),
- this
- },
- fired: function () {
- return !!i
- }
- };
- return c
- };
- var F = [
- ].slice;
- B.extend({
- Deferred: function (e) {
- var t = B.Callbacks('once memory'),
- n = B.Callbacks('once memory'),
- r = B.Callbacks('memory'),
- i = 'pending',
- s = {
- resolve: t,
- reject: n,
- notify: r
- },
- o = {
- done: t.add,
- fail: n.add,
- progress: r.add,
- state: function () {
- return i
- },
- isResolved: t.fired,
- isRejected: n.fired,
- then: function (e, t, n) {
- return u.done(e).fail(t).progress(n),
- this
- },
- always: function () {
- return u.done.apply(u, arguments).fail.apply(u, arguments),
- this
- },
- pipe: function (e, t, n) {
- return B.Deferred(function (r) {
- B.each({
- done: [
- e,
- 'resolve'
- ],
- fail: [
- t,
- 'reject'
- ],
- progress: [
- n,
- 'notify'
- ]
- }, function (e, t) {
- var n = t[0],
- i = t[1],
- s;
- B.isFunction(n) ? u[e](function () {
- s = n.apply(this, arguments),
- s && B.isFunction(s.promise) ? s.promise().then(r.resolve, r.reject, r.notify) : r[i + 'With'](this === u ? r : this, [
- s
- ])
- }) : u[e](r[i])
- })
- }).promise()
- },
- promise: function (e) {
- if (e == null) e = o;
- else for (var t in o) e[t] = o[t];
- return e
- }
- },
- u = o.promise({
- }),
- a;
- for (a in s) u[a] = s[a].fire,
- u[a + 'With'] = s[a].fireWith;
- return u.done(function () {
- i = 'resolved'
- }, n.disable, r.lock).fail(function () {
- i = 'rejected'
- }, t.disable, r.lock),
- e && e.call(u, u),
- u
- },
- when: function (e) {
- function t(e) {
- return function (t) {
- o[e] = arguments.length > 1 ? F.call(arguments, 0) : t,
- f.notifyWith(l, o)
- }
- }
- function n(e) {
- return function (t) {
- r[e] = arguments.length > 1 ? F.call(arguments, 0) : t,
- --u || f.resolveWith(f, r)
- }
- }
- var r = F.call(arguments, 0),
- i = 0,
- s = r.length,
- o = Array(s),
- u = s,
- a = s,
- f = s <= 1 && e && B.isFunction(e.promise) ? e : B.Deferred(),
- l = f.promise();
- if (s > 1) {
- for (; i < s; i++) r[i] && r[i].promise && B.isFunction(r[i].promise) ? r[i].promise().then(n(i), f.reject, t(i)) : --u;
- u || f.resolveWith(f, r)
- } else f !== e && f.resolveWith(f, s ? [
- e
- ] : [
- ]);
- return l
- }
- }),
- B.support = function () {
- var t,
- n,
- r,
- i,
- s,
- o,
- u,
- a,
- f,
- l,
- c,
- h,
- p,
- d = D.createElement('div'),
- v = D.documentElement;
- d.setAttribute('className', 't'),
- d.innerHTML = ' <link/><table></table><a href=\'/a\' style=\'top:1px;float:left;opacity:.55;\'>a</a><input type=\'checkbox\'/>',
- n = d.getElementsByTagName('*'),
- r = d.getElementsByTagName('a') [0];
- if (!n || !n.length || !r) return {
- };
- i = D.createElement('select'),
- s = i.appendChild(D.createElement('option')),
- o = d.getElementsByTagName('input') [0],
- t = {
- leadingWhitespace: d.firstChild.nodeType === 3,
- tbody: !d.getElementsByTagName('tbody').length,
- htmlSerialize: !!d.getElementsByTagName('link').length,
- style: /top/.test(r.getAttribute('style')),
- hrefNormalized: r.getAttribute('href') === '/a',
- opacity: /^0.55/.test(r.style.opacity),
- cssFloat: !!r.style.cssFloat,
- checkOn: o.value === 'on',
- optSelected: s.selected,
- getSetAttribute: d.className !== 't',
- enctype: !!D.createElement('form').enctype,
- html5Clone: D.createElement('nav').cloneNode(!0).outerHTML !== '<:nav></:nav>',
- submitBubbles: !0,
- changeBubbles: !0,
- focusinBubbles: !1,
- deleteExpando: !0,
- noCloneEvent: !0,
- inlineBlockNeedsLayout: !1,
- shrinkWrapBlocks: !1,
- reliableMarginRight: !0
- },
- o.checked = !0,
- t.noCloneChecked = o.cloneNode(!0).checked,
- i.disabled = !0,
- t.optDisabled = !s.disabled;
- try {
- delete d.test
- } catch (m) {
- t.deleteExpando = !1
- }
- !d.addEventListener && d.attachEvent && d.fireEvent && (d.attachEvent('onclick', function () {
- t.noCloneEvent = !1
- }), d.cloneNode(!0).fireEvent('onclick')),
- o = D.createElement('input'),
- o.value = 't',
- o.setAttribute('type', 'radio'),
- t.radioValue = o.value === 't',
- o.setAttribute('checked', 'checked'),
- d.appendChild(o),
- a = D.createDocumentFragment(),
- a.appendChild(d.lastChild),
- t.checkClone = a.cloneNode(!0).cloneNode(!0).lastChild.checked,
- t.appendChecked = o.checked,
- a.removeChild(o),
- a.appendChild(d),
- d.innerHTML = '',
- e.getComputedStyle && (u = D.createElement('div'), u.style.width = '0', u.style.marginRight = '0', d.style.width = '2px', d.appendChild(u), t.reliableMarginRight = (parseInt((e.getComputedStyle(u, null) || {
- marginRight: 0
- }).marginRight, 10) || 0) === 0);
- if (d.attachEvent) for (h in {
- submit: 1,
- change: 1,
- focusin: 1
- }) c = 'on' + h,
- p = c in d,
- p || (d.setAttribute(c, 'return;'), p = typeof d[c] == 'function'),
- t[h + 'Bubbles'] = p;
- return a.removeChild(d),
- a = i = s = u = d = o = null,
- B(function () {
- var e,
- n,
- r,
- i,
- s,
- o,
- u,
- a,
- l,
- c,
- h,
- v = D.getElementsByTagName('body') [0];
- !v || (u = 1, a = 'position:absolute;top:0;left:0;width:1px;height:1px;margin:0;', l = 'visibility:hidden;border:0;', c = 'style=\'' + a + 'border:5px solid #000;padding:0;\'', h = '<div ' + c + '><div></div></div>' + '<table ' + c + ' cellpadding=\'0\' cellspacing=\'0\'>' + '<tr><td></td></tr></table>', e = D.createElement('div'), e.style.cssText = l + 'width:0;height:0;position:static;top:0;margin-top:' + u + 'px', v.insertBefore(e, v.firstChild), d = D.createElement('div'), e.appendChild(d), d.innerHTML = '<table><tr><td style=\'padding:0;border:0;display:none\'></td><td>t</td></tr></table>', f = d.getElementsByTagName('td'), p = f[0].offsetHeight === 0, f[0].style.display = '', f[1].style.display = 'none', t.reliableHiddenOffsets = p && f[0].offsetHeight === 0, d.innerHTML = '', d.style.width = d.style.paddingLeft = '1px', B.boxModel = t.boxModel = d.offsetWidth === 2, typeof d.style.zoom != 'undefined' && (d.style.display = 'inline', d.style.zoom = 1, t.inlineBlockNeedsLayout = d.offsetWidth === 2, d.style.display = '', d.innerHTML = '<div style=\'width:4px;\'></div>', t.shrinkWrapBlocks = d.offsetWidth !== 2), d.style.cssText = a + l, d.innerHTML = h, n = d.firstChild, r = n.firstChild, s = n.nextSibling.firstChild.firstChild, o = {
- doesNotAddBorder: r.offsetTop !== 5,
- doesAddBorderForTableAndCells: s.offsetTop === 5
- }, r.style.position = 'fixed', r.style.top = '20px', o.fixedPosition = r.offsetTop === 20 || r.offsetTop === 15, r.style.position = r.style.top = '', n.style.overflow = 'hidden', n.style.position = 'relative', o.subtractsBorderForOverflowNotVisible = r.offsetTop === - 5, o.doesNotIncludeMarginInBodyOffset = v.offsetTop !== u, v.removeChild(e), d = e = null, B.extend(t, o))
- }),
- t
- }();
- var I = /^(?:\{.*\}|\[.*\])$/,
- q = /([A-Z])/g;
- B.extend({
- cache: {
- },
- uuid: 0,
- expando: 'jQuery' + (B.fn.jquery + Math.random()).replace(/\D/g, ''),
- noData: {
- embed: !0,
- object: 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',
- applet: !0
- },
- hasData: function (e) {
- return e = e.nodeType ? B.cache[e[B.expando]] : e[B.expando],
- !!e && !O(e)
- },
- data: function (e, n, r, i) {
- if (!!B.acceptData(e)) {
- var s,
- o,
- u,
- a = B.expando,
- f = typeof n == 'string',
- l = e.nodeType,
- c = l ? B.cache : e,
- h = l ? e[a] : e[a] && a,
- p = n === 'events';
- if ((!h || !c[h] || !p && !i && !c[h].data) && f && r === t) return;
- h || (l ? e[a] = h = ++B.uuid : h = a),
- c[h] || (c[h] = {
- }, l || (c[h].toJSON = B.noop));
- if (typeof n == 'object' || typeof n == 'function') i ? c[h] = B.extend(c[h], n) : c[h].data = B.extend(c[h].data, n);
- return s = o = c[h],
- i || (o.data || (o.data = {
- }), o = o.data),
- r !== t && (o[B.camelCase(n)] = r),
- p && !o[n] ? s.events : (f ? (u = o[n], u == null && (u = o[B.camelCase(n)])) : u = o, u)
- }
- },
- removeData: function (e, t, n) {
- if (!!B.acceptData(e)) {
- var r,
- i,
- s,
- o = B.expando,
- u = e.nodeType,
- a = u ? B.cache : e,
- f = u ? e[o] : o;
- if (!a[f]) return;
- if (t) {
- r = n ? a[f] : a[f].data;
- if (r) {
- B.isArray(t) || (t in r ? t = [
- t
- ] : (t = B.camelCase(t), t in r ? t = [
- t
- ] : t = t.split(' ')));
- for (i = 0, s = t.length; i < s; i++) delete r[t[i]];
- if (!(n ? O : B.isEmptyObject) (r)) return
- }
- }
- if (!n) {
- delete a[f].data;
- if (!O(a[f])) return
- }
- B.support.deleteExpando || !a.setInterval ? delete a[f] : a[f] = null,
- u && (B.support.deleteExpando ? delete e[o] : e.removeAttribute ? e.removeAttribute(o) : e[o] = null)
- }
- },
- _data: function (e, t, n) {
- return B.data(e, t, n, !0)
- },
- acceptData: function (e) {
- if (e.nodeName) {
- var t = B.noData[e.nodeName.toLowerCase()];
- if (t) return t !== !0 && e.getAttribute('classid') === t
- }
- return !0
- }
- }),
- B.fn.extend({
- data: function (e, n) {
- var r,
- i,
- s,
- o = null;
- if (typeof e == 'undefined') {
- if (this.length) {
- o = B.data(this[0]);
- if (this[0].nodeType === 1 && !B._data(this[0], 'parsedAttrs')) {
- i = this[0].attributes;
- for (var u = 0, a = i.length; u < a; u++) s = i[u].name,
- s.indexOf('data-') === 0 && (s = B.camelCase(s.substring(5)), M(this[0], s, o[s]));
- B._data(this[0], 'parsedAttrs', !0)
- }
- }
- return o
- }
- return typeof e == 'object' ? this.each(function () {
- B.data(this, e)
- }) : (r = e.split('.'), r[1] = r[1] ? '.' + r[1] : '', n === t ? (o = this.triggerHandler('getData' + r[1] + '!', [
- r[0]
- ]), o === t && this.length && (o = B.data(this[0], e), o = M(this[0], e, o)), o === t && r[1] ? this.data(r[0]) : o) : this.each(function () {
- var t = B(this),
- i = [
- r[0],
- n
- ];
- t.triggerHandler('addData' + r[1] + '!', i),
- B.data(this, e, n),
- t.triggerHandler('changeData' + r[1] + '!', i)
- }))
- },
- removeData: function (e) {
- return this.each(function () {
- B.removeData(this, e)
- })
- }
- }),
- B.extend({
- _mark: function (e, t) {
- e && (t = (t || 'fx') + 'mark', B._data(e, t, (B._data(e, t) || 0) + 1))
- },
- _unmark: function (e, t, n) {
- e !== !0 && (n = t, t = e, e = !1);
- if (t) {
- n = n || 'fx';
- var r = n + 'mark',
- i = e ? 0 : (B._data(t, r) || 1) - 1;
- i ? B._data(t, r, i) : (B.removeData(t, r, !0), A(t, n, 'mark'))
- }
- },
- queue: function (e, t, n) {
- var r;
- if (e) return t = (t || 'fx') + 'queue',
- r = B._data(e, t),
- n && (!r || B.isArray(n) ? r = B._data(e, t, B.makeArray(n)) : r.push(n)),
- r || [
- ]
- },
- dequeue: function (e, t) {
- t = t || 'fx';
- var n = B.queue(e, t),
- r = n.shift(),
- i = {
- };
- r === 'inprogress' && (r = n.shift()),
- r && (t === 'fx' && n.unshift('inprogress'), B._data(e, t + '.run', i), r.call(e, function () {
- B.dequeue(e, t)
- }, i)),
- n.length || (B.removeData(e, t + 'queue ' + t + '.run', !0), A(e, t, 'queue'))
- }
- }),
- B.fn.extend({
- queue: function (e, n) {
- return typeof e != 'string' && (n = e, e = 'fx'),
- n === t ? B.queue(this[0], e) : this.each(function () {
- var t = B.queue(this, e, n);
- e === 'fx' && t[0] !== 'inprogress' && B.dequeue(this, e)
- })
- },
- dequeue: function (e) {
- return this.each(function () {
- B.dequeue(this, e)
- })
- },
- delay: function (e, t) {
- return e = B.fx ? B.fx.speeds[e] || e : e,
- t = t || 'fx',
- this.queue(t, function (t, n) {
- var r = setTimeout(t, e);
- n.stop = function () {
- clearTimeout(r)
- }
- })
- },
- clearQueue: function (e) {
- return this.queue(e || 'fx', [
- ])
- },
- promise: function (e, n) {
- function r() {
- --u || i.resolveWith(s, [
- s
- ])
- }
- typeof e != 'string' && (n = e, e = t),
- e = e || 'fx';
- var i = B.Deferred(),
- s = this,
- o = s.length,
- u = 1,
- a = e + 'defer',
- f = e + 'queue',
- l = e + 'mark',
- c;
- while (o--) if (c = B.data(s[o], a, t, !0) || (B.data(s[o], f, t, !0) || B.data(s[o], l, t, !0)) && B.data(s[o], a, B.Callbacks('once memory'), !0)) u++,
- c.add(r);
- return r(),
- i.promise()
- }
- });
- var R = /[\n\t\r]/g,
- U = /\s+/,
- z = /\r/g,
- W = /^(?:button|input)$/i,
- X = /^(?:button|input|object|select|textarea)$/i,
- V = /^a(?:rea)?$/i,
- $ = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
- J = B.support.getSetAttribute,
- K,
- Q,
- G;
- B.fn.extend({
- attr: function (e, t) {
- return B.access(this, e, t, !0, B.attr)
- },
- removeAttr: function (e) {
- return this.each(function () {
- B.removeAttr(this, e)
- })
- },
- prop: function (e, t) {
- return B.access(this, e, t, !0, B.prop)
- },
- removeProp: function (e) {
- return e = B.propFix[e] || e,
- this.each(function () {
- try {
- this[e] = t,
- delete this[e]
- } catch (n) {
- }
- })
- },
- addClass: function (e) {
- var t,
- n,
- r,
- i,
- s,
- o,
- u;
- if (B.isFunction(e)) return this.each(function (t) {
- B(this).addClass(e.call(this, t, this.className))
- });
- if (e && typeof e == 'string') {
- t = e.split(U);
- for (n = 0, r = this.length; n < r; n++) {
- i = this[n];
- if (i.nodeType === 1) if (!i.className && t.length === 1) i.className = e;
- else {
- s = ' ' + i.className + ' ';
- for (o = 0, u = t.length; o < u; o++) ~s.indexOf(' ' + t[o] + ' ') || (s += t[o] + ' ');
- i.className = B.trim(s)
- }
- }
- }
- return this
- },
- removeClass: function (e) {
- var n,
- r,
- i,
- s,
- o,
- u,
- a;
- if (B.isFunction(e)) return this.each(function (t) {
- B(this).removeClass(e.call(this, t, this.className))
- });
- if (e && typeof e == 'string' || e === t) {
- n = (e || '').split(U);
- for (r = 0, i = this.length; r < i; r++) {
- s = this[r];
- if (s.nodeType === 1 && s.className) if (e) {
- o = (' ' + s.className + ' ').replace(R, ' ');
- for (u = 0, a = n.length; u < a; u++) o = o.replace(' ' + n[u] + ' ', ' ');
- s.className = B.trim(o)
- } else s.className = ''
- }
- }
- return this
- },
- toggleClass: function (e, t) {
- var n = typeof e,
- r = typeof t == 'boolean';
- return B.isFunction(e) ? this.each(function (n) {
- B(this).toggleClass(e.call(this, n, this.className, t), t)
- }) : this.each(function () {
- if (n === 'string') {
- var i,
- s = 0,
- o = B(this),
- u = t,
- a = e.split(U);
- while (i = a[s++]) u = r ? u : !o.hasClass(i),
- o[u ? 'addClass' : 'removeClass'](i)
- } else if (n === 'undefined' || n === 'boolean') this.className && B._data(this, '__className__', this.className),
- this.className = this.className || e === !1 ? '' : B._data(this, '__className__') || ''
- })
- },
- hasClass: function (e) {
- var t = ' ' + e + ' ',
- n = 0,
- r = this.length;
- for (; n < r; n++) if (this[n].nodeType === 1 && (' ' + this[n].className + ' ').replace(R, ' ').indexOf(t) > - 1) return !0;
- return !1
- },
- val: function (e) {
- var n,
- r,
- i,
- s = this[0];
- if (!!arguments.length) return i = B.isFunction(e),
- this.each(function (r) {
- var s = B(this),
- o;
- if (this.nodeType === 1) {
- i ? o = e.call(this, r, s.val()) : o = e,
- o == null ? o = '' : typeof o == 'number' ? o += '' : B.isArray(o) && (o = B.map(o, function (e) {
- return e == null ? '' : e + ''
- })),
- n = B.valHooks[this.nodeName.toLowerCase()] || B.valHooks[this.type];
- if (!n || !('set' in n) || n.set(this, o, 'value') === t) this.value = o
- }
- });
- if (s) return n = B.valHooks[s.nodeName.toLowerCase()] || B.valHooks[s.type],
- n && 'get' in n && (r = n.get(s, 'value')) !== t ? r : (r = s.value, typeof r == 'string' ? r.replace(z, '') : r == null ? '' : r)
- }
- }),
- B.extend({
- valHooks: {
- option: {
- get: function (e) {
- var t = e.attributes.value;
- return !t || t.specified ? e.value : e.text
- }
- },
- select: {
- get: function (e) {
- var t,
- n,
- r,
- i,
- s = e.selectedIndex,
- o = [
- ],
- u = e.options,
- a = e.type === 'select-one';
- if (s < 0) return null;
- n = a ? s : 0,
- r = a ? s + 1 : u.length;
- for (; n < r; n++) {
- i = u[n];
- if (i.selected && (B.support.optDisabled ? !i.disabled : i.getAttribute('disabled') === null) && (!i.parentNode.disabled || !B.nodeName(i.parentNode, 'optgroup'))) {
- t = B(i).val();
- if (a) return t;
- o.push(t)
- }
- }
- return a && !o.length && u.length ? B(u[s]).val() : o
- },
- set: function (e, t) {
- var n = B.makeArray(t);
- return B(e).find('option').each(function () {
- this.selected = B.inArray(B(this).val(), n) >= 0
- }),
- n.length || (e.selectedIndex = - 1),
- n
- }
- }
- },
- attrFn: {
- val: !0,
- css: !0,
- html: !0,
- text: !0,
- data: !0,
- width: !0,
- height: !0,
- offset: !0
- },
- attr: function (e, n, r, i) {
- var s,
- o,
- u,
- a = e.nodeType;
- if (!!e && a !== 3 && a !== 8 && a !== 2) {
- if (i && n in B.attrFn) return B(e) [n](r);
- if (typeof e.getAttribute == 'undefined') return B.prop(e, n, r);
- u = a !== 1 || !B.isXMLDoc(e),
- u && (n = n.toLowerCase(), o = B.attrHooks[n] || ($.test(n) ? Q : K));
- if (r !== t) {
- if (r === null) {
- B.removeAttr(e, n);
- return
- }
- return o && 'set' in o && u && (s = o.set(e, r, n)) !== t ? s : (e.setAttribute(n, '' + r), r)
- }
- return o && 'get' in o && u && (s = o.get(e, n)) !== null ? s : (s = e.getAttribute(n), s === null ? t : s)
- }
- },
- removeAttr: function (e, t) {
- var n,
- r,
- i,
- s,
- o = 0;
- if (t && e.nodeType === 1) {
- r = t.toLowerCase().split(U),
- s = r.length;
- for (; o < s; o++) i = r[o],
- i && (n = B.propFix[i] || i, B.attr(e, i, ''), e.removeAttribute(J ? i : n), $.test(i) && n in e && (e[n] = !1))
- }
- },
- attrHooks: {
- type: {
- set: function (e, t) {
- if (W.test(e.nodeName) && e.parentNode) B.error('type property can\'t be changed');
- else if (!B.support.radioValue && t === 'radio' && B.nodeName(e, 'input')) {
- var n = e.value;
- return e.setAttribute('type', t),
- n && (e.value = n),
- t
- }
- }
- },
- value: {
- get: function (e, t) {
- return K && B.nodeName(e, 'button') ? K.get(e, t) : t in e ? e.value : null
- },
- set: function (e, t, n) {
- if (K && B.nodeName(e, 'button')) return K.set(e, t, n);
- e.value = t
- }
- }
- },
- propFix: {
- tabindex: 'tabIndex',
- readonly: 'readOnly',
- 'for': 'htmlFor',
- 'class': 'className',
- maxlength: 'maxLength',
- cellspacing: 'cellSpacing',
- cellpadding: 'cellPadding',
- rowspan: 'rowSpan',
- colspan: 'colSpan',
- usemap: 'useMap',
- frameborder: 'frameBorder',
- contenteditable: 'contentEditable'
- },
- prop: function (e, n, r) {
- var i,
- s,
- o,
- u = e.nodeType;
- if (!!e && u !== 3 && u !== 8 && u !== 2) return o = u !== 1 || !B.isXMLDoc(e),
- o && (n = B.propFix[n] || n, s = B.propHooks[n]),
- r !== t ? s && 'set' in s && (i = s.set(e, r, n)) !== t ? i : e[n] = r : s && 'get' in s && (i = s.get(e, n)) !== null ? i : e[n]
- },
- propHooks: {
- tabIndex: {
- get: function (e) {
- var n = e.getAttributeNode('tabindex');
- return n && n.specified ? parseInt(n.value, 10) : X.test(e.nodeName) || V.test(e.nodeName) && e.href ? 0 : t
- }
- }
- }
- }),
- B.attrHooks.tabindex = B.propHooks.tabIndex,
- Q = {
- get: function (e, n) {
- var r,
- i = B.prop(e, n);
- return i === !0 || typeof i != 'boolean' && (r = e.getAttributeNode(n)) && r.nodeValue !== !1 ? n.toLowerCase() : t
- },
- set: function (e, t, n) {
- var r;
- return t === !1 ? B.removeAttr(e, n) : (r = B.propFix[n] || n, r in e && (e[r] = !0), e.setAttribute(n, n.toLowerCase())),
- n
- }
- },
- J || (G = {
- name: !0,
- id: !0
- }, K = B.valHooks.button = {
- get: function (e, n) {
- var r;
- return r = e.getAttributeNode(n),
- r && (G[n] ? r.nodeValue !== '' : r.specified) ? r.nodeValue : t
- },
- set: function (e, t, n) {
- var r = e.getAttributeNode(n);
- return r || (r = D.createAttribute(n), e.setAttributeNode(r)),
- r.nodeValue = t + ''
- }
- }, B.attrHooks.tabindex.set = K.set, B.each(['width',
- 'height'], function (e, t) {
- B.attrHooks[t] = B.extend(B.attrHooks[t], {
- set: function (e, n) {
- if (n === '') return e.setAttribute(t, 'auto'),
- n
- }
- })
- }), B.attrHooks.contenteditable = {
- get: K.get,
- set: function (e, t, n) {
- t === '' && (t = 'false'),
- K.set(e, t, n)
- }
- }),
- B.support.hrefNormalized || B.each(['href',
- 'src',
- 'width',
- 'height'], function (e, n) {
- B.attrHooks[n] = B.extend(B.attrHooks[n], {
- get: function (e) {
- var r = e.getAttribute(n, 2);
- return r === null ? t : r
- }
- })
- }),
- B.support.style || (B.attrHooks.style = {
- get: function (e) {
- return e.style.cssText.toLowerCase() || t
- },
- set: function (e, t) {
- return e.style.cssText = '' + t
- }
- }),
- B.support.optSelected || (B.propHooks.selected = B.extend(B.propHooks.selected, {
- get: function (e) {
- var t = e.parentNode;
- return t && (t.selectedIndex, t.parentNode && t.parentNode.selectedIndex),
- null
- }
- })),
- B.support.enctype || (B.propFix.enctype = 'encoding'),
- B.support.checkOn || B.each(['radio',
- 'checkbox'], function () {
- B.valHooks[this] = {
- get: function (e) {
- return e.getAttribute('value') === null ? 'on' : e.value
- }
- }
- }),
- B.each(['radio',
- 'checkbox'], function () {
- B.valHooks[this] = B.extend(B.valHooks[this], {
- set: function (e, t) {
- if (B.isArray(t)) return e.checked = B.inArray(B(e).val(), t) >= 0
- }
- })
- });
- var Y = /^(?:textarea|input|select)$/i,
- Z = /^([^\.]*)?(?:\.(.+))?$/,
- et = /\bhover(\.\S+)?\b/,
- tt = /^key/,
- nt = /^(?:mouse|contextmenu)|click/,
- rt = /^(?:focusinfocus|focusoutblur)$/,
- it = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
- st = function (e) {
- var t = it.exec(e);
- return t && (t[1] = (t[1] || '').toLowerCase(), t[3] = t[3] && new RegExp('(?:^|\\s)' + t[3] + '(?:\\s|$)')),
- t
- },
- ot = function (e, t) {
- var n = e.attributes || {
- };
- return (!t[1] || e.nodeName.toLowerCase() === t[1]) && (!t[2] || (n.id || {
- }).value === t[2]) && (!t[3] || t[3].test((n['class'] || {
- }).value))
- },
- ut = function (e) {
- return B.event.special.hover ? e : e.replace(et, 'mouseenter$1 mouseleave$1')
- };
- B.event = {
- add: function (e, n, r, i, s) {
- var o,
- u,
- a,
- f,
- l,
- c,
- h,
- p,
- d,
- v,
- m,
- g;
- if (!(e.nodeType === 3 || e.nodeType === 8 || !n || !r || !(o = B._data(e)))) {
- r.handler && (d = r, r = d.handler),
- r.guid || (r.guid = B.guid++),
- a = o.events,
- a || (o.events = a = {
- }),
- u = o.handle,
- u || (o.handle = u = function (e) {
- return typeof B == 'undefined' || !!e && B.event.triggered === e.type ? t : B.event.dispatch.apply(u.elem, arguments)
- }, u.elem = e),
- n = B.trim(ut(n)).split(' ');
- for (f = 0; f < n.length; f++) {
- l = Z.exec(n[f]) || [
- ],
- c = l[1],
- h = (l[2] || '').split('.').sort(),
- g = B.event.special[c] || {
- },
- c = (s ? g.delegateType : g.bindType) || c,
- g = B.event.special[c] || {
- },
- p = B.extend({
- type: c,
- origType: l[1],
- data: i,
- handler: r,
- guid: r.guid,
- selector: s,
- quick: st(s),
- namespace: h.join('.')
- }, d),
- m = a[c];
- if (!m) {
- m = a[c] = [
- ],
- m.delegateCount = 0;
- if (!g.setup || g.setup.call(e, i, h, u) === !1) e.addEventListener ? e.addEventListener(c, u, !1) : e.attachEvent && e.attachEvent('on' + c, u)
- }
- g.add && (g.add.call(e, p), p.handler.guid || (p.handler.guid = r.guid)),
- s ? m.splice(m.delegateCount++, 0, p) : m.push(p),
- B.event.global[c] = !0
- }
- e = null
- }
- },
- global: {
- },
- remove: function (e, t, n, r, i) {
- var s = B.hasData(e) && B._data(e),
- o,
- u,
- a,
- f,
- l,
- c,
- h,
- p,
- d,
- v,
- m,
- g;
- if (!!s && !!(p = s.events)) {
- t = B.trim(ut(t || '')).split(' ');
- for (o = 0; o < t.length; o++) {
- u = Z.exec(t[o]) || [
- ],
- a = f = u[1],
- l = u[2];
- if (!a) {
- for (a in p) B.event.remove(e, a + t[o], n, r, !0);
- continue
- }
- d = B.event.special[a] || {
- },
- a = (r ? d.delegateType : d.bindType) || a,
- m = p[a] || [
- ],
- c = m.length,
- l = l ? new RegExp('(^|\\.)' + l.split('.').sort().join('\\.(?:.*\\.)?') + '(\\.|$)') : null;
- for (h = 0; h < m.length; h++) g = m[h],
- (i || f === g.origType) && (!n || n.guid === g.guid) && (!l || l.test(g.namespace)) && (!r || r === g.selector || r === '**' && g.selector) && (m.splice(h--, 1), g.selector && m.delegateCount--, d.remove && d.remove.call(e, g));
- m.length === 0 && c !== m.length && ((!d.teardown || d.teardown.call(e, l) === !1) && B.removeEvent(e, a, s.handle), delete p[a])
- }
- B.isEmptyObject(p) && (v = s.handle, v && (v.elem = null), B.removeData(e, [
- 'events',
- 'handle'
- ], !0))
- }
- },
- customEvent: {
- getData: !0,
- setData: !0,
- changeData: !0
- },
- trigger: function (n, r, i, s) {
- if (!i || i.nodeType !== 3 && i.nodeType !== 8) {
- var o = n.type || n,
- u = [
- ],
- a,
- f,
- l,
- c,
- h,
- p,
- d,
- v,
- m,
- g;
- if (rt.test(o + B.event.triggered)) return;
- o.indexOf('!') >= 0 && (o = o.slice(0, - 1), f = !0),
- o.indexOf('.') >= 0 && (u = o.split('.'), o = u.shift(), u.sort());
- if ((!i || B.event.customEvent[o]) && !B.event.global[o]) return;
- n = typeof n == 'object' ? n[B.expando] ? n : new B.Event(o, n) : new B.Event(o),
- n.type = o,
- n.isTrigger = !0,
- n.exclusive = f,
- n.namespace = u.join('.'),
- n.namespace_re = n.namespace ? new RegExp('(^|\\.)' + u.join('\\.(?:.*\\.)?') + '(\\.|$)') : null,
- p = o.indexOf(':') < 0 ? 'on' + o : '';
- if (!i) {
- a = B.cache;
- for (l in a) a[l].events && a[l].events[o] && B.event.trigger(n, r, a[l].handle.elem, !0);
- return
- }
- n.result = t,
- n.target || (n.target = i),
- r = r != null ? B.makeArray(r) : [
- ],
- r.unshift(n),
- d = B.event.special[o] || {
- };
- if (d.trigger && d.trigger.apply(i, r) === !1) return;
- m = [
- [i,
- d.bindType || o]
- ];
- if (!s && !d.noBubble && !B.isWindow(i)) {
- g = d.delegateType || o,
- c = rt.test(g + o) ? i : i.parentNode,
- h = null;
- for (; c; c = c.parentNode) m.push([c,
- g]),
- h = c;
- h && h === i.ownerDocument && m.push([h.defaultView || h.parentWindow || e,
- g])
- }
- for (l = 0; l < m.length && !n.isPropagationStopped(); l++) c = m[l][0],
- n.type = m[l][1],
- v = (B._data(c, 'events') || {
- }) [n.type] && B._data(c, 'handle'),
- v && v.apply(c, r),
- v = p && c[p],
- v && B.acceptData(c) && v.apply(c, r) === !1 && n.preventDefault();
- return n.type = o,
- !s && !n.isDefaultPrevented() && (!d._default || d._default.apply(i.ownerDocument, r) === !1) && (o !== 'click' || !B.nodeName(i, 'a')) && B.acceptData(i) && p && i[o] && (o !== 'focus' && o !== 'blur' || n.target.offsetWidth !== 0) && !B.isWindow(i) && (h = i[p], h && (i[p] = null), B.event.triggered = o, i[o](), B.event.triggered = t, h && (i[p] = h)),
- n.result
- }
- },
- dispatch: function (n) {
- n = B.event.fix(n || e.event);
- var r = (B._data(this, 'events') || {
- }) [n.type] || [
- ],
- i = r.delegateCount,
- s = [
- ].slice.call(arguments, 0),
- o = !n.exclusive && !n.namespace,
- u = [
- ],
- a,
- f,
- l,
- c,
- h,
- p,
- d,
- v,
- m,
- g,
- y;
- s[0] = n,
- n.delegateTarget = this;
- if (i && !n.target.disabled && (!n.button || n.type !== 'click')) {
- c = B(this),
- c.context = this.ownerDocument || this;
- for (l = n.target; l != this; l = l.parentNode || this) {
- p = {
- },
- v = [
- ],
- c[0] = l;
- for (a = 0; a < i; a++) m = r[a],
- g = m.selector,
- p[g] === t && (p[g] = m.quick ? ot(l, m.quick) : c.is(g)),
- p[g] && v.push(m);
- v.length && u.push({
- elem: l,
- matches: v
- })
- }
- }
- r.length > i && u.push({
- elem: this,
- matches: r.slice(i)
- });
- for (a = 0; a < u.length && !n.isPropagationStopped(); a++) {
- d = u[a],
- n.currentTarget = d.elem;
- for (f = 0; f < d.matches.length && !n.isImmediatePropagationStopped(); f++) {
- m = d.matches[f];
- if (o || !n.namespace && !m.namespace || n.namespace_re && n.namespace_re.test(m.namespace)) n.data = m.data,
- n.handleObj = m,
- h = ((B.event.special[m.origType] || {
- }).handle || m.handler).apply(d.elem, s),
- h !== t && (n.result = h, h === !1 && (n.preventDefault(), n.stopPropagation()))
- }
- }
- return n.result
- },
- props: 'attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which'.split(' '),
- fixHooks: {
- },
- keyHooks: {
- props: 'char charCode key keyCode'.split(' '),
- filter: function (e, t) {
- return e.which == null && (e.which = t.charCode != null ? t.charCode : t.keyCode),
- e
- }
- },
- mouseHooks: {
- props: 'button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement'.split(' '),
- filter: function (e, n) {
- var r,
- i,
- s,
- o = n.button,
- u = n.fromElement;
- return e.pageX == null && n.clientX != null && (r = e.target.ownerDocument || D, i = r.documentElement, s = r.body, e.pageX = n.clientX + (i && i.scrollLeft || s && s.scrollLeft || 0) - (i && i.clientLeft || s && s.clientLeft || 0), e.pageY = n.clientY + (i && i.scrollTop || s && s.scrollTop || 0) - (i && i.clientTop || s && s.clientTop || 0)),
- !e.relatedTarget && u && (e.relatedTarget = u === e.target ? n.toElement : u),
- !e.which && o !== t && (e.which = o & 1 ? 1 : o & 2 ? 3 : o & 4 ? 2 : 0),
- e
- }
- },
- fix: function (e) {
- if (e[B.expando]) return e;
- var n,
- r,
- i = e,
- s = B.event.fixHooks[e.type] || {
- },
- o = s.props ? this.props.concat(s.props) : this.props;
- e = B.Event(i);
- for (n = o.length; n; ) r = o[--n],
- e[r] = i[r];
- return e.target || (e.target = i.srcElement || D),
- e.target.nodeType === 3 && (e.target = e.target.parentNode),
- e.metaKey === t && (e.metaKey = e.ctrlKey),
- s.filter ? s.filter(e, i) : e
- },
- special: {
- ready: {
- setup: B.bindReady
- },
- load: {
- noBubble: !0
- },
- focus: {
- delegateType: 'focusin'
- },
- blur: {
- delegateType: 'focusout'
- },
- beforeunload: {
- setup: function (e, t, n) {
- B.isWindow(this) && (this.onbeforeunload = n)
- },
- teardown: function (e, t) {
- this.onbeforeunload === t && (this.onbeforeunload = null)
- }
- }
- },
- simulate: function (e, t, n, r) {
- var i = B.extend(new B.Event, n, {
- type: e,
- isSimulated: !0,
- originalEvent: {
- }
- });
- r ? B.event.trigger(i, null, t) : B.event.dispatch.call(t, i),
- i.isDefaultPrevented() && n.preventDefault()
- }
- },
- B.event.handle = B.event.dispatch,
- B.removeEvent = D.removeEventListener ? function (e, t, n) {
- e.removeEventListener && e.removeEventListener(t, n, !1)
- }
- : function (e, t, n) {
- e.detachEvent && e.detachEvent('on' + t, n)
- },
- B.Event = function (e, t) {
- if (!(this instanceof B.Event)) return new B.Event(e, t);
- e && e.type ? (this.originalEvent = e, this.type = e.type, this.isDefaultPrevented = e.defaultPrevented || e.returnValue === !1 || e.getPreventDefault && e.getPreventDefault() ? k : L) : this.type = e,
- t && B.extend(this, t),
- this.timeStamp = e && e.timeStamp || B.now(),
- this[B.expando] = !0
- },
- B.Event.prototype = {
- preventDefault: function () {
- this.isDefaultPrevented = k;
- var e = this.originalEvent;
- !e || (e.preventDefault ? e.preventDefault() : e.returnValue = !1)
- },
- stopPropagation: function () {
- this.isPropagationStopped = k;
- var e = this.originalEvent;
- !e || (e.stopPropagation && e.stopPropagation(), e.cancelBubble = !0)
- },
- stopImmediatePropagation: function () {
- this.isImmediatePropagationStopped = k,
- this.stopPropagation()
- },
- isDefaultPrevented: L,
- isPropagationStopped: L,
- isImmediatePropagationStopped: L
- },
- B.each({
- mouseenter: 'mouseover',
- mouseleave: 'mouseout'
- }, function (e, t) {
- B.event.special[e] = {
- delegateType: t,
- bindType: t,
- handle: function (e) {
- var n = this,
- r = e.relatedTarget,
- i = e.handleObj,
- s = i.selector,
- o;
- if (!r || r !== n && !B.contains(n, r)) e.type = i.origType,
- o = i.handler.apply(this, arguments),
- e.type = t;
- return o
- }
- }
- }),
- B.support.submitBubbles || (B.event.special.submit = {
- setup: function () {
- if (B.nodeName(this, 'form')) return !1;
- B.event.add(this, 'click._submit keypress._submit', function (e) {
- var n = e.target,
- r = B.nodeName(n, 'input') || B.nodeName(n, 'button') ? n.form : t;
- r && !r._submit_attached && (B.event.add(r, 'submit._submit', function (e) {
- this.parentNode && !e.isTrigger && B.event.simulate('submit', this.parentNode, e, !0)
- }), r._submit_attached = !0)
- })
- },
- teardown: function () {
- if (B.nodeName(this, 'form')) return !1;
- B.event.remove(this, '._submit')
- }
- }),
- B.support.changeBubbles || (B.event.special.change = {
- setup: function () {
- if (Y.test(this.nodeName)) {
- if (this.type === 'checkbox' || this.type === 'radio') B.event.add(this, 'propertychange._change', function (e) {
- e.originalEvent.propertyName === 'checked' && (this._just_changed = !0)
- }),
- B.event.add(this, 'click._change', function (e) {
- this._just_changed && !e.isTrigger && (this._just_changed = !1, B.event.simulate('change', this, e, !0))
- });
- return !1
- }
- B.event.add(this, 'beforeactivate._change', function (e) {
- var t = e.target;
- Y.test(t.nodeName) && !t._change_attached && (B.event.add(t, 'change._change', function (e) {
- this.parentNode && !e.isSimulated && !e.isTrigger && B.event.simulate('change', this.parentNode, e, !0)
- }), t._change_attached = !0)
- })
- },
- handle: function (e) {
- var t = e.target;
- if (this !== t || e.isSimulated || e.isTrigger || t.type !== 'radio' && t.type !== 'checkbox') return e.handleObj.handler.apply(this, arguments)
- },
- teardown: function () {
- return B.event.remove(this, '._change'),
- Y.test(this.nodeName)
- }
- }),
- B.support.focusinBubbles || B.each({
- focus: 'focusin',
- blur: 'focusout'
- }, function (e, t) {
- var n = 0,
- r = function (e) {
- B.event.simulate(t, e.target, B.event.fix(e), !0)
- };
- B.event.special[t] = {
- setup: function () {
- n++ === 0 && D.addEventListener(e, r, !0)
- },
- teardown: function () {
- --n === 0 && D.removeEventListener(e, r, !0)
- }
- }
- }),
- B.fn.extend({
- on: function (e, n, r, i, s) {
- var o,
- u;
- if (typeof e == 'object') {
- typeof n != 'string' && (r = n, n = t);
- for (u in e) this.on(u, n, r, e[u], s);
- return this
- }
- r == null && i == null ? (i = n, r = n = t) : i == null && (typeof n == 'string' ? (i = r, r = t) : (i = r, r = n, n = t));
- if (i === !1) i = L;
- else if (!i) return this;
- return s === 1 && (o = i, i = function (e) {
- return B().off(e),
- o.apply(this, arguments)
- }, i.guid = o.guid || (o.guid = B.guid++)),
- this.each(function () {
- B.event.add(this, e, i, r, n)
- })
- },
- one: function (e, t, n, r) {
- return this.on.call(this, e, t, n, r, 1)
- },
- off: function (e, n, r) {
- if (e && e.preventDefault && e.handleObj) {
- var i = e.handleObj;
- return B(e.delegateTarget).off(i.namespace ? i.type + '.' + i.namespace : i.type, i.selector, i.handler),
- this
- }
- if (typeof e == 'object') {
- for (var s in e) this.off(s, n, e[s]);
- return this
- }
- if (n === !1 || typeof n == 'function') r = n,
- n = t;
- return r === !1 && (r = L),
- this.each(function () {
- B.event.remove(this, e, r, n)
- })
- },
- bind: function (e, t, n) {
- return this.on(e, null, t, n)
- },
- unbind: function (e, t) {
- return this.off(e, null, t)
- },
- live: function (e, t, n) {
- return B(this.context).on(e, this.selector, t, n),
- this
- },
- die: function (e, t) {
- return B(this.context).off(e, this.selector || '**', t),
- this
- },
- delegate: function (e, t, n, r) {
- return this.on(t, e, n, r)
- },
- undelegate: function (e, t, n) {
- return arguments.length == 1 ? this.off(e, '**') : this.off(t, e, n)
- },
- trigger: function (e, t) {
- return this.each(function () {
- B.event.trigger(e, t, this)
- })
- },
- triggerHandler: function (e, t) {
- if (this[0]) return B.event.trigger(e, t, this[0], !0)
- },
- toggle: function (e) {
- var t = arguments,
- n = e.guid || B.guid++,
- r = 0,
- i = function (n) {
- var i = (B._data(this, 'lastToggle' + e.guid) || 0) % r;
- return B._data(this, 'lastToggle' + e.guid, i + 1),
- n.preventDefault(),
- t[i].apply(this, arguments) || !1
- };
- i.guid = n;
- while (r < t.length) t[r++].guid = n;
- return this.click(i)
- },
- hover: function (e, t) {
- return this.mouseenter(e).mouseleave(t || e)
- }
- }),
- B.each('blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu'.split(' '), function (e, t) {
- B.fn[t] = function (e, n) {
- return n == null && (n = e, e = null),
- arguments.length > 0 ? this.on(t, null, e, n) : this.trigger(t)
- },
- B.attrFn && (B.attrFn[t] = !0),
- tt.test(t) && (B.event.fixHooks[t] = B.event.keyHooks),
- nt.test(t) && (B.event.fixHooks[t] = B.event.mouseHooks)
- }),
- function () {
- function e(e, t, n, r, s, o) {
- for (var u = 0, a = r.length; u < a; u++) {
- var f = r[u];
- if (f) {
- var l = !1;
- f = f[e];
- while (f) {
- if (f[i] === n) {
- l = r[f.sizset];
- break
- }
- if (f.nodeType === 1) {
- o || (f[i] = n, f.sizset = u);
- if (typeof t != 'string') {
- if (f === t) {
- l = !0;
- break
- }
- } else if (h.filter(t, [
- f
- ]).length > 0) {
- l = f;
- break
- }
- }
- f = f[e]
- }
- r[u] = l
- }
- }
- }
- function n(e, t, n, r, s, o) {
- for (var u = 0, a = r.length; u < a; u++) {
- var f = r[u];
- if (f) {
- var l = !1;
- f = f[e];
- while (f) {
- if (f[i] === n) {
- l = r[f.sizset];
- break
- }
- f.nodeType === 1 && !o && (f[i] = n, f.sizset = u);
- if (f.nodeName.toLowerCase() === t) {
- l = f;
- break
- }
- f = f[e]
- }
- r[u] = l
- }
- }
- }
- var r = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
- i = 'sizcache' + (Math.random() + '').replace('.', ''),
- s = 0,
- o = Object.prototype.toString,
- u = !1,
- a = !0,
- f = /\\/g,
- l = /\r\n/g,
- c = /\W/;
- [
- 0,
- 0
- ].sort(function () {
- return a = !1,
- 0
- });
- var h = function (e, t, n, i) {
- n = n || [
- ],
- t = t || D;
- var s = t;
- if (t.nodeType !== 1 && t.nodeType !== 9) return [];
- if (!e || typeof e != 'string') return n;
- var u,
- a,
- f,
- l,
- c,
- p,
- m,
- g,
- b = !0,
- w = h.isXML(t),
- E = [
- ],
- x = e;
- do {
- r.exec(''),
- u = r.exec(x);
- if (u) {
- x = u[3],
- E.push(u[1]);
- if (u[2]) {
- l = u[3];
- break
- }
- }
- } while (u);
- if (E.length > 1 && v.exec(e)) if (E.length === 2 && d.relative[E[0]]) a = S(E[0] + E[1], t, i);
- else {
- a = d.relative[E[0]] ? [
- t
- ] : h(E.shift(), t);
- while (E.length) e = E.shift(),
- d.relative[e] && (e += E.shift()),
- a = S(e, a, i)
- } else {
- !i && E.length > 1 && t.nodeType === 9 && !w && d.match.ID.test(E[0]) && !d.match.ID.test(E[E.length - 1]) && (c = h.find(E.shift(), t, w), t = c.expr ? h.filter(c.expr, c.set) [0] : c.set[0]);
- if (t) {
- c = i ? {
- expr: E.pop(),
- set: y(i)
- }
- : h.find(E.pop(), E.length !== 1 || E[0] !== '~' && E[0] !== '+' || !t.parentNode ? t : t.parentNode, w),
- a = c.expr ? h.filter(c.expr, c.set) : c.set,
- E.length > 0 ? f = y(a) : b = !1;
- while (E.length) p = E.pop(),
- m = p,
- d.relative[p] ? m = E.pop() : p = '',
- m == null && (m = t),
- d.relative[p](f, m, w)
- } else f = E = [
- ]
- }
- f || (f = a),
- f || h.error(p || e);
- if (o.call(f) === '[object Array]') if (!b) n.push.apply(n, f);
- else if (t && t.nodeType === 1) for (g = 0; f[g] != null; g++) f[g] && (f[g] === !0 || f[g].nodeType === 1 && h.contains(t, f[g])) && n.push(a[g]);
- else for (g = 0; f[g] != null; g++) f[g] && f[g].nodeType === 1 && n.push(a[g]);
- else y(f, n);
- return l && (h(l, s, n, i), h.uniqueSort(n)),
- n
- };
- h.uniqueSort = function (e) {
- if (w) {
- u = a,
- e.sort(w);
- if (u) for (var t = 1; t < e.length; t++) e[t] === e[t - 1] && e.splice(t--, 1)
- }
- return e
- },
- h.matches = function (e, t) {
- return h(e, null, null, t)
- },
- h.matchesSelector = function (e, t) {
- return h(t, null, null, [
- e
- ]).length > 0
- },
- h.find = function (e, t, n) {
- var r,
- i,
- s,
- o,
- u,
- a;
- if (!e) return [];
- for (i = 0, s = d.order.length; i < s; i++) {
- u = d.order[i];
- if (o = d.leftMatch[u].exec(e)) {
- a = o[1],
- o.splice(1, 1);
- if (a.substr(a.length - 1) !== '\\') {
- o[1] = (o[1] || '').replace(f, ''),
- r = d.find[u](o, t, n);
- if (r != null) {
- e = e.replace(d.match[u], '');
- break
- }
- }
- }
- }
- return r || (r = typeof t.getElementsByTagName != 'undefined' ? t.getElementsByTagName('*') : [
- ]),
- {
- set: r,
- expr: e
- }
- },
- h.filter = function (e, n, r, i) {
- var s,
- o,
- u,
- a,
- f,
- l,
- c,
- p,
- v,
- m = e,
- g = [
- ],
- y = n,
- b = n && n[0] && h.isXML(n[0]);
- while (e && n.length) {
- for (u in d.filter) if ((s = d.leftMatch[u].exec(e)) != null && s[2]) {
- l = d.filter[u],
- c = s[1],
- o = !1,
- s.splice(1, 1);
- if (c.substr(c.length - 1) === '\\') continue;
- y === g && (g = [
- ]);
- if (d.preFilter[u]) {
- s = d.preFilter[u](s, y, r, g, i, b);
- if (!s) o = a = !0;
- else if (s === !0) continue
- }
- if (s) for (p = 0; (f = y[p]) != null; p++) f && (a = l(f, s, p, y), v = i ^ a, r && a != null ? v ? o = !0 : y[p] = !1 : v && (g.push(f), o = !0));
- if (a !== t) {
- r || (y = g),
- e = e.replace(d.match[u], '');
- if (!o) return [];
- break
- }
- }
- if (e === m) {
- if (o != null) break;
- h.error(e)
- }
- m = e
- }
- return y
- },
- h.error = function (e) {
- throw new Error('Syntax error, unrecognized expression: ' + e)
- };
- var p = h.getText = function (e) {
- var t,
- n,
- r = e.nodeType,
- i = '';
- if (r) {
- if (r === 1 || r === 9) {
- if (typeof e.textContent == 'string') return e.textContent;
- if (typeof e.innerText == 'string') return e.innerText.replace(l, '');
- for (e = e.firstChild; e; e = e.nextSibling) i += p(e)
- } else if (r === 3 || r === 4) return e.nodeValue
- } else for (t = 0; n = e[t]; t++) n.nodeType !== 8 && (i += p(n));
- return i
- },
- d = h.selectors = {
- order: [
- 'ID',
- 'NAME',
- 'TAG'
- ],
- match: {
- ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
- NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
- ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
- TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
- CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
- PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
- },
- leftMatch: {
- },
- attrMap: {
- 'class': 'className',
- 'for': 'htmlFor'
- },
- attrHandle: {
- href: function (e) {
- return e.getAttribute('href')
- },
- type: function (e) {
- return e.getAttribute('type')
- }
- },
- relative: {
- '+': function (e, t) {
- var n = typeof t == 'string',
- r = n && !c.test(t),
- i = n && !r;
- r && (t = t.toLowerCase());
- for (var s = 0, o = e.length, u; s < o; s++) if (u = e[s]) {
- while ((u = u.previousSibling) && u.nodeType !== 1);
- e[s] = i || u && u.nodeName.toLowerCase() === t ? u || !1 : u === t
- }
- i && h.filter(t, e, !0)
- },
- '>': function (e, t) {
- var n,
- r = typeof t == 'string',
- i = 0,
- s = e.length;
- if (r && !c.test(t)) {
- t = t.toLowerCase();
- for (; i < s; i++) {
- n = e[i];
- if (n) {
- var o = n.parentNode;
- e[i] = o.nodeName.toLowerCase() === t ? o : !1
- }
- }
- } else {
- for (; i < s; i++) n = e[i],
- n && (e[i] = r ? n.parentNode : n.parentNode === t);
- r && h.filter(t, e, !0)
- }
- },
- '': function (t, r, i) {
- var o,
- u = s++,
- a = e;
- typeof r == 'string' && !c.test(r) && (r = r.toLowerCase(), o = r, a = n),
- a('parentNode', r, u, t, o, i)
- },
- '~': function (t, r, i) {
- var o,
- u = s++,
- a = e;
- typeof r == 'string' && !c.test(r) && (r = r.toLowerCase(), o = r, a = n),
- a('previousSibling', r, u, t, o, i)
- }
- },
- find: {
- ID: function (e, t, n) {
- if (typeof t.getElementById != 'undefined' && !n) {
- var r = t.getElementById(e[1]);
- return r && r.parentNode ? [
- r
- ] : [
- ]
- }
- },
- NAME: function (e, t) {
- if (typeof t.getElementsByName != 'undefined') {
- var n = [
- ],
- r = t.getElementsByName(e[1]);
- for (var i = 0, s = r.length; i < s; i++) r[i].getAttribute('name') === e[1] && n.push(r[i]);
- return n.length === 0 ? null : n
- }
- },
- TAG: function (e, t) {
- if (typeof t.getElementsByTagName != 'undefined') return t.getElementsByTagName(e[1])
- }
- },
- preFilter: {
- CLASS: function (e, t, n, r, i, s) {
- e = ' ' + e[1].replace(f, '') + ' ';
- if (s) return e;
- for (var o = 0, u; (u = t[o]) != null; o++) u && (i ^ (u.className && (' ' + u.className + ' ').replace(/[\t\n\r]/g, ' ').indexOf(e) >= 0) ? n || r.push(u) : n && (t[o] = !1));
- return !1
- },
- ID: function (e) {
- return e[1].replace(f, '')
- },
- TAG: function (e, t) {
- return e[1].replace(f, '').toLowerCase()
- },
- CHILD: function (e) {
- if (e[1] === 'nth') {
- e[2] || h.error(e[0]),
- e[2] = e[2].replace(/^\+|\s*/g, '');
- var t = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2] === 'even' && '2n' || e[2] === 'odd' && '2n+1' || !/\D/.test(e[2]) && '0n+' + e[2] || e[2]);
- e[2] = t[1] + (t[2] || 1) - 0,
- e[3] = t[3] - 0
- } else e[2] && h.error(e[0]);
- return e[0] = s++,
- e
- },
- ATTR: function (e, t, n, r, i, s) {
- var o = e[1] = e[1].replace(f, '');
- return !s && d.attrMap[o] && (e[1] = d.attrMap[o]),
- e[4] = (e[4] || e[5] || '').replace(f, ''),
- e[2] === '~=' && (e[4] = ' ' + e[4] + ' '),
- e
- },
- PSEUDO: function (e, t, n, i, s) {
- if (e[1] === 'not') {
- if (!((r.exec(e[3]) || '').length > 1 || /^\w/.test(e[3]))) {
- var o = h.filter(e[3], t, n, !0 ^ s);
- return n || i.push.apply(i, o),
- !1
- }
- e[3] = h(e[3], null, null, t)
- } else if (d.match.POS.test(e[0]) || d.match.CHILD.test(e[0])) return !0;
- return e
- },
- POS: function (e) {
- return e.unshift(!0),
- e
- }
- },
- filters: {
- enabled: function (e) {
- return e.disabled === !1 && e.type !== 'hidden'
- },
- disabled: function (e) {
- return e.disabled === !0
- },
- checked: function (e) {
- return e.checked === !0
- },
- selected: function (e) {
- return e.parentNode && e.parentNode.selectedIndex,
- e.selected === !0
- },
- parent: function (e) {
- return !!e.firstChild
- },
- empty: function (e) {
- return !e.firstChild
- },
- has: function (e, t, n) {
- return !!h(n[3], e).length
- },
- header: function (e) {
- return /h\d/i.test(e.nodeName)
- },
- text: function (e) {
- var t = e.getAttribute('type'),
- n = e.type;
- return e.nodeName.toLowerCase() === 'input' && 'text' === n && (t === n || t === null)
- },
- radio: function (e) {
- return e.nodeName.toLowerCase() === 'input' && 'radio' === e.type
- },
- checkbox: function (e) {
- return e.nodeName.toLowerCase() === 'input' && 'checkbox' === e.type
- },
- file: function (e) {
- return e.nodeName.toLowerCase() === 'input' && 'file' === e.type
- },
- password: function (e) {
- return e.nodeName.toLowerCase() === 'input' && 'password' === e.type
- },
- submit: function (e) {
- var t = e.nodeName.toLowerCase();
- return (t === 'input' || t === 'button') && 'submit' === e.type
- },
- image: function (e) {
- return e.nodeName.toLowerCase() === 'input' && 'image' === e.type
- },
- reset: function (e) {
- var t = e.nodeName.toLowerCase();
- return (t === 'input' || t === 'button') && 'reset' === e.type
- },
- button: function (e) {
- var t = e.nodeName.toLowerCase();
- return t === 'input' && 'button' === e.type || t === 'button'
- },
- input: function (e) {
- return /input|select|textarea|button/i.test(e.nodeName)
- },
- focus: function (e) {
- return e === e.ownerDocument.activeElement
- }
- },
- setFilters: {
- first: function (e, t) {
- return t === 0
- },
- last: function (e, t, n, r) {
- return t === r.length - 1
- },
- even: function (e, t) {
- return t % 2 === 0
- },
- odd: function (e, t) {
- return t % 2 === 1
- },
- lt: function (e, t, n) {
- return t < n[3] - 0
- },
- gt: function (e, t, n) {
- return t > n[3] - 0
- },
- nth: function (e, t, n) {
- return n[3] - 0 === t
- },
- eq: function (e, t, n) {
- return n[3] - 0 === t
- }
- },
- filter: {
- PSEUDO: function (e, t, n, r) {
- var i = t[1],
- s = d.filters[i];
- if (s) return s(e, n, t, r);
- if (i === 'contains') return (e.textContent || e.innerText || p([e]) || '').indexOf(t[3]) >= 0;
- if (i === 'not') {
- var o = t[3];
- for (var u = 0, a = o.length; u < a; u++) if (o[u] === e) return !1;
- return !0
- }
- h.error(i)
- },
- CHILD: function (e, t) {
- var n,
- r,
- s,
- o,
- u,
- a,
- f,
- l = t[1],
- c = e;
- switch (l) {
- case 'only':
- case 'first':
- while (c = c.previousSibling) if (c.nodeType === 1) return !1;
- if (l === 'first') return !0;
- c = e;
- case 'last':
- while (c = c.nextSibling) if (c.nodeType === 1) return !1;
- return !0;
- case 'nth':
- n = t[2],
- r = t[3];
- if (n === 1 && r === 0) return !0;
- s = t[0],
- o = e.parentNode;
- if (o && (o[i] !== s || !e.nodeIndex)) {
- a = 0;
- for (c = o.firstChild; c; c = c.nextSibling) c.nodeType === 1 && (c.nodeIndex = ++a);
- o[i] = s
- }
- return f = e.nodeIndex - r,
- n === 0 ? f === 0 : f % n === 0 && f / n >= 0
- }
- },
- ID: function (e, t) {
- return e.nodeType === 1 && e.getAttribute('id') === t
- },
- TAG: function (e, t) {
- return t === '*' && e.nodeType === 1 || !!e.nodeName && e.nodeName.toLowerCase() === t
- },
- CLASS: function (e, t) {
- return (' ' + (e.className || e.getAttribute('class')) + ' ').indexOf(t) > - 1
- },
- ATTR: function (e, t) {
- var n = t[1],
- r = h.attr ? h.attr(e, n) : d.attrHandle[n] ? d.attrHandle[n](e) : e[n] != null ? e[n] : e.getAttribute(n),
- i = r + '',
- s = t[2],
- o = t[4];
- return r == null ? s === '!=' : !s && h.attr ? r != null : s === '=' ? i === o : s === '*=' ? i.indexOf(o) >= 0 : s === '~=' ? (' ' + i + ' ').indexOf(o) >= 0 : o ? s === '!=' ? i !== o : s === '^=' ? i.indexOf(o) === 0 : s === '$=' ? i.substr(i.length - o.length) === o : s === '|=' ? i === o || i.substr(0, o.length + 1) === o + '-' : !1 : i && r !== !1
- },
- POS: function (e, t, n, r) {
- var i = t[2],
- s = d.setFilters[i];
- if (s) return s(e, n, t, r)
- }
- }
- },
- v = d.match.POS,
- m = function (e, t) {
- return '\\' + (t - 0 + 1)
- };
- for (var g in d.match) d.match[g] = new RegExp(d.match[g].source + /(?![^\[]*\])(?![^\(]*\))/.source),
- d.leftMatch[g] = new RegExp(/(^(?:.|\r|\n)*?)/.source + d.match[g].source.replace(/\\(\d+)/g, m));
- var y = function (e, t) {
- return e = Array.prototype.slice.call(e, 0),
- t ? (t.push.apply(t, e), t) : e
- };
- try {
- Array.prototype.slice.call(D.documentElement.childNodes, 0) [0].nodeType
- } catch (b) {
- y = function (e, t) {
- var n = 0,
- r = t || [
- ];
- if (o.call(e) === '[object Array]') Array.prototype.push.apply(r, e);
- else if (typeof e.length == 'number') for (var i = e.length; n < i; n++) r.push(e[n]);
- else for (; e[n]; n++) r.push(e[n]);
- return r
- }
- }
- var w,
- E;
- D.documentElement.compareDocumentPosition ? w = function (e, t) {
- return e === t ? (u = !0, 0) : !e.compareDocumentPosition || !t.compareDocumentPosition ? e.compareDocumentPosition ? - 1 : 1 : e.compareDocumentPosition(t) & 4 ? - 1 : 1
- }
- : (w = function (e, t) {
- if (e === t) return u = !0,
- 0;
- if (e.sourceIndex && t.sourceIndex) return e.sourceIndex - t.sourceIndex;
- var n,
- r,
- i = [
- ],
- s = [
- ],
- o = e.parentNode,
- a = t.parentNode,
- f = o;
- if (o === a) return E(e, t);
- if (!o) return - 1;
- if (!a) return 1;
- while (f) i.unshift(f),
- f = f.parentNode;
- f = a;
- while (f) s.unshift(f),
- f = f.parentNode;
- n = i.length,
- r = s.length;
- for (var l = 0; l < n && l < r; l++) if (i[l] !== s[l]) return E(i[l], s[l]);
- return l === n ? E(e, s[l], - 1) : E(i[l], t, 1)
- }, E = function (e, t, n) {
- if (e === t) return n;
- var r = e.nextSibling;
- while (r) {
- if (r === t) return - 1;
- r = r.nextSibling
- }
- return 1
- }),
- function () {
- var e = D.createElement('div'),
- n = 'script' + (new Date).getTime(),
- r = D.documentElement;
- e.innerHTML = '<a name=\'' + n + '\'/>',
- r.insertBefore(e, r.firstChild),
- D.getElementById(n) && (d.find.ID = function (e, n, r) {
- if (typeof n.getElementById != 'undefined' && !r) {
- var i = n.getElementById(e[1]);
- return i ? i.id === e[1] || typeof i.getAttributeNode != 'undefined' && i.getAttributeNode('id').nodeValue === e[1] ? [
- i
- ] : t : [
- ]
- }
- }, d.filter.ID = function (e, t) {
- var n = typeof e.getAttributeNode != 'undefined' && e.getAttributeNode('id');
- return e.nodeType === 1 && n && n.nodeValue === t
- }),
- r.removeChild(e),
- r = e = null
- }(),
- function () {
- var e = D.createElement('div');
- e.appendChild(D.createComment('')),
- e.getElementsByTagName('*').length > 0 && (d.find.TAG = function (e, t) {
- var n = t.getElementsByTagName(e[1]);
- if (e[1] === '*') {
- var r = [
- ];
- for (var i = 0; n[i]; i++) n[i].nodeType === 1 && r.push(n[i]);
- n = r
- }
- return n
- }),
- e.innerHTML = '<a href=\'#\'></a>',
- e.firstChild && typeof e.firstChild.getAttribute != 'undefined' && e.firstChild.getAttribute('href') !== '#' && (d.attrHandle.href = function (e) {
- return e.getAttribute('href', 2)
- }),
- e = null
- }(),
- D.querySelectorAll && function () {
- var e = h,
- t = D.createElement('div'),
- n = '__sizzle__';
- t.innerHTML = '<p class=\'TEST\'></p>';
- if (!t.querySelectorAll || t.querySelectorAll('.TEST').length !== 0) {
- h = function (t, r, i, s) {
- r = r || D;
- if (!s && !h.isXML(r)) {
- var o = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);
- if (o && (r.nodeType === 1 || r.nodeType === 9)) {
- if (o[1]) return y(r.getElementsByTagName(t), i);
- if (o[2] && d.find.CLASS && r.getElementsByClassName) return y(r.getElementsByClassName(o[2]), i)
- }
- if (r.nodeType === 9) {
- if (t === 'body' && r.body) return y([r.body], i);
- if (o && o[3]) {
- var u = r.getElementById(o[3]);
- if (!u || !u.parentNode) return y([], i);
- if (u.id === o[3]) return y([u], i)
- }
- try {
- return y(r.querySelectorAll(t), i)
- } catch (a) {
- }
- } else if (r.nodeType === 1 && r.nodeName.toLowerCase() !== 'object') {
- var f = r,
- l = r.getAttribute('id'),
- c = l || n,
- p = r.parentNode,
- v = /^\s*[+~]/.test(t);
- l ? c = c.replace(/'/g, '\\$&') : r.setAttribute('id', c),
- v && p && (r = r.parentNode);
- try {
- if (!v || p) return y(r.querySelectorAll('[id=\'' + c + '\'] ' + t), i)
- } catch (m) {
- } finally {
- l || f.removeAttribute('id')
- }
- }
- }
- return e(t, r, i, s)
- };
- for (var r in e) h[r] = e[r];
- t = null
- }
- }(),
- function () {
- var e = D.documentElement,
- t = e.matchesSelector || e.mozMatchesSelector || e.webkitMatchesSelector || e.msMatchesSelector;
- if (t) {
- var n = !t.call(D.createElement('div'), 'div'),
- r = !1;
- try {
- t.call(D.documentElement, '[validate!=\'\']:sizzle')
- } catch (i) {
- r = !0
- }
- h.matchesSelector = function (e, i) {
- i = i.replace(/\=\s*([^'"\]]*)\s*\]/g, '=\'$1\']');
- if (!h.isXML(e)) try {
- if (r || !d.match.PSEUDO.test(i) && !/!=/.test(i)) {
- var s = t.call(e, i);
- if (s || !n || e.document && e.document.nodeType !== 11) return s
- }
- } catch (o) {
- }
- return h(i, null, null, [
- e
- ]).length > 0
- }
- }
- }(),
- function () {
- var e = D.createElement('div');
- e.innerHTML = '<div class=\'validate e\'></div><div class=\'validate\'></div>';
- if (!!e.getElementsByClassName && e.getElementsByClassName('e').length !== 0) {
- e.lastChild.className = 'e';
- if (e.getElementsByClassName('e').length === 1) return;
- d.order.splice(1, 0, 'CLASS'),
- d.find.CLASS = function (e, t, n) {
- if (typeof t.getElementsByClassName != 'undefined' && !n) return t.getElementsByClassName(e[1])
- },
- e = null
- }
- }(),
- D.documentElement.contains ? h.contains = function (e, t) {
- return e !== t && (e.contains ? e.contains(t) : !0)
- }
- : D.documentElement.compareDocumentPosition ? h.contains = function (e, t) {
- return !!(e.compareDocumentPosition(t) & 16)
- }
- : h.contains = function () {
- return !1
- },
- h.isXML = function (e) {
- var t = (e ? e.ownerDocument || e : 0).documentElement;
- return t ? t.nodeName !== 'HTML' : !1
- };
- var S = function (e, t, n) {
- var r,
- i = [
- ],
- s = '',
- o = t.nodeType ? [
- t
- ] : t;
- while (r = d.match.PSEUDO.exec(e)) s += r[0],
- e = e.replace(d.match.PSEUDO, '');
- e = d.relative[e] ? e + '*' : e;
- for (var u = 0, a = o.length; u < a; u++) h(e, o[u], i, n);
- return h.filter(s, i)
- };
- h.attr = B.attr,
- h.selectors.attrMap = {
- },
- B.find = h,
- B.expr = h.selectors,
- B.expr[':'] = B.expr.filters,
- B.unique = h.uniqueSort,
- B.text = h.getText,
- B.isXMLDoc = h.isXML,
- B.contains = h.contains
- }();
- var at = /Until$/,
- ft = /^(?:parents|prevUntil|prevAll)/,
- lt = /,/,
- ct = /^.[^:#\[\.,]*$/,
- ht = Array.prototype.slice,
- pt = B.expr.match.POS,
- dt = {
- children: !0,
- contents: !0,
- next: !0,
- prev: !0
- };
- B.fn.extend({
- find: function (e) {
- var t = this,
- n,
- r;
- if (typeof e != 'string') return B(e).filter(function () {
- for (n = 0, r = t.length; n < r; n++) if (B.contains(t[n], this)) return !0
- });
- var i = this.pushStack('', 'find', e),
- s,
- o,
- u;
- for (n = 0, r = this.length; n < r; n++) {
- s = i.length,
- B.find(e, this[n], i);
- if (n > 0) for (o = s; o < i.length; o++) for (u = 0; u < s; u++) if (i[u] === i[o]) {
- i.splice(o--, 1);
- break
- }
- }
- return i
- },
- has: function (e) {
- var t = B(e);
- return this.filter(function () {
- for (var e = 0, n = t.length; e < n; e++) if (B.contains(this, t[e])) return !0
- })
- },
- not: function (e) {
- return this.pushStack(N(this, e, !1), 'not', e)
- },
- filter: function (e) {
- return this.pushStack(N(this, e, !0), 'filter', e)
- },
- is: function (e) {
- return !!e && (typeof e == 'string' ? pt.test(e) ? B(e, this.context).index(this[0]) >= 0 : B.filter(e, this).length > 0 : this.filter(e).length > 0)
- },
- closest: function (e, t) {
- var n = [
- ],
- r,
- i,
- s = this[0];
- if (B.isArray(e)) {
- var o = 1;
- while (s && s.ownerDocument && s !== t) {
- for (r = 0; r < e.length; r++) B(s).is(e[r]) && n.push({
- selector: e[r],
- elem: s,
- level: o
- });
- s = s.parentNode,
- o++
- }
- return n
- }
- var u = pt.test(e) || typeof e != 'string' ? B(e, t || this.context) : 0;
- for (r = 0, i = this.length; r < i; r++) {
- s = this[r];
- while (s) {
- if (u ? u.index(s) > - 1 : B.find.matchesSelector(s, e)) {
- n.push(s);
- break
- }
- s = s.parentNode;
- if (!s || !s.ownerDocument || s === t || s.nodeType === 11) break
- }
- }
- return n = n.length > 1 ? B.unique(n) : n,
- this.pushStack(n, 'closest', e)
- },
- index: function (e) {
- return e ? typeof e == 'string' ? B.inArray(this[0], B(e)) : B.inArray(e.jquery ? e[0] : e, this) : this[0] && this[0].parentNode ? this.prevAll().length : - 1
- },
- add: function (e, t) {
- var n = typeof e == 'string' ? B(e, t) : B.makeArray(e && e.nodeType ? [
- e
- ] : e),
- r = B.merge(this.get(), n);
- return this.pushStack(C(n[0]) || C(r[0]) ? r : B.unique(r))
- },
- andSelf: function () {
- return this.add(this.prevObject)
- }
- }),
- B.each({
- parent: function (e) {
- var t = e.parentNode;
- return t && t.nodeType !== 11 ? t : null
- },
- parents: function (e) {
- return B.dir(e, 'parentNode')
- },
- parentsUntil: function (e, t, n) {
- return B.dir(e, 'parentNode', n)
- },
- next: function (e) {
- return B.nth(e, 2, 'nextSibling')
- },
- prev: function (e) {
- return B.nth(e, 2, 'previousSibling')
- },
- nextAll: function (e) {
- return B.dir(e, 'nextSibling')
- },
- prevAll: function (e) {
- return B.dir(e, 'previousSibling')
- },
- nextUntil: function (e, t, n) {
- return B.dir(e, 'nextSibling', n)
- },
- prevUntil: function (e, t, n) {
- return B.dir(e, 'previousSibling', n)
- },
- siblings: function (e) {
- return B.sibling(e.parentNode.firstChild, e)
- },
- children: function (e) {
- return B.sibling(e.firstChild)
- },
- contents: function (e) {
- return B.nodeName(e, 'iframe') ? e.contentDocument || e.contentWindow.document : B.makeArray(e.childNodes)
- }
- }, function (e, t) {
- B.fn[e] = function (n, r) {
- var i = B.map(this, t, n);
- return at.test(e) || (r = n),
- r && typeof r == 'string' && (i = B.filter(r, i)),
- i = this.length > 1 && !dt[e] ? B.unique(i) : i,
- (this.length > 1 || lt.test(r)) && ft.test(e) && (i = i.reverse()),
- this.pushStack(i, e, ht.call(arguments).join(','))
- }
- }),
- B.extend({
- filter: function (e, t, n) {
- return n && (e = ':not(' + e + ')'),
- t.length === 1 ? B.find.matchesSelector(t[0], e) ? [
- t[0]
- ] : [
- ] : B.find.matches(e, t)
- },
- dir: function (e, n, r) {
- var i = [
- ],
- s = e[n];
- while (s && s.nodeType !== 9 && (r === t || s.nodeType !== 1 || !B(s).is(r))) s.nodeType === 1 && i.push(s),
- s = s[n];
- return i
- },
- nth: function (e, t, n, r) {
- t = t || 1;
- var i = 0;
- for (; e; e = e[n]) if (e.nodeType === 1 && ++i === t) break;
- return e
- },
- sibling: function (e, t) {
- var n = [
- ];
- for (; e; e = e.nextSibling) e.nodeType === 1 && e !== t && n.push(e);
- return n
- }
- });
- var vt = 'abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video',
- mt = / jQuery\d+="(?:\d+|null)"/g,
- gt = /^\s+/,
- yt = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- bt = /<([\w:]+)/,
- wt = /<tbody/i,
- Et = /<|&#?\w+;/,
- St = /<(?:script|style)/i,
- xt = /<(?:script|object|embed|option|style)/i,
- Tt = new RegExp('<(?:' + vt + ')', 'i'),
- Nt = /checked\s*(?:[^=]|=\s*.checked.)/i,
- Ct = /\/(java|ecma)script/i,
- kt = /^\s*<!(?:\[CDATA\[|\-\-)/,
- Lt = {
- option: [
- 1,
- '<select multiple=\'multiple\'>',
- '</select>'
- ],
- legend: [
- 1,
- '<fieldset>',
- '</fieldset>'
- ],
- thead: [
- 1,
- '<table>',
- '</table>'
- ],
- tr: [
- 2,
- '<table><tbody>',
- '</tbody></table>'
- ],
- td: [
- 3,
- '<table><tbody><tr>',
- '</tr></tbody></table>'
- ],
- col: [
- 2,
- '<table><tbody></tbody><colgroup>',
- '</colgroup></table>'
- ],
- area: [
- 1,
- '<map>',
- '</map>'
- ],
- _default: [
- 0,
- '',
- ''
- ]
- },
- At = T(D);
- Lt.optgroup = Lt.option,
- Lt.tbody = Lt.tfoot = Lt.colgroup = Lt.caption = Lt.thead,
- Lt.th = Lt.td,
- B.support.htmlSerialize || (Lt._default = [
- 1,
- 'div<div>',
- '</div>'
- ]),
- B.fn.extend({
- text: function (e) {
- return B.isFunction(e) ? this.each(function (t) {
- var n = B(this);
- n.text(e.call(this, t, n.text()))
- }) : typeof e != 'object' && e !== t ? this.empty().append((this[0] && this[0].ownerDocument || D).createTextNode(e)) : B.text(this)
- },
- wrapAll: function (e) {
- if (B.isFunction(e)) return this.each(function (t) {
- B(this).wrapAll(e.call(this, t))
- });
- if (this[0]) {
- var t = B(e, this[0].ownerDocument).eq(0).clone(!0);
- this[0].parentNode && t.insertBefore(this[0]),
- t.map(function () {
- var e = this;
- while (e.firstChild && e.firstChild.nodeType === 1) e = e.firstChild;
- return e
- }).append(this)
- }
- return this
- },
- wrapInner: function (e) {
- return B.isFunction(e) ? this.each(function (t) {
- B(this).wrapInner(e.call(this, t))
- }) : this.each(function () {
- var t = B(this),
- n = t.contents();
- n.length ? n.wrapAll(e) : t.append(e)
- })
- },
- wrap: function (e) {
- var t = B.isFunction(e);
- return this.each(function (n) {
- B(this).wrapAll(t ? e.call(this, n) : e)
- })
- },
- unwrap: function () {
- return this.parent().each(function () {
- B.nodeName(this, 'body') || B(this).replaceWith(this.childNodes)
- }).end()
- },
- append: function () {
- return this.domManip(arguments, !0, function (e) {
- this.nodeType === 1 && this.appendChild(e)
- })
- },
- prepend: function () {
- return this.domManip(arguments, !0, function (e) {
- this.nodeType === 1 && this.insertBefore(e, this.firstChild)
- })
- },
- before: function () {
- if (this[0] && this[0].parentNode) return this.domManip(arguments, !1, function (e) {
- this.parentNode.insertBefore(e, this)
- });
- if (arguments.length) {
- var e = B.clean(arguments);
- return e.push.apply(e, this.toArray()),
- this.pushStack(e, 'before', arguments)
- }
- },
- after: function () {
- if (this[0] && this[0].parentNode) return this.domManip(arguments, !1, function (e) {
- this.parentNode.insertBefore(e, this.nextSibling)
- });
- if (arguments.length) {
- var e = this.pushStack(this, 'after', arguments);
- return e.push.apply(e, B.clean(arguments)),
- e
- }
- },
- remove: function (e, t) {
- for (var n = 0, r; (r = this[n]) != null; n++) if (!e || B.filter(e, [
- r
- ]).length) !t && r.nodeType === 1 && (B.cleanData(r.getElementsByTagName('*')), B.cleanData([r])),
- r.parentNode && r.parentNode.removeChild(r);
- return this
- },
- empty: function () {
- for (var e = 0, t; (t = this[e]) != null; e++) {
- t.nodeType === 1 && B.cleanData(t.getElementsByTagName('*'));
- while (t.firstChild) t.removeChild(t.firstChild)
- }
- return this
- },
- clone: function (e, t) {
- return e = e == null ? !1 : e,
- t = t == null ? e : t,
- this.map(function () {
- return B.clone(this, e, t)
- })
- },
- html: function (e) {
- if (e === t) return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(mt, '') : null;
- if (typeof e == 'string' && !St.test(e) && (B.support.leadingWhitespace || !gt.test(e)) && !Lt[(bt.exec(e) || [
- '',
- ''
- ]) [1].toLowerCase()]) {
- e = e.replace(yt, '<$1></$2>');
- try {
- for (var n = 0, r = this.length; n < r; n++) this[n].nodeType === 1 && (B.cleanData(this[n].getElementsByTagName('*')), this[n].innerHTML = e)
- } catch (i) {
- this.empty().append(e)
- }
- } else B.isFunction(e) ? this.each(function (t) {
- var n = B(this);
- n.html(e.call(this, t, n.html()))
- }) : this.empty().append(e);
- return this
- },
- replaceWith: function (e) {
- return this[0] && this[0].parentNode ? B.isFunction(e) ? this.each(function (t) {
- var n = B(this),
- r = n.html();
- n.replaceWith(e.call(this, t, r))
- }) : (typeof e != 'string' && (e = B(e).detach()), this.each(function () {
- var t = this.nextSibling,
- n = this.parentNode;
- B(this).remove(),
- t ? B(t).before(e) : B(n).append(e)
- })) : this.length ? this.pushStack(B(B.isFunction(e) ? e() : e), 'replaceWith', e) : this
- },
- detach: function (e) {
- return this.remove(e, !0)
- },
- domManip: function (e, n, r) {
- var i,
- s,
- o,
- u,
- a = e[0],
- f = [
- ];
- if (!B.support.checkClone && arguments.length === 3 && typeof a == 'string' && Nt.test(a)) return this.each(function () {
- B(this).domManip(e, n, r, !0)
- });
- if (B.isFunction(a)) return this.each(function (i) {
- var s = B(this);
- e[0] = a.call(this, i, n ? s.html() : t),
- s.domManip(e, n, r)
- });
- if (this[0]) {
- u = a && a.parentNode,
- B.support.parentNode && u && u.nodeType === 11 && u.childNodes.length === this.length ? i = {
- fragment: u
- }
- : i = B.buildFragment(e, this, f),
- o = i.fragment,
- o.childNodes.length === 1 ? s = o = o.firstChild : s = o.firstChild;
- if (s) {
- n = n && B.nodeName(s, 'tr');
- for (var l = 0, c = this.length, h = c - 1; l < c; l++) r.call(n ? x(this[l], s) : this[l], i.cacheable || c > 1 && l < h ? B.clone(o, !0, !0) : o)
- }
- f.length && B.each(f, m)
- }
- return this
- }
- }),
- B.buildFragment = function (e, t, n) {
- var r,
- i,
- s,
- o,
- u = e[0];
- return t && t[0] && (o = t[0].ownerDocument || t[0]),
- o.createDocumentFragment || (o = D),
- e.length === 1 && typeof u == 'string' && u.length < 512 && o === D && u.charAt(0) === '<' && !xt.test(u) && (B.support.checkClone || !Nt.test(u)) && (B.support.html5Clone || !Tt.test(u)) && (i = !0, s = B.fragments[u], s && s !== 1 && (r = s)),
- r || (r = o.createDocumentFragment(), B.clean(e, o, r, n)),
- i && (B.fragments[u] = s ? r : 1),
- {
- fragment: r,
- cacheable: i
- }
- },
- B.fragments = {
- },
- B.each({
- appendTo: 'append',
- prependTo: 'prepend',
- insertBefore: 'before',
- insertAfter: 'after',
- replaceAll: 'replaceWith'
- }, function (e, t) {
- B.fn[e] = function (n) {
- var r = [
- ],
- i = B(n),
- s = this.length === 1 && this[0].parentNode;
- if (s && s.nodeType === 11 && s.childNodes.length === 1 && i.length === 1) return i[t](this[0]),
- this;
- for (var o = 0, u = i.length; o < u; o++) {
- var a = (o > 0 ? this.clone(!0) : this).get();
- B(i[o]) [t](a),
- r = r.concat(a)
- }
- return this.pushStack(r, e, i.selector)
- }
- }),
- B.extend({
- clone: function (e, t, n) {
- var r,
- i,
- s,
- o = B.support.html5Clone || !Tt.test('<' + e.nodeName) ? e.cloneNode(!0) : g(e);
- if ((!B.support.noCloneEvent || !B.support.noCloneChecked) && (e.nodeType === 1 || e.nodeType === 11) && !B.isXMLDoc(e)) {
- E(e, o),
- r = w(e),
- i = w(o);
- for (s = 0; r[s]; ++s) i[s] && E(r[s], i[s])
- }
- if (t) {
- S(e, o);
- if (n) {
- r = w(e),
- i = w(o);
- for (s = 0; r[s]; ++s) S(r[s], i[s])
- }
- }
- return r = i = null,
- o
- },
- clean: function (e, t, n, r) {
- var i;
- t = t || D,
- typeof t.createElement == 'undefined' && (t = t.ownerDocument || t[0] && t[0].ownerDocument || D);
- var s = [
- ],
- o;
- for (var u = 0, a; (a = e[u]) != null; u++) {
- typeof a == 'number' && (a += '');
- if (!a) continue;
- if (typeof a == 'string') if (!Et.test(a)) a = t.createTextNode(a);
- else {
- a = a.replace(yt, '<$1></$2>');
- var f = (bt.exec(a) || [
- '',
- ''
- ]) [1].toLowerCase(),
- l = Lt[f] || Lt._default,
- c = l[0],
- h = t.createElement('div');
- t === D ? At.appendChild(h) : T(t).appendChild(h),
- h.innerHTML = l[1] + a + l[2];
- while (c--) h = h.lastChild;
- if (!B.support.tbody) {
- var p = wt.test(a),
- d = f === 'table' && !p ? h.firstChild && h.firstChild.childNodes : l[1] === '<table>' && !p ? h.childNodes : [
- ];
- for (o = d.length - 1; o >= 0; --o) B.nodeName(d[o], 'tbody') && !d[o].childNodes.length && d[o].parentNode.removeChild(d[o])
- }
- !B.support.leadingWhitespace && gt.test(a) && h.insertBefore(t.createTextNode(gt.exec(a) [0]), h.firstChild),
- a = h.childNodes
- }
- var v;
- if (!B.support.appendChecked) if (a[0] && typeof (v = a.length) == 'number') for (o = 0; o < v; o++) y(a[o]);
- else y(a);
- a.nodeType ? s.push(a) : s = B.merge(s, a)
- }
- if (n) {
- i = function (e) {
- return !e.type || Ct.test(e.type)
- };
- for (u = 0; s[u]; u++) if (r && B.nodeName(s[u], 'script') && (!s[u].type || s[u].type.toLowerCase() === 'text/javascript')) r.push(s[u].parentNode ? s[u].parentNode.removeChild(s[u]) : s[u]);
- else {
- if (s[u].nodeType === 1) {
- var m = B.grep(s[u].getElementsByTagName('script'), i);
- s.splice.apply(s, [
- u + 1,
- 0
- ].concat(m))
- }
- n.appendChild(s[u])
- }
- }
- return s
- },
- cleanData: function (e) {
- var t,
- n,
- r = B.cache,
- i = B.event.special,
- s = B.support.deleteExpando;
- for (var o = 0, u; (u = e[o]) != null; o++) {
- if (u.nodeName && B.noData[u.nodeName.toLowerCase()]) continue;
- n = u[B.expando];
- if (n) {
- t = r[n];
- if (t && t.events) {
- for (var a in t.events) i[a] ? B.event.remove(u, a) : B.removeEvent(u, a, t.handle);
- t.handle && (t.handle.elem = null)
- }
- s ? delete u[B.expando] : u.removeAttribute && u.removeAttribute(B.expando),
- delete r[n]
- }
- }
- }
- });
- var Ot = /alpha\([^)]*\)/i,
- Mt = /opacity=([^)]*)/,
- _t = /([A-Z]|^ms)/g,
- Dt = /^-?\d+(?:px)?$/i,
- Pt = /^-?\d/,
- Ht = /^([\-+])=([\-+.\de]+)/,
- Bt = {
- position: 'absolute',
- visibility: 'hidden',
- display: 'block'
- },
- jt = [
- 'Left',
- 'Right'
- ],
- Ft = [
- 'Top',
- 'Bottom'
- ],
- It,
- qt,
- Rt;
- B.fn.css = function (e, n) {
- return arguments.length === 2 && n === t ? this : B.access(this, e, n, !0, function (e, n, r) {
- return r !== t ? B.style(e, n, r) : B.css(e, n)
- })
- },
- B.extend({
- cssHooks: {
- opacity: {
- get: function (e, t) {
- if (t) {
- var n = It(e, 'opacity', 'opacity');
- return n === '' ? '1' : n
- }
- return e.style.opacity
- }
- }
- },
- cssNumber: {
- fillOpacity: !0,
- fontWeight: !0,
- lineHeight: !0,
- opacity: !0,
- orphans: !0,
- widows: !0,
- zIndex: !0,
- zoom: !0
- },
- cssProps: {
- 'float': B.support.cssFloat ? 'cssFloat' : 'styleFloat'
- },
- style: function (e, n, r, i) {
- if (!!e && e.nodeType !== 3 && e.nodeType !== 8 && !!e.style) {
- var s,
- o,
- u = B.camelCase(n),
- a = e.style,
- f = B.cssHooks[u];
- n = B.cssProps[u] || u;
- if (r === t) return f && 'get' in f && (s = f.get(e, !1, i)) !== t ? s : a[n];
- o = typeof r,
- o === 'string' && (s = Ht.exec(r)) && (r = + (s[1] + 1) * + s[2] + parseFloat(B.css(e, n)), o = 'number');
- if (r == null || o === 'number' && isNaN(r)) return;
- o === 'number' && !B.cssNumber[u] && (r += 'px');
- if (!f || !('set' in f) || (r = f.set(e, r)) !== t) try {
- a[n] = r
- } catch (l) {
- }
- }
- },
- css: function (e, n, r) {
- var i,
- s;
- n = B.camelCase(n),
- s = B.cssHooks[n],
- n = B.cssProps[n] || n,
- n === 'cssFloat' && (n = 'float');
- if (s && 'get' in s && (i = s.get(e, !0, r)) !== t) return i;
- if (It) return It(e, n)
- },
- swap: function (e, t, n) {
- var r = {
- };
- for (var i in t) r[i] = e.style[i],
- e.style[i] = t[i];
- n.call(e);
- for (i in t) e.style[i] = r[i]
- }
- }),
- B.curCSS = B.css,
- B.each(['height',
- 'width'], function (e, t) {
- B.cssHooks[t] = {
- get: function (e, n, r) {
- var i;
- if (n) return e.offsetWidth !== 0 ? v(e, t, r) : (B.swap(e, Bt, function () {
- i = v(e, t, r)
- }), i)
- },
- set: function (e, t) {
- if (!Dt.test(t)) return t;
- t = parseFloat(t);
- if (t >= 0) return t + 'px'
- }
- }
- }),
- B.support.opacity || (B.cssHooks.opacity = {
- get: function (e, t) {
- return Mt.test((t && e.currentStyle ? e.currentStyle.filter : e.style.filter) || '') ? parseFloat(RegExp.$1) / 100 + '' : t ? '1' : ''
- },
- set: function (e, t) {
- var n = e.style,
- r = e.currentStyle,
- i = B.isNumeric(t) ? 'alpha(opacity=' + t * 100 + ')' : '',
- s = r && r.filter || n.filter || '';
- n.zoom = 1;
- if (t >= 1 && B.trim(s.replace(Ot, '')) === '') {
- n.removeAttribute('filter');
- if (r && !r.filter) return
- }
- n.filter = Ot.test(s) ? s.replace(Ot, i) : s + ' ' + i
- }
- }),
- B(function () {
- B.support.reliableMarginRight || (B.cssHooks.marginRight = {
- get: function (e, t) {
- var n;
- return B.swap(e, {
- display: 'inline-block'
- }, function () {
- t ? n = It(e, 'margin-right', 'marginRight') : n = e.style.marginRight
- }),
- n
- }
- })
- }),
- D.defaultView && D.defaultView.getComputedStyle && (qt = function (e, t) {
- var n,
- r,
- i;
- return t = t.replace(_t, '-$1').toLowerCase(),
- (r = e.ownerDocument.defaultView) && (i = r.getComputedStyle(e, null)) && (n = i.getPropertyValue(t), n === '' && !B.contains(e.ownerDocument.documentElement, e) && (n = B.style(e, t))),
- n
- }),
- D.documentElement.currentStyle && (Rt = function (e, t) {
- var n,
- r,
- i,
- s = e.currentStyle && e.currentStyle[t],
- o = e.style;
- return s === null && o && (i = o[t]) && (s = i),
- !Dt.test(s) && Pt.test(s) && (n = o.left, r = e.runtimeStyle && e.runtimeStyle.left, r && (e.runtimeStyle.left = e.currentStyle.left), o.left = t === 'fontSize' ? '1em' : s || 0, s = o.pixelLeft + 'px', o.left = n, r && (e.runtimeStyle.left = r)),
- s === '' ? 'auto' : s
- }),
- It = qt || Rt,
- B.expr && B.expr.filters && (B.expr.filters.hidden = function (e) {
- var t = e.offsetWidth,
- n = e.offsetHeight;
- return t === 0 && n === 0 || !B.support.reliableHiddenOffsets && (e.style && e.style.display || B.css(e, 'display')) === 'none'
- }, B.expr.filters.visible = function (e) {
- return !B.expr.filters.hidden(e)
- });
- var Ut = /%20/g,
- zt = /\[\]$/,
- Wt = /\r?\n/g,
- Xt = /#.*$/,
- Vt = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm,
- $t = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
- Jt = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
- Kt = /^(?:GET|HEAD)$/,
- Qt = /^\/\//,
- Gt = /\?/,
- Yt = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
- Zt = /^(?:select|textarea)/i,
- en = /\s+/,
- tn = /([?&])_=[^&]*/,
- nn = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
- rn = B.fn.load,
- sn = {
- },
- on = {
- },
- un,
- an,
- fn = [
- '*/'
- ] + ['*'];
- try {
- un = H.href
- } catch (ln) {
- un = D.createElement('a'),
- un.href = '',
- un = un.href
- }
- an = nn.exec(un.toLowerCase()) || [
- ],
- B.fn.extend({
- load: function (e, n, r) {
- if (typeof e != 'string' && rn) return rn.apply(this, arguments);
- if (!this.length) return this;
- var i = e.indexOf(' ');
- if (i >= 0) {
- var s = e.slice(i, e.length);
- e = e.slice(0, i)
- }
- var o = 'GET';
- n && (B.isFunction(n) ? (r = n, n = t) : typeof n == 'object' && (n = B.param(n, B.ajaxSettings.traditional), o = 'POST'));
- var u = this;
- return B.ajax({
- url: e,
- type: o,
- dataType: 'html',
- data: n,
- complete: function (e, t, n) {
- n = e.responseText,
- e.isResolved() && (e.done(function (e) {
- n = e
- }), u.html(s ? B('<div>').append(n.replace(Yt, '')).find(s) : n)),
- r && u.each(r, [
- n,
- t,
- e
- ])
- }
- }),
- this
- },
- serialize: function () {
- return B.param(this.serializeArray())
- },
- serializeArray: function () {
- return this.map(function () {
- return this.elements ? B.makeArray(this.elements) : this
- }).filter(function () {
- return this.name && !this.disabled && (this.checked || Zt.test(this.nodeName) || $t.test(this.type))
- }).map(function (e, t) {
- var n = B(this).val();
- return n == null ? null : B.isArray(n) ? B.map(n, function (e, n) {
- return {
- name: t.name,
- value: e.replace(Wt, '\r\n')
- }
- }) : {
- name: t.name,
- value: n.replace(Wt, '\r\n')
- }
- }).get()
- }
- }),
- B.each('ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend'.split(' '), function (e, t) {
- B.fn[t] = function (e) {
- return this.on(t, e)
- }
- }),
- B.each(['get',
- 'post'], function (e, n) {
- B[n] = function (e, r, i, s) {
- return B.isFunction(r) && (s = s || i, i = r, r = t),
- B.ajax({
- type: n,
- url: e,
- data: r,
- success: i,
- dataType: s
- })
- }
- }),
- B.extend({
- getScript: function (e, n) {
- return B.get(e, t, n, 'script')
- },
- getJSON: function (e, t, n) {
- return B.get(e, t, n, 'json')
- },
- ajaxSetup: function (e, t) {
- return t ? h(e, B.ajaxSettings) : (t = e, e = B.ajaxSettings),
- h(e, t),
- e
- },
- ajaxSettings: {
- url: un,
- isLocal: Jt.test(an[1]),
- global: !0,
- type: 'GET',
- contentType: 'application/x-www-form-urlencoded',
- processData: !0,
- async: !0,
- accepts: {
- xml: 'application/xml, text/xml',
- html: 'text/html',
- text: 'text/plain',
- json: 'application/json, text/javascript',
- '*': fn
- },
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
- responseFields: {
- xml: 'responseXML',
- text: 'responseText'
- },
- converters: {
- '* text': e.String,
- 'text html': !0,
- 'text json': B.parseJSON,
- 'text xml': B.parseXML
- },
- flatOptions: {
- context: !0,
- url: !0
- }
- },
- ajaxPrefilter: d(sn),
- ajaxTransport: d(on),
- ajax: function (e, n) {
- function r(e, n, r, p) {
- if (E !== 2) {
- E = 2,
- b && clearTimeout(b),
- y = t,
- m = p || '',
- T.readyState = e > 0 ? 4 : 0;
- var d,
- v,
- g,
- w = n,
- x = r ? l(i, T, r) : t,
- N,
- C;
- if (e >= 200 && e < 300 || e === 304) {
- if (i.ifModified) {
- if (N = T.getResponseHeader('Last-Modified')) B.lastModified[h] = N;
- if (C = T.getResponseHeader('Etag')) B.etag[h] = C
- }
- if (e === 304) w = 'notmodified',
- d = !0;
- else try {
- v = f(i, x),
- w = 'success',
- d = !0
- } catch (k) {
- w = 'parsererror',
- g = k
- }
- } else {
- g = w;
- if (!w || e) w = 'error',
- e < 0 && (e = 0)
- }
- T.status = e,
- T.statusText = '' + (n || w),
- d ? u.resolveWith(s, [
- v,
- w,
- T
- ]) : u.rejectWith(s, [
- T,
- w,
- g
- ]),
- T.statusCode(c),
- c = t,
- S && o.trigger('ajax' + (d ? 'Success' : 'Error'), [
- T,
- i,
- d ? v : g
- ]),
- a.fireWith(s, [
- T,
- w
- ]),
- S && (o.trigger('ajaxComplete', [
- T,
- i
- ]), --B.active || B.event.trigger('ajaxStop'))
- }
- }
- typeof e == 'object' && (n = e, e = t),
- n = n || {
- };
- var i = B.ajaxSetup({
- }, n),
- s = i.context || i,
- o = s !== i && (s.nodeType || s instanceof B) ? B(s) : B.event,
- u = B.Deferred(),
- a = B.Callbacks('once memory'),
- c = i.statusCode || {
- },
- h,
- d = {
- },
- v = {
- },
- m,
- g,
- y,
- b,
- w,
- E = 0,
- S,
- x,
- T = {
- readyState: 0,
- setRequestHeader: function (e, t) {
- if (!E) {
- var n = e.toLowerCase();
- e = v[n] = v[n] || e,
- d[e] = t
- }
- return this
- },
- getAllResponseHeaders: function () {
- return E === 2 ? m : null
- },
- getResponseHeader: function (e) {
- var n;
- if (E === 2) {
- if (!g) {
- g = {
- };
- while (n = Vt.exec(m)) g[n[1].toLowerCase()] = n[2]
- }
- n = g[e.toLowerCase()]
- }
- return n === t ? null : n
- },
- overrideMimeType: function (e) {
- return E || (i.mimeType = e),
- this
- },
- abort: function (e) {
- return e = e || 'abort',
- y && y.abort(e),
- r(0, e),
- this
- }
- };
- u.promise(T),
- T.success = T.done,
- T.error = T.fail,
- T.complete = a.add,
- T.statusCode = function (e) {
- if (e) {
- var t;
- if (E < 2) for (t in e) c[t] = [
- c[t],
- e[t]
- ];
- else t = e[T.status],
- T.then(t, t)
- }
- return this
- },
- i.url = ((e || i.url) + '').replace(Xt, '').replace(Qt, an[1] + '//'),
- i.dataTypes = B.trim(i.dataType || '*').toLowerCase().split(en),
- i.crossDomain == null && (w = nn.exec(i.url.toLowerCase()), i.crossDomain = !(!w || w[1] == an[1] && w[2] == an[2] && (w[3] || (w[1] === 'http:' ? 80 : 443)) == (an[3] || (an[1] === 'http:' ? 80 : 443)))),
- i.data && i.processData && typeof i.data != 'string' && (i.data = B.param(i.data, i.traditional)),
- p(sn, i, n, T);
- if (E === 2) return !1;
- S = i.global,
- i.type = i.type.toUpperCase(),
- i.hasContent = !Kt.test(i.type),
- S && B.active++ === 0 && B.event.trigger('ajaxStart');
- if (!i.hasContent) {
- i.data && (i.url += (Gt.test(i.url) ? '&' : '?') + i.data, delete i.data),
- h = i.url;
- if (i.cache === !1) {
- var N = B.now(),
- C = i.url.replace(tn, '$1_=' + N);
- i.url = C + (C === i.url ? (Gt.test(i.url) ? '&' : '?') + '_=' + N : '')
- }
- }(i.data && i.hasContent && i.contentType !== !1 || n.contentType) && T.setRequestHeader('Content-Type', i.contentType),
- i.ifModified && (h = h || i.url, B.lastModified[h] && T.setRequestHeader('If-Modified-Since', B.lastModified[h]), B.etag[h] && T.setRequestHeader('If-None-Match', B.etag[h])),
- T.setRequestHeader('Accept', i.dataTypes[0] && i.accepts[i.dataTypes[0]] ? i.accepts[i.dataTypes[0]] + (i.dataTypes[0] !== '*' ? ', ' + fn + '; q=0.01' : '') : i.accepts['*']);
- for (x in i.headers) T.setRequestHeader(x, i.headers[x]);
- if (!i.beforeSend || i.beforeSend.call(s, T, i) !== !1 && E !== 2) {
- for (x in {
- success: 1,
- error: 1,
- complete: 1
- }) T[x](i[x]);
- y = p(on, i, n, T);
- if (!y) r( - 1, 'No Transport');
- else {
- T.readyState = 1,
- S && o.trigger('ajaxSend', [
- T,
- i
- ]),
- i.async && i.timeout > 0 && (b = setTimeout(function () {
- T.abort('timeout')
- }, i.timeout));
- try {
- E = 1,
- y.send(d, r)
- } catch (k) {
- if (!(E < 2)) throw k;
- r( - 1, k)
- }
- }
- return T
- }
- return T.abort(),
- !1
- },
- param: function (e, n) {
- var r = [
- ],
- i = function (e, t) {
- t = B.isFunction(t) ? t() : t,
- r[r.length] = encodeURIComponent(e) + '=' + encodeURIComponent(t)
- };
- n === t && (n = B.ajaxSettings.traditional);
- if (B.isArray(e) || e.jquery && !B.isPlainObject(e)) B.each(e, function () {
- i(this.name, this.value)
- });
- else for (var s in e) c(s, e[s], n, i);
- return r.join('&').replace(Ut, '+')
- }
- }),
- B.extend({
- active: 0,
- lastModified: {
- },
- etag: {
- }
- });
- var cn = B.now(),
- hn = /(\=)\?(&|$)|\?\?/i;
- B.ajaxSetup({
- jsonp: 'callback',
- jsonpCallback: function () {
- return B.expando + '_' + cn++
- }
- }),
- B.ajaxPrefilter('json jsonp', function (t, n, r) {
- var i = t.contentType === 'application/x-www-form-urlencoded' && typeof t.data == 'string';
- if (t.dataTypes[0] === 'jsonp' || t.jsonp !== !1 && (hn.test(t.url) || i && hn.test(t.data))) {
- var s,
- o = t.jsonpCallback = B.isFunction(t.jsonpCallback) ? t.jsonpCallback() : t.jsonpCallback,
- u = e[o],
- a = t.url,
- f = t.data,
- l = '$1' + o + '$2';
- return t.jsonp !== !1 && (a = a.replace(hn, l), t.url === a && (i && (f = f.replace(hn, l)), t.data === f && (a += (/\?/.test(a) ? '&' : '?') + t.jsonp + '=' + o))),
- t.url = a,
- t.data = f,
- e[o] = function (e) {
- s = [
- e
- ]
- },
- r.always(function () {
- e[o] = u,
- s && B.isFunction(u) && e[o](s[0])
- }),
- t.converters['script json'] = function () {
- return s || B.error(o + ' was not called'),
- s[0]
- },
- t.dataTypes[0] = 'json',
- 'script'
- }
- }),
- B.ajaxSetup({
- accepts: {
- script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'
- },
- contents: {
- script: /javascript|ecmascript/
- },
- converters: {
- 'text script': function (e) {
- return B.globalEval(e),
- e
- }
- }
- }),
- B.ajaxPrefilter('script', function (e) {
- e.cache === t && (e.cache = !1),
- e.crossDomain && (e.type = 'GET', e.global = !1)
- }),
- B.ajaxTransport('script', function (e) {
- if (e.crossDomain) {
- var n,
- r = D.head || D.getElementsByTagName('head') [0] || D.documentElement;
- return {
- send: function (i, s) {
- n = D.createElement('script'),
- n.async = 'async',
- e.scriptCharset && (n.charset = e.scriptCharset),
- n.src = e.url,
- n.onload = n.onreadystatechange = function (e, i) {
- if (i || !n.readyState || /loaded|complete/.test(n.readyState)) n.onload = n.onreadystatechange = null,
- r && n.parentNode && r.removeChild(n),
- n = t,
- i || s(200, 'success')
- },
- r.insertBefore(n, r.firstChild)
- },
- abort: function () {
- n && n.onload(0, 1)
- }
- }
- }
- });
- var pn = e.ActiveXObject ? function () {
- for (var e in vn) vn[e](0, 1)
- }
- : !1,
- dn = 0,
- vn;
- B.ajaxSettings.xhr = e.ActiveXObject ? function () {
- return !this.isLocal && a() || u()
- }
- : a,
- function (e) {
- B.extend(B.support, {
- ajax: !!e,
- cors: !!e && 'withCredentials' in e
- })
- }(B.ajaxSettings.xhr()),
- B.support.ajax && B.ajaxTransport(function (n) {
- if (!n.crossDomain || B.support.cors) {
- var r;
- return {
- send: function (i, s) {
- var o = n.xhr(),
- u,
- a;
- n.username ? o.open(n.type, n.url, n.async, n.username, n.password) : o.open(n.type, n.url, n.async);
- if (n.xhrFields) for (a in n.xhrFields) o[a] = n.xhrFields[a];
- n.mimeType && o.overrideMimeType && o.overrideMimeType(n.mimeType),
- !n.crossDomain && !i['X-Requested-With'] && (i['X-Requested-With'] = 'XMLHttpRequest');
- try {
- for (a in i) o.setRequestHeader(a, i[a])
- } catch (f) {
- }
- o.send(n.hasContent && n.data || null),
- r = function (e, i) {
- var a,
- f,
- l,
- c,
- h;
- try {
- if (r && (i || o.readyState === 4)) {
- r = t,
- u && (o.onreadystatechange = B.noop, pn && delete vn[u]);
- if (i) o.readyState !== 4 && o.abort();
- else {
- a = o.status,
- l = o.getAllResponseHeaders(),
- c = {
- },
- h = o.responseXML,
- h && h.documentElement && (c.xml = h),
- c.text = o.responseText;
- try {
- f = o.statusText
- } catch (p) {
- f = ''
- }
- !a && n.isLocal && !n.crossDomain ? a = c.text ? 200 : 404 : a === 1223 && (a = 204)
- }
- }
- } catch (d) {
- i || s( - 1, d)
- }
- c && s(a, f, c, l)
- },
- !n.async || o.readyState === 4 ? r() : (u = ++dn, pn && (vn || (vn = {
- }, B(e).unload(pn)), vn[u] = r), o.onreadystatechange = r)
- },
- abort: function () {
- r && r(0, 1)
- }
- }
- }
- });
- var mn = {
- },
- gn,
- yn,
- bn = /^(?:toggle|show|hide)$/,
- wn = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
- En,
- Sn = [
- ['height',
- 'marginTop',
- 'marginBottom',
- 'paddingTop',
- 'paddingBottom'],
- [
- 'width',
- 'marginLeft',
- 'marginRight',
- 'paddingLeft',
- 'paddingRight'
- ],
- [
- 'opacity'
- ]
- ],
- xn;
- B.fn.extend({
- show: function (e, t, n) {
- var s,
- o;
- if (e || e === 0) return this.animate(i('show', 3), e, t, n);
- for (var u = 0, a = this.length; u < a; u++) s = this[u],
- s.style && (o = s.style.display, !B._data(s, 'olddisplay') && o === 'none' && (o = s.style.display = ''), o === '' && B.css(s, 'display') === 'none' && B._data(s, 'olddisplay', r(s.nodeName)));
- for (u = 0; u < a; u++) {
- s = this[u];
- if (s.style) {
- o = s.style.display;
- if (o === '' || o === 'none') s.style.display = B._data(s, 'olddisplay') || ''
- }
- }
- return this
- },
- hide: function (e, t, n) {
- if (e || e === 0) return this.animate(i('hide', 3), e, t, n);
- var r,
- s,
- o = 0,
- u = this.length;
- for (; o < u; o++) r = this[o],
- r.style && (s = B.css(r, 'display'), s !== 'none' && !B._data(r, 'olddisplay') && B._data(r, 'olddisplay', s));
- for (o = 0; o < u; o++) this[o].style && (this[o].style.display = 'none');
- return this
- },
- _toggle: B.fn.toggle,
- toggle: function (e, t, n) {
- var r = typeof e == 'boolean';
- return B.isFunction(e) && B.isFunction(t) ? this._toggle.apply(this, arguments) : e == null || r ? this.each(function () {
- var t = r ? e : B(this).is(':hidden');
- B(this) [t ? 'show' : 'hide']()
- }) : this.animate(i('toggle', 3), e, t, n),
- this
- },
- fadeTo: function (e, t, n, r) {
- return this.filter(':hidden').css('opacity', 0).show().end().animate({
- opacity: t
- }, e, n, r)
- },
- animate: function (e, t, n, i) {
- function s() {
- o.queue === !1 && B._mark(this);
- var t = B.extend({
- }, o),
- n = this.nodeType === 1,
- i = n && B(this).is(':hidden'),
- s,
- u,
- a,
- f,
- l,
- c,
- h,
- p,
- d;
- t.animatedProperties = {
- };
- for (a in e) {
- s = B.camelCase(a),
- a !== s && (e[s] = e[a], delete e[a]),
- u = e[s],
- B.isArray(u) ? (t.animatedProperties[s] = u[1], u = e[s] = u[0]) : t.animatedProperties[s] = t.specialEasing && t.specialEasing[s] || t.easing || 'swing';
- if (u === 'hide' && i || u === 'show' && !i) return t.complete.call(this);
- n && (s === 'height' || s === 'width') && (t.overflow = [
- this.style.overflow,
- this.style.overflowX,
- this.style.overflowY
- ], B.css(this, 'display') === 'inline' && B.css(this, 'float') === 'none' && (!B.support.inlineBlockNeedsLayout || r(this.nodeName) === 'inline' ? this.style.display = 'inline-block' : this.style.zoom = 1))
- }
- t.overflow != null && (this.style.overflow = 'hidden');
- for (a in e) f = new B.fx(this, t, a),
- u = e[a],
- bn.test(u) ? (d = B._data(this, 'toggle' + a) || (u === 'toggle' ? i ? 'show' : 'hide' : 0), d ? (B._data(this, 'toggle' + a, d === 'show' ? 'hide' : 'show'), f[d]()) : f[u]()) : (l = wn.exec(u), c = f.cur(), l ? (h = parseFloat(l[2]), p = l[3] || (B.cssNumber[a] ? '' : 'px'), p !== 'px' && (B.style(this, a, (h || 1) + p), c = (h || 1) / f.cur() * c, B.style(this, a, c + p)), l[1] && (h = (l[1] === '-=' ? - 1 : 1) * h + c), f.custom(c, h, p)) : f.custom(c, u, ''));
- return !0
- }
- var o = B.speed(t, n, i);
- return B.isEmptyObject(e) ? this.each(o.complete, [
- !1
- ]) : (e = B.extend({
- }, e), o.queue === !1 ? this.each(s) : this.queue(o.queue, s))
- },
- stop: function (e, n, r) {
- return typeof e != 'string' && (r = n, n = e, e = t),
- n && e !== !1 && this.queue(e || 'fx', [
- ]),
- this.each(function () {
- function t(e, t, n) {
- var i = t[n];
- B.removeData(e, n, !0),
- i.stop(r)
- }
- var n,
- i = !1,
- s = B.timers,
- o = B._data(this);
- r || B._unmark(!0, this);
- if (e == null) for (n in o) o[n] && o[n].stop && n.indexOf('.run') === n.length - 4 && t(this, o, n);
- else o[n = e + '.run'] && o[n].stop && t(this, o, n);
- for (n = s.length; n--; ) s[n].elem === this && (e == null || s[n].queue === e) && (r ? s[n](!0) : s[n].saveState(), i = !0, s.splice(n, 1));
- (!r || !i) && B.dequeue(this, e)
- })
- }
- }),
- B.each({
- slideDown: i('show', 1),
- slideUp: i('hide', 1),
- slideToggle: i('toggle', 1),
- fadeIn: {
- opacity: 'show'
- },
- fadeOut: {
- opacity: 'hide'
- },
- fadeToggle: {
- opacity: 'toggle'
- }
- }, function (e, t) {
- B.fn[e] = function (e, n, r) {
- return this.animate(t, e, n, r)
- }
- }),
- B.extend({
- speed: function (e, t, n) {
- var r = e && typeof e == 'object' ? B.extend({
- }, e) : {
- complete: n || !n && t || B.isFunction(e) && e,
- duration: e,
- easing: n && t || t && !B.isFunction(t) && t
- };
- r.duration = B.fx.off ? 0 : typeof r.duration == 'number' ? r.duration : r.duration in B.fx.speeds ? B.fx.speeds[r.duration] : B.fx.speeds._default;
- if (r.queue == null || r.queue === !0) r.queue = 'fx';
- return r.old = r.complete,
- r.complete = function (e) {
- B.isFunction(r.old) && r.old.call(this),
- r.queue ? B.dequeue(this, r.queue) : e !== !1 && B._unmark(this)
- },
- r
- },
- easing: {
- linear: function (e, t, n, r) {
- return n + r * e
- },
- swing: function (e, t, n, r) {
- return ( - Math.cos(e * Math.PI) / 2 + 0.5) * r + n
- }
- },
- timers: [
- ],
- fx: function (e, t, n) {
- this.options = t,
- this.elem = e,
- this.prop = n,
- t.orig = t.orig || {
- }
- }
- }),
- B.fx.prototype = {
- update: function () {
- this.options.step && this.options.step.call(this.elem, this.now, this),
- (B.fx.step[this.prop] || B.fx.step._default) (this)
- },
- cur: function () {
- if (this.elem[this.prop] == null || !!this.elem.style && this.elem.style[this.prop] != null) {
- var e,
- t = B.css(this.elem, this.prop);
- return isNaN(e = parseFloat(t)) ? !t || t === 'auto' ? 0 : t : e
- }
- return this.elem[this.prop]
- },
- custom: function (e, n, r) {
- function i(e) {
- return s.step(e)
- }
- var s = this,
- u = B.fx;
- this.startTime = xn || o(),
- this.end = n,
- this.now = this.start = e,
- this.pos = this.state = 0,
- this.unit = r || this.unit || (B.cssNumber[this.prop] ? '' : 'px'),
- i.queue = this.options.queue,
- i.elem = this.elem,
- i.saveState = function () {
- s.options.hide && B._data(s.elem, 'fxshow' + s.prop) === t && B._data(s.elem, 'fxshow' + s.prop, s.start)
- },
- i() && B.timers.push(i) && !En && (En = setInterval(u.tick, u.interval))
- },
- show: function () {
- var e = B._data(this.elem, 'fxshow' + this.prop);
- this.options.orig[this.prop] = e || B.style(this.elem, this.prop),
- this.options.show = !0,
- e !== t ? this.custom(this.cur(), e) : this.custom(this.prop === 'width' || this.prop === 'height' ? 1 : 0, this.cur()),
- B(this.elem).show()
- },
- hide: function () {
- this.options.orig[this.prop] = B._data(this.elem, 'fxshow' + this.prop) || B.style(this.elem, this.prop),
- this.options.hide = !0,
- this.custom(this.cur(), 0)
- },
- step: function (e) {
- var t,
- n,
- r,
- i = xn || o(),
- s = !0,
- u = this.elem,
- a = this.options;
- if (e || i >= a.duration + this.startTime) {
- this.now = this.end,
- this.pos = this.state = 1,
- this.update(),
- a.animatedProperties[this.prop] = !0;
- for (t in a.animatedProperties) a.animatedProperties[t] !== !0 && (s = !1);
- if (s) {
- a.overflow != null && !B.support.shrinkWrapBlocks && B.each(['',
- 'X',
- 'Y'], function (e, t) {
- u.style['overflow' + t] = a.overflow[e]
- }),
- a.hide && B(u).hide();
- if (a.hide || a.show) for (t in a.animatedProperties) B.style(u, t, a.orig[t]),
- B.removeData(u, 'fxshow' + t, !0),
- B.removeData(u, 'toggle' + t, !0);
- r = a.complete,
- r && (a.complete = !1, r.call(u))
- }
- return !1
- }
- return a.duration == Infinity ? this.now = i : (n = i - this.startTime, this.state = n / a.duration, this.pos = B.easing[a.animatedProperties[this.prop]](this.state, n, 0, 1, a.duration), this.now = this.start + (this.end - this.start) * this.pos),
- this.update(),
- !0
- }
- },
- B.extend(B.fx, {
- tick: function () {
- var e,
- t = B.timers,
- n = 0;
- for (; n < t.length; n++) e = t[n],
- !e() && t[n] === e && t.splice(n--, 1);
- t.length || B.fx.stop()
- },
- interval: 13,
- stop: function () {
- clearInterval(En),
- En = null
- },
- speeds: {
- slow: 600,
- fast: 200,
- _default: 400
- },
- step: {
- opacity: function (e) {
- B.style(e.elem, 'opacity', e.now)
- },
- _default: function (e) {
- e.elem.style && e.elem.style[e.prop] != null ? e.elem.style[e.prop] = e.now + e.unit : e.elem[e.prop] = e.now
- }
- }
- }),
- B.each(['width',
- 'height'], function (e, t) {
- B.fx.step[t] = function (e) {
- B.style(e.elem, t, Math.max(0, e.now) + e.unit)
- }
- }),
- B.expr && B.expr.filters && (B.expr.filters.animated = function (e) {
- return B.grep(B.timers, function (t) {
- return e === t.elem
- }).length
- });
- var Tn = /^t(?:able|d|h)$/i,
- Nn = /^(?:body|html)$/i;
- 'getBoundingClientRect' in D.documentElement ? B.fn.offset = function (e) {
- var t = this[0],
- r;
- if (e) return this.each(function (t) {
- B.offset.setOffset(this, e, t)
- });
- if (!t || !t.ownerDocument) return null;
- if (t === t.ownerDocument.body) return B.offset.bodyOffset(t);
- try {
- r = t.getBoundingClientRect()
- } catch (i) {
- }
- var s = t.ownerDocument,
- o = s.documentElement;
- if (!r || !B.contains(o, t)) return r ? {
- top: r.top,
- left: r.left
- }
- : {
- top: 0,
- left: 0
- };
- var u = s.body,
- a = n(s),
- f = o.clientTop || u.clientTop || 0,
- l = o.clientLeft || u.clientLeft || 0,
- c = a.pageYOffset || B.support.boxModel && o.scrollTop || u.scrollTop,
- h = a.pageXOffset || B.support.boxModel && o.scrollLeft || u.scrollLeft,
- p = r.top + c - f,
- d = r.left + h - l;
- return {
- top: p,
- left: d
- }
- }
- : B.fn.offset = function (e) {
- var t = this[0];
- if (e) return this.each(function (t) {
- B.offset.setOffset(this, e, t)
- });
- if (!t || !t.ownerDocument) return null;
- if (t === t.ownerDocument.body) return B.offset.bodyOffset(t);
- var n,
- r = t.offsetParent,
- i = t,
- s = t.ownerDocument,
- o = s.documentElement,
- u = s.body,
- a = s.defaultView,
- f = a ? a.getComputedStyle(t, null) : t.currentStyle,
- l = t.offsetTop,
- c = t.offsetLeft;
- while ((t = t.parentNode) && t !== u && t !== o) {
- if (B.support.fixedPosition && f.position === 'fixed') break;
- n = a ? a.getComputedStyle(t, null) : t.currentStyle,
- l -= t.scrollTop,
- c -= t.scrollLeft,
- t === r && (l += t.offsetTop, c += t.offsetLeft, B.support.doesNotAddBorder && (!B.support.doesAddBorderForTableAndCells || !Tn.test(t.nodeName)) && (l += parseFloat(n.borderTopWidth) || 0, c += parseFloat(n.borderLeftWidth) || 0), i = r, r = t.offsetParent),
- B.support.subtractsBorderForOverflowNotVisible && n.overflow !== 'visible' && (l += parseFloat(n.borderTopWidth) || 0, c += parseFloat(n.borderLeftWidth) || 0),
- f = n
- }
- if (f.position === 'relative' || f.position === 'static') l += u.offsetTop,
- c += u.offsetLeft;
- return B.support.fixedPosition && f.position === 'fixed' && (l += Math.max(o.scrollTop, u.scrollTop), c += Math.max(o.scrollLeft, u.scrollLeft)),
- {
- top: l,
- left: c
- }
- },
- B.offset = {
- bodyOffset: function (e) {
- var t = e.offsetTop,
- n = e.offsetLeft;
- return B.support.doesNotIncludeMarginInBodyOffset && (t += parseFloat(B.css(e, 'marginTop')) || 0, n += parseFloat(B.css(e, 'marginLeft')) || 0),
- {
- top: t,
- left: n
- }
- },
- setOffset: function (e, t, n) {
- var r = B.css(e, 'position');
- r === 'static' && (e.style.position = 'relative');
- var i = B(e),
- s = i.offset(),
- o = B.css(e, 'top'),
- u = B.css(e, 'left'),
- a = (r === 'absolute' || r === 'fixed') && B.inArray('auto', [
- o,
- u
- ]) > - 1,
- f = {
- },
- l = {
- },
- c,
- h;
- a ? (l = i.position(), c = l.top, h = l.left) : (c = parseFloat(o) || 0, h = parseFloat(u) || 0),
- B.isFunction(t) && (t = t.call(e, n, s)),
- t.top != null && (f.top = t.top - s.top + c),
- t.left != null && (f.left = t.left - s.left + h),
- 'using' in t ? t.using.call(e, f) : i.css(f)
- }
- },
- B.fn.extend({
- position: function () {
- if (!this[0]) return null;
- var e = this[0],
- t = this.offsetParent(),
- n = this.offset(),
- r = Nn.test(t[0].nodeName) ? {
- top: 0,
- left: 0
- }
- : t.offset();
- return n.top -= parseFloat(B.css(e, 'marginTop')) || 0,
- n.left -= parseFloat(B.css(e, 'marginLeft')) || 0,
- r.top += parseFloat(B.css(t[0], 'borderTopWidth')) || 0,
- r.left += parseFloat(B.css(t[0], 'borderLeftWidth')) || 0,
- {
- top: n.top - r.top,
- left: n.left - r.left
- }
- },
- offsetParent: function () {
- return this.map(function () {
- var e = this.offsetParent || D.body;
- while (e && !Nn.test(e.nodeName) && B.css(e, 'position') === 'static') e = e.offsetParent;
- return e
- })
- }
- }),
- B.each(['Left',
- 'Top'], function (e, r) {
- var i = 'scroll' + r;
- B.fn[i] = function (r) {
- var s,
- o;
- return r === t ? (s = this[0], s ? (o = n(s), o ? 'pageXOffset' in o ? o[e ? 'pageYOffset' : 'pageXOffset'] : B.support.boxModel && o.document.documentElement[i] || o.document.body[i] : s[i]) : null) : this.each(function () {
- o = n(this),
- o ? o.scrollTo(e ? B(o).scrollLeft() : r, e ? r : B(o).scrollTop()) : this[i] = r
- })
- }
- }),
- B.each(['Height',
- 'Width'], function (e, n) {
- var r = n.toLowerCase();
- B.fn['inner' + n] = function () {
- var e = this[0];
- return e ? e.style ? parseFloat(B.css(e, r, 'padding')) : this[r]() : null
- },
- B.fn['outer' + n] = function (e) {
- var t = this[0];
- return t ? t.style ? parseFloat(B.css(t, r, e ? 'margin' : 'border')) : this[r]() : null
- },
- B.fn[r] = function (e) {
- var i = this[0];
- if (!i) return e == null ? null : this;
- if (B.isFunction(e)) return this.each(function (t) {
- var n = B(this);
- n[r](e.call(this, t, n[r]()))
- });
- if (B.isWindow(i)) {
- var s = i.document.documentElement['client' + n],
- o = i.document.body;
- return i.document.compatMode === 'CSS1Compat' && s || o && o['client' + n] || s
- }
- if (i.nodeType === 9) return Math.max(i.documentElement['client' + n], i.body['scroll' + n], i.documentElement['scroll' + n], i.body['offset' + n], i.documentElement['offset' + n]);
- if (e === t) {
- var u = B.css(i, r),
- a = parseFloat(u);
- return B.isNumeric(a) ? a : u
- }
- return this.css(r, typeof e == 'string' ? e : e + 'px')
- }
- }),
- function (e) {
- var t,
- n,
- r = 1,
- i,
- s = this,
- o = !1,
- u = 'postMessage',
- a = 'addEventListener',
- f,
- l = s[u] && !e.browser.opera;
- e[u] = function (t, n, i) {
- if (!n) return;
- t = typeof t == 'string' ? t : e.param(t),
- i = i || parent,
- l ? i[u](t, n.replace(/([^:]+:\/\/[^\/]+).*/, '$1')) : n && (i.location = n.replace(/#.*$/, '') + '#' + + (new Date) + r++ + '&' + t)
- },
- e.receiveMessage = f = function (r, u, c) {
- l ? (r && (i && f(), i = function (t) {
- if (typeof u == 'string' && t.origin !== u || e.isFunction(u) && u(t.origin) === o) return o;
- r(t)
- }), s[a] ? s[r ? a : 'removeEventListener']('message', i, o) : s[r ? 'attachEvent' : 'detachEvent']('onmessage', i)) : (t && clearInterval(t), t = null, r && (c = typeof u == 'number' ? u : typeof c == 'number' ? c : 100, t = setInterval(function () {
- var e = document.location.hash,
- t = /^#?\d+&/;
- e !== n && t.test(e) && (n = e, r({
- data: e.replace(t, '')
- }))
- }, c)))
- }
- }(B),
- function (e) {
- e.deparam = function (t, n) {
- var r = {
- },
- i = {
- 'true': !0,
- 'false': !1,
- 'null': null
- };
- return e.each(t.replace(/\+/g, ' ').split('&'), function (t, s) {
- var o = s.split('='),
- u = '';
- try {
- u = decodeURIComponent(o[0])
- } catch (a) {
- return
- }
- var f,
- l = r,
- c = 0,
- h = u.split(']['),
- p = h.length - 1;
- /\[/.test(h[0]) && /\]$/.test(h[p]) ? (h[p] = h[p].replace(/\]$/, ''), h = h.shift().split('[').concat(h), p = h.length - 1) : p = 0;
- if (o.length === 2) {
- f = decodeURIComponent(o[1]),
- n && (f = f && !isNaN(f) ? + f : f === 'undefined' ? undefined : i[f] !== undefined ? i[f] : f);
- if (p) for (; c <= p; c++) u = h[c] === '' ? l.length : h[c],
- l = l[u] = c < p ? l[u] || (h[c + 1] && isNaN(h[c + 1]) ? {
- }
- : [
- ]) : f;
- else e.isArray(r[u]) ? r[u].push(f) : r[u] !== undefined ? r[u] = [
- r[u],
- f
- ] : r[u] = f
- } else u && (r[u] = n ? undefined : '')
- }),
- r
- }
- }(B),
- function (e) {
- e.deparam = function (t, n) {
- var r = {
- },
- i = {
- 'true': !0,
- 'false': !1,
- 'null': null
- };
- return e.each(t.replace(/\+/g, ' ').split('&'), function (t, s) {
- var o = s.split('='),
- u = '';
- try {
- u = decodeURIComponent(o[0])
- } catch (a) {
- return
- }
- var f,
- l = r,
- c = 0,
- h = u.split(']['),
- p = h.length - 1;
- /\[/.test(h[0]) && /\]$/.test(h[p]) ? (h[p] = h[p].replace(/\]$/, ''), h = h.shift().split('[').concat(h), p = h.length - 1) : p = 0;
- if (o.length === 2) {
- f = decodeURIComponent(o[1]),
- n && (f = f && !isNaN(f) ? + f : f === 'undefined' ? undefined : i[f] !== undefined ? i[f] : f);
- if (p) for (; c <= p; c++) u = h[c] === '' ? l.length : h[c],
- l = l[u] = c < p ? l[u] || (h[c + 1] && isNaN(h[c + 1]) ? {
- }
- : [
- ]) : f;
- else e.isArray(r[u]) ? r[u].push(f) : r[u] !== undefined ? r[u] = [
- r[u],
- f
- ] : r[u] = f
- } else u && (r[u] = n ? undefined : '')
- }),
- r
- }
- }(B),
- function (e) {
- var t,
- n,
- r = 1,
- i,
- s = this,
- o = !1,
- u = 'postMessage',
- a = 'addEventListener',
- f,
- l = s[u] && !e.browser.opera;
- e[u] = function (t, n, i) {
- if (!n) return;
- t = typeof t == 'string' ? t : e.param(t),
- i = i || parent,
- l ? i[u](t, n.replace(/([^:]+:\/\/[^\/]+).*/, '$1')) : n && (i.location = n.replace(/#.*$/, '') + '#' + + (new Date) + r++ + '&' + t)
- },
- e.receiveMessage = f = function (r, u, c) {
- l ? (r && (i && f(), i = function (t) {
- if (typeof u == 'string' && t.origin !== u || e.isFunction(u) && u(t.origin) === o) return o;
- r(t)
- }), s[a] ? s[r ? a : 'removeEventListener']('message', i, o) : s[r ? 'attachEvent' : 'detachEvent']('onmessage', i)) : (t && clearInterval(t), t = null, r && (c = typeof u == 'number' ? u : typeof c == 'number' ? c : 100, t = setInterval(function () {
- var e = document.location.hash,
- t = /^#?\d+&/;
- e !== n && t.test(e) && (n = e, r({
- data: e.replace(t, '')
- }))
- }, c)))
- }
- }(B),
- function (e) {
- e.deparam = function (t, n) {
- var r = {
- },
- i = {
- 'true': !0,
- 'false': !1,
- 'null': null
- };
- return e.each(t.replace(/\+/g, ' ').split('&'), function (t, s) {
- var o = s.split('='),
- u = '';
- try {
- u = decodeURIComponent(o[0])
- } catch (a) {
- return
- }
- var f,
- l = r,
- c = 0,
- h = u.split(']['),
- p = h.length - 1;
- /\[/.test(h[0]) && /\]$/.test(h[p]) ? (h[p] = h[p].replace(/\]$/, ''), h = h.shift().split('[').concat(h), p = h.length - 1) : p = 0;
- if (o.length === 2) {
- f = decodeURIComponent(o[1]),
- n && (f = f && !isNaN(f) ? + f : f === 'undefined' ? undefined : i[f] !== undefined ? i[f] : f);
- if (p) for (; c <= p; c++) u = h[c] === '' ? l.length : h[c],
- l = l[u] = c < p ? l[u] || (h[c + 1] && isNaN(h[c + 1]) ? {
- }
- : [
- ]) : f;
- else e.isArray(r[u]) ? r[u].push(f) : r[u] !== undefined ? r[u] = [
- r[u],
- f
- ] : r[u] = f
- } else u && (r[u] = n ? undefined : '')
- }),
- r
- }
- }(B),
- function (e) {
- var t = {
- },
- n = Math.max,
- r = Math.min;
- t.c = {
- },
- t.c.d = e(document),
- t.c.t = function (e) {
- return e.originalEvent.touches.length - 1
- },
- t.o = function () {
- var n = this;
- this.o = null,
- this.$ = null,
- this.i = null,
- this.g = null,
- this.v = null,
- this.cv = null,
- this.x = 0,
- this.y = 0,
- this.w = 0,
- this.h = 0,
- this.$c = null,
- this.c = null,
- this.t = 0,
- this.isInit = !1,
- this.fgColor = null,
- this.pColor = null,
- this.dH = null,
- this.cH = null,
- this.eH = null,
- this.rH = null,
- this.scale = 1,
- this.relative = !1,
- this.relativeWidth = !1,
- this.relativeHeight = !1,
- this.$div = null,
- this.run = function () {
- var t = function (e, t) {
- var r;
- for (r in t) n.o[r] = t[r];
- n.init(),
- n._configure()._draw()
- };
- if (this.$.data('kontroled')) return;
- this.$.data('kontroled', !0),
- this.extend(),
- this.o = e.extend({
- min: this.$.data('min') || 0,
- max: this.$.data('max') || 100,
- stopper: !0,
- readOnly: this.$.data('readonly') || this.$.attr('readonly') == 'readonly',
- cursor: this.$.data('cursor') === !0 && 30 || this.$.data('cursor') || 0,
- thickness: this.$.data('thickness') && Math.max(Math.min(this.$.data('thickness'), 1), 0.01) || 0.35,
- lineCap: this.$.data('linecap') || 'butt',
- width: this.$.data('width') || 200,
- height: this.$.data('height') || 200,
- displayInput: this.$.data('displayinput') == null || this.$.data('displayinput'),
- displayPrevious: this.$.data('displayprevious'),
- fgColor: this.$.data('fgcolor') || '#87CEEB',
- inputColor: this.$.data('inputcolor'),
- font: this.$.data('font') || 'Arial',
- fontWeight: this.$.data('font-weight') || 'bold',
- inline: !1,
- step: this.$.data('step') || 1,
- draw: null,
- change: null,
- cancel: null,
- release: null,
- error: null
- }, this.o),
- this.o.inputColor || (this.o.inputColor = this.o.fgColor),
- this.$.is('fieldset') ? (this.v = {
- }, this.i = this.$.find('input'), this.i.each(function (t) {
- var r = e(this);
- n.i[t] = r,
- n.v[t] = r.val(),
- r.bind('change', function () {
- var e = {
- };
- e[t] = r.val(),
- n.val(e)
- })
- }), this.$.find('legend').remove()) : (this.i = this.$, this.v = this.$.val(), this.v == '' && (this.v = this.o.min), this.$.bind('change', function () {
- n.val(n._validate(n.$.val()))
- })),
- !this.o.displayInput && this.$.hide(),
- this.$c = e(document.createElement('canvas')),
- typeof G_vmlCanvasManager != 'undefined' && G_vmlCanvasManager.initElement(this.$c[0]),
- this.c = this.$c[0].getContext ? this.$c[0].getContext('2d') : null;
- if (!this.c) {
- this.o.error && this.o.error();
- return
- }
- return this.scale = (window.devicePixelRatio || 1) / (this.c.webkitBackingStorePixelRatio || this.c.mozBackingStorePixelRatio || this.c.msBackingStorePixelRatio || this.c.oBackingStorePixelRatio || this.c.backingStorePixelRatio || 1),
- this.relativeWidth = this.o.width % 1 !== 0 && this.o.width.indexOf('%'),
- this.relativeHeight = this.o.height % 1 !== 0 && this.o.height.indexOf('%'),
- this.relative = this.relativeWidth || this.relativeHeight,
- this.$div = e('<div style="' + (this.o.inline ? 'display:inline;' : '') + '"></div>'),
- this.$.wrap(this.$div).before(this.$c),
- this.$div = this.$.parent(),
- this._carve(),
- this.v instanceof Object ? (this.cv = {
- }, this.copy(this.v, this.cv)) : this.cv = this.v,
- this.$.bind('configure', t).parent().bind('configure', t),
- this._listen()._configure()._xy().init(),
- this.isInit = !0,
- this._draw(),
- this
- },
- this._carve = function () {
- if (this.relative) {
- var e = this.relativeWidth ? this.$div.parent().width() * parseInt(this.o.width) / 100 : this.$div.parent().width(),
- t = this.relativeHeight ? this.$div.parent().height() * parseInt(this.o.height) / 100 : this.$div.parent().height();
- this.w = this.h = Math.min(e, t)
- } else this.w = this.o.width,
- this.h = this.o.height;
- return this.$div.css({
- width: this.w + 'px',
- height: this.h + 'px'
- }),
- this.$c.attr({
- width: this.w,
- height: this.h
- }),
- this.scale !== 1 && (this.$c[0].width = this.$c[0].width * this.scale, this.$c[0].height = this.$c[0].height * this.scale, this.$c.width(this.w), this.$c.height(this.h)),
- this
- },
- this._draw = function () {
- var e = !0;
- n.g = n.c,
- n.clear(),
- n.dH && (e = n.dH()),
- e !== !1 && n.draw()
- },
- this._touch = function (e) {
- var r = function (e) {
- var t = n.xy2val(e.originalEvent.touches[n.t].pageX, e.originalEvent.touches[n.t].pageY);
- if (t == n.cv) return;
- if (n.cH && n.cH(t) === !1) return;
- n.change(n._validate(t)),
- n._draw()
- };
- return this.t = t.c.t(e),
- r(e),
- t.c.d.bind('touchmove.k', r).bind('touchend.k', function () {
- t.c.d.unbind('touchmove.k touchend.k');
- if (n.rH && n.rH(n.cv) === !1) return;
- n.val(n.cv)
- }),
- this
- },
- this._mouse = function (e) {
- var r = function (e) {
- var t = n.xy2val(e.pageX, e.pageY);
- if (t == n.cv) return;
- if (n.cH && n.cH(t) === !1) return;
- n.change(n._validate(t)),
- n._draw()
- };
- return r(e),
- t.c.d.bind('mousemove.k', r).bind('keyup.k', function (e) {
- if (e.keyCode === 27) {
- t.c.d.unbind('mouseup.k mousemove.k keyup.k');
- if (n.eH && n.eH() === !1) return;
- n.cancel()
- }
- }).bind('mouseup.k', function (e) {
- t.c.d.unbind('mousemove.k mouseup.k keyup.k');
- if (n.rH && n.rH(n.cv) === !1) return;
- n.val(n.cv)
- }),
- this
- },
- this._xy = function () {
- var e = this.$c.offset();
- return this.x = e.left,
- this.y = e.top,
- this
- },
- this._listen = function () {
- return this.o.readOnly ? this.$.attr('readonly', 'readonly') : (this.$c.bind('mousedown', function (e) {
- e.preventDefault(),
- n._xy()._mouse(e)
- }).bind('touchstart', function (e) {
- e.preventDefault(),
- n._xy()._touch(e)
- }), this.listen()),
- this.relative && e(window).resize(function () {
- n._carve().init(),
- n._draw()
- }),
- this
- },
- this._configure = function () {
- return this.o.draw && (this.dH = this.o.draw),
- this.o.change && (this.cH = this.o.change),
- this.o.cancel && (this.eH = this.o.cancel),
- this.o.release && (this.rH = this.o.release),
- this.o.displayPrevious ? (this.pColor = this.h2rgba(this.o.fgColor, '0.4'), this.fgColor = this.h2rgba(this.o.fgColor, '0.6')) : this.fgColor = this.o.fgColor,
- this
- },
- this._clear = function () {
- this.$c[0].width = this.$c[0].width
- },
- this._validate = function (e) {
- return ~~((e < 0 ? - 0.5 : 0.5) + e / this.o.step) * this.o.step
- },
- this.listen = function () {
- },
- this.extend = function () {
- },
- this.init = function () {
- },
- this.change = function (e) {
- },
- this.val = function (e) {
- },
- this.xy2val = function (e, t) {
- },
- this.draw = function () {
- },
- this.clear = function () {
- this._clear()
- },
- this.h2rgba = function (e, t) {
- var n;
- return e = e.substring(1, 7),
- n = [
- parseInt(e.substring(0, 2), 16),
- parseInt(e.substring(2, 4), 16),
- parseInt(e.substring(4, 6), 16)
- ],
- 'rgba(' + n[0] + ',' + n[1] + ',' + n[2] + ',' + t + ')'
- },
- this.copy = function (e, t) {
- for (var n in e) t[n] = e[n]
- }
- },
- t.Dial = function () {
- t.o.call(this),
- this.startAngle = null,
- this.xy = null,
- this.radius = null,
- this.lineWidth = null,
- this.cursorExt = null,
- this.w2 = null,
- this.PI2 = 2 * Math.PI,
- this.extend = function () {
- this.o = e.extend({
- bgColor: this.$.data('bgcolor') || '#EEEEEE',
- angleOffset: this.$.data('angleoffset') || 0,
- angleArc: this.$.data('anglearc') || 360,
- inline: !0
- }, this.o)
- },
- this.val = function (e) {
- if (null == e) return this.v;
- this.cv = this.o.stopper ? n(r(e, this.o.max), this.o.min) : e,
- this.v = this.cv,
- this.$.val(this.v),
- this._draw()
- },
- this.xy2val = function (e, t) {
- var i,
- s;
- return i = Math.atan2(e - (this.x + this.w2), - (t - this.y - this.w2)) - this.angleOffset,
- this.angleArc != this.PI2 && i < 0 && i > - 0.5 ? i = 0 : i < 0 && (i += this.PI2),
- s = ~~(0.5 + i * (this.o.max - this.o.min) / this.angleArc) + this.o.min,
- this.o.stopper && (s = n(r(s, this.o.max), this.o.min)),
- s
- },
- this.listen = function () {
- var t = this,
- i = function (e) {
- e.preventDefault();
- var n = e.originalEvent,
- r = n.detail || n.wheelDeltaX,
- i = n.detail || n.wheelDeltaY,
- s = parseInt(t.$.val()) + (r > 0 || i > 0 ? t.o.step : r < 0 || i < 0 ? - t.o.step : 0);
- if (t.cH && t.cH(s) === !1) return;
- t.val(s)
- },
- s,
- o,
- u = 1,
- a = {
- 37: - t.o.step,
- 38: t.o.step,
- 39: t.o.step,
- 40: - t.o.step
- };
- this.$.bind('keydown', function (i) {
- var f = i.keyCode;
- f >= 96 && f <= 105 && (f = i.keyCode = f - 48),
- s = parseInt(String.fromCharCode(f));
- if (isNaN(s)) {
- f !== 13 && f !== 8 && f !== 9 && f !== 189 && i.preventDefault();
- if (e.inArray(f, [
- 37,
- 38,
- 39,
- 40
- ]) > - 1) {
- i.preventDefault();
- var l = parseInt(t.$.val()) + a[f] * u;
- t.o.stopper && (l = n(r(l, t.o.max), t.o.min)),
- t.change(l),
- t._draw(),
- o = window.setTimeout(function () {
- u *= 2
- }, 30)
- }
- }
- }).bind('keyup', function (e) {
- isNaN(s) ? o && (window.clearTimeout(o), o = null, u = 1, t.val(t.$.val())) : t.$.val() > t.o.max && t.$.val(t.o.max) || t.$.val() < t.o.min && t.$.val(t.o.min)
- }),
- this.$c.bind('mousewheel DOMMouseScroll', i),
- this.$.bind('mousewheel DOMMouseScroll', i)
- },
- this.init = function () {
- if (this.v < this.o.min || this.v > this.o.max) this.v = this.o.min;
- this.$.val(this.v),
- this.w2 = this.w / 2,
- this.cursorExt = this.o.cursor / 100,
- this.xy = this.w2 * this.scale,
- this.lineWidth = this.xy * this.o.thickness,
- this.lineCap = this.o.lineCap,
- this.radius = this.xy - this.lineWidth / 2,
- this.o.angleOffset && (this.o.angleOffset = isNaN(this.o.angleOffset) ? 0 : this.o.angleOffset),
- this.o.angleArc && (this.o.angleArc = isNaN(this.o.angleArc) ? this.PI2 : this.o.angleArc),
- this.angleOffset = this.o.angleOffset * Math.PI / 180,
- this.angleArc = this.o.angleArc * Math.PI / 180,
- this.startAngle = 1.5 * Math.PI + this.angleOffset,
- this.endAngle = 1.5 * Math.PI + this.angleOffset + this.angleArc;
- var e = n(String(Math.abs(this.o.max)).length, String(Math.abs(this.o.min)).length, 2) + 2;
- this.o.displayInput && this.i.css({
- width: (this.w / 2 + 4 >> 0) + 'px',
- height: (this.w / 3 >> 0) + 'px',
- position: 'absolute',
- 'vertical-align': 'middle',
- 'margin-top': (this.w / 3 >> 0) + 'px',
- 'margin-left': '-' + (this.w * 3 / 4 + 2 >> 0) + 'px',
- border: 0,
- background: 'none',
- font: this.o.fontWeight + ' ' + (this.w / e >> 0) + 'px ' + this.o.font,
- 'text-align': 'center',
- color: this.o.inputColor || this.o.fgColor,
- padding: '0px',
- '-webkit-appearance': 'none'
- }) || this.i.css({
- width: '0px',
- visibility: 'hidden'
- })
- },
- this.change = function (e) {
- this.cv = e,
- this.$.val(e)
- },
- this.angle = function (e) {
- return (e - this.o.min) * this.angleArc / (this.o.max - this.o.min)
- },
- this.draw = function () {
- var e = this.g,
- t = this.angle(this.cv),
- n = this.startAngle,
- r = n + t,
- i,
- s,
- o = 1;
- e.lineWidth = this.lineWidth,
- e.lineCap = this.lineCap,
- this.o.cursor && (n = r - this.cursorExt) && (r += this.cursorExt),
- e.beginPath(),
- e.strokeStyle = this.o.bgColor,
- e.arc(this.xy, this.xy, this.radius, this.endAngle - 0.00001, this.startAngle + 0.00001, !0),
- e.stroke(),
- this.o.displayPrevious && (s = this.startAngle + this.angle(this.v), i = this.startAngle, this.o.cursor && (i = s - this.cursorExt) && (s += this.cursorExt), e.beginPath(), e.strokeStyle = this.pColor, e.arc(this.xy, this.xy, this.radius, i, s, !1), e.stroke(), o = this.cv == this.v),
- e.beginPath(),
- e.strokeStyle = o ? this.o.fgColor : this.fgColor,
- e.arc(this.xy, this.xy, this.radius, n, r, !1),
- e.stroke()
- },
- this.cancel = function () {
- this.val(this.v)
- }
- },
- e.fn.dial = e.fn.knob = function (n) {
- return this.each(function () {
- var r = new t.Dial;
- r.o = n,
- r.$ = e(this),
- r.run()
- }).parent()
- }
- }(B),
- function (e) {
- function n(e) {
- if (i.raw) return e;
- try {
- return decodeURIComponent(e.replace(t, ' '))
- } catch (n) {
- }
- }
- function r(e) {
- e.indexOf('"') === 0 && (e = e.slice(1, - 1).replace(/\\"/g, '"').replace(/\\\\/g, '\\')),
- e = n(e);
- try {
- return i.json ? JSON.parse(e) : e
- } catch (t) {
- }
- }
- var t = /\+/g,
- i = e.cookie = function (t, s, o) {
- if (s !== undefined) {
- o = e.extend({
- }, i.defaults, o);
- if (typeof o.expires == 'number') {
- var u = o.expires,
- a = o.expires = new Date;
- a.setDate(a.getDate() + u)
- }
- return s = i.json ? JSON.stringify(s) : String(s),
- document.cookie = [
- i.raw ? t : encodeURIComponent(t),
- '=',
- i.raw ? s : encodeURIComponent(s),
- o.expires ? '; expires=' + o.expires.toUTCString() : '',
- o.path ? '; path=' + o.path : '',
- o.domain ? '; domain=' + o.domain : '',
- o.secure ? '; secure' : ''
- ].join('')
- }
- var f = t ? undefined : {
- },
- l = document.cookie ? document.cookie.split('; ') : [
- ];
- for (var c = 0, h = l.length; c < h; c++) {
- var p = l[c].split('='),
- d = n(p.shift()),
- v = p.join('=');
- if (t && t === d) {
- f = r(v);
- break
- }
- !t && (v = r(v)) !== undefined && (f[d] = v)
- }
- return f
- };
- i.defaults = {
- },
- e.removeCookie = function (t, n) {
- return e.cookie(t) !== undefined ? (e.cookie(t, '', e.extend({
- }, n, {
- expires: - 1
- })), !0) : !1
- }
- }(B),
- function (e) {
- function r(t) {
- var n = arguments.length,
- r = window[t],
- i = arguments,
- s = i[1],
- o,
- u,
- a;
- if (n < 2) throw new Error('Minimum 2 arguments must be given');
- if (e.isArray(s)) {
- u = {
- };
- for (var f in s) {
- o = s[f];
- try {
- u[o] = JSON.parse(r.getItem(o))
- } catch (l) {
- u[o] = r.getItem(o)
- }
- }
- return u
- }
- if (n != 2) {
- try {
- u = JSON.parse(r.getItem(s))
- } catch (l) {
- throw new ReferenceError(s + ' is not defined in this storage')
- }
- for (var f = 2; f < n - 1; f++) {
- u = u[i[f]];
- if (u === undefined) throw new ReferenceError([].slice.call(i, 1, f + 1).join('.') + ' is not defined in this storage')
- }
- if (e.isArray(i[f])) {
- a = u,
- u = {
- };
- for (var c in i[f]) u[i[f][c]] = a[i[f][c]];
- return u
- }
- return u[i[f]]
- }
- try {
- return JSON.parse(r.getItem(s))
- } catch (l) {
- return r.getItem(s)
- }
- }
- function i(t) {
- var n = arguments.length,
- r = window[t],
- i = arguments,
- s = i[1],
- o = i[2],
- u,
- a = {
- },
- f;
- if (n < 2 || !e.isPlainObject(s) && n < 3) throw new Error('Minimum 3 arguments must be given or second parameter must be an object');
- if (e.isPlainObject(s)) {
- for (var l in s) u = s[l],
- e.isPlainObject(u) ? r.setItem(l, JSON.stringify(u)) : r.setItem(l, u);
- return s
- }
- if (n == 3) return typeof o == 'object' ? r.setItem(s, JSON.stringify(o)) : r.setItem(s, o),
- o;
- try {
- f = r.getItem(s),
- f != null && (a = JSON.parse(f))
- } catch (c) {
- }
- f = a;
- for (var l = 2; l < n - 2; l++) {
- u = i[l];
- if (!f[u] || !e.isPlainObject(f[u])) f[u] = {
- };
- f = f[u]
- }
- return f[i[l]] = i[l + 1],
- r.setItem(s, JSON.stringify(a)),
- a
- }
- function s(t) {
- var n = arguments.length,
- r = window[t],
- i = arguments,
- s = i[1],
- o,
- u;
- if (n < 2) throw new Error('Minimum 2 arguments must be given');
- if (e.isArray(s)) {
- for (var a in s) r.removeItem(s[a]);
- return !0
- }
- if (n == 2) return r.removeItem(s),
- !0;
- try {
- o = u = JSON.parse(r.getItem(s))
- } catch (f) {
- throw new ReferenceError(s + ' is not defined in this storage')
- }
- for (var a = 2; a < n - 1; a++) {
- u = u[i[a]];
- if (u === undefined) throw new ReferenceError([].slice.call(i, 1, a).join('.') + ' is not defined in this storage')
- }
- if (e.isArray(i[a])) for (var l in i[a]) delete u[i[a][l]];
- else delete u[i[a]];
- return r.setItem(s, JSON.stringify(o)),
- !0
- }
- function o(t, n) {
- var r = f(t);
- for (var i in r) s(t, r[i]);
- if (n) for (var i in e.namespaceStorages) l(i)
- }
- function u(t) {
- var n = arguments.length,
- i = arguments,
- s = window[t],
- o = i[1];
- if (n == 1) return f(t).length == 0;
- if (e.isArray(o)) {
- for (var a = 0; a < o.length; a++) if (!u(t, o[a])) return !1;
- return !0
- }
- try {
- var l = r.apply(this, arguments);
- e.isArray(i[n - 1]) || (l = {
- totest: l
- });
- for (var a in l) if (!(e.isPlainObject(l[a]) && e.isEmptyObject(l[a]) || e.isArray(l[a]) && !l[a].length || !l[a])) return !1;
- return !0
- } catch (c) {
- return !0
- }
- }
- function a(t) {
- var n = arguments.length,
- i = arguments,
- s = window[t],
- o = i[1];
- if (n < 2) throw new Error('Minimum 2 arguments must be given');
- if (e.isArray(o)) {
- for (var u = 0; u < o.length; u++) if (!a(t, o[u])) return !1;
- return !0
- }
- try {
- var f = r.apply(this, arguments);
- e.isArray(i[n - 1]) || (f = {
- totest: f
- });
- for (var u in f) if (f[u] === undefined || f[u] === null) return !1;
- return !0
- } catch (l) {
- return !1
- }
- }
- function f(t) {
- var n = arguments.length,
- i = window[t],
- s = arguments,
- o = s[1],
- u = [
- ],
- a = {
- };
- n > 1 ? a = r.apply(this, s) : a = i;
- if (a._cookie) for (var f in e.cookie()) f != '' && u.push(f.replace(a._prefix, ''));
- else for (var l in a) u.push(l);
- return u
- }
- function l(t) {
- if (!t || typeof t != 'string') throw new Error('First parameter must be a string');
- h ? (window.localStorage.getItem(t) || window.localStorage.setItem(t, '{}'), window.sessionStorage.getItem(t) || window.sessionStorage.setItem(t, '{}')) : (window.localCookieStorage.getItem(t) || window.localCookieStorage.setItem(t, '{}'), window.sessionCookieStorage.getItem(t) || window.sessionCookieStorage.setItem(t, '{}'));
- var n = {
- localStorage: e.extend({
- }, e.localStorage, {
- _ns: t
- }),
- sessionStorage: e.extend({
- }, e.sessionStorage, {
- _ns: t
- })
- };
- return e.cookie && (window.cookieStorage.getItem(t) || window.cookieStorage.setItem(t, '{}'), n.cookieStorage = e.extend({
- }, e.cookieStorage, {
- _ns: t
- })),
- e.namespaceStorages[t] = n,
- n
- }
- function c(e) {
- var t = 'jsapi';
- try {
- return window[e] ? (window[e].setItem(t, t), window[e].removeItem(t), !0) : !1
- } catch (n) {
- return !1
- }
- }
- var t = 'ls_',
- n = 'ss_',
- h = c('localStorage'),
- p = {
- _type: '',
- _ns: '',
- _callMethod: function (e, t) {
- var n = [
- this._type
- ],
- t = Array.prototype.slice.call(t),
- r = t[0];
- return this._ns && n.push(this._ns),
- typeof r == 'string' && r.indexOf('.') !== - 1 && (t.shift(), [
- ].unshift.apply(t, r.split('.'))),
- [
- ].push.apply(n, t),
- e.apply(this, n)
- },
- get: function () {
- return this._callMethod(r, arguments)
- },
- set: function () {
- var t = arguments.length,
- n = arguments,
- r = n[0];
- if (t < 1 || !e.isPlainObject(r) && t < 2) throw new Error('Minimum 2 arguments must be given or first parameter must be an object');
- if (e.isPlainObject(r) && this._ns) {
- for (var s in r) i(this._type, this._ns, s, r[s]);
- return r
- }
- var o = this._callMethod(i, n);
- return this._ns ? o[r.split('.') [0]] : o
- },
- remove: function () {
- if (arguments.length < 1) throw new Error('Minimum 1 argument must be given');
- return this._callMethod(s, arguments)
- },
- removeAll: function (e) {
- return this._ns ? (i(this._type, this._ns, {
- }), !0) : o(this._type, e)
- },
- isEmpty: function () {
- return this._callMethod(u, arguments)
- },
- isSet: function () {
- if (arguments.length < 1) throw new Error('Minimum 1 argument must be given');
- return this._callMethod(a, arguments)
- },
- keys: function () {
- return this._callMethod(f, arguments)
- }
- };
- if (e.cookie) {
- window.name || (window.name = Math.floor(Math.random() * 100000000));
- var d = {
- _cookie: !0,
- _prefix: '',
- _expires: null,
- _path: null,
- _domain: null,
- setItem: function (t, n) {
- e.cookie(this._prefix + t, n, {
- expires: this._expires,
- path: this._path,
- domain: this._domain
- })
- },
- getItem: function (t) {
- return e.cookie(this._prefix + t)
- },
- removeItem: function (t) {
- return e.removeCookie(this._prefix + t)
- },
- clear: function () {
- for (var r in e.cookie()) r != '' && (!this._prefix && r.indexOf(t) === - 1 && r.indexOf(n) === - 1 || this._prefix && r.indexOf(this._prefix) === 0) && e.removeCookie(r)
- },
- setExpires: function (e) {
- return this._expires = e,
- this
- },
- setPath: function (e) {
- return this._path = e,
- this
- },
- setDomain: function (e) {
- return this._domain = e,
- this
- },
- setConf: function (e) {
- return e.path && (this._path = e.path),
- e.domain && (this._domain = e.domain),
- e.expires && (this._expires = e.expires),
- this
- },
- setDefaultConf: function () {
- this._path = this._domain = this._expires = null
- }
- };
- h || (window.localCookieStorage = e.extend({
- }, d, {
- _prefix: t,
- _expires: 3650
- }), window.sessionCookieStorage = e.extend({
- }, d, {
- _prefix: n + window.name + '_'
- })),
- B.cookieStorage = e.extend({
- }, d),
- e.cookieStorage = e.extend({
- }, p, {
- _type: 'cookieStorage',
- setExpires: function (e) {
- return B.cookieStorage.setExpires(e),
- this
- },
- setPath: function (e) {
- return B.cookieStorage.setPath(e),
- this
- },
- setDomain: function (e) {
- return B.cookieStorage.setDomain(e),
- this
- },
- setConf: function (e) {
- return B.cookieStorage.setConf(e),
- this
- },
- setDefaultConf: function () {
- return B.cookieStorage.setDefaultConf(),
- this
- }
- })
- }
- e.initNamespaceStorage = function (e) {
- return l(e)
- },
- h ? (e.localStorage = e.extend({
- }, p, {
- _type: 'localStorage'
- }), e.sessionStorage = e.extend({
- }, p, {
- _type: 'sessionStorage'
- })) : (e.localStorage = e.extend({
- }, p, {
- _type: 'localCookieStorage'
- }), e.sessionStorage = e.extend({
- }, p, {
- _type: 'sessionCookieStorage'
- })),
- e.namespaceStorages = {
- },
- e.removeAllStorages = function (t) {
- e.localStorage.removeAll(t),
- e.sessionStorage.removeAll(t),
- e.cookieStorage && e.cookieStorage.removeAll(t),
- t || (e.namespaceStorages = {
- })
- }
- }(B),
- tp.define('jq', [
- ], function () {
- return B
- })
- }(window),
- tp.define('jq', function () {
- }),
- tp.define('main', [
- 'jq',
- 'util',
- 'api',
- 'fingerprint',
- 'user',
- 'murmurhash3',
- 'activetimer',
- 'scrollDepth',
- 'doubleClickForPublisher',
- 'offer',
- 'viewportExit',
- 'idle',
- 'log',
- 'experience'
- ], function (e, t, n, r, i, s, o, u, a, f, l, c, h, p) {
- function v() {
- return t.getCurrentDomainFromCookie(d.__private__.VISIT_ID_COOKIE)
- }
- function m(e, t) {
- var n = d.__private__.collectedAds;
- d.__private__.collectedAds = {
- };
- var r = {
- };
- for (var i in n) if (n.hasOwnProperty(i)) {
- r[i] = r[i] || [
- ];
- for (var s in n[i]) n[i].hasOwnProperty(s) && r[i].push(n[i][s])
- }
- d.trackAds(r, e, t)
- }
- function g() {
- function a(e, t, n) {
- return n = n || '0',
- e += '',
- e.length >= t ? e : (new Array(t - e.length + 1)).join(n) + e
- }
- var e = t.randomString(16),
- n = s.x64hash128([r.getFingerprint(),
- window.location.href].join('')),
- i = new Date,
- o = [
- a(i.getFullYear(), 4),
- a(i.getMonth() + 1, 2),
- a(i.getDate(), 2),
- a(i.getHours(), 2),
- a(i.getMinutes(), 2),
- a(i.getSeconds(), 2),
- a(i.getMilliseconds(), 3)
- ].join('-'),
- u = [
- o,
- e,
- n
- ].join('-');
- return u
- }
- function y() {
- var e;
- try {
- e = JSON.parse(t.__protected__.getCookie(d.__private__.VISIT_ID_COOKIE))
- } catch (n) {
- e = {
- }
- }
- return e
- }
- function b(e) {
- var t = {
- path: '/',
- expires: 1,
- domain: d.__private__.visitContainer.currentDomain
- };
- return e && (t.domain = e),
- t
- }
- function w(e, n) {
- e.domain = n.domain,
- e.time = (new Date).getTime(),
- t.__protected__.setCookie(d.__private__.VISIT_ID_COOKIE, JSON.stringify(e), n)
- }
- function E(e) {
- var n = d.__private__.getVisitCookieOptions();
- !e.domain && !d.__private__.visitContainer.currentDomain ? t.waitCall('domainIsReceived', function (t) {
- d.__private__.setVisitCurrentDomain(t),
- n.domain = t,
- d.__private__.saveVisitCookie(e, n)
- }) : d.__private__.saveVisitCookie(e, n)
- }
- function S(e) {
- var n = (new Date).getTime(),
- r = 86400000,
- i = 60000,
- s = 1800000,
- o = t.getBrowserTimezoneOffset() * i,
- u = t.getAppTimezoneOffset(),
- a = (new Date(e.time)).setHours(0, 0, 0, 0) + r - o - u;
- return e.time + s < n || n >= a
- }
- function x() {
- if (t.__protected__.cameFromFbSubscriptions()) return !1;
- if (!d.__private__.visitContainer.currentDomain) return !1;
- var e = t.getReferrer();
- if (d.__private__.lastReferrer && d.__private__.lastReferrer === e) return !1;
- var n = t.getHostname(e),
- r = (new RegExp(d.__private__.visitContainer.currentDomain.replace(/\./g, '\\.').replace(/^\\./, '\\.?') + '$')).test(n);
- return Boolean(n) && !r
- }
- function T() {
- var e = d.__private__.loadLastVisit(),
- t = !e || !e.id || !e.time;
- if (t || d.__private__.isTimeExpired(e) || d.__private__.hasExternalReferrer()) e.id = 'v-' + d.__private__.generatePageViewId();
- d.__private__.saveLastVisit(e),
- d.__private__.visitContainer.visit = e
- }
- function N(n, i, s) {
- var o = 'manual';
- if (typeof i == 'undefined') i = window.location.href;
- else {
- if (typeof i != 'object') throw new Error('First parameter to track page must be a URL or an object');
- var u = i;
- if (typeof u.url == 'undefined') throw new Error('Must supply url property');
- i = u.url,
- typeof u.tags != 'undefined' && (s = u.tags),
- typeof u.submitType != 'undefined' && (o = u.submitType)
- }
- s || (s = tp.tags),
- tp.customPageUrl && (n.custom_page_url = t.prepareUrlParameter(tp.customPageUrl)),
- typeof s != 'undefined' ? Object.prototype.toString.call(s) != '[object Array]' && Object.prototype.toString.call(s) != '[object String]' ? (t.log('Tags must be an array or a comma-separated string, ignoring supplied tags'), s = '') : Object.prototype.toString.call(s) == '[object Array]' && (s = s.join(',')) : s = '',
- d.__private__.pageView.track(),
- n.page_session_id = d.__private__.pageView.pageSessionId,
- n.track_count = d.__private__.pageView.trackCount,
- d.__private__.setPageViewId(n);
- var a;
- tp.contentCreated ? a = tp.contentCreated : tp.contentCreatedSelector && e(tp.contentCreatedSelector).length == 1 && (a = e(tp.contentCreatedSelector).html()),
- a && (n.content_created = a),
- typeof tp.contentIsNative == 'boolean' && (n.content_is_native = tp.contentIsNative),
- tp.zone && (n.zone = tp.zone);
- var f = tp.contentSection || d.__private__.getMetaTagContent('section');
- f && (n.content_section = f);
- var l = tp.contentAuthor || d.__private__.getMetaTagContent('author');
- l && (n.content_author = l);
- var c = tp.contentId || d.__private__.getMetaTagContent('id');
- c && (n.content_id = c);
- var h = t.__protected__.getCookie('sailthru_hid');
- h && (n.sailthru_hid = h);
- var p;
- d.__private__.lastReferrer && d.__private__.lastReferrer === t.getReferrer() ? p = '' : (p = t.getReferrer(), d.__private__.lastReferrer = p),
- n.referer = t.prepareUrlParameter(p),
- s && (n.tags = s),
- n.url = t.prepareUrlParameter(i),
- n.fingerprint = r.getFingerprint(),
- n.adblocker = t.getAdblockStatus();
- if (n.adblocker === t.ADBLOCKER_STATUS.ENABLED_AFTER_DISABLED || n.adblocker === t.ADBLOCKER_STATUS.ENABLED) tp.setCustomParam('_abr', t.getAdblockerStatusReason(), 'user', !0),
- tp.setCustomParam('_absh', t.getAdblockerHistoryCookieInfo().cookieValue + '', 'user', !0);
- n.timezone_offset = t.getBrowserTimezoneOffset(),
- n.submit_type = o;
- var v = d.__protected__.fetchVisitId();
- return n.visit_id = v,
- n.new_visit = d.__private__.checkIfNewVisitAndUpdateLastTrackedVisitId(v),
- n.keywords = e('meta[name="keywords"]').attr('content') || e('meta[name="news_keywords"]').attr('content') || '',
- n.title = e('meta[property="og:title"]').attr('content') || '',
- n.description = e('meta[property="og:description"]').attr('content') || '',
- n.content_type = e('meta[property="og:type"]').attr('content') || '',
- e.each(['keywords',
- 'title',
- 'description',
- 'content_type'], function (e, t) {
- n[t] = n[t].substr(0, 8192)
- }),
- n.custom_variables = JSON.stringify(tp.customVariables),
- d.__private__.buildPageCustomParams(n),
- n
- }
- function C() {
- var n = {
- };
- n.aid = tp.aid;
- var r = t.getTbcCookie();
- r && (n.tbc = r);
- var i = {
- active: o.getActiveTimeInSeconds(),
- total: o.getTotalTimeInSeconds()
- };
- i.total < i.active && (i.total = i.active),
- n.time_spent = JSON.stringify(i),
- n.scroll = JSON.stringify({
- max_page_height: u.getMaxDocumentHeight(),
- max_depth: u.getMaxScrollDepth()
- }),
- n.viewport_exit = l.getSumOfCodesDirection(),
- n.url = t.prepareUrlParameter(window.location.href),
- d.__private__.setPageViewId(n),
- n.visit_id = d.__protected__.fetchVisitId(),
- d.__private__.markVisitToCheckForRefresh();
- var s = {
- },
- f = a.getAds();
- return f.length && (s.dfp = f),
- e.isEmptyObject(s) || (n.ads = JSON.stringify(s)),
- n
- }
- function k(t) {
- var n = {
- };
- return tp.customParams && (n = e.extend(!0, {
- }, tp.customParams)),
- e.isEmptyObject(n) || (t.custom_params = JSON.stringify(n)),
- t
- }
- function L() {
- return d.__private__.pageView.id
- }
- function A(e) {
- var t = d.__private__.visitContainer.lastTrackedVisitId !== e;
- return d.__private__.visitContainer.lastTrackedVisitId = e,
- t
- }
- function O() {
- d.__private__.visitContainer.checkForRefresh = !0
- }
- function M() {
- return d.__private__.visitContainer.checkForRefresh && (d.__private__.refreshVisit(), d.__private__.visitContainer.checkForRefresh = !1),
- d.__private__.visitContainer.visit.id
- }
- function _(e) {
- var t = document.head.querySelector('meta[name=' + e + ']');
- return (t || {
- }).content
- }
- function D(e) {
- d.__private__.visitContainer.currentDomain = e
- }
- function P() {
- var t = d.__private__.getVisitCookieOptions();
- e.removeCookie(d.__private__.VISIT_ID_COOKIE, t)
- }
- function H() {
- return !tp.endpoint || !tp.endpoint.match(/sandbox/)
- }
- function B(e, r, i, s) {
- if (tp.aid.length == 0) {
- t.log('Must supply a valid tp.aid before calling tp.init()');
- return
- }
- if (!d.__private__.currentEnvironmentSupportsPageTrack()) return !1;
- t.waitCall('refreshAccessTokenList', function () {
- t.waitCall('offerCreate', function () {
- t.startCall('pageTrack'),
- n.callApi(e, r, function (e) {
- t.doneCall('pageTrack'),
- i && i(e)
- }, d.__protected__.getTrackingEndpoint(), s)
- })
- })
- }
- function j() {
- return typeof tp.endpoint == 'undefined' || tp.endpoint === null || tp.endpoint == '' || tp.endpoint === 'prod' || tp.endpoint === 'production' || tp.endpoint.match(/(buy|api|api-v3)\.tinypass\.com/) ? 'https://api-v3.tinypass.com/api/v3' : tp.endpoint
- }
- function F() {
- d.__private__.unloadRegistered && d.__private__.pageView.trackCount > 0 && (d.trackPageUnload(), d.resetTimer())
- }
- function I(e) {
- if (!d.__private__.currentEnvironmentSupportsPageTrack()) return;
- try {
- var n = d.__private__.buildPageUnloadParams();
- l.isInitialized() && l.resetSumOfCodesDirectionToDefault(),
- h.__private__.logBeaconRequest(d.__protected__.getTrackingEndpoint() + '/page/unload', n),
- d.unregisterTrackUnload()
- } catch (r) {
- t.error('main: error on tracking page unload event: ', r)
- }
- }
- function q() {
- d.__private__.unloadTriggered || (d.__private__.unloadTriggered = !0, d.trackPageUnload(!0))
- }
- function R() {
- d.__private__.unloadRegistered = !0
- }
- function U() {
- return d.__private__.unloadRegistered
- }
- function z() {
- d.__private__.unloadRegistered = !1
- }
- function W() {
- d.__private__.unloadRegistered && d.__private__.unloadAction(),
- d.__private__.trackCollectedAds(!0, d.__private__.BEACON_REQUEST),
- p.__protected__.sendStatisticsExecutedNodes()
- }
- function X() {
- o.resetRecordedTime()
- }
- function V() {
- a.resetAds()
- }
- function $(e) {
- e && (e.pageview_id = d.fetchPageViewId())
- }
- function J(e, n) {
- if (!d.__private__.currentEnvironmentSupportsPageTrack()) return !1;
- try {
- d.__protected__.trackPageUnloadIfNecessary();
- var r = d.buildPageTrackParams({
- }, e, n);
- d.__private__.track('/page/track', r),
- d.registerTrackUnload()
- } catch (i) {
- t.error('main: error on page tracking event: ', i)
- }
- }
- function K(n, r, i) {
- return;
- var s,
- o
- }
- function Q(e, t, n) {
- d.__private__.collectedAds[e] || (d.__private__.collectedAds[e] = {
- }),
- d.__private__.collectedAds[e][t] = n,
- d.__private__.debouncedTrackAds()
- }
- function G() {
- var e = t.getQueryParamByName(d.__private__.VOUCHER_QUERY);
- e && f.startRedeemVoucher({
- voucherCode: e
- })
- }
- function Y() {
- if (tp.aid.length == 0) {
- t.log('Must supply a valid tp.aid before calling tp.init()');
- return
- }
- tp.isMockMode || (a.initialize(), o.initialize(), u.initialize()),
- c.initialize(),
- d.__private__.checkVoucher(),
- i.refreshAccessToken()
- }
- var d = {
- __private__: {
- },
- __protected__: {
- }
- };
- return d.name = 'main',
- d.pageTrack = J,
- d.trackPage = d.pageTrack,
- d.buildPageTrackParams = N,
- d.fetchPageViewId = L,
- d.trackPageUnload = I,
- d.registerTrackUnload = R,
- d.isRegisteredTrackUnload = U,
- d.unregisterTrackUnload = z,
- d.resetTimer = X,
- d.resetAds = V,
- d.trackAds = K,
- d.trackAd = Q,
- d.init = Y,
- d.__protected__.fetchVisitId = M,
- d.__protected__.getTrackingEndpoint = j,
- d.__protected__.trackPageUnloadIfNecessary = F,
- d.__private__.BEACON_REQUEST = 'beacon_request',
- d.__private__.saveVisitCookie = w,
- d.__private__.trackCollectedAds = m,
- d.__private__.getCurrentDomain = v,
- d.__private__.generatePageViewId = g,
- d.__private__.loadLastVisit = y,
- d.__private__.getVisitCookieOptions = b,
- d.__private__.saveLastVisit = E,
- d.__private__.isTimeExpired = S,
- d.__private__.hasExternalReferrer = x,
- d.__private__.refreshVisit = T,
- d.__private__.setPageViewId = $,
- d.__private__.buildPageUnloadParams = C,
- d.__private__.buildPageCustomParams = k,
- d.__private__.checkIfNewVisitAndUpdateLastTrackedVisitId = A,
- d.__private__.markVisitToCheckForRefresh = O,
- d.__private__.getMetaTagContent = _,
- d.__private__.setVisitCurrentDomain = D,
- d.__private__.invalidateLastVisit = P,
- d.__private__.currentEnvironmentSupportsPageTrack = H,
- d.__private__.track = B,
- d.__private__.unloadAction = q,
- d.__private__.unloadHandler = W,
- d.__private__.checkVoucher = G,
- d.__private__.VOUCHER_QUERY = 'voucher_code',
- d.__private__.VISIT_ID_COOKIE = '__pvi',
- d.__private__.unloadRegistered = !1,
- d.__private__.unloadTriggered = !1,
- d.__private__.collectedAds = {
- },
- d.__private__.debouncedTrackAds = t.debounce(d.__private__.trackCollectedAds, 3000),
- d.__private__.lastReferrer,
- d.__private__.pageView = {
- id: d.__private__.generatePageViewId(),
- pageSessionId: 's-' + d.__private__.generatePageViewId(),
- trackCount: 0,
- tracked: !1,
- track: function () {
- this.tracked ? this.id = d.__private__.generatePageViewId() : this.tracked = !0,
- this.trackCount++
- }
- },
- d.__private__.visitContainer = {
- currentDomain: d.__private__.getCurrentDomain(),
- lastTrackedVisitId: d.__private__.loadLastVisit().id,
- visit: {
- },
- checkForRefresh: !1
- },
- d.__private__.refreshVisit(),
- e(window).on('beforeunload unload', d.__private__.unloadHandler),
- d
- }),
- tp.define('api', [
- 'jq',
- 'util'
- ], function (e, t) {
- var n = t.findCookieByName(/__TP_*/),
- r = function () {
- var e = function () {
- return 'mock'
- },
- t = function () {
- return ''
- },
- n = function () {
- return !1
- };
- return {
- getName: function () {
- return e()
- },
- getToken: function () {
- return t()
- },
- isUserValid: function () {
- return n()
- }
- }
- }(),
- i = function (e) {
- r = e
- },
- s;
- typeof window._tpm != 'undefined' && typeof window._tpm['paywallID'] != 'undefined' && (paywallID = window._tpm.paywallID, s = t.__protected__.getCookie('umc_' + window._tpm.paywallID));
- var o = t.__protected__.getCookie('__tac'),
- u = function () {
- return tp.getApiEndpoint()
- },
- a = function (e) {
- if (typeof e == 'undefined' || !e) e = {
- };
- e.aid = tp.aid,
- s && (e.umc = s),
- n && (e.tp_access_token_v2 = n),
- o && (e.tac = o);
- if (typeof e.user_provider == 'undefined' || !e.user_provider) e.user_provider = r.getName();
- if (typeof e['user_token'] == 'undefined' || !e.user_token) e.user_token = r.getToken() && r.getToken().length > 0 ? r.getToken() : ''
- },
- f = function (n, r, i, s, o) {
- t.debug('Calling API method: ' + n);
- var f;
- typeof s != 'undefined' ? f = s : f = u(),
- f += n;
- if (typeof r == 'undefined' || !r) r = {
- };
- var l = t.getTbcCookie();
- l && (r.tbc = l),
- a(r);
- var c;
- typeof i == 'undefined' ? c = function (e) {
- t.debug('API Response', e),
- t.setTbcCookieFromResponse(e),
- t.setAppTimezoneOffsetFromResponse(e),
- t.setCurrentDomainFromResponse(e)
- }
- : c = function (e) {
- t.debug('API Response', e),
- t.setTbcCookieFromResponse(e),
- t.setAppTimezoneOffsetFromResponse(e),
- t.setCurrentDomainFromResponse(e),
- i(e)
- },
- f = f + '?' + e.param(r, !0);
- var h = {
- url: f,
- dataType: 'jsonp'
- };
- o && (h.async = !1),
- e.ajax(h).done(c).fail(function () {
- var e = {
- code: 503,
- message: 'Error: Received error when requesting API response from URL: ' + f
- };
- t.log(e.message),
- c(e)
- })
- };
- return {
- name: 'api',
- callApi: function (e, t, n, r, i) {
- return f(e, t, n, r, i)
- },
- getEndpoint: function () {
- return u()
- },
- setUserProvider: function (e) {
- return i(e)
- },
- getCallParams: function (e) {
- return a(e)
- }
- }
- }),
- tp.define('offer', [
- 'jq',
- 'util',
- 'postmessage',
- 'user',
- 'require-css/css!styles/offer',
- 'containerUtils',
- 'eventUtils',
- 'viewportExit'
- ], function (e, t, n, r, i, s, o, u) {
- function x(e, t, n, i, o) {
- i || r.logout(function () {
- var e = {
- };
- e.userProvider = r.getProvider().getName(),
- e.userToken = r.getProvider().getToken() && r.getProvider().getToken().length > 0 ? r.getProvider().getToken() : '',
- e.noNeedStartCheckout = !0,
- J(e)
- }, p),
- t.closeOnLogout && s.closeModalContainer(n, i)
- }
- function T(e, t, n, i) {
- t.source = p,
- r.getProvider().onLoginSuccess(t),
- b.fireCallbacks('loginSuccess', t, n, i);
- if (!y) {
- var s = {
- userToken: t.user_token,
- user: t.user,
- reloadAfterLogin: !0
- };
- J(s, n)
- }
- }
- function N(t, n) {
- var r = [
- 'debug',
- 'aid',
- 'gaClientId',
- 'tags',
- 'contentSection',
- 'contentAuthor',
- 'debug',
- 'customVariables',
- 'zone'
- ];
- e.each(r, function (e, r) {
- n[r] && (t[r] = n[r])
- }),
- t.customVariables && (t.customVariables = JSON.stringify(t.customVariables));
- var i = n.contentCreated;
- return i && (t.contentCreated = i),
- n && n.main && (t.pageViewId = n.main.fetchPageViewId(), t.visitId = n.main.__protected__.fetchVisitId()),
- t
- }
- function C(n) {
- var r = {
- };
- n.termIds && (n.termIds instanceof Array || (n.termIds = [
- n.termIds
- ]));
- var i = [
- 'displayMode',
- 'containerSelector',
- 'templateId',
- 'templateVariantId',
- 'offerId',
- 'termId',
- 'termIds',
- 'rid',
- 'aid',
- 'isCheckout',
- 'pw_id',
- 'paywallId',
- 'width',
- 'preview',
- 'previewUncached',
- 'previewTemplateType',
- 'previewTemplateVersion',
- 'tokenType',
- 'janrainCaptureToken',
- 'closeOnLogout',
- 'voucherCode',
- 'isRedemption',
- 'allowReturnToStartState',
- 'startFromInlineCheckout',
- 'formNameByTermId',
- 'hideCompletedFields',
- 'startFromInlineCheckout',
- 'reloadAfterLogin',
- 'preventReloadAfterLogin',
- 'isAuth',
- 'authStartScreen',
- 'showCloseButton',
- 'closeButtonType'
- ],
- s = [
- 'trackingId',
- 'experienceId',
- 'activeMeters'
- ],
- o = n.additionalParamNames ? n.additionalParamNames : [
- ],
- u = i.concat(s, o);
- e.each(u, function (e, t) {
- n[t] && (r[t] = n[t]),
- t === 'showCloseButton' && (n[t] === undefined ? r[t] = !0 : r[t] = n[t])
- });
- var a = decodeURIComponent(t.getQueryParamByName('_ptid'));
- return a && (r.trackingId = a),
- n.preview && (r.activeMeters = JSON.stringify([{
- meterName: 'preview-meter',
- views: 10,
- viewsLeft: 5,
- maxViews: 20,
- totalViews: 20
- }
- ])),
- r
- }
- function k(e) {
- var t = e.displayMode || 'modal';
- return [e.offerId,
- t,
- e.containerSelector].join('|')
- }
- function L(e) {
- var t = k(e);
- return !!f[t]
- }
- function A(e) {
- var t = k(e);
- f[t] = !0
- }
- function O(e) {
- var t = k(e);
- delete f[t]
- }
- function _(e, i) {
- var o = C(e),
- u = t.getTbcCookie();
- u && u.length > 0 && (o.tbc = u),
- o.iframeId = 'offer-' + l++ + '-' + t.randomString(),
- o.url = t.prepareUrlParameter(window.location.href),
- o.parentDualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left,
- o.parentDualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top,
- o.parentWidth = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width,
- o.parentHeight = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height,
- o.parentOuterHeight = window.parent.outerHeight,
- e.previewNonLoggedUser && (o.previewNonLoggedUser = e.previewNonLoggedUser),
- e.isPreload && (o.preload = 1),
- N(o, tp);
- var f = b.hasCallback('loginRequired');
- if (tp.janrain.isConfigured() && (typeof e.loginRequired == 'undefined' || !e.loginRequired)) {
- var h = [
- ];
- tp.janrain.addEventHandler('onModalClose', function () {
- s.activateContainers(h)
- }),
- j(),
- e.loginRequired = function (e) {
- return h = s.hideModalContainer(),
- g = e.allowReturnToStartState,
- d = !1,
- v = e.termId,
- m = o.iframeId,
- t.waitCall('refreshUserToken', function () {
- tp.janrain.login()
- }),
- !1
- }
- } else if (tp.gigya.isConfigured() && (typeof e.loginRequired == 'undefined' || !e.loginRequired)) {
- var h = [
- ];
- tp.gigya.registerCallback('onHide', function () {
- s.activateContainers(h)
- }),
- B(),
- e.loginRequired = function (e) {
- return g = e.allowReturnToStartState,
- d = !1,
- h = s.hideModalContainer(),
- v = e.termId,
- m = o.iframeId,
- t.waitCall('refreshUserToken', function () {
- tp.gigya.login()
- }),
- !1
- }
- } else if (tp.pianoId.isConfigured()) {
- if (typeof e.loginRequired == 'undefined' || !e.loginRequired) e.loginRequired = function (e) {
- if (e.preventExternalLogin) return;
- return v = e.termId,
- m = o.iframeId,
- tp.pianoId.show({
- displayMode: 'modal',
- screen: e.startScreen
- }),
- !1
- };
- F(),
- o.pianoIdUrl = tp.pianoId.getIframeUrl();
- var p = tp.pianoId.getLang();
- p && (o.lang = p),
- tp.pianoId.onLangChange(function (e) {
- n.send('langChanged', {
- lang: e
- }, o.iframeId)
- })
- }
- o.userProvider = r.getProvider().getName(),
- e.userToken ? o.userToken = e.userToken : o.userToken = r.getProvider().getToken() && r.getProvider().getToken().length > 0 ? r.getProvider().getToken() : '',
- t.getCampaigns(o),
- o.customCookies = JSON.stringify(t.getCustomCookies()),
- b.registerCallback(e, o.iframeId),
- o.hasLoginRequiredCallback = b.hasIframeCallback('loginRequired', o.iframeId) || f;
- var y = e.iframeUrl ? e.iframeUrl : o.isCheckout ? E() : w(),
- x = e.postMessageUrl ? e.postMessageUrl : w(),
- T = D(o, e),
- k = s.createContainer({
- url: y,
- config: e,
- parent: e.parent,
- postMessageUrl: x,
- receive: S,
- iframeParams: o,
- singleContainer: e.singleContainer,
- close: function () {
- b.fireCallbacks('close', {
- state: c
- }, o.iframeId, !0)
- }
- });
- return k.statParams = T,
- a.push(k),
- k
- }
- function D(t, n) {
- var r = {
- };
- if (n.trackStatsOnShow) return r;
- var i = [
- 'tbc',
- 'trackingId',
- 'pageViewId',
- 'visitId',
- 'tags',
- 'contentCreated',
- 'contentSection',
- 'contentAuthor'
- ];
- return e.each(i, function (e, n) {
- t[n] && (r[n] = t[n], delete t[n])
- }),
- e.each(t, function (e, n) {
- e.indexOf('tpcc_') === 0 && (r[e] = n, delete t[e])
- }),
- r
- }
- function P(e) {
- var t = H(e.iframeParams, e.statParams);
- n.send('trackStat', t, e.iframeId)
- }
- function H(t, n) {
- var r = {
- };
- return e.each(t, function (e, t) {
- r[e] = t
- }),
- e.each(n, function (e, t) {
- r[e] = t
- }),
- r
- }
- function B() {
- y || (tp.gigya.registerCallback('userChanged', function (e) {
- if (e && e.user_token) {
- var t = {
- token_list: e.access_token.value,
- user_token: e.user_token,
- userToken: e.user_token,
- cookie_domain: e.access_token.cookie_domain,
- user: e.user,
- allowReturnToStartState: g,
- termId: v
- };
- if (m) {
- var r = s.getIframe(m);
- r ? (n.send('externalLoginSuccess', t, m), delete t.termId, J(t, m)) : J(t)
- } else J(t)
- }
- }), tp.gigya.registerCallback('logout', function () {
- var e = {
- };
- e.userProvider = r.getProvider().getName(),
- e.userToken = r.getProvider().getToken() && r.getProvider().getToken().length > 0 ? r.getProvider().getToken() : '',
- e.noNeedStartCheckout = !0;
- var t = s.getIframe(m);
- t && t.config.displayMode == 'inline' && s.closeModalContainer(),
- v = null,
- m = null,
- g = !1,
- J(e)
- }), y = !0)
- }
- function j() {
- y || (tp.janrain.registerCallback('userChanged', function (e) {
- if (e && e.user_token) {
- var t = {
- token_list: e.access_token.value,
- user_token: e.user_token,
- userToken: e.user_token,
- cookie_domain: e.access_token.cookie_domain,
- user: e.user,
- allowReturnToStartState: g,
- termId: v
- };
- if (m) {
- var r = s.getIframe(m);
- r ? (n.send('externalLoginSuccess', t, m), delete t.termId, J(t, m)) : J(t)
- } else J(t)
- }
- }), tp.janrain.addEventHandler('onCaptureSessionEnded', function () {
- var e = {
- };
- e.userProvider = r.getProvider().getName(),
- e.userToken = r.getProvider().getToken() && r.getProvider().getToken().length > 0 ? r.getProvider().getToken() : '',
- e.noNeedStartCheckout = !0;
- var t = s.getIframe(m);
- t && t.config.displayMode == 'inline' && s.closeModalContainer(),
- v = null,
- m = null,
- g = !1,
- J(e)
- }), y = !0)
- }
- function F() {
- y || (tp.pianoId.setCallbacks({
- loggedIn: function (e) {
- var t = {
- user_token: e.token,
- userToken: e.token,
- user: e.user,
- reloadAfterLogin: !0,
- termId: v
- };
- if (m) {
- var r = s.getIframe(m);
- r ? (n.send('externalLoginSuccess', t, m), $(m, t), delete t.termId, J(t, m)) : J(t)
- } else J(t)
- },
- loggedOut: function (e) {
- if (e.source !== p) {
- var t = {
- };
- t.userProvider = r.getProvider().getName(),
- t.userToken = r.getProvider().getToken() && r.getProvider().getToken().length > 0 ? r.getProvider().getToken() : '',
- t.noNeedStartCheckout = !0,
- J(t)
- }
- v = null,
- m = null
- }
- }), y = !0)
- }
- function I(e) {
- return s.showPreloadedContainer(e)
- }
- function K(t, n) {
- var r = {
- reloadAfterLogin: !0
- };
- return e.extend(r, t.config),
- r.singleContainer && delete r.singleContainer,
- n.termId && (r.termId = n.termId),
- n.startScreen && (r.startScreen = n.startScreen),
- n.isRedemption && (r.isRedemption = n.isRedemption, r.voucherCode = n.redemption && n.redemption.form && n.redemption.form.redeemCode, r.termId = null),
- n && n.currentState && t.config.displayMode == 'modal' && (r.allowReturnToStartState = !0),
- n.preventExternalLogin && (r.preventExternalLogin = n.preventExternalLogin),
- r.displayMode = 'modal',
- r
- }
- var a = [
- ],
- f = {
- },
- l = 0,
- c = 'close',
- h = 10000,
- p = 'OFFER',
- d = !1,
- v = null,
- m = null,
- g = !1,
- y = !1,
- b = o.createEventManager(['complete',
- 'cancel',
- 'close',
- 'error',
- 'loginRequired',
- 'loginSuccess',
- 'loaded',
- 'customEvent',
- 'startCheckout',
- 'resize',
- 'onMeterExpired',
- 'onMeterActive',
- 'onAccessGranted',
- 'onShowOffer',
- 'pianoIdEvent']),
- w = function () {
- return tp.offerBaseUrl ? tp.offerBaseUrl : tp.getEndpointRoot() + '/checkout/offer/show'
- },
- E = function () {
- return tp.getEndpointRoot(!0) + '/checkout/offer/show'
- },
- S = function (i, o) {
- var a = s.getIframe(i.sender),
- f = !0;
- a && a.config && (f = !a.config.parent);
- switch (i.event) {
- case 'resize':
- i.params.iframeId === i.sender && (s.resizeIframe(a, i.params), a.config.displayMode === 'modal' && (i.params.closeButtonType === 'boilerplate' && s.hideCloseButton(a.container), s.centerIt(a.container)), n.send('afterResize', {
- }, a.iframeId)),
- b.fireCallbacks(i.event, i.params, i.sender, f);
- break;
- case 'startCheckout':
- i.params.width = null;
- if (i.displayMode === 'inline') {
- i.params.closeOnLogout = !0;
- var l = H(i.params, a.statParams);
- X(l, i.sender);
- break
- }
- b.fireCallbacks(i.event, i.params, i.sender, f);
- break;
- case 'loaded':
- i.params.iframeId == i.sender && (a.config.displayMode === 'modal' && (s.resizeIframe(a, i.params), a.config.isPreload || s.checkBackdropAndContainer(a.container)), a.config.displayMode === 'popup' && s.resizeIframe(a, i.params), !a.config.isPreload && !a.config.trackStatsOnShow && P(a), b.fireCallbacks(i.event, i.params, i.sender, f), a.config.displayMode === 'inline' && (a.containerReady ? s.resizeIframe(a, i.params) : s.operationWithContainer(a.iframeParams.containerSelector, function (t) {
- var n = e('#temp-inline-' + a.iframeId);
- t.html(n.html()),
- n.remove(),
- a.element = t.children('iframe'),
- a.containerReady = !0,
- s.resizeIframe(a, i.params)
- })), O(a.config), t.doneCall('offerCreate'));
- break;
- case 'downForMaintenance':
- s.resizeIframe(a, {
- width: 300,
- height: 200
- }),
- a.config.displayMode === 'modal' && (a.config.isPreload || s.checkBackdropAndContainer(a.container));
- break;
- case 'purge':
- o || (i && i.params && i.params.alreadyPurchased && (c = 'alreadyHasAccess'), i && i.params && i.params.completePayment && (c = 'checkoutCompleted'), s.purgeIframe(i.sender, a.config.parent), O(a.config));
- break;
- case 'close':
- o || (i && i.params && i.params.alreadyPurchased && (c = 'alreadyHasAccess'), i && i.params && i.params.completePayment && (c = 'checkoutCompleted'), t.hasQueryParamByName('voucher_code') && (c = 'voucherRedemptionCompleted'), s.closeContainer(i.sender, a.config.parent), O(a.config));
- break;
- case 'closeAndRefresh':
- var h = i.params;
- h ? window.location.assign(h) : window.location.reload(!0);
- break;
- case 'selectTerm':
- i && i.params && i.params.alreadyPurchased ? c = 'alreadyHasAccess' : c = 'close';
- break;
- case 'complete':
- if (typeof i.params.token_list != 'undefined') {
- var p = i.params.user_token;
- !p && r.isUserValid() && r.getProvider().name === 'pianoId' && (p = r.getProvider().getToken()),
- t.setAccessTokenListCookie({
- value: i.params.token_list,
- cookie_domain: i.params.cookie_domain
- }, p)
- }
- b.fireCallbacks(i.event, i.params, i.sender, f),
- c = 'checkoutCompleted';
- break;
- case 'checkoutSelectTerm':
- case 'checkoutStateChange':
- case 'alreadyPurchased':
- case 'cancel':
- case 'error':
- case 'customEvent':
- b.fireCallbacks(i.event, i.params, i.sender, f);
- break;
- case 'loginRequired':
- d = !0,
- b.fireCallbacks(i.event, K(a, i.params), i.sender, f);
- break;
- case 'logout':
- x(i.event, i.params, i.sender, a.config.parent, f);
- break;
- case 'loginSuccess':
- T(i.event, i.params, i.sender, f);
- break;
- case 'inputFocus':
- e('tp-modal').css('z-index', 300051).css('z-index', 300050);
- break;
- case 'inputBlur':
- e('tp-modal').css('z-index', 300051).css('z-index', 300050);
- break;
- case 'getLocation':
- i.params && i.params.resultCallbackId && (i.params.result = window.location.href, n.send('resultCallback', i.params, i.sender));
- break;
- case 'setLocationHash':
- i.params && i.params.hash && (window.location.hash = i.params.hash);
- break;
- case 'langChangedWithinOffer':
- tp.pianoId.isConfigured() && tp.pianoId.updateLang(i.params.lang);
- break;
- case 'loginStart':
- u.disable();
- break;
- case 'loginEnd':
- u.enable();
- break;
- case 'pianoIdEvent':
- i.params.iframeId === i.sender && tp.pianoId.__protected__.offerMessageReceiver(i);
- break;
- default:
- t.debug('Received invalid event type: ' + i.event);
- return
- }
- },
- M = function (n) {
- c = 'close';
- if (typeof n.displayMode == 'undefined') n.displayMode = 'modal';
- else if (n.displayMode != 'modal' && n.displayMode != 'inline' && n.displayMode != 'popup') {
- t.log('Invalid offer displayMode; must be one of: modal, inline, popup'),
- O(n);
- return
- }
- if (n.displayMode === 'modal' && !n.isPreload && s.hasModalIframe()) {
- t.log('Modal offer is already shown; must be one modal offer per time'),
- O(n);
- return
- }
- var r;
- if (n.displayMode !== 'modal') {
- if (!n.isPreload) {
- var i;
- return e(n.containerSelector).each(function (e, t) {
- var r = H({
- }, n);
- r.singleContainer = t,
- i = _(r)
- }),
- i
- }
- var o = e(n.containerSelector).last();
- o && (r = o.length ? o[0] : undefined, n.singleContainer = r)
- }
- return _(n)
- },
- q = function (e) {
- var t = e.offerId === s.fakeOfferId ? 'showTemplate' : 'showOffer';
- b.hasCallback(t) && b.fireCallbacks(t, e, null, !0)
- },
- R = function (e) {
- if (!e.offerId && e.preview !== !0) {
- t.error('Must specify offerId');
- return
- }
- if (L(e)) return !1;
- A(e),
- setTimeout(function () {
- O(e)
- }, h),
- t.waitCall('refreshUserToken', function () {
- t.waitCall('refreshAccessTokenList', function () {
- t.waitCall('myAccountLogin', function () {
- t.startCall('offerCreate');
- var n = e.createIframeFn ? e.createIframeFn : M,
- r = n(e);
- if (!r) {
- t.doneCall('offerCreate'),
- t.error('Could not initialize offer; check configuration');
- return
- }
- z(e) && W(r.iframeId),
- q(e)
- })
- })
- })
- },
- U = function (n) {
- var r = e.Deferred(),
- i = r.promise(),
- s = e.Deferred(),
- o = {
- promise: i,
- show: function () {
- i.pipe(I).pipe(s.promise).then(function (e) {
- P(e),
- z(n) && W(e.iframeId),
- q(n)
- }, function () {
- delete n.isPreload,
- R(n)
- })
- }
- };
- return n.displayMode !== 'popup' && n.offerId ? t.waitCall('refreshAccessTokenList', function () {
- n.isPreload = !0,
- t.startCall('offerCreate');
- var e = n.createIframeFn ? n.createIframeFn : M,
- i = e(n);
- i ? (i.element.load(function () {
- s.resolve(i)
- }), r.resolve(i)) : (t.doneCall('offerCreate'), t.error('Could not initialize offer; check configuration'), r.reject())
- }) : r.reject(),
- o
- },
- z = function (e) {
- return !!e.directCheckout && e.displayMode !== 'inline'
- },
- W = function (e) {
- t.waitCall('offerCreate', function () {
- n.send('startDirectCheckout', {
- }, e)
- })
- },
- X = function (e, n) {
- s.closeModalContainer(),
- t.debug('creating checkout: ', e),
- e.displayMode = e.displayMode === 'popup' ? 'popup' : 'modal',
- e.isCheckout = !0,
- e.parent = n,
- t.waitCall('refreshUserToken', function () {
- t.waitCall('refreshAccessTokenList', function () {
- t.startCall('offerCreate');
- var n = M(e);
- n ? d && t.waitCall('offerCreate', function () {
- d = !1;
- var e = {
- };
- e.userProvider = r.getProvider().getName(),
- e.userToken = r.getProvider().getToken() && r.getProvider().getToken().length > 0 ? r.getProvider().getToken() : '',
- e.noNeedStartCheckout = !0,
- J(e, n.iframeId)
- }) : (t.doneCall('offerCreate'), t.error('Could not start checkout; check configuration'))
- })
- })
- },
- V = function (e, n) {
- s.closeModalContainer(),
- e || (e = {
- }),
- e.isRedemption = !0,
- t.debug('starting redeem voucher: ', e),
- e.displayMode = e.displayMode === 'popup' ? 'popup' : 'modal',
- e.isCheckout = !1,
- e.parent = n,
- t.waitCall('refreshAccessTokenList', function () {
- t.startCall('offerCreate'),
- M(e) || (t.doneCall('offerCreate'), t.error('Could not start redeem; check configuration'))
- })
- },
- $ = function (e, t) {
- n.send('reloadOffer', t, e)
- },
- J = function (e, t) {
- n.broadcast('reloadOffer', e, t)
- };
- return {
- name: 'offer',
- show: function (e) {
- e.displayMode === 'inline' ? s.operationWithContainer(e.containerSelector, function () {
- R(e)
- }) : R(e)
- },
- deferredShow: function (e) {
- return U(e)
- },
- close: function () {
- s.closeModalContainer()
- },
- startCheckout: function (e) {
- X(e)
- },
- startRedeemVoucher: function (e) {
- V(e)
- },
- createOfferIframe: function (e) {
- return M(e)
- },
- showBackdrop: function () {
- s.showBackdrop()
- },
- hideBackdrop: function () {
- s.hideBackdrop()
- },
- centerBackdrop: function (e) {
- s.centerBackdrop(e)
- },
- registerCallback: function (e, t) {
- b.addEvent(e),
- b.registerCallback(e, t)
- },
- reload: function (e, t) {
- $(e, t)
- }
- }
- }), tp.define('template', [
- 'jq',
- 'util',
- 'postmessage',
- 'containerUtils',
- 'user'
- ], function (e, t, n, r, i) {
- function s(e) {
- var t = tp.getEndpointRoot(!0) + '/checkout/template/show';
- return e.iframeUrl = t,
- e.postMessageUrl = t,
- tp.offer.createOfferIframe(e)
- }
- return {
- name: 'template',
- show: function (e) {
- return e.offerId = r.fakeOfferId,
- e.createIframeFn = s,
- e.trackStatsOnShow = !0,
- tp.offer.show(e)
- },
- deferredShow: function (e) {
- return e.offerId = r.fakeOfferId,
- e.createIframeFn = s,
- tp.offer.deferredShow(e)
- },
- close: function () {
- r.closeModalContainer()
- },
- createTemplateIframe: function (e) {
- return s(e)
- },
- showBackdrop: function () {
- r.showBackdrop()
- },
- hideBackdrop: function () {
- r.hideBackdrop()
- },
- centerBackdrop: function (e) {
- r.centerBackdrop(e)
- },
- registerCallback: function (e, t) {
- },
- refreshUser: function (e) {
- i.refreshAccessToken(!0, function () {
- n.send('externalLoginSuccess', {
- user_token: i.getProvider().getToken()
- }, e)
- })
- }
- }
- }), tp.define('myaccount', [
- 'jq',
- 'util',
- 'postmessage',
- 'offer',
- 'user',
- 'containerUtils',
- 'pianoId'
- ], function (e, t, n, r, i, s, o) {
- function m(t) {
- t.outerHeight() > e(window).height() ? (a == 0 && (t.css({
- position: 'absolute'
- }), a = !0), t.css({
- marginTop: e(window).scrollTop() - e(window).height() * 0.5
- })) : (a == 1 && (t.css({
- position: 'fixed'
- }), a = !1), t.css({
- marginTop: 0 - t.outerHeight() * 0.5
- })),
- r.centerBackdrop(t),
- t.css({
- marginLeft: 0 - t.outerWidth() * 0.5
- })
- }
- var u = {
- },
- a = !1,
- f = {
- loginRequired: [
- ],
- loginSuccess: [
- ]
- },
- l = function () {
- return tp.getEndpointRoot() + '/checkout/myaccount/show'
- },
- c = function () {
- var t = e(document.createElement('div')).addClass('tp-modal'),
- n = e(document.createElement('div')).addClass('tp-close');
- return n.on('click', _closeContainer),
- t.append(n),
- e('body').append(t),
- t
- },
- h = function (e, t) {
- e.element.css('height', (e.config.maxHeight ? Math.min(t.height, e.config.maxHeight) : t.height) + 'px'),
- e.container.css('height', (e.config.maxHeight ? Math.min(t.height, e.config.maxHeight) : t.height) + 'px'),
- e.config.displayMode == 'modal' && (e.element.css('width', t.width + 'px'), e.container.css('width', t.width + 'px')),
- n.send('resized', {
- height: e.config.maxHeight ? Math.min(t.height, e.config.maxHeight) : t.height,
- width: t.width
- }, e.iframeId)
- },
- p = null,
- d = function (t, n) {
- var i = e(document.createElement('div')).addClass('tp-modal'),
- s = e(document.createElement('div')).addClass('tp-close'),
- o = e(document.createElement('div')).addClass('tp-message');
- i.css('width', (t.width ? t.width : 400) + 'px'),
- o.html(t.message);
- var u = e(document.createElement('div')).addClass('tp-btn-container'),
- a = e(document.createElement('button')).addClass('tp-btn').addClass('tp-ok-btn');
- a.html(t.ok ? t.ok : 'Ok');
- var f = e(document.createElement('button')).addClass('tp-btn').addClass('tp-cancel-btn');
- f.html(t.cancel ? t.cancel : 'Cancel'),
- s.on('click', v(n, t, 'cancel')),
- f.on('click', v(n, t, 'cancel')),
- a.on('click', v(n, t, 'ok')),
- i.append(s),
- i.append(o),
- u.append(a),
- u.append(f),
- i.append(u),
- e('body').append(i),
- r.showBackdrop(),
- i.addClass('tp-active'),
- m(i),
- p = i
- },
- v = function (e, t, n) {
- return function () {
- p && (p.removeClass('tp-active'), r.hideBackdrop(), window.setTimeout(function () {
- p.remove()
- }, 250), t.result = n, e(t))
- }
- },
- g = function (e, t) {
- d(t.params, function (e) {
- n.send('closeDialog', e, u[t.sender].iframeId)
- })
- },
- y = function (e, t) {
- f[e] = f[e] || [
- ],
- f[e].push(t)
- },
- b = function (e, r, i) {
- t.debug('received event: ' + e, r);
- if (typeof f[e] == 'undefined') return;
- for (var s = 0; s < f[e].length; ++s) {
- t.debug('firing callback for event: ' + e);
- var o = f[e][s](r);
- r && r.resultCallbackId && (r.result = o, r.event = e, n.send('resultCallback', r, i))
- }
- !f[e].length && r && r.resultCallbackId && (r.callbackNotFound = !0, r.event = e, n.send('resultCallback', r, i))
- },
- w = function (e) {
- t.log('*** My account event received', e.event, e.params);
- switch (e.event) {
- case 'resize':
- t.debug('*** Resize event', e.params.width, e.params.height),
- h(u[e.sender], e.params),
- u[e.sender].config.displayMode == 'modal' && m(u[e.sender].container);
- break;
- case 'startCheckout':
- _startCheckout(e.params);
- break;
- case 'loaded':
- h(u[e.sender], e.params),
- u[e.sender].config.displayMode == 'modal' && (backdrop.show(), window.setTimeout(function () {
- backdrop.addClass('tp-active'),
- u[e.sender].container.addClass('tp-active'),
- m(u[e.sender].container)
- }, 25));
- break;
- case 'close':
- break;
- case 'cancel':
- case 'complete':
- case 'error':
- case 'loginRequired':
- case 'customEvent':
- b(e.event, e.params, e.sender);
- break;
- case 'openDialog':
- g(e.event, e);
- break;
- case 'pianoIdProfileUpdated':
- o.onProfileUpdate(e.params, function () {
- var t = e.params;
- t && t.resultCallbackId && n.send('resultCallback', t, e.sender)
- });
- break;
- case 'loginSuccess':
- i.getProvider().onLoginSuccess(e.params);
- var r = {
- reloadAfterLogin: !0,
- userToken: e.params.user_token,
- user: e.params.user
- };
- E(r),
- b(e.event, e.params, e.sender);
- break;
- case 'logout':
- i.logout(function () {
- var e = {
- };
- e.userProvider = i.getProvider().getName(),
- e.userToken = i.getProvider().getToken() && i.getProvider().getToken().length > 0 ? i.getProvider().getToken() : '',
- E(e)
- }),
- b(e.event, e.params, e.sender);
- break;
- case 'userProfileUpdateSuccess':
- var s = e,
- a = s.event,
- f = s.params,
- l = s.sender;
- i.getProvider().onLoginSuccess(f);
- var c = {
- userProvider: f.user_provider,
- userToken: f.user_token
- };
- E(c),
- b(a, f, l);
- for (var p in u) if (u.hasOwnProperty(p)) {
- var d = u[p],
- v = d.config;
- v.hasOwnProperty('userToken') && delete v.userToken,
- N(v)
- }
- break;
- case 'langChangedWithinMyAccount':
- tp.pianoId.isConfigured() && tp.pianoId.updateLang(e.params.lang);
- break;
- case 'downForMaintenance':
- h(u[e.sender], {
- width: 300,
- height: 200
- });
- break;
- default:
- t.log('Received invalid event type: ' + e.event);
- return
- }
- },
- E = function (e) {
- n.broadcast('reloadOffer', e)
- },
- S = function (n) {
- n.keyCode == 27 && e.map(u, t.mapArrayIndex).length > 0 && _closeContainer()
- },
- x = function () {
- for (var e in u) {
- var t = u[e],
- r = !1;
- t.container.width() != t.containerWidth && (t.element.css('width', t.container.width()), t.containerWidth = t.container.width(), r = !0),
- t.container.height() != t.containerHeight && (t.element.css('height', t.container.height()), t.containerHeight = t.container.height(), r = !0),
- r && n.send('resize', {
- width: t.container.width(),
- height: t.container.height()
- }, e)
- }
- },
- T = function (r) {
- var o = {
- };
- r.templateId && (o.templateId = r.templateId);
- if (typeof r.displayMode == 'undefined') r.displayMode = 'inline';
- else if (r.displayMode != 'modal' && r.displayMode != 'inline') {
- t.log('Invalid offer displayMode; must be one of: modal, inline');
- return
- }
- o.displayMode = r.displayMode,
- o.iframeId = t.randomString(16),
- o.url = window.location.href,
- o.initialWidth = r.width,
- o.initialHeight = r.height,
- o.maxHeight = r.maxHeight;
- if (tp.janrain.isConfigured() && (typeof r.loginRequired == 'undefined' || !r.loginRequired)) {
- var a = [
- ],
- h = r;
- tp.janrain.addEventHandler('onModalClose', function () {
- s.activateContainers(a),
- t.doneCall('myAccountLogin')
- }),
- tp.janrain.registerCallback('userChanged', function (e) {
- if (e && e.user_token) {
- var t;
- r.loginSuccess && (t = r.loginSuccess(e));
- if (typeof t == 'undefined' || t) h.userToken = e.user_token,
- N(h)
- }
- }),
- tp.janrain.addEventHandler('onCaptureSessionEnded', function (e) {
- var t;
- r.loginSuccess && (t = r.loginSuccess(e));
- if (typeof t == 'undefined' || t) h.userToken = null,
- N(h)
- }),
- r.loginRequired = function () {
- return t.waitCall('refreshAccessTokenList', function () {
- t.waitCall('offerCreate', function () {
- t.startCall('myAccountLogin'),
- a = s.hideModalContainer(),
- tp.janrain.login()
- })
- }),
- !1
- }
- } else if (tp.gigya.isConfigured() && (typeof r.loginRequired == 'undefined' || !r.loginRequired)) {
- var a = [
- ];
- tp.gigya.registerCallback('onHide', function () {
- s.activateContainers(a),
- t.doneCall('myAccountLogin')
- }),
- r.loginRequired = function (e) {
- var n = r;
- t.waitCall('refreshAccessTokenList', function () {
- t.waitCall('offerCreate', function () {
- t.startCall('myAccountLogin'),
- a = s.hideModalContainer(),
- tp.gigya.login(function (e) {
- var t;
- r.loginSuccess && (t = r.loginSuccess(e));
- if (typeof t == 'undefined' || t) n.userToken = e.user_token,
- N(n)
- })
- })
- })
- }
- } else if (tp.pianoId.isConfigured()) {
- var h = r;
- tp.pianoId.setCallbacks({
- loggedIn: function (e) {
- if (o.userToken === e.token) return;
- var t;
- r.loginSuccess && (t = r.loginSuccess(e));
- if (typeof t == 'undefined' || t) h.userToken = e.token,
- N(h)
- },
- loggedOut: function () {
- var e = {
- };
- e.userProvider = i.getProvider().getName(),
- e.userToken = i.getProvider().getToken() && i.getProvider().getToken().length > 0 ? i.getProvider().getToken() : '',
- E(e)
- }
- });
- if (typeof r.loginRequired == 'undefined' || !r.loginRequired) {
- var p = 0;
- r.loginRequired = function (e) {
- p++;
- if (p > 10) {
- t.log('Too many attemps to login for myAccount');
- return
- }
- tp.pianoId.show({
- displayMode: 'modal'
- })
- }
- }
- o.pianoIdUrl = tp.pianoId.getIframeUrl();
- var d = tp.pianoId.getLang();
- d && (o.lang = d),
- tp.pianoId.onLangChange(function (e) {
- n.send('langChanged', {
- lang: e
- }, o.iframeId)
- })
- }
- var v = e.Deferred();
- return t.waitCall('refreshUserToken', function () {
- var s;
- if (r.displayMode == 'inline') {
- if (!r.containerSelector) {
- t.log('My account must have a valid containerSelector');
- return
- }
- if (e(r.containerSelector).length == 0) {
- t.log('My account must have a valid containerSelector');
- return
- }
- s = e(r.containerSelector),
- o.width = s.width()
- } else s = c();
- o.userProvider = i.getProvider().getName(),
- r.userToken ? o.userToken = r.userToken : o.userToken = i.getProvider().getToken();
- for (var a in f) typeof r[a] == 'function' && (t.debug('Registering ' + a + ' callback for iframe ' + o.iframeId), y(a, r[a]));
- o.aid = tp.aid;
- var h = l() + '?' + e.param(o, !0),
- p = e(document.createElement('iframe'));
- p.attr('scrolling', 'no'),
- p.attr('allowtransparency', 'true'),
- p.css('overflow', 'hidden'),
- p.css('border', '0'),
- p.css('height', '0px'),
- p.attr('src', h),
- p.attr('id', o.iframeId),
- r.displayMode == 'inline' ? p.css('width', o.width + 'px') : p.css('width', '0px'),
- u[o.iframeId] = {
- iframeId: o.iframeId,
- config: r,
- element: p,
- container: s,
- containerWidth: s.width(),
- containerHeight: s.height()
- },
- n.init({
- postMessageUrl: l(),
- receive: w,
- iframe: u[o.iframeId]
- }),
- e(window).on('keyup', S),
- r.displayMode == 'modal' && e(window).resize(function () {
- m(s)
- }.bind(this)),
- r.displayMode == 'modal' ? (m(s), s.append(p)) : s.html(p),
- e(window).resize(x),
- tp.offer && tp.offer.registerCallback('complete', function () {
- n.send('refreshNow', {
- }, o.iframeId)
- }),
- v.resolve(u[o.iframeId])
- }),
- v.promise()
- },
- N = function (e) {
- t.waitCall('offerCreate', function () {
- t.waitCall('refreshAccessTokenList', function () {
- T(e).then(function (e) {
- e || t.log('Could not initialize my account; check configuration')
- })
- })
- })
- };
- return {
- name: 'myaccount',
- show: function (e) {
- N(e)
- },
- registerCallback: function (e, t) {
- y(e, t)
- }
- }
- }), tp.define('require-css/css', [
- ], function () {
- if (typeof window == 'undefined') return {
- load: function (e, t, n) {
- n()
- }
- };
- var e = document.getElementsByTagName('head') [0],
- t = window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)/) || 0,
- n = !1,
- r = !0;
- t[1] || t[7] ? n = parseInt(t[1]) < 6 || parseInt(t[7]) <= 9 : t[2] ? r = !1 : t[4] && (n = parseInt(t[4]) < 18);
- var i = {
- };
- i.pluginBuilder = './css-builder';
- var s,
- o,
- u = function () {
- s = document.createElement('style'),
- e.appendChild(s),
- o = s.styleSheet || s.sheet
- },
- a = 0,
- f = [
- ],
- l,
- c = function (e) {
- a++,
- a == 32 && (u(), a = 0),
- o.addImport(e),
- s.onload = function () {
- h()
- }
- },
- h = function () {
- l();
- var e = f.shift();
- if (!e) {
- l = null;
- return
- }
- l = e[1],
- c(e[0])
- },
- p = function (e, t) {
- (!o || !o.addImport) && u();
- if (o && o.addImport) l ? f.push([e,
- t]) : (c(e), l = t);
- else {
- s.textContent = '@import "' + e + '";';
- var n = setInterval(function () {
- try {
- s.sheet.cssRules,
- clearInterval(n),
- t()
- } catch (e) {
- }
- }, 10)
- }
- },
- d = function (t, n) {
- var i = document.createElement('link');
- i.type = 'text/css',
- i.rel = 'stylesheet';
- if (r) i.onload = function () {
- i.onload = function () {
- },
- setTimeout(n, 7)
- };
- else var s = setInterval(function () {
- for (var e = 0; e < document.styleSheets.length; e++) {
- var t = document.styleSheets[e];
- if (t.href == i.href) return clearInterval(s),
- n()
- }
- }, 10);
- i.href = t,
- e.appendChild(i)
- };
- return i.normalize = function (e, t) {
- return e.substr(e.length - 4, 4) == '.css' && (e = e.substr(0, e.length - 4)),
- t(e)
- },
- i.load = function (e, t, r, i) {
- (n ? p : d) (t.toUrl(e + '.css'), r)
- },
- i
- }), tp.define('util', [
- 'jq'
- ], function (e) {
- function h(e) {
- var t = '';
- try {
- for (var n = 0; n < e.length; n++) try {
- t += JSON.stringify(e[n]) + ', '
- } catch (r) {
- t += '' + r
- }
- return e = [
- t
- ]
- } catch (r) {
- return e
- }
- }
- function A(e) {
- return tp.useAidSpecifiedCookies && tp.aid ? e + '_' + tp.aid : e
- }
- function O() {
- var e = A('__ut'),
- t = o(e);
- if (typeof t != 'undefined' && t && t.length >= 0) return t
- }
- function M() {
- return - Math.round((new Date).getTimezoneOffset())
- }
- function _() {
- if (t === undefined || t === null) t = pt('__pat');
- return t || 0
- }
- function D(e) {
- t = e,
- dt('__pat', t, {
- path: '/',
- expires: 30
- })
- }
- function P(e) {
- e.browser && e.browser.app_timezone_offset !== undefined ? D(e.browser.app_timezone_offset) : e.timezone_offset !== undefined && D(e.timezone_offset)
- }
- function H(t) {
- var n = u(/^tpcc_.+/);
- e.each(n, function (e, n) {
- t[n.name] = n.value
- })
- }
- function B() {
- var t = {
- },
- n = u(/^_pc_.+/);
- return e.each(n, function (e, n) {
- t[decodeURIComponent(n.name)] = n.value
- }),
- t
- }
- function j() {
- var e = [
- ];
- e.push(document.domain);
- var t = document.domain.split('.');
- while (t.length >= 2) e.push('.' + t.join('.')),
- t.shift();
- return e
- }
- function F(t) {
- var r = pt(t);
- return e.type(r) === 'boolean' || e.type(r) === 'string' && r.length ? r === !0 || r === 'true' ? n.ENABLED : n.DISABLED : n.NOT_DETECTED
- }
- function I() {
- var e = pt('__pnahc'),
- t = !1;
- return typeof e == 'undefined' && (e = '0', t = !0),
- {
- cookieValue: parseInt(e, 10),
- isFirst: t
- }
- }
- function q(e, t) {
- e <<= 1,
- t === n.ENABLED ? e |= 1 : e &= - 2,
- t !== n.NOT_DETECTED && dt('__pnahc', e + '', {
- path: '/',
- expires: 90
- })
- }
- function R(e) {
- var t = e >> 0 & 1;
- return t === 1
- }
- function U() {
- var e = n.NOT_DETECTED,
- t = I();
- return tp.adblockerCookieName && (e = F(tp.adblockerCookieName)),
- e === n.NOT_DETECTED && (e = F('__pac')),
- e === n.NOT_DETECTED && (e = F('__adblocker')),
- q(t.cookieValue, e),
- e === n.ENABLED && (t.isFirst || R(t.cookieValue) || (e = n.ENABLED_AFTER_DISABLED)),
- e
- }
- function z() {
- var e = '';
- return typeof window['blockAdBlock'] != 'undefined' ? e = '1' : e = '0',
- e
- }
- function X(e) {
- return !!W[e]
- }
- function V(e, t) {
- W[e] ? W[e].waiters.push(t) : t()
- }
- function $(e) {
- W[e] ? W[e].counter++ : W[e] = {
- counter: 1,
- waiters: [
- ]
- }
- }
- function J(e, t) {
- W[e] && (W[e].counter--, W[e].counter <= 0 && (W[e].waiters.forEach(function (e) {
- e(t !== undefined ? t : {
- })
- }), delete W[e]))
- }
- function K(e) {
- if (typeof e == 'undefined' || e.length == 0) return;
- typeof e != 'string' && (e = '' + e),
- e = e.trim();
- if (e.match(/^[0-9]{0,10}$/)) return parseInt(e);
- if (e.match(/^[0-9]{13,}$/)) return parseInt(e) / 1000;
- var t = Date.parse(e);
- if (t) return t / 1000;
- e = e.replace(/00:([0-9]{2}(:[0-9]{2})?\s*[AP]M)/i, '12:$1').replace(/([0-9]{2})([AP|M])/i, '$1 $2'),
- e = e.replace(/\s*(at|@|\-|on|\|)\s*/gi, ' '),
- e = e.replace(/\s*(mon(day)?|tue(s?day)?|wed(nesday)?|thu((rs)?day)?|fri(day)?|sat(urday)?|sun(day)?)\s*/gi, ''),
- e = e.replace(/([0-9]{1,2})(st|nd|rd|th)/, '$1'),
- e.match(/\s+ET$/) && (d.getTimezoneOffset() == 240 ? e = e.replace(/\s+ET$/, ' EDT') : e = e.replace(/\s+ET$/, ' EST')),
- e = e.trim();
- var t;
- t = Date.parse(e);
- if (t) return t / 1000;
- if (m = e.match(/!^([a-z]+)[-/ ]([0-9]+)[-/ ]([0-9]+)(.*)$!i/)) e = m[2] + ' ' + m[1] + ' ' + m[3] + m[4];
- else if (m = e.match(/!^([0-9]+)[-/ ]([a-z]+)[-/ ]([0-9]+)(.*)$!i/)) e = m[1] + ' ' + m[2] + ' ' + m[3] + m[4];
- t = Date.parse(e);
- if (t) return t / 1000
- }
- function Q() {
- var e = navigator.userAgent || navigator.vendor || window.opera;
- return /iPad|iPhone|iPod/.test(e) && !window.MSStream
- }
- function G() {
- var e = navigator.userAgent || navigator.vendor || window.opera;
- return /iPhone/.test(e) && !window.MSStream
- }
- function Y() {
- var e = navigator.userAgent || navigator.vendor || window.opera;
- return /(iPhone|iPod|iPad).*AppleWebKit/i.test(e)
- }
- function Z(e) {
- return e ? (e = e.replace(/^((%20)|\s)+/, ''), e = encodeURI(decodeURI(e)), e = e.replace(/^([^#]*)(#)(.*)$/, function (e, t, n, r) {
- return t + n + r.replace(/#/g, '%23')
- }), e) : ''
- }
- function et(e) {
- var t = parseInt(e, 10);
- return !(isNaN(parseFloat(t)) || t < 0 || t > 255)
- }
- function tt(e) {
- var t = e.split('.'),
- n = !0;
- if (t.length === 4) {
- if (!et(t[0]) || !et(t[1]) || !et(t[2]) || !et(t[3])) n = !1
- } else n = !1;
- return n
- }
- function nt(e) {
- var t = document.createElement('a'),
- n = /^https?:\/\//i;
- return t.href = n.test(e) ? e : 'http://' + e,
- t.hostname
- }
- function rt(e, t, n) {
- var r;
- return function () {
- var i = this,
- s = Array.prototype.slice.call(arguments),
- o = function () {
- r = null,
- n || e.apply(i, s)
- },
- u = n && !r;
- clearTimeout(r),
- r = setTimeout(o, t),
- u && e.apply(i, s)
- }
- }
- function it(e, t) {
- function s() {
- if (n) {
- r = arguments,
- i = this;
- return
- }
- e.apply(this, arguments),
- n = !0,
- setTimeout(function () {
- n = !1,
- r && (s.apply(i, r), r = i = null)
- }, t)
- }
- var n = !1,
- r,
- i;
- return s
- }
- function st() {
- var e = (navigator && navigator.userAgent || '').toLowerCase(),
- t = e.match(/version\/(\d+).+?safari/);
- return t !== null
- }
- function ot() {
- var t = (navigator && navigator.appVersion || '').indexOf('MSIE') !== - 1,
- n = e.browser || {
- },
- r = n.mozilla && n.version === '11.0';
- return t || r
- }
- function ut(e) {
- return /\?voucher_code/.test(e) ? e.split('&').length > 1 ? e.replace(/voucher_code[^&]+&?/gi, '') : e.replace(/\?voucher_code[^&]+&?/gi, '') : /&voucher_code/.test(e) ? e.replace(/&voucher_code[^&]+/gi, '') : e
- }
- function at(e) {
- if (e && e.length && e[0] === '.') return e;
- var t = e || window.location.href,
- n = nt(t);
- return tt(n) ? n : n === 'localhost' ? null : '.' + n
- }
- function ft(e, t) {
- try {
- var n = new Error,
- r = tp.user.getProvider().getName(),
- i = JSON.stringify({
- aid: tp.aid,
- description: 'clearing __tp cookie',
- userProvider: r,
- accessTokenList: e,
- userToken: t,
- url: window.location.href,
- trace: n.stack
- });
- tp.api.callApi('/anon/error/log', {
- log_message: i
- })
- } catch (s) {
- }
- }
- function lt(e) {
- try {
- var t = new Error,
- n = tp.user.getProvider().getName(),
- r = JSON.stringify({
- aid: tp.aid,
- description: 'clearing __utp cookie',
- userProvider: n,
- userToken: e,
- url: window.location.href,
- trace: t.stack
- });
- tp.api.callApi('/anon/error/log', {
- log_message: r
- })
- } catch (i) {
- }
- }
- function ct(e) {
- var t = function () {
- document.removeEventListener('DOMContentLoaded', t),
- window.removeEventListener('load', t),
- e()
- };
- document.readyState === 'complete' || document.readyState !== 'loading' && !document.documentElement.doScroll ? window.setTimeout(e) : (document.addEventListener('DOMContentLoaded', t), window.addEventListener('load', t))
- }
- function ht(e) {
- e || (e = 730);
- var t = tp.getMaxCookieExpirationInDays();
- if (t !== null) {
- var n;
- typeof e == 'number' ? (n = new Date, n.setDate(n.getDate() + e)) : n = e;
- var r = new Date;
- r.setDate(r.getDate() + t);
- if (n > r) return t
- }
- return e
- }
- function pt(t) {
- return e.cookie(t)
- }
- function dt(t, n, r) {
- r && r.expires && (r.expires = ht(r.expires)),
- e.cookie(t, n, r)
- }
- function vt() {
- var e = w('redirect_uri');
- return e.indexOf('https://www.facebook.com/subscriptions/account-linking/confirm/') === 0
- }
- function mt() {
- var e = [
- '__webdriver_evaluate',
- '__selenium_evaluate',
- '__webdriver_script_function',
- '__webdriver_script_func',
- '__webdriver_script_fn',
- '__fxdriver_evaluate',
- '__driver_unwrapped',
- '__webdriver_unwrapped',
- '__driver_evaluate',
- '__selenium_unwrapped',
- '__fxdriver_unwrapped'
- ],
- t = [
- '_phantom',
- '__nightmare',
- '_selenium',
- 'callPhantom',
- 'callSelenium',
- '_Selenium_IDE_Recorder'
- ];
- for (var n in t) {
- var r = t[n];
- if (window[r]) return !0
- }
- for (var i in e) {
- var s = e[i];
- if (window.document[s]) return !0
- }
- for (var o in window.document) if (o.match(/\$[a-z]dc_/) && window.document[o].cache_) return !0;
- return window.external && window.external.toString && window.external.toString() && window['external'].toString() ['indexOf']('Sequentum') != - 1 ? !0 : window.document.documentElement.getAttribute('selenium') ? !0 : window.document.documentElement.getAttribute('webdriver') ? !0 : window.document.documentElement.getAttribute('driver') ? !0 : !1
- }
- function mt() {
- var e = [
- '__webdriver_evaluate',
- '__selenium_evaluate',
- '__webdriver_script_function',
- '__webdriver_script_func',
- '__webdriver_script_fn',
- '__fxdriver_evaluate',
- '__driver_unwrapped',
- '__webdriver_unwrapped',
- '__driver_evaluate',
- '__selenium_unwrapped',
- '__fxdriver_unwrapped'
- ],
- t = [
- '_phantom',
- '__nightmare',
- '_selenium',
- 'callPhantom',
- 'callSelenium',
- '_Selenium_IDE_Recorder'
- ];
- for (var n in t) {
- var r = t[n];
- if (window[r]) return !0
- }
- for (var i in e) {
- var s = e[i];
- if (window.document[s]) return !0
- }
- for (var o in window.document) if (o.match(/\$[a-z]dc_/) && window.document[o].cache_) return !0;
- return window.external && window.external.toString && window.external.toString() && window['external'].toString() ['indexOf']('Sequentum') != - 1 ? !0 : window.document.documentElement.getAttribute('selenium') ? !0 : window.document.documentElement.getAttribute('webdriver') ? !0 : window.document.documentElement.getAttribute('driver') ? !0 : !1
- }
- var t,
- n = {
- ENABLED_AFTER_DISABLED: - 2,
- NOT_DETECTED: - 1,
- DISABLED: 0,
- ENABLED: 1
- };
- typeof 'testString'.toHex == 'undefined' && Object.defineProperty(String.prototype, 'toHex', {
- enumerable: !1,
- value: function () {
- var e = '';
- for (var t = 0; t < this.length; ++t) e += '' + this.charCodeAt(t).toString(16);
- return e
- }
- });
- var r = function (e) {
- e || (e = 5);
- var t = '',
- n = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
- if (window.crypto && window.crypto.getRandomValues && typeof Uint32Array == 'function') {
- var r = new Uint32Array(e);
- window.crypto.getRandomValues(r);
- for (var i = 0; i < e; i++) t += n.charAt(r[i] % n.length)
- } else for (var i = 0; i < e; i++) t += n.charAt(Math.floor(Math.random() * n.length));
- return t
- },
- i = function (t, n) {
- var r = {
- path: '/',
- expires: 0
- };
- typeof n != 'undefined' && (r.domain = n),
- e.removeCookie(t, r)
- },
- s = function (e, t) {
- t.indexOf('abril.com.br') !== - 1 && i(e, '.abril.com.br')
- },
- o = function (e) {
- if (document.cookie.length == 0) return null;
- var t = document.cookie.split(';');
- for (var n = 0; n < t.length; n++) {
- var r = t[n].indexOf('=');
- if (r !== - 1) {
- var i = t[n].substr(0, r).trim(),
- s;
- if (e instanceof RegExp && e.test(i)) {
- s = t[n].substr(r + 1).replace(/^\s+|\s+$/g, '');
- try {
- return decodeURIComponent(s)
- } catch (o) {
- a('Could not uri-decode cookie "' + e.toString() + '"', o)
- }
- return s
- }
- if (i == e) {
- s = t[n].substr(r + 1).replace(/^\s+|\s+$/g, '');
- try {
- return decodeURIComponent(s)
- } catch (o) {
- a('Could not uri-decode cookie "' + e.toString() + '"', o)
- }
- return s
- }
- }
- }
- return null
- },
- u = function (e) {
- if (document.cookie.length == 0) return [];
- var t = [
- ],
- n = document.cookie.split(';');
- for (var r = 0; r < n.length; r++) {
- var i = n[r].indexOf('=');
- if (i !== - 1) {
- var s = n[r].substr(0, i).trim(),
- o;
- if (e instanceof RegExp && e.test(s)) {
- o = n[r].substr(i + 1).replace(/^\s+|\s+$/g, '');
- try {
- o = decodeURIComponent(o)
- } catch (u) {
- a('Could not uri-decode cookie "' + e.toString() + '"', u)
- }
- t.push({
- name: s,
- value: o
- })
- } else if (s == e) {
- o = n[r].substr(i + 1).replace(/^\s+|\s+$/g, '');
- try {
- o = decodeURIComponent(o)
- } catch (u) {
- a('Could not uri-decode cookie "' + e.toString() + '"', u)
- }
- t.push({
- name: s,
- value: o
- })
- }
- }
- }
- return t
- },
- a = function () {
- tp.debug === !0 && l.apply(null, arguments)
- },
- f = function () {
- l.apply(null, arguments);
- var e;
- typeof arguments[0] == 'string' ? e = new Error(arguments[0]) : e = new Error,
- e.stack && l(e.stack)
- },
- l = function () {
- window.console || (window.console = {
- });
- if (!window.console.log) return;
- if (!window.console.log.apply) return;
- if (!window.console.log.apply.call) return;
- if (typeof window.console != 'undefined' && typeof window.console.log != 'undefined') {
- var e = [
- 'TP:'
- ];
- try {
- for (var t = 0; t < arguments.length; t++) e.push(arguments[t])
- } catch (n) {
- e = arguments
- }
- mt() && (e = h(e)),
- mt() && (e = h(e)),
- typeof window.console.log == 'object' ? window.console.log.apply.call(console.log, console, e) : console.log.apply(console, e)
- }
- },
- c = function () {
- var e = 0;
- return window.pageYOffset ? e = window.pageYOffset : (e = document.documentElement || document.body.parentNode, e = 'number' == typeof e.scrollTop ? e.scrollTop : document.body.scrollTop),
- e
- },
- p = function () {
- var e,
- t;
- return e = Math.max(document.documentElement.clientWidth, document.body.scrollWidth, document.documentElement.scrollWidth, document.body.offsetWidth, document.documentElement.offsetWidth),
- t = Math.max(document.documentElement.clientHeight, document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight),
- {
- x: e,
- y: t
- }
- },
- v = function () {
- var e,
- t;
- return 'CSS1Compat' === document.compatMode ? (e = document.documentElement.clientWidth, t = document.documentElement.clientHeight) : (e = document.body.clientWidth, t = document.body.clientHeight),
- {
- x: e,
- y: t
- }
- },
- g = function (e, t) {
- var n = c(),
- r = v();
- return r = {
- x: r.x / 2 - e / 2,
- y: r.y / 2 - t / 2 + n
- },
- r.x = Math.max(0, r.x),
- r.y = Math.max(10, r.y),
- r
- },
- y = function (e, t) {
- e = e || 0,
- t = t || 0;
- var n = window.screenLeft !== undefined ? window.screenLeft : window.screen.left,
- r = window.screenTop !== undefined ? window.screenTop : window.screen.top,
- i = window.innerWidth || document.documentElement.clientWidth || window.screen.width,
- s = window.innerHeight || document.documentElement.clientHeight || window.screen.height,
- o = i / 2 - e / 2 + n,
- u = s / 2 - t / 2 + r;
- return {
- left: o,
- top: u
- }
- },
- b = function (e) {
- var t = {
- };
- return location.search.substr(1).split('&').forEach(function (e) {
- var n = e.split('='),
- r = n[0],
- i = n[1] && decodeURIComponent(n[1]);
- r in t ? t[r].push(i) : t[r] = [
- i
- ]
- }),
- t.hasOwnProperty(e)
- },
- w = function (e) {
- e = e.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
- var t = new RegExp('[\\?&]' + e + '=([^&#]*)'),
- n = t.exec(location.search);
- return n === null ? '' : decodeURIComponent(n[1].replace(/\+/g, ' '))
- },
- E = function (e, t) {
- var n,
- r = e.split('#'),
- i = r[0].split('?');
- r.length >= 2 && (n = r[1]);
- if (i.length >= 2) {
- var s = encodeURIComponent(t) + '=',
- o = i[1].split(/[&;]/g);
- for (var u = o.length; u-- > 0; ) o[u].lastIndexOf(s, 0) !== - 1 && o.splice(u, 1);
- return e = i[0] + (o.length > 0 ? '?' + o.join('&') : ''),
- n ? e + '#' + n : e
- }
- return e
- },
- S = function (e) {
- var t = E(location.href, e);
- history && typeof history.replaceState == 'function' ? history.replaceState({
- }, document.title, t) : location.href = t
- },
- x = function (t, n, r) {
- var s = A('__ut');
- if (t && e.type(t.value) == 'string') {
- var o = new Date,
- u = {
- path: '/',
- expires: 730
- };
- t.cookie_domain && t.cookie_domain != 'localhost' && e.inArray(t.cookie_domain, j()) >= 0 && (u.domain = t.cookie_domain),
- dt('__tac', t.value, u),
- dt('__tae', o.getTime(), u),
- dt(s, n, u),
- n === '' && !r && ft(t, n)
- } else {
- var a = j();
- for (var f in a) i('__tac', a[f]),
- i('__tae', a[f]),
- i(s, a[f]);
- i('__tac'),
- i('__tae'),
- i(s),
- r || ft(t, n)
- }
- },
- T = function (e) {
- typeof e.browser != 'undefined' && typeof e.browser.cookie_domain != 'undefined' && J('domainIsReceived', e.browser.cookie_domain),
- e.tbc && e.tbc.cookie_domain && J('domainIsReceived', e.tbc.cookie_domain)
- },
- N = function (e) {
- try {
- return JSON.parse(pt(e)).domain
- } catch (t) {
- $('domainIsReceived')
- }
- },
- C = function (e) {
- if (typeof e.browser != 'undefined' && typeof e.browser.tbc != 'undefined') {
- var t = {
- path: '/',
- expires: 730
- };
- e.browser.cookie_domain && (t.domain = e.browser.cookie_domain, s('__tbc', e.browser.cookie_domain)),
- i('__tbc'),
- dt('__tbc', e.browser.tbc, t)
- }
- if (e.tbc && e.tbc.cookie_value) {
- var t = {
- path: '/',
- expires: 730
- };
- e.tbc.cookie_domain && (t.domain = e.tbc.cookie_domain, s('__tbc', e.tbc.cookie_domain)),
- i('__tbc'),
- dt('__tbc', e.tbc.cookie_value, t)
- }
- },
- k = function () {
- return pt('__tbc')
- },
- L = function () {
- var e = w('tpcc');
- if (e) {
- var t = new Date,
- n = JSON.stringify({
- date: t.getTime()
- }),
- r = location.hostname.split('.').slice( - 2).join('.');
- /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(location.hostname) && (r = ''),
- r === 'localhost' && (r = ''),
- dt('tpcc_' + e, n, {
- path: '/',
- expires: 90,
- domain: r
- })
- }
- },
- W = {
- };
- return {
- name: 'util',
- __private__: {
- getAdjustedCookieExpiration: ht
- },
- __protected__: {
- deleteTLDCookieForSpecificDomains: s,
- documentReady: ct,
- getCookie: pt,
- setCookie: dt,
- cameFromFbSubscriptions: vt,
- logRemoveTokens: lt
- },
- randomString: function (e) {
- return r(e)
- },
- log: function () {
- l.apply(null, arguments)
- },
- debug: function () {
- a.apply(null, arguments)
- },
- error: function () {
- f.apply(null, arguments)
- },
- findCookieByName: function (e) {
- return o(e)
- },
- findCookiesByName: function (e) {
- return u(e)
- },
- removeVoucherCodeFromUrl: function (e) {
- return ut(e)
- },
- deleteCookie: function (e, t) {
- return i(e, t)
- },
- mapArrayIndex: function (e, t) {
- return t
- },
- getScroll: function () {
- return c()
- },
- getPageSize: function () {
- return p()
- },
- getViewport: function () {
- return v()
- },
- center: function (e, t) {
- return g(e, t)
- },
- centerScreen: function (e, t) {
- return y(e, t)
- },
- getQueryParamByName: function (e) {
- return w(e)
- },
- hasQueryParamByName: function (e) {
- return b(e)
- },
- removeQueryParamByName: function (e) {
- return S(e)
- },
- setAccessTokenListCookie: function (e, t, n) {
- return x(e, t, n)
- },
- setTpccCookies: function () {
- return L()
- },
- getCampaigns: function (e) {
- return H(e)
- },
- getCustomCookies: function () {
- return B()
- },
- ADBLOCKER_STATUS: n,
- getAdblockStatus: function () {
- return U()
- },
- getAdblockerStatusReason: function () {
- return z()
- },
- getAdblockerHistoryCookieInfo: function () {
- return I()
- },
- waitCall: function (e, t) {
- V(e, t)
- },
- startCall: function (e) {
- $(e)
- },
- doneCall: function (e, t) {
- J(e, t)
- },
- hasCall: X,
- debounce: rt,
- throttle: it,
- setTbcCookieFromResponse: function (e) {
- C(e)
- },
- getTbcCookie: function () {
- return k()
- },
- getAidSpecifiedName: function (e) {
- return A(e)
- },
- getUserTokenCookie: function () {
- return O()
- },
- setAppTimezoneOffsetFromResponse: function (e) {
- return P(e)
- },
- setAppTimezoneOffset: function (e) {
- return D(e)
- },
- getAppTimezoneOffset: function () {
- return _()
- },
- getBrowserTimezoneOffset: function () {
- return M()
- },
- str2timestamp: function (e) {
- return K(e)
- },
- getPossibleCookieDomains: function () {
- return j()
- },
- isMobileTabletIOs: function () {
- return Q()
- },
- isIphone: function () {
- return G()
- },
- isIOsUiWebView: function () {
- return Y()
- },
- isIE: function () {
- return ot()
- },
- prepareUrlParameter: function (e) {
- return Z(e)
- },
- getReferrer: function () {
- return document.referrer
- },
- getHostname: function (e) {
- return nt(e)
- },
- extractCookieDomain: function (e) {
- return at(e)
- },
- setCurrentDomainFromResponse: function (e) {
- return T(e)
- },
- getCurrentDomainFromCookie: function (e) {
- return N(e)
- },
- isBot: mt
- }
- }), tp.define('util', function () {
- }), tp.define('postmessage', [
- 'jq',
- 'util'
- ], function (e, t) {
- function m(e) {
- var t = s[e.event] || [
- ];
- t.forEach(function (t) {
- t(e)
- })
- }
- var n = {
- },
- r = {
- },
- i = [
- ],
- s = {
- },
- o = function (e) {
- return function () {
- var t = i.filter(function (t) {
- return t.recipient === e
- });
- i = i.filter(function (t) {
- return t.recipient !== e
- });
- for (var n = t.length; n--; ) {
- var r = t.pop();
- a(r.event, r.params, r.recipient)
- }
- }
- },
- u = function (e, n, s) {
- if (!(!d(s) || s in r)) {
- t.error('Cannot send message to unmanaged iframe: ' + s);
- return
- }
- r[s].element && (r[s].config.displayMode === 'popup' && r[s].element || r[s].config.displayMode != 'popup' && r[s].element && r[s].element.get(0).contentWindow ? a(e, n, s) : (i.push({
- event: e,
- params: n,
- recipient: s
- }), r[s].element.on('load', o(s))))
- },
- a = function (t, i, s) {
- var o,
- u = {
- },
- a = r[s].config.displayMode === 'popup' ? 'opener' : 'parent';
- u.sender = d(s) ? a : s,
- u.recipient = d(s) ? s : a,
- u.event = t,
- u.params = i;
- var f = r[s].element.get(0);
- f && f.contentWindow ? o = r[s].element.get(0).contentWindow : f && f.toString() === '[object Window]' ? o = r[s].element.get(0) : r[s].config.displayMode === 'popup' ? o = r[s].container : o = window[a],
- e.postMessage(JSON.stringify(u), n[s].postMessageUrl, o)
- },
- f = function (e) {
- e.keyCode === 27 && p(e.data.iframeId) && u('close', null, e.data.iframeId)
- },
- l = function (r, i) {
- c(r.iframe);
- if (!r.postMessageUrl) {
- t.error('Must specify postMessageUrl to send and receive postMessages');
- return
- }
- n[r.iframe.iframeId].initializedKeystrokeHandler || (n[r.iframe.iframeId].initializedKeystrokeHandler = !0, e(window).on('keyup', r.iframe, f)),
- n[r.iframe.iframeId].postMessageUrl = r.postMessageUrl,
- n[r.iframe.iframeId].initializedListener || (n[r.iframe.iframeId].initializedListener = !0, n[r.iframe.iframeId].receive = r.receive, e.receiveMessage(v));
- if (r.iframe.iframeId) {
- n[r.iframe.iframeId].iframeConfig = r;
- var s = i || {
- };
- s.height = e('html').outerHeight(),
- s.width = r.iframeParams && r.iframeParams.width ? r.iframeParams.width : e('html').outerWidth(),
- u('loaded', s, r.iframe.iframeId)
- }
- },
- c = function (e) {
- n[e.iframeId] = {
- iframeConfig: null,
- receive: null,
- postMessageUrl: null,
- initializedListener: !1,
- initializedKeystrokeHandler: !1
- },
- r[e.iframeId] = e
- },
- h = function (e) {
- delete r[e],
- delete n[e]
- },
- p = function (e) {
- return n[e] && n[e].iframeConfig ? !0 : !1
- },
- d = function (e) {
- return n[e] && n[e].iframeConfig ? !1 : !0
- },
- v = function (i) {
- var s,
- o = !1,
- u;
- try {
- s = JSON.parse(i.data)
- } catch (a) {
- try {
- s = e.deparam(i.data),
- s && (o = !0)
- } catch (a) {
- t.debug('Error parsing postMessage: ' + i.data);
- return
- }
- }
- m(s);
- if (o) {
- var f;
- for (var l in r) {
- u = r[l];
- if (!u.config.isCurtain) continue;
- f = !0,
- u.config.parent && n[u.config.parent].receive && n[u.config.parent].receive(s),
- n[l].receive && n[l].receive(s)
- }
- f || t.debug('Error parsing postMessage: ' + i.data);
- return
- }
- if (!(!d(s.sender) || !!s.sender && s.sender in r)) {
- t.debug('Received message from unmanaged iframe: ' + s.sender);
- return
- }
- t.debug((p(s.sender) ? 'iframe(' + s.recipient : 'the parent') + ') received event \'' + s.event + '\' from iframe(' + s.sender + ')', s),
- n[s.sender].receive && n[s.sender].receive(s);
- if (r[s.sender]) {
- u = r[s.sender];
- if (u.config.parent && n[u.config.parent].receive) {
- var c = !0;
- s.sender = u.config.parent,
- n[u.config.parent].receive(s, c)
- }
- }
- };
- return {
- name: 'postmessage',
- init: function (e, t) {
- l(e, t)
- },
- send: function (e, t, n) {
- u(e, t, n)
- },
- removeIframe: function (e) {
- h(e)
- },
- broadcast: function (e, t, n) {
- for (iframeId in r) {
- if (iframeId === n) continue;
- u(e, t, iframeId)
- }
- },
- subscribe: function (e, t) {
- s[e] = s[e] || [
- ],
- s[e].push(t)
- },
- unsubscribe: function (e, t) {
- if (!(s[e] instanceof Array)) return;
- s[e] = s[e].filter(function (e) {
- return e !== t
- })
- }
- }
- }), tp.define('postmessage', function () {
- }), tp.define('user', [
- 'api',
- 'util',
- 'jq',
- 'janrain',
- 'tinypassAccounts',
- 'condeUserProvider',
- 'gigya',
- 'pianoId'
- ], function (e, t, n, r, i, s, o, u) {
- var a = function () {
- function i(e) {
- t.setAccessTokenListCookie({
- value: e.token_list,
- cookie_domain: e.cookie_domain
- }, e.user_token)
- }
- var e = function () {
- return 'publisher_user_ref'
- },
- n = function () {
- if (!tp.userRef) return null;
- if (tp.userRef.constructor === ''.constructor) return tp.userRef;
- if (tp.userRef.constructor === {
- }.constructor) return '{jox}' + JSON.stringify(tp.userRef)
- },
- r = function () {
- return typeof tp.userRef != 'undefined' && tp.userRef && tp.userRef.length > 0 ? !0 : !1
- };
- return {
- getName: function () {
- return e()
- },
- getToken: function () {
- return n()
- },
- isUserValid: function () {
- return r()
- },
- onLoginSuccess: i,
- logout: function (e) {
- }
- }
- }(),
- f = function () {
- return tp.aid === 'B6sIXKLiin' ? u : r.isConfigured() ? r : i.isConfigured() ? i : s.isConfigured() ? s : o.isConfigured() ? o : u.isConfigured() ? u : a
- },
- l = function (n, r) {
- if (typeof r == 'undefined' || !r) r = function () {
- };
- var i = !1;
- if (typeof n != 'undefined' && n) i = !0;
- else {
- var s = t.__protected__.getCookie('__tae');
- if (typeof s == 'undefined' || !s) i = !0;
- else {
- var o = new Date(parseInt(s)),
- u = new Date;
- u.getTime() - o.getTime() > 86400000 && (i = !0)
- }
- }
- if (!i) {
- r(null);
- return
- }
- t.waitCall('refreshUserToken', function () {
- t.waitCall('offerCreate', function () {
- t.waitCall('experienceExecute', function () {
- if (!f().isUserValid()) {
- r('');
- return
- }
- t.startCall('refreshAccessTokenList'),
- e.callApi('/access/token/list', null, function (e) {
- t.doneCall('refreshAccessTokenList');
- if (typeof e.access_token_list == 'undefined') {
- r(null);
- return
- }
- t.setAccessTokenListCookie(e.access_token_list),
- r(e.access_token_list.value)
- })
- })
- })
- })
- },
- c = function (e) {
- var t = f().getName();
- if (t === 'tinypass_accounts') i.login(e);
- else if (t === 'piano_id') {
- var n = e || {
- };
- n.displayMode = 'modal',
- u.show(n)
- }
- },
- h = function () {
- return f().isUserValid()
- },
- p = function (e, t) {
- f().logout(e, t)
- },
- d = function (e) {
- if (typeof e == 'undefined' || !e) e = function () {
- };
- var t = f();
- typeof t.prepare == 'function' ? t.prepare().then(e, e) : e()
- };
- return {
- name: 'user',
- getProvider: function () {
- return f()
- },
- providerInit: function (e) {
- d(e)
- },
- refreshAccessToken: function (e, t) {
- l(e, t)
- },
- showLogin: function (e) {
- c(e)
- },
- isUserValid: function () {
- return h()
- },
- logout: function (e, t) {
- p(e, t)
- }
- }
- }), tp.define('user', function () {
- }), tp.define('meter', [
- 'jq',
- 'util',
- 'api',
- 'offer',
- 'eventUtils',
- 'main'
- ], function (e, t, n, r, i, s) {
- var o = function () {
- return tp.offerBaseUrl ? tp.offerBaseUrl : tp.endpoint ? tp.endpoint + '/../../' : tp.endpoint == 'sandbox' ? 'https://sandbox.tinypass.com/' : 'https://offers.tinypass.com/'
- },
- u = i.createEventManager(['onCheckoutSuccess',
- 'onMeterExpired',
- 'onMeterError',
- 'onAccessGranted',
- 'onMeterActive',
- 'onMeterInactive',
- 'meterSelector']),
- a = {
- state: 'ok',
- views_left: null,
- offer_id: '',
- curtain_template_id: '',
- reminder_template_id: '',
- cookie_name: '',
- cookie_value: '',
- cookie_expires: '',
- show_reminder: !1,
- show_close_button: !1
- },
- f = function () {
- return a.state && a.state == 'ex'
- },
- l = function () {
- return typeof a.views_left != 'undefined' && a.views_left == 0 ? !0 : !1
- },
- c = function (e) {
- e && h('onCheckoutSuccess', e)
- },
- h = function (e, n) {
- return u.fire(undefined, e, !0, n),
- S[e] && typeof S[e] == 'function' ? (t.debug('_customCaller called with ' + e), S[e](n)) : !0
- },
- p = function (t) {
- t = t || {
- },
- t.offerId || (t.offerId = a.offer_id),
- t.templateId || (t.templateId = a.curtain_template_id),
- t.displayMode || (t.displayMode = S.displayMode),
- t.containerSelector || (t.containerSelector = S.containerSelector),
- t.showCloseButton || (t.showCloseButton = a.show_close_button),
- e.type(S.close) == 'function' && (t.close = S.close),
- e.type(S.loginRequired) == 'function' && (t.loginRequired = S.loginRequired),
- e.type(S.customEvent) == 'function' && (t.customEvent = S.customEvent),
- e.type(S.onCheckoutSuccess) == 'function' && (t.complete = S.onCheckoutSuccess),
- r.createOfferIframe(t)
- },
- d = function (e) {
- t.debug('_handleExpired', e),
- h('onMeterExpired', e);
- if (e.track_page_view) {
- var n = h('onShowOffer', e);
- n && p()
- }
- },
- v = function (e) {
- t.debug('_handleMeterActive', e);
- if (e.show_reminder && e.reminder_template_id && e.track_page_view) {
- var n = h('onShowOffer', e);
- n && p({
- templateId: e.reminder_template_id
- })
- }
- h('onMeterActive', e)
- },
- m = function (e) {
- t.debug('_handleMeterInactive', e),
- h('onMeterInactive', e)
- },
- g = function (e) {
- t.debug('_handleAccessGranted', e),
- h('onAccessGranted', e)
- },
- y = function (e) {
- h('onMeterError', e)
- },
- b = function (e) {
- h('___onProcessMeter', e);
- if (!e.user_meter) {
- t.log('Could not load meter', e),
- y(e);
- return
- }
- a = e.user_meter;
- if (a && a.cookie_name && a.cookie_value && a.cookie_expires) {
- var n = {
- path: '/',
- expires: a.cookie_expires
- };
- a.cookie_domain && (n.domain = a.cookie_domain),
- t.__protected__.setCookie(a.cookie_name, a.cookie_value, n)
- }
- a.state === 'ok' ? v(a) : a.state === 'ap' ? g(a) : a.state === 'ia' ? m(a) : d(a)
- },
- w = function (e, r, i) {
- if (S.paywallId == null || S.paywallId == '') {
- t.debug('You must specify a paywallId in your configuration');
- return
- }
- var o = document.URL;
- e && typeof e.getAttribute == 'function' && e.getAttribute('href') ? o = e.getAttribute('href') : e && typeof e.attr == 'function' && e.attr('href') && (o = e.attr('href'));
- var u = S.trackPageview;
- u && delete S.trackPageview;
- var a = S.meterSelector();
- a || (a = '');
- var f = {
- paywall_id: S.paywallId,
- url: encodeURI(o),
- referer: encodeURI(S.referer),
- track_page_view: u,
- meter_name: a,
- pageview_id: s.fetchPageViewId()
- };
- r && (f.transaction_id = r),
- S.referer = '';
- var l = t.__protected__.getCookie('umc');
- if (l) f.umc = l;
- else {
- var c = t.__protected__.getCookie('umc_' + S.paywallId);
- c && (f.umc = c)
- }
- n.callApi('/anon/meter/load', f, function (e) {
- b(e),
- typeof i == 'function' && i()
- })
- },
- E = function (e) {
- if (typeof e == 'undefined') {
- t.error('Must specify paywall configuration to load Tinypass paywall');
- return
- }
- if (typeof e.paywallID == 'undefined' && typeof e.paywallId == 'undefined') {
- t.error('Must specify paywallId to load Tinypass paywall');
- return
- }
- typeof e.paywallId == 'undefined' && (e.paywallId = e.paywallID);
- for (var n in e) S[n] = e[n];
- S.referer = document.referrer,
- t.debug('Initializing paywall: ' + S.paywallId),
- w()
- },
- S = {
- paywallId: null,
- trackPageview: !0,
- trackExternalReferrer: !0,
- referer: document.referrer,
- offerURL: '',
- displayMode: 'modal',
- containerSelector: '',
- onCheckoutSuccess: function () {
- },
- onMeterExpired: function () {
- },
- onMeterError: function () {
- },
- onAccessGranted: function () {
- },
- onMeterActive: function () {
- },
- onMeterInactive: function () {
- },
- meterSelector: function () {
- }
- },
- x = {
- style: '<div> </div><style type="text/css"> .tpm-counter { position: fixed; padding: 30px; line-height: 60px; z-index: 99999; cursor: pointer; font-family: Arial, Helvetica, sans-serif; color: #fff; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .pos-1 { top: 0; bottom: auto; left: auto; right: 0; } .pos-2 { top: 0; bottom: auto; left: 0; right: auto; } .pos-3 { top: auto; bottom: 0; left: 0; right: auto; } .pos-4 { top: auto; bottom: 0; left: auto; right: 0; } .tpm-counter > div { display: block; } .tpm-ticker { background: #173c6f; -webkit-border-top-left-radius: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-topleft: 4px; -moz-border-radius-bottomleft: 4px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; text-align: center; float: left; position: relative; } .tpm-numeral { font-size: 36px; font-weight: 700; padding: 0 15px; } .tpm-shadow { background: #072850; opacity: 0.2; height: 30px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topleft: 4px; width: 100%; position: absolute; top: 0; z-index: 1; } .tpm-caption { float: left; background: url(\'//code.tinypass.com/images2/counter-middle.png\') #3b7ad9 repeat-x; padding: 0 15px; font-size: 20px; font-weight: 400; } .tpm-edge { height: 60px; width: 10px; float: left; background: url(\'//code.tinypass.com/images2/counter-edge.png\') no-repeat; } @media only screen and (max-width : 640px) { .tpm-counter { display: none; }\t} </style>',
- init: function (e) {
- this.tmpl = e.template || '',
- this.count = e.count,
- this.caption = e.caption || '',
- this.padding = e.padding || '20px'
- },
- display: function () {
- var t = e('.tpm-counter'),
- n = e('.tpm-counter .tpm-numeral'),
- r = e('.tpm-counter .tpm-caption');
- if (n.length == 0) {
- var i = e('body');
- i.append(this.style),
- i.append(this.tmpl)
- }
- n.html(this.count),
- r.html(this.caption),
- t.css('padding', this.padding),
- t.click(function () {
- p()
- })
- }
- },
- T = function () {
- e.removeCookie('umc'),
- e.removeCookie('umc_' + S.paywallId),
- e.ajax({
- url: o() + '/tpl/m/logout',
- data: {
- paywall_id: S.paywallId
- },
- dataType: 'jsonp',
- action: 'get',
- success: function (t) {
- if (t.ctd) var n = t.ctd;
- for (var r = 0; r < n.length; ++r) e.removeCookie(n[r])
- }
- })
- };
- return {
- name: 'meter',
- init: function (e) {
- E(e)
- },
- isExpired: function () {
- return f()
- },
- isExpiredNextClick: function () {
- return l()
- },
- checkMeter: function (e) {
- S.trackPageview = !0,
- w(e)
- },
- showCurtain: function (e) {
- p(e)
- },
- last: function () {
- return a
- },
- registerCallback: function (e, t) {
- u.addEvent(e),
- u.registerCallback(e, t)
- }
- }
- }), tp.define('fingerprint', [
- 'jq',
- 'util',
- 'murmurhash3'
- ], function (e, t, n) {
- var r = '',
- i = function () {
- try {
- var e,
- t;
- return t = window.navigator.userLanguage || window.navigator.language,
- e = (new Date).getTimezoneOffset(),
- e + ':' + t
- } catch (n) {
- return ''
- }
- },
- s = function () {
- if (window.ActiveXObject) return o();
- try {
- var e = '',
- t = navigator.plugins.length;
- if (t > 0) for (var n = 0; n < t; n++) e += navigator.plugins[n].name + '|';
- return e
- } catch (r) {
- return ''
- }
- },
- o = function () {
- var e = [
- 'ShockwaveFlash.ShockwaveFlash.6',
- 'ShockwaveFlash.ShockwaveFlash.7',
- 'SWCt1.SWCt1.9',
- 'SWCtl.SWCtl',
- 'Adobe.SVGCtl',
- 'WMPlayer.OCX',
- 'AgControl.AgControl',
- 'AcroPDF.PDF',
- 'PDF.PdfCtrl',
- 'RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)',
- 'RealPlayer',
- 'Skype.Detection',
- '3dmlw.IEPlugin',
- 'GoogleTalk.Plugin',
- 'GoogleTalk.Plugin.1'
- ],
- t = '';
- return e.map(function (e) {
- try {
- new ActiveXObject(e),
- t += e + '|'
- } catch (n) {
- }
- }),
- t
- },
- u = function () {
- try {
- var t = [
- 'AcadEref',
- 'Adobe Garamond Pro Bold',
- 'Aharoni',
- 'Arial Baltic',
- 'Arno Pro',
- 'BatangChe',
- 'Blackoak Std',
- 'Castellar',
- 'CityBlueprint',
- 'Colonna MT',
- 'Courier New Baltic',
- 'Curlz MT',
- 'DilleniaUPC',
- 'Dotum',
- 'Dutch801 Rm BT',
- 'Edwardian Script ITC',
- 'EucrosiaUPC',
- 'Eurostile',
- 'Felix Titling',
- 'Footlight MT Light',
- 'FrankRuehl',
- 'Hobo Std',
- 'KodchiangUPC',
- 'Maiandra GD',
- 'Mangal',
- 'Matura MT Script Capitals',
- 'Nirmala UI',
- 'OCR-A BT',
- 'Plantagenet Cherokee',
- 'Pristina',
- 'Raavi',
- 'Rage Italic',
- 'Ravie',
- 'Rod',
- 'Segoe UI',
- 'Shonar Bangla',
- 'Trajan Pro',
- 'Tunga',
- 'Wingdings 3',
- 'Wingdings'
- ],
- n = document.createElement('span');
- n.style.setProperty('font-family', 'sans-serif', 'important'),
- n.style.position = 'fixed',
- n.style.top = '-5000',
- n.style.left = '-5000',
- n.style.zIndex = '-5000',
- n.style.fontSize = '80px',
- n.innerHTML = 'abcdefghijklmnopqrstuvwxyz',
- document.body.insertBefore(n, document.body.firstChild);
- var r = {
- width: n.offsetWidth,
- height: n.offsetHeight
- },
- i = '';
- for (var s = 0; s < t.length; s++) {
- n.style.setProperty('font-family', t[s] + ',sans-serif', 'important');
- if (n.offsetWidth != r.width || n.offsetHeight != r.height) i += t[s] + '|'
- }
- return e(n).remove(),
- i
- } catch (o) {
- return ''
- }
- },
- a = function () {
- try {
- return screen.height + 'x' + screen.width + '+' + screen.colorDepth
- } catch (e) {
- return ''
- }
- },
- f = function () {
- return navigator.userAgent;
- var e
- },
- l = function () {
- var e = '';
- try {
- e += document.getElementById ? 1 : 0,
- e += window.getComputedStyle ? 1 : 0,
- e += screen.globalStorage ? 1 : 0,
- e += window.localStorage ? 1 : 0,
- e += window.sessionStorage ? 1 : 0,
- e += document.getElementsByClassName ? 1 : 0,
- e += document.querySelector ? 1 : 0,
- e += document.all ? 1 : 0,
- e += window.attachEvent ? 1 : 0,
- e += window.createPopup ? 1 : 0,
- e += window.XMLHttpRequest ? 1 : 0,
- e += window.ActiveXObject ? 1 : 0,
- e += window.XDomainRequest ? 1 : 0,
- e += window.msPerformance ? 1 : 0,
- e += document.documentMode ? 1 : 0,
- e += navigator.cpuClass ? 1 : 0,
- e += navigator.browserLanguage ? 1 : 0,
- e += window.opera ? 1 : 0,
- e += window.chrome ? 1 : 0
- } catch (t) {
- }
- return e
- },
- c = function () {
- if (r) return r;
- var e = i();
- return e += s(),
- e += u(),
- e += a(),
- e += f(),
- e += l(),
- r = n.x64hash128(e),
- t.debug('Current browser fingerprint is: ' + r),
- r
- };
- return c(),
- {
- name: 'fingerprint',
- getFingerprint: function () {
- return c()
- }
- }
- }), tp.define('murmurhash3', [
- ], function () {
- function t(e, t) {
- return (e & 65535) * t + (((e >>> 16) * t & 65535) << 16)
- }
- function n(e, t) {
- return e << t | e >>> 32 - t
- }
- function r(e) {
- return e ^= e >>> 16,
- e = t(e, 2246822507),
- e ^= e >>> 13,
- e = t(e, 3266489909),
- e ^= e >>> 16,
- e
- }
- function i(e, t) {
- e = [
- e[0] >>> 16,
- e[0] & 65535,
- e[1] >>> 16,
- e[1] & 65535
- ],
- t = [
- t[0] >>> 16,
- t[0] & 65535,
- t[1] >>> 16,
- t[1] & 65535
- ];
- var n = [
- 0,
- 0,
- 0,
- 0
- ];
- return n[3] += e[3] + t[3],
- n[2] += n[3] >>> 16,
- n[3] &= 65535,
- n[2] += e[2] + t[2],
- n[1] += n[2] >>> 16,
- n[2] &= 65535,
- n[1] += e[1] + t[1],
- n[0] += n[1] >>> 16,
- n[1] &= 65535,
- n[0] += e[0] + t[0],
- n[0] &= 65535,
- [
- n[0] << 16 | n[1],
- n[2] << 16 | n[3]
- ]
- }
- function s(e, t) {
- e = [
- e[0] >>> 16,
- e[0] & 65535,
- e[1] >>> 16,
- e[1] & 65535
- ],
- t = [
- t[0] >>> 16,
- t[0] & 65535,
- t[1] >>> 16,
- t[1] & 65535
- ];
- var n = [
- 0,
- 0,
- 0,
- 0
- ];
- return n[3] += e[3] * t[3],
- n[2] += n[3] >>> 16,
- n[3] &= 65535,
- n[2] += e[2] * t[3],
- n[1] += n[2] >>> 16,
- n[2] &= 65535,
- n[2] += e[3] * t[2],
- n[1] += n[2] >>> 16,
- n[2] &= 65535,
- n[1] += e[1] * t[3],
- n[0] += n[1] >>> 16,
- n[1] &= 65535,
- n[1] += e[2] * t[2],
- n[0] += n[1] >>> 16,
- n[1] &= 65535,
- n[1] += e[3] * t[1],
- n[0] += n[1] >>> 16,
- n[1] &= 65535,
- n[0] += e[0] * t[3] + e[1] * t[2] + e[2] * t[1] + e[3] * t[0],
- n[0] &= 65535,
- [
- n[0] << 16 | n[1],
- n[2] << 16 | n[3]
- ]
- }
- function o(e, t) {
- return t %= 64,
- t === 32 ? [
- e[1],
- e[0]
- ] : t < 32 ? [
- e[0] << t | e[1] >>> 32 - t,
- e[1] << t | e[0] >>> 32 - t
- ] : (t -= 32, [
- e[1] << t | e[0] >>> 32 - t,
- e[0] << t | e[1] >>> 32 - t
- ])
- }
- function u(e, t) {
- return t %= 64,
- t === 0 ? e : t < 32 ? [
- e[0] << t | e[1] >>> 32 - t,
- e[1] << t
- ] : [
- e[1] << t - 32,
- 0
- ]
- }
- function a(e, t) {
- return [e[0] ^ t[0],
- e[1] ^ t[1]]
- }
- function f(e) {
- return e = a(e, [
- 0,
- e[0] >>> 1
- ]),
- e = s(e, [
- 4283543511,
- 3981806797
- ]),
- e = a(e, [
- 0,
- e[0] >>> 1
- ]),
- e = s(e, [
- 3301882366,
- 444984403
- ]),
- e = a(e, [
- 0,
- e[0] >>> 1
- ]),
- e
- }
- var e = {
- version: '2.1.2',
- x86: {
- },
- x64: {
- }
- },
- l = function (e, i) {
- e = e || '',
- i = i || 0;
- var s = e.length % 4,
- o = e.length - s,
- u = i,
- a = 0,
- f = 3432918353,
- l = 461845907;
- for (var c = 0; c < o; c += 4) a = e.charCodeAt(c) & 255 | (e.charCodeAt(c + 1) & 255) << 8 | (e.charCodeAt(c + 2) & 255) << 16 | (e.charCodeAt(c + 3) & 255) << 24,
- a = t(a, f),
- a = n(a, 15),
- a = t(a, l),
- u ^= a,
- u = n(u, 13),
- u = t(u, 5) + 3864292196;
- a = 0;
- switch (s) {
- case 3:
- a ^= (e.charCodeAt(c + 2) & 255) << 16;
- case 2:
- a ^= (e.charCodeAt(c + 1) & 255) << 8;
- case 1:
- a ^= e.charCodeAt(c) & 255,
- a = t(a, f),
- a = n(a, 15),
- a = t(a, l),
- u ^= a
- }
- return u ^= e.length,
- u = r(u),
- u >>> 0
- },
- c = function (e, i) {
- e = e || '',
- i = i || 0;
- var s = e.length % 16,
- o = e.length - s,
- u = i,
- a = i,
- f = i,
- l = i,
- c = 0,
- h = 0,
- p = 0,
- d = 0,
- v = 597399067,
- m = 2869860233,
- g = 951274213,
- y = 2716044179;
- for (var b = 0; b < o; b += 16) c = e.charCodeAt(b) & 255 | (e.charCodeAt(b + 1) & 255) << 8 | (e.charCodeAt(b + 2) & 255) << 16 | (e.charCodeAt(b + 3) & 255) << 24,
- h = e.charCodeAt(b + 4) & 255 | (e.charCodeAt(b + 5) & 255) << 8 | (e.charCodeAt(b + 6) & 255) << 16 | (e.charCodeAt(b + 7) & 255) << 24,
- p = e.charCodeAt(b + 8) & 255 | (e.charCodeAt(b + 9) & 255) << 8 | (e.charCodeAt(b + 10) & 255) << 16 | (e.charCodeAt(b + 11) & 255) << 24,
- d = e.charCodeAt(b + 12) & 255 | (e.charCodeAt(b + 13) & 255) << 8 | (e.charCodeAt(b + 14) & 255) << 16 | (e.charCodeAt(b + 15) & 255) << 24,
- c = t(c, v),
- c = n(c, 15),
- c = t(c, m),
- u ^= c,
- u = n(u, 19),
- u += a,
- u = t(u, 5) + 1444728091,
- h = t(h, m),
- h = n(h, 16),
- h = t(h, g),
- a ^= h,
- a = n(a, 17),
- a += f,
- a = t(a, 5) + 197830471,
- p = t(p, g),
- p = n(p, 17),
- p = t(p, y),
- f ^= p,
- f = n(f, 15),
- f += l,
- f = t(f, 5) + 2530024501,
- d = t(d, y),
- d = n(d, 18),
- d = t(d, v),
- l ^= d,
- l = n(l, 13),
- l += u,
- l = t(l, 5) + 850148119;
- c = 0,
- h = 0,
- p = 0,
- d = 0;
- switch (s) {
- case 15:
- d ^= e.charCodeAt(b + 14) << 16;
- case 14:
- d ^= e.charCodeAt(b + 13) << 8;
- case 13:
- d ^= e.charCodeAt(b + 12),
- d = t(d, y),
- d = n(d, 18),
- d = t(d, v),
- l ^= d;
- case 12:
- p ^= e.charCodeAt(b + 11) << 24;
- case 11:
- p ^= e.charCodeAt(b + 10) << 16;
- case 10:
- p ^= e.charCodeAt(b + 9) << 8;
- case 9:
- p ^= e.charCodeAt(b + 8),
- p = t(p, g),
- p = n(p, 17),
- p = t(p, y),
- f ^= p;
- case 8:
- h ^= e.charCodeAt(b + 7) << 24;
- case 7:
- h ^= e.charCodeAt(b + 6) << 16;
- case 6:
- h ^= e.charCodeAt(b + 5) << 8;
- case 5:
- h ^= e.charCodeAt(b + 4),
- h = t(h, m),
- h = n(h, 16),
- h = t(h, g),
- a ^= h;
- case 4:
- c ^= e.charCodeAt(b + 3) << 24;
- case 3:
- c ^= e.charCodeAt(b + 2) << 16;
- case 2:
- c ^= e.charCodeAt(b + 1) << 8;
- case 1:
- c ^= e.charCodeAt(b),
- c = t(c, v),
- c = n(c, 15),
- c = t(c, m),
- u ^= c
- }
- return u ^= e.length,
- a ^= e.length,
- f ^= e.length,
- l ^= e.length,
- u += a,
- u += f,
- u += l,
- a += u,
- f += u,
- l += u,
- u = r(u),
- a = r(a),
- f = r(f),
- l = r(l),
- u += a,
- u += f,
- u += l,
- a += u,
- f += u,
- l += u,
- ('00000000' + (u >>> 0).toString(16)).slice( - 8) + ('00000000' + (a >>> 0).toString(16)).slice( - 8) + ('00000000' + (f >>> 0).toString(16)).slice( - 8) + ('00000000' + (l >>> 0).toString(16)).slice( - 8)
- },
- h = function (e, t) {
- e = e || '',
- t = t || 0;
- var n = e.length % 16,
- r = e.length - n,
- l = [
- 0,
- t
- ],
- c = [
- 0,
- t
- ],
- h = [
- 0,
- 0
- ],
- p = [
- 0,
- 0
- ],
- d = [
- 2277735313,
- 289559509
- ],
- v = [
- 1291169091,
- 658871167
- ];
- for (var m = 0; m < r; m += 16) h = [
- e.charCodeAt(m + 4) & 255 | (e.charCodeAt(m + 5) & 255) << 8 | (e.charCodeAt(m + 6) & 255) << 16 | (e.charCodeAt(m + 7) & 255) << 24,
- e.charCodeAt(m) & 255 | (e.charCodeAt(m + 1) & 255) << 8 | (e.charCodeAt(m + 2) & 255) << 16 | (e.charCodeAt(m + 3) & 255) << 24
- ],
- p = [
- e.charCodeAt(m + 12) & 255 | (e.charCodeAt(m + 13) & 255) << 8 | (e.charCodeAt(m + 14) & 255) << 16 | (e.charCodeAt(m + 15) & 255) << 24,
- e.charCodeAt(m + 8) & 255 | (e.charCodeAt(m + 9) & 255) << 8 | (e.charCodeAt(m + 10) & 255) << 16 | (e.charCodeAt(m + 11) & 255) << 24
- ],
- h = s(h, d),
- h = o(h, 31),
- h = s(h, v),
- l = a(l, h),
- l = o(l, 27),
- l = i(l, c),
- l = i(s(l, [
- 0,
- 5
- ]), [
- 0,
- 1390208809
- ]),
- p = s(p, v),
- p = o(p, 33),
- p = s(p, d),
- c = a(c, p),
- c = o(c, 31),
- c = i(c, l),
- c = i(s(c, [
- 0,
- 5
- ]), [
- 0,
- 944331445
- ]);
- h = [
- 0,
- 0
- ],
- p = [
- 0,
- 0
- ];
- switch (n) {
- case 15:
- p = a(p, u([0,
- e.charCodeAt(m + 14)], 48));
- case 14:
- p = a(p, u([0,
- e.charCodeAt(m + 13)], 40));
- case 13:
- p = a(p, u([0,
- e.charCodeAt(m + 12)], 32));
- case 12:
- p = a(p, u([0,
- e.charCodeAt(m + 11)], 24));
- case 11:
- p = a(p, u([0,
- e.charCodeAt(m + 10)], 16));
- case 10:
- p = a(p, u([0,
- e.charCodeAt(m + 9)], 8));
- case 9:
- p = a(p, [
- 0,
- e.charCodeAt(m + 8)
- ]),
- p = s(p, v),
- p = o(p, 33),
- p = s(p, d),
- c = a(c, p);
- case 8:
- h = a(h, u([0,
- e.charCodeAt(m + 7)], 56));
- case 7:
- h = a(h, u([0,
- e.charCodeAt(m + 6)], 48));
- case 6:
- h = a(h, u([0,
- e.charCodeAt(m + 5)], 40));
- case 5:
- h = a(h, u([0,
- e.charCodeAt(m + 4)], 32));
- case 4:
- h = a(h, u([0,
- e.charCodeAt(m + 3)], 24));
- case 3:
- h = a(h, u([0,
- e.charCodeAt(m + 2)], 16));
- case 2:
- h = a(h, u([0,
- e.charCodeAt(m + 1)], 8));
- case 1:
- h = a(h, [
- 0,
- e.charCodeAt(m)
- ]),
- h = s(h, d),
- h = o(h, 31),
- h = s(h, v),
- l = a(l, h)
- }
- return l = a(l, [
- 0,
- e.length
- ]),
- c = a(c, [
- 0,
- e.length
- ]),
- l = i(l, c),
- c = i(c, l),
- l = f(l),
- c = f(c),
- l = i(l, c),
- c = i(c, l),
- ('00000000' + (l[0] >>> 0).toString(16)).slice( - 8) + ('00000000' + (l[1] >>> 0).toString(16)).slice( - 8) + ('00000000' + (c[0] >>> 0).toString(16)).slice( - 8) + ('00000000' + (c[1] >>> 0).toString(16)).slice( - 8)
- };
- return {
- name: 'murmurhash3',
- x86hash32: function (e, t) {
- return l(e, t)
- },
- x86hash128: function (e, t) {
- return c(e, t)
- },
- x64hash128: function (e, t) {
- return h(e, t)
- }
- }
- }),
- tp.define('murmurhash3', function () {
- }),
- tp.define('jwtDecode', [
- ], function () {
- function t(e) {
- this.message = e
- }
- function n(n) {
- var r = String(n).replace(/=+$/, '');
- if (r.length % 4 == 1) throw new t('\'atob\' failed: The string to be decoded is not correctly encoded.');
- for (var i = 0, s, o, u = 0, a = ''; o = r.charAt(u++); ~o && (s = i % 4 ? s * 64 + o : o, i++ % 4) ? a += String.fromCharCode(255 & s >> ( - 2 * i & 6)) : 0) o = e.indexOf(o);
- return a
- }
- function i(e) {
- return decodeURIComponent(r(e).replace(/(.)/g, function (e, t) {
- var n = t.charCodeAt(0).toString(16).toUpperCase();
- return n.length < 2 && (n = '0' + n),
- '%' + n
- }))
- }
- var e = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
- t.prototype = new Error,
- t.prototype.name = 'InvalidCharacterError';
- var r = window.atob && window.atob.bind(window) || n,
- s = function (e) {
- var t = e.replace(/-/g, '+').replace(/_/g, '/');
- switch (t.length % 4) {
- case 0:
- break;
- case 2:
- t += '==';
- break;
- case 3:
- t += '=';
- break;
- default:
- throw 'Illegal base64url string!'
- }
- try {
- return i(t)
- } catch (n) {
- return r(t)
- }
- };
- return function (e, t) {
- if (typeof e != 'string') throw new Error('Invalid token specified');
- t = t || {
- };
- var n = t.header === !0 ? 0 : 1;
- return JSON.parse(s(e.split('.') [n]))
- }
- }), tp.define('jwtDecode', function () {
- }), tp.define('janrain', [
- 'jq',
- 'api',
- 'util',
- 'eventUtils'
- ], function (e, t, n, r) {
- function y() {
- f.disableLogout || n.setAccessTokenListCookie(undefined, undefined, !0)
- }
- function w() {
- return janrain && janrain.capture && janrain.capture.ui && janrain.capture.ui.hasActiveSession()
- }
- function E() {
- n.log('JANRAIN:', 'Processing janrain user'),
- b ? b = !1 : n.startCall('refreshUserToken'),
- n.log('JANRAIN:', 'hasActiveSession:' + w());
- var e = S();
- if (!w()) {
- n.log('JANRAIN:', 'No token found. Done processing user'),
- y(),
- n.doneCall('refreshUserToken');
- return
- }
- if (s.isUserValid()) {
- n.log('JANRAIN:', 'Using __ut. Done processing user'),
- n.doneCall('refreshUserToken');
- return
- }
- var r = {
- janrain_capture_token: e,
- url: n.prepareUrlParameter(window.location.href)
- };
- t.callApi('/anon/janrain/verifyAccountInfo', r, function (e) {
- if (e && e.access) try {
- n.log('JANRAIN:', 'Verify success. Done processing user'),
- n.setAccessTokenListCookie(e.access.access_token, e.access.user_token);
- var t = {
- access_token: e.access.access_token,
- user_token: e.access.user_token
- };
- e.access.user && (t.user = {
- uid: e.access.user.uid,
- email: e.access.user.email,
- firstName: e.access.user.first_name,
- lastName: e.access.user.last_name,
- valid: e.access.user.valid
- }),
- d('onCaptureSessionCreated', t),
- i.fireCallbacks('userChanged', t, null, !0)
- } finally {
- n.doneCall('refreshUserToken')
- } else n.log('JANRAIN:', 'Verify failed')
- })
- }
- function S() {
- return e.localStorage.get('janrainCaptureToken')
- }
- function x() {
- janrain.events.onProviderLogoutComplete.addHandler(function () {
- y()
- }),
- janrain.events.onCaptureSessionEnded.addHandler(function (e) {
- n.log('JANRAIN: Events received for logout', e),
- y()
- }),
- T()
- }
- function T() {
- if (w()) {
- n.log('JANRAIN:', 'Found early active session via function'),
- E();
- return
- }
- if (!w() && !s.isUserValid() && !S()) {
- n.log('JANRAIN:', 'not found __ut cookie and janrain token'),
- E();
- return
- }
- var e = !1;
- janrain.events.onCaptureSessionFound.addHandler(function (t) {
- N() ? e && (n.log('JANRAIN: Events received for logged in user', t), E()) : E()
- }),
- janrain.events.onCaptureSessionNotFound.addHandler(function (t) {
- N() ? e && (n.log('JANRAIN: Events received for logged out user', t), E()) : E()
- }),
- janrain.events.onCaptureFederateNoLogin.addHandler(function (t) {
- e = t
- }),
- janrain.events.onCaptureFederateLogin.addHandler(function (e) {
- n.log('JANRAIN: Events received for SSO login', e),
- E()
- })
- }
- function N() {
- return janrain && janrain.settings && janrain.settings.capture && janrain.settings.capture.federate
- }
- function C(e, t) {
- function i() {
- if (u) janrain.events[e].addHandler(t);
- else {
- if (r > n) throw 'Janrain is not initialized';
- r++,
- window.setTimeout(i, 100)
- }
- }
- if (!o) throw 'Janrain is not configured';
- var n = 100,
- r = 0;
- i()
- }
- function k() {
- function e(e) {
- janrain.events[e].addHandler(function () {
- n.log('JANRAIN: ', e, arguments)
- })
- }
- tp.debug && janrain.events.captureEvents.forEach(e)
- }
- var i = r.createEventManager(['userChanged']),
- s = function () {
- var e = function () {
- return 'janrain'
- },
- t = function () {
- return n.getUserTokenCookie()
- },
- r = function () {
- var e = t();
- return typeof e != 'undefined' && e && e.length >= 0
- };
- return {
- getName: e,
- getToken: t,
- isUserValid: r,
- onLoginSuccess: function (e) {
- n.setAccessTokenListCookie({
- value: e.token_list,
- cookie_domain: e.cookie_domain
- }, e.user_token)
- }
- }
- }(),
- o = !1,
- u = !1,
- a = {
- onCaptureSessionCreated: [
- ]
- },
- f = {
- loginRequiredScreen: 'signIn',
- appName: null,
- appId: null,
- clientId: null,
- settings: null,
- disableLogout: !1,
- startCapture: !1
- },
- l = function (e) {
- if (o) return;
- if (!e.appName || !e.appId || !e.clientId) throw 'Must specify appName, appId, and clientId to initialize janrain';
- for (var r in f) typeof e[r] != 'undefined' && (f[r] = e[r]);
- e.settings && (f.settings = e.settings),
- e.loginRequiredScreen && (f.loginRequiredScreen = e.loginRequiredScreen);
- if (f.settings) {
- typeof window.janrain != 'object' && (window.janrain = {
- }),
- typeof window.janrain.settings != 'object' && (window.janrain.settings = {
- }),
- janrain.settings = f.settings,
- typeof window.janrain.settings.capture != 'object' && (window.janrain.settings.capture = {
- }),
- janrain.settings.appUrl = 'https://' + f.appName + '.rpxnow.com',
- janrain.settings.capture.captureServer = 'https://' + f.appName + '.janraincapture.com',
- janrain.settings.capture.appId = f.appId,
- janrain.settings.capture.clientId = f.clientId;
- var i = f.appName.replace(/\./g, '-'),
- u = 'http://widget-cdn.rpxnow.com/load/' + i,
- a = 'https://rpxnow.com/load/' + i,
- l;
- document.location.protocol === 'https:' ? l = a : l = u,
- tp.push(['addExternalLibrary',
- l,
- function () {
- janrain.ready = !0
- }
- ])
- }
- n.log('JANRAIN:', 'start refresh user token'),
- n.startCall('refreshUserToken', 30000),
- n.waitCall('refreshUserToken', function () {
- n.log('JANRAIN:', 'end refresh user token')
- }),
- c(),
- o = !0,
- t.setUserProvider(s),
- tp.zIndexes = {
- backdrop: 900,
- modal: 950,
- close: 990
- };
- var h = function (e) {
- n.log('JANRAIN: onLogin'),
- janrain.capture.ui.modal.close(),
- E()
- };
- tp.janrain.addEventHandler('onCaptureLoginSuccess', h),
- tp.janrain.addEventHandler('onCaptureRegistrationSuccess', h)
- },
- c = function () {
- function n() {
- if (window.janrain && window.janrain.ready && window.janrain.capture && window.janrain.capture.ui && window.janrain.capture.ui.hasActiveSession) k(),
- x(),
- f.startCapture && janrain.capture.ui.start(),
- u = !0;
- else {
- if (t > e) throw 'Janrain is not initialized';
- t++,
- window.setTimeout(n, 100)
- }
- }
- var e = 100,
- t = 0;
- n()
- },
- h = function () {
- return f.loginRequiredScreen
- },
- p = function (e, t) {
- a[e] = [
- ],
- a[e].push(t)
- },
- d = function (e) {
- if (typeof a[e] == 'undefined' || a[e].length == 0) return;
- for (var t = 0; t < a[e].length; ++t) a[e][t].apply(null, arguments)
- },
- v = function (e) {
- function r() {
- if (u) try {
- janrain.capture.ui.renderScreen(h()),
- e && p('onCaptureSessionCreated', e)
- } catch (i) {
- n++,
- window.setTimeout(r, 100);
- return
- } else {
- if (n > t) throw 'Janrain is not initialized';
- n++,
- window.setTimeout(r, 100)
- }
- }
- if (!o) throw 'Janrain is not configured';
- var t = 100,
- n = 0;
- r()
- },
- m = function (e) {
- function r() {
- if (u) janrain.capture.ui.modal.close(),
- janrain.capture.ui.endCaptureSession(),
- e && e();
- else {
- if (n > t) throw 'Janrain is not initialized';
- n++,
- window.setTimeout(r, 100)
- }
- }
- if (!o) throw 'Janrain is not configured';
- var t = 100,
- n = 0;
- r(),
- y()
- },
- g = function () {
- return o
- },
- b = !0;
- return {
- name: 'janrain',
- init: function (e) {
- l(e)
- },
- isUserValid: function () {
- return s.isUserValid()
- },
- getToken: function () {
- return s.getToken()
- },
- getName: function () {
- return s.getName()
- },
- onLoginSuccess: function (e) {
- return s.onLoginSuccess(e)
- },
- login: function (e) {
- return v(e)
- },
- logout: function (e, t) {
- return m(t)
- },
- isConfigured: function () {
- return g()
- },
- getLoginRequiredScreen: function () {
- return h()
- },
- addEventHandler: C,
- registerCallback: function (e, t) {
- i.addEvent(e),
- i.registerCallback(e, t)
- }
- }
- }), tp.define('janrain', function () {
- }), tp.define('gigya', [
- 'jq',
- 'api',
- 'util',
- 'eventUtils'
- ], function (e, t, n, r) {
- function m() {
- if (!s()) throw 'Gigya is not initialized'
- }
- var i = !1,
- s = function () {
- return window.gigya && window.gigya.__initialized
- },
- o = r.createEventManager(['userChanged',
- 'onHide']),
- u = {
- apiKey: null,
- screenSet: 'Default-RegistrationLogin',
- startScreen: null,
- enabledProviders: null,
- lang: null
- },
- a = function () {
- var e = function () {
- return 'gigya'
- },
- t = function () {
- var e = n.getUserTokenCookie();
- if (e) {
- var t = n.findCookieByName('glt_' + u.apiKey),
- r = n.findCookieByName('__utg_' + u.apiKey);
- if (t == r) return e
- }
- return null
- },
- r = function () {
- var e = t();
- return typeof e != 'undefined' && e && e.length >= 0
- };
- return {
- getName: function () {
- return e()
- },
- getToken: function () {
- return t()
- },
- isUserValid: function () {
- return r()
- },
- onLoginSuccess: function (e) {
- n.setAccessTokenListCookie({
- value: e.token_list,
- cookie_domain: e.cookie_domain
- }, e.user_token)
- }
- }
- }(),
- f = function (e) {
- if (i) return;
- for (var n in u) typeof e[n] != 'undefined' && (u[n] = e[n]);
- if (!u.screenSet) throw 'Gigya is not configured: screenSet parameter required';
- if (!u.apiKey) throw 'Gigya is not configured: apiKey parameter required';
- p(),
- i = !0,
- t.setUserProvider(a),
- c()
- },
- l = [
- ],
- c = function (r, s) {
- function c(r) {
- if (r.errorCode == 0) {
- var i = {
- uid: r.UID,
- signature: r.UIDSignature,
- signature_timestamp: r.signatureTimestamp,
- url: n.prepareUrlParameter(window.location.href)
- };
- n.startCall('refreshUserToken'),
- t.callApi('/anon/gigya/verifyAccountInfo', i, function (t) {
- if (t && t.result) {
- n.setAccessTokenListCookie(t.result.access_token, t.result.user_token);
- var r = {
- path: '/',
- expires: 730
- };
- if (t.result.access_token) {
- var i = t.result.access_token.cookie_domain;
- i && i != 'localhost' && e.inArray(i, n.getPossibleCookieDomains()) >= 0 && (r.domain = i)
- }
- var s = n.findCookieByName('glt_' + u.apiKey);
- n.__protected__.setCookie('__utg_' + u.apiKey, s, r);
- for (var a = 0; a < l.length; a++) {
- var f = l[a];
- f && f(t.result)
- }
- t.result.user && (t.result.user = {
- uid: t.result.user.uid,
- email: t.result.user.email,
- firstName: t.result.user.first_name,
- lastName: t.result.user.last_name,
- valid: t.result.user.valid
- }),
- o.fireCallbacks('userChanged', t.result, null, !0)
- } else n.log('Can\'t verify gigya user: may be the configuration of gigya user provider is invalid'),
- n.setAccessTokenListCookie();
- l = [
- ],
- n.doneCall('refreshUserToken')
- })
- } else n.setAccessTokenListCookie(),
- l = [
- ]
- }
- if (!i) throw 'Gigya is not configured';
- m();
- var a = n.findCookieByName('glt_' + u.apiKey),
- f = n.findCookieByName('__utg_' + u.apiKey);
- if (a != f || r) l.push(s),
- l.length == 1 && gigya.accounts.getAccountInfo({
- callback: c
- })
- },
- h = function (e) {
- if (!i) throw 'Gigya is not configured';
- m(),
- e && gigya.accounts.addEventHandlers({
- onLogin: function () {
- c(!0, e)
- }
- });
- var t = {
- screenSet: u.screenSet,
- onHide: function () {
- o.fireCallbacks('onHide', null, null, !0)
- }
- },
- n = [
- 'startScreen',
- 'enabledProviders',
- 'lang'
- ];
- for (var r = 0; r < n.length; r++) {
- var s = n[r];
- u[s] && (t[s] = u[s])
- }
- gigya.accounts.showScreenSet(t)
- },
- p = function () {
- m(),
- gigya.accounts.addEventHandlers({
- onLogin: function () {
- c()
- },
- onLogout: function () {
- n.setAccessTokenListCookie({
- value: null
- }, null, !0),
- o.fireCallbacks('logout', null, null, !0)
- }
- })
- },
- d = function (e) {
- if (!i) throw 'Gigya is not configured';
- m(),
- gigya.accounts.logout({
- callback: function () {
- e && e()
- }
- }),
- n.setAccessTokenListCookie({
- value: null
- }, null, !0)
- },
- v = function () {
- return tp.useGigyaUserProvider === !0 || tp.useGigyaUserProvider === 'true'
- };
- return {
- name: 'gigya',
- init: function (e) {
- f(e)
- },
- isUserValid: function () {
- return a.isUserValid()
- },
- getToken: function () {
- return a.getToken()
- },
- getName: function () {
- return a.getName()
- },
- onLoginSuccess: function (e) {
- return a.onLoginSuccess(e)
- },
- login: function (e) {
- return h(e)
- },
- logout: function (e) {
- return d(e)
- },
- isConfigured: function () {
- return v()
- },
- registerCallback: function (e, t) {
- o.addEvent(e),
- o.registerCallback(e, t)
- }
- }
- }), tp.define('gigya', function () {
- }), tp.define('tinypassAccounts', [
- 'jq',
- 'api',
- 'util',
- 'tinypassLogin'
- ], function (e, t, n, r) {
- var i = function () {
- function i(e) {
- n.setAccessTokenListCookie({
- value: e.token_list,
- cookie_domain: e.cookie_domain
- }, e.user_token)
- }
- var e = function () {
- return 'tinypass_accounts'
- },
- t = function () {
- return n.getUserTokenCookie() || null
- },
- r = function () {
- return !!n.getUserTokenCookie()
- };
- return {
- getName: function () {
- return e()
- },
- getToken: function () {
- return t()
- },
- isUserValid: function () {
- return r()
- },
- onLoginSuccess: i
- }
- }(),
- s = function () {
- return tp.useTinypassAccounts === !0 || tp.useTinypassAccounts === 'true'
- },
- o = function (e) {
- return e = e || {
- },
- e.userToken = i.getToken(),
- r.show(e)
- },
- u = function (t) {
- var r = {
- aid: tp.aid,
- url: document.location.href
- },
- i = tp.getEndpointRoot(!0) + '/checkout/user/logout?' + e.param(r, !0);
- n.setAccessTokenListCookie({
- value: null
- }, null, !0),
- e.ajax({
- url: i,
- dataType: 'jsonp'
- }).done(function (e) {
- n.setAccessTokenListCookie({
- value: '',
- cookie_domain: e.models.cookie_domain
- }, e.models.user_token, !0),
- t && t(e)
- }).fail(function (e) {
- var r = {
- code: 503,
- message: 'Error: Received error when requesting API response from URL: ' + i
- };
- n.setAccessTokenListCookie(null, null, !0),
- t && t(e)
- })
- };
- return {
- name: 'tinypassAccounts',
- isUserValid: function () {
- return i.isUserValid()
- },
- getToken: function (e) {
- return i.getToken(e)
- },
- getName: function () {
- return i.getName()
- },
- onLoginSuccess: function (e) {
- return i.onLoginSuccess(e)
- },
- isConfigured: function () {
- return s()
- },
- login: function (e) {
- return o(e)
- },
- logout: function (e) {
- return u(e)
- }
- }
- }), tp.define('tinypassAccounts', function () {
- }), tp.define('tinypassLogin', [
- 'jq',
- 'util',
- 'postmessage',
- 'require-css/css!styles/offer',
- 'containerUtils',
- 'eventUtils'
- ], function (e, t, n, r, i, s) {
- function d(e) {
- n.broadcast('reloadOffer', e)
- }
- function m(t, n) {
- var r = [
- 'aid',
- 'gaClientId',
- 'tags',
- 'contentSection',
- 'contentAuthor'
- ];
- e.each(r, function (e, r) {
- n[r] && (t[r] = n[r])
- });
- var i = n.contentCreated;
- return i && (t.contentCreated = i),
- t
- }
- function g(t) {
- var n = {
- },
- r = [
- 'displayMode',
- 'aid',
- 'width',
- 'height',
- 'state'
- ];
- return e.each(r, function (e, r) {
- t[r] && (n[r] = t[r])
- }),
- n
- }
- var o = null,
- u = !1,
- a = s.createEventManager(['resize',
- 'loginSuccess']),
- f = function () {
- return tp.getEndpointRoot(!0) + '/checkout/user/loginShow'
- },
- l = function () {
- return tp.getEndpointRoot(!0) + '/checkout/user/check'
- },
- c = function (e) {
- t.debug('Login event received', e.event, e.params, e);
- var n = i.getIframe(e.sender),
- r = !n.config.parent;
- switch (e.event) {
- case 'loaded':
- o = !1,
- u = !0;
- break;
- case 'close':
- i.closeModalContainer(),
- a.fireCallbacks(e.event, e.params, e.sender, r);
- break;
- case 'cancel':
- case 'error':
- case 'customEvent':
- a.fireCallbacks(e.event, e.params, e.sender, r);
- break;
- case 'loginSuccess':
- p(e.event, e.params, e.sender, r);
- break;
- case 'logoutSuccess':
- h(e.event, e.params, e.sender, r);
- break;
- default:
- t.debug('Received invalid event type: ' + e.event);
- return
- }
- },
- h = function (e, n, r) {
- t.setAccessTokenListCookie({
- value: n.token_list,
- cookie_domain: n.cookie_domain
- }, n.user_token, !0)
- },
- p = function (e, n, r, s) {
- var o = i.getIframe(r);
- t.setAccessTokenListCookie({
- value: n.token_list,
- cookie_domain: n.cookie_domain
- }, n.user_token),
- o.config.userToken = n.user_token,
- o && o.config && o.config.loginSuccess && o.config.loginSuccess(n.event, n.params, n.sender),
- a.fireCallbacks(e, n, r, s),
- o && o.config && o.config.closeAfterSuccess && i.closeModalContainer(r);
- var u = {
- reloadAfterLogin: !0,
- userToken: n.user_token,
- user: n.user
- };
- d(u)
- },
- v = function (e, n, r, s) {
- var o = i.getIframe(s.iframeId),
- u = !o.config.parent;
- t.setAccessTokenListCookie({
- value: e,
- cookie_domain: n
- }, r),
- o.config.userToken = r,
- o && o.config && o.config.loginSuccess && o.config.loginSuccess('loginSuccess', {
- }, {
- }),
- a.fireCallbacks('loginSuccess', {
- }, {
- }, u)
- },
- y = null,
- b = function (n) {
- y && i.closeModalContainer(y);
- var r = {
- closeAfterSuccess: !0
- },
- s = {
- };
- e.extend(s, r, n),
- s.displayMode = 'popup',
- s.width = 360,
- s.height = 660,
- s.state = s.state ? s.state : 'login';
- var o = g(s);
- o.iframeId = t.randomString(16),
- o.url = window.location.href,
- o.host_url = window.location.href,
- y = o.iframeId,
- m(o, tp),
- o.user_provider = 'tinypass_accounts',
- n.userToken && (o.user_token = n.userToken),
- t.getCampaigns(o);
- var h;
- return s.iframeId ? (o.iframeId = s.iframeId, h = i.redirectContainer(s.iframeId, {
- url: f(),
- config: s,
- postMessageUrl: f(),
- receive: c,
- iframeParams: o
- })) : h = i.createContainer({
- url: f(),
- config: s,
- postMessageUrl: f(),
- receive: c,
- iframeParams: o,
- onCloseCallback: function () {
- u || (t.debug('Registering onCloseCallback instead of postMessage'), e.ajax({
- url: l(),
- data: {
- aid: o.aid,
- url: document.location.href,
- fromUserIdentity: !1
- },
- dataType: 'jsonp',
- action: 'get',
- success: function (e) {
- t.debug('CheckAction completed', e.models.user),
- v(e.models.token_list, e.models.cookie_domain, e.models.user_token, o, s)
- }
- }))
- }
- }),
- a.registerCallback(s, o.iframeId),
- h
- },
- w = function (e) {
- if (o) return !1;
- o = !0,
- setTimeout(function () {
- o = !1
- }, 10000),
- b(e) || t.error('Could not initialize login; check configuration')
- },
- E = function (e) {
- a.registerCallback(e, e.iframeId);
- var t = {
- iframeId: e.iframeId,
- config: e,
- iframeParams: e
- };
- n.init({
- postMessageUrl: f(),
- receive: c,
- iframe: t,
- iframeParams: {
- }
- })
- };
- return {
- name: 'tinypassLogin',
- show: function (e) {
- w(e)
- },
- close: function () {
- i.closeModalContainer()
- },
- showBackdrop: function () {
- i.showBackdrop()
- },
- hideBackdrop: function () {
- i.hideBackdrop()
- },
- centerBackdrop: function (e) {
- i.centerBackdrop(e)
- },
- registerCallback: function (e, t) {
- a.registerCallback(e, t)
- },
- listenLogin: function (e) {
- E(e)
- }
- }
- }), tp.define('tinypassLogin', function () {
- }), tp.define('containerUtils', [
- 'util',
- 'jq',
- 'postmessage',
- 'eventUtils',
- 'murmurhash3'
- ], function (e, t, n, r, i) {
- function h(e, t) {
- function n(e) {
- return /\{\s*\[native code\]\s*\}/.test('' + e)
- }
- try {
- if (n(window.scrollTo)) {
- window.scrollTo(e, t);
- return
- }
- if (n(window.scroll)) {
- window.scroll(e, t);
- return
- }
- document.body && (document.body.scrollTop = 0)
- } catch (r) {
- console.warn('Can not perform scroll: ' + r.message)
- }
- }
- function T(e) {
- var t = M.shift();
- N && !t && N.removeClass('tp-active'),
- e.container.removeClass('tp-active'),
- t ? (O.hide(), O = t, O.show()) : H()
- }
- function j(e) {
- N && N.css({
- height: '100%'
- }),
- e.find('.tp-close').removeClass('tp-square')
- }
- function R(n, r) {
- var i = t(n);
- i.length ? r(i) : t.isReady ? e.log('Invalid containerSelector') : setTimeout(function () {
- R(n, r)
- }, 50)
- }
- function U(e, t) {
- typeof e.showCloseButton == 'undefined' && (e.showCloseButton = !0);
- if (e.container) return e.container;
- var n = new b;
- return e.isPreload || (O = n.element),
- n.getContainer(e.showCloseButton, t)
- }
- function z(n) {
- var r = {
- container: null,
- containerReady: !1
- };
- if (!n.iframeParams.containerSelector) return e.log('Inline offer must have a valid containerSelector'),
- r;
- r.container = t(n.singleContainer),
- r.container.empty();
- if (!r.container.length) {
- if (t.isReady) return e.log('Invalid containerSelector'),
- r
- } else r.containerReady = !0,
- n.iframeParams.width = r.container.width();
- return r
- }
- function W(t) {
- var n = t.width ? t.width : window.innerWidth,
- r = t.height ? t.height : window.innerHeight,
- i = e.centerScreen(n, r);
- return {
- width: n,
- height: r,
- top: i.top,
- left: i.left
- }
- }
- function X(t, n) {
- var r = W(t),
- i = window.open(n, e.randomString(16), 'scrollbars=yes,location=yes,status=0,toolbar=0,resizable=1, width=' + r.width + ', height=' + r.height + ', top=' + r.top + ', left=' + r.left);
- return window.focus && i.focus(),
- i
- }
- function $(n, r, i) {
- var s = 'iframe-' + V++ + '-' + e.randomString();
- r.iframeId && (s = r.iframeId);
- var o = t(document.createElement('iframe')).attr({
- id: s,
- name: s,
- title: s,
- scrolling: 'no',
- allowtransparency: 'true',
- src: i
- }).css({
- overflow: 'hidden',
- backgroundColor: 'transparent',
- border: '0',
- width: n.displayMode == 'inline' ? r.width + 'px' : '0px',
- height: '0px'
- });
- try {
- o.attr('frameBorder', '0'),
- o.get(0).setAttribute('frameBorder', '0'),
- o.get(0).frameBorder = '0'
- } catch (u) {
- e.log(u)
- }
- return o
- }
- function J() {
- return t('<div>').css({
- overflow: 'hidden',
- backgroundColor: 'transparent',
- border: '0',
- width: '0px',
- height: '0px',
- position: 'absolute',
- display: 'block',
- top: '-1px',
- left: '-1px'
- })
- }
- function K(t) {
- if (t.config.displayMode === 'modal') {
- if (g()) {
- e.log('Modal is already shown; must be one modal per time');
- return
- }
- E(t.container)
- } else t.config.displayMode === 'inline' ? w(t) : e.log('Unexpected displayMode of preloaded iframe\n');
- return t.config.isPreload = !1,
- t.iframeParams.isPreload = !1,
- e.debug('show preloaded iframe: ', t.config),
- t
- }
- function Q(r) {
- var a,
- l = !0,
- c = r.iframeParams;
- c.displayMode !== 'inline' && !c.width && (c.width = t(window).width());
- var h = function (e) {
- var n = t.param(e, !0);
- return n + '&_qh=' + i.x86hash32(n)
- };
- if (c.displayMode === 'inline') {
- r.config.showCloseButton !== undefined && delete r.config.showCloseButton;
- var p = z(r);
- a = p.container,
- l = p.containerReady
- } else if (c.displayMode === 'modal') a = U(r.config, function () {
- x(c.iframeId, r.parent)
- });
- else if (c.displayMode === 'popup') {
- c.width || (c.width = t(window).width());
- var d = r.url + '?' + h(c);
- a = X(c, d)
- }
- var v = r.url + '?' + h(c),
- m = null;
- if (c.displayMode === 'popup') {
- try {
- m = t(a.document)
- } catch (g) {
- try {
- m = t(a)
- } catch (y) {
- m = null,
- console.warn('Unable to get popup element')
- }
- }
- o[c.iframeId] = {
- },
- o[c.iframeId].container = a,
- o[c.iframeId].interval = setInterval(function () {
- o[c.iframeId].container.closed && (clearInterval(o[c.iframeId].interval), o[c.iframeId].container.close(), r.onCloseCallback && r.onCloseCallback())
- }, 100)
- } else m = $(r.config, c, v);
- u.registerCallback(r, c.iframeId);
- var b = s[c.iframeId] = {
- iframeId: c.iframeId,
- config: r.config,
- element: m,
- container: a,
- iframeParams: c,
- containerReady: l
- };
- n.init({
- postMessageUrl: r.postMessageUrl,
- parent: r.parent,
- receive: r.receive,
- iframe: b,
- iframeParams: c
- }),
- t(window).on('keyup', S);
- if (c.displayMode === 'modal') t(window).resize(function () {
- j(a)
- }),
- a.append(m);
- else if (c.displayMode === 'inline') if (s[c.iframeId].containerReady) {
- var w = t(document.createElement('div')).addClass(f).append(m);
- r.config.isPreload && w.hide(),
- (document.readyState === 'complete' || document.readyState !== 'loading' && !document.documentElement.doScroll) && a && a.length > 0 ? (a.empty(), a.append(w)) : Y(a, w)
- } else {
- var E = t(document.createElement('div')).attr('id', 'temp-inline-' + c.iframeId).hide();
- R('body', function (e) {
- e.append(E)
- }),
- E.append(m)
- }
- return e.debug('creating iframe: ', r),
- b
- }
- function G(e, r) {
- var i = r.url + '?' + t.param(r.iframeParams, !0),
- o = s[e];
- if (o.config.displayMode == 'popup') o.container.location = i;
- else {
- var u = o.element.get(0),
- a = u.contentWindow || u;
- a.location = i
- }
- o.config = r.config,
- n.init({
- postMessageUrl: r.postMessageUrl,
- receive: r.receive,
- iframe: s[r.iframeParams.iframeId],
- iframeParams: r.iframeParams
- })
- }
- function Y(e, n) {
- var r = setInterval(function () {
- e.empty()
- }, 150);
- t(document).ready(function () {
- clearInterval(r),
- e.append(n)
- })
- }
- function Z() {
- for (var e in s) {
- var t = s[e];
- t.config.displayMode === 'inline' && t.container && F(t, {
- width: t.container.width()
- });
- if (t.config.displayMode === 'modal' && t.container) {
- var r = Math.max(document.documentElement.clientWidth, document.body.offsetWidth, document.documentElement.offsetWidth);
- n.send('RESIZE_MODAL_CHECKOUT', {
- iframe: t,
- width: r
- }, t.iframeId)
- }
- }
- }
- function et(e, t) {
- if (!e) return;
- t.width !== undefined && (e.css({
- width: t.width + 'px'
- }), e.toggleClass('no-width', t.width == 0)),
- t.height !== undefined && (t.animate ? e.animate({
- height: t.height + 'px'
- }, 200) : e.css({
- height: t.height + 'px'
- }), e.toggleClass('no-height', t.height == 0))
- }
- function tt(e) {
- var t = [
- ];
- for (var n in s) {
- var r = s[n];
- if (e && n != e) continue;
- if (r.config.displayMode == 'inline') continue;
- r.config.displayMode == 'modal' && (T(r), r.container.hide(), t.push(n))
- }
- return t
- }
- function nt(e) {
- if (!e || !e.length) return;
- for (var t in s) {
- var n = s[t];
- for (var r = 0; r < e.length; r++) t == e[r] && (P(), n.container.addClass('tp-active'), n.container.show())
- }
- }
- var s = {
- },
- o = [
- ],
- u = r.createEventManager(['close']),
- a = 'fakeOfferId',
- f = 'tp-container-inner',
- l = 'EVENT_VIEW_ACTIVATED',
- c = {
- isIphoneCaretFixed: !1,
- _initialScrollPosition: {
- x: null,
- y: null
- },
- isModalDisplayed: function () {
- return O && !!O.find('.tp-iframe-wrapper.tp-active') [0]
- },
- isModalOutsideViewport: function () {
- var e = O.find('.tp-iframe-wrapper.tp-active') [0],
- t = e.getBoundingClientRect(),
- n = 30,
- r = t.bottom - n < 0,
- i = t.top - n > window.innerHeight;
- return r || i
- },
- scrollModalToViewport: function () {
- h(0, 0)
- },
- applyFix: function () {
- this.saveInitialScroll(window.scrollX, window.scrollY),
- O && O.css({
- position: 'absolute',
- top: '0',
- width: '100%',
- 'overflow-x': 'unset',
- 'overflow-y': 'unset'
- }),
- setTimeout(this.scrollModalToViewport.bind(this), k),
- document.addEventListener('scroll', this.scrollListenerThrottled),
- this.isIphoneCaretFixed = !0
- },
- removeFix: function () {
- document.removeEventListener('scroll', this.scrollListenerThrottled),
- this._scrollBack()
- },
- _scrollBack: function () {
- h(this._initialScrollPosition.x, this._initialScrollPosition.y)
- },
- saveInitialScroll: function (e, t) {
- this._initialScrollPosition.x = e,
- this._initialScrollPosition.y = t
- },
- modalOpened: function () {
- this.applyFix()
- },
- modalClosed: function () {
- if (!this.isIphoneCaretFixed) return;
- this.removeFix()
- }
- };
- c.setInViewportIfNeeded = function () {
- this.isModalDisplayed() && this.isModalOutsideViewport() && this.scrollModalToViewport()
- },
- c.scrollListenerThrottled = e.throttle(c.setInViewportIfNeeded, 50).bind(c),
- c.onIframeResize = e.throttle(c.setInViewportIfNeeded, 100).bind(c),
- c.onCheckoutStateChanged = function () {
- h(0, 0)
- },
- t(window).resize(function () {
- Z()
- }),
- n.subscribe('close', function (e) {
- c.modalClosed()
- }),
- n.subscribe(l, function (t) {
- e.isIphone() && t.displayMode && 'modal' === t.displayMode && c.onCheckoutStateChanged()
- });
- var p = function (t) {
- e.debug('Removing iframe', t),
- t.element && t.element.hide(),
- v(t),
- t.config.displayMode === 'modal' && (t.waitFinishProcesses = !0)
- },
- d = function (r) {
- e.debug('Purging iframe', r);
- var i = s[r];
- try {
- n.removeIframe(i.iframeId),
- i.element.remove(),
- i.config.displayMode === 'inline' && t(i.container).find('.tp-container-inner').remove()
- } catch (o) {
- }
- delete s[r]
- },
- v = function (e) {
- n.send('checkProccessesForClose', {
- }, e.iframeId)
- },
- m = function (e) {
- e.config.displayMode === 'popup' && e.container.close(),
- p(e)
- },
- g = function () {
- for (var e in s) {
- var t = s[e];
- if (t.config.displayMode === 'modal' && !t.waitFinishProcesses && !t.config.isPreload) return !0
- }
- return !1
- },
- y = function (e) {
- return s[e]
- },
- b = function () {
- var e,
- n,
- r,
- i,
- s = function () {
- return e ? e : (e = t(document.createElement('div')).addClass('tp-modal'), n = t(document.createElement('div')).html('x').addClass('tp-close'), r = t(document.createElement('div')).addClass('tp-iframe-wrapper'), r.append(n), e.css('z-index', tp.zIndexes.modal), n.css('z-index', tp.zIndexes.close), n.on('click', function () {
- typeof i == 'function' && i()
- }), e.append(r), R('body', function (t) {
- t.append(e)
- }), e)
- };
- s(),
- this.element = e,
- this.getContainer = function (e, t) {
- return s(),
- i = t,
- typeof e == 'undefined' && (e = !0),
- e ? this.showCloseButton() : this.hideCloseButton(),
- r
- },
- this.show = function (t) {
- s(),
- typeof t == 'undefined' && (t = !0),
- t ? this.showCloseButton() : this.hideCloseButton(),
- e.addClass('tp-active')
- },
- this.hide = function () {
- s(),
- e.removeClass('tp-active')
- },
- this.showCloseButton = function () {
- s(),
- n.addClass('tp-active')
- },
- this.hideCloseButton = function () {
- s(),
- n.removeClass('tp-active')
- }
- },
- w = function (e) {
- t('.' + f, e.container).show(),
- F(e, {
- width: e.container.width()
- })
- },
- E = function (e) {
- e = e.closest('.tp-modal'),
- O = e,
- I(e, !0, !0)
- },
- S = function (n) {
- n.keyCode == 27 && t.map(s, e.mapArrayIndex).length > 0
- },
- x = function (t, n, r) {
- e.debug('Search container to close', t, n, r);
- for (var i in s) {
- var o = s[i];
- if (t && i != t) continue;
- if (r && o.config.displayMode == 'inline') continue;
- if (r && o.config.isPreload) continue;
- m(o),
- o.config.displayMode == 'modal' && T(o)
- }
- u.fireCallbacks('close', null, t, !0)
- },
- N,
- C,
- k = 250,
- L = function () {
- if (N) return N;
- var e = t(document.createElement('div'));
- return e.addClass('tp-backdrop'),
- e.css('z-index', tp.zIndexes.backdrop),
- R('body', function (t) {
- t.append(e)
- }),
- N = e,
- e
- },
- A,
- O,
- M = [
- ],
- _ = function () {
- if (O.is(':visible')) return;
- R('body', function (t) {
- e.isMobileTabletIOs() && tp.experimentalIosModal && (t.addClass('tp-modal-experiment'), setTimeout(function () {
- t.scrollTop(0)
- }, 100)),
- t.removeClass('tp-modal-close'),
- t.addClass('tp-modal-open')
- }),
- A && clearTimeout(A),
- A = setTimeout(function () {
- O.show()
- }, 100),
- e.isIphone() && c.modalOpened()
- },
- D = function () {
- if (!O) return;
- R('body', function (e) {
- e.addClass('tp-modal-close'),
- e.removeClass('tp-modal-open'),
- e.hasClass('body-fixed') && e.removeClass('body-fixed'),
- e.hasClass('tp-modal-experiment') && e.removeClass('tp-modal-experiment')
- }),
- O.hide()
- },
- P = function (e, n) {
- L();
- if (N.is(':visible')) {
- if (e && !n) {
- var r = t('.tp-modal:visible').hide();
- r && M.unshift(r),
- O.show()
- } else if (e) {
- var r = t('.tp-modal:visible');
- r ? (M.push(O), O = r) : O.show()
- }
- return
- }
- _(),
- N.show(),
- C = window.setTimeout(function () {
- N.addClass('tp-active')
- }, k)
- },
- H = function () {
- N && (D(), N.removeClass('tp-active'), N.hide(), clearTimeout(C)),
- c.modalClosed()
- },
- B = function (e) {
- if (!N) return;
- e.outerHeight() > t(window).height() ? N.css({
- height: t(document).height()
- }) : N.css({
- height: '100%'
- })
- },
- F = function (n, r) {
- if (!n) return;
- et(n.element, r);
- var i = t.extend({
- }, r, {
- animate: !1
- });
- switch (n.config.displayMode) {
- case 'modal':
- et(n.container, i),
- R('body', function (e) {
- e.addClass('tp-modal-resizing'),
- setTimeout(function () {
- e.removeClass('tp-modal-resizing')
- }, 50)
- }),
- e.isIphone() && c.onIframeResize();
- break;
- case 'inline':
- var s = t('.' + f, n.container);
- et(s, r);
- break;
- default:
- n.container.focus()
- }
- },
- I = function (e, t, n) {
- P(t, n),
- n || (e.hasClass('tp-active') || e.addClass('tp-active'), j(e))
- },
- q = function (e) {
- if (e) {
- var n = t(e).find('.tp-close');
- n && n.hasClass('tp-active') && n.removeClass('tp-active')
- }
- },
- V = 1;
- return {
- name: 'containerUtils',
- fakeOfferId: a,
- createContainer: function (e) {
- return Q(e)
- },
- showPreloadedContainer: function (e) {
- return K(e)
- },
- redirectContainer: function (e, t) {
- return G(e, t)
- },
- hasModalIframe: function () {
- return g()
- },
- getIframe: function (e) {
- return y(e)
- },
- generateIframe: function (e, t, n) {
- return $(e, t, n)
- },
- generateIframeWrapper: function () {
- return J()
- },
- getPopupPosition: function (e) {
- return W(e)
- },
- generatePopup: function (e, t) {
- return X(e, t)
- },
- initInlineContainer: function (e) {
- return z(e)
- },
- getModalContainer: function (e, t) {
- return U(e, t)
- },
- centerBackdrop: function (e) {
- return B(e)
- },
- checkBackdropAndContainer: function (e, t, n) {
- I(e, t, n)
- },
- resizeIframe: function (e, t) {
- F(e, t)
- },
- centerIt: function (e) {
- j(e)
- },
- operationWithContainer: function (e, t) {
- R(e, t)
- },
- closeContainer: function (e, t) {
- x(e, t)
- },
- closeModalContainer: function (e, t) {
- x(e, t, !0)
- },
- purgeIframe: function (e, t) {
- d(e, t)
- },
- hideModalContainer: tt,
- closeModal: T,
- hideCloseButton: q,
- activateContainers: nt
- }
- }), tp.define('containerUtils', function () {
- }), tp.define('eventUtils', [
- 'jq',
- 'util',
- 'postmessage'
- ], function (e, t, n) {
- var r = function (e) {
- var r = {
- },
- i;
- for (i = 0; i < e.length; i++) r[e[i]] = [
- ];
- var s = {
- addEvent: function (e) {
- r[e] === undefined && (r[e] = [
- ])
- },
- hasIframeCallback: function (e, t) {
- var n,
- i,
- s;
- if (r[e] && r[e].length > 0) for (s = 0, n = null, i = null; s < r[e].length; ++s) {
- i = r[e][s];
- if (typeof i == 'object' && t == i.iframeId) return !0
- }
- return !1
- },
- hasCallback: function (e) {
- return r[e] && r[e].length > 0
- },
- registerCallback: function (e, n) {
- var i = typeof e == 'string' ? e : null,
- s = typeof e == 'object' ? e : null,
- o,
- u,
- a;
- if (i) {
- o = typeof n == 'function' ? n : null;
- if (r[i] === undefined) return;
- r[i].push(o)
- }
- if (s) {
- u = typeof n == 'string' ? n : null;
- for (a in r) typeof s[a] == 'function' && (t.debug('Registering ' + a + ' callback for iframe ' + u), r[a].push({
- iframeId: u,
- callback: s[a]
- }))
- }
- },
- fireCallbacks: function (e, t, n, r) {
- s.fire(n, e, r, t)
- },
- fire: function (e, i, s, o) {
- function p() {
- if (s) try {
- return c.length > 1 ? a.apply(null, c) : a(o, e)
- } catch (n) {
- t.debug(n)
- }
- }
- var u,
- a,
- f,
- l = !1,
- c = [
- ].slice.call(arguments);
- c.splice(0, 3);
- var h = o && o.resultCallbackId;
- if (typeof r[i] == 'undefined') return;
- for (f = 0, u = null, a = null; f < r[i].length; ++f) {
- a = r[i][f];
- if (typeof a == 'function') t.debug('firing callback for event \'' + i + '\'' + ' from iframe(' + e + ')'),
- u = p(),
- l = !0;
- else if (typeof a == 'object') {
- if (e != a.iframeId) continue;
- t.debug('firing callback for event \'' + i + '\'' + ' from iframe(' + e + ')'),
- a = a.callback,
- u = p(),
- l = !0
- }
- h && (o.result = u, o.event = i, n.send('resultCallback', o, e))
- }
- !l && h && (o.callbackNotFound = !0, o.event = i, n.send('resultCallback', o, e))
- },
- fireCallbacksAndStopOnFirstFalse: function (e) {
- if (typeof r[e] == 'undefined') return !0;
- var n = !0;
- for (var i = 0; i < r[e].length; i++) {
- var s = r[e][i];
- if (typeof s == 'function') {
- t.debug('firing callback for event \'' + e + '\'');
- try {
- var o = [
- ].slice.call(arguments).slice(1);
- if (s.apply(null, o) === !1) {
- t.debug('callback for event \'' + e + '\' returned false'),
- n = !1;
- break
- }
- } catch (u) {
- t.debug('firing callback for event \'' + e + '\' failed', u)
- }
- }
- }
- return n
- }
- };
- return s
- };
- return {
- name: 'eventUtils',
- createEventManager: function (e) {
- return r(e)
- }
- }
- }), tp.define('eventUtils', function () {
- }), tp.define('experience', [
- 'jq',
- 'util',
- 'postmessage',
- 'api',
- 'eventUtils',
- 'scrollDepth',
- 'viewportExit',
- 'idle',
- 'interaction',
- 'log',
- 'pianoEsp',
- 'swg',
- 'fbsubscriptions'
- ], function ($, util, postmessage, api, eventUtils, scrollDepth, viewportExit, idle, interaction, log, pianoEsp, swg, fbsubscriptions) {
- function buildHandlers(e) {
- function n(e, t) {
- return function (n, r, i) {
- if (e.isAction) {
- var s = checkPreActionHandlers(n);
- if (!s) return;
- var o = getEventConditionsCount(n),
- u = getConditionInPreloadCard(n);
- (o || u) && me.__private__.addModuleToExecuted(n.eventModuleParams.moduleId, n)
- }
- e.fn(n, r, i),
- e.shouldFireCallback && _buildCallbackEventHandler(t) (n)
- }
- }
- var t = {
- };
- return $.each(e, function (e, r) {
- if (typeof r.fn != 'function') throw new Error('Unsupported config for ' + e + ' handler');
- t[e] = n(r, e)
- }),
- t
- }
- function _init() {
- if (_initialized) return;
- _initialized = !0;
- var e = !0;
- if (tp.customPreChecks && tp.customPreChecks.length) {
- var t = null;
- for (var n = tp.customPreChecks.length; n--; ) try {
- t = tp.customPreChecks[n](),
- t !== 1 && t !== !0 && (e = !1)
- } catch (r) {
- }
- }
- e && _execute('auto')
- }
- function getExecutedNodes() {
- return me.__private__.executedNodes
- }
- function addEventToExecutedNodes(e) {
- me.__private__.executedNodes.push(e)
- }
- function clearExecutedNodes() {
- me.__private__.executedNodes = [
- ]
- }
- function getTrackingEndpoint() {
- return tp.main.__protected__.getTrackingEndpoint()
- }
- function getComposerUrl() {
- var e;
- return util.__protected__.cameFromFbSubscriptions() ? (e = '/xbuilder/experience/executeFbia', initializeFbSubscriptions()) : e = '/xbuilder/experience/execute',
- tp.getExperienceEndpoint(!1) + e
- }
- function initializePianoEsp(e) {
- pianoEsp.__protected__.init({
- visitor: e.bid
- })
- }
- function injectSwgMarkup(e) {
- swg.__protected__.injectMarkup(e)
- }
- function addSwgLibrary() {
- swg.__protected__.addLibrary()
- }
- function initializeFbSubscriptions() {
- fbsubscriptions.__protected__.init()
- }
- function sendStatisticsExecutedNodes() {
- var e = me.__private__.getExecutedNodes();
- e.length && (log.__private__.logBeaconRequest(me.__private__.getTrackingEndpoint() + '/composer/logExecutionStats', {
- aid: tp.aid,
- items: JSON.stringify(e),
- execution_stats_context: me.__private__.lastExecutionStatsContext
- }), me.__private__.clearExecutedNodes()),
- window.clearTimeout(sendStatisticsTimerId),
- sendStatisticsTimerId = window.setTimeout(me.__protected__.sendStatisticsExecutedNodes, statisticsRequestInterval)
- }
- function _execute(e, t, n) {
- t = t || {
- };
- var r = $.extend(!0, {
- protocol_version: 1
- }, t);
- _applyCookieParameters(r),
- util.hasQueryParamByName(me.__private__.READER_ID) && (r[me.__private__.READER_ID] = util.getQueryParamByName(me.__private__.READER_ID)),
- util.waitCall('refreshUserToken', function () {
- if (!n) {
- tp.main.__protected__.trackPageUnloadIfNecessary(),
- _applyTpConfigurationParameters(r),
- api.getCallParams(r);
- var t = {
- url: window.location.href,
- tags: tp.tags,
- submitType: e
- };
- tp.main.buildPageTrackParams(r, t)
- }
- util.debug('exp: Experience initialized with params:', r),
- util.waitCall('refreshAccessTokenList', function () {
- util.startCall('experienceExecute');
- var e = getComposerUrl(),
- t = navigator.appVersion.indexOf('MSIE 9') !== - 1,
- i;
- if (t) i = {
- dataType: 'jsonp',
- url: e + '?' + $.param(r, !0)
- };
- else {
- var s = '?' + $.param({
- aid: r.aid
- }, !0);
- i = {
- type: 'post',
- url: e + s,
- data: r,
- xhrFields: {
- withCredentials: !0
- }
- }
- }
- i.success = function (e) {
- util.doneCall('experienceExecute');
- var t = $.extend(!0, {
- }, r);
- n || (me.__private__.resetExperienceState(), tp.main.registerTrackUnload()),
- processErrors(e.errors),
- processResult(e.models, t)
- },
- i.error = function () {
- util.doneCall('experienceExecute'),
- n || me.__private__.resetExperienceState();
- var t = {
- code: 503,
- message: 'Error: Received error when requesting API response from URL: ' + e
- };
- util.debug(t.message)
- },
- $.ajax(i)
- })
- })
- }
- function _applyCookieParameters(e) {
- var t = util.__protected__.getCookie(XB_COOKIE);
- t && (e.xbc = t);
- var n = util.getTbcCookie();
- n && n.length > 0 && (e.tbc = n),
- util.getCampaigns(e),
- e.custom_cookies = JSON.stringify(util.getCustomCookies())
- }
- function _applyTpConfigurationParameters(e) {
- var t = [
- {
- property: 'debug',
- parameter: 'debug'
- },
- {
- property: 'trackPageView',
- parameter: 'increment_pageview_meter'
- }
- ];
- return $.each(t, function (t, n) {
- tp[n.property] !== undefined && (e[n.parameter] = tp[n.property])
- }),
- e
- }
- function processErrors(e) {
- Array.isArray(e) && (e.length && util.debug('exp: composer execution has been failed with errors'), $.each(e, function (e, t) {
- util.debug('exp: ' + t.msg)
- }))
- }
- function addModuleToExecuted(e, t) {
- me.__private__.addEventToExecutedNodes({
- mId: e,
- eId: t.eventExecutionContext.experienceId,
- eV: t.eventExecutionContext.experienceVersion,
- eeId: t.eventExecutionContext.executionId
- })
- }
- function createLinkedNodeHandler(e, t, n, r) {
- return function () {
- return {
- type: linkedNodeTypes.HANDLER,
- eventType: t.eventType,
- children: [
- ],
- run: function () {
- $.proxy(e, this, t, n, r) ()
- }
- }
- }()
- }
- function getConditionInPreloadCard(e) {
- var t = e.eventParams.delayBy || {
- },
- n;
- return t.value && (t.type === 'time' ? n = {
- type: 'timer',
- timer: t.value
- }
- : t.type === 'scroll' && (n = {
- type: 'scrollDepth',
- scrollDepth: t.value,
- measureType: 'pixels'
- })),
- n
- }
- function getEventConditionsCount(e) {
- return e.eventConditions && $.isArray(e.eventConditions) ? e.eventConditions.length : 0
- }
- function createLinkedNodeForPreloadHandler(e, t) {
- return function () {
- var n = !1,
- r;
- return {
- type: linkedNodeTypes.PRELOAD,
- eventType: t.eventType,
- children: [
- ],
- run: function () {
- n === !1 && (r = e(t), n = !0)
- },
- getPreloadResult: function () {
- return r
- }
- }
- }()
- }
- function subscribeToEventListener(e, t) {
- var n = function () {
- return eventManager.fireCallbacksAndStopOnFirstFalse('beforeBrowserEvent', e)
- };
- switch (e.type) {
- case 'viewportExit':
- viewportExit.addListener(t, {
- detectExitMode: e.detectExitMode,
- detectBackButtonForMobile: e.detectBackButtonForMobile,
- clientDevice: e.clientDevice
- }, n);
- break;
- case 'scrollDepth':
- scrollDepth.addListener(t, {
- scrollDepth: e.scrollDepth,
- measureType: e.measureType
- }, n);
- break;
- case 'timer':
- var r = setTimeout(function () {
- n() && t()
- }, 1000 * e.timer);
- timers.push(r);
- break;
- case 'interaction':
- interaction.bind(t, e.interactions, n);
- break;
- case 'idle':
- idle.addListener(t, e.idleTime, n)
- }
- }
- function canUseNodeInLoop(e) {
- var t = [
- 'continueExecution',
- 'meterActive',
- 'meterExpired'
- ];
- return e.type === linkedNodeTypes.HANDLER && t.indexOf(e.eventType) === - 1
- }
- function createLinkedNodeEventCondition(e, t) {
- return function () {
- var n = !1,
- r = function () {
- me.__private__.addModuleToExecuted(e.moduleId, t);
- var r = me.__private__.linkedNodes[e.moduleId].children;
- for (var i = 0; i < r.length; i++) {
- var s = r[i],
- o = me.__private__.linkedNodes[s];
- if (n === !1 || canUseNodeInLoop(o)) try {
- o.run()
- } catch (u) {
- util.error('exp: error execute chain event', o, u)
- }
- }
- n = !0,
- me.__private__.smallExpereinceMode && me.__protected__.sendStatisticsExecutedNodes()
- };
- return {
- type: linkedNodeTypes.EVENT_CONDITION,
- children: [
- ],
- run: function () {
- me.__private__.subscribeToEventListener(e, r)
- }
- }
- }()
- }
- function createLinkedNodeForInnerEventCondition(e, t) {
- return function () {
- var n = !1,
- r = function () {
- var e = me.__private__.linkedNodes[t + linkedNodeTypes.INNER_EVENT_CONDITION].children;
- for (var r = 0; r < e.length; r++) {
- var i = e[r],
- s = me.__private__.linkedNodes[i];
- if (n === !1 || canUseNodeInLoop(s)) try {
- s.run()
- } catch (o) {
- util.error('exp: error execute chain event', s, o)
- }
- }
- n = !0
- };
- return {
- type: linkedNodeTypes.INNER_EVENT_CONDITION,
- children: [
- t
- ],
- run: function () {
- me.__private__.subscribeToEventListener(e, r)
- }
- }
- }()
- }
- function processResult(e, t) {
- if (!e) return;
- util.setTbcCookieFromResponse(e),
- util.setAppTimezoneOffsetFromResponse(e),
- util.setCurrentDomainFromResponse(e),
- me.__private__.initializePianoEsp(e);
- if (e.xbc && e.xbc.cookie_value) {
- var n = {
- path: '/',
- expires: 730
- };
- e.xbc.cookie_domain && e.xbc.cookie_domain != 'localhost' && (n.domain = e.xbc.cookie_domain, util.__protected__.deleteTLDCookieForSpecificDomains(XB_COOKIE, e.xbc.cookie_domain)),
- util.deleteCookie(XB_COOKIE),
- util.__protected__.setCookie(XB_COOKIE, e.xbc.cookie_value, n)
- }
- var r = e.result,
- i = {
- };
- if (!r) {
- util.debug('exp: no composer execution result');
- return
- }
- r.swgMarkupData && (util.debug('exp: swg markup data :', r.swgMarkupData), me.__private__.injectSwgMarkup(r.swgMarkupData), me.__private__.addSwgLibrary()),
- util.debug('exp: processed experiences :', r.experiences),
- me.__private__.lastExecutionStatsContext = e.executionStatsContext,
- $.each(r.debugMessages, function (e, t) {
- util.debug('exp: execute :', t)
- });
- var s = function (e, t, n) {
- var r = e.eventConditions;
- for (var i = 0; i < r.length; i++) {
- var s = r[i],
- o = s.moduleId,
- u = r[i - 1],
- a = !r[i + 1];
- me.__private__.linkedNodes[o] || (me.__private__.linkedNodes[o] = me.__private__.createLinkedNodeEventCondition(s, e));
- if (a) {
- me.__private__.linkedNodes[o].children.push(t);
- var f = eventTypesWithPreload.indexOf(e.eventType) !== - 1;
- if (f && s.type === 'viewportExit' && !getConditionInPreloadCard(e)) {
- var l = me.__private__.preloadHandlers[e.eventType];
- if (!l) {
- util.error('exp: not found preload handler for event: ', e);
- continue
- }
- var c = t + linkedNodeTypes.PRELOAD;
- me.__private__.linkedNodes[c] = createLinkedNodeForPreloadHandler(l, e),
- u ? me.__private__.linkedNodes[u.moduleId].children.push(c) : n.push(c)
- }
- }
- u && me.__private__.linkedNodes[u.moduleId].children.indexOf(o) === - 1 && me.__private__.linkedNodes[u.moduleId].children.push(o)
- }
- },
- o = [
- ],
- u,
- a = 0;
- for (var f = 0; f < r.events.length; f++) {
- var l = r.events[f];
- try {
- var c = l.eventType,
- h = l.eventModuleParams || {
- };
- util.debug('exp: process event \'' + c + '\'' + ' (' + h.moduleId + ')'),
- c === 'experienceExecute' && ($.extend(!0, i, l.eventExecutionContext), i.result = {
- }, $.extend(!0, i.result, r)),
- u = h.moduleId;
- if (!u) {
- util.error('exp: not found moduleId for linked node event: ', l);
- continue
- }
- var p = me.__private__.handlers[c];
- if (!p) {
- util.error('exp: not found handler for event: ', l);
- continue
- }
- me.__private__.linkedNodes[u] = createLinkedNodeHandler(p, l, t, r);
- var d = getEventConditionsCount(l),
- v = getConditionInPreloadCard(l);
- if (d || v) {
- var m = u;
- if (v) {
- var g = createLinkedNodeForInnerEventCondition(v, u);
- m = u + linkedNodeTypes.INNER_EVENT_CONDITION,
- me.__private__.linkedNodes[m] = g
- }
- d ? o.indexOf(l.eventConditions[0].moduleId) === - 1 && o.push(l.eventConditions[0].moduleId) : v && o.push(m),
- s(l, m, o),
- a++
- } else o.push(u)
- } catch (y) {
- util.error('exp: error on execute event: ', l, y)
- }
- }
- a <= 3 && (me.__private__.smallExpereinceMode = !0);
- for (var b = 0; b < o.length; b++) u = o[b],
- me.__private__.linkedNodes[u] && me.__private__.linkedNodes[u].run();
- sendStatisticsTimerId = window.setTimeout(me.__protected__.sendStatisticsExecutedNodes, statisticsRequestInterval),
- _lastExecutionResult = i
- }
- function _dumpElementWithChildren(e) {
- var t = me.__private__.linkedNodes[e.moduleId];
- e.type = t.type;
- for (var n = 0; n < t.children.length; n++) e.children.push(_dumpElementWithChildren({
- moduleId: t.children[n],
- children: [
- ]
- }));
- return e
- }
- function _dumpRootEventConditions(e) {
- var t = [
- ];
- for (var n = 0; n < e.length; n++) t.push(_dumpElementWithChildren({
- moduleId: e[n],
- children: [
- ]
- }));
- util.debug('exp: root event conditions ', t)
- }
- function _setCookieHandler(e) {
- var t = e.eventParams;
- if (t && typeof t.cookieName != 'undefined' && typeof t.cookieValue != 'undefined') {
- util.debug('exp: set cookie with parameters:', t);
- var n = (t.isReadableCookie ? '_pc_' : '') + t.cookieName,
- r = {
- domain: t.cookieDomain,
- path: t.cookiePath
- };
- if (!t.isSessionCookie) {
- var i = new Date;
- switch (t.expirationUnit) {
- case 'seconds':
- i.setSeconds(i.getSeconds() + t.expirationValue);
- break;
- case 'minutes':
- i.setMinutes(i.getMinutes() + t.expirationValue);
- break;
- case 'hours':
- i.setHours(i.getHours() + t.expirationValue);
- break;
- case 'days':
- i.setDate(i.getDate() + t.expirationValue);
- break;
- case 'months':
- i.setMonth(i.getMonth() + t.expirationValue);
- break;
- case 'years':
- i.setFullYear(i.getFullYear() + t.expirationValue);
- break;
- default:
- util.log('Wrong eventParams.expirationUnit : ', t.expirationUnit)
- }
- r.expires = i
- }
- util.__protected__.setCookie(n, t.cookieValue, r)
- }
- }
- function _runJsHandler(e) {
- if (e.eventParams && e.eventParams.snippet) {
- var t = e.eventParams.snippet;
- util.debug('exp: run js with snippet:', t);
- var n = e.eventExecutionContext;
- util.debug('exp: set publisher\'s context and custom:', n);
- var r = 'var context = ' + JSON.stringify(n) + ';\n' + 'var custom = ' + JSON.stringify(tp.customVariables) + ';\n' + t;
- _runScript(r)
- }
- }
- function _nonSiteHandler(e) {
- util.debug('exp: non-site action:', e)
- }
- function _logHandler(e) {
- me.__private__.addModuleToExecuted(e.eventModuleParams.moduleId, e)
- }
- function _continueExecutionHandler(e, t) {
- util.debug('exp: continue execution action:', e, 'with requestParameters', t);
- var n = t || {
- };
- n.experience_id = e.eventExecutionContext.experienceId,
- n.experience_version = e.eventExecutionContext.experienceVersion,
- n.context_data = e.eventParams.contextData,
- _execute('auto', n, !0)
- }
- function _runScript(snippet) {
- try {
- eval.call(window, '(function () {' + snippet + '\n})();')
- } catch (e) {
- util.log('Error occurred in RunJS\n', e)
- }
- }
- function _applyCssHandler(e) {
- $.each(e.eventParams.ruleList, function (e, t) {
- var n = t.classes;
- n && (n = n.replace(/[,.]/g, ' '), t.type == 'add' && $(t.elements).addClass(n), t.type == 'remove' && $(t.elements).removeClass(n)),
- util.debug('exp: css applied with rule:', t)
- })
- }
- function _showHandler(e, t) {
- var n = me.__private__.linkedNodes[e.eventModuleParams.moduleId + linkedNodeTypes.PRELOAD];
- return n && n.getPreloadResult ? n.getPreloadResult().show() : me.__private__.show(e, t)
- }
- function _showOfferHandler(e) {
- return _showHandler(e, tp.offer.show)
- }
- function _showTemplateHandler(e) {
- return _showHandler(e, tp.template.show)
- }
- function _deferredShowHandler(e, t) {
- return util.debug('exp: run preloading for:', e),
- me.__private__.show(e, t)
- }
- function _deferredShowOfferHandler(e) {
- return _deferredShowHandler(e, tp.offer.deferredShow)
- }
- function _deferredShowTemplateHandler(e) {
- return _deferredShowHandler(e, tp.template.deferredShow)
- }
- function resetExperienceState() {
- me.__protected__.sendStatisticsExecutedNodes(),
- me.__private__.removeEventListeners(),
- me.__private__.linkedNodes = {
- }
- }
- function removeEventListeners() {
- $.each(timers, function (e, t) {
- clearTimeout(t)
- }),
- timers = [
- ],
- viewportExit.removeListeners(),
- idle.removeListeners(),
- scrollDepth.removeListeners(),
- interaction.unbindAll()
- }
- function show(e, t) {
- var n = e.eventParams,
- r = e.eventExecutionContext.splitTests,
- i = e.eventExecutionContext.activeMeters,
- s = e.eventParams.formNameByTermId,
- o = e.eventParams.hideCompletedFields;
- n.trackingId = e.eventExecutionContext.trackingId,
- n.experienceId = e.eventExecutionContext.experienceId,
- n.experienceExecutionId = e.eventExecutionContext.executionId,
- n.experienceActionId = e.eventModuleParams.moduleId,
- n.experienceConditions = e.eventConditions;
- if (r && r.length > 0) {
- var u = $.map(r, function (e) {
- return e.variantId
- });
- n.splitTestIds = JSON.stringify(u)
- }
- n.additionalParamNames = [
- ],
- i && i.length > 0 && (n.activeMeters = JSON.stringify(i));
- if (e.eventType === 'showZuoraOffer') {
- var a = e.eventParams.ratePlanIds;
- a && a.length > 0 && (n.zuoraSelectedRatePlanIds = JSON.stringify(a), n.additionalParamNames.push('zuoraSelectedRatePlanIds'))
- }
- if (e.eventType === 'showNewscycleOffer') {
- var f = e.eventParams.ids;
- f && f.length > 0 && (n.newscycleSelectedIds = JSON.stringify(f), n.additionalParamNames.push('newscycleSelectedIds'))
- }
- return s && (n.formNameByTermId = JSON.stringify(s), n.hideCompletedFields = o),
- util.debug('exp: show with params:', n),
- t(n)
- }
- function _showFormHandler(e) {
- var t = e.eventParams;
- if (t && t.formName) {
- var n = {
- formName: t.formName,
- hideIfComplete: t.hideCompletedFields,
- trackingId: e.eventExecutionContext.trackingId
- };
- util.debug('exp: show form with params:', t),
- tp.pianoId.showForm(n)
- }
- }
- function _experienceExecuteHandler(e, t, n) {
- var r = e.eventParams;
- r.result = n
- }
- function _buildCallbackEventHandler(e) {
- return function (t) {
- var n = t.eventParams.callback,
- r = t.eventParams,
- i = t.eventModuleParams,
- s = t.eventExecutionContext;
- util.debug('exp: fire event ', e, ' with eventParams:', r, ', moduleParams:', i, ', context:', s),
- eventManager.fire('experience', e, !0, r, i, s),
- n && e != n && (util.debug('exp: execute event ', e, ' with callback: ', n), _runScript(n))
- }
- }
- function buildEmptyHandler() {
- return function () {
- }
- }
- function checkPreActionHandlers(e) {
- var t = e.eventParams,
- n = e.eventModuleParams,
- r = e.eventExecutionContext;
- return util.debug('exp: fire event \'beforeComposerAction\' with eventParams:', t, ', moduleParams:', n, ', context:', r),
- eventManager.fireCallbacksAndStopOnFirstFalse('beforeComposerAction', t, n, r)
- }
- var me = {
- __private__: {
- },
- __protected__: {
- }
- };
- me.name = 'experience',
- me.execute = function (e) {
- _execute('manual', e, !1)
- },
- me.init = _init,
- me.registerCallback = function (e, t) {
- eventManager.addEvent(e),
- eventManager.registerCallback(e, t)
- },
- me._getLastExecutionResult = function () {
- return _lastExecutionResult
- },
- me.__private__.handlers = [
- ],
- me.__private__.preloadHandlers = [
- ],
- me.__private__.executedNodes = [
- ],
- me.__private__.linkedNodes = {
- },
- me.__private__.lastExecutionStatsContext = '',
- me.__private__.smallExpereinceMode = !1,
- me.__private__.processResult = processResult,
- me.__private__.processErrors = processErrors,
- me.__private__.createLinkedNodeHandler = createLinkedNodeHandler,
- me.__private__.createLinkedNodeEventCondition = createLinkedNodeEventCondition,
- me.__private__._applyCssHandler = _applyCssHandler,
- me.__private__._runJsHandler = _runJsHandler,
- me.__private__._setCookieHandler = _setCookieHandler,
- me.__private__._nonSiteHandler = _nonSiteHandler,
- me.__private__._logHandler = _logHandler,
- me.__private__._continueExecutionHandler = _continueExecutionHandler,
- me.__private__._experienceExecuteHandler = _experienceExecuteHandler,
- me.__private__._buildCallbackEventHandler = _buildCallbackEventHandler,
- me.__private__.show = show,
- me.__private__.removeEventListeners = removeEventListeners,
- me.__private__.resetExperienceState = resetExperienceState,
- me.__private__.subscribeToEventListener = subscribeToEventListener,
- me.__private__.checkPreActionHandlers = checkPreActionHandlers,
- me.__private__.getExecutedNodes = getExecutedNodes,
- me.__private__.addEventToExecutedNodes = addEventToExecutedNodes,
- me.__private__.clearExecutedNodes = clearExecutedNodes,
- me.__private__.addModuleToExecuted = addModuleToExecuted,
- me.__private__.getTrackingEndpoint = getTrackingEndpoint,
- me.__private__.initializePianoEsp = initializePianoEsp,
- me.__private__.injectSwgMarkup = injectSwgMarkup,
- me.__private__.addSwgLibrary = addSwgLibrary,
- me.__protected__.sendStatisticsExecutedNodes = sendStatisticsExecutedNodes,
- me.__private__.READER_ID = 'reader_id';
- var _initialized = !1,
- XB_COOKIE = 'xbc',
- _lastExecutionResult = {
- },
- timers = [
- ],
- linkedNodeTypes = {
- HANDLER: 'handler',
- EVENT_CONDITION: 'eventCondition',
- INNER_EVENT_CONDITION: 'innerEventCondition',
- PRELOAD: 'preload'
- },
- eventManager = eventUtils.createEventManager([]);
- me.__private__.handlers = buildHandlers({
- applyCss: {
- fn: _applyCssHandler,
- isAction: !0,
- shouldFireCallback: !0
- },
- runJs: {
- fn: _runJsHandler,
- isAction: !0,
- shouldFireCallback: !0
- },
- setCookie: {
- fn: _setCookieHandler,
- isAction: !0,
- shouldFireCallback: !0
- },
- nonSite: {
- fn: _nonSiteHandler,
- isAction: !0,
- shouldFireCallback: !0
- },
- showForm: {
- fn: _showFormHandler,
- isAction: !0,
- shouldFireCallback: !0
- },
- showOffer: {
- fn: _showOfferHandler,
- isAction: !0,
- shouldFireCallback: !1
- },
- showTemplate: {
- fn: _showTemplateHandler,
- isAction: !0,
- shouldFireCallback: !1
- },
- showZuoraOffer: {
- fn: _showTemplateHandler,
- isAction: !0,
- shouldFireCallback: !1
- },
- showNewscycleOffer: {
- fn: _showTemplateHandler,
- isAction: !0,
- shouldFireCallback: !1
- },
- continueExecution: {
- fn: _continueExecutionHandler,
- shouldFireCallback: !0
- },
- continueExecutionCompleted: {
- fn: buildEmptyHandler,
- shouldFireCallback: !0
- },
- meterActive: {
- fn: buildEmptyHandler,
- shouldFireCallback: !0
- },
- meterExpired: {
- fn: buildEmptyHandler,
- shouldFireCallback: !0
- },
- userSegmentTrue: {
- fn: buildEmptyHandler,
- shouldFireCallback: !0
- },
- userSegmentFalse: {
- fn: buildEmptyHandler,
- shouldFireCallback: !0
- },
- experienceExecutionFailed: {
- fn: buildEmptyHandler,
- shouldFireCallback: !0
- },
- log: {
- fn: _logHandler,
- shouldFireCallback: !1
- },
- experienceExecute: {
- fn: _experienceExecuteHandler,
- shouldFireCallback: !0
- }
- });
- var eventTypesWithPreload = [
- 'showOffer',
- 'showZuoraOffer',
- 'showNewscycleOffer',
- 'showTemplate'
- ];
- me.__private__.preloadHandlers = {
- showOffer: _deferredShowOfferHandler,
- showTemplate: _deferredShowTemplateHandler,
- showZuoraOffer: _deferredShowTemplateHandler,
- showNewscycleOffer: _deferredShowTemplateHandler
- };
- var statisticsRequestInterval = 2000,
- sendStatisticsTimerId;
- return me
- }),
- tp.define('experience', function () {
- }),
- tp.define('activetimer', [
- 'ifvisible',
- 'jq'
- ], function (e, t) {
- function a() {
- b();
- var e = r[r.length - 1];
- if (e !== undefined && e.stopTime === undefined) return;
- r.push({
- startTime: new Date,
- startMinute: n,
- stopTime: undefined
- })
- }
- function f() {
- if (r.length === 0) return;
- if (o) return;
- if (m()) {
- y();
- return
- }
- var e = r[r.length - 1];
- e.stopTime === undefined && (e.stopTime = new Date, e.stopMinute = n)
- }
- function l() {
- var e = 0;
- for (var t = 0; t < r.length; t++) {
- var i = r[t].startTime,
- s = r[t].stopTime,
- o = r[t].startMinute,
- u = r[t].stopMinute;
- s === undefined && (s = new Date, u = n),
- e += h(s, i, u, o)
- }
- return Math.floor(e / 1000)
- }
- function c() {
- var e = 0,
- t = r[0];
- if (t !== undefined) {
- var i = t.startTime,
- s = t.startMinute,
- o = new Date,
- u = n;
- e = h(o, i, u, s)
- }
- return Math.floor(e / 1000)
- }
- function h(e, t, n, r) {
- var i = 10,
- s = Math.abs(e.getTime() - t.getTime()),
- o = n - r;
- return s > (o + i) * 60000 && (s = o * 60000),
- s
- }
- function p(t) {
- var n = parseFloat(t);
- if (isNaN(n) !== !1) throw {
- name: 'InvalidDurationException',
- message: 'An invalid duration time (' + t + ') was provided.'
- };
- e.setIdleDuration(n),
- i = n
- }
- function d() {
- r = [
- ],
- a()
- }
- function v() {
- e.on('blur', function () {
- o = !1,
- f()
- }),
- e.on('focus', function () {
- o = !0,
- a()
- }),
- e.on('idle', function () {
- i > 0 && (o = !1, f())
- }),
- e.on('wakeup', function () {
- i > 0 && (o = !0, a())
- })
- }
- function m() {
- return u = t('video,audio').filter(function () {
- return !this.paused
- }),
- !!u.length
- }
- function g() {
- setTimeout(f, s * 1000)
- }
- function y() {
- if (!u) return;
- u.each(function () {
- this.addEventListener('pause', g)
- })
- }
- function b() {
- if (!u) return;
- u.each(function () {
- this.removeEventListener('pause', g)
- })
- }
- function w(e) {
- e && p(e),
- v(),
- a(),
- setInterval(function () {
- n++
- }, 60000)
- }
- var n = 0,
- r = [
- ],
- i = 60,
- s = 15,
- o = !0,
- u;
- return {
- name: 'activetimer',
- setIdleDurationInSeconds: p,
- getActiveTimeInSeconds: l,
- getTotalTimeInSeconds: c,
- resetRecordedTime: d,
- startTimer: a,
- stopTimer: f,
- initialize: w
- }
- }),
- tp.define('scrollDepth', [
- 'jq'
- ], function (e) {
- function s(s) {
- var o = document,
- u = e(document),
- a = e(window);
- s && s > 0 && (r = s || r),
- function f() {
- var e = o.body || {
- },
- s = o.documentElement || {
- },
- l = Math.max(e.scrollHeight, s.scrollHeight, e.offsetHeight, s.offsetHeight, e.clientHeight, s.clientHeight);
- l > t && (t = l);
- var c = u.scrollTop() + a.height();
- c > n && (n = c, n > t && (t = n)),
- i && clearTimeout(i),
- i = setTimeout(f, r)
- }()
- }
- function o() {
- return n
- }
- function u() {
- return t
- }
- function a(e, t, n) {
- typeof n != 'function' && (n = function () {
- return !0
- }),
- c.push({
- callback: e,
- position: t.scrollDepth,
- measureType: t.measureType,
- repeat: 'once',
- consumeEventFn: n
- }),
- h(),
- v()
- }
- function f() {
- c = [
- ]
- }
- function h() {
- var t = e(window).scrollTop();
- t > l && (l = t)
- }
- function p() {
- h(),
- v()
- }
- function d(n) {
- if (!n.consumeEventFn()) return;
- if (n.measureType === 'pixels') return n.position <= l;
- if (n.measureType === 'percentage') return l / (t - e(window).height()) >= n.position / 100
- }
- function v() {
- var e = [
- ],
- t = [
- ],
- n;
- for (var r = 0; r < c.length; r++) n = c[r],
- d(n) ? e.push(n) : t.push(n);
- c = t;
- for (var r = 0; r < e.length; r++) e[r].callback()
- }
- var t = 0,
- n = 0,
- r = 200,
- i,
- l = 0,
- c = [
- ];
- return e(window).scroll(p),
- {
- name: 'scrollDepth',
- initialize: s,
- getMaxScrollDepth: o,
- getMaxDocumentHeight: u,
- addListener: a,
- removeListeners: f
- }
- }),
- tp.define('ifvisible', [
- ], function () {
- var e,
- t,
- n,
- r,
- i,
- s,
- o,
- u,
- a,
- f,
- l,
- c,
- h,
- p;
- return a = {
- },
- n = document,
- l = !1,
- c = 'active',
- o = 60000,
- s = !1,
- t = function () {
- var e,
- t,
- n,
- r,
- i,
- s,
- o;
- return e = function () {
- return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1)
- },
- i = function () {
- return e() + e() + '-' + e() + '-' + e() + '-' + e() + '-' + e() + e() + e()
- },
- s = {
- },
- n = '__ceGUID',
- t = function (e, t, r) {
- return e[n] = undefined,
- e[n] || (e[n] = 'ifvisible.object.event.identifier'),
- s[e[n]] || (s[e[n]] = {
- }),
- s[e[n]][t] || (s[e[n]][t] = [
- ]),
- s[e[n]][t].push(r)
- },
- r = function (e, t, r) {
- var i,
- o,
- u,
- a,
- f;
- if (e[n] && s[e[n]] && s[e[n]][t]) {
- a = s[e[n]][t],
- f = [
- ];
- for (o = 0, u = a.length; o < u; o++) i = a[o],
- f.push(i(r || {
- }));
- return f
- }
- },
- o = function (e, t, r) {
- var i,
- o,
- u,
- a,
- f;
- if (r) {
- if (e[n] && s[e[n]] && s[e[n]][t]) {
- f = s[e[n]][t];
- for (o = u = 0, a = f.length; u < a; o = ++u) {
- i = f[o];
- if (i === r) return s[e[n]][t].splice(o, 1),
- i
- }
- }
- } else if (e[n] && s[e[n]] && s[e[n]][t]) return delete s[e[n]][t]
- },
- {
- add: t,
- remove: o,
- fire: r
- }
- }(),
- e = function () {
- var e;
- return e = !1,
- function (t, n, r) {
- return e || (t.addEventListener ? e = function (e, t, n) {
- return e.addEventListener(t, n, !1)
- }
- : t.attachEvent ? e = function (e, t, n) {
- return e.attachEvent('on' + t, n, !1)
- }
- : e = function (e, t, n) {
- return e['on' + t] = n
- }),
- e(t, n, r)
- }
- }(),
- r = function (e, t) {
- var r;
- return n.createEventObject ? e.fireEvent('on' + t, r) : (r = n.createEvent('HTMLEvents'), r.initEvent(t, !0, !0), !e.dispatchEvent(r))
- },
- u = function () {
- var e,
- t,
- r,
- i,
- s;
- i = void 0,
- s = 3,
- r = n.createElement('div'),
- e = r.getElementsByTagName('i'),
- t = function () {
- return r.innerHTML = '<!--[if gt IE ' + ++s + ']><i></i><![endif]-->',
- e[0]
- };
- while (t()) continue;
- return s > 4 ? s : i
- }(),
- i = !1,
- p = void 0,
- typeof n.hidden != 'undefined' ? (i = 'hidden', p = 'visibilitychange') : typeof n.mozHidden != 'undefined' ? (i = 'mozHidden', p = 'mozvisibilitychange') : typeof n.msHidden != 'undefined' ? (i = 'msHidden', p = 'msvisibilitychange') : typeof n.webkitHidden != 'undefined' && (i = 'webkitHidden', p = 'webkitvisibilitychange'),
- h = function () {
- var t,
- r;
- return t = !1,
- r = function () {
- return clearTimeout(t),
- c !== 'active' && a.wakeup(),
- s = + (new Date),
- t = setTimeout(function () {
- if (c === 'active') return a.idle()
- }, o)
- },
- r(),
- e(n, 'mousemove', r),
- e(n, 'mouseup', r),
- e(n, 'keyup', r),
- e(n, 'touchstart', r),
- e(window, 'scroll', r),
- e(window, 'resize', r),
- a.focus(r),
- a.wakeup(r)
- },
- f = function () {
- var t;
- return l ? !0 : (i === !1 ? (t = 'blur', u < 9 && (t = 'focusout'), e(window, t, function () {
- return a.blur()
- }), e(window, 'focus', function () {
- return a.focus()
- })) : e(n, p, function () {
- return n[i] ? a.blur() : a.focus()
- }, !1), l = !0, h())
- },
- a = {
- setIdleDuration: function (e) {
- return o = e * 1000
- },
- getIdleDuration: function () {
- return o
- },
- getIdleInfo: function () {
- var e,
- t;
- return e = + (new Date),
- t = {
- },
- c === 'idle' ? (t.isIdle = !0, t.idleFor = e - s, t.timeLeft = 0, t.timeLeftPer = 100) : (t.isIdle = !1, t.idleFor = e - s, t.timeLeft = s + o - e, t.timeLeftPer = (100 - t.timeLeft * 100 / o).toFixed(2)),
- t
- },
- focus: function (e) {
- return typeof e == 'function' ? this.on('focus', e) : (c = 'active', t.fire(this, 'focus'), t.fire(this, 'wakeup'), t.fire(this, 'statusChanged', {
- status: c
- })),
- this
- },
- blur: function (e) {
- return typeof e == 'function' ? this.on('blur', e) : (c = 'hidden', t.fire(this, 'blur'), t.fire(this, 'idle'), t.fire(this, 'statusChanged', {
- status: c
- })),
- this
- },
- idle: function (e) {
- return typeof e == 'function' ? this.on('idle', e) : (c = 'idle', t.fire(this, 'idle'), t.fire(this, 'statusChanged', {
- status: c
- })),
- this
- },
- wakeup: function (e) {
- return typeof e == 'function' ? this.on('wakeup', e) : (c = 'active', t.fire(this, 'wakeup'), t.fire(this, 'statusChanged', {
- status: c
- })),
- this
- },
- on: function (e, n) {
- return f(),
- t.add(this, e, n),
- this
- },
- off: function (e, n) {
- return f(),
- t.remove(this, e, n),
- this
- },
- onEvery: function (e, t) {
- var n,
- r;
- return f(),
- n = !1,
- t && (r = setInterval(function () {
- if (c === 'active' && n === !1) return t()
- }, e * 1000)),
- {
- stop: function () {
- return clearInterval(r)
- },
- pause: function () {
- return n = !0
- },
- resume: function () {
- return n = !1
- },
- code: r,
- callback: t
- }
- },
- now: function (e) {
- return f(),
- c === (e || 'active')
- }
- },
- a.name = 'ifvisible',
- a
- }),
- tp.define('doubleClickForPublisher', [
- ], function () {
- function i(e) {
- e && (f(), t = !1),
- s()
- }
- function s() {
- if (t) return !1;
- t = !0;
- try {
- var e = window.googletag = window.googletag || {
- };
- return e.cmd = e.cmd || [
- ],
- e.cmd.push(function () {
- e.pubads().addEventListener('slotRenderEnded', h),
- e.pubads().addEventListener('impressionViewable', p),
- e.companionAds().addEventListener('slotRenderEnded', h),
- e.companionAds().addEventListener('impressionViewable', p)
- }),
- e.apiReady && e.cmd.push(function () {
- l(e.pubads().getSlots()),
- l(e.companionAds().getSlots())
- }),
- !0
- } catch (n) {
- return v(n),
- !1
- }
- }
- function o(e) {
- n = e
- }
- function u(e, t) {
- typeof n == 'function' && n(e, t)
- }
- function a() {
- var t = [
- ];
- for (var n in e) {
- if (e[n] === undefined || e[n] === null || !e.hasOwnProperty(n)) continue;
- t.push(e[n])
- }
- return t
- }
- function f() {
- e = {
- }
- }
- function l(e) {
- for (var t = 0; t < e.length; t++) {
- var n = e[t];
- h({
- eventSource: r.RECIEVED_FROM_GET_SLOTS,
- slot: n
- })
- }
- }
- function c(e) {
- var t;
- try {
- var n = e.serviceName,
- r = e.slot;
- if (!n) {
- var i = e.slot.getServices();
- i && i.length && (n = i[0].getName())
- }
- var s = r.getResponseInformation() || {
- },
- o = r.getSlotId ? r.getSlotId() : {
- },
- u = r.getSlotElementId ? r.getSlotElementId() : o.getDomId ? o.getDomId() : null;
- t = {
- companion: n ? n === 'companion_ads' : !1,
- adUnit: r.getCsiId ? r.getCsiId() : 0,
- isEmpty: e.isEmpty,
- elementId: u,
- advertiserId: e.advertiserId || s.advertiserId,
- campaignId: e.campaignId || s.campaignId,
- lineItemId: e.lineItemId || s.lineItemId,
- creativeId: e.creativeId || s.creativeId,
- eventSource: e.eventSource || null,
- size: e.size && e.size.slice(0, 2) || null,
- viewed: !1,
- position: null
- };
- var a = document.getElementById(u);
- if (u && a) {
- t.position = {
- top: a.offsetTop,
- left: a.offsetLeft
- };
- if (e.isEmpty === undefined) {
- t.isEmpty = a.offsetWidth <= 0 && a.offsetHeight <= 0;
- if (!t.isEmpty && !t.size) {
- var f = r.getSizes();
- f && f.length && (t.size = [
- f[0].getWidth(),
- f[0].getHeight()
- ])
- }
- }
- }
- } catch (l) {
- v(l)
- }
- return t
- }
- function h(t) {
- t.eventSource = t.eventSource || r.RENDERED_FOR_CURRENT_UNIT;
- var n = c(t),
- i = d(t.slot);
- e[i] && (n.viewed = e[i].viewed),
- e[i] = n,
- u(n, i)
- }
- function p(t) {
- var n = d(t.slot),
- i = e[n] = e[n] || c(t);
- i.companion === undefined && (i.companion = t.serviceName === 'companion_ads'),
- i.viewed = !0;
- if (!i.eventSource || i.eventSource > r.DID_NOT_RENDER_BUT_VIEWED) i.eventSource = r.DID_NOT_RENDER_BUT_VIEWED;
- u(i, n)
- }
- function d(e) {
- try {
- var t = e.getSlotId ? e.getSlotId() : {
- },
- n = e.getSlotElementId ? e.getSlotElementId() : t.getDomId ? t.getDomId() : null,
- r = e.getCsiId ? e.getCsiId() : 0,
- i = t.getId ? t.getId() : 0;
- return [n,
- i,
- r].join(':')
- } catch (s) {
- v(s)
- }
- }
- function v(e) {
- window.tp && window.tp.util && window.tp.util.error && window.tp.util.error('DFP module error: ', e)
- }
- var e = {
- },
- t = !1,
- n,
- r = {
- RENDERED_FOR_CURRENT_UNIT: 1,
- DID_NOT_RENDER_BUT_VIEWED: 2,
- RECIEVED_FROM_GET_SLOTS: 3
- };
- return i(),
- {
- name: 'doubleClickForPublisher',
- initialize: i,
- setCustomHandler: o,
- getAds: a,
- resetAds: f
- }
- }),
- tp.define('doubleClickForPublisher', function () {
- }),
- tp.define('viewportExit', [
- 'jq',
- 'util'
- ], function (e, t) {
- function m() {
- if (l) return;
- l = !0,
- v = p,
- e(document).on('mouseleave', x),
- e(document).on('mousemove', T)
- }
- function g() {
- if (c) return;
- c = !0,
- window.addEventListener('popstate', function (e) {
- i && e.state && e.state.pianoViewportExitState === n && (i = !1, N('back'))
- });
- var e = window.history.state || {
- };
- e && e.pianoViewportExitState !== r && (e.pianoViewportExitState !== n && (e.pianoViewportExitState = n, window.history.replaceState(e, document.title)), window.history.pushState({
- pianoViewportExitState: r
- }, document.title)),
- i = !0
- }
- function y(e) {
- a.indexOf(e) !== - 1 ? d[e].visited || (d[e].visited = !0, v += d[e].value) : t.debug('viewportExit: the detect of the exit side failed')
- }
- function b(t, n) {
- function o() {
- return n <= 0
- }
- function u() {
- return t >= r
- }
- function a() {
- return n >= i
- }
- function f() {
- return t <= 0
- }
- var r = e(window).width(),
- i = e(window).height(),
- s = '';
- return u() && (s = 'right'),
- a() && (s = 'bottom'),
- f() && (s = 'left'),
- o() && (s = 'top'),
- s
- }
- function w(e) {
- if (e.length === 0) return - 1;
- var t = e[0],
- n = 0;
- for (var r = 1; r < e.length; r++) e[r] < t && (n = r, t = e[r]);
- return n
- }
- function E() {
- if (!s) return '';
- var t = e(window).width(),
- n = e(window).height(),
- r = [
- u,
- t - o,
- n - u,
- o
- ];
- return a[w(r)]
- }
- function S(e) {
- return e.clientX === e.clientY && e.clientX < 0 && e.clientX >= - 1
- }
- function x(e) {
- var n;
- n = S(e) ? '' : b(e.clientX, e.clientY),
- n || (n = E(), n || t.debug('viewportExit: the detect of the exit side failed')),
- n && y(n),
- N('all'),
- n === 'top' && N('top')
- }
- function T(e) {
- s = !0,
- u = e.clientY,
- o = e.clientX
- }
- function N(e) {
- if (!f) return;
- var n,
- r = [
- ],
- i = [
- ];
- for (var s = 0; s < h.length; s++) n = h[s],
- (n.detectExitMode === e || e === 'back' && n.detectBackButtonForMobile) && n.consumeEventFn() ? r.push(n) : i.push(n);
- r.length && t.debug('viewportExit: listeners was run fire with type: ', e),
- h = i;
- for (var s = 0; s < r.length; s++) n = r[s],
- n.callback()
- }
- function C(e, t, n) {
- (t.clientDevice === 'mobile' || t.clientDevice === 'tablet') && !!t.detectBackButtonForMobile && g(),
- m(),
- typeof n != 'function' && (n = function () {
- return !0
- }),
- h.push({
- callback: e,
- detectExitMode: t.detectExitMode,
- detectBackButtonForMobile: t.detectBackButtonForMobile,
- consumeEventFn: n
- })
- }
- function k() {
- h = [
- ]
- }
- function L() {
- return l
- }
- function A() {
- return v
- }
- function O() {
- v = p
- }
- var n = 'viewport-exit-activated',
- r = 'viewport-exit-prepared',
- i = !1,
- s = !1,
- o = 0,
- u = 0,
- a = [
- 'top',
- 'right',
- 'bottom',
- 'left'
- ],
- f = !0,
- l = !1,
- c = !1,
- h = [
- ],
- p = 0,
- d = {
- top: {
- visited: !1,
- value: 1
- },
- right: {
- visited: !1,
- value: 2
- },
- bottom: {
- visited: !1,
- value: 4
- },
- left: {
- visited: !1,
- value: 8
- }
- },
- v = p;
- return {
- name: 'viewportExit',
- initialize: m,
- isInitialized: L,
- addListener: C,
- resetSumOfCodesDirectionToDefault: O,
- getSumOfCodesDirection: A,
- removeListeners: k,
- enable: function () {
- f = !0
- },
- disable: function () {
- f = !1
- }
- }
- }),
- tp.define('viewportExit', function () {
- }),
- tp.define('condeUserProvider', [
- 'jq',
- 'api',
- 'util'
- ], function (e, t, n) {
- var r = function () {
- function s(e) {
- n.setAccessTokenListCookie({
- value: null
- }, null, !0);
- var t = n.getPossibleCookieDomains();
- for (var r in t) n.deleteCookie('amg_user', t[r]),
- n.deleteCookie('amg_user_partner', t[r]),
- n.deleteCookie('amg_user_info', t[r]),
- n.deleteCookie('amg_user_ext', t[r]),
- n.deleteCookie('amg_user_update', t[r]);
- n.deleteCookie('amg_user'),
- n.deleteCookie('amg_user_partner'),
- n.deleteCookie('amg_user_info'),
- n.deleteCookie('amg_user_ext'),
- n.deleteCookie('amg_user_update'),
- e && e()
- }
- function o(t) {
- n.setAccessTokenListCookie({
- value: t.token_list,
- cookie_domain: t.cookie_domain
- }, t.user_token);
- var r = {
- path: '/',
- expires: 730
- };
- t.cookie_domain && t.cookie_domain != 'localhost' && e.inArray(t.cookie_domain, n.getPossibleCookieDomains()) >= 0 && (r.domain = t.cookie_domain),
- e.cookie.raw = !0,
- n.__protected__.setCookie(t.params.cookieName, t.params.cookieValue, r),
- n.__protected__.setCookie('amg_user_partner', t.params.externalId, r),
- n.__protected__.setCookie('amg_user_info', t.params.userName, r),
- n.__protected__.setCookie('amg_user_ext', t.params.siteUserId, r),
- t.params.updateToken && n.__protected__.setCookie('amg_user_update', t.params.updateToken, r),
- e.cookie.raw = !1
- }
- var t = function () {
- return 'conde'
- },
- r = function () {
- var e = n.findCookieByName('amg_user_partner');
- return typeof e != 'undefined' && e && e.length >= 0 ? e : null
- },
- i = function () {
- return !!n.getUserTokenCookie()
- };
- return {
- getName: function () {
- return t()
- },
- getToken: function () {
- return r()
- },
- isUserValid: function () {
- return i()
- },
- onLoginSuccess: o,
- logout: s
- }
- }(),
- i = function () {
- return tp.useCondeUserProvider === !0 || tp.useCondeUserProvider === 'true'
- };
- return {
- name: 'condeUserProvider',
- isUserValid: function () {
- return r.isUserValid()
- },
- getToken: function () {
- return r.getToken()
- },
- getName: function () {
- return r.getName()
- },
- onLoginSuccess: function (e) {
- return r.onLoginSuccess(e)
- },
- logout: function (e) {
- return r.logout(e)
- },
- isConfigured: function () {
- return i()
- }
- }
- }),
- tp.define('condeUserProvider', function () {
- }),
- tp.define('pianoId', [
- 'jq',
- 'jwtDecode',
- 'util',
- 'containerUtils',
- 'postmessage',
- 'log',
- 'observer'
- ], function (e, t, n, r, i, s, o) {
- function A(e) {
- S.filter(function (e) {
- return e.config.displayMode === 'inline'
- }).filter(function (t) {
- return !e || e.some(function (e) {
- return t.container.is(e)
- })
- }).forEach(function (e) {
- r.resizeIframe(e, {
- width: e.container.width()
- }),
- i.send('resize', {
- width: e.container.width()
- }, e.iframeId)
- })
- }
- function O(e) {
- var n = t(e);
- st({
- user: n,
- token: e
- })
- }
- function M(t) {
- if (k && !t) return k;
- var r = e.Deferred();
- k = r.promise(),
- tp.setUsePianoIdUserProvider(!0),
- E = t || {
- };
- var i = n.getQueryParamByName(u);
- E.resetPasswordToken === undefined && i && (E.resetPasswordToken = i);
- var s = n.getQueryParamByName(f),
- o = n.getQueryParamByName(a);
- return !ht() && o ? (O(o), n.removeQueryParamByName(a), setTimeout(r.resolve, 50)) : !ht() && s ? (n.startCall('refreshUserToken'), kt(s).then(function (e) {
- if (!e) return;
- try {
- e.access_token && (O(e.access_token), n.removeQueryParamByName(f), n.doneCall('refreshUserToken'))
- } catch (t) {
- }
- }).always(r.resolve)) : setTimeout(r.resolve, 50),
- k
- }
- function _(t) {
- if (C && !t) return C;
- var r = e.Deferred();
- return C = r.promise(),
- t && t.preview ? (setTimeout(r.resolve, 10), C) : (n.startCall('refreshUserToken'), M(t).always(function () {
- pt().always(function () {
- n.doneCall('refreshUserToken'),
- r.resolve()
- })
- }), C)
- }
- function D() {
- return M()
- }
- function P(t) {
- _().then(function () {
- var r = e.extend({
- }, E, t, {
- isRegistration: !0
- });
- ht() ? B(r) : x ? (X(t), n.log('Modal login window already shown')) : (X(t), V(r), nt(r))
- })
- }
- function H(t) {
- _().then(function () {
- var r = e.extend({
- }, E, t, {
- isRegistration: !1
- }),
- s = r.formName;
- if (!s) throw new Error('Form name should be specified, like\ntp.pianosId.showForm({formName: "..."});');
- var o = function () {
- if (x) n.log('Modal login window already shown');
- else {
- V(r),
- X(r);
- if (!r.preview && L) {
- n.log('Skip show form, register new user');
- return
- }
- if (!r.hideIfComplete) return e.extend(r, {
- readyCallback: function (e) {
- i.send('setToken', lt(), e.iframeId)
- }
- }),
- nt(r);
- Ct(r).then(function (t) {
- if (t && t.has_all_custom_field_values_filled && r.hideIfComplete) {
- n.log('Skip show form, all fields are completed');
- return
- }
- var s = e.extend({
- }, r, {
- readyCallback: function (e) {
- i.send('userData', t, e.iframeId)
- }
- });
- nt(s)
- })
- }
- };
- if (!t.preview && !ht()) {
- var u = e.extend({
- }, t, {
- closedCallback: function () {
- ht() && o()
- }
- });
- P(u)
- } else o()
- })
- }
- function B(e, t) {
- var n = ft();
- if (!n) return;
- var r = ot(),
- i = {
- token: r,
- user: n,
- source: t
- };
- if (e) {
- e.loggedIn && e.loggedIn(i);
- return
- }
- R('loggedIn', i),
- E.loggedIn && E.loggedIn(i),
- R('loginSuccess');
- if (t === d) {
- var s = {
- event: 'loginSuccess',
- source: t,
- params: i.user,
- user_token: i.token
- };
- R('fire_loginSuccess', s),
- U('loginSuccess', s)
- }
- }
- function j(e) {
- var t = {
- source: e
- };
- R('loggedOut', t),
- E.loggedOut && E.loggedOut(t),
- U('logout', t)
- }
- function F(e, t) {
- var n = {
- login: 'loginDisplayed',
- register: 'registerDisplayed'
- },
- r = n[e];
- z(r, {
- }, t)
- }
- function I(e) {
- R('profileUpdate', e),
- E.profileUpdate && E.profileUpdate(e)
- }
- function q(e, t) {
- e && e.customEvent && e.customEvent(t),
- U('customEvent', t)
- }
- function R(e, t) {
- T[e] && T[e].forEach(function (e) {
- e(t)
- })
- }
- function U(e, t) {
- N[e] && N[e].forEach(function (e) {
- e(t)
- })
- }
- function z(e, t, n) {
- !n && R(e, t),
- U(e, t)
- }
- function W() {
- callbacks.onShow.splice(0).forEach(function (e) {
- e()
- })
- }
- function X(e) {
- if (!e) return;
- Object.keys(T).forEach(function (t) {
- e[t] && T[t].push(e[t])
- })
- }
- function V(e) {
- e.aid || (e.aid = tp.aid),
- e.displayMode || (e.displayMode = 'modal'),
- e.displayMode === 'popup' ? (e.width = e.width || J(), e.height = e.height || 460) : e.displayMode === 'modal' && (e.width = e.width || J())
- }
- function $(e) {
- b = e
- }
- function J() {
- var e = window.innerWidth || document.documentElement.clientWidth || window.screen.width;
- return Math.min(e, 400)
- }
- function K(e) {
- var n = t(e);
- ct({
- user: n,
- token: e
- })
- }
- function Q(e, t, n) {
- L = !1,
- ut(),
- dt().then(function () {
- n || j(t),
- e && e()
- })
- }
- function G(e) {
- function t(t) {
- var i = e.config.trackingId,
- o = e.config.formName;
- switch (t.event) {
- case 'loaded':
- e.config.displayMode === 'modal' && r.checkBackdropAndContainer(e.container, !0),
- e.config.loadedCallback && e.config.loadedCallback(e);
- break;
- case 'stateReady':
- e.config.readyCallback && e.config.readyCallback(e);
- break;
- case 'resize':
- r.resizeIframe(e, t.params);
- break;
- case 'restoreSize':
- e.config.displayMode === 'inline' && r.resizeIframe(e, {
- width: e.container.width()
- });
- break;
- case 'loginSuccess':
- t.params.source = d,
- ct(t.params).then(e.config.callback),
- L = t.params.registration,
- z('loginSuccess');
- break;
- case 'loginFailed':
- z('loginFailed', t.params);
- break;
- case 'registrationSuccess':
- z('registrationSuccess');
- break;
- case 'registrationFailed':
- z('registrationFailed', t.params);
- break;
- case 'lang':
- yt(t.params.lang, !0);
- break;
- case 'customEvent':
- q(e.config, t.params);
- break;
- case 'closed':
- mt(e, !0),
- e.config.closedCallback && e.config.closedCallback(e);
- break;
- case 'cfFormSubmission':
- s.__protected__.logCustomFormSubmission(i, o, m);
- break;
- case 'formSend':
- case 'formSkip':
- mt(e);
- break;
- case 'cfAppImpression':
- s.__protected__.logCustomFormImpression(i, o, g);
- break;
- case 'cfAppSubmission':
- s.__protected__.logCustomFormSubmission(i, o, g);
- break;
- case 'cfFormImpression':
- s.__protected__.logCustomFormImpression(i, o, m);
- break;
- case 'changeScreen':
- F(t.params.screen);
- break;
- case 'screenReady':
- W();
- break;
- default:
- n.debug('Received invalid event type: ' + t.event);
- return
- }
- }
- return t
- }
- function Y(e) {
- switch (e.params.event) {
- case 'cfAppImpression':
- case 'cfFormImpression':
- s.__protected__.logCustomFormImpression(e.params.trackingId, e.params.trackingId, y);
- break;
- case 'cfFormSubmission':
- case 'cfFormSubmission':
- s.__protected__.logCustomFormSubmission(e.params.trackingId, e.params.trackingId, y);
- break;
- case 'changeScreen':
- F(e.params.params.screen, !0);
- break;
- case 'loginFailed':
- case 'registrationFailed':
- case 'registrationSuccess':
- z(e.params.event, e.params.params, !0);
- break;
- default:
- n.debug('Received invalid event type: ' + e.params.event);
- return
- }
- }
- function Z() {
- var e = tp.sandbox || tp.isNonProdEndpoint(),
- t = E.iframeUrl || tp.pianoIdUrl || !e && v || '/';
- return t === '/' && (t = tp.getEndpointRoot(!0)),
- t.replace(/\/$/, '')
- }
- function et() {
- var e = Z();
- return e + '/id/'
- }
- function tt(t, n, r, i) {
- var s = {
- client_id: n.aid,
- sender: r.iframeId,
- origin: i || document.location.origin || document.location.href,
- site: document.location.origin || document.location.href
- },
- o = wt();
- return o && (s.lang = o),
- n.disableSignUp && (s.disable_sign_up = !0),
- n.screen && (s.screen = n.screen),
- n.resetPasswordToken && (s.reset = n.resetPasswordToken),
- n.stage && (s.stage = n.stage),
- n.resetPasswordLandingUrl && (s.reset_uri = n.resetPasswordLandingUrl),
- n.width && n.displayMode === 'modal' && (s.width = n.width),
- r.iframeUrl && (s.url = r.iframeUrl),
- r.pos && (s.width = r.pos.width, s.height = r.pos.height, s.top = r.pos.top, s.left = r.pos.left),
- n.formName && (s.form_name = n.formName),
- n.formName && !/\.html$/.test(t) && !n.isRegistration && (t += 'form.html'),
- n.hideIfComplete && (s.hide_if_complete = n.hideIfComplete),
- n.preview && (s.preview = n.preview),
- n.templateVersion && (s.templateVersion = n.templateVersion),
- n.template && (s.template = n.template),
- n.accessToken && (s.access_token = n.accessToken),
- [
- t,
- e.param(s)
- ].join('?')
- }
- function nt(t) {
- var s = e(t.containerSelector).first(),
- u = 'piano-id-' + (t.isRegistration ? '' : 'form-') + n.randomString();
- t.singleContainer = s.length ? s[0] : undefined;
- var a = {
- iframeId: u,
- containerSelector: t.containerSelector,
- width: t.width,
- height: t.height
- },
- f = tt(et(), t, a),
- l = et(),
- c,
- h,
- d = !0,
- v;
- t.iframeParams = a;
- if (t.displayMode === 'inline') {
- var m = r.initInlineContainer(t);
- c = m.container,
- h = r.generateIframe(t, a, f),
- d = m.containerReady,
- t.observeContainer && (v = o.create(c, A))
- } else if (t.displayMode === 'modal') c = r.getModalContainer(t, function () {
- return mt(x)
- }),
- h = r.generateIframe(t, a, f);
- else if (t.displayMode === 'popup') if (n.isIE()) {
- c = r.generateIframeWrapper(),
- f = tt(et(), t, a, et() + 'proxy.html'),
- a.iframeUrl = f,
- a.pos = r.getPopupPosition(a);
- var g = tt(et() + 'proxy.html', t, a);
- t.displayMode = 'inlinePopup',
- h = r.generateIframe({
- }, a, g)
- } else {
- c = r.generatePopup(a, f);
- try {
- try {
- h = e(c.document)
- } catch (y) {
- h = e(c)
- }
- } catch (y) {
- h = e()
- }
- }
- var b = {
- iframeId: a.iframeId,
- config: t,
- element: h,
- container: c,
- iframeParams: a,
- containerReady: d
- },
- w = {
- center: n.centerScreen(),
- originUrl: document.location.href
- };
- i.init({
- postMessageUrl: l,
- receive: G(b),
- iframe: b,
- iframeParams: a
- }, w);
- if (t.displayMode === 'inline') {
- var E = e('<div>', {
- 'class': p
- });
- E.append(h),
- c.append(E)
- } else t.displayMode === 'modal' ? c.append(h) : t.displayMode === 'inlinePopup' && (c.append(h), e('body').append(c));
- return n.debug('creating iframe: ', t),
- S.push(b),
- t.displayMode === 'modal' && (x = b, x.observer = v),
- b
- }
- function rt() {
- if (!x) return;
- r.closeModal(x),
- x.element.remove(),
- x.observer && x.observer.disconnect(),
- x = null
- }
- function it(e) {
- var t = {
- path: '/'
- },
- r = n.__protected__.getCookie(h),
- i = n.extractCookieDomain(e || r);
- return i && (t.domain = i),
- t
- }
- function st(e) {
- if (!e || !e.user || !e.token) return;
- at();
- var t = new Date(e.user.exp * 1000),
- r = it(e.cookie_domain);
- if (e.user.rememberMe === undefined || e.user.rememberMe) r.expires = t;
- n.__protected__.setCookie(l, e.token, r),
- e.cookie_domain && (r.expires = 30, n.__protected__.setCookie(h, e.cookie_domain, r))
- }
- function ot() {
- var e = n.findCookieByName(l);
- return e ? e : null
- }
- function ut(e) {
- return at(e)
- }
- function at(t) {
- var r = it(),
- i = n.getPossibleCookieDomains(r.domain);
- t && n.__protected__.logRemoveTokens(t),
- i.forEach(function (t) {
- var n = e.extend({
- }, r, {
- domain: t
- });
- e.removeCookie(l, n)
- })
- }
- function ft() {
- var e = null,
- n = ot();
- if (n) try {
- e = t(n);
- if (e) {
- e.firstName = e.given_name,
- e.lastName = e.family_name,
- e.valid = !0,
- e.uid = e.sub;
- var r = new Date,
- i = new Date(e.exp * 1000);
- i < r && (ut(n), e = null)
- }
- } catch (s) {
- }
- return e
- }
- function lt() {
- return ot()
- }
- function ct(e, t) {
- st(e);
- var n = vt(e).pipe(function () {
- !t && B(null, e.source)
- });
- return gt(),
- n
- }
- function ht() {
- return !!ft()
- }
- function pt() {
- n.startCall('refreshUserToken');
- var r = e.Deferred(),
- i = function () {
- r.reject(),
- n.doneCall('refreshUserToken')
- };
- return e.ajax({
- url: et() + 'api/v1/identity/token/verify',
- data: {
- client_id: E.aid || tp.aid,
- token: lt() || ''
- },
- dataType: 'jsonp',
- success: function (e) {
- !e.error && e.access_token ? ct({
- token: e.access_token,
- user: t(e.access_token)
- }).always(function () {
- r.resolve()
- }) : ut(lt()),
- i()
- },
- error: i,
- xhrFields: {
- withCredentials: !0
- },
- crossDomain: !0
- }),
- setTimeout(i, b * 2),
- r.promise()
- }
- function dt() {
- var t = e.Deferred();
- return e.ajax({
- url: et() + 'api/v1/identity/logout',
- data: {
- client_id: E.aid || tp.aid
- },
- dataType: 'jsonp',
- complete: t.resolve,
- xhrFields: {
- withCredentials: !0
- },
- crossDomain: !0
- }),
- setTimeout(t.resolve, b),
- t.promise()
- }
- function vt(t) {
- var n = e.Deferred();
- return e.ajax({
- url: et() + 'api/v1/identity/vxauth/cookie',
- data: {
- client_id: E.aid || tp.aid,
- token: t.token
- },
- dataType: 'jsonp',
- complete: n.resolve,
- xhrFields: {
- withCredentials: !0
- },
- crossDomain: !0
- }),
- setTimeout(n.resolve, b),
- n.promise()
- }
- function mt(e, t) {
- if (!e) return;
- t ? e.closed || (e.closed = !0, e.config.displayMode === 'inline' ? e.container.empty() : e.config.displayMode === 'popup' ? e.container.close() : e.config.displayMode === 'modal' ? rt(e) : (e.container.empty(), e.container.detach())) : (i.send('close', {
- }, e.iframeId), S = S.filter(function (t) {
- return t.iframeId !== e.iframeId
- }), setTimeout(function () {
- mt(e, !0)
- }, w))
- }
- function gt() {
- S.forEach(function (e) {
- mt(e)
- }),
- S = [
- ]
- }
- function yt(e, t) {
- var r = it();
- r.expires = 30,
- n.__protected__.setCookie(c, e, r),
- t || S.forEach(function (t) {
- i.send('lang', {
- lang: e
- }, t.iframeId)
- }),
- T.langChange.forEach(function (t) {
- t && t(e)
- })
- }
- function bt(e) {
- return T.langChange.push(e),
- function () {
- T.langChange.splice(T.indexOf(e), 1)
- }
- }
- function wt() {
- return n.__protected__.getCookie(c) || ''
- }
- function Et(e) {
- var t = {
- source: e.source,
- token: e.user_token,
- user: e.params,
- cookie_domain: e.cookie_domain
- };
- ct(t)
- }
- function St(e, t) {
- var n = {
- token: e.token,
- user: e.user,
- cookie_domain: e.cookie_domain
- };
- ct(n, !0).pipe(function () {
- t(),
- I(n)
- })
- }
- function xt() {
- return tp.usePianoIdUserProvider === !0 || tp.usePianoIdUserProvider === 'true'
- }
- function Tt() {
- return 'piano_id'
- }
- function Nt(e, t) {
- N[e] = N[e] || [
- ],
- N[e].push(t)
- }
- function Ct(t) {
- var n = e.extend({
- }, E, t),
- r = e.Deferred();
- return e.ajax({
- url: et() + 'api/v1/identity/userinfo',
- data: {
- client_id: E.aid || tp.aid,
- access_token: lt(),
- form_name: n.formName
- },
- dataType: 'jsonp',
- success: r.resolve,
- complete: function () {
- return r.resolve()
- },
- xhrFields: {
- withCredentials: !0
- },
- crossDomain: !0
- }),
- setTimeout(r.resolve, b * 10),
- r.promise()
- }
- function kt(t) {
- var n = e.Deferred(),
- r = function () {
- n.resolve()
- };
- return e.ajax({
- url: et() + 'api/v1/identity/socialAuthResponse',
- data: {
- response_id: t
- },
- dataType: 'jsonp',
- success: n.resolve,
- complete: r,
- xhrFields: {
- withCredentials: !0
- },
- crossDomain: !0
- }),
- setTimeout(r, b * 2),
- n.promise()
- }
- var u = 'reset_token',
- a = 'piano_social_token',
- f = 'piano_social_response_id',
- l = n.getAidSpecifiedName('__utp'),
- c = '__pil',
- h = '__pid',
- p = 'piano-id-container',
- d = 'PIANOID',
- v = 'https://id.tinypass.com',
- m = 'show_form',
- g = 'registration',
- y = 'checkout',
- b = 300,
- w = 600,
- E = {
- },
- S = [
- ],
- x,
- T = {
- loggedIn: [
- ],
- loggedOut: [
- ],
- loginSuccess: [
- ],
- registrationSuccess: [
- ],
- profileUpdate: [
- ],
- langChange: [
- ],
- fire_loginSuccess: [
- ],
- loginDisplayed: [
- ],
- registerDisplayed: [
- ],
- loginFailed: [
- ],
- registrationFailed: [
- ],
- onShow: [
- ]
- },
- N = {
- },
- C,
- k,
- L;
- return e(window).resize(function () {
- return A()
- }),
- {
- name: 'pianoId',
- init: _,
- prepare: D,
- show: P,
- showForm: H,
- loginByToken: K,
- logout: Q,
- getToken: lt,
- getUser: ft,
- getName: Tt,
- isConfigured: xt,
- onLoginSuccess: Et,
- onProfileUpdate: St,
- isUserValid: ht,
- setCallbacks: X,
- getIframeUrl: et,
- updateLang: yt,
- onLangChange: bt,
- getLang: wt,
- registerCallback: Nt,
- __protected__: {
- offerMessageReceiver: Y
- },
- __private__: {
- prepareConfig: V,
- setRequestTimeout: $
- }
- }
- }),
- tp.define('pianoId', function () {
- }),
- tp.define('observer', [
- 'util',
- 'jq'
- ], function (e, t) {
- function s(e) {
- this.callback = e,
- this._isActive = !1,
- this.targets = [
- ],
- this.timeout = 200
- }
- var n = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver,
- r = !!n,
- i = {
- attributes: !0
- };
- return s.prototype._mutationSearch = function () {
- var e = this;
- this.targets.forEach(function (t) {
- var n = e._getState(t.element);
- !n === t.currentState && (t.currentState = n, e.callback([{
- target: t.element
- }
- ]))
- }),
- this._isActive && setTimeout(this._mutationSearch.bind(this), this.timeout)
- },
- s.prototype._getState = function (e) {
- var t = [
- ].slice.call(e.attributes),
- n = t.reduce(function (t, n) {
- return t[n.name] = e.getAttribute(n.name),
- t
- }, {
- });
- return JSON.stringify(n)
- },
- s.prototype.observe = function (t) {
- this.targets.push({
- id: e.randomString(),
- element: t,
- currentState: this._getState(t)
- }),
- this._isActive || (this._isActive = !0, this._mutationSearch())
- },
- s.prototype.disconnect = function () {
- this._isActive = !1,
- delete this.targets
- },
- {
- name: 'observer',
- create: function (o, u) {
- o.length || e.error('element must be NODE');
- var a = r ? n : s,
- f = new a(function (e) {
- var n = e.map(function (e) {
- return t(e.target)
- });
- return typeof u == 'function' && u(n)
- });
- return f.observe(o[0], i),
- f
- }
- }
- }),
- tp.define('applePay', [
- 'jq',
- 'postmessage',
- 'util'
- ], function (e, t, n) {
- function c(e) {
- try {
- o = JSON.parse(e.data)
- } catch (u) {
- }
- if ('startCheckout' === o.event) {
- var a = window.ApplePaySession && ApplePaySession.canMakePayments();
- t.broadcast('EVENT_APPLE_PAY_CAN_MAKE_PAYMENTS', {
- canMakePayments: a
- })
- } else if (o.clientToken) {
- var c = o.clientToken;
- h(),
- p();
- var d = setInterval(function () {
- d !== undefined && i === !0 && s === !0 && (clearInterval(d), braintree.client.create({
- authorization: c
- }, function (e, r) {
- if (e) {
- t.broadcast('payment-error', {
- errorCode: 100
- }),
- n.log('[TP] Client error: ' + e.message);
- return
- }
- braintree.applePay.create({
- client: r
- }, function (e, n) {
- if (e) {
- t.broadcast('payment-error', {
- errorCode: 101
- });
- return
- }
- f = n,
- t.broadcast('applePayInit', {
- })
- })
- }))
- }, 300)
- } else if (o.beginSession) {
- try {
- l = f.createPaymentRequest({
- currencyCode: o.currencyCode,
- total: {
- label: o.resourceTitle,
- amount: o.chargeAmount
- }
- })
- } catch (v) {
- t.broadcast('payment-error', {
- errorCode: 101
- })
- }
- var m = new ApplePaySession(r, l);
- m.onvalidatemerchant = function (e) {
- f.performValidation({
- validationURL: e.validationURL,
- displayName: o.resourceTitle
- }, function (e, n) {
- if (e) {
- m.abort(),
- t.broadcast('payment-error', {
- errorCode: 102
- });
- return
- }
- m.completeMerchantValidation(n)
- })
- },
- m.onpaymentauthorized = function (e) {
- f.tokenize({
- token: e.payment.token
- }, function (e, n) {
- if (e) {
- t.broadcast('payment-error', {
- errorCode: 103
- }),
- m.completePayment(ApplePaySession.STATUS_FAILURE);
- return
- }
- m.completePayment(ApplePaySession.STATUS_SUCCESS),
- t.broadcast('applePayNonce', {
- nonce: n.nonce
- })
- })
- },
- m.begin()
- }
- }
- function h() {
- if (v()) return;
- d(u, function () {
- i = !0
- })
- }
- function p() {
- if (m()) return;
- d(a, function () {
- s = !0
- })
- }
- function d(e, t) {
- var n = document.createElement('script'),
- r = document.getElementsByTagName('script') [0];
- r.parentNode.insertBefore(n, r),
- n.type = 'text/javascript',
- n.async = !0,
- n.onload = t,
- n.src = e
- }
- function v() {
- var e = document.getElementsByTagName('script');
- for (var t = 0, n = e.length; t < n; t++) if (e[t].src.indexOf(u) > - 1) return !0
- }
- function m() {
- var e = document.getElementsByTagName('script');
- for (var t = 0, n = e.length; t < n; t++) if (e[t].src.indexOf(a) > - 1) return !0
- }
- var r = 2,
- i = !1,
- s = !1,
- o = {
- },
- u = 'https://js.braintreegateway.com/web/3.22.2/js/client.min.js',
- a = 'https://js.braintreegateway.com/web/3.22.2/js/apple-pay.min.js',
- f,
- l;
- return window.addEventListener('message', c, !1),
- {
- name: 'applePay'
- }
- }),
- tp.define('applePay', function () {
- }),
- tp.define('idle', [
- 'jq',
- 'util'
- ], function (e, t) {
- function o() {
- if (n) return;
- n = !0,
- e(document).on('mousemove', a),
- e(document).on('keypress', a),
- e(window).scroll(a)
- }
- function u() {
- r.length && f(),
- i && clearTimeout(i),
- r.length && (i = setTimeout(u, s))
- }
- function a() {
- var e = Date.now();
- for (var t = 0; t < r.length; t++) r[t].startTime = e;
- clearTimeout(i),
- r.length && (i = setTimeout(u, s))
- }
- function f() {
- var e,
- n = [
- ],
- i = [
- ],
- s,
- o,
- u = Date.now();
- for (var a = 0; a < r.length; a++) e = r[a],
- s = u - e.startTime,
- o = !1,
- s >= e.idleTime && (e.consumeEventFn() ? o = !0 : e.startTime = u),
- o ? n.push(e) : i.push(e);
- n.length && t.debug('idle: run fire'),
- r = i;
- for (var a = 0; a < n.length; a++) e = n[a],
- e.callback()
- }
- function l(e, t, n) {
- o(),
- typeof n != 'function' && (n = function () {
- return !0
- }),
- r.push({
- callback: e,
- idleTime: t * 1000,
- startTime: Date.now(),
- consumeEventFn: n
- }),
- i || (i = setTimeout(u, s))
- }
- function c() {
- r = [
- ]
- }
- var n = !1,
- r = [
- ],
- i,
- s = 200;
- return {
- name: 'idle',
- initialize: o,
- addListener: l,
- removeListeners: c
- }
- }),
- tp.define('idle', function () {
- }),
- tp.define('interaction', [
- 'jq',
- 'util'
- ], function (e, t) {
- function r(r, i, s) {
- var o = function (e) {
- var t = {
- click: 'click',
- doubleClick: 'dblclick',
- rightClick: 'contextmenu',
- mouseOut: 'mouseout',
- mouseIn: 'mouseenter'
- },
- n = [
- ];
- for (var r = 0; r < e.length; r++) {
- var i = e[r];
- n.push(t[i])
- }
- return n
- };
- typeof s != 'function' && (s = function () {
- return !0
- }),
- t.__protected__.documentReady(function () {
- for (var t = 0; t < i.length; t++) {
- var u = i[t],
- a = o(u.elementActions).join(' '),
- f = u.elementSelector,
- l = u.repetitive;
- a.trim().length && function (t, i, o) {
- var u = function () {
- if (!s()) return;
- o || e('body').off(i, t, u),
- r()
- };
- e('body').on(i, t, u),
- n.__private__.boundInteractions.push({
- action: a,
- selector: f,
- func: u
- })
- }(f, a, l)
- }
- })
- }
- function i() {
- e.each(n.__private__.boundInteractions, function (t, n) {
- e('body').off(n.action, n.selector, n.func)
- }),
- n.__private__.boundInteractions = [
- ]
- }
- var n = {
- __private__: {
- },
- __protected__: {
- }
- };
- return n.name = 'interaction',
- n.bind = r,
- n.unbindAll = i,
- n.__private__.boundInteractions = [
- ],
- n
- }),
- tp.define('interaction', function () {
- }),
- tp.define('require-css/css!styles/offer', [
- ], function () {
- }),
- tp.define('log', [
- 'jq',
- 'util'
- ], function (e, t) {
- var n = function (e) {
- var t = [
- ];
- for (var n in e) {
- var r = e[n];
- t.push(encodeURIComponent(n) + '=' + encodeURIComponent(typeof r == 'object' ? JSON.stringify(r) : r))
- }
- return t.join('&')
- },
- r = function (t, r) {
- var i = tp.getExperienceEndpoint(!1) + t + '?' + n(r);
- e.ajax({
- url: i,
- dataType: 'jsonp'
- })
- },
- i = function (e, n, i) {
- var s = {
- tracking_id: e,
- event_group_id: n,
- custom_params: i || ''
- };
- if (!e) {
- t.log('Parameter trackingId is required to log micro conversion.');
- return
- }
- if (!n) {
- t.log('Parameter eventGroupId is required to log micro conversion.');
- return
- }
- r('/api/v3/conversion/logMicroConversion', s)
- },
- s = function (e, n, i, s, o, u, a, f) {
- var l = {
- tracking_id: e,
- term_id: n,
- term_name: i
- };
- if (!e) {
- t.log('Parameter trackingId is required to log conversion.');
- return
- }
- if (!n) {
- t.log('Parameter termId is required to log conversion.');
- return
- }
- if (!i) {
- t.log('Parameter termName is required to log conversion.');
- return
- }
- typeof s != 'undefined' && (l.step_number = s),
- typeof o != 'undefined' && (l.amount = o),
- typeof u != 'undefined' && (l.currency = u),
- typeof a != 'undefined' && (l.custom_params = a),
- typeof f != 'undefined' && (l.conversion_category = f),
- r('/api/v3/conversion/log', l)
- },
- o = function (e) {
- typeof e == 'object' ? s(e.tracking_id, e.term_id, e.term_name, e.step_number, e.amount, e.currency, e.custom_params, e.conversion_category) : s.apply(this, arguments)
- },
- u = function (e, n, i, s) {
- var o = {
- tracking_id: e,
- step_number: n,
- step_name: i,
- custom_params: s || ''
- };
- if (!e) {
- t.log('Parameter trackingId is required to log funnel step.');
- return
- }
- if (!n) {
- t.log('Parameter stepNumber is required to log funnel step.');
- return
- }
- if (!i) {
- t.log('Parameter stepName is required to log funnel step.');
- return
- }
- r('/api/v3/conversion/logFunnelStep', o)
- },
- a = function (e, n, i) {
- n || t.log('Parameter formName is required to log impression.'),
- i || t.log('Parameter source is required to log impression.');
- var s = {
- aid: tp.aid,
- pageview_id: tp.main.fetchPageViewId(),
- custom_form_name: n,
- custom_form_source: i
- },
- o = tp.user.getProvider().getToken();
- return o && (s.user_token = o),
- e && (s.tracking_id = e),
- r('/api/v3/customform/log/impression', s)
- },
- f = function (e, n, i) {
- n || t.log('Parameter formName is required to log submission.'),
- i || t.log('Parameter source is required to log submission.');
- var s = {
- aid: tp.aid,
- pageview_id: tp.main.fetchPageViewId(),
- custom_form_name: n,
- custom_form_source: i
- },
- o = tp.user.getProvider().getToken();
- return o && (s.user_token = o),
- e && (s.tracking_id = e),
- r('/api/v3/customform/log/submission', s)
- },
- l = function (r, i) {
- var s = n(i),
- o = r + '?' + s;
- if (navigator.sendBeacon) if (o.length > 6000) {
- var u = new Blob([s], {
- type: 'application/x-www-form-urlencoded'
- });
- navigator.sendBeacon(r, u)
- } else navigator.sendBeacon(o);
- else {
- var a = navigator.appVersion.indexOf('MSIE 9') !== - 1,
- f;
- a ? f = {
- dataType: 'jsonp',
- url: o
- }
- : f = {
- type: 'post',
- url: o,
- async: !1,
- xhrFields: {
- withCredentials: !0
- }
- },
- f.error = function () {
- t.debug('Beacon request has been failed', arguments)
- },
- e.ajax(f)
- }
- };
- return {
- name: 'log',
- logMicroConversion: i,
- logConversion: o,
- logFunnelStep: u,
- __protected__: {
- logCustomFormImpression: a,
- logCustomFormSubmission: f
- },
- __private__: {
- doLog: r,
- logBeaconRequest: l
- }
- }
- }),
- tp.define('gaService', [
- 'jq',
- 'util',
- 'postmessage',
- 'offer',
- 'myaccount',
- 'pianoId'
- ], function (e, t, n, r, i, s) {
- function a() {
- n.subscribe('loaded', function (e) {
- o && e.params && f(e.params.iframeId, o)
- })
- }
- function f(e, t) {
- n.send(u, {
- clientId: t
- }, e)
- }
- function l(e) {
- o = e,
- c(o)
- }
- function c(e) {
- h(u, {
- clientId: e
- })
- }
- function h(e, t) {
- n.broadcast(e, t)
- }
- var o = null,
- u = 'ga.setClientId';
- return a(),
- {
- name: 'gaService',
- setClientId: l
- }
- }),
- tp.define('pianoEsp', [
- 'jq',
- 'util'
- ], function (e, t) {
- var n = !1,
- r = function (r) {
- if (n) return;
- var s = window.PianoESPConfig || {
- };
- e.extend(s, r);
- if (s.id && s.visitor) {
- window.PianoESPConfig = s,
- t.debug('pianoESP: initialize PianoESP with config:', window.PianoESPConfig);
- var o = document.createElement('script');
- o.setAttribute('id', 'pnesplucidsdksel'),
- o.type = 'text/javascript',
- o.src = i() + '/public/sdk/v04/sdk.js?v=' + (localStorage && localStorage.lucidsdkver || 'xxx'),
- o.async = !0,
- document.getElementsByTagName('script') [0].parentNode.appendChild(o),
- n = !0
- }
- },
- i = function () {
- var e = '//api-esp.piano.io';
- return tp.espEndpoint ? e = tp.espEndpoint : tp.isSandbox() && (e = '//sandbox-api-esp.piano.io'),
- e
- };
- return {
- name: 'pianoEsp',
- __protected__: {
- init: r
- }
- }
- }),
- tp.define('versionService', [
- ], function () {
- function t() {
- return e
- }
- function n() {
- window.__tpVersion = t()
- }
- var e = '9.10.69, server-v9.10.69';
- return n(),
- {
- name: 'versionService',
- getTinypassVersion: t
- }
- }),
- tp.define('amp', [
- 'jq',
- 'util',
- 'api',
- 'user',
- 'pianoId'
- ], function (e, t, n, r, i) {
- function o() {
- window.close()
- }
- function u(n) {
- if (n && n.userState && e.isPlainObject(n.userState)) {
- var r = Object.keys(n.userState);
- if (r.filter(s.__private__.isUserStateNameValid).length !== r.length) return t.error('user_state accept only contain letters, numbers and underscore'),
- !1
- }
- return !0
- }
- function a(n) {
- n = n ? n : {
- };
- var u = r.getProvider();
- if (u.getName() !== i.getName()) {
- t.log('Current user provider' + u.name + ' is not allowed for amp');
- return
- }
- var a = n.loginSuccess && e.isFunction(n.loginSuccess) ? n.loginSuccess : o,
- f = function () {
- s.__private__.bindUserWithReaderId({
- }, a)
- },
- l = e.extend({
- }, s.__private__.globalConfig, n);
- if (r.isUserValid()) {
- f();
- return
- }
- l.loginSuccess = f,
- i.show(l)
- }
- function f(t) {
- t = e.isFunction(t) ? t : o;
- var n = r.getProvider();
- n.getName() === i.getName() ? i.logout(function () {
- s.__private__.unbindUserWithReaderId(t)
- }) : s.__private__.unbindUserWithReaderId(t)
- }
- function l(e) {
- return /^\w+$/i.test(e)
- }
- function c(t) {
- var n = {
- user_transient: !0,
- user_provider: s.__private__.composerOnlyProvider
- };
- t && t.readerId && (n.reader_id = t.readerId),
- t && t.userToken && (n.user_token = t.userToken),
- t && t.userProvider && (n.user_provider = t.userProvider, n.user_transient = !1);
- if (!u(t)) return !1;
- n.user_state = JSON.stringify(t.userState);
- var r = function (n) {
- n.code === 0 ? t.loginSuccess && e.isFunction(t.loginSuccess) && t.loginSuccess() : t.loginFail && e.isFunction(t.loginFail) && t.loginFail()
- };
- s.__private__.bindUserWithReaderId(n, r)
- }
- function h(e) {
- var r = {
- };
- r.reader_id = t.getQueryParamByName(s.__private__.READER_ID);
- if (!r.reader_id) {
- t.log('reader_id cannot be empty');
- return
- }
- n.callApi(s.__private__.unbindURL, r, e)
- }
- function p(e, r) {
- var i = e || {
- };
- i.reader_id || (i.reader_id = t.getQueryParamByName(s.__private__.READER_ID));
- if (!i.reader_id) {
- t.log('reader_id cannot be empty');
- return
- }
- n.callApi(s.__private__.bindURL, i, r)
- }
- var s = {
- __private__: {
- },
- __protected__: {
- }
- };
- return s.name = 'amp',
- s.showLogin = a,
- s.logout = f,
- s.login = c,
- s.__private__.composerOnlyProvider = 'publisher_user',
- s.__private__.globalConfig = {
- displayMode: 'inline',
- containerSelector: 'body',
- loginSuccess: s.__private__.bindUserWithReaderId
- },
- s.__private__.bindURL = '/amp/login',
- s.__private__.unbindURL = '/amp/logout',
- s.__private__.READER_ID = 'reader_id',
- s.__private__.bindUserWithReaderId = p,
- s.__private__.unbindUserWithReaderId = h,
- s.__private__.isUserStateNameValid = l,
- s
- }),
- tp.define('amp', function () {
- }),
- tp.define('performanceMetrics', [
- 'postmessage'
- ], function (e) {
- function u() {
- if (!window.performance || !window.PerformanceObserver) return;
- if (typeof performance.getEntries != 'function') return;
- e.subscribe(o, function (e) {
- r = e.sender,
- n = !0,
- c()
- });
- var t = performance.getEntries();
- a(t);
- var i = new PerformanceObserver(function (e) {
- a(e.getEntries())
- });
- i.observe({
- entryTypes: [
- 'frame',
- 'resource'
- ]
- })
- }
- function a(e) {
- e.forEach(function (e) {
- f(e)
- })
- }
- function f(e) {
- if (!p(e)) return;
- l(e)
- }
- function l(e) {
- if (!h()) {
- i.push(e);
- return
- }
- i.push(e),
- c()
- }
- function c() {
- if (!h()) return;
- i.forEach(function (t) {
- e.send(s, {
- entry: t
- }, r)
- }),
- i = [
- ]
- }
- function h() {
- return n && r
- }
- function p(e) {
- return t.some(function (t) {
- return e.name.match(t.resourceRegExp)
- })
- }
- var t = [
- {
- resourceRegExp: new RegExp('/checkout/offer/show'),
- label: 'showOffer'
- },
- {
- resourceRegExp: new RegExp('tinypass.min.js$'),
- label: 'tinypassMinJS'
- },
- {
- resourceRegExp: new RegExp('/xbuilder/experience/execute'),
- label: 'experienceExecute'
- }
- ],
- n = !1,
- r,
- i = [
- ],
- s = 'EVENT_TP_PERFORMANCE_DATA',
- o = 'EVENT_LOGGER_READY';
- return u(),
- {
- name: 'performanceMetrics'
- }
- }),
- tp.define('swg', [
- 'postmessage',
- 'user',
- 'jq',
- 'util',
- 'offer',
- 'eventUtils'
- ], function (e, t, n, r, i, s) {
- function l(e) {
- if (a.hasCallback(o)) {
- var t = {
- type: 'swg',
- flow: e
- };
- a.fireCallbacks(o, t, null, !0)
- }
- }
- function c(e) {
- var t = n.Deferred();
- return tp.api.callApi('/swg/check', {
- entitlement: JSON.stringify(e)
- }, function (e) {
- e.code !== 0 && (r.log(e.message), t.reject()),
- t.resolve(e.CheckSubscriptionResponse)
- }),
- t.promise()
- }
- function h(t, n, i, s, o) {
- tp.api.callApi('/swg/subscribe', {
- term_id: s,
- purchase_data: JSON.stringify(n),
- user_data: JSON.stringify(i)
- }, function (n) {
- if (n.code !== 0) {
- r.log(n.message);
- return
- }
- var i = n.data;
- p(i),
- e.broadcast('swgCheckoutComplete'),
- t.complete().then(function () {
- l(o)
- })
- })
- }
- function p(e) {
- e && t.getProvider().loginByToken && t.getProvider().loginByToken(e)
- }
- var o = 'externalCheckoutComplete',
- u = {
- LOGIN_PROMPT: 'loginPrompt',
- DEFERRED_ACCOUNT_CREATION: 'deferredAccountCreation',
- BUY: 'buy'
- },
- a = s.createEventManager([o]),
- f = !1;
- i.registerCallback('showOffer', function () {
- if (f) return;
- (window.SWG = window.SWG || [
- ]).push(function (e) {
- e.getEntitlements().then(function (t) {
- f = !0,
- console.log('* getEntitlements *'),
- console.log(t),
- t.enablesThis() && (c(t.getEntitlementForSource('google')).then(function (n) {
- if (!n) return;
- switch (n.type) {
- case 'USER_FOUND':
- var r = n.user_token;
- e.showLoginPrompt().then(function () {
- p(r),
- l(u.LOGIN_PROMPT)
- });
- break;
- case 'TERM_FOUND':
- var i = n.term_id;
- e.completeDeferredAccountCreation({
- entitlements: t,
- consent: !0
- }).then(function (e) {
- console.log('completeDeferredAccountCreation'),
- console.log(e);
- var t = e.purchaseData;
- e.purchaseData.raw.data && (t = {
- raw: e.purchaseData.raw.data,
- signature: e.purchaseData.raw.signature
- }),
- h(e, t, e.userData, i, u.DEFERRED_ACCOUNT_CREATION)
- })
- }
- }), t.ack())
- })
- })
- }), e.subscribe('swgCheckoutStart', function (e) {
- if (!window.SWG) return;
- var t = e.params.sku,
- n = e.params.termId;
- window.SWG.push(function (e) {
- e.setOnSubscribeResponse(function (e) {
- e.then(function (e) {
- console.log('setOnSubscribeResponse'),
- console.log(e),
- h(e, e.purchaseData, e.userData, n, u.BUY)
- })
- }),
- e.subscribe(t)
- })
- }); var d = !1, v = function (e) {
- if (d) return;
- if (e) {
- r.debug('swg: rendering swg markup with config:', e);
- var t = '{\n "@context": "http://schema.org",\n "@type": "NewsArticle",\n "isAccessibleForFree": ' + e.isAccessibleForFree;
- e.isAccessibleForFree === !1 && e.productId && (t = t + ',\n' + ' "isPartOf": {\n' + ' "@type": ["CreativeWork", "Product"],\n' + ' "name" : "' + e.resourceName + '",\n' + ' "productID": "' + e.productId + '"\n' + ' }'),
- t += '\n}';
- var n = document.createElement('script');
- n.type = 'application/ld+json',
- n.innerHTML = t,
- document.getElementsByTagName('script') [0].parentNode.appendChild(n),
- d = !0
- }
- }, m = !1, g = function () {
- if (m) return;
- r.debug('swg: adding swg.js library');
- var e = document.createElement('script');
- e.type = 'text/javascript',
- e.setAttribute('subscriptions-control', 'manual'),
- e.async = !0,
- e.src = 'https://news.google.com/swg/js/v1/swg.js',
- document.getElementsByTagName('script') [0].parentNode.appendChild(e),
- m = !0
- }; return {
- name: 'swg',
- __protected__: {
- injectMarkup: v,
- addLibrary: g
- },
- registerCallback: function (e, t) {
- a.addEvent(e),
- a.registerCallback(e, t)
- }
- }
- }), tp.define('swg', function () {
- }), tp.define('fbpixel', [
- 'jq',
- 'util'
- ], function (e, t) {
- var n = !1,
- r = function () {
- if (n) return;
- var e = tp.getFbPixelId();
- if (!e) {
- t.error('fbpixel: Facebook Pixel ID is not defined');
- return
- }
- t.log('fbpixel: Initialize Facebook Pixel tracking', e),
- !function (e, t, n, r, i, s, o) {
- if (e.fbq) return;
- i = e.fbq = function () {
- i.callMethod ? i.callMethod.apply(i, arguments) : i.queue.push(arguments)
- },
- e._fbq || (e._fbq = i),
- i.push = i,
- i.loaded = !0,
- i.version = '2.0',
- i.queue = [
- ],
- s = t.createElement(n),
- s.async = !0,
- s.src = r,
- o = t.getElementsByTagName(n) [0],
- o.parentNode.insertBefore(s, o)
- }(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js'),
- fbq('set', 'autoConfig', 'false', e),
- fbq('init', e),
- n = !0
- },
- i = function (e, r, i) {
- if (!n) {
- t.log('fbpixel: Skip tracking event - Facebook Pixel is not initalized', r, i);
- return
- }
- i || (i = {
- }),
- t.log('fbpixel: Track Facebook Pixel event', r, i),
- fbq(e, r, i)
- },
- s = function (e, t) {
- i('track', e, t)
- },
- o = function (e, t) {
- i('trackCustom', e, t)
- },
- u = function () {
- return n
- };
- return {
- name: 'fbpixel',
- __private__: {
- isInitialized: u
- },
- __protected__: {
- init: r,
- trackEvent: s,
- trackCustomEvent: o
- }
- }
- }), tp.define('fbsubscriptions', [
- 'jq',
- 'util',
- 'fbpixel',
- 'offer',
- 'user',
- 'api'
- ], function (e, t, n, r, i, s) {
- function a() {
- if (o) return;
- n.__protected__.init(),
- r.registerCallback('loaded', function () {
- var e = t.getQueryParamByName('surface');
- (e === 'meter_limit_reached' || e === 'locked_article') && n.__protected__.trackCustomEvent('ViewPaywall')
- }),
- r.registerCallback('loginSuccess', function () {
- n.__protected__.trackCustomEvent('LogIntoAccount'),
- n.__protected__.trackCustomEvent('CreateAccount')
- }),
- r.registerCallback('alreadyPurchased', function (e) {
- var t = e.rid;
- f(t)
- }),
- r.registerCallback('complete', function (e) {
- var t = e.rid;
- f(t),
- n.__protected__.trackEvent('Purchase')
- }),
- r.registerCallback('close', function () {
- l()
- }),
- o = !0
- }
- function f(e) {
- if (!e) {
- t.error('fbsubscriptions: \'rid\' could not be empty on generating subscription payload');
- return
- }
- var n = {
- aid: tp.aid,
- rid: e,
- account_linking_token: t.getQueryParamByName('account_linking_token'),
- user_token: i.getProvider().getToken(),
- user_provider: i.getProvider().getName()
- };
- s.callApi('/fbia/subscriptionPayload/generate', n, function (e) {
- e && e.data && (u = e.data)
- })
- }
- function l() {
- var e = t.getQueryParamByName('account_linking_token'),
- n = t.getQueryParamByName('redirect_uri');
- window.location = n + '?account_linking_token=' + encodeURIComponent(e) + '&subscription_payload=' + encodeURIComponent(u)
- }
- var o = !1,
- u = '',
- c = function () {
- return o
- };
- return {
- name: 'fbsubscriptions',
- __private__: {
- isInitialized: c
- },
- __protected__: {
- init: a
- }
- }
- }), function (e) {
- var t = document,
- n = 'appendChild',
- r = 'styleSheet',
- i = t.createElement('style');
- i.type = 'text/css',
- t.getElementsByTagName('head') [0][n](i),
- i[r] ? i[r].cssText = e : i[n](t.createTextNode(e))
- }('/*---------------------------------------------------------------------------------------\n Backdrop\n---------------------------------------------------------------------------------------*/\n\n.tp-backdrop {\n display: none;\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n background: #121214;\n z-index: 300000;\n opacity: 0;\n -webkit-transition: opacity .25s linear;\n -moz-transition: opacity .25s linear;\n -ms-transition: opacity .25s linear;\n -o-transition: opacity .25s linear;\n transition: opacity .25s linear;\n}\n\n.tp-backdrop.tp-active {\n opacity: .9;\n}\n\n/*---------------------------------------------------------------------------------------\n Modal container close button\n---------------------------------------------------------------------------------------*/\n\n.tp-modal .tp-close.tp-square {\n /*background: #578fe0;*/\n background: #ccc;\n border-radius: 0;\n border: 0;\n top: 0;\n right: -40px;\n}\n\n\n.tp-modal .tp-close {\n line-height: 37px;\n display: none;\n position: absolute;\n top: -20px;\n right: -20px;\n width: 40px;\n height: 40px;\n /*background: transparent url("libs/img/close.png") no-repeat;*/\n background: #ccc;\n border: 2px solid #fff;\n z-index: 300100;\n border-radius: 40px;\n opacity: 0;\n cursor: pointer;\n color: #fff;\n font-family: Arial, sans-serif;\n font-size: 22px;\n text-align: center;\n transform: scale(.25, .25);\n -moz-transform: scale(.25, .25);\n -ms-transform: scale(.25, .25);\n -webkit-transform: scale(.25, .25);\n -o-transform: scale(.25, .25);\n /*-webkit-transition: all .4s ease-in-out;*/\n /*-moz-transition: all .4s ease-in-out;*/\n /*-ms-transition: all .4s ease-in-out;*/\n /*-o-transition: all .4s ease-in-out;*/\n /*transition: all .4s ease-in-out;*/\n}\n\n.tp-modal .tp-close.tp-active {\n display: block;\n opacity: 1;\n transform: scale(1.0, 1.0);\n -moz-transform: scale(1.0, 1.0);\n -ms-transform: scale(1.0, 1.0);\n -webkit-transform: scale(1.0, 1.0);\n -o-transform: scale(1.0, 1.0);\n}\n\n.tp-modal {\n z-index: 300050;\n}\n\n@media screen and (max-width: 650px) {\n .tp-modal .tp-close {\n right: 0;\n }\n}\n\n\n/*---------------------------------------------------------------------------------------\n Modal\n---------------------------------------------------------------------------------------*/\n.tp-modal .tp-iframe-wrapper.tp-curtain {\n width: 600px;\n height: 480px;\n}\n\n.body-fixed {\n position: fixed;\n}\n\n.tp-modal-open {\n overflow: hidden!important;\n -webkit-overflow-scrolling: touch;\n}\n.tp-modal-open.tp-modal-resizing {\n -webkit-overflow-scrolling: auto;\n}\n\n/* fix for iOS input elements bug */\n.tp-modal-experiment.body-fixed {\n position: initial;\n}\n.tp-modal-experiment.tp-modal-open > * {\n display: none;\n}\n.tp-modal-experiment .tp-modal {\n position: relative;\n}\n/*Bug fix of firefox v57*/\n.tp-modal-close {\n overflow: auto;\n}\n\n.tp-iframe-wrapper {\n position: relative;\n margin: 40px auto;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.21);\n}\n.tp-modal {\n overflow-x: hidden;\n overflow-y: scroll;\n display: none;\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.tp-modal .tp-iframe-wrapper.tp-active {\n transform: scale(1.0, 1.0);\n -moz-transform: scale(1.0, 1.0);\n -ms-transform: scale(1.0, 1.0);\n -webkit-transform: scale(1.0, 1.0);\n -o-transform: scale(1.0, 1.0);\n}\n\n.tp-modal .tp-message {\n font-family: "Graphik Web Regular", Helvetica, Arial, sans-serif;\n padding: 10px;\n}\n\n.tp-modal .tp-btn-container {\n padding-left: 10px;\n padding-bottom: 10px;\n}\n\n.tp-btn {\n text-decoration: none;\n cursor: pointer;\n padding: 0px 18px;\n line-height: 40px;\n border-collapse: separate;\n border-radius: 4px;\n text-align: center;\n vertical-align: middle;\n text-decoration: none;\n display: inline-block;\n color: #fff;\n border: none;\n box-shadow: inset 0px -1px 0px rgba(216, 218, 221, 0.0);\n background: #3878D8;\n background-position: bottom;\n text-shadow: none;\n font-family: "Graphik Web Regular", Helvetica, Arial, sans-serif;\n white-space: nowrap;\n outline: 0;\n}\n\n.tp-please-wait.tp-active {\n display: block;\n opacity: .9;\n -webkit-transition: opacity .25s linear;\n -moz-transition: opacity .25s linear;\n -ms-transition: opacity .25s linear;\n -o-transition: opacity .25s linear;\n transition: opacity .25s linear;\n}\n\n.tp-please-wait {\n position: absolute;\n top: 0;\n left: 0;\n background-color: #999;\n opacity: 0;\n width: 100%;\n height: 100%;\n display: none;\n text-align: center;\n color: #fff;\n font-weight: lighter;\n font-family: "Open Sans", sans-serif;\n font-size: 15px;\n}\n\n.tp-please-wait > .tp-icon {\n width: 46px;\n height: 46px;\n background-image: url(\'data:image/gif;base64,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\');\n margin: 100px auto 20px auto;\n}\n\n/*---------------------------------------------------------------------------------------\n Close Button\n---------------------------------------------------------------------------------------*/\n\n.tp-iframe-wrapper.no-width .tp-close,\n.tp-iframe-wrapper.no-height .tp-close,\n.tp-modal.no-width .tp-close,\n.tp-modal.no-height .tp-close {\n display: none;\n}');
Add Comment
Please, Sign In to add comment