adb827334c8bde0a4f8718a69570d19b54b20c3907172f551e5306beb08d3dba.json 4.7 KB

1
  1. {"ast":null,"code":"'use strict';\n\nrequire(\"core-js/modules/es.array.push.js\");\nvar utils = require('./../utils');\nmodule.exports = utils.isStandardBrowserEnv() ?\n// Standard browser envs support document.cookie\nfunction standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n if (secure === true) {\n cookie.push('secure');\n }\n document.cookie = cookie.join('; ');\n },\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return match ? decodeURIComponent(match[3]) : null;\n },\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n}() :\n// Non standard browser env (web workers, react-native) lack needed support.\nfunction nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() {\n return null;\n },\n remove: function remove() {}\n };\n}();","map":{"version":3,"names":["require","utils","module","exports","isStandardBrowserEnv","standardBrowserEnv","write","name","value","expires","path","domain","secure","cookie","push","encodeURIComponent","isNumber","Date","toGMTString","isString","document","join","read","match","RegExp","decodeURIComponent","remove","now","nonStandardBrowserEnv"],"sources":["/Users/mac/projects/mime/mine/node_modules/axios/lib/helpers/cookies.js"],"sourcesContent":["'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n"],"mappings":"AAAA,YAAY;;AAACA,OAAA;AAEb,IAAIC,KAAK,GAAGD,OAAO,CAAC,YAAY,CAAC;AAEjCE,MAAM,CAACC,OAAO,GACZF,KAAK,CAACG,oBAAoB,CAAC,CAAC;AAE5B;AACC,SAASC,kBAAkBA,CAAA,EAAG;EAC7B,OAAO;IACLC,KAAK,EAAE,SAASA,KAAKA,CAACC,IAAI,EAAEC,KAAK,EAAEC,OAAO,EAAEC,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAE;MAChE,IAAIC,MAAM,GAAG,EAAE;MACfA,MAAM,CAACC,IAAI,CAACP,IAAI,GAAG,GAAG,GAAGQ,kBAAkB,CAACP,KAAK,CAAC,CAAC;MAEnD,IAAIP,KAAK,CAACe,QAAQ,CAACP,OAAO,CAAC,EAAE;QAC3BI,MAAM,CAACC,IAAI,CAAC,UAAU,GAAG,IAAIG,IAAI,CAACR,OAAO,CAAC,CAACS,WAAW,CAAC,CAAC,CAAC;MAC3D;MAEA,IAAIjB,KAAK,CAACkB,QAAQ,CAACT,IAAI,CAAC,EAAE;QACxBG,MAAM,CAACC,IAAI,CAAC,OAAO,GAAGJ,IAAI,CAAC;MAC7B;MAEA,IAAIT,KAAK,CAACkB,QAAQ,CAACR,MAAM,CAAC,EAAE;QAC1BE,MAAM,CAACC,IAAI,CAAC,SAAS,GAAGH,MAAM,CAAC;MACjC;MAEA,IAAIC,MAA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