PageSourceSearch

https://ete.auron.com/wp-content/plugins/woo-product-filter/js/common.js?ver=1.5.1

js auron.com collected 2026-09-25 05:51:01 UTC 26,165 bytes, 679 lines download raw bytes

1"use strict";
2jQuery.fn.nextInArray = function(element) {
3    var nextId = 0;
4    for(var i = 0; i < this.length; i++) {
5        if(this[i] == element) {
6            nextId = i + 1;
7            break;
8        }
9    }
10    if(nextId > this.length-1)
11        nextId = 0;
12    return this[nextId];
13}
14jQuery.fn.clearForm = function() {
15	return this.each(function() {
16		var type = this.type, tag = this.tagName.toLowerCase();
17		if (tag == 'form')
18			return jQuery(':input', this).clearForm();
19		if (type == 'text' || type == 'password' || tag == 'textarea')
20			this.value = '';
21		else if (type == 'checkbox' || type == 'radio')
22			this.checked = false;
23		else if (tag == 'select') 
24			this.selectedIndex = -1;
25	});
26}
27jQuery.fn.tagName = function() {
28	var name = '';
29	if ( this.get(0) && this.get(0).tagName) {
30		name = this.get(0).tagName;
31	}
32
33	return name;
34}
35jQuery.fn.exists = function(){
36	return (jQuery(this).length > 0 ? true : false);
37}
38function isNumber(val) {
39	return /^\d+/.test(val);
40}
41function pushDataToParam(data, pref) {
42	pref = pref ? pref : '';
43	var res = [];
44	for(var key in data) {
45		var name = pref && pref != '' ? pref+ '['+ key+ ']' : key;
46		if(typeof(data[key]) === 'array' || typeof(data[key]) === 'object') {
47			res = jQuery.merge(res, pushDataToParam(data[key], name));
48		} else {
49			res.push(name+ "="+ data[key]);
50		}
51	}
52	return res;
53}
54jQuery.fn.serializeAnythingWpf = function(addData, returnArray) {
55    var toReturn = returnArray ? {} : []
56    ,	els = jQuery(this).find(':input').get();
57    jQuery.each(els, function() {
58    	var filter = jQuery(this).closest('#row-tab-filters'); 
59        if ((typeof(filter) == 'undefined' || filter.length == 0) &&
60        	 this.name && !this.disabled && (/select|textarea/i.test(this.nodeName) || /checkbox|text|number|hidden|password/i.test(this.type))) {
61            var val = jQuery(this).val();
62        	if(this.type == 'checkbox' && !this.checked) {
63        		val = 0;
64        	}
65			if(returnArray) {
66				toReturn[ this.name ] = val;
67			} else
68				toReturn.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( val ) );
69        }
70    });
71    if(typeof(addData) != 'undefined' && addData) {
72		toReturn = jQuery.merge(toReturn, pushDataToParam(addData));
73    }
74    return returnArray ? toReturn : toReturn.join("&").replace(/%20/g, "+");
75};
76jQuery.fn.serializeAssoc = function() {
77	var data = [ ];
78	jQuery.each( this.serializeArray(), function( key, obj ) {
79		var a = obj.name.match(/(.*?)\[(.*?)\]/);
80		if(a !== null) {
81			var subName = a[1];
82			var subKey = a[2];
83			if( !data[subName] ) data[subName] = [ ];
84			if( data[subName][subKey] ) {
85				if( jQuery.isArray( data[subName][subKey] ) ) {
86					data[subName][subKey].push( obj.value );
87				} else {
88					data[subName][subKey] = [ ];
89					data[subName][subKey].push( obj.value );
90				}
91			} else {
92				data[subName][subKey] = obj.value;
93			}
94		} else {
95			if( data[obj.name] ) {
96				if( jQuery.isArray( data[obj.name] ) ) {
97					data[obj.name].push( obj.value );
98				} else {
99					data[obj.name] = [ ];
100					data[obj.name].push( obj.value );
101				}
102			} else {
103				data[obj.name] = obj.value;
104			}
105		}
106	});
107	return data;
108};
109jQuery.fn.serializeObject = function(){
110	var obj = {};
111
112	jQuery.each( this.serializeArray(), function(i,o){
113		var n = o.name,
114			v = o.value;
115
116		obj[n] = obj[n] === undefined ? v
117			: jQuery.isArray( obj[n] ) ? obj[n].concat( v )
118				: [ obj[n], v ];
119	});
120
121	return obj;
122};
123function str_replace(haystack, needle, replacement) { 
124	var temp = haystack.split(needle); 
125	return temp.join(replacement); 
126}
127// Dublicate prev function - to avoid some conflicts with other plugins, used str_replace func name
128function wpf_str_replace(haystack, needle, replacement) { 
129	var temp = haystack.split(needle); 
130	return temp.join(replacement); 
131}
132/**
133 * @see php html::nameToClassId($name) method
134 **/
135function nameToClassId(name) {
136    return str_replace(
137        str_replace(name, ']', ''), 
138            '[', ''
139    );
140}
141function strpos( haystack, needle, offset){
142    var i = haystack.indexOf( needle, offset ); // returns -1
143    return i >= 0 ? i : false;
144}
145function extend(Child, Parent) {
146    var F = function() { };
147    F.prototype = Parent.prototype;
148    Child.prototype = new F();
149    Child.prototype.constructor = Child;
150    Child.superclass = Parent.prototype;
151}
152function toeRedirect(url, newWnd) {
153	if(newWnd) {
154		var win = window.open(url, '_blank');
155		if(win) {
156			win.focus();
157		} else	// Browser blocked new window showing
158			document.location.href = url;
159	} else {
160		document.location.href = url;
161	}
162}
163function toeReload(url) {
164	if(url)
165		toeRedirect(url);
166    document.location.reload();
167}
168jQuery.fn.toeRebuildSelect = function(data, useIdAsValue, val) {
169    if(jQuery(this).tagName() == 'SELECT' && typeof(data) == 'object') {
170        if(jQuery(data).length > 0) {
171            if(typeof(val) == 'undefined')
172                val = false;
173            if(jQuery(this).children('option').length) {
174                jQuery(this).children('option').remove();
175            }
176            if(typeof(useIdAsValue) == 'undefined')
177                useIdAsValue = false;
178            var selected = '';
179            for(var id in data) {
180                selected = '';
181                if(val && ((useIdAsValue && id == val) || (data[id] == val)))
182                    selected = 'selected';
183                jQuery(this).append('<option value="'+ (useIdAsValue ? id : data[id])+ '" '+ selected+ '>'+ data[id]+ '</option>');
184            }
185        }
186    }
187}
188/**
189 * We will not use just jQUery.inArray because it is work incorrect for objects
190 * @return mixed - key that was found element or -1 if not
191 */
192function toeInArray(needle, haystack) {
193    if(typeof(haystack) == 'object') {
194        for(var k in haystack) {
195            if(haystack[ k ] == needle)
196                return k;
197        }
198    } else if(typeof(haystack) == 'array') {
199        return jQuery.inArray(needle, haystack);
200    }
201    return -1;
202}
203jQuery.fn.setReadonly = function() {
204	jQuery(this).addClass('toeReadonly').attr('readonly', 'readonly');
205}
206jQuery.fn.unsetReadonly = function() {
207	jQuery(this).removeClass('toeReadonly').removeAttr('readonly', 'readonly');
208}
209jQuery.fn.getClassId = function(pref, test) {
210	var classId = jQuery(this).attr('class');
211	classId = classId.substr( strpos(classId, pref+ '_') );
212	if(strpos(classId, ' '))
213		classId = classId.substr( 0, strpos(classId, ' ') );
214	classId = classId.split('_');
215	classId = classId[1];
216	return classId;
217}
218function toeTextIncDec(textFieldId, inc) {
219	var value = parseInt(jQuery('#'+ textFieldId).val());
220	if(isNaN(value))
221		value = 0;
222	if(!(inc < 0 && value < 1)) {
223		value += inc;
224	}
225	jQuery('#'+ textFieldId).val(value);
226}
227
228/**
229 * Make first letter of string in upper case
230 * @param str string - string to convert
231 * @return string converted string - first letter in upper case
232 */
233function toeStrFirstUp(str) {
234	str += '';
235	var f = str.charAt(0).toUpperCase();
236	return f + str.substr(1);
237}
238function parseStr (str, array) {
239  // http://kevin.vanzonneveld.net
240  // +   original by: Cagri Ekin
241  // +   improved by: Michael White (http://getsprink.com)
242  // +    tweaked by: Jack
243  // +   bugfixed by: Onno Marsman
244  // +   reimplemented by: stag019
245  // +   bugfixed by: Brett Zamir (http://brett-zamir.me)
246  // +   bugfixed by: stag019
247  // +   input by: Dreamer
248  // +   bugfixed by: Brett Zamir (http://brett-zamir.me)
249  // +   bugfixed by: MIO_KODUKI (http://mio-koduki.blogspot.com/)
250  // +   input by: Zaide (http://zaidesthings.com/)
251  // +   input by: David Pesta (http://davidpesta.com/)
252  // +   input by: jeicquest
253  // +   improved by: Brett Zamir (http://brett-zamir.me)
254  // %        note 1: When no argument is specified, will put variables in global scope.
255  // %        note 1: When a particular argument has been passed, and the returned value is different parse_str of PHP. For example, a=b=c&d====c
256  // *     example 1: var arr = {};
257  // *     example 1: parse_str('first=foo&second=bar', arr);
258  // *     results 1: arr == { first: 'foo', second: 'bar' }
259  // *     example 2: var arr = {};
260  // *     example 2: parse_str('str_a=Jack+and+Jill+didn%27t+see+the+well.', arr);
261  // *     results 2: arr == { str_a: "Jack and Jill didn't see the well." }
262  // *     example 3: var abc = {3:'a'};
263  // *     example 3: parse_str('abc[a][b]["c"]=def&abc[q]=t+5');
264  // *     results 3: JSON.stringify(abc) === '{"3":"a","a":{"b":{"c":"def"}},"q":"t 5"}';
265	var strArr = String(str).replace(/^&/, '').replace(/&$/, '').split('&'),
266	sal = strArr.length,
267	i, j, ct, p, lastObj, obj, lastIter, undef, chr, tmp, key, value,
268	postLeftBracketPos, keys, keysLen,
269	fixStr = function (str) {
270		return decodeURIComponent(str.replace(/\+/g, '%20'));
271	};
272	if (!array) {
273		array = {};
274	}
275
276	for (i = 0; i < sal; i++) {
277		tmp = strArr[i].split('=');
278		key = fixStr(tmp[0]);
279		value = (tmp.length < 2) ? '' : fixStr(tmp[1]);
280
281		while (key.charAt(0) === ' ') {
282			key = key.slice(1);
283		}
284		if (key.indexOf('\x00') > -1) {
285			key = key.slice(0, key.indexOf('\x00'));
286		}
287		if (key && key.charAt(0) !== '[') {
288			keys = [];
289			postLeftBracketPos = 0;
290			for (j = 0; j < key.length; j++) {
291				if (key.charAt(j) === '[' && !postLeftBracketPos) {
292					postLeftBracketPos = j + 1;
293				} else if (key.charAt(j) === ']') {
294					if (postLeftBracketPos) {
295						if (!keys.length) {
296							keys.push(key.slice(0, postLeftBracketPos - 1));
297						}
298						keys.push(key.substr(postLeftBracketPos, j - postLeftBracketPos));
299						postLeftBracketPos = 0;
300						if (key.charAt(j + 1) !== '[') {
301							break;
302						}
303					}
304				}
305			}
306			if (!keys.length) {
307				keys = [key];
308			}
309			for (j = 0; j < keys[0].length; j++) {
310				chr = keys[0].charAt(j);
311				if (chr === ' ' || chr === '.' || chr === '[') {
312					keys[0] = keys[0].substr(0, j) + '_' + keys[0].substr(j + 1);
313				}
314				if (chr === '[') {
315					break;
316				}
317			}
318
319			obj = array;
320			for (j = 0, keysLen = keys.length; j < keysLen; j++) {
321				key = keys[j].replace(/^['"]/, '').replace(/['"]$/, '');
322				lastIter = j !== keys.length - 1;
323				lastObj = obj;
324				if ((key !== '' && key !== ' ') || j === 0) {
325					if (obj[key] === undef) {
326						obj[key] = {};
327					}
328					obj = obj[key];
329				} else { // To insert new dimension
330					ct = -1;
331					for (p in obj) {
332						if (obj.hasOwnProperty(p)) {
333							if (+p > ct && p.match(/^\d+$/g)) {
334								ct = +p;
335							}
336						}
337					}
338					key = ct + 1;
339				}
340			}
341			lastObj[key] = value;
342		}
343	}
344	return array;
345}
346
347function toeListableWpf(params) {
348	this.params			= jQuery.extend({}, params);
349	this.table			= jQuery(this.params.table);
350	this.paging			= jQuery(this.params.paging);
351	this.perPage		= this.params.perPage;
352	this.list			= this.params.list;
353	this.count			= this.params.count;
354	this.page			= this.params.page;
355	this.pagingCallback	= this.params.pagingCallback;
356	var self			= this;
357	
358	this.draw = function(list, count) {
359		this.table.find('tr').not('.wpfExample, .wpfTblHeader').remove();
360		var exampleRow = this.table.find('.wpfExample');
361		for(var i in list) {
362			var newRow = exampleRow.clone();
363			for(var key in list[i]) {
364				var element = newRow.find('.'+ key);
365				if(element.length) {
366					var valueTo = element.attr('valueTo');
367					if(valueTo) {
368						var newValue = list[i][key];
369						var prevValue = element.attr(valueTo);
370						if(prevValue)
371							newValue = prevValue+ ' '+ newValue;
372						element.attr(valueTo, newValue);
373					} else
374						element.html(list[i][key]);
375				}
376			}
377			newRow.removeClass('wpfExample').show();
378			this.table.append(newRow);
379		}
380		if(this.paging) {
381			this.paging.html('');
382			if(count && count > list.length && this.perPage) {
383				for(var i = 1; i <= Math.ceil(count/this.perPage); i++) {
384					var newPageId = i-1
385					,	newElement = (newPageId == this.page) ? jQuery('<b/>') : jQuery('<a/>');
386					if(newPageId != this.page) {
387						newElement.attr('href', '#'+ newPageId)
388						.click(function(){
389							if(self.pagingCallback && typeof(self.pagingCallback) == 'function') {
390								self.pagingCallback(parseInt(jQuery(this).attr('href').replace('#', '')));
391								return false;
392							}
393						});
394					}
395					newElement.addClass('toePagingElement').html(i);
396					this.paging.append(newElement);
397					if(i%20 == 0 && i)
398						this.paging.append('<br />');
399				}
400			}
401		}
402	};
403	if(this.list)
404		this.draw(this.list, this.count);
405}
406
407function setCookieWpf(c_name, value, exdays) {
408	var exdate = new Date();
409	exdate.setDate(exdate.getDate() + exdays);
410	var value_prepared = '';
411	if(typeof(value) == 'array' || typeof(value) == 'object') {
412		value_prepared = '_JSON:'+ JSON.stringify( value );
413	} else {
414		value_prepared = value;
415	}
416	var c_value = escape(value_prepared)+ ((exdays==null) ? "" : "; expires="+exdate.toUTCString())+ '; path=/';
417	document.cookie = c_name+ "="+ c_value;
418}
419
420function getCookieWpf(name) {
421	var parts = document.cookie.split(name + "=");
422	if (parts.length == 2) {
423		var value = unescape(parts.pop().split(";").shift());
424		if(value.indexOf('_JSON:') === 0) {
425			value = JSON.parse(value.split("_JSON:").pop());
426		}
427		return value;
428	}
429	return null;
430}
431
432function delCookieWpf( name ) {
433  document.cookie = name+ '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
434}
435
436function callUserFuncArray(cb, parameters) {
437	// http://kevin.vanzonneveld.net
438	// +   original by: Thiago Mata (http://thiagomata.blog.com)
439	// +   revised  by: Jon Hohle
440	// +   improved by: Brett Zamir (http://brett-zamir.me)
441	// +   improved by: Diplom@t (http://difane.com/)
442	// +   improved by: Brett Zamir (http://brett-zamir.me)
443	// *     example 1: call_user_func_array('isNaN', ['a']);
444	// *     returns 1: true
445	// *     example 2: call_user_func_array('isNaN', [1]);
446	// *     returns 2: false
447	var func;
448
449	if (typeof cb === 'string') {
450		func = (typeof this[cb] === 'function') ? this[cb] : func = (new Function(null, 'return ' + cb))();
451	}
452	else if (Object.prototype.toString.call(cb) === '[object Array]') {
453		func = (typeof cb[0] == 'string') ? eval(cb[0] + "['" + cb[1] + "']") : func = cb[0][cb[1]];
454	}
455	else if (typeof cb === 'function') {
456		func = cb;
457	}
458
459	if (typeof func !== 'function') {
460		throw new Error(func + ' is not a valid function');
461	}
462
463	return (typeof cb[0] === 'string') ? func.apply(eval(cb[0]), parameters) : (typeof cb[0] !== 'object') ? func.apply(null, parameters) : func.apply(cb[0], parameters);
464}
465jQuery.fn.scrollWidth = function() {
466	var inner = document.createElement('p');
467	inner.style.width = "100%";
468	inner.style.height = "200px";
469
470	var outer = document.createElement('div');
471	outer.style.position = "absolute";
472	outer.style.top = "0px";
473	outer.style.left = "0px";
474	outer.style.visibility = "hidden";
475	outer.style.width = "200px";
476	outer.style.height = "150px";
477	outer.style.overflow = "hidden";
478	outer.appendChild (inner);
479
480	document.body.appendChild (outer);
481	var w1 = inner.offsetWidth;
482	outer.style.overflow = 'scroll';
483	var w2 = inner.offsetWidth;
484	if (w1 == w2) w2 = outer.clientWidth;
485
486	document.body.removeChild (outer);
487
488	return (w1 - w2);
489};
490/**
491 * Retrive worwpfess attach ID from image, using img classes
492 * @param {htmlObj} img Image to get ID from
493 */
494function toeGetImgAttachId(img) {
495	var classesStr = jQuery(img).attr('class')
496	,	aid = 0;
497	if(classesStr && classesStr != '') {
498		var matches = classesStr.match(/wp-image-(\d+)/);
499		if(matches && matches[1]) {
500			aid = parseInt(matches[1]);
501		}
502	}
503	return aid;
504}
505function toeGetHashParams() {
506	var hashArr = window.location.hash.split('#')
507	,	res = [];
508	for(var i in hashArr) {
509		if(hashArr[i] && hashArr[i] != '') {
510			res.push(hashArr[i]);
511		}
512	}
513	return res;
514}
515/**
516 * Retrive GET data from request
517 * @param {string} key Retrive only specified variable from GET array
518 * @returns {mixed} GET parameter or whole GET object
519 */
520function getDataLcs( key ) {
521	if(typeof(this) == 'undefined') return '';
522	this.data, this.dataChecked;
523	if(!this.dataChecked) {
524		if(window.location.search) {
525			this.data = parseStr( window.location.search.substr(1) );	//.substr(1) is to remove "?" sign from query string
526		}
527		this.dataChecked = true;
528	}
529	return typeof(key) !== 'undefined' && this.data ? this.data[ key ] : this.data;
530}
531/*Replace text in DOM functions*/
532// Reusable generic function
533function traverseElement(el, regex, textReplacerFunc, to) {
534    // script and style elements are left alone
535    if (!/^(script|style)$/.test(el.tagName)) {
536        var child = el.lastChild;
537        while (child) {
538            if (child.nodeType == 1) {
539                traverseElement(child, regex, textReplacerFunc, to);
540            } else if (child.nodeType == 3) {
541                textReplacerFunc(child, regex, to);
542            }
543            child = child.previousSibling;
544        }
545    }
546}
547
548// This function does the replacing for every matched piece of text
549// and can be customized to do what you like
550function textReplacerFunc(textNode, regex, to) {
551	textNode.data = textNode.data.replace(regex, to);
552}
553
554// The main function
555function replaceWords(html, words) {
556    var container = document.createElement("div");
557    container.innerHTML = html;
558
559    // Replace the words one at a time to ensure each one gets matched
560	for(var replace in words) {
561		traverseElement(container, new RegExp(replace, "g"), textReplacerFunc, words[ replace ]);
562	}
563    return container.innerHTML;
564}
565/*****/
566function toeSelectText(element) {
567    var doc = document
568	,	text = jQuery(element).get(0)
569	,	range, selection;    
570    if (doc.body.createTextRange) { //ms
571        range = doc.body.createTextRange();
572        range.moveToElementText(text);
573        range.select();
574    } else if (window.getSelection) { //all others
575        selection = window.getSelection();        
576        range = doc.createRange();
577        range.selectNodeContents(text);
578        selection.removeAllRanges();
579        selection.addRange(range);
580    }
581}
582jQuery.fn.animationDuration = function(seconds, isMili) {
583	if(isMili) {
584		seconds = parseFloat(seconds) / 1000;
585	}
586	var secondsStr = seconds+ 's';
587	return jQuery(this).css({
588		'webkit-animation-duration': secondsStr
589	,	'-moz-animation-duration': secondsStr
590	,	'-o-animation-duration': secondsStr
591	,	'animation-duration': secondsStr
592	});
593};
594/**
595 * Convert Date string (in common - mm/dd/yyyy) - to miliseconds
596 * @param {string} strDate date string
597 * @return {int} miliseconds
598 */
599function wpfStrToMs(strDate) {
600	var dateHours = strDate.split(' ');
601	if(dateHours.length == 2) {
602		strDate = dateHours[0]+ ' ';
603		var hms = dateHours[1].split(':');
604		
605		for(var i = 0; i < 3; i++) {
606			strDate += hms[ i ] ? hms[ i ] : '00';
607			if(i < 2)
608				strDate += ':';
609		}
610	}
611	var date = new Date( str_replace(strDate, '-', '/') )
612	,	res = 0;
613	if(date) {
614		res = date.getTime();
615	}
616	return res;
617}
618// Simulates PHP's date function
619Date.prototype.format=function(e){var t="";var n=Date.replaceChars;for(var r=0;r<e.length;r++){var i=e.charAt(r);if(r-1>=0&&e.charAt(r-1)=="\\"){t+=i}else if(n[i]){t+=n[i].call(this)}else if(i!="\\"){t+=i}}return t};Date.replaceChars={shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
619ay","Saturday"],d:function(){return(this.getDate()<10?"0":"")+this.getDate()},D:function(){return Date.replaceChars.shortDays[this.getDay()]},j:function(){return this.getDate()},l:function(){return Date.replaceChars.longDays[this.getDay()]},N:function(){return this.getDay()+1},S:function(){return this.getDate()%10==1&&this.getDate()!=11?"st":this.getDate()%10==2&&this.getDate()!=12?"nd":this.getDate()%10==3&&this.getDate()!=13?"rd":"th"},w:function(){return this.getDay()},z:function(){var e=new Date(this.getFullYear(),0,1);return Math.ceil((this-e)/864e5)},W:function(){var e=new Date(this.getFullYear(),0,1);return Math.ceil(((this-e)/864e5+e.getDay()+1)/7)},F:function(){return Date.replaceChars.longMonths[this.getMonth()]},m:function(){return(this.getMonth()<9?"0":"")+(this.getMonth()+1)},M:function(){return Date.replaceChars.shortMonths[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){var e=new Date;return(new Date(e.getFullYear(),e.getMonth(),0)).getDate()},L:function(){var e=this.getFullYear();return e%400==0||e%100!=0&&e%4==0},o:function(){var e=new Date(this.valueOf());e.setDate(e.getDate()-(this.getDay()+6)%7+3);return e.getFullYear()},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).substr(2)},a:function(){return this.getHours()<12?"am":"pm"},A:function(){return this.getHours()<12?"AM":"PM"},B:function(){return Math.floor(((this.getUTCHours()+1)%24+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)*1e3/24)},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){return((this.getHours()%12||12)<10?"0":"")+(this.getHours()%12||12)},H:function(){return(this.getHours()<10?"0":"")+this.getHours()},i:function(){return(this.getMinutes()<10?"0":"")+this.getMinutes()},s:function(){return(this.getSeconds()<10?"0":"")+this.getSeconds()},u:function(){var e=this.getMilliseconds();return(e<10?"00":e<100?"0":"")+e},e:function(){return"Not Yet Supported"},I:function(){var e=null;for(var t=0;t<12;++t){var n=new Date(this.getFullYear(),t,1);var r=n.getTimezoneOffset();if(e===null)e=r;else if(r<e){e=r;break}else if(r>e)break}return this.getTimezoneOffset()==e|0},O:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+"00"},P:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+":00"},T:function(){var e=this.getMonth();this.setMonth(0);var t=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,"$1");this.setMonth(e);return t},Z:function(){return-this.getTimezoneOffset()*60},c:function(){return this.format("Y-m-d\\TH:i:sP")},r:function(){return this.toString()},U:function(){return this.getTime()/1e3}}
620/*
621 * Check if device is mobile or table
622 */
623function isMobileWpf() {
624	var isMobile = false; //initiate as false
625	// device detection
626	if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) 
627		|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.
627substr(0,4))) 
628		isMobile = true;
629	return isMobile;
630}
631function isNumericWpf(n) {
632	if(jQuery.isNumeric)
633		return jQuery.isNumeric( n );
634	return !isNaN(parseFloat(n)) && isFinite(n);
635}
636function disableScrollWpf( element ) {
637	var $element = jQuery( element );
638	$element
639		.data('prev-overflow', $element.css('overflow'))	// Save prev overflow param - to restore it after PopUp close
640		.css('overflow', 'hidden');
641}
642function enableScrollWpf( element ) {
643	var $element = jQuery( element );
644	var prevOverflow = $element.data('prev-overflow');
645	if(!prevOverflow || prevOverflow == '') {
646		prevOverflow = 'visible';
647	}
648	$element.css('overflow', prevOverflow);
649}
650function randWpf( min, max, returnFloat ) {
651	var rand = (Math.random() * (max - min)) + min;
652	return returnFloat ? rand : Math.round( rand );
653}
654jQuery.fn.removeStyle = function(style) {
655	var search = new RegExp(style + '[^;]+;?', 'g');
656
657	return this.each(function()
658	{
659		jQuery(this).attr('style', function(i, style)
660		{
661			return style && style.replace(search, '');
662		});
663	});
664};
665function stripslashes (str) {
666	return (str + '')
667		.replace(/\\(.?)/g, function (s, n1) {
668			switch (n1) {
669				case '\\':
670					return '\\';
671				case '0':
672					return '\u0000';
673				case '':
674					return '';
675				default:
676					return n1
677			}
678		});
679}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.