{"version":3,"sources":["webpack:///../node_modules/vfile-location/index.js"],"names":[],"mappings":";;;;;;;;;;;;AAAY;;AAEZ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA","file":"vendor.vfile-location.7b3d4602967cb4daece3.js","sourcesContent":["'use strict'\n\nmodule.exports = factory\n\nfunction factory(file) {\n var contents = indices(String(file))\n\n return {\n toPosition: offsetToPositionFactory(contents),\n toOffset: positionToOffsetFactory(contents)\n }\n}\n\n// Factory to get the line and column-based `position` for `offset` in the bound\n// indices.\nfunction offsetToPositionFactory(indices) {\n return offsetToPosition\n\n // Get the line and column-based `position` for `offset` in the bound indices.\n function offsetToPosition(offset) {\n var index = -1\n var length = indices.length\n\n if (offset < 0) {\n return {}\n }\n\n while (++index < length) {\n if (indices[index] > offset) {\n return {\n line: index + 1,\n column: offset - (indices[index - 1] || 0) + 1,\n offset: offset\n }\n }\n }\n\n return {}\n }\n}\n\n// Factory to get the `offset` for a line and column-based `position` in the\n// bound indices.\nfunction positionToOffsetFactory(indices) {\n return positionToOffset\n\n // Get the `offset` for a line and column-based `position` in the bound\n // indices.\n function positionToOffset(position) {\n var line = position && position.line\n var column = position && position.column\n\n if (!isNaN(line) && !isNaN(column) && line - 1 in indices) {\n return (indices[line - 2] || 0) + column - 1 || 0\n }\n\n return -1\n }\n}\n\n// Get indices of line-breaks in `value`.\nfunction indices(value) {\n var result = []\n var index = value.indexOf('\\n')\n\n while (index !== -1) {\n result.push(index + 1)\n index = value.indexOf('\\n', index + 1)\n }\n\n result.push(value.length + 1)\n\n return result\n}\n"],"sourceRoot":""}