From b059ac46e0bdb1479f103bd64e3f0cfe23d9cfe0 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar <glo17680@adobe.com> Date: Tue, 10 Oct 2023 15:49:43 +0530 Subject: [PATCH] AC-9696:Upgade js-cookie/js.cookie.js dependency (v3.0.5) to the latest version --- lib/web/js-cookie/js.cookie.js | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/web/js-cookie/js.cookie.js b/lib/web/js-cookie/js.cookie.js index 8e734a3f5f672..5381aa18bbc4d 100644 --- a/lib/web/js-cookie/js.cookie.js +++ b/lib/web/js-cookie/js.cookie.js @@ -1,14 +1,14 @@ -/*! js-cookie v3.0.1 | MIT */ +/*! js-cookie v3.0.5 | MIT */ ; (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : - (global = global || self, (function () { + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () { var current = global.Cookies; var exports = global.Cookies = factory(); exports.noConflict = function () { global.Cookies = current; return exports; }; - }())); -}(this, (function () { 'use strict'; + })()); +})(this, (function () { 'use strict'; /* eslint-disable no-var */ function assign (target) { @@ -42,7 +42,7 @@ /* eslint-disable no-var */ function init (converter, defaultAttributes) { - function set (key, value, attributes) { + function set (name, value, attributes) { if (typeof document === 'undefined') { return } @@ -56,7 +56,7 @@ attributes.expires = attributes.expires.toUTCString(); } - key = encodeURIComponent(key) + name = encodeURIComponent(name) .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent) .replace(/[()]/g, escape); @@ -83,11 +83,11 @@ } return (document.cookie = - key + '=' + converter.write(value, key) + stringifiedAttributes) + name + '=' + converter.write(value, name) + stringifiedAttributes) } - function get (key) { - if (typeof document === 'undefined' || (arguments.length && !key)) { + function get (name) { + if (typeof document === 'undefined' || (arguments.length && !name)) { return } @@ -100,25 +100,25 @@ var value = parts.slice(1).join('='); try { - var foundKey = decodeURIComponent(parts[0]); - jar[foundKey] = converter.read(value, foundKey); + var found = decodeURIComponent(parts[0]); + jar[found] = converter.read(value, found); - if (key === foundKey) { + if (name === found) { break } } catch (e) {} } - return key ? jar[key] : jar + return name ? jar[name] : jar } return Object.create( { - set: set, - get: get, - remove: function (key, attributes) { + set, + get, + remove: function (name, attributes) { set( - key, + name, '', assign({}, attributes, { expires: -1 @@ -144,4 +144,4 @@ return api; -}))); +}));