{"ScriptPreparationCode":"var json = typeof JSON !== \u0027undefined\u0027 ? JSON : console.error(\u0022JSON SUPPORT REQUIRED\u0022);\r\n\r\nvar isArray = Array.isArray || function (x) {\r\n\treturn {}.toString.call(x) === \u0027[object Array]\u0027;\r\n};\r\n\r\nvar objectKeys = Object.keys || function (obj) {\r\n\tvar has = Object.prototype.hasOwnProperty || function () { return true; };\r\n\tvar keys = [];\r\n\tfor (var key in obj) {\r\n\t\tif (has.call(obj, key)) { keys.push(key); }\r\n\t}\r\n\treturn keys;\r\n};\r\n\r\nfunction jsonStableStringify(obj, opts) {\r\n\tif (!opts) { opts = {}; }\r\n\tif (typeof opts === \u0027function\u0027) { opts = { cmp: opts }; }\r\n\tvar space = opts.space || \u0027\u0027;\r\n\tif (typeof space === \u0027number\u0027) { space = Array(space \u002B 1).join(\u0027 \u0027); }\r\n\tvar cycles = typeof opts.cycles === \u0027boolean\u0027 ? opts.cycles : false;\r\n\tvar replacer = opts.replacer || function (key, value) { return value; };\r\n\r\n\tvar cmp = opts.cmp \u0026\u0026 (function (f) {\r\n\t\treturn function (node) {\r\n\t\t\treturn function (a, b) {\r\n\t\t\t\tvar aobj = { key: a, value: node[a] };\r\n\t\t\t\tvar bobj = { key: b, value: node[b] };\r\n\t\t\t\treturn f(aobj, bobj);\r\n\t\t\t};\r\n\t\t};\r\n\t}(opts.cmp));\r\n\r\n\tvar seen = [];\r\n\treturn (function stringify(parent, key, node, level) {\r\n\t\tvar indent = space ? \u0027\\n\u0027 \u002B new Array(level \u002B 1).join(space) : \u0027\u0027;\r\n\t\tvar colonSeparator = space ? \u0027: \u0027 : \u0027:\u0027;\r\n\r\n\t\tif (node \u0026\u0026 node.toJSON \u0026\u0026 typeof node.toJSON === \u0027function\u0027) {\r\n\t\t\tnode = node.toJSON();\r\n\t\t}\r\n\r\n\t\tnode = replacer.call(parent, key, node);\r\n\r\n\t\tif (node === undefined) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (typeof node !== \u0027object\u0027 || node === null) {\r\n\t\t\treturn json.stringify(node);\r\n\t\t}\r\n\t\tif (isArray(node)) {\r\n\t\t\tvar out = [];\r\n\t\t\tfor (var i = 0; i \u003C node.length; i\u002B\u002B) {\r\n\t\t\t\tvar item = stringify(node, i, node[i], level \u002B 1) || json.stringify(null);\r\n\t\t\t\tout.push(indent \u002B space \u002B item);\r\n\t\t\t}\r\n\t\t\treturn \u0027[\u0027 \u002B out.join(\u0027,\u0027) \u002B indent \u002B \u0027]\u0027;\r\n\t\t}\r\n\r\n\t\tif (seen.indexOf(node) !== -1) {\r\n\t\t\tif (cycles) { return json.stringify(\u0027__cycle__\u0027); }\r\n\t\t\tthrow new TypeError(\u0027Converting circular structure to JSON\u0027);\r\n\t\t} else { seen.push(node); }\r\n\r\n\t\tvar keys = objectKeys(node).sort(cmp \u0026\u0026 cmp(node));\r\n\t\tvar out = [];\r\n\t\tfor (var i = 0; i \u003C keys.length; i\u002B\u002B) {\r\n\t\t\tvar key = keys[i];\r\n\t\t\tvar value = stringify(node, key, node[key], level \u002B 1);\r\n\r\n\t\t\tif (!value) { continue; }\r\n\r\n\t\t\tvar keyValue = json.stringify(key)\r\n\t\t\t\t\t\u002B colonSeparator\r\n\t\t\t\t\t\u002B value;\r\n\r\n\t\t\tout.push(indent \u002B space \u002B keyValue);\r\n\t\t}\r\n\t\tseen.splice(seen.indexOf(node), 1);\r\n\t\treturn \u0027{\u0027 \u002B out.join(\u0027,\u0027) \u002B indent \u002B \u0027}\u0027;\r\n\r\n\t}({ \u0027\u0027: obj }, \u0027\u0027, obj, 0));\r\n};\r\n\r\nfunction isJsonStableStringifyEqual(a, b) {\r\n return jsonStableStringify(a) === jsonStableStringify(b);\r\n}\r\n \r\nwindow.testObject1 = {\r\n personalizedTrackingEnabled: true,\r\n trackingConsentGiven: false,\r\n userId: \u00229a900f538965a426994e1e90600920aff0b4e8d2\u0022\r\n};\r\n\r\nwindow.testObject2 = {\r\n personalizedTrackingEnabled: true,\r\n trackingConsentGiven: false,\r\n userId: \u00229a900f538965a426994e1e90600920aff0b4e8d2\u0022\r\n};\r\n\r\nwindow.testObject3 = {\r\n personalizedTrackingEnabled: true,\r\n trackingConsentGiven: false,\r\n};\r\n\r\nwindow.testObject4 = {\r\n personalizedTrackingEnabled: false,\r\n trackingConsentGiven: true,\r\n userId: \u002250a7c871e6420c4bda76e49098db1dd483d74a71\u0022\r\n};\r\n","TestCases":[{"Name":"_.isEqual identical","Code":"_.isEqual(window.testObject1, window.testObject2);","IsDeferred":false},{"Name":"_.isEqual missing userId","Code":"_.isEqual(window.testObject1, window.testObject3);","IsDeferred":false},{"Name":"_.isEqual all changed","Code":"_.isEqual(window.testObject1, window.testObject4);","IsDeferred":false},{"Name":"JsonStableStringify identical","Code":"isJsonStableStringifyEqual(window.testObject1, window.testObject2);","IsDeferred":false},{"Name":"JsonStableStringify missing userId","Code":"isJsonStableStringifyEqual(window.testObject1, window.testObject3);","IsDeferred":false},{"Name":"JsonStableStringify all changed","Code":"isJsonStableStringifyEqual(window.testObject1, window.testObject4);","IsDeferred":false}]}