UNPKG

skypager-project

Version:
1,720 lines (1,698 loc) 224 kB
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.l = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // identity function for calling harmory imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ // define getter function for harmory exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ }; /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/"; /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 175); /******/ }) /************************************************************************/ /******/ ({ /***/ 175: /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(84); /***/ }, /***/ 84: /***/ function(module, exports) { module.exports = { "path": "/Users/jonathan/Skypager/packages/skypager-project/src/tree.js", "ast": { "type": "File", "start": 0, "end": 906, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 30, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 906, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 30, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "Object" }, "property": { "type": "Identifier", "name": "defineProperty" }, "computed": false }, "arguments": [ { "type": "Identifier", "name": "exports" }, { "type": "StringLiteral", "extra": { "rawValue": "__esModule", "raw": "\"__esModule\"" }, "value": "__esModule" }, { "type": "ObjectExpression", "properties": [ { "type": "ObjectProperty", "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "name": "value" }, "value": { "type": "BooleanLiteral", "value": true } } ] } ] } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "exports" }, "property": { "type": "Identifier", "name": "createDocumentTree", "trailingComments": [], "leadingComments": [], "innerComments": [] }, "computed": false }, "right": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "exports" }, "property": { "type": "Identifier", "name": "treeConfig", "trailingComments": [], "leadingComments": [], "innerComments": [] }, "computed": false }, "right": { "type": "Identifier", "name": "undefined", "trailingComments": [], "leadingComments": [], "innerComments": [] }, "trailingComments": [], "leadingComments": [], "innerComments": [] } } }, { "type": "VariableDeclaration", "kind": "var", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_skypagerUtil" }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require" }, "arguments": [ { "type": "StringLiteral", "value": "skypager-util", "trailingComments": [], "leadingComments": [], "innerComments": [] } ] } } ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 39 } } }, { "type": "VariableDeclaration", "kind": "var", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_set" }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require" }, "arguments": [ { "type": "StringLiteral", "value": "lodash/set", "trailingComments": [], "leadingComments": [], "innerComments": [] } ] } } ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 28 } } }, { "type": "VariableDeclaration", "kind": "var", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_set2" }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "_interopRequireDefault" }, "arguments": [ { "type": "Identifier", "name": "_set" } ] } } ] }, { "type": "VariableDeclaration", "kind": "var", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_get" }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "require" }, "arguments": [ { "type": "StringLiteral", "value": "lodash/get", "trailingComments": [], "leadingComments": [], "innerComments": [] } ] } } ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 28 } } }, { "type": "VariableDeclaration", "kind": "var", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "_get2" }, "init": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "_interopRequireDefault" }, "arguments": [ { "type": "Identifier", "name": "_get" } ] } } ] }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "_interopRequireDefault" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "name": "obj" } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "ConditionalExpression", "test": { "type": "LogicalExpression", "left": { "type": "Identifier", "name": "obj" }, "operator": "&&", "right": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "obj" }, "property": { "type": "Identifier", "name": "__esModule" }, "computed": false } }, "consequent": { "type": "Identifier", "name": "obj" }, "alternate": { "type": "ObjectExpression", "properties": [ { "type": "ObjectProperty", "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "name": "default" }, "value": { "type": "Identifier", "name": "obj" } } ] } } } ], "directives": [] }, "extra": { "parenthesized": true, "parenStart": 3 } }, { "type": "VariableDeclaration", "kind": "var", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "start": 105, "end": 114, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 16 }, "identifierName": "camelCase" }, "name": "camelCase" }, "init": { "type": "MemberExpression", "object": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "_skypagerUtil" }, "property": { "type": "Identifier", "start": 9, "end": 16, "name": "strings" }, "computed": false, "trailingComments": [], "leadingComments": [], "innerComments": [] }, "property": { "type": "Identifier", "start": 105, "end": 114, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 16 }, "identifierName": "camelCase" }, "name": "camelCase" }, "computed": false } } ], "leadingComments": [] }, { "type": "VariableDeclaration", "kind": "var", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "start": 116, "end": 125, "loc": { "start": { "line": 4, "column": 18 }, "end": { "line": 4, "column": 27 }, "identifierName": "snakeCase" }, "name": "snakeCase" }, "init": { "type": "MemberExpression", "object": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "_skypagerUtil" }, "property": { "type": "Identifier", "start": 9, "end": 16, "name": "strings" }, "computed": false, "trailingComments": [], "leadingComments": [], "innerComments": [] }, "property": { "type": "Identifier", "start": 116, "end": 125, "loc": { "start": { "line": 4, "column": 18 }, "end": { "line": 4, "column": 27 }, "identifierName": "snakeCase" }, "name": "snakeCase" }, "computed": false } } ], "trailingComments": [] }, { "type": "VariableDeclaration", "start": 145, "end": 486, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 15, "column": 1 } }, "declarations": [ { "type": "VariableDeclarator", "start": 151, "end": 486, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 15, "column": 1 } }, "id": { "type": "Identifier", "start": 151, "end": 161, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 23 }, "identifierName": "treeConfig" }, "name": "treeConfig", "trailingComments": [], "leadingComments": [], "innerComments": [] }, "init": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "exports" }, "property": { "type": "Identifier", "start": 151, "end": 161, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 23 }, "identifierName": "treeConfig" }, "name": "treeConfig", "trailingComments": [], "leadingComments": [], "innerComments": [] }, "computed": false }, "right": { "type": "FunctionExpression", "start": 164, "end": 486, "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 15, "column": 1 } }, "id": { "type": "Identifier", "start": 151, "end": 161, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 23 }, "identifierName": "treeConfig" }, "name": "treeConfig", "trailingComments": [], "leadingComments": [], "innerComments": [] }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 165, "end": 172, "loc": { "start": { "line": 6, "column": 27 }, "end": { "line": 6, "column": 34 }, "identifierName": "project" }, "name": "project" } ], "body": { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "start": 174, "end": 181, "loc": { "start": { "line": 6, "column": 36 }, "end": { "line": 6, "column": 43 }, "identifierName": "options" }, "name": "options", "trailingComments": [], "leadingComments": [], "innerComments": [] }, "init": { "type": "ConditionalExpression", "test": { "type": "LogicalExpression", "left": { "type": "BinaryExpression", "left": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "arguments", "trailingComments": [], "leadingComments": [], "innerComments": [] }, "property": { "type": "Identifier", "name": "length" }, "computed": false }, "operator": ">", "right": { "type": "NumericLiteral", "value": 1, "trailingComments": [], "leadingComments": [], "innerComments": [] } }, "operator": "&&", "right": { "type": "BinaryExpression", "left": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "arguments", "trailingComments": [], "leadingComments": [], "innerComments": [] }, "property": { "type": "NumericLiteral", "value": 1, "trailingComments": [], "leadingComments": [], "innerComments": [] }, "computed": true }, "operator": "!==", "right": { "type": "Identifier", "name": "undefined" } } }, "consequent": { "type": "MemberExpression", "object": { "type": "Identifier", "name": "arguments", "trailingComments": [], "leadingComments": [], "innerComments": [] }, "property": { "type": "NumericLiteral", "value": 1, "trailingComments": [], "leadingComments": [], "innerComments": [] }, "computed": true }, "alternate": { "type": "ObjectExpression", "start": 184, "end": 186, "loc": { "start": { "line": 6, "column": 46 }, "end": { "line": 6, "column": 48 } }, "properties": [], "trailingComments": [], "leadingComments": [], "innerComments": [] } } } ], "kind": "var" }, { "type": "ReturnStatement", "argument": { "type": "CallExpression", "start": 195, "end": 484, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 14, "column": 7 } }, "callee": { "type": "MemberExpression", "start": 195, "end": 248, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 9, "column": 14 } }, "object": { "type": "CallExpression", "start": 195, "end": 233, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 8, "column": 24 } }, "callee": { "type": "MemberExpression", "start": 195, "end": 217, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 8, "column": 8 } }, "object": { "type": "MemberExpression", "start": 195, "end": 208, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 7, "column": 15 } }, "object": { "type": "Identifier", "start": 195, "end": 202, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 7, "column": 9 }, "identifierName": "project" }, "name": "project" }, "property": { "type": "Identifier", "start": 203, "end": 208, "loc": { "start": { "line": 7, "column": 10 }, "end": { "line": 7, "column": 15 }, "identifierName": "chain" }, "name": "chain" }, "computed": false }, "property": { "type": "Identifier", "start": 214, "end": 217, "loc": { "start": { "line": 8, "column": 5 }, "end": { "line": 8, "column": 8 }, "identifierName": "get" }, "name": "get" }, "computed": false }, "arguments": [ { "type": "StringLiteral", "start": 218, "end": 232, "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 23 } }, "extra": { "rawValue": "documentsMap", "raw": "'documentsMap'" }, "value": "documentsMap" } ] }, "property": { "type": "Identifier", "start": 239, "end": 248, "loc": { "start": { "line": 9, "column": 5 }, "end": { "line": 9, "column": 14 }, "identifierName": "mapValues" }, "name": "mapValues" }, "computed": false }, "arguments": [ { "type": "FunctionExpression", "start": 249, "end": 483, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 14, "column": 6 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 250, "end": 253, "loc": { "start": { "line": 9, "column": 16 }, "end": { "line": 9, "column": 19 }, "identifierName": "doc" }, "name": "doc" }, { "type": "Identifier", "start": 254, "end": 256, "loc": { "start": { "line": 9, "column": 20 }, "end": { "line": 9, "column": 22 }, "identifierName": "id" }, "name": "id" } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "ObjectExpression", "start": 262, "end": 482, "loc": { "start": { "line": 9, "column": 28 }, "end": { "line": 14, "column": 5 } }, "properties": [ { "type": "ObjectProperty", "start": 270, "end": 273, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 9 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 270, "end": 273, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 9 }, "identifierName": "doc" }, "name": "doc" }, "value": { "type": "Identifier", "start": 270, "end": 273, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 9 }, "identifierName": "doc" }, "name": "doc" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 281, "end": 283, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 8 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 281, "end": 283, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 8 }, "identifierName": "id" }, "name": "id" }, "value": { "type": "Identifier", "start": 281, "end": 283, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 8 }, "identifierName": "id" }, "name": "id" }, "extra": { "shorthand": true } }, { "type": "ObjectProperty", "start": 291, "end": 363, "loc": { "start": { "line": 12, "column": 6 }, "end": { "line": 12, "column": 78 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 291, "end": 298, "loc": { "start": { "line": 12, "column": 6 }, "end": { "line": 12, "column": 13 }, "identifierName": "idParts" }, "name": "idParts" }, "value": { "type": "CallExpression", "start": 300, "end": 363, "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 78 } }, "callee": { "type": "MemberExpression", "start": 300, "end": 315, "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 30 } }, "object": { "type": "MemberExpression", "start": 300, "end": 311, "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 26 } }, "object": { "type": "Identifier", "start": 300, "end": 303, "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 18 }, "identifierName": "doc" }, "name": "doc" }, "property": { "type": "Identifier", "start": 304, "end": 311, "loc": { "start": { "line": 12, "column": 19 }, "end": { "line": 12, "column": 26 }, "identifierName": "idParts" }, "name": "idParts" }, "computed": false }, "property": { "type": "Identifier", "start": 312, "end": 315, "loc": { "start": { "line": 12, "column": 27 }, "end": { "line": 12, "column": 30 }, "identifierName": "map" }, "name": "map" }, "computed": false }, "arguments": [ { "type": "FunctionExpression", "start": 316, "end": 362, "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 77 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 316, "end": 317, "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 32 }, "identifierName": "p" }, "name": "p" } ], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "CallExpression", "start": 321, "end": 362, "loc": { "start": { "line": 12, "column": 36 }, "end": { "line": 12, "column": 77 } }, "callee": { "type": "Identifier", "start": 321, "end": 330, "loc": { "start": { "line": 12, "column": 36 }, "end": { "line": 12, "column": 45 }, "identifierName": "camelCase" }, "name": "camelCase" }, "arguments": [ { "type": "CallExpression", "start": 331, "end": 361, "loc": { "start": { "line": 12, "column": 46 }, "end": { "line": 12, "column": 76 } }, "callee": { "type": "MemberExpression", "start": 331, "end": 351, "loc": { "start": { "line": 12, "column": 46 }, "end": { "line": 12, "column": 66 } }, "object": { "type": "CallExpression", "start": 331, "end": 343, "loc": { "start": { "line": 12, "column": 46 }, "end": { "line": 12, "column": 58 } }, "callee": { "type": "Identifier", "start": 331, "end": 340, "loc": { "start": { "line": 12, "column": 46 }, "end": { "line": 12, "column": 55 }, "identifierName": "snakeCase" }, "name": "snakeCase" }, "arguments": [ { "type": "Identifier", "start": 341, "end": 342, "loc": { "start": { "line": 12, "column": 56 }, "end": { "line": 12, "column": 57 }, "identifierName": "p" }, "name": "p" } ] }, "property": { "type": "Identifier", "start": 344, "end": 351, "loc": { "start": { "line": 12, "column": 59 }, "end": { "line": 12, "column": 66 }, "identifierName": "replace" }, "name": "replace" }, "computed": false }, "arguments": [ { "type": "RegExpLiteral", "start": 352, "end": 356, "loc": { "start": { "line": 12, "column": 67 }, "end": { "line": 12, "column": 71 } }, "extra": { "raw": "/-/g" }, "pattern": "-", "flags": "g" }, { "type": "StringLiteral", "start": 357, "end": 360, "loc": { "start": { "line": 12, "column": 72 }, "end": { "line": 12, "column": 75 } }, "extra": { "rawValue": "_", "raw": "'_'" }, "value": "_" } ] } ] } } ], "directives": [] }, "shadow": true } ] } }, { "type": "ObjectProperty", "start": 371, "end": 475, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 110 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 371, "end": 377, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 12 }, "identifierName": "bucket" }, "name": "bucket" }, "value": { "type": "CallExpression", "start": 379, "end": 475, "loc": { "start": { "line": 13, "column": 14 }, "end": { "line": 13, "column": 110 } }, "callee": { "type": "MemberExpression", "start": 379, "end": 448, "loc": { "start": { "line": 13, "column": 14 }, "end": { "line": 13, "column": 83 } }, "object": { "type": "CallExpression", "start": 379, "end": 442, "loc": { "start": { "line": 13, "column": 14 }, "end": { "line": 13, "column": 77 } }, "callee": { "type": "MemberExpression", "start": 379, "end": 394, "loc": { "start": { "line": 13, "column": 14 }, "end": { "line": 13, "column": 29 } }, "object": { "type": "MemberExpression", "start": 379, "end": 390, "loc": { "start": { "line": 13, "column": 14 }, "end": { "line": 13, "column": 25 } }, "object": { "type": "Identifier", "start": 379, "end": 382, "loc": { "start": { "line": 13, "column": 14 }, "end": { "line": 13, "column": 17 }, "identifierName": "doc" }, "name": "doc" }, "property": { "type": "Identifier", "start": 383, "end": 390, "loc": { "start": { "line": 13, "column": 18 }, "end": { "line": 13, "column": 25 }, "identifierName": "idParts" }, "name": "idParts" }, "computed": false }, "property": { "type": "Identifier", "start": 391, "end": 394, "loc": { "start": { "line": 13, "column": 26 }, "end": { "line": 13, "column": 29 }, "identifierName": "map" },