Vincent Sima vor 6 Jahren
Ursprung
Commit
1517fc9a2f
100 geänderte Dateien mit 12705 neuen und 1 gelöschten Zeilen
  1. BIN
      .DS_Store
  2. 0
    1
      PassionProjectUI
  3. 6
    0
      ionic.config.json
  4. 1
    0
      node_modules/.bin/acorn
  5. 1
    0
      node_modules/.bin/atob
  6. 1
    0
      node_modules/.bin/autoprefixer-info
  7. 1
    0
      node_modules/.bin/browserslist
  8. 1
    0
      node_modules/.bin/build-optimizer
  9. 1
    0
      node_modules/.bin/errno
  10. 1
    0
      node_modules/.bin/esparse
  11. 1
    0
      node_modules/.bin/esvalidate
  12. 1
    0
      node_modules/.bin/har-validator
  13. 1
    0
      node_modules/.bin/in-install
  14. 1
    0
      node_modules/.bin/in-publish
  15. 1
    0
      node_modules/.bin/ionic-app-scripts
  16. 1
    0
      node_modules/.bin/js-yaml
  17. 1
    0
      node_modules/.bin/json5
  18. 1
    0
      node_modules/.bin/miller-rabin
  19. 1
    0
      node_modules/.bin/mime
  20. 1
    0
      node_modules/.bin/mkdirp
  21. 1
    0
      node_modules/.bin/ng-xi18n
  22. 1
    0
      node_modules/.bin/ngc
  23. 1
    0
      node_modules/.bin/node-gyp
  24. 1
    0
      node_modules/.bin/node-sass
  25. 1
    0
      node_modules/.bin/nopt
  26. 1
    0
      node_modules/.bin/not-in-install
  27. 1
    0
      node_modules/.bin/not-in-publish
  28. 1
    0
      node_modules/.bin/purify
  29. 1
    0
      node_modules/.bin/rimraf
  30. 1
    0
      node_modules/.bin/rollup
  31. 1
    0
      node_modules/.bin/sassgraph
  32. 1
    0
      node_modules/.bin/semver
  33. 1
    0
      node_modules/.bin/sha.js
  34. 1
    0
      node_modules/.bin/sshpk-conv
  35. 1
    0
      node_modules/.bin/sshpk-sign
  36. 1
    0
      node_modules/.bin/sshpk-verify
  37. 1
    0
      node_modules/.bin/strip-indent
  38. 1
    0
      node_modules/.bin/tsc
  39. 1
    0
      node_modules/.bin/tsickle
  40. 1
    0
      node_modules/.bin/tslint
  41. 1
    0
      node_modules/.bin/tsserver
  42. 1
    0
      node_modules/.bin/uglifyjs
  43. 1
    0
      node_modules/.bin/uuid
  44. 1
    0
      node_modules/.bin/webpack
  45. 1
    0
      node_modules/.bin/which
  46. 21
    0
      node_modules/@angular-devkit/build-optimizer/LICENSE
  47. 226
    0
      node_modules/@angular-devkit/build-optimizer/README.md
  48. 301
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/CHANGELOG.md
  49. 28
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/LICENSE
  50. 729
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/README.md
  51. 3091
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/dist/source-map.debug.js
  52. 3090
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/dist/source-map.js
  53. 2
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/dist/source-map.min.js
  54. 1
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/dist/source-map.min.js.map
  55. 121
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/array-set.js
  56. 140
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/base64-vlq.js
  57. 67
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/base64.js
  58. 111
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/binary-search.js
  59. 79
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/mapping-list.js
  60. 114
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/quick-sort.js
  61. 1082
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/source-map-consumer.js
  62. 416
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/source-map-generator.js
  63. 413
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/source-node.js
  64. 417
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/util.js
  65. 211
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/package.json
  66. 8
    0
      node_modules/@angular-devkit/build-optimizer/node_modules/source-map/source-map.js
  67. 65
    0
      node_modules/@angular-devkit/build-optimizer/package.json
  68. 11
    0
      node_modules/@angular-devkit/build-optimizer/src/build-optimizer/build-optimizer.d.ts
  69. 98
    0
      node_modules/@angular-devkit/build-optimizer/src/build-optimizer/build-optimizer.js
  70. 0
    0
      node_modules/@angular-devkit/build-optimizer/src/build-optimizer/cli.d.ts
  71. 38
    0
      node_modules/@angular-devkit/build-optimizer/src/build-optimizer/cli.js
  72. 10
    0
      node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.d.ts
  73. 63
    0
      node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js
  74. 13
    0
      node_modules/@angular-devkit/build-optimizer/src/helpers/ast-utils.d.ts
  75. 39
    0
      node_modules/@angular-devkit/build-optimizer/src/helpers/ast-utils.js
  76. 23
    0
      node_modules/@angular-devkit/build-optimizer/src/helpers/transform-javascript.d.ts
  77. 119
    0
      node_modules/@angular-devkit/build-optimizer/src/helpers/transform-javascript.js
  78. 18
    0
      node_modules/@angular-devkit/build-optimizer/src/index.d.ts
  79. 36
    0
      node_modules/@angular-devkit/build-optimizer/src/index.js
  80. 0
    0
      node_modules/@angular-devkit/build-optimizer/src/purify/cli.d.ts
  81. 27
    0
      node_modules/@angular-devkit/build-optimizer/src/purify/cli.js
  82. 6
    0
      node_modules/@angular-devkit/build-optimizer/src/purify/purify.d.ts
  83. 53
    0
      node_modules/@angular-devkit/build-optimizer/src/purify/purify.js
  84. 12
    0
      node_modules/@angular-devkit/build-optimizer/src/purify/webpack-plugin.d.ts
  85. 31
    0
      node_modules/@angular-devkit/build-optimizer/src/purify/webpack-plugin.js
  86. 9
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/class-fold.d.ts
  87. 142
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/class-fold.js
  88. 10
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/import-tslib.d.ts
  89. 75
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/import-tslib.js
  90. 10
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/prefix-classes.d.ts
  91. 162
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/prefix-classes.js
  92. 11
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/prefix-functions.d.ts
  93. 96
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/prefix-functions.js
  94. 11
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.d.ts
  95. 505
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js
  96. 10
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/wrap-enums.d.ts
  97. 277
    0
      node_modules/@angular-devkit/build-optimizer/src/transforms/wrap-enums.js
  98. 3
    0
      node_modules/@angular-devkit/build-optimizer/webpack-loader/package.json
  99. 6
    0
      node_modules/@angular/animations/README.md
  100. 0
    0
      node_modules/@angular/animations/animations.d.ts

BIN
.DS_Store Datei anzeigen


+ 0
- 1
PassionProjectUI

@@ -1 +0,0 @@
1
-Subproject commit de173f70b74c83042cd1b4d5f7a868be0ca04af6

+ 6
- 0
ionic.config.json Datei anzeigen

@@ -0,0 +1,6 @@
1
+{
2
+  "name": "PassionApp",
3
+  "app_id": "",
4
+  "type": "ionic-angular",
5
+  "integrations": {}
6
+}

+ 1
- 0
node_modules/.bin/acorn Datei anzeigen

@@ -0,0 +1 @@
1
+../acorn/bin/acorn

+ 1
- 0
node_modules/.bin/atob Datei anzeigen

@@ -0,0 +1 @@
1
+../atob/bin/atob.js

+ 1
- 0
node_modules/.bin/autoprefixer-info Datei anzeigen

@@ -0,0 +1 @@
1
+../autoprefixer/bin/autoprefixer-info

+ 1
- 0
node_modules/.bin/browserslist Datei anzeigen

@@ -0,0 +1 @@
1
+../browserslist/cli.js

+ 1
- 0
node_modules/.bin/build-optimizer Datei anzeigen

@@ -0,0 +1 @@
1
+../@angular-devkit/build-optimizer/src/build-optimizer/cli.js

+ 1
- 0
node_modules/.bin/errno Datei anzeigen

@@ -0,0 +1 @@
1
+../errno/cli.js

+ 1
- 0
node_modules/.bin/esparse Datei anzeigen

@@ -0,0 +1 @@
1
+../esprima-fb/bin/esparse.js

+ 1
- 0
node_modules/.bin/esvalidate Datei anzeigen

@@ -0,0 +1 @@
1
+../esprima-fb/bin/esvalidate.js

+ 1
- 0
node_modules/.bin/har-validator Datei anzeigen

@@ -0,0 +1 @@
1
+../har-validator/bin/har-validator

+ 1
- 0
node_modules/.bin/in-install Datei anzeigen

@@ -0,0 +1 @@
1
+../in-publish/in-install.js

+ 1
- 0
node_modules/.bin/in-publish Datei anzeigen

@@ -0,0 +1 @@
1
+../in-publish/in-publish.js

+ 1
- 0
node_modules/.bin/ionic-app-scripts Datei anzeigen

@@ -0,0 +1 @@
1
+../@ionic/app-scripts/bin/ionic-app-scripts.js

+ 1
- 0
node_modules/.bin/js-yaml Datei anzeigen

@@ -0,0 +1 @@
1
+../js-yaml/bin/js-yaml.js

+ 1
- 0
node_modules/.bin/json5 Datei anzeigen

@@ -0,0 +1 @@
1
+../json5/lib/cli.js

+ 1
- 0
node_modules/.bin/miller-rabin Datei anzeigen

@@ -0,0 +1 @@
1
+../miller-rabin/bin/miller-rabin

+ 1
- 0
node_modules/.bin/mime Datei anzeigen

@@ -0,0 +1 @@
1
+../mime/cli.js

+ 1
- 0
node_modules/.bin/mkdirp Datei anzeigen

@@ -0,0 +1 @@
1
+../mkdirp/bin/cmd.js

+ 1
- 0
node_modules/.bin/ng-xi18n Datei anzeigen

@@ -0,0 +1 @@
1
+../@angular/compiler-cli/src/extract_i18n.js

+ 1
- 0
node_modules/.bin/ngc Datei anzeigen

@@ -0,0 +1 @@
1
+../@angular/compiler-cli/src/main.js

+ 1
- 0
node_modules/.bin/node-gyp Datei anzeigen

@@ -0,0 +1 @@
1
+../node-gyp/bin/node-gyp.js

+ 1
- 0
node_modules/.bin/node-sass Datei anzeigen

@@ -0,0 +1 @@
1
+../node-sass/bin/node-sass

+ 1
- 0
node_modules/.bin/nopt Datei anzeigen

@@ -0,0 +1 @@
1
+../nopt/bin/nopt.js

+ 1
- 0
node_modules/.bin/not-in-install Datei anzeigen

@@ -0,0 +1 @@
1
+../in-publish/not-in-install.js

+ 1
- 0
node_modules/.bin/not-in-publish Datei anzeigen

@@ -0,0 +1 @@
1
+../in-publish/not-in-publish.js

+ 1
- 0
node_modules/.bin/purify Datei anzeigen

@@ -0,0 +1 @@
1
+../@angular-devkit/build-optimizer/src/purify/cli.js

+ 1
- 0
node_modules/.bin/rimraf Datei anzeigen

@@ -0,0 +1 @@
1
+../rimraf/bin.js

+ 1
- 0
node_modules/.bin/rollup Datei anzeigen

@@ -0,0 +1 @@
1
+../rollup/bin/rollup

+ 1
- 0
node_modules/.bin/sassgraph Datei anzeigen

@@ -0,0 +1 @@
1
+../sass-graph/bin/sassgraph

+ 1
- 0
node_modules/.bin/semver Datei anzeigen

@@ -0,0 +1 @@
1
+../semver/bin/semver

+ 1
- 0
node_modules/.bin/sha.js Datei anzeigen

@@ -0,0 +1 @@
1
+../sha.js/bin.js

+ 1
- 0
node_modules/.bin/sshpk-conv Datei anzeigen

@@ -0,0 +1 @@
1
+../sshpk/bin/sshpk-conv

+ 1
- 0
node_modules/.bin/sshpk-sign Datei anzeigen

@@ -0,0 +1 @@
1
+../sshpk/bin/sshpk-sign

+ 1
- 0
node_modules/.bin/sshpk-verify Datei anzeigen

@@ -0,0 +1 @@
1
+../sshpk/bin/sshpk-verify

+ 1
- 0
node_modules/.bin/strip-indent Datei anzeigen

@@ -0,0 +1 @@
1
+../strip-indent/cli.js

+ 1
- 0
node_modules/.bin/tsc Datei anzeigen

@@ -0,0 +1 @@
1
+../typescript/bin/tsc

+ 1
- 0
node_modules/.bin/tsickle Datei anzeigen

@@ -0,0 +1 @@
1
+../tsickle/src/main.js

+ 1
- 0
node_modules/.bin/tslint Datei anzeigen

@@ -0,0 +1 @@
1
+../tslint/bin/tslint

+ 1
- 0
node_modules/.bin/tsserver Datei anzeigen

@@ -0,0 +1 @@
1
+../typescript/bin/tsserver

+ 1
- 0
node_modules/.bin/uglifyjs Datei anzeigen

@@ -0,0 +1 @@
1
+../uglify-es/bin/uglifyjs

+ 1
- 0
node_modules/.bin/uuid Datei anzeigen

@@ -0,0 +1 @@
1
+../uuid/bin/uuid

+ 1
- 0
node_modules/.bin/webpack Datei anzeigen

@@ -0,0 +1 @@
1
+../webpack/bin/webpack.js

+ 1
- 0
node_modules/.bin/which Datei anzeigen

@@ -0,0 +1 @@
1
+../which/bin/which

+ 21
- 0
node_modules/@angular-devkit/build-optimizer/LICENSE Datei anzeigen

@@ -0,0 +1,21 @@
1
+The MIT License
2
+
3
+Copyright (c) 2017 Google, Inc.
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.

+ 226
- 0
node_modules/@angular-devkit/build-optimizer/README.md Datei anzeigen

@@ -0,0 +1,226 @@
1
+# Angular Build Optimizer
2
+
3
+Angular Build Optimizer contains Angular optimizations applicable to JavaScript code as a TypeScript transform pipeline.
4
+
5
+
6
+## Available optimizations
7
+
8
+Transformations applied depend on file content:
9
+
10
+- [Class fold](#class-fold), [Scrub file](#scrub-file) and [Prefix functions](#prefix-functions): applied to Angular apps and libraries.
11
+- [Import tslib](#import-tslib): applied when TypeScript helpers are found.
12
+
13
+Non-transform optimizations are applied via the [Purify Plugin](#purify-plugin).
14
+
15
+Some of these optimizations add `/*@__PURE__*/` comments.
16
+These are used by [UglifyJS](https://github.com/mishoo/UglifyJS2) to identify pure functions that can potentially be dropped.
17
+
18
+
19
+### Class fold
20
+
21
+Static properties are folded into ES5 classes:
22
+
23
+```typescript
24
+// input
25
+var Clazz = (function () { function Clazz() { } return Clazz; }());
26
+Clazz.prop = 1;
27
+
28
+// output
29
+var Clazz = (function () { function Clazz() { } Clazz.prop = 1; return Clazz; }());
30
+```
31
+
32
+
33
+### Scrub file
34
+
35
+Angular decorators, property decorators and constructor parameters are removed, while leaving non-Angular ones intact.
36
+
37
+```typescript
38
+// input
39
+import { Injectable, Input, Component } from '@angular/core';
40
+import { NotInjectable, NotComponent, NotInput } from 'another-lib';
41
+var Clazz = (function () { function Clazz() { } return Clazz; }());
42
+Clazz.decorators = [{ type: Injectable }, { type: NotInjectable }];
43
+Clazz.propDecorators = { 'ngIf': [{ type: Input }] };
44
+Clazz.ctorParameters = function () { return [{type: Injector}]; };
45
+var ComponentClazz = (function () {
46
+  function ComponentClazz() { }
47
+  __decorate([
48
+    Input(),
49
+    __metadata("design:type", Object)
50
+  ], Clazz.prototype, "selected", void 0);
51
+  __decorate([
52
+    NotInput(),
53
+    __metadata("design:type", Object)
54
+  ], Clazz.prototype, "notSelected", void 0);
55
+  ComponentClazz = __decorate([
56
+    NotComponent(),
57
+    Component({
58
+        selector: 'app-root',
59
+        templateUrl: './app.component.html',
60
+        styleUrls: ['./app.component.css']
61
+    })
62
+  ], ComponentClazz);
63
+  return ComponentClazz;
64
+}());
65
+
66
+// output
67
+import { Injectable, Input, Component } from '@angular/core';
68
+import { NotInjectable, NotComponent } from 'another-lib';
69
+var Clazz = (function () { function Clazz() { } return Clazz; }());
70
+Clazz.decorators = [{ type: NotInjectable }];
71
+var ComponentClazz = (function () {
72
+  function ComponentClazz() { }
73
+  __decorate([
74
+    NotInput(),
75
+    __metadata("design:type", Object)
76
+  ], Clazz.prototype, "notSelected", void 0);
77
+  ComponentClazz = __decorate([
78
+    NotComponent()
79
+  ], ComponentClazz);
80
+  return ComponentClazz;
81
+}());
82
+```
83
+
84
+
85
+### Prefix functions
86
+
87
+Adds `/*@__PURE__*/` comments to top level downleveled class declarations and instantiation.
88
+Webpack library imports are also marked as `/*@__PURE__*/` when used with [Purify Plugin](#purify-plugin).
89
+
90
+Warning: this transform assumes the file is a pure module. It should not be used with unpure modules.
91
+
92
+```typescript
93
+// input
94
+var Clazz = (function () { function Clazz() { } return Clazz; }());
95
+var newClazz = new Clazz();
96
+var newClazzTwo = Clazz();
97
+
98
+// output
99
+var Clazz = /*@__PURE__*/ (function () { function Clazz() { } return Clazz; }());
100
+var newClazz = /*@__PURE__*/ new Clazz();
101
+var newClazzTwo = /*@__PURE__*/ Clazz();
102
+```
103
+
104
+
105
+### Prefix Classes
106
+
107
+Adds `/*@__PURE__*/` to downleveled TypeScript classes.
108
+
109
+```typescript
110
+// input
111
+var ReplayEvent = (function () {
112
+    function ReplayEvent(time, value) {
113
+        this.time = time;
114
+        this.value = value;
115
+    }
116
+    return ReplayEvent;
117
+}());
118
+
119
+// output
120
+var ReplayEvent = /*@__PURE__*/ (function () {
121
+    function ReplayEvent(time, value) {
122
+        this.time = time;
123
+        this.value = value;
124
+    }
125
+    return ReplayEvent;
126
+}());
127
+```
128
+
129
+
130
+### Import tslib
131
+
132
+TypeScript helpers (`__extends/__decorate/__metadata/__param`) are replaced with `tslib` imports whenever found.
133
+
134
+```typescript
135
+// input
136
+var __extends = (this && this.__extends) || function (d, b) {
137
+  for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
138
+  function __() { this.constructor = d; }
139
+  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
140
+};
141
+
142
+// output
143
+import { __extends } from "tslib";
144
+```
145
+
146
+### Wrap enums
147
+
148
+Wrap downleveled TypeScript enums in a function, and adds `/*@__PURE__*/` comment.
149
+
150
+```typescript
151
+// input
152
+var ChangeDetectionStrategy;
153
+(function (ChangeDetectionStrategy) {
154
+    ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
155
+    ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
156
+})(ChangeDetectionStrategy || (ChangeDetectionStrategy = {}));
157
+
158
+// output
159
+var ChangeDetectionStrategy = /*@__PURE__*/ (function () {
160
+  var ChangeDetectionStrategy = {};
161
+  ChangeDetectionStrategy[ChangeDetectionStrategy["OnPush"] = 0] = "OnPush";
162
+  ChangeDetectionStrategy[ChangeDetectionStrategy["Default"] = 1] = "Default";
163
+  return ChangeDetectionStrategy;
164
+})();
165
+```
166
+
167
+
168
+### Purify Plugin
169
+
170
+Performs regex based replacements on all bundles that add `/*@__PURE__*/` comments to
171
+known pure webpack imports (used with [Prefix functions](#prefix-functions)).
172
+
173
+
174
+## Library Usage
175
+
176
+```typescript
177
+import { buildOptimizer } from '@angular-devkit/build-optimizer';
178
+
179
+const transpiledContent = buildOptimizer({ content: input }).content;
180
+```
181
+
182
+Available options:
183
+```typescript
184
+export interface BuildOptimizerOptions {
185
+  content?: string;
186
+  inputFilePath?: string;
187
+  outputFilePath?: string;
188
+  emitSourceMap?: boolean;
189
+  strict?: boolean;
190
+  isSideEffectFree?: boolean;
191
+}
192
+```
193
+
194
+
195
+## Webpack loader and plugin usage:
196
+
197
+```typescript
198
+const PurifyPlugin = require('@angular-devkit/build-optimizer').PurifyPlugin;
199
+
200
+module.exports = {
201
+  module: {
202
+    rules: [
203
+      {
204
+        test: /\.js$/,
205
+        loader: '@angular-devkit/build-optimizer/webpack-loader',
206
+        options: {
207
+          sourceMap: false
208
+        }
209
+      }
210
+    ]
211
+  },
212
+  plugins: [
213
+    new PurifyPlugin()
214
+  ]
215
+}
216
+```
217
+
218
+
219
+## CLI usage
220
+
221
+```bash
222
+build-optimizer input.js
223
+build-optimizer input.js output.js
224
+purify input.js
225
+purify input.js output.js
226
+```

+ 301
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/CHANGELOG.md Datei anzeigen

@@ -0,0 +1,301 @@
1
+# Change Log
2
+
3
+## 0.5.6
4
+
5
+* Fix for regression when people were using numbers as names in source maps. See
6
+  #236.
7
+
8
+## 0.5.5
9
+
10
+* Fix "regression" of unsupported, implementation behavior that half the world
11
+  happens to have come to depend on. See #235.
12
+
13
+* Fix regression involving function hoisting in SpiderMonkey. See #233.
14
+
15
+## 0.5.4
16
+
17
+* Large performance improvements to source-map serialization. See #228 and #229.
18
+
19
+## 0.5.3
20
+
21
+* Do not include unnecessary distribution files. See
22
+  commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86.
23
+
24
+## 0.5.2
25
+
26
+* Include browser distributions of the library in package.json's `files`. See
27
+  issue #212.
28
+
29
+## 0.5.1
30
+
31
+* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See
32
+  ff05274becc9e6e1295ed60f3ea090d31d843379.
33
+
34
+## 0.5.0
35
+
36
+* Node 0.8 is no longer supported.
37
+
38
+* Use webpack instead of dryice for bundling.
39
+
40
+* Big speedups serializing source maps. See pull request #203.
41
+
42
+* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that
43
+  explicitly start with the source root. See issue #199.
44
+
45
+## 0.4.4
46
+
47
+* Fix an issue where using a `SourceMapGenerator` after having created a
48
+  `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See
49
+  issue #191.
50
+
51
+* Fix an issue with where `SourceMapGenerator` would mistakenly consider
52
+  different mappings as duplicates of each other and avoid generating them. See
53
+  issue #192.
54
+
55
+## 0.4.3
56
+
57
+* A very large number of performance improvements, particularly when parsing
58
+  source maps. Collectively about 75% of time shaved off of the source map
59
+  parsing benchmark!
60
+
61
+* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy
62
+  searching in the presence of a column option. See issue #177.
63
+
64
+* Fix a bug with joining a source and its source root when the source is above
65
+  the root. See issue #182.
66
+
67
+* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to
68
+  determine when all sources' contents are inlined into the source map. See
69
+  issue #190.
70
+
71
+## 0.4.2
72
+
73
+* Add an `.npmignore` file so that the benchmarks aren't pulled down by
74
+  dependent projects. Issue #169.
75
+
76
+* Add an optional `column` argument to
77
+  `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines
78
+  with no mappings. Issues #172 and #173.
79
+
80
+## 0.4.1
81
+
82
+* Fix accidentally defining a global variable. #170.
83
+
84
+## 0.4.0
85
+
86
+* The default direction for fuzzy searching was changed back to its original
87
+  direction. See #164.
88
+
89
+* There is now a `bias` option you can supply to `SourceMapConsumer` to control
90
+  the fuzzy searching direction. See #167.
91
+
92
+* About an 8% speed up in parsing source maps. See #159.
93
+
94
+* Added a benchmark for parsing and generating source maps.
95
+
96
+## 0.3.0
97
+
98
+* Change the default direction that searching for positions fuzzes when there is
99
+  not an exact match. See #154.
100
+
101
+* Support for environments using json2.js for JSON serialization. See #156.
102
+
103
+## 0.2.0
104
+
105
+* Support for consuming "indexed" source maps which do not have any remote
106
+  sections. See pull request #127. This introduces a minor backwards
107
+  incompatibility if you are monkey patching `SourceMapConsumer.prototype`
108
+  methods.
109
+
110
+## 0.1.43
111
+
112
+* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue
113
+  #148 for some discussion and issues #150, #151, and #152 for implementations.
114
+
115
+## 0.1.42
116
+
117
+* Fix an issue where `SourceNode`s from different versions of the source-map
118
+  library couldn't be used in conjunction with each other. See issue #142.
119
+
120
+## 0.1.41
121
+
122
+* Fix a bug with getting the source content of relative sources with a "./"
123
+  prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768).
124
+
125
+* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the
126
+  column span of each mapping.
127
+
128
+* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find
129
+  all generated positions associated with a given original source and line.
130
+
131
+## 0.1.40
132
+
133
+* Performance improvements for parsing source maps in SourceMapConsumer.
134
+
135
+## 0.1.39
136
+
137
+* Fix a bug where setting a source's contents to null before any source content
138
+  had been set before threw a TypeError. See issue #131.
139
+
140
+## 0.1.38
141
+
142
+* Fix a bug where finding relative paths from an empty path were creating
143
+  absolute paths. See issue #129.
144
+
145
+## 0.1.37
146
+
147
+* Fix a bug where if the source root was an empty string, relative source paths
148
+  would turn into absolute source paths. Issue #124.
149
+
150
+## 0.1.36
151
+
152
+* Allow the `names` mapping property to be an empty string. Issue #121.
153
+
154
+## 0.1.35
155
+
156
+* A third optional parameter was added to `SourceNode.fromStringWithSourceMap`
157
+  to specify a path that relative sources in the second parameter should be
158
+  relative to. Issue #105.
159
+
160
+* If no file property is given to a `SourceMapGenerator`, then the resulting
161
+  source map will no longer have a `null` file property. The property will
162
+  simply not exist. Issue #104.
163
+
164
+* Fixed a bug where consecutive newlines were ignored in `SourceNode`s.
165
+  Issue #116.
166
+
167
+## 0.1.34
168
+
169
+* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103.
170
+
171
+* Fix bug involving source contents and the
172
+  `SourceMapGenerator.prototype.applySourceMap`. Issue #100.
173
+
174
+## 0.1.33
175
+
176
+* Fix some edge cases surrounding path joining and URL resolution.
177
+
178
+* Add a third parameter for relative path to
179
+  `SourceMapGenerator.prototype.applySourceMap`.
180
+
181
+* Fix issues with mappings and EOLs.
182
+
183
+## 0.1.32
184
+
185
+* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns
186
+  (issue 92).
187
+
188
+* Fixed test runner to actually report number of failed tests as its process
189
+  exit code.
190
+
191
+* Fixed a typo when reporting bad mappings (issue 87).
192
+
193
+## 0.1.31
194
+
195
+* Delay parsing the mappings in SourceMapConsumer until queried for a source
196
+  location.
197
+
198
+* Support Sass source maps (which at the time of writing deviate from the spec
199
+  in small ways) in SourceMapConsumer.
200
+
201
+## 0.1.30
202
+
203
+* Do not join source root with a source, when the source is a data URI.
204
+
205
+* Extend the test runner to allow running single specific test files at a time.
206
+
207
+* Performance improvements in `SourceNode.prototype.walk` and
208
+  `SourceMapConsumer.prototype.eachMapping`.
209
+
210
+* Source map browser builds will now work inside Workers.
211
+
212
+* Better error messages when attempting to add an invalid mapping to a
213
+  `SourceMapGenerator`.
214
+
215
+## 0.1.29
216
+
217
+* Allow duplicate entries in the `names` and `sources` arrays of source maps
218
+  (usually from TypeScript) we are parsing. Fixes github issue 72.
219
+
220
+## 0.1.28
221
+
222
+* Skip duplicate mappings when creating source maps from SourceNode; github
223
+  issue 75.
224
+
225
+## 0.1.27
226
+
227
+* Don't throw an error when the `file` property is missing in SourceMapConsumer,
228
+  we don't use it anyway.
229
+
230
+## 0.1.26
231
+
232
+* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70.
233
+
234
+## 0.1.25
235
+
236
+* Make compatible with browserify
237
+
238
+## 0.1.24
239
+
240
+* Fix issue with absolute paths and `file://` URIs. See
241
+  https://bugzilla.mozilla.org/show_bug.cgi?id=885597
242
+
243
+## 0.1.23
244
+
245
+* Fix issue with absolute paths and sourcesContent, github issue 64.
246
+
247
+## 0.1.22
248
+
249
+* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21.
250
+
251
+## 0.1.21
252
+
253
+* Fixed handling of sources that start with a slash so that they are relative to
254
+  the source root's host.
255
+
256
+## 0.1.20
257
+
258
+* Fixed github issue #43: absolute URLs aren't joined with the source root
259
+  anymore.
260
+
261
+## 0.1.19
262
+
263
+* Using Travis CI to run tests.
264
+
265
+## 0.1.18
266
+
267
+* Fixed a bug in the handling of sourceRoot.
268
+
269
+## 0.1.17
270
+
271
+* Added SourceNode.fromStringWithSourceMap.
272
+
273
+## 0.1.16
274
+
275
+* Added missing documentation.
276
+
277
+* Fixed the generating of empty mappings in SourceNode.
278
+
279
+## 0.1.15
280
+
281
+* Added SourceMapGenerator.applySourceMap.
282
+
283
+## 0.1.14
284
+
285
+* The sourceRoot is now handled consistently.
286
+
287
+## 0.1.13
288
+
289
+* Added SourceMapGenerator.fromSourceMap.
290
+
291
+## 0.1.12
292
+
293
+* SourceNode now generates empty mappings too.
294
+
295
+## 0.1.11
296
+
297
+* Added name support to SourceNode.
298
+
299
+## 0.1.10
300
+
301
+* Added sourcesContent support to the customer and generator.

+ 28
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/LICENSE Datei anzeigen

@@ -0,0 +1,28 @@
1
+
2
+Copyright (c) 2009-2011, Mozilla Foundation and contributors
3
+All rights reserved.
4
+
5
+Redistribution and use in source and binary forms, with or without
6
+modification, are permitted provided that the following conditions are met:
7
+
8
+* Redistributions of source code must retain the above copyright notice, this
9
+  list of conditions and the following disclaimer.
10
+
11
+* Redistributions in binary form must reproduce the above copyright notice,
12
+  this list of conditions and the following disclaimer in the documentation
13
+  and/or other materials provided with the distribution.
14
+
15
+* Neither the names of the Mozilla Foundation nor the names of project
16
+  contributors may be used to endorse or promote products derived from this
17
+  software without specific prior written permission.
18
+
19
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 729
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/README.md Datei anzeigen

@@ -0,0 +1,729 @@
1
+# Source Map
2
+
3
+[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map)
4
+
5
+[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map)
6
+
7
+This is a library to generate and consume the source map format
8
+[described here][format].
9
+
10
+[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
11
+
12
+## Use with Node
13
+
14
+    $ npm install source-map
15
+
16
+## Use on the Web
17
+
18
+    <script src="https://raw.githubusercontent.com/mozilla/source-map/master/dist/source-map.min.js" defer></script>
19
+
20
+--------------------------------------------------------------------------------
21
+
22
+<!-- `npm run toc` to regenerate the Table of Contents -->
23
+
24
+<!-- START doctoc generated TOC please keep comment here to allow auto update -->
25
+<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
26
+## Table of Contents
27
+
28
+- [Examples](#examples)
29
+  - [Consuming a source map](#consuming-a-source-map)
30
+  - [Generating a source map](#generating-a-source-map)
31
+    - [With SourceNode (high level API)](#with-sourcenode-high-level-api)
32
+    - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api)
33
+- [API](#api)
34
+  - [SourceMapConsumer](#sourcemapconsumer)
35
+    - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap)
36
+    - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans)
37
+    - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition)
38
+    - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition)
39
+    - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition)
40
+    - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources)
41
+    - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing)
42
+    - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order)
43
+  - [SourceMapGenerator](#sourcemapgenerator)
44
+    - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap)
45
+    - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer)
46
+    - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping)
47
+    - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent)
48
+    - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath)
49
+    - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring)
50
+  - [SourceNode](#sourcenode)
51
+    - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name)
52
+    - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath)
53
+    - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk)
54
+    - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk)
55
+    - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent)
56
+    - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn)
57
+    - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn)
58
+    - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep)
59
+    - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement)
60
+    - [SourceNode.prototype.toString()](#sourcenodeprototypetostring)
61
+    - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap)
62
+
63
+<!-- END doctoc generated TOC please keep comment here to allow auto update -->
64
+
65
+## Examples
66
+
67
+### Consuming a source map
68
+
69
+```js
70
+var rawSourceMap = {
71
+  version: 3,
72
+  file: 'min.js',
73
+  names: ['bar', 'baz', 'n'],
74
+  sources: ['one.js', 'two.js'],
75
+  sourceRoot: 'http://example.com/www/js/',
76
+  mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
77
+};
78
+
79
+var smc = new SourceMapConsumer(rawSourceMap);
80
+
81
+console.log(smc.sources);
82
+// [ 'http://example.com/www/js/one.js',
83
+//   'http://example.com/www/js/two.js' ]
84
+
85
+console.log(smc.originalPositionFor({
86
+  line: 2,
87
+  column: 28
88
+}));
89
+// { source: 'http://example.com/www/js/two.js',
90
+//   line: 2,
91
+//   column: 10,
92
+//   name: 'n' }
93
+
94
+console.log(smc.generatedPositionFor({
95
+  source: 'http://example.com/www/js/two.js',
96
+  line: 2,
97
+  column: 10
98
+}));
99
+// { line: 2, column: 28 }
100
+
101
+smc.eachMapping(function (m) {
102
+  // ...
103
+});
104
+```
105
+
106
+### Generating a source map
107
+
108
+In depth guide:
109
+[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)
110
+
111
+#### With SourceNode (high level API)
112
+
113
+```js
114
+function compile(ast) {
115
+  switch (ast.type) {
116
+  case 'BinaryExpression':
117
+    return new SourceNode(
118
+      ast.location.line,
119
+      ast.location.column,
120
+      ast.location.source,
121
+      [compile(ast.left), " + ", compile(ast.right)]
122
+    );
123
+  case 'Literal':
124
+    return new SourceNode(
125
+      ast.location.line,
126
+      ast.location.column,
127
+      ast.location.source,
128
+      String(ast.value)
129
+    );
130
+  // ...
131
+  default:
132
+    throw new Error("Bad AST");
133
+  }
134
+}
135
+
136
+var ast = parse("40 + 2", "add.js");
137
+console.log(compile(ast).toStringWithSourceMap({
138
+  file: 'add.js'
139
+}));
140
+// { code: '40 + 2',
141
+//   map: [object SourceMapGenerator] }
142
+```
143
+
144
+#### With SourceMapGenerator (low level API)
145
+
146
+```js
147
+var map = new SourceMapGenerator({
148
+  file: "source-mapped.js"
149
+});
150
+
151
+map.addMapping({
152
+  generated: {
153
+    line: 10,
154
+    column: 35
155
+  },
156
+  source: "foo.js",
157
+  original: {
158
+    line: 33,
159
+    column: 2
160
+  },
161
+  name: "christopher"
162
+});
163
+
164
+console.log(map.toString());
165
+// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}'
166
+```
167
+
168
+## API
169
+
170
+Get a reference to the module:
171
+
172
+```js
173
+// Node.js
174
+var sourceMap = require('source-map');
175
+
176
+// Browser builds
177
+var sourceMap = window.sourceMap;
178
+
179
+// Inside Firefox
180
+const sourceMap = require("devtools/toolkit/sourcemap/source-map.js");
181
+```
182
+
183
+### SourceMapConsumer
184
+
185
+A SourceMapConsumer instance represents a parsed source map which we can query
186
+for information about the original file positions by giving it a file position
187
+in the generated source.
188
+
189
+#### new SourceMapConsumer(rawSourceMap)
190
+
191
+The only parameter is the raw source map (either as a string which can be
192
+`JSON.parse`'d, or an object). According to the spec, source maps have the
193
+following attributes:
194
+
195
+* `version`: Which version of the source map spec this map is following.
196
+
197
+* `sources`: An array of URLs to the original source files.
198
+
199
+* `names`: An array of identifiers which can be referenced by individual
200
+  mappings.
201
+
202
+* `sourceRoot`: Optional. The URL root from which all sources are relative.
203
+
204
+* `sourcesContent`: Optional. An array of contents of the original source files.
205
+
206
+* `mappings`: A string of base64 VLQs which contain the actual mappings.
207
+
208
+* `file`: Optional. The generated filename this source map is associated with.
209
+
210
+```js
211
+var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData);
212
+```
213
+
214
+#### SourceMapConsumer.prototype.computeColumnSpans()
215
+
216
+Compute the last column for each generated mapping. The last column is
217
+inclusive.
218
+
219
+```js
220
+// Before:
221
+consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
222
+// [ { line: 2,
223
+//     column: 1 },
224
+//   { line: 2,
225
+//     column: 10 },
226
+//   { line: 2,
227
+//     column: 20 } ]
228
+
229
+consumer.computeColumnSpans();
230
+
231
+// After:
232
+consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
233
+// [ { line: 2,
234
+//     column: 1,
235
+//     lastColumn: 9 },
236
+//   { line: 2,
237
+//     column: 10,
238
+//     lastColumn: 19 },
239
+//   { line: 2,
240
+//     column: 20,
241
+//     lastColumn: Infinity } ]
242
+
243
+```
244
+
245
+#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)
246
+
247
+Returns the original source, line, and column information for the generated
248
+source's line and column positions provided. The only argument is an object with
249
+the following properties:
250
+
251
+* `line`: The line number in the generated source.
252
+
253
+* `column`: The column number in the generated source.
254
+
255
+* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or
256
+  `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest
257
+  element that is smaller than or greater than the one we are searching for,
258
+  respectively, if the exact element cannot be found.  Defaults to
259
+  `SourceMapConsumer.GREATEST_LOWER_BOUND`.
260
+
261
+and an object is returned with the following properties:
262
+
263
+* `source`: The original source file, or null if this information is not
264
+  available.
265
+
266
+* `line`: The line number in the original source, or null if this information is
267
+  not available.
268
+
269
+* `column`: The column number in the original source, or null if this
270
+  information is not available.
271
+
272
+* `name`: The original identifier, or null if this information is not available.
273
+
274
+```js
275
+consumer.originalPositionFor({ line: 2, column: 10 })
276
+// { source: 'foo.coffee',
277
+//   line: 2,
278
+//   column: 2,
279
+//   name: null }
280
+
281
+consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 })
282
+// { source: null,
283
+//   line: null,
284
+//   column: null,
285
+//   name: null }
286
+```
287
+
288
+#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
289
+
290
+Returns the generated line and column information for the original source,
291
+line, and column positions provided. The only argument is an object with
292
+the following properties:
293
+
294
+* `source`: The filename of the original source.
295
+
296
+* `line`: The line number in the original source.
297
+
298
+* `column`: The column number in the original source.
299
+
300
+and an object is returned with the following properties:
301
+
302
+* `line`: The line number in the generated source, or null.
303
+
304
+* `column`: The column number in the generated source, or null.
305
+
306
+```js
307
+consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 })
308
+// { line: 1,
309
+//   column: 56 }
310
+```
311
+
312
+#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
313
+
314
+Returns all generated line and column information for the original source, line,
315
+and column provided. If no column is provided, returns all mappings
316
+corresponding to a either the line we are searching for or the next closest line
317
+that has any mappings. Otherwise, returns all mappings corresponding to the
318
+given line and either the column we are searching for or the next closest column
319
+that has any offsets.
320
+
321
+The only argument is an object with the following properties:
322
+
323
+* `source`: The filename of the original source.
324
+
325
+* `line`: The line number in the original source.
326
+
327
+* `column`: Optional. The column number in the original source.
328
+
329
+and an array of objects is returned, each with the following properties:
330
+
331
+* `line`: The line number in the generated source, or null.
332
+
333
+* `column`: The column number in the generated source, or null.
334
+
335
+```js
336
+consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" })
337
+// [ { line: 2,
338
+//     column: 1 },
339
+//   { line: 2,
340
+//     column: 10 },
341
+//   { line: 2,
342
+//     column: 20 } ]
343
+```
344
+
345
+#### SourceMapConsumer.prototype.hasContentsOfAllSources()
346
+
347
+Return true if we have the embedded source content for every source listed in
348
+the source map, false otherwise.
349
+
350
+In other words, if this method returns `true`, then
351
+`consumer.sourceContentFor(s)` will succeed for every source `s` in
352
+`consumer.sources`.
353
+
354
+```js
355
+// ...
356
+if (consumer.hasContentsOfAllSources()) {
357
+  consumerReadyCallback(consumer);
358
+} else {
359
+  fetchSources(consumer, consumerReadyCallback);
360
+}
361
+// ...
362
+```
363
+
364
+#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])
365
+
366
+Returns the original source content for the source provided. The only
367
+argument is the URL of the original source file.
368
+
369
+If the source content for the given source is not found, then an error is
370
+thrown. Optionally, pass `true` as the second param to have `null` returned
371
+instead.
372
+
373
+```js
374
+consumer.sources
375
+// [ "my-cool-lib.clj" ]
376
+
377
+consumer.sourceContentFor("my-cool-lib.clj")
378
+// "..."
379
+
380
+consumer.sourceContentFor("this is not in the source map");
381
+// Error: "this is not in the source map" is not in the source map
382
+
383
+consumer.sourceContentFor("this is not in the source map", true);
384
+// null
385
+```
386
+
387
+#### SourceMapConsumer.prototype.eachMapping(callback, context, order)
388
+
389
+Iterate over each mapping between an original source/line/column and a
390
+generated line/column in this source map.
391
+
392
+* `callback`: The function that is called with each mapping. Mappings have the
393
+  form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,
394
+  name }`
395
+
396
+* `context`: Optional. If specified, this object will be the value of `this`
397
+  every time that `callback` is called.
398
+
399
+* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or
400
+  `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over
401
+  the mappings sorted by the generated file's line/column order or the
402
+  original's source/line/column order, respectively. Defaults to
403
+  `SourceMapConsumer.GENERATED_ORDER`.
404
+
405
+```js
406
+consumer.eachMapping(function (m) { console.log(m); })
407
+// ...
408
+// { source: 'illmatic.js',
409
+//   generatedLine: 1,
410
+//   generatedColumn: 0,
411
+//   originalLine: 1,
412
+//   originalColumn: 0,
413
+//   name: null }
414
+// { source: 'illmatic.js',
415
+//   generatedLine: 2,
416
+//   generatedColumn: 0,
417
+//   originalLine: 2,
418
+//   originalColumn: 0,
419
+//   name: null }
420
+// ...
421
+```
422
+### SourceMapGenerator
423
+
424
+An instance of the SourceMapGenerator represents a source map which is being
425
+built incrementally.
426
+
427
+#### new SourceMapGenerator([startOfSourceMap])
428
+
429
+You may pass an object with the following properties:
430
+
431
+* `file`: The filename of the generated source that this source map is
432
+  associated with.
433
+
434
+* `sourceRoot`: A root for all relative URLs in this source map.
435
+
436
+* `skipValidation`: Optional. When `true`, disables validation of mappings as
437
+  they are added. This can improve performance but should be used with
438
+  discretion, as a last resort. Even then, one should avoid using this flag when
439
+  running tests, if possible.
440
+
441
+```js
442
+var generator = new sourceMap.SourceMapGenerator({
443
+  file: "my-generated-javascript-file.js",
444
+  sourceRoot: "http://example.com/app/js/"
445
+});
446
+```
447
+
448
+#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)
449
+
450
+Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance.
451
+
452
+* `sourceMapConsumer` The SourceMap.
453
+
454
+```js
455
+var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer);
456
+```
457
+
458
+#### SourceMapGenerator.prototype.addMapping(mapping)
459
+
460
+Add a single mapping from original source line and column to the generated
461
+source's line and column for this source map being created. The mapping object
462
+should have the following properties:
463
+
464
+* `generated`: An object with the generated line and column positions.
465
+
466
+* `original`: An object with the original line and column positions.
467
+
468
+* `source`: The original source file (relative to the sourceRoot).
469
+
470
+* `name`: An optional original token name for this mapping.
471
+
472
+```js
473
+generator.addMapping({
474
+  source: "module-one.scm",
475
+  original: { line: 128, column: 0 },
476
+  generated: { line: 3, column: 456 }
477
+})
478
+```
479
+
480
+#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)
481
+
482
+Set the source content for an original source file.
483
+
484
+* `sourceFile` the URL of the original source file.
485
+
486
+* `sourceContent` the content of the source file.
487
+
488
+```js
489
+generator.setSourceContent("module-one.scm",
490
+                           fs.readFileSync("path/to/module-one.scm"))
491
+```
492
+
493
+#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])
494
+
495
+Applies a SourceMap for a source file to the SourceMap.
496
+Each mapping to the supplied source file is rewritten using the
497
+supplied SourceMap. Note: The resolution for the resulting mappings
498
+is the minimum of this map and the supplied map.
499
+
500
+* `sourceMapConsumer`: The SourceMap to be applied.
501
+
502
+* `sourceFile`: Optional. The filename of the source file.
503
+  If omitted, sourceMapConsumer.file will be used, if it exists.
504
+  Otherwise an error will be thrown.
505
+
506
+* `sourceMapPath`: Optional. The dirname of the path to the SourceMap
507
+  to be applied. If relative, it is relative to the SourceMap.
508
+
509
+  This parameter is needed when the two SourceMaps aren't in the same
510
+  directory, and the SourceMap to be applied contains relative source
511
+  paths. If so, those relative source paths need to be rewritten
512
+  relative to the SourceMap.
513
+
514
+  If omitted, it is assumed that both SourceMaps are in the same directory,
515
+  thus not needing any rewriting. (Supplying `'.'` has the same effect.)
516
+
517
+#### SourceMapGenerator.prototype.toString()
518
+
519
+Renders the source map being generated to a string.
520
+
521
+```js
522
+generator.toString()
523
+// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}'
524
+```
525
+
526
+### SourceNode
527
+
528
+SourceNodes provide a way to abstract over interpolating and/or concatenating
529
+snippets of generated JavaScript source code, while maintaining the line and
530
+column information associated between those snippets and the original source
531
+code. This is useful as the final intermediate representation a compiler might
532
+use before outputting the generated JS and source map.
533
+
534
+#### new SourceNode([line, column, source[, chunk[, name]]])
535
+
536
+* `line`: The original line number associated with this source node, or null if
537
+  it isn't associated with an original line.
538
+
539
+* `column`: The original column number associated with this source node, or null
540
+  if it isn't associated with an original column.
541
+
542
+* `source`: The original source's filename; null if no filename is provided.
543
+
544
+* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see
545
+  below.
546
+
547
+* `name`: Optional. The original identifier.
548
+
549
+```js
550
+var node = new SourceNode(1, 2, "a.cpp", [
551
+  new SourceNode(3, 4, "b.cpp", "extern int status;\n"),
552
+  new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"),
553
+  new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"),
554
+]);
555
+```
556
+
557
+#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])
558
+
559
+Creates a SourceNode from generated code and a SourceMapConsumer.
560
+
561
+* `code`: The generated code
562
+
563
+* `sourceMapConsumer` The SourceMap for the generated code
564
+
565
+* `relativePath` The optional path that relative sources in `sourceMapConsumer`
566
+  should be relative to.
567
+
568
+```js
569
+var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8"));
570
+var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"),
571
+                                              consumer);
572
+```
573
+
574
+#### SourceNode.prototype.add(chunk)
575
+
576
+Add a chunk of generated JS to this source node.
577
+
578
+* `chunk`: A string snippet of generated JS code, another instance of
579
+   `SourceNode`, or an array where each member is one of those things.
580
+
581
+```js
582
+node.add(" + ");
583
+node.add(otherNode);
584
+node.add([leftHandOperandNode, " + ", rightHandOperandNode]);
585
+```
586
+
587
+#### SourceNode.prototype.prepend(chunk)
588
+
589
+Prepend a chunk of generated JS to this source node.
590
+
591
+* `chunk`: A string snippet of generated JS code, another instance of
592
+   `SourceNode`, or an array where each member is one of those things.
593
+
594
+```js
595
+node.prepend("/** Build Id: f783haef86324gf **/\n\n");
596
+```
597
+
598
+#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)
599
+
600
+Set the source content for a source file. This will be added to the
601
+`SourceMap` in the `sourcesContent` field.
602
+
603
+* `sourceFile`: The filename of the source file
604
+
605
+* `sourceContent`: The content of the source file
606
+
607
+```js
608
+node.setSourceContent("module-one.scm",
609
+                      fs.readFileSync("path/to/module-one.scm"))
610
+```
611
+
612
+#### SourceNode.prototype.walk(fn)
613
+
614
+Walk over the tree of JS snippets in this node and its children. The walking
615
+function is called once for each snippet of JS and is passed that snippet and
616
+the its original associated source's line/column location.
617
+
618
+* `fn`: The traversal function.
619
+
620
+```js
621
+var node = new SourceNode(1, 2, "a.js", [
622
+  new SourceNode(3, 4, "b.js", "uno"),
623
+  "dos",
624
+  [
625
+    "tres",
626
+    new SourceNode(5, 6, "c.js", "quatro")
627
+  ]
628
+]);
629
+
630
+node.walk(function (code, loc) { console.log("WALK:", code, loc); })
631
+// WALK: uno { source: 'b.js', line: 3, column: 4, name: null }
632
+// WALK: dos { source: 'a.js', line: 1, column: 2, name: null }
633
+// WALK: tres { source: 'a.js', line: 1, column: 2, name: null }
634
+// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null }
635
+```
636
+
637
+#### SourceNode.prototype.walkSourceContents(fn)
638
+
639
+Walk over the tree of SourceNodes. The walking function is called for each
640
+source file content and is passed the filename and source content.
641
+
642
+* `fn`: The traversal function.
643
+
644
+```js
645
+var a = new SourceNode(1, 2, "a.js", "generated from a");
646
+a.setSourceContent("a.js", "original a");
647
+var b = new SourceNode(1, 2, "b.js", "generated from b");
648
+b.setSourceContent("b.js", "original b");
649
+var c = new SourceNode(1, 2, "c.js", "generated from c");
650
+c.setSourceContent("c.js", "original c");
651
+
652
+var node = new SourceNode(null, null, null, [a, b, c]);
653
+node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); })
654
+// WALK: a.js : original a
655
+// WALK: b.js : original b
656
+// WALK: c.js : original c
657
+```
658
+
659
+#### SourceNode.prototype.join(sep)
660
+
661
+Like `Array.prototype.join` except for SourceNodes. Inserts the separator
662
+between each of this source node's children.
663
+
664
+* `sep`: The separator.
665
+
666
+```js
667
+var lhs = new SourceNode(1, 2, "a.rs", "my_copy");
668
+var operand = new SourceNode(3, 4, "a.rs", "=");
669
+var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()");
670
+
671
+var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]);
672
+var joinedNode = node.join(" ");
673
+```
674
+
675
+#### SourceNode.prototype.replaceRight(pattern, replacement)
676
+
677
+Call `String.prototype.replace` on the very right-most source snippet. Useful
678
+for trimming white space from the end of a source node, etc.
679
+
680
+* `pattern`: The pattern to replace.
681
+
682
+* `replacement`: The thing to replace the pattern with.
683
+
684
+```js
685
+// Trim trailing white space.
686
+node.replaceRight(/\s*$/, "");
687
+```
688
+
689
+#### SourceNode.prototype.toString()
690
+
691
+Return the string representation of this source node. Walks over the tree and
692
+concatenates all the various snippets together to one string.
693
+
694
+```js
695
+var node = new SourceNode(1, 2, "a.js", [
696
+  new SourceNode(3, 4, "b.js", "uno"),
697
+  "dos",
698
+  [
699
+    "tres",
700
+    new SourceNode(5, 6, "c.js", "quatro")
701
+  ]
702
+]);
703
+
704
+node.toString()
705
+// 'unodostresquatro'
706
+```
707
+
708
+#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])
709
+
710
+Returns the string representation of this tree of source nodes, plus a
711
+SourceMapGenerator which contains all the mappings between the generated and
712
+original sources.
713
+
714
+The arguments are the same as those to `new SourceMapGenerator`.
715
+
716
+```js
717
+var node = new SourceNode(1, 2, "a.js", [
718
+  new SourceNode(3, 4, "b.js", "uno"),
719
+  "dos",
720
+  [
721
+    "tres",
722
+    new SourceNode(5, 6, "c.js", "quatro")
723
+  ]
724
+]);
725
+
726
+node.toStringWithSourceMap({ file: "my-output-file.js" })
727
+// { code: 'unodostresquatro',
728
+//   map: [object SourceMapGenerator] }
729
+```

+ 3091
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/dist/source-map.debug.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 3090
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/dist/source-map.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 2
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/dist/source-map.min.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 1
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/dist/source-map.min.js.map
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 121
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/array-set.js Datei anzeigen

@@ -0,0 +1,121 @@
1
+/* -*- Mode: js; js-indent-level: 2; -*- */
2
+/*
3
+ * Copyright 2011 Mozilla Foundation and contributors
4
+ * Licensed under the New BSD license. See LICENSE or:
5
+ * http://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+
8
+var util = require('./util');
9
+var has = Object.prototype.hasOwnProperty;
10
+var hasNativeMap = typeof Map !== "undefined";
11
+
12
+/**
13
+ * A data structure which is a combination of an array and a set. Adding a new
14
+ * member is O(1), testing for membership is O(1), and finding the index of an
15
+ * element is O(1). Removing elements from the set is not supported. Only
16
+ * strings are supported for membership.
17
+ */
18
+function ArraySet() {
19
+  this._array = [];
20
+  this._set = hasNativeMap ? new Map() : Object.create(null);
21
+}
22
+
23
+/**
24
+ * Static method for creating ArraySet instances from an existing array.
25
+ */
26
+ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
27
+  var set = new ArraySet();
28
+  for (var i = 0, len = aArray.length; i < len; i++) {
29
+    set.add(aArray[i], aAllowDuplicates);
30
+  }
31
+  return set;
32
+};
33
+
34
+/**
35
+ * Return how many unique items are in this ArraySet. If duplicates have been
36
+ * added, than those do not count towards the size.
37
+ *
38
+ * @returns Number
39
+ */
40
+ArraySet.prototype.size = function ArraySet_size() {
41
+  return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
42
+};
43
+
44
+/**
45
+ * Add the given string to this set.
46
+ *
47
+ * @param String aStr
48
+ */
49
+ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
50
+  var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
51
+  var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
52
+  var idx = this._array.length;
53
+  if (!isDuplicate || aAllowDuplicates) {
54
+    this._array.push(aStr);
55
+  }
56
+  if (!isDuplicate) {
57
+    if (hasNativeMap) {
58
+      this._set.set(aStr, idx);
59
+    } else {
60
+      this._set[sStr] = idx;
61
+    }
62
+  }
63
+};
64
+
65
+/**
66
+ * Is the given string a member of this set?
67
+ *
68
+ * @param String aStr
69
+ */
70
+ArraySet.prototype.has = function ArraySet_has(aStr) {
71
+  if (hasNativeMap) {
72
+    return this._set.has(aStr);
73
+  } else {
74
+    var sStr = util.toSetString(aStr);
75
+    return has.call(this._set, sStr);
76
+  }
77
+};
78
+
79
+/**
80
+ * What is the index of the given string in the array?
81
+ *
82
+ * @param String aStr
83
+ */
84
+ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
85
+  if (hasNativeMap) {
86
+    var idx = this._set.get(aStr);
87
+    if (idx >= 0) {
88
+        return idx;
89
+    }
90
+  } else {
91
+    var sStr = util.toSetString(aStr);
92
+    if (has.call(this._set, sStr)) {
93
+      return this._set[sStr];
94
+    }
95
+  }
96
+
97
+  throw new Error('"' + aStr + '" is not in the set.');
98
+};
99
+
100
+/**
101
+ * What is the element at the given index?
102
+ *
103
+ * @param Number aIdx
104
+ */
105
+ArraySet.prototype.at = function ArraySet_at(aIdx) {
106
+  if (aIdx >= 0 && aIdx < this._array.length) {
107
+    return this._array[aIdx];
108
+  }
109
+  throw new Error('No element indexed by ' + aIdx);
110
+};
111
+
112
+/**
113
+ * Returns the array representation of this set (which has the proper indices
114
+ * indicated by indexOf). Note that this is a copy of the internal array used
115
+ * for storing the members so that no one can mess with internal state.
116
+ */
117
+ArraySet.prototype.toArray = function ArraySet_toArray() {
118
+  return this._array.slice();
119
+};
120
+
121
+exports.ArraySet = ArraySet;

+ 140
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/base64-vlq.js Datei anzeigen

@@ -0,0 +1,140 @@
1
+/* -*- Mode: js; js-indent-level: 2; -*- */
2
+/*
3
+ * Copyright 2011 Mozilla Foundation and contributors
4
+ * Licensed under the New BSD license. See LICENSE or:
5
+ * http://opensource.org/licenses/BSD-3-Clause
6
+ *
7
+ * Based on the Base 64 VLQ implementation in Closure Compiler:
8
+ * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
9
+ *
10
+ * Copyright 2011 The Closure Compiler Authors. All rights reserved.
11
+ * Redistribution and use in source and binary forms, with or without
12
+ * modification, are permitted provided that the following conditions are
13
+ * met:
14
+ *
15
+ *  * Redistributions of source code must retain the above copyright
16
+ *    notice, this list of conditions and the following disclaimer.
17
+ *  * Redistributions in binary form must reproduce the above
18
+ *    copyright notice, this list of conditions and the following
19
+ *    disclaimer in the documentation and/or other materials provided
20
+ *    with the distribution.
21
+ *  * Neither the name of Google Inc. nor the names of its
22
+ *    contributors may be used to endorse or promote products derived
23
+ *    from this software without specific prior written permission.
24
+ *
25
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
+ */
37
+
38
+var base64 = require('./base64');
39
+
40
+// A single base 64 digit can contain 6 bits of data. For the base 64 variable
41
+// length quantities we use in the source map spec, the first bit is the sign,
42
+// the next four bits are the actual value, and the 6th bit is the
43
+// continuation bit. The continuation bit tells us whether there are more
44
+// digits in this value following this digit.
45
+//
46
+//   Continuation
47
+//   |    Sign
48
+//   |    |
49
+//   V    V
50
+//   101011
51
+
52
+var VLQ_BASE_SHIFT = 5;
53
+
54
+// binary: 100000
55
+var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
56
+
57
+// binary: 011111
58
+var VLQ_BASE_MASK = VLQ_BASE - 1;
59
+
60
+// binary: 100000
61
+var VLQ_CONTINUATION_BIT = VLQ_BASE;
62
+
63
+/**
64
+ * Converts from a two-complement value to a value where the sign bit is
65
+ * placed in the least significant bit.  For example, as decimals:
66
+ *   1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
67
+ *   2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
68
+ */
69
+function toVLQSigned(aValue) {
70
+  return aValue < 0
71
+    ? ((-aValue) << 1) + 1
72
+    : (aValue << 1) + 0;
73
+}
74
+
75
+/**
76
+ * Converts to a two-complement value from a value where the sign bit is
77
+ * placed in the least significant bit.  For example, as decimals:
78
+ *   2 (10 binary) becomes 1, 3 (11 binary) becomes -1
79
+ *   4 (100 binary) becomes 2, 5 (101 binary) becomes -2
80
+ */
81
+function fromVLQSigned(aValue) {
82
+  var isNegative = (aValue & 1) === 1;
83
+  var shifted = aValue >> 1;
84
+  return isNegative
85
+    ? -shifted
86
+    : shifted;
87
+}
88
+
89
+/**
90
+ * Returns the base 64 VLQ encoded value.
91
+ */
92
+exports.encode = function base64VLQ_encode(aValue) {
93
+  var encoded = "";
94
+  var digit;
95
+
96
+  var vlq = toVLQSigned(aValue);
97
+
98
+  do {
99
+    digit = vlq & VLQ_BASE_MASK;
100
+    vlq >>>= VLQ_BASE_SHIFT;
101
+    if (vlq > 0) {
102
+      // There are still more digits in this value, so we must make sure the
103
+      // continuation bit is marked.
104
+      digit |= VLQ_CONTINUATION_BIT;
105
+    }
106
+    encoded += base64.encode(digit);
107
+  } while (vlq > 0);
108
+
109
+  return encoded;
110
+};
111
+
112
+/**
113
+ * Decodes the next base 64 VLQ value from the given string and returns the
114
+ * value and the rest of the string via the out parameter.
115
+ */
116
+exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
117
+  var strLen = aStr.length;
118
+  var result = 0;
119
+  var shift = 0;
120
+  var continuation, digit;
121
+
122
+  do {
123
+    if (aIndex >= strLen) {
124
+      throw new Error("Expected more digits in base 64 VLQ value.");
125
+    }
126
+
127
+    digit = base64.decode(aStr.charCodeAt(aIndex++));
128
+    if (digit === -1) {
129
+      throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
130
+    }
131
+
132
+    continuation = !!(digit & VLQ_CONTINUATION_BIT);
133
+    digit &= VLQ_BASE_MASK;
134
+    result = result + (digit << shift);
135
+    shift += VLQ_BASE_SHIFT;
136
+  } while (continuation);
137
+
138
+  aOutParam.value = fromVLQSigned(result);
139
+  aOutParam.rest = aIndex;
140
+};

+ 67
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/base64.js Datei anzeigen

@@ -0,0 +1,67 @@
1
+/* -*- Mode: js; js-indent-level: 2; -*- */
2
+/*
3
+ * Copyright 2011 Mozilla Foundation and contributors
4
+ * Licensed under the New BSD license. See LICENSE or:
5
+ * http://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+
8
+var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
9
+
10
+/**
11
+ * Encode an integer in the range of 0 to 63 to a single base 64 digit.
12
+ */
13
+exports.encode = function (number) {
14
+  if (0 <= number && number < intToCharMap.length) {
15
+    return intToCharMap[number];
16
+  }
17
+  throw new TypeError("Must be between 0 and 63: " + number);
18
+};
19
+
20
+/**
21
+ * Decode a single base 64 character code digit to an integer. Returns -1 on
22
+ * failure.
23
+ */
24
+exports.decode = function (charCode) {
25
+  var bigA = 65;     // 'A'
26
+  var bigZ = 90;     // 'Z'
27
+
28
+  var littleA = 97;  // 'a'
29
+  var littleZ = 122; // 'z'
30
+
31
+  var zero = 48;     // '0'
32
+  var nine = 57;     // '9'
33
+
34
+  var plus = 43;     // '+'
35
+  var slash = 47;    // '/'
36
+
37
+  var littleOffset = 26;
38
+  var numberOffset = 52;
39
+
40
+  // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
41
+  if (bigA <= charCode && charCode <= bigZ) {
42
+    return (charCode - bigA);
43
+  }
44
+
45
+  // 26 - 51: abcdefghijklmnopqrstuvwxyz
46
+  if (littleA <= charCode && charCode <= littleZ) {
47
+    return (charCode - littleA + littleOffset);
48
+  }
49
+
50
+  // 52 - 61: 0123456789
51
+  if (zero <= charCode && charCode <= nine) {
52
+    return (charCode - zero + numberOffset);
53
+  }
54
+
55
+  // 62: +
56
+  if (charCode == plus) {
57
+    return 62;
58
+  }
59
+
60
+  // 63: /
61
+  if (charCode == slash) {
62
+    return 63;
63
+  }
64
+
65
+  // Invalid base64 digit.
66
+  return -1;
67
+};

+ 111
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/binary-search.js Datei anzeigen

@@ -0,0 +1,111 @@
1
+/* -*- Mode: js; js-indent-level: 2; -*- */
2
+/*
3
+ * Copyright 2011 Mozilla Foundation and contributors
4
+ * Licensed under the New BSD license. See LICENSE or:
5
+ * http://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+
8
+exports.GREATEST_LOWER_BOUND = 1;
9
+exports.LEAST_UPPER_BOUND = 2;
10
+
11
+/**
12
+ * Recursive implementation of binary search.
13
+ *
14
+ * @param aLow Indices here and lower do not contain the needle.
15
+ * @param aHigh Indices here and higher do not contain the needle.
16
+ * @param aNeedle The element being searched for.
17
+ * @param aHaystack The non-empty array being searched.
18
+ * @param aCompare Function which takes two elements and returns -1, 0, or 1.
19
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
20
+ *     'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
21
+ *     closest element that is smaller than or greater than the one we are
22
+ *     searching for, respectively, if the exact element cannot be found.
23
+ */
24
+function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
25
+  // This function terminates when one of the following is true:
26
+  //
27
+  //   1. We find the exact element we are looking for.
28
+  //
29
+  //   2. We did not find the exact element, but we can return the index of
30
+  //      the next-closest element.
31
+  //
32
+  //   3. We did not find the exact element, and there is no next-closest
33
+  //      element than the one we are searching for, so we return -1.
34
+  var mid = Math.floor((aHigh - aLow) / 2) + aLow;
35
+  var cmp = aCompare(aNeedle, aHaystack[mid], true);
36
+  if (cmp === 0) {
37
+    // Found the element we are looking for.
38
+    return mid;
39
+  }
40
+  else if (cmp > 0) {
41
+    // Our needle is greater than aHaystack[mid].
42
+    if (aHigh - mid > 1) {
43
+      // The element is in the upper half.
44
+      return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
45
+    }
46
+
47
+    // The exact needle element was not found in this haystack. Determine if
48
+    // we are in termination case (3) or (2) and return the appropriate thing.
49
+    if (aBias == exports.LEAST_UPPER_BOUND) {
50
+      return aHigh < aHaystack.length ? aHigh : -1;
51
+    } else {
52
+      return mid;
53
+    }
54
+  }
55
+  else {
56
+    // Our needle is less than aHaystack[mid].
57
+    if (mid - aLow > 1) {
58
+      // The element is in the lower half.
59
+      return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
60
+    }
61
+
62
+    // we are in termination case (3) or (2) and return the appropriate thing.
63
+    if (aBias == exports.LEAST_UPPER_BOUND) {
64
+      return mid;
65
+    } else {
66
+      return aLow < 0 ? -1 : aLow;
67
+    }
68
+  }
69
+}
70
+
71
+/**
72
+ * This is an implementation of binary search which will always try and return
73
+ * the index of the closest element if there is no exact hit. This is because
74
+ * mappings between original and generated line/col pairs are single points,
75
+ * and there is an implicit region between each of them, so a miss just means
76
+ * that you aren't on the very start of a region.
77
+ *
78
+ * @param aNeedle The element you are looking for.
79
+ * @param aHaystack The array that is being searched.
80
+ * @param aCompare A function which takes the needle and an element in the
81
+ *     array and returns -1, 0, or 1 depending on whether the needle is less
82
+ *     than, equal to, or greater than the element, respectively.
83
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
84
+ *     'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
85
+ *     closest element that is smaller than or greater than the one we are
86
+ *     searching for, respectively, if the exact element cannot be found.
87
+ *     Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
88
+ */
89
+exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
90
+  if (aHaystack.length === 0) {
91
+    return -1;
92
+  }
93
+
94
+  var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
95
+                              aCompare, aBias || exports.GREATEST_LOWER_BOUND);
96
+  if (index < 0) {
97
+    return -1;
98
+  }
99
+
100
+  // We have found either the exact element, or the next-closest element than
101
+  // the one we are searching for. However, there may be more than one such
102
+  // element. Make sure we always return the smallest of these.
103
+  while (index - 1 >= 0) {
104
+    if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
105
+      break;
106
+    }
107
+    --index;
108
+  }
109
+
110
+  return index;
111
+};

+ 79
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/mapping-list.js Datei anzeigen

@@ -0,0 +1,79 @@
1
+/* -*- Mode: js; js-indent-level: 2; -*- */
2
+/*
3
+ * Copyright 2014 Mozilla Foundation and contributors
4
+ * Licensed under the New BSD license. See LICENSE or:
5
+ * http://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+
8
+var util = require('./util');
9
+
10
+/**
11
+ * Determine whether mappingB is after mappingA with respect to generated
12
+ * position.
13
+ */
14
+function generatedPositionAfter(mappingA, mappingB) {
15
+  // Optimized for most common case
16
+  var lineA = mappingA.generatedLine;
17
+  var lineB = mappingB.generatedLine;
18
+  var columnA = mappingA.generatedColumn;
19
+  var columnB = mappingB.generatedColumn;
20
+  return lineB > lineA || lineB == lineA && columnB >= columnA ||
21
+         util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
22
+}
23
+
24
+/**
25
+ * A data structure to provide a sorted view of accumulated mappings in a
26
+ * performance conscious manner. It trades a neglibable overhead in general
27
+ * case for a large speedup in case of mappings being added in order.
28
+ */
29
+function MappingList() {
30
+  this._array = [];
31
+  this._sorted = true;
32
+  // Serves as infimum
33
+  this._last = {generatedLine: -1, generatedColumn: 0};
34
+}
35
+
36
+/**
37
+ * Iterate through internal items. This method takes the same arguments that
38
+ * `Array.prototype.forEach` takes.
39
+ *
40
+ * NOTE: The order of the mappings is NOT guaranteed.
41
+ */
42
+MappingList.prototype.unsortedForEach =
43
+  function MappingList_forEach(aCallback, aThisArg) {
44
+    this._array.forEach(aCallback, aThisArg);
45
+  };
46
+
47
+/**
48
+ * Add the given source mapping.
49
+ *
50
+ * @param Object aMapping
51
+ */
52
+MappingList.prototype.add = function MappingList_add(aMapping) {
53
+  if (generatedPositionAfter(this._last, aMapping)) {
54
+    this._last = aMapping;
55
+    this._array.push(aMapping);
56
+  } else {
57
+    this._sorted = false;
58
+    this._array.push(aMapping);
59
+  }
60
+};
61
+
62
+/**
63
+ * Returns the flat, sorted array of mappings. The mappings are sorted by
64
+ * generated position.
65
+ *
66
+ * WARNING: This method returns internal data without copying, for
67
+ * performance. The return value must NOT be mutated, and should be treated as
68
+ * an immutable borrow. If you want to take ownership, you must make your own
69
+ * copy.
70
+ */
71
+MappingList.prototype.toArray = function MappingList_toArray() {
72
+  if (!this._sorted) {
73
+    this._array.sort(util.compareByGeneratedPositionsInflated);
74
+    this._sorted = true;
75
+  }
76
+  return this._array;
77
+};
78
+
79
+exports.MappingList = MappingList;

+ 114
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/quick-sort.js Datei anzeigen

@@ -0,0 +1,114 @@
1
+/* -*- Mode: js; js-indent-level: 2; -*- */
2
+/*
3
+ * Copyright 2011 Mozilla Foundation and contributors
4
+ * Licensed under the New BSD license. See LICENSE or:
5
+ * http://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+
8
+// It turns out that some (most?) JavaScript engines don't self-host
9
+// `Array.prototype.sort`. This makes sense because C++ will likely remain
10
+// faster than JS when doing raw CPU-intensive sorting. However, when using a
11
+// custom comparator function, calling back and forth between the VM's C++ and
12
+// JIT'd JS is rather slow *and* loses JIT type information, resulting in
13
+// worse generated code for the comparator function than would be optimal. In
14
+// fact, when sorting with a comparator, these costs outweigh the benefits of
15
+// sorting in C++. By using our own JS-implemented Quick Sort (below), we get
16
+// a ~3500ms mean speed-up in `bench/bench.html`.
17
+
18
+/**
19
+ * Swap the elements indexed by `x` and `y` in the array `ary`.
20
+ *
21
+ * @param {Array} ary
22
+ *        The array.
23
+ * @param {Number} x
24
+ *        The index of the first item.
25
+ * @param {Number} y
26
+ *        The index of the second item.
27
+ */
28
+function swap(ary, x, y) {
29
+  var temp = ary[x];
30
+  ary[x] = ary[y];
31
+  ary[y] = temp;
32
+}
33
+
34
+/**
35
+ * Returns a random integer within the range `low .. high` inclusive.
36
+ *
37
+ * @param {Number} low
38
+ *        The lower bound on the range.
39
+ * @param {Number} high
40
+ *        The upper bound on the range.
41
+ */
42
+function randomIntInRange(low, high) {
43
+  return Math.round(low + (Math.random() * (high - low)));
44
+}
45
+
46
+/**
47
+ * The Quick Sort algorithm.
48
+ *
49
+ * @param {Array} ary
50
+ *        An array to sort.
51
+ * @param {function} comparator
52
+ *        Function to use to compare two items.
53
+ * @param {Number} p
54
+ *        Start index of the array
55
+ * @param {Number} r
56
+ *        End index of the array
57
+ */
58
+function doQuickSort(ary, comparator, p, r) {
59
+  // If our lower bound is less than our upper bound, we (1) partition the
60
+  // array into two pieces and (2) recurse on each half. If it is not, this is
61
+  // the empty array and our base case.
62
+
63
+  if (p < r) {
64
+    // (1) Partitioning.
65
+    //
66
+    // The partitioning chooses a pivot between `p` and `r` and moves all
67
+    // elements that are less than or equal to the pivot to the before it, and
68
+    // all the elements that are greater than it after it. The effect is that
69
+    // once partition is done, the pivot is in the exact place it will be when
70
+    // the array is put in sorted order, and it will not need to be moved
71
+    // again. This runs in O(n) time.
72
+
73
+    // Always choose a random pivot so that an input array which is reverse
74
+    // sorted does not cause O(n^2) running time.
75
+    var pivotIndex = randomIntInRange(p, r);
76
+    var i = p - 1;
77
+
78
+    swap(ary, pivotIndex, r);
79
+    var pivot = ary[r];
80
+
81
+    // Immediately after `j` is incremented in this loop, the following hold
82
+    // true:
83
+    //
84
+    //   * Every element in `ary[p .. i]` is less than or equal to the pivot.
85
+    //
86
+    //   * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
87
+    for (var j = p; j < r; j++) {
88
+      if (comparator(ary[j], pivot) <= 0) {
89
+        i += 1;
90
+        swap(ary, i, j);
91
+      }
92
+    }
93
+
94
+    swap(ary, i + 1, j);
95
+    var q = i + 1;
96
+
97
+    // (2) Recurse on each half.
98
+
99
+    doQuickSort(ary, comparator, p, q - 1);
100
+    doQuickSort(ary, comparator, q + 1, r);
101
+  }
102
+}
103
+
104
+/**
105
+ * Sort the given array in-place with the given comparator function.
106
+ *
107
+ * @param {Array} ary
108
+ *        An array to sort.
109
+ * @param {function} comparator
110
+ *        Function to use to compare two items.
111
+ */
112
+exports.quickSort = function (ary, comparator) {
113
+  doQuickSort(ary, comparator, 0, ary.length - 1);
114
+};

+ 1082
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/source-map-consumer.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 416
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/source-map-generator.js Datei anzeigen

@@ -0,0 +1,416 @@
1
+/* -*- Mode: js; js-indent-level: 2; -*- */
2
+/*
3
+ * Copyright 2011 Mozilla Foundation and contributors
4
+ * Licensed under the New BSD license. See LICENSE or:
5
+ * http://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+
8
+var base64VLQ = require('./base64-vlq');
9
+var util = require('./util');
10
+var ArraySet = require('./array-set').ArraySet;
11
+var MappingList = require('./mapping-list').MappingList;
12
+
13
+/**
14
+ * An instance of the SourceMapGenerator represents a source map which is
15
+ * being built incrementally. You may pass an object with the following
16
+ * properties:
17
+ *
18
+ *   - file: The filename of the generated source.
19
+ *   - sourceRoot: A root for all relative URLs in this source map.
20
+ */
21
+function SourceMapGenerator(aArgs) {
22
+  if (!aArgs) {
23
+    aArgs = {};
24
+  }
25
+  this._file = util.getArg(aArgs, 'file', null);
26
+  this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
27
+  this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
28
+  this._sources = new ArraySet();
29
+  this._names = new ArraySet();
30
+  this._mappings = new MappingList();
31
+  this._sourcesContents = null;
32
+}
33
+
34
+SourceMapGenerator.prototype._version = 3;
35
+
36
+/**
37
+ * Creates a new SourceMapGenerator based on a SourceMapConsumer
38
+ *
39
+ * @param aSourceMapConsumer The SourceMap.
40
+ */
41
+SourceMapGenerator.fromSourceMap =
42
+  function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
43
+    var sourceRoot = aSourceMapConsumer.sourceRoot;
44
+    var generator = new SourceMapGenerator({
45
+      file: aSourceMapConsumer.file,
46
+      sourceRoot: sourceRoot
47
+    });
48
+    aSourceMapConsumer.eachMapping(function (mapping) {
49
+      var newMapping = {
50
+        generated: {
51
+          line: mapping.generatedLine,
52
+          column: mapping.generatedColumn
53
+        }
54
+      };
55
+
56
+      if (mapping.source != null) {
57
+        newMapping.source = mapping.source;
58
+        if (sourceRoot != null) {
59
+          newMapping.source = util.relative(sourceRoot, newMapping.source);
60
+        }
61
+
62
+        newMapping.original = {
63
+          line: mapping.originalLine,
64
+          column: mapping.originalColumn
65
+        };
66
+
67
+        if (mapping.name != null) {
68
+          newMapping.name = mapping.name;
69
+        }
70
+      }
71
+
72
+      generator.addMapping(newMapping);
73
+    });
74
+    aSourceMapConsumer.sources.forEach(function (sourceFile) {
75
+      var content = aSourceMapConsumer.sourceContentFor(sourceFile);
76
+      if (content != null) {
77
+        generator.setSourceContent(sourceFile, content);
78
+      }
79
+    });
80
+    return generator;
81
+  };
82
+
83
+/**
84
+ * Add a single mapping from original source line and column to the generated
85
+ * source's line and column for this source map being created. The mapping
86
+ * object should have the following properties:
87
+ *
88
+ *   - generated: An object with the generated line and column positions.
89
+ *   - original: An object with the original line and column positions.
90
+ *   - source: The original source file (relative to the sourceRoot).
91
+ *   - name: An optional original token name for this mapping.
92
+ */
93
+SourceMapGenerator.prototype.addMapping =
94
+  function SourceMapGenerator_addMapping(aArgs) {
95
+    var generated = util.getArg(aArgs, 'generated');
96
+    var original = util.getArg(aArgs, 'original', null);
97
+    var source = util.getArg(aArgs, 'source', null);
98
+    var name = util.getArg(aArgs, 'name', null);
99
+
100
+    if (!this._skipValidation) {
101
+      this._validateMapping(generated, original, source, name);
102
+    }
103
+
104
+    if (source != null) {
105
+      source = String(source);
106
+      if (!this._sources.has(source)) {
107
+        this._sources.add(source);
108
+      }
109
+    }
110
+
111
+    if (name != null) {
112
+      name = String(name);
113
+      if (!this._names.has(name)) {
114
+        this._names.add(name);
115
+      }
116
+    }
117
+
118
+    this._mappings.add({
119
+      generatedLine: generated.line,
120
+      generatedColumn: generated.column,
121
+      originalLine: original != null && original.line,
122
+      originalColumn: original != null && original.column,
123
+      source: source,
124
+      name: name
125
+    });
126
+  };
127
+
128
+/**
129
+ * Set the source content for a source file.
130
+ */
131
+SourceMapGenerator.prototype.setSourceContent =
132
+  function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
133
+    var source = aSourceFile;
134
+    if (this._sourceRoot != null) {
135
+      source = util.relative(this._sourceRoot, source);
136
+    }
137
+
138
+    if (aSourceContent != null) {
139
+      // Add the source content to the _sourcesContents map.
140
+      // Create a new _sourcesContents map if the property is null.
141
+      if (!this._sourcesContents) {
142
+        this._sourcesContents = Object.create(null);
143
+      }
144
+      this._sourcesContents[util.toSetString(source)] = aSourceContent;
145
+    } else if (this._sourcesContents) {
146
+      // Remove the source file from the _sourcesContents map.
147
+      // If the _sourcesContents map is empty, set the property to null.
148
+      delete this._sourcesContents[util.toSetString(source)];
149
+      if (Object.keys(this._sourcesContents).length === 0) {
150
+        this._sourcesContents = null;
151
+      }
152
+    }
153
+  };
154
+
155
+/**
156
+ * Applies the mappings of a sub-source-map for a specific source file to the
157
+ * source map being generated. Each mapping to the supplied source file is
158
+ * rewritten using the supplied source map. Note: The resolution for the
159
+ * resulting mappings is the minimium of this map and the supplied map.
160
+ *
161
+ * @param aSourceMapConsumer The source map to be applied.
162
+ * @param aSourceFile Optional. The filename of the source file.
163
+ *        If omitted, SourceMapConsumer's file property will be used.
164
+ * @param aSourceMapPath Optional. The dirname of the path to the source map
165
+ *        to be applied. If relative, it is relative to the SourceMapConsumer.
166
+ *        This parameter is needed when the two source maps aren't in the same
167
+ *        directory, and the source map to be applied contains relative source
168
+ *        paths. If so, those relative source paths need to be rewritten
169
+ *        relative to the SourceMapGenerator.
170
+ */
171
+SourceMapGenerator.prototype.applySourceMap =
172
+  function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
173
+    var sourceFile = aSourceFile;
174
+    // If aSourceFile is omitted, we will use the file property of the SourceMap
175
+    if (aSourceFile == null) {
176
+      if (aSourceMapConsumer.file == null) {
177
+        throw new Error(
178
+          'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
179
+          'or the source map\'s "file" property. Both were omitted.'
180
+        );
181
+      }
182
+      sourceFile = aSourceMapConsumer.file;
183
+    }
184
+    var sourceRoot = this._sourceRoot;
185
+    // Make "sourceFile" relative if an absolute Url is passed.
186
+    if (sourceRoot != null) {
187
+      sourceFile = util.relative(sourceRoot, sourceFile);
188
+    }
189
+    // Applying the SourceMap can add and remove items from the sources and
190
+    // the names array.
191
+    var newSources = new ArraySet();
192
+    var newNames = new ArraySet();
193
+
194
+    // Find mappings for the "sourceFile"
195
+    this._mappings.unsortedForEach(function (mapping) {
196
+      if (mapping.source === sourceFile && mapping.originalLine != null) {
197
+        // Check if it can be mapped by the source map, then update the mapping.
198
+        var original = aSourceMapConsumer.originalPositionFor({
199
+          line: mapping.originalLine,
200
+          column: mapping.originalColumn
201
+        });
202
+        if (original.source != null) {
203
+          // Copy mapping
204
+          mapping.source = original.source;
205
+          if (aSourceMapPath != null) {
206
+            mapping.source = util.join(aSourceMapPath, mapping.source)
207
+          }
208
+          if (sourceRoot != null) {
209
+            mapping.source = util.relative(sourceRoot, mapping.source);
210
+          }
211
+          mapping.originalLine = original.line;
212
+          mapping.originalColumn = original.column;
213
+          if (original.name != null) {
214
+            mapping.name = original.name;
215
+          }
216
+        }
217
+      }
218
+
219
+      var source = mapping.source;
220
+      if (source != null && !newSources.has(source)) {
221
+        newSources.add(source);
222
+      }
223
+
224
+      var name = mapping.name;
225
+      if (name != null && !newNames.has(name)) {
226
+        newNames.add(name);
227
+      }
228
+
229
+    }, this);
230
+    this._sources = newSources;
231
+    this._names = newNames;
232
+
233
+    // Copy sourcesContents of applied map.
234
+    aSourceMapConsumer.sources.forEach(function (sourceFile) {
235
+      var content = aSourceMapConsumer.sourceContentFor(sourceFile);
236
+      if (content != null) {
237
+        if (aSourceMapPath != null) {
238
+          sourceFile = util.join(aSourceMapPath, sourceFile);
239
+        }
240
+        if (sourceRoot != null) {
241
+          sourceFile = util.relative(sourceRoot, sourceFile);
242
+        }
243
+        this.setSourceContent(sourceFile, content);
244
+      }
245
+    }, this);
246
+  };
247
+
248
+/**
249
+ * A mapping can have one of the three levels of data:
250
+ *
251
+ *   1. Just the generated position.
252
+ *   2. The Generated position, original position, and original source.
253
+ *   3. Generated and original position, original source, as well as a name
254
+ *      token.
255
+ *
256
+ * To maintain consistency, we validate that any new mapping being added falls
257
+ * in to one of these categories.
258
+ */
259
+SourceMapGenerator.prototype._validateMapping =
260
+  function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
261
+                                              aName) {
262
+    // When aOriginal is truthy but has empty values for .line and .column,
263
+    // it is most likely a programmer error. In this case we throw a very
264
+    // specific error message to try to guide them the right way.
265
+    // For example: https://github.com/Polymer/polymer-bundler/pull/519
266
+    if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
267
+        throw new Error(
268
+            'original.line and original.column are not numbers -- you probably meant to omit ' +
269
+            'the original mapping entirely and only map the generated position. If so, pass ' +
270
+            'null for the original mapping instead of an object with empty or null values.'
271
+        );
272
+    }
273
+
274
+    if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
275
+        && aGenerated.line > 0 && aGenerated.column >= 0
276
+        && !aOriginal && !aSource && !aName) {
277
+      // Case 1.
278
+      return;
279
+    }
280
+    else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
281
+             && aOriginal && 'line' in aOriginal && 'column' in aOriginal
282
+             && aGenerated.line > 0 && aGenerated.column >= 0
283
+             && aOriginal.line > 0 && aOriginal.column >= 0
284
+             && aSource) {
285
+      // Cases 2 and 3.
286
+      return;
287
+    }
288
+    else {
289
+      throw new Error('Invalid mapping: ' + JSON.stringify({
290
+        generated: aGenerated,
291
+        source: aSource,
292
+        original: aOriginal,
293
+        name: aName
294
+      }));
295
+    }
296
+  };
297
+
298
+/**
299
+ * Serialize the accumulated mappings in to the stream of base 64 VLQs
300
+ * specified by the source map format.
301
+ */
302
+SourceMapGenerator.prototype._serializeMappings =
303
+  function SourceMapGenerator_serializeMappings() {
304
+    var previousGeneratedColumn = 0;
305
+    var previousGeneratedLine = 1;
306
+    var previousOriginalColumn = 0;
307
+    var previousOriginalLine = 0;
308
+    var previousName = 0;
309
+    var previousSource = 0;
310
+    var result = '';
311
+    var next;
312
+    var mapping;
313
+    var nameIdx;
314
+    var sourceIdx;
315
+
316
+    var mappings = this._mappings.toArray();
317
+    for (var i = 0, len = mappings.length; i < len; i++) {
318
+      mapping = mappings[i];
319
+      next = ''
320
+
321
+      if (mapping.generatedLine !== previousGeneratedLine) {
322
+        previousGeneratedColumn = 0;
323
+        while (mapping.generatedLine !== previousGeneratedLine) {
324
+          next += ';';
325
+          previousGeneratedLine++;
326
+        }
327
+      }
328
+      else {
329
+        if (i > 0) {
330
+          if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
331
+            continue;
332
+          }
333
+          next += ',';
334
+        }
335
+      }
336
+
337
+      next += base64VLQ.encode(mapping.generatedColumn
338
+                                 - previousGeneratedColumn);
339
+      previousGeneratedColumn = mapping.generatedColumn;
340
+
341
+      if (mapping.source != null) {
342
+        sourceIdx = this._sources.indexOf(mapping.source);
343
+        next += base64VLQ.encode(sourceIdx - previousSource);
344
+        previousSource = sourceIdx;
345
+
346
+        // lines are stored 0-based in SourceMap spec version 3
347
+        next += base64VLQ.encode(mapping.originalLine - 1
348
+                                   - previousOriginalLine);
349
+        previousOriginalLine = mapping.originalLine - 1;
350
+
351
+        next += base64VLQ.encode(mapping.originalColumn
352
+                                   - previousOriginalColumn);
353
+        previousOriginalColumn = mapping.originalColumn;
354
+
355
+        if (mapping.name != null) {
356
+          nameIdx = this._names.indexOf(mapping.name);
357
+          next += base64VLQ.encode(nameIdx - previousName);
358
+          previousName = nameIdx;
359
+        }
360
+      }
361
+
362
+      result += next;
363
+    }
364
+
365
+    return result;
366
+  };
367
+
368
+SourceMapGenerator.prototype._generateSourcesContent =
369
+  function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
370
+    return aSources.map(function (source) {
371
+      if (!this._sourcesContents) {
372
+        return null;
373
+      }
374
+      if (aSourceRoot != null) {
375
+        source = util.relative(aSourceRoot, source);
376
+      }
377
+      var key = util.toSetString(source);
378
+      return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
379
+        ? this._sourcesContents[key]
380
+        : null;
381
+    }, this);
382
+  };
383
+
384
+/**
385
+ * Externalize the source map.
386
+ */
387
+SourceMapGenerator.prototype.toJSON =
388
+  function SourceMapGenerator_toJSON() {
389
+    var map = {
390
+      version: this._version,
391
+      sources: this._sources.toArray(),
392
+      names: this._names.toArray(),
393
+      mappings: this._serializeMappings()
394
+    };
395
+    if (this._file != null) {
396
+      map.file = this._file;
397
+    }
398
+    if (this._sourceRoot != null) {
399
+      map.sourceRoot = this._sourceRoot;
400
+    }
401
+    if (this._sourcesContents) {
402
+      map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
403
+    }
404
+
405
+    return map;
406
+  };
407
+
408
+/**
409
+ * Render the source map being generated to a string.
410
+ */
411
+SourceMapGenerator.prototype.toString =
412
+  function SourceMapGenerator_toString() {
413
+    return JSON.stringify(this.toJSON());
414
+  };
415
+
416
+exports.SourceMapGenerator = SourceMapGenerator;

+ 413
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/source-node.js Datei anzeigen

@@ -0,0 +1,413 @@
1
+/* -*- Mode: js; js-indent-level: 2; -*- */
2
+/*
3
+ * Copyright 2011 Mozilla Foundation and contributors
4
+ * Licensed under the New BSD license. See LICENSE or:
5
+ * http://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+
8
+var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;
9
+var util = require('./util');
10
+
11
+// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
12
+// operating systems these days (capturing the result).
13
+var REGEX_NEWLINE = /(\r?\n)/;
14
+
15
+// Newline character code for charCodeAt() comparisons
16
+var NEWLINE_CODE = 10;
17
+
18
+// Private symbol for identifying `SourceNode`s when multiple versions of
19
+// the source-map library are loaded. This MUST NOT CHANGE across
20
+// versions!
21
+var isSourceNode = "$$$isSourceNode$$$";
22
+
23
+/**
24
+ * SourceNodes provide a way to abstract over interpolating/concatenating
25
+ * snippets of generated JavaScript source code while maintaining the line and
26
+ * column information associated with the original source code.
27
+ *
28
+ * @param aLine The original line number.
29
+ * @param aColumn The original column number.
30
+ * @param aSource The original source's filename.
31
+ * @param aChunks Optional. An array of strings which are snippets of
32
+ *        generated JS, or other SourceNodes.
33
+ * @param aName The original identifier.
34
+ */
35
+function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
36
+  this.children = [];
37
+  this.sourceContents = {};
38
+  this.line = aLine == null ? null : aLine;
39
+  this.column = aColumn == null ? null : aColumn;
40
+  this.source = aSource == null ? null : aSource;
41
+  this.name = aName == null ? null : aName;
42
+  this[isSourceNode] = true;
43
+  if (aChunks != null) this.add(aChunks);
44
+}
45
+
46
+/**
47
+ * Creates a SourceNode from generated code and a SourceMapConsumer.
48
+ *
49
+ * @param aGeneratedCode The generated code
50
+ * @param aSourceMapConsumer The SourceMap for the generated code
51
+ * @param aRelativePath Optional. The path that relative sources in the
52
+ *        SourceMapConsumer should be relative to.
53
+ */
54
+SourceNode.fromStringWithSourceMap =
55
+  function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
56
+    // The SourceNode we want to fill with the generated code
57
+    // and the SourceMap
58
+    var node = new SourceNode();
59
+
60
+    // All even indices of this array are one line of the generated code,
61
+    // while all odd indices are the newlines between two adjacent lines
62
+    // (since `REGEX_NEWLINE` captures its match).
63
+    // Processed fragments are accessed by calling `shiftNextLine`.
64
+    var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
65
+    var remainingLinesIndex = 0;
66
+    var shiftNextLine = function() {
67
+      var lineContents = getNextLine();
68
+      // The last line of a file might not have a newline.
69
+      var newLine = getNextLine() || "";
70
+      return lineContents + newLine;
71
+
72
+      function getNextLine() {
73
+        return remainingLinesIndex < remainingLines.length ?
74
+            remainingLines[remainingLinesIndex++] : undefined;
75
+      }
76
+    };
77
+
78
+    // We need to remember the position of "remainingLines"
79
+    var lastGeneratedLine = 1, lastGeneratedColumn = 0;
80
+
81
+    // The generate SourceNodes we need a code range.
82
+    // To extract it current and last mapping is used.
83
+    // Here we store the last mapping.
84
+    var lastMapping = null;
85
+
86
+    aSourceMapConsumer.eachMapping(function (mapping) {
87
+      if (lastMapping !== null) {
88
+        // We add the code from "lastMapping" to "mapping":
89
+        // First check if there is a new line in between.
90
+        if (lastGeneratedLine < mapping.generatedLine) {
91
+          // Associate first line with "lastMapping"
92
+          addMappingWithCode(lastMapping, shiftNextLine());
93
+          lastGeneratedLine++;
94
+          lastGeneratedColumn = 0;
95
+          // The remaining code is added without mapping
96
+        } else {
97
+          // There is no new line in between.
98
+          // Associate the code between "lastGeneratedColumn" and
99
+          // "mapping.generatedColumn" with "lastMapping"
100
+          var nextLine = remainingLines[remainingLinesIndex];
101
+          var code = nextLine.substr(0, mapping.generatedColumn -
102
+                                        lastGeneratedColumn);
103
+          remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -
104
+                                              lastGeneratedColumn);
105
+          lastGeneratedColumn = mapping.generatedColumn;
106
+          addMappingWithCode(lastMapping, code);
107
+          // No more remaining code, continue
108
+          lastMapping = mapping;
109
+          return;
110
+        }
111
+      }
112
+      // We add the generated code until the first mapping
113
+      // to the SourceNode without any mapping.
114
+      // Each line is added as separate string.
115
+      while (lastGeneratedLine < mapping.generatedLine) {
116
+        node.add(shiftNextLine());
117
+        lastGeneratedLine++;
118
+      }
119
+      if (lastGeneratedColumn < mapping.generatedColumn) {
120
+        var nextLine = remainingLines[remainingLinesIndex];
121
+        node.add(nextLine.substr(0, mapping.generatedColumn));
122
+        remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
123
+        lastGeneratedColumn = mapping.generatedColumn;
124
+      }
125
+      lastMapping = mapping;
126
+    }, this);
127
+    // We have processed all mappings.
128
+    if (remainingLinesIndex < remainingLines.length) {
129
+      if (lastMapping) {
130
+        // Associate the remaining code in the current line with "lastMapping"
131
+        addMappingWithCode(lastMapping, shiftNextLine());
132
+      }
133
+      // and add the remaining lines without any mapping
134
+      node.add(remainingLines.splice(remainingLinesIndex).join(""));
135
+    }
136
+
137
+    // Copy sourcesContent into SourceNode
138
+    aSourceMapConsumer.sources.forEach(function (sourceFile) {
139
+      var content = aSourceMapConsumer.sourceContentFor(sourceFile);
140
+      if (content != null) {
141
+        if (aRelativePath != null) {
142
+          sourceFile = util.join(aRelativePath, sourceFile);
143
+        }
144
+        node.setSourceContent(sourceFile, content);
145
+      }
146
+    });
147
+
148
+    return node;
149
+
150
+    function addMappingWithCode(mapping, code) {
151
+      if (mapping === null || mapping.source === undefined) {
152
+        node.add(code);
153
+      } else {
154
+        var source = aRelativePath
155
+          ? util.join(aRelativePath, mapping.source)
156
+          : mapping.source;
157
+        node.add(new SourceNode(mapping.originalLine,
158
+                                mapping.originalColumn,
159
+                                source,
160
+                                code,
161
+                                mapping.name));
162
+      }
163
+    }
164
+  };
165
+
166
+/**
167
+ * Add a chunk of generated JS to this source node.
168
+ *
169
+ * @param aChunk A string snippet of generated JS code, another instance of
170
+ *        SourceNode, or an array where each member is one of those things.
171
+ */
172
+SourceNode.prototype.add = function SourceNode_add(aChunk) {
173
+  if (Array.isArray(aChunk)) {
174
+    aChunk.forEach(function (chunk) {
175
+      this.add(chunk);
176
+    }, this);
177
+  }
178
+  else if (aChunk[isSourceNode] || typeof aChunk === "string") {
179
+    if (aChunk) {
180
+      this.children.push(aChunk);
181
+    }
182
+  }
183
+  else {
184
+    throw new TypeError(
185
+      "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
186
+    );
187
+  }
188
+  return this;
189
+};
190
+
191
+/**
192
+ * Add a chunk of generated JS to the beginning of this source node.
193
+ *
194
+ * @param aChunk A string snippet of generated JS code, another instance of
195
+ *        SourceNode, or an array where each member is one of those things.
196
+ */
197
+SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
198
+  if (Array.isArray(aChunk)) {
199
+    for (var i = aChunk.length-1; i >= 0; i--) {
200
+      this.prepend(aChunk[i]);
201
+    }
202
+  }
203
+  else if (aChunk[isSourceNode] || typeof aChunk === "string") {
204
+    this.children.unshift(aChunk);
205
+  }
206
+  else {
207
+    throw new TypeError(
208
+      "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
209
+    );
210
+  }
211
+  return this;
212
+};
213
+
214
+/**
215
+ * Walk over the tree of JS snippets in this node and its children. The
216
+ * walking function is called once for each snippet of JS and is passed that
217
+ * snippet and the its original associated source's line/column location.
218
+ *
219
+ * @param aFn The traversal function.
220
+ */
221
+SourceNode.prototype.walk = function SourceNode_walk(aFn) {
222
+  var chunk;
223
+  for (var i = 0, len = this.children.length; i < len; i++) {
224
+    chunk = this.children[i];
225
+    if (chunk[isSourceNode]) {
226
+      chunk.walk(aFn);
227
+    }
228
+    else {
229
+      if (chunk !== '') {
230
+        aFn(chunk, { source: this.source,
231
+                     line: this.line,
232
+                     column: this.column,
233
+                     name: this.name });
234
+      }
235
+    }
236
+  }
237
+};
238
+
239
+/**
240
+ * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
241
+ * each of `this.children`.
242
+ *
243
+ * @param aSep The separator.
244
+ */
245
+SourceNode.prototype.join = function SourceNode_join(aSep) {
246
+  var newChildren;
247
+  var i;
248
+  var len = this.children.length;
249
+  if (len > 0) {
250
+    newChildren = [];
251
+    for (i = 0; i < len-1; i++) {
252
+      newChildren.push(this.children[i]);
253
+      newChildren.push(aSep);
254
+    }
255
+    newChildren.push(this.children[i]);
256
+    this.children = newChildren;
257
+  }
258
+  return this;
259
+};
260
+
261
+/**
262
+ * Call String.prototype.replace on the very right-most source snippet. Useful
263
+ * for trimming whitespace from the end of a source node, etc.
264
+ *
265
+ * @param aPattern The pattern to replace.
266
+ * @param aReplacement The thing to replace the pattern with.
267
+ */
268
+SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
269
+  var lastChild = this.children[this.children.length - 1];
270
+  if (lastChild[isSourceNode]) {
271
+    lastChild.replaceRight(aPattern, aReplacement);
272
+  }
273
+  else if (typeof lastChild === 'string') {
274
+    this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
275
+  }
276
+  else {
277
+    this.children.push(''.replace(aPattern, aReplacement));
278
+  }
279
+  return this;
280
+};
281
+
282
+/**
283
+ * Set the source content for a source file. This will be added to the SourceMapGenerator
284
+ * in the sourcesContent field.
285
+ *
286
+ * @param aSourceFile The filename of the source file
287
+ * @param aSourceContent The content of the source file
288
+ */
289
+SourceNode.prototype.setSourceContent =
290
+  function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
291
+    this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
292
+  };
293
+
294
+/**
295
+ * Walk over the tree of SourceNodes. The walking function is called for each
296
+ * source file content and is passed the filename and source content.
297
+ *
298
+ * @param aFn The traversal function.
299
+ */
300
+SourceNode.prototype.walkSourceContents =
301
+  function SourceNode_walkSourceContents(aFn) {
302
+    for (var i = 0, len = this.children.length; i < len; i++) {
303
+      if (this.children[i][isSourceNode]) {
304
+        this.children[i].walkSourceContents(aFn);
305
+      }
306
+    }
307
+
308
+    var sources = Object.keys(this.sourceContents);
309
+    for (var i = 0, len = sources.length; i < len; i++) {
310
+      aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
311
+    }
312
+  };
313
+
314
+/**
315
+ * Return the string representation of this source node. Walks over the tree
316
+ * and concatenates all the various snippets together to one string.
317
+ */
318
+SourceNode.prototype.toString = function SourceNode_toString() {
319
+  var str = "";
320
+  this.walk(function (chunk) {
321
+    str += chunk;
322
+  });
323
+  return str;
324
+};
325
+
326
+/**
327
+ * Returns the string representation of this source node along with a source
328
+ * map.
329
+ */
330
+SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
331
+  var generated = {
332
+    code: "",
333
+    line: 1,
334
+    column: 0
335
+  };
336
+  var map = new SourceMapGenerator(aArgs);
337
+  var sourceMappingActive = false;
338
+  var lastOriginalSource = null;
339
+  var lastOriginalLine = null;
340
+  var lastOriginalColumn = null;
341
+  var lastOriginalName = null;
342
+  this.walk(function (chunk, original) {
343
+    generated.code += chunk;
344
+    if (original.source !== null
345
+        && original.line !== null
346
+        && original.column !== null) {
347
+      if(lastOriginalSource !== original.source
348
+         || lastOriginalLine !== original.line
349
+         || lastOriginalColumn !== original.column
350
+         || lastOriginalName !== original.name) {
351
+        map.addMapping({
352
+          source: original.source,
353
+          original: {
354
+            line: original.line,
355
+            column: original.column
356
+          },
357
+          generated: {
358
+            line: generated.line,
359
+            column: generated.column
360
+          },
361
+          name: original.name
362
+        });
363
+      }
364
+      lastOriginalSource = original.source;
365
+      lastOriginalLine = original.line;
366
+      lastOriginalColumn = original.column;
367
+      lastOriginalName = original.name;
368
+      sourceMappingActive = true;
369
+    } else if (sourceMappingActive) {
370
+      map.addMapping({
371
+        generated: {
372
+          line: generated.line,
373
+          column: generated.column
374
+        }
375
+      });
376
+      lastOriginalSource = null;
377
+      sourceMappingActive = false;
378
+    }
379
+    for (var idx = 0, length = chunk.length; idx < length; idx++) {
380
+      if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
381
+        generated.line++;
382
+        generated.column = 0;
383
+        // Mappings end at eol
384
+        if (idx + 1 === length) {
385
+          lastOriginalSource = null;
386
+          sourceMappingActive = false;
387
+        } else if (sourceMappingActive) {
388
+          map.addMapping({
389
+            source: original.source,
390
+            original: {
391
+              line: original.line,
392
+              column: original.column
393
+            },
394
+            generated: {
395
+              line: generated.line,
396
+              column: generated.column
397
+            },
398
+            name: original.name
399
+          });
400
+        }
401
+      } else {
402
+        generated.column++;
403
+      }
404
+    }
405
+  });
406
+  this.walkSourceContents(function (sourceFile, sourceContent) {
407
+    map.setSourceContent(sourceFile, sourceContent);
408
+  });
409
+
410
+  return { code: generated.code, map: map };
411
+};
412
+
413
+exports.SourceNode = SourceNode;

+ 417
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/lib/util.js Datei anzeigen

@@ -0,0 +1,417 @@
1
+/* -*- Mode: js; js-indent-level: 2; -*- */
2
+/*
3
+ * Copyright 2011 Mozilla Foundation and contributors
4
+ * Licensed under the New BSD license. See LICENSE or:
5
+ * http://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+
8
+/**
9
+ * This is a helper function for getting values from parameter/options
10
+ * objects.
11
+ *
12
+ * @param args The object we are extracting values from
13
+ * @param name The name of the property we are getting.
14
+ * @param defaultValue An optional value to return if the property is missing
15
+ * from the object. If this is not specified and the property is missing, an
16
+ * error will be thrown.
17
+ */
18
+function getArg(aArgs, aName, aDefaultValue) {
19
+  if (aName in aArgs) {
20
+    return aArgs[aName];
21
+  } else if (arguments.length === 3) {
22
+    return aDefaultValue;
23
+  } else {
24
+    throw new Error('"' + aName + '" is a required argument.');
25
+  }
26
+}
27
+exports.getArg = getArg;
28
+
29
+var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
30
+var dataUrlRegexp = /^data:.+\,.+$/;
31
+
32
+function urlParse(aUrl) {
33
+  var match = aUrl.match(urlRegexp);
34
+  if (!match) {
35
+    return null;
36
+  }
37
+  return {
38
+    scheme: match[1],
39
+    auth: match[2],
40
+    host: match[3],
41
+    port: match[4],
42
+    path: match[5]
43
+  };
44
+}
45
+exports.urlParse = urlParse;
46
+
47
+function urlGenerate(aParsedUrl) {
48
+  var url = '';
49
+  if (aParsedUrl.scheme) {
50
+    url += aParsedUrl.scheme + ':';
51
+  }
52
+  url += '//';
53
+  if (aParsedUrl.auth) {
54
+    url += aParsedUrl.auth + '@';
55
+  }
56
+  if (aParsedUrl.host) {
57
+    url += aParsedUrl.host;
58
+  }
59
+  if (aParsedUrl.port) {
60
+    url += ":" + aParsedUrl.port
61
+  }
62
+  if (aParsedUrl.path) {
63
+    url += aParsedUrl.path;
64
+  }
65
+  return url;
66
+}
67
+exports.urlGenerate = urlGenerate;
68
+
69
+/**
70
+ * Normalizes a path, or the path portion of a URL:
71
+ *
72
+ * - Replaces consecutive slashes with one slash.
73
+ * - Removes unnecessary '.' parts.
74
+ * - Removes unnecessary '<dir>/..' parts.
75
+ *
76
+ * Based on code in the Node.js 'path' core module.
77
+ *
78
+ * @param aPath The path or url to normalize.
79
+ */
80
+function normalize(aPath) {
81
+  var path = aPath;
82
+  var url = urlParse(aPath);
83
+  if (url) {
84
+    if (!url.path) {
85
+      return aPath;
86
+    }
87
+    path = url.path;
88
+  }
89
+  var isAbsolute = exports.isAbsolute(path);
90
+
91
+  var parts = path.split(/\/+/);
92
+  for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
93
+    part = parts[i];
94
+    if (part === '.') {
95
+      parts.splice(i, 1);
96
+    } else if (part === '..') {
97
+      up++;
98
+    } else if (up > 0) {
99
+      if (part === '') {
100
+        // The first part is blank if the path is absolute. Trying to go
101
+        // above the root is a no-op. Therefore we can remove all '..' parts
102
+        // directly after the root.
103
+        parts.splice(i + 1, up);
104
+        up = 0;
105
+      } else {
106
+        parts.splice(i, 2);
107
+        up--;
108
+      }
109
+    }
110
+  }
111
+  path = parts.join('/');
112
+
113
+  if (path === '') {
114
+    path = isAbsolute ? '/' : '.';
115
+  }
116
+
117
+  if (url) {
118
+    url.path = path;
119
+    return urlGenerate(url);
120
+  }
121
+  return path;
122
+}
123
+exports.normalize = normalize;
124
+
125
+/**
126
+ * Joins two paths/URLs.
127
+ *
128
+ * @param aRoot The root path or URL.
129
+ * @param aPath The path or URL to be joined with the root.
130
+ *
131
+ * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
132
+ *   scheme-relative URL: Then the scheme of aRoot, if any, is prepended
133
+ *   first.
134
+ * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
135
+ *   is updated with the result and aRoot is returned. Otherwise the result
136
+ *   is returned.
137
+ *   - If aPath is absolute, the result is aPath.
138
+ *   - Otherwise the two paths are joined with a slash.
139
+ * - Joining for example 'http://' and 'www.example.com' is also supported.
140
+ */
141
+function join(aRoot, aPath) {
142
+  if (aRoot === "") {
143
+    aRoot = ".";
144
+  }
145
+  if (aPath === "") {
146
+    aPath = ".";
147
+  }
148
+  var aPathUrl = urlParse(aPath);
149
+  var aRootUrl = urlParse(aRoot);
150
+  if (aRootUrl) {
151
+    aRoot = aRootUrl.path || '/';
152
+  }
153
+
154
+  // `join(foo, '//www.example.org')`
155
+  if (aPathUrl && !aPathUrl.scheme) {
156
+    if (aRootUrl) {
157
+      aPathUrl.scheme = aRootUrl.scheme;
158
+    }
159
+    return urlGenerate(aPathUrl);
160
+  }
161
+
162
+  if (aPathUrl || aPath.match(dataUrlRegexp)) {
163
+    return aPath;
164
+  }
165
+
166
+  // `join('http://', 'www.example.com')`
167
+  if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
168
+    aRootUrl.host = aPath;
169
+    return urlGenerate(aRootUrl);
170
+  }
171
+
172
+  var joined = aPath.charAt(0) === '/'
173
+    ? aPath
174
+    : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
175
+
176
+  if (aRootUrl) {
177
+    aRootUrl.path = joined;
178
+    return urlGenerate(aRootUrl);
179
+  }
180
+  return joined;
181
+}
182
+exports.join = join;
183
+
184
+exports.isAbsolute = function (aPath) {
185
+  return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
186
+};
187
+
188
+/**
189
+ * Make a path relative to a URL or another path.
190
+ *
191
+ * @param aRoot The root path or URL.
192
+ * @param aPath The path or URL to be made relative to aRoot.
193
+ */
194
+function relative(aRoot, aPath) {
195
+  if (aRoot === "") {
196
+    aRoot = ".";
197
+  }
198
+
199
+  aRoot = aRoot.replace(/\/$/, '');
200
+
201
+  // It is possible for the path to be above the root. In this case, simply
202
+  // checking whether the root is a prefix of the path won't work. Instead, we
203
+  // need to remove components from the root one by one, until either we find
204
+  // a prefix that fits, or we run out of components to remove.
205
+  var level = 0;
206
+  while (aPath.indexOf(aRoot + '/') !== 0) {
207
+    var index = aRoot.lastIndexOf("/");
208
+    if (index < 0) {
209
+      return aPath;
210
+    }
211
+
212
+    // If the only part of the root that is left is the scheme (i.e. http://,
213
+    // file:///, etc.), one or more slashes (/), or simply nothing at all, we
214
+    // have exhausted all components, so the path is not relative to the root.
215
+    aRoot = aRoot.slice(0, index);
216
+    if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
217
+      return aPath;
218
+    }
219
+
220
+    ++level;
221
+  }
222
+
223
+  // Make sure we add a "../" for each component we removed from the root.
224
+  return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
225
+}
226
+exports.relative = relative;
227
+
228
+var supportsNullProto = (function () {
229
+  var obj = Object.create(null);
230
+  return !('__proto__' in obj);
231
+}());
232
+
233
+function identity (s) {
234
+  return s;
235
+}
236
+
237
+/**
238
+ * Because behavior goes wacky when you set `__proto__` on objects, we
239
+ * have to prefix all the strings in our set with an arbitrary character.
240
+ *
241
+ * See https://github.com/mozilla/source-map/pull/31 and
242
+ * https://github.com/mozilla/source-map/issues/30
243
+ *
244
+ * @param String aStr
245
+ */
246
+function toSetString(aStr) {
247
+  if (isProtoString(aStr)) {
248
+    return '$' + aStr;
249
+  }
250
+
251
+  return aStr;
252
+}
253
+exports.toSetString = supportsNullProto ? identity : toSetString;
254
+
255
+function fromSetString(aStr) {
256
+  if (isProtoString(aStr)) {
257
+    return aStr.slice(1);
258
+  }
259
+
260
+  return aStr;
261
+}
262
+exports.fromSetString = supportsNullProto ? identity : fromSetString;
263
+
264
+function isProtoString(s) {
265
+  if (!s) {
266
+    return false;
267
+  }
268
+
269
+  var length = s.length;
270
+
271
+  if (length < 9 /* "__proto__".length */) {
272
+    return false;
273
+  }
274
+
275
+  if (s.charCodeAt(length - 1) !== 95  /* '_' */ ||
276
+      s.charCodeAt(length - 2) !== 95  /* '_' */ ||
277
+      s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
278
+      s.charCodeAt(length - 4) !== 116 /* 't' */ ||
279
+      s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
280
+      s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
281
+      s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
282
+      s.charCodeAt(length - 8) !== 95  /* '_' */ ||
283
+      s.charCodeAt(length - 9) !== 95  /* '_' */) {
284
+    return false;
285
+  }
286
+
287
+  for (var i = length - 10; i >= 0; i--) {
288
+    if (s.charCodeAt(i) !== 36 /* '$' */) {
289
+      return false;
290
+    }
291
+  }
292
+
293
+  return true;
294
+}
295
+
296
+/**
297
+ * Comparator between two mappings where the original positions are compared.
298
+ *
299
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
300
+ * mappings with the same original source/line/column, but different generated
301
+ * line and column the same. Useful when searching for a mapping with a
302
+ * stubbed out mapping.
303
+ */
304
+function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
305
+  var cmp = mappingA.source - mappingB.source;
306
+  if (cmp !== 0) {
307
+    return cmp;
308
+  }
309
+
310
+  cmp = mappingA.originalLine - mappingB.originalLine;
311
+  if (cmp !== 0) {
312
+    return cmp;
313
+  }
314
+
315
+  cmp = mappingA.originalColumn - mappingB.originalColumn;
316
+  if (cmp !== 0 || onlyCompareOriginal) {
317
+    return cmp;
318
+  }
319
+
320
+  cmp = mappingA.generatedColumn - mappingB.generatedColumn;
321
+  if (cmp !== 0) {
322
+    return cmp;
323
+  }
324
+
325
+  cmp = mappingA.generatedLine - mappingB.generatedLine;
326
+  if (cmp !== 0) {
327
+    return cmp;
328
+  }
329
+
330
+  return mappingA.name - mappingB.name;
331
+}
332
+exports.compareByOriginalPositions = compareByOriginalPositions;
333
+
334
+/**
335
+ * Comparator between two mappings with deflated source and name indices where
336
+ * the generated positions are compared.
337
+ *
338
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
339
+ * mappings with the same generated line and column, but different
340
+ * source/name/original line and column the same. Useful when searching for a
341
+ * mapping with a stubbed out mapping.
342
+ */
343
+function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
344
+  var cmp = mappingA.generatedLine - mappingB.generatedLine;
345
+  if (cmp !== 0) {
346
+    return cmp;
347
+  }
348
+
349
+  cmp = mappingA.generatedColumn - mappingB.generatedColumn;
350
+  if (cmp !== 0 || onlyCompareGenerated) {
351
+    return cmp;
352
+  }
353
+
354
+  cmp = mappingA.source - mappingB.source;
355
+  if (cmp !== 0) {
356
+    return cmp;
357
+  }
358
+
359
+  cmp = mappingA.originalLine - mappingB.originalLine;
360
+  if (cmp !== 0) {
361
+    return cmp;
362
+  }
363
+
364
+  cmp = mappingA.originalColumn - mappingB.originalColumn;
365
+  if (cmp !== 0) {
366
+    return cmp;
367
+  }
368
+
369
+  return mappingA.name - mappingB.name;
370
+}
371
+exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
372
+
373
+function strcmp(aStr1, aStr2) {
374
+  if (aStr1 === aStr2) {
375
+    return 0;
376
+  }
377
+
378
+  if (aStr1 > aStr2) {
379
+    return 1;
380
+  }
381
+
382
+  return -1;
383
+}
384
+
385
+/**
386
+ * Comparator between two mappings with inflated source and name strings where
387
+ * the generated positions are compared.
388
+ */
389
+function compareByGeneratedPositionsInflated(mappingA, mappingB) {
390
+  var cmp = mappingA.generatedLine - mappingB.generatedLine;
391
+  if (cmp !== 0) {
392
+    return cmp;
393
+  }
394
+
395
+  cmp = mappingA.generatedColumn - mappingB.generatedColumn;
396
+  if (cmp !== 0) {
397
+    return cmp;
398
+  }
399
+
400
+  cmp = strcmp(mappingA.source, mappingB.source);
401
+  if (cmp !== 0) {
402
+    return cmp;
403
+  }
404
+
405
+  cmp = mappingA.originalLine - mappingB.originalLine;
406
+  if (cmp !== 0) {
407
+    return cmp;
408
+  }
409
+
410
+  cmp = mappingA.originalColumn - mappingB.originalColumn;
411
+  if (cmp !== 0) {
412
+    return cmp;
413
+  }
414
+
415
+  return strcmp(mappingA.name, mappingB.name);
416
+}
417
+exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;

+ 211
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/package.json Datei anzeigen

@@ -0,0 +1,211 @@
1
+{
2
+  "_from": "source-map@^0.5.6",
3
+  "_id": "source-map@0.5.7",
4
+  "_inBundle": false,
5
+  "_integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
6
+  "_location": "/@angular-devkit/build-optimizer/source-map",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "range",
10
+    "registry": true,
11
+    "raw": "source-map@^0.5.6",
12
+    "name": "source-map",
13
+    "escapedName": "source-map",
14
+    "rawSpec": "^0.5.6",
15
+    "saveSpec": null,
16
+    "fetchSpec": "^0.5.6"
17
+  },
18
+  "_requiredBy": [
19
+    "/@angular-devkit/build-optimizer"
20
+  ],
21
+  "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
22
+  "_shasum": "8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc",
23
+  "_spec": "source-map@^0.5.6",
24
+  "_where": "/Users/vincents/PassionApp/node_modules/@angular-devkit/build-optimizer",
25
+  "author": {
26
+    "name": "Nick Fitzgerald",
27
+    "email": "nfitzgerald@mozilla.com"
28
+  },
29
+  "bugs": {
30
+    "url": "https://github.com/mozilla/source-map/issues"
31
+  },
32
+  "bundleDependencies": false,
33
+  "contributors": [
34
+    {
35
+      "name": "Tobias Koppers",
36
+      "email": "tobias.koppers@googlemail.com"
37
+    },
38
+    {
39
+      "name": "Duncan Beevers",
40
+      "email": "duncan@dweebd.com"
41
+    },
42
+    {
43
+      "name": "Stephen Crane",
44
+      "email": "scrane@mozilla.com"
45
+    },
46
+    {
47
+      "name": "Ryan Seddon",
48
+      "email": "seddon.ryan@gmail.com"
49
+    },
50
+    {
51
+      "name": "Miles Elam",
52
+      "email": "miles.elam@deem.com"
53
+    },
54
+    {
55
+      "name": "Mihai Bazon",
56
+      "email": "mihai.bazon@gmail.com"
57
+    },
58
+    {
59
+      "name": "Michael Ficarra",
60
+      "email": "github.public.email@michael.ficarra.me"
61
+    },
62
+    {
63
+      "name": "Todd Wolfson",
64
+      "email": "todd@twolfson.com"
65
+    },
66
+    {
67
+      "name": "Alexander Solovyov",
68
+      "email": "alexander@solovyov.net"
69
+    },
70
+    {
71
+      "name": "Felix Gnass",
72
+      "email": "fgnass@gmail.com"
73
+    },
74
+    {
75
+      "name": "Conrad Irwin",
76
+      "email": "conrad.irwin@gmail.com"
77
+    },
78
+    {
79
+      "name": "usrbincc",
80
+      "email": "usrbincc@yahoo.com"
81
+    },
82
+    {
83
+      "name": "David Glasser",
84
+      "email": "glasser@davidglasser.net"
85
+    },
86
+    {
87
+      "name": "Chase Douglas",
88
+      "email": "chase@newrelic.com"
89
+    },
90
+    {
91
+      "name": "Evan Wallace",
92
+      "email": "evan.exe@gmail.com"
93
+    },
94
+    {
95
+      "name": "Heather Arthur",
96
+      "email": "fayearthur@gmail.com"
97
+    },
98
+    {
99
+      "name": "Hugh Kennedy",
100
+      "email": "hughskennedy@gmail.com"
101
+    },
102
+    {
103
+      "name": "David Glasser",
104
+      "email": "glasser@davidglasser.net"
105
+    },
106
+    {
107
+      "name": "Simon Lydell",
108
+      "email": "simon.lydell@gmail.com"
109
+    },
110
+    {
111
+      "name": "Jmeas Smith",
112
+      "email": "jellyes2@gmail.com"
113
+    },
114
+    {
115
+      "name": "Michael Z Goddard",
116
+      "email": "mzgoddard@gmail.com"
117
+    },
118
+    {
119
+      "name": "azu",
120
+      "email": "azu@users.noreply.github.com"
121
+    },
122
+    {
123
+      "name": "John Gozde",
124
+      "email": "john@gozde.ca"
125
+    },
126
+    {
127
+      "name": "Adam Kirkton",
128
+      "email": "akirkton@truefitinnovation.com"
129
+    },
130
+    {
131
+      "name": "Chris Montgomery",
132
+      "email": "christopher.montgomery@dowjones.com"
133
+    },
134
+    {
135
+      "name": "J. Ryan Stinnett",
136
+      "email": "jryans@gmail.com"
137
+    },
138
+    {
139
+      "name": "Jack Herrington",
140
+      "email": "jherrington@walmartlabs.com"
141
+    },
142
+    {
143
+      "name": "Chris Truter",
144
+      "email": "jeffpalentine@gmail.com"
145
+    },
146
+    {
147
+      "name": "Daniel Espeset",
148
+      "email": "daniel@danielespeset.com"
149
+    },
150
+    {
151
+      "name": "Jamie Wong",
152
+      "email": "jamie.lf.wong@gmail.com"
153
+    },
154
+    {
155
+      "name": "Eddy Bruël",
156
+      "email": "ejpbruel@mozilla.com"
157
+    },
158
+    {
159
+      "name": "Hawken Rives",
160
+      "email": "hawkrives@gmail.com"
161
+    },
162
+    {
163
+      "name": "Gilad Peleg",
164
+      "email": "giladp007@gmail.com"
165
+    },
166
+    {
167
+      "name": "djchie",
168
+      "email": "djchie.dev@gmail.com"
169
+    },
170
+    {
171
+      "name": "Gary Ye",
172
+      "email": "garysye@gmail.com"
173
+    },
174
+    {
175
+      "name": "Nicolas Lalevée",
176
+      "email": "nicolas.lalevee@hibnet.org"
177
+    }
178
+  ],
179
+  "deprecated": false,
180
+  "description": "Generates and consumes source maps",
181
+  "devDependencies": {
182
+    "doctoc": "^0.15.0",
183
+    "webpack": "^1.12.0"
184
+  },
185
+  "engines": {
186
+    "node": ">=0.10.0"
187
+  },
188
+  "files": [
189
+    "source-map.js",
190
+    "lib/",
191
+    "dist/source-map.debug.js",
192
+    "dist/source-map.js",
193
+    "dist/source-map.min.js",
194
+    "dist/source-map.min.js.map"
195
+  ],
196
+  "homepage": "https://github.com/mozilla/source-map",
197
+  "license": "BSD-3-Clause",
198
+  "main": "./source-map.js",
199
+  "name": "source-map",
200
+  "repository": {
201
+    "type": "git",
202
+    "url": "git+ssh://git@github.com/mozilla/source-map.git"
203
+  },
204
+  "scripts": {
205
+    "build": "webpack --color",
206
+    "test": "npm run build && node test/run-tests.js",
207
+    "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
208
+  },
209
+  "typings": "source-map",
210
+  "version": "0.5.7"
211
+}

+ 8
- 0
node_modules/@angular-devkit/build-optimizer/node_modules/source-map/source-map.js Datei anzeigen

@@ -0,0 +1,8 @@
1
+/*
2
+ * Copyright 2009-2011 Mozilla Foundation and contributors
3
+ * Licensed under the New BSD license. See LICENSE.txt or:
4
+ * http://opensource.org/licenses/BSD-3-Clause
5
+ */
6
+exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;
7
+exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;
8
+exports.SourceNode = require('./lib/source-node').SourceNode;

+ 65
- 0
node_modules/@angular-devkit/build-optimizer/package.json Datei anzeigen

@@ -0,0 +1,65 @@
1
+{
2
+  "_from": "@angular-devkit/build-optimizer@0.0.35",
3
+  "_id": "@angular-devkit/build-optimizer@0.0.35",
4
+  "_inBundle": false,
5
+  "_integrity": "sha512-7JxZZAYFSCc0tP6+NrRn3b2Cd1b9d+a3+OfwVNyNsNd2unelqUMko2hm0KLbC8BXcXt/OILg1E/ZgLAXSS47nw==",
6
+  "_location": "/@angular-devkit/build-optimizer",
7
+  "_phantomChildren": {},
8
+  "_requested": {
9
+    "type": "version",
10
+    "registry": true,
11
+    "raw": "@angular-devkit/build-optimizer@0.0.35",
12
+    "name": "@angular-devkit/build-optimizer",
13
+    "escapedName": "@angular-devkit%2fbuild-optimizer",
14
+    "scope": "@angular-devkit",
15
+    "rawSpec": "0.0.35",
16
+    "saveSpec": null,
17
+    "fetchSpec": "0.0.35"
18
+  },
19
+  "_requiredBy": [
20
+    "/@ionic/app-scripts"
21
+  ],
22
+  "_resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.0.35.tgz",
23
+  "_shasum": "3aadad1d7e9ffc7dcd106fda8a5670465936562c",
24
+  "_spec": "@angular-devkit/build-optimizer@0.0.35",
25
+  "_where": "/Users/vincents/PassionApp/node_modules/@ionic/app-scripts",
26
+  "author": {
27
+    "name": "Angular Authors"
28
+  },
29
+  "bin": {
30
+    "build-optimizer": "./src/build-optimizer/cli.js",
31
+    "purify": "./src/purify/cli.js"
32
+  },
33
+  "bugs": {
34
+    "url": "https://github.com/angular/devkit/issues"
35
+  },
36
+  "bundleDependencies": false,
37
+  "dependencies": {
38
+    "loader-utils": "^1.1.0",
39
+    "source-map": "^0.5.6",
40
+    "typescript": "~2.6.1",
41
+    "webpack-sources": "^1.0.1"
42
+  },
43
+  "deprecated": false,
44
+  "description": "Angular Build Optimizer",
45
+  "engines": {
46
+    "node": ">= 6.9.0",
47
+    "npm": ">= 3.0.0"
48
+  },
49
+  "homepage": "https://github.com/angular/devkit",
50
+  "keywords": [
51
+    "angular",
52
+    "devkit",
53
+    "sdk",
54
+    "Angular DevKit"
55
+  ],
56
+  "license": "MIT",
57
+  "main": "src/index.js",
58
+  "name": "@angular-devkit/build-optimizer",
59
+  "repository": {
60
+    "type": "git",
61
+    "url": "git+https://github.com/angular/devkit.git"
62
+  },
63
+  "typings": "src/index.d.ts",
64
+  "version": "0.0.35"
65
+}

+ 11
- 0
node_modules/@angular-devkit/build-optimizer/src/build-optimizer/build-optimizer.d.ts Datei anzeigen

@@ -0,0 +1,11 @@
1
+import { TransformJavascriptOutput } from '../helpers/transform-javascript';
2
+export interface BuildOptimizerOptions {
3
+    content?: string;
4
+    originalFilePath?: string;
5
+    inputFilePath?: string;
6
+    outputFilePath?: string;
7
+    emitSourceMap?: boolean;
8
+    strict?: boolean;
9
+    isSideEffectFree?: boolean;
10
+}
11
+export declare function buildOptimizer(options: BuildOptimizerOptions): TransformJavascriptOutput;

+ 98
- 0
node_modules/@angular-devkit/build-optimizer/src/build-optimizer/build-optimizer.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 0
- 0
node_modules/@angular-devkit/build-optimizer/src/build-optimizer/cli.d.ts Datei anzeigen


+ 38
- 0
node_modules/@angular-devkit/build-optimizer/src/build-optimizer/cli.js Datei anzeigen

@@ -0,0 +1,38 @@
1
+#!/usr/bin/env node
2
+"use strict";
3
+Object.defineProperty(exports, "__esModule", { value: true });
4
+const fs_1 = require("fs");
5
+const path_1 = require("path");
6
+const build_optimizer_1 = require("./build-optimizer");
7
+if (process.argv.length < 3 || process.argv.length > 4) {
8
+    throw new Error(`
9
+    build-optimizer should be called with either one or two arguments:
10
+
11
+      build-optimizer input.js
12
+      build-optimizer input.js output.js
13
+  `);
14
+}
15
+const currentDir = process.cwd();
16
+const inputFile = process.argv[2];
17
+const tsOrJsRegExp = /\.(j|t)s$/;
18
+if (!inputFile.match(tsOrJsRegExp)) {
19
+    throw new Error(`Input file must be .js or .ts.`);
20
+}
21
+// Use provided output file, or add the .bo suffix before the extension.
22
+const outputFile = process.argv[3] || inputFile.replace(tsOrJsRegExp, (subStr) => `.bo${subStr}`);
23
+const boOutput = build_optimizer_1.buildOptimizer({
24
+    inputFilePath: path_1.join(currentDir, inputFile),
25
+    outputFilePath: path_1.join(currentDir, outputFile),
26
+    emitSourceMap: true,
27
+});
28
+if (boOutput.emitSkipped) {
29
+    console.log('Nothing to emit.');
30
+}
31
+else {
32
+    fs_1.writeFileSync(path_1.join(currentDir, outputFile), boOutput.content);
33
+    fs_1.writeFileSync(path_1.join(currentDir, `${outputFile}.map`), JSON.stringify(boOutput.sourceMap));
34
+    console.log('Emitted:');
35
+    console.log(`  ${outputFile}`);
36
+    console.log(`  ${outputFile}.map`);
37
+}
38
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9oYW5zbC9Tb3VyY2VzL2hhbnNsL2RldmtpdC8iLCJzb3VyY2VzIjpbInBhY2thZ2VzL2FuZ3VsYXJfZGV2a2l0L2J1aWxkX29wdGltaXplci9zcmMvYnVpbGQtb3B0aW1pemVyL2NsaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFRQSwyQkFBbUM7QUFDbkMsK0JBQTRCO0FBQzVCLHVEQUFtRDtBQUduRCxFQUFFLENBQUMsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLE1BQU0sR0FBRyxDQUFDLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUN2RCxNQUFNLElBQUksS0FBSyxDQUFDOzs7OztHQUtmLENBQUMsQ0FBQztBQUNMLENBQUM7QUFF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JvT3V0cHV0LnNvdXJjZU1hcCkpO1xuICBjb25zb2xlLmxvZygnRW1pdHRlZDonKTtcbiAgY29uc29sZS5sb2coYCAgJHtvdXRwdXRGaWxlfWApO1xuICBjb25zb2xlLmxvZyhgICAke291dHB1dEZpbGV9Lm1hcGApO1xufVxuIl19

+ 10
- 0
node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.d.ts Datei anzeigen

@@ -0,0 +1,10 @@
1
+/**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+import { RawSourceMap } from 'source-map';
9
+import * as webpack from 'webpack';
10
+export default function buildOptimizerLoader(this: webpack.loader.LoaderContext, content: string, previousSourceMap: RawSourceMap): void;

+ 63
- 0
node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 13
- 0
node_modules/@angular-devkit/build-optimizer/src/helpers/ast-utils.d.ts Datei anzeigen

@@ -0,0 +1,13 @@
1
+/**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+import * as ts from 'typescript';
9
+export declare function collectDeepNodes<T extends ts.Node>(node: ts.Node, kind: ts.SyntaxKind): T[];
10
+export declare function drilldownNodes<T extends ts.Node>(startingNode: ts.Node, path: {
11
+    prop: string | null;
12
+    kind: ts.SyntaxKind;
13
+}[]): T | null;

+ 39
- 0
node_modules/@angular-devkit/build-optimizer/src/helpers/ast-utils.js Datei anzeigen

@@ -0,0 +1,39 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+/**
4
+ * @license
5
+ * Copyright Google Inc. All Rights Reserved.
6
+ *
7
+ * Use of this source code is governed by an MIT-style license that can be
8
+ * found in the LICENSE file at https://angular.io/license
9
+ */
10
+const ts = require("typescript");
11
+// Find all nodes from the AST in the subtree of node of SyntaxKind kind.
12
+function collectDeepNodes(node, kind) {
13
+    const nodes = [];
14
+    const helper = (child) => {
15
+        if (child.kind === kind) {
16
+            nodes.push(child);
17
+        }
18
+        ts.forEachChild(child, helper);
19
+    };
20
+    ts.forEachChild(node, helper);
21
+    return nodes;
22
+}
23
+exports.collectDeepNodes = collectDeepNodes;
24
+function drilldownNodes(startingNode, path) {
25
+    let currentNode = startingNode;
26
+    for (const segment of path) {
27
+        if (segment.prop) {
28
+            // ts.Node has no index signature, so we need to cast it as any.
29
+            // tslint:disable-next-line:no-any
30
+            currentNode = currentNode[segment.prop];
31
+        }
32
+        if (!currentNode || currentNode.kind !== segment.kind) {
33
+            return null;
34
+        }
35
+    }
36
+    return currentNode;
37
+}
38
+exports.drilldownNodes = drilldownNodes;
39
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXN0LXV0aWxzLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9oYW5zbC9Tb3VyY2VzL2hhbnNsL2RldmtpdC8iLCJzb3VyY2VzIjpbInBhY2thZ2VzL2FuZ3VsYXJfZGV2a2l0L2J1aWxkX29wdGltaXplci9zcmMvaGVscGVycy9hc3QtdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQTs7Ozs7O0dBTUc7QUFDSCxpQ0FBaUM7QUFFakMseUVBQXlFO0FBQ3pFLDBCQUFvRCxJQUFhLEVBQUUsSUFBbUI7SUFDcEYsTUFBTSxLQUFLLEdBQVEsRUFBRSxDQUFDO0lBQ3RCLE1BQU0sTUFBTSxHQUFHLENBQUMsS0FBYztRQUM1QixFQUFFLENBQUMsQ0FBQyxLQUFLLENBQUMsSUFBSSxLQUFLLElBQUksQ0FBQyxDQUFDLENBQUM7WUFDeEIsS0FBSyxDQUFDLElBQUksQ0FBQyxLQUFVLENBQUMsQ0FBQztRQUN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vIGNhc3QgaXQgYXMgYW55LlxuICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOm5vLWFueVxuICAgICAgY3VycmVudE5vZGUgPSAoY3VycmVudE5vZGUgYXMgYW55KVtzZWdtZW50LnByb3BdO1xuICAgIH1cbiAgICBpZiAoIWN1cnJlbnROb2RlIHx8IGN1cnJlbnROb2RlLmtpbmQgIT09IHNlZ21lbnQua2luZCkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGN1cnJlbnROb2RlIGFzIFQ7XG59XG4iXX0=

+ 23
- 0
node_modules/@angular-devkit/build-optimizer/src/helpers/transform-javascript.d.ts Datei anzeigen

@@ -0,0 +1,23 @@
1
+/**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+import { RawSourceMap } from 'source-map';
9
+import * as ts from 'typescript';
10
+export interface TransformJavascriptOptions {
11
+    content: string;
12
+    inputFilePath?: string;
13
+    outputFilePath?: string;
14
+    emitSourceMap?: boolean;
15
+    strict?: boolean;
16
+    getTransforms: Array<(program: ts.Program) => ts.TransformerFactory<ts.SourceFile>>;
17
+}
18
+export interface TransformJavascriptOutput {
19
+    content: string | null;
20
+    sourceMap: RawSourceMap | null;
21
+    emitSkipped: boolean;
22
+}
23
+export declare function transformJavascript(options: TransformJavascriptOptions): TransformJavascriptOutput;

+ 119
- 0
node_modules/@angular-devkit/build-optimizer/src/helpers/transform-javascript.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 18
- 0
node_modules/@angular-devkit/build-optimizer/src/index.d.ts Datei anzeigen

@@ -0,0 +1,18 @@
1
+/**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+export { default as buildOptimizerLoader } from './build-optimizer/webpack-loader';
9
+export { buildOptimizer } from './build-optimizer/build-optimizer';
10
+export { PurifyPlugin } from './purify/webpack-plugin';
11
+export { purify } from './purify/purify';
12
+export { transformJavascript } from './helpers/transform-javascript';
13
+export { getFoldFileTransformer } from './transforms/class-fold';
14
+export { getImportTslibTransformer, testImportTslib } from './transforms/import-tslib';
15
+export { getPrefixClassesTransformer, testPrefixClasses } from './transforms/prefix-classes';
16
+export { getPrefixFunctionsTransformer } from './transforms/prefix-functions';
17
+export { getScrubFileTransformer, testScrubFile } from './transforms/scrub-file';
18
+export { getWrapEnumsTransformer, testWrapEnums } from './transforms/wrap-enums';

+ 36
- 0
node_modules/@angular-devkit/build-optimizer/src/index.js Datei anzeigen

@@ -0,0 +1,36 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+/**
4
+ * @license
5
+ * Copyright Google Inc. All Rights Reserved.
6
+ *
7
+ * Use of this source code is governed by an MIT-style license that can be
8
+ * found in the LICENSE file at https://angular.io/license
9
+ */
10
+var webpack_loader_1 = require("./build-optimizer/webpack-loader");
11
+exports.buildOptimizerLoader = webpack_loader_1.default;
12
+var build_optimizer_1 = require("./build-optimizer/build-optimizer");
13
+exports.buildOptimizer = build_optimizer_1.buildOptimizer;
14
+var webpack_plugin_1 = require("./purify/webpack-plugin");
15
+exports.PurifyPlugin = webpack_plugin_1.PurifyPlugin;
16
+var purify_1 = require("./purify/purify");
17
+exports.purify = purify_1.purify;
18
+var transform_javascript_1 = require("./helpers/transform-javascript");
19
+exports.transformJavascript = transform_javascript_1.transformJavascript;
20
+var class_fold_1 = require("./transforms/class-fold");
21
+exports.getFoldFileTransformer = class_fold_1.getFoldFileTransformer;
22
+var import_tslib_1 = require("./transforms/import-tslib");
23
+exports.getImportTslibTransformer = import_tslib_1.getImportTslibTransformer;
24
+exports.testImportTslib = import_tslib_1.testImportTslib;
25
+var prefix_classes_1 = require("./transforms/prefix-classes");
26
+exports.getPrefixClassesTransformer = prefix_classes_1.getPrefixClassesTransformer;
27
+exports.testPrefixClasses = prefix_classes_1.testPrefixClasses;
28
+var prefix_functions_1 = require("./transforms/prefix-functions");
29
+exports.getPrefixFunctionsTransformer = prefix_functions_1.getPrefixFunctionsTransformer;
30
+var scrub_file_1 = require("./transforms/scrub-file");
31
+exports.getScrubFileTransformer = scrub_file_1.getScrubFileTransformer;
32
+exports.testScrubFile = scrub_file_1.testScrubFile;
33
+var wrap_enums_1 = require("./transforms/wrap-enums");
34
+exports.getWrapEnumsTransformer = wrap_enums_1.getWrapEnumsTransformer;
35
+exports.testWrapEnums = wrap_enums_1.testWrapEnums;
36
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiL1VzZXJzL2hhbnNsL1NvdXJjZXMvaGFuc2wvZGV2a2l0LyIsInNvdXJjZXMiOlsicGFja2FnZXMvYW5ndWxhcl9kZXZraXQvYnVpbGRfb3B0aW1pemVyL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBOzs7Ozs7R0FNRztBQUNILG1FQUFtRjtBQUExRSxnREFBQSxPQUFPLENBQXdCO0FBQ3hDLHFFQUFtRTtBQUExRCwyQ0FBQSxjQUFjLENBQUE7QUFFdkIsMERBQXVEO0FBQTlDLHdDQUFBLFlBQVksQ0FBQTtBQUNyQiwwQ0FBeUM7QUFBaEMsMEJBQUEsTUFBTSxDQUFBO0FBRWYsdUVBQXFFO0FBQTVELHFEQUFBLG1CQUFtQixDQUFBO0FBRTVCLHNEQUFpRTtBQUF4RCw4Q0FBQSxzQkFBc0IsQ0FBQTtBQUMvQiwwREFBdUY7QUFBOUUsbURBQUEseUJBQXlCLENBQUE7QUFBRSx5Q0FBQSxlQUFlLENBQUE7QUFDbkQsOERBQTZGO0FBQXBGLHVEQUFBLDJCQUEyQixDQUFBO0FBQUUsNkNBQUEsaUJBQWlCLENBQUE7QUF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dldEltcG9ydFRzbGliVHJhbnNmb3JtZXIsIHRlc3RJbXBvcnRUc2xpYiB9IGZyb20gJy4vdHJhbnNmb3Jtcy9pbXBvcnQtdHNsaWInO1xuZXhwb3J0IHsgZ2V0UHJlZml4Q2xhc3Nlc1RyYW5zZm9ybWVyLCB0ZXN0UHJlZml4Q2xhc3NlcyB9IGZyb20gJy4vdHJhbnNmb3Jtcy9wcmVmaXgtY2xhc3Nlcyc7XG5leHBvcnQgeyBnZXRQcmVmaXhGdW5jdGlvbnNUcmFuc2Zvcm1lciB9IGZyb20gJy4vdHJhbnNmb3Jtcy9wcmVmaXgtZnVuY3Rpb25zJztcbmV4cG9ydCB7IGdldFNjcnViRmlsZVRyYW5zZm9ybWVyLCB0ZXN0U2NydWJGaWxlIH0gZnJvbSAnLi90cmFuc2Zvcm1zL3NjcnViLWZpbGUnO1xuZXhwb3J0IHsgZ2V0V3JhcEVudW1zVHJhbnNmb3JtZXIsIHRlc3RXcmFwRW51bXMgfSBmcm9tICcuL3RyYW5zZm9ybXMvd3JhcC1lbnVtcyc7XG4iXX0=

+ 0
- 0
node_modules/@angular-devkit/build-optimizer/src/purify/cli.d.ts Datei anzeigen


+ 27
- 0
node_modules/@angular-devkit/build-optimizer/src/purify/cli.js Datei anzeigen

@@ -0,0 +1,27 @@
1
+#!/usr/bin/env node
2
+"use strict";
3
+Object.defineProperty(exports, "__esModule", { value: true });
4
+const fs_1 = require("fs");
5
+const path_1 = require("path");
6
+const purify_1 = require("./purify");
7
+if (process.argv.length < 3 || process.argv.length > 4) {
8
+    throw new Error(`
9
+    purify should be called with either one or two arguments:
10
+
11
+      purify input.js
12
+      purify input.js output.js
13
+  `);
14
+}
15
+const currentDir = process.cwd();
16
+const inputFile = process.argv[2];
17
+const tsOrJsRegExp = /\.(j|t)s$/;
18
+if (!inputFile.match(tsOrJsRegExp)) {
19
+    throw new Error(`Input file must be .js or .ts.`);
20
+}
21
+// Use provided output file, or add the .purify suffix before the extension.
22
+const outputFile = process.argv[3]
23
+    || inputFile.replace(tsOrJsRegExp, (subStr) => `.purify${subStr}`);
24
+const purifyOutput = purify_1.purify(fs_1.readFileSync(path_1.join(currentDir, inputFile), 'UTF-8'));
25
+fs_1.writeFileSync(path_1.join(currentDir, outputFile), purifyOutput);
26
+console.log(`Emitted: ${outputFile}`);
27
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9oYW5zbC9Tb3VyY2VzL2hhbnNsL2RldmtpdC8iLCJzb3VyY2VzIjpbInBhY2thZ2VzL2FuZ3VsYXJfZGV2a2l0L2J1aWxkX29wdGltaXplci9zcmMvcHVyaWZ5L2NsaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFRQSwyQkFBaUQ7QUFDakQsK0JBQTRCO0FBQzVCLHFDQUFrQztBQUdsQyxFQUFFLENBQUMsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLE1BQU0sR0FBRyxDQUFDLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxNQUFNLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUN2RCxNQUFNLElBQUksS0FBSyxDQUFDOzs7OztHQUtmLENBQUMsQ0FBQztBQUNMLENBQUM7QUFFRCxNQUFNLFVBQVUsR0FBRyxPQUFPLENBQUMsR0FBRyxFQUFFLENBQUM7QUFFakMsTUFBTSxTQUFTLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNsQyxNQUFNLFlBQVksR0FBRyxXQUFXLENBQUM7QUFFakMsRUFBRSxDQUFDLENBQUMsQ0FBQyxTQUFTLENBQUMsS0FBSyxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUNuQyxNQUFNLElBQUksS0FBSyxDQUFDLGdDQUFnQyxDQUFDLENBQUM7QUFDcEQsQ0FBQztBQUVELDRFQUE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cbiAgICBwdXJpZnkgc2hvdWxkIGJlIGNhbGxlZCB3aXRoIGVpdGhlciBvbmUgb3IgdHdvIGFyZ3VtZW50czpcblxuICAgICAgcHVyaWZ5IGlucHV0LmpzXG4gICAgICBwdXJpZnkgaW5wdXQuanMgb3V0cHV0LmpzXG4gIGApO1xufVxuXG5jb25zdCBjdXJyZW50RGlyID0gcHJvY2Vzcy5jd2QoKTtcblxuY29uc3QgaW5wdXRGaWxlID0gcHJvY2Vzcy5hcmd2WzJdO1xuY29uc3QgdHNPckpzUmVnRXhwID0gL1xcLihqfHQpcyQvO1xuXG5pZiAoIWlucHV0RmlsZS5tYXRjaCh0c09ySnNSZWdFeHApKSB7XG4gIHRocm93IG5ldyBFcnJvcihgSW5wdXQgZmlsZSBtdXN0IGJlIC5qcyBvciAudHMuYCk7XG59XG5cbi8vIFVzZSBwcm92aWRlZCBvdXRwdXQgZmlsZSwgb3IgYWRkIHRoZSAucHVyaWZ5IHN1ZmZpeCBiZWZvcmUgdGhlIGV4dGVuc2lvbi5cbmNvbnN0IG91dHB1dEZpbGUgPSBwcm9jZXNzLmFyZ3ZbM11cbiAgfHwgaW5wdXRGaWxlLnJlcGxhY2UodHNPckpzUmVnRXhwLCAoc3ViU3RyKSA9PiBgLnB1cmlmeSR7c3ViU3RyfWApO1xuXG5jb25zdCBwdXJpZnlPdXRwdXQgPSBwdXJpZnkocmVhZEZpbGVTeW5jKGpvaW4oY3VycmVudERpciwgaW5wdXRGaWxlKSwgJ1VURi04JykpO1xuXG53cml0ZUZpbGVTeW5jKGpvaW4oY3VycmVudERpciwgb3V0cHV0RmlsZSksIHB1cmlmeU91dHB1dCk7XG5jb25zb2xlLmxvZyhgRW1pdHRlZDogJHtvdXRwdXRGaWxlfWApO1xuIl19

+ 6
- 0
node_modules/@angular-devkit/build-optimizer/src/purify/purify.d.ts Datei anzeigen

@@ -0,0 +1,6 @@
1
+export interface Insert {
2
+    pos: number;
3
+    content: string;
4
+}
5
+export declare function purifyReplacements(content: string): Insert[];
6
+export declare function purify(content: string): string;

+ 53
- 0
node_modules/@angular-devkit/build-optimizer/src/purify/purify.js Datei anzeigen

@@ -0,0 +1,53 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+/**
4
+ * @license
5
+ * Copyright Google Inc. All Rights Reserved.
6
+ *
7
+ * Use of this source code is governed by an MIT-style license that can be
8
+ * found in the LICENSE file at https://angular.io/license
9
+ */
10
+const webpack_sources_1 = require("webpack-sources");
11
+// This matches a comment left by the build-optimizer that contains pure import paths
12
+const importCommentRegex = /\/\*\* PURE_IMPORTS_START (\S+) PURE_IMPORTS_END \*\//mg;
13
+function purifyReplacements(content) {
14
+    const pureImportMatches = getMatches(content, importCommentRegex, 1)
15
+        .map(match => match.replace(/^\.+/, ''))
16
+        .join('|');
17
+    if (!pureImportMatches) {
18
+        return [];
19
+    }
20
+    const inserts = [];
21
+    /* Prefix safe imports with pure */
22
+    const regex = new RegExp(`(_(${pureImportMatches})__(_default)? = )(__webpack_require__(\\.\\w)?\\(\\S+\\);)`, 'mg');
23
+    let match;
24
+    // tslint:disable-next-line:no-conditional-assignment
25
+    while (match = regex.exec(content)) {
26
+        inserts.push({
27
+            pos: match.index + match[1].length,
28
+            content: '/*@__PURE__*/',
29
+        });
30
+    }
31
+    return inserts;
32
+}
33
+exports.purifyReplacements = purifyReplacements;
34
+function purify(content) {
35
+    const rawSource = new webpack_sources_1.RawSource(content);
36
+    const replaceSource = new webpack_sources_1.ReplaceSource(rawSource, 'file.js');
37
+    const inserts = purifyReplacements(content);
38
+    inserts.forEach((insert) => {
39
+        replaceSource.insert(insert.pos, insert.content);
40
+    });
41
+    return replaceSource.source();
42
+}
43
+exports.purify = purify;
44
+function getMatches(str, regex, index) {
45
+    let matches = [];
46
+    let match;
47
+    // tslint:disable-next-line:no-conditional-assignment
48
+    while (match = regex.exec(str)) {
49
+        matches = matches.concat(match[index].split(','));
50
+    }
51
+    return matches;
52
+}
53
+//# sourceMappingURL=data:application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GUuanMnKTtcblxuICBjb25zdCBpbnNlcnRzID0gcHVyaWZ5UmVwbGFjZW1lbnRzKGNvbnRlbnQpO1xuICBpbnNlcnRzLmZvckVhY2goKGluc2VydCkgPT4ge1xuICAgIHJlcGxhY2VTb3VyY2UuaW5zZXJ0KGluc2VydC5wb3MsIGluc2VydC5jb250ZW50KTtcbiAgfSk7XG5cbiAgcmV0dXJuIHJlcGxhY2VTb3VyY2Uuc291cmNlKCk7XG59XG5cbmZ1bmN0aW9uIGdldE1hdGNoZXMoc3RyOiBzdHJpbmcsIHJlZ2V4OiBSZWdFeHAsIGluZGV4OiBudW1iZXIpIHtcbiAgbGV0IG1hdGNoZXM6IHN0cmluZ1tdID0gW107XG4gIGxldCBtYXRjaDtcbiAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOm5vLWNvbmRpdGlvbmFsLWFzc2lnbm1lbnRcbiAgd2hpbGUgKG1hdGNoID0gcmVnZXguZXhlYyhzdHIpKSB7XG4gICAgbWF0Y2hlcyA9IG1hdGNoZXMuY29uY2F0KG1hdGNoW2luZGV4XS5zcGxpdCgnLCcpKTtcbiAgfVxuXG4gIHJldHVybiBtYXRjaGVzO1xufVxuIl19

+ 12
- 0
node_modules/@angular-devkit/build-optimizer/src/purify/webpack-plugin.d.ts Datei anzeigen

@@ -0,0 +1,12 @@
1
+/**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+import * as webpack from 'webpack';
9
+export declare class PurifyPlugin {
10
+    constructor();
11
+    apply(compiler: webpack.Compiler): void;
12
+}

+ 31
- 0
node_modules/@angular-devkit/build-optimizer/src/purify/webpack-plugin.js Datei anzeigen

@@ -0,0 +1,31 @@
1
+"use strict";
2
+Object.defineProperty(exports, "__esModule", { value: true });
3
+const webpack_sources_1 = require("webpack-sources");
4
+const purify_1 = require("./purify");
5
+class PurifyPlugin {
6
+    constructor() { }
7
+    apply(compiler) {
8
+        // tslint:disable-next-line:no-any
9
+        compiler.plugin('compilation', (compilation) => {
10
+            compilation.plugin('optimize-chunk-assets', (chunks, callback) => {
11
+                chunks.forEach((chunk) => {
12
+                    chunk.files
13
+                        .filter((fileName) => fileName.endsWith('.js'))
14
+                        .forEach((fileName) => {
15
+                        const inserts = purify_1.purifyReplacements(compilation.assets[fileName].source());
16
+                        if (inserts.length > 0) {
17
+                            const replaceSource = new webpack_sources_1.ReplaceSource(compilation.assets[fileName], fileName);
18
+                            inserts.forEach((insert) => {
19
+                                replaceSource.insert(insert.pos, insert.content);
20
+                            });
21
+                            compilation.assets[fileName] = replaceSource;
22
+                        }
23
+                    });
24
+                });
25
+                callback();
26
+            });
27
+        });
28
+    }
29
+}
30
+exports.PurifyPlugin = PurifyPlugin;
31
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2VicGFjay1wbHVnaW4uanMiLCJzb3VyY2VSb290IjoiL1VzZXJzL2hhbnNsL1NvdXJjZXMvaGFuc2wvZGV2a2l0LyIsInNvdXJjZXMiOlsicGFja2FnZXMvYW5ndWxhcl9kZXZraXQvYnVpbGRfb3B0aW1pemVyL3NyYy9wdXJpZnkvd2VicGFjay1wbHVnaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFRQSxxREFBZ0Q7QUFDaEQscUNBQThDO0FBTzlDO0lBQ0UsZ0JBQWdCLENBQUM7SUFDVixLQUFLLENBQUMsUUFBMEI7UUFDckMsa0NBQWtDO1FBQ2xDLFFBQVEsQ0FBQyxNQUFNLENBQUMsYUFBYSxFQUFFLENBQUMsV0FBZ0I7WUFDOUMsV0FBVyxDQUFDLE1BQU0sQ0FBQyx1QkFBdUIsRUFBRSxDQUFDLE1BQWUsRUFBRSxRQUFvQjtnQkFDaEYsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDLEtBQVk7b0JBQzFCLEtBQUssQ0FBQyxL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sYWNlbWVudHMoY29tcGlsYXRpb24uYXNzZXRzW2ZpbGVOYW1lXS5zb3VyY2UoKSk7XG5cbiAgICAgICAgICAgICAgaWYgKGluc2VydHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHJlcGxhY2VTb3VyY2UgPSBuZXcgUmVwbGFjZVNvdXJjZShjb21waWxhdGlvbi5hc3NldHNbZmlsZU5hbWVdLCBmaWxlTmFtZSk7XG4gICAgICAgICAgICAgICAgaW5zZXJ0cy5mb3JFYWNoKChpbnNlcnQpID0+IHtcbiAgICAgICAgICAgICAgICAgIHJlcGxhY2VTb3VyY2UuaW5zZXJ0KGluc2VydC5wb3MsIGluc2VydC5jb250ZW50KTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBjb21waWxhdGlvbi5hc3NldHNbZmlsZU5hbWVdID0gcmVwbGFjZVNvdXJjZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgICAgICBjYWxsYmFjaygpO1xuICAgICAgfSk7XG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==

+ 9
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/class-fold.d.ts Datei anzeigen

@@ -0,0 +1,9 @@
1
+/**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+import * as ts from 'typescript';
9
+export declare function getFoldFileTransformer(program: ts.Program): ts.TransformerFactory<ts.SourceFile>;

+ 142
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/class-fold.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 10
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/import-tslib.d.ts Datei anzeigen

@@ -0,0 +1,10 @@
1
+/**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+import * as ts from 'typescript';
9
+export declare function testImportTslib(content: string): boolean;
10
+export declare function getImportTslibTransformer(): ts.TransformerFactory<ts.SourceFile>;

+ 75
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/import-tslib.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 10
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/prefix-classes.d.ts Datei anzeigen

@@ -0,0 +1,10 @@
1
+/**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+import * as ts from 'typescript';
9
+export declare function testPrefixClasses(content: string): boolean;
10
+export declare function getPrefixClassesTransformer(): ts.TransformerFactory<ts.SourceFile>;

+ 162
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/prefix-classes.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 11
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/prefix-functions.d.ts Datei anzeigen

@@ -0,0 +1,11 @@
1
+/**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+import * as ts from 'typescript';
9
+export declare function getPrefixFunctionsTransformer(): ts.TransformerFactory<ts.SourceFile>;
10
+export declare function findTopLevelFunctions(parentNode: ts.Node): ts.Node[];
11
+export declare function findPureImports(parentNode: ts.Node): string[];

+ 96
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/prefix-functions.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 11
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.d.ts Datei anzeigen

@@ -0,0 +1,11 @@
1
+/**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+import * as ts from 'typescript';
9
+export declare function testScrubFile(content: string): boolean;
10
+export declare function getScrubFileTransformer(program: ts.Program): ts.TransformerFactory<ts.SourceFile>;
11
+export declare function expect<T extends ts.Node>(node: ts.Node, kind: ts.SyntaxKind): T;

+ 505
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/scrub-file.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 10
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/wrap-enums.d.ts Datei anzeigen

@@ -0,0 +1,10 @@
1
+/**
2
+ * @license
3
+ * Copyright Google Inc. All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+import * as ts from 'typescript';
9
+export declare function testWrapEnums(content: string): boolean;
10
+export declare function getWrapEnumsTransformer(): ts.TransformerFactory<ts.SourceFile>;

+ 277
- 0
node_modules/@angular-devkit/build-optimizer/src/transforms/wrap-enums.js
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


+ 3
- 0
node_modules/@angular-devkit/build-optimizer/webpack-loader/package.json Datei anzeigen

@@ -0,0 +1,3 @@
1
+{
2
+  "main": "../src/build-optimizer/webpack-loader.js"
3
+}

+ 6
- 0
node_modules/@angular/animations/README.md Datei anzeigen

@@ -0,0 +1,6 @@
1
+Angular
2
+=======
3
+
4
+The sources for this package are in the main [Angular](https://github.com/angular/angular) repo. Please file issues and pull requests against that repo.
5
+
6
+License: MIT

+ 0
- 0
node_modules/@angular/animations/animations.d.ts Datei anzeigen


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.