|
|
1
|
+;(function() {
|
|
|
2
|
+var yas_jssdk_101363_src_config_debug, yas_jssdk_101363_src_cross_debug, yas_jssdk_101363_src_event_debug, yohosizzle_222_pre_sizzle_debug, yohojson2_100_json2_debug, yas_jssdk_101363_src_util_debug, yas_jssdk_101363_src_cookie_debug, yas_jssdk_101363_src_ya_debug, yas_jssdk_101363_yas_debug;
|
|
|
3
|
+yas_jssdk_101363_src_config_debug = function (exports) {
|
|
|
4
|
+ exports = {
|
|
|
5
|
+ version: '1.0',
|
|
|
6
|
+ yasPath: '/web/',
|
|
|
7
|
+ yasDomain: getDomain(),
|
|
|
8
|
+ yasImgDomain: 'http://analytics.yhurl.com/yas.gif'
|
|
|
9
|
+ };
|
|
|
10
|
+ function getDomain() {
|
|
|
11
|
+ var domainArr = document.domain.split('.');
|
|
|
12
|
+ var length = domainArr.length;
|
|
|
13
|
+ if (length > 1 && isNaN(domainArr[length - 1])) {
|
|
|
14
|
+ return '.' + domainArr[length - 2] + '.' + domainArr[length - 1];
|
|
|
15
|
+ } else {
|
|
|
16
|
+ return document.domain;
|
|
|
17
|
+ }
|
|
|
18
|
+ }
|
|
|
19
|
+ return exports;
|
|
|
20
|
+}();
|
|
|
21
|
+yas_jssdk_101363_src_cross_debug = function (exports) {
|
|
|
22
|
+ /**
|
|
|
23
|
+ * 跨域发送信息工具库
|
|
|
24
|
+ */
|
|
|
25
|
+ var config = yas_jssdk_101363_src_config_debug;
|
|
|
26
|
+ var yasPath = config.yasPath;
|
|
|
27
|
+ var yasImgDomain = config.yasImgDomain;
|
|
|
28
|
+ //发送图片方式
|
|
|
29
|
+ exports.imgSend = function (param, callback) {
|
|
|
30
|
+ var image = new Image(1, 1);
|
|
|
31
|
+ image.src = yasImgDomain + yasPath + '?' + param;
|
|
|
32
|
+ image.onload = function () {
|
|
|
33
|
+ image.onload = null;
|
|
|
34
|
+ if (callback) {
|
|
|
35
|
+ callback();
|
|
|
36
|
+ }
|
|
|
37
|
+ };
|
|
|
38
|
+ };
|
|
|
39
|
+ return exports;
|
|
|
40
|
+}({});
|
|
|
41
|
+yas_jssdk_101363_src_event_debug = function (exports) {
|
|
|
42
|
+ exports.addEventHandler = function (target, type, func) {
|
|
|
43
|
+ if (target.addEventListener)
|
|
|
44
|
+ target.addEventListener(type, func, false);
|
|
|
45
|
+ else if (target.attachEvent)
|
|
|
46
|
+ target.attachEvent('on' + type, func);
|
|
|
47
|
+ else
|
|
|
48
|
+ target['on' + type] = func;
|
|
|
49
|
+ };
|
|
|
50
|
+ exports.removeEventHandler = function (target, type, func) {
|
|
|
51
|
+ if (target.removeEventListener)
|
|
|
52
|
+ target.removeEventListener(type, func, false);
|
|
|
53
|
+ else if (target.detachEvent)
|
|
|
54
|
+ target.detachEvent('on' + type, func);
|
|
|
55
|
+ else
|
|
|
56
|
+ delete target['on' + type];
|
|
|
57
|
+ };
|
|
|
58
|
+ return exports;
|
|
|
59
|
+}({});
|
|
|
60
|
+yohosizzle_222_pre_sizzle_debug = function (exports) {
|
|
|
61
|
+ (function (window) {
|
|
|
62
|
+ var i, support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, expando = 'sizzle' + 1 * new Date(), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function (a, b) {
|
|
|
63
|
+ if (a === b) {
|
|
|
64
|
+ hasDuplicate = true;
|
|
|
65
|
+ }
|
|
|
66
|
+ return 0;
|
|
|
67
|
+ }, hasOwn = {}.hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, indexOf = function (list, elem) {
|
|
|
68
|
+ var i = 0, len = list.length;
|
|
|
69
|
+ for (; i < len; i++) {
|
|
|
70
|
+ if (list[i] === elem) {
|
|
|
71
|
+ return i;
|
|
|
72
|
+ }
|
|
|
73
|
+ }
|
|
|
74
|
+ return -1;
|
|
|
75
|
+ }, booleans = 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped', whitespace = '[\\x20\\t\\r\\n\\f]', identifier = '(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+', attributes = '\\[' + whitespace + '*(' + identifier + ')(?:' + whitespace + '*([*^$|!~]?=)' + whitespace + '*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|(' + identifier + '))|)' + whitespace + '*\\]', pseudos = ':(' + identifier + ')(?:\\((' + '(\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|' + '((?:\\\\.|[^\\\\()[\\]]|' + attributes + ')*)|' + '.*' + ')\\)|)', rwhitespace = new RegExp(whitespace + '+', 'g'), rtrim = new RegExp('^' + whitespace + '+|((?:^|[^\\\\])(?:\\\\.)*)' + whitespace + '+$', 'g'), rcomma = new RegExp('^' + whitespace + '*,' + whitespace + '*'), rcombinators = new RegExp('^' + whitespace + '*([>+~]|' + whitespace + ')' + whitespace + '*'), rattributeQuotes = new RegExp('=' + whitespace + '*([^\\]\'"]*?)' + whitespace + '*\\]', 'g'), rpseudo = new RegExp(pseudos), ridentifier = new RegExp('^' + identifier + '$'), matchExpr = {
|
|
|
76
|
+ 'ID': new RegExp('^#(' + identifier + ')'),
|
|
|
77
|
+ 'CLASS': new RegExp('^\\.(' + identifier + ')'),
|
|
|
78
|
+ 'TAG': new RegExp('^(' + identifier + '|[*])'),
|
|
|
79
|
+ 'ATTR': new RegExp('^' + attributes),
|
|
|
80
|
+ 'PSEUDO': new RegExp('^' + pseudos),
|
|
|
81
|
+ 'CHILD': new RegExp('^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' + whitespace + '*(even|odd|(([+-]|)(\\d*)n|)' + whitespace + '*(?:([+-]|)' + whitespace + '*(\\d+)|))' + whitespace + '*\\)|)', 'i'),
|
|
|
82
|
+ 'bool': new RegExp('^(?:' + booleans + ')$', 'i'),
|
|
|
83
|
+ 'needsContext': new RegExp('^' + whitespace + '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' + whitespace + '*((?:-\\d)?\\d*)' + whitespace + '*\\)|)(?=[^-]|$)', 'i')
|
|
|
84
|
+ }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, rescape = /'|\\/g, runescape = new RegExp('\\\\([\\da-f]{1,6}' + whitespace + '?|(' + whitespace + ')|.)', 'ig'), funescape = function (_, escaped, escapedWhitespace) {
|
|
|
85
|
+ var high = '0x' + escaped - 65536;
|
|
|
86
|
+ return high !== high || escapedWhitespace ? escaped : high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
|
|
|
87
|
+ }, unloadHandler = function () {
|
|
|
88
|
+ setDocument();
|
|
|
89
|
+ };
|
|
|
90
|
+ try {
|
|
|
91
|
+ push.apply(arr = slice.call(preferredDoc.childNodes), preferredDoc.childNodes);
|
|
|
92
|
+ arr[preferredDoc.childNodes.length].nodeType;
|
|
|
93
|
+ } catch (e) {
|
|
|
94
|
+ push = {
|
|
|
95
|
+ apply: arr.length ? function (target, els) {
|
|
|
96
|
+ push_native.apply(target, slice.call(els));
|
|
|
97
|
+ } : function (target, els) {
|
|
|
98
|
+ var j = target.length, i = 0;
|
|
|
99
|
+ while (target[j++] = els[i++]) {
|
|
|
100
|
+ }
|
|
|
101
|
+ target.length = j - 1;
|
|
|
102
|
+ }
|
|
|
103
|
+ };
|
|
|
104
|
+ }
|
|
|
105
|
+ function Sizzle(selector, context, results, seed) {
|
|
|
106
|
+ var m, i, elem, nid, nidselect, match, groups, newSelector, newContext = context && context.ownerDocument, nodeType = context ? context.nodeType : 9;
|
|
|
107
|
+ results = results || [];
|
|
|
108
|
+ if (typeof selector !== 'string' || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
|
|
|
109
|
+ return results;
|
|
|
110
|
+ }
|
|
|
111
|
+ if (!seed) {
|
|
|
112
|
+ if ((context ? context.ownerDocument || context : preferredDoc) !== document) {
|
|
|
113
|
+ setDocument(context);
|
|
|
114
|
+ }
|
|
|
115
|
+ context = context || document;
|
|
|
116
|
+ if (documentIsHTML) {
|
|
|
117
|
+ if (nodeType !== 11 && (match = rquickExpr.exec(selector))) {
|
|
|
118
|
+ if (m = match[1]) {
|
|
|
119
|
+ if (nodeType === 9) {
|
|
|
120
|
+ if (elem = context.getElementById(m)) {
|
|
|
121
|
+ if (elem.id === m) {
|
|
|
122
|
+ results.push(elem);
|
|
|
123
|
+ return results;
|
|
|
124
|
+ }
|
|
|
125
|
+ } else {
|
|
|
126
|
+ return results;
|
|
|
127
|
+ }
|
|
|
128
|
+ } else {
|
|
|
129
|
+ if (newContext && (elem = newContext.getElementById(m)) && contains(context, elem) && elem.id === m) {
|
|
|
130
|
+ results.push(elem);
|
|
|
131
|
+ return results;
|
|
|
132
|
+ }
|
|
|
133
|
+ }
|
|
|
134
|
+ } else if (match[2]) {
|
|
|
135
|
+ push.apply(results, context.getElementsByTagName(selector));
|
|
|
136
|
+ return results;
|
|
|
137
|
+ } else if ((m = match[3]) && support.getElementsByClassName && context.getElementsByClassName) {
|
|
|
138
|
+ push.apply(results, context.getElementsByClassName(m));
|
|
|
139
|
+ return results;
|
|
|
140
|
+ }
|
|
|
141
|
+ }
|
|
|
142
|
+ if (support.qsa && !compilerCache[selector + ' '] && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
|
|
|
143
|
+ if (nodeType !== 1) {
|
|
|
144
|
+ newContext = context;
|
|
|
145
|
+ newSelector = selector;
|
|
|
146
|
+ } else if (context.nodeName.toLowerCase() !== 'object') {
|
|
|
147
|
+ if (nid = context.getAttribute('id')) {
|
|
|
148
|
+ nid = nid.replace(rescape, '\\$&');
|
|
|
149
|
+ } else {
|
|
|
150
|
+ context.setAttribute('id', nid = expando);
|
|
|
151
|
+ }
|
|
|
152
|
+ groups = tokenize(selector);
|
|
|
153
|
+ i = groups.length;
|
|
|
154
|
+ nidselect = ridentifier.test(nid) ? '#' + nid : '[id=\'' + nid + '\']';
|
|
|
155
|
+ while (i--) {
|
|
|
156
|
+ groups[i] = nidselect + ' ' + toSelector(groups[i]);
|
|
|
157
|
+ }
|
|
|
158
|
+ newSelector = groups.join(',');
|
|
|
159
|
+ newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
|
|
|
160
|
+ }
|
|
|
161
|
+ if (newSelector) {
|
|
|
162
|
+ try {
|
|
|
163
|
+ push.apply(results, newContext.querySelectorAll(newSelector));
|
|
|
164
|
+ return results;
|
|
|
165
|
+ } catch (qsaError) {
|
|
|
166
|
+ } finally {
|
|
|
167
|
+ if (nid === expando) {
|
|
|
168
|
+ context.removeAttribute('id');
|
|
|
169
|
+ }
|
|
|
170
|
+ }
|
|
|
171
|
+ }
|
|
|
172
|
+ }
|
|
|
173
|
+ }
|
|
|
174
|
+ }
|
|
|
175
|
+ return select(selector.replace(rtrim, '$1'), context, results, seed);
|
|
|
176
|
+ }
|
|
|
177
|
+ function createCache() {
|
|
|
178
|
+ var keys = [];
|
|
|
179
|
+ function cache(key, value) {
|
|
|
180
|
+ if (keys.push(key + ' ') > Expr.cacheLength) {
|
|
|
181
|
+ delete cache[keys.shift()];
|
|
|
182
|
+ }
|
|
|
183
|
+ return cache[key + ' '] = value;
|
|
|
184
|
+ }
|
|
|
185
|
+ return cache;
|
|
|
186
|
+ }
|
|
|
187
|
+ function markFunction(fn) {
|
|
|
188
|
+ fn[expando] = true;
|
|
|
189
|
+ return fn;
|
|
|
190
|
+ }
|
|
|
191
|
+ function assert(fn) {
|
|
|
192
|
+ var div = document.createElement('div');
|
|
|
193
|
+ try {
|
|
|
194
|
+ return !!fn(div);
|
|
|
195
|
+ } catch (e) {
|
|
|
196
|
+ return false;
|
|
|
197
|
+ } finally {
|
|
|
198
|
+ if (div.parentNode) {
|
|
|
199
|
+ div.parentNode.removeChild(div);
|
|
|
200
|
+ }
|
|
|
201
|
+ div = null;
|
|
|
202
|
+ }
|
|
|
203
|
+ }
|
|
|
204
|
+ function addHandle(attrs, handler) {
|
|
|
205
|
+ var arr = attrs.split('|'), i = arr.length;
|
|
|
206
|
+ while (i--) {
|
|
|
207
|
+ Expr.attrHandle[arr[i]] = handler;
|
|
|
208
|
+ }
|
|
|
209
|
+ }
|
|
|
210
|
+ function siblingCheck(a, b) {
|
|
|
211
|
+ var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && a.sourceIndex - b.sourceIndex;
|
|
|
212
|
+ if (diff) {
|
|
|
213
|
+ return diff;
|
|
|
214
|
+ }
|
|
|
215
|
+ if (cur) {
|
|
|
216
|
+ while (cur = cur.nextSibling) {
|
|
|
217
|
+ if (cur === b) {
|
|
|
218
|
+ return -1;
|
|
|
219
|
+ }
|
|
|
220
|
+ }
|
|
|
221
|
+ }
|
|
|
222
|
+ return a ? 1 : -1;
|
|
|
223
|
+ }
|
|
|
224
|
+ function createInputPseudo(type) {
|
|
|
225
|
+ return function (elem) {
|
|
|
226
|
+ var name = elem.nodeName.toLowerCase();
|
|
|
227
|
+ return name === 'input' && elem.type === type;
|
|
|
228
|
+ };
|
|
|
229
|
+ }
|
|
|
230
|
+ function createButtonPseudo(type) {
|
|
|
231
|
+ return function (elem) {
|
|
|
232
|
+ var name = elem.nodeName.toLowerCase();
|
|
|
233
|
+ return (name === 'input' || name === 'button') && elem.type === type;
|
|
|
234
|
+ };
|
|
|
235
|
+ }
|
|
|
236
|
+ function createPositionalPseudo(fn) {
|
|
|
237
|
+ return markFunction(function (argument) {
|
|
|
238
|
+ argument = +argument;
|
|
|
239
|
+ return markFunction(function (seed, matches) {
|
|
|
240
|
+ var j, matchIndexes = fn([], seed.length, argument), i = matchIndexes.length;
|
|
|
241
|
+ while (i--) {
|
|
|
242
|
+ if (seed[j = matchIndexes[i]]) {
|
|
|
243
|
+ seed[j] = !(matches[j] = seed[j]);
|
|
|
244
|
+ }
|
|
|
245
|
+ }
|
|
|
246
|
+ });
|
|
|
247
|
+ });
|
|
|
248
|
+ }
|
|
|
249
|
+ function testContext(context) {
|
|
|
250
|
+ return context && typeof context.getElementsByTagName !== 'undefined' && context;
|
|
|
251
|
+ }
|
|
|
252
|
+ support = Sizzle.support = {};
|
|
|
253
|
+ isXML = Sizzle.isXML = function (elem) {
|
|
|
254
|
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement;
|
|
|
255
|
+ return documentElement ? documentElement.nodeName !== 'HTML' : false;
|
|
|
256
|
+ };
|
|
|
257
|
+ setDocument = Sizzle.setDocument = function (node) {
|
|
|
258
|
+ var hasCompare, subWindow, doc = node ? node.ownerDocument || node : preferredDoc;
|
|
|
259
|
+ if (doc === document || doc.nodeType !== 9 || !doc.documentElement) {
|
|
|
260
|
+ return document;
|
|
|
261
|
+ }
|
|
|
262
|
+ document = doc;
|
|
|
263
|
+ docElem = document.documentElement;
|
|
|
264
|
+ documentIsHTML = !isXML(document);
|
|
|
265
|
+ if (preferredDoc !== document && (subWindow = document.defaultView) && subWindow.top !== subWindow) {
|
|
|
266
|
+ if (subWindow.addEventListener) {
|
|
|
267
|
+ subWindow.addEventListener('unload', unloadHandler, false);
|
|
|
268
|
+ } else if (subWindow.attachEvent) {
|
|
|
269
|
+ subWindow.attachEvent('onunload', unloadHandler);
|
|
|
270
|
+ }
|
|
|
271
|
+ }
|
|
|
272
|
+ support.attributes = assert(function (div) {
|
|
|
273
|
+ div.className = 'i';
|
|
|
274
|
+ return !div.getAttribute('className');
|
|
|
275
|
+ });
|
|
|
276
|
+ support.getElementsByTagName = assert(function (div) {
|
|
|
277
|
+ div.appendChild(document.createComment(''));
|
|
|
278
|
+ return !div.getElementsByTagName('*').length;
|
|
|
279
|
+ });
|
|
|
280
|
+ support.getElementsByClassName = rnative.test(document.getElementsByClassName);
|
|
|
281
|
+ support.getById = assert(function (div) {
|
|
|
282
|
+ docElem.appendChild(div).id = expando;
|
|
|
283
|
+ return !document.getElementsByName || !document.getElementsByName(expando).length;
|
|
|
284
|
+ });
|
|
|
285
|
+ if (support.getById) {
|
|
|
286
|
+ Expr.find['ID'] = function (id, context) {
|
|
|
287
|
+ if (typeof context.getElementById !== 'undefined' && documentIsHTML) {
|
|
|
288
|
+ var m = context.getElementById(id);
|
|
|
289
|
+ return m ? [m] : [];
|
|
|
290
|
+ }
|
|
|
291
|
+ };
|
|
|
292
|
+ Expr.filter['ID'] = function (id) {
|
|
|
293
|
+ var attrId = id.replace(runescape, funescape);
|
|
|
294
|
+ return function (elem) {
|
|
|
295
|
+ return elem.getAttribute('id') === attrId;
|
|
|
296
|
+ };
|
|
|
297
|
+ };
|
|
|
298
|
+ } else {
|
|
|
299
|
+ delete Expr.find['ID'];
|
|
|
300
|
+ Expr.filter['ID'] = function (id) {
|
|
|
301
|
+ var attrId = id.replace(runescape, funescape);
|
|
|
302
|
+ return function (elem) {
|
|
|
303
|
+ var node = typeof elem.getAttributeNode !== 'undefined' && elem.getAttributeNode('id');
|
|
|
304
|
+ return node && node.value === attrId;
|
|
|
305
|
+ };
|
|
|
306
|
+ };
|
|
|
307
|
+ }
|
|
|
308
|
+ Expr.find['TAG'] = support.getElementsByTagName ? function (tag, context) {
|
|
|
309
|
+ if (typeof context.getElementsByTagName !== 'undefined') {
|
|
|
310
|
+ return context.getElementsByTagName(tag);
|
|
|
311
|
+ } else if (support.qsa) {
|
|
|
312
|
+ return context.querySelectorAll(tag);
|
|
|
313
|
+ }
|
|
|
314
|
+ } : function (tag, context) {
|
|
|
315
|
+ var elem, tmp = [], i = 0, results = context.getElementsByTagName(tag);
|
|
|
316
|
+ if (tag === '*') {
|
|
|
317
|
+ while (elem = results[i++]) {
|
|
|
318
|
+ if (elem.nodeType === 1) {
|
|
|
319
|
+ tmp.push(elem);
|
|
|
320
|
+ }
|
|
|
321
|
+ }
|
|
|
322
|
+ return tmp;
|
|
|
323
|
+ }
|
|
|
324
|
+ return results;
|
|
|
325
|
+ };
|
|
|
326
|
+ Expr.find['CLASS'] = support.getElementsByClassName && function (className, context) {
|
|
|
327
|
+ if (typeof context.getElementsByClassName !== 'undefined' && documentIsHTML) {
|
|
|
328
|
+ return context.getElementsByClassName(className);
|
|
|
329
|
+ }
|
|
|
330
|
+ };
|
|
|
331
|
+ rbuggyMatches = [];
|
|
|
332
|
+ rbuggyQSA = [];
|
|
|
333
|
+ if (support.qsa = rnative.test(document.querySelectorAll)) {
|
|
|
334
|
+ assert(function (div) {
|
|
|
335
|
+ docElem.appendChild(div).innerHTML = '<a id=\'' + expando + '\'></a>' + '<select id=\'' + expando + '-\r\\\' msallowcapture=\'\'>' + '<option selected=\'\'></option></select>';
|
|
|
336
|
+ if (div.querySelectorAll('[msallowcapture^=\'\']').length) {
|
|
|
337
|
+ rbuggyQSA.push('[*^$]=' + whitespace + '*(?:\'\'|"")');
|
|
|
338
|
+ }
|
|
|
339
|
+ if (!div.querySelectorAll('[selected]').length) {
|
|
|
340
|
+ rbuggyQSA.push('\\[' + whitespace + '*(?:value|' + booleans + ')');
|
|
|
341
|
+ }
|
|
|
342
|
+ if (!div.querySelectorAll('[id~=' + expando + '-]').length) {
|
|
|
343
|
+ rbuggyQSA.push('~=');
|
|
|
344
|
+ }
|
|
|
345
|
+ if (!div.querySelectorAll(':checked').length) {
|
|
|
346
|
+ rbuggyQSA.push(':checked');
|
|
|
347
|
+ }
|
|
|
348
|
+ if (!div.querySelectorAll('a#' + expando + '+*').length) {
|
|
|
349
|
+ rbuggyQSA.push('.#.+[+~]');
|
|
|
350
|
+ }
|
|
|
351
|
+ });
|
|
|
352
|
+ assert(function (div) {
|
|
|
353
|
+ var input = document.createElement('input');
|
|
|
354
|
+ input.setAttribute('type', 'hidden');
|
|
|
355
|
+ div.appendChild(input).setAttribute('name', 'D');
|
|
|
356
|
+ if (div.querySelectorAll('[name=d]').length) {
|
|
|
357
|
+ rbuggyQSA.push('name' + whitespace + '*[*^$|!~]?=');
|
|
|
358
|
+ }
|
|
|
359
|
+ if (!div.querySelectorAll(':enabled').length) {
|
|
|
360
|
+ rbuggyQSA.push(':enabled', ':disabled');
|
|
|
361
|
+ }
|
|
|
362
|
+ div.querySelectorAll('*,:x');
|
|
|
363
|
+ rbuggyQSA.push(',.*:');
|
|
|
364
|
+ });
|
|
|
365
|
+ }
|
|
|
366
|
+ if (support.matchesSelector = rnative.test(matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector)) {
|
|
|
367
|
+ assert(function (div) {
|
|
|
368
|
+ support.disconnectedMatch = matches.call(div, 'div');
|
|
|
369
|
+ matches.call(div, '[s!=\'\']:x');
|
|
|
370
|
+ rbuggyMatches.push('!=', pseudos);
|
|
|
371
|
+ });
|
|
|
372
|
+ }
|
|
|
373
|
+ rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join('|'));
|
|
|
374
|
+ rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join('|'));
|
|
|
375
|
+ hasCompare = rnative.test(docElem.compareDocumentPosition);
|
|
|
376
|
+ contains = hasCompare || rnative.test(docElem.contains) ? function (a, b) {
|
|
|
377
|
+ var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode;
|
|
|
378
|
+ return a === bup || !!(bup && bup.nodeType === 1 && (adown.contains ? adown.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
|
|
|
379
|
+ } : function (a, b) {
|
|
|
380
|
+ if (b) {
|
|
|
381
|
+ while (b = b.parentNode) {
|
|
|
382
|
+ if (b === a) {
|
|
|
383
|
+ return true;
|
|
|
384
|
+ }
|
|
|
385
|
+ }
|
|
|
386
|
+ }
|
|
|
387
|
+ return false;
|
|
|
388
|
+ };
|
|
|
389
|
+ sortOrder = hasCompare ? function (a, b) {
|
|
|
390
|
+ if (a === b) {
|
|
|
391
|
+ hasDuplicate = true;
|
|
|
392
|
+ return 0;
|
|
|
393
|
+ }
|
|
|
394
|
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
|
|
|
395
|
+ if (compare) {
|
|
|
396
|
+ return compare;
|
|
|
397
|
+ }
|
|
|
398
|
+ compare = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1;
|
|
|
399
|
+ if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
|
|
|
400
|
+ if (a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a)) {
|
|
|
401
|
+ return -1;
|
|
|
402
|
+ }
|
|
|
403
|
+ if (b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b)) {
|
|
|
404
|
+ return 1;
|
|
|
405
|
+ }
|
|
|
406
|
+ return sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;
|
|
|
407
|
+ }
|
|
|
408
|
+ return compare & 4 ? -1 : 1;
|
|
|
409
|
+ } : function (a, b) {
|
|
|
410
|
+ if (a === b) {
|
|
|
411
|
+ hasDuplicate = true;
|
|
|
412
|
+ return 0;
|
|
|
413
|
+ }
|
|
|
414
|
+ var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [a], bp = [b];
|
|
|
415
|
+ if (!aup || !bup) {
|
|
|
416
|
+ return a === document ? -1 : b === document ? 1 : aup ? -1 : bup ? 1 : sortInput ? indexOf(sortInput, a) - indexOf(sortInput, b) : 0;
|
|
|
417
|
+ } else if (aup === bup) {
|
|
|
418
|
+ return siblingCheck(a, b);
|
|
|
419
|
+ }
|
|
|
420
|
+ cur = a;
|
|
|
421
|
+ while (cur = cur.parentNode) {
|
|
|
422
|
+ ap.unshift(cur);
|
|
|
423
|
+ }
|
|
|
424
|
+ cur = b;
|
|
|
425
|
+ while (cur = cur.parentNode) {
|
|
|
426
|
+ bp.unshift(cur);
|
|
|
427
|
+ }
|
|
|
428
|
+ while (ap[i] === bp[i]) {
|
|
|
429
|
+ i++;
|
|
|
430
|
+ }
|
|
|
431
|
+ return i ? siblingCheck(ap[i], bp[i]) : ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0;
|
|
|
432
|
+ };
|
|
|
433
|
+ return document;
|
|
|
434
|
+ };
|
|
|
435
|
+ Sizzle.matches = function (expr, elements) {
|
|
|
436
|
+ return Sizzle(expr, null, null, elements);
|
|
|
437
|
+ };
|
|
|
438
|
+ Sizzle.matchesSelector = function (elem, expr) {
|
|
|
439
|
+ if ((elem.ownerDocument || elem) !== document) {
|
|
|
440
|
+ setDocument(elem);
|
|
|
441
|
+ }
|
|
|
442
|
+ expr = expr.replace(rattributeQuotes, '=\'$1\']');
|
|
|
443
|
+ if (support.matchesSelector && documentIsHTML && !compilerCache[expr + ' '] && (!rbuggyMatches || !rbuggyMatches.test(expr)) && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
|
|
|
444
|
+ try {
|
|
|
445
|
+ var ret = matches.call(elem, expr);
|
|
|
446
|
+ if (ret || support.disconnectedMatch || elem.document && elem.document.nodeType !== 11) {
|
|
|
447
|
+ return ret;
|
|
|
448
|
+ }
|
|
|
449
|
+ } catch (e) {
|
|
|
450
|
+ }
|
|
|
451
|
+ }
|
|
|
452
|
+ return Sizzle(expr, document, null, [elem]).length > 0;
|
|
|
453
|
+ };
|
|
|
454
|
+ Sizzle.contains = function (context, elem) {
|
|
|
455
|
+ if ((context.ownerDocument || context) !== document) {
|
|
|
456
|
+ setDocument(context);
|
|
|
457
|
+ }
|
|
|
458
|
+ return contains(context, elem);
|
|
|
459
|
+ };
|
|
|
460
|
+ Sizzle.attr = function (elem, name) {
|
|
|
461
|
+ if ((elem.ownerDocument || elem) !== document) {
|
|
|
462
|
+ setDocument(elem);
|
|
|
463
|
+ }
|
|
|
464
|
+ var fn = Expr.attrHandle[name.toLowerCase()], val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : undefined;
|
|
|
465
|
+ return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute(name) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
|
|
|
466
|
+ };
|
|
|
467
|
+ Sizzle.error = function (msg) {
|
|
|
468
|
+ throw new Error('Syntax error, unrecognized expression: ' + msg);
|
|
|
469
|
+ };
|
|
|
470
|
+ Sizzle.uniqueSort = function (results) {
|
|
|
471
|
+ var elem, duplicates = [], j = 0, i = 0;
|
|
|
472
|
+ hasDuplicate = !support.detectDuplicates;
|
|
|
473
|
+ sortInput = !support.sortStable && results.slice(0);
|
|
|
474
|
+ results.sort(sortOrder);
|
|
|
475
|
+ if (hasDuplicate) {
|
|
|
476
|
+ while (elem = results[i++]) {
|
|
|
477
|
+ if (elem === results[i]) {
|
|
|
478
|
+ j = duplicates.push(i);
|
|
|
479
|
+ }
|
|
|
480
|
+ }
|
|
|
481
|
+ while (j--) {
|
|
|
482
|
+ results.splice(duplicates[j], 1);
|
|
|
483
|
+ }
|
|
|
484
|
+ }
|
|
|
485
|
+ sortInput = null;
|
|
|
486
|
+ return results;
|
|
|
487
|
+ };
|
|
|
488
|
+ getText = Sizzle.getText = function (elem) {
|
|
|
489
|
+ var node, ret = '', i = 0, nodeType = elem.nodeType;
|
|
|
490
|
+ if (!nodeType) {
|
|
|
491
|
+ while (node = elem[i++]) {
|
|
|
492
|
+ ret += getText(node);
|
|
|
493
|
+ }
|
|
|
494
|
+ } else if (nodeType === 1 || nodeType === 9 || nodeType === 11) {
|
|
|
495
|
+ if (typeof elem.textContent === 'string') {
|
|
|
496
|
+ return elem.textContent;
|
|
|
497
|
+ } else {
|
|
|
498
|
+ for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
|
|
|
499
|
+ ret += getText(elem);
|
|
|
500
|
+ }
|
|
|
501
|
+ }
|
|
|
502
|
+ } else if (nodeType === 3 || nodeType === 4) {
|
|
|
503
|
+ return elem.nodeValue;
|
|
|
504
|
+ }
|
|
|
505
|
+ return ret;
|
|
|
506
|
+ };
|
|
|
507
|
+ Expr = Sizzle.selectors = {
|
|
|
508
|
+ cacheLength: 50,
|
|
|
509
|
+ createPseudo: markFunction,
|
|
|
510
|
+ match: matchExpr,
|
|
|
511
|
+ attrHandle: {},
|
|
|
512
|
+ find: {},
|
|
|
513
|
+ relative: {
|
|
|
514
|
+ '>': {
|
|
|
515
|
+ dir: 'parentNode',
|
|
|
516
|
+ first: true
|
|
|
517
|
+ },
|
|
|
518
|
+ ' ': { dir: 'parentNode' },
|
|
|
519
|
+ '+': {
|
|
|
520
|
+ dir: 'previousSibling',
|
|
|
521
|
+ first: true
|
|
|
522
|
+ },
|
|
|
523
|
+ '~': { dir: 'previousSibling' }
|
|
|
524
|
+ },
|
|
|
525
|
+ preFilter: {
|
|
|
526
|
+ 'ATTR': function (match) {
|
|
|
527
|
+ match[1] = match[1].replace(runescape, funescape);
|
|
|
528
|
+ match[3] = (match[3] || match[4] || match[5] || '').replace(runescape, funescape);
|
|
|
529
|
+ if (match[2] === '~=') {
|
|
|
530
|
+ match[3] = ' ' + match[3] + ' ';
|
|
|
531
|
+ }
|
|
|
532
|
+ return match.slice(0, 4);
|
|
|
533
|
+ },
|
|
|
534
|
+ 'CHILD': function (match) {
|
|
|
535
|
+ match[1] = match[1].toLowerCase();
|
|
|
536
|
+ if (match[1].slice(0, 3) === 'nth') {
|
|
|
537
|
+ if (!match[3]) {
|
|
|
538
|
+ Sizzle.error(match[0]);
|
|
|
539
|
+ }
|
|
|
540
|
+ match[4] = +(match[4] ? match[5] + (match[6] || 1) : 2 * (match[3] === 'even' || match[3] === 'odd'));
|
|
|
541
|
+ match[5] = +(match[7] + match[8] || match[3] === 'odd');
|
|
|
542
|
+ } else if (match[3]) {
|
|
|
543
|
+ Sizzle.error(match[0]);
|
|
|
544
|
+ }
|
|
|
545
|
+ return match;
|
|
|
546
|
+ },
|
|
|
547
|
+ 'PSEUDO': function (match) {
|
|
|
548
|
+ var excess, unquoted = !match[6] && match[2];
|
|
|
549
|
+ if (matchExpr['CHILD'].test(match[0])) {
|
|
|
550
|
+ return null;
|
|
|
551
|
+ }
|
|
|
552
|
+ if (match[3]) {
|
|
|
553
|
+ match[2] = match[4] || match[5] || '';
|
|
|
554
|
+ } else if (unquoted && rpseudo.test(unquoted) && (excess = tokenize(unquoted, true)) && (excess = unquoted.indexOf(')', unquoted.length - excess) - unquoted.length)) {
|
|
|
555
|
+ match[0] = match[0].slice(0, excess);
|
|
|
556
|
+ match[2] = unquoted.slice(0, excess);
|
|
|
557
|
+ }
|
|
|
558
|
+ return match.slice(0, 3);
|
|
|
559
|
+ }
|
|
|
560
|
+ },
|
|
|
561
|
+ filter: {
|
|
|
562
|
+ 'TAG': function (nodeNameSelector) {
|
|
|
563
|
+ var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
|
|
|
564
|
+ return nodeNameSelector === '*' ? function () {
|
|
|
565
|
+ return true;
|
|
|
566
|
+ } : function (elem) {
|
|
|
567
|
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
|
|
|
568
|
+ };
|
|
|
569
|
+ },
|
|
|
570
|
+ 'CLASS': function (className) {
|
|
|
571
|
+ var pattern = classCache[className + ' '];
|
|
|
572
|
+ return pattern || (pattern = new RegExp('(^|' + whitespace + ')' + className + '(' + whitespace + '|$)')) && classCache(className, function (elem) {
|
|
|
573
|
+ return pattern.test(typeof elem.className === 'string' && elem.className || typeof elem.getAttribute !== 'undefined' && elem.getAttribute('class') || '');
|
|
|
574
|
+ });
|
|
|
575
|
+ },
|
|
|
576
|
+ 'ATTR': function (name, operator, check) {
|
|
|
577
|
+ return function (elem) {
|
|
|
578
|
+ var result = Sizzle.attr(elem, name);
|
|
|
579
|
+ if (result == null) {
|
|
|
580
|
+ return operator === '!=';
|
|
|
581
|
+ }
|
|
|
582
|
+ if (!operator) {
|
|
|
583
|
+ return true;
|
|
|
584
|
+ }
|
|
|
585
|
+ result += '';
|
|
|
586
|
+ return operator === '=' ? result === check : operator === '!=' ? result !== check : operator === '^=' ? check && result.indexOf(check) === 0 : operator === '*=' ? check && result.indexOf(check) > -1 : operator === '$=' ? check && result.slice(-check.length) === check : operator === '~=' ? (' ' + result.replace(rwhitespace, ' ') + ' ').indexOf(check) > -1 : operator === '|=' ? result === check || result.slice(0, check.length + 1) === check + '-' : false;
|
|
|
587
|
+ };
|
|
|
588
|
+ },
|
|
|
589
|
+ 'CHILD': function (type, what, argument, first, last) {
|
|
|
590
|
+ var simple = type.slice(0, 3) !== 'nth', forward = type.slice(-4) !== 'last', ofType = what === 'of-type';
|
|
|
591
|
+ return first === 1 && last === 0 ? function (elem) {
|
|
|
592
|
+ return !!elem.parentNode;
|
|
|
593
|
+ } : function (elem, context, xml) {
|
|
|
594
|
+ var cache, uniqueCache, outerCache, node, nodeIndex, start, dir = simple !== forward ? 'nextSibling' : 'previousSibling', parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false;
|
|
|
595
|
+ if (parent) {
|
|
|
596
|
+ if (simple) {
|
|
|
597
|
+ while (dir) {
|
|
|
598
|
+ node = elem;
|
|
|
599
|
+ while (node = node[dir]) {
|
|
|
600
|
+ if (ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) {
|
|
|
601
|
+ return false;
|
|
|
602
|
+ }
|
|
|
603
|
+ }
|
|
|
604
|
+ start = dir = type === 'only' && !start && 'nextSibling';
|
|
|
605
|
+ }
|
|
|
606
|
+ return true;
|
|
|
607
|
+ }
|
|
|
608
|
+ start = [forward ? parent.firstChild : parent.lastChild];
|
|
|
609
|
+ if (forward && useCache) {
|
|
|
610
|
+ node = parent;
|
|
|
611
|
+ outerCache = node[expando] || (node[expando] = {});
|
|
|
612
|
+ uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
|
|
|
613
|
+ cache = uniqueCache[type] || [];
|
|
|
614
|
+ nodeIndex = cache[0] === dirruns && cache[1];
|
|
|
615
|
+ diff = nodeIndex && cache[2];
|
|
|
616
|
+ node = nodeIndex && parent.childNodes[nodeIndex];
|
|
|
617
|
+ while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
|
|
|
618
|
+ if (node.nodeType === 1 && ++diff && node === elem) {
|
|
|
619
|
+ uniqueCache[type] = [
|
|
|
620
|
+ dirruns,
|
|
|
621
|
+ nodeIndex,
|
|
|
622
|
+ diff
|
|
|
623
|
+ ];
|
|
|
624
|
+ break;
|
|
|
625
|
+ }
|
|
|
626
|
+ }
|
|
|
627
|
+ } else {
|
|
|
628
|
+ if (useCache) {
|
|
|
629
|
+ node = elem;
|
|
|
630
|
+ outerCache = node[expando] || (node[expando] = {});
|
|
|
631
|
+ uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
|
|
|
632
|
+ cache = uniqueCache[type] || [];
|
|
|
633
|
+ nodeIndex = cache[0] === dirruns && cache[1];
|
|
|
634
|
+ diff = nodeIndex;
|
|
|
635
|
+ }
|
|
|
636
|
+ if (diff === false) {
|
|
|
637
|
+ while (node = ++nodeIndex && node && node[dir] || (diff = nodeIndex = 0) || start.pop()) {
|
|
|
638
|
+ if ((ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1) && ++diff) {
|
|
|
639
|
+ if (useCache) {
|
|
|
640
|
+ outerCache = node[expando] || (node[expando] = {});
|
|
|
641
|
+ uniqueCache = outerCache[node.uniqueID] || (outerCache[node.uniqueID] = {});
|
|
|
642
|
+ uniqueCache[type] = [
|
|
|
643
|
+ dirruns,
|
|
|
644
|
+ diff
|
|
|
645
|
+ ];
|
|
|
646
|
+ }
|
|
|
647
|
+ if (node === elem) {
|
|
|
648
|
+ break;
|
|
|
649
|
+ }
|
|
|
650
|
+ }
|
|
|
651
|
+ }
|
|
|
652
|
+ }
|
|
|
653
|
+ }
|
|
|
654
|
+ diff -= last;
|
|
|
655
|
+ return diff === first || diff % first === 0 && diff / first >= 0;
|
|
|
656
|
+ }
|
|
|
657
|
+ };
|
|
|
658
|
+ },
|
|
|
659
|
+ 'PSEUDO': function (pseudo, argument) {
|
|
|
660
|
+ var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || Sizzle.error('unsupported pseudo: ' + pseudo);
|
|
|
661
|
+ if (fn[expando]) {
|
|
|
662
|
+ return fn(argument);
|
|
|
663
|
+ }
|
|
|
664
|
+ if (fn.length > 1) {
|
|
|
665
|
+ args = [
|
|
|
666
|
+ pseudo,
|
|
|
667
|
+ pseudo,
|
|
|
668
|
+ '',
|
|
|
669
|
+ argument
|
|
|
670
|
+ ];
|
|
|
671
|
+ return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function (seed, matches) {
|
|
|
672
|
+ var idx, matched = fn(seed, argument), i = matched.length;
|
|
|
673
|
+ while (i--) {
|
|
|
674
|
+ idx = indexOf(seed, matched[i]);
|
|
|
675
|
+ seed[idx] = !(matches[idx] = matched[i]);
|
|
|
676
|
+ }
|
|
|
677
|
+ }) : function (elem) {
|
|
|
678
|
+ return fn(elem, 0, args);
|
|
|
679
|
+ };
|
|
|
680
|
+ }
|
|
|
681
|
+ return fn;
|
|
|
682
|
+ }
|
|
|
683
|
+ },
|
|
|
684
|
+ pseudos: {
|
|
|
685
|
+ 'not': markFunction(function (selector) {
|
|
|
686
|
+ var input = [], results = [], matcher = compile(selector.replace(rtrim, '$1'));
|
|
|
687
|
+ return matcher[expando] ? markFunction(function (seed, matches, context, xml) {
|
|
|
688
|
+ var elem, unmatched = matcher(seed, null, xml, []), i = seed.length;
|
|
|
689
|
+ while (i--) {
|
|
|
690
|
+ if (elem = unmatched[i]) {
|
|
|
691
|
+ seed[i] = !(matches[i] = elem);
|
|
|
692
|
+ }
|
|
|
693
|
+ }
|
|
|
694
|
+ }) : function (elem, context, xml) {
|
|
|
695
|
+ input[0] = elem;
|
|
|
696
|
+ matcher(input, null, xml, results);
|
|
|
697
|
+ input[0] = null;
|
|
|
698
|
+ return !results.pop();
|
|
|
699
|
+ };
|
|
|
700
|
+ }),
|
|
|
701
|
+ 'has': markFunction(function (selector) {
|
|
|
702
|
+ return function (elem) {
|
|
|
703
|
+ return Sizzle(selector, elem).length > 0;
|
|
|
704
|
+ };
|
|
|
705
|
+ }),
|
|
|
706
|
+ 'contains': markFunction(function (text) {
|
|
|
707
|
+ text = text.replace(runescape, funescape);
|
|
|
708
|
+ return function (elem) {
|
|
|
709
|
+ return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1;
|
|
|
710
|
+ };
|
|
|
711
|
+ }),
|
|
|
712
|
+ 'lang': markFunction(function (lang) {
|
|
|
713
|
+ if (!ridentifier.test(lang || '')) {
|
|
|
714
|
+ Sizzle.error('unsupported lang: ' + lang);
|
|
|
715
|
+ }
|
|
|
716
|
+ lang = lang.replace(runescape, funescape).toLowerCase();
|
|
|
717
|
+ return function (elem) {
|
|
|
718
|
+ var elemLang;
|
|
|
719
|
+ do {
|
|
|
720
|
+ if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute('xml:lang') || elem.getAttribute('lang')) {
|
|
|
721
|
+ elemLang = elemLang.toLowerCase();
|
|
|
722
|
+ return elemLang === lang || elemLang.indexOf(lang + '-') === 0;
|
|
|
723
|
+ }
|
|
|
724
|
+ } while ((elem = elem.parentNode) && elem.nodeType === 1);
|
|
|
725
|
+ return false;
|
|
|
726
|
+ };
|
|
|
727
|
+ }),
|
|
|
728
|
+ 'target': function (elem) {
|
|
|
729
|
+ var hash = window.location && window.location.hash;
|
|
|
730
|
+ return hash && hash.slice(1) === elem.id;
|
|
|
731
|
+ },
|
|
|
732
|
+ 'root': function (elem) {
|
|
|
733
|
+ return elem === docElem;
|
|
|
734
|
+ },
|
|
|
735
|
+ 'focus': function (elem) {
|
|
|
736
|
+ return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
|
|
|
737
|
+ },
|
|
|
738
|
+ 'enabled': function (elem) {
|
|
|
739
|
+ return elem.disabled === false;
|
|
|
740
|
+ },
|
|
|
741
|
+ 'disabled': function (elem) {
|
|
|
742
|
+ return elem.disabled === true;
|
|
|
743
|
+ },
|
|
|
744
|
+ 'checked': function (elem) {
|
|
|
745
|
+ var nodeName = elem.nodeName.toLowerCase();
|
|
|
746
|
+ return nodeName === 'input' && !!elem.checked || nodeName === 'option' && !!elem.selected;
|
|
|
747
|
+ },
|
|
|
748
|
+ 'selected': function (elem) {
|
|
|
749
|
+ if (elem.parentNode) {
|
|
|
750
|
+ elem.parentNode.selectedIndex;
|
|
|
751
|
+ }
|
|
|
752
|
+ return elem.selected === true;
|
|
|
753
|
+ },
|
|
|
754
|
+ 'empty': function (elem) {
|
|
|
755
|
+ for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
|
|
|
756
|
+ if (elem.nodeType < 6) {
|
|
|
757
|
+ return false;
|
|
|
758
|
+ }
|
|
|
759
|
+ }
|
|
|
760
|
+ return true;
|
|
|
761
|
+ },
|
|
|
762
|
+ 'parent': function (elem) {
|
|
|
763
|
+ return !Expr.pseudos['empty'](elem);
|
|
|
764
|
+ },
|
|
|
765
|
+ 'header': function (elem) {
|
|
|
766
|
+ return rheader.test(elem.nodeName);
|
|
|
767
|
+ },
|
|
|
768
|
+ 'input': function (elem) {
|
|
|
769
|
+ return rinputs.test(elem.nodeName);
|
|
|
770
|
+ },
|
|
|
771
|
+ 'button': function (elem) {
|
|
|
772
|
+ var name = elem.nodeName.toLowerCase();
|
|
|
773
|
+ return name === 'input' && elem.type === 'button' || name === 'button';
|
|
|
774
|
+ },
|
|
|
775
|
+ 'text': function (elem) {
|
|
|
776
|
+ var attr;
|
|
|
777
|
+ return elem.nodeName.toLowerCase() === 'input' && elem.type === 'text' && ((attr = elem.getAttribute('type')) == null || attr.toLowerCase() === 'text');
|
|
|
778
|
+ },
|
|
|
779
|
+ 'first': createPositionalPseudo(function () {
|
|
|
780
|
+ return [0];
|
|
|
781
|
+ }),
|
|
|
782
|
+ 'last': createPositionalPseudo(function (matchIndexes, length) {
|
|
|
783
|
+ return [length - 1];
|
|
|
784
|
+ }),
|
|
|
785
|
+ 'eq': createPositionalPseudo(function (matchIndexes, length, argument) {
|
|
|
786
|
+ return [argument < 0 ? argument + length : argument];
|
|
|
787
|
+ }),
|
|
|
788
|
+ 'even': createPositionalPseudo(function (matchIndexes, length) {
|
|
|
789
|
+ var i = 0;
|
|
|
790
|
+ for (; i < length; i += 2) {
|
|
|
791
|
+ matchIndexes.push(i);
|
|
|
792
|
+ }
|
|
|
793
|
+ return matchIndexes;
|
|
|
794
|
+ }),
|
|
|
795
|
+ 'odd': createPositionalPseudo(function (matchIndexes, length) {
|
|
|
796
|
+ var i = 1;
|
|
|
797
|
+ for (; i < length; i += 2) {
|
|
|
798
|
+ matchIndexes.push(i);
|
|
|
799
|
+ }
|
|
|
800
|
+ return matchIndexes;
|
|
|
801
|
+ }),
|
|
|
802
|
+ 'lt': createPositionalPseudo(function (matchIndexes, length, argument) {
|
|
|
803
|
+ var i = argument < 0 ? argument + length : argument;
|
|
|
804
|
+ for (; --i >= 0;) {
|
|
|
805
|
+ matchIndexes.push(i);
|
|
|
806
|
+ }
|
|
|
807
|
+ return matchIndexes;
|
|
|
808
|
+ }),
|
|
|
809
|
+ 'gt': createPositionalPseudo(function (matchIndexes, length, argument) {
|
|
|
810
|
+ var i = argument < 0 ? argument + length : argument;
|
|
|
811
|
+ for (; ++i < length;) {
|
|
|
812
|
+ matchIndexes.push(i);
|
|
|
813
|
+ }
|
|
|
814
|
+ return matchIndexes;
|
|
|
815
|
+ })
|
|
|
816
|
+ }
|
|
|
817
|
+ };
|
|
|
818
|
+ Expr.pseudos['nth'] = Expr.pseudos['eq'];
|
|
|
819
|
+ for (i in {
|
|
|
820
|
+ radio: true,
|
|
|
821
|
+ checkbox: true,
|
|
|
822
|
+ file: true,
|
|
|
823
|
+ password: true,
|
|
|
824
|
+ image: true
|
|
|
825
|
+ }) {
|
|
|
826
|
+ Expr.pseudos[i] = createInputPseudo(i);
|
|
|
827
|
+ }
|
|
|
828
|
+ for (i in {
|
|
|
829
|
+ submit: true,
|
|
|
830
|
+ reset: true
|
|
|
831
|
+ }) {
|
|
|
832
|
+ Expr.pseudos[i] = createButtonPseudo(i);
|
|
|
833
|
+ }
|
|
|
834
|
+ function setFilters() {
|
|
|
835
|
+ }
|
|
|
836
|
+ setFilters.prototype = Expr.filters = Expr.pseudos;
|
|
|
837
|
+ Expr.setFilters = new setFilters();
|
|
|
838
|
+ tokenize = Sizzle.tokenize = function (selector, parseOnly) {
|
|
|
839
|
+ var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + ' '];
|
|
|
840
|
+ if (cached) {
|
|
|
841
|
+ return parseOnly ? 0 : cached.slice(0);
|
|
|
842
|
+ }
|
|
|
843
|
+ soFar = selector;
|
|
|
844
|
+ groups = [];
|
|
|
845
|
+ preFilters = Expr.preFilter;
|
|
|
846
|
+ while (soFar) {
|
|
|
847
|
+ if (!matched || (match = rcomma.exec(soFar))) {
|
|
|
848
|
+ if (match) {
|
|
|
849
|
+ soFar = soFar.slice(match[0].length) || soFar;
|
|
|
850
|
+ }
|
|
|
851
|
+ groups.push(tokens = []);
|
|
|
852
|
+ }
|
|
|
853
|
+ matched = false;
|
|
|
854
|
+ if (match = rcombinators.exec(soFar)) {
|
|
|
855
|
+ matched = match.shift();
|
|
|
856
|
+ tokens.push({
|
|
|
857
|
+ value: matched,
|
|
|
858
|
+ type: match[0].replace(rtrim, ' ')
|
|
|
859
|
+ });
|
|
|
860
|
+ soFar = soFar.slice(matched.length);
|
|
|
861
|
+ }
|
|
|
862
|
+ for (type in Expr.filter) {
|
|
|
863
|
+ if ((match = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match = preFilters[type](match)))) {
|
|
|
864
|
+ matched = match.shift();
|
|
|
865
|
+ tokens.push({
|
|
|
866
|
+ value: matched,
|
|
|
867
|
+ type: type,
|
|
|
868
|
+ matches: match
|
|
|
869
|
+ });
|
|
|
870
|
+ soFar = soFar.slice(matched.length);
|
|
|
871
|
+ }
|
|
|
872
|
+ }
|
|
|
873
|
+ if (!matched) {
|
|
|
874
|
+ break;
|
|
|
875
|
+ }
|
|
|
876
|
+ }
|
|
|
877
|
+ return parseOnly ? soFar.length : soFar ? Sizzle.error(selector) : tokenCache(selector, groups).slice(0);
|
|
|
878
|
+ };
|
|
|
879
|
+ function toSelector(tokens) {
|
|
|
880
|
+ var i = 0, len = tokens.length, selector = '';
|
|
|
881
|
+ for (; i < len; i++) {
|
|
|
882
|
+ selector += tokens[i].value;
|
|
|
883
|
+ }
|
|
|
884
|
+ return selector;
|
|
|
885
|
+ }
|
|
|
886
|
+ function addCombinator(matcher, combinator, base) {
|
|
|
887
|
+ var dir = combinator.dir, checkNonElements = base && dir === 'parentNode', doneName = done++;
|
|
|
888
|
+ return combinator.first ? function (elem, context, xml) {
|
|
|
889
|
+ while (elem = elem[dir]) {
|
|
|
890
|
+ if (elem.nodeType === 1 || checkNonElements) {
|
|
|
891
|
+ return matcher(elem, context, xml);
|
|
|
892
|
+ }
|
|
|
893
|
+ }
|
|
|
894
|
+ } : function (elem, context, xml) {
|
|
|
895
|
+ var oldCache, uniqueCache, outerCache, newCache = [
|
|
|
896
|
+ dirruns,
|
|
|
897
|
+ doneName
|
|
|
898
|
+ ];
|
|
|
899
|
+ if (xml) {
|
|
|
900
|
+ while (elem = elem[dir]) {
|
|
|
901
|
+ if (elem.nodeType === 1 || checkNonElements) {
|
|
|
902
|
+ if (matcher(elem, context, xml)) {
|
|
|
903
|
+ return true;
|
|
|
904
|
+ }
|
|
|
905
|
+ }
|
|
|
906
|
+ }
|
|
|
907
|
+ } else {
|
|
|
908
|
+ while (elem = elem[dir]) {
|
|
|
909
|
+ if (elem.nodeType === 1 || checkNonElements) {
|
|
|
910
|
+ outerCache = elem[expando] || (elem[expando] = {});
|
|
|
911
|
+ uniqueCache = outerCache[elem.uniqueID] || (outerCache[elem.uniqueID] = {});
|
|
|
912
|
+ if ((oldCache = uniqueCache[dir]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
|
|
|
913
|
+ return newCache[2] = oldCache[2];
|
|
|
914
|
+ } else {
|
|
|
915
|
+ uniqueCache[dir] = newCache;
|
|
|
916
|
+ if (newCache[2] = matcher(elem, context, xml)) {
|
|
|
917
|
+ return true;
|
|
|
918
|
+ }
|
|
|
919
|
+ }
|
|
|
920
|
+ }
|
|
|
921
|
+ }
|
|
|
922
|
+ }
|
|
|
923
|
+ };
|
|
|
924
|
+ }
|
|
|
925
|
+ function elementMatcher(matchers) {
|
|
|
926
|
+ return matchers.length > 1 ? function (elem, context, xml) {
|
|
|
927
|
+ var i = matchers.length;
|
|
|
928
|
+ while (i--) {
|
|
|
929
|
+ if (!matchers[i](elem, context, xml)) {
|
|
|
930
|
+ return false;
|
|
|
931
|
+ }
|
|
|
932
|
+ }
|
|
|
933
|
+ return true;
|
|
|
934
|
+ } : matchers[0];
|
|
|
935
|
+ }
|
|
|
936
|
+ function multipleContexts(selector, contexts, results) {
|
|
|
937
|
+ var i = 0, len = contexts.length;
|
|
|
938
|
+ for (; i < len; i++) {
|
|
|
939
|
+ Sizzle(selector, contexts[i], results);
|
|
|
940
|
+ }
|
|
|
941
|
+ return results;
|
|
|
942
|
+ }
|
|
|
943
|
+ function condense(unmatched, map, filter, context, xml) {
|
|
|
944
|
+ var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null;
|
|
|
945
|
+ for (; i < len; i++) {
|
|
|
946
|
+ if (elem = unmatched[i]) {
|
|
|
947
|
+ if (!filter || filter(elem, context, xml)) {
|
|
|
948
|
+ newUnmatched.push(elem);
|
|
|
949
|
+ if (mapped) {
|
|
|
950
|
+ map.push(i);
|
|
|
951
|
+ }
|
|
|
952
|
+ }
|
|
|
953
|
+ }
|
|
|
954
|
+ }
|
|
|
955
|
+ return newUnmatched;
|
|
|
956
|
+ }
|
|
|
957
|
+ function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
|
|
|
958
|
+ if (postFilter && !postFilter[expando]) {
|
|
|
959
|
+ postFilter = setMatcher(postFilter);
|
|
|
960
|
+ }
|
|
|
961
|
+ if (postFinder && !postFinder[expando]) {
|
|
|
962
|
+ postFinder = setMatcher(postFinder, postSelector);
|
|
|
963
|
+ }
|
|
|
964
|
+ return markFunction(function (seed, results, context, xml) {
|
|
|
965
|
+ var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts(selector || '*', context.nodeType ? [context] : context, []), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems, matcherOut = matcher ? postFinder || (seed ? preFilter : preexisting || postFilter) ? [] : results : matcherIn;
|
|
|
966
|
+ if (matcher) {
|
|
|
967
|
+ matcher(matcherIn, matcherOut, context, xml);
|
|
|
968
|
+ }
|
|
|
969
|
+ if (postFilter) {
|
|
|
970
|
+ temp = condense(matcherOut, postMap);
|
|
|
971
|
+ postFilter(temp, [], context, xml);
|
|
|
972
|
+ i = temp.length;
|
|
|
973
|
+ while (i--) {
|
|
|
974
|
+ if (elem = temp[i]) {
|
|
|
975
|
+ matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem);
|
|
|
976
|
+ }
|
|
|
977
|
+ }
|
|
|
978
|
+ }
|
|
|
979
|
+ if (seed) {
|
|
|
980
|
+ if (postFinder || preFilter) {
|
|
|
981
|
+ if (postFinder) {
|
|
|
982
|
+ temp = [];
|
|
|
983
|
+ i = matcherOut.length;
|
|
|
984
|
+ while (i--) {
|
|
|
985
|
+ if (elem = matcherOut[i]) {
|
|
|
986
|
+ temp.push(matcherIn[i] = elem);
|
|
|
987
|
+ }
|
|
|
988
|
+ }
|
|
|
989
|
+ postFinder(null, matcherOut = [], temp, xml);
|
|
|
990
|
+ }
|
|
|
991
|
+ i = matcherOut.length;
|
|
|
992
|
+ while (i--) {
|
|
|
993
|
+ if ((elem = matcherOut[i]) && (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1) {
|
|
|
994
|
+ seed[temp] = !(results[temp] = elem);
|
|
|
995
|
+ }
|
|
|
996
|
+ }
|
|
|
997
|
+ }
|
|
|
998
|
+ } else {
|
|
|
999
|
+ matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut);
|
|
|
1000
|
+ if (postFinder) {
|
|
|
1001
|
+ postFinder(null, results, matcherOut, xml);
|
|
|
1002
|
+ } else {
|
|
|
1003
|
+ push.apply(results, matcherOut);
|
|
|
1004
|
+ }
|
|
|
1005
|
+ }
|
|
|
1006
|
+ });
|
|
|
1007
|
+ }
|
|
|
1008
|
+ function matcherFromTokens(tokens) {
|
|
|
1009
|
+ var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[' '], i = leadingRelative ? 1 : 0, matchContext = addCombinator(function (elem) {
|
|
|
1010
|
+ return elem === checkContext;
|
|
|
1011
|
+ }, implicitRelative, true), matchAnyContext = addCombinator(function (elem) {
|
|
|
1012
|
+ return indexOf(checkContext, elem) > -1;
|
|
|
1013
|
+ }, implicitRelative, true), matchers = [function (elem, context, xml) {
|
|
|
1014
|
+ var ret = !leadingRelative && (xml || context !== outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
|
|
|
1015
|
+ checkContext = null;
|
|
|
1016
|
+ return ret;
|
|
|
1017
|
+ }];
|
|
|
1018
|
+ for (; i < len; i++) {
|
|
|
1019
|
+ if (matcher = Expr.relative[tokens[i].type]) {
|
|
|
1020
|
+ matchers = [addCombinator(elementMatcher(matchers), matcher)];
|
|
|
1021
|
+ } else {
|
|
|
1022
|
+ matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches);
|
|
|
1023
|
+ if (matcher[expando]) {
|
|
|
1024
|
+ j = ++i;
|
|
|
1025
|
+ for (; j < len; j++) {
|
|
|
1026
|
+ if (Expr.relative[tokens[j].type]) {
|
|
|
1027
|
+ break;
|
|
|
1028
|
+ }
|
|
|
1029
|
+ }
|
|
|
1030
|
+ return setMatcher(i > 1 && elementMatcher(matchers), i > 1 && toSelector(tokens.slice(0, i - 1).concat({ value: tokens[i - 2].type === ' ' ? '*' : '' })).replace(rtrim, '$1'), matcher, i < j && matcherFromTokens(tokens.slice(i, j)), j < len && matcherFromTokens(tokens = tokens.slice(j)), j < len && toSelector(tokens));
|
|
|
1031
|
+ }
|
|
|
1032
|
+ matchers.push(matcher);
|
|
|
1033
|
+ }
|
|
|
1034
|
+ }
|
|
|
1035
|
+ return elementMatcher(matchers);
|
|
|
1036
|
+ }
|
|
|
1037
|
+ function matcherFromGroupMatchers(elementMatchers, setMatchers) {
|
|
|
1038
|
+ var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function (seed, context, xml, results, outermost) {
|
|
|
1039
|
+ var elem, j, matcher, matchedCount = 0, i = '0', unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find['TAG']('*', outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length;
|
|
|
1040
|
+ if (outermost) {
|
|
|
1041
|
+ outermostContext = context === document || context || outermost;
|
|
|
1042
|
+ }
|
|
|
1043
|
+ for (; i !== len && (elem = elems[i]) != null; i++) {
|
|
|
1044
|
+ if (byElement && elem) {
|
|
|
1045
|
+ j = 0;
|
|
|
1046
|
+ if (!context && elem.ownerDocument !== document) {
|
|
|
1047
|
+ setDocument(elem);
|
|
|
1048
|
+ xml = !documentIsHTML;
|
|
|
1049
|
+ }
|
|
|
1050
|
+ while (matcher = elementMatchers[j++]) {
|
|
|
1051
|
+ if (matcher(elem, context || document, xml)) {
|
|
|
1052
|
+ results.push(elem);
|
|
|
1053
|
+ break;
|
|
|
1054
|
+ }
|
|
|
1055
|
+ }
|
|
|
1056
|
+ if (outermost) {
|
|
|
1057
|
+ dirruns = dirrunsUnique;
|
|
|
1058
|
+ }
|
|
|
1059
|
+ }
|
|
|
1060
|
+ if (bySet) {
|
|
|
1061
|
+ if (elem = !matcher && elem) {
|
|
|
1062
|
+ matchedCount--;
|
|
|
1063
|
+ }
|
|
|
1064
|
+ if (seed) {
|
|
|
1065
|
+ unmatched.push(elem);
|
|
|
1066
|
+ }
|
|
|
1067
|
+ }
|
|
|
1068
|
+ }
|
|
|
1069
|
+ matchedCount += i;
|
|
|
1070
|
+ if (bySet && i !== matchedCount) {
|
|
|
1071
|
+ j = 0;
|
|
|
1072
|
+ while (matcher = setMatchers[j++]) {
|
|
|
1073
|
+ matcher(unmatched, setMatched, context, xml);
|
|
|
1074
|
+ }
|
|
|
1075
|
+ if (seed) {
|
|
|
1076
|
+ if (matchedCount > 0) {
|
|
|
1077
|
+ while (i--) {
|
|
|
1078
|
+ if (!(unmatched[i] || setMatched[i])) {
|
|
|
1079
|
+ setMatched[i] = pop.call(results);
|
|
|
1080
|
+ }
|
|
|
1081
|
+ }
|
|
|
1082
|
+ }
|
|
|
1083
|
+ setMatched = condense(setMatched);
|
|
|
1084
|
+ }
|
|
|
1085
|
+ push.apply(results, setMatched);
|
|
|
1086
|
+ if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
|
|
|
1087
|
+ Sizzle.uniqueSort(results);
|
|
|
1088
|
+ }
|
|
|
1089
|
+ }
|
|
|
1090
|
+ if (outermost) {
|
|
|
1091
|
+ dirruns = dirrunsUnique;
|
|
|
1092
|
+ outermostContext = contextBackup;
|
|
|
1093
|
+ }
|
|
|
1094
|
+ return unmatched;
|
|
|
1095
|
+ };
|
|
|
1096
|
+ return bySet ? markFunction(superMatcher) : superMatcher;
|
|
|
1097
|
+ }
|
|
|
1098
|
+ compile = Sizzle.compile = function (selector, match) {
|
|
|
1099
|
+ var i, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + ' '];
|
|
|
1100
|
+ if (!cached) {
|
|
|
1101
|
+ if (!match) {
|
|
|
1102
|
+ match = tokenize(selector);
|
|
|
1103
|
+ }
|
|
|
1104
|
+ i = match.length;
|
|
|
1105
|
+ while (i--) {
|
|
|
1106
|
+ cached = matcherFromTokens(match[i]);
|
|
|
1107
|
+ if (cached[expando]) {
|
|
|
1108
|
+ setMatchers.push(cached);
|
|
|
1109
|
+ } else {
|
|
|
1110
|
+ elementMatchers.push(cached);
|
|
|
1111
|
+ }
|
|
|
1112
|
+ }
|
|
|
1113
|
+ cached = compilerCache(selector, matcherFromGroupMatchers(elementMatchers, setMatchers));
|
|
|
1114
|
+ cached.selector = selector;
|
|
|
1115
|
+ }
|
|
|
1116
|
+ return cached;
|
|
|
1117
|
+ };
|
|
|
1118
|
+ select = Sizzle.select = function (selector, context, results, seed) {
|
|
|
1119
|
+ var i, tokens, token, type, find, compiled = typeof selector === 'function' && selector, match = !seed && tokenize(selector = compiled.selector || selector);
|
|
|
1120
|
+ results = results || [];
|
|
|
1121
|
+ if (match.length === 1) {
|
|
|
1122
|
+ tokens = match[0] = match[0].slice(0);
|
|
|
1123
|
+ if (tokens.length > 2 && (token = tokens[0]).type === 'ID' && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
|
|
|
1124
|
+ context = (Expr.find['ID'](token.matches[0].replace(runescape, funescape), context) || [])[0];
|
|
|
1125
|
+ if (!context) {
|
|
|
1126
|
+ return results;
|
|
|
1127
|
+ } else if (compiled) {
|
|
|
1128
|
+ context = context.parentNode;
|
|
|
1129
|
+ }
|
|
|
1130
|
+ selector = selector.slice(tokens.shift().value.length);
|
|
|
1131
|
+ }
|
|
|
1132
|
+ i = matchExpr['needsContext'].test(selector) ? 0 : tokens.length;
|
|
|
1133
|
+ while (i--) {
|
|
|
1134
|
+ token = tokens[i];
|
|
|
1135
|
+ if (Expr.relative[type = token.type]) {
|
|
|
1136
|
+ break;
|
|
|
1137
|
+ }
|
|
|
1138
|
+ if (find = Expr.find[type]) {
|
|
|
1139
|
+ if (seed = find(token.matches[0].replace(runescape, funescape), rsibling.test(tokens[0].type) && testContext(context.parentNode) || context)) {
|
|
|
1140
|
+ tokens.splice(i, 1);
|
|
|
1141
|
+ selector = seed.length && toSelector(tokens);
|
|
|
1142
|
+ if (!selector) {
|
|
|
1143
|
+ push.apply(results, seed);
|
|
|
1144
|
+ return results;
|
|
|
1145
|
+ }
|
|
|
1146
|
+ break;
|
|
|
1147
|
+ }
|
|
|
1148
|
+ }
|
|
|
1149
|
+ }
|
|
|
1150
|
+ }
|
|
|
1151
|
+ (compiled || compile(selector, match))(seed, context, !documentIsHTML, results, !context || rsibling.test(selector) && testContext(context.parentNode) || context);
|
|
|
1152
|
+ return results;
|
|
|
1153
|
+ };
|
|
|
1154
|
+ support.sortStable = expando.split('').sort(sortOrder).join('') === expando;
|
|
|
1155
|
+ support.detectDuplicates = !!hasDuplicate;
|
|
|
1156
|
+ setDocument();
|
|
|
1157
|
+ support.sortDetached = assert(function (div1) {
|
|
|
1158
|
+ return div1.compareDocumentPosition(document.createElement('div')) & 1;
|
|
|
1159
|
+ });
|
|
|
1160
|
+ if (!assert(function (div) {
|
|
|
1161
|
+ div.innerHTML = '<a href=\'#\'></a>';
|
|
|
1162
|
+ return div.firstChild.getAttribute('href') === '#';
|
|
|
1163
|
+ })) {
|
|
|
1164
|
+ addHandle('type|href|height|width', function (elem, name, isXML) {
|
|
|
1165
|
+ if (!isXML) {
|
|
|
1166
|
+ return elem.getAttribute(name, name.toLowerCase() === 'type' ? 1 : 2);
|
|
|
1167
|
+ }
|
|
|
1168
|
+ });
|
|
|
1169
|
+ }
|
|
|
1170
|
+ if (!support.attributes || !assert(function (div) {
|
|
|
1171
|
+ div.innerHTML = '<input/>';
|
|
|
1172
|
+ div.firstChild.setAttribute('value', '');
|
|
|
1173
|
+ return div.firstChild.getAttribute('value') === '';
|
|
|
1174
|
+ })) {
|
|
|
1175
|
+ addHandle('value', function (elem, name, isXML) {
|
|
|
1176
|
+ if (!isXML && elem.nodeName.toLowerCase() === 'input') {
|
|
|
1177
|
+ return elem.defaultValue;
|
|
|
1178
|
+ }
|
|
|
1179
|
+ });
|
|
|
1180
|
+ }
|
|
|
1181
|
+ if (!assert(function (div) {
|
|
|
1182
|
+ return div.getAttribute('disabled') == null;
|
|
|
1183
|
+ })) {
|
|
|
1184
|
+ addHandle(booleans, function (elem, name, isXML) {
|
|
|
1185
|
+ var val;
|
|
|
1186
|
+ if (!isXML) {
|
|
|
1187
|
+ return elem[name] === true ? name.toLowerCase() : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null;
|
|
|
1188
|
+ }
|
|
|
1189
|
+ });
|
|
|
1190
|
+ }
|
|
|
1191
|
+ if (typeof define === 'function' && define.amd) {
|
|
|
1192
|
+ define(function () {
|
|
|
1193
|
+ return Sizzle;
|
|
|
1194
|
+ });
|
|
|
1195
|
+ } else if (true) {
|
|
|
1196
|
+ exports = Sizzle;
|
|
|
1197
|
+ } else {
|
|
|
1198
|
+ window.Sizzle = Sizzle;
|
|
|
1199
|
+ }
|
|
|
1200
|
+ }(window));
|
|
|
1201
|
+ return exports;
|
|
|
1202
|
+}();
|
|
|
1203
|
+yohojson2_100_json2_debug = function () {
|
|
|
1204
|
+ if (typeof JSON !== 'object') {
|
|
|
1205
|
+ JSON = {};
|
|
|
1206
|
+ }
|
|
|
1207
|
+ (function () {
|
|
|
1208
|
+ 'use strict';
|
|
|
1209
|
+ 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;
|
|
|
1210
|
+ function f(n) {
|
|
|
1211
|
+ return n < 10 ? '0' + n : n;
|
|
|
1212
|
+ }
|
|
|
1213
|
+ function this_value() {
|
|
|
1214
|
+ return this.valueOf();
|
|
|
1215
|
+ }
|
|
|
1216
|
+ if (typeof Date.prototype.toJSON !== 'function') {
|
|
|
1217
|
+ Date.prototype.toJSON = function () {
|
|
|
1218
|
+ 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;
|
|
|
1219
|
+ };
|
|
|
1220
|
+ Boolean.prototype.toJSON = this_value;
|
|
|
1221
|
+ Number.prototype.toJSON = this_value;
|
|
|
1222
|
+ String.prototype.toJSON = this_value;
|
|
|
1223
|
+ }
|
|
|
1224
|
+ var gap, indent, meta, rep;
|
|
|
1225
|
+ function quote(string) {
|
|
|
1226
|
+ rx_escapable.lastIndex = 0;
|
|
|
1227
|
+ return rx_escapable.test(string) ? '"' + string.replace(rx_escapable, function (a) {
|
|
|
1228
|
+ var c = meta[a];
|
|
|
1229
|
+ return typeof c === 'string' ? c : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
|
|
1230
|
+ }) + '"' : '"' + string + '"';
|
|
|
1231
|
+ }
|
|
|
1232
|
+ function str(key, holder) {
|
|
|
1233
|
+ var i, k, v, length, mind = gap, partial, value = holder[key];
|
|
|
1234
|
+ if (value && typeof value === 'object' && typeof value.toJSON === 'function') {
|
|
|
1235
|
+ value = value.toJSON(key);
|
|
|
1236
|
+ }
|
|
|
1237
|
+ if (typeof rep === 'function') {
|
|
|
1238
|
+ value = rep.call(holder, key, value);
|
|
|
1239
|
+ }
|
|
|
1240
|
+ switch (typeof value) {
|
|
|
1241
|
+ case 'string':
|
|
|
1242
|
+ return quote(value);
|
|
|
1243
|
+ case 'number':
|
|
|
1244
|
+ return isFinite(value) ? String(value) : 'null';
|
|
|
1245
|
+ case 'boolean':
|
|
|
1246
|
+ case 'null':
|
|
|
1247
|
+ return String(value);
|
|
|
1248
|
+ case 'object':
|
|
|
1249
|
+ if (!value) {
|
|
|
1250
|
+ return 'null';
|
|
|
1251
|
+ }
|
|
|
1252
|
+ gap += indent;
|
|
|
1253
|
+ partial = [];
|
|
|
1254
|
+ if (Object.prototype.toString.apply(value) === '[object Array]') {
|
|
|
1255
|
+ length = value.length;
|
|
|
1256
|
+ for (i = 0; i < length; i += 1) {
|
|
|
1257
|
+ partial[i] = str(i, value) || 'null';
|
|
|
1258
|
+ }
|
|
|
1259
|
+ v = partial.length === 0 ? '[]' : gap ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : '[' + partial.join(',') + ']';
|
|
|
1260
|
+ gap = mind;
|
|
|
1261
|
+ return v;
|
|
|
1262
|
+ }
|
|
|
1263
|
+ if (rep && typeof rep === 'object') {
|
|
|
1264
|
+ length = rep.length;
|
|
|
1265
|
+ for (i = 0; i < length; i += 1) {
|
|
|
1266
|
+ if (typeof rep[i] === 'string') {
|
|
|
1267
|
+ k = rep[i];
|
|
|
1268
|
+ v = str(k, value);
|
|
|
1269
|
+ if (v) {
|
|
|
1270
|
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
|
|
1271
|
+ }
|
|
|
1272
|
+ }
|
|
|
1273
|
+ }
|
|
|
1274
|
+ } else {
|
|
|
1275
|
+ for (k in value) {
|
|
|
1276
|
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
|
|
|
1277
|
+ v = str(k, value);
|
|
|
1278
|
+ if (v) {
|
|
|
1279
|
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
|
|
1280
|
+ }
|
|
|
1281
|
+ }
|
|
|
1282
|
+ }
|
|
|
1283
|
+ }
|
|
|
1284
|
+ v = partial.length === 0 ? '{}' : gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : '{' + partial.join(',') + '}';
|
|
|
1285
|
+ gap = mind;
|
|
|
1286
|
+ return v;
|
|
|
1287
|
+ }
|
|
|
1288
|
+ }
|
|
|
1289
|
+ if (typeof JSON.stringify !== 'function') {
|
|
|
1290
|
+ meta = {
|
|
|
1291
|
+ '\b': '\\b',
|
|
|
1292
|
+ '\t': '\\t',
|
|
|
1293
|
+ '\n': '\\n',
|
|
|
1294
|
+ '\f': '\\f',
|
|
|
1295
|
+ '\r': '\\r',
|
|
|
1296
|
+ '"': '\\"',
|
|
|
1297
|
+ '\\': '\\\\'
|
|
|
1298
|
+ };
|
|
|
1299
|
+ JSON.stringify = function (value, replacer, space) {
|
|
|
1300
|
+ var i;
|
|
|
1301
|
+ gap = '';
|
|
|
1302
|
+ indent = '';
|
|
|
1303
|
+ if (typeof space === 'number') {
|
|
|
1304
|
+ for (i = 0; i < space; i += 1) {
|
|
|
1305
|
+ indent += ' ';
|
|
|
1306
|
+ }
|
|
|
1307
|
+ } else if (typeof space === 'string') {
|
|
|
1308
|
+ indent = space;
|
|
|
1309
|
+ }
|
|
|
1310
|
+ rep = replacer;
|
|
|
1311
|
+ if (replacer && typeof replacer !== 'function' && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) {
|
|
|
1312
|
+ throw new Error('JSON.stringify');
|
|
|
1313
|
+ }
|
|
|
1314
|
+ return str('', { '': value });
|
|
|
1315
|
+ };
|
|
|
1316
|
+ }
|
|
|
1317
|
+ if (typeof JSON.parse !== 'function') {
|
|
|
1318
|
+ JSON.parse = function (text, reviver) {
|
|
|
1319
|
+ var j;
|
|
|
1320
|
+ function walk(holder, key) {
|
|
|
1321
|
+ var k, v, value = holder[key];
|
|
|
1322
|
+ if (value && typeof value === 'object') {
|
|
|
1323
|
+ for (k in value) {
|
|
|
1324
|
+ if (Object.prototype.hasOwnProperty.call(value, k)) {
|
|
|
1325
|
+ v = walk(value, k);
|
|
|
1326
|
+ if (v !== undefined) {
|
|
|
1327
|
+ value[k] = v;
|
|
|
1328
|
+ } else {
|
|
|
1329
|
+ delete value[k];
|
|
|
1330
|
+ }
|
|
|
1331
|
+ }
|
|
|
1332
|
+ }
|
|
|
1333
|
+ }
|
|
|
1334
|
+ return reviver.call(holder, key, value);
|
|
|
1335
|
+ }
|
|
|
1336
|
+ text = String(text);
|
|
|
1337
|
+ rx_dangerous.lastIndex = 0;
|
|
|
1338
|
+ if (rx_dangerous.test(text)) {
|
|
|
1339
|
+ text = text.replace(rx_dangerous, function (a) {
|
|
|
1340
|
+ return '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
|
|
1341
|
+ });
|
|
|
1342
|
+ }
|
|
|
1343
|
+ if (rx_one.test(text.replace(rx_two, '@').replace(rx_three, ']').replace(rx_four, ''))) {
|
|
|
1344
|
+ j = eval('(' + text + ')');
|
|
|
1345
|
+ return typeof reviver === 'function' ? walk({ '': j }, '') : j;
|
|
|
1346
|
+ }
|
|
|
1347
|
+ throw new SyntaxError('JSON.parse');
|
|
|
1348
|
+ };
|
|
|
1349
|
+ }
|
|
|
1350
|
+ }());
|
|
|
1351
|
+}();
|
|
|
1352
|
+yas_jssdk_101363_src_util_debug = function (exports) {
|
|
|
1353
|
+ var config = yas_jssdk_101363_src_config_debug;
|
|
|
1354
|
+ var yasPath = config.yaPath;
|
|
|
1355
|
+ var yasDomain = config.yasDomain;
|
|
|
1356
|
+ exports.flashChecker = function () {
|
|
|
1357
|
+ var hasFlash = 0;
|
|
|
1358
|
+ var flashVersion = 0;
|
|
|
1359
|
+ var isIE = 0;
|
|
|
1360
|
+ var swf = null;
|
|
|
1361
|
+ if (isIE) {
|
|
|
1362
|
+ swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');
|
|
|
1363
|
+ if (swf) {
|
|
|
1364
|
+ hasFlash = 1;
|
|
|
1365
|
+ flashVersion = swf.GetVariable('$version');
|
|
|
1366
|
+ }
|
|
|
1367
|
+ } else {
|
|
|
1368
|
+ if (navigator.plugins && navigator.plugins.length > 0) {
|
|
|
1369
|
+ swf = navigator.plugins['Shockwave Flash'];
|
|
|
1370
|
+ if (swf) {
|
|
|
1371
|
+ hasFlash = 1;
|
|
|
1372
|
+ flashVersion = swf.description.replace('Shockwave Flash', '');
|
|
|
1373
|
+ }
|
|
|
1374
|
+ }
|
|
|
1375
|
+ }
|
|
|
1376
|
+ return {
|
|
|
1377
|
+ f: hasFlash,
|
|
|
1378
|
+ v: flashVersion
|
|
|
1379
|
+ };
|
|
|
1380
|
+ };
|
|
|
1381
|
+ exports.Hash = function (str) {
|
|
|
1382
|
+ var hash = 1, charCode = 0, idx;
|
|
|
1383
|
+ if (str) {
|
|
|
1384
|
+ hash = 0;
|
|
|
1385
|
+ for (idx = str.length - 1; idx >= 0; idx--) {
|
|
|
1386
|
+ charCode = str.charCodeAt(idx);
|
|
|
1387
|
+ hash = (hash << 6 & 268435455) + charCode + (charCode << 14);
|
|
|
1388
|
+ charCode = hash & 266338304;
|
|
|
1389
|
+ if (charCode !== 0) {
|
|
|
1390
|
+ hash = hash ^ charCode >> 21;
|
|
|
1391
|
+ }
|
|
|
1392
|
+ }
|
|
|
1393
|
+ }
|
|
|
1394
|
+ return hash;
|
|
|
1395
|
+ };
|
|
|
1396
|
+ exports.Random = function () {
|
|
|
1397
|
+ return Math.round(Math.random() * 2147483647);
|
|
|
1398
|
+ };
|
|
|
1399
|
+ exports.hashClientInfo = function () {
|
|
|
1400
|
+ var navigator = window.navigator;
|
|
|
1401
|
+ var history_length = window.history.length;
|
|
|
1402
|
+ var arr = [
|
|
|
1403
|
+ navigator.appName,
|
|
|
1404
|
+ navigator.version,
|
|
|
1405
|
+ navigator.language,
|
|
|
1406
|
+ navigator.platform,
|
|
|
1407
|
+ navigator.userAgent,
|
|
|
1408
|
+ navigator.javaEnabled(),
|
|
|
1409
|
+ window.screen,
|
|
|
1410
|
+ window.screen.colorDepth,
|
|
|
1411
|
+ window.document.cookie ? window.document.cookie : '',
|
|
|
1412
|
+ window.document.referrer ? window.document.referrer : ''
|
|
|
1413
|
+ ];
|
|
|
1414
|
+ navigator = arr.join('');
|
|
|
1415
|
+ for (var len = navigator.length; history_length > 0;) {
|
|
|
1416
|
+ navigator += history_length-- ^ len++;
|
|
|
1417
|
+ }
|
|
|
1418
|
+ return exports.Hash(navigator);
|
|
|
1419
|
+ };
|
|
|
1420
|
+ exports.merge = function (obj1, obj2) {
|
|
|
1421
|
+ var ret = {};
|
|
|
1422
|
+ for (var attr in obj1) {
|
|
|
1423
|
+ ret[attr] = obj1[attr];
|
|
|
1424
|
+ }
|
|
|
1425
|
+ for (var attr2 in obj2) {
|
|
|
1426
|
+ ret[attr2] = obj2[attr2];
|
|
|
1427
|
+ }
|
|
|
1428
|
+ return ret;
|
|
|
1429
|
+ };
|
|
|
1430
|
+ exports.genParam = function (obj) {
|
|
|
1431
|
+ var arr = [];
|
|
|
1432
|
+ for (var key in obj) {
|
|
|
1433
|
+ arr.push(key + '=' + obj[key]);
|
|
|
1434
|
+ }
|
|
|
1435
|
+ return arr.join('&');
|
|
|
1436
|
+ };
|
|
|
1437
|
+ exports.trim = function (text) {
|
|
|
1438
|
+ if (String.prototype.trim) {
|
|
|
1439
|
+ return text === null ? '' : String.prototype.trim.call(text);
|
|
|
1440
|
+ } else {
|
|
|
1441
|
+ var trimLeft = /^\s+/;
|
|
|
1442
|
+ var trimRight = /\s+$/;
|
|
|
1443
|
+ var ret = '';
|
|
|
1444
|
+ if (text) {
|
|
|
1445
|
+ ret = text.toString().replace(trimLeft, '');
|
|
|
1446
|
+ ret = ret.replace(trimRight, '');
|
|
|
1447
|
+ return ret;
|
|
|
1448
|
+ }
|
|
|
1449
|
+ }
|
|
|
1450
|
+ };
|
|
|
1451
|
+ exports.getGeo = function (callback) {
|
|
|
1452
|
+ if (window.navigator.geolocation) {
|
|
|
1453
|
+ var options = { enableHighAccuracy: true };
|
|
|
1454
|
+ window.navigator.geolocation.getCurrentPosition(handleSuccess, handleError, options);
|
|
|
1455
|
+ } else {
|
|
|
1456
|
+ callback(false);
|
|
|
1457
|
+ }
|
|
|
1458
|
+ function handleSuccess(position) {
|
|
|
1459
|
+ var lng = position.coords.longitude;
|
|
|
1460
|
+ var lat = position.coords.latitude;
|
|
|
1461
|
+ callback(lat, lng);
|
|
|
1462
|
+ }
|
|
|
1463
|
+ function handleError(error) {
|
|
|
1464
|
+ callback(false);
|
|
|
1465
|
+ }
|
|
|
1466
|
+ };
|
|
|
1467
|
+ return exports;
|
|
|
1468
|
+}({});
|
|
|
1469
|
+yas_jssdk_101363_src_cookie_debug = function (exports) {
|
|
|
1470
|
+ var util = yas_jssdk_101363_src_util_debug;
|
|
|
1471
|
+ exports = function (name, value, options) {
|
|
|
1472
|
+ if (typeof value != 'undefined') {
|
|
|
1473
|
+ options = options || {};
|
|
|
1474
|
+ if (value === null) {
|
|
|
1475
|
+ value = '';
|
|
|
1476
|
+ options.expires = -1;
|
|
|
1477
|
+ }
|
|
|
1478
|
+ var expires = '';
|
|
|
1479
|
+ if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
|
|
1480
|
+ var date;
|
|
|
1481
|
+ if (typeof options.expires == 'number') {
|
|
|
1482
|
+ date = new Date();
|
|
|
1483
|
+ date.setTime(date.getTime() + options.expires * 24 * 60 * 60 * 1000);
|
|
|
1484
|
+ } else {
|
|
|
1485
|
+ date = options.expires;
|
|
|
1486
|
+ }
|
|
|
1487
|
+ expires = '; expires=' + date.toUTCString();
|
|
|
1488
|
+ }
|
|
|
1489
|
+ var path = options.path ? '; path=' + options.path : '';
|
|
|
1490
|
+ var domain = options.domain ? '; domain=' + options.domain : '';
|
|
|
1491
|
+ var secure = options.secure ? '; secure' : '';
|
|
|
1492
|
+ document.cookie = [
|
|
|
1493
|
+ name,
|
|
|
1494
|
+ '=',
|
|
|
1495
|
+ encodeURIComponent(value),
|
|
|
1496
|
+ expires,
|
|
|
1497
|
+ path,
|
|
|
1498
|
+ domain,
|
|
|
1499
|
+ secure
|
|
|
1500
|
+ ].join('');
|
|
|
1501
|
+ } else {
|
|
|
1502
|
+ var cookieValue = null;
|
|
|
1503
|
+ if (document.cookie) {
|
|
|
1504
|
+ var cookies = document.cookie.split(';');
|
|
|
1505
|
+ for (var i = 0; i < cookies.length; i++) {
|
|
|
1506
|
+ var cookie = util.trim(cookies[i]);
|
|
|
1507
|
+ if (cookie.substring(0, name.length + 1) == name + '=') {
|
|
|
1508
|
+ cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
|
|
1509
|
+ break;
|
|
|
1510
|
+ }
|
|
|
1511
|
+ }
|
|
|
1512
|
+ }
|
|
|
1513
|
+ return cookieValue;
|
|
|
1514
|
+ }
|
|
|
1515
|
+ };
|
|
|
1516
|
+ return exports;
|
|
|
1517
|
+}();
|
|
|
1518
|
+yas_jssdk_101363_src_ya_debug = function (exports) {
|
|
|
1519
|
+ var util = yas_jssdk_101363_src_util_debug;
|
|
|
1520
|
+ var cookies = yas_jssdk_101363_src_cookie_debug;
|
|
|
1521
|
+ var cross = yas_jssdk_101363_src_cross_debug;
|
|
|
1522
|
+ var ev = yas_jssdk_101363_src_event_debug;
|
|
|
1523
|
+ var config = yas_jssdk_101363_src_config_debug;
|
|
|
1524
|
+ var sizzle = yohosizzle_222_pre_sizzle_debug;
|
|
|
1525
|
+ yohojson2_100_json2_debug;
|
|
|
1526
|
+ var version = config.version;
|
|
|
1527
|
+ var yasPath = config.yaPath;
|
|
|
1528
|
+ var yasDomain = config.yasDomain;
|
|
|
1529
|
+ var appInfo = {
|
|
|
1530
|
+ h: document.domain,
|
|
|
1531
|
+ p: window.location.port,
|
|
|
1532
|
+ u: window.location.pathname,
|
|
|
1533
|
+ ft: 0,
|
|
|
1534
|
+ fst: 0,
|
|
|
1535
|
+ sv: '',
|
|
|
1536
|
+ ab: cookies('ab_5') || ''
|
|
|
1537
|
+ };
|
|
|
1538
|
+ var VisitorId = getVisitorId();
|
|
|
1539
|
+ var custInfo = {
|
|
|
1540
|
+ ak: '',
|
|
|
1541
|
+ cd: VisitorId.cid,
|
|
|
1542
|
+ vd: new Date().getTime() + VisitorId.cid,
|
|
|
1543
|
+ ud: '',
|
|
|
1544
|
+ rf: document.referrer,
|
|
|
1545
|
+ ckf: VisitorId.isNew
|
|
|
1546
|
+ };
|
|
|
1547
|
+ var custOpInfo = {
|
|
|
1548
|
+ mp: '',
|
|
|
1549
|
+ ev: '',
|
|
|
1550
|
+ st: 0
|
|
|
1551
|
+ };
|
|
|
1552
|
+ var flash = util.flashChecker();
|
|
|
1553
|
+ var browserInfo = {
|
|
|
1554
|
+ sr: window.screen.width + 'x' + window.screen.height,
|
|
|
1555
|
+ wr: window.screen.availWidth + 'x' + window.screen.availHeight,
|
|
|
1556
|
+ sd: window.screen.colorDepth,
|
|
|
1557
|
+ ln: window.navigator.language ? window.navigator.language : window.navigator.browserLanguage,
|
|
|
1558
|
+ sy: window.navigator.platform,
|
|
|
1559
|
+ ce: window.navigator.cookieEnabled,
|
|
|
1560
|
+ fv: flash.f ? flash.v : 0
|
|
|
1561
|
+ };
|
|
|
1562
|
+ var eventArray = [];
|
|
|
1563
|
+ var _yas = function (initTime, version, tid, uid, geo, selector) {
|
|
|
1564
|
+ custInfo.ak = tid;
|
|
|
1565
|
+ appInfo.sv = version;
|
|
|
1566
|
+ custInfo.ud = uid ? uid : '';
|
|
|
1567
|
+ if (cookies('_yasgeo')) {
|
|
|
1568
|
+ var geoInfo = cookies('_yasgeo').split(',');
|
|
|
1569
|
+ custInfo.la = geoInfo[0];
|
|
|
1570
|
+ custInfo.lo = geoInfo[1];
|
|
|
1571
|
+ cookies('_yasgeo', null, {
|
|
|
1572
|
+ path: '/',
|
|
|
1573
|
+ domain: config.yasDomain,
|
|
|
1574
|
+ expires: 365 * 200
|
|
|
1575
|
+ });
|
|
|
1576
|
+ }
|
|
|
1577
|
+ var beginTime = new Date().getTime();
|
|
|
1578
|
+ var sendFlag = null;
|
|
|
1579
|
+ var isOver3sSend = false;
|
|
|
1580
|
+ appInfo.ft = beginTime - initTime;
|
|
|
1581
|
+ ev.addEventHandler(window, 'load', function (e) {
|
|
|
1582
|
+ var endTime = new Date().getTime();
|
|
|
1583
|
+ appInfo.fst = endTime - initTime;
|
|
|
1584
|
+ ev.removeEventHandler(window, 'load', arguments.callee);
|
|
|
1585
|
+ window.clearTimeout(sendFlag);
|
|
|
1586
|
+ if (!isOver3sSend) {
|
|
|
1587
|
+ send();
|
|
|
1588
|
+ }
|
|
|
1589
|
+ });
|
|
|
1590
|
+ sendFlag = window.setTimeout(function () {
|
|
|
1591
|
+ appInfo.fst = 0;
|
|
|
1592
|
+ appInfo.fse = '>3s';
|
|
|
1593
|
+ isOver3sSend = true;
|
|
|
1594
|
+ send();
|
|
|
1595
|
+ }, 3000);
|
|
|
1596
|
+ if (geo) {
|
|
|
1597
|
+ util.getGeo(function (lat, lng) {
|
|
|
1598
|
+ if (lat) {
|
|
|
1599
|
+ cookies('_yasgeo', lat + ',' + lng, {
|
|
|
1600
|
+ path: '/',
|
|
|
1601
|
+ domain: yasDomain,
|
|
|
1602
|
+ expires: 365 * 200
|
|
|
1603
|
+ });
|
|
|
1604
|
+ }
|
|
|
1605
|
+ });
|
|
|
1606
|
+ }
|
|
|
1607
|
+ var nodes = null;
|
|
|
1608
|
+ if (selector) {
|
|
|
1609
|
+ if (Object.prototype.toString.call(selector) === '[object String]') {
|
|
|
1610
|
+ if (sizzle) {
|
|
|
1611
|
+ nodes = sizzle(selector);
|
|
|
1612
|
+ }
|
|
|
1613
|
+ } else {
|
|
|
1614
|
+ nodes = selector;
|
|
|
1615
|
+ }
|
|
|
1616
|
+ }
|
|
|
1617
|
+ if (nodes) {
|
|
|
1618
|
+ for (var index = 0, length = nodes.length; index < length; index++) {
|
|
|
1619
|
+ (function (i) {
|
|
|
1620
|
+ ev.addEventHandler(nodes[i], 'click', function (e) {
|
|
|
1621
|
+ ix = i + 1;
|
|
|
1622
|
+ var pos = getMouseEventPosition(e);
|
|
|
1623
|
+ cookies('_yasmp', pos.x + ',' + pos.y + ',' + e.type + ',' + (i + 1), {
|
|
|
1624
|
+ path: '/',
|
|
|
1625
|
+ domain: yasDomain,
|
|
|
1626
|
+ expires: 365 * 200
|
|
|
1627
|
+ });
|
|
|
1628
|
+ });
|
|
|
1629
|
+ }(index));
|
|
|
1630
|
+ }
|
|
|
1631
|
+ } else {
|
|
|
1632
|
+ ev.addEventHandler(document, 'click', function (e) {
|
|
|
1633
|
+ e = e || window.event;
|
|
|
1634
|
+ var target = e.target || e.srcElement;
|
|
|
1635
|
+ if (target && (target.nodeName === 'A' || target.nodeName === 'IMG' && target.parentNode.nodeName === 'A')) {
|
|
|
1636
|
+ var pos = getMouseEventPosition(e);
|
|
|
1637
|
+ cookies('_yasmp', pos.x + ',' + pos.y + ',' + e.type, {
|
|
|
1638
|
+ path: '/',
|
|
|
1639
|
+ domain: yasDomain,
|
|
|
1640
|
+ expires: 365 * 200
|
|
|
1641
|
+ });
|
|
|
1642
|
+ }
|
|
|
1643
|
+ ix = 0;
|
|
|
1644
|
+ });
|
|
|
1645
|
+ }
|
|
|
1646
|
+ };
|
|
|
1647
|
+ function send(callback) {
|
|
|
1648
|
+ var info = util.merge(appInfo, custInfo);
|
|
|
1649
|
+ info = util.merge(info, browserInfo);
|
|
|
1650
|
+ var mp = getMousePosition();
|
|
|
1651
|
+ if (mp) {
|
|
|
1652
|
+ info = util.merge(info, mp);
|
|
|
1653
|
+ cookies('_yasmp', null, {
|
|
|
1654
|
+ path: '/',
|
|
|
1655
|
+ domain: config.yasDomain,
|
|
|
1656
|
+ expires: 365 * 200
|
|
|
1657
|
+ });
|
|
|
1658
|
+ }
|
|
|
1659
|
+ var _custjsonstr = cookies('_yascustjson');
|
|
|
1660
|
+ if (_custjsonstr) {
|
|
|
1661
|
+ var custjson = JSON.parse(_custjsonstr);
|
|
|
1662
|
+ info = util.merge(info, custjson);
|
|
|
1663
|
+ cookies('_yascustjson', null, {
|
|
|
1664
|
+ path: '/',
|
|
|
1665
|
+ domain: config.yasDomain,
|
|
|
1666
|
+ expires: 365 * 200
|
|
|
1667
|
+ });
|
|
|
1668
|
+ }
|
|
|
1669
|
+ var param = util.genParam(info);
|
|
|
1670
|
+ callback = callback ? callback : function () {
|
|
|
1671
|
+ };
|
|
|
1672
|
+ cross.imgSend(param, callback);
|
|
|
1673
|
+ var _yasev = cookies('_yasev');
|
|
|
1674
|
+ if (_yasev) {
|
|
|
1675
|
+ cross.imgSend(_yasev, function () {
|
|
|
1676
|
+ cookies('_yasev', null, {
|
|
|
1677
|
+ path: '/',
|
|
|
1678
|
+ domain: config.yasDomain,
|
|
|
1679
|
+ expires: 365 * 200
|
|
|
1680
|
+ });
|
|
|
1681
|
+ });
|
|
|
1682
|
+ }
|
|
|
1683
|
+ }
|
|
|
1684
|
+ function getVisitorId() {
|
|
|
1685
|
+ var cid = cookies('_yasvd');
|
|
|
1686
|
+ if (cid) {
|
|
|
1687
|
+ return {
|
|
|
1688
|
+ cid: cid,
|
|
|
1689
|
+ isNew: 'N'
|
|
|
1690
|
+ };
|
|
|
1691
|
+ }
|
|
|
1692
|
+ cid = util.Random() ^ util.hashClientInfo() & 2147483647;
|
|
|
1693
|
+ cookies('_yasvd', cid, {
|
|
|
1694
|
+ path: '/',
|
|
|
1695
|
+ domain: yasDomain,
|
|
|
1696
|
+ expires: 365 * 200
|
|
|
1697
|
+ });
|
|
|
1698
|
+ return {
|
|
|
1699
|
+ cid: cid,
|
|
|
1700
|
+ isNew: 'Y'
|
|
|
1701
|
+ };
|
|
|
1702
|
+ }
|
|
|
1703
|
+ function getMousePosition() {
|
|
|
1704
|
+ var mp = cookies('_yasmp');
|
|
|
1705
|
+ if (mp) {
|
|
|
1706
|
+ var mpObject = mp.split(',');
|
|
|
1707
|
+ if (mpObject.length === 3) {
|
|
|
1708
|
+ return {
|
|
|
1709
|
+ x: mpObject[0],
|
|
|
1710
|
+ y: mpObject[1],
|
|
|
1711
|
+ et: mpObject[2]
|
|
|
1712
|
+ };
|
|
|
1713
|
+ } else if (mpObject.length === 4) {
|
|
|
1714
|
+ return {
|
|
|
1715
|
+ x: mpObject[0],
|
|
|
1716
|
+ y: mpObject[1],
|
|
|
1717
|
+ et: mpObject[2],
|
|
|
1718
|
+ ix: mpObject[3]
|
|
|
1719
|
+ };
|
|
|
1720
|
+ }
|
|
|
1721
|
+ }
|
|
|
1722
|
+ return null;
|
|
|
1723
|
+ }
|
|
|
1724
|
+ function getMouseEventPosition(e) {
|
|
|
1725
|
+ var x = 0, y = 0;
|
|
|
1726
|
+ if (e.pageX || e.pageY) {
|
|
|
1727
|
+ x = e.pageX;
|
|
|
1728
|
+ y = e.pageY;
|
|
|
1729
|
+ } else if (e.clientX || e.clientY) {
|
|
|
1730
|
+ x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
|
|
|
1731
|
+ y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
|
|
|
1732
|
+ }
|
|
|
1733
|
+ x -= window.screen.width / 2;
|
|
|
1734
|
+ y = window.screen.height / 2 - y;
|
|
|
1735
|
+ return {
|
|
|
1736
|
+ x: x,
|
|
|
1737
|
+ y: y
|
|
|
1738
|
+ };
|
|
|
1739
|
+ }
|
|
|
1740
|
+ var evTimes = 0;
|
|
|
1741
|
+ _yas.add = function (trackType, input, action, label, value) {
|
|
|
1742
|
+ if (evTimes > 3) {
|
|
|
1743
|
+ cross.imgSend(cookies('_yasev'), function () {
|
|
|
1744
|
+ cookies('_yasev', null, {
|
|
|
1745
|
+ path: '/',
|
|
|
1746
|
+ domain: config.yasDomain,
|
|
|
1747
|
+ expires: 365 * 200
|
|
|
1748
|
+ });
|
|
|
1749
|
+ evTimes = 0;
|
|
|
1750
|
+ _addEv2Cookies(trackType, input, action, label, value);
|
|
|
1751
|
+ });
|
|
|
1752
|
+ } else {
|
|
|
1753
|
+ _addEv2Cookies(trackType, input, action, label, value);
|
|
|
1754
|
+ }
|
|
|
1755
|
+ };
|
|
|
1756
|
+ function _addEv2Cookies(trackType, input, action, label, value) {
|
|
|
1757
|
+ var ev = cookies('_yasev');
|
|
|
1758
|
+ if (ev) {
|
|
|
1759
|
+ ev += '&';
|
|
|
1760
|
+ } else {
|
|
|
1761
|
+ ev = '';
|
|
|
1762
|
+ }
|
|
|
1763
|
+ cookies('_yasev', ev + 'vd=' + custInfo.vd + '&t=' + trackType + '&i=' + input + '&l=' + label + '&v=' + value, {
|
|
|
1764
|
+ path: '/',
|
|
|
1765
|
+ domain: yasDomain,
|
|
|
1766
|
+ expires: 365 * 200
|
|
|
1767
|
+ });
|
|
|
1768
|
+ evTimes++;
|
|
|
1769
|
+ }
|
|
|
1770
|
+ _yas.sendMouseEvent = function (e, flag) {
|
|
|
1771
|
+ e = e || window.event;
|
|
|
1772
|
+ var pos = getMouseEventPosition(e);
|
|
|
1773
|
+ if (!flag) {
|
|
|
1774
|
+ cookies('_yasmp', pos.x + ',' + pos.y + ',' + e.type, {
|
|
|
1775
|
+ path: '/',
|
|
|
1776
|
+ domain: yasDomain,
|
|
|
1777
|
+ expires: 365 * 200
|
|
|
1778
|
+ });
|
|
|
1779
|
+ } else {
|
|
|
1780
|
+ var mp = {
|
|
|
1781
|
+ x: pos.x,
|
|
|
1782
|
+ y: pos.y,
|
|
|
1783
|
+ et: e.type
|
|
|
1784
|
+ };
|
|
|
1785
|
+ var info = util.merge(appInfo, custInfo);
|
|
|
1786
|
+ info = util.merge(info, browserInfo);
|
|
|
1787
|
+ info = util.merge(info, mp);
|
|
|
1788
|
+ var param = util.genParam(info);
|
|
|
1789
|
+ cross.imgSend(param, function () {
|
|
|
1790
|
+ });
|
|
|
1791
|
+ }
|
|
|
1792
|
+ };
|
|
|
1793
|
+ _yas.sendCustomInfo = function (json, flag) {
|
|
|
1794
|
+ if (!flag) {
|
|
|
1795
|
+ var string = JSON.stringify(json);
|
|
|
1796
|
+ cookies('_yascustjson', string, {
|
|
|
1797
|
+ path: '/',
|
|
|
1798
|
+ domain: yasDomain,
|
|
|
1799
|
+ expires: 365 * 200
|
|
|
1800
|
+ });
|
|
|
1801
|
+ } else {
|
|
|
1802
|
+ var info = util.merge(appInfo, custInfo);
|
|
|
1803
|
+ info = util.merge(info, browserInfo);
|
|
|
1804
|
+ info = util.merge(info, json);
|
|
|
1805
|
+ var param = util.genParam(info);
|
|
|
1806
|
+ cross.imgSend(param, function () {
|
|
|
1807
|
+ });
|
|
|
1808
|
+ }
|
|
|
1809
|
+ };
|
|
|
1810
|
+ exports = _yas;
|
|
|
1811
|
+ return exports;
|
|
|
1812
|
+}();
|
|
|
1813
|
+yas_jssdk_101363_yas_debug = function (exports) {
|
|
|
1814
|
+ var yasJssdk = yas_jssdk_101363_src_ya_debug;
|
|
|
1815
|
+ if (window.YohoAcquisitionObject) {
|
|
|
1816
|
+ var yas = window.YohoAcquisitionObject;
|
|
|
1817
|
+ if (window[yas].p) {
|
|
|
1818
|
+ yasJssdk.apply(this, window[yas].p);
|
|
|
1819
|
+ window[yas] = yasJssdk;
|
|
|
1820
|
+ }
|
|
|
1821
|
+ }
|
|
|
1822
|
+ exports = yasJssdk;
|
|
|
1823
|
+ return exports;
|
|
|
1824
|
+}();
|
|
|
1825
|
+}()); |