{I" class:ETI"ProcessedAsset;FI"logical_path;TI"admin/cookie.js;FI" pathname;TI"m/Users/brittanymartin/.rvm/gems/ruby-2.1.5/gems/trusty-cms-2.0.20/app/assets/javascripts/admin/cookie.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+ €WI" length;Ti I" digest;TI"%9c2b3b833af1893952f78f15723b2224;FI" source;TI" /* cookie.js Copyright (c) 2007, 2008 Maxime Haineault (http://www.haineault.com/code/cookie-js/, http://code.google.com/p/cookie-js/) Portions Copyright (c) 2008, John W. Long Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ Cookie = { get: function(name) { // Still not sure that "[a-zA-Z0-9.()=|%/]+($|;)" match *all* allowed characters in cookies tmp = document.cookie.match((new RegExp(name +'=[a-zA-Z0-9.()=|%/]+($|;)','g'))); if (!tmp || !tmp[0]) { return null; } else { return unescape(tmp[0].substring(name.length + 1, tmp[0].length).replace(';', '')) || null; } }, set: function(name, value, expireInHours, path, domain, secure) { var cookie = [ name + '=' + escape(value), 'path=' + ((!path || path == '') ? '/' : path) ]; if (Cookie._notEmpty(domain)) cookie.push('domain=' + domain); if (Cookie._notEmpty(expireInHours)) cookie.push(Cookie._hoursToExpireDate(expireInHours)); if (Cookie._notEmpty(secure)) cookie.push('secure'); return document.cookie = cookie.join(';'); }, erase: function(name, path, domain) { path = (!path || typeof path != 'string') ? '' : path; domain = (!domain || typeof domain != 'string') ? '' : domain; if (Cookie.get(name)) Cookie.set(name, '', 'Thu, 01-Jan-70 00:00:01 GMT', path, domain); }, // Returns true if cookies are enabled accept: function() { Cookie.set('b49f729efde9b2578ea9f00563d06e57', 'true'); if (Cookie.get('b49f729efde9b2578ea9f00563d06e57') == 'true') { Cookie.erase('b49f729efde9b2578ea9f00563d06e57'); return true; } return false; }, _notEmpty: function(value) { return (typeof value != 'undefined' && value != null && value != ''); }, // Private function for calculating the date of expiration based on hours _hoursToExpireDate: function(hours) { if (parseInt(hours) == 'NaN' ) return ''; else { now = new Date(); now.setTime(now.getTime() + (parseInt(hours) * 60 * 60 * 1000)); return now.toGMTString(); } } }; ;TI"dependency_digest;TI"%eee592d85a69e8294b0d5a6bd311f80f;FI"required_paths;T[I"m/Users/brittanymartin/.rvm/gems/ruby-2.1.5/gems/trusty-cms-2.0.20/app/assets/javascripts/admin/cookie.js;FI"dependency_paths;T[{I" path;TI"m/Users/brittanymartin/.rvm/gems/ruby-2.1.5/gems/trusty-cms-2.0.20/app/assets/javascripts/admin/cookie.js;FI" mtime;TI"2016-04-04T10:54:05-04:00;TI" digest;TI"%fd7f858204b7ea054cef05b1b7602e22;FI" _version;TI"%5dbb392182285b4042e11c847d2199ba;F