{"version":3,"sources":["js.cookie.js"],"names":["factory","registeredInModuleLoader","define","amd","exports","module","OldCookies","window","Cookies","api","noConflict","extend","i","result","arguments","length","attributes","key","init","converter","value","document","path","defaults","expires","Date","setMilliseconds","getMilliseconds","toUTCString","JSON","stringify","test","e","write","encodeURIComponent","String","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","cookie","rdecode","split","parts","cookies","slice","join","read","json","name","this","parse","set","getJSON","apply","call","remove","withConverter"],"mappings":"CAOE,SAAUA,GACX,GAAIC,IAA2B,CAS/B,IARsB,kBAAXC,SAAyBA,OAAOC,MAC1CD,OAAOF,GACPC,GAA2B,GAEL,gBAAZG,WACVC,OAAOD,QAAUJ,IACjBC,GAA2B,IAEvBA,EAA0B,CAC9B,GAAIK,GAAaC,OAAOC,QACpBC,EAAMF,OAAOC,QAAUR,GAC3BS,GAAIC,WAAa,WAEhB,MADAH,QAAOC,QAAUF,EACVG,KAfR,WAmBD,QAASE,KAGR,IAFA,GAAIC,GAAI,EACJC,KACGD,EAAIE,UAAUC,OAAQH,IAAK,CACjC,GAAII,GAAaF,UAAAF,EACjB,KAAK,GAAIK,KAAOD,GACfH,EAAOI,GAAOD,EAAWC,GAG3B,MAAOJ,GAGR,QAASK,GAAMC,GACd,QAASV,GAAKQ,EAAKG,EAAOJ,GACzB,GAAIH,EACJ,IAAwB,mBAAbQ,UAAX,CAMA,GAAIP,UAAUC,OAAS,EAAG,CAKzB,GAJAC,EAAaL,GACZW,KAAM,KACJb,EAAIc,SAAUP,GAEiB,gBAAvBA,GAAWQ,QAAsB,CAC3C,GAAIA,GAAU,GAAIC,KAClBD,GAAQE,gBAAgBF,EAAQG,kBAAyC,MAArBX,EAAWQ,SAC/DR,EAAWQ,QAAUA,EAItBR,EAAWQ,QAAUR,EAAWQ,QAAUR,EAAWQ,QAAQI,cAAgB,EAE7E,KACCf,EAASgB,KAAKC,UAAUV,GACpB,UAAUW,KAAKlB,KAClBO,EAAQP,GAER,MAAOmB,IAORZ,EAL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CA,EAAhCgD,OAAA,SAAAxC,EAAAD,GADDP,EAAAQ,EAAA,GAAAN,EAAAK,GAEEQ,SAAU,MAOZf,EAAAiD,cAAAxC,EAEMA,EAAP,MAAOA,GAAK","file":"js.cookie.min.js","sourcesContent":["/*!\r\n * JavaScript Cookie v2.1.4\r\n * https://github.com/js-cookie/js-cookie\r\n *\r\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\r\n * Released under the MIT license\r\n */\r\n;(function (factory) {\r\n\tvar registeredInModuleLoader = false;\r\n\tif (typeof define === 'function' && define.amd) {\r\n\t\tdefine(factory);\r\n\t\tregisteredInModuleLoader = true;\r\n\t}\r\n\tif (typeof exports === 'object') {\r\n\t\tmodule.exports = factory();\r\n\t\tregisteredInModuleLoader = true;\r\n\t}\r\n\tif (!registeredInModuleLoader) {\r\n\t\tvar OldCookies = window.Cookies;\r\n\t\tvar api = window.Cookies = factory();\r\n\t\tapi.noConflict = function () {\r\n\t\t\twindow.Cookies = OldCookies;\r\n\t\t\treturn api;\r\n\t\t};\r\n\t}\r\n}(function () {\r\n\tfunction extend () {\r\n\t\tvar i = 0;\r\n\t\tvar result = {};\r\n\t\tfor (; i < arguments.length; i++) {\r\n\t\t\tvar attributes = arguments[ i ];\r\n\t\t\tfor (var key in attributes) {\r\n\t\t\t\tresult[key] = attributes[key];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tfunction init (converter) {\r\n\t\tfunction api (key, value, attributes) {\r\n\t\t\tvar result;\r\n\t\t\tif (typeof document === 'undefined') {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Write\r\n\r\n\t\t\tif (arguments.length > 1) {\r\n\t\t\t\tattributes = extend({\r\n\t\t\t\t\tpath: '/'\r\n\t\t\t\t}, api.defaults, attributes);\r\n\r\n\t\t\t\tif (typeof attributes.expires === 'number') {\r\n\t\t\t\t\tvar expires = new Date();\r\n\t\t\t\t\texpires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\r\n\t\t\t\t\tattributes.expires = expires;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\r\n\t\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tresult = JSON.stringify(value);\r\n\t\t\t\t\tif (/^[\\{\\[]/.test(result)) {\r\n\t\t\t\t\t\tvalue = result;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e) {}\r\n\r\n\t\t\t\tif (!converter.write) {\r\n\t\t\t\t\tvalue = encodeURIComponent(String(value))\r\n\t\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalue = converter.write(value, key);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tkey = encodeURIComponent(String(key));\r\n\t\t\t\tkey = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);\r\n\t\t\t\tkey = key.replace(/[\\(\\)]/g, escape);\r\n\r\n\t\t\t\tvar stringifiedAttributes = '';\r\n\r\n\t\t\t\tfor (var attributeName in attributes) {\r\n\t\t\t\t\tif (!attributes[attributeName]) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstringifiedAttributes += '; ' + attributeName;\r\n\t\t\t\t\tif (attributes[attributeName] === true) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName];\r\n\t\t\t\t}\r\n\t\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\r\n\t\t\t}\r\n\r\n\t\t\t// Read\r\n\r\n\t\t\tif (!key) {\r\n\t\t\t\tresult = {};\r\n\t\t\t}\r\n\r\n\t\t\t// To prevent the for loop in the first place assign an empty array\r\n\t\t\t// in case there are no cookies at all. Also prevents odd result when\r\n\t\t\t// calling \"get()\"\r\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\r\n\t\t\tvar rdecode = /(%[0-9A-Z]{2})+/g;\r\n\t\t\tvar i = 0;\r\n\r\n\t\t\tfor (; i < cookies.length; i++) {\r\n\t\t\t\tvar parts = cookies[i].split('=');\r\n\t\t\t\tvar cookie = parts.slice(1).join('=');\r\n\r\n\t\t\t\tif (cookie.charAt(0) === '\"') {\r\n\t\t\t\t\tcookie = cookie.slice(1, -1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tvar name = parts[0].replace(rdecode, decodeURIComponent);\r\n\t\t\t\t\tcookie = converter.read ?\r\n\t\t\t\t\t\tconverter.read(cookie, name) : converter(cookie, name) ||\r\n\t\t\t\t\t\tcookie.replace(rdecode, decodeURIComponent);\r\n\r\n\t\t\t\t\tif (this.json) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\r\n\t\t\t\t\t\t} catch (e) {}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (key === name) {\r\n\t\t\t\t\t\tresult = cookie;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!key) {\r\n\t\t\t\t\t\tresult[name] = cookie;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (e) {}\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\tapi.set = api;\r\n\t\tapi.get = function (key) {\r\n\t\t\treturn api.call(api, key);\r\n\t\t};\r\n\t\tapi.getJSON = function () {\r\n\t\t\treturn api.apply({\r\n\t\t\t\tjson: true\r\n\t\t\t}, [].slice.call(arguments));\r\n\t\t};\r\n\t\tapi.defaults = {};\r\n\r\n\t\tapi.remove = function (key, attributes) {\r\n\t\t\tapi(key, '', extend(attributes, {\r\n\t\t\t\texpires: -1\r\n\t\t\t}));\r\n\t\t};\r\n\r\n\t\tapi.withConverter = init;\r\n\r\n\t\treturn api;\r\n\t}\r\n\r\n\treturn init(function () {});\r\n}));\r\n"]}