1/** 2* DO NOT EDIT THIS FILE. 3* See the following change record for more information, 4* https://www.drupal.org/node/2815083 5* @preserve 6**/ 7function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } 8function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } 9function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } 10function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } 11function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } 12function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } 13(function ($, Drupal, cookies) { 14 var deprecatedMessageSuffix = "is deprecated in Drupal 9.0.0 and will be removed in Drupal 10.0.0. Use the core/js-cookie library instead. See https://www.drupal.org/node/3104677"; 15 var isFunction = function isFunction(obj) { 16 return Object.prototype.toString.call(obj) === '[object Function]'; 17 }; 18 var parseCookieValue = function parseCookieValue(value, parseJson) { 19 if (value.indexOf('"') === 0) { 20 value = value.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 21 } 22 try { 23 value = decodeURIComponent(value.replace(/\+/g, ' ')); 24 return parseJson ? JSON.parse(value) : value; 25 } catch (e) {} 26 }; 27 var reader = function reader(cookieValue, cookieName, converter, readUnsanitized, parseJson) { 28 var value = readUnsanitized ? cookieValue : parseCookieValue(cookieValue, parseJson); 29 if (converter !== undefined && isFunction(converter)) { 30 return converter(value, cookieName); 31 } 32 return value; 33 }; 34 $.cookie = function (key) { 35 var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; 36 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined; 37 Drupal.deprecationError({ 38 message: "jQuery.cookie() ".concat(deprecatedMessageSuffix) 39 }); 40 if (value !== undefined && !isFunction(value)) { 41 var attributes = _objectSpread(_objectSpread({}, $.cookie.defaults), options); 42 if (typeof attributes.expires === 'string' && attributes.expires !== '') { 43 attributes.expires = new Date(attributes.expires); 44 } 45 var cookieSetter = cookies.withConverter({ 46 write: function write(cookieValue) { 47 return encodeURIComponent(cookieValue); 48 } 49 }); 50 value = $.cookie.json && !$.cookie.raw ? JSON.stringify(value) : String(value); 51 return cookieSetter.set(key, value, attributes); 52 } 53 var userProvidedConverter = value; 54 var cookiesShim = cookies.withConverter({ 55 read: function read(cookieValue, cookieName) { 56 return reader(cookieValue, cookieName, userProvidedConverter, $.cookie.raw, $.cookie.json); 57 } 58 }); 59 if (key !== undefined) { 60 return cookiesShim.get(key); 61 } 62 var results = cookiesShim.get();
63 Object.keys(results).forEach(function (resultKey) { 64 if (results[resultKey] === undefined) { 65 delete results[resultKey]; 66 } 67 }); 68 return results; 69 }; 70 $.cookie.defaults = _objectSpread({ 71 path: '' 72 }, cookies.defaults); 73 $.cookie.json = false; 74 $.cookie.raw = false; 75 $.removeCookie = function (key, options) { 76 Drupal.deprecationError({ 77 message: "jQuery.removeCookie() ".concat(deprecatedMessageSuffix) 78 }); 79 cookies.remove(key, _objectSpread(_objectSpread({}, $.cookie.defaults), options)); 80 return !cookies.get(key); 81 }; 82})(jQuery, Drupal, window.Cookies);
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.