44c74a31d12ac5d326500dfebf7d8b2b.json 51 KB

1
  1. {"ast":null,"code":"// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.4\nvar LZString = function () {\n // private property\n var f = String.fromCharCode;\n var keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n var keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\n var baseReverseDic = {};\n\n function getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n\n for (var i = 0; i < alphabet.length; i++) {\n baseReverseDic[alphabet][alphabet.charAt(i)] = i;\n }\n }\n\n return baseReverseDic[alphabet][character];\n }\n\n var LZString = {\n compressToBase64: function (input) {\n if (input == null) return \"\";\n\n var res = LZString._compress(input, 6, function (a) {\n return keyStrBase64.charAt(a);\n });\n\n switch (res.length % 4) {\n // To produce valid Base64\n default: // When could this happen ?\n\n case 0:\n return res;\n\n case 1:\n return res + \"===\";\n\n case 2:\n return res + \"==\";\n\n case 3:\n return res + \"=\";\n }\n },\n decompressFromBase64: function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n return LZString._decompress(input.length, 32, function (index) {\n return getBaseValue(keyStrBase64, input.charAt(index));\n });\n },\n compressToUTF16: function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 15, function (a) {\n return f(a + 32);\n }) + \" \";\n },\n decompressFromUTF16: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 16384, function (index) {\n return compressed.charCodeAt(index) - 32;\n });\n },\n //compress into uint8array (UCS-2 big endian format)\n compressToUint8Array: function (uncompressed) {\n var compressed = LZString.compress(uncompressed);\n var buf = new Uint8Array(compressed.length * 2); // 2 bytes per character\n\n for (var i = 0, TotalLen = compressed.length; i < TotalLen; i++) {\n var current_value = compressed.charCodeAt(i);\n buf[i * 2] = current_value >>> 8;\n buf[i * 2 + 1] = current_value % 256;\n }\n\n return buf;\n },\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array: function (compressed) {\n if (compressed === null || compressed === undefined) {\n return LZString.decompress(compressed);\n } else {\n var buf = new Array(compressed.length / 2); // 2 bytes per character\n\n for (var i = 0, TotalLen = buf.length; i < TotalLen; i++) {\n buf[i] = compressed[i * 2] * 256 + compressed[i * 2 + 1];\n }\n\n var result = [];\n buf.forEach(function (c) {\n result.push(f(c));\n });\n return LZString.decompress(result.join(''));\n }\n },\n //compress into a string that is already URI encoded\n compressToEncodedURIComponent: function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 6, function (a) {\n return keyStrUriSafe.charAt(a);\n });\n },\n //decompress from an output of compressToEncodedURIComponent\n decompressFromEncodedURIComponent: function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n input = input.replace(/ /g, \"+\");\n return LZString._decompress(input.length, 32, function (index) {\n return getBaseValue(keyStrUriSafe, input.charAt(index));\n });\n },\n compress: function (uncompressed) {\n return LZString._compress(uncompressed, 16, function (a) {\n return f(a);\n });\n },\n _compress: function (uncompressed, bitsPerChar, getCharFromInt) {\n if (uncompressed == null) return \"\";\n var i,\n value,\n context_dictionary = {},\n context_dictionaryToCreate = {},\n context_c = \"\",\n context_wc = \"\",\n context_w = \"\",\n context_enlargeIn = 2,\n // Compensate for the first entry which should not count\n context_dictSize = 3,\n context_numBits = 2,\n context_data = [],\n context_data_val = 0,\n context_data_position = 0,\n ii;\n\n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n\n if (!Object.prototype.hasOwnProperty.call(context_dictionary, context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true;\n }\n\n context_wc = context_w + context_c;\n\n if (Object.prototype.hasOwnProperty.call(context_dictionary, context_wc)) {\n context_w = context_wc;\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) {\n if (context_w.charCodeAt(0) < 256) {\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n\n value = context_w.charCodeAt(0);\n\n for (i = 0; i < 8; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n\n value = value >> 1;\n }\n } else {\n value = 1;\n\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1 | value;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n\n value = 0;\n }\n\n value = context_w.charCodeAt(0);\n\n for (i = 0; i < 16; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n\n value = value >> 1;\n }\n }\n\n context_enlargeIn--;\n\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n\n value = value >> 1;\n }\n }\n\n context_enlargeIn--;\n\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n } // Add wc to the dictionary.\n\n\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n } // Output the code for w.\n\n\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate, context_w)) {\n if (context_w.charCodeAt(0) < 256) {\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n\n value = context_w.charCodeAt(0);\n\n for (i = 0; i < 8; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n\n value = value >> 1;\n }\n } else {\n value = 1;\n\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1 | value;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n\n value = 0;\n }\n\n value = context_w.charCodeAt(0);\n\n for (i = 0; i < 16; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n\n value = value >> 1;\n }\n }\n\n context_enlargeIn--;\n\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n\n value = value >> 1;\n }\n }\n\n context_enlargeIn--;\n\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n } // Mark the end of the stream\n\n\n value = 2;\n\n for (i = 0; i < context_numBits; i++) {\n context_data_val = context_data_val << 1 | value & 1;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n\n value = value >> 1;\n } // Flush the last char\n\n\n while (true) {\n context_data_val = context_data_val << 1;\n\n if (context_data_position == bitsPerChar - 1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n } else context_data_position++;\n }\n\n return context_data.join('');\n },\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function (index) {\n return compressed.charCodeAt(index);\n });\n },\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits,\n resb,\n maxpower,\n power,\n c,\n data = {\n val: getNextValue(0),\n position: resetValue,\n index: 1\n };\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2, 2);\n power = 1;\n\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2, 8);\n power = 1;\n\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n c = f(bits);\n break;\n\n case 1:\n bits = 0;\n maxpower = Math.pow(2, 16);\n power = 1;\n\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n c = f(bits);\n break;\n\n case 2:\n return \"\";\n }\n\n dictionary[3] = c;\n w = c;\n result.push(c);\n\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2, numBits);\n power = 1;\n\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2, 8);\n power = 1;\n\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize - 1;\n enlargeIn--;\n break;\n\n case 1:\n bits = 0;\n maxpower = Math.pow(2, 16);\n power = 1;\n\n while (power != maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n\n bits |= (resb > 0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize - 1;\n enlargeIn--;\n break;\n\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n\n result.push(entry); // Add w+entry[0] to the dictionary.\n\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n }\n }\n };\n return LZString;\n}();\n\nif (typeof define === 'function' && define.amd) {\n define(function () {\n return LZString;\n });\n} else if (typeof module !== 'undefined' && module != null) {\n module.exports = LZString;\n}","map":{"version":3,"sources":["/Users/jane/Documents/Курс Front-end/HW8/myproject/node_modules/lz-string/libs/lz-string.js"],"names":["LZString","f","String","fromCharCode","keyStrBase64","keyStrUriSafe","baseReverseDic","getBaseValue","alphabet","character","i","length","charAt","compressToBase64","input","res","_compress","a","decompressFromBase64","_decompress","index","compressToUTF16","decompressFromUTF16","compressed","charCodeAt","compressToUint8Array","uncompressed","compress","buf","Uint8Array","TotalLen","current_value","decompressFromUint8Array","undefined","decompress","Array","result","forEach","c","push","join","compressToEncodedURIComponent","decompressFromEncodedURIComponent","replace","bitsPerChar","getCharFromInt","value","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data","context_data_val","context_data_position","ii","Object","prototype","hasOwnProperty","call","Math","pow","resetValue","getNextValue","dictionary","next","enlargeIn","dictSize","numBits","entry","w","bits","resb","maxpower","power","data","val","position","define","amd","module","exports"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,QAAQ,GAAI,YAAW;AAE3B;AACA,MAAIC,CAAC,GAAGC,MAAM,CAACC,YAAf;AACA,MAAIC,YAAY,GAAG,mEAAnB;AACA,MAAIC,aAAa,GAAG,mEAApB;AACA,MAAIC,cAAc,GAAG,EAArB;;AAEA,WAASC,YAAT,CAAsBC,QAAtB,EAAgCC,SAAhC,EAA2C;AACzC,QAAI,CAACH,cAAc,CAACE,QAAD,CAAnB,EAA+B;AAC7BF,MAAAA,cAAc,CAACE,QAAD,CAAd,GAA2B,EAA3B;;AACA,WAAK,IAAIE,CAAC,GAAC,CAAX,EA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,CAAZ;AACAA,UAAAA,OAAO;AACR;;AAED,YAAIJ,UAAU,CAAC7B,CAAD,CAAd,EAAmB;AACjBkC,UAAAA,KAAK,GAAGL,UAAU,CAAC7B,CAAD,CAAlB;AACD,SAFD,MAEO;AACL,cAAIA,CAAC,KAAKgC,QAAV,EAAoB;AAClBE,YAAAA,KAAK,GAAGC,CAAC,GAAGA,CAAC,CAAC7D,MAAF,CAAS,CAAT,CAAZ;AACD,WAFD,MAEO;AACL,mBAAO,IAAP;AACD;AACF;;AACDwB,QAAAA,MAAM,CAACG,IAAP,CAAYiC,KAAZ,EA3EW,CA6EX;;AACAL,QAAAA,UAAU,CAACG,QAAQ,EAAT,CAAV,GAAyBG,CAAC,GAAGD,KAAK,CAAC5D,MAAN,CAAa,CAAb,CAA7B;AACAyD,QAAAA,SAAS;AAETI,QAAAA,CAAC,GAAGD,KAAJ;;AAEA,YAAIH,SAAS,IAAI,CAAjB,EAAoB;AAClBA,UAAAA,SAAS,GAAGN,IAAI,CAACC,GAAL,CAAS,CAAT,EAAYO,OAAZ,CAAZ;AACAA,UAAAA,OAAO;AACR;AAEF;AACF;AAhdY,GAAf;AAkdE,SAAOvE,QAAP;AACD,CArec,EAAf;;AAueA,IAAI,OAAOiF,MAAP,KAAkB,UAAlB,IAAgCA,MAAM,CAACC,GAA3C,EAAgD;AAC9CD,EAAAA,MAAM,CAAC,YAAY;AAAE,WAAOjF,QAAP;AAAkB,GAAjC,CAAN;AACD,CAFD,MAEO,IAAI,OAAOmF,MAAP,KAAkB,WAAlB,IAAiCA,MAAM,IAAI,IAA/C,EAAsD;AAC3DA,EAAAA,MAAM,CAACC,OAAP,GAAiBpF,QAAjB;AACD","sourcesContent":["// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.4\nvar LZString = (function() {\n\n// private property\nvar f = String.fromCharCode;\nvar keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nvar keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\nvar baseReverseDic = {};\n\nfunction getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i=0 ; i<alphabet.length ; i++) {\n baseReverseDic[alphabet][alphabet.charAt(i)] = i;\n }\n }\n return baseReverseDic[alphabet][character];\n}\n\nvar LZString = {\n compressToBase64 : function (input) {\n if (input == null) return \"\";\n var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});\n switch (res.length % 4) { // To produce valid Base64\n default: // When could this happen ?\n case 0 : return res;\n case 1 : return res+\"===\";\n case 2 : return res+\"==\";\n case 3 : return res+\"=\";\n }\n },\n\n decompressFromBase64 : function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });\n },\n\n compressToUTF16 : function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 15, function(a){return f(a+32);}) + \" \";\n },\n\n decompressFromUTF16: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });\n },\n\n //compress into uint8array (UCS-2 big endian format)\n compressToUint8Array: function (uncompressed) {\n var compressed = LZString.compress(uncompressed);\n var buf=new Uint8Array(compressed.length*2); // 2 bytes per character\n\n for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {\n var current_value = compressed.charCodeAt(i);\n buf[i*2] = current_value >>> 8;\n buf[i*2+1] = current_value % 256;\n }\n return buf;\n },\n\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array:function (compressed) {\n if (compressed===null || compressed===undefined){\n return LZString.decompress(compressed);\n } else {\n var buf=new Array(compressed.length/2); // 2 bytes per character\n for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {\n buf[i]=compressed[i*2]*256+compressed[i*2+1];\n }\n\n var result = [];\n buf.forEach(function (c) {\n result.push(f(c));\n });\n return LZString.decompress(result.join(''));\n\n }\n\n },\n\n\n //compress into a string that is already URI encoded\n compressToEncodedURIComponent: function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});\n },\n\n //decompress from an output of compressToEncodedURIComponent\n decompressFromEncodedURIComponent:function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n input = input.replace(/ /g, \"+\");\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });\n },\n\n compress: function (uncompressed) {\n return LZString._compress(uncompressed, 16, function(a){return f(a);});\n },\n _compress: function (uncompressed, bitsPerChar, getCharFromInt) {\n if (uncompressed == null) return \"\";\n var i, value,\n context_dictionary= {},\n context_dictionaryToCreate= {},\n context_c=\"\",\n context_wc=\"\",\n context_w=\"\",\n context_enlargeIn= 2, // Compensate for the first entry which should not count\n context_dictSize= 3,\n context_numBits= 2,\n context_data=[],\n context_data_val=0,\n context_data_position=0,\n ii;\n\n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true;\n }\n\n context_wc = context_w + context_c;\n if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {\n context_w = context_wc;\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position ==bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n\n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n\n // Mark the end of the stream\n value = 2;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n }\n else context_data_position++;\n }\n return context_data.join('');\n },\n\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });\n },\n\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits, resb, maxpower, power,\n c,\n data = {val:getNextValue(0), position:resetValue, index:1};\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2:\n return \"\";\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result.push(entry);\n\n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n }\n }\n};\n return LZString;\n})();\n\nif (typeof define === 'function' && define.amd) {\n define(function () { return LZString; });\n} else if( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\n}\n"]},"metadata":{},"sourceType":"script"}