{"version":3,"sources":["webpack:///./node_modules/flat/index.js"],"names":["isBuffer","module","exports","flatten","target","opts","delimiter","maxDepth","output","step","object","prev","currentDepth","Object","keys","forEach","key","value","isarray","safe","Array","isArray","type","prototype","toString","call","isbuffer","newKey","length","unflatten","overwrite","result","getkey","parsedKey","Number","isNaN","indexOf","split","key1","shift","key2","recipient","undefined","isobject"],"mappings":"8EAAA,IAAIA,EAAW,EAAQ,KAEZC,EAAOC,QAAUC,EAI5B,SAASA,EAAQC,EAAQC,GAGvB,IAAIC,GAFJD,EAAOA,GAAQ,IAEMC,WAAa,IAC9BC,EAAWF,EAAKE,SAChBC,EAAS,GA6Bb,OA3BA,SAASC,EAAKC,EAAQC,EAAMC,GAC1BA,EAAeA,GAA8B,EAC7CC,OAAOC,KAAKJ,GAAQK,SAAQ,SAASC,GACnC,IAAIC,EAAQP,EAAOM,GACfE,EAAUb,EAAKc,MAAQC,MAAMC,QAAQJ,GACrCK,EAAOT,OAAOU,UAAUC,SAASC,KAAKR,GACtCS,EAAW1B,EAASiB,GAMpBU,EAAShB,EACTA,EAAOL,EAAYU,EACnBA,EAEJ,IAAKE,IAAYQ,IARN,oBAATJ,GACS,mBAATA,IAOuCT,OAAOC,KAAKG,GAAOW,UACxDvB,EAAKE,UAAYK,EAAeL,GAClC,OAAOE,EAAKQ,EAAOU,EAAQf,EAAe,GAG5CJ,EAAOmB,GAAUV,KAIrBR,CAAKL,GAEEI,EArCTL,EAAQA,QAAUA,EAClBA,EAAQ0B,UAuCR,SAASA,EAAUzB,EAAQC,GAGzB,IAAIC,GAFJD,EAAOA,GAAQ,IAEMC,WAAa,IAC9BwB,EAAYzB,EAAKyB,YAAa,EAC9BC,EAAS,GAGb,GADe/B,EAASI,IACmC,oBAA3CS,OAAOU,UAAUC,SAASC,KAAKrB,GAC7C,OAAOA,EAKT,SAAS4B,EAAOhB,GACd,IAAIiB,EAAYC,OAAOlB,GAEvB,OACEmB,MAAMF,KACgB,IAAtBjB,EAAIoB,QAAQ,KACVpB,EACAiB,EAuCN,OApCApB,OAAOC,KAAKV,GAAQW,SAAQ,SAASC,GAMnC,IALA,IAAIqB,EAAQrB,EAAIqB,MAAM/B,GAClBgC,EAAON,EAAOK,EAAME,SACpBC,EAAOR,EAAOK,EAAM,IACpBI,EAAYV,OAEAW,IAATF,GAAoB,CACzB,IAAIlB,EAAOT,OAAOU,UAAUC,SAASC,KAAKgB,EAAUH,IAChDK,EACO,oBAATrB,GACS,mBAATA,EAIF,IAAKQ,IAAca,QAAuC,IAApBF,EAAUH,GAC9C,QAGGR,IAAca,IAAeb,GAAgC,MAAnBW,EAAUH,MACvDG,EAAUH,GACQ,iBAATE,GACNnC,EAAKK,OAAc,GAAL,IAInB+B,EAAYA,EAAUH,GAClBD,EAAMT,OAAS,IACjBU,EAAON,EAAOK,EAAME,SACpBC,EAAOR,EAAOK,EAAM,KAKxBI,EAAUH,GAAQT,EAAUzB,EAAOY,GAAMX,MAGpC0B","file":"npm.flat.c920b4ddeb9b68365139.js","sourcesContent":["var isBuffer = require('is-buffer')\n\nvar flat = module.exports = flatten\nflatten.flatten = flatten\nflatten.unflatten = unflatten\n\nfunction flatten(target, opts) {\n opts = opts || {}\n\n var delimiter = opts.delimiter || '.'\n var maxDepth = opts.maxDepth\n var output = {}\n\n function step(object, prev, currentDepth) {\n currentDepth = currentDepth ? currentDepth : 1\n Object.keys(object).forEach(function(key) {\n var value = object[key]\n var isarray = opts.safe && Array.isArray(value)\n var type = Object.prototype.toString.call(value)\n var isbuffer = isBuffer(value)\n var isobject = (\n type === \"[object Object]\" ||\n type === \"[object Array]\"\n )\n\n var newKey = prev\n ? prev + delimiter + key\n : key\n\n if (!isarray && !isbuffer && isobject && Object.keys(value).length &&\n (!opts.maxDepth || currentDepth < maxDepth)) {\n return step(value, newKey, currentDepth + 1)\n }\n\n output[newKey] = value\n })\n }\n\n step(target)\n\n return output\n}\n\nfunction unflatten(target, opts) {\n opts = opts || {}\n\n var delimiter = opts.delimiter || '.'\n var overwrite = opts.overwrite || false\n var result = {}\n\n var isbuffer = isBuffer(target)\n if (isbuffer || Object.prototype.toString.call(target) !== '[object Object]') {\n return target\n }\n\n // safely ensure that the key is\n // an integer.\n function getkey(key) {\n var parsedKey = Number(key)\n\n return (\n isNaN(parsedKey) ||\n key.indexOf('.') !== -1\n ) ? key\n : parsedKey\n }\n\n Object.keys(target).forEach(function(key) {\n var split = key.split(delimiter)\n var key1 = getkey(split.shift())\n var key2 = getkey(split[0])\n var recipient = result\n\n while (key2 !== undefined) {\n var type = Object.prototype.toString.call(recipient[key1])\n var isobject = (\n type === \"[object Object]\" ||\n type === \"[object Array]\"\n )\n\n // do not write over falsey, non-undefined values if overwrite is false\n if (!overwrite && !isobject && typeof recipient[key1] !== 'undefined') {\n return\n }\n\n if ((overwrite && !isobject) || (!overwrite && recipient[key1] == null)) {\n recipient[key1] = (\n typeof key2 === 'number' &&\n !opts.object ? [] : {}\n )\n }\n\n recipient = recipient[key1]\n if (split.length > 0) {\n key1 = getkey(split.shift())\n key2 = getkey(split[0])\n }\n }\n\n // unflatten again for 'messy objects'\n recipient[key1] = unflatten(target[key], opts)\n })\n\n return result\n}\n"],"sourceRoot":""}