PageSourceSearch

https://proactivehomeservices.net/common/js/j/jquery.cookie.1906281604287.js

js proactivehomeservices.net collected 2026-09-29 17:00:59 UTC 3,215 bytes, 128 lines download raw bytes

1/// <reference path="jquery.js" />
2/// <reference path="../static.js" />
3
4/*
5 * jQuery Cookie Plugin v1.4.1
6 * https://github.com/carhartl/jquery-cookie
7 *
8 * Copyright 2006, 2014 Klaus Hartl
9 * Released under the MIT license
10 */
11
12if ( window.registerLoading ) {
13	registerLoading( "j/jquery.cookie" );
14}
15
16( function ( factory ) {
17	if ( typeof rrequire === "function" ) {
18		// CMS7 require function.
19		rrequire( ["j/jquery", "j/timezone", "static"], factory );
20	} else {
21
22		// Browser globals
23		factory( jQuery );
24	}
25}( function ( $ ) {
26
27	var pluses = /\+/g;
28
29	function encode( s ) {
30		return config.raw ? s : encodeURIComponent( s );
31	}
32
33	function decode( s ) {
34		return config.raw ? s : decodeURIComponent( s );
35	}
36
37	function stringifyCookieValue( value ) {
38		return Encode.Cookie( value, config.json );
39	}
40
41	function parseCookieValue( s ) {
42		return Decode.Cookie( s, config.json );
43	}
44
45	function read( s, converter ) {
46		var value = config.raw ? s : parseCookieValue( s );
47		return $.isFunction( converter ) ? converter( value ) : value;
48	}
49
50	var config = $.cookie = function ( key, value, options ) {
51
52		// Write
53
54		if ( arguments.length > 1 && !$.isFunction( value ) ) {
55			options = $.extend( {}, config.defaults, options );
56
57			// If we're setting a null value, treat it as a 'remove'.
58			if ( value === null ) {
59				options.expires = -1;
60			}
61
62			if ( typeof options.expires === 'number' ) {
63				var days = options.expires, t = options.expires = new Date();
64				t.setMilliseconds( t.getMilliseconds() + days * 864e+5 );
65			}
66
67			return ( document.cookie = [
68				encode( key ), '=', stringifyCookieValue( value ),
69				options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
70				options.path ? '; path=' + options.path : '',
71				options.domain ? '; domain=' + options.domain : '',
72				options.secure ? '; secure' : ''
73			].join( '' ) );
74		}
75
76		// Read
77
78		var result = key ? undefined : {},
79			// To prevent the for loop in the first place assign an empty array
80			// in case there are no cookies at all. Also prevents odd result when
81			// calling $.cookie().
82			cookies = document.cookie ? document.cookie.split( '; ' ) : [],
83			i = 0,
84			l = cookies.length;
85
86		for ( ; i < l; i++ ) {
87			var parts = cookies[i].split( '=' ),
88				name = decode( parts.shift() ),
89				cookie = parts.join( '=' );
90
91			if ( key === name ) {
92				// If second argument (value) is a function it's a converter...
93				result = read( cookie, value );
94				break;
95			}
96
97			// Prevent storing a cookie that we couldn't decode.
98			if ( !key && ( cookie = read( cookie ) ) !== undefined ) {
99				result[name] = cookie;
100			}
101		}
102
103		return result;
104	};
105
106	config.defaults = { path: '/' };
107
108	$.removeCookie = function ( key, options ) {
109		// Must not alter options, thus extending a fresh object...
110		$.cookie( key, '', $.extend( {}, options, { expires: -1 } ) );
111		return !$.cookie( key );
112	};
113
114	// CMS7 ensure we have a time zone set.
115	if ( $.cookie( '_tz' ) === undefined ) {
116		$.cookie(
117			'_tz',
118			jstz.determine().name() || "",
119			{ expires: 365, path: '/' }
120		);
121	}
122
123	// CMS7 register script.
124	if ( window.register ) {
125		window.register( "j/jquery.cookie" );
126	}
127
128} ) );

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.