@qxs-bns/utils 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_virtual/ans-javascript-sdk/sdk/AnalysysAgent_JS_SDK.es6.min.mjs +2142 -0
- package/es/_virtual/ans-javascript-sdk/sdk/AnalysysAgent_JS_SDK.es6.min.mjs.map +1 -0
- package/es/index.d.ts +7 -0
- package/es/index.mjs +26 -0
- package/es/index.mjs.map +1 -0
- package/es/src/argo-log.d.ts +16 -0
- package/es/src/argo-log.mjs +56 -0
- package/es/src/argo-log.mjs.map +1 -0
- package/es/src/device.d.ts +4 -0
- package/{src/device.js → es/src/device.mjs} +2 -1
- package/es/src/device.mjs.map +1 -0
- package/es/src/file-operations.d.ts +42 -0
- package/es/src/file-operations.mjs +79 -0
- package/es/src/file-operations.mjs.map +1 -0
- package/es/src/json.d.ts +16 -0
- package/es/src/json.mjs +37 -0
- package/es/src/json.mjs.map +1 -0
- package/es/src/media.d.ts +1 -0
- package/{src/media.js → es/src/media.mjs} +1 -0
- package/es/src/media.mjs.map +1 -0
- package/es/src/storage.d.ts +31 -0
- package/{src/storage.js → es/src/storage.mjs} +9 -8
- package/es/src/storage.mjs.map +1 -0
- package/es/src/types.d.ts +20 -0
- package/es/src/types.mjs +30 -0
- package/es/src/types.mjs.map +1 -0
- package/es/src/use-api.d.ts +0 -0
- package/es/src/watermark.d.ts +47 -0
- package/es/src/watermark.mjs +147 -0
- package/es/src/watermark.mjs.map +1 -0
- package/lib/_virtual/ans-javascript-sdk/sdk/AnalysysAgent_JS_SDK.es6.min.js +30 -0
- package/lib/_virtual/ans-javascript-sdk/sdk/AnalysysAgent_JS_SDK.es6.min.js.map +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/src/argo-log.d.ts +16 -0
- package/lib/src/argo-log.js +2 -0
- package/lib/src/argo-log.js.map +1 -0
- package/lib/src/device.d.ts +4 -0
- package/lib/src/device.js +2 -0
- package/lib/src/device.js.map +1 -0
- package/lib/src/file-operations.d.ts +42 -0
- package/lib/src/file-operations.js +2 -0
- package/lib/src/file-operations.js.map +1 -0
- package/lib/src/json.d.ts +16 -0
- package/lib/src/json.js +2 -0
- package/lib/src/json.js.map +1 -0
- package/lib/src/media.d.ts +1 -0
- package/{src/media.cjs → lib/src/media.js} +1 -0
- package/lib/src/media.js.map +1 -0
- package/lib/src/storage.d.ts +31 -0
- package/{src/storage.cjs → lib/src/storage.js} +2 -1
- package/lib/src/storage.js.map +1 -0
- package/lib/src/types.d.ts +20 -0
- package/lib/src/types.js +2 -0
- package/lib/src/types.js.map +1 -0
- package/lib/src/use-api.d.ts +0 -0
- package/lib/src/watermark.d.ts +47 -0
- package/lib/src/watermark.js +32 -0
- package/lib/src/watermark.js.map +1 -0
- package/package.json +27 -47
- package/index.cjs +0 -1
- package/index.js +0 -21
- package/src/device.cjs +0 -1
- package/src/file-operations.cjs +0 -1
- package/src/file-operations.js +0 -90
- package/src/types.cjs +0 -1
- package/src/types.js +0 -16
- package/src/watermark.cjs +0 -31
- package/src/watermark.js +0 -157
- package/types/index.d.ts +0 -139
|
@@ -0,0 +1,2142 @@
|
|
|
1
|
+
typeof JSON != "object" && (JSON = {}), function() {
|
|
2
|
+
var rx_one = /^[\],:{}\s]*$/, rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, rx_three = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, rx_four = /(?:^|:|,)(?:\s*\[)+/g, rx_escapable = /[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta, rep;
|
|
3
|
+
function f(e) {
|
|
4
|
+
return e < 10 ? "0" + e : e;
|
|
5
|
+
}
|
|
6
|
+
function this_value() {
|
|
7
|
+
return this.valueOf();
|
|
8
|
+
}
|
|
9
|
+
function quote(e) {
|
|
10
|
+
return rx_escapable.lastIndex = 0, rx_escapable.test(e) ? '"' + e.replace(rx_escapable, function(t) {
|
|
11
|
+
var n = meta[t];
|
|
12
|
+
return typeof n == "string" ? n : "\\u" + ("0000" + t.charCodeAt(0).toString(16)).slice(-4);
|
|
13
|
+
}) + '"' : '"' + e + '"';
|
|
14
|
+
}
|
|
15
|
+
function str(e, t) {
|
|
16
|
+
var n, r, o, a, s, c = gap, y = t[e];
|
|
17
|
+
switch (y && typeof y == "object" && typeof y.toJSON == "function" && (y = y.toJSON(e)), typeof rep == "function" && (y = rep.call(t, e, y)), typeof y) {
|
|
18
|
+
case "string":
|
|
19
|
+
return quote(y);
|
|
20
|
+
case "number":
|
|
21
|
+
return isFinite(y) ? String(y) : "null";
|
|
22
|
+
case "boolean":
|
|
23
|
+
case "null":
|
|
24
|
+
return String(y);
|
|
25
|
+
case "object":
|
|
26
|
+
if (!y) return "null";
|
|
27
|
+
if (gap += indent, s = [], Object.prototype.toString.apply(y) === "[object Array]") {
|
|
28
|
+
for (a = y.length, n = 0; n < a; n += 1) s[n] = str(n, y) || "null";
|
|
29
|
+
return o = s.length === 0 ? "[]" : gap ? `[
|
|
30
|
+
` + gap + s.join(`,
|
|
31
|
+
` + gap) + `
|
|
32
|
+
` + c + "]" : "[" + s.join(",") + "]", gap = c, o;
|
|
33
|
+
}
|
|
34
|
+
if (rep && typeof rep == "object") for (a = rep.length, n = 0; n < a; n += 1) typeof rep[n] == "string" && (o = str(r = rep[n], y)) && s.push(quote(r) + (gap ? ": " : ":") + o);
|
|
35
|
+
else for (r in y) Object.prototype.hasOwnProperty.call(y, r) && (o = str(r, y)) && s.push(quote(r) + (gap ? ": " : ":") + o);
|
|
36
|
+
return o = s.length === 0 ? "{}" : gap ? `{
|
|
37
|
+
` + gap + s.join(`,
|
|
38
|
+
` + gap) + `
|
|
39
|
+
` + c + "}" : "{" + s.join(",") + "}", gap = c, o;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
typeof Date.prototype.toJSON != "function" && (Date.prototype.toJSON = function() {
|
|
43
|
+
return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null;
|
|
44
|
+
}, Boolean.prototype.toJSON = this_value, Number.prototype.toJSON = this_value, String.prototype.toJSON = this_value), typeof JSON.stringify != "function" && (meta = { "\b": "\\b", " ": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, JSON.stringify = function(e, t, n) {
|
|
45
|
+
var r;
|
|
46
|
+
if (gap = "", indent = "", typeof n == "number") for (r = 0; r < n; r += 1) indent += " ";
|
|
47
|
+
else typeof n == "string" && (indent = n);
|
|
48
|
+
if (rep = t, t && typeof t != "function" && (typeof t != "object" || typeof t.length != "number")) throw new Error("JSON.stringify");
|
|
49
|
+
return str("", { "": e });
|
|
50
|
+
}), typeof JSON.parse != "function" && (JSON.parse = function(text, reviver) {
|
|
51
|
+
var j;
|
|
52
|
+
function walk(e, t) {
|
|
53
|
+
var n, r, o = e[t];
|
|
54
|
+
if (o && typeof o == "object") for (n in o) Object.prototype.hasOwnProperty.call(o, n) && ((r = walk(o, n)) !== void 0 ? o[n] = r : delete o[n]);
|
|
55
|
+
return reviver.call(e, t, o);
|
|
56
|
+
}
|
|
57
|
+
if (text = String(text), rx_dangerous.lastIndex = 0, rx_dangerous.test(text) && (text = text.replace(rx_dangerous, function(e) {
|
|
58
|
+
return "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4);
|
|
59
|
+
})), rx_one.test(text.replace(rx_two, "@").replace(rx_three, "]").replace(rx_four, ""))) return j = eval("(" + text + ")"), typeof reviver == "function" ? walk({ "": j }, "") : j;
|
|
60
|
+
throw new SyntaxError("JSON.parse");
|
|
61
|
+
});
|
|
62
|
+
}();
|
|
63
|
+
var fieldTemplate = { base: { outer: ["appid", "xwho", "xwhat", "xwhen", "xcontext"], xcontext: ["$lib", "$lib_version", "$platform", "$debug", "$is_login"] }, $startup: { xcontext: ["$screen_width", "$screen_height", "$web_crawler", "$time_zone", "$language", "$session_id", "$is_first_time", "$is_first_day", "$utm_campaign_id", "$utm_source", "$utm_medium", "$utm_term", "$utm_content", "$utm_campaign", "$is_time_calibrated"] }, $track: { xcontext: ["$screen_width", "$screen_height", "$web_crawler", "$time_zone", "$language", "$is_first_day", "$session_id", "$utm_campaign_id", "$utm_source", "$utm_medium", "$utm_term", "$utm_content", "$utm_campaign", "$is_time_calibrated"] }, $pageview: { xcontext: ["$screen_width", "$screen_height", "$web_crawler", "$time_zone", "$language", "$session_id", "$is_first_day", "$referrer", "$referrer_domain", "$title", "$url", "$startup_time", "$utm_campaign_id", "$utm_source", "$utm_medium", "$utm_term", "$utm_content", "$utm_campaign", "$is_time_calibrated"] }, $alias: { xcontext: ["$original_id"] }, $getPresetProperties: { xcontext: ["$screen_width", "$screen_height", "$time_zone", "$session_id", "$language"] } }, baseConfig = { base: { appid: "", $debug: 0, uploadURL: "", auto: !0, autoProfile: !0, hash: !0, autoWebstay: !0, singlePage: !0, pageProperty: {}, $lib_version: "4.5.5", cross_subdomain: !0, cross_subdomain_super: !0, allowTimeCheck: !1, isHybrid: !1, getDataTimeout: 1e4, sendDataTimeout: 1e4, isMessageSDK: !1 }, status: { code: 200, FnName: "", key: "", value: "", errorCode: "", successCode: "" }, keywords: fieldTemplate.base.xcontext, baseJson: fieldTemplate.base.outer, sendNum: 1800 }, _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
64
|
+
function _utf8Encode(e) {
|
|
65
|
+
e = e.replace(/\r\n/g, `
|
|
66
|
+
`);
|
|
67
|
+
for (var t = "", n = 0; n < e.length; n++) {
|
|
68
|
+
var r = e.charCodeAt(n);
|
|
69
|
+
r < 128 ? t += String.fromCharCode(r) : r > 127 && r < 2048 ? (t += String.fromCharCode(r >> 6 | 192), t += String.fromCharCode(63 & r | 128)) : (t += String.fromCharCode(r >> 12 | 224), t += String.fromCharCode(r >> 6 & 63 | 128), t += String.fromCharCode(63 & r | 128));
|
|
70
|
+
}
|
|
71
|
+
return t;
|
|
72
|
+
}
|
|
73
|
+
function _utf8Decode(e) {
|
|
74
|
+
for (var t = "", n = 0, r = 0, o = 0, a = 0; n < e.length; ) (r = e.charCodeAt(n)) < 128 ? (t += String.fromCharCode(r), n++) : r > 191 && r < 224 ? (o = e.charCodeAt(n + 1), t += String.fromCharCode((31 & r) << 6 | 63 & o), n += 2) : (o = e.charCodeAt(n + 1), a = e.charCodeAt(n + 2), t += String.fromCharCode((15 & r) << 12 | (63 & o) << 6 | 63 & a), n += 3);
|
|
75
|
+
return t;
|
|
76
|
+
}
|
|
77
|
+
function Util() {
|
|
78
|
+
}
|
|
79
|
+
function CheckChinese(e) {
|
|
80
|
+
return !!new RegExp("[\\u4E00-\\u9FFF]+", "g").test(e);
|
|
81
|
+
}
|
|
82
|
+
Util.prototype.paramType = function(e) {
|
|
83
|
+
return Object.prototype.toString.call(e).replace("[object ", "").replace("]", "");
|
|
84
|
+
}, Util.prototype.objHasKay = function(e, t) {
|
|
85
|
+
return Object.prototype.hasOwnProperty.call(e, t);
|
|
86
|
+
}, Util.prototype.ArrayToObj = function(e) {
|
|
87
|
+
for (var t = {}, n = 0; n < e.length; n++) t[e[n]] = "";
|
|
88
|
+
return t;
|
|
89
|
+
}, Util.prototype.keyValueToObje = function(e, t) {
|
|
90
|
+
var n = {};
|
|
91
|
+
return n[e] = t, n;
|
|
92
|
+
}, Util.prototype.toDeep = function(e) {
|
|
93
|
+
var t = null;
|
|
94
|
+
if (this.paramType(e) === "Array") {
|
|
95
|
+
t = [];
|
|
96
|
+
for (var n = 0; n < e.length; n++) t.push(this.toDeep(e[n]));
|
|
97
|
+
} else if (this.paramType(e) === "Object") for (var r in t = {}, e) t[r] = this.toDeep(e[r]);
|
|
98
|
+
else t = e;
|
|
99
|
+
return t;
|
|
100
|
+
}, Util.prototype.toDeepObj = function(e, t) {
|
|
101
|
+
var n = {};
|
|
102
|
+
if (this.paramType(e) === "String") return n = this.keyValueToObje(e, t);
|
|
103
|
+
if (this.paramType(e) === "Array") return n = this.ArrayToObj(e);
|
|
104
|
+
if (this.paramType(e) === "Object") for (var r in e) n[r] = this.toDeepObj(e[r]);
|
|
105
|
+
return n;
|
|
106
|
+
}, Util.prototype.toDeep = function(e) {
|
|
107
|
+
var t = null;
|
|
108
|
+
if (this.paramType(e) === "Array") {
|
|
109
|
+
t = [];
|
|
110
|
+
for (var n = 0; n < e.length; n++) t.push(this.toDeep(e[n]));
|
|
111
|
+
} else if (this.paramType(e) === "Object") for (var r in t = {}, e) t[r] = this.toDeep(e[r]);
|
|
112
|
+
else t = e;
|
|
113
|
+
return t;
|
|
114
|
+
}, Util.prototype.toObj = function(e, t) {
|
|
115
|
+
var n = {};
|
|
116
|
+
return this.paramType(e) === "String" ? n = this.keyValueToObje(e, t) : this.paramType(e) === "Array" ? n = this.ArrayToObj(e) : this.paramType(e) === "Object" ? e : n;
|
|
117
|
+
}, Util.prototype.objMerge = function(e, t) {
|
|
118
|
+
if (this.paramType(e) !== "Object" || this.paramType(t) !== "Object") return e;
|
|
119
|
+
var n = {};
|
|
120
|
+
for (var r in e) n[r] = e[r];
|
|
121
|
+
for (var o in t) {
|
|
122
|
+
var a = t[o], s = n[o], c = this.paramType(a), y = this.paramType(s);
|
|
123
|
+
n[o] = s && y === "Object" && c === "Object" ? this.objMerge(s, a) : y === "Array" && c === "Array" ? this.arrayMergeUnique(s, a) : c === "Function" && y === "Function" ? this.compose(s, a) : a;
|
|
124
|
+
}
|
|
125
|
+
return n;
|
|
126
|
+
}, Util.prototype.compose = function() {
|
|
127
|
+
var e = arguments, t = e.length - 1;
|
|
128
|
+
return function() {
|
|
129
|
+
for (var n = t, r = e[t].apply(this, arguments); n--; ) r = e[n].call(this, r);
|
|
130
|
+
return r;
|
|
131
|
+
};
|
|
132
|
+
}, Util.prototype.fnMerge = function(e, t) {
|
|
133
|
+
return this.objMerge(e, t);
|
|
134
|
+
}, Util.prototype.arrayUnique = function(e) {
|
|
135
|
+
for (var t = [], n = {}, r = 0; r < e.length; r++) n[e[r]] || (n[e[r]] = !0, t.push(e[r]));
|
|
136
|
+
return t;
|
|
137
|
+
}, Util.prototype.arrayMerge = function(e, t) {
|
|
138
|
+
for (var n = [], r = 0; r < e.length; r++) {
|
|
139
|
+
var o = e[r];
|
|
140
|
+
this.paramType(e[r]) === "Object" && (o = this.toDeep(e[r])), n.push(o);
|
|
141
|
+
}
|
|
142
|
+
for (var a = 0; a < t.length; a++) {
|
|
143
|
+
var s = t[a];
|
|
144
|
+
this.paramType(t[a]) === "Object" && (s = this.toDeep(t[a])), n.push(s);
|
|
145
|
+
}
|
|
146
|
+
return n;
|
|
147
|
+
}, Util.prototype.arrayMergeUnique = function(e, t) {
|
|
148
|
+
return e.push.apply(e, t), this.arrayUnique(e);
|
|
149
|
+
}, Util.prototype.encode = function(e) {
|
|
150
|
+
var t, n, r, o, a, s, c, y = "", p = 0;
|
|
151
|
+
for (e = _utf8Encode(e); p < e.length; ) o = (t = e.charCodeAt(p++)) >> 2, a = (3 & t) << 4 | (n = e.charCodeAt(p++)) >> 4, s = (15 & n) << 2 | (r = e.charCodeAt(p++)) >> 6, c = 63 & r, isNaN(n) ? s = c = 64 : isNaN(r) && (c = 64), y = y + _keyStr.charAt(o) + _keyStr.charAt(a) + _keyStr.charAt(s) + _keyStr.charAt(c);
|
|
152
|
+
return y;
|
|
153
|
+
}, Util.prototype.decode = function(e) {
|
|
154
|
+
var t, n, r, o, a, s, c = "", y = 0;
|
|
155
|
+
for (e = e.replace(/[^A-Za-z0-9+/=]/g, ""); y < e.length; ) t = _keyStr.indexOf(e.charAt(y++)) << 2 | (o = _keyStr.indexOf(e.charAt(y++))) >> 4, n = (15 & o) << 4 | (a = _keyStr.indexOf(e.charAt(y++))) >> 2, r = (3 & a) << 6 | (s = _keyStr.indexOf(e.charAt(y++))), c += String.fromCharCode(t), a !== 64 && (c += String.fromCharCode(n)), s !== 64 && (c += String.fromCharCode(r));
|
|
156
|
+
return c = _utf8Decode(c);
|
|
157
|
+
}, Util.prototype.isEmptyObject = function(e) {
|
|
158
|
+
for (var t in e) return !1;
|
|
159
|
+
return !0;
|
|
160
|
+
}, Util.prototype.format = function(e, t) {
|
|
161
|
+
var n = e.getTimezoneOffset(), r = { "M+": (e = new Date(e.getTime() + 60 * n * 1e3 + 288e5)).getMonth() + 1, "d+": e.getDate(), "h+": e.getHours(), "m+": e.getMinutes(), "s+": e.getSeconds(), "q+": Math.floor((e.getMonth() + 3) / 3), "S+": e.getMilliseconds() };
|
|
162
|
+
for (var o in /(y+)/.test(t) && (t = t.replace(RegExp.$1, (e.getFullYear() + "").substr(4 - RegExp.$1.length))), r) new RegExp("(" + o + ")").test(t) && (t = t.replace(RegExp.$1, RegExp.$1.length === 3 ? ("" + r[o]).length < 3 ? ("00" + r[o]).substr(("00" + r[o]).length - 3, ("00" + r[o]).length) : r[o] : ("00" + r[o]).substr(("" + r[o]).length)));
|
|
163
|
+
return t.toString();
|
|
164
|
+
}, Util.prototype.MD5 = function(e, t) {
|
|
165
|
+
function n($, v) {
|
|
166
|
+
return $ << v | $ >>> 32 - v;
|
|
167
|
+
}
|
|
168
|
+
function r($, v) {
|
|
169
|
+
var A, C, E, _, S;
|
|
170
|
+
return E = 2147483648 & $, _ = 2147483648 & v, S = (1073741823 & $) + (1073741823 & v), (A = 1073741824 & $) & (C = 1073741824 & v) ? 2147483648 ^ S ^ E ^ _ : A | C ? 1073741824 & S ? 3221225472 ^ S ^ E ^ _ : 1073741824 ^ S ^ E ^ _ : S ^ E ^ _;
|
|
171
|
+
}
|
|
172
|
+
function o($, v, A, C, E, _, S) {
|
|
173
|
+
return $ = r($, r(r(function(U, O, k) {
|
|
174
|
+
return U & O | ~U & k;
|
|
175
|
+
}(v, A, C), E), S)), r(n($, _), v);
|
|
176
|
+
}
|
|
177
|
+
function a($, v, A, C, E, _, S) {
|
|
178
|
+
return $ = r($, r(r(function(U, O, k) {
|
|
179
|
+
return U & k | O & ~k;
|
|
180
|
+
}(v, A, C), E), S)), r(n($, _), v);
|
|
181
|
+
}
|
|
182
|
+
function s($, v, A, C, E, _, S) {
|
|
183
|
+
return $ = r($, r(r(function(U, O, k) {
|
|
184
|
+
return U ^ O ^ k;
|
|
185
|
+
}(v, A, C), E), S)), r(n($, _), v);
|
|
186
|
+
}
|
|
187
|
+
function c($, v, A, C, E, _, S) {
|
|
188
|
+
return $ = r($, r(r(function(U, O, k) {
|
|
189
|
+
return O ^ (U | ~k);
|
|
190
|
+
}(v, A, C), E), S)), r(n($, _), v);
|
|
191
|
+
}
|
|
192
|
+
function y($) {
|
|
193
|
+
var v, A = "", C = "";
|
|
194
|
+
for (v = 0; v <= 3; v++) A += (C = "0" + ($ >>> 8 * v & 255).toString(16)).substr(C.length - 2, 2);
|
|
195
|
+
return A;
|
|
196
|
+
}
|
|
197
|
+
var p, m, w, b, T, d, l, u, g, h;
|
|
198
|
+
for (p = function($) {
|
|
199
|
+
for (var v, A = $.length, C = A + 8, E = 16 * ((C - C % 64) / 64 + 1), _ = Array(E - 1), S = 0, U = 0; U < A; ) S = U % 4 * 8, _[v = (U - U % 4) / 4] = _[v] | $.charCodeAt(U) << S, U++;
|
|
200
|
+
return S = U % 4 * 8, _[v = (U - U % 4) / 4] = _[v] | 128 << S, _[E - 2] = A << 3, _[E - 1] = A >>> 29, _;
|
|
201
|
+
}(e), l = 1732584193, u = 4023233417, g = 2562383102, h = 271733878, m = 0; m < p.length; m += 16) w = l, b = u, T = g, d = h, l = o(l, u, g, h, p[m + 0], 7, 3614090360), h = o(h, l, u, g, p[m + 1], 12, 3905402710), g = o(g, h, l, u, p[m + 2], 17, 606105819), u = o(u, g, h, l, p[m + 3], 22, 3250441966), l = o(l, u, g, h, p[m + 4], 7, 4118548399), h = o(h, l, u, g, p[m + 5], 12, 1200080426), g = o(g, h, l, u, p[m + 6], 17, 2821735955), u = o(u, g, h, l, p[m + 7], 22, 4249261313), l = o(l, u, g, h, p[m + 8], 7, 1770035416), h = o(h, l, u, g, p[m + 9], 12, 2336552879), g = o(g, h, l, u, p[m + 10], 17, 4294925233), u = o(u, g, h, l, p[m + 11], 22, 2304563134), l = o(l, u, g, h, p[m + 12], 7, 1804603682), h = o(h, l, u, g, p[m + 13], 12, 4254626195), g = o(g, h, l, u, p[m + 14], 17, 2792965006), l = a(l, u = o(u, g, h, l, p[m + 15], 22, 1236535329), g, h, p[m + 1], 5, 4129170786), h = a(h, l, u, g, p[m + 6], 9, 3225465664), g = a(g, h, l, u, p[m + 11], 14, 643717713), u = a(u, g, h, l, p[m + 0], 20, 3921069994), l = a(l, u, g, h, p[m + 5], 5, 3593408605), h = a(h, l, u, g, p[m + 10], 9, 38016083), g = a(g, h, l, u, p[m + 15], 14, 3634488961), u = a(u, g, h, l, p[m + 4], 20, 3889429448), l = a(l, u, g, h, p[m + 9], 5, 568446438), h = a(h, l, u, g, p[m + 14], 9, 3275163606), g = a(g, h, l, u, p[m + 3], 14, 4107603335), u = a(u, g, h, l, p[m + 8], 20, 1163531501), l = a(l, u, g, h, p[m + 13], 5, 2850285829), h = a(h, l, u, g, p[m + 2], 9, 4243563512), g = a(g, h, l, u, p[m + 7], 14, 1735328473), l = s(l, u = a(u, g, h, l, p[m + 12], 20, 2368359562), g, h, p[m + 5], 4, 4294588738), h = s(h, l, u, g, p[m + 8], 11, 2272392833), g = s(g, h, l, u, p[m + 11], 16, 1839030562), u = s(u, g, h, l, p[m + 14], 23, 4259657740), l = s(l, u, g, h, p[m + 1], 4, 2763975236), h = s(h, l, u, g, p[m + 4], 11, 1272893353), g = s(g, h, l, u, p[m + 7], 16, 4139469664), u = s(u, g, h, l, p[m + 10], 23, 3200236656), l = s(l, u, g, h, p[m + 13], 4, 681279174), h = s(h, l, u, g, p[m + 0], 11, 3936430074), g = s(g, h, l, u, p[m + 3], 16, 3572445317), u = s(u, g, h, l, p[m + 6], 23, 76029189), l = s(l, u, g, h, p[m + 9], 4, 3654602809), h = s(h, l, u, g, p[m + 12], 11, 3873151461), g = s(g, h, l, u, p[m + 15], 16, 530742520), l = c(l, u = s(u, g, h, l, p[m + 2], 23, 3299628645), g, h, p[m + 0], 6, 4096336452), h = c(h, l, u, g, p[m + 7], 10, 1126891415), g = c(g, h, l, u, p[m + 14], 15, 2878612391), u = c(u, g, h, l, p[m + 5], 21, 4237533241), l = c(l, u, g, h, p[m + 12], 6, 1700485571), h = c(h, l, u, g, p[m + 3], 10, 2399980690), g = c(g, h, l, u, p[m + 10], 15, 4293915773), u = c(u, g, h, l, p[m + 1], 21, 2240044497), l = c(l, u, g, h, p[m + 8], 6, 1873313359), h = c(h, l, u, g, p[m + 15], 10, 4264355552), g = c(g, h, l, u, p[m + 6], 15, 2734768916), u = c(u, g, h, l, p[m + 13], 21, 1309151649), l = c(l, u, g, h, p[m + 4], 6, 4149444226), h = c(h, l, u, g, p[m + 11], 10, 3174756917), g = c(g, h, l, u, p[m + 2], 15, 718787259), u = c(u, g, h, l, p[m + 9], 21, 3951481745), l = r(l, w), u = r(u, b), g = r(g, T), h = r(h, d);
|
|
202
|
+
return t === 32 ? y(l) + y(u) + y(g) + y(h) : y(u) + y(g);
|
|
203
|
+
}, Util.prototype.clientTimeZone = function() {
|
|
204
|
+
var e = (/* @__PURE__ */ new Date()).getTimezoneOffset(), t = parseInt(e / 60), n = e % 60, r = "-";
|
|
205
|
+
return (t <= 0 || n < 0) && (r = "+", t = -t, n < 0 && (n = -n)), (t += "").length === 1 && (t = "0" + t), (n += "").length === 1 && (n = "0" + n), r + t + ":" + n;
|
|
206
|
+
}, Util.prototype.delEmpty = function(e) {
|
|
207
|
+
var t = {};
|
|
208
|
+
for (var n in e) {
|
|
209
|
+
var r = !0, o = this.paramType(e[n]);
|
|
210
|
+
o !== "Object" ? (e[n] || o === "Number" && !isNaN(e[n]) || o === "Boolean" || (r = !1), r === !0 && (t[n] = e[n])) : t[n] = this.delEmpty(e[n]);
|
|
211
|
+
}
|
|
212
|
+
for (var a in t) {
|
|
213
|
+
var s = [];
|
|
214
|
+
for (var c in t[a]) s.push(t[a][c]);
|
|
215
|
+
s.length === 0 && t[a].constructor === Object && delete t[a];
|
|
216
|
+
}
|
|
217
|
+
return t;
|
|
218
|
+
}, Util.prototype.addEvent = function(e, t, n, r) {
|
|
219
|
+
if (document.addEventListener) if (this.paramType(e) !== "Array" && this.paramType(e) !== "HTMLCollection" || !e.length || e === window) e.addEventListener(t, n, r);
|
|
220
|
+
else for (var o = 0; o < e.length; o++) this.addEvent(e[o], t, n, r);
|
|
221
|
+
else if (e.length && e !== window) for (var a = 0; a < e.length; a++) this.addEvent(e[a], t, n);
|
|
222
|
+
else e.attachEvent("on" + t, function() {
|
|
223
|
+
return n.call(e, window.event);
|
|
224
|
+
});
|
|
225
|
+
}, Util.prototype.removeEvent = function(e, t, n, r) {
|
|
226
|
+
if (document.removeEventListener) if (e.length) for (var o = 0; o < e.length; o++) this.removeEvent(e[o], t, n, r);
|
|
227
|
+
else e.removeEventListener(t, n, r);
|
|
228
|
+
else if (e.length) for (var a = 0; a < e.length; a++) this.removeEvent(e[a], t, n);
|
|
229
|
+
else e.detachEvent("on" + t, function() {
|
|
230
|
+
return n.call(e, window.event);
|
|
231
|
+
});
|
|
232
|
+
}, Util.prototype.addEleLable = function(e, t, n, r) {
|
|
233
|
+
var o = document, a = o.createElement(e), s = r || o.body || o.getElementsByTagName("body")[0];
|
|
234
|
+
return n && (a.id = n), t && (a.className = t), s.appendChild(a), a;
|
|
235
|
+
}, Util.prototype.addScript = function(e, t, n) {
|
|
236
|
+
var r = document, o = r.createElement("script"), a = r.getElementsByTagName("script");
|
|
237
|
+
o.type = "text/javascript", o.async = !0, o.id = e;
|
|
238
|
+
var s = "";
|
|
239
|
+
if (t) {
|
|
240
|
+
if (this.paramType(t) === "Array") return void (0, t[0])([t[1]], n);
|
|
241
|
+
s = t.charAt(t.length - 1) === "/" ? t : t + "/";
|
|
242
|
+
} else if (r.getElementById("ARK_SDK")) s = r.getElementById("ARK_SDK").src;
|
|
243
|
+
else for (var c = 0; c < a.length; c++) if (a[c].src && a[c].src.indexOf("AnalysysAgent_JS_SDK") > -1) {
|
|
244
|
+
s = a[c].src;
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
var y = s.substring(0, s.lastIndexOf("/") + 1);
|
|
248
|
+
o.src = y + e + ".min.js?v=" + this.format(/* @__PURE__ */ new Date(), "yyyyMMddhhmm"), o.onload = setTimeout(n, 500), a[0].parentNode.insertBefore(o, a[0]);
|
|
249
|
+
}, Util.prototype.GetUrlParam = function(e) {
|
|
250
|
+
var t = document.location.toString(), n = window.name;
|
|
251
|
+
this.paramType(n) === "String" && n.indexOf(e) > -1 && (t = n);
|
|
252
|
+
var r = t.split("?");
|
|
253
|
+
if (r.length > 1) {
|
|
254
|
+
for (var o, a = [], s = 1; s < r.length; s++) a.push.apply(a, r[s].split("&"));
|
|
255
|
+
for (var c = 0; c < a.length; c++) if ((o = a[c].split("=")) != null && o[0] === e) {
|
|
256
|
+
var y = o[1];
|
|
257
|
+
if (o[1].indexOf("#") > -1 && (y = y.split("#")[0]), y.indexOf("%") > -1) {
|
|
258
|
+
try {
|
|
259
|
+
var p = decodeURI(y);
|
|
260
|
+
if (CheckChinese(p)) return p;
|
|
261
|
+
} catch {
|
|
262
|
+
}
|
|
263
|
+
if (this.paramType(window.AnalysysModule) === "Object" && this.paramType(window.AnalysysModule.decodeGBK) === "Function") try {
|
|
264
|
+
return window.AnalysysModule.decodeGBK(y, "gbk");
|
|
265
|
+
} catch {
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return y;
|
|
269
|
+
}
|
|
270
|
+
return "";
|
|
271
|
+
}
|
|
272
|
+
return "";
|
|
273
|
+
}, Util.prototype.stringSlice = function(e, t) {
|
|
274
|
+
return e.slice(0, t);
|
|
275
|
+
}, Util.prototype.trim = function(e) {
|
|
276
|
+
return this.paramType(e) === "String" ? e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "") : e;
|
|
277
|
+
}, Util.prototype.changeHash = function(e) {
|
|
278
|
+
var t = window.history.pushState, n = window.history.replaceState;
|
|
279
|
+
window.history.pushState = function() {
|
|
280
|
+
t.apply(window.history, arguments), e.apply(e);
|
|
281
|
+
}, window.history.replaceState = function() {
|
|
282
|
+
n.apply(window.history, arguments), e.apply(e);
|
|
283
|
+
};
|
|
284
|
+
var r;
|
|
285
|
+
"on" + (r = window.ActiveXObject || "ActiveXObject" in window ? "hashchange" : "popstate") in window && this.addEvent(window, r, function() {
|
|
286
|
+
setTimeout(e, 0);
|
|
287
|
+
});
|
|
288
|
+
}, Util.prototype.deviceType = function() {
|
|
289
|
+
var e = navigator.userAgent;
|
|
290
|
+
return e.indexOf("Tablet") > -1 && e.indexOf("PC") < 0 || e.indexOf("Pad") > -1 || e.indexOf("Nexus 7") > -1 ? "tablet" : e.indexOf("Mobi") > -1 || e.indexOf("iPh") > -1 || e.indexOf("480") > -1 ? "phone" : "desktop";
|
|
291
|
+
}, Util.prototype.checkTypeList = function(e, t) {
|
|
292
|
+
var n = this.paramType(e);
|
|
293
|
+
if (n === "String") {
|
|
294
|
+
var r = window.location.href, o = window.location.protocol + "//" + window.location.host, a = o + window.location.pathname;
|
|
295
|
+
if ([r, o, a + "index.html", a, a + window.location.hash].indexOf(e) > -1) return !0;
|
|
296
|
+
} else {
|
|
297
|
+
if (n === "Function") return e.call(e, t);
|
|
298
|
+
if (n === "Array") {
|
|
299
|
+
for (var s = 0; s < e.length; s++) if (this.checkTypeList(e[s], t) === !0) return !0;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return !1;
|
|
303
|
+
}, Util.prototype.selectorAllEleList = function(e) {
|
|
304
|
+
var t = [], n = e.split(".")[0];
|
|
305
|
+
if (this.paramType(document.querySelectorAll) === "Function" && e.indexOf("|") < 0) try {
|
|
306
|
+
return document.querySelectorAll(e);
|
|
307
|
+
} catch {
|
|
308
|
+
}
|
|
309
|
+
var r = "";
|
|
310
|
+
if (e.indexOf("#") > -1) {
|
|
311
|
+
r = e.split(".")[0].split("#")[1];
|
|
312
|
+
var o = document.getElementById(r);
|
|
313
|
+
o && t.push(o);
|
|
314
|
+
} else {
|
|
315
|
+
if (e.indexOf(".") < 0) return document.getElementsByTagName(n);
|
|
316
|
+
if (e.indexOf("[") > -1 && e.indexOf("]") > -1) for (var a = document.getElementsByTagName("*"), s = e.replace("[", "").replace("]", ""), c = 0; c < a.length; c++) {
|
|
317
|
+
var y = a[c].getAttribute(s);
|
|
318
|
+
this.paramType(y) === "String" && t.push(o);
|
|
319
|
+
}
|
|
320
|
+
else for (var p = document.getElementsByTagName(n), m = 0; m < p.length; m++) {
|
|
321
|
+
var w = p[m], b = this.paramType(w.className) === "String" ? w.className.split(" ") : [];
|
|
322
|
+
b.length > 0 && (n + "." + b.join(".")).indexOf(e) > -1 && t.push(w);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return t;
|
|
326
|
+
}, Util.prototype.getDomainFromUrl = function(e, t) {
|
|
327
|
+
if (t === "") return "";
|
|
328
|
+
var n = (t = t || window.location.hostname).split("/");
|
|
329
|
+
if (n.length > 2 && (t = n[2]), /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(t) === !0 || t === "localhost") return "";
|
|
330
|
+
var r = t.split("."), o = e === !0 ? 2 : r.length;
|
|
331
|
+
(this.paramType(o) !== "Number" || o < 2) && (o = 2);
|
|
332
|
+
var a = [];
|
|
333
|
+
if (!(r.length > 1)) return "";
|
|
334
|
+
r.length < o && (o = r.length);
|
|
335
|
+
for (var s = r.length - 1; s >= 0 && a.length !== o; s--) a.push(r[s]);
|
|
336
|
+
return a.reverse().join(".");
|
|
337
|
+
}, Util.prototype.isiOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), Util.prototype.delNotHybrid = function(e) {
|
|
338
|
+
return delete e.$is_first_day, delete e.$session_id, delete e.$is_time_calibrated, delete e.$startup_time, e;
|
|
339
|
+
}, Util.prototype.getUrlPath = function() {
|
|
340
|
+
var e = window.location.hash;
|
|
341
|
+
return e.indexOf("?") > -1 && (e = e.split("?")[0]), window.location.host + window.location.pathname + e;
|
|
342
|
+
}, Util.prototype.detectZoom = function() {
|
|
343
|
+
for (var e = this.selectorAllEleList("meta"), t = 1, n = 0; n < e.length; n++) {
|
|
344
|
+
var r = e[n].getAttribute("content");
|
|
345
|
+
if (r && r.indexOf("initial-scale=") > -1) for (var o = r.split(","), a = 0; a < o.length; a++) o[a].indexOf("initial-scale") > -1 && (t = parseFloat(o[a].split("=")[1]));
|
|
346
|
+
}
|
|
347
|
+
return t;
|
|
348
|
+
};
|
|
349
|
+
var Util$1 = new Util(), Local = "", Session = "";
|
|
350
|
+
try {
|
|
351
|
+
Local = typeof window.localStorage == "object" ? window.localStorage : "", Session = typeof window.sessionStorage == "object" ? window.sessionStorage : "";
|
|
352
|
+
} catch (e) {
|
|
353
|
+
}
|
|
354
|
+
function Storage() {
|
|
355
|
+
this.localName = "FZ_STROAGE", this.sessionName = "FZ_SESSION", this.cookieName = "FZ_STROAGE." + Util$1.getDomainFromUrl(baseConfig.base.cross_subdomain), this.checkSubdomain(), this.localObj = this.getLocal(), this.sessionObj = this.getSession();
|
|
356
|
+
}
|
|
357
|
+
Storage.prototype.checkSubdomain = function() {
|
|
358
|
+
var e = window.AnalysysAgent || [];
|
|
359
|
+
if (Util$1.paramType(e) === "Array") for (var t = 0; t < e.length; t++) e[t][0] === "cross_subdomain" && Util$1.paramType(e[t][1]) === "Boolean" && (baseConfig.base.cross_subdomain = e[t][1]);
|
|
360
|
+
if (e && Util$1.objHasKay(e.config || {}, "cross_subdomain") && (baseConfig.base.cross_subdomain = e.config.cross_subdomain), baseConfig.base.cross_subdomain === !0) {
|
|
361
|
+
var n = this.getCookie(this.cookieName) || Util$1.encode("{}");
|
|
362
|
+
if (n = JSON.parse(Util$1.decode(decodeURIComponent(n))), Util$1.paramType(n) === "Object" && !Util$1.isEmptyObject(n)) {
|
|
363
|
+
var r = n.ARK_ID, o = {};
|
|
364
|
+
Util$1.objHasKay(n, "ARKSUPER") === !0 && (o = n.ARKSUPER, delete n.ARKSUPER);
|
|
365
|
+
var a = Util$1.objMerge(this.localObj || {}, n);
|
|
366
|
+
baseConfig.base.cross_subdomain_super !== !0 || Util$1.isEmptyObject(o) || (a = Util$1.objMerge({ ARKSUPER: o }, a)), this.setLocal(this.localName, a), this.setCookie("ARK_ID", r);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}, Storage.prototype.setLocal = function(e, t) {
|
|
370
|
+
this.localObj = this.getLocal(), e === this.localName ? this.localObj = t : this.localObj[e] = t;
|
|
371
|
+
try {
|
|
372
|
+
if (Local ? (Local.setItem(this.localName, Util$1.encode(JSON.stringify(this.localObj))), Session.setItem(this.localName, Util$1.encode(JSON.stringify(this.localObj)))) : e !== "POSTDATA" && this.setCookie(this.cookieName, encodeURIComponent(Util$1.encode(JSON.stringify(this.localObj)))), e !== "POSTDATA" && baseConfig.base.cross_subdomain === !0) {
|
|
373
|
+
var n = Util$1.toDeep(this.localObj);
|
|
374
|
+
delete n.POSTDATA, this.setCookie(this.cookieName, encodeURIComponent(Util$1.encode(JSON.stringify(n))));
|
|
375
|
+
}
|
|
376
|
+
} catch {
|
|
377
|
+
}
|
|
378
|
+
}, Storage.prototype.getLocal = function(e) {
|
|
379
|
+
try {
|
|
380
|
+
var t = Util$1.encode("{}");
|
|
381
|
+
return Local ? (t = Local.getItem(this.localName)) || Session.getItem(this.localName) && (t = Session.getItem(this.localName), Local.setItem(this.localName, t)) : t = (t = this.getCookie(this.cookieName)) ? decodeURIComponent(t) : Util$1.encode(JSON.stringify(this.localObj)), this.localObj = JSON.parse(Util$1.decode(t)), e ? this.localObj[e] : this.localObj;
|
|
382
|
+
} catch {
|
|
383
|
+
return e ? "" : {};
|
|
384
|
+
}
|
|
385
|
+
}, Storage.prototype.removeLocal = function(e) {
|
|
386
|
+
if (this.localObj = this.getLocal(), Util$1.objHasKay(this.localObj, e) && delete this.localObj[e], Util$1.isEmptyObject(this.localObj)) try {
|
|
387
|
+
Local && (Local.removeItem(this.localName), Session.removeItem(this.localName)), this.removeCookie(this.cookieName);
|
|
388
|
+
} catch {
|
|
389
|
+
}
|
|
390
|
+
else if (Local && (Local.setItem(this.localName, Util$1.encode(JSON.stringify(this.localObj))), Session.setItem(this.localName, Util$1.encode(JSON.stringify(this.localObj)))), e !== "POSTDATA" && e !== "ARK_ID" && baseConfig.base.cross_subdomain === !0) {
|
|
391
|
+
var t = Util$1.toDeep(this.localObj);
|
|
392
|
+
delete t.POSTDATA, delete t.ARK_ID, this.setCookie(this.cookieName, Util$1.encode(JSON.stringify(t)));
|
|
393
|
+
}
|
|
394
|
+
}, Storage.prototype.setSession = function(e, t) {
|
|
395
|
+
this.sessionObj = this.getSession(), this.sessionObj[e] = t;
|
|
396
|
+
try {
|
|
397
|
+
Session ? (Session.setItem(this.sessionName, Util$1.encode(JSON.stringify(this.sessionObj))), this.removeCookie(this.sessionName)) : e !== "POSTDATA" && this.setCookie(this.sessionName, Util$1.encode(JSON.stringify(this.sessionObj)), "session");
|
|
398
|
+
} catch {
|
|
399
|
+
}
|
|
400
|
+
}, Storage.prototype.getSession = function(e) {
|
|
401
|
+
try {
|
|
402
|
+
var t = Util$1.encode("{}");
|
|
403
|
+
return Session ? (t = Session.getItem(this.sessionName) || Util$1.encode("{}"), this.removeCookie(this.sessionName)) : (t = this.getCookie(this.sessionName)) || (t = Util$1.encode(JSON.stringify(this.sessionObj))), this.sessionObj = JSON.parse(Util$1.decode(t)), e ? this.sessionObj[e] : this.sessionObj;
|
|
404
|
+
} catch {
|
|
405
|
+
return {};
|
|
406
|
+
}
|
|
407
|
+
}, Storage.prototype.removeSession = function(e) {
|
|
408
|
+
if (this.sessionObj = this.getSession(), Util$1.objHasKay(this.sessionObj, e) && delete this.sessionObj[e], Util$1.isEmptyObject(this.sessionObj)) try {
|
|
409
|
+
Session ? (Session.removeItem(this.sessionName), this.removeCookie(this.sessionName)) : this.removeCookie(this.sessionName);
|
|
410
|
+
} catch {
|
|
411
|
+
}
|
|
412
|
+
else Session && Session.setItem(this.sessionName, Util$1.encode(JSON.stringify(this.sessionObj)));
|
|
413
|
+
}, Storage.prototype.setCookie = function(e, t, n) {
|
|
414
|
+
var r = "." + Util$1.getDomainFromUrl(baseConfig.base.cross_subdomain), o = r ? "; domain=" + r : "", a = "";
|
|
415
|
+
if (n !== "session") {
|
|
416
|
+
var s = /* @__PURE__ */ new Date();
|
|
417
|
+
s.setTime(s.getTime() + 31536e6), a = "; expires=" + s.toGMTString();
|
|
418
|
+
}
|
|
419
|
+
document.cookie = e + "=" + t + a + "; path=/" + o;
|
|
420
|
+
}, Storage.prototype.getCookie = function(e) {
|
|
421
|
+
e = e || this.localName;
|
|
422
|
+
var t = document.cookie;
|
|
423
|
+
if (typeof t != "string") return "";
|
|
424
|
+
var n, r, o = e + "=", a = t.split(/[;&]/);
|
|
425
|
+
for (n = 0; n < a.length; n++) {
|
|
426
|
+
for (r = a[n]; r.charAt(0) === " "; ) r = r.substring(1, r.length);
|
|
427
|
+
if (r.indexOf(o) === 0) return r.substring(o.length, r.length) || "";
|
|
428
|
+
}
|
|
429
|
+
}, Storage.prototype.removeCookie = function(e, t, n) {
|
|
430
|
+
t = Util$1.paramType(t) === "Boolean" ? t : baseConfig.base.cross_subdomain;
|
|
431
|
+
var r = "." + Util$1.getDomainFromUrl(t), o = r ? "; domain=" + r : "";
|
|
432
|
+
if (n !== "session") {
|
|
433
|
+
var a = /* @__PURE__ */ new Date();
|
|
434
|
+
a.setTime(a.getTime() - 94608e6);
|
|
435
|
+
var s = "; expires=" + a.toGMTString();
|
|
436
|
+
}
|
|
437
|
+
document.cookie = e + "=" + s + "; path=/" + o;
|
|
438
|
+
};
|
|
439
|
+
var Storage$1 = new Storage(), UTM = { utm_campaign_id: Util$1.GetUrlParam("campaign_id"), utm_source: Util$1.GetUrlParam("utm_source") || Util$1.GetUrlParam("hmsr"), utm_medium: Util$1.GetUrlParam("utm_medium") || Util$1.GetUrlParam("hmpl"), utm_term: Util$1.GetUrlParam("utm_term") || Util$1.GetUrlParam("hmkw"), utm_content: Util$1.GetUrlParam("utm_content") || Util$1.GetUrlParam("hmci"), utm_campaign: Util$1.GetUrlParam("utm_campaign") || Util$1.GetUrlParam("hmcu") };
|
|
440
|
+
function clearUTM() {
|
|
441
|
+
UTM = { utm_campaign_id: "", utm_source: "", utm_medium: "", utm_term: "", utm_content: "", utm_campaign: "" };
|
|
442
|
+
}
|
|
443
|
+
function SessionId() {
|
|
444
|
+
this.sessionId = Storage$1.getLocal("SEESIONID") || this.setId(), this.sessionDate = Storage$1.getLocal("SEESIONDATE") || 0;
|
|
445
|
+
}
|
|
446
|
+
SessionId.prototype.setId = function() {
|
|
447
|
+
var e = +/* @__PURE__ */ new Date();
|
|
448
|
+
return this.sessionId = Util$1.MD5("JS" + e.toString() + 1e7 * Math.random()), this.sessionDate = e, Storage$1.setLocal("SEESIONID", this.sessionId), Storage$1.setLocal("SEESIONDATE", this.sessionDate), this.sessionId;
|
|
449
|
+
}, SessionId.prototype.getId = function() {
|
|
450
|
+
var e = /* @__PURE__ */ new Date(), t = e.getTime(), n = e.getTimezoneOffset(), r = new Date(t + 60 * n * 1e3 + 288e5).getDate();
|
|
451
|
+
this.sessionDate = Storage$1.getLocal("SEESIONDATE") || 0;
|
|
452
|
+
var o = this.sessionDate === 0 ? 0 : new Date(this.sessionDate + 60 * n * 1e3 + 288e5).getDate();
|
|
453
|
+
return (!this.sessionId || !this.sessionDate || Number(t) - Number(this.sessionDate) > 18e5 || r !== o) && (clearUTM(), this.setId()), this.sessionDate = t, Storage$1.setLocal("SEESIONDATE", t), this.sessionId = Storage$1.getLocal("SEESIONID") || this.setId(), this.sessionId;
|
|
454
|
+
};
|
|
455
|
+
var sessionId = new SessionId(), UA = navigator.userAgent.toLowerCase();
|
|
456
|
+
function checkSpider() {
|
|
457
|
+
return !!UA.match(/(bot|crawler|spider|scrapy|dnspod|ia_archiver|jiankongbao|slurp|transcoder|networkbench|oneapm|PhantomJS|BingPreview)/i);
|
|
458
|
+
}
|
|
459
|
+
function getId() {
|
|
460
|
+
var e = Storage$1.getLocal("ARK_LOGINID") || Storage$1.getLocal("ARK_TRACKID") || Storage$1.getLocal("ARK_ID");
|
|
461
|
+
return e && e !== "[object Object]" || (e = setUUId(), Storage$1.setLocal("ARK_ID", e)), Storage$1.setCookie("ARK_ID", getIdentifyId() || getUUId()), e;
|
|
462
|
+
}
|
|
463
|
+
function setUUId() {
|
|
464
|
+
var e = (/* @__PURE__ */ new Date()).getTime().toString() + (1e4 * Math.random()).toString(), t = "JS" + Util$1.MD5(e.toString(), 32) + Util$1.MD5(e.toString(), 32).slice(0, 4);
|
|
465
|
+
return Storage$1.setCookie("ARK_ID", t), t;
|
|
466
|
+
}
|
|
467
|
+
function getUUId() {
|
|
468
|
+
var e = Storage$1.getLocal("ARK_ID");
|
|
469
|
+
return e || (e = setUUId(), Storage$1.setLocal("ARK_ID", e)), e;
|
|
470
|
+
}
|
|
471
|
+
function removeUUId() {
|
|
472
|
+
Storage$1.removeLocal("ARK_ID");
|
|
473
|
+
}
|
|
474
|
+
function getAliasId() {
|
|
475
|
+
return Storage$1.getLocal("ARK_LOGINID");
|
|
476
|
+
}
|
|
477
|
+
function removeAliasId() {
|
|
478
|
+
Storage$1.removeLocal("ARK_LOGINID");
|
|
479
|
+
}
|
|
480
|
+
function getIdentifyId() {
|
|
481
|
+
return Storage$1.getLocal("ARK_TRACKID");
|
|
482
|
+
}
|
|
483
|
+
function removeIdentifyId() {
|
|
484
|
+
Storage$1.removeLocal("ARK_TRACK_LOGIN"), Storage$1.removeLocal("ARK_TRACKID");
|
|
485
|
+
}
|
|
486
|
+
var base = baseConfig.base;
|
|
487
|
+
function appkey(e) {
|
|
488
|
+
base.appid = e;
|
|
489
|
+
}
|
|
490
|
+
function getAppId() {
|
|
491
|
+
return base.appid;
|
|
492
|
+
}
|
|
493
|
+
function debugMode(e) {
|
|
494
|
+
base.$debug = e;
|
|
495
|
+
}
|
|
496
|
+
function getDebugMode() {
|
|
497
|
+
return base.$debug;
|
|
498
|
+
}
|
|
499
|
+
function uploadURL(e) {
|
|
500
|
+
e.charAt(e.length - 1) !== "/" && (e += "/"), base.uploadURL = e;
|
|
501
|
+
}
|
|
502
|
+
function getUploadURL() {
|
|
503
|
+
return base.uploadURL.charAt(base.uploadURL.length - 1) !== "/" && (base.uploadURL += "/"), base.uploadURL;
|
|
504
|
+
}
|
|
505
|
+
function nowDate() {
|
|
506
|
+
return +/* @__PURE__ */ new Date() + (Storage$1.getLocal("ANSSERVERTIME") ? Number(Storage$1.getLocal("ANSSERVERTIME")) : 0);
|
|
507
|
+
}
|
|
508
|
+
function timeCalibration() {
|
|
509
|
+
return !!Storage$1.getLocal("ANSSERVERTIME");
|
|
510
|
+
}
|
|
511
|
+
function getXwhat() {
|
|
512
|
+
return baseConfig.status.FnName;
|
|
513
|
+
}
|
|
514
|
+
function isLogin() {
|
|
515
|
+
var e = !1;
|
|
516
|
+
return (getAliasId() || Storage$1.getLocal("ARK_TRACK_LOGIN")) && (e = !0), e;
|
|
517
|
+
}
|
|
518
|
+
var timeZone = "GMT" + Util$1.clientTimeZone(), language = (navigator.language || navigator.browserLanguage).toLowerCase();
|
|
519
|
+
function getSessionId() {
|
|
520
|
+
return sessionId.getId();
|
|
521
|
+
}
|
|
522
|
+
function isFirstTime() {
|
|
523
|
+
var e = Storage$1.getLocal("FRISTIME");
|
|
524
|
+
return Storage$1.setLocal("FRISTIME", !1), e;
|
|
525
|
+
}
|
|
526
|
+
function isFirstDay() {
|
|
527
|
+
var e = Util$1.format(/* @__PURE__ */ new Date(), "yyyyMMdd"), t = Storage$1.getLocal("FRISTDAY");
|
|
528
|
+
return !t || e === t;
|
|
529
|
+
}
|
|
530
|
+
function originalId() {
|
|
531
|
+
return getIdentifyId() || getUUId();
|
|
532
|
+
}
|
|
533
|
+
var referrer = document.referrer || "";
|
|
534
|
+
function setReferrer(e) {
|
|
535
|
+
referrer = e;
|
|
536
|
+
}
|
|
537
|
+
function getReferrer() {
|
|
538
|
+
var e = referrer;
|
|
539
|
+
try {
|
|
540
|
+
e = decodeURIComponent(referrer);
|
|
541
|
+
} catch {
|
|
542
|
+
}
|
|
543
|
+
return baseConfig.base.isHybrid === !0 && (e = e.replace(/"/g, '\\"')), e;
|
|
544
|
+
}
|
|
545
|
+
function getReferrerDomain() {
|
|
546
|
+
return Util$1.getDomainFromUrl(!1, referrer);
|
|
547
|
+
}
|
|
548
|
+
function getTitle() {
|
|
549
|
+
return document.title;
|
|
550
|
+
}
|
|
551
|
+
function startupTime() {
|
|
552
|
+
return Storage$1.getSession("STARTUPTIME") || "";
|
|
553
|
+
}
|
|
554
|
+
function getUrl() {
|
|
555
|
+
var e = window.location.href;
|
|
556
|
+
try {
|
|
557
|
+
e = decodeURIComponent(e);
|
|
558
|
+
} catch {
|
|
559
|
+
}
|
|
560
|
+
return baseConfig.base.isHybrid === !0 && (e = e.replace(/"/g, '\\"')), e;
|
|
561
|
+
}
|
|
562
|
+
function getLibVersion() {
|
|
563
|
+
return base.$lib_version;
|
|
564
|
+
}
|
|
565
|
+
function getScreenWidth() {
|
|
566
|
+
return Util$1.paramType(Number(window.screen.width)) === "Number" ? Number(window.screen.width) : 0;
|
|
567
|
+
}
|
|
568
|
+
function getScreenHeight() {
|
|
569
|
+
return Util$1.paramType(Number(window.screen.height)) === "Number" ? Number(window.screen.height) : 0;
|
|
570
|
+
}
|
|
571
|
+
var oldUTM = Storage$1.getSession("ARK_UTM") || "";
|
|
572
|
+
function utmCampaignId() {
|
|
573
|
+
return UTM.utm_campaign_id;
|
|
574
|
+
}
|
|
575
|
+
function utmSource() {
|
|
576
|
+
return UTM.utm_source;
|
|
577
|
+
}
|
|
578
|
+
function utmMedium() {
|
|
579
|
+
return UTM.utm_medium;
|
|
580
|
+
}
|
|
581
|
+
function utmTerm() {
|
|
582
|
+
return UTM.utm_term;
|
|
583
|
+
}
|
|
584
|
+
function utmContent() {
|
|
585
|
+
return UTM.utm_content;
|
|
586
|
+
}
|
|
587
|
+
function utmCampaign() {
|
|
588
|
+
return UTM.utm_campaign;
|
|
589
|
+
}
|
|
590
|
+
UTM.utm_campaign || UTM.utm_source || UTM.utm_medium || UTM.utm_campaign_id || UTM.utm_term || UTM.utm_content ? (oldUTM !== JSON.stringify(UTM) && sessionId.setId(), Storage$1.setSession("ARK_UTM", JSON.stringify(UTM))) : (clearUTM(), Storage$1.removeSession("ARK_UTM"));
|
|
591
|
+
var getField = Object.freeze({ __proto__: null, getAppId, getId, getUploadURL, appkey, debugMode, uploadURL, getDebugMode, nowDate, getXwhat, isLogin, timeZone, language, getSessionId, isFirstTime, isFirstDay, originalId, getReferrer, getReferrerDomain, getTitle, getUrl, getScreenWidth, getScreenHeight, startupTime, checkSpider, getLibVersion, utmCampaignId, utmSource, utmMedium, utmTerm, utmContent, utmCampaign, timeCalibration, setReferrer }), fieldRules = { resetKeywords: ["appid", "$debug", "uploadUrl"], uploadURL: { valueType: 0, value: getUploadURL, check: { value: ["isString", "nimLength", "isUrl"], errorCode: "60007", successCode: "20008" } }, appid: { valueType: 0, value: getAppId, check: { value: ["isString", "nimLength"], errorCode: "60006", successCode: "20006" } }, hash: { check: { value: ["isBoolean"], errorCode: "60003" } }, auto: { check: { value: ["isBoolean"], errorCode: "60003" } }, autoProfile: { check: { value: ["isBoolean"], errorCode: "60003" } }, pageProperty: { check: { value: ["isObject"], errorCode: "600016" } }, xwho: { valueType: 0, value: getId, check: { value: ["isString", "nimLength"] } }, xwhen: { valueType: 0, value: nowDate }, xwhat: { valueType: 0, value: getXwhat, check: { value: ["isString", "nimLength"] } }, xcontext: { $lib: { valueType: 1, value: "JS" }, $lib_version: { valueType: 0, value: getLibVersion, check: { value: ["isString"], successCode: "20007" } }, $platform: { valueType: 1, value: "JS" }, $debug: { valueType: 0, value: getDebugMode, check: { value: ["isNumber", "isDebug"] } }, $is_login: { valueType: 0, value: isLogin, check: { value: ["isBoolean"] } }, $screen_width: { valueType: 0, value: getScreenWidth, check: { value: ["isNumber"] } }, $screen_height: { valueType: 0, value: getScreenHeight, check: { value: ["isNumber"] } }, $time_zone: { valueType: 1, value: timeZone }, $language: { valueType: 1, value: language }, $session_id: { valueType: 0, value: getSessionId }, $is_first_time: { valueType: 0, value: isFirstTime }, $is_first_day: { valueType: 0, value: isFirstDay }, $referrer: { valueType: 0, value: getReferrer }, $referrer_domain: { valueType: 0, value: getReferrerDomain }, $title: { valueType: 0, value: getTitle }, $url: { valueType: 0, value: getUrl }, $startup_time: { valueType: 0, value: startupTime }, $web_crawler: { valueType: 0, value: checkSpider }, $original_id: { valueType: 0, value: originalId }, $utm_campaign_id: { valueType: 0, value: utmCampaignId }, $utm_source: { valueType: 0, value: utmSource }, $utm_medium: { valueType: 0, value: utmMedium }, $utm_term: { valueType: 0, value: utmTerm }, $utm_content: { valueType: 0, value: utmContent }, $utm_campaign: { valueType: 0, value: utmCampaign }, $is_time_calibrated: { valueType: 0, value: timeCalibration } }, xcontextCommonRule: { check: { key: ["isString", "length99", "notSpecialCharacters", "keywords"], value: ["notObject", "isArrayString", "length255"] } }, $track: { check: { key: ["isString", "notSpecialCharacters", "length99"] } }, $alias: { check: { key: ["isString", "keyLength255"] } }, $profile_increment: { check: { key: ["isString", "length99", "notSpecialCharacters"], value: ["isNumber"] } }, $profile_unset: { check: { key: ["isString", "length99", "notSpecialCharacters"] } }, $pageview: { check: { key: ["isString", "keyLength255"] } } }, lifecycle = {}, fieldRules$1 = { "visitorConfigURL ": { check: { value: ["isUrl"] } } }, fieldTemplate$1 = {};
|
|
592
|
+
function getElementContent(e, t) {
|
|
593
|
+
var n = "";
|
|
594
|
+
if (e.tagName.toLowerCase() === "input" ? n = e.value || "" : e.tagName.toLowerCase() === "img" ? n = e.getAttribute("alt") || e.getAttribute("title") || "" : e.tagName.toLowerCase() === "a" && (n = e.getAttribute("title") || ""), !n) for (var r = e.childNodes, o = 0; o < r.length; o++) r[o].nodeType === 3 && (n += r[o].nodeValue);
|
|
595
|
+
return n = n && Util$1.paramType(n) === "String" ? n.replace(/[\r\n]/g, " ").replace(/[ ]+/g, " ") : "", e.tagName.toLowerCase() === "input" && e.type !== "button" && e.type !== "submit" && t !== !0 ? "" : n = Util$1.trim(n);
|
|
596
|
+
}
|
|
597
|
+
var errorMessage = { common: `{FN}:Property key invalid, nonsupport value: $lib/$lib_version/$platform/$first_visit_time/$debug/$is_login
|
|
598
|
+
current KEY:{KEY}`, 60001: `{FN}:Property key invalid, support type: String
|
|
599
|
+
current key:{KEY}
|
|
600
|
+
`, 60002: `{FN}:Property value invalid of key[{KEY}], support type: Number
|
|
601
|
+
current value:{VALUE}
|
|
602
|
+
current type: {VALUETYPE}`, 60003: `{FN}:Property value invalid of key[{KEY}], support type: Boolean
|
|
603
|
+
current value:{VALUE}
|
|
604
|
+
current type: {VALUETYPE}`, 60004: `{FN}:Property value invalid of key[{KEY}], support type: Array
|
|
605
|
+
current value:{VALUE}
|
|
606
|
+
current type: {VALUETYPE}`, 60005: "{FN}:The length of the property[{KEY}] value (string[{VALUE}]) needs to be 1-255 !", 60006: "Please set appkey first.", 60007: "Please set uploadURL first.", 60008: "Send message failed.", 60009: "{FN}:The length of the property key (string[{KEY}]) needs to be 1-125 !", 600010: "{FN}:The length of the property key (string[{KEY}]) needs to be 1-99 !", 600011: "{FN}:[{KEY}] does not conform to naming rules!", 600012: `{FN}:Property key invalid, nonsupport value: $lib/$lib_version/$platform/$first_visit_time/$debug/$is_login
|
|
607
|
+
current KEY:{KEY}`, 600013: `{FN}:Property value invalid of key[{KEY}], support type: Array with String as its internal element
|
|
608
|
+
current value:{VALUE}
|
|
609
|
+
current type: {VALUETYPE}`, 600016: `{FN}:Property value invalid of key[{KEY}], support type: Object
|
|
610
|
+
current value:{VALUE}
|
|
611
|
+
current type: {VALUETYPE}`, 600017: "{FN}:The length of the property key (string[{KEY}]) needs to be 1-255 !", 600018: `{FN}:Property value invalid of key[{KEY}] invalid, support type: String
|
|
612
|
+
current value:{VALUE}
|
|
613
|
+
current type: {VALUETYPE}`, 600019: "{FN}:The length of the property[{KEY}] value (string[{VALUE}]) needs to be 1-255 !", 600020: `{FN}:Property value invalid of key[{KEY}], support type: Boolean/Array/String/Number
|
|
614
|
+
current value:{VALUE}
|
|
615
|
+
current type: {VALUETYPE}` }, successMessage = { common: "", 20001: "Send message success", 20002: "{FN}: set success ({VALUE})", 20003: "{FN}:({VALUE}) delete success", 20004: "{FN}:clear success", 20005: "{FN}:reset success", 20006: "set appkey success. current appkey : {VALUE}", 20007: "Init Analysys JS sdk success, version : {VALUE}", 20008: "set uploadURL success. current uploadURL : {VALUE}", 20009: "{FN}:[{KEY}] : get failed", 20010: "{FN}:[{KEY}] : get success. ({VALUE})", 20011: "{FN}:({VALUE}) delete failed", 20013: "aliasID already bound" };
|
|
616
|
+
function successLog(e) {
|
|
617
|
+
if (baseConfig.base.$debug === 1 || baseConfig.base.$debug === 2) {
|
|
618
|
+
var t = baseConfig.status, n = t.successCode, r = t.FnName, o = t.key, a = t.value, s = successMessage[n] || successMessage.common;
|
|
619
|
+
Util$1.paramType(o) === "String" && o.length > 30 && (o = Util$1.stringSlice(o, 30) + "..."), Util$1.paramType(r) === "String" && r.length > 30 && (r = Util$1.stringSlice(r, 30) + "...");
|
|
620
|
+
var c = s.replace("{FN}", r).replace("{KEY}", o).replace("{VALUE}", a);
|
|
621
|
+
e && (c = e), c && window.console && window.console.log && window.console.log(c);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
function errorLog() {
|
|
625
|
+
if (baseConfig.base.$debug === 1 || baseConfig.base.$debug === 2) {
|
|
626
|
+
var e = baseConfig.status, t = e.errorCode, n = e.FnName, r = e.key, o = e.value;
|
|
627
|
+
Util$1.paramType(o) === "Object" && (o = JSON.stringify(o));
|
|
628
|
+
var a = Util$1.paramType(o);
|
|
629
|
+
t !== "600018" || r || (t = "600011"), t !== "60005" || r || (t = "600017"), (t === "600017" || t === "600019" || t === "60009" || t === "600010" || t === "60005") && Util$1.paramType(o) === "String" && o.length && o.length > 30 && (o = Util$1.stringSlice(o, 30) + "..."), Util$1.paramType(r) === "String" && r.length > 30 && (r = Util$1.stringSlice(r, 30) + "..."), Util$1.paramType(n) === "String" && n.length > 30 && (n = Util$1.stringSlice(n, 30) + "...");
|
|
630
|
+
var s = (errorMessage[t] || errorMessage.common).replace("{FN}", n).replace("{KEY}", r).replace("{VALUE}", o).replace("{VALUETYPE}", a);
|
|
631
|
+
if (window.console && window.console.warn && window.console.warn(s), lifecycle$5.errorLog && lifecycle$5.errorLog.init && t !== "60008") {
|
|
632
|
+
var c = baseConfig.status.FnName;
|
|
633
|
+
lifecycle$5.errorLog.init(s), baseConfig.status.FnName = c;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
var androidModel = { hashCode: "", width: 0, height: 0, aleft: 0, atop: 0, classes: [], clickable: !1, alpha: 1, hidden: 0, text: "", subviews: [], new_path: [], url: "" }, iosModel = { id: "", class: [], properties: { alpha: { values: [{ value: 1 }] }, userInteractionEnabled: { values: [{ value: !0 }] }, enabled: { values: [{ value: !0 }] }, hidden: { values: [{ value: !1 }] }, subviews: { values: [{ value: [] }] }, superview: { values: [{ value: 0 }] }, frame: { values: [{ value: { AX: 0, AY: 0, Height: 0, Width: 0 } }] } }, new_path: [], url: "", controlEvent: "64" }, id = 0, rootId = 0, eleList = [];
|
|
638
|
+
function getDomList(e, t, n) {
|
|
639
|
+
if (e.nodeType !== 1) return null;
|
|
640
|
+
var r = "web" + (id === 0 ? rootId : rootId + "" + id), o = e, a = [], s = [], c = e.tagName.toLowerCase(), y = !0;
|
|
641
|
+
for (["a", "button", "input", "select", "textarea"].indexOf(c) > -1 && (y = !1); o !== null; ) {
|
|
642
|
+
var p = o.children;
|
|
643
|
+
if (!p) break;
|
|
644
|
+
if (p.length > 0) {
|
|
645
|
+
for (var m = 0; m < p.length; m++) if (id++, p[m].nodeType === 1 && p[m].tagName && ["canvas", "svg", "use", "script", "meta", "style"].indexOf(p[m].tagName.toLowerCase()) < 0) if (p[m].tagName === "TABLE") for (var w = p[m].children, b = 0; b < w.length; b++) {
|
|
646
|
+
id++;
|
|
647
|
+
var T = getDomList(w[b], r, y), d = getConstantStyle(w[b], "position");
|
|
648
|
+
T && (d === "absolute" ? s.push(T) : a.push(T));
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
var l = getDomList(p[m], r, y), u = getConstantStyle(p[m], "position");
|
|
652
|
+
l && (u === "absolute" ? s.push(l) : a.push(l));
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
a = Util$1.arrayMerge(a, s), o = o.children;
|
|
656
|
+
}
|
|
657
|
+
var g = {};
|
|
658
|
+
return (g = Util$1.isiOS === !0 ? setiOSModel(e, r, t, a, n) : setAndroidModel(e, r, t, a, n)).url = Util$1.getUrlPath(), g.root_id = "web" + rootId, e.tagName !== "TABLE" && eleList.push(g), r;
|
|
659
|
+
}
|
|
660
|
+
var detect = Util$1.detectZoom();
|
|
661
|
+
function setiOSModel(e, t, n, r, o) {
|
|
662
|
+
var a = JSON.parse(JSON.stringify(iosModel)), s = eleOffset(e);
|
|
663
|
+
a.id = t, a.properties.frame.values[0].value.Width = (e.offsetWidth || e.scrollWidth || e.clientWidth) * detect, a.properties.frame.values[0].value.Height = (e.offsetHeight || e.offsetHeight || e.clientHeight) * detect, a.properties.frame.values[0].value.AX = s.left * detect, a.properties.frame.values[0].value.AY = s.top * detect;
|
|
664
|
+
var c = domParentList(e);
|
|
665
|
+
a.new_path = c.newPath, a.class = e.className && Util$1.paramType(e.className) === "String" ? e.className.split(" ") : [], a.eg_text = getElementContent(e), a.properties.enabled.values[0].value = !0, a.properties.subviews.values[0].value = r, a.properties.superview.values[0].value = n, a.bodyWidth = (window.innerWidth || document.body.offsetWidth || document.body.scrollWidth || document.body.clientWidth) * detect, a.bodyHeight = (window.innerHeight || document.body.offsetHeight || document.body.scrollHeight || document.body.clientHeight) * detect, a.bodyScrollTop = s.bodyScrollTop * detect, a.bodyScrollLeft = s.bodyScrollLeft * detect, a.eleScrollTop = s.eleScrollTop * detect, a.eleScrollLeft = s.eleScrollLeft * detect;
|
|
666
|
+
var y = (e.style.filter !== "" ? e.style.filter.match(/opacity:[/S/s]*?\)/)[0] : e.style.opacity) || 1;
|
|
667
|
+
return a.properties.alpha.values[0].value = y, o === !1 && (a.properties.userInteractionEnabled.values[0].value = !1, a.properties.enabled.values[0].value = !1), a;
|
|
668
|
+
}
|
|
669
|
+
function setAndroidModel(e, t, n, r, o) {
|
|
670
|
+
var a = JSON.parse(JSON.stringify(androidModel)), s = eleOffset(e), c = domParentList(e);
|
|
671
|
+
return a.new_path = c.newPath, a.hashCode = t, a.parentid = n, a.bodyWidth = (window.innerWidth || document.body.offsetWidth || document.body.scrollWidth || document.body.clientWidth) * detect, a.bodyHeight = (window.innerHeight || document.body.offsetHeight || document.body.scrollHeight || document.body.clientHeight) * detect, a.innerHeight = { innerHeight: window.innerHeight, scrollHeight: document.body.scrollHeight, offsetHeight: document.body.offsetHeight, clientHeight: document.body.clientHeight }, a.width = (e.offsetWidth || e.scrollWidth || e.clientWidth) * detect, a.height = (e.offsetHeight || e.scrollHeight || e.clientHeight) * detect, a.aleft = (s.left - s.eleScrollLeft) * detect, a.atop = (s.top - s.eleScrollTop) * detect, a.bodyScrollTop = 0, a.bodyScrollLeft = 0, a.eleScrollTop = s.eleScrollTop * detect, a.eleScrollLeft = s.eleScrollLeft * detect, a.clickable = o !== !1, a.text = getElementContent(e), a.alpha = (e.style.filter !== "" ? e.style.filter.match(/opacity:[/S/s]*?\)/)[0] : e.style.opacity) || 1, a.classes = e.className && Util$1.paramType(e.className) === "String" ? e.className.split(" ") : [], a.subviews = r, a;
|
|
672
|
+
}
|
|
673
|
+
function HybridVisual(e) {
|
|
674
|
+
if (eleList = [], rootId = e || +/* @__PURE__ */ new Date(), getDomList(document.body, id), id = 0, Util$1.isiOS === !0) return JSON.stringify(eleList);
|
|
675
|
+
window.AnalysysAgentHybrid.onVisualDomList(JSON.stringify(eleList));
|
|
676
|
+
}
|
|
677
|
+
var HybridAns = { visitorEventList: [], visitorProperties: {}, getVisualDomList: function(e) {
|
|
678
|
+
return HybridVisual(e);
|
|
679
|
+
}, onEventList: function(e) {
|
|
680
|
+
e = e || [], Util$1.paramType(e) === "String" && (e = JSON.parse(e));
|
|
681
|
+
for (var t = [], n = [], r = 0; r < e.length; r++) if (e[r].isAll === 1 || !e[r].target_page || e[r].target_page === Util$1.getUrlPath()) {
|
|
682
|
+
e[r].bindings = e[r].props_binding, t.push(e[r]);
|
|
683
|
+
var o = { eventID: e[r].event_id, eventName: e[r].event_name || "" };
|
|
684
|
+
n.push(o);
|
|
685
|
+
}
|
|
686
|
+
HybridAns.visitorEventList = t, successLog("Get Visual Event List from app"), successLog(JSON.stringify(n, null, 2));
|
|
687
|
+
}, getProperty: function(e) {
|
|
688
|
+
Util$1.paramType(e) === "String" && (e = JSON.parse(e));
|
|
689
|
+
var t = getRelated(e);
|
|
690
|
+
if (Util$1.isiOS === !0) return JSON.stringify(t);
|
|
691
|
+
window.AnalysysAgentHybrid.onProperty(JSON.stringify(t));
|
|
692
|
+
}, onProperty: function(e, t) {
|
|
693
|
+
if (Util$1.paramType(HybridAns.visitorProperties[t]) === "Function") {
|
|
694
|
+
if (Util$1.paramType(e) === "String" && (e = JSON.parse(e)), Util$1.paramType(e) === "Array") {
|
|
695
|
+
for (var n = {}, r = 0; r < e.length; r++) n = Util$1.objMerge(n, e[r]);
|
|
696
|
+
e = n;
|
|
697
|
+
}
|
|
698
|
+
return HybridAns.visitorProperties[t].call(HybridAns.visitorProperties[t], e), delete HybridAns.visitorProperties[t], !0;
|
|
699
|
+
}
|
|
700
|
+
return !1;
|
|
701
|
+
} };
|
|
702
|
+
function getPath(e) {
|
|
703
|
+
for (var t = e.tagName.toLowerCase(), n = "", r = Util$1.paramType(e.className) !== "String" ? [] : e.className.split(" "), o = 0; o < r.length; o++) r[o] && r[o].indexOf("ARK") < 0 && (n += "." + r[o]);
|
|
704
|
+
return { className: n, id: e.id || "", tagName: t };
|
|
705
|
+
}
|
|
706
|
+
function domParentList(e, t) {
|
|
707
|
+
for (var n = [], r = [], o = e; o != null; )
|
|
708
|
+
if (o.nodeType === 1) {
|
|
709
|
+
var a = getPath(o), s = null;
|
|
710
|
+
s = getEleIndex(o), n.push(a.tagName + (a.id ? "#" + a.id : "") + a.className);
|
|
711
|
+
var c = { id: a.id, tagName: a.tagName };
|
|
712
|
+
a.row !== null ? c.row = s.row : c.index = s.index, r.push(Util$1.delEmpty(c)), o = o.parentNode;
|
|
713
|
+
} else o = o.parentNode;
|
|
714
|
+
return { path: n.join("<"), newPath: r };
|
|
715
|
+
}
|
|
716
|
+
function getEleIndex(e) {
|
|
717
|
+
for (var t = e.parentNode, n = 0, r = !0, o = null; t !== null && r === !0; )
|
|
718
|
+
if (t.nodeType === 1) {
|
|
719
|
+
for (var a = t.children, s = [], c = {}, y = 0; y < a.length; y++) {
|
|
720
|
+
var p = getPath(a[y]);
|
|
721
|
+
s.push(p), e === a[y] && (c = p, n = y);
|
|
722
|
+
}
|
|
723
|
+
for (var m = !1, w = 0; w < a.length; w++) s[w].tagName === c.tagName && (m = !0);
|
|
724
|
+
m === !0 && (o = n), r = !1;
|
|
725
|
+
} else t = t.parentNode;
|
|
726
|
+
return { row: o, index: n };
|
|
727
|
+
}
|
|
728
|
+
function parentContrast(e, t) {
|
|
729
|
+
for (var n = 0; n < e.length; n++) if (e[n].split(".")[0] !== t[n].split(".")[0]) return !1;
|
|
730
|
+
return !0;
|
|
731
|
+
}
|
|
732
|
+
function newPathContrast(e, t, n) {
|
|
733
|
+
var r = e.newPath, o = Util$1.arrayMerge([], r), a = Util$1.arrayMerge([], t), s = Util$1.arrayMerge([], r), c = e.ele;
|
|
734
|
+
if (o === a) return !0;
|
|
735
|
+
if (o.length < a.length) return !1;
|
|
736
|
+
if (e.ele && o.length > a.length) {
|
|
737
|
+
var y = o.length - a.length;
|
|
738
|
+
o.splice(0, y);
|
|
739
|
+
for (var p = 0; p < y; p++) c = c.parentNode || document.body;
|
|
740
|
+
s = Util$1.arrayMerge([], o);
|
|
741
|
+
}
|
|
742
|
+
for (var m = !0, w = 0; w < a.length; ) {
|
|
743
|
+
var b = a[w], T = o[w];
|
|
744
|
+
if (Util$1.objHasKay(T, "row") === !0 && Util$1.objHasKay(b, "row") === !1 && Util$1.objHasKay(T, "index") === !1 && delete T.row, b.id && b.id !== T.id || b.tagName !== T.tagName || T.index !== b.index || T.row !== b.row) {
|
|
745
|
+
m = !1;
|
|
746
|
+
break;
|
|
747
|
+
}
|
|
748
|
+
w++;
|
|
749
|
+
}
|
|
750
|
+
return m === !0 && (e.newPath = s, e.ele = c), m;
|
|
751
|
+
}
|
|
752
|
+
function isClassContrast(e, t) {
|
|
753
|
+
var n = e ? e.className : null;
|
|
754
|
+
return !!(Util$1.paramType(n) === "String" && Util$1.paramType(t) === "String" && (n = Util$1.trim(n) || null, t = Util$1.trim(t) || null, n && t && n.indexOf(t) > -1));
|
|
755
|
+
}
|
|
756
|
+
function bindingContrast(e, t) {
|
|
757
|
+
for (var n = 0; n < t.length; n++) {
|
|
758
|
+
var r = t[n];
|
|
759
|
+
if (r.prop_name === "text") {
|
|
760
|
+
if (getElementContent(e) !== r.value) return !1;
|
|
761
|
+
} else if (r.prop_name === "class" && !isClassContrast(e, r.value)) return !1;
|
|
762
|
+
}
|
|
763
|
+
return !0;
|
|
764
|
+
}
|
|
765
|
+
function pathContrast(e, t, n) {
|
|
766
|
+
var r = !0, o = !1;
|
|
767
|
+
if (t.bindings = t.bindings || t.props_binding, e.newPath && t.newPath && (o = !0, r = newPathContrast(e, t.newPath)), r === !0 && t.bindings && t.bindings.length > 0 && (o = !0, r = bindingContrast(e.ele, t.bindings)), o) return r;
|
|
768
|
+
var a = e.path || e.link, s = t.path || t.link, c = e.index || 0, y = t.index || 0, p = e.ele || null, m = t.isText || "";
|
|
769
|
+
if (m !== "" && m !== getElementContent(p)) return !1;
|
|
770
|
+
if (a === s && c === y) return !0;
|
|
771
|
+
var w = a.split("<"), b = s.split("<");
|
|
772
|
+
if (w.length < b.length) return !1;
|
|
773
|
+
if (w.length > b.length) {
|
|
774
|
+
var T = w.length - b.length;
|
|
775
|
+
w = w.splice(T);
|
|
776
|
+
for (var d = p; T > 0 && d; ) d = d.parentNode, T--;
|
|
777
|
+
if (!d) return !1;
|
|
778
|
+
c = setIndex(d, w.join("<"));
|
|
779
|
+
}
|
|
780
|
+
return !(!parentContrast(w, b) || c !== y);
|
|
781
|
+
}
|
|
782
|
+
function parseNewPath(e, t, n) {
|
|
783
|
+
var r = null;
|
|
784
|
+
if (n) if (t === 0) {
|
|
785
|
+
if (e.length === 1) return n;
|
|
786
|
+
r = e.slice(0, e.length - t), n = n.parentNode;
|
|
787
|
+
} else for (r = e.slice(0, e.length - 1); t > 0; ) {
|
|
788
|
+
if (!(n = n.parentNode)) return null;
|
|
789
|
+
t--;
|
|
790
|
+
}
|
|
791
|
+
else n = document, r = e;
|
|
792
|
+
for (var o = n, a = r.length - 1; a >= 0; ) {
|
|
793
|
+
var s = r[a], c = s.tagName, y = Util$1.paramType(s.row) === "Number" ? s.row : s.index, p = s.id || "";
|
|
794
|
+
if (c === "html" && (y = 0), Util$1.paramType(y) !== "Number") return null;
|
|
795
|
+
var m = o.children;
|
|
796
|
+
if (m.length < y || !(o = m[y]) || p && o.id !== p || Util$1.paramType(o.tagName) === "String" && c !== o.tagName.toLowerCase()) return null;
|
|
797
|
+
a--;
|
|
798
|
+
}
|
|
799
|
+
return o;
|
|
800
|
+
}
|
|
801
|
+
function parserDom(e) {
|
|
802
|
+
var t = [];
|
|
803
|
+
if (e.indexOf("<") < 0) return [{ elePath: e }];
|
|
804
|
+
for (var n = e.split("<"), r = 0; r < n.length; r++) {
|
|
805
|
+
var o = n[r];
|
|
806
|
+
t.push({ elePath: o });
|
|
807
|
+
}
|
|
808
|
+
return t;
|
|
809
|
+
}
|
|
810
|
+
function getEleScroll(e) {
|
|
811
|
+
for (var t = 0, n = 0; e != null && e !== document.body; ) t += e.scrollTop || 0, n += e.scrollLeft || 0, e = e.parentNode;
|
|
812
|
+
return { scrollTop: t, scrollLeft: n };
|
|
813
|
+
}
|
|
814
|
+
function eleOffset(e) {
|
|
815
|
+
for (var t = 0, n = 0, r = getEleScroll(e), o = r.scrollTop, a = r.scrollLeft, s = !1; e && e.tagName && ["canvas", "svg", "use", "script", "meta", "style"].indexOf(e.tagName.toLowerCase()) < 0; ) {
|
|
816
|
+
t += e.offsetTop, n += e.offsetLeft;
|
|
817
|
+
try {
|
|
818
|
+
var c = getConstantStyle(e, "transform");
|
|
819
|
+
c && c !== "none" && (n += parseFloat(c.substring(6).split(",")[4]), t += parseFloat(c.substring(6).split(",")[5]));
|
|
820
|
+
} catch {
|
|
821
|
+
}
|
|
822
|
+
try {
|
|
823
|
+
var y = getConstantStyle(e, "position");
|
|
824
|
+
y && y === "fixed" && (s = !0);
|
|
825
|
+
} catch {
|
|
826
|
+
}
|
|
827
|
+
e = e.offsetParent;
|
|
828
|
+
}
|
|
829
|
+
return s === !0 && (t += o, n += a, t += document.body.scrollTop || document.documentElement.scrollTop || 0, n += document.body.scrollLeft || document.documentElement.scrollLeft || 0), { top: t, left: n, hidden: !1, bodyScrollTop: document.documentElement.scrollTop || document.body.scrollTop || 0, bodyScrollLeft: document.documentElement.scrollLeft || document.body.scrollLeft || 0, eleScrollTop: o, eleScrollLeft: a };
|
|
830
|
+
}
|
|
831
|
+
function getConstantStyle(e, t) {
|
|
832
|
+
var n = document.defaultView;
|
|
833
|
+
return n && n.getComputedStyle ? document.defaultView.getComputedStyle(e, null)[t] : e.currentStyle ? e.currentStyle[t] : 0;
|
|
834
|
+
}
|
|
835
|
+
function setIndex(e, t) {
|
|
836
|
+
var n = parserDom(t);
|
|
837
|
+
if (n.length === 0) return 0;
|
|
838
|
+
var r = n[0];
|
|
839
|
+
r.elePath.indexOf("#") > -1 && (r.elePath = "#" + r.elePath.split("#")[1]);
|
|
840
|
+
for (var o = Util$1.selectorAllEleList(r.elePath), a = 0, s = 0; s < o.length; s++)
|
|
841
|
+
if (pathContrast({ path: domParentList(o[s]).path }, { path: t }) === !0) {
|
|
842
|
+
if (o[s] === e) return a;
|
|
843
|
+
a++;
|
|
844
|
+
}
|
|
845
|
+
return 0;
|
|
846
|
+
}
|
|
847
|
+
function backH5PathProPath(e, t) {
|
|
848
|
+
return Util$1.arrayMerge([], t.h5_path);
|
|
849
|
+
}
|
|
850
|
+
function getRelated(e, t, n, r) {
|
|
851
|
+
if (!e) return {};
|
|
852
|
+
Util$1.paramType(e) === "Object" && (e = [e]);
|
|
853
|
+
for (var o = {}, a = [], s = {}, c = 0; c < e.length; c++) {
|
|
854
|
+
var y = e[c], p = y.target.h5_path, m = y.target.step;
|
|
855
|
+
if (p) {
|
|
856
|
+
var w = parseNewPath(p, m, r), b = w ? getElementContent(w, !0) : "", T = getProperties(y.properties, b);
|
|
857
|
+
o = Util$1.objMerge(o, T);
|
|
858
|
+
} else a.push(y);
|
|
859
|
+
}
|
|
860
|
+
if (a.length > 0) {
|
|
861
|
+
if (Util$1.isiOS !== !1) return HybridAns.visitorProperties[n] = /* @__PURE__ */ function(d) {
|
|
862
|
+
return function(l) {
|
|
863
|
+
d = Util$1.objMerge(d, l), t(d);
|
|
864
|
+
};
|
|
865
|
+
}(o), void (window.AnalysysModule && window.AnalysysModule.moduleStatus === !0 ? window.AnalysysModule.getPro(a, n) : window.webkit.messageHandlers.AnalysysAgentGetProperty.postMessage([JSON.stringify(a), n]));
|
|
866
|
+
s = window.AnalysysAgentHybrid.getProperty(JSON.stringify(a)), Util$1.paramType(s) === "String" && (s = JSON.parse(s)), o = Util$1.objMerge(o, s);
|
|
867
|
+
} else Util$1.isiOS === !0 && baseConfig.base.isHybrid === !0 && t && t(o);
|
|
868
|
+
return o;
|
|
869
|
+
}
|
|
870
|
+
function getProperties(e, t) {
|
|
871
|
+
for (var n = {}, r = 0; r < e.length; r++) {
|
|
872
|
+
var o = e[r], a = o.prop_type;
|
|
873
|
+
t = Util$1.objHasKay(o, "value") === !0 ? o.value : t;
|
|
874
|
+
var s = o.regex, c = o.key;
|
|
875
|
+
if (s) try {
|
|
876
|
+
s = Util$1.decode(s), t = new RegExp(s).exec(t);
|
|
877
|
+
} catch {
|
|
878
|
+
}
|
|
879
|
+
if (a === "number") try {
|
|
880
|
+
t = Number(t);
|
|
881
|
+
} catch {
|
|
882
|
+
}
|
|
883
|
+
else if (a === "bool") Util$1.paramType(t) !== "Boolean" && (t === "true" || t === "1" ? t = !0 : t !== "false" && t !== "0" || (t = !1));
|
|
884
|
+
else try {
|
|
885
|
+
t = t.toString();
|
|
886
|
+
} catch {
|
|
887
|
+
}
|
|
888
|
+
n[c] = t;
|
|
889
|
+
}
|
|
890
|
+
return n;
|
|
891
|
+
}
|
|
892
|
+
function backEasyPath(e) {
|
|
893
|
+
for (var t = [], n = 0; n < e.length; n++) t.push(e[n].tagName);
|
|
894
|
+
return t.join(">");
|
|
895
|
+
}
|
|
896
|
+
function checkNewPathBase(e, t) {
|
|
897
|
+
if (!t) return !!e;
|
|
898
|
+
var n = JSON.parse(JSON.stringify(e)), r = JSON.parse(JSON.stringify(t));
|
|
899
|
+
n.reverse(), r.reverse();
|
|
900
|
+
var o = backEasyPath(n), a = backEasyPath(r);
|
|
901
|
+
return o.indexOf(a) > -1;
|
|
902
|
+
}
|
|
903
|
+
function getJSON(e) {
|
|
904
|
+
if (Util$1.paramType(e) === "String") {
|
|
905
|
+
e.indexOf(`
|
|
906
|
+
`) > -1 && (e = e.replace(/[\r\n]/g, ""));
|
|
907
|
+
try {
|
|
908
|
+
return JSON.parse(e);
|
|
909
|
+
} catch {
|
|
910
|
+
}
|
|
911
|
+
try {
|
|
912
|
+
return window.AnalysysModule.zipInflate(e);
|
|
913
|
+
} catch {
|
|
914
|
+
}
|
|
915
|
+
return e === "H4sIAAAAAAAAAKtWSs5PSVWyMjIwqAUAVAOW6gwAAAA=" ? { code: 200 } : e === "H4sIAAAAAAAAAKtWSs5PSVWyMjUwqAUA7TtBdwwAAAA=" ? { code: 500 } : e === "H4sIAAAAAAAAAKtWSs5PSVWyMjEy0FHKLU5XslJySSxJVHBJTS6qLChRcC0qyi/S01OqBQBdATGSKQAAAA==" ? { code: 420 } : { code: 200 };
|
|
916
|
+
}
|
|
917
|
+
return Util$1.paramType(e) === "Object" ? e : { code: 200 };
|
|
918
|
+
}
|
|
919
|
+
function GetHttpObj() {
|
|
920
|
+
var e = null;
|
|
921
|
+
if (window.XDomainRequest) return new window.XDomainRequest();
|
|
922
|
+
if (window.XMLHttpRequest) e = new window.XMLHttpRequest();
|
|
923
|
+
else try {
|
|
924
|
+
e = new window.ActiveXObject("Microsoft.XMLHTTP");
|
|
925
|
+
} catch {
|
|
926
|
+
try {
|
|
927
|
+
e = new window.ActiveXObject("Msxml2.XMLHTTP");
|
|
928
|
+
} catch {
|
|
929
|
+
e = new window.XMLHttpRequest();
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
return e;
|
|
933
|
+
}
|
|
934
|
+
function xmlhttp(e) {
|
|
935
|
+
var t = !1, n = new GetHttpObj();
|
|
936
|
+
n.onload = function() {
|
|
937
|
+
t || (t = !0, e.success(getJSON(n.responseText), n));
|
|
938
|
+
}, n.onerror = function() {
|
|
939
|
+
t || (t = !0, e.error(getJSON(n.responseText), n));
|
|
940
|
+
}, n.onreadystatechange = /* @__PURE__ */ function(a, s) {
|
|
941
|
+
return function() {
|
|
942
|
+
if (a.readyState === 4) {
|
|
943
|
+
try {
|
|
944
|
+
if (a.getAllResponseHeaders().indexOf("Date") > -1 || a.getAllResponseHeaders().indexOf("date") > -1) {
|
|
945
|
+
var c = +/* @__PURE__ */ new Date(), y = a.getResponseHeader("Date") || a.getResponseHeader("date");
|
|
946
|
+
y && baseConfig.base.allowTimeCheck === !0 ? Storage$1.setLocal("ANSSERVERTIME", +new Date(y) - c) : Storage$1.setLocal("ANSSERVERTIME", 0);
|
|
947
|
+
}
|
|
948
|
+
} catch {
|
|
949
|
+
}
|
|
950
|
+
if (a.status >= 200 && a.status < 300 || a.status === 304) {
|
|
951
|
+
if (t) return;
|
|
952
|
+
t = !0, s.success(getJSON(a.responseText), a);
|
|
953
|
+
} else {
|
|
954
|
+
if (t) return;
|
|
955
|
+
t = !0, s.error();
|
|
956
|
+
}
|
|
957
|
+
a.onreadystatechange = null, a.onload = null;
|
|
958
|
+
}
|
|
959
|
+
};
|
|
960
|
+
}(n, e);
|
|
961
|
+
try {
|
|
962
|
+
n.open(e.type, e.url, !0);
|
|
963
|
+
try {
|
|
964
|
+
n.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
965
|
+
} catch {
|
|
966
|
+
}
|
|
967
|
+
var r = baseConfig.base.sendDataTimeout;
|
|
968
|
+
if (e.type === "GET" ? (r = baseConfig.base.getDataTimeout, n.send(null)) : n.send(e.data), Util$1.paramType(r) === "Number") if (Util$1.paramType(n.timeout) === "Number") n.timeout = r;
|
|
969
|
+
else {
|
|
970
|
+
var o = /* @__PURE__ */ function(a) {
|
|
971
|
+
return function() {
|
|
972
|
+
a.abort();
|
|
973
|
+
};
|
|
974
|
+
}(n);
|
|
975
|
+
setTimeout(o, r);
|
|
976
|
+
}
|
|
977
|
+
} catch {
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
function ajax() {
|
|
981
|
+
this.url = "", this.data = "", this.type = "GET", this.success = function() {
|
|
982
|
+
}, this.error = function() {
|
|
983
|
+
};
|
|
984
|
+
}
|
|
985
|
+
function getMsg(e) {
|
|
986
|
+
Util$1.addEvent(window, "message", function(t) {
|
|
987
|
+
var n = t.data;
|
|
988
|
+
try {
|
|
989
|
+
Util$1.paramType(n) === "String" && (n = JSON.parse(n));
|
|
990
|
+
} catch {
|
|
991
|
+
}
|
|
992
|
+
console.log("获取可视化消息===>", JSON.stringify(n, null, 2)), e(n);
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
ajax.prototype.get = function(e) {
|
|
996
|
+
var t = [];
|
|
997
|
+
for (var n in e.data) t.push(n + "=" + encodeURIComponent(e.data[n]));
|
|
998
|
+
var r = e.url.indexOf("?") > -1 ? e.url + "&" + t.join("&") : e.url + "?" + t.join("&");
|
|
999
|
+
this.url = r, this.data = e.data, this.type = "GET", this.success = e.success || function() {
|
|
1000
|
+
}, this.error = e.error || function() {
|
|
1001
|
+
}, xmlhttp(this);
|
|
1002
|
+
}, ajax.prototype.post = function(e) {
|
|
1003
|
+
this.url = e.url, this.data = e.data, this.type = "POST", this.success = e.success || function() {
|
|
1004
|
+
}, this.error = e.error || function() {
|
|
1005
|
+
}, xmlhttp(this);
|
|
1006
|
+
};
|
|
1007
|
+
var visitorConfig = {}, patt = /\d{13}/g, clickEleObj = { path: "", index: 0, ele: null, newPath: {}, elePostion: {} };
|
|
1008
|
+
function loadVisitorSDK() {
|
|
1009
|
+
var e = [];
|
|
1010
|
+
Util$1.addScript("AnalysysAgent_JS_SDK_VISUAL", visitorConfig.SDKFileDirectory, function() {
|
|
1011
|
+
if (window.AnalysysModule && window.AnalysysModule.visual) for (var t = 0; t < e.length; t++) window.AnalysysModule.visual.msg(e[t]);
|
|
1012
|
+
}), window.ARK_VISUAL = { config: visitorConfig }, Storage$1.setSession("visitor", !0), getMsg(function(t) {
|
|
1013
|
+
window.AnalysysModule && window.AnalysysModule.visual ? window.AnalysysModule.visual.msg(t) : e.push(t);
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1016
|
+
function IsReverse(e) {
|
|
1017
|
+
return e.split("").reverse().join("");
|
|
1018
|
+
}
|
|
1019
|
+
function checkPointBase(e, t) {
|
|
1020
|
+
var n = IsReverse(e), r = IsReverse(t);
|
|
1021
|
+
return n.indexOf(r) > -1;
|
|
1022
|
+
}
|
|
1023
|
+
function addElesListener() {
|
|
1024
|
+
visitorConfig.isHybrid === !0 && (visitorEventList = HybridAns.visitorEventList);
|
|
1025
|
+
var e = domParentList(clickEleObj.ele), t = parsePath(e.path);
|
|
1026
|
+
clickEleObj.elePath = t.clickPath, clickEleObj.path = e.path, clickEleObj.newPath = e.newPath;
|
|
1027
|
+
for (var n = [], r = 0; r < visitorEventList.length; r++) {
|
|
1028
|
+
var o = Util$1.toDeep(visitorEventList[r]);
|
|
1029
|
+
o.newPath = o.new_path;
|
|
1030
|
+
var a = o.path, s = o.index, c = o.newPath, y = o.bindings, p = o.eleClass, m = !1;
|
|
1031
|
+
(c || y) && checkNewPathBase(clickEleObj.newPath, c) == 1 && pathContrast(clickEleObj, o) === !0 ? m = !0 : c || y || checkPointBase(clickEleObj.elePath, a) !== !0 || (clickEleObj.index = setIndex(clickEleObj.ele, clickEleObj.path), (p === clickEleObj.eleClass && s === clickEleObj.index || pathContrast(clickEleObj, o) === !0) && (m = !0)), m === !0 && (o.ele = clickEleObj.ele, o.elePostion = clickEleObj.elePostion, n.push(o));
|
|
1032
|
+
}
|
|
1033
|
+
for (var w = 0; w < n.length; w++) {
|
|
1034
|
+
var b = n[w], T = b.new_path, d = b.bindings, l = b.ele, u = b.appEventId || b.event_id, g = b.isText;
|
|
1035
|
+
if (T || d) {
|
|
1036
|
+
var h = "Track" + +/* @__PURE__ */ new Date(), $ = /* @__PURE__ */ function(C, E, _) {
|
|
1037
|
+
return function(S) {
|
|
1038
|
+
S = S || {}, E && E.length > 0 && (S = Util$1.objMerge(S, getProperties(E))), S = Util$1.delEmpty(S), visitorConfig.isHybrid === !0 ? Util$1.isiOS === !0 && window.AnalysysModule && window.AnalysysModule.moduleStatus === !0 ? window.AnalysysModule.track(C, S, _) : Util$1.isiOS === !0 ? window.webkit.messageHandlers.AnalysysAgentTrack.postMessage([C, JSON.stringify(S), JSON.stringify(_)]) : window.AnalysysAgentHybrid.AnalysysAgentTrack(C, JSON.stringify(S), JSON.stringify(_)) : window.AnalysysAgent.track(C, S);
|
|
1039
|
+
};
|
|
1040
|
+
}(u, b.properties, b.elePostion);
|
|
1041
|
+
if (b.related && b.related.length > 0) for (var v = 0; v < b.related.length; v++) {
|
|
1042
|
+
var A = b.related[v].target;
|
|
1043
|
+
A.h5_path && (A.path = A.h5_path, b.related[v].target.h5_path = backH5PathProPath(b.newPath, A));
|
|
1044
|
+
}
|
|
1045
|
+
else b.related = [];
|
|
1046
|
+
if (Util$1.isiOS === !0 && visitorConfig.isHybrid === !0) return void getRelated(b.related, $, h, l);
|
|
1047
|
+
$(getRelated(b.related, null, null, l));
|
|
1048
|
+
} else
|
|
1049
|
+
g ? g === getElementContent(l) && window.AnalysysAgent.track(u) : window.AnalysysAgent.track(u);
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
var visitorEventList = [];
|
|
1053
|
+
function getVisitorEvent() {
|
|
1054
|
+
if (visitorConfig.isHybrid === !0) {
|
|
1055
|
+
if (window.AnalysysModule && window.AnalysysModule.moduleStatus === !0) window.AnalysysModule.eventList();
|
|
1056
|
+
else if (Util$1.isiOS === !0 && window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.AnalysysAgentGetEventList) window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.AnalysysAgentGetEventList.postMessage([]);
|
|
1057
|
+
else if (window.AnalysysAgentHybrid) {
|
|
1058
|
+
var e = window.AnalysysAgentHybrid.getEventList();
|
|
1059
|
+
e && HybridAns.onEventList(e);
|
|
1060
|
+
}
|
|
1061
|
+
} else if (visitorConfig.visitorConfigURL) {
|
|
1062
|
+
var t = window.location.hash;
|
|
1063
|
+
t && t.indexOf("?") > -1 && (t = t.split("?")[0]);
|
|
1064
|
+
var n = window.location.protocol + "//" + window.location.host + window.location.pathname + t;
|
|
1065
|
+
visitorEventList = [], getPoint(n);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
function parsePath(e) {
|
|
1069
|
+
for (var t = e.split("<"), n = t[0].split(".")[1] || "", r = [], o = 0; o < t.length; o++) r.push(t[o].split(".")[0]);
|
|
1070
|
+
return { class: n, clickPath: r.join("<") };
|
|
1071
|
+
}
|
|
1072
|
+
function getPoint(e) {
|
|
1073
|
+
var t = visitorConfig.visitorConfigURL + "configure", n = { url: t, data: { appkey: visitorConfig.appid, lib: "Js", url: e }, success: function(r) {
|
|
1074
|
+
if ((r = visitorConfig.visitorEventList || r).code === 0) {
|
|
1075
|
+
for (var o = [], a = [], s = 0; s < r.data.length; s++) {
|
|
1076
|
+
var c = r.data[s], y = parsePath(c.link), p = c.index, m = y.clickClass, w = y.clickPath, b = c.isText, T = c.link;
|
|
1077
|
+
patt.test(T) === !0 && (T = T.replace(patt, "")), o.push({ index: p, eleClass: m, elePath: w, isText: b, path: T, appEventId: c.appEventId, new_path: c.new_path, bindings: c.props_binding, related: c.related, properties: c.properties });
|
|
1078
|
+
var d = { eventID: c.appEventId, eventName: c.appEventName || "" };
|
|
1079
|
+
a.push(d);
|
|
1080
|
+
}
|
|
1081
|
+
visitorEventList = o, successLog("Get Visual Event List from " + t), successLog(JSON.stringify(a, null, 2));
|
|
1082
|
+
}
|
|
1083
|
+
}, error: function() {
|
|
1084
|
+
} };
|
|
1085
|
+
new ajax().get(n);
|
|
1086
|
+
}
|
|
1087
|
+
var url = window.location.href, detect$1 = Util$1.detectZoom();
|
|
1088
|
+
function pcMouseOver(e) {
|
|
1089
|
+
var t = !1;
|
|
1090
|
+
e.touches && e.touches.length > 0 && (e = e.touches[0], t = !0);
|
|
1091
|
+
for (var n = e.target || e.srcElement, r = Util$1.paramType(n.className) !== "String" ? [] : n.className.split(" "), o = "", a = 0; a < r.length; a++) r[a] && r[a].indexOf("ARK") < 0 && (o += "." + r[a]);
|
|
1092
|
+
(clickEleObj = { ele: n, eleClass: o, index: 0 }).elePostion = { $pos_left: e.clientX * detect$1, $pos_top: e.clientY * detect$1, $pos_width: n.offsetWidth * detect$1, $pos_height: n.offsetHeight * detect$1 }, t ? addElesListener() : Util$1.addEvent(n, "mousedown", addElesListener, !0);
|
|
1093
|
+
}
|
|
1094
|
+
function pcMouseOut(e) {
|
|
1095
|
+
var t = (e = e || window.event).target || e.srcElement;
|
|
1096
|
+
clickEleObj = {}, Util$1.removeEvent(t, "mousedown", addElesListener, !0);
|
|
1097
|
+
}
|
|
1098
|
+
function addEventListener() {
|
|
1099
|
+
Util$1.deviceType() === "desktop" && visitorConfig.isHybrid === !1 ? (Util$1.addEvent(document, "mouseover", pcMouseOver, !0), Util$1.addEvent(document, "mouseout", pcMouseOut, !0)) : Util$1.addEvent(document, "touchstart", pcMouseOver, !0), Util$1.changeHash(function() {
|
|
1100
|
+
url !== window.location.href && (url = window.location.href, getVisitorEvent());
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1103
|
+
function visitorInit(e) {
|
|
1104
|
+
return (visitorConfig = e).visitorConfigURL = Util$1.trim(visitorConfig.visitorConfigURL), e.isHybrid === !1 && window.self !== window.top && (Util$1.GetUrlParam("visual") || Storage$1.getSession("visitor") === !0 && window.location.href.indexOf("arkheatmap=true") < 0) ? document.getElementById("AnalysysAgent_JS_SDK_VISUAL") || loadVisitorSDK() : (visitorConfig.visitorConfigURL || e.isHybrid === !0) && (visitorConfig.visitorConfigURL && visitorConfig.visitorConfigURL.charAt(visitorConfig.visitorConfigURL.length - 1) !== "/" && (visitorConfig.visitorConfigURL += "/"), getVisitorEvent(), addEventListener()), e;
|
|
1105
|
+
}
|
|
1106
|
+
var lifecycle$1 = { AnalysysAgent: { init: visitorInit } }, visitor = Object.freeze({ __proto__: null, fieldRules: fieldRules$1, fieldTemplate: fieldTemplate$1, lifecycle: lifecycle$1 }), startDate = +/* @__PURE__ */ new Date(), root = null;
|
|
1107
|
+
function setRootEle(e) {
|
|
1108
|
+
root = e || document.body;
|
|
1109
|
+
}
|
|
1110
|
+
function getViewPortWidth() {
|
|
1111
|
+
return document.documentElement.clientWidth || document.body.clientWidth;
|
|
1112
|
+
}
|
|
1113
|
+
function getViewPortHeight() {
|
|
1114
|
+
return document.documentElement.clientHeight || document.body.clientHeight;
|
|
1115
|
+
}
|
|
1116
|
+
function getScrollTop() {
|
|
1117
|
+
return root.scrollTop || document.documentElement.scrollTop || document.body.scrollTop;
|
|
1118
|
+
}
|
|
1119
|
+
function getDuration() {
|
|
1120
|
+
var e = +/* @__PURE__ */ new Date(), t = e - startDate;
|
|
1121
|
+
if (startDate = e, Util$1.paramType(baseConfig.base.webstayDuration) === "Number" && baseConfig.base.webstayDuration > 0) {
|
|
1122
|
+
if (t > baseConfig.base.webstayDuration) return baseConfig.base.webstayDuration;
|
|
1123
|
+
} else if (t > 18e6) return 18e6;
|
|
1124
|
+
return t;
|
|
1125
|
+
}
|
|
1126
|
+
function getDeviceType() {
|
|
1127
|
+
return Util$1.deviceType();
|
|
1128
|
+
}
|
|
1129
|
+
var fieldRules$2 = { autoWebstay: { check: { value: ["isBoolean"] } }, xcontext: { $viewport_width: { valueType: 0, value: getViewPortWidth }, $viewport_position: { valueType: 0, value: getScrollTop }, $viewport_height: { valueType: 0, value: getViewPortHeight }, $event_duration: { valueType: 0, value: getDuration }, $device_type: { valueType: 0, value: getDeviceType } } }, fieldTemplate$2 = { $webstay: { xcontext: ["$referrer", "$referrer_domain", "$title", "$url", "$viewport_width", "$viewport_position", "$viewport_height", "$event_duration", "$device_type", "$session_id", "$is_time_calibrated", "$is_first_day"] } }, elePostion = { ele: "", click_x: 0, click_y: 0, clickEle: "" };
|
|
1130
|
+
function domParentList$1(e) {
|
|
1131
|
+
for (var t = [], n = e; n != null; ) {
|
|
1132
|
+
var r = 0;
|
|
1133
|
+
if (n.parentNode) {
|
|
1134
|
+
var o = n.parentNode.children;
|
|
1135
|
+
if (o) for (var a = 0; a < o.length; a++) o[a] === n && (r = a);
|
|
1136
|
+
}
|
|
1137
|
+
var s = n.tagName;
|
|
1138
|
+
if (s) {
|
|
1139
|
+
s = s.toLowerCase();
|
|
1140
|
+
var c = n.id ? "#" + n.id : "", y = n.className && Util$1.paramType(n.className) === "String" ? n.className.split(" ") : [];
|
|
1141
|
+
if (y.length > 0) {
|
|
1142
|
+
for (var p = "", m = 0; m < y.length; m++) y[m] && y[m].indexOf("ARK") < 0 && (p += "." + y[m]);
|
|
1143
|
+
t.push(s + c + p + "|" + r);
|
|
1144
|
+
} else t.push(s + c + "|" + r);
|
|
1145
|
+
n = n.parentNode;
|
|
1146
|
+
} else n = n.parentNode;
|
|
1147
|
+
}
|
|
1148
|
+
return t.join("<");
|
|
1149
|
+
}
|
|
1150
|
+
function getPageWidth() {
|
|
1151
|
+
return document.documentElement.scrollWidth;
|
|
1152
|
+
}
|
|
1153
|
+
function getPageHeight() {
|
|
1154
|
+
return document.documentElement.scrollHeight;
|
|
1155
|
+
}
|
|
1156
|
+
function getClickX() {
|
|
1157
|
+
return elePostion.click_x;
|
|
1158
|
+
}
|
|
1159
|
+
function getClickY() {
|
|
1160
|
+
return elePostion.click_y;
|
|
1161
|
+
}
|
|
1162
|
+
function getElementPath() {
|
|
1163
|
+
return domParentList$1(elePostion.ele);
|
|
1164
|
+
}
|
|
1165
|
+
function getUrlPath() {
|
|
1166
|
+
var e = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.hash;
|
|
1167
|
+
try {
|
|
1168
|
+
e = decodeURIComponent(e);
|
|
1169
|
+
} catch {
|
|
1170
|
+
}
|
|
1171
|
+
return baseConfig.base.isHybrid === !0 && (e = e.replace(/"/g, '\\"')), e;
|
|
1172
|
+
}
|
|
1173
|
+
function getElementX() {
|
|
1174
|
+
return elePostion.elementX;
|
|
1175
|
+
}
|
|
1176
|
+
function getElementY() {
|
|
1177
|
+
return elePostion.elementY;
|
|
1178
|
+
}
|
|
1179
|
+
function getElementType() {
|
|
1180
|
+
return elePostion.ele.tagName.toLowerCase();
|
|
1181
|
+
}
|
|
1182
|
+
function getElementClick() {
|
|
1183
|
+
return Util$1.paramType(elePostion.ele.onclick) === "Function";
|
|
1184
|
+
}
|
|
1185
|
+
function getElementAttrClick() {
|
|
1186
|
+
return elePostion.ele && elePostion.ele.getAttribute("data-ark-click") !== null;
|
|
1187
|
+
}
|
|
1188
|
+
function checkElementConfig(e) {
|
|
1189
|
+
if (!e || Util$1.paramType(e) === "Array" && e.length === 0 || Util$1.paramType(e) === "String" && e === "") return !1;
|
|
1190
|
+
var t = elePostion.ele;
|
|
1191
|
+
if (Util$1.paramType(e) === "String") {
|
|
1192
|
+
var n = t.tagName.toLowerCase(), r = Util$1.paramType(t.className) === "String" ? "." + t.className.split(" ").join(".") : "", o = t.id ? "#" + t.id : "";
|
|
1193
|
+
if (n === e.toLowerCase() || r === e || o === e || n + r === e || n + o === e || o + r === e || n + o + r === e) return !0;
|
|
1194
|
+
} else if (Util$1.paramType(e) === "Array") {
|
|
1195
|
+
for (var a = 0; a < e.length; a++) if (checkElementConfig(e[a]) === !0) return !0;
|
|
1196
|
+
} else {
|
|
1197
|
+
if (Util$1.paramType(e) === "Function") return e.call(e, t) || !1;
|
|
1198
|
+
if (typeof e == "object" && e === t) return !0;
|
|
1199
|
+
}
|
|
1200
|
+
return !1;
|
|
1201
|
+
}
|
|
1202
|
+
function getParentClickableElement() {
|
|
1203
|
+
for (var e = elePostion.ele; elePostion.ele != null; ) if (elePostion.ele.nodeType === 1) {
|
|
1204
|
+
if (getElementClick() || getElementClickable() === 1 || getElementAttrClick() || checkElementConfig(baseConfig.base.trackList)) {
|
|
1205
|
+
e = elePostion.ele;
|
|
1206
|
+
break;
|
|
1207
|
+
}
|
|
1208
|
+
elePostion.ele = elePostion.ele.parentNode;
|
|
1209
|
+
} else elePostion.ele = elePostion.ele.parentNode;
|
|
1210
|
+
elePostion.ele = e;
|
|
1211
|
+
}
|
|
1212
|
+
function getElementClickable() {
|
|
1213
|
+
var e = getElementType();
|
|
1214
|
+
if (["a", "button", "input", "select", "textarea", "svg"].indexOf(e) > -1 || getElementAttrClick() || checkElementConfig(baseConfig.base.trackList)) {
|
|
1215
|
+
if (e === "svg" && elePostion.ele.children && elePostion.ele.children.length > 0) {
|
|
1216
|
+
for (var t = 0, n = elePostion.ele.children, r = 0; r < n.length; r++) n[r].tagName.toLowerCase() === "use" && (n[r].getAttribute("xlink:href") || getElementAttrClick() || checkElementConfig(baseConfig.base.trackList)) && (t = 1);
|
|
1217
|
+
return t;
|
|
1218
|
+
}
|
|
1219
|
+
return 1;
|
|
1220
|
+
}
|
|
1221
|
+
return 0;
|
|
1222
|
+
}
|
|
1223
|
+
function getEleContent() {
|
|
1224
|
+
return getElementContent(elePostion.ele);
|
|
1225
|
+
}
|
|
1226
|
+
function getDeviceType$1() {
|
|
1227
|
+
return Util$1.deviceType();
|
|
1228
|
+
}
|
|
1229
|
+
function getElementId() {
|
|
1230
|
+
return elePostion.ele.id || elePostion.ele.getAttribute("id") || "";
|
|
1231
|
+
}
|
|
1232
|
+
function getElementName() {
|
|
1233
|
+
return elePostion.ele.getAttribute("name") || "";
|
|
1234
|
+
}
|
|
1235
|
+
function getElementClassName() {
|
|
1236
|
+
var e = elePostion.ele.getAttribute("class") || "";
|
|
1237
|
+
if (e) {
|
|
1238
|
+
for (var t = e.split(" "), n = [], r = 0; r < t.length; r++) t[r] !== "" && n.push(t[r]);
|
|
1239
|
+
return e = "." + n.join(".");
|
|
1240
|
+
}
|
|
1241
|
+
return "";
|
|
1242
|
+
}
|
|
1243
|
+
function getElementTargetUrl() {
|
|
1244
|
+
var e = elePostion.ele.getAttribute("href");
|
|
1245
|
+
if (e && e.indexOf("javascript:") < 0) {
|
|
1246
|
+
try {
|
|
1247
|
+
e = decodeURIComponent(e);
|
|
1248
|
+
} catch {
|
|
1249
|
+
}
|
|
1250
|
+
return baseConfig.base.isHybrid === !0 && (e = e.replace(/"/g, '\\"')), e;
|
|
1251
|
+
}
|
|
1252
|
+
return "";
|
|
1253
|
+
}
|
|
1254
|
+
function eleCss(e, t) {
|
|
1255
|
+
var n, r, o, a;
|
|
1256
|
+
if (e) {
|
|
1257
|
+
if (typeof t == "string") return getConstantStyle$1(e, t);
|
|
1258
|
+
if (Array.isArray(t)) {
|
|
1259
|
+
for (o = {}, a = 0, n = t.length; a < n; a++) o[r = t[a]] = getConstantStyle$1(e, r);
|
|
1260
|
+
return o;
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
function eleScroll(e) {
|
|
1265
|
+
for (var t = 0, n = 0; e != null && e !== document.body; ) e.nodeType === 1 && (t += e.scrollTop, n += e.scrollLeft), e = e.parentNode;
|
|
1266
|
+
return { scrollLeft: n, scrollTop: t };
|
|
1267
|
+
}
|
|
1268
|
+
function eleOffset$1(e) {
|
|
1269
|
+
for (var t = 0, n = 0, r = !1, o = !1; e != null; ) t += e.offsetTop, n += e.offsetLeft, r || (r = !(eleCss(e, "display") !== "none" && eleCss(e, "width") !== "0px" && eleCss(e, "height") !== "0px")), eleCss(e, "position") === "fixed" && (o = !0), e = e.offsetParent;
|
|
1270
|
+
return o === !0 && (t += document.documentElement.scrollTop || document.body.scrollTop, n += document.documentElement.scrollLeft || document.body.scrollLeft), { top: t, left: n, hidden: r };
|
|
1271
|
+
}
|
|
1272
|
+
function isElmentReady() {
|
|
1273
|
+
return !!(document && document.documentElement && document.getElementsByTagName && document.getElementById && document.body && document.documentElement.scrollWidth !== 0);
|
|
1274
|
+
}
|
|
1275
|
+
function getConstantStyle$1(e, t) {
|
|
1276
|
+
var n = document.defaultView;
|
|
1277
|
+
return n && n.getComputedStyle ? document.defaultView.getComputedStyle(e, null)[t] : e.currentStyle[t];
|
|
1278
|
+
}
|
|
1279
|
+
(function() {
|
|
1280
|
+
if (typeof window == "object") if ("IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype) "isIntersecting" in window.IntersectionObserverEntry.prototype || Object.defineProperty(window.IntersectionObserverEntry.prototype, "isIntersecting", { get: function() {
|
|
1281
|
+
return this.intersectionRatio > 0;
|
|
1282
|
+
} });
|
|
1283
|
+
else {
|
|
1284
|
+
var e = function(d) {
|
|
1285
|
+
for (var l = window.document, u = o(l); u; ) u = o(l = u.ownerDocument);
|
|
1286
|
+
return l;
|
|
1287
|
+
}(), t = [], n = null, r = null;
|
|
1288
|
+
s.prototype.THROTTLE_TIMEOUT = 100, s.prototype.POLL_INTERVAL = null, s.prototype.USE_MUTATION_OBSERVER = !0, s._setupCrossOriginUpdater = function() {
|
|
1289
|
+
return n || (n = function(d, l) {
|
|
1290
|
+
r = d && l ? w(d, l) : { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }, t.forEach(function(u) {
|
|
1291
|
+
u._checkForIntersections();
|
|
1292
|
+
});
|
|
1293
|
+
}), n;
|
|
1294
|
+
}, s._resetCrossOriginUpdater = function() {
|
|
1295
|
+
n = null, r = null;
|
|
1296
|
+
}, s.prototype.observe = function(d) {
|
|
1297
|
+
if (!this._observationTargets.some(function(l) {
|
|
1298
|
+
return l.element == d;
|
|
1299
|
+
})) {
|
|
1300
|
+
if (!d || d.nodeType != 1) throw new Error("target must be an Element");
|
|
1301
|
+
this._registerInstance(), this._observationTargets.push({ element: d, entry: null }), this._monitorIntersections(d.ownerDocument), this._checkForIntersections();
|
|
1302
|
+
}
|
|
1303
|
+
}, s.prototype.unobserve = function(d) {
|
|
1304
|
+
this._observationTargets = this._observationTargets.filter(function(l) {
|
|
1305
|
+
return l.element != d;
|
|
1306
|
+
}), this._unmonitorIntersections(d.ownerDocument), this._observationTargets.length == 0 && this._unregisterInstance();
|
|
1307
|
+
}, s.prototype.disconnect = function() {
|
|
1308
|
+
this._observationTargets = [], this._unmonitorAllIntersections(), this._unregisterInstance();
|
|
1309
|
+
}, s.prototype.takeRecords = function() {
|
|
1310
|
+
var d = this._queuedEntries.slice();
|
|
1311
|
+
return this._queuedEntries = [], d;
|
|
1312
|
+
}, s.prototype._initThresholds = function(d) {
|
|
1313
|
+
var l = d || [0];
|
|
1314
|
+
return Array.isArray(l) || (l = [l]), l.sort().filter(function(u, g, h) {
|
|
1315
|
+
if (typeof u != "number" || isNaN(u) || u < 0 || u > 1) throw new Error("threshold must be a number between 0 and 1 inclusively");
|
|
1316
|
+
return u !== h[g - 1];
|
|
1317
|
+
});
|
|
1318
|
+
}, s.prototype._parseRootMargin = function(d) {
|
|
1319
|
+
var l = (d || "0px").split(/\s+/).map(function(u) {
|
|
1320
|
+
var g = /^(-?\d*\.?\d+)(px|%)$/.exec(u);
|
|
1321
|
+
if (!g) throw new Error("rootMargin must be specified in pixels or percent");
|
|
1322
|
+
return { value: parseFloat(g[1]), unit: g[2] };
|
|
1323
|
+
});
|
|
1324
|
+
return l[1] = l[1] || l[0], l[2] = l[2] || l[0], l[3] = l[3] || l[1], l;
|
|
1325
|
+
}, s.prototype._monitorIntersections = function(d) {
|
|
1326
|
+
var l = d.defaultView;
|
|
1327
|
+
if (l && this._monitoringDocuments.indexOf(d) == -1) {
|
|
1328
|
+
var u = this._checkForIntersections, g = null, h = null;
|
|
1329
|
+
if (this.POLL_INTERVAL ? g = l.setInterval(u, this.POLL_INTERVAL) : (c(l, "resize", u, !0), c(d, "scroll", u, !0), this.USE_MUTATION_OBSERVER && "MutationObserver" in l && (h = new l.MutationObserver(u)).observe(d, { attributes: !0, childList: !0, characterData: !0, subtree: !0 })), this._monitoringDocuments.push(d), this._monitoringUnsubscribes.push(function() {
|
|
1330
|
+
var v = d.defaultView;
|
|
1331
|
+
v && (g && v.clearInterval(g), y(v, "resize", u, !0)), y(d, "scroll", u, !0), h && h.disconnect();
|
|
1332
|
+
}), d != (this.root && this.root.ownerDocument || e)) {
|
|
1333
|
+
var $ = o(d);
|
|
1334
|
+
$ && this._monitorIntersections($.ownerDocument);
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
}, s.prototype._unmonitorIntersections = function(d) {
|
|
1338
|
+
var l = this._monitoringDocuments.indexOf(d);
|
|
1339
|
+
if (l != -1) {
|
|
1340
|
+
var u = this.root && this.root.ownerDocument || e;
|
|
1341
|
+
if (!this._observationTargets.some(function($) {
|
|
1342
|
+
var v = $.element.ownerDocument;
|
|
1343
|
+
if (v == d) return !0;
|
|
1344
|
+
for (; v && v != u; ) {
|
|
1345
|
+
var A = o(v);
|
|
1346
|
+
if ((v = A && A.ownerDocument) == d) return !0;
|
|
1347
|
+
}
|
|
1348
|
+
return !1;
|
|
1349
|
+
})) {
|
|
1350
|
+
var g = this._monitoringUnsubscribes[l];
|
|
1351
|
+
if (this._monitoringDocuments.splice(l, 1), this._monitoringUnsubscribes.splice(l, 1), g(), d != u) {
|
|
1352
|
+
var h = o(d);
|
|
1353
|
+
h && this._unmonitorIntersections(h.ownerDocument);
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
}, s.prototype._unmonitorAllIntersections = function() {
|
|
1358
|
+
var d = this._monitoringUnsubscribes.slice(0);
|
|
1359
|
+
this._monitoringDocuments.length = 0, this._monitoringUnsubscribes.length = 0;
|
|
1360
|
+
for (var l = 0; l < d.length; l++) d[l]();
|
|
1361
|
+
}, s.prototype._checkForIntersections = function() {
|
|
1362
|
+
if (this.root || !n || r) {
|
|
1363
|
+
var d = this._rootIsInDom(), l = d ? this._getRootRect() : { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 };
|
|
1364
|
+
this._observationTargets.forEach(function(u) {
|
|
1365
|
+
var g = u.element, h = p(g), $ = this._rootContainsTarget(g), v = u.entry, A = d && $ && this._computeTargetAndRootIntersection(g, h, l), C = u.entry = new a({ time: window.performance && performance.now && performance.now(), target: g, boundingClientRect: h, rootBounds: n && !this.root ? null : l, intersectionRect: A });
|
|
1366
|
+
v ? d && $ ? this._hasCrossedThreshold(v, C) && this._queuedEntries.push(C) : v && v.isIntersecting && this._queuedEntries.push(C) : this._queuedEntries.push(C);
|
|
1367
|
+
}, this), this._queuedEntries.length && this._callback(this.takeRecords(), this);
|
|
1368
|
+
}
|
|
1369
|
+
}, s.prototype._computeTargetAndRootIntersection = function(d, l, u) {
|
|
1370
|
+
if (window.getComputedStyle(d).display != "none") {
|
|
1371
|
+
for (var g, h, $, v, A, C, E, _, S = l, U = T(d), O = !1; !O && U; ) {
|
|
1372
|
+
var k = null, N = U.nodeType == 1 ? window.getComputedStyle(U) : {};
|
|
1373
|
+
if (N.display == "none") return null;
|
|
1374
|
+
if (U == this.root || U.nodeType == 9) if (O = !0, U == this.root || U == e) n && !this.root ? !r || r.width == 0 && r.height == 0 ? (U = null, k = null, S = null) : k = r : k = u;
|
|
1375
|
+
else {
|
|
1376
|
+
var L = T(U), P = L && p(L), R = L && this._computeTargetAndRootIntersection(L, P, u);
|
|
1377
|
+
P && R ? (U = L, k = w(P, R)) : (U = null, S = null);
|
|
1378
|
+
}
|
|
1379
|
+
else {
|
|
1380
|
+
var I = U.ownerDocument;
|
|
1381
|
+
U != I.body && U != I.documentElement && N.overflow != "visible" && (k = p(U));
|
|
1382
|
+
}
|
|
1383
|
+
if (k && (g = k, h = S, $ = void 0, v = void 0, A = void 0, C = void 0, E = void 0, _ = void 0, $ = Math.max(g.top, h.top), v = Math.min(g.bottom, h.bottom), A = Math.max(g.left, h.left), C = Math.min(g.right, h.right), _ = v - $, S = (E = C - A) >= 0 && _ >= 0 && { top: $, bottom: v, left: A, right: C, width: E, height: _ } || null), !S) break;
|
|
1384
|
+
U = U && T(U);
|
|
1385
|
+
}
|
|
1386
|
+
return S;
|
|
1387
|
+
}
|
|
1388
|
+
}, s.prototype._getRootRect = function() {
|
|
1389
|
+
var d;
|
|
1390
|
+
if (this.root) d = p(this.root);
|
|
1391
|
+
else {
|
|
1392
|
+
var l = e.documentElement, u = e.body;
|
|
1393
|
+
d = { top: 0, left: 0, right: l.clientWidth || u.clientWidth, width: l.clientWidth || u.clientWidth, bottom: l.clientHeight || u.clientHeight, height: l.clientHeight || u.clientHeight };
|
|
1394
|
+
}
|
|
1395
|
+
return this._expandRectByRootMargin(d);
|
|
1396
|
+
}, s.prototype._expandRectByRootMargin = function(d) {
|
|
1397
|
+
var l = this._rootMarginValues.map(function(g, h) {
|
|
1398
|
+
return g.unit == "px" ? g.value : g.value * (h % 2 ? d.width : d.height) / 100;
|
|
1399
|
+
}), u = { top: d.top - l[0], right: d.right + l[1], bottom: d.bottom + l[2], left: d.left - l[3] };
|
|
1400
|
+
return u.width = u.right - u.left, u.height = u.bottom - u.top, u;
|
|
1401
|
+
}, s.prototype._hasCrossedThreshold = function(d, l) {
|
|
1402
|
+
var u = d && d.isIntersecting ? d.intersectionRatio || 0 : -1, g = l.isIntersecting ? l.intersectionRatio || 0 : -1;
|
|
1403
|
+
if (u !== g) for (var h = 0; h < this.thresholds.length; h++) {
|
|
1404
|
+
var $ = this.thresholds[h];
|
|
1405
|
+
if ($ == u || $ == g || $ < u != $ < g) return !0;
|
|
1406
|
+
}
|
|
1407
|
+
}, s.prototype._rootIsInDom = function() {
|
|
1408
|
+
return !this.root || b(e, this.root);
|
|
1409
|
+
}, s.prototype._rootContainsTarget = function(d) {
|
|
1410
|
+
return b(this.root || e, d) && (!this.root || this.root.ownerDocument == d.ownerDocument);
|
|
1411
|
+
}, s.prototype._registerInstance = function() {
|
|
1412
|
+
t.indexOf(this) < 0 && t.push(this);
|
|
1413
|
+
}, s.prototype._unregisterInstance = function() {
|
|
1414
|
+
var d = t.indexOf(this);
|
|
1415
|
+
d != -1 && t.splice(d, 1);
|
|
1416
|
+
}, window.IntersectionObserver = s, window.IntersectionObserverEntry = a;
|
|
1417
|
+
}
|
|
1418
|
+
function o(d) {
|
|
1419
|
+
try {
|
|
1420
|
+
return d.defaultView && d.defaultView.frameElement || null;
|
|
1421
|
+
} catch {
|
|
1422
|
+
return null;
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
function a(d) {
|
|
1426
|
+
this.time = d.time, this.target = d.target, this.rootBounds = m(d.rootBounds), this.boundingClientRect = m(d.boundingClientRect), this.intersectionRect = m(d.intersectionRect || { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }), this.isIntersecting = !!d.intersectionRect;
|
|
1427
|
+
var l = this.boundingClientRect, u = l.width * l.height, g = this.intersectionRect, h = g.width * g.height;
|
|
1428
|
+
this.intersectionRatio = u ? Number((h / u).toFixed(4)) : this.isIntersecting ? 1 : 0;
|
|
1429
|
+
}
|
|
1430
|
+
function s(d, l) {
|
|
1431
|
+
var u, g, h, $ = l || {};
|
|
1432
|
+
if (typeof d != "function") throw new Error("callback must be a function");
|
|
1433
|
+
if ($.root && $.root.nodeType != 1) throw new Error("root must be an Element");
|
|
1434
|
+
this._checkForIntersections = (u = this._checkForIntersections.bind(this), g = this.THROTTLE_TIMEOUT, h = null, function() {
|
|
1435
|
+
h || (h = setTimeout(function() {
|
|
1436
|
+
u(), h = null;
|
|
1437
|
+
}, g));
|
|
1438
|
+
}), this._callback = d, this._observationTargets = [], this._queuedEntries = [], this._rootMarginValues = this._parseRootMargin($.rootMargin), this.thresholds = this._initThresholds($.threshold), this.root = $.root || null, this.rootMargin = this._rootMarginValues.map(function(v) {
|
|
1439
|
+
return v.value + v.unit;
|
|
1440
|
+
}).join(" "), this._monitoringDocuments = [], this._monitoringUnsubscribes = [];
|
|
1441
|
+
}
|
|
1442
|
+
function c(d, l, u, g) {
|
|
1443
|
+
typeof d.addEventListener == "function" ? d.addEventListener(l, u, g) : typeof d.attachEvent == "function" && d.attachEvent("on" + l, u);
|
|
1444
|
+
}
|
|
1445
|
+
function y(d, l, u, g) {
|
|
1446
|
+
typeof d.removeEventListener == "function" ? d.removeEventListener(l, u, g) : typeof d.detatchEvent == "function" && d.detatchEvent("on" + l, u);
|
|
1447
|
+
}
|
|
1448
|
+
function p(d) {
|
|
1449
|
+
var l;
|
|
1450
|
+
try {
|
|
1451
|
+
l = d.getBoundingClientRect();
|
|
1452
|
+
} catch {
|
|
1453
|
+
}
|
|
1454
|
+
return l ? (l.width && l.height || (l = { top: l.top, right: l.right, bottom: l.bottom, left: l.left, width: l.right - l.left, height: l.bottom - l.top }), l) : { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 };
|
|
1455
|
+
}
|
|
1456
|
+
function m(d) {
|
|
1457
|
+
return !d || "x" in d ? d : { top: d.top, y: d.top, bottom: d.bottom, left: d.left, x: d.left, right: d.right, width: d.width, height: d.height };
|
|
1458
|
+
}
|
|
1459
|
+
function w(d, l) {
|
|
1460
|
+
var u = l.top - d.top, g = l.left - d.left;
|
|
1461
|
+
return { top: u, left: g, height: l.height, width: l.width, bottom: u + l.height, right: g + l.width };
|
|
1462
|
+
}
|
|
1463
|
+
function b(d, l) {
|
|
1464
|
+
for (var u = l; u; ) {
|
|
1465
|
+
if (u == d) return !0;
|
|
1466
|
+
u = T(u);
|
|
1467
|
+
}
|
|
1468
|
+
return !1;
|
|
1469
|
+
}
|
|
1470
|
+
function T(d) {
|
|
1471
|
+
var l = d.parentNode;
|
|
1472
|
+
return d.nodeType == 9 && d != e ? o(d) : l && l.nodeType == 11 && l.host ? l.host : l && l.assignedSlot ? l.assignedSlot.parentNode : l;
|
|
1473
|
+
}
|
|
1474
|
+
})();
|
|
1475
|
+
var interval = null, topValue = 0;
|
|
1476
|
+
function initWebStay() {
|
|
1477
|
+
function e() {
|
|
1478
|
+
return isRoot === !0 ? document.documentElement.scrollTop || document.body.scrollTop : rootEle.scrollTop || 0;
|
|
1479
|
+
}
|
|
1480
|
+
function t() {
|
|
1481
|
+
var n = e();
|
|
1482
|
+
topValue === n && (clearTimeout(interval), interval = null, window.AnalysysAgent && window.AnalysysAgent.freeApi ? window.AnalysysAgent.freeApi("$webstay") : setTimeout(function() {
|
|
1483
|
+
t();
|
|
1484
|
+
}, 100));
|
|
1485
|
+
}
|
|
1486
|
+
Util$1.addEvent(rootEle, "scroll", function() {
|
|
1487
|
+
clearTimeout(interval), interval = setTimeout(t, 1e3), topValue = e();
|
|
1488
|
+
});
|
|
1489
|
+
}
|
|
1490
|
+
function getChildEle(e) {
|
|
1491
|
+
for (var t = (e || document.body).childNodes, n = document.body, r = 0; r < t.length; r++) if (t[r].nodeType === 1) {
|
|
1492
|
+
if (hasScrollbar(t[r]) === !0) return isRoot = !1, t[r];
|
|
1493
|
+
n = getChildEle(t[r]);
|
|
1494
|
+
}
|
|
1495
|
+
return n;
|
|
1496
|
+
}
|
|
1497
|
+
function hasScrollbar(e) {
|
|
1498
|
+
var t = 0, n = 0, r = document.body.scrollHeight;
|
|
1499
|
+
return e ? (t = e.scrollHeight, n = e.clientHeight) : (t = document.body.scrollHeight, n = window.innerHeight || document.documentElement.clientHeight), t > n && t > r;
|
|
1500
|
+
}
|
|
1501
|
+
var rootEle = null, isRoot = !0;
|
|
1502
|
+
function getRootEle(e) {
|
|
1503
|
+
var t = null;
|
|
1504
|
+
if (e.autoHeatmap === !0 && e.autoWebstay === !0 && e.isHybrid === !1) {
|
|
1505
|
+
var n = e.webstayRootEle;
|
|
1506
|
+
if (n) if (Util$1.paramType(n) === "String") {
|
|
1507
|
+
var r = Util$1.selectorAllEleList(n);
|
|
1508
|
+
r.length > 0 && (t = r[0]);
|
|
1509
|
+
} else Util$1.paramType(n) === "Function" ? t = n.call(n) || null : typeof n == "object" && n.nodeType === 1 && (t = n);
|
|
1510
|
+
t ? (isRoot = !1, rootEle = t) : rootEle = getChildEle(), rootEle !== document.body && rootEle || (rootEle = window), setRootEle(rootEle), initWebStay();
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
function autoWebstayInit(e) {
|
|
1514
|
+
return window.location.href.indexOf("visual=true") > -1 || window.location.href.indexOf("arkheatmap=true") > -1 || (isElmentReady() === !1 ? setTimeout(function() {
|
|
1515
|
+
autoWebstayInit(e);
|
|
1516
|
+
}, 300) : getRootEle(e)), e;
|
|
1517
|
+
}
|
|
1518
|
+
var lifecycle$2 = { AnalysysAgent: { init: autoWebstayInit } }, webstay = Object.freeze({ __proto__: null, fieldRules: fieldRules$2, fieldTemplate: fieldTemplate$2, lifecycle: lifecycle$2 }), fieldRules$3 = { autoHeatmap: { check: { value: ["isBoolean"] } }, xcontext: { $page_width: { valueType: 0, value: getPageWidth }, $page_height: { valueType: 0, value: getPageHeight }, $click_x: { valueType: 0, value: getClickX }, $click_y: { valueType: 0, value: getClickY }, $element_path: { valueType: 0, value: getElementPath }, $url_path: { valueType: 0, value: getUrlPath }, $element_x: { valueType: 0, value: getElementX }, $element_y: { valueType: 0, value: getElementY }, $element_type: { valueType: 0, value: getElementType }, $element_clickable: { valueType: 0, value: getElementClickable }, $element_content: { valueType: 0, value: getEleContent }, $device_type: { valueType: 0, value: getDeviceType$1 }, $element_id: { valueType: 0, value: getElementId }, $element_name: { valueType: 0, value: getElementName }, $element_target_url: { valueType: 0, value: getElementTargetUrl }, $element_class_name: { valueType: 0, value: getElementClassName } } }, fieldTemplate$3 = { $web_click: { xcontext: ["$page_width", "$page_height", "$click_x", "$click_y", "$element_path", "$url_path", "$url", "$title", "$session_id", "$device_type", "$session_id", "$is_time_calibrated", "$element_x", "$element_y", "$element_type", "$element_clickable", "$element_content", "$is_first_day", "$element_id", "$element_name", "$element_target_url", "$element_class_name"] } }, heatmapConfig = {};
|
|
1519
|
+
function loadHeatmapSDK() {
|
|
1520
|
+
document.body && document.getElementsByTagName("body")[0] ? (Util$1.addScript("AnalysysAgent_JS_SDK_HEATMAP", heatmapConfig.SDKFileDirectory), window.ARK_HEATMAP = { config: heatmapConfig }) : setTimeout(loadHeatmapSDK, 50);
|
|
1521
|
+
}
|
|
1522
|
+
function addClickEvent(e) {
|
|
1523
|
+
var t = e || window.event;
|
|
1524
|
+
t.touches && t.touches.length > 0 && (t = t.touches[0]);
|
|
1525
|
+
var n = t.target || t.srcElement;
|
|
1526
|
+
if (!(Util$1.checkTypeList(heatmapConfig.heatMapBlackList, n) || heatmapConfig.heatMapWhiteList && !Util$1.checkTypeList(heatmapConfig.heatMapWhiteList, n))) {
|
|
1527
|
+
var r = document.documentElement.scrollLeft || document.body.scrollLeft, o = document.documentElement.scrollTop || document.body.scrollTop, a = t.pageX || t.clientX + r, s = t.pageY || t.clientY + o;
|
|
1528
|
+
elePostion.click_x = a, elePostion.click_y = s, elePostion.clickEle = elePostion.ele = n, getParentClickableElement();
|
|
1529
|
+
var c = eleScroll(elePostion.ele), y = eleOffset$1(elePostion.ele);
|
|
1530
|
+
elePostion.elementX = a - (y.left - c.scrollLeft), elePostion.elementY = s - (y.top - c.scrollTop), !a || !s || a <= 0 || s <= 0 || (window.AnalysysAgent && window.AnalysysAgent.freeApi ? window.AnalysysAgent.freeApi("$web_click") : setTimeout(function() {
|
|
1531
|
+
addClickEvent(e);
|
|
1532
|
+
}, 100));
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
function initHeatmap() {
|
|
1536
|
+
Util$1.deviceType() == "desktop" ? Util$1.addEvent(document, "click", addClickEvent) : Util$1.addEvent(document, "touchstart", addClickEvent);
|
|
1537
|
+
}
|
|
1538
|
+
function heatmapInit(e) {
|
|
1539
|
+
return heatmapConfig = e, window.location.href.indexOf("arkheatmap=true") > -1 || window.name.indexOf("arkheatmap=true") > -1 ? (window.name === "" && (window.name = window.location.href), loadHeatmapSDK()) : e.autoHeatmap === !0 && e.isHybrid === !1 && initHeatmap(), e;
|
|
1540
|
+
}
|
|
1541
|
+
for (var lifecycle$3 = { AnalysysAgent: { init: heatmapInit } }, heatmap = Object.freeze({ __proto__: null, fieldRules: fieldRules$3, fieldTemplate: fieldTemplate$3, lifecycle: lifecycle$3 }), fieldRules$4 = { xcontext: { $user_agent: { valueType: 1, value: window.navigator.userAgent.replace(/"/g, '\\"') } } }, temp = {}, event = ["$startup", "$track", "$pageview", "$webstay", "$web_click", "$user_click"], common = { xcontext: ["$user_agent"] }, i = 0; i < event.length; i++) temp[event[i]] = common;
|
|
1542
|
+
var ua = Object.freeze({ __proto__: null, fieldRules: fieldRules$4, fieldTemplate: temp }), fieldRules$5 = { xcontext: { $page_width: { valueType: 0, value: getPageWidth }, $page_height: { valueType: 0, value: getPageHeight }, $element_path: { valueType: 0, value: getElementPath }, $url_path: { valueType: 0, value: getUrlPath }, $element_type: { valueType: 0, value: getElementType }, $element_clickable: { valueType: 0, value: getElementClickable }, $element_content: { valueType: 0, value: getEleContent }, $device_type: { valueType: 0, value: getDeviceType$1 }, $element_id: { valueType: 0, value: getElementId }, $element_name: { valueType: 0, value: getElementName }, $element_target_url: { valueType: 0, value: getElementTargetUrl }, $element_class_name: { valueType: 0, value: getElementClassName } } }, fieldTemplate$4 = { $user_click: { xcontext: ["$url_path", "$url", "$title", "$is_first_day", "$session_id", "$is_time_calibrated", "$device_type", "$element_type", "$element_path", "$element_content", "$element_id", "$element_name", "$element_target_url", "$element_class_name"] } }, userClickConfig = {};
|
|
1543
|
+
function addClickEvent$1(e) {
|
|
1544
|
+
var t = e || window.event;
|
|
1545
|
+
t.touches && t.touches.length > 0 && (t = t.touches[0]);
|
|
1546
|
+
var n = t.target || t.srcElement;
|
|
1547
|
+
if (!(Util$1.checkTypeList(userClickConfig.autoClickBlackList, n) || userClickConfig.autoClickWhiteList && !Util$1.checkTypeList(userClickConfig.autoClickWhiteList, n)) && (elePostion.ele = n, getParentClickableElement(), getElementClickable() === 1)) {
|
|
1548
|
+
var r = userClickConfig.user_click_property, o = {};
|
|
1549
|
+
if (Util$1.paramType(r) === "Object") {
|
|
1550
|
+
for (var a in r) Util$1.paramType(r[a]) === "Function" && (r[a] = r[a].call(r[a], n));
|
|
1551
|
+
o = r;
|
|
1552
|
+
} else Util$1.paramType(r) === "Function" && (o = r.call(r, n));
|
|
1553
|
+
var s = elePostion.ele.getAttribute("data-ark-click") || {};
|
|
1554
|
+
if (Util$1.paramType(s) === "String") try {
|
|
1555
|
+
s = JSON.parse(s);
|
|
1556
|
+
} catch {
|
|
1557
|
+
}
|
|
1558
|
+
Util$1.paramType(s) !== "Object" && (s = {}), Util$1.paramType(o) === "Object" && (s = Util$1.objMerge(o, s)), window.AnalysysAgent.freeApi("$user_click", s);
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
function addListenerUserClick() {
|
|
1562
|
+
Util$1.deviceType() === "desktop" ? Util$1.addEvent(document, "mousedown", addClickEvent$1) : Util$1.addEvent(document, "touchstart", addClickEvent$1);
|
|
1563
|
+
}
|
|
1564
|
+
function userClickInit(e) {
|
|
1565
|
+
return userClickConfig = e, e.autoTrack === !0 && addListenerUserClick(), e;
|
|
1566
|
+
}
|
|
1567
|
+
for (var lifecycle$4 = { AnalysysAgent: { init: userClickInit } }, userClick = Object.freeze({ __proto__: null, fieldRules: fieldRules$5, fieldTemplate: fieldTemplate$4, lifecycle: lifecycle$4 }), plugList = [visitor, webstay, heatmap, ua, userClick], fieldRules$6 = fieldRules || {}, fieldTemplate$5 = fieldTemplate || {}, lifecycle$5 = lifecycle || {}, i$1 = 0; i$1 < plugList.length; i$1++) plugList[i$1].fieldRules && (fieldRules$6 = Util$1.objMerge(fieldRules$6, plugList[i$1].fieldRules)), plugList[i$1].fieldTemplate && (fieldTemplate$5 = Util$1.objMerge(fieldTemplate$5, plugList[i$1].fieldTemplate)), plugList[i$1].lifecycle && (lifecycle$5 = Util$1.fnMerge(lifecycle$5, plugList[i$1].lifecycle));
|
|
1568
|
+
for (var eventTemp = {}, commonTemp = {}, baseTemp = fieldTemplate$5.base, outerTemp = baseTemp.outer, i$2 = 0; i$2 < outerTemp.length; i$2++) baseTemp[outerTemp[i$2]] ? commonTemp[outerTemp[i$2]] = Util$1.toObj(baseTemp[outerTemp[i$2]]) : commonTemp[outerTemp[i$2]] = "";
|
|
1569
|
+
for (var key in fieldTemplate$5) if (key !== "base") {
|
|
1570
|
+
var keyTemp = Util$1.toDeepObj(fieldTemplate$5[key]);
|
|
1571
|
+
eventTemp[key + "base"] = keyTemp, eventTemp[key] = Util$1.objMerge(commonTemp, keyTemp);
|
|
1572
|
+
}
|
|
1573
|
+
function temp$1(e) {
|
|
1574
|
+
return eventTemp[e] || eventTemp.commonTemp;
|
|
1575
|
+
}
|
|
1576
|
+
eventTemp.commonTemp = commonTemp;
|
|
1577
|
+
var CheckField = function() {
|
|
1578
|
+
};
|
|
1579
|
+
CheckField.prototype = Util$1, CheckField.prototype.isString = function(e) {
|
|
1580
|
+
return baseConfig.status.errorCode = "60001", Util$1.paramType(e) === "String";
|
|
1581
|
+
}, CheckField.prototype.isNumber = function(e) {
|
|
1582
|
+
return baseConfig.status.errorCode = "60002", Util$1.paramType(e) === "Number";
|
|
1583
|
+
}, CheckField.prototype.isBoolean = function(e) {
|
|
1584
|
+
return baseConfig.status.errorCode = "60003", Util$1.paramType(e) === "Boolean";
|
|
1585
|
+
}, CheckField.prototype.isObject = function(e) {
|
|
1586
|
+
return this.paramType(e) === "Object";
|
|
1587
|
+
}, CheckField.prototype.lengthRule = function(e, t, n) {
|
|
1588
|
+
this.isNumber(n) || (n = 1 / 0);
|
|
1589
|
+
var r = !0;
|
|
1590
|
+
return this.isNumber(t) && e.length && e.length > t && e.length < n + 1 || (baseConfig.status.errorCode = "60005", r = !1), r;
|
|
1591
|
+
}, CheckField.prototype.nimLength = function(e) {
|
|
1592
|
+
return this.lengthRule(e, 0);
|
|
1593
|
+
}, CheckField.prototype.length99 = function(e) {
|
|
1594
|
+
var t = this.lengthRule(e, 0, 99);
|
|
1595
|
+
return t || (baseConfig.status.errorCode = "600010"), t;
|
|
1596
|
+
}, CheckField.prototype.length125 = function(e) {
|
|
1597
|
+
var t = this.lengthRule(e, 0, 125);
|
|
1598
|
+
return t || (baseConfig.status.errorCode = "60009"), t;
|
|
1599
|
+
}, CheckField.prototype.length255 = function(e) {
|
|
1600
|
+
if (!(e || this.isString(e) || this.isNumber(e) || this.isBoolean(e))) return baseConfig.status.errorCode = "60005", !1;
|
|
1601
|
+
this.paramType(e) !== "String" && (e = e.toString());
|
|
1602
|
+
var t = this.lengthRule(e, 0, 255);
|
|
1603
|
+
return t || (baseConfig.status.errorCode = "600019"), t;
|
|
1604
|
+
}, CheckField.prototype.keyLength255 = function(e) {
|
|
1605
|
+
var t = this.length255(e);
|
|
1606
|
+
return t || (baseConfig.status.errorCode = "600017"), t;
|
|
1607
|
+
}, CheckField.prototype.isUrl = function(e) {
|
|
1608
|
+
var t = e;
|
|
1609
|
+
return new RegExp(/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/).test(t) === !0 || (baseConfig.status.errorCode = "60006", !1);
|
|
1610
|
+
}, CheckField.prototype.isDebug = function(e) {
|
|
1611
|
+
return !(!this.isNumber(e) || e !== 0 && e !== 1 && e !== 2);
|
|
1612
|
+
}, CheckField.prototype.notObject = function(e) {
|
|
1613
|
+
var t = !this.isObject(e);
|
|
1614
|
+
return t || (baseConfig.status.errorCode = "600020"), t;
|
|
1615
|
+
}, CheckField.prototype.notSpecialCharacters = function(e) {
|
|
1616
|
+
return !(new RegExp("[\\u4E00-\\u9FA5]|[\\uFE30-\\uFFA0]", "gi").test(e) || !/^[$a-zA-Z][a-zA-Z0-9_$]{0,}$/.test(e)) || (baseConfig.status.errorCode = "600011", !1);
|
|
1617
|
+
}, CheckField.prototype.isArrayString = function(e) {
|
|
1618
|
+
if (this.paramType(e) === "Array") for (var t = 0; t < e.length; t++) {
|
|
1619
|
+
if (this.paramType(e[t]) !== "String") return baseConfig.status.errorCode = "600013", !1;
|
|
1620
|
+
if (!this.length255(e[t])) return e[t] && e[t].length > 500 && (e[t] = Util$1.stringSlice(e[t], 499) + "$"), baseConfig.status.value = e[t], !1;
|
|
1621
|
+
}
|
|
1622
|
+
return !0;
|
|
1623
|
+
}, CheckField.prototype.keywords = function(e) {
|
|
1624
|
+
return !(baseConfig.keywords.indexOf(e) > -1) || (baseConfig.status.errorCode = "600012", !1);
|
|
1625
|
+
};
|
|
1626
|
+
var checkRule = new CheckField();
|
|
1627
|
+
function check(e, t) {
|
|
1628
|
+
for (var n = 0; n < t.length; n++)
|
|
1629
|
+
if (!checkRule[t[n]](e)) return !1;
|
|
1630
|
+
return !0;
|
|
1631
|
+
}
|
|
1632
|
+
function checkFields(e, t, n) {
|
|
1633
|
+
var r = n.check, o = !0;
|
|
1634
|
+
if (!r) return o;
|
|
1635
|
+
var a = r.key, s = r.value || fieldRules$6.xcontextCommonRule.value;
|
|
1636
|
+
return a && (baseConfig.status.code = 200, o = check(e, a), baseConfig.status.key = e, o || (baseConfig.status.code = 400, errorLog())), s && (baseConfig.status.code = 200, o = check(t, s), Util$1.paramType(t) !== "Array" && (baseConfig.status.value = t), o || (baseConfig.status.code = 400, errorLog())), o;
|
|
1637
|
+
}
|
|
1638
|
+
function resetCode() {
|
|
1639
|
+
baseConfig.status = { code: 200, FnName: baseConfig.status.FnName, key: "", value: "", errorCode: "", successCode: "" };
|
|
1640
|
+
}
|
|
1641
|
+
function fillField(e, t) {
|
|
1642
|
+
var n = t || fieldRules$6, r = {};
|
|
1643
|
+
for (var o in e) {
|
|
1644
|
+
var a = e[o], s = n[o];
|
|
1645
|
+
if (s) {
|
|
1646
|
+
var c = "";
|
|
1647
|
+
if (Util$1.paramType(a) === "Object") {
|
|
1648
|
+
var y = fillField(a, s);
|
|
1649
|
+
r[o] = y;
|
|
1650
|
+
} else Util$1.objHasKay(s, "valueType") && (s.valueType === 0 && (c = s.value(), Util$1.paramType(c) === "String" && c.length > 500 ? r[o] = Util$1.stringSlice(c, 499) + "$" : r[o] = c), s.valueType === 1 && (c = s.value, Util$1.paramType(c) === "String" && c.length > 500 ? r[o] = Util$1.stringSlice(c, 499) + "$" : r[o] = c));
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
return r;
|
|
1654
|
+
}
|
|
1655
|
+
function clearCache(e) {
|
|
1656
|
+
if (!(e = e || !1)) {
|
|
1657
|
+
var t = baseConfig.base;
|
|
1658
|
+
for (var n in t)
|
|
1659
|
+
Util$1.paramType(t[n]) !== "Object" && (n === "$debug" || n === "appid" || n === "uploadURL") && (Storage$1.getLocal("ANS" + n.toUpperCase()) !== t[n] && (e = !0), e && Storage$1.setLocal("ANS" + n.toUpperCase(), t[n]));
|
|
1660
|
+
}
|
|
1661
|
+
return e && (removeAliasId(), removeIdentifyId(), Storage$1.removeLocal("ARKSUPER"), Storage$1.removeSession("STARTUP"), Storage$1.setLocal("FRISTDAY", Util$1.format(/* @__PURE__ */ new Date(), "yyyyMMdd")), Storage$1.setLocal("FRISTIME", !0), Storage$1.removeLocal("POSTDATA"), Storage$1.removeLocal("ANSSERVERTIME"), Storage$1.removeLocal("ARKFRISTPROFILE")), e;
|
|
1662
|
+
}
|
|
1663
|
+
function isStartUp() {
|
|
1664
|
+
var e = Storage$1.getSession("STARTUP") || !1, t = Storage$1.getCookie("ARK_STARTUP");
|
|
1665
|
+
if (document.referrer !== "" && t && baseConfig.base.cross_subdomain === !0) {
|
|
1666
|
+
var n = JSON.parse(Util$1.decode(decodeURIComponent(t))), r = n.STARTUP, o = n.STARTUPTIME;
|
|
1667
|
+
Storage$1.setSession("STARTUP", r), Storage$1.setSession("STARTUPTIME", o), e = Storage$1.getSession("STARTUP") || !1;
|
|
1668
|
+
}
|
|
1669
|
+
if (e === !1) {
|
|
1670
|
+
var a = Util$1.format(/* @__PURE__ */ new Date(), "yyyy-MM-dd hh:mm:ss.SSS");
|
|
1671
|
+
Storage$1.setSession("STARTUP", !0), Storage$1.setSession("STARTUPTIME", a), sessionId.setId(), baseConfig.base.cross_subdomain === !0 && Storage$1.setCookie("ARK_STARTUP", encodeURIComponent(Util$1.encode(JSON.stringify({ STARTUP: !0, STARTUPTIME: a }))), "session");
|
|
1672
|
+
}
|
|
1673
|
+
return e;
|
|
1674
|
+
}
|
|
1675
|
+
function checkBase() {
|
|
1676
|
+
for (var e in baseConfig.base) {
|
|
1677
|
+
resetCode(), baseConfig.status.key = e;
|
|
1678
|
+
var t = fieldRules$6[e];
|
|
1679
|
+
e === "$debug" && (t = fieldRules$6.xcontext[e]), e === "$lib_version" && (t = fieldRules$6.xcontext[e]);
|
|
1680
|
+
var n = t;
|
|
1681
|
+
if (n && !checkFields(e, baseConfig.base[e], n)) return baseConfig.base[e] = "", !1;
|
|
1682
|
+
successLog();
|
|
1683
|
+
}
|
|
1684
|
+
return !0;
|
|
1685
|
+
}
|
|
1686
|
+
function checkPrivate(e, t, n) {
|
|
1687
|
+
resetCode();
|
|
1688
|
+
var r = fieldRules$6[t] || fieldRules$6.xcontextCommonRule;
|
|
1689
|
+
if (Util$1.paramType(e) !== "Object" || n === !0) {
|
|
1690
|
+
var o = r.check.key, a = check(Util$1.trim(e), o);
|
|
1691
|
+
if (baseConfig.status.key = e, !a) return errorLog(), !1;
|
|
1692
|
+
} else for (var s in e)
|
|
1693
|
+
checkFields(s, e[s], r) || baseConfig.status.errorCode === "600019" && Util$1.paramType(e[s]) === "String" && e[s].length > 500 && (e[s] = Util$1.stringSlice(e[s], 499) + "$");
|
|
1694
|
+
return !0;
|
|
1695
|
+
}
|
|
1696
|
+
var postStatus = !0, sendType = "img", rxDangerous = /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
|
|
1697
|
+
function delRx(e) {
|
|
1698
|
+
if (Util$1.paramType(e) === "Array") for (var t = 0; t < e.length; t++) e[t] = delRx(e[t]);
|
|
1699
|
+
if (Util$1.paramType(e) === "Object") for (var n in e) {
|
|
1700
|
+
var r = e[n];
|
|
1701
|
+
e[n] = delRx(r);
|
|
1702
|
+
}
|
|
1703
|
+
if (Util$1.paramType(e) === "String") {
|
|
1704
|
+
var o = e.replace(rxDangerous, function(a) {
|
|
1705
|
+
return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
|
|
1706
|
+
});
|
|
1707
|
+
return Util$1.paramType(o) !== "Sting" ? e : o;
|
|
1708
|
+
}
|
|
1709
|
+
return e;
|
|
1710
|
+
}
|
|
1711
|
+
function sendPost(e, t) {
|
|
1712
|
+
if (!(Util$1.GetUrlParam("visual") && Util$1.GetUrlParam("visual").indexOf("true") > -1)) {
|
|
1713
|
+
sendType !== "img" && (postStatus = !1);
|
|
1714
|
+
var n = e;
|
|
1715
|
+
Util$1.paramType(e) === "Array" && (e = delRx(e), n = JSON.stringify(e)), window.AnalysysModal && typeof window.AnalysysModal == "function" && window.AnalysysModal(e);
|
|
1716
|
+
var r = function() {
|
|
1717
|
+
postStatus = !0, baseConfig.status.errorCode = "60008", errorLog(), Util$1.paramType(t) === "Function" && t.call(t);
|
|
1718
|
+
}, o = /* @__PURE__ */ function(s) {
|
|
1719
|
+
return function(c) {
|
|
1720
|
+
c.code === 200 || c.code === 400 || c.code === 4200 ? (baseConfig.status.successCode = "20001", successLog(), function(y) {
|
|
1721
|
+
postStatus = !0;
|
|
1722
|
+
var p = Storage$1.getLocal("POSTDATA") || [];
|
|
1723
|
+
if (Util$1.isEmptyObject(p) && (p = [], Storage$1.removeLocal("POSTDATA")), p.length !== 0) {
|
|
1724
|
+
for (var m = [], w = 0; w < p.length; w++) {
|
|
1725
|
+
for (var b = !1, T = 0; T < y.length; T++) y[T].xwhen !== p[w].xwhen && y[T].xwhen && p[w].xwhen || (b = !0);
|
|
1726
|
+
b !== !1 || Util$1.paramType(p[w]) !== "Object" || Util$1.isEmptyObject(p[w]) || m.push(p[w]);
|
|
1727
|
+
}
|
|
1728
|
+
m.length > 0 && sendType !== "img" ? (Storage$1.setLocal("POSTDATA", m), sendPost(m)) : Storage$1.removeLocal("POSTDATA");
|
|
1729
|
+
} else Storage$1.removeLocal("POSTDATA");
|
|
1730
|
+
}(s), Util$1.paramType(t) === "Function" && t.call(t)) : r();
|
|
1731
|
+
};
|
|
1732
|
+
}(e), a = { url: baseConfig.base.uploadURL + "up?appid=" + baseConfig.base.appid, data: n, success: o, error: r };
|
|
1733
|
+
successLog("Send message to server: " + baseConfig.base.uploadURL + "up?appid=" + baseConfig.base.appid + `
|
|
1734
|
+
data:` + n), lifecycle$5.upload && lifecycle$5.upload.init ? a = lifecycle$5.upload.init(a) : window.AnalysysModule && Util$1.paramType(window.AnalysysModule) === "Object" && Util$1.paramType(window.AnalysysModule.uploadData) === "Function" && (window.AnalysysModule.encryptInit(baseConfig.base), a = window.AnalysysModule.uploadData(a)), sendType !== "img" ? sendType !== "post" ? sendType !== "send" ? new ajax().post(a) : snedGet(a, "send") : new ajax().post(a) : snedGet(a, "img");
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
function setValidKey(e) {
|
|
1738
|
+
var t = { data: e.data, send_type: "" }, n = [];
|
|
1739
|
+
for (var r in t) n.push(r + "=" + encodeURIComponent(t[r]));
|
|
1740
|
+
var o = e.url.indexOf("?") > -1 ? e.url + "&" + n.join("&") : e.url + "?" + n.join("&");
|
|
1741
|
+
o = o.replace(baseConfig.base.uploadURL, "/");
|
|
1742
|
+
var a = Util$1.MD5(o, 32).split(""), s = a[2] + "" + a[0] + a[4];
|
|
1743
|
+
return t.send_type = s, t;
|
|
1744
|
+
}
|
|
1745
|
+
function snedGet(e, t) {
|
|
1746
|
+
if (t === "send" && navigator.sendBeacon) navigator.sendBeacon(e.url, e.data) && e.success({ code: 200 });
|
|
1747
|
+
else if (t !== "send" || navigator.sendBeacon || (t = "img"), e.data = Util$1.encode(e.data), e.data = setValidKey(e), t === "img") {
|
|
1748
|
+
var n = [];
|
|
1749
|
+
for (var r in e.data) n.push(r + "=" + encodeURIComponent(e.data[r]));
|
|
1750
|
+
var o = e.url.indexOf("?") > -1 ? e.url + "&" + n.join("&") : e.url + "?" + n.join("&"), a = document.createElement("img"), s = null;
|
|
1751
|
+
a.width = 1, a.height = 1, a.onerror = a.onload = function() {
|
|
1752
|
+
clearTimeout(s), e.success({ code: 200 }), this.src = "", this.onload = null, this.onerror = null, this.onabort = null;
|
|
1753
|
+
}, a.onabort = function() {
|
|
1754
|
+
this.src = "", this.onload = null, this.onerror = null, this.onabort = null, e.error();
|
|
1755
|
+
}, Util$1.paramType(baseConfig.base.sendDataTimeout) === "Number" && (s = setTimeout(function() {
|
|
1756
|
+
a.onabort();
|
|
1757
|
+
}, baseConfig.base.sendDataTimeout)), a.src = o;
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
function checkLogBaseJson(e) {
|
|
1761
|
+
if (Util$1.paramType(e) === "Object" && !Util$1.isEmptyObject(e)) {
|
|
1762
|
+
for (var t = !0, n = 0; n < baseConfig.baseJson.length; n++) {
|
|
1763
|
+
var r = baseConfig.baseJson[n];
|
|
1764
|
+
r !== "xwhat" && (!e[r] || Util$1.paramType(e[r]) === "Object" && Util$1.isEmptyObject(e[r])) && (t = !1);
|
|
1765
|
+
}
|
|
1766
|
+
return t;
|
|
1767
|
+
}
|
|
1768
|
+
return !1;
|
|
1769
|
+
}
|
|
1770
|
+
function checkSavaData(e) {
|
|
1771
|
+
var t = [];
|
|
1772
|
+
if (Util$1.paramType(e) === "Array" && e.length > 0) for (var n = 0; n < e.length; n++) {
|
|
1773
|
+
var r = checkSavaData(e[n]);
|
|
1774
|
+
r.length > 0 && t.push.apply(t, r);
|
|
1775
|
+
}
|
|
1776
|
+
return Util$1.paramType(e) === "Object" && !Util$1.isEmptyObject(e) && checkLogBaseJson(e) && t.push(e), t;
|
|
1777
|
+
}
|
|
1778
|
+
function upLog(e, t) {
|
|
1779
|
+
try {
|
|
1780
|
+
baseConfig.base.sendType && (sendType = baseConfig.base.sendType), baseConfig.base.uploadURL.charAt(baseConfig.base.uploadURL.length - 1) !== "/" && (baseConfig.base.uploadURL += "/");
|
|
1781
|
+
var n = [];
|
|
1782
|
+
if (sendType === "img") n = checkSavaData(e);
|
|
1783
|
+
else {
|
|
1784
|
+
var r = Storage$1.getLocal("POSTDATA") || [];
|
|
1785
|
+
(r = checkSavaData(r)).length === 0 && Storage$1.removeLocal("POSTDATA"), n = r, r.length < 500 ? n.push.apply(n, checkSavaData(e)) : n = checkSavaData(e), Storage$1.setLocal("POSTDATA", n);
|
|
1786
|
+
}
|
|
1787
|
+
if (postStatus === !1 && sendType !== "img") return void (Util$1.paramType(t) === "Function" && t.call(t));
|
|
1788
|
+
if (n.length > 0) if (sendType === "img") for (var o = 0; o < n.length; o++) o === 0 ? sendPost([n[o]], t) : sendPost([n[o]]);
|
|
1789
|
+
else sendPost(n, t);
|
|
1790
|
+
} catch {
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1793
|
+
function loadIframeUrl(e, t) {
|
|
1794
|
+
if (document.body) {
|
|
1795
|
+
var n = document.createElement("iframe");
|
|
1796
|
+
n.setAttribute("src", e), n.setAttribute("id", "AnalysysAgentIframe"), n.setAttribute("style", "display:none;"), document.body.appendChild(n), n.parentNode.removeChild(n);
|
|
1797
|
+
} else setTimeout(function() {
|
|
1798
|
+
loadIframeUrl(e);
|
|
1799
|
+
}, 200);
|
|
1800
|
+
}
|
|
1801
|
+
function transporter(e, t, n, r) {
|
|
1802
|
+
var o = { functionName: e, functionParams: t };
|
|
1803
|
+
Util$1.paramType(n) === "String" ? o.callbackFunName = n : Util$1.paramType(n) === "Function" && (r = n);
|
|
1804
|
+
var a = JSON.stringify(o);
|
|
1805
|
+
successLog(`Send message to app:
|
|
1806
|
+
data:` + a), window.AnalysysModule && window.AnalysysModule.moduleStatus === !0 ? window.AnalysysModule.upData(o) : window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.AnalysysAgent ? postMessage(o) : window.AnalysysAgentHybrid && window.AnalysysAgentHybrid.analysysHybridCallNative ? callNative(a) : loadIframeUrl("analysysagent:" + a), Util$1.paramType(r) === "Function" && r.call(r);
|
|
1807
|
+
}
|
|
1808
|
+
function backParamsArray() {
|
|
1809
|
+
for (var e = arguments, t = [], n = null, r = 0; r < e.length; r++) if (e[r] !== void 0) {
|
|
1810
|
+
if (Util$1.paramType(e[r]) === "Object") for (var o in e[r]) Util$1.paramType(e[r][o]) === "Function" && (e[r][o] = e[r][o].call(e[r][o]));
|
|
1811
|
+
Util$1.paramType(e[r]) === "Function" ? n = e[r] : t.push(e[r]);
|
|
1812
|
+
}
|
|
1813
|
+
return { argArray: t, callback: n };
|
|
1814
|
+
}
|
|
1815
|
+
function postMessage(e) {
|
|
1816
|
+
window.webkit.messageHandlers.AnalysysAgent.postMessage(e);
|
|
1817
|
+
}
|
|
1818
|
+
function callNative(e) {
|
|
1819
|
+
window.AnalysysAgentHybrid.analysysHybridCallNative(e);
|
|
1820
|
+
}
|
|
1821
|
+
var pageCloseStatus = !1, pageUrl = window.location.href;
|
|
1822
|
+
function pageView(e, t, n) {
|
|
1823
|
+
upLog(pageViewLog(e, t, n), n);
|
|
1824
|
+
}
|
|
1825
|
+
function pageViewLog(e, t, n) {
|
|
1826
|
+
var r = e, o = t, a = n;
|
|
1827
|
+
window.AnalysysModule && window.AnalysysModule.pageClose && (pageCloseStatus === !0 ? window.AnalysysModule.pageClose.pageEndTrack() : pageCloseStatus = !0, Util$1.paramType(r) === "String" ? window.AnalysysModule.pageClose.createTime(+/* @__PURE__ */ new Date(), r) : window.AnalysysModule.pageClose.createTime(+/* @__PURE__ */ new Date())), baseConfig.status.FnName = "$pageview", resetCode();
|
|
1828
|
+
var s = {};
|
|
1829
|
+
Util$1.paramType(r) === "String" ? checkPrivate(s = { $title: r }) : Util$1.paramType(r) === "Object" ? (Util$1.paramType(o) === "Function" && (a = o), o = r, r = "") : Util$1.paramType(r) === "Function" && (a = r, o = "", r = ""), Util$1.paramType(o) === "Function" && (a = o, o = "");
|
|
1830
|
+
var c = {};
|
|
1831
|
+
if (Util$1.paramType(o) === "Object") {
|
|
1832
|
+
for (var y in o) Util$1.paramType(o[y]) === "Function" && (o[y] = o[y].call(o[y]));
|
|
1833
|
+
baseConfig.base.isHybrid === !1 && checkPrivate(o), c = { xcontext: o || {} };
|
|
1834
|
+
}
|
|
1835
|
+
var p = Storage$1.getLocal("ARKSUPER") || {};
|
|
1836
|
+
baseConfig.base.isHybrid === !0 && (p = {});
|
|
1837
|
+
var m = Util$1.objMerge({ xcontext: p }, c);
|
|
1838
|
+
m = Util$1.objMerge(m, { xcontext: s });
|
|
1839
|
+
var w = temp$1("$pageview"), b = Util$1.delEmpty(fillField(w));
|
|
1840
|
+
if (baseConfig.base.isHybrid === !0) {
|
|
1841
|
+
w = temp$1("$pageviewbase"), b = Util$1.delEmpty(fillField(w));
|
|
1842
|
+
var T = Util$1.objMerge(b, m), d = backParamsArray(r || "", T = Util$1.delNotHybrid(Util$1.delEmpty(T.xcontext)), a);
|
|
1843
|
+
return transporter("pageView", d.argArray, d.callback), void setReferrer(pageUrl);
|
|
1844
|
+
}
|
|
1845
|
+
return setReferrer(pageUrl), Util$1.objMerge(b, m);
|
|
1846
|
+
}
|
|
1847
|
+
function hashPageView() {
|
|
1848
|
+
Util$1.changeHash(function() {
|
|
1849
|
+
if (pageUrl !== window.location.href) {
|
|
1850
|
+
pageUrl = window.location.href;
|
|
1851
|
+
var e = !1;
|
|
1852
|
+
baseConfig.base.pageViewWhiteList && Util$1.checkTypeList(baseConfig.base.pageViewWhiteList) ? e = !0 : Util$1.checkTypeList(baseConfig.base.pageViewBlackList) || (e = !0), e === !0 && pageView();
|
|
1853
|
+
}
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1856
|
+
function track(e, t, n) {
|
|
1857
|
+
baseConfig.status.FnName = e || "$track", resetCode(), checkPrivate(e, "$track", !0), baseConfig.status.FnName = e;
|
|
1858
|
+
var r = {};
|
|
1859
|
+
if (Util$1.paramType(t) === "Function" && (n = t, t = {}), Util$1.paramType(t) === "Object") {
|
|
1860
|
+
for (var o in t) Util$1.paramType(t[o]) === "Function" && (t[o] = t[o].call(t[o]));
|
|
1861
|
+
checkPrivate(t), r = { xcontext: t };
|
|
1862
|
+
}
|
|
1863
|
+
var a = Storage$1.getLocal("ARKSUPER") || {}, s = Util$1.objMerge({ xcontext: a }, r);
|
|
1864
|
+
if (baseConfig.base.isHybrid !== !0) {
|
|
1865
|
+
var c = fillField(temp$1("$track"));
|
|
1866
|
+
c.xcontext = Util$1.delEmpty(c.xcontext), upLog(Util$1.objMerge(c, s), n);
|
|
1867
|
+
} else {
|
|
1868
|
+
var y = fillField(temp$1("$trackbase"));
|
|
1869
|
+
y = Util$1.delEmpty(y);
|
|
1870
|
+
var p = Util$1.objMerge(y, s), m = backParamsArray(e, p = Util$1.delNotHybrid(Util$1.delEmpty(p.xcontext)), n);
|
|
1871
|
+
transporter("track", m.argArray, m.callback);
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
function freeApi(e, t) {
|
|
1875
|
+
baseConfig.status.FnName = e, resetCode();
|
|
1876
|
+
var n = temp$1(e);
|
|
1877
|
+
if (n) if (baseConfig.base.isHybrid !== !0) {
|
|
1878
|
+
var r = fillField(n), o = Storage$1.getLocal("ARKSUPER") || {};
|
|
1879
|
+
Util$1.paramType(t) === "Object" && (o = Util$1.objMerge(o, t)), r = Util$1.objMerge(r, { xcontext: o }), upLog(Util$1.delEmpty(r));
|
|
1880
|
+
} else {
|
|
1881
|
+
var a = fillField(temp$1(e + "base"));
|
|
1882
|
+
transporter("track", backParamsArray(e, Util$1.delNotHybrid(Util$1.delEmpty(a.xcontext))).argArray);
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
function getPresetProperties(e) {
|
|
1886
|
+
if (baseConfig.status.FnName = "$getPresetProperties", resetCode(), baseConfig.base.isHybrid === !0) {
|
|
1887
|
+
var t = "AnsCallback" + +/* @__PURE__ */ new Date();
|
|
1888
|
+
return window[t] = function() {
|
|
1889
|
+
e.apply(e, arguments), delete window[t];
|
|
1890
|
+
}, void transporter("getPresetProperties", [], t);
|
|
1891
|
+
}
|
|
1892
|
+
var n = fillField(temp$1("$getPresetProperties"));
|
|
1893
|
+
n.xcontext.$first_visit_time = Storage$1.getLocal("ARKFRISTPROFILE") || "", delete n.xcontext.$is_login;
|
|
1894
|
+
var r = Util$1.delEmpty(n.xcontext);
|
|
1895
|
+
return Util$1.paramType(e) === "Function" && e.call(e, r), r;
|
|
1896
|
+
}
|
|
1897
|
+
function alias(e, t) {
|
|
1898
|
+
if (baseConfig.status.FnName = "$alias", resetCode(), e === Storage$1.getLocal("ARK_LOGINID")) return baseConfig.status.successCode = "20013", successLog(), Util$1.paramType(t) === "Function" && t.call(t), !1;
|
|
1899
|
+
if (baseConfig.base.isHybrid !== !0)
|
|
1900
|
+
if (checkPrivate(e, "$alias", !0)) {
|
|
1901
|
+
Storage$1.setLocal("ARK_LOGINID", e);
|
|
1902
|
+
var n = fillField(temp$1("$alias"));
|
|
1903
|
+
if (upLog(Util$1.delEmpty(n), t), baseConfig.base.autoProfile === !0) {
|
|
1904
|
+
baseConfig.status.FnName = "$profile_set_once";
|
|
1905
|
+
var r = fillField(temp$1("$profile_set_once")), o = Storage$1.getLocal("ARKFRISTPROFILE") || Util$1.format(/* @__PURE__ */ new Date(), "yyyy-MM-dd hh:mm:ss.SSS"), a = { $first_visit_time: o, $first_visit_language: (navigator.language || navigator.browserLanguage).toLowerCase() }, s = Util$1.objMerge(r, { xcontext: a });
|
|
1906
|
+
upLog(Util$1.delEmpty(s)), Storage$1.setLocal("ARKFRISTPROFILE", o);
|
|
1907
|
+
}
|
|
1908
|
+
} else Util$1.paramType(t) === "Function" && t.call(t);
|
|
1909
|
+
else {
|
|
1910
|
+
var c = backParamsArray(e, "", t);
|
|
1911
|
+
transporter("alias", c.argArray, c.callback);
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
function identify(e, t, n) {
|
|
1915
|
+
if (baseConfig.status.FnName = "$identify", resetCode(), baseConfig.base.isHybrid !== !0)
|
|
1916
|
+
checkPrivate(e, "$alias", !0) && (Util$1.paramType(t) === "Boolean" && t === !0 ? Storage$1.setLocal("ARK_TRACK_LOGIN", !0) : Util$1.paramType(t) === "Function" && (n = t), Storage$1.setLocal("ARK_TRACKID", e), Storage$1.setCookie("ARK_ID", e), baseConfig.status.successCode = "20002", baseConfig.status.value = e, successLog(), Util$1.paramType(n) === "Function" && n.call(n), window.AnalysysModal && typeof window.AnalysysModal == "function" && window.AnalysysModal([{ xwhat: "$identify", xwho: e }]));
|
|
1917
|
+
else {
|
|
1918
|
+
var r = backParamsArray(e, n);
|
|
1919
|
+
transporter("identify", r.argArray, r.callback);
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
function profileSet(e, t, n) {
|
|
1923
|
+
baseConfig.status.FnName = "$profile_set", resetCode(), Util$1.paramType(e) === "Object" && Util$1.paramType(t) === "Function" ? (n = t, t = "") : Util$1.paramType(e) === "String" && Util$1.paramType(t) === "Function" && (t = t.call(t));
|
|
1924
|
+
var r = Util$1.toObj(e, t);
|
|
1925
|
+
for (var o in r) Util$1.paramType(r[o]) === "Function" && (r[o] = r[o].call(r[o]));
|
|
1926
|
+
if (baseConfig.base.isHybrid !== !0) {
|
|
1927
|
+
checkPrivate(r, "$profile_set");
|
|
1928
|
+
var a = temp$1("$profile_set"), s = Util$1.delEmpty(fillField(a));
|
|
1929
|
+
upLog(Util$1.objMerge(s, { xcontext: r }), n);
|
|
1930
|
+
} else {
|
|
1931
|
+
var c = backParamsArray(e, t, n);
|
|
1932
|
+
transporter("profileSet", c.argArray, c.callback);
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
function profileSetOnce(e, t, n) {
|
|
1936
|
+
baseConfig.status.FnName = "$profile_set_once", resetCode(), Util$1.paramType(e) === "Object" && Util$1.paramType(t) === "Function" ? (n = t, t = "") : Util$1.paramType(e) === "String" && Util$1.paramType(t) === "Function" && (t = t.call(t));
|
|
1937
|
+
var r = Util$1.toObj(e, t);
|
|
1938
|
+
for (var o in r) Util$1.paramType(r[o]) === "Function" && (r[o] = r[o].call(r[o]));
|
|
1939
|
+
if (baseConfig.base.isHybrid !== !0) {
|
|
1940
|
+
checkPrivate(r, "$profile_set_once");
|
|
1941
|
+
var a = temp$1("$profile_set_once"), s = Util$1.delEmpty(fillField(a));
|
|
1942
|
+
upLog(Util$1.objMerge(s, { xcontext: r }), n);
|
|
1943
|
+
} else {
|
|
1944
|
+
var c = backParamsArray(r, n);
|
|
1945
|
+
transporter("profileSetOnce", c.argArray, c.callback);
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
function profileIncrement(e, t, n) {
|
|
1949
|
+
baseConfig.status.FnName = "$profile_increment", resetCode(), Util$1.paramType(e) === "Object" && Util$1.paramType(t) === "Function" ? (n = t, t = "") : Util$1.paramType(e) === "String" && Util$1.paramType(t) === "Function" && (t = t.call(t));
|
|
1950
|
+
var r = Util$1.toObj(e, t);
|
|
1951
|
+
for (var o in r) Util$1.paramType(r[o]) === "Function" && (r[o] = r[o].call(r[o]));
|
|
1952
|
+
if (baseConfig.base.isHybrid !== !0) {
|
|
1953
|
+
checkPrivate(r, "$profile_increment");
|
|
1954
|
+
var a = temp$1("$profile_increment"), s = Util$1.delEmpty(fillField(a));
|
|
1955
|
+
upLog(Util$1.objMerge(s, { xcontext: r }), n);
|
|
1956
|
+
} else {
|
|
1957
|
+
var c = backParamsArray(e, t, n);
|
|
1958
|
+
transporter("profileIncrement", c.argArray, c.callback);
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
function profileAppend(e, t, n) {
|
|
1962
|
+
baseConfig.status.FnName = "$profile_append", resetCode(), Util$1.paramType(e) === "Object" && Util$1.paramType(t) === "Function" ? (n = t, t = "") : Util$1.paramType(e) === "String" && Util$1.paramType(t) === "Function" && (t = t.call(t));
|
|
1963
|
+
var r = Util$1.toObj(e, t);
|
|
1964
|
+
for (var o in r) Util$1.paramType(r[o]) === "Function" && (r[o] = r[o].call(r[o]));
|
|
1965
|
+
if (baseConfig.base.isHybrid !== !0) {
|
|
1966
|
+
checkPrivate(r, "$profile_append");
|
|
1967
|
+
var a = temp$1("$profile_append"), s = Util$1.delEmpty(fillField(a));
|
|
1968
|
+
upLog(Util$1.objMerge(s, { xcontext: r }), n);
|
|
1969
|
+
} else {
|
|
1970
|
+
var c = backParamsArray(e, t, n);
|
|
1971
|
+
transporter("profileAppend", c.argArray, c.callback);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
function profileUnset(e, t) {
|
|
1975
|
+
baseConfig.status.FnName = "$profile_unset", resetCode(), Util$1.paramType(e) === "Function" && (e = e.call(e)), checkPrivate(e, "$profile_unset", e);
|
|
1976
|
+
var n = Util$1.toObj(e, "");
|
|
1977
|
+
if (baseConfig.base.isHybrid !== !0) {
|
|
1978
|
+
checkPrivate(n, "$profile_unset");
|
|
1979
|
+
var r = fillField(temp$1("$profile_unset"));
|
|
1980
|
+
upLog(Util$1.objMerge(r, { xcontext: n }), t);
|
|
1981
|
+
} else {
|
|
1982
|
+
var o = backParamsArray(e, t);
|
|
1983
|
+
transporter("profileUnset", o.argArray, o.callback);
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
function profileDelete(e) {
|
|
1987
|
+
baseConfig.status.FnName = "$profile_delete", resetCode(), baseConfig.base.isHybrid !== !0 ? upLog(fillField(temp$1("$profile_delete")), e) : transporter("profileDelete", [], e);
|
|
1988
|
+
}
|
|
1989
|
+
function registerSuperProperty(e, t, n) {
|
|
1990
|
+
baseConfig.status.FnName = "$registerSuperProperty", resetCode(), Util$1.paramType(e) === "Object" && Util$1.paramType(t) === "Function" ? (n = t, t = "") : Util$1.paramType(e) === "String" && Util$1.paramType(t) === "Function" && (t = t.call(t));
|
|
1991
|
+
var r = Util$1.toObj(e, t);
|
|
1992
|
+
for (var o in r) Util$1.paramType(r[o]) === "Function" && (r[o] = r[o].call(r[o]));
|
|
1993
|
+
if (baseConfig.base.isHybrid !== !0) {
|
|
1994
|
+
checkPrivate(r, "$registerSuperProperty");
|
|
1995
|
+
var a = Storage$1.getLocal("ARKSUPER") || {}, s = Util$1.objMerge(a, r);
|
|
1996
|
+
Storage$1.setLocal("ARKSUPER", s), baseConfig.status.successCode = "20002", baseConfig.status.value = JSON.stringify(r), successLog(), Util$1.paramType(n) === "Function" && n.call(n);
|
|
1997
|
+
} else {
|
|
1998
|
+
var c = backParamsArray(e, t, n);
|
|
1999
|
+
transporter("registerSuperProperty", c.argArray, c.callback);
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
function registerSuperProperties(e, t, n) {
|
|
2003
|
+
baseConfig.status.FnName = "$registerSuperProperties", resetCode(), Util$1.paramType(e) === "Object" && Util$1.paramType(t) === "Function" ? (n = t, t = "") : Util$1.paramType(e) === "String" && Util$1.paramType(t) === "Function" && (t = t.call(t));
|
|
2004
|
+
var r = Util$1.toObj(e, t);
|
|
2005
|
+
for (var o in r) Util$1.paramType(r[o]) === "Function" && (r[o] = r[o].call(r[o]));
|
|
2006
|
+
if (baseConfig.base.isHybrid !== !0) {
|
|
2007
|
+
checkPrivate(r, "$registerSuperProperties");
|
|
2008
|
+
var a = Storage$1.getLocal("ARKSUPER") || {}, s = Util$1.objMerge(a, r);
|
|
2009
|
+
Storage$1.setLocal("ARKSUPER", s), baseConfig.status.successCode = "20002", baseConfig.status.value = JSON.stringify(r), successLog(), Util$1.paramType(n) === "Function" && n.call(n);
|
|
2010
|
+
} else {
|
|
2011
|
+
var c = backParamsArray(e, t, n);
|
|
2012
|
+
transporter("registerSuperProperties", c.argArray, c.callback);
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
function getSuperProperty(e, t) {
|
|
2016
|
+
if (baseConfig.status.FnName = "$getSuperProperty", resetCode(), baseConfig.base.isHybrid === !0) {
|
|
2017
|
+
var n = backParamsArray(e), r = "AnsCallback" + +/* @__PURE__ */ new Date();
|
|
2018
|
+
return window[r] = function() {
|
|
2019
|
+
t.apply(t, arguments), delete window[r];
|
|
2020
|
+
}, void transporter("getSuperProperty", n.argArray, r);
|
|
2021
|
+
}
|
|
2022
|
+
checkPrivate(e, "$getSuperProperty", !0);
|
|
2023
|
+
var o = Storage$1.getLocal("ARKSUPER") || {}, a = o[e];
|
|
2024
|
+
return {}.hasOwnProperty.call(o, e) ? (baseConfig.status.successCode = "20010", baseConfig.status.value = a) : (baseConfig.status.successCode = "20009", a = ""), baseConfig.status.key = e, successLog(), Util$1.paramType(t) === "Function" && t.call(t, a), a;
|
|
2025
|
+
}
|
|
2026
|
+
function getSuperProperties(e) {
|
|
2027
|
+
if (baseConfig.status.FnName = "$getSuperProperties", resetCode(), baseConfig.base.isHybrid === !0) {
|
|
2028
|
+
var t = "AnsCallback" + +/* @__PURE__ */ new Date();
|
|
2029
|
+
return window[t] = function() {
|
|
2030
|
+
e.apply(e, arguments), delete window[t];
|
|
2031
|
+
}, void transporter("getSuperProperties", [], t);
|
|
2032
|
+
}
|
|
2033
|
+
var n = Storage$1.getLocal("ARKSUPER") || {};
|
|
2034
|
+
return baseConfig.status.successCode = "20010", baseConfig.status.value = JSON.stringify(n), successLog(), Util$1.paramType(e) === "Function" && e.call(e, n), n;
|
|
2035
|
+
}
|
|
2036
|
+
function unRegisterSuperProperty(e, t) {
|
|
2037
|
+
if (baseConfig.status.FnName = "$unregisterSuperProperty", resetCode(), baseConfig.base.isHybrid !== !0) {
|
|
2038
|
+
checkPrivate(e, "$unregisterSuperProperty", !0);
|
|
2039
|
+
var n = Storage$1.getLocal("ARKSUPER") || {};
|
|
2040
|
+
Object.prototype.hasOwnProperty.call(n, e) ? (delete n[e], Storage$1.setLocal("ARKSUPER", n), baseConfig.status.successCode = "20003") : baseConfig.status.successCode = "20011", baseConfig.status.value = e, successLog(), Util$1.paramType(t) === "Function" && t.call(t);
|
|
2041
|
+
} else {
|
|
2042
|
+
var r = backParamsArray.apply(e, arguments), o = r.argArray;
|
|
2043
|
+
transporter("unRegisterSuperProperty", o, r.callback);
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
function clearSuperProperties(e) {
|
|
2047
|
+
if (baseConfig.status.FnName = "$clearSuperProperties", resetCode(), baseConfig.base.isHybrid !== !0) Storage$1.setLocal("ARKSUPER", {}), baseConfig.status.successCode = "20004", successLog(), Util$1.paramType(e) === "Function" && e.call(e);
|
|
2048
|
+
else {
|
|
2049
|
+
var t = backParamsArray(e);
|
|
2050
|
+
transporter("clearSuperProperties", t.argArray, t.callback);
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
function reset(e) {
|
|
2054
|
+
baseConfig.base.isHybrid !== !0 ? (resetCode(), removeUUId(), clearSuperProperties(), clearCache(!0), sessionId.setId(), baseConfig.base.autoProfile === !0 ? profileSetOnce({ $reset_time: Util$1.format(/* @__PURE__ */ new Date(), "yyyy-MM-dd hh:mm:ss.SSS") }, e) : Util$1.paramType(e) === "Function" && e.call(e), baseConfig.status.FnName = "$reset", baseConfig.status.successCode = "20005", successLog()) : transporter("reset", [], e);
|
|
2055
|
+
}
|
|
2056
|
+
function getDistinctId(e) {
|
|
2057
|
+
if (baseConfig.base.isHybrid === !0) {
|
|
2058
|
+
var t = "AnsCallback" + +/* @__PURE__ */ new Date();
|
|
2059
|
+
return window[t] = function() {
|
|
2060
|
+
e.apply(e, arguments), delete window[t];
|
|
2061
|
+
}, void transporter("getDistinctId", [], t);
|
|
2062
|
+
}
|
|
2063
|
+
var n = getIdentifyId() || getUUId();
|
|
2064
|
+
return Util$1.paramType(e) === "Function" && e.call(e, n), n;
|
|
2065
|
+
}
|
|
2066
|
+
var ans = Object.freeze({ __proto__: null, pageView, profileSet, profileSetOnce, profileIncrement, profileAppend, profileUnset, profileDelete, alias, identify, track, registerSuperProperty, registerSuperProperties, getSuperProperty, getSuperProperties, unRegisterSuperProperty, clearSuperProperties, reset, freeApi, getDistinctId, getPresetProperties });
|
|
2067
|
+
function startUp() {
|
|
2068
|
+
var e = [];
|
|
2069
|
+
if (baseConfig.base.isHybrid !== !1 || checkBase()) {
|
|
2070
|
+
var t = Storage$1.getLocal("ARKSUPER") || {};
|
|
2071
|
+
if (baseConfig.base.isHybrid === !1 && isStartUp() === !1) {
|
|
2072
|
+
var n = !0;
|
|
2073
|
+
if ((Util$1.checkTypeList(baseConfig.base.startUpBlackList) || baseConfig.base.startUpWhiteList && !Util$1.checkTypeList(baseConfig.base.startUpWhiteList)) && (n = !1), n === !0) {
|
|
2074
|
+
baseConfig.status.FnName = "$startup";
|
|
2075
|
+
var r = fillField(temp$1("$startup"));
|
|
2076
|
+
r = Util$1.objMerge(r, { xcontext: t }), e.push(Util$1.delEmpty(r));
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
var o = Storage$1.getLocal("ARKFRISTPROFILE") || !1;
|
|
2080
|
+
if (baseConfig.base.isHybrid === !1 && baseConfig.base.autoProfile === !0 && !o) {
|
|
2081
|
+
baseConfig.status.FnName = "$profile_set_once";
|
|
2082
|
+
var a = fillField(temp$1("$profile_set_once")), s = Storage$1.getLocal("ARKFRISTPROFILE") || Util$1.format(/* @__PURE__ */ new Date(), "yyyy-MM-dd hh:mm:ss.SSS"), c = { $first_visit_time: s, $first_visit_language: (navigator.language || navigator.browserLanguage).toLowerCase() }, y = Util$1.objMerge(a, { xcontext: c });
|
|
2083
|
+
e.push(Util$1.delEmpty(y)), Storage$1.setLocal("ARKFRISTPROFILE", s);
|
|
2084
|
+
}
|
|
2085
|
+
if (baseConfig.base.auto === !0) {
|
|
2086
|
+
var p = !1;
|
|
2087
|
+
if (baseConfig.base.pageViewWhiteList && Util$1.checkTypeList(baseConfig.base.pageViewWhiteList) ? p = !0 : Util$1.checkTypeList(baseConfig.base.pageViewBlackList) || (p = !0), p === !0) {
|
|
2088
|
+
var m = pageViewLog(baseConfig.base.pageProperty);
|
|
2089
|
+
e.push(m);
|
|
2090
|
+
}
|
|
2091
|
+
baseConfig.base.hash !== !0 && baseConfig.base.singlePage !== !0 || hashPageView();
|
|
2092
|
+
}
|
|
2093
|
+
e.length > 0 && upLog(e);
|
|
2094
|
+
} else errorLog();
|
|
2095
|
+
}
|
|
2096
|
+
function ieCreat() {
|
|
2097
|
+
Array.prototype.indexOf || (Array.prototype.indexOf = function(e) {
|
|
2098
|
+
var t = this.length >>> 0, n = Number(arguments[1]) || 0;
|
|
2099
|
+
for ((n = n < 0 ? Math.ceil(n) : Math.floor(n)) < 0 && (n += t); n < t; n++) if (n in this && this[n] === e) return n;
|
|
2100
|
+
return -1;
|
|
2101
|
+
});
|
|
2102
|
+
}
|
|
2103
|
+
window.AnalysysAgent = window.AnalysysAgent || {};
|
|
2104
|
+
var AnalysysAgent = window.AnalysysAgent, AnalysysModule = window.AnalysysModule || {}, config = AnalysysAgent.config || {}, param = AnalysysAgent.param || [];
|
|
2105
|
+
if (AnalysysAgent.isInit !== !0) for (var key$1 in ans) AnalysysAgent[key$1] = /* @__PURE__ */ function(e) {
|
|
2106
|
+
return function() {
|
|
2107
|
+
var t = arguments;
|
|
2108
|
+
if (e.indexOf("get") > -1) return ans[e].apply(ans[e], t);
|
|
2109
|
+
param.push([e, arguments]);
|
|
2110
|
+
};
|
|
2111
|
+
}(key$1);
|
|
2112
|
+
function isHybrid() {
|
|
2113
|
+
window.navigator.userAgent.indexOf("AnalysysAgent/Hybrid") > -1 && (baseConfig.base.isHybrid = !0), window.AnalysysAgentHybrid && window.AnalysysAgentHybrid.isHybrid() === !0 && (baseConfig.base.isHybrid = !0), AnalysysModule && AnalysysModule.moduleStatus === !0 && AnalysysModule.isHybrid();
|
|
2114
|
+
}
|
|
2115
|
+
function _createAnsSDK() {
|
|
2116
|
+
for (var e in AnalysysAgent.isInit = !0, ans) AnalysysAgent[e] = ans[e];
|
|
2117
|
+
for (var t in config) Util$1.paramType(getField[t]) === "Function" ? getField[t](config[t]) : baseConfig.base[t] = config[t];
|
|
2118
|
+
if (baseConfig.base.isHybrid === !0) for (var n in HybridAns) AnalysysAgent[n] = AnalysysModule.moduleStatus === !0 ? AnalysysModule.onEvent(n, HybridAns) : HybridAns[n];
|
|
2119
|
+
AnalysysAgent.config = baseConfig.base, clearCache();
|
|
2120
|
+
for (var r = 0; r < param.length; r++) {
|
|
2121
|
+
var o = param[r];
|
|
2122
|
+
Util$1.objHasKay(ans, o[0]) && (o[0] === "identify" || o[0] === "alias" || o[0].indexOf("Super") > -1) && ans[o[0]].apply(ans[o[0]], o[1]);
|
|
2123
|
+
}
|
|
2124
|
+
lifecycle$5.AnalysysAgent && lifecycle$5.AnalysysAgent.init && lifecycle$5.AnalysysAgent.init(baseConfig.base), startUp();
|
|
2125
|
+
for (var a = 0; a < param.length; a++) {
|
|
2126
|
+
var s = param[a];
|
|
2127
|
+
Util$1.objHasKay(ans, s[0]) && s[0] !== "identify" && s[0] !== "alias" && s[0].indexOf("Super") < 0 && ans[s[0]].apply(ans[s[0]], s[1]);
|
|
2128
|
+
}
|
|
2129
|
+
}
|
|
2130
|
+
if (ieCreat(), isHybrid(), AnalysysAgent.init = function(e) {
|
|
2131
|
+
Util$1.paramType(config) !== "Object" || AnalysysAgent.isInit && baseConfig.base.isHybrid !== !0 || AnalysysModule.moduleStatus && (AnalysysModule.moduleStatus !== !0 || e.isHybrid !== !0 && e.isARKH5 !== !0) || (e.isARKH5 !== !0 && (config = e), _createAnsSDK());
|
|
2132
|
+
}, !AnalysysAgent.isInit) {
|
|
2133
|
+
if (Util$1.paramType(AnalysysAgent) === "Array") for (var i$3 = 0; i$3 < AnalysysAgent.length; i$3++) if (Util$1.paramType(ans[AnalysysAgent[i$3][0]]) === "Function") {
|
|
2134
|
+
var fnName = AnalysysAgent[i$3][0];
|
|
2135
|
+
AnalysysAgent[i$3].splice(0, 1), param.push([fnName, AnalysysAgent[i$3]]);
|
|
2136
|
+
} else config[AnalysysAgent[i$3][0]] = AnalysysAgent[i$3][1];
|
|
2137
|
+
Util$1.isEmptyObject(config) !== !1 || AnalysysModule.moduleStatus || _createAnsSDK();
|
|
2138
|
+
}
|
|
2139
|
+
export {
|
|
2140
|
+
AnalysysAgent as default
|
|
2141
|
+
};
|
|
2142
|
+
//# sourceMappingURL=AnalysysAgent_JS_SDK.es6.min.mjs.map
|