UNPKG

1.22 MBJavaScriptView Raw
1(function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
2/******/ // The module cache
3/******/ var installedModules = {};
4/******/
5/******/ // The require function
6/******/ function __webpack_require__(moduleId) {
7/******/
8/******/ // Check if module is in cache
9/******/ if(installedModules[moduleId]) {
10/******/ return installedModules[moduleId].exports;
11/******/ }
12/******/ // Create a new module (and put it into the cache)
13/******/ var module = installedModules[moduleId] = {
14/******/ i: moduleId,
15/******/ l: false,
16/******/ exports: {}
17/******/ };
18/******/
19/******/ // Execute the module function
20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21/******/
22/******/ // Flag the module as loaded
23/******/ module.l = true;
24/******/
25/******/ // Return the exports of the module
26/******/ return module.exports;
27/******/ }
28/******/
29/******/
30/******/ // expose the modules object (__webpack_modules__)
31/******/ __webpack_require__.m = modules;
32/******/
33/******/ // expose the module cache
34/******/ __webpack_require__.c = installedModules;
35/******/
36/******/ // define getter function for harmony exports
37/******/ __webpack_require__.d = function(exports, name, getter) {
38/******/ if(!__webpack_require__.o(exports, name)) {
39/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
40/******/ }
41/******/ };
42/******/
43/******/ // define __esModule on exports
44/******/ __webpack_require__.r = function(exports) {
45/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47/******/ }
48/******/ Object.defineProperty(exports, '__esModule', { value: true });
49/******/ };
50/******/
51/******/ // create a fake namespace object
52/******/ // mode & 1: value is a module id, require it
53/******/ // mode & 2: merge all properties of value into the ns
54/******/ // mode & 4: return value when already ns object
55/******/ // mode & 8|1: behave like require
56/******/ __webpack_require__.t = function(value, mode) {
57/******/ if(mode & 1) value = __webpack_require__(value);
58/******/ if(mode & 8) return value;
59/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60/******/ var ns = Object.create(null);
61/******/ __webpack_require__.r(ns);
62/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64/******/ return ns;
65/******/ };
66/******/
67/******/ // getDefaultExport function for compatibility with non-harmony modules
68/******/ __webpack_require__.n = function(module) {
69/******/ var getter = module && module.__esModule ?
70/******/ function getDefault() { return module['default']; } :
71/******/ function getModuleExports() { return module; };
72/******/ __webpack_require__.d(getter, 'a', getter);
73/******/ return getter;
74/******/ };
75/******/
76/******/ // Object.prototype.hasOwnProperty.call
77/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78/******/
79/******/ // __webpack_public_path__
80/******/ __webpack_require__.p = "";
81/******/
82/******/
83/******/ // Load entry module and return exports
84/******/ return __webpack_require__(__webpack_require__.s = 349);
85/******/ })
86/************************************************************************/
87/******/ ([
88/* 0 */,
89/* 1 */,
90/* 2 */
91/***/ (function(module, exports, __webpack_require__) {
92
93"use strict";
94
95Object.defineProperty(exports, "__esModule", { value: true });
96exports.sortTexts = {
97 one: "00001",
98 two: "00002",
99 three: "00003",
100 four: "00004",
101};
102exports.projectRootPatterns = [".git", "autoload", "plugin"];
103
104
105/***/ }),
106/* 3 */,
107/* 4 */
108/***/ (function(module, exports, __webpack_require__) {
109
110"use strict";
111/* --------------------------------------------------------------------------------------------
112 * Copyright (c) Microsoft Corporation. All rights reserved.
113 * Licensed under the MIT License. See License.txt in the project root for license information.
114 * ------------------------------------------------------------------------------------------ */
115/// <reference path="./thenable.ts" />
116
117function __export(m) {
118 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
119}
120Object.defineProperty(exports, "__esModule", { value: true });
121const vscode_languageserver_protocol_1 = __webpack_require__(5);
122exports.Event = vscode_languageserver_protocol_1.Event;
123const configuration_1 = __webpack_require__(30);
124const workspaceFolders_1 = __webpack_require__(32);
125const Is = __webpack_require__(31);
126const UUID = __webpack_require__(33);
127// ------------- Reexport the API surface of the language worker API ----------------------
128__export(__webpack_require__(5));
129const fm = __webpack_require__(34);
130var Files;
131(function (Files) {
132 Files.uriToFilePath = fm.uriToFilePath;
133 Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;
134 Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;
135 Files.resolve = fm.resolve;
136 Files.resolveModule = fm.resolveModule;
137 Files.resolveModule2 = fm.resolveModule2;
138 Files.resolveModulePath = fm.resolveModulePath;
139})(Files = exports.Files || (exports.Files = {}));
140let shutdownReceived = false;
141let exitTimer = undefined;
142function setupExitTimer() {
143 const argName = '--clientProcessId';
144 function runTimer(value) {
145 try {
146 let processId = parseInt(value);
147 if (!isNaN(processId)) {
148 exitTimer = setInterval(() => {
149 try {
150 process.kill(processId, 0);
151 }
152 catch (ex) {
153 // Parent process doesn't exist anymore. Exit the server.
154 process.exit(shutdownReceived ? 0 : 1);
155 }
156 }, 3000);
157 }
158 }
159 catch (e) {
160 // Ignore errors;
161 }
162 }
163 for (let i = 2; i < process.argv.length; i++) {
164 let arg = process.argv[i];
165 if (arg === argName && i + 1 < process.argv.length) {
166 runTimer(process.argv[i + 1]);
167 return;
168 }
169 else {
170 let args = arg.split('=');
171 if (args[0] === argName) {
172 runTimer(args[1]);
173 }
174 }
175 }
176}
177setupExitTimer();
178function null2Undefined(value) {
179 if (value === null) {
180 return void 0;
181 }
182 return value;
183}
184/**
185 * A manager for simple text documents
186 */
187class TextDocuments {
188 /**
189 * Create a new text document manager.
190 */
191 constructor() {
192 this._documents = Object.create(null);
193 this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();
194 this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();
195 this._onDidClose = new vscode_languageserver_protocol_1.Emitter();
196 this._onDidSave = new vscode_languageserver_protocol_1.Emitter();
197 this._onWillSave = new vscode_languageserver_protocol_1.Emitter();
198 }
199 /**
200 * Returns the [TextDocumentSyncKind](#TextDocumentSyncKind) used by
201 * this text document manager.
202 */
203 get syncKind() {
204 return vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
205 }
206 /**
207 * An event that fires when a text document managed by this manager
208 * has been opened or the content changes.
209 */
210 get onDidChangeContent() {
211 return this._onDidChangeContent.event;
212 }
213 /**
214 * An event that fires when a text document managed by this manager
215 * has been opened.
216 */
217 get onDidOpen() {
218 return this._onDidOpen.event;
219 }
220 /**
221 * An event that fires when a text document managed by this manager
222 * will be saved.
223 */
224 get onWillSave() {
225 return this._onWillSave.event;
226 }
227 /**
228 * Sets a handler that will be called if a participant wants to provide
229 * edits during a text document save.
230 */
231 onWillSaveWaitUntil(handler) {
232 this._willSaveWaitUntil = handler;
233 }
234 /**
235 * An event that fires when a text document managed by this manager
236 * has been saved.
237 */
238 get onDidSave() {
239 return this._onDidSave.event;
240 }
241 /**
242 * An event that fires when a text document managed by this manager
243 * has been closed.
244 */
245 get onDidClose() {
246 return this._onDidClose.event;
247 }
248 /**
249 * Returns the document for the given URI. Returns undefined if
250 * the document is not mananged by this instance.
251 *
252 * @param uri The text document's URI to retrieve.
253 * @return the text document or `undefined`.
254 */
255 get(uri) {
256 return this._documents[uri];
257 }
258 /**
259 * Returns all text documents managed by this instance.
260 *
261 * @return all text documents.
262 */
263 all() {
264 return Object.keys(this._documents).map(key => this._documents[key]);
265 }
266 /**
267 * Returns the URIs of all text documents managed by this instance.
268 *
269 * @return the URI's of all text documents.
270 */
271 keys() {
272 return Object.keys(this._documents);
273 }
274 /**
275 * Listens for `low level` notification on the given connection to
276 * update the text documents managed by this instance.
277 *
278 * @param connection The connection to listen on.
279 */
280 listen(connection) {
281 function isUpdateableDocument(value) {
282 return Is.func(value.update);
283 }
284 connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Full;
285 connection.onDidOpenTextDocument((event) => {
286 let td = event.textDocument;
287 let document = vscode_languageserver_protocol_1.TextDocument.create(td.uri, td.languageId, td.version, td.text);
288 this._documents[td.uri] = document;
289 let toFire = Object.freeze({ document });
290 this._onDidOpen.fire(toFire);
291 this._onDidChangeContent.fire(toFire);
292 });
293 connection.onDidChangeTextDocument((event) => {
294 let td = event.textDocument;
295 let changes = event.contentChanges;
296 let last = changes.length > 0 ? changes[changes.length - 1] : undefined;
297 if (last) {
298 let document = this._documents[td.uri];
299 if (document && isUpdateableDocument(document)) {
300 if (td.version === null || td.version === void 0) {
301 throw new Error(`Received document change event for ${td.uri} without valid version identifier`);
302 }
303 document.update(last, td.version);
304 this._onDidChangeContent.fire(Object.freeze({ document }));
305 }
306 }
307 });
308 connection.onDidCloseTextDocument((event) => {
309 let document = this._documents[event.textDocument.uri];
310 if (document) {
311 delete this._documents[event.textDocument.uri];
312 this._onDidClose.fire(Object.freeze({ document }));
313 }
314 });
315 connection.onWillSaveTextDocument((event) => {
316 let document = this._documents[event.textDocument.uri];
317 if (document) {
318 this._onWillSave.fire(Object.freeze({ document, reason: event.reason }));
319 }
320 });
321 connection.onWillSaveTextDocumentWaitUntil((event, token) => {
322 let document = this._documents[event.textDocument.uri];
323 if (document && this._willSaveWaitUntil) {
324 return this._willSaveWaitUntil(Object.freeze({ document, reason: event.reason }), token);
325 }
326 else {
327 return [];
328 }
329 });
330 connection.onDidSaveTextDocument((event) => {
331 let document = this._documents[event.textDocument.uri];
332 if (document) {
333 this._onDidSave.fire(Object.freeze({ document }));
334 }
335 });
336 }
337}
338exports.TextDocuments = TextDocuments;
339/**
340 * Helps tracking error message. Equal occurences of the same
341 * message are only stored once. This class is for example
342 * useful if text documents are validated in a loop and equal
343 * error message should be folded into one.
344 */
345class ErrorMessageTracker {
346 constructor() {
347 this._messages = Object.create(null);
348 }
349 /**
350 * Add a message to the tracker.
351 *
352 * @param message The message to add.
353 */
354 add(message) {
355 let count = this._messages[message];
356 if (!count) {
357 count = 0;
358 }
359 count++;
360 this._messages[message] = count;
361 }
362 /**
363 * Send all tracked messages to the connection's window.
364 *
365 * @param connection The connection established between client and server.
366 */
367 sendErrors(connection) {
368 Object.keys(this._messages).forEach(message => {
369 connection.window.showErrorMessage(message);
370 });
371 }
372}
373exports.ErrorMessageTracker = ErrorMessageTracker;
374var BulkRegistration;
375(function (BulkRegistration) {
376 /**
377 * Creates a new bulk registration.
378 * @return an empty bulk registration.
379 */
380 function create() {
381 return new BulkRegistrationImpl();
382 }
383 BulkRegistration.create = create;
384})(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));
385class BulkRegistrationImpl {
386 constructor() {
387 this._registrations = [];
388 this._registered = new Set();
389 }
390 add(type, registerOptions) {
391 const method = Is.string(type) ? type : type.method;
392 if (this._registered.has(method)) {
393 throw new Error(`${method} is already added to this registration`);
394 }
395 const id = UUID.generateUuid();
396 this._registrations.push({
397 id: id,
398 method: method,
399 registerOptions: registerOptions || {}
400 });
401 this._registered.add(method);
402 }
403 asRegistrationParams() {
404 return {
405 registrations: this._registrations
406 };
407 }
408}
409var BulkUnregistration;
410(function (BulkUnregistration) {
411 function create() {
412 return new BulkUnregistrationImpl(undefined, []);
413 }
414 BulkUnregistration.create = create;
415})(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));
416class BulkUnregistrationImpl {
417 constructor(_connection, unregistrations) {
418 this._connection = _connection;
419 this._unregistrations = new Map();
420 unregistrations.forEach(unregistration => {
421 this._unregistrations.set(unregistration.method, unregistration);
422 });
423 }
424 get isAttached() {
425 return !!this._connection;
426 }
427 attach(connection) {
428 this._connection = connection;
429 }
430 add(unregistration) {
431 this._unregistrations.set(unregistration.method, unregistration);
432 }
433 dispose() {
434 let unregistrations = [];
435 for (let unregistration of this._unregistrations.values()) {
436 unregistrations.push(unregistration);
437 }
438 let params = {
439 unregisterations: unregistrations
440 };
441 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
442 this._connection.console.info(`Bulk unregistration failed.`);
443 });
444 }
445 disposeSingle(arg) {
446 const method = Is.string(arg) ? arg : arg.method;
447 const unregistration = this._unregistrations.get(method);
448 if (!unregistration) {
449 return false;
450 }
451 let params = {
452 unregisterations: [unregistration]
453 };
454 this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {
455 this._unregistrations.delete(method);
456 }, (_error) => {
457 this._connection.console.info(`Unregistering request handler for ${unregistration.id} failed.`);
458 });
459 return true;
460 }
461}
462class ConnectionLogger {
463 constructor() {
464 }
465 rawAttach(connection) {
466 this._rawConnection = connection;
467 }
468 attach(connection) {
469 this._connection = connection;
470 }
471 get connection() {
472 if (!this._connection) {
473 throw new Error('Remote is not attached to a connection yet.');
474 }
475 return this._connection;
476 }
477 fillServerCapabilities(_capabilities) {
478 }
479 initialize(_capabilities) {
480 }
481 error(message) {
482 this.send(vscode_languageserver_protocol_1.MessageType.Error, message);
483 }
484 warn(message) {
485 this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);
486 }
487 info(message) {
488 this.send(vscode_languageserver_protocol_1.MessageType.Info, message);
489 }
490 log(message) {
491 this.send(vscode_languageserver_protocol_1.MessageType.Log, message);
492 }
493 send(type, message) {
494 if (this._rawConnection) {
495 this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message });
496 }
497 }
498}
499class RemoteWindowImpl {
500 constructor() {
501 }
502 attach(connection) {
503 this._connection = connection;
504 }
505 get connection() {
506 if (!this._connection) {
507 throw new Error('Remote is not attached to a connection yet.');
508 }
509 return this._connection;
510 }
511 initialize(_capabilities) {
512 }
513 fillServerCapabilities(_capabilities) {
514 }
515 showErrorMessage(message, ...actions) {
516 let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };
517 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
518 }
519 showWarningMessage(message, ...actions) {
520 let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };
521 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
522 }
523 showInformationMessage(message, ...actions) {
524 let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };
525 return this._connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);
526 }
527}
528class RemoteClientImpl {
529 attach(connection) {
530 this._connection = connection;
531 }
532 get connection() {
533 if (!this._connection) {
534 throw new Error('Remote is not attached to a connection yet.');
535 }
536 return this._connection;
537 }
538 initialize(_capabilities) {
539 }
540 fillServerCapabilities(_capabilities) {
541 }
542 register(typeOrRegistrations, registerOptionsOrType, registerOptions) {
543 if (typeOrRegistrations instanceof BulkRegistrationImpl) {
544 return this.registerMany(typeOrRegistrations);
545 }
546 else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {
547 return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);
548 }
549 else {
550 return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);
551 }
552 }
553 registerSingle1(unregistration, type, registerOptions) {
554 const method = Is.string(type) ? type : type.method;
555 const id = UUID.generateUuid();
556 let params = {
557 registrations: [{ id, method, registerOptions: registerOptions || {} }]
558 };
559 if (!unregistration.isAttached) {
560 unregistration.attach(this._connection);
561 }
562 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
563 unregistration.add({ id: id, method: method });
564 return unregistration;
565 }, (_error) => {
566 this.connection.console.info(`Registering request handler for ${method} failed.`);
567 return Promise.reject(_error);
568 });
569 }
570 registerSingle2(type, registerOptions) {
571 const method = Is.string(type) ? type : type.method;
572 const id = UUID.generateUuid();
573 let params = {
574 registrations: [{ id, method, registerOptions: registerOptions || {} }]
575 };
576 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {
577 return vscode_languageserver_protocol_1.Disposable.create(() => {
578 this.unregisterSingle(id, method);
579 });
580 }, (_error) => {
581 this.connection.console.info(`Registering request handler for ${method} failed.`);
582 return Promise.reject(_error);
583 });
584 }
585 unregisterSingle(id, method) {
586 let params = {
587 unregisterations: [{ id, method }]
588 };
589 return this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(undefined, (_error) => {
590 this.connection.console.info(`Unregistering request handler for ${id} failed.`);
591 });
592 }
593 registerMany(registrations) {
594 let params = registrations.asRegistrationParams();
595 return this._connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {
596 return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));
597 }, (_error) => {
598 this.connection.console.info(`Bulk registration failed.`);
599 return Promise.reject(_error);
600 });
601 }
602}
603class _RemoteWorkspaceImpl {
604 constructor() {
605 }
606 attach(connection) {
607 this._connection = connection;
608 }
609 get connection() {
610 if (!this._connection) {
611 throw new Error('Remote is not attached to a connection yet.');
612 }
613 return this._connection;
614 }
615 initialize(_capabilities) {
616 }
617 fillServerCapabilities(_capabilities) {
618 }
619 applyEdit(paramOrEdit) {
620 function isApplyWorkspaceEditParams(value) {
621 return value && !!value.edit;
622 }
623 let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };
624 return this._connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);
625 }
626}
627const RemoteWorkspaceImpl = workspaceFolders_1.WorkspaceFoldersFeature(configuration_1.ConfigurationFeature(_RemoteWorkspaceImpl));
628class TracerImpl {
629 constructor() {
630 this._trace = vscode_languageserver_protocol_1.Trace.Off;
631 }
632 attach(connection) {
633 this._connection = connection;
634 }
635 get connection() {
636 if (!this._connection) {
637 throw new Error('Remote is not attached to a connection yet.');
638 }
639 return this._connection;
640 }
641 initialize(_capabilities) {
642 }
643 fillServerCapabilities(_capabilities) {
644 }
645 set trace(value) {
646 this._trace = value;
647 }
648 log(message, verbose) {
649 if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {
650 return;
651 }
652 this._connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {
653 message: message,
654 verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined
655 });
656 }
657}
658class TelemetryImpl {
659 constructor() {
660 }
661 attach(connection) {
662 this._connection = connection;
663 }
664 get connection() {
665 if (!this._connection) {
666 throw new Error('Remote is not attached to a connection yet.');
667 }
668 return this._connection;
669 }
670 initialize(_capabilities) {
671 }
672 fillServerCapabilities(_capabilities) {
673 }
674 logEvent(data) {
675 this._connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data);
676 }
677}
678function combineConsoleFeatures(one, two) {
679 return function (Base) {
680 return two(one(Base));
681 };
682}
683exports.combineConsoleFeatures = combineConsoleFeatures;
684function combineTelemetryFeatures(one, two) {
685 return function (Base) {
686 return two(one(Base));
687 };
688}
689exports.combineTelemetryFeatures = combineTelemetryFeatures;
690function combineTracerFeatures(one, two) {
691 return function (Base) {
692 return two(one(Base));
693 };
694}
695exports.combineTracerFeatures = combineTracerFeatures;
696function combineClientFeatures(one, two) {
697 return function (Base) {
698 return two(one(Base));
699 };
700}
701exports.combineClientFeatures = combineClientFeatures;
702function combineWindowFeatures(one, two) {
703 return function (Base) {
704 return two(one(Base));
705 };
706}
707exports.combineWindowFeatures = combineWindowFeatures;
708function combineWorkspaceFeatures(one, two) {
709 return function (Base) {
710 return two(one(Base));
711 };
712}
713exports.combineWorkspaceFeatures = combineWorkspaceFeatures;
714function combineFeatures(one, two) {
715 function combine(one, two, func) {
716 if (one && two) {
717 return func(one, two);
718 }
719 else if (one) {
720 return one;
721 }
722 else {
723 return two;
724 }
725 }
726 let result = {
727 __brand: 'features',
728 console: combine(one.console, two.console, combineConsoleFeatures),
729 tracer: combine(one.tracer, two.tracer, combineTracerFeatures),
730 telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),
731 client: combine(one.client, two.client, combineClientFeatures),
732 window: combine(one.window, two.window, combineWindowFeatures),
733 workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures)
734 };
735 return result;
736}
737exports.combineFeatures = combineFeatures;
738function createConnection(arg1, arg2, arg3, arg4) {
739 let factories;
740 let input;
741 let output;
742 let strategy;
743 if (arg1 !== void 0 && arg1.__brand === 'features') {
744 factories = arg1;
745 arg1 = arg2;
746 arg2 = arg3;
747 arg3 = arg4;
748 }
749 if (vscode_languageserver_protocol_1.ConnectionStrategy.is(arg1)) {
750 strategy = arg1;
751 }
752 else {
753 input = arg1;
754 output = arg2;
755 strategy = arg3;
756 }
757 return _createConnection(input, output, strategy, factories);
758}
759exports.createConnection = createConnection;
760function _createConnection(input, output, strategy, factories) {
761 if (!input && !output && process.argv.length > 2) {
762 let port = void 0;
763 let pipeName = void 0;
764 let argv = process.argv.slice(2);
765 for (let i = 0; i < argv.length; i++) {
766 let arg = argv[i];
767 if (arg === '--node-ipc') {
768 input = new vscode_languageserver_protocol_1.IPCMessageReader(process);
769 output = new vscode_languageserver_protocol_1.IPCMessageWriter(process);
770 break;
771 }
772 else if (arg === '--stdio') {
773 input = process.stdin;
774 output = process.stdout;
775 break;
776 }
777 else if (arg === '--socket') {
778 port = parseInt(argv[i + 1]);
779 break;
780 }
781 else if (arg === '--pipe') {
782 pipeName = argv[i + 1];
783 break;
784 }
785 else {
786 var args = arg.split('=');
787 if (args[0] === '--socket') {
788 port = parseInt(args[1]);
789 break;
790 }
791 else if (args[0] === '--pipe') {
792 pipeName = args[1];
793 break;
794 }
795 }
796 }
797 if (port) {
798 let transport = vscode_languageserver_protocol_1.createServerSocketTransport(port);
799 input = transport[0];
800 output = transport[1];
801 }
802 else if (pipeName) {
803 let transport = vscode_languageserver_protocol_1.createServerPipeTransport(pipeName);
804 input = transport[0];
805 output = transport[1];
806 }
807 }
808 var commandLineMessage = "Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'";
809 if (!input) {
810 throw new Error("Connection input stream is not set. " + commandLineMessage);
811 }
812 if (!output) {
813 throw new Error("Connection output stream is not set. " + commandLineMessage);
814 }
815 // Backwards compatibility
816 if (Is.func(input.read) && Is.func(input.on)) {
817 let inputStream = input;
818 inputStream.on('end', () => {
819 process.exit(shutdownReceived ? 0 : 1);
820 });
821 inputStream.on('close', () => {
822 process.exit(shutdownReceived ? 0 : 1);
823 });
824 }
825 const logger = (factories && factories.console ? new (factories.console(ConnectionLogger))() : new ConnectionLogger());
826 const connection = vscode_languageserver_protocol_1.createProtocolConnection(input, output, logger, strategy);
827 logger.rawAttach(connection);
828 const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());
829 const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());
830 const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());
831 const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());
832 const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());
833 const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace];
834 function asThenable(value) {
835 if (Is.thenable(value)) {
836 return value;
837 }
838 else {
839 return Promise.resolve(value);
840 }
841 }
842 let shutdownHandler = undefined;
843 let initializeHandler = undefined;
844 let exitHandler = undefined;
845 let protocolConnection = {
846 listen: () => connection.listen(),
847 sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),
848 onRequest: (type, handler) => connection.onRequest(type, handler),
849 sendNotification: (type, param) => {
850 const method = Is.string(type) ? type : type.method;
851 if (arguments.length === 1) {
852 connection.sendNotification(method);
853 }
854 else {
855 connection.sendNotification(method, param);
856 }
857 },
858 onNotification: (type, handler) => connection.onNotification(type, handler),
859 onInitialize: (handler) => initializeHandler = handler,
860 onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),
861 onShutdown: (handler) => shutdownHandler = handler,
862 onExit: (handler) => exitHandler = handler,
863 get console() { return logger; },
864 get telemetry() { return telemetry; },
865 get tracer() { return tracer; },
866 get client() { return client; },
867 get window() { return remoteWindow; },
868 get workspace() { return workspace; },
869 onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),
870 onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),
871 __textDocumentSync: undefined,
872 onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),
873 onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),
874 onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),
875 onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),
876 onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),
877 onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),
878 sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),
879 onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, handler),
880 onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, handler),
881 onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),
882 onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, handler),
883 onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, handler),
884 onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, handler),
885 onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, handler),
886 onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, handler),
887 onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, handler),
888 onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, handler),
889 onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, handler),
890 onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, handler),
891 onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, handler),
892 onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, handler),
893 onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, handler),
894 onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, handler),
895 onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, handler),
896 onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, handler),
897 onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, handler),
898 onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, handler),
899 onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, handler),
900 onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, handler),
901 onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, handler),
902 onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, handler),
903 onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, handler),
904 onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, handler),
905 dispose: () => connection.dispose()
906 };
907 for (let remote of allRemotes) {
908 remote.attach(protocolConnection);
909 }
910 connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {
911 const processId = params.processId;
912 if (Is.number(processId) && exitTimer === void 0) {
913 // We received a parent process id. Set up a timer to periodically check
914 // if the parent is still alive.
915 setInterval(() => {
916 try {
917 process.kill(processId, 0);
918 }
919 catch (ex) {
920 // Parent process doesn't exist anymore. Exit the server.
921 process.exit(shutdownReceived ? 0 : 1);
922 }
923 }, 3000);
924 }
925 if (Is.string(params.trace)) {
926 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);
927 }
928 for (let remote of allRemotes) {
929 remote.initialize(params.capabilities);
930 }
931 if (initializeHandler) {
932 let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token);
933 return asThenable(result).then((value) => {
934 if (value instanceof vscode_languageserver_protocol_1.ResponseError) {
935 return value;
936 }
937 let result = value;
938 if (!result) {
939 result = { capabilities: {} };
940 }
941 let capabilities = result.capabilities;
942 if (!capabilities) {
943 capabilities = {};
944 result.capabilities = capabilities;
945 }
946 if (capabilities.textDocumentSync === void 0 || capabilities.textDocumentSync === null) {
947 capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
948 }
949 else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {
950 capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;
951 }
952 for (let remote of allRemotes) {
953 remote.fillServerCapabilities(capabilities);
954 }
955 return result;
956 });
957 }
958 else {
959 let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };
960 for (let remote of allRemotes) {
961 remote.fillServerCapabilities(result.capabilities);
962 }
963 return result;
964 }
965 });
966 connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {
967 shutdownReceived = true;
968 if (shutdownHandler) {
969 return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);
970 }
971 else {
972 return undefined;
973 }
974 });
975 connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {
976 try {
977 if (exitHandler) {
978 exitHandler();
979 }
980 }
981 finally {
982 if (shutdownReceived) {
983 process.exit(0);
984 }
985 else {
986 process.exit(1);
987 }
988 }
989 });
990 connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {
991 tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);
992 });
993 return protocolConnection;
994}
995// Export the protocol currently in proposed state.
996var ProposedFeatures;
997(function (ProposedFeatures) {
998 ProposedFeatures.all = {
999 __brand: 'features',
1000 };
1001})(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));
1002
1003
1004/***/ }),
1005/* 5 */
1006/***/ (function(module, exports, __webpack_require__) {
1007
1008"use strict";
1009/* --------------------------------------------------------------------------------------------
1010 * Copyright (c) Microsoft Corporation. All rights reserved.
1011 * Licensed under the MIT License. See License.txt in the project root for license information.
1012 * ------------------------------------------------------------------------------------------ */
1013
1014function __export(m) {
1015 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1016}
1017Object.defineProperty(exports, "__esModule", { value: true });
1018const vscode_jsonrpc_1 = __webpack_require__(6);
1019exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
1020exports.ResponseError = vscode_jsonrpc_1.ResponseError;
1021exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
1022exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
1023exports.Disposable = vscode_jsonrpc_1.Disposable;
1024exports.Event = vscode_jsonrpc_1.Event;
1025exports.Emitter = vscode_jsonrpc_1.Emitter;
1026exports.Trace = vscode_jsonrpc_1.Trace;
1027exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
1028exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
1029exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
1030exports.RequestType = vscode_jsonrpc_1.RequestType;
1031exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
1032exports.NotificationType = vscode_jsonrpc_1.NotificationType;
1033exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
1034exports.MessageReader = vscode_jsonrpc_1.MessageReader;
1035exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
1036exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
1037exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
1038exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
1039exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
1040exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
1041exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
1042exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
1043exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
1044exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
1045exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
1046__export(__webpack_require__(20));
1047__export(__webpack_require__(21));
1048function createProtocolConnection(reader, writer, logger, strategy) {
1049 return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
1050}
1051exports.createProtocolConnection = createProtocolConnection;
1052
1053
1054/***/ }),
1055/* 6 */
1056/***/ (function(module, exports, __webpack_require__) {
1057
1058"use strict";
1059/* --------------------------------------------------------------------------------------------
1060 * Copyright (c) Microsoft Corporation. All rights reserved.
1061 * Licensed under the MIT License. See License.txt in the project root for license information.
1062 * ------------------------------------------------------------------------------------------ */
1063/// <reference path="./thenable.ts" />
1064
1065function __export(m) {
1066 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
1067}
1068Object.defineProperty(exports, "__esModule", { value: true });
1069const Is = __webpack_require__(7);
1070const messages_1 = __webpack_require__(8);
1071exports.RequestType = messages_1.RequestType;
1072exports.RequestType0 = messages_1.RequestType0;
1073exports.RequestType1 = messages_1.RequestType1;
1074exports.RequestType2 = messages_1.RequestType2;
1075exports.RequestType3 = messages_1.RequestType3;
1076exports.RequestType4 = messages_1.RequestType4;
1077exports.RequestType5 = messages_1.RequestType5;
1078exports.RequestType6 = messages_1.RequestType6;
1079exports.RequestType7 = messages_1.RequestType7;
1080exports.RequestType8 = messages_1.RequestType8;
1081exports.RequestType9 = messages_1.RequestType9;
1082exports.ResponseError = messages_1.ResponseError;
1083exports.ErrorCodes = messages_1.ErrorCodes;
1084exports.NotificationType = messages_1.NotificationType;
1085exports.NotificationType0 = messages_1.NotificationType0;
1086exports.NotificationType1 = messages_1.NotificationType1;
1087exports.NotificationType2 = messages_1.NotificationType2;
1088exports.NotificationType3 = messages_1.NotificationType3;
1089exports.NotificationType4 = messages_1.NotificationType4;
1090exports.NotificationType5 = messages_1.NotificationType5;
1091exports.NotificationType6 = messages_1.NotificationType6;
1092exports.NotificationType7 = messages_1.NotificationType7;
1093exports.NotificationType8 = messages_1.NotificationType8;
1094exports.NotificationType9 = messages_1.NotificationType9;
1095const messageReader_1 = __webpack_require__(9);
1096exports.MessageReader = messageReader_1.MessageReader;
1097exports.StreamMessageReader = messageReader_1.StreamMessageReader;
1098exports.IPCMessageReader = messageReader_1.IPCMessageReader;
1099exports.SocketMessageReader = messageReader_1.SocketMessageReader;
1100const messageWriter_1 = __webpack_require__(11);
1101exports.MessageWriter = messageWriter_1.MessageWriter;
1102exports.StreamMessageWriter = messageWriter_1.StreamMessageWriter;
1103exports.IPCMessageWriter = messageWriter_1.IPCMessageWriter;
1104exports.SocketMessageWriter = messageWriter_1.SocketMessageWriter;
1105const events_1 = __webpack_require__(10);
1106exports.Disposable = events_1.Disposable;
1107exports.Event = events_1.Event;
1108exports.Emitter = events_1.Emitter;
1109const cancellation_1 = __webpack_require__(12);
1110exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;
1111exports.CancellationToken = cancellation_1.CancellationToken;
1112const linkedMap_1 = __webpack_require__(13);
1113__export(__webpack_require__(14));
1114__export(__webpack_require__(19));
1115var CancelNotification;
1116(function (CancelNotification) {
1117 CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
1118})(CancelNotification || (CancelNotification = {}));
1119exports.NullLogger = Object.freeze({
1120 error: () => { },
1121 warn: () => { },
1122 info: () => { },
1123 log: () => { }
1124});
1125var Trace;
1126(function (Trace) {
1127 Trace[Trace["Off"] = 0] = "Off";
1128 Trace[Trace["Messages"] = 1] = "Messages";
1129 Trace[Trace["Verbose"] = 2] = "Verbose";
1130})(Trace = exports.Trace || (exports.Trace = {}));
1131(function (Trace) {
1132 function fromString(value) {
1133 value = value.toLowerCase();
1134 switch (value) {
1135 case 'off':
1136 return Trace.Off;
1137 case 'messages':
1138 return Trace.Messages;
1139 case 'verbose':
1140 return Trace.Verbose;
1141 default:
1142 return Trace.Off;
1143 }
1144 }
1145 Trace.fromString = fromString;
1146 function toString(value) {
1147 switch (value) {
1148 case Trace.Off:
1149 return 'off';
1150 case Trace.Messages:
1151 return 'messages';
1152 case Trace.Verbose:
1153 return 'verbose';
1154 default:
1155 return 'off';
1156 }
1157 }
1158 Trace.toString = toString;
1159})(Trace = exports.Trace || (exports.Trace = {}));
1160var TraceFormat;
1161(function (TraceFormat) {
1162 TraceFormat["Text"] = "text";
1163 TraceFormat["JSON"] = "json";
1164})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1165(function (TraceFormat) {
1166 function fromString(value) {
1167 value = value.toLowerCase();
1168 if (value === 'json') {
1169 return TraceFormat.JSON;
1170 }
1171 else {
1172 return TraceFormat.Text;
1173 }
1174 }
1175 TraceFormat.fromString = fromString;
1176})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
1177var SetTraceNotification;
1178(function (SetTraceNotification) {
1179 SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');
1180})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
1181var LogTraceNotification;
1182(function (LogTraceNotification) {
1183 LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');
1184})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
1185var ConnectionErrors;
1186(function (ConnectionErrors) {
1187 /**
1188 * The connection is closed.
1189 */
1190 ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
1191 /**
1192 * The connection got disposed.
1193 */
1194 ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
1195 /**
1196 * The connection is already in listening mode.
1197 */
1198 ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
1199})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
1200class ConnectionError extends Error {
1201 constructor(code, message) {
1202 super(message);
1203 this.code = code;
1204 Object.setPrototypeOf(this, ConnectionError.prototype);
1205 }
1206}
1207exports.ConnectionError = ConnectionError;
1208var ConnectionStrategy;
1209(function (ConnectionStrategy) {
1210 function is(value) {
1211 let candidate = value;
1212 return candidate && Is.func(candidate.cancelUndispatched);
1213 }
1214 ConnectionStrategy.is = is;
1215})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
1216var ConnectionState;
1217(function (ConnectionState) {
1218 ConnectionState[ConnectionState["New"] = 1] = "New";
1219 ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
1220 ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
1221 ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
1222})(ConnectionState || (ConnectionState = {}));
1223function _createMessageConnection(messageReader, messageWriter, logger, strategy) {
1224 let sequenceNumber = 0;
1225 let notificationSquenceNumber = 0;
1226 let unknownResponseSquenceNumber = 0;
1227 const version = '2.0';
1228 let starRequestHandler = undefined;
1229 let requestHandlers = Object.create(null);
1230 let starNotificationHandler = undefined;
1231 let notificationHandlers = Object.create(null);
1232 let timer;
1233 let messageQueue = new linkedMap_1.LinkedMap();
1234 let responsePromises = Object.create(null);
1235 let requestTokens = Object.create(null);
1236 let trace = Trace.Off;
1237 let traceFormat = TraceFormat.Text;
1238 let tracer;
1239 let state = ConnectionState.New;
1240 let errorEmitter = new events_1.Emitter();
1241 let closeEmitter = new events_1.Emitter();
1242 let unhandledNotificationEmitter = new events_1.Emitter();
1243 let disposeEmitter = new events_1.Emitter();
1244 function createRequestQueueKey(id) {
1245 return 'req-' + id.toString();
1246 }
1247 function createResponseQueueKey(id) {
1248 if (id === null) {
1249 return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
1250 }
1251 else {
1252 return 'res-' + id.toString();
1253 }
1254 }
1255 function createNotificationQueueKey() {
1256 return 'not-' + (++notificationSquenceNumber).toString();
1257 }
1258 function addMessageToQueue(queue, message) {
1259 if (messages_1.isRequestMessage(message)) {
1260 queue.set(createRequestQueueKey(message.id), message);
1261 }
1262 else if (messages_1.isResponseMessage(message)) {
1263 queue.set(createResponseQueueKey(message.id), message);
1264 }
1265 else {
1266 queue.set(createNotificationQueueKey(), message);
1267 }
1268 }
1269 function cancelUndispatched(_message) {
1270 return undefined;
1271 }
1272 function isListening() {
1273 return state === ConnectionState.Listening;
1274 }
1275 function isClosed() {
1276 return state === ConnectionState.Closed;
1277 }
1278 function isDisposed() {
1279 return state === ConnectionState.Disposed;
1280 }
1281 function closeHandler() {
1282 if (state === ConnectionState.New || state === ConnectionState.Listening) {
1283 state = ConnectionState.Closed;
1284 closeEmitter.fire(undefined);
1285 }
1286 // If the connection is disposed don't sent close events.
1287 }
1288 ;
1289 function readErrorHandler(error) {
1290 errorEmitter.fire([error, undefined, undefined]);
1291 }
1292 function writeErrorHandler(data) {
1293 errorEmitter.fire(data);
1294 }
1295 messageReader.onClose(closeHandler);
1296 messageReader.onError(readErrorHandler);
1297 messageWriter.onClose(closeHandler);
1298 messageWriter.onError(writeErrorHandler);
1299 function triggerMessageQueue() {
1300 if (timer || messageQueue.size === 0) {
1301 return;
1302 }
1303 timer = setImmediate(() => {
1304 timer = undefined;
1305 processMessageQueue();
1306 });
1307 }
1308 function processMessageQueue() {
1309 if (messageQueue.size === 0) {
1310 return;
1311 }
1312 let message = messageQueue.shift();
1313 try {
1314 if (messages_1.isRequestMessage(message)) {
1315 handleRequest(message);
1316 }
1317 else if (messages_1.isNotificationMessage(message)) {
1318 handleNotification(message);
1319 }
1320 else if (messages_1.isResponseMessage(message)) {
1321 handleResponse(message);
1322 }
1323 else {
1324 handleInvalidMessage(message);
1325 }
1326 }
1327 finally {
1328 triggerMessageQueue();
1329 }
1330 }
1331 let callback = (message) => {
1332 try {
1333 // We have received a cancellation message. Check if the message is still in the queue
1334 // and cancel it if allowed to do so.
1335 if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
1336 let key = createRequestQueueKey(message.params.id);
1337 let toCancel = messageQueue.get(key);
1338 if (messages_1.isRequestMessage(toCancel)) {
1339 let response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
1340 if (response && (response.error !== void 0 || response.result !== void 0)) {
1341 messageQueue.delete(key);
1342 response.id = toCancel.id;
1343 traceSendingResponse(response, message.method, Date.now());
1344 messageWriter.write(response);
1345 return;
1346 }
1347 }
1348 }
1349 addMessageToQueue(messageQueue, message);
1350 }
1351 finally {
1352 triggerMessageQueue();
1353 }
1354 };
1355 function handleRequest(requestMessage) {
1356 if (isDisposed()) {
1357 // we return here silently since we fired an event when the
1358 // connection got disposed.
1359 return;
1360 }
1361 function reply(resultOrError, method, startTime) {
1362 let message = {
1363 jsonrpc: version,
1364 id: requestMessage.id
1365 };
1366 if (resultOrError instanceof messages_1.ResponseError) {
1367 message.error = resultOrError.toJson();
1368 }
1369 else {
1370 message.result = resultOrError === void 0 ? null : resultOrError;
1371 }
1372 traceSendingResponse(message, method, startTime);
1373 messageWriter.write(message);
1374 }
1375 function replyError(error, method, startTime) {
1376 let message = {
1377 jsonrpc: version,
1378 id: requestMessage.id,
1379 error: error.toJson()
1380 };
1381 traceSendingResponse(message, method, startTime);
1382 messageWriter.write(message);
1383 }
1384 function replySuccess(result, method, startTime) {
1385 // The JSON RPC defines that a response must either have a result or an error
1386 // So we can't treat undefined as a valid response result.
1387 if (result === void 0) {
1388 result = null;
1389 }
1390 let message = {
1391 jsonrpc: version,
1392 id: requestMessage.id,
1393 result: result
1394 };
1395 traceSendingResponse(message, method, startTime);
1396 messageWriter.write(message);
1397 }
1398 traceReceivedRequest(requestMessage);
1399 let element = requestHandlers[requestMessage.method];
1400 let type;
1401 let requestHandler;
1402 if (element) {
1403 type = element.type;
1404 requestHandler = element.handler;
1405 }
1406 let startTime = Date.now();
1407 if (requestHandler || starRequestHandler) {
1408 let cancellationSource = new cancellation_1.CancellationTokenSource();
1409 let tokenKey = String(requestMessage.id);
1410 requestTokens[tokenKey] = cancellationSource;
1411 try {
1412 let handlerResult;
1413 if (requestMessage.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
1414 handlerResult = requestHandler
1415 ? requestHandler(cancellationSource.token)
1416 : starRequestHandler(requestMessage.method, cancellationSource.token);
1417 }
1418 else if (Is.array(requestMessage.params) && (type === void 0 || type.numberOfParams > 1)) {
1419 handlerResult = requestHandler
1420 ? requestHandler(...requestMessage.params, cancellationSource.token)
1421 : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);
1422 }
1423 else {
1424 handlerResult = requestHandler
1425 ? requestHandler(requestMessage.params, cancellationSource.token)
1426 : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
1427 }
1428 let promise = handlerResult;
1429 if (!handlerResult) {
1430 delete requestTokens[tokenKey];
1431 replySuccess(handlerResult, requestMessage.method, startTime);
1432 }
1433 else if (promise.then) {
1434 promise.then((resultOrError) => {
1435 delete requestTokens[tokenKey];
1436 reply(resultOrError, requestMessage.method, startTime);
1437 }, error => {
1438 delete requestTokens[tokenKey];
1439 if (error instanceof messages_1.ResponseError) {
1440 replyError(error, requestMessage.method, startTime);
1441 }
1442 else if (error && Is.string(error.message)) {
1443 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
1444 }
1445 else {
1446 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
1447 }
1448 });
1449 }
1450 else {
1451 delete requestTokens[tokenKey];
1452 reply(handlerResult, requestMessage.method, startTime);
1453 }
1454 }
1455 catch (error) {
1456 delete requestTokens[tokenKey];
1457 if (error instanceof messages_1.ResponseError) {
1458 reply(error, requestMessage.method, startTime);
1459 }
1460 else if (error && Is.string(error.message)) {
1461 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
1462 }
1463 else {
1464 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
1465 }
1466 }
1467 }
1468 else {
1469 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
1470 }
1471 }
1472 function handleResponse(responseMessage) {
1473 if (isDisposed()) {
1474 // See handle request.
1475 return;
1476 }
1477 if (responseMessage.id === null) {
1478 if (responseMessage.error) {
1479 logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
1480 }
1481 else {
1482 logger.error(`Received response message without id. No further error information provided.`);
1483 }
1484 }
1485 else {
1486 let key = String(responseMessage.id);
1487 let responsePromise = responsePromises[key];
1488 traceReceivedResponse(responseMessage, responsePromise);
1489 if (responsePromise) {
1490 delete responsePromises[key];
1491 try {
1492 if (responseMessage.error) {
1493 let error = responseMessage.error;
1494 responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
1495 }
1496 else if (responseMessage.result !== void 0) {
1497 responsePromise.resolve(responseMessage.result);
1498 }
1499 else {
1500 throw new Error('Should never happen.');
1501 }
1502 }
1503 catch (error) {
1504 if (error.message) {
1505 logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
1506 }
1507 else {
1508 logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
1509 }
1510 }
1511 }
1512 }
1513 }
1514 function handleNotification(message) {
1515 if (isDisposed()) {
1516 // See handle request.
1517 return;
1518 }
1519 let type = undefined;
1520 let notificationHandler;
1521 if (message.method === CancelNotification.type.method) {
1522 notificationHandler = (params) => {
1523 let id = params.id;
1524 let source = requestTokens[String(id)];
1525 if (source) {
1526 source.cancel();
1527 }
1528 };
1529 }
1530 else {
1531 let element = notificationHandlers[message.method];
1532 if (element) {
1533 notificationHandler = element.handler;
1534 type = element.type;
1535 }
1536 }
1537 if (notificationHandler || starNotificationHandler) {
1538 try {
1539 traceReceivedNotification(message);
1540 if (message.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
1541 notificationHandler ? notificationHandler() : starNotificationHandler(message.method);
1542 }
1543 else if (Is.array(message.params) && (type === void 0 || type.numberOfParams > 1)) {
1544 notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);
1545 }
1546 else {
1547 notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);
1548 }
1549 }
1550 catch (error) {
1551 if (error.message) {
1552 logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
1553 }
1554 else {
1555 logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
1556 }
1557 }
1558 }
1559 else {
1560 unhandledNotificationEmitter.fire(message);
1561 }
1562 }
1563 function handleInvalidMessage(message) {
1564 if (!message) {
1565 logger.error('Received empty message.');
1566 return;
1567 }
1568 logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
1569 // Test whether we find an id to reject the promise
1570 let responseMessage = message;
1571 if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
1572 let key = String(responseMessage.id);
1573 let responseHandler = responsePromises[key];
1574 if (responseHandler) {
1575 responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
1576 }
1577 }
1578 }
1579 function traceSendingRequest(message) {
1580 if (trace === Trace.Off || !tracer) {
1581 return;
1582 }
1583 if (traceFormat === TraceFormat.Text) {
1584 let data = undefined;
1585 if (trace === Trace.Verbose && message.params) {
1586 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1587 }
1588 tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
1589 }
1590 else {
1591 logLSPMessage('send-request', message);
1592 }
1593 }
1594 function traceSendingNotification(message) {
1595 if (trace === Trace.Off || !tracer) {
1596 return;
1597 }
1598 if (traceFormat === TraceFormat.Text) {
1599 let data = undefined;
1600 if (trace === Trace.Verbose) {
1601 if (message.params) {
1602 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1603 }
1604 else {
1605 data = 'No parameters provided.\n\n';
1606 }
1607 }
1608 tracer.log(`Sending notification '${message.method}'.`, data);
1609 }
1610 else {
1611 logLSPMessage('send-notification', message);
1612 }
1613 }
1614 function traceSendingResponse(message, method, startTime) {
1615 if (trace === Trace.Off || !tracer) {
1616 return;
1617 }
1618 if (traceFormat === TraceFormat.Text) {
1619 let data = undefined;
1620 if (trace === Trace.Verbose) {
1621 if (message.error && message.error.data) {
1622 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
1623 }
1624 else {
1625 if (message.result) {
1626 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
1627 }
1628 else if (message.error === void 0) {
1629 data = 'No result returned.\n\n';
1630 }
1631 }
1632 }
1633 tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
1634 }
1635 else {
1636 logLSPMessage('send-response', message);
1637 }
1638 }
1639 function traceReceivedRequest(message) {
1640 if (trace === Trace.Off || !tracer) {
1641 return;
1642 }
1643 if (traceFormat === TraceFormat.Text) {
1644 let data = undefined;
1645 if (trace === Trace.Verbose && message.params) {
1646 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1647 }
1648 tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
1649 }
1650 else {
1651 logLSPMessage('receive-request', message);
1652 }
1653 }
1654 function traceReceivedNotification(message) {
1655 if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
1656 return;
1657 }
1658 if (traceFormat === TraceFormat.Text) {
1659 let data = undefined;
1660 if (trace === Trace.Verbose) {
1661 if (message.params) {
1662 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
1663 }
1664 else {
1665 data = 'No parameters provided.\n\n';
1666 }
1667 }
1668 tracer.log(`Received notification '${message.method}'.`, data);
1669 }
1670 else {
1671 logLSPMessage('receive-notification', message);
1672 }
1673 }
1674 function traceReceivedResponse(message, responsePromise) {
1675 if (trace === Trace.Off || !tracer) {
1676 return;
1677 }
1678 if (traceFormat === TraceFormat.Text) {
1679 let data = undefined;
1680 if (trace === Trace.Verbose) {
1681 if (message.error && message.error.data) {
1682 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
1683 }
1684 else {
1685 if (message.result) {
1686 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
1687 }
1688 else if (message.error === void 0) {
1689 data = 'No result returned.\n\n';
1690 }
1691 }
1692 }
1693 if (responsePromise) {
1694 let error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
1695 tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
1696 }
1697 else {
1698 tracer.log(`Received response ${message.id} without active response promise.`, data);
1699 }
1700 }
1701 else {
1702 logLSPMessage('receive-response', message);
1703 }
1704 }
1705 function logLSPMessage(type, message) {
1706 if (!tracer || trace === Trace.Off) {
1707 return;
1708 }
1709 const lspMessage = {
1710 isLSPMessage: true,
1711 type,
1712 message,
1713 timestamp: Date.now()
1714 };
1715 tracer.log(lspMessage);
1716 }
1717 function throwIfClosedOrDisposed() {
1718 if (isClosed()) {
1719 throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
1720 }
1721 if (isDisposed()) {
1722 throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
1723 }
1724 }
1725 function throwIfListening() {
1726 if (isListening()) {
1727 throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
1728 }
1729 }
1730 function throwIfNotListening() {
1731 if (!isListening()) {
1732 throw new Error('Call listen() first.');
1733 }
1734 }
1735 function undefinedToNull(param) {
1736 if (param === void 0) {
1737 return null;
1738 }
1739 else {
1740 return param;
1741 }
1742 }
1743 function computeMessageParams(type, params) {
1744 let result;
1745 let numberOfParams = type.numberOfParams;
1746 switch (numberOfParams) {
1747 case 0:
1748 result = null;
1749 break;
1750 case 1:
1751 result = undefinedToNull(params[0]);
1752 break;
1753 default:
1754 result = [];
1755 for (let i = 0; i < params.length && i < numberOfParams; i++) {
1756 result.push(undefinedToNull(params[i]));
1757 }
1758 if (params.length < numberOfParams) {
1759 for (let i = params.length; i < numberOfParams; i++) {
1760 result.push(null);
1761 }
1762 }
1763 break;
1764 }
1765 return result;
1766 }
1767 let connection = {
1768 sendNotification: (type, ...params) => {
1769 throwIfClosedOrDisposed();
1770 let method;
1771 let messageParams;
1772 if (Is.string(type)) {
1773 method = type;
1774 switch (params.length) {
1775 case 0:
1776 messageParams = null;
1777 break;
1778 case 1:
1779 messageParams = params[0];
1780 break;
1781 default:
1782 messageParams = params;
1783 break;
1784 }
1785 }
1786 else {
1787 method = type.method;
1788 messageParams = computeMessageParams(type, params);
1789 }
1790 let notificationMessage = {
1791 jsonrpc: version,
1792 method: method,
1793 params: messageParams
1794 };
1795 traceSendingNotification(notificationMessage);
1796 messageWriter.write(notificationMessage);
1797 },
1798 onNotification: (type, handler) => {
1799 throwIfClosedOrDisposed();
1800 if (Is.func(type)) {
1801 starNotificationHandler = type;
1802 }
1803 else if (handler) {
1804 if (Is.string(type)) {
1805 notificationHandlers[type] = { type: undefined, handler };
1806 }
1807 else {
1808 notificationHandlers[type.method] = { type, handler };
1809 }
1810 }
1811 },
1812 sendRequest: (type, ...params) => {
1813 throwIfClosedOrDisposed();
1814 throwIfNotListening();
1815 let method;
1816 let messageParams;
1817 let token = undefined;
1818 if (Is.string(type)) {
1819 method = type;
1820 switch (params.length) {
1821 case 0:
1822 messageParams = null;
1823 break;
1824 case 1:
1825 // The cancellation token is optional so it can also be undefined.
1826 if (cancellation_1.CancellationToken.is(params[0])) {
1827 messageParams = null;
1828 token = params[0];
1829 }
1830 else {
1831 messageParams = undefinedToNull(params[0]);
1832 }
1833 break;
1834 default:
1835 const last = params.length - 1;
1836 if (cancellation_1.CancellationToken.is(params[last])) {
1837 token = params[last];
1838 if (params.length === 2) {
1839 messageParams = undefinedToNull(params[0]);
1840 }
1841 else {
1842 messageParams = params.slice(0, last).map(value => undefinedToNull(value));
1843 }
1844 }
1845 else {
1846 messageParams = params.map(value => undefinedToNull(value));
1847 }
1848 break;
1849 }
1850 }
1851 else {
1852 method = type.method;
1853 messageParams = computeMessageParams(type, params);
1854 let numberOfParams = type.numberOfParams;
1855 token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
1856 }
1857 let id = sequenceNumber++;
1858 let result = new Promise((resolve, reject) => {
1859 let requestMessage = {
1860 jsonrpc: version,
1861 id: id,
1862 method: method,
1863 params: messageParams
1864 };
1865 let responsePromise = { method: method, timerStart: Date.now(), resolve, reject };
1866 traceSendingRequest(requestMessage);
1867 try {
1868 messageWriter.write(requestMessage);
1869 }
1870 catch (e) {
1871 // Writing the message failed. So we need to reject the promise.
1872 responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
1873 responsePromise = null;
1874 }
1875 if (responsePromise) {
1876 responsePromises[String(id)] = responsePromise;
1877 }
1878 });
1879 if (token) {
1880 token.onCancellationRequested(() => {
1881 connection.sendNotification(CancelNotification.type, { id });
1882 });
1883 }
1884 return result;
1885 },
1886 onRequest: (type, handler) => {
1887 throwIfClosedOrDisposed();
1888 if (Is.func(type)) {
1889 starRequestHandler = type;
1890 }
1891 else if (handler) {
1892 if (Is.string(type)) {
1893 requestHandlers[type] = { type: undefined, handler };
1894 }
1895 else {
1896 requestHandlers[type.method] = { type, handler };
1897 }
1898 }
1899 },
1900 trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
1901 let _sendNotification = false;
1902 let _traceFormat = TraceFormat.Text;
1903 if (sendNotificationOrTraceOptions !== void 0) {
1904 if (Is.boolean(sendNotificationOrTraceOptions)) {
1905 _sendNotification = sendNotificationOrTraceOptions;
1906 }
1907 else {
1908 _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
1909 _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
1910 }
1911 }
1912 trace = _value;
1913 traceFormat = _traceFormat;
1914 if (trace === Trace.Off) {
1915 tracer = undefined;
1916 }
1917 else {
1918 tracer = _tracer;
1919 }
1920 if (_sendNotification && !isClosed() && !isDisposed()) {
1921 connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
1922 }
1923 },
1924 onError: errorEmitter.event,
1925 onClose: closeEmitter.event,
1926 onUnhandledNotification: unhandledNotificationEmitter.event,
1927 onDispose: disposeEmitter.event,
1928 dispose: () => {
1929 if (isDisposed()) {
1930 return;
1931 }
1932 state = ConnectionState.Disposed;
1933 disposeEmitter.fire(undefined);
1934 let error = new Error('Connection got disposed.');
1935 Object.keys(responsePromises).forEach((key) => {
1936 responsePromises[key].reject(error);
1937 });
1938 responsePromises = Object.create(null);
1939 requestTokens = Object.create(null);
1940 messageQueue = new linkedMap_1.LinkedMap();
1941 // Test for backwards compatibility
1942 if (Is.func(messageWriter.dispose)) {
1943 messageWriter.dispose();
1944 }
1945 if (Is.func(messageReader.dispose)) {
1946 messageReader.dispose();
1947 }
1948 },
1949 listen: () => {
1950 throwIfClosedOrDisposed();
1951 throwIfListening();
1952 state = ConnectionState.Listening;
1953 messageReader.listen(callback);
1954 },
1955 inspect: () => {
1956 console.log("inspect");
1957 }
1958 };
1959 connection.onNotification(LogTraceNotification.type, (params) => {
1960 if (trace === Trace.Off || !tracer) {
1961 return;
1962 }
1963 tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
1964 });
1965 return connection;
1966}
1967function isMessageReader(value) {
1968 return value.listen !== void 0 && value.read === void 0;
1969}
1970function isMessageWriter(value) {
1971 return value.write !== void 0 && value.end === void 0;
1972}
1973function createMessageConnection(input, output, logger, strategy) {
1974 if (!logger) {
1975 logger = exports.NullLogger;
1976 }
1977 let reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input);
1978 let writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output);
1979 return _createMessageConnection(reader, writer, logger, strategy);
1980}
1981exports.createMessageConnection = createMessageConnection;
1982
1983
1984/***/ }),
1985/* 7 */
1986/***/ (function(module, exports, __webpack_require__) {
1987
1988"use strict";
1989/* --------------------------------------------------------------------------------------------
1990 * Copyright (c) Microsoft Corporation. All rights reserved.
1991 * Licensed under the MIT License. See License.txt in the project root for license information.
1992 * ------------------------------------------------------------------------------------------ */
1993
1994Object.defineProperty(exports, "__esModule", { value: true });
1995function boolean(value) {
1996 return value === true || value === false;
1997}
1998exports.boolean = boolean;
1999function string(value) {
2000 return typeof value === 'string' || value instanceof String;
2001}
2002exports.string = string;
2003function number(value) {
2004 return typeof value === 'number' || value instanceof Number;
2005}
2006exports.number = number;
2007function error(value) {
2008 return value instanceof Error;
2009}
2010exports.error = error;
2011function func(value) {
2012 return typeof value === 'function';
2013}
2014exports.func = func;
2015function array(value) {
2016 return Array.isArray(value);
2017}
2018exports.array = array;
2019function stringArray(value) {
2020 return array(value) && value.every(elem => string(elem));
2021}
2022exports.stringArray = stringArray;
2023
2024
2025/***/ }),
2026/* 8 */
2027/***/ (function(module, exports, __webpack_require__) {
2028
2029"use strict";
2030/* --------------------------------------------------------------------------------------------
2031 * Copyright (c) Microsoft Corporation. All rights reserved.
2032 * Licensed under the MIT License. See License.txt in the project root for license information.
2033 * ------------------------------------------------------------------------------------------ */
2034
2035Object.defineProperty(exports, "__esModule", { value: true });
2036const is = __webpack_require__(7);
2037/**
2038 * Predefined error codes.
2039 */
2040var ErrorCodes;
2041(function (ErrorCodes) {
2042 // Defined by JSON RPC
2043 ErrorCodes.ParseError = -32700;
2044 ErrorCodes.InvalidRequest = -32600;
2045 ErrorCodes.MethodNotFound = -32601;
2046 ErrorCodes.InvalidParams = -32602;
2047 ErrorCodes.InternalError = -32603;
2048 ErrorCodes.serverErrorStart = -32099;
2049 ErrorCodes.serverErrorEnd = -32000;
2050 ErrorCodes.ServerNotInitialized = -32002;
2051 ErrorCodes.UnknownErrorCode = -32001;
2052 // Defined by the protocol.
2053 ErrorCodes.RequestCancelled = -32800;
2054 // Defined by VSCode library.
2055 ErrorCodes.MessageWriteError = 1;
2056 ErrorCodes.MessageReadError = 2;
2057})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
2058/**
2059 * An error object return in a response in case a request
2060 * has failed.
2061 */
2062class ResponseError extends Error {
2063 constructor(code, message, data) {
2064 super(message);
2065 this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
2066 this.data = data;
2067 Object.setPrototypeOf(this, ResponseError.prototype);
2068 }
2069 toJson() {
2070 return {
2071 code: this.code,
2072 message: this.message,
2073 data: this.data,
2074 };
2075 }
2076}
2077exports.ResponseError = ResponseError;
2078/**
2079 * An abstract implementation of a MessageType.
2080 */
2081class AbstractMessageType {
2082 constructor(_method, _numberOfParams) {
2083 this._method = _method;
2084 this._numberOfParams = _numberOfParams;
2085 }
2086 get method() {
2087 return this._method;
2088 }
2089 get numberOfParams() {
2090 return this._numberOfParams;
2091 }
2092}
2093exports.AbstractMessageType = AbstractMessageType;
2094/**
2095 * Classes to type request response pairs
2096 */
2097class RequestType0 extends AbstractMessageType {
2098 constructor(method) {
2099 super(method, 0);
2100 this._ = undefined;
2101 }
2102}
2103exports.RequestType0 = RequestType0;
2104class RequestType extends AbstractMessageType {
2105 constructor(method) {
2106 super(method, 1);
2107 this._ = undefined;
2108 }
2109}
2110exports.RequestType = RequestType;
2111class RequestType1 extends AbstractMessageType {
2112 constructor(method) {
2113 super(method, 1);
2114 this._ = undefined;
2115 }
2116}
2117exports.RequestType1 = RequestType1;
2118class RequestType2 extends AbstractMessageType {
2119 constructor(method) {
2120 super(method, 2);
2121 this._ = undefined;
2122 }
2123}
2124exports.RequestType2 = RequestType2;
2125class RequestType3 extends AbstractMessageType {
2126 constructor(method) {
2127 super(method, 3);
2128 this._ = undefined;
2129 }
2130}
2131exports.RequestType3 = RequestType3;
2132class RequestType4 extends AbstractMessageType {
2133 constructor(method) {
2134 super(method, 4);
2135 this._ = undefined;
2136 }
2137}
2138exports.RequestType4 = RequestType4;
2139class RequestType5 extends AbstractMessageType {
2140 constructor(method) {
2141 super(method, 5);
2142 this._ = undefined;
2143 }
2144}
2145exports.RequestType5 = RequestType5;
2146class RequestType6 extends AbstractMessageType {
2147 constructor(method) {
2148 super(method, 6);
2149 this._ = undefined;
2150 }
2151}
2152exports.RequestType6 = RequestType6;
2153class RequestType7 extends AbstractMessageType {
2154 constructor(method) {
2155 super(method, 7);
2156 this._ = undefined;
2157 }
2158}
2159exports.RequestType7 = RequestType7;
2160class RequestType8 extends AbstractMessageType {
2161 constructor(method) {
2162 super(method, 8);
2163 this._ = undefined;
2164 }
2165}
2166exports.RequestType8 = RequestType8;
2167class RequestType9 extends AbstractMessageType {
2168 constructor(method) {
2169 super(method, 9);
2170 this._ = undefined;
2171 }
2172}
2173exports.RequestType9 = RequestType9;
2174class NotificationType extends AbstractMessageType {
2175 constructor(method) {
2176 super(method, 1);
2177 this._ = undefined;
2178 }
2179}
2180exports.NotificationType = NotificationType;
2181class NotificationType0 extends AbstractMessageType {
2182 constructor(method) {
2183 super(method, 0);
2184 this._ = undefined;
2185 }
2186}
2187exports.NotificationType0 = NotificationType0;
2188class NotificationType1 extends AbstractMessageType {
2189 constructor(method) {
2190 super(method, 1);
2191 this._ = undefined;
2192 }
2193}
2194exports.NotificationType1 = NotificationType1;
2195class NotificationType2 extends AbstractMessageType {
2196 constructor(method) {
2197 super(method, 2);
2198 this._ = undefined;
2199 }
2200}
2201exports.NotificationType2 = NotificationType2;
2202class NotificationType3 extends AbstractMessageType {
2203 constructor(method) {
2204 super(method, 3);
2205 this._ = undefined;
2206 }
2207}
2208exports.NotificationType3 = NotificationType3;
2209class NotificationType4 extends AbstractMessageType {
2210 constructor(method) {
2211 super(method, 4);
2212 this._ = undefined;
2213 }
2214}
2215exports.NotificationType4 = NotificationType4;
2216class NotificationType5 extends AbstractMessageType {
2217 constructor(method) {
2218 super(method, 5);
2219 this._ = undefined;
2220 }
2221}
2222exports.NotificationType5 = NotificationType5;
2223class NotificationType6 extends AbstractMessageType {
2224 constructor(method) {
2225 super(method, 6);
2226 this._ = undefined;
2227 }
2228}
2229exports.NotificationType6 = NotificationType6;
2230class NotificationType7 extends AbstractMessageType {
2231 constructor(method) {
2232 super(method, 7);
2233 this._ = undefined;
2234 }
2235}
2236exports.NotificationType7 = NotificationType7;
2237class NotificationType8 extends AbstractMessageType {
2238 constructor(method) {
2239 super(method, 8);
2240 this._ = undefined;
2241 }
2242}
2243exports.NotificationType8 = NotificationType8;
2244class NotificationType9 extends AbstractMessageType {
2245 constructor(method) {
2246 super(method, 9);
2247 this._ = undefined;
2248 }
2249}
2250exports.NotificationType9 = NotificationType9;
2251/**
2252 * Tests if the given message is a request message
2253 */
2254function isRequestMessage(message) {
2255 let candidate = message;
2256 return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
2257}
2258exports.isRequestMessage = isRequestMessage;
2259/**
2260 * Tests if the given message is a notification message
2261 */
2262function isNotificationMessage(message) {
2263 let candidate = message;
2264 return candidate && is.string(candidate.method) && message.id === void 0;
2265}
2266exports.isNotificationMessage = isNotificationMessage;
2267/**
2268 * Tests if the given message is a response message
2269 */
2270function isResponseMessage(message) {
2271 let candidate = message;
2272 return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
2273}
2274exports.isResponseMessage = isResponseMessage;
2275
2276
2277/***/ }),
2278/* 9 */
2279/***/ (function(module, exports, __webpack_require__) {
2280
2281"use strict";
2282/* --------------------------------------------------------------------------------------------
2283 * Copyright (c) Microsoft Corporation. All rights reserved.
2284 * Licensed under the MIT License. See License.txt in the project root for license information.
2285 * ------------------------------------------------------------------------------------------ */
2286
2287Object.defineProperty(exports, "__esModule", { value: true });
2288const events_1 = __webpack_require__(10);
2289const Is = __webpack_require__(7);
2290let DefaultSize = 8192;
2291let CR = Buffer.from('\r', 'ascii')[0];
2292let LF = Buffer.from('\n', 'ascii')[0];
2293let CRLF = '\r\n';
2294class MessageBuffer {
2295 constructor(encoding = 'utf8') {
2296 this.encoding = encoding;
2297 this.index = 0;
2298 this.buffer = Buffer.allocUnsafe(DefaultSize);
2299 }
2300 append(chunk) {
2301 var toAppend = chunk;
2302 if (typeof (chunk) === 'string') {
2303 var str = chunk;
2304 var bufferLen = Buffer.byteLength(str, this.encoding);
2305 toAppend = Buffer.allocUnsafe(bufferLen);
2306 toAppend.write(str, 0, bufferLen, this.encoding);
2307 }
2308 if (this.buffer.length - this.index >= toAppend.length) {
2309 toAppend.copy(this.buffer, this.index, 0, toAppend.length);
2310 }
2311 else {
2312 var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;
2313 if (this.index === 0) {
2314 this.buffer = Buffer.allocUnsafe(newSize);
2315 toAppend.copy(this.buffer, 0, 0, toAppend.length);
2316 }
2317 else {
2318 this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);
2319 }
2320 }
2321 this.index += toAppend.length;
2322 }
2323 tryReadHeaders() {
2324 let result = undefined;
2325 let current = 0;
2326 while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {
2327 current++;
2328 }
2329 // No header / body separator found (e.g CRLFCRLF)
2330 if (current + 3 >= this.index) {
2331 return result;
2332 }
2333 result = Object.create(null);
2334 let headers = this.buffer.toString('ascii', 0, current).split(CRLF);
2335 headers.forEach((header) => {
2336 let index = header.indexOf(':');
2337 if (index === -1) {
2338 throw new Error('Message header must separate key and value using :');
2339 }
2340 let key = header.substr(0, index);
2341 let value = header.substr(index + 1).trim();
2342 result[key] = value;
2343 });
2344 let nextStart = current + 4;
2345 this.buffer = this.buffer.slice(nextStart);
2346 this.index = this.index - nextStart;
2347 return result;
2348 }
2349 tryReadContent(length) {
2350 if (this.index < length) {
2351 return null;
2352 }
2353 let result = this.buffer.toString(this.encoding, 0, length);
2354 let nextStart = length;
2355 this.buffer.copy(this.buffer, 0, nextStart);
2356 this.index = this.index - nextStart;
2357 return result;
2358 }
2359 get numberOfBytes() {
2360 return this.index;
2361 }
2362}
2363var MessageReader;
2364(function (MessageReader) {
2365 function is(value) {
2366 let candidate = value;
2367 return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
2368 Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
2369 }
2370 MessageReader.is = is;
2371})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
2372class AbstractMessageReader {
2373 constructor() {
2374 this.errorEmitter = new events_1.Emitter();
2375 this.closeEmitter = new events_1.Emitter();
2376 this.partialMessageEmitter = new events_1.Emitter();
2377 }
2378 dispose() {
2379 this.errorEmitter.dispose();
2380 this.closeEmitter.dispose();
2381 }
2382 get onError() {
2383 return this.errorEmitter.event;
2384 }
2385 fireError(error) {
2386 this.errorEmitter.fire(this.asError(error));
2387 }
2388 get onClose() {
2389 return this.closeEmitter.event;
2390 }
2391 fireClose() {
2392 this.closeEmitter.fire(undefined);
2393 }
2394 get onPartialMessage() {
2395 return this.partialMessageEmitter.event;
2396 }
2397 firePartialMessage(info) {
2398 this.partialMessageEmitter.fire(info);
2399 }
2400 asError(error) {
2401 if (error instanceof Error) {
2402 return error;
2403 }
2404 else {
2405 return new Error(`Reader recevied error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2406 }
2407 }
2408}
2409exports.AbstractMessageReader = AbstractMessageReader;
2410class StreamMessageReader extends AbstractMessageReader {
2411 constructor(readable, encoding = 'utf8') {
2412 super();
2413 this.readable = readable;
2414 this.buffer = new MessageBuffer(encoding);
2415 this._partialMessageTimeout = 10000;
2416 }
2417 set partialMessageTimeout(timeout) {
2418 this._partialMessageTimeout = timeout;
2419 }
2420 get partialMessageTimeout() {
2421 return this._partialMessageTimeout;
2422 }
2423 listen(callback) {
2424 this.nextMessageLength = -1;
2425 this.messageToken = 0;
2426 this.partialMessageTimer = undefined;
2427 this.callback = callback;
2428 this.readable.on('data', (data) => {
2429 this.onData(data);
2430 });
2431 this.readable.on('error', (error) => this.fireError(error));
2432 this.readable.on('close', () => this.fireClose());
2433 }
2434 onData(data) {
2435 this.buffer.append(data);
2436 while (true) {
2437 if (this.nextMessageLength === -1) {
2438 let headers = this.buffer.tryReadHeaders();
2439 if (!headers) {
2440 return;
2441 }
2442 let contentLength = headers['Content-Length'];
2443 if (!contentLength) {
2444 throw new Error('Header must provide a Content-Length property.');
2445 }
2446 let length = parseInt(contentLength);
2447 if (isNaN(length)) {
2448 throw new Error('Content-Length value must be a number.');
2449 }
2450 this.nextMessageLength = length;
2451 // Take the encoding form the header. For compatibility
2452 // treat both utf-8 and utf8 as node utf8
2453 }
2454 var msg = this.buffer.tryReadContent(this.nextMessageLength);
2455 if (msg === null) {
2456 /** We haven't recevied the full message yet. */
2457 this.setPartialMessageTimer();
2458 return;
2459 }
2460 this.clearPartialMessageTimer();
2461 this.nextMessageLength = -1;
2462 this.messageToken++;
2463 var json = JSON.parse(msg);
2464 this.callback(json);
2465 }
2466 }
2467 clearPartialMessageTimer() {
2468 if (this.partialMessageTimer) {
2469 clearTimeout(this.partialMessageTimer);
2470 this.partialMessageTimer = undefined;
2471 }
2472 }
2473 setPartialMessageTimer() {
2474 this.clearPartialMessageTimer();
2475 if (this._partialMessageTimeout <= 0) {
2476 return;
2477 }
2478 this.partialMessageTimer = setTimeout((token, timeout) => {
2479 this.partialMessageTimer = undefined;
2480 if (token === this.messageToken) {
2481 this.firePartialMessage({ messageToken: token, waitingTime: timeout });
2482 this.setPartialMessageTimer();
2483 }
2484 }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
2485 }
2486}
2487exports.StreamMessageReader = StreamMessageReader;
2488class IPCMessageReader extends AbstractMessageReader {
2489 constructor(process) {
2490 super();
2491 this.process = process;
2492 let eventEmitter = this.process;
2493 eventEmitter.on('error', (error) => this.fireError(error));
2494 eventEmitter.on('close', () => this.fireClose());
2495 }
2496 listen(callback) {
2497 this.process.on('message', callback);
2498 }
2499}
2500exports.IPCMessageReader = IPCMessageReader;
2501class SocketMessageReader extends StreamMessageReader {
2502 constructor(socket, encoding = 'utf-8') {
2503 super(socket, encoding);
2504 }
2505}
2506exports.SocketMessageReader = SocketMessageReader;
2507
2508
2509/***/ }),
2510/* 10 */
2511/***/ (function(module, exports, __webpack_require__) {
2512
2513"use strict";
2514/* --------------------------------------------------------------------------------------------
2515 * Copyright (c) Microsoft Corporation. All rights reserved.
2516 * Licensed under the MIT License. See License.txt in the project root for license information.
2517 * ------------------------------------------------------------------------------------------ */
2518
2519Object.defineProperty(exports, "__esModule", { value: true });
2520var Disposable;
2521(function (Disposable) {
2522 function create(func) {
2523 return {
2524 dispose: func
2525 };
2526 }
2527 Disposable.create = create;
2528})(Disposable = exports.Disposable || (exports.Disposable = {}));
2529var Event;
2530(function (Event) {
2531 const _disposable = { dispose() { } };
2532 Event.None = function () { return _disposable; };
2533})(Event = exports.Event || (exports.Event = {}));
2534class CallbackList {
2535 add(callback, context = null, bucket) {
2536 if (!this._callbacks) {
2537 this._callbacks = [];
2538 this._contexts = [];
2539 }
2540 this._callbacks.push(callback);
2541 this._contexts.push(context);
2542 if (Array.isArray(bucket)) {
2543 bucket.push({ dispose: () => this.remove(callback, context) });
2544 }
2545 }
2546 remove(callback, context = null) {
2547 if (!this._callbacks) {
2548 return;
2549 }
2550 var foundCallbackWithDifferentContext = false;
2551 for (var i = 0, len = this._callbacks.length; i < len; i++) {
2552 if (this._callbacks[i] === callback) {
2553 if (this._contexts[i] === context) {
2554 // callback & context match => remove it
2555 this._callbacks.splice(i, 1);
2556 this._contexts.splice(i, 1);
2557 return;
2558 }
2559 else {
2560 foundCallbackWithDifferentContext = true;
2561 }
2562 }
2563 }
2564 if (foundCallbackWithDifferentContext) {
2565 throw new Error('When adding a listener with a context, you should remove it with the same context');
2566 }
2567 }
2568 invoke(...args) {
2569 if (!this._callbacks) {
2570 return [];
2571 }
2572 var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
2573 for (var i = 0, len = callbacks.length; i < len; i++) {
2574 try {
2575 ret.push(callbacks[i].apply(contexts[i], args));
2576 }
2577 catch (e) {
2578 console.error(e);
2579 }
2580 }
2581 return ret;
2582 }
2583 isEmpty() {
2584 return !this._callbacks || this._callbacks.length === 0;
2585 }
2586 dispose() {
2587 this._callbacks = undefined;
2588 this._contexts = undefined;
2589 }
2590}
2591class Emitter {
2592 constructor(_options) {
2593 this._options = _options;
2594 }
2595 /**
2596 * For the public to allow to subscribe
2597 * to events from this Emitter
2598 */
2599 get event() {
2600 if (!this._event) {
2601 this._event = (listener, thisArgs, disposables) => {
2602 if (!this._callbacks) {
2603 this._callbacks = new CallbackList();
2604 }
2605 if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
2606 this._options.onFirstListenerAdd(this);
2607 }
2608 this._callbacks.add(listener, thisArgs);
2609 let result;
2610 result = {
2611 dispose: () => {
2612 this._callbacks.remove(listener, thisArgs);
2613 result.dispose = Emitter._noop;
2614 if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
2615 this._options.onLastListenerRemove(this);
2616 }
2617 }
2618 };
2619 if (Array.isArray(disposables)) {
2620 disposables.push(result);
2621 }
2622 return result;
2623 };
2624 }
2625 return this._event;
2626 }
2627 /**
2628 * To be kept private to fire an event to
2629 * subscribers
2630 */
2631 fire(event) {
2632 if (this._callbacks) {
2633 this._callbacks.invoke.call(this._callbacks, event);
2634 }
2635 }
2636 dispose() {
2637 if (this._callbacks) {
2638 this._callbacks.dispose();
2639 this._callbacks = undefined;
2640 }
2641 }
2642}
2643Emitter._noop = function () { };
2644exports.Emitter = Emitter;
2645
2646
2647/***/ }),
2648/* 11 */
2649/***/ (function(module, exports, __webpack_require__) {
2650
2651"use strict";
2652/* --------------------------------------------------------------------------------------------
2653 * Copyright (c) Microsoft Corporation. All rights reserved.
2654 * Licensed under the MIT License. See License.txt in the project root for license information.
2655 * ------------------------------------------------------------------------------------------ */
2656
2657Object.defineProperty(exports, "__esModule", { value: true });
2658const events_1 = __webpack_require__(10);
2659const Is = __webpack_require__(7);
2660let ContentLength = 'Content-Length: ';
2661let CRLF = '\r\n';
2662var MessageWriter;
2663(function (MessageWriter) {
2664 function is(value) {
2665 let candidate = value;
2666 return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
2667 Is.func(candidate.onError) && Is.func(candidate.write);
2668 }
2669 MessageWriter.is = is;
2670})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
2671class AbstractMessageWriter {
2672 constructor() {
2673 this.errorEmitter = new events_1.Emitter();
2674 this.closeEmitter = new events_1.Emitter();
2675 }
2676 dispose() {
2677 this.errorEmitter.dispose();
2678 this.closeEmitter.dispose();
2679 }
2680 get onError() {
2681 return this.errorEmitter.event;
2682 }
2683 fireError(error, message, count) {
2684 this.errorEmitter.fire([this.asError(error), message, count]);
2685 }
2686 get onClose() {
2687 return this.closeEmitter.event;
2688 }
2689 fireClose() {
2690 this.closeEmitter.fire(undefined);
2691 }
2692 asError(error) {
2693 if (error instanceof Error) {
2694 return error;
2695 }
2696 else {
2697 return new Error(`Writer recevied error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
2698 }
2699 }
2700}
2701exports.AbstractMessageWriter = AbstractMessageWriter;
2702class StreamMessageWriter extends AbstractMessageWriter {
2703 constructor(writable, encoding = 'utf8') {
2704 super();
2705 this.writable = writable;
2706 this.encoding = encoding;
2707 this.errorCount = 0;
2708 this.writable.on('error', (error) => this.fireError(error));
2709 this.writable.on('close', () => this.fireClose());
2710 }
2711 write(msg) {
2712 let json = JSON.stringify(msg);
2713 let contentLength = Buffer.byteLength(json, this.encoding);
2714 let headers = [
2715 ContentLength, contentLength.toString(), CRLF,
2716 CRLF
2717 ];
2718 try {
2719 // Header must be written in ASCII encoding
2720 this.writable.write(headers.join(''), 'ascii');
2721 // Now write the content. This can be written in any encoding
2722 this.writable.write(json, this.encoding);
2723 this.errorCount = 0;
2724 }
2725 catch (error) {
2726 this.errorCount++;
2727 this.fireError(error, msg, this.errorCount);
2728 }
2729 }
2730}
2731exports.StreamMessageWriter = StreamMessageWriter;
2732class IPCMessageWriter extends AbstractMessageWriter {
2733 constructor(process) {
2734 super();
2735 this.process = process;
2736 this.errorCount = 0;
2737 this.queue = [];
2738 this.sending = false;
2739 let eventEmitter = this.process;
2740 eventEmitter.on('error', (error) => this.fireError(error));
2741 eventEmitter.on('close', () => this.fireClose);
2742 }
2743 write(msg) {
2744 if (!this.sending && this.queue.length === 0) {
2745 // See https://github.com/nodejs/node/issues/7657
2746 this.doWriteMessage(msg);
2747 }
2748 else {
2749 this.queue.push(msg);
2750 }
2751 }
2752 doWriteMessage(msg) {
2753 try {
2754 if (this.process.send) {
2755 this.sending = true;
2756 this.process.send(msg, undefined, undefined, (error) => {
2757 this.sending = false;
2758 if (error) {
2759 this.errorCount++;
2760 this.fireError(error, msg, this.errorCount);
2761 }
2762 else {
2763 this.errorCount = 0;
2764 }
2765 if (this.queue.length > 0) {
2766 this.doWriteMessage(this.queue.shift());
2767 }
2768 });
2769 }
2770 }
2771 catch (error) {
2772 this.errorCount++;
2773 this.fireError(error, msg, this.errorCount);
2774 }
2775 }
2776}
2777exports.IPCMessageWriter = IPCMessageWriter;
2778class SocketMessageWriter extends AbstractMessageWriter {
2779 constructor(socket, encoding = 'utf8') {
2780 super();
2781 this.socket = socket;
2782 this.queue = [];
2783 this.sending = false;
2784 this.encoding = encoding;
2785 this.errorCount = 0;
2786 this.socket.on('error', (error) => this.fireError(error));
2787 this.socket.on('close', () => this.fireClose());
2788 }
2789 write(msg) {
2790 if (!this.sending && this.queue.length === 0) {
2791 // See https://github.com/nodejs/node/issues/7657
2792 this.doWriteMessage(msg);
2793 }
2794 else {
2795 this.queue.push(msg);
2796 }
2797 }
2798 doWriteMessage(msg) {
2799 let json = JSON.stringify(msg);
2800 let contentLength = Buffer.byteLength(json, this.encoding);
2801 let headers = [
2802 ContentLength, contentLength.toString(), CRLF,
2803 CRLF
2804 ];
2805 try {
2806 // Header must be written in ASCII encoding
2807 this.sending = true;
2808 this.socket.write(headers.join(''), 'ascii', (error) => {
2809 if (error) {
2810 this.handleError(error, msg);
2811 }
2812 try {
2813 // Now write the content. This can be written in any encoding
2814 this.socket.write(json, this.encoding, (error) => {
2815 this.sending = false;
2816 if (error) {
2817 this.handleError(error, msg);
2818 }
2819 else {
2820 this.errorCount = 0;
2821 }
2822 if (this.queue.length > 0) {
2823 this.doWriteMessage(this.queue.shift());
2824 }
2825 });
2826 }
2827 catch (error) {
2828 this.handleError(error, msg);
2829 }
2830 });
2831 }
2832 catch (error) {
2833 this.handleError(error, msg);
2834 }
2835 }
2836 handleError(error, msg) {
2837 this.errorCount++;
2838 this.fireError(error, msg, this.errorCount);
2839 }
2840}
2841exports.SocketMessageWriter = SocketMessageWriter;
2842
2843
2844/***/ }),
2845/* 12 */
2846/***/ (function(module, exports, __webpack_require__) {
2847
2848"use strict";
2849/*---------------------------------------------------------------------------------------------
2850 * Copyright (c) Microsoft Corporation. All rights reserved.
2851 * Licensed under the MIT License. See License.txt in the project root for license information.
2852 *--------------------------------------------------------------------------------------------*/
2853
2854Object.defineProperty(exports, "__esModule", { value: true });
2855const events_1 = __webpack_require__(10);
2856const Is = __webpack_require__(7);
2857var CancellationToken;
2858(function (CancellationToken) {
2859 CancellationToken.None = Object.freeze({
2860 isCancellationRequested: false,
2861 onCancellationRequested: events_1.Event.None
2862 });
2863 CancellationToken.Cancelled = Object.freeze({
2864 isCancellationRequested: true,
2865 onCancellationRequested: events_1.Event.None
2866 });
2867 function is(value) {
2868 let candidate = value;
2869 return candidate && (candidate === CancellationToken.None
2870 || candidate === CancellationToken.Cancelled
2871 || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
2872 }
2873 CancellationToken.is = is;
2874})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
2875const shortcutEvent = Object.freeze(function (callback, context) {
2876 let handle = setTimeout(callback.bind(context), 0);
2877 return { dispose() { clearTimeout(handle); } };
2878});
2879class MutableToken {
2880 constructor() {
2881 this._isCancelled = false;
2882 }
2883 cancel() {
2884 if (!this._isCancelled) {
2885 this._isCancelled = true;
2886 if (this._emitter) {
2887 this._emitter.fire(undefined);
2888 this._emitter = undefined;
2889 }
2890 }
2891 }
2892 get isCancellationRequested() {
2893 return this._isCancelled;
2894 }
2895 get onCancellationRequested() {
2896 if (this._isCancelled) {
2897 return shortcutEvent;
2898 }
2899 if (!this._emitter) {
2900 this._emitter = new events_1.Emitter();
2901 }
2902 return this._emitter.event;
2903 }
2904}
2905class CancellationTokenSource {
2906 get token() {
2907 if (!this._token) {
2908 // be lazy and create the token only when
2909 // actually needed
2910 this._token = new MutableToken();
2911 }
2912 return this._token;
2913 }
2914 cancel() {
2915 if (!this._token) {
2916 // save an object by returning the default
2917 // cancelled token when cancellation happens
2918 // before someone asks for the token
2919 this._token = CancellationToken.Cancelled;
2920 }
2921 else {
2922 this._token.cancel();
2923 }
2924 }
2925 dispose() {
2926 this.cancel();
2927 }
2928}
2929exports.CancellationTokenSource = CancellationTokenSource;
2930
2931
2932/***/ }),
2933/* 13 */
2934/***/ (function(module, exports, __webpack_require__) {
2935
2936"use strict";
2937
2938/*---------------------------------------------------------------------------------------------
2939 * Copyright (c) Microsoft Corporation. All rights reserved.
2940 * Licensed under the MIT License. See License.txt in the project root for license information.
2941 *--------------------------------------------------------------------------------------------*/
2942Object.defineProperty(exports, "__esModule", { value: true });
2943var Touch;
2944(function (Touch) {
2945 Touch.None = 0;
2946 Touch.First = 1;
2947 Touch.Last = 2;
2948})(Touch = exports.Touch || (exports.Touch = {}));
2949class LinkedMap {
2950 constructor() {
2951 this._map = new Map();
2952 this._head = undefined;
2953 this._tail = undefined;
2954 this._size = 0;
2955 }
2956 clear() {
2957 this._map.clear();
2958 this._head = undefined;
2959 this._tail = undefined;
2960 this._size = 0;
2961 }
2962 isEmpty() {
2963 return !this._head && !this._tail;
2964 }
2965 get size() {
2966 return this._size;
2967 }
2968 has(key) {
2969 return this._map.has(key);
2970 }
2971 get(key) {
2972 const item = this._map.get(key);
2973 if (!item) {
2974 return undefined;
2975 }
2976 return item.value;
2977 }
2978 set(key, value, touch = Touch.None) {
2979 let item = this._map.get(key);
2980 if (item) {
2981 item.value = value;
2982 if (touch !== Touch.None) {
2983 this.touch(item, touch);
2984 }
2985 }
2986 else {
2987 item = { key, value, next: undefined, previous: undefined };
2988 switch (touch) {
2989 case Touch.None:
2990 this.addItemLast(item);
2991 break;
2992 case Touch.First:
2993 this.addItemFirst(item);
2994 break;
2995 case Touch.Last:
2996 this.addItemLast(item);
2997 break;
2998 default:
2999 this.addItemLast(item);
3000 break;
3001 }
3002 this._map.set(key, item);
3003 this._size++;
3004 }
3005 }
3006 delete(key) {
3007 const item = this._map.get(key);
3008 if (!item) {
3009 return false;
3010 }
3011 this._map.delete(key);
3012 this.removeItem(item);
3013 this._size--;
3014 return true;
3015 }
3016 shift() {
3017 if (!this._head && !this._tail) {
3018 return undefined;
3019 }
3020 if (!this._head || !this._tail) {
3021 throw new Error('Invalid list');
3022 }
3023 const item = this._head;
3024 this._map.delete(item.key);
3025 this.removeItem(item);
3026 this._size--;
3027 return item.value;
3028 }
3029 forEach(callbackfn, thisArg) {
3030 let current = this._head;
3031 while (current) {
3032 if (thisArg) {
3033 callbackfn.bind(thisArg)(current.value, current.key, this);
3034 }
3035 else {
3036 callbackfn(current.value, current.key, this);
3037 }
3038 current = current.next;
3039 }
3040 }
3041 forEachReverse(callbackfn, thisArg) {
3042 let current = this._tail;
3043 while (current) {
3044 if (thisArg) {
3045 callbackfn.bind(thisArg)(current.value, current.key, this);
3046 }
3047 else {
3048 callbackfn(current.value, current.key, this);
3049 }
3050 current = current.previous;
3051 }
3052 }
3053 values() {
3054 let result = [];
3055 let current = this._head;
3056 while (current) {
3057 result.push(current.value);
3058 current = current.next;
3059 }
3060 return result;
3061 }
3062 keys() {
3063 let result = [];
3064 let current = this._head;
3065 while (current) {
3066 result.push(current.key);
3067 current = current.next;
3068 }
3069 return result;
3070 }
3071 /* JSON RPC run on es5 which has no Symbol.iterator
3072 public keys(): IterableIterator<K> {
3073 let current = this._head;
3074 let iterator: IterableIterator<K> = {
3075 [Symbol.iterator]() {
3076 return iterator;
3077 },
3078 next():IteratorResult<K> {
3079 if (current) {
3080 let result = { value: current.key, done: false };
3081 current = current.next;
3082 return result;
3083 } else {
3084 return { value: undefined, done: true };
3085 }
3086 }
3087 };
3088 return iterator;
3089 }
3090
3091 public values(): IterableIterator<V> {
3092 let current = this._head;
3093 let iterator: IterableIterator<V> = {
3094 [Symbol.iterator]() {
3095 return iterator;
3096 },
3097 next():IteratorResult<V> {
3098 if (current) {
3099 let result = { value: current.value, done: false };
3100 current = current.next;
3101 return result;
3102 } else {
3103 return { value: undefined, done: true };
3104 }
3105 }
3106 };
3107 return iterator;
3108 }
3109 */
3110 addItemFirst(item) {
3111 // First time Insert
3112 if (!this._head && !this._tail) {
3113 this._tail = item;
3114 }
3115 else if (!this._head) {
3116 throw new Error('Invalid list');
3117 }
3118 else {
3119 item.next = this._head;
3120 this._head.previous = item;
3121 }
3122 this._head = item;
3123 }
3124 addItemLast(item) {
3125 // First time Insert
3126 if (!this._head && !this._tail) {
3127 this._head = item;
3128 }
3129 else if (!this._tail) {
3130 throw new Error('Invalid list');
3131 }
3132 else {
3133 item.previous = this._tail;
3134 this._tail.next = item;
3135 }
3136 this._tail = item;
3137 }
3138 removeItem(item) {
3139 if (item === this._head && item === this._tail) {
3140 this._head = undefined;
3141 this._tail = undefined;
3142 }
3143 else if (item === this._head) {
3144 this._head = item.next;
3145 }
3146 else if (item === this._tail) {
3147 this._tail = item.previous;
3148 }
3149 else {
3150 const next = item.next;
3151 const previous = item.previous;
3152 if (!next || !previous) {
3153 throw new Error('Invalid list');
3154 }
3155 next.previous = previous;
3156 previous.next = next;
3157 }
3158 }
3159 touch(item, touch) {
3160 if (!this._head || !this._tail) {
3161 throw new Error('Invalid list');
3162 }
3163 if ((touch !== Touch.First && touch !== Touch.Last)) {
3164 return;
3165 }
3166 if (touch === Touch.First) {
3167 if (item === this._head) {
3168 return;
3169 }
3170 const next = item.next;
3171 const previous = item.previous;
3172 // Unlink the item
3173 if (item === this._tail) {
3174 // previous must be defined since item was not head but is tail
3175 // So there are more than on item in the map
3176 previous.next = undefined;
3177 this._tail = previous;
3178 }
3179 else {
3180 // Both next and previous are not undefined since item was neither head nor tail.
3181 next.previous = previous;
3182 previous.next = next;
3183 }
3184 // Insert the node at head
3185 item.previous = undefined;
3186 item.next = this._head;
3187 this._head.previous = item;
3188 this._head = item;
3189 }
3190 else if (touch === Touch.Last) {
3191 if (item === this._tail) {
3192 return;
3193 }
3194 const next = item.next;
3195 const previous = item.previous;
3196 // Unlink the item.
3197 if (item === this._head) {
3198 // next must be defined since item was not tail but is head
3199 // So there are more than on item in the map
3200 next.previous = undefined;
3201 this._head = next;
3202 }
3203 else {
3204 // Both next and previous are not undefined since item was neither head nor tail.
3205 next.previous = previous;
3206 previous.next = next;
3207 }
3208 item.next = undefined;
3209 item.previous = this._tail;
3210 this._tail.next = item;
3211 this._tail = item;
3212 }
3213 }
3214}
3215exports.LinkedMap = LinkedMap;
3216
3217
3218/***/ }),
3219/* 14 */
3220/***/ (function(module, exports, __webpack_require__) {
3221
3222"use strict";
3223/* --------------------------------------------------------------------------------------------
3224 * Copyright (c) Microsoft Corporation. All rights reserved.
3225 * Licensed under the MIT License. See License.txt in the project root for license information.
3226 * ------------------------------------------------------------------------------------------ */
3227
3228Object.defineProperty(exports, "__esModule", { value: true });
3229const path_1 = __webpack_require__(15);
3230const os_1 = __webpack_require__(16);
3231const crypto_1 = __webpack_require__(17);
3232const net_1 = __webpack_require__(18);
3233const messageReader_1 = __webpack_require__(9);
3234const messageWriter_1 = __webpack_require__(11);
3235function generateRandomPipeName() {
3236 const randomSuffix = crypto_1.randomBytes(21).toString('hex');
3237 if (process.platform === 'win32') {
3238 return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
3239 }
3240 else {
3241 // Mac/Unix: use socket file
3242 return path_1.join(os_1.tmpdir(), `vscode-${randomSuffix}.sock`);
3243 }
3244}
3245exports.generateRandomPipeName = generateRandomPipeName;
3246function createClientPipeTransport(pipeName, encoding = 'utf-8') {
3247 let connectResolve;
3248 let connected = new Promise((resolve, _reject) => {
3249 connectResolve = resolve;
3250 });
3251 return new Promise((resolve, reject) => {
3252 let server = net_1.createServer((socket) => {
3253 server.close();
3254 connectResolve([
3255 new messageReader_1.SocketMessageReader(socket, encoding),
3256 new messageWriter_1.SocketMessageWriter(socket, encoding)
3257 ]);
3258 });
3259 server.on('error', reject);
3260 server.listen(pipeName, () => {
3261 server.removeListener('error', reject);
3262 resolve({
3263 onConnected: () => { return connected; }
3264 });
3265 });
3266 });
3267}
3268exports.createClientPipeTransport = createClientPipeTransport;
3269function createServerPipeTransport(pipeName, encoding = 'utf-8') {
3270 const socket = net_1.createConnection(pipeName);
3271 return [
3272 new messageReader_1.SocketMessageReader(socket, encoding),
3273 new messageWriter_1.SocketMessageWriter(socket, encoding)
3274 ];
3275}
3276exports.createServerPipeTransport = createServerPipeTransport;
3277
3278
3279/***/ }),
3280/* 15 */
3281/***/ (function(module, exports) {
3282
3283module.exports = require("path");
3284
3285/***/ }),
3286/* 16 */
3287/***/ (function(module, exports) {
3288
3289module.exports = require("os");
3290
3291/***/ }),
3292/* 17 */
3293/***/ (function(module, exports) {
3294
3295module.exports = require("crypto");
3296
3297/***/ }),
3298/* 18 */
3299/***/ (function(module, exports) {
3300
3301module.exports = require("net");
3302
3303/***/ }),
3304/* 19 */
3305/***/ (function(module, exports, __webpack_require__) {
3306
3307"use strict";
3308/* --------------------------------------------------------------------------------------------
3309 * Copyright (c) Microsoft Corporation. All rights reserved.
3310 * Licensed under the MIT License. See License.txt in the project root for license information.
3311 * ------------------------------------------------------------------------------------------ */
3312
3313Object.defineProperty(exports, "__esModule", { value: true });
3314const net_1 = __webpack_require__(18);
3315const messageReader_1 = __webpack_require__(9);
3316const messageWriter_1 = __webpack_require__(11);
3317function createClientSocketTransport(port, encoding = 'utf-8') {
3318 let connectResolve;
3319 let connected = new Promise((resolve, _reject) => {
3320 connectResolve = resolve;
3321 });
3322 return new Promise((resolve, reject) => {
3323 let server = net_1.createServer((socket) => {
3324 server.close();
3325 connectResolve([
3326 new messageReader_1.SocketMessageReader(socket, encoding),
3327 new messageWriter_1.SocketMessageWriter(socket, encoding)
3328 ]);
3329 });
3330 server.on('error', reject);
3331 server.listen(port, '127.0.0.1', () => {
3332 server.removeListener('error', reject);
3333 resolve({
3334 onConnected: () => { return connected; }
3335 });
3336 });
3337 });
3338}
3339exports.createClientSocketTransport = createClientSocketTransport;
3340function createServerSocketTransport(port, encoding = 'utf-8') {
3341 const socket = net_1.createConnection(port, '127.0.0.1');
3342 return [
3343 new messageReader_1.SocketMessageReader(socket, encoding),
3344 new messageWriter_1.SocketMessageWriter(socket, encoding)
3345 ];
3346}
3347exports.createServerSocketTransport = createServerSocketTransport;
3348
3349
3350/***/ }),
3351/* 20 */
3352/***/ (function(module, __webpack_exports__, __webpack_require__) {
3353
3354"use strict";
3355__webpack_require__.r(__webpack_exports__);
3356/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
3357/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
3358/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
3359/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
3360/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
3361/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
3362/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
3363/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
3364/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
3365/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
3366/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
3367/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
3368/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
3369/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
3370/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
3371/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
3372/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
3373/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
3374/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
3375/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
3376/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
3377/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
3378/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
3379/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
3380/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
3381/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
3382/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
3383/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
3384/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
3385/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
3386/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
3387/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
3388/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
3389/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
3390/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
3391/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
3392/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
3393/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
3394/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
3395/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
3396/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
3397/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
3398/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
3399/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
3400/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
3401/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
3402/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentSaveReason", function() { return TextDocumentSaveReason; });
3403/* --------------------------------------------------------------------------------------------
3404 * Copyright (c) Microsoft Corporation. All rights reserved.
3405 * Licensed under the MIT License. See License.txt in the project root for license information.
3406 * ------------------------------------------------------------------------------------------ */
3407
3408/**
3409 * The Position namespace provides helper functions to work with
3410 * [Position](#Position) literals.
3411 */
3412var Position;
3413(function (Position) {
3414 /**
3415 * Creates a new Position literal from the given line and character.
3416 * @param line The position's line.
3417 * @param character The position's character.
3418 */
3419 function create(line, character) {
3420 return { line: line, character: character };
3421 }
3422 Position.create = create;
3423 /**
3424 * Checks whether the given liternal conforms to the [Position](#Position) interface.
3425 */
3426 function is(value) {
3427 var candidate = value;
3428 return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
3429 }
3430 Position.is = is;
3431})(Position || (Position = {}));
3432/**
3433 * The Range namespace provides helper functions to work with
3434 * [Range](#Range) literals.
3435 */
3436var Range;
3437(function (Range) {
3438 function create(one, two, three, four) {
3439 if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
3440 return { start: Position.create(one, two), end: Position.create(three, four) };
3441 }
3442 else if (Position.is(one) && Position.is(two)) {
3443 return { start: one, end: two };
3444 }
3445 else {
3446 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
3447 }
3448 }
3449 Range.create = create;
3450 /**
3451 * Checks whether the given literal conforms to the [Range](#Range) interface.
3452 */
3453 function is(value) {
3454 var candidate = value;
3455 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
3456 }
3457 Range.is = is;
3458})(Range || (Range = {}));
3459/**
3460 * The Location namespace provides helper functions to work with
3461 * [Location](#Location) literals.
3462 */
3463var Location;
3464(function (Location) {
3465 /**
3466 * Creates a Location literal.
3467 * @param uri The location's uri.
3468 * @param range The location's range.
3469 */
3470 function create(uri, range) {
3471 return { uri: uri, range: range };
3472 }
3473 Location.create = create;
3474 /**
3475 * Checks whether the given literal conforms to the [Location](#Location) interface.
3476 */
3477 function is(value) {
3478 var candidate = value;
3479 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
3480 }
3481 Location.is = is;
3482})(Location || (Location = {}));
3483/**
3484 * The LocationLink namespace provides helper functions to work with
3485 * [LocationLink](#LocationLink) literals.
3486 */
3487var LocationLink;
3488(function (LocationLink) {
3489 /**
3490 * Creates a LocationLink literal.
3491 * @param targetUri The definition's uri.
3492 * @param targetRange The full range of the definition.
3493 * @param targetSelectionRange The span of the symbol definition at the target.
3494 * @param originSelectionRange The span of the symbol being defined in the originating source file.
3495 */
3496 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
3497 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
3498 }
3499 LocationLink.create = create;
3500 /**
3501 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
3502 */
3503 function is(value) {
3504 var candidate = value;
3505 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
3506 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
3507 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
3508 }
3509 LocationLink.is = is;
3510})(LocationLink || (LocationLink = {}));
3511/**
3512 * The Color namespace provides helper functions to work with
3513 * [Color](#Color) literals.
3514 */
3515var Color;
3516(function (Color) {
3517 /**
3518 * Creates a new Color literal.
3519 */
3520 function create(red, green, blue, alpha) {
3521 return {
3522 red: red,
3523 green: green,
3524 blue: blue,
3525 alpha: alpha,
3526 };
3527 }
3528 Color.create = create;
3529 /**
3530 * Checks whether the given literal conforms to the [Color](#Color) interface.
3531 */
3532 function is(value) {
3533 var candidate = value;
3534 return Is.number(candidate.red)
3535 && Is.number(candidate.green)
3536 && Is.number(candidate.blue)
3537 && Is.number(candidate.alpha);
3538 }
3539 Color.is = is;
3540})(Color || (Color = {}));
3541/**
3542 * The ColorInformation namespace provides helper functions to work with
3543 * [ColorInformation](#ColorInformation) literals.
3544 */
3545var ColorInformation;
3546(function (ColorInformation) {
3547 /**
3548 * Creates a new ColorInformation literal.
3549 */
3550 function create(range, color) {
3551 return {
3552 range: range,
3553 color: color,
3554 };
3555 }
3556 ColorInformation.create = create;
3557 /**
3558 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3559 */
3560 function is(value) {
3561 var candidate = value;
3562 return Range.is(candidate.range) && Color.is(candidate.color);
3563 }
3564 ColorInformation.is = is;
3565})(ColorInformation || (ColorInformation = {}));
3566/**
3567 * The Color namespace provides helper functions to work with
3568 * [ColorPresentation](#ColorPresentation) literals.
3569 */
3570var ColorPresentation;
3571(function (ColorPresentation) {
3572 /**
3573 * Creates a new ColorInformation literal.
3574 */
3575 function create(label, textEdit, additionalTextEdits) {
3576 return {
3577 label: label,
3578 textEdit: textEdit,
3579 additionalTextEdits: additionalTextEdits,
3580 };
3581 }
3582 ColorPresentation.create = create;
3583 /**
3584 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
3585 */
3586 function is(value) {
3587 var candidate = value;
3588 return Is.string(candidate.label)
3589 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
3590 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
3591 }
3592 ColorPresentation.is = is;
3593})(ColorPresentation || (ColorPresentation = {}));
3594/**
3595 * Enum of known range kinds
3596 */
3597var FoldingRangeKind;
3598(function (FoldingRangeKind) {
3599 /**
3600 * Folding range for a comment
3601 */
3602 FoldingRangeKind["Comment"] = "comment";
3603 /**
3604 * Folding range for a imports or includes
3605 */
3606 FoldingRangeKind["Imports"] = "imports";
3607 /**
3608 * Folding range for a region (e.g. `#region`)
3609 */
3610 FoldingRangeKind["Region"] = "region";
3611})(FoldingRangeKind || (FoldingRangeKind = {}));
3612/**
3613 * The folding range namespace provides helper functions to work with
3614 * [FoldingRange](#FoldingRange) literals.
3615 */
3616var FoldingRange;
3617(function (FoldingRange) {
3618 /**
3619 * Creates a new FoldingRange literal.
3620 */
3621 function create(startLine, endLine, startCharacter, endCharacter, kind) {
3622 var result = {
3623 startLine: startLine,
3624 endLine: endLine
3625 };
3626 if (Is.defined(startCharacter)) {
3627 result.startCharacter = startCharacter;
3628 }
3629 if (Is.defined(endCharacter)) {
3630 result.endCharacter = endCharacter;
3631 }
3632 if (Is.defined(kind)) {
3633 result.kind = kind;
3634 }
3635 return result;
3636 }
3637 FoldingRange.create = create;
3638 /**
3639 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
3640 */
3641 function is(value) {
3642 var candidate = value;
3643 return Is.number(candidate.startLine) && Is.number(candidate.startLine)
3644 && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
3645 && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
3646 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
3647 }
3648 FoldingRange.is = is;
3649})(FoldingRange || (FoldingRange = {}));
3650/**
3651 * The DiagnosticRelatedInformation namespace provides helper functions to work with
3652 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
3653 */
3654var DiagnosticRelatedInformation;
3655(function (DiagnosticRelatedInformation) {
3656 /**
3657 * Creates a new DiagnosticRelatedInformation literal.
3658 */
3659 function create(location, message) {
3660 return {
3661 location: location,
3662 message: message
3663 };
3664 }
3665 DiagnosticRelatedInformation.create = create;
3666 /**
3667 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
3668 */
3669 function is(value) {
3670 var candidate = value;
3671 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
3672 }
3673 DiagnosticRelatedInformation.is = is;
3674})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
3675/**
3676 * The diagnostic's severity.
3677 */
3678var DiagnosticSeverity;
3679(function (DiagnosticSeverity) {
3680 /**
3681 * Reports an error.
3682 */
3683 DiagnosticSeverity.Error = 1;
3684 /**
3685 * Reports a warning.
3686 */
3687 DiagnosticSeverity.Warning = 2;
3688 /**
3689 * Reports an information.
3690 */
3691 DiagnosticSeverity.Information = 3;
3692 /**
3693 * Reports a hint.
3694 */
3695 DiagnosticSeverity.Hint = 4;
3696})(DiagnosticSeverity || (DiagnosticSeverity = {}));
3697/**
3698 * The Diagnostic namespace provides helper functions to work with
3699 * [Diagnostic](#Diagnostic) literals.
3700 */
3701var Diagnostic;
3702(function (Diagnostic) {
3703 /**
3704 * Creates a new Diagnostic literal.
3705 */
3706 function create(range, message, severity, code, source, relatedInformation) {
3707 var result = { range: range, message: message };
3708 if (Is.defined(severity)) {
3709 result.severity = severity;
3710 }
3711 if (Is.defined(code)) {
3712 result.code = code;
3713 }
3714 if (Is.defined(source)) {
3715 result.source = source;
3716 }
3717 if (Is.defined(relatedInformation)) {
3718 result.relatedInformation = relatedInformation;
3719 }
3720 return result;
3721 }
3722 Diagnostic.create = create;
3723 /**
3724 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
3725 */
3726 function is(value) {
3727 var candidate = value;
3728 return Is.defined(candidate)
3729 && Range.is(candidate.range)
3730 && Is.string(candidate.message)
3731 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
3732 && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
3733 && (Is.string(candidate.source) || Is.undefined(candidate.source))
3734 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
3735 }
3736 Diagnostic.is = is;
3737})(Diagnostic || (Diagnostic = {}));
3738/**
3739 * The Command namespace provides helper functions to work with
3740 * [Command](#Command) literals.
3741 */
3742var Command;
3743(function (Command) {
3744 /**
3745 * Creates a new Command literal.
3746 */
3747 function create(title, command) {
3748 var args = [];
3749 for (var _i = 2; _i < arguments.length; _i++) {
3750 args[_i - 2] = arguments[_i];
3751 }
3752 var result = { title: title, command: command };
3753 if (Is.defined(args) && args.length > 0) {
3754 result.arguments = args;
3755 }
3756 return result;
3757 }
3758 Command.create = create;
3759 /**
3760 * Checks whether the given literal conforms to the [Command](#Command) interface.
3761 */
3762 function is(value) {
3763 var candidate = value;
3764 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
3765 }
3766 Command.is = is;
3767})(Command || (Command = {}));
3768/**
3769 * The TextEdit namespace provides helper function to create replace,
3770 * insert and delete edits more easily.
3771 */
3772var TextEdit;
3773(function (TextEdit) {
3774 /**
3775 * Creates a replace text edit.
3776 * @param range The range of text to be replaced.
3777 * @param newText The new text.
3778 */
3779 function replace(range, newText) {
3780 return { range: range, newText: newText };
3781 }
3782 TextEdit.replace = replace;
3783 /**
3784 * Creates a insert text edit.
3785 * @param position The position to insert the text at.
3786 * @param newText The text to be inserted.
3787 */
3788 function insert(position, newText) {
3789 return { range: { start: position, end: position }, newText: newText };
3790 }
3791 TextEdit.insert = insert;
3792 /**
3793 * Creates a delete text edit.
3794 * @param range The range of text to be deleted.
3795 */
3796 function del(range) {
3797 return { range: range, newText: '' };
3798 }
3799 TextEdit.del = del;
3800 function is(value) {
3801 var candidate = value;
3802 return Is.objectLiteral(candidate)
3803 && Is.string(candidate.newText)
3804 && Range.is(candidate.range);
3805 }
3806 TextEdit.is = is;
3807})(TextEdit || (TextEdit = {}));
3808/**
3809 * The TextDocumentEdit namespace provides helper function to create
3810 * an edit that manipulates a text document.
3811 */
3812var TextDocumentEdit;
3813(function (TextDocumentEdit) {
3814 /**
3815 * Creates a new `TextDocumentEdit`
3816 */
3817 function create(textDocument, edits) {
3818 return { textDocument: textDocument, edits: edits };
3819 }
3820 TextDocumentEdit.create = create;
3821 function is(value) {
3822 var candidate = value;
3823 return Is.defined(candidate)
3824 && VersionedTextDocumentIdentifier.is(candidate.textDocument)
3825 && Array.isArray(candidate.edits);
3826 }
3827 TextDocumentEdit.is = is;
3828})(TextDocumentEdit || (TextDocumentEdit = {}));
3829var CreateFile;
3830(function (CreateFile) {
3831 function create(uri, options) {
3832 var result = {
3833 kind: 'create',
3834 uri: uri
3835 };
3836 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
3837 result.options = options;
3838 }
3839 return result;
3840 }
3841 CreateFile.create = create;
3842 function is(value) {
3843 var candidate = value;
3844 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
3845 (candidate.options === void 0 ||
3846 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
3847 }
3848 CreateFile.is = is;
3849})(CreateFile || (CreateFile = {}));
3850var RenameFile;
3851(function (RenameFile) {
3852 function create(oldUri, newUri, options) {
3853 var result = {
3854 kind: 'rename',
3855 oldUri: oldUri,
3856 newUri: newUri
3857 };
3858 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
3859 result.options = options;
3860 }
3861 return result;
3862 }
3863 RenameFile.create = create;
3864 function is(value) {
3865 var candidate = value;
3866 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
3867 (candidate.options === void 0 ||
3868 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
3869 }
3870 RenameFile.is = is;
3871})(RenameFile || (RenameFile = {}));
3872var DeleteFile;
3873(function (DeleteFile) {
3874 function create(uri, options) {
3875 var result = {
3876 kind: 'delete',
3877 uri: uri
3878 };
3879 if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
3880 result.options = options;
3881 }
3882 return result;
3883 }
3884 DeleteFile.create = create;
3885 function is(value) {
3886 var candidate = value;
3887 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
3888 (candidate.options === void 0 ||
3889 ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
3890 }
3891 DeleteFile.is = is;
3892})(DeleteFile || (DeleteFile = {}));
3893var WorkspaceEdit;
3894(function (WorkspaceEdit) {
3895 function is(value) {
3896 var candidate = value;
3897 return candidate &&
3898 (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
3899 (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
3900 if (Is.string(change.kind)) {
3901 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
3902 }
3903 else {
3904 return TextDocumentEdit.is(change);
3905 }
3906 }));
3907 }
3908 WorkspaceEdit.is = is;
3909})(WorkspaceEdit || (WorkspaceEdit = {}));
3910var TextEditChangeImpl = /** @class */ (function () {
3911 function TextEditChangeImpl(edits) {
3912 this.edits = edits;
3913 }
3914 TextEditChangeImpl.prototype.insert = function (position, newText) {
3915 this.edits.push(TextEdit.insert(position, newText));
3916 };
3917 TextEditChangeImpl.prototype.replace = function (range, newText) {
3918 this.edits.push(TextEdit.replace(range, newText));
3919 };
3920 TextEditChangeImpl.prototype.delete = function (range) {
3921 this.edits.push(TextEdit.del(range));
3922 };
3923 TextEditChangeImpl.prototype.add = function (edit) {
3924 this.edits.push(edit);
3925 };
3926 TextEditChangeImpl.prototype.all = function () {
3927 return this.edits;
3928 };
3929 TextEditChangeImpl.prototype.clear = function () {
3930 this.edits.splice(0, this.edits.length);
3931 };
3932 return TextEditChangeImpl;
3933}());
3934/**
3935 * A workspace change helps constructing changes to a workspace.
3936 */
3937var WorkspaceChange = /** @class */ (function () {
3938 function WorkspaceChange(workspaceEdit) {
3939 var _this = this;
3940 this._textEditChanges = Object.create(null);
3941 if (workspaceEdit) {
3942 this._workspaceEdit = workspaceEdit;
3943 if (workspaceEdit.documentChanges) {
3944 workspaceEdit.documentChanges.forEach(function (change) {
3945 if (TextDocumentEdit.is(change)) {
3946 var textEditChange = new TextEditChangeImpl(change.edits);
3947 _this._textEditChanges[change.textDocument.uri] = textEditChange;
3948 }
3949 });
3950 }
3951 else if (workspaceEdit.changes) {
3952 Object.keys(workspaceEdit.changes).forEach(function (key) {
3953 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
3954 _this._textEditChanges[key] = textEditChange;
3955 });
3956 }
3957 }
3958 }
3959 Object.defineProperty(WorkspaceChange.prototype, "edit", {
3960 /**
3961 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
3962 * use to be returned from a workspace edit operation like rename.
3963 */
3964 get: function () {
3965 return this._workspaceEdit;
3966 },
3967 enumerable: true,
3968 configurable: true
3969 });
3970 WorkspaceChange.prototype.getTextEditChange = function (key) {
3971 if (VersionedTextDocumentIdentifier.is(key)) {
3972 if (!this._workspaceEdit) {
3973 this._workspaceEdit = {
3974 documentChanges: []
3975 };
3976 }
3977 if (!this._workspaceEdit.documentChanges) {
3978 throw new Error('Workspace edit is not configured for document changes.');
3979 }
3980 var textDocument = key;
3981 var result = this._textEditChanges[textDocument.uri];
3982 if (!result) {
3983 var edits = [];
3984 var textDocumentEdit = {
3985 textDocument: textDocument,
3986 edits: edits
3987 };
3988 this._workspaceEdit.documentChanges.push(textDocumentEdit);
3989 result = new TextEditChangeImpl(edits);
3990 this._textEditChanges[textDocument.uri] = result;
3991 }
3992 return result;
3993 }
3994 else {
3995 if (!this._workspaceEdit) {
3996 this._workspaceEdit = {
3997 changes: Object.create(null)
3998 };
3999 }
4000 if (!this._workspaceEdit.changes) {
4001 throw new Error('Workspace edit is not configured for normal text edit changes.');
4002 }
4003 var result = this._textEditChanges[key];
4004 if (!result) {
4005 var edits = [];
4006 this._workspaceEdit.changes[key] = edits;
4007 result = new TextEditChangeImpl(edits);
4008 this._textEditChanges[key] = result;
4009 }
4010 return result;
4011 }
4012 };
4013 WorkspaceChange.prototype.createFile = function (uri, options) {
4014 this.checkDocumentChanges();
4015 this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
4016 };
4017 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
4018 this.checkDocumentChanges();
4019 this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
4020 };
4021 WorkspaceChange.prototype.deleteFile = function (uri, options) {
4022 this.checkDocumentChanges();
4023 this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
4024 };
4025 WorkspaceChange.prototype.checkDocumentChanges = function () {
4026 if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
4027 throw new Error('Workspace edit is not configured for document changes.');
4028 }
4029 };
4030 return WorkspaceChange;
4031}());
4032
4033/**
4034 * The TextDocumentIdentifier namespace provides helper functions to work with
4035 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
4036 */
4037var TextDocumentIdentifier;
4038(function (TextDocumentIdentifier) {
4039 /**
4040 * Creates a new TextDocumentIdentifier literal.
4041 * @param uri The document's uri.
4042 */
4043 function create(uri) {
4044 return { uri: uri };
4045 }
4046 TextDocumentIdentifier.create = create;
4047 /**
4048 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
4049 */
4050 function is(value) {
4051 var candidate = value;
4052 return Is.defined(candidate) && Is.string(candidate.uri);
4053 }
4054 TextDocumentIdentifier.is = is;
4055})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
4056/**
4057 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
4058 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
4059 */
4060var VersionedTextDocumentIdentifier;
4061(function (VersionedTextDocumentIdentifier) {
4062 /**
4063 * Creates a new VersionedTextDocumentIdentifier literal.
4064 * @param uri The document's uri.
4065 * @param uri The document's text.
4066 */
4067 function create(uri, version) {
4068 return { uri: uri, version: version };
4069 }
4070 VersionedTextDocumentIdentifier.create = create;
4071 /**
4072 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
4073 */
4074 function is(value) {
4075 var candidate = value;
4076 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
4077 }
4078 VersionedTextDocumentIdentifier.is = is;
4079})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
4080/**
4081 * The TextDocumentItem namespace provides helper functions to work with
4082 * [TextDocumentItem](#TextDocumentItem) literals.
4083 */
4084var TextDocumentItem;
4085(function (TextDocumentItem) {
4086 /**
4087 * Creates a new TextDocumentItem literal.
4088 * @param uri The document's uri.
4089 * @param languageId The document's language identifier.
4090 * @param version The document's version number.
4091 * @param text The document's text.
4092 */
4093 function create(uri, languageId, version, text) {
4094 return { uri: uri, languageId: languageId, version: version, text: text };
4095 }
4096 TextDocumentItem.create = create;
4097 /**
4098 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
4099 */
4100 function is(value) {
4101 var candidate = value;
4102 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
4103 }
4104 TextDocumentItem.is = is;
4105})(TextDocumentItem || (TextDocumentItem = {}));
4106/**
4107 * Describes the content type that a client supports in various
4108 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
4109 *
4110 * Please note that `MarkupKinds` must not start with a `$`. This kinds
4111 * are reserved for internal usage.
4112 */
4113var MarkupKind;
4114(function (MarkupKind) {
4115 /**
4116 * Plain text is supported as a content format
4117 */
4118 MarkupKind.PlainText = 'plaintext';
4119 /**
4120 * Markdown is supported as a content format
4121 */
4122 MarkupKind.Markdown = 'markdown';
4123})(MarkupKind || (MarkupKind = {}));
4124(function (MarkupKind) {
4125 /**
4126 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
4127 */
4128 function is(value) {
4129 var candidate = value;
4130 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
4131 }
4132 MarkupKind.is = is;
4133})(MarkupKind || (MarkupKind = {}));
4134var MarkupContent;
4135(function (MarkupContent) {
4136 /**
4137 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
4138 */
4139 function is(value) {
4140 var candidate = value;
4141 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
4142 }
4143 MarkupContent.is = is;
4144})(MarkupContent || (MarkupContent = {}));
4145/**
4146 * The kind of a completion entry.
4147 */
4148var CompletionItemKind;
4149(function (CompletionItemKind) {
4150 CompletionItemKind.Text = 1;
4151 CompletionItemKind.Method = 2;
4152 CompletionItemKind.Function = 3;
4153 CompletionItemKind.Constructor = 4;
4154 CompletionItemKind.Field = 5;
4155 CompletionItemKind.Variable = 6;
4156 CompletionItemKind.Class = 7;
4157 CompletionItemKind.Interface = 8;
4158 CompletionItemKind.Module = 9;
4159 CompletionItemKind.Property = 10;
4160 CompletionItemKind.Unit = 11;
4161 CompletionItemKind.Value = 12;
4162 CompletionItemKind.Enum = 13;
4163 CompletionItemKind.Keyword = 14;
4164 CompletionItemKind.Snippet = 15;
4165 CompletionItemKind.Color = 16;
4166 CompletionItemKind.File = 17;
4167 CompletionItemKind.Reference = 18;
4168 CompletionItemKind.Folder = 19;
4169 CompletionItemKind.EnumMember = 20;
4170 CompletionItemKind.Constant = 21;
4171 CompletionItemKind.Struct = 22;
4172 CompletionItemKind.Event = 23;
4173 CompletionItemKind.Operator = 24;
4174 CompletionItemKind.TypeParameter = 25;
4175})(CompletionItemKind || (CompletionItemKind = {}));
4176/**
4177 * Defines whether the insert text in a completion item should be interpreted as
4178 * plain text or a snippet.
4179 */
4180var InsertTextFormat;
4181(function (InsertTextFormat) {
4182 /**
4183 * The primary text to be inserted is treated as a plain string.
4184 */
4185 InsertTextFormat.PlainText = 1;
4186 /**
4187 * The primary text to be inserted is treated as a snippet.
4188 *
4189 * A snippet can define tab stops and placeholders with `$1`, `$2`
4190 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
4191 * the end of the snippet. Placeholders with equal identifiers are linked,
4192 * that is typing in one will update others too.
4193 *
4194 * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
4195 */
4196 InsertTextFormat.Snippet = 2;
4197})(InsertTextFormat || (InsertTextFormat = {}));
4198/**
4199 * The CompletionItem namespace provides functions to deal with
4200 * completion items.
4201 */
4202var CompletionItem;
4203(function (CompletionItem) {
4204 /**
4205 * Create a completion item and seed it with a label.
4206 * @param label The completion item's label
4207 */
4208 function create(label) {
4209 return { label: label };
4210 }
4211 CompletionItem.create = create;
4212})(CompletionItem || (CompletionItem = {}));
4213/**
4214 * The CompletionList namespace provides functions to deal with
4215 * completion lists.
4216 */
4217var CompletionList;
4218(function (CompletionList) {
4219 /**
4220 * Creates a new completion list.
4221 *
4222 * @param items The completion items.
4223 * @param isIncomplete The list is not complete.
4224 */
4225 function create(items, isIncomplete) {
4226 return { items: items ? items : [], isIncomplete: !!isIncomplete };
4227 }
4228 CompletionList.create = create;
4229})(CompletionList || (CompletionList = {}));
4230var MarkedString;
4231(function (MarkedString) {
4232 /**
4233 * Creates a marked string from plain text.
4234 *
4235 * @param plainText The plain text.
4236 */
4237 function fromPlainText(plainText) {
4238 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
4239 }
4240 MarkedString.fromPlainText = fromPlainText;
4241 /**
4242 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
4243 */
4244 function is(value) {
4245 var candidate = value;
4246 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
4247 }
4248 MarkedString.is = is;
4249})(MarkedString || (MarkedString = {}));
4250var Hover;
4251(function (Hover) {
4252 /**
4253 * Checks whether the given value conforms to the [Hover](#Hover) interface.
4254 */
4255 function is(value) {
4256 var candidate = value;
4257 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
4258 MarkedString.is(candidate.contents) ||
4259 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
4260 }
4261 Hover.is = is;
4262})(Hover || (Hover = {}));
4263/**
4264 * The ParameterInformation namespace provides helper functions to work with
4265 * [ParameterInformation](#ParameterInformation) literals.
4266 */
4267var ParameterInformation;
4268(function (ParameterInformation) {
4269 /**
4270 * Creates a new parameter information literal.
4271 *
4272 * @param label A label string.
4273 * @param documentation A doc string.
4274 */
4275 function create(label, documentation) {
4276 return documentation ? { label: label, documentation: documentation } : { label: label };
4277 }
4278 ParameterInformation.create = create;
4279 ;
4280})(ParameterInformation || (ParameterInformation = {}));
4281/**
4282 * The SignatureInformation namespace provides helper functions to work with
4283 * [SignatureInformation](#SignatureInformation) literals.
4284 */
4285var SignatureInformation;
4286(function (SignatureInformation) {
4287 function create(label, documentation) {
4288 var parameters = [];
4289 for (var _i = 2; _i < arguments.length; _i++) {
4290 parameters[_i - 2] = arguments[_i];
4291 }
4292 var result = { label: label };
4293 if (Is.defined(documentation)) {
4294 result.documentation = documentation;
4295 }
4296 if (Is.defined(parameters)) {
4297 result.parameters = parameters;
4298 }
4299 else {
4300 result.parameters = [];
4301 }
4302 return result;
4303 }
4304 SignatureInformation.create = create;
4305})(SignatureInformation || (SignatureInformation = {}));
4306/**
4307 * A document highlight kind.
4308 */
4309var DocumentHighlightKind;
4310(function (DocumentHighlightKind) {
4311 /**
4312 * A textual occurrence.
4313 */
4314 DocumentHighlightKind.Text = 1;
4315 /**
4316 * Read-access of a symbol, like reading a variable.
4317 */
4318 DocumentHighlightKind.Read = 2;
4319 /**
4320 * Write-access of a symbol, like writing to a variable.
4321 */
4322 DocumentHighlightKind.Write = 3;
4323})(DocumentHighlightKind || (DocumentHighlightKind = {}));
4324/**
4325 * DocumentHighlight namespace to provide helper functions to work with
4326 * [DocumentHighlight](#DocumentHighlight) literals.
4327 */
4328var DocumentHighlight;
4329(function (DocumentHighlight) {
4330 /**
4331 * Create a DocumentHighlight object.
4332 * @param range The range the highlight applies to.
4333 */
4334 function create(range, kind) {
4335 var result = { range: range };
4336 if (Is.number(kind)) {
4337 result.kind = kind;
4338 }
4339 return result;
4340 }
4341 DocumentHighlight.create = create;
4342})(DocumentHighlight || (DocumentHighlight = {}));
4343/**
4344 * A symbol kind.
4345 */
4346var SymbolKind;
4347(function (SymbolKind) {
4348 SymbolKind.File = 1;
4349 SymbolKind.Module = 2;
4350 SymbolKind.Namespace = 3;
4351 SymbolKind.Package = 4;
4352 SymbolKind.Class = 5;
4353 SymbolKind.Method = 6;
4354 SymbolKind.Property = 7;
4355 SymbolKind.Field = 8;
4356 SymbolKind.Constructor = 9;
4357 SymbolKind.Enum = 10;
4358 SymbolKind.Interface = 11;
4359 SymbolKind.Function = 12;
4360 SymbolKind.Variable = 13;
4361 SymbolKind.Constant = 14;
4362 SymbolKind.String = 15;
4363 SymbolKind.Number = 16;
4364 SymbolKind.Boolean = 17;
4365 SymbolKind.Array = 18;
4366 SymbolKind.Object = 19;
4367 SymbolKind.Key = 20;
4368 SymbolKind.Null = 21;
4369 SymbolKind.EnumMember = 22;
4370 SymbolKind.Struct = 23;
4371 SymbolKind.Event = 24;
4372 SymbolKind.Operator = 25;
4373 SymbolKind.TypeParameter = 26;
4374})(SymbolKind || (SymbolKind = {}));
4375var SymbolInformation;
4376(function (SymbolInformation) {
4377 /**
4378 * Creates a new symbol information literal.
4379 *
4380 * @param name The name of the symbol.
4381 * @param kind The kind of the symbol.
4382 * @param range The range of the location of the symbol.
4383 * @param uri The resource of the location of symbol, defaults to the current document.
4384 * @param containerName The name of the symbol containing the symbol.
4385 */
4386 function create(name, kind, range, uri, containerName) {
4387 var result = {
4388 name: name,
4389 kind: kind,
4390 location: { uri: uri, range: range }
4391 };
4392 if (containerName) {
4393 result.containerName = containerName;
4394 }
4395 return result;
4396 }
4397 SymbolInformation.create = create;
4398})(SymbolInformation || (SymbolInformation = {}));
4399/**
4400 * Represents programming constructs like variables, classes, interfaces etc.
4401 * that appear in a document. Document symbols can be hierarchical and they
4402 * have two ranges: one that encloses its definition and one that points to
4403 * its most interesting range, e.g. the range of an identifier.
4404 */
4405var DocumentSymbol = /** @class */ (function () {
4406 function DocumentSymbol() {
4407 }
4408 return DocumentSymbol;
4409}());
4410
4411(function (DocumentSymbol) {
4412 /**
4413 * Creates a new symbol information literal.
4414 *
4415 * @param name The name of the symbol.
4416 * @param detail The detail of the symbol.
4417 * @param kind The kind of the symbol.
4418 * @param range The range of the symbol.
4419 * @param selectionRange The selectionRange of the symbol.
4420 * @param children Children of the symbol.
4421 */
4422 function create(name, detail, kind, range, selectionRange, children) {
4423 var result = {
4424 name: name,
4425 detail: detail,
4426 kind: kind,
4427 range: range,
4428 selectionRange: selectionRange
4429 };
4430 if (children !== void 0) {
4431 result.children = children;
4432 }
4433 return result;
4434 }
4435 DocumentSymbol.create = create;
4436 /**
4437 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
4438 */
4439 function is(value) {
4440 var candidate = value;
4441 return candidate &&
4442 Is.string(candidate.name) && Is.number(candidate.kind) &&
4443 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
4444 (candidate.detail === void 0 || Is.string(candidate.detail)) &&
4445 (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
4446 (candidate.children === void 0 || Array.isArray(candidate.children));
4447 }
4448 DocumentSymbol.is = is;
4449})(DocumentSymbol || (DocumentSymbol = {}));
4450/**
4451 * A set of predefined code action kinds
4452 */
4453var CodeActionKind;
4454(function (CodeActionKind) {
4455 /**
4456 * Base kind for quickfix actions: 'quickfix'
4457 */
4458 CodeActionKind.QuickFix = 'quickfix';
4459 /**
4460 * Base kind for refactoring actions: 'refactor'
4461 */
4462 CodeActionKind.Refactor = 'refactor';
4463 /**
4464 * Base kind for refactoring extraction actions: 'refactor.extract'
4465 *
4466 * Example extract actions:
4467 *
4468 * - Extract method
4469 * - Extract function
4470 * - Extract variable
4471 * - Extract interface from class
4472 * - ...
4473 */
4474 CodeActionKind.RefactorExtract = 'refactor.extract';
4475 /**
4476 * Base kind for refactoring inline actions: 'refactor.inline'
4477 *
4478 * Example inline actions:
4479 *
4480 * - Inline function
4481 * - Inline variable
4482 * - Inline constant
4483 * - ...
4484 */
4485 CodeActionKind.RefactorInline = 'refactor.inline';
4486 /**
4487 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
4488 *
4489 * Example rewrite actions:
4490 *
4491 * - Convert JavaScript function to class
4492 * - Add or remove parameter
4493 * - Encapsulate field
4494 * - Make method static
4495 * - Move method to base class
4496 * - ...
4497 */
4498 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
4499 /**
4500 * Base kind for source actions: `source`
4501 *
4502 * Source code actions apply to the entire file.
4503 */
4504 CodeActionKind.Source = 'source';
4505 /**
4506 * Base kind for an organize imports source action: `source.organizeImports`
4507 */
4508 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
4509})(CodeActionKind || (CodeActionKind = {}));
4510/**
4511 * The CodeActionContext namespace provides helper functions to work with
4512 * [CodeActionContext](#CodeActionContext) literals.
4513 */
4514var CodeActionContext;
4515(function (CodeActionContext) {
4516 /**
4517 * Creates a new CodeActionContext literal.
4518 */
4519 function create(diagnostics, only) {
4520 var result = { diagnostics: diagnostics };
4521 if (only !== void 0 && only !== null) {
4522 result.only = only;
4523 }
4524 return result;
4525 }
4526 CodeActionContext.create = create;
4527 /**
4528 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
4529 */
4530 function is(value) {
4531 var candidate = value;
4532 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
4533 }
4534 CodeActionContext.is = is;
4535})(CodeActionContext || (CodeActionContext = {}));
4536var CodeAction;
4537(function (CodeAction) {
4538 function create(title, commandOrEdit, kind) {
4539 var result = { title: title };
4540 if (Command.is(commandOrEdit)) {
4541 result.command = commandOrEdit;
4542 }
4543 else {
4544 result.edit = commandOrEdit;
4545 }
4546 if (kind !== void null) {
4547 result.kind = kind;
4548 }
4549 return result;
4550 }
4551 CodeAction.create = create;
4552 function is(value) {
4553 var candidate = value;
4554 return candidate && Is.string(candidate.title) &&
4555 (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
4556 (candidate.kind === void 0 || Is.string(candidate.kind)) &&
4557 (candidate.edit !== void 0 || candidate.command !== void 0) &&
4558 (candidate.command === void 0 || Command.is(candidate.command)) &&
4559 (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
4560 }
4561 CodeAction.is = is;
4562})(CodeAction || (CodeAction = {}));
4563/**
4564 * The CodeLens namespace provides helper functions to work with
4565 * [CodeLens](#CodeLens) literals.
4566 */
4567var CodeLens;
4568(function (CodeLens) {
4569 /**
4570 * Creates a new CodeLens literal.
4571 */
4572 function create(range, data) {
4573 var result = { range: range };
4574 if (Is.defined(data))
4575 result.data = data;
4576 return result;
4577 }
4578 CodeLens.create = create;
4579 /**
4580 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
4581 */
4582 function is(value) {
4583 var candidate = value;
4584 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
4585 }
4586 CodeLens.is = is;
4587})(CodeLens || (CodeLens = {}));
4588/**
4589 * The FormattingOptions namespace provides helper functions to work with
4590 * [FormattingOptions](#FormattingOptions) literals.
4591 */
4592var FormattingOptions;
4593(function (FormattingOptions) {
4594 /**
4595 * Creates a new FormattingOptions literal.
4596 */
4597 function create(tabSize, insertSpaces) {
4598 return { tabSize: tabSize, insertSpaces: insertSpaces };
4599 }
4600 FormattingOptions.create = create;
4601 /**
4602 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
4603 */
4604 function is(value) {
4605 var candidate = value;
4606 return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
4607 }
4608 FormattingOptions.is = is;
4609})(FormattingOptions || (FormattingOptions = {}));
4610/**
4611 * A document link is a range in a text document that links to an internal or external resource, like another
4612 * text document or a web site.
4613 */
4614var DocumentLink = /** @class */ (function () {
4615 function DocumentLink() {
4616 }
4617 return DocumentLink;
4618}());
4619
4620/**
4621 * The DocumentLink namespace provides helper functions to work with
4622 * [DocumentLink](#DocumentLink) literals.
4623 */
4624(function (DocumentLink) {
4625 /**
4626 * Creates a new DocumentLink literal.
4627 */
4628 function create(range, target, data) {
4629 return { range: range, target: target, data: data };
4630 }
4631 DocumentLink.create = create;
4632 /**
4633 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
4634 */
4635 function is(value) {
4636 var candidate = value;
4637 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
4638 }
4639 DocumentLink.is = is;
4640})(DocumentLink || (DocumentLink = {}));
4641var EOL = ['\n', '\r\n', '\r'];
4642var TextDocument;
4643(function (TextDocument) {
4644 /**
4645 * Creates a new ITextDocument literal from the given uri and content.
4646 * @param uri The document's uri.
4647 * @param languageId The document's language Id.
4648 * @param content The document's content.
4649 */
4650 function create(uri, languageId, version, content) {
4651 return new FullTextDocument(uri, languageId, version, content);
4652 }
4653 TextDocument.create = create;
4654 /**
4655 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
4656 */
4657 function is(value) {
4658 var candidate = value;
4659 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
4660 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
4661 }
4662 TextDocument.is = is;
4663 function applyEdits(document, edits) {
4664 var text = document.getText();
4665 var sortedEdits = mergeSort(edits, function (a, b) {
4666 var diff = a.range.start.line - b.range.start.line;
4667 if (diff === 0) {
4668 return a.range.start.character - b.range.start.character;
4669 }
4670 return diff;
4671 });
4672 var lastModifiedOffset = text.length;
4673 for (var i = sortedEdits.length - 1; i >= 0; i--) {
4674 var e = sortedEdits[i];
4675 var startOffset = document.offsetAt(e.range.start);
4676 var endOffset = document.offsetAt(e.range.end);
4677 if (endOffset <= lastModifiedOffset) {
4678 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
4679 }
4680 else {
4681 throw new Error('Overlapping edit');
4682 }
4683 lastModifiedOffset = startOffset;
4684 }
4685 return text;
4686 }
4687 TextDocument.applyEdits = applyEdits;
4688 function mergeSort(data, compare) {
4689 if (data.length <= 1) {
4690 // sorted
4691 return data;
4692 }
4693 var p = (data.length / 2) | 0;
4694 var left = data.slice(0, p);
4695 var right = data.slice(p);
4696 mergeSort(left, compare);
4697 mergeSort(right, compare);
4698 var leftIdx = 0;
4699 var rightIdx = 0;
4700 var i = 0;
4701 while (leftIdx < left.length && rightIdx < right.length) {
4702 var ret = compare(left[leftIdx], right[rightIdx]);
4703 if (ret <= 0) {
4704 // smaller_equal -> take left to preserve order
4705 data[i++] = left[leftIdx++];
4706 }
4707 else {
4708 // greater -> take right
4709 data[i++] = right[rightIdx++];
4710 }
4711 }
4712 while (leftIdx < left.length) {
4713 data[i++] = left[leftIdx++];
4714 }
4715 while (rightIdx < right.length) {
4716 data[i++] = right[rightIdx++];
4717 }
4718 return data;
4719 }
4720})(TextDocument || (TextDocument = {}));
4721/**
4722 * Represents reasons why a text document is saved.
4723 */
4724var TextDocumentSaveReason;
4725(function (TextDocumentSaveReason) {
4726 /**
4727 * Manually triggered, e.g. by the user pressing save, by starting debugging,
4728 * or by an API call.
4729 */
4730 TextDocumentSaveReason.Manual = 1;
4731 /**
4732 * Automatic after a delay.
4733 */
4734 TextDocumentSaveReason.AfterDelay = 2;
4735 /**
4736 * When the editor lost focus.
4737 */
4738 TextDocumentSaveReason.FocusOut = 3;
4739})(TextDocumentSaveReason || (TextDocumentSaveReason = {}));
4740var FullTextDocument = /** @class */ (function () {
4741 function FullTextDocument(uri, languageId, version, content) {
4742 this._uri = uri;
4743 this._languageId = languageId;
4744 this._version = version;
4745 this._content = content;
4746 this._lineOffsets = null;
4747 }
4748 Object.defineProperty(FullTextDocument.prototype, "uri", {
4749 get: function () {
4750 return this._uri;
4751 },
4752 enumerable: true,
4753 configurable: true
4754 });
4755 Object.defineProperty(FullTextDocument.prototype, "languageId", {
4756 get: function () {
4757 return this._languageId;
4758 },
4759 enumerable: true,
4760 configurable: true
4761 });
4762 Object.defineProperty(FullTextDocument.prototype, "version", {
4763 get: function () {
4764 return this._version;
4765 },
4766 enumerable: true,
4767 configurable: true
4768 });
4769 FullTextDocument.prototype.getText = function (range) {
4770 if (range) {
4771 var start = this.offsetAt(range.start);
4772 var end = this.offsetAt(range.end);
4773 return this._content.substring(start, end);
4774 }
4775 return this._content;
4776 };
4777 FullTextDocument.prototype.update = function (event, version) {
4778 this._content = event.text;
4779 this._version = version;
4780 this._lineOffsets = null;
4781 };
4782 FullTextDocument.prototype.getLineOffsets = function () {
4783 if (this._lineOffsets === null) {
4784 var lineOffsets = [];
4785 var text = this._content;
4786 var isLineStart = true;
4787 for (var i = 0; i < text.length; i++) {
4788 if (isLineStart) {
4789 lineOffsets.push(i);
4790 isLineStart = false;
4791 }
4792 var ch = text.charAt(i);
4793 isLineStart = (ch === '\r' || ch === '\n');
4794 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
4795 i++;
4796 }
4797 }
4798 if (isLineStart && text.length > 0) {
4799 lineOffsets.push(text.length);
4800 }
4801 this._lineOffsets = lineOffsets;
4802 }
4803 return this._lineOffsets;
4804 };
4805 FullTextDocument.prototype.positionAt = function (offset) {
4806 offset = Math.max(Math.min(offset, this._content.length), 0);
4807 var lineOffsets = this.getLineOffsets();
4808 var low = 0, high = lineOffsets.length;
4809 if (high === 0) {
4810 return Position.create(0, offset);
4811 }
4812 while (low < high) {
4813 var mid = Math.floor((low + high) / 2);
4814 if (lineOffsets[mid] > offset) {
4815 high = mid;
4816 }
4817 else {
4818 low = mid + 1;
4819 }
4820 }
4821 // low is the least x for which the line offset is larger than the current offset
4822 // or array.length if no line offset is larger than the current offset
4823 var line = low - 1;
4824 return Position.create(line, offset - lineOffsets[line]);
4825 };
4826 FullTextDocument.prototype.offsetAt = function (position) {
4827 var lineOffsets = this.getLineOffsets();
4828 if (position.line >= lineOffsets.length) {
4829 return this._content.length;
4830 }
4831 else if (position.line < 0) {
4832 return 0;
4833 }
4834 var lineOffset = lineOffsets[position.line];
4835 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
4836 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
4837 };
4838 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
4839 get: function () {
4840 return this.getLineOffsets().length;
4841 },
4842 enumerable: true,
4843 configurable: true
4844 });
4845 return FullTextDocument;
4846}());
4847var Is;
4848(function (Is) {
4849 var toString = Object.prototype.toString;
4850 function defined(value) {
4851 return typeof value !== 'undefined';
4852 }
4853 Is.defined = defined;
4854 function undefined(value) {
4855 return typeof value === 'undefined';
4856 }
4857 Is.undefined = undefined;
4858 function boolean(value) {
4859 return value === true || value === false;
4860 }
4861 Is.boolean = boolean;
4862 function string(value) {
4863 return toString.call(value) === '[object String]';
4864 }
4865 Is.string = string;
4866 function number(value) {
4867 return toString.call(value) === '[object Number]';
4868 }
4869 Is.number = number;
4870 function func(value) {
4871 return toString.call(value) === '[object Function]';
4872 }
4873 Is.func = func;
4874 function objectLiteral(value) {
4875 // Strictly speaking class instances pass this check as well. Since the LSP
4876 // doesn't use classes we ignore this for now. If we do we need to add something
4877 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
4878 return value !== null && typeof value === 'object';
4879 }
4880 Is.objectLiteral = objectLiteral;
4881 function typedArray(value, check) {
4882 return Array.isArray(value) && value.every(check);
4883 }
4884 Is.typedArray = typedArray;
4885})(Is || (Is = {}));
4886
4887
4888/***/ }),
4889/* 21 */
4890/***/ (function(module, exports, __webpack_require__) {
4891
4892"use strict";
4893/* --------------------------------------------------------------------------------------------
4894 * Copyright (c) Microsoft Corporation. All rights reserved.
4895 * Licensed under the MIT License. See License.txt in the project root for license information.
4896 * ------------------------------------------------------------------------------------------ */
4897
4898Object.defineProperty(exports, "__esModule", { value: true });
4899const Is = __webpack_require__(22);
4900const vscode_jsonrpc_1 = __webpack_require__(6);
4901const protocol_implementation_1 = __webpack_require__(23);
4902exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
4903const protocol_typeDefinition_1 = __webpack_require__(24);
4904exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;
4905const protocol_workspaceFolders_1 = __webpack_require__(25);
4906exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;
4907exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;
4908const protocol_configuration_1 = __webpack_require__(26);
4909exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;
4910const protocol_colorProvider_1 = __webpack_require__(27);
4911exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
4912exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
4913const protocol_foldingRange_1 = __webpack_require__(28);
4914exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
4915const protocol_declaration_1 = __webpack_require__(29);
4916exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
4917// @ts-ignore: to avoid inlining LocatioLink as dynamic import
4918let __noDynamicImport;
4919var DocumentFilter;
4920(function (DocumentFilter) {
4921 function is(value) {
4922 let candidate = value;
4923 return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
4924 }
4925 DocumentFilter.is = is;
4926})(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
4927/**
4928 * The `client/registerCapability` request is sent from the server to the client to register a new capability
4929 * handler on the client side.
4930 */
4931var RegistrationRequest;
4932(function (RegistrationRequest) {
4933 RegistrationRequest.type = new vscode_jsonrpc_1.RequestType('client/registerCapability');
4934})(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
4935/**
4936 * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
4937 * handler on the client side.
4938 */
4939var UnregistrationRequest;
4940(function (UnregistrationRequest) {
4941 UnregistrationRequest.type = new vscode_jsonrpc_1.RequestType('client/unregisterCapability');
4942})(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
4943var ResourceOperationKind;
4944(function (ResourceOperationKind) {
4945 /**
4946 * Supports creating new files and folders.
4947 */
4948 ResourceOperationKind.Create = 'create';
4949 /**
4950 * Supports renaming existing files and folders.
4951 */
4952 ResourceOperationKind.Rename = 'rename';
4953 /**
4954 * Supports deleting existing files and folders.
4955 */
4956 ResourceOperationKind.Delete = 'delete';
4957})(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
4958var FailureHandlingKind;
4959(function (FailureHandlingKind) {
4960 /**
4961 * Applying the workspace change is simply aborted if one of the changes provided
4962 * fails. All operations executed before the failing operation stay executed.
4963 */
4964 FailureHandlingKind.Abort = 'abort';
4965 /**
4966 * All operations are executed transactional. That means they either all
4967 * succeed or no changes at all are applied to the workspace.
4968 */
4969 FailureHandlingKind.Transactional = 'transactional';
4970 /**
4971 * If the workspace edit contains only textual file changes they are executed transactional.
4972 * If resource changes (create, rename or delete file) are part of the change the failure
4973 * handling startegy is abort.
4974 */
4975 FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
4976 /**
4977 * The client tries to undo the operations already executed. But there is no
4978 * guaruntee that this is succeeding.
4979 */
4980 FailureHandlingKind.Undo = 'undo';
4981})(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
4982/**
4983 * Defines how the host (editor) should sync
4984 * document changes to the language server.
4985 */
4986var TextDocumentSyncKind;
4987(function (TextDocumentSyncKind) {
4988 /**
4989 * Documents should not be synced at all.
4990 */
4991 TextDocumentSyncKind.None = 0;
4992 /**
4993 * Documents are synced by always sending the full content
4994 * of the document.
4995 */
4996 TextDocumentSyncKind.Full = 1;
4997 /**
4998 * Documents are synced by sending the full content on open.
4999 * After that only incremental updates to the document are
5000 * send.
5001 */
5002 TextDocumentSyncKind.Incremental = 2;
5003})(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
5004/**
5005 * The initialize request is sent from the client to the server.
5006 * It is sent once as the request after starting up the server.
5007 * The requests parameter is of type [InitializeParams](#InitializeParams)
5008 * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
5009 * resolves to such.
5010 */
5011var InitializeRequest;
5012(function (InitializeRequest) {
5013 InitializeRequest.type = new vscode_jsonrpc_1.RequestType('initialize');
5014})(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
5015/**
5016 * Known error codes for an `InitializeError`;
5017 */
5018var InitializeError;
5019(function (InitializeError) {
5020 /**
5021 * If the protocol version provided by the client can't be handled by the server.
5022 * @deprecated This initialize error got replaced by client capabilities. There is
5023 * no version handshake in version 3.0x
5024 */
5025 InitializeError.unknownProtocolVersion = 1;
5026})(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
5027/**
5028 * The intialized notification is sent from the client to the
5029 * server after the client is fully initialized and the server
5030 * is allowed to send requests from the server to the client.
5031 */
5032var InitializedNotification;
5033(function (InitializedNotification) {
5034 InitializedNotification.type = new vscode_jsonrpc_1.NotificationType('initialized');
5035})(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
5036//---- Shutdown Method ----
5037/**
5038 * A shutdown request is sent from the client to the server.
5039 * It is sent once when the client decides to shutdown the
5040 * server. The only notification that is sent after a shutdown request
5041 * is the exit event.
5042 */
5043var ShutdownRequest;
5044(function (ShutdownRequest) {
5045 ShutdownRequest.type = new vscode_jsonrpc_1.RequestType0('shutdown');
5046})(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
5047//---- Exit Notification ----
5048/**
5049 * The exit event is sent from the client to the server to
5050 * ask the server to exit its process.
5051 */
5052var ExitNotification;
5053(function (ExitNotification) {
5054 ExitNotification.type = new vscode_jsonrpc_1.NotificationType0('exit');
5055})(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
5056//---- Configuration notification ----
5057/**
5058 * The configuration change notification is sent from the client to the server
5059 * when the client's configuration has changed. The notification contains
5060 * the changed configuration as defined by the language client.
5061 */
5062var DidChangeConfigurationNotification;
5063(function (DidChangeConfigurationNotification) {
5064 DidChangeConfigurationNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeConfiguration');
5065})(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
5066//---- Message show and log notifications ----
5067/**
5068 * The message type
5069 */
5070var MessageType;
5071(function (MessageType) {
5072 /**
5073 * An error message.
5074 */
5075 MessageType.Error = 1;
5076 /**
5077 * A warning message.
5078 */
5079 MessageType.Warning = 2;
5080 /**
5081 * An information message.
5082 */
5083 MessageType.Info = 3;
5084 /**
5085 * A log message.
5086 */
5087 MessageType.Log = 4;
5088})(MessageType = exports.MessageType || (exports.MessageType = {}));
5089/**
5090 * The show message notification is sent from a server to a client to ask
5091 * the client to display a particular message in the user interface.
5092 */
5093var ShowMessageNotification;
5094(function (ShowMessageNotification) {
5095 ShowMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/showMessage');
5096})(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
5097/**
5098 * The show message request is sent from the server to the client to show a message
5099 * and a set of options actions to the user.
5100 */
5101var ShowMessageRequest;
5102(function (ShowMessageRequest) {
5103 ShowMessageRequest.type = new vscode_jsonrpc_1.RequestType('window/showMessageRequest');
5104})(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
5105/**
5106 * The log message notification is sent from the server to the client to ask
5107 * the client to log a particular message.
5108 */
5109var LogMessageNotification;
5110(function (LogMessageNotification) {
5111 LogMessageNotification.type = new vscode_jsonrpc_1.NotificationType('window/logMessage');
5112})(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
5113//---- Telemetry notification
5114/**
5115 * The telemetry event notification is sent from the server to the client to ask
5116 * the client to log telemetry data.
5117 */
5118var TelemetryEventNotification;
5119(function (TelemetryEventNotification) {
5120 TelemetryEventNotification.type = new vscode_jsonrpc_1.NotificationType('telemetry/event');
5121})(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
5122/**
5123 * The document open notification is sent from the client to the server to signal
5124 * newly opened text documents. The document's truth is now managed by the client
5125 * and the server must not try to read the document's truth using the document's
5126 * uri. Open in this sense means it is managed by the client. It doesn't necessarily
5127 * mean that its content is presented in an editor. An open notification must not
5128 * be sent more than once without a corresponding close notification send before.
5129 * This means open and close notification must be balanced and the max open count
5130 * is one.
5131 */
5132var DidOpenTextDocumentNotification;
5133(function (DidOpenTextDocumentNotification) {
5134 DidOpenTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didOpen');
5135})(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
5136/**
5137 * The document change notification is sent from the client to the server to signal
5138 * changes to a text document.
5139 */
5140var DidChangeTextDocumentNotification;
5141(function (DidChangeTextDocumentNotification) {
5142 DidChangeTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didChange');
5143})(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
5144/**
5145 * The document close notification is sent from the client to the server when
5146 * the document got closed in the client. The document's truth now exists where
5147 * the document's uri points to (e.g. if the document's uri is a file uri the
5148 * truth now exists on disk). As with the open notification the close notification
5149 * is about managing the document's content. Receiving a close notification
5150 * doesn't mean that the document was open in an editor before. A close
5151 * notification requires a previous open notification to be sent.
5152 */
5153var DidCloseTextDocumentNotification;
5154(function (DidCloseTextDocumentNotification) {
5155 DidCloseTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didClose');
5156})(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
5157/**
5158 * The document save notification is sent from the client to the server when
5159 * the document got saved in the client.
5160 */
5161var DidSaveTextDocumentNotification;
5162(function (DidSaveTextDocumentNotification) {
5163 DidSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/didSave');
5164})(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
5165/**
5166 * A document will save notification is sent from the client to the server before
5167 * the document is actually saved.
5168 */
5169var WillSaveTextDocumentNotification;
5170(function (WillSaveTextDocumentNotification) {
5171 WillSaveTextDocumentNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/willSave');
5172})(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
5173/**
5174 * A document will save request is sent from the client to the server before
5175 * the document is actually saved. The request can return an array of TextEdits
5176 * which will be applied to the text document before it is saved. Please note that
5177 * clients might drop results if computing the text edits took too long or if a
5178 * server constantly fails on this request. This is done to keep the save fast and
5179 * reliable.
5180 */
5181var WillSaveTextDocumentWaitUntilRequest;
5182(function (WillSaveTextDocumentWaitUntilRequest) {
5183 WillSaveTextDocumentWaitUntilRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/willSaveWaitUntil');
5184})(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
5185//---- File eventing ----
5186/**
5187 * The watched files notification is sent from the client to the server when
5188 * the client detects changes to file watched by the language client.
5189 */
5190var DidChangeWatchedFilesNotification;
5191(function (DidChangeWatchedFilesNotification) {
5192 DidChangeWatchedFilesNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeWatchedFiles');
5193})(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
5194/**
5195 * The file event type
5196 */
5197var FileChangeType;
5198(function (FileChangeType) {
5199 /**
5200 * The file got created.
5201 */
5202 FileChangeType.Created = 1;
5203 /**
5204 * The file got changed.
5205 */
5206 FileChangeType.Changed = 2;
5207 /**
5208 * The file got deleted.
5209 */
5210 FileChangeType.Deleted = 3;
5211})(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
5212var WatchKind;
5213(function (WatchKind) {
5214 /**
5215 * Interested in create events.
5216 */
5217 WatchKind.Create = 1;
5218 /**
5219 * Interested in change events
5220 */
5221 WatchKind.Change = 2;
5222 /**
5223 * Interested in delete events
5224 */
5225 WatchKind.Delete = 4;
5226})(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
5227//---- Diagnostic notification ----
5228/**
5229 * Diagnostics notification are sent from the server to the client to signal
5230 * results of validation runs.
5231 */
5232var PublishDiagnosticsNotification;
5233(function (PublishDiagnosticsNotification) {
5234 PublishDiagnosticsNotification.type = new vscode_jsonrpc_1.NotificationType('textDocument/publishDiagnostics');
5235})(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
5236/**
5237 * How a completion was triggered
5238 */
5239var CompletionTriggerKind;
5240(function (CompletionTriggerKind) {
5241 /**
5242 * Completion was triggered by typing an identifier (24x7 code
5243 * complete), manual invocation (e.g Ctrl+Space) or via API.
5244 */
5245 CompletionTriggerKind.Invoked = 1;
5246 /**
5247 * Completion was triggered by a trigger character specified by
5248 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
5249 */
5250 CompletionTriggerKind.TriggerCharacter = 2;
5251 /**
5252 * Completion was re-triggered as current completion list is incomplete
5253 */
5254 CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
5255})(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
5256/**
5257 * Request to request completion at a given text document position. The request's
5258 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
5259 * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
5260 * or a Thenable that resolves to such.
5261 *
5262 * The request can delay the computation of the [`detail`](#CompletionItem.detail)
5263 * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
5264 * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
5265 * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
5266 */
5267var CompletionRequest;
5268(function (CompletionRequest) {
5269 CompletionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/completion');
5270})(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
5271/**
5272 * Request to resolve additional information for a given completion item.The request's
5273 * parameter is of type [CompletionItem](#CompletionItem) the response
5274 * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
5275 */
5276var CompletionResolveRequest;
5277(function (CompletionResolveRequest) {
5278 CompletionResolveRequest.type = new vscode_jsonrpc_1.RequestType('completionItem/resolve');
5279})(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
5280//---- Hover Support -------------------------------
5281/**
5282 * Request to request hover information at a given text document position. The request's
5283 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
5284 * type [Hover](#Hover) or a Thenable that resolves to such.
5285 */
5286var HoverRequest;
5287(function (HoverRequest) {
5288 HoverRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/hover');
5289})(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
5290var SignatureHelpRequest;
5291(function (SignatureHelpRequest) {
5292 SignatureHelpRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/signatureHelp');
5293})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
5294//---- Goto Definition -------------------------------------
5295/**
5296 * A request to resolve the definition location of a symbol at a given text
5297 * document position. The request's parameter is of type [TextDocumentPosition]
5298 * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
5299 * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
5300 * to such.
5301 */
5302var DefinitionRequest;
5303(function (DefinitionRequest) {
5304 DefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/definition');
5305})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
5306/**
5307 * A request to resolve project-wide references for the symbol denoted
5308 * by the given text document position. The request's parameter is of
5309 * type [ReferenceParams](#ReferenceParams) the response is of type
5310 * [Location[]](#Location) or a Thenable that resolves to such.
5311 */
5312var ReferencesRequest;
5313(function (ReferencesRequest) {
5314 ReferencesRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/references');
5315})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
5316//---- Document Highlight ----------------------------------
5317/**
5318 * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
5319 * text document position. The request's parameter is of type [TextDocumentPosition]
5320 * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
5321 * (#DocumentHighlight) or a Thenable that resolves to such.
5322 */
5323var DocumentHighlightRequest;
5324(function (DocumentHighlightRequest) {
5325 DocumentHighlightRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentHighlight');
5326})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
5327//---- Document Symbol Provider ---------------------------
5328/**
5329 * A request to list all symbols found in a given text document. The request's
5330 * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
5331 * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
5332 * that resolves to such.
5333 */
5334var DocumentSymbolRequest;
5335(function (DocumentSymbolRequest) {
5336 DocumentSymbolRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentSymbol');
5337})(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
5338//---- Workspace Symbol Provider ---------------------------
5339/**
5340 * A request to list project-wide symbols matching the query string given
5341 * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
5342 * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
5343 * resolves to such.
5344 */
5345var WorkspaceSymbolRequest;
5346(function (WorkspaceSymbolRequest) {
5347 WorkspaceSymbolRequest.type = new vscode_jsonrpc_1.RequestType('workspace/symbol');
5348})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
5349/**
5350 * A request to provide commands for the given text document and range.
5351 */
5352var CodeActionRequest;
5353(function (CodeActionRequest) {
5354 CodeActionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeAction');
5355})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
5356/**
5357 * A request to provide code lens for the given text document.
5358 */
5359var CodeLensRequest;
5360(function (CodeLensRequest) {
5361 CodeLensRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/codeLens');
5362})(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
5363/**
5364 * A request to resolve a command for a given code lens.
5365 */
5366var CodeLensResolveRequest;
5367(function (CodeLensResolveRequest) {
5368 CodeLensResolveRequest.type = new vscode_jsonrpc_1.RequestType('codeLens/resolve');
5369})(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
5370/**
5371 * A request to to format a whole document.
5372 */
5373var DocumentFormattingRequest;
5374(function (DocumentFormattingRequest) {
5375 DocumentFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/formatting');
5376})(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
5377/**
5378 * A request to to format a range in a document.
5379 */
5380var DocumentRangeFormattingRequest;
5381(function (DocumentRangeFormattingRequest) {
5382 DocumentRangeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rangeFormatting');
5383})(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
5384/**
5385 * A request to format a document on type.
5386 */
5387var DocumentOnTypeFormattingRequest;
5388(function (DocumentOnTypeFormattingRequest) {
5389 DocumentOnTypeFormattingRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/onTypeFormatting');
5390})(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
5391/**
5392 * A request to rename a symbol.
5393 */
5394var RenameRequest;
5395(function (RenameRequest) {
5396 RenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/rename');
5397})(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
5398/**
5399 * A request to test and perform the setup necessary for a rename.
5400 */
5401var PrepareRenameRequest;
5402(function (PrepareRenameRequest) {
5403 PrepareRenameRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/prepareRename');
5404})(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
5405/**
5406 * A request to provide document links
5407 */
5408var DocumentLinkRequest;
5409(function (DocumentLinkRequest) {
5410 DocumentLinkRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentLink');
5411})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
5412/**
5413 * Request to resolve additional information for a given document link. The request's
5414 * parameter is of type [DocumentLink](#DocumentLink) the response
5415 * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
5416 */
5417var DocumentLinkResolveRequest;
5418(function (DocumentLinkResolveRequest) {
5419 DocumentLinkResolveRequest.type = new vscode_jsonrpc_1.RequestType('documentLink/resolve');
5420})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
5421/**
5422 * A request send from the client to the server to execute a command. The request might return
5423 * a workspace edit which the client will apply to the workspace.
5424 */
5425var ExecuteCommandRequest;
5426(function (ExecuteCommandRequest) {
5427 ExecuteCommandRequest.type = new vscode_jsonrpc_1.RequestType('workspace/executeCommand');
5428})(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
5429/**
5430 * A request sent from the server to the client to modified certain resources.
5431 */
5432var ApplyWorkspaceEditRequest;
5433(function (ApplyWorkspaceEditRequest) {
5434 ApplyWorkspaceEditRequest.type = new vscode_jsonrpc_1.RequestType('workspace/applyEdit');
5435})(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
5436
5437
5438/***/ }),
5439/* 22 */
5440/***/ (function(module, exports, __webpack_require__) {
5441
5442"use strict";
5443/* --------------------------------------------------------------------------------------------
5444 * Copyright (c) Microsoft Corporation. All rights reserved.
5445 * Licensed under the MIT License. See License.txt in the project root for license information.
5446 * ------------------------------------------------------------------------------------------ */
5447
5448Object.defineProperty(exports, "__esModule", { value: true });
5449function boolean(value) {
5450 return value === true || value === false;
5451}
5452exports.boolean = boolean;
5453function string(value) {
5454 return typeof value === 'string' || value instanceof String;
5455}
5456exports.string = string;
5457function number(value) {
5458 return typeof value === 'number' || value instanceof Number;
5459}
5460exports.number = number;
5461function error(value) {
5462 return value instanceof Error;
5463}
5464exports.error = error;
5465function func(value) {
5466 return typeof value === 'function';
5467}
5468exports.func = func;
5469function array(value) {
5470 return Array.isArray(value);
5471}
5472exports.array = array;
5473function stringArray(value) {
5474 return array(value) && value.every(elem => string(elem));
5475}
5476exports.stringArray = stringArray;
5477function typedArray(value, check) {
5478 return Array.isArray(value) && value.every(check);
5479}
5480exports.typedArray = typedArray;
5481function thenable(value) {
5482 return value && func(value.then);
5483}
5484exports.thenable = thenable;
5485
5486
5487/***/ }),
5488/* 23 */
5489/***/ (function(module, exports, __webpack_require__) {
5490
5491"use strict";
5492/* --------------------------------------------------------------------------------------------
5493 * Copyright (c) Microsoft Corporation. All rights reserved.
5494 * Licensed under the MIT License. See License.txt in the project root for license information.
5495 * ------------------------------------------------------------------------------------------ */
5496
5497Object.defineProperty(exports, "__esModule", { value: true });
5498const vscode_jsonrpc_1 = __webpack_require__(6);
5499// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5500let __noDynamicImport;
5501/**
5502 * A request to resolve the implementation locations of a symbol at a given text
5503 * document position. The request's parameter is of type [TextDocumentPositioParams]
5504 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
5505 * Thenable that resolves to such.
5506 */
5507var ImplementationRequest;
5508(function (ImplementationRequest) {
5509 ImplementationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/implementation');
5510})(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
5511
5512
5513/***/ }),
5514/* 24 */
5515/***/ (function(module, exports, __webpack_require__) {
5516
5517"use strict";
5518/* --------------------------------------------------------------------------------------------
5519 * Copyright (c) Microsoft Corporation. All rights reserved.
5520 * Licensed under the MIT License. See License.txt in the project root for license information.
5521 * ------------------------------------------------------------------------------------------ */
5522
5523Object.defineProperty(exports, "__esModule", { value: true });
5524const vscode_jsonrpc_1 = __webpack_require__(6);
5525// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5526let __noDynamicImport;
5527/**
5528 * A request to resolve the type definition locations of a symbol at a given text
5529 * document position. The request's parameter is of type [TextDocumentPositioParams]
5530 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
5531 * Thenable that resolves to such.
5532 */
5533var TypeDefinitionRequest;
5534(function (TypeDefinitionRequest) {
5535 TypeDefinitionRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/typeDefinition');
5536})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
5537
5538
5539/***/ }),
5540/* 25 */
5541/***/ (function(module, exports, __webpack_require__) {
5542
5543"use strict";
5544/* --------------------------------------------------------------------------------------------
5545 * Copyright (c) Microsoft Corporation. All rights reserved.
5546 * Licensed under the MIT License. See License.txt in the project root for license information.
5547 * ------------------------------------------------------------------------------------------ */
5548
5549Object.defineProperty(exports, "__esModule", { value: true });
5550const vscode_jsonrpc_1 = __webpack_require__(6);
5551/**
5552 * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
5553 */
5554var WorkspaceFoldersRequest;
5555(function (WorkspaceFoldersRequest) {
5556 WorkspaceFoldersRequest.type = new vscode_jsonrpc_1.RequestType0('workspace/workspaceFolders');
5557})(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
5558/**
5559 * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
5560 * folder configuration changes.
5561 */
5562var DidChangeWorkspaceFoldersNotification;
5563(function (DidChangeWorkspaceFoldersNotification) {
5564 DidChangeWorkspaceFoldersNotification.type = new vscode_jsonrpc_1.NotificationType('workspace/didChangeWorkspaceFolders');
5565})(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
5566
5567
5568/***/ }),
5569/* 26 */
5570/***/ (function(module, exports, __webpack_require__) {
5571
5572"use strict";
5573/* --------------------------------------------------------------------------------------------
5574 * Copyright (c) Microsoft Corporation. All rights reserved.
5575 * Licensed under the MIT License. See License.txt in the project root for license information.
5576 * ------------------------------------------------------------------------------------------ */
5577
5578Object.defineProperty(exports, "__esModule", { value: true });
5579const vscode_jsonrpc_1 = __webpack_require__(6);
5580/**
5581 * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
5582 * configuration setting.
5583 *
5584 * This pull model replaces the old push model were the client signaled configuration change via an
5585 * event. If the server still needs to react to configuration changes (since the server caches the
5586 * result of `workspace/configuration` requests) the server should register for an empty configuration
5587 * change event and empty the cache if such an event is received.
5588 */
5589var ConfigurationRequest;
5590(function (ConfigurationRequest) {
5591 ConfigurationRequest.type = new vscode_jsonrpc_1.RequestType('workspace/configuration');
5592})(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
5593
5594
5595/***/ }),
5596/* 27 */
5597/***/ (function(module, exports, __webpack_require__) {
5598
5599"use strict";
5600/* --------------------------------------------------------------------------------------------
5601 * Copyright (c) Microsoft Corporation. All rights reserved.
5602 * Licensed under the MIT License. See License.txt in the project root for license information.
5603 * ------------------------------------------------------------------------------------------ */
5604
5605Object.defineProperty(exports, "__esModule", { value: true });
5606const vscode_jsonrpc_1 = __webpack_require__(6);
5607/**
5608 * A request to list all color symbols found in a given text document. The request's
5609 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
5610 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
5611 * that resolves to such.
5612 */
5613var DocumentColorRequest;
5614(function (DocumentColorRequest) {
5615 DocumentColorRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/documentColor');
5616})(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
5617/**
5618 * A request to list all presentation for a color. The request's
5619 * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
5620 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
5621 * that resolves to such.
5622 */
5623var ColorPresentationRequest;
5624(function (ColorPresentationRequest) {
5625 ColorPresentationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/colorPresentation');
5626})(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
5627
5628
5629/***/ }),
5630/* 28 */
5631/***/ (function(module, exports, __webpack_require__) {
5632
5633"use strict";
5634
5635/*---------------------------------------------------------------------------------------------
5636 * Copyright (c) Microsoft Corporation. All rights reserved.
5637 * Licensed under the MIT License. See License.txt in the project root for license information.
5638 *--------------------------------------------------------------------------------------------*/
5639Object.defineProperty(exports, "__esModule", { value: true });
5640const vscode_jsonrpc_1 = __webpack_require__(6);
5641/**
5642 * Enum of known range kinds
5643 */
5644var FoldingRangeKind;
5645(function (FoldingRangeKind) {
5646 /**
5647 * Folding range for a comment
5648 */
5649 FoldingRangeKind["Comment"] = "comment";
5650 /**
5651 * Folding range for a imports or includes
5652 */
5653 FoldingRangeKind["Imports"] = "imports";
5654 /**
5655 * Folding range for a region (e.g. `#region`)
5656 */
5657 FoldingRangeKind["Region"] = "region";
5658})(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
5659/**
5660 * A request to provide folding ranges in a document. The request's
5661 * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
5662 * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
5663 * that resolves to such.
5664 */
5665var FoldingRangeRequest;
5666(function (FoldingRangeRequest) {
5667 FoldingRangeRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/foldingRange');
5668})(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
5669
5670
5671/***/ }),
5672/* 29 */
5673/***/ (function(module, exports, __webpack_require__) {
5674
5675"use strict";
5676/* --------------------------------------------------------------------------------------------
5677 * Copyright (c) Microsoft Corporation. All rights reserved.
5678 * Licensed under the MIT License. See License.txt in the project root for license information.
5679 * ------------------------------------------------------------------------------------------ */
5680
5681Object.defineProperty(exports, "__esModule", { value: true });
5682const vscode_jsonrpc_1 = __webpack_require__(6);
5683// @ts-ignore: to avoid inlining LocatioLink as dynamic import
5684let __noDynamicImport;
5685/**
5686 * A request to resolve the type definition locations of a symbol at a given text
5687 * document position. The request's parameter is of type [TextDocumentPositioParams]
5688 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
5689 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
5690 * to such.
5691 */
5692var DeclarationRequest;
5693(function (DeclarationRequest) {
5694 DeclarationRequest.type = new vscode_jsonrpc_1.RequestType('textDocument/declaration');
5695})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
5696
5697
5698/***/ }),
5699/* 30 */
5700/***/ (function(module, exports, __webpack_require__) {
5701
5702"use strict";
5703/* --------------------------------------------------------------------------------------------
5704 * Copyright (c) Microsoft Corporation. All rights reserved.
5705 * Licensed under the MIT License. See License.txt in the project root for license information.
5706 * ------------------------------------------------------------------------------------------ */
5707
5708Object.defineProperty(exports, "__esModule", { value: true });
5709const vscode_languageserver_protocol_1 = __webpack_require__(5);
5710const Is = __webpack_require__(31);
5711exports.ConfigurationFeature = (Base) => {
5712 return class extends Base {
5713 getConfiguration(arg) {
5714 if (!arg) {
5715 return this._getConfiguration({});
5716 }
5717 else if (Is.string(arg)) {
5718 return this._getConfiguration({ section: arg });
5719 }
5720 else {
5721 return this._getConfiguration(arg);
5722 }
5723 }
5724 _getConfiguration(arg) {
5725 let params = {
5726 items: Array.isArray(arg) ? arg : [arg]
5727 };
5728 return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {
5729 return Array.isArray(arg) ? result : result[0];
5730 });
5731 }
5732 };
5733};
5734
5735
5736/***/ }),
5737/* 31 */
5738/***/ (function(module, exports, __webpack_require__) {
5739
5740"use strict";
5741/* --------------------------------------------------------------------------------------------
5742 * Copyright (c) Microsoft Corporation. All rights reserved.
5743 * Licensed under the MIT License. See License.txt in the project root for license information.
5744 * ------------------------------------------------------------------------------------------ */
5745
5746Object.defineProperty(exports, "__esModule", { value: true });
5747function boolean(value) {
5748 return value === true || value === false;
5749}
5750exports.boolean = boolean;
5751function string(value) {
5752 return typeof value === 'string' || value instanceof String;
5753}
5754exports.string = string;
5755function number(value) {
5756 return typeof value === 'number' || value instanceof Number;
5757}
5758exports.number = number;
5759function error(value) {
5760 return value instanceof Error;
5761}
5762exports.error = error;
5763function func(value) {
5764 return typeof value === 'function';
5765}
5766exports.func = func;
5767function array(value) {
5768 return Array.isArray(value);
5769}
5770exports.array = array;
5771function stringArray(value) {
5772 return array(value) && value.every(elem => string(elem));
5773}
5774exports.stringArray = stringArray;
5775function typedArray(value, check) {
5776 return Array.isArray(value) && value.every(check);
5777}
5778exports.typedArray = typedArray;
5779function thenable(value) {
5780 return value && func(value.then);
5781}
5782exports.thenable = thenable;
5783
5784
5785/***/ }),
5786/* 32 */
5787/***/ (function(module, exports, __webpack_require__) {
5788
5789"use strict";
5790/* --------------------------------------------------------------------------------------------
5791 * Copyright (c) Microsoft Corporation. All rights reserved.
5792 * Licensed under the MIT License. See License.txt in the project root for license information.
5793 * ------------------------------------------------------------------------------------------ */
5794
5795Object.defineProperty(exports, "__esModule", { value: true });
5796const vscode_languageserver_protocol_1 = __webpack_require__(5);
5797exports.WorkspaceFoldersFeature = (Base) => {
5798 return class extends Base {
5799 initialize(capabilities) {
5800 let workspaceCapabilities = capabilities.workspace;
5801 if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {
5802 this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();
5803 this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {
5804 this._onDidChangeWorkspaceFolders.fire(params.event);
5805 });
5806 }
5807 }
5808 getWorkspaceFolders() {
5809 return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);
5810 }
5811 get onDidChangeWorkspaceFolders() {
5812 if (!this._onDidChangeWorkspaceFolders) {
5813 throw new Error('Client doesn\'t support sending workspace folder change events.');
5814 }
5815 if (!this._unregistration) {
5816 this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);
5817 }
5818 return this._onDidChangeWorkspaceFolders.event;
5819 }
5820 };
5821};
5822
5823
5824/***/ }),
5825/* 33 */
5826/***/ (function(module, exports, __webpack_require__) {
5827
5828"use strict";
5829/*---------------------------------------------------------------------------------------------
5830 * Copyright (c) Microsoft Corporation. All rights reserved.
5831 * Licensed under the MIT License. See License.txt in the project root for license information.
5832 *--------------------------------------------------------------------------------------------*/
5833
5834Object.defineProperty(exports, "__esModule", { value: true });
5835class ValueUUID {
5836 constructor(_value) {
5837 this._value = _value;
5838 // empty
5839 }
5840 asHex() {
5841 return this._value;
5842 }
5843 equals(other) {
5844 return this.asHex() === other.asHex();
5845 }
5846}
5847class V4UUID extends ValueUUID {
5848 constructor() {
5849 super([
5850 V4UUID._randomHex(),
5851 V4UUID._randomHex(),
5852 V4UUID._randomHex(),
5853 V4UUID._randomHex(),
5854 V4UUID._randomHex(),
5855 V4UUID._randomHex(),
5856 V4UUID._randomHex(),
5857 V4UUID._randomHex(),
5858 '-',
5859 V4UUID._randomHex(),
5860 V4UUID._randomHex(),
5861 V4UUID._randomHex(),
5862 V4UUID._randomHex(),
5863 '-',
5864 '4',
5865 V4UUID._randomHex(),
5866 V4UUID._randomHex(),
5867 V4UUID._randomHex(),
5868 '-',
5869 V4UUID._oneOf(V4UUID._timeHighBits),
5870 V4UUID._randomHex(),
5871 V4UUID._randomHex(),
5872 V4UUID._randomHex(),
5873 '-',
5874 V4UUID._randomHex(),
5875 V4UUID._randomHex(),
5876 V4UUID._randomHex(),
5877 V4UUID._randomHex(),
5878 V4UUID._randomHex(),
5879 V4UUID._randomHex(),
5880 V4UUID._randomHex(),
5881 V4UUID._randomHex(),
5882 V4UUID._randomHex(),
5883 V4UUID._randomHex(),
5884 V4UUID._randomHex(),
5885 V4UUID._randomHex(),
5886 ].join(''));
5887 }
5888 static _oneOf(array) {
5889 return array[Math.floor(array.length * Math.random())];
5890 }
5891 static _randomHex() {
5892 return V4UUID._oneOf(V4UUID._chars);
5893 }
5894}
5895V4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];
5896V4UUID._timeHighBits = ['8', '9', 'a', 'b'];
5897/**
5898 * An empty UUID that contains only zeros.
5899 */
5900exports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');
5901function v4() {
5902 return new V4UUID();
5903}
5904exports.v4 = v4;
5905const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
5906function isUUID(value) {
5907 return _UUIDPattern.test(value);
5908}
5909exports.isUUID = isUUID;
5910/**
5911 * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
5912 * @param value A uuid string.
5913 */
5914function parse(value) {
5915 if (!isUUID(value)) {
5916 throw new Error('invalid uuid');
5917 }
5918 return new ValueUUID(value);
5919}
5920exports.parse = parse;
5921function generateUuid() {
5922 return v4().asHex();
5923}
5924exports.generateUuid = generateUuid;
5925
5926
5927/***/ }),
5928/* 34 */
5929/***/ (function(module, exports, __webpack_require__) {
5930
5931"use strict";
5932/* --------------------------------------------------------------------------------------------
5933 * Copyright (c) Microsoft Corporation. All rights reserved.
5934 * Licensed under the MIT License. See License.txt in the project root for license information.
5935 * ------------------------------------------------------------------------------------------ */
5936
5937Object.defineProperty(exports, "__esModule", { value: true });
5938const url = __webpack_require__(35);
5939const path = __webpack_require__(15);
5940const fs = __webpack_require__(36);
5941const child_process_1 = __webpack_require__(37);
5942/**
5943 * @deprecated Use the `vscode-uri` npm module which provides a more
5944 * complete implementation of handling VS Code URIs.
5945 */
5946function uriToFilePath(uri) {
5947 let parsed = url.parse(uri);
5948 if (parsed.protocol !== 'file:' || !parsed.path) {
5949 return undefined;
5950 }
5951 let segments = parsed.path.split('/');
5952 for (var i = 0, len = segments.length; i < len; i++) {
5953 segments[i] = decodeURIComponent(segments[i]);
5954 }
5955 if (process.platform === 'win32' && segments.length > 1) {
5956 let first = segments[0];
5957 let second = segments[1];
5958 // Do we have a drive letter and we started with a / which is the
5959 // case if the first segement is empty (see split above)
5960 if (first.length === 0 && second.length > 1 && second[1] === ':') {
5961 // Remove first slash
5962 segments.shift();
5963 }
5964 }
5965 return path.normalize(segments.join('/'));
5966}
5967exports.uriToFilePath = uriToFilePath;
5968function isWindows() {
5969 return process.platform === 'win32';
5970}
5971function resolveModule(workspaceRoot, moduleName) {
5972 let nodePathKey = 'NODE_PATH';
5973 return new Promise((resolve, reject) => {
5974 let nodePath = [];
5975 if (workspaceRoot) {
5976 nodePath.push(path.join(workspaceRoot, 'node_modules'));
5977 }
5978 child_process_1.exec('npm config get prefix', (error, stdout, _stderr) => {
5979 if (!error) {
5980 let globalPath = stdout.replace(/[\s\r\n]+$/, '');
5981 if (globalPath.length > 0) {
5982 if (isWindows()) {
5983 nodePath.push(path.join(globalPath, 'node_modules'));
5984 }
5985 else {
5986 nodePath.push(path.join(globalPath, 'lib', 'node_modules'));
5987 }
5988 }
5989 }
5990 let separator = isWindows() ? ';' : ':';
5991 let env = process.env;
5992 let newEnv = Object.create(null);
5993 Object.keys(env).forEach(key => newEnv[key] = env[key]);
5994 if (newEnv[nodePathKey]) {
5995 newEnv[nodePathKey] = nodePath.join(separator) + separator + newEnv[nodePathKey];
5996 }
5997 else {
5998 newEnv[nodePathKey] = nodePath.join(separator);
5999 }
6000 newEnv['ELECTRON_RUN_AS_NODE'] = '1';
6001 try {
6002 let cp = child_process_1.fork(path.join(__dirname, 'resolve.js'), [], { env: newEnv, execArgv: [] });
6003 if (cp.pid === void 0) {
6004 reject(new Error(`Starting process to resolve node module ${moduleName} failed`));
6005 return;
6006 }
6007 cp.on('message', (message) => {
6008 if (message.command === 'resolve') {
6009 let toRequire = moduleName;
6010 if (message.success) {
6011 toRequire = message.result;
6012 }
6013 cp.send({ command: 'exit' });
6014 try {
6015 resolve(__webpack_require__(38)(toRequire));
6016 }
6017 catch (error) {
6018 reject(error);
6019 }
6020 }
6021 });
6022 let message = {
6023 command: 'resolve',
6024 args: moduleName
6025 };
6026 cp.send(message);
6027 }
6028 catch (error) {
6029 reject(error);
6030 }
6031 });
6032 });
6033}
6034exports.resolveModule = resolveModule;
6035function resolve(moduleName, nodePath, cwd, tracer) {
6036 const nodePathKey = 'NODE_PATH';
6037 const app = [
6038 "var p = process;",
6039 "p.on('message',function(m){",
6040 "if(m.c==='e'){",
6041 "p.exit(0);",
6042 "}",
6043 "else if(m.c==='rs'){",
6044 "try{",
6045 "var r=require.resolve(m.a);",
6046 "p.send({c:'r',s:true,r:r});",
6047 "}",
6048 "catch(err){",
6049 "p.send({c:'r',s:false});",
6050 "}",
6051 "}",
6052 "});"
6053 ].join('');
6054 return new Promise((resolve, reject) => {
6055 let env = process.env;
6056 let newEnv = Object.create(null);
6057 Object.keys(env).forEach(key => newEnv[key] = env[key]);
6058 if (nodePath) {
6059 if (newEnv[nodePathKey]) {
6060 newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];
6061 }
6062 else {
6063 newEnv[nodePathKey] = nodePath;
6064 }
6065 if (tracer) {
6066 tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);
6067 }
6068 }
6069 newEnv['ELECTRON_RUN_AS_NODE'] = '1';
6070 try {
6071 let cp = child_process_1.fork('', [], {
6072 cwd: cwd,
6073 env: newEnv,
6074 execArgv: ['-e', app]
6075 });
6076 if (cp.pid === void 0) {
6077 reject(new Error(`Starting process to resolve node module ${moduleName} failed`));
6078 return;
6079 }
6080 cp.on('error', (error) => {
6081 reject(error);
6082 });
6083 cp.on('message', (message) => {
6084 if (message.c === 'r') {
6085 cp.send({ c: 'e' });
6086 if (message.s) {
6087 resolve(message.r);
6088 }
6089 else {
6090 reject(new Error(`Failed to resolve module: ${moduleName}`));
6091 }
6092 }
6093 });
6094 let message = {
6095 c: 'rs',
6096 a: moduleName
6097 };
6098 cp.send(message);
6099 }
6100 catch (error) {
6101 reject(error);
6102 }
6103 });
6104}
6105exports.resolve = resolve;
6106function resolveGlobalNodePath(tracer) {
6107 let npmCommand = 'npm';
6108 let options = {
6109 encoding: 'utf8'
6110 };
6111 if (isWindows()) {
6112 npmCommand = 'npm.cmd';
6113 options.shell = true;
6114 }
6115 let handler = () => { };
6116 try {
6117 process.on('SIGPIPE', handler);
6118 let stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;
6119 if (!stdout) {
6120 if (tracer) {
6121 tracer(`'npm config get prefix' didn't return a value.`);
6122 }
6123 return undefined;
6124 }
6125 let prefix = stdout.trim();
6126 if (tracer) {
6127 tracer(`'npm config get prefix' value is: ${prefix}`);
6128 }
6129 if (prefix.length > 0) {
6130 if (isWindows()) {
6131 return path.join(prefix, 'node_modules');
6132 }
6133 else {
6134 return path.join(prefix, 'lib', 'node_modules');
6135 }
6136 }
6137 return undefined;
6138 }
6139 catch (err) {
6140 return undefined;
6141 }
6142 finally {
6143 process.removeListener('SIGPIPE', handler);
6144 }
6145}
6146exports.resolveGlobalNodePath = resolveGlobalNodePath;
6147function resolveGlobalYarnPath(tracer) {
6148 let yarnCommand = 'yarn';
6149 let options = {
6150 encoding: 'utf8'
6151 };
6152 if (isWindows()) {
6153 yarnCommand = 'yarn.cmd';
6154 options.shell = true;
6155 }
6156 let handler = () => { };
6157 try {
6158 process.on('SIGPIPE', handler);
6159 let results = child_process_1.spawnSync(yarnCommand, ['global', 'dir', '--json'], options);
6160 let stdout = results.stdout;
6161 if (!stdout) {
6162 if (tracer) {
6163 tracer(`'yarn global dir' didn't return a value.`);
6164 if (results.stderr) {
6165 tracer(results.stderr);
6166 }
6167 }
6168 return undefined;
6169 }
6170 let lines = stdout.trim().split(/\r?\n/);
6171 for (let line of lines) {
6172 try {
6173 let yarn = JSON.parse(line);
6174 if (yarn.type === 'log') {
6175 return path.join(yarn.data, 'node_modules');
6176 }
6177 }
6178 catch (e) {
6179 // Do nothing. Ignore the line
6180 }
6181 }
6182 return undefined;
6183 }
6184 catch (err) {
6185 return undefined;
6186 }
6187 finally {
6188 process.removeListener('SIGPIPE', handler);
6189 }
6190}
6191exports.resolveGlobalYarnPath = resolveGlobalYarnPath;
6192var FileSystem;
6193(function (FileSystem) {
6194 let _isCaseSensitive = undefined;
6195 function isCaseSensitive() {
6196 if (_isCaseSensitive !== void 0) {
6197 return _isCaseSensitive;
6198 }
6199 if (process.platform === 'win32') {
6200 _isCaseSensitive = false;
6201 }
6202 else {
6203 // convert current file name to upper case / lower case and check if file exists
6204 // (guards against cases when name is already all uppercase or lowercase)
6205 _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());
6206 }
6207 return _isCaseSensitive;
6208 }
6209 FileSystem.isCaseSensitive = isCaseSensitive;
6210 function isParent(parent, child) {
6211 if (isCaseSensitive()) {
6212 return path.normalize(child).indexOf(path.normalize(parent)) === 0;
6213 }
6214 else {
6215 return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) == 0;
6216 }
6217 }
6218 FileSystem.isParent = isParent;
6219})(FileSystem = exports.FileSystem || (exports.FileSystem = {}));
6220function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {
6221 if (nodePath) {
6222 if (!path.isAbsolute(nodePath)) {
6223 nodePath = path.join(workspaceRoot, nodePath);
6224 }
6225 return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {
6226 if (FileSystem.isParent(nodePath, value)) {
6227 return value;
6228 }
6229 else {
6230 return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));
6231 }
6232 }).then(undefined, (_error) => {
6233 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
6234 });
6235 }
6236 else {
6237 return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);
6238 }
6239}
6240exports.resolveModulePath = resolveModulePath;
6241/**
6242 * Resolves the given module relative to the given workspace root. In contrast to
6243 * `resolveModule` this method considers the parent chain as well.
6244 */
6245function resolveModule2(workspaceRoot, moduleName, nodePath, tracer) {
6246 return resolveModulePath(workspaceRoot, moduleName, nodePath, tracer).then((path) => {
6247 if (tracer) {
6248 tracer(`Module ${moduleName} got resolved to ${path}`);
6249 }
6250 return __webpack_require__(38)(path);
6251 });
6252}
6253exports.resolveModule2 = resolveModule2;
6254
6255
6256/***/ }),
6257/* 35 */
6258/***/ (function(module, exports) {
6259
6260module.exports = require("url");
6261
6262/***/ }),
6263/* 36 */
6264/***/ (function(module, exports) {
6265
6266module.exports = require("fs");
6267
6268/***/ }),
6269/* 37 */
6270/***/ (function(module, exports) {
6271
6272module.exports = require("child_process");
6273
6274/***/ }),
6275/* 38 */
6276/***/ (function(module, exports) {
6277
6278function webpackEmptyContext(req) {
6279 var e = new Error("Cannot find module '" + req + "'");
6280 e.code = 'MODULE_NOT_FOUND';
6281 throw e;
6282}
6283webpackEmptyContext.keys = function() { return []; };
6284webpackEmptyContext.resolve = webpackEmptyContext;
6285module.exports = webpackEmptyContext;
6286webpackEmptyContext.id = 38;
6287
6288/***/ }),
6289/* 39 */,
6290/* 40 */
6291/***/ (function(module, exports, __webpack_require__) {
6292
6293"use strict";
6294
6295var __assign = (this && this.__assign) || function () {
6296 __assign = Object.assign || function(t) {
6297 for (var s, i = 1, n = arguments.length; i < n; i++) {
6298 s = arguments[i];
6299 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6300 t[p] = s[p];
6301 }
6302 return t;
6303 };
6304 return __assign.apply(this, arguments);
6305};
6306var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
6307 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6308 return new (P || (P = Promise))(function (resolve, reject) {
6309 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6310 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6311 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
6312 step((generator = generator.apply(thisArg, _arguments || [])).next());
6313 });
6314};
6315var __generator = (this && this.__generator) || function (thisArg, body) {
6316 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
6317 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
6318 function verb(n) { return function (v) { return step([n, v]); }; }
6319 function step(op) {
6320 if (f) throw new TypeError("Generator is already executing.");
6321 while (_) try {
6322 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
6323 if (y = 0, t) op = [op[0] & 2, t.value];
6324 switch (op[0]) {
6325 case 0: case 1: t = op; break;
6326 case 4: _.label++; return { value: op[1], done: false };
6327 case 5: _.label++; y = op[1]; op = [0]; continue;
6328 case 7: op = _.ops.pop(); _.trys.pop(); continue;
6329 default:
6330 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
6331 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
6332 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
6333 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
6334 if (t[2]) _.ops.pop();
6335 _.trys.pop(); continue;
6336 }
6337 op = body.call(thisArg, _);
6338 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
6339 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
6340 }
6341};
6342var __spreadArrays = (this && this.__spreadArrays) || function () {
6343 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
6344 for (var r = Array(s), k = 0, i = 0; i < il; i++)
6345 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
6346 r[k] = a[j];
6347 return r;
6348};
6349var __importDefault = (this && this.__importDefault) || function (mod) {
6350 return (mod && mod.__esModule) ? mod : { "default": mod };
6351};
6352Object.defineProperty(exports, "__esModule", { value: true });
6353var child_process_1 = __webpack_require__(37);
6354var findup_1 = __importDefault(__webpack_require__(41));
6355var fs_1 = __importDefault(__webpack_require__(36));
6356var path_1 = __importDefault(__webpack_require__(15));
6357var vscode_languageserver_1 = __webpack_require__(4);
6358var vimparser_1 = __webpack_require__(46);
6359var patterns_1 = __webpack_require__(48);
6360function isSomeMatchPattern(patterns, line) {
6361 return patterns.some(function (p) { return p.test(line); });
6362}
6363exports.isSomeMatchPattern = isSomeMatchPattern;
6364function executeFile(input, command, args, option) {
6365 return new Promise(function (resolve, reject) {
6366 var stdout = "";
6367 var stderr = "";
6368 var error;
6369 var isPassAsText = false;
6370 args = (args || []).map(function (arg) {
6371 if (/%text/.test(arg)) {
6372 isPassAsText = true;
6373 return arg.replace(/%text/g, input.toString());
6374 }
6375 return arg;
6376 });
6377 var cp = child_process_1.spawn(command, args, option);
6378 cp.stdout.on("data", function (data) {
6379 stdout += data;
6380 });
6381 cp.stderr.on("data", function (data) {
6382 stderr += data;
6383 });
6384 cp.on("error", function (err) {
6385 error = err;
6386 reject(error);
6387 });
6388 cp.on("close", function (code) {
6389 if (!error) {
6390 resolve({ code: code, stdout: stdout, stderr: stderr });
6391 }
6392 });
6393 // error will occur when cp get error
6394 if (!isPassAsText) {
6395 input.pipe(cp.stdin).on("error", function () { return; });
6396 }
6397 });
6398}
6399exports.executeFile = executeFile;
6400// cover cb type async function to promise
6401function pcb(cb) {
6402 return function () {
6403 var args = [];
6404 for (var _i = 0; _i < arguments.length; _i++) {
6405 args[_i] = arguments[_i];
6406 }
6407 return new Promise(function (resolve) {
6408 cb.apply(void 0, __spreadArrays(args, [function () {
6409 var params = [];
6410 for (var _i = 0; _i < arguments.length; _i++) {
6411 params[_i] = arguments[_i];
6412 }
6413 resolve(params);
6414 }]));
6415 });
6416 };
6417}
6418exports.pcb = pcb;
6419// find work dirname by root patterns
6420function findProjectRoot(filePath, rootPatterns) {
6421 return __awaiter(this, void 0, void 0, function () {
6422 var dirname, patterns, dirCandidate, _i, patterns_2, pattern, _a, err, dir;
6423 return __generator(this, function (_b) {
6424 switch (_b.label) {
6425 case 0:
6426 dirname = path_1.default.dirname(filePath);
6427 patterns = [].concat(rootPatterns);
6428 dirCandidate = "";
6429 _i = 0, patterns_2 = patterns;
6430 _b.label = 1;
6431 case 1:
6432 if (!(_i < patterns_2.length)) return [3 /*break*/, 4];
6433 pattern = patterns_2[_i];
6434 return [4 /*yield*/, pcb(findup_1.default)(dirname, pattern)];
6435 case 2:
6436 _a = _b.sent(), err = _a[0], dir = _a[1];
6437 if (!err && dir && dir !== "/" && dir.length > dirCandidate.length) {
6438 dirCandidate = dir;
6439 }
6440 _b.label = 3;
6441 case 3:
6442 _i++;
6443 return [3 /*break*/, 1];
6444 case 4:
6445 if (dirCandidate.length) {
6446 return [2 /*return*/, dirCandidate];
6447 }
6448 return [2 /*return*/, dirname];
6449 }
6450 });
6451 });
6452}
6453exports.findProjectRoot = findProjectRoot;
6454function markupSnippets(snippets) {
6455 return [
6456 "```vim",
6457 snippets.replace(/\$\{[0-9]+(:([^}]+))?\}/g, "$2"),
6458 "```",
6459 ].join("\n");
6460}
6461exports.markupSnippets = markupSnippets;
6462function getWordFromPosition(doc, position) {
6463 if (!doc) {
6464 return;
6465 }
6466 var character = doc.getText(vscode_languageserver_1.Range.create(vscode_languageserver_1.Position.create(position.line, position.character), vscode_languageserver_1.Position.create(position.line, position.character + 1)));
6467 // not keyword position
6468 if (!character || !patterns_1.keywordPattern.test(character)) {
6469 return;
6470 }
6471 var currentLine = doc.getText(vscode_languageserver_1.Range.create(vscode_languageserver_1.Position.create(position.line, 0), vscode_languageserver_1.Position.create(position.line + 1, 0)));
6472 // comment line
6473 if (patterns_1.commentPattern.test(currentLine)) {
6474 return;
6475 }
6476 var preSegment = currentLine.slice(0, position.character);
6477 var nextSegment = currentLine.slice(position.character);
6478 var wordLeft = preSegment.match(patterns_1.wordPrePattern);
6479 var wordRight = nextSegment.match(patterns_1.wordNextPattern);
6480 var word = "" + (wordLeft && wordLeft[1] || "") + (wordRight && wordRight[1] || "");
6481 return {
6482 word: word,
6483 left: wordLeft && wordLeft[1] || "",
6484 right: wordRight && wordRight[1] || "",
6485 wordLeft: wordLeft && wordLeft[1]
6486 ? preSegment.replace(new RegExp(wordLeft[1] + "$"), word)
6487 : "" + preSegment + word,
6488 wordRight: wordRight && wordRight[1]
6489 ? nextSegment.replace(new RegExp("^" + wordRight[1]), word)
6490 : "" + word + nextSegment,
6491 };
6492}
6493exports.getWordFromPosition = getWordFromPosition;
6494// parse vim buffer
6495function handleParse(textDoc) {
6496 return __awaiter(this, void 0, void 0, function () {
6497 var text, tokens, node;
6498 return __generator(this, function (_a) {
6499 text = textDoc instanceof Object ? textDoc.getText() : textDoc;
6500 tokens = new vimparser_1.StringReader(text.split(/\r\n|\r|\n/));
6501 try {
6502 node = new vimparser_1.VimLParser(true).parse(tokens);
6503 return [2 /*return*/, [node, ""]];
6504 }
6505 catch (error) {
6506 return [2 /*return*/, [null, error]];
6507 }
6508 return [2 /*return*/];
6509 });
6510 });
6511}
6512exports.handleParse = handleParse;
6513// remove snippets of completionItem
6514function removeSnippets(completionItems) {
6515 if (completionItems === void 0) { completionItems = []; }
6516 return completionItems.map(function (item) {
6517 if (item.insertTextFormat === vscode_languageserver_1.InsertTextFormat.Snippet) {
6518 return __assign(__assign({}, item), { insertText: item.label, insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText });
6519 }
6520 return item;
6521 });
6522}
6523exports.removeSnippets = removeSnippets;
6524exports.isSymbolLink = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
6525 return __generator(this, function (_a) {
6526 return [2 /*return*/, new Promise(function (resolve) {
6527 fs_1.default.lstat(filePath, function (err, stats) {
6528 resolve({
6529 err: err,
6530 stats: stats && stats.isSymbolicLink(),
6531 });
6532 });
6533 })];
6534 });
6535}); };
6536exports.getRealPath = function (filePath) { return __awaiter(void 0, void 0, void 0, function () {
6537 var _a, err, stats;
6538 return __generator(this, function (_b) {
6539 switch (_b.label) {
6540 case 0: return [4 /*yield*/, exports.isSymbolLink(filePath)];
6541 case 1:
6542 _a = _b.sent(), err = _a.err, stats = _a.stats;
6543 if (!err && stats) {
6544 return [2 /*return*/, new Promise(function (resolve) {
6545 fs_1.default.realpath(filePath, function (error, realPath) {
6546 if (error) {
6547 return resolve(filePath);
6548 }
6549 resolve(realPath);
6550 });
6551 })];
6552 }
6553 return [2 /*return*/, filePath];
6554 }
6555 });
6556}); };
6557
6558
6559/***/ }),
6560/* 41 */
6561/***/ (function(module, exports, __webpack_require__) {
6562
6563var fs = __webpack_require__(36),
6564 Path = __webpack_require__(15),
6565 util = __webpack_require__(42),
6566 colors = __webpack_require__(43),
6567 EE = __webpack_require__(45).EventEmitter,
6568 fsExists = fs.exists ? fs.exists : Path.exists,
6569 fsExistsSync = fs.existsSync ? fs.existsSync : Path.existsSync;
6570
6571module.exports = function(dir, iterator, options, callback){
6572 return FindUp(dir, iterator, options, callback);
6573};
6574
6575function FindUp(dir, iterator, options, callback){
6576 if (!(this instanceof FindUp)) {
6577 return new FindUp(dir, iterator, options, callback);
6578 }
6579 if(typeof options === 'function'){
6580 callback = options;
6581 options = {};
6582 }
6583 options = options || {};
6584
6585 EE.call(this);
6586 this.found = false;
6587 this.stopPlease = false;
6588 var self = this;
6589
6590 if(typeof iterator === 'string'){
6591 var file = iterator;
6592 iterator = function(dir, cb){
6593 return fsExists(Path.join(dir, file), cb);
6594 };
6595 }
6596
6597 if(callback) {
6598 this.on('found', function(dir){
6599 if(options.verbose) console.log(('found '+ dir ).green);
6600 callback(null, dir);
6601 self.stop();
6602 });
6603
6604 this.on('end', function(){
6605 if(options.verbose) console.log('end'.grey);
6606 if(!self.found) callback(new Error('not found'));
6607 });
6608
6609 this.on('error', function(err){
6610 if(options.verbose) console.log('error'.red, err);
6611 callback(err);
6612 });
6613 }
6614
6615 this._find(dir, iterator, options, callback);
6616}
6617util.inherits(FindUp, EE);
6618
6619FindUp.prototype._find = function(dir, iterator, options, callback){
6620 var self = this;
6621
6622 iterator(dir, function(exists){
6623 if(options.verbose) console.log(('traverse '+ dir).grey);
6624 if(exists) {
6625 self.found = true;
6626 self.emit('found', dir);
6627 }
6628
6629 var parentDir = Path.join(dir, '..');
6630 if (self.stopPlease) return self.emit('end');
6631 if (dir === parentDir) return self.emit('end');
6632 if(dir.indexOf('../../') !== -1 ) return self.emit('error', new Error(dir + ' is not correct.'));
6633 self._find(parentDir, iterator, options, callback);
6634 });
6635};
6636
6637FindUp.prototype.stop = function(){
6638 this.stopPlease = true;
6639};
6640
6641module.exports.FindUp = FindUp;
6642
6643module.exports.sync = function(dir, iteratorSync){
6644 if(typeof iteratorSync === 'string'){
6645 var file = iteratorSync;
6646 iteratorSync = function(dir){
6647 return fsExistsSync(Path.join(dir, file));
6648 };
6649 }
6650 var initialDir = dir;
6651 while(dir !== Path.join(dir, '..')){
6652 if(dir.indexOf('../../') !== -1 ) throw new Error(initialDir + ' is not correct.');
6653 if(iteratorSync(dir)) return dir;
6654 dir = Path.join(dir, '..');
6655 }
6656 throw new Error('not found');
6657};
6658
6659
6660/***/ }),
6661/* 42 */
6662/***/ (function(module, exports) {
6663
6664module.exports = require("util");
6665
6666/***/ }),
6667/* 43 */
6668/***/ (function(module, exports, __webpack_require__) {
6669
6670/*
6671colors.js
6672
6673Copyright (c) 2010
6674
6675Marak Squires
6676Alexis Sellier (cloudhead)
6677
6678Permission is hereby granted, free of charge, to any person obtaining a copy
6679of this software and associated documentation files (the "Software"), to deal
6680in the Software without restriction, including without limitation the rights
6681to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6682copies of the Software, and to permit persons to whom the Software is
6683furnished to do so, subject to the following conditions:
6684
6685The above copyright notice and this permission notice shall be included in
6686all copies or substantial portions of the Software.
6687
6688THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
6689IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
6690FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6691AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
6692LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
6693OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
6694THE SOFTWARE.
6695
6696*/
6697
6698var isHeadless = false;
6699
6700if (typeof module !== 'undefined') {
6701 isHeadless = true;
6702}
6703
6704if (!isHeadless) {
6705 var exports = {};
6706 var module = {};
6707 var colors = exports;
6708 exports.mode = "browser";
6709} else {
6710 exports.mode = "console";
6711}
6712
6713//
6714// Prototypes the string object to have additional method calls that add terminal colors
6715//
6716var addProperty = function (color, func) {
6717 exports[color] = function (str) {
6718 return func.apply(str);
6719 };
6720 String.prototype.__defineGetter__(color, func);
6721};
6722
6723function stylize(str, style) {
6724
6725 var styles;
6726
6727 if (exports.mode === 'console') {
6728 styles = {
6729 //styles
6730 'bold' : ['\x1B[1m', '\x1B[22m'],
6731 'italic' : ['\x1B[3m', '\x1B[23m'],
6732 'underline' : ['\x1B[4m', '\x1B[24m'],
6733 'inverse' : ['\x1B[7m', '\x1B[27m'],
6734 'strikethrough' : ['\x1B[9m', '\x1B[29m'],
6735 //text colors
6736 //grayscale
6737 'white' : ['\x1B[37m', '\x1B[39m'],
6738 'grey' : ['\x1B[90m', '\x1B[39m'],
6739 'black' : ['\x1B[30m', '\x1B[39m'],
6740 //colors
6741 'blue' : ['\x1B[34m', '\x1B[39m'],
6742 'cyan' : ['\x1B[36m', '\x1B[39m'],
6743 'green' : ['\x1B[32m', '\x1B[39m'],
6744 'magenta' : ['\x1B[35m', '\x1B[39m'],
6745 'red' : ['\x1B[31m', '\x1B[39m'],
6746 'yellow' : ['\x1B[33m', '\x1B[39m'],
6747 //background colors
6748 //grayscale
6749 'whiteBG' : ['\x1B[47m', '\x1B[49m'],
6750 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'],
6751 'blackBG' : ['\x1B[40m', '\x1B[49m'],
6752 //colors
6753 'blueBG' : ['\x1B[44m', '\x1B[49m'],
6754 'cyanBG' : ['\x1B[46m', '\x1B[49m'],
6755 'greenBG' : ['\x1B[42m', '\x1B[49m'],
6756 'magentaBG' : ['\x1B[45m', '\x1B[49m'],
6757 'redBG' : ['\x1B[41m', '\x1B[49m'],
6758 'yellowBG' : ['\x1B[43m', '\x1B[49m']
6759 };
6760 } else if (exports.mode === 'browser') {
6761 styles = {
6762 //styles
6763 'bold' : ['<b>', '</b>'],
6764 'italic' : ['<i>', '</i>'],
6765 'underline' : ['<u>', '</u>'],
6766 'inverse' : ['<span style="background-color:black;color:white;">', '</span>'],
6767 'strikethrough' : ['<del>', '</del>'],
6768 //text colors
6769 //grayscale
6770 'white' : ['<span style="color:white;">', '</span>'],
6771 'grey' : ['<span style="color:gray;">', '</span>'],
6772 'black' : ['<span style="color:black;">', '</span>'],
6773 //colors
6774 'blue' : ['<span style="color:blue;">', '</span>'],
6775 'cyan' : ['<span style="color:cyan;">', '</span>'],
6776 'green' : ['<span style="color:green;">', '</span>'],
6777 'magenta' : ['<span style="color:magenta;">', '</span>'],
6778 'red' : ['<span style="color:red;">', '</span>'],
6779 'yellow' : ['<span style="color:yellow;">', '</span>'],
6780 //background colors
6781 //grayscale
6782 'whiteBG' : ['<span style="background-color:white;">', '</span>'],
6783 'greyBG' : ['<span style="background-color:gray;">', '</span>'],
6784 'blackBG' : ['<span style="background-color:black;">', '</span>'],
6785 //colors
6786 'blueBG' : ['<span style="background-color:blue;">', '</span>'],
6787 'cyanBG' : ['<span style="background-color:cyan;">', '</span>'],
6788 'greenBG' : ['<span style="background-color:green;">', '</span>'],
6789 'magentaBG' : ['<span style="background-color:magenta;">', '</span>'],
6790 'redBG' : ['<span style="background-color:red;">', '</span>'],
6791 'yellowBG' : ['<span style="background-color:yellow;">', '</span>']
6792 };
6793 } else if (exports.mode === 'none') {
6794 return str + '';
6795 } else {
6796 console.log('unsupported mode, try "browser", "console" or "none"');
6797 }
6798 return styles[style][0] + str + styles[style][1];
6799}
6800
6801function applyTheme(theme) {
6802
6803 //
6804 // Remark: This is a list of methods that exist
6805 // on String that you should not overwrite.
6806 //
6807 var stringPrototypeBlacklist = [
6808 '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor',
6809 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt',
6810 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring',
6811 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight'
6812 ];
6813
6814 Object.keys(theme).forEach(function (prop) {
6815 if (stringPrototypeBlacklist.indexOf(prop) !== -1) {
6816 console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name');
6817 }
6818 else {
6819 if (typeof(theme[prop]) === 'string') {
6820 addProperty(prop, function () {
6821 return exports[theme[prop]](this);
6822 });
6823 }
6824 else {
6825 addProperty(prop, function () {
6826 var ret = this;
6827 for (var t = 0; t < theme[prop].length; t++) {
6828 ret = exports[theme[prop][t]](ret);
6829 }
6830 return ret;
6831 });
6832 }
6833 }
6834 });
6835}
6836
6837
6838//
6839// Iterate through all default styles and colors
6840//
6841var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG'];
6842x.forEach(function (style) {
6843
6844 // __defineGetter__ at the least works in more browsers
6845 // http://robertnyman.com/javascript/javascript-getters-setters.html
6846 // Object.defineProperty only works in Chrome
6847 addProperty(style, function () {
6848 return stylize(this, style);
6849 });
6850});
6851
6852function sequencer(map) {
6853 return function () {
6854 if (!isHeadless) {
6855 return this.replace(/( )/, '$1');
6856 }
6857 var exploded = this.split(""), i = 0;
6858 exploded = exploded.map(map);
6859 return exploded.join("");
6860 };
6861}
6862
6863var rainbowMap = (function () {
6864 var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV
6865 return function (letter, i, exploded) {
6866 if (letter === " ") {
6867 return letter;
6868 } else {
6869 return stylize(letter, rainbowColors[i++ % rainbowColors.length]);
6870 }
6871 };
6872})();
6873
6874exports.themes = {};
6875
6876exports.addSequencer = function (name, map) {
6877 addProperty(name, sequencer(map));
6878};
6879
6880exports.addSequencer('rainbow', rainbowMap);
6881exports.addSequencer('zebra', function (letter, i, exploded) {
6882 return i % 2 === 0 ? letter : letter.inverse;
6883});
6884
6885exports.setTheme = function (theme) {
6886 if (typeof theme === 'string') {
6887 try {
6888 exports.themes[theme] = __webpack_require__(44)(theme);
6889 applyTheme(exports.themes[theme]);
6890 return exports.themes[theme];
6891 } catch (err) {
6892 console.log(err);
6893 return err;
6894 }
6895 } else {
6896 applyTheme(theme);
6897 }
6898};
6899
6900
6901addProperty('stripColors', function () {
6902 return ("" + this).replace(/\x1B\[\d+m/g, '');
6903});
6904
6905// please no
6906function zalgo(text, options) {
6907 var soul = {
6908 "up" : [
6909 '̍', '̎', '̄', '̅',
6910 '̿', '̑', '̆', '̐',
6911 '͒', '͗', '͑', '̇',
6912 '̈', '̊', '͂', '̓',
6913 '̈', '͊', '͋', '͌',
6914 '̃', '̂', '̌', '͐',
6915 '̀', '́', '̋', '̏',
6916 '̒', '̓', '̔', '̽',
6917 '̉', 'ͣ', 'ͤ', 'ͥ',
6918 'ͦ', 'ͧ', 'ͨ', 'ͩ',
6919 'ͪ', 'ͫ', 'ͬ', 'ͭ',
6920 'ͮ', 'ͯ', '̾', '͛',
6921 '͆', '̚'
6922 ],
6923 "down" : [
6924 '̖', '̗', '̘', '̙',
6925 '̜', '̝', '̞', '̟',
6926 '̠', '̤', '̥', '̦',
6927 '̩', '̪', '̫', '̬',
6928 '̭', '̮', '̯', '̰',
6929 '̱', '̲', '̳', '̹',
6930 '̺', '̻', '̼', 'ͅ',
6931 '͇', '͈', '͉', '͍',
6932 '͎', '͓', '͔', '͕',
6933 '͖', '͙', '͚', '̣'
6934 ],
6935 "mid" : [
6936 '̕', '̛', '̀', '́',
6937 '͘', '̡', '̢', '̧',
6938 '̨', '̴', '̵', '̶',
6939 '͜', '͝', '͞',
6940 '͟', '͠', '͢', '̸',
6941 '̷', '͡', ' ҉'
6942 ]
6943 },
6944 all = [].concat(soul.up, soul.down, soul.mid),
6945 zalgo = {};
6946
6947 function randomNumber(range) {
6948 var r = Math.floor(Math.random() * range);
6949 return r;
6950 }
6951
6952 function is_char(character) {
6953 var bool = false;
6954 all.filter(function (i) {
6955 bool = (i === character);
6956 });
6957 return bool;
6958 }
6959
6960 function heComes(text, options) {
6961 var result = '', counts, l;
6962 options = options || {};
6963 options["up"] = options["up"] || true;
6964 options["mid"] = options["mid"] || true;
6965 options["down"] = options["down"] || true;
6966 options["size"] = options["size"] || "maxi";
6967 text = text.split('');
6968 for (l in text) {
6969 if (is_char(l)) {
6970 continue;
6971 }
6972 result = result + text[l];
6973 counts = {"up" : 0, "down" : 0, "mid" : 0};
6974 switch (options.size) {
6975 case 'mini':
6976 counts.up = randomNumber(8);
6977 counts.min = randomNumber(2);
6978 counts.down = randomNumber(8);
6979 break;
6980 case 'maxi':
6981 counts.up = randomNumber(16) + 3;
6982 counts.min = randomNumber(4) + 1;
6983 counts.down = randomNumber(64) + 3;
6984 break;
6985 default:
6986 counts.up = randomNumber(8) + 1;
6987 counts.mid = randomNumber(6) / 2;
6988 counts.down = randomNumber(8) + 1;
6989 break;
6990 }
6991
6992 var arr = ["up", "mid", "down"];
6993 for (var d in arr) {
6994 var index = arr[d];
6995 for (var i = 0 ; i <= counts[index]; i++) {
6996 if (options[index]) {
6997 result = result + soul[index][randomNumber(soul[index].length)];
6998 }
6999 }
7000 }
7001 }
7002 return result;
7003 }
7004 return heComes(text);
7005}
7006
7007
7008// don't summon zalgo
7009addProperty('zalgo', function () {
7010 return zalgo(this);
7011});
7012
7013
7014/***/ }),
7015/* 44 */
7016/***/ (function(module, exports) {
7017
7018function webpackEmptyContext(req) {
7019 var e = new Error("Cannot find module '" + req + "'");
7020 e.code = 'MODULE_NOT_FOUND';
7021 throw e;
7022}
7023webpackEmptyContext.keys = function() { return []; };
7024webpackEmptyContext.resolve = webpackEmptyContext;
7025module.exports = webpackEmptyContext;
7026webpackEmptyContext.id = 44;
7027
7028/***/ }),
7029/* 45 */
7030/***/ (function(module, exports) {
7031
7032module.exports = require("events");
7033
7034/***/ }),
7035/* 46 */
7036/***/ (function(module, exports, __webpack_require__) {
7037
7038/* WEBPACK VAR INJECTION */(function(module) {//!/usr/bin/env nodejs
7039// usage: nodejs vimlparser.js [--neovim] foo.vim
7040
7041var fs = __webpack_require__(36);
7042var util = __webpack_require__(42);
7043
7044function main() {
7045 var neovim = false;
7046 var fpath = ''
7047 var args = process.argv;
7048 if (args.length == 4) {
7049 if (args[2] == '--neovim') {
7050 neovim = true;
7051 }
7052 fpath = args[3];
7053 } else if (args.length == 3) {
7054 neovim = false;
7055 fpath = args[2]
7056 }
7057 var r = new StringReader(viml_readfile(fpath));
7058 var p = new VimLParser(neovim);
7059 var c = new Compiler();
7060 try {
7061 var lines = c.compile(p.parse(r));
7062 for (var i in lines) {
7063 process.stdout.write(lines[i] + "\n");
7064 }
7065 } catch (e) {
7066 process.stdout.write(e + '\n');
7067 }
7068}
7069
7070var pat_vim2js = {
7071 "[0-9a-zA-Z]" : "[0-9a-zA-Z]",
7072 "[@*!=><&~#]" : "[@*!=><&~#]",
7073 "\\<ARGOPT\\>" : "\\bARGOPT\\b",
7074 "\\<BANG\\>" : "\\bBANG\\b",
7075 "\\<EDITCMD\\>" : "\\bEDITCMD\\b",
7076 "\\<NOTRLCOM\\>" : "\\bNOTRLCOM\\b",
7077 "\\<TRLBAR\\>" : "\\bTRLBAR\\b",
7078 "\\<USECTRLV\\>" : "\\bUSECTRLV\\b",
7079 "\\<USERCMD\\>" : "\\bUSERCMD\\b",
7080 "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>" : "\\b(XFILE|FILES|FILE1)\\b",
7081 "\\S" : "\\S",
7082 "\\a" : "[A-Za-z]",
7083 "\\d" : "\\d",
7084 "\\h" : "[A-Za-z_]",
7085 "\\s" : "\\s",
7086 "\\v^d%[elete][lp]$" : "^d(elete|elet|ele|el|e)[lp]$",
7087 "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])" : "^s(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])",
7088 "\\w" : "[0-9A-Za-z_]",
7089 "\\w\\|[:#]" : "[0-9A-Za-z_]|[:#]",
7090 "\\x" : "[0-9A-Fa-f]",
7091 "^++" : "^\+\+",
7092 "^++bad=\\(keep\\|drop\\|.\\)\\>" : "^\\+\\+bad=(keep|drop|.)\\b",
7093 "^++bad=drop" : "^\\+\\+bad=drop",
7094 "^++bad=keep" : "^\\+\\+bad=keep",
7095 "^++bin\\>" : "^\\+\\+bin\\b",
7096 "^++edit\\>" : "^\\+\\+edit\\b",
7097 "^++enc=\\S" : "^\\+\\+enc=\\S",
7098 "^++encoding=\\S" : "^\\+\\+encoding=\\S",
7099 "^++ff=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+ff=(dos|unix|mac)\\b",
7100 "^++fileformat=\\(dos\\|unix\\|mac\\)\\>" : "^\\+\\+fileformat=(dos|unix|mac)\\b",
7101 "^++nobin\\>" : "^\\+\\+nobin\\b",
7102 "^[A-Z]" : "^[A-Z]",
7103 "^\\$\\w\\+" : "^\\$[0-9A-Za-z_]+",
7104 "^\\(!\\|global\\|vglobal\\)$" : "^(!|global|vglobal)$",
7105 "^\\(WHILE\\|FOR\\)$" : "^(WHILE|FOR)$",
7106 "^\\(vimgrep\\|vimgrepadd\\|lvimgrep\\|lvimgrepadd\\)$" : "^(vimgrep|vimgrepadd|lvimgrep|lvimgrepadd)$",
7107 "^\\d" : "^\\d",
7108 "^\\h" : "^[A-Za-z_]",
7109 "^\\s" : "^\\s",
7110 "^\\s*\\\\" : "^\\s*\\\\",
7111 "^[ \\t]$" : "^[ \\t]$",
7112 "^[A-Za-z]$" : "^[A-Za-z]$",
7113 "^[0-9A-Za-z]$" : "^[0-9A-Za-z]$",
7114 "^[0-9]$" : "^[0-9]$",
7115 "^[0-9A-Fa-f]$" : "^[0-9A-Fa-f]$",
7116 "^[0-9A-Za-z_]$" : "^[0-9A-Za-z_]$",
7117 "^[A-Za-z_]$" : "^[A-Za-z_]$",
7118 "^[0-9A-Za-z_:#]$" : "^[0-9A-Za-z_:#]$",
7119 "^[A-Za-z_][0-9A-Za-z_]*$" : "^[A-Za-z_][0-9A-Za-z_]*$",
7120 "^[A-Z]$" : "^[A-Z]$",
7121 "^[a-z]$" : "^[a-z]$",
7122 "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$" : "^[vgslabwt]:$|^([vgslabwt]:)?[A-Za-z_][0-9A-Za-z_#]*$",
7123 "^[0-7]$" : "^[0-7]$",
7124 "^[0-9A-Fa-f][0-9A-Fa-f]$" : "^[0-9A-Fa-f][0-9A-Fa-f]$",
7125 "^\\.[0-9A-Fa-f]$" : "^\\.[0-9A-Fa-f]$",
7126 "^[0-9A-Fa-f][^0-9A-Fa-f]$" : "^[0-9A-Fa-f][^0-9A-Fa-f]$",
7127}
7128
7129function viml_add(lst, item) {
7130 lst.push(item);
7131}
7132
7133function viml_call(func, args) {
7134 return func.apply(null, args);
7135}
7136
7137function viml_char2nr(c) {
7138 return c.charCodeAt(0);
7139}
7140
7141function viml_empty(obj) {
7142 return obj.length == 0;
7143}
7144
7145function viml_equalci(a, b) {
7146 return a.toLowerCase() == b.toLowerCase();
7147}
7148
7149function viml_eqreg(s, reg) {
7150 var mx = new RegExp(pat_vim2js[reg]);
7151 return mx.exec(s) != null;
7152}
7153
7154function viml_eqregh(s, reg) {
7155 var mx = new RegExp(pat_vim2js[reg]);
7156 return mx.exec(s) != null;
7157}
7158
7159function viml_eqregq(s, reg) {
7160 var mx = new RegExp(pat_vim2js[reg], "i");
7161 return mx.exec(s) != null;
7162}
7163
7164function viml_escape(s, chars) {
7165 var r = '';
7166 for (var i = 0; i < s.length; ++i) {
7167 if (chars.indexOf(s.charAt(i)) != -1) {
7168 r = r + "\\" + s.charAt(i);
7169 } else {
7170 r = r + s.charAt(i);
7171 }
7172 }
7173 return r;
7174}
7175
7176function viml_extend(obj, item) {
7177 obj.push.apply(obj, item);
7178}
7179
7180function viml_insert(lst, item) {
7181 var idx = arguments.length >= 3 ? arguments[2] : 0;
7182 lst.splice(0, 0, item);
7183}
7184
7185function viml_join(lst, sep) {
7186 return lst.join(sep);
7187}
7188
7189function viml_keys(obj) {
7190 return Object.keys(obj);
7191}
7192
7193function viml_len(obj) {
7194 if (typeof obj === 'string') {
7195 var len = 0;
7196 for (var i = 0; i < obj.length; i++) {
7197 var c = obj.charCodeAt(i);
7198 len += c < 128 ? 1 : ((c > 127) && (c < 2048)) ? 2 : 3;
7199 }
7200 return len;
7201 }
7202 return obj.length;
7203}
7204
7205function viml_printf() {
7206 var a000 = Array.prototype.slice.call(arguments, 0);
7207 if (a000.length == 1) {
7208 return a000[0];
7209 } else {
7210 return util.format.apply(null, a000);
7211 }
7212}
7213
7214function viml_range(start) {
7215 var end = arguments.length >= 2 ? arguments[1] : null;
7216 if (end == null) {
7217 var x = [];
7218 for (var i = 0; i < start; ++i) {
7219 x.push(i);
7220 }
7221 return x;
7222 } else {
7223 var x = []
7224 for (var i = start; i <= end; ++i) {
7225 x.push(i);
7226 }
7227 return x;
7228 }
7229}
7230
7231function viml_readfile(path) {
7232 // FIXME: newline?
7233 return fs.readFileSync(path, 'utf-8').split(/\r\n|\r|\n/);
7234}
7235
7236function viml_remove(lst, idx) {
7237 lst.splice(idx, 1);
7238}
7239
7240function viml_split(s, sep) {
7241 if (sep == "\\zs") {
7242 return s.split("");
7243 }
7244 throw "NotImplemented";
7245}
7246
7247function viml_str2nr(s) {
7248 var base = arguments.length >= 2 ? arguments[1] : 10;
7249 return parseInt(s, base);
7250}
7251
7252function viml_string(obj) {
7253 return obj.toString();
7254}
7255
7256function viml_has_key(obj, key) {
7257 return obj[key] !== undefined;
7258}
7259
7260function viml_stridx(a, b) {
7261 return a.indexOf(b);
7262}
7263
7264var NIL = [];
7265var TRUE = 1;
7266var FALSE = 0;
7267var NODE_TOPLEVEL = 1;
7268var NODE_COMMENT = 2;
7269var NODE_EXCMD = 3;
7270var NODE_FUNCTION = 4;
7271var NODE_ENDFUNCTION = 5;
7272var NODE_DELFUNCTION = 6;
7273var NODE_RETURN = 7;
7274var NODE_EXCALL = 8;
7275var NODE_LET = 9;
7276var NODE_UNLET = 10;
7277var NODE_LOCKVAR = 11;
7278var NODE_UNLOCKVAR = 12;
7279var NODE_IF = 13;
7280var NODE_ELSEIF = 14;
7281var NODE_ELSE = 15;
7282var NODE_ENDIF = 16;
7283var NODE_WHILE = 17;
7284var NODE_ENDWHILE = 18;
7285var NODE_FOR = 19;
7286var NODE_ENDFOR = 20;
7287var NODE_CONTINUE = 21;
7288var NODE_BREAK = 22;
7289var NODE_TRY = 23;
7290var NODE_CATCH = 24;
7291var NODE_FINALLY = 25;
7292var NODE_ENDTRY = 26;
7293var NODE_THROW = 27;
7294var NODE_ECHO = 28;
7295var NODE_ECHON = 29;
7296var NODE_ECHOHL = 30;
7297var NODE_ECHOMSG = 31;
7298var NODE_ECHOERR = 32;
7299var NODE_EXECUTE = 33;
7300var NODE_TERNARY = 34;
7301var NODE_OR = 35;
7302var NODE_AND = 36;
7303var NODE_EQUAL = 37;
7304var NODE_EQUALCI = 38;
7305var NODE_EQUALCS = 39;
7306var NODE_NEQUAL = 40;
7307var NODE_NEQUALCI = 41;
7308var NODE_NEQUALCS = 42;
7309var NODE_GREATER = 43;
7310var NODE_GREATERCI = 44;
7311var NODE_GREATERCS = 45;
7312var NODE_GEQUAL = 46;
7313var NODE_GEQUALCI = 47;
7314var NODE_GEQUALCS = 48;
7315var NODE_SMALLER = 49;
7316var NODE_SMALLERCI = 50;
7317var NODE_SMALLERCS = 51;
7318var NODE_SEQUAL = 52;
7319var NODE_SEQUALCI = 53;
7320var NODE_SEQUALCS = 54;
7321var NODE_MATCH = 55;
7322var NODE_MATCHCI = 56;
7323var NODE_MATCHCS = 57;
7324var NODE_NOMATCH = 58;
7325var NODE_NOMATCHCI = 59;
7326var NODE_NOMATCHCS = 60;
7327var NODE_IS = 61;
7328var NODE_ISCI = 62;
7329var NODE_ISCS = 63;
7330var NODE_ISNOT = 64;
7331var NODE_ISNOTCI = 65;
7332var NODE_ISNOTCS = 66;
7333var NODE_ADD = 67;
7334var NODE_SUBTRACT = 68;
7335var NODE_CONCAT = 69;
7336var NODE_MULTIPLY = 70;
7337var NODE_DIVIDE = 71;
7338var NODE_REMAINDER = 72;
7339var NODE_NOT = 73;
7340var NODE_MINUS = 74;
7341var NODE_PLUS = 75;
7342var NODE_SUBSCRIPT = 76;
7343var NODE_SLICE = 77;
7344var NODE_CALL = 78;
7345var NODE_DOT = 79;
7346var NODE_NUMBER = 80;
7347var NODE_STRING = 81;
7348var NODE_LIST = 82;
7349var NODE_DICT = 83;
7350var NODE_OPTION = 85;
7351var NODE_IDENTIFIER = 86;
7352var NODE_CURLYNAME = 87;
7353var NODE_ENV = 88;
7354var NODE_REG = 89;
7355var NODE_CURLYNAMEPART = 90;
7356var NODE_CURLYNAMEEXPR = 91;
7357var NODE_LAMBDA = 92;
7358var NODE_BLOB = 93;
7359var NODE_CONST = 94;
7360var NODE_EVAL = 95;
7361var NODE_HEREDOC = 96;
7362var NODE_METHOD = 97;
7363var TOKEN_EOF = 1;
7364var TOKEN_EOL = 2;
7365var TOKEN_SPACE = 3;
7366var TOKEN_OROR = 4;
7367var TOKEN_ANDAND = 5;
7368var TOKEN_EQEQ = 6;
7369var TOKEN_EQEQCI = 7;
7370var TOKEN_EQEQCS = 8;
7371var TOKEN_NEQ = 9;
7372var TOKEN_NEQCI = 10;
7373var TOKEN_NEQCS = 11;
7374var TOKEN_GT = 12;
7375var TOKEN_GTCI = 13;
7376var TOKEN_GTCS = 14;
7377var TOKEN_GTEQ = 15;
7378var TOKEN_GTEQCI = 16;
7379var TOKEN_GTEQCS = 17;
7380var TOKEN_LT = 18;
7381var TOKEN_LTCI = 19;
7382var TOKEN_LTCS = 20;
7383var TOKEN_LTEQ = 21;
7384var TOKEN_LTEQCI = 22;
7385var TOKEN_LTEQCS = 23;
7386var TOKEN_MATCH = 24;
7387var TOKEN_MATCHCI = 25;
7388var TOKEN_MATCHCS = 26;
7389var TOKEN_NOMATCH = 27;
7390var TOKEN_NOMATCHCI = 28;
7391var TOKEN_NOMATCHCS = 29;
7392var TOKEN_IS = 30;
7393var TOKEN_ISCI = 31;
7394var TOKEN_ISCS = 32;
7395var TOKEN_ISNOT = 33;
7396var TOKEN_ISNOTCI = 34;
7397var TOKEN_ISNOTCS = 35;
7398var TOKEN_PLUS = 36;
7399var TOKEN_MINUS = 37;
7400var TOKEN_DOT = 38;
7401var TOKEN_STAR = 39;
7402var TOKEN_SLASH = 40;
7403var TOKEN_PERCENT = 41;
7404var TOKEN_NOT = 42;
7405var TOKEN_QUESTION = 43;
7406var TOKEN_COLON = 44;
7407var TOKEN_POPEN = 45;
7408var TOKEN_PCLOSE = 46;
7409var TOKEN_SQOPEN = 47;
7410var TOKEN_SQCLOSE = 48;
7411var TOKEN_COPEN = 49;
7412var TOKEN_CCLOSE = 50;
7413var TOKEN_COMMA = 51;
7414var TOKEN_NUMBER = 52;
7415var TOKEN_SQUOTE = 53;
7416var TOKEN_DQUOTE = 54;
7417var TOKEN_OPTION = 55;
7418var TOKEN_IDENTIFIER = 56;
7419var TOKEN_ENV = 57;
7420var TOKEN_REG = 58;
7421var TOKEN_EQ = 59;
7422var TOKEN_OR = 60;
7423var TOKEN_SEMICOLON = 61;
7424var TOKEN_BACKTICK = 62;
7425var TOKEN_DOTDOTDOT = 63;
7426var TOKEN_SHARP = 64;
7427var TOKEN_ARROW = 65;
7428var TOKEN_BLOB = 66;
7429var TOKEN_LITCOPEN = 67;
7430var TOKEN_DOTDOT = 68;
7431var TOKEN_HEREDOC = 69;
7432var MAX_FUNC_ARGS = 20;
7433function isalpha(c) {
7434 return viml_eqregh(c, "^[A-Za-z]$");
7435}
7436
7437function isalnum(c) {
7438 return viml_eqregh(c, "^[0-9A-Za-z]$");
7439}
7440
7441function isdigit(c) {
7442 return viml_eqregh(c, "^[0-9]$");
7443}
7444
7445function isodigit(c) {
7446 return viml_eqregh(c, "^[0-7]$");
7447}
7448
7449function isxdigit(c) {
7450 return viml_eqregh(c, "^[0-9A-Fa-f]$");
7451}
7452
7453function iswordc(c) {
7454 return viml_eqregh(c, "^[0-9A-Za-z_]$");
7455}
7456
7457function iswordc1(c) {
7458 return viml_eqregh(c, "^[A-Za-z_]$");
7459}
7460
7461function iswhite(c) {
7462 return viml_eqregh(c, "^[ \\t]$");
7463}
7464
7465function isnamec(c) {
7466 return viml_eqregh(c, "^[0-9A-Za-z_:#]$");
7467}
7468
7469function isnamec1(c) {
7470 return viml_eqregh(c, "^[A-Za-z_]$");
7471}
7472
7473function isargname(s) {
7474 return viml_eqregh(s, "^[A-Za-z_][0-9A-Za-z_]*$");
7475}
7476
7477function isvarname(s) {
7478 return viml_eqregh(s, "^[vgslabwt]:$\\|^\\([vgslabwt]:\\)\\?[A-Za-z_][0-9A-Za-z_#]*$");
7479}
7480
7481// FIXME:
7482function isidc(c) {
7483 return viml_eqregh(c, "^[0-9A-Za-z_]$");
7484}
7485
7486function isupper(c) {
7487 return viml_eqregh(c, "^[A-Z]$");
7488}
7489
7490function islower(c) {
7491 return viml_eqregh(c, "^[a-z]$");
7492}
7493
7494function ExArg() {
7495 var ea = {};
7496 ea.forceit = FALSE;
7497 ea.addr_count = 0;
7498 ea.line1 = 0;
7499 ea.line2 = 0;
7500 ea.flags = 0;
7501 ea.do_ecmd_cmd = "";
7502 ea.do_ecmd_lnum = 0;
7503 ea.append = 0;
7504 ea.usefilter = FALSE;
7505 ea.amount = 0;
7506 ea.regname = 0;
7507 ea.force_bin = 0;
7508 ea.read_edit = 0;
7509 ea.force_ff = 0;
7510 ea.force_enc = 0;
7511 ea.bad_char = 0;
7512 ea.linepos = {};
7513 ea.cmdpos = [];
7514 ea.argpos = [];
7515 ea.cmd = {};
7516 ea.modifiers = [];
7517 ea.range = [];
7518 ea.argopt = {};
7519 ea.argcmd = {};
7520 return ea;
7521}
7522
7523// struct node {
7524// int type
7525// pos pos
7526// node left
7527// node right
7528// node cond
7529// node rest
7530// node[] list
7531// node[] rlist
7532// node[] default_args
7533// node[] body
7534// string op
7535// string str
7536// int depth
7537// variant value
7538// }
7539// TOPLEVEL .body
7540// COMMENT .str
7541// EXCMD .ea .str
7542// FUNCTION .ea .body .left .rlist .default_args .attr .endfunction
7543// ENDFUNCTION .ea
7544// DELFUNCTION .ea .left
7545// RETURN .ea .left
7546// EXCALL .ea .left
7547// LET .ea .op .left .list .rest .right
7548// CONST .ea .op .left .list .rest .right
7549// UNLET .ea .list
7550// LOCKVAR .ea .depth .list
7551// UNLOCKVAR .ea .depth .list
7552// IF .ea .body .cond .elseif .else .endif
7553// ELSEIF .ea .body .cond
7554// ELSE .ea .body
7555// ENDIF .ea
7556// WHILE .ea .body .cond .endwhile
7557// ENDWHILE .ea
7558// FOR .ea .body .left .list .rest .right .endfor
7559// ENDFOR .ea
7560// CONTINUE .ea
7561// BREAK .ea
7562// TRY .ea .body .catch .finally .endtry
7563// CATCH .ea .body .pattern
7564// FINALLY .ea .body
7565// ENDTRY .ea
7566// THROW .ea .left
7567// EVAL .ea .left
7568// ECHO .ea .list
7569// ECHON .ea .list
7570// ECHOHL .ea .str
7571// ECHOMSG .ea .list
7572// ECHOERR .ea .list
7573// EXECUTE .ea .list
7574// TERNARY .cond .left .right
7575// OR .left .right
7576// AND .left .right
7577// EQUAL .left .right
7578// EQUALCI .left .right
7579// EQUALCS .left .right
7580// NEQUAL .left .right
7581// NEQUALCI .left .right
7582// NEQUALCS .left .right
7583// GREATER .left .right
7584// GREATERCI .left .right
7585// GREATERCS .left .right
7586// GEQUAL .left .right
7587// GEQUALCI .left .right
7588// GEQUALCS .left .right
7589// SMALLER .left .right
7590// SMALLERCI .left .right
7591// SMALLERCS .left .right
7592// SEQUAL .left .right
7593// SEQUALCI .left .right
7594// SEQUALCS .left .right
7595// MATCH .left .right
7596// MATCHCI .left .right
7597// MATCHCS .left .right
7598// NOMATCH .left .right
7599// NOMATCHCI .left .right
7600// NOMATCHCS .left .right
7601// IS .left .right
7602// ISCI .left .right
7603// ISCS .left .right
7604// ISNOT .left .right
7605// ISNOTCI .left .right
7606// ISNOTCS .left .right
7607// ADD .left .right
7608// SUBTRACT .left .right
7609// CONCAT .left .right
7610// MULTIPLY .left .right
7611// DIVIDE .left .right
7612// REMAINDER .left .right
7613// NOT .left
7614// MINUS .left
7615// PLUS .left
7616// SUBSCRIPT .left .right
7617// SLICE .left .rlist
7618// METHOD .left .right
7619// CALL .left .rlist
7620// DOT .left .right
7621// NUMBER .value
7622// STRING .value
7623// LIST .value
7624// DICT .value
7625// BLOB .value
7626// NESTING .left
7627// OPTION .value
7628// IDENTIFIER .value
7629// CURLYNAME .value
7630// ENV .value
7631// REG .value
7632// CURLYNAMEPART .value
7633// CURLYNAMEEXPR .value
7634// LAMBDA .rlist .left
7635// HEREDOC .rlist .op .body
7636function Node(type) {
7637 return {"type":type};
7638}
7639
7640function Err(msg, pos) {
7641 return viml_printf("vimlparser: %s: line %d col %d", msg, pos.lnum, pos.col);
7642}
7643
7644function VimLParser() { this.__init__.apply(this, arguments); }
7645VimLParser.prototype.__init__ = function() {
7646 var a000 = Array.prototype.slice.call(arguments, 0);
7647 if (viml_len(a000) > 0) {
7648 this.neovim = a000[0];
7649 }
7650 else {
7651 this.neovim = 0;
7652 }
7653 this.find_command_cache = {};
7654}
7655
7656VimLParser.prototype.push_context = function(node) {
7657 viml_insert(this.context, node);
7658}
7659
7660VimLParser.prototype.pop_context = function() {
7661 viml_remove(this.context, 0);
7662}
7663
7664VimLParser.prototype.find_context = function(type) {
7665 var i = 0;
7666 var __c3 = this.context;
7667 for (var __i3 = 0; __i3 < __c3.length; ++__i3) {
7668 var node = __c3[__i3];
7669 if (node.type == type) {
7670 return i;
7671 }
7672 i += 1;
7673 }
7674 return -1;
7675}
7676
7677VimLParser.prototype.add_node = function(node) {
7678 viml_add(this.context[0].body, node);
7679}
7680
7681VimLParser.prototype.check_missing_endfunction = function(ends, pos) {
7682 if (this.context[0].type == NODE_FUNCTION) {
7683 throw Err(viml_printf("E126: Missing :endfunction: %s", ends), pos);
7684 }
7685}
7686
7687VimLParser.prototype.check_missing_endif = function(ends, pos) {
7688 if (this.context[0].type == NODE_IF || this.context[0].type == NODE_ELSEIF || this.context[0].type == NODE_ELSE) {
7689 throw Err(viml_printf("E171: Missing :endif: %s", ends), pos);
7690 }
7691}
7692
7693VimLParser.prototype.check_missing_endtry = function(ends, pos) {
7694 if (this.context[0].type == NODE_TRY || this.context[0].type == NODE_CATCH || this.context[0].type == NODE_FINALLY) {
7695 throw Err(viml_printf("E600: Missing :endtry: %s", ends), pos);
7696 }
7697}
7698
7699VimLParser.prototype.check_missing_endwhile = function(ends, pos) {
7700 if (this.context[0].type == NODE_WHILE) {
7701 throw Err(viml_printf("E170: Missing :endwhile: %s", ends), pos);
7702 }
7703}
7704
7705VimLParser.prototype.check_missing_endfor = function(ends, pos) {
7706 if (this.context[0].type == NODE_FOR) {
7707 throw Err(viml_printf("E170: Missing :endfor: %s", ends), pos);
7708 }
7709}
7710
7711VimLParser.prototype.parse = function(reader) {
7712 this.reader = reader;
7713 this.context = [];
7714 var toplevel = Node(NODE_TOPLEVEL);
7715 toplevel.pos = this.reader.getpos();
7716 toplevel.body = [];
7717 this.push_context(toplevel);
7718 while (this.reader.peek() != "<EOF>") {
7719 this.parse_one_cmd();
7720 }
7721 this.check_missing_endfunction("TOPLEVEL", this.reader.getpos());
7722 this.check_missing_endif("TOPLEVEL", this.reader.getpos());
7723 this.check_missing_endtry("TOPLEVEL", this.reader.getpos());
7724 this.check_missing_endwhile("TOPLEVEL", this.reader.getpos());
7725 this.check_missing_endfor("TOPLEVEL", this.reader.getpos());
7726 this.pop_context();
7727 return toplevel;
7728}
7729
7730VimLParser.prototype.parse_one_cmd = function() {
7731 this.ea = ExArg();
7732 if (this.reader.peekn(2) == "#!") {
7733 this.parse_hashbang();
7734 this.reader.get();
7735 return;
7736 }
7737 this.reader.skip_white_and_colon();
7738 if (this.reader.peekn(1) == "") {
7739 this.reader.get();
7740 return;
7741 }
7742 if (this.reader.peekn(1) == "\"") {
7743 this.parse_comment();
7744 this.reader.get();
7745 return;
7746 }
7747 this.ea.linepos = this.reader.getpos();
7748 this.parse_command_modifiers();
7749 this.parse_range();
7750 this.parse_command();
7751 this.parse_trail();
7752}
7753
7754// FIXME:
7755VimLParser.prototype.parse_command_modifiers = function() {
7756 var modifiers = [];
7757 while (TRUE) {
7758 var pos = this.reader.tell();
7759 var d = "";
7760 if (isdigit(this.reader.peekn(1))) {
7761 var d = this.reader.read_digit();
7762 this.reader.skip_white();
7763 }
7764 var k = this.reader.read_alpha();
7765 var c = this.reader.peekn(1);
7766 this.reader.skip_white();
7767 if (viml_stridx("aboveleft", k) == 0 && viml_len(k) >= 3) {
7768 // abo\%[veleft]
7769 viml_add(modifiers, {"name":"aboveleft"});
7770 }
7771 else if (viml_stridx("belowright", k) == 0 && viml_len(k) >= 3) {
7772 // bel\%[owright]
7773 viml_add(modifiers, {"name":"belowright"});
7774 }
7775 else if (viml_stridx("browse", k) == 0 && viml_len(k) >= 3) {
7776 // bro\%[wse]
7777 viml_add(modifiers, {"name":"browse"});
7778 }
7779 else if (viml_stridx("botright", k) == 0 && viml_len(k) >= 2) {
7780 // bo\%[tright]
7781 viml_add(modifiers, {"name":"botright"});
7782 }
7783 else if (viml_stridx("confirm", k) == 0 && viml_len(k) >= 4) {
7784 // conf\%[irm]
7785 viml_add(modifiers, {"name":"confirm"});
7786 }
7787 else if (viml_stridx("keepmarks", k) == 0 && viml_len(k) >= 3) {
7788 // kee\%[pmarks]
7789 viml_add(modifiers, {"name":"keepmarks"});
7790 }
7791 else if (viml_stridx("keepalt", k) == 0 && viml_len(k) >= 5) {
7792 // keepa\%[lt]
7793 viml_add(modifiers, {"name":"keepalt"});
7794 }
7795 else if (viml_stridx("keepjumps", k) == 0 && viml_len(k) >= 5) {
7796 // keepj\%[umps]
7797 viml_add(modifiers, {"name":"keepjumps"});
7798 }
7799 else if (viml_stridx("keeppatterns", k) == 0 && viml_len(k) >= 5) {
7800 // keepp\%[atterns]
7801 viml_add(modifiers, {"name":"keeppatterns"});
7802 }
7803 else if (viml_stridx("hide", k) == 0 && viml_len(k) >= 3) {
7804 // hid\%[e]
7805 if (this.ends_excmds(c)) {
7806 break;
7807 }
7808 viml_add(modifiers, {"name":"hide"});
7809 }
7810 else if (viml_stridx("lockmarks", k) == 0 && viml_len(k) >= 3) {
7811 // loc\%[kmarks]
7812 viml_add(modifiers, {"name":"lockmarks"});
7813 }
7814 else if (viml_stridx("leftabove", k) == 0 && viml_len(k) >= 5) {
7815 // lefta\%[bove]
7816 viml_add(modifiers, {"name":"leftabove"});
7817 }
7818 else if (viml_stridx("noautocmd", k) == 0 && viml_len(k) >= 3) {
7819 // noa\%[utocmd]
7820 viml_add(modifiers, {"name":"noautocmd"});
7821 }
7822 else if (viml_stridx("noswapfile", k) == 0 && viml_len(k) >= 3) {
7823 // :nos\%[wapfile]
7824 viml_add(modifiers, {"name":"noswapfile"});
7825 }
7826 else if (viml_stridx("rightbelow", k) == 0 && viml_len(k) >= 6) {
7827 // rightb\%[elow]
7828 viml_add(modifiers, {"name":"rightbelow"});
7829 }
7830 else if (viml_stridx("sandbox", k) == 0 && viml_len(k) >= 3) {
7831 // san\%[dbox]
7832 viml_add(modifiers, {"name":"sandbox"});
7833 }
7834 else if (viml_stridx("silent", k) == 0 && viml_len(k) >= 3) {
7835 // sil\%[ent]
7836 if (c == "!") {
7837 this.reader.get();
7838 viml_add(modifiers, {"name":"silent", "bang":1});
7839 }
7840 else {
7841 viml_add(modifiers, {"name":"silent", "bang":0});
7842 }
7843 }
7844 else if (k == "tab") {
7845 // tab
7846 if (d != "") {
7847 viml_add(modifiers, {"name":"tab", "count":viml_str2nr(d, 10)});
7848 }
7849 else {
7850 viml_add(modifiers, {"name":"tab"});
7851 }
7852 }
7853 else if (viml_stridx("topleft", k) == 0 && viml_len(k) >= 2) {
7854 // to\%[pleft]
7855 viml_add(modifiers, {"name":"topleft"});
7856 }
7857 else if (viml_stridx("unsilent", k) == 0 && viml_len(k) >= 3) {
7858 // uns\%[ilent]
7859 viml_add(modifiers, {"name":"unsilent"});
7860 }
7861 else if (viml_stridx("vertical", k) == 0 && viml_len(k) >= 4) {
7862 // vert\%[ical]
7863 viml_add(modifiers, {"name":"vertical"});
7864 }
7865 else if (viml_stridx("verbose", k) == 0 && viml_len(k) >= 4) {
7866 // verb\%[ose]
7867 if (d != "") {
7868 viml_add(modifiers, {"name":"verbose", "count":viml_str2nr(d, 10)});
7869 }
7870 else {
7871 viml_add(modifiers, {"name":"verbose", "count":1});
7872 }
7873 }
7874 else {
7875 this.reader.seek_set(pos);
7876 break;
7877 }
7878 }
7879 this.ea.modifiers = modifiers;
7880}
7881
7882// FIXME:
7883VimLParser.prototype.parse_range = function() {
7884 var tokens = [];
7885 while (TRUE) {
7886 while (TRUE) {
7887 this.reader.skip_white();
7888 var c = this.reader.peekn(1);
7889 if (c == "") {
7890 break;
7891 }
7892 if (c == ".") {
7893 viml_add(tokens, this.reader.getn(1));
7894 }
7895 else if (c == "$") {
7896 viml_add(tokens, this.reader.getn(1));
7897 }
7898 else if (c == "'") {
7899 this.reader.getn(1);
7900 var m = this.reader.getn(1);
7901 if (m == "") {
7902 break;
7903 }
7904 viml_add(tokens, "'" + m);
7905 }
7906 else if (c == "/") {
7907 this.reader.getn(1);
7908 var __tmp = this.parse_pattern(c);
7909 var pattern = __tmp[0];
7910 var _ = __tmp[1];
7911 viml_add(tokens, pattern);
7912 }
7913 else if (c == "?") {
7914 this.reader.getn(1);
7915 var __tmp = this.parse_pattern(c);
7916 var pattern = __tmp[0];
7917 var _ = __tmp[1];
7918 viml_add(tokens, pattern);
7919 }
7920 else if (c == "\\") {
7921 var m = this.reader.p(1);
7922 if (m == "&" || m == "?" || m == "/") {
7923 this.reader.seek_cur(2);
7924 viml_add(tokens, "\\" + m);
7925 }
7926 else {
7927 throw Err("E10: \\\\ should be followed by /, ? or &", this.reader.getpos());
7928 }
7929 }
7930 else if (isdigit(c)) {
7931 viml_add(tokens, this.reader.read_digit());
7932 }
7933 while (TRUE) {
7934 this.reader.skip_white();
7935 if (this.reader.peekn(1) == "") {
7936 break;
7937 }
7938 var n = this.reader.read_integer();
7939 if (n == "") {
7940 break;
7941 }
7942 viml_add(tokens, n);
7943 }
7944 if (this.reader.p(0) != "/" && this.reader.p(0) != "?") {
7945 break;
7946 }
7947 }
7948 if (this.reader.peekn(1) == "%") {
7949 viml_add(tokens, this.reader.getn(1));
7950 }
7951 else if (this.reader.peekn(1) == "*") {
7952 // && &cpoptions !~ '\*'
7953 viml_add(tokens, this.reader.getn(1));
7954 }
7955 if (this.reader.peekn(1) == ";") {
7956 viml_add(tokens, this.reader.getn(1));
7957 continue;
7958 }
7959 else if (this.reader.peekn(1) == ",") {
7960 viml_add(tokens, this.reader.getn(1));
7961 continue;
7962 }
7963 break;
7964 }
7965 this.ea.range = tokens;
7966}
7967
7968// FIXME:
7969VimLParser.prototype.parse_pattern = function(delimiter) {
7970 var pattern = "";
7971 var endc = "";
7972 var inbracket = 0;
7973 while (TRUE) {
7974 var c = this.reader.getn(1);
7975 if (c == "") {
7976 break;
7977 }
7978 if (c == delimiter && inbracket == 0) {
7979 var endc = c;
7980 break;
7981 }
7982 pattern += c;
7983 if (c == "\\") {
7984 var c = this.reader.peekn(1);
7985 if (c == "") {
7986 throw Err("E682: Invalid search pattern or delimiter", this.reader.getpos());
7987 }
7988 this.reader.getn(1);
7989 pattern += c;
7990 }
7991 else if (c == "[") {
7992 inbracket += 1;
7993 }
7994 else if (c == "]") {
7995 inbracket -= 1;
7996 }
7997 }
7998 return [pattern, endc];
7999}
8000
8001VimLParser.prototype.parse_command = function() {
8002 this.reader.skip_white_and_colon();
8003 this.ea.cmdpos = this.reader.getpos();
8004 if (this.reader.peekn(1) == "" || this.reader.peekn(1) == "\"") {
8005 if (!viml_empty(this.ea.modifiers) || !viml_empty(this.ea.range)) {
8006 this.parse_cmd_modifier_range();
8007 }
8008 return;
8009 }
8010 this.ea.cmd = this.find_command();
8011 if (this.ea.cmd === NIL) {
8012 this.reader.setpos(this.ea.cmdpos);
8013 throw Err(viml_printf("E492: Not an editor command: %s", this.reader.peekline()), this.ea.cmdpos);
8014 }
8015 if (this.reader.peekn(1) == "!" && this.ea.cmd.name != "substitute" && this.ea.cmd.name != "smagic" && this.ea.cmd.name != "snomagic") {
8016 this.reader.getn(1);
8017 this.ea.forceit = TRUE;
8018 }
8019 else {
8020 this.ea.forceit = FALSE;
8021 }
8022 if (!viml_eqregh(this.ea.cmd.flags, "\\<BANG\\>") && this.ea.forceit && !viml_eqregh(this.ea.cmd.flags, "\\<USERCMD\\>")) {
8023 throw Err("E477: No ! allowed", this.ea.cmdpos);
8024 }
8025 if (this.ea.cmd.name != "!") {
8026 this.reader.skip_white();
8027 }
8028 this.ea.argpos = this.reader.getpos();
8029 if (viml_eqregh(this.ea.cmd.flags, "\\<ARGOPT\\>")) {
8030 this.parse_argopt();
8031 }
8032 if (this.ea.cmd.name == "write" || this.ea.cmd.name == "update") {
8033 if (this.reader.p(0) == ">") {
8034 if (this.reader.p(1) != ">") {
8035 throw Err("E494: Use w or w>>", this.ea.cmdpos);
8036 }
8037 this.reader.seek_cur(2);
8038 this.reader.skip_white();
8039 this.ea.append = 1;
8040 }
8041 else if (this.reader.peekn(1) == "!" && this.ea.cmd.name == "write") {
8042 this.reader.getn(1);
8043 this.ea.usefilter = TRUE;
8044 }
8045 }
8046 if (this.ea.cmd.name == "read") {
8047 if (this.ea.forceit) {
8048 this.ea.usefilter = TRUE;
8049 this.ea.forceit = FALSE;
8050 }
8051 else if (this.reader.peekn(1) == "!") {
8052 this.reader.getn(1);
8053 this.ea.usefilter = TRUE;
8054 }
8055 }
8056 if (this.ea.cmd.name == "<" || this.ea.cmd.name == ">") {
8057 this.ea.amount = 1;
8058 while (this.reader.peekn(1) == this.ea.cmd.name) {
8059 this.reader.getn(1);
8060 this.ea.amount += 1;
8061 }
8062 this.reader.skip_white();
8063 }
8064 if (viml_eqregh(this.ea.cmd.flags, "\\<EDITCMD\\>") && !this.ea.usefilter) {
8065 this.parse_argcmd();
8066 }
8067 this._parse_command(this.ea.cmd.parser);
8068}
8069
8070// TODO: self[a:parser]
8071VimLParser.prototype._parse_command = function(parser) {
8072 if (parser == "parse_cmd_append") {
8073 this.parse_cmd_append();
8074 }
8075 else if (parser == "parse_cmd_break") {
8076 this.parse_cmd_break();
8077 }
8078 else if (parser == "parse_cmd_call") {
8079 this.parse_cmd_call();
8080 }
8081 else if (parser == "parse_cmd_catch") {
8082 this.parse_cmd_catch();
8083 }
8084 else if (parser == "parse_cmd_common") {
8085 this.parse_cmd_common();
8086 }
8087 else if (parser == "parse_cmd_continue") {
8088 this.parse_cmd_continue();
8089 }
8090 else if (parser == "parse_cmd_delfunction") {
8091 this.parse_cmd_delfunction();
8092 }
8093 else if (parser == "parse_cmd_echo") {
8094 this.parse_cmd_echo();
8095 }
8096 else if (parser == "parse_cmd_echoerr") {
8097 this.parse_cmd_echoerr();
8098 }
8099 else if (parser == "parse_cmd_echohl") {
8100 this.parse_cmd_echohl();
8101 }
8102 else if (parser == "parse_cmd_echomsg") {
8103 this.parse_cmd_echomsg();
8104 }
8105 else if (parser == "parse_cmd_echon") {
8106 this.parse_cmd_echon();
8107 }
8108 else if (parser == "parse_cmd_else") {
8109 this.parse_cmd_else();
8110 }
8111 else if (parser == "parse_cmd_elseif") {
8112 this.parse_cmd_elseif();
8113 }
8114 else if (parser == "parse_cmd_endfor") {
8115 this.parse_cmd_endfor();
8116 }
8117 else if (parser == "parse_cmd_endfunction") {
8118 this.parse_cmd_endfunction();
8119 }
8120 else if (parser == "parse_cmd_endif") {
8121 this.parse_cmd_endif();
8122 }
8123 else if (parser == "parse_cmd_endtry") {
8124 this.parse_cmd_endtry();
8125 }
8126 else if (parser == "parse_cmd_endwhile") {
8127 this.parse_cmd_endwhile();
8128 }
8129 else if (parser == "parse_cmd_execute") {
8130 this.parse_cmd_execute();
8131 }
8132 else if (parser == "parse_cmd_finally") {
8133 this.parse_cmd_finally();
8134 }
8135 else if (parser == "parse_cmd_finish") {
8136 this.parse_cmd_finish();
8137 }
8138 else if (parser == "parse_cmd_for") {
8139 this.parse_cmd_for();
8140 }
8141 else if (parser == "parse_cmd_function") {
8142 this.parse_cmd_function();
8143 }
8144 else if (parser == "parse_cmd_if") {
8145 this.parse_cmd_if();
8146 }
8147 else if (parser == "parse_cmd_insert") {
8148 this.parse_cmd_insert();
8149 }
8150 else if (parser == "parse_cmd_let") {
8151 this.parse_cmd_let();
8152 }
8153 else if (parser == "parse_cmd_const") {
8154 this.parse_cmd_const();
8155 }
8156 else if (parser == "parse_cmd_loadkeymap") {
8157 this.parse_cmd_loadkeymap();
8158 }
8159 else if (parser == "parse_cmd_lockvar") {
8160 this.parse_cmd_lockvar();
8161 }
8162 else if (parser == "parse_cmd_lua") {
8163 this.parse_cmd_lua();
8164 }
8165 else if (parser == "parse_cmd_modifier_range") {
8166 this.parse_cmd_modifier_range();
8167 }
8168 else if (parser == "parse_cmd_mzscheme") {
8169 this.parse_cmd_mzscheme();
8170 }
8171 else if (parser == "parse_cmd_perl") {
8172 this.parse_cmd_perl();
8173 }
8174 else if (parser == "parse_cmd_python") {
8175 this.parse_cmd_python();
8176 }
8177 else if (parser == "parse_cmd_python3") {
8178 this.parse_cmd_python3();
8179 }
8180 else if (parser == "parse_cmd_return") {
8181 this.parse_cmd_return();
8182 }
8183 else if (parser == "parse_cmd_ruby") {
8184 this.parse_cmd_ruby();
8185 }
8186 else if (parser == "parse_cmd_tcl") {
8187 this.parse_cmd_tcl();
8188 }
8189 else if (parser == "parse_cmd_throw") {
8190 this.parse_cmd_throw();
8191 }
8192 else if (parser == "parse_cmd_eval") {
8193 this.parse_cmd_eval();
8194 }
8195 else if (parser == "parse_cmd_try") {
8196 this.parse_cmd_try();
8197 }
8198 else if (parser == "parse_cmd_unlet") {
8199 this.parse_cmd_unlet();
8200 }
8201 else if (parser == "parse_cmd_unlockvar") {
8202 this.parse_cmd_unlockvar();
8203 }
8204 else if (parser == "parse_cmd_usercmd") {
8205 this.parse_cmd_usercmd();
8206 }
8207 else if (parser == "parse_cmd_while") {
8208 this.parse_cmd_while();
8209 }
8210 else if (parser == "parse_wincmd") {
8211 this.parse_wincmd();
8212 }
8213 else if (parser == "parse_cmd_syntax") {
8214 this.parse_cmd_syntax();
8215 }
8216 else {
8217 throw viml_printf("unknown parser: %s", viml_string(parser));
8218 }
8219}
8220
8221VimLParser.prototype.find_command = function() {
8222 var c = this.reader.peekn(1);
8223 var name = "";
8224 if (c == "k") {
8225 this.reader.getn(1);
8226 var name = "k";
8227 }
8228 else if (c == "s" && viml_eqregh(this.reader.peekn(5), "\\v^s%(c[^sr][^i][^p]|g|i[^mlg]|I|r[^e])")) {
8229 this.reader.getn(1);
8230 var name = "substitute";
8231 }
8232 else if (viml_eqregh(c, "[@*!=><&~#]")) {
8233 this.reader.getn(1);
8234 var name = c;
8235 }
8236 else if (this.reader.peekn(2) == "py") {
8237 var name = this.reader.read_alnum();
8238 }
8239 else {
8240 var pos = this.reader.tell();
8241 var name = this.reader.read_alpha();
8242 if (name != "del" && viml_eqregh(name, "\\v^d%[elete][lp]$")) {
8243 this.reader.seek_set(pos);
8244 var name = this.reader.getn(viml_len(name) - 1);
8245 }
8246 }
8247 if (name == "") {
8248 return NIL;
8249 }
8250 if (viml_has_key(this.find_command_cache, name)) {
8251 return this.find_command_cache[name];
8252 }
8253 var cmd = NIL;
8254 var __c4 = this.builtin_commands;
8255 for (var __i4 = 0; __i4 < __c4.length; ++__i4) {
8256 var x = __c4[__i4];
8257 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
8258 delete cmd;
8259 var cmd = x;
8260 break;
8261 }
8262 }
8263 if (this.neovim) {
8264 var __c5 = this.neovim_additional_commands;
8265 for (var __i5 = 0; __i5 < __c5.length; ++__i5) {
8266 var x = __c5[__i5];
8267 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
8268 delete cmd;
8269 var cmd = x;
8270 break;
8271 }
8272 }
8273 var __c6 = this.neovim_removed_commands;
8274 for (var __i6 = 0; __i6 < __c6.length; ++__i6) {
8275 var x = __c6[__i6];
8276 if (viml_stridx(x.name, name) == 0 && viml_len(name) >= x.minlen) {
8277 delete cmd;
8278 var cmd = NIL;
8279 break;
8280 }
8281 }
8282 }
8283 // FIXME: user defined command
8284 if ((cmd === NIL || cmd.name == "Print") && viml_eqregh(name, "^[A-Z]")) {
8285 name += this.reader.read_alnum();
8286 delete cmd;
8287 var cmd = {"name":name, "flags":"USERCMD", "parser":"parse_cmd_usercmd"};
8288 }
8289 this.find_command_cache[name] = cmd;
8290 return cmd;
8291}
8292
8293// TODO:
8294VimLParser.prototype.parse_hashbang = function() {
8295 this.reader.getn(-1);
8296}
8297
8298// TODO:
8299// ++opt=val
8300VimLParser.prototype.parse_argopt = function() {
8301 while (this.reader.p(0) == "+" && this.reader.p(1) == "+") {
8302 var s = this.reader.peekn(20);
8303 if (viml_eqregh(s, "^++bin\\>")) {
8304 this.reader.getn(5);
8305 this.ea.force_bin = 1;
8306 }
8307 else if (viml_eqregh(s, "^++nobin\\>")) {
8308 this.reader.getn(7);
8309 this.ea.force_bin = 2;
8310 }
8311 else if (viml_eqregh(s, "^++edit\\>")) {
8312 this.reader.getn(6);
8313 this.ea.read_edit = 1;
8314 }
8315 else if (viml_eqregh(s, "^++ff=\\(dos\\|unix\\|mac\\)\\>")) {
8316 this.reader.getn(5);
8317 this.ea.force_ff = this.reader.read_alpha();
8318 }
8319 else if (viml_eqregh(s, "^++fileformat=\\(dos\\|unix\\|mac\\)\\>")) {
8320 this.reader.getn(13);
8321 this.ea.force_ff = this.reader.read_alpha();
8322 }
8323 else if (viml_eqregh(s, "^++enc=\\S")) {
8324 this.reader.getn(6);
8325 this.ea.force_enc = this.reader.read_nonwhite();
8326 }
8327 else if (viml_eqregh(s, "^++encoding=\\S")) {
8328 this.reader.getn(11);
8329 this.ea.force_enc = this.reader.read_nonwhite();
8330 }
8331 else if (viml_eqregh(s, "^++bad=\\(keep\\|drop\\|.\\)\\>")) {
8332 this.reader.getn(6);
8333 if (viml_eqregh(s, "^++bad=keep")) {
8334 this.ea.bad_char = this.reader.getn(4);
8335 }
8336 else if (viml_eqregh(s, "^++bad=drop")) {
8337 this.ea.bad_char = this.reader.getn(4);
8338 }
8339 else {
8340 this.ea.bad_char = this.reader.getn(1);
8341 }
8342 }
8343 else if (viml_eqregh(s, "^++")) {
8344 throw Err("E474: Invalid Argument", this.reader.getpos());
8345 }
8346 else {
8347 break;
8348 }
8349 this.reader.skip_white();
8350 }
8351}
8352
8353// TODO:
8354// +command
8355VimLParser.prototype.parse_argcmd = function() {
8356 if (this.reader.peekn(1) == "+") {
8357 this.reader.getn(1);
8358 if (this.reader.peekn(1) == " ") {
8359 this.ea.do_ecmd_cmd = "$";
8360 }
8361 else {
8362 this.ea.do_ecmd_cmd = this.read_cmdarg();
8363 }
8364 }
8365}
8366
8367VimLParser.prototype.read_cmdarg = function() {
8368 var r = "";
8369 while (TRUE) {
8370 var c = this.reader.peekn(1);
8371 if (c == "" || iswhite(c)) {
8372 break;
8373 }
8374 this.reader.getn(1);
8375 if (c == "\\") {
8376 var c = this.reader.getn(1);
8377 }
8378 r += c;
8379 }
8380 return r;
8381}
8382
8383VimLParser.prototype.parse_comment = function() {
8384 var npos = this.reader.getpos();
8385 var c = this.reader.get();
8386 if (c != "\"") {
8387 throw Err(viml_printf("unexpected character: %s", c), npos);
8388 }
8389 var node = Node(NODE_COMMENT);
8390 node.pos = npos;
8391 node.str = this.reader.getn(-1);
8392 this.add_node(node);
8393}
8394
8395VimLParser.prototype.parse_trail = function() {
8396 this.reader.skip_white();
8397 var c = this.reader.peek();
8398 if (c == "<EOF>") {
8399 // pass
8400 }
8401 else if (c == "<EOL>") {
8402 this.reader.get();
8403 }
8404 else if (c == "|") {
8405 this.reader.get();
8406 }
8407 else if (c == "\"") {
8408 this.parse_comment();
8409 this.reader.get();
8410 }
8411 else {
8412 throw Err(viml_printf("E488: Trailing characters: %s", c), this.reader.getpos());
8413 }
8414}
8415
8416// modifier or range only command line
8417VimLParser.prototype.parse_cmd_modifier_range = function() {
8418 var node = Node(NODE_EXCMD);
8419 node.pos = this.ea.cmdpos;
8420 node.ea = this.ea;
8421 node.str = this.reader.getstr(this.ea.linepos, this.reader.getpos());
8422 this.add_node(node);
8423}
8424
8425// TODO:
8426VimLParser.prototype.parse_cmd_common = function() {
8427 var end = this.reader.getpos();
8428 if (viml_eqregh(this.ea.cmd.flags, "\\<TRLBAR\\>") && !this.ea.usefilter) {
8429 var end = this.separate_nextcmd();
8430 }
8431 else if (this.ea.cmd.name == "!" || this.ea.cmd.name == "global" || this.ea.cmd.name == "vglobal" || this.ea.usefilter) {
8432 while (TRUE) {
8433 var end = this.reader.getpos();
8434 if (this.reader.getn(1) == "") {
8435 break;
8436 }
8437 }
8438 }
8439 else {
8440 while (TRUE) {
8441 var end = this.reader.getpos();
8442 if (this.reader.getn(1) == "") {
8443 break;
8444 }
8445 }
8446 }
8447 var node = Node(NODE_EXCMD);
8448 node.pos = this.ea.cmdpos;
8449 node.ea = this.ea;
8450 node.str = this.reader.getstr(this.ea.linepos, end);
8451 this.add_node(node);
8452}
8453
8454VimLParser.prototype.separate_nextcmd = function() {
8455 if (this.ea.cmd.name == "vimgrep" || this.ea.cmd.name == "vimgrepadd" || this.ea.cmd.name == "lvimgrep" || this.ea.cmd.name == "lvimgrepadd") {
8456 this.skip_vimgrep_pat();
8457 }
8458 var pc = "";
8459 var end = this.reader.getpos();
8460 var nospend = end;
8461 while (TRUE) {
8462 var end = this.reader.getpos();
8463 if (!iswhite(pc)) {
8464 var nospend = end;
8465 }
8466 var c = this.reader.peek();
8467 if (c == "<EOF>" || c == "<EOL>") {
8468 break;
8469 }
8470 else if (c == "\x16") {
8471 // <C-V>
8472 this.reader.get();
8473 var end = this.reader.getpos();
8474 var nospend = this.reader.getpos();
8475 var c = this.reader.peek();
8476 if (c == "<EOF>" || c == "<EOL>") {
8477 break;
8478 }
8479 this.reader.get();
8480 }
8481 else if (this.reader.peekn(2) == "`=" && viml_eqregh(this.ea.cmd.flags, "\\<\\(XFILE\\|FILES\\|FILE1\\)\\>")) {
8482 this.reader.getn(2);
8483 this.parse_expr();
8484 var c = this.reader.peekn(1);
8485 if (c != "`") {
8486 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
8487 }
8488 this.reader.getn(1);
8489 }
8490 else if (c == "|" || c == "\n" || c == "\"" && !viml_eqregh(this.ea.cmd.flags, "\\<NOTRLCOM\\>") && (this.ea.cmd.name != "@" && this.ea.cmd.name != "*" || this.reader.getpos() != this.ea.argpos) && (this.ea.cmd.name != "redir" || this.reader.getpos().i != this.ea.argpos.i + 1 || pc != "@")) {
8491 var has_cpo_bar = FALSE;
8492 // &cpoptions =~ 'b'
8493 if ((!has_cpo_bar || !viml_eqregh(this.ea.cmd.flags, "\\<USECTRLV\\>")) && pc == "\\") {
8494 this.reader.get();
8495 }
8496 else {
8497 break;
8498 }
8499 }
8500 else {
8501 this.reader.get();
8502 }
8503 var pc = c;
8504 }
8505 if (!viml_eqregh(this.ea.cmd.flags, "\\<NOTRLCOM\\>")) {
8506 var end = nospend;
8507 }
8508 return end;
8509}
8510
8511// FIXME
8512VimLParser.prototype.skip_vimgrep_pat = function() {
8513 if (this.reader.peekn(1) == "") {
8514 // pass
8515 }
8516 else if (isidc(this.reader.peekn(1))) {
8517 // :vimgrep pattern fname
8518 this.reader.read_nonwhite();
8519 }
8520 else {
8521 // :vimgrep /pattern/[g][j] fname
8522 var c = this.reader.getn(1);
8523 var __tmp = this.parse_pattern(c);
8524 var _ = __tmp[0];
8525 var endc = __tmp[1];
8526 if (c != endc) {
8527 return;
8528 }
8529 while (this.reader.p(0) == "g" || this.reader.p(0) == "j") {
8530 this.reader.getn(1);
8531 }
8532 }
8533}
8534
8535VimLParser.prototype.parse_cmd_append = function() {
8536 this.reader.setpos(this.ea.linepos);
8537 var cmdline = this.reader.readline();
8538 var lines = [cmdline];
8539 var m = ".";
8540 while (TRUE) {
8541 if (this.reader.peek() == "<EOF>") {
8542 break;
8543 }
8544 var line = this.reader.getn(-1);
8545 viml_add(lines, line);
8546 if (line == m) {
8547 break;
8548 }
8549 this.reader.get();
8550 }
8551 var node = Node(NODE_EXCMD);
8552 node.pos = this.ea.cmdpos;
8553 node.ea = this.ea;
8554 node.str = viml_join(lines, "\n");
8555 this.add_node(node);
8556}
8557
8558VimLParser.prototype.parse_cmd_insert = function() {
8559 this.parse_cmd_append();
8560}
8561
8562VimLParser.prototype.parse_cmd_loadkeymap = function() {
8563 this.reader.setpos(this.ea.linepos);
8564 var cmdline = this.reader.readline();
8565 var lines = [cmdline];
8566 while (TRUE) {
8567 if (this.reader.peek() == "<EOF>") {
8568 break;
8569 }
8570 var line = this.reader.readline();
8571 viml_add(lines, line);
8572 }
8573 var node = Node(NODE_EXCMD);
8574 node.pos = this.ea.cmdpos;
8575 node.ea = this.ea;
8576 node.str = viml_join(lines, "\n");
8577 this.add_node(node);
8578}
8579
8580VimLParser.prototype.parse_cmd_lua = function() {
8581 var lines = [];
8582 this.reader.skip_white();
8583 if (this.reader.peekn(2) == "<<") {
8584 this.reader.getn(2);
8585 this.reader.skip_white();
8586 var m = this.reader.readline();
8587 if (m == "") {
8588 var m = ".";
8589 }
8590 this.reader.setpos(this.ea.linepos);
8591 var cmdline = this.reader.getn(-1);
8592 var lines = [cmdline];
8593 this.reader.get();
8594 while (TRUE) {
8595 if (this.reader.peek() == "<EOF>") {
8596 break;
8597 }
8598 var line = this.reader.getn(-1);
8599 viml_add(lines, line);
8600 if (line == m) {
8601 break;
8602 }
8603 this.reader.get();
8604 }
8605 }
8606 else {
8607 this.reader.setpos(this.ea.linepos);
8608 var cmdline = this.reader.getn(-1);
8609 var lines = [cmdline];
8610 }
8611 var node = Node(NODE_EXCMD);
8612 node.pos = this.ea.cmdpos;
8613 node.ea = this.ea;
8614 node.str = viml_join(lines, "\n");
8615 this.add_node(node);
8616}
8617
8618VimLParser.prototype.parse_cmd_mzscheme = function() {
8619 this.parse_cmd_lua();
8620}
8621
8622VimLParser.prototype.parse_cmd_perl = function() {
8623 this.parse_cmd_lua();
8624}
8625
8626VimLParser.prototype.parse_cmd_python = function() {
8627 this.parse_cmd_lua();
8628}
8629
8630VimLParser.prototype.parse_cmd_python3 = function() {
8631 this.parse_cmd_lua();
8632}
8633
8634VimLParser.prototype.parse_cmd_ruby = function() {
8635 this.parse_cmd_lua();
8636}
8637
8638VimLParser.prototype.parse_cmd_tcl = function() {
8639 this.parse_cmd_lua();
8640}
8641
8642VimLParser.prototype.parse_cmd_finish = function() {
8643 this.parse_cmd_common();
8644 if (this.context[0].type == NODE_TOPLEVEL) {
8645 this.reader.seek_end(0);
8646 }
8647}
8648
8649// FIXME
8650VimLParser.prototype.parse_cmd_usercmd = function() {
8651 this.parse_cmd_common();
8652}
8653
8654VimLParser.prototype.parse_cmd_function = function() {
8655 var pos = this.reader.tell();
8656 this.reader.skip_white();
8657 // :function
8658 if (this.ends_excmds(this.reader.peek())) {
8659 this.reader.seek_set(pos);
8660 this.parse_cmd_common();
8661 return;
8662 }
8663 // :function /pattern
8664 if (this.reader.peekn(1) == "/") {
8665 this.reader.seek_set(pos);
8666 this.parse_cmd_common();
8667 return;
8668 }
8669 var left = this.parse_lvalue_func();
8670 this.reader.skip_white();
8671 if (left.type == NODE_IDENTIFIER) {
8672 var s = left.value;
8673 var ss = viml_split(s, "\\zs");
8674 if (ss[0] != "<" && ss[0] != "_" && !isupper(ss[0]) && viml_stridx(s, ":") == -1 && viml_stridx(s, "#") == -1) {
8675 throw Err(viml_printf("E128: Function name must start with a capital or contain a colon: %s", s), left.pos);
8676 }
8677 }
8678 // :function {name}
8679 if (this.reader.peekn(1) != "(") {
8680 this.reader.seek_set(pos);
8681 this.parse_cmd_common();
8682 return;
8683 }
8684 // :function[!] {name}([arguments]) [range] [abort] [dict] [closure]
8685 var node = Node(NODE_FUNCTION);
8686 node.pos = this.ea.cmdpos;
8687 node.body = [];
8688 node.ea = this.ea;
8689 node.left = left;
8690 node.rlist = [];
8691 node.default_args = [];
8692 node.attr = {"range":0, "abort":0, "dict":0, "closure":0};
8693 node.endfunction = NIL;
8694 this.reader.getn(1);
8695 var tokenizer = new ExprTokenizer(this.reader);
8696 if (tokenizer.peek().type == TOKEN_PCLOSE) {
8697 tokenizer.get();
8698 }
8699 else {
8700 var named = {};
8701 while (TRUE) {
8702 var varnode = Node(NODE_IDENTIFIER);
8703 var token = tokenizer.get();
8704 if (token.type == TOKEN_IDENTIFIER) {
8705 if (!isargname(token.value) || token.value == "firstline" || token.value == "lastline") {
8706 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
8707 }
8708 else if (viml_has_key(named, token.value)) {
8709 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
8710 }
8711 named[token.value] = 1;
8712 varnode.pos = token.pos;
8713 varnode.value = token.value;
8714 viml_add(node.rlist, varnode);
8715 if (tokenizer.peek().type == TOKEN_EQ) {
8716 tokenizer.get();
8717 viml_add(node.default_args, this.parse_expr());
8718 }
8719 else if (viml_len(node.default_args) > 0) {
8720 throw Err("E989: Non-default argument follows default argument", varnode.pos);
8721 }
8722 // XXX: Vim doesn't skip white space before comma. F(a ,b) => E475
8723 if (iswhite(this.reader.p(0)) && tokenizer.peek().type == TOKEN_COMMA) {
8724 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
8725 }
8726 var token = tokenizer.get();
8727 if (token.type == TOKEN_COMMA) {
8728 // XXX: Vim allows last comma. F(a, b, ) => OK
8729 if (tokenizer.peek().type == TOKEN_PCLOSE) {
8730 tokenizer.get();
8731 break;
8732 }
8733 }
8734 else if (token.type == TOKEN_PCLOSE) {
8735 break;
8736 }
8737 else {
8738 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
8739 }
8740 }
8741 else if (token.type == TOKEN_DOTDOTDOT) {
8742 varnode.pos = token.pos;
8743 varnode.value = token.value;
8744 viml_add(node.rlist, varnode);
8745 var token = tokenizer.get();
8746 if (token.type == TOKEN_PCLOSE) {
8747 break;
8748 }
8749 else {
8750 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
8751 }
8752 }
8753 else {
8754 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
8755 }
8756 }
8757 }
8758 while (TRUE) {
8759 this.reader.skip_white();
8760 var epos = this.reader.getpos();
8761 var key = this.reader.read_alpha();
8762 if (key == "") {
8763 break;
8764 }
8765 else if (key == "range") {
8766 node.attr.range = TRUE;
8767 }
8768 else if (key == "abort") {
8769 node.attr.abort = TRUE;
8770 }
8771 else if (key == "dict") {
8772 node.attr.dict = TRUE;
8773 }
8774 else if (key == "closure") {
8775 node.attr.closure = TRUE;
8776 }
8777 else {
8778 throw Err(viml_printf("unexpected token: %s", key), epos);
8779 }
8780 }
8781 this.add_node(node);
8782 this.push_context(node);
8783}
8784
8785VimLParser.prototype.parse_cmd_endfunction = function() {
8786 this.check_missing_endif("ENDFUNCTION", this.ea.cmdpos);
8787 this.check_missing_endtry("ENDFUNCTION", this.ea.cmdpos);
8788 this.check_missing_endwhile("ENDFUNCTION", this.ea.cmdpos);
8789 this.check_missing_endfor("ENDFUNCTION", this.ea.cmdpos);
8790 if (this.context[0].type != NODE_FUNCTION) {
8791 throw Err("E193: :endfunction not inside a function", this.ea.cmdpos);
8792 }
8793 this.reader.getn(-1);
8794 var node = Node(NODE_ENDFUNCTION);
8795 node.pos = this.ea.cmdpos;
8796 node.ea = this.ea;
8797 this.context[0].endfunction = node;
8798 this.pop_context();
8799}
8800
8801VimLParser.prototype.parse_cmd_delfunction = function() {
8802 var node = Node(NODE_DELFUNCTION);
8803 node.pos = this.ea.cmdpos;
8804 node.ea = this.ea;
8805 node.left = this.parse_lvalue_func();
8806 this.add_node(node);
8807}
8808
8809VimLParser.prototype.parse_cmd_return = function() {
8810 if (this.find_context(NODE_FUNCTION) == -1) {
8811 throw Err("E133: :return not inside a function", this.ea.cmdpos);
8812 }
8813 var node = Node(NODE_RETURN);
8814 node.pos = this.ea.cmdpos;
8815 node.ea = this.ea;
8816 node.left = NIL;
8817 this.reader.skip_white();
8818 var c = this.reader.peek();
8819 if (c == "\"" || !this.ends_excmds(c)) {
8820 node.left = this.parse_expr();
8821 }
8822 this.add_node(node);
8823}
8824
8825VimLParser.prototype.parse_cmd_call = function() {
8826 var node = Node(NODE_EXCALL);
8827 node.pos = this.ea.cmdpos;
8828 node.ea = this.ea;
8829 this.reader.skip_white();
8830 var c = this.reader.peek();
8831 if (this.ends_excmds(c)) {
8832 throw Err("E471: Argument required", this.reader.getpos());
8833 }
8834 node.left = this.parse_expr();
8835 if (node.left.type != NODE_CALL) {
8836 throw Err("Not an function call", node.left.pos);
8837 }
8838 this.add_node(node);
8839}
8840
8841VimLParser.prototype.parse_heredoc = function() {
8842 var node = Node(NODE_HEREDOC);
8843 node.pos = this.ea.cmdpos;
8844 node.op = "";
8845 node.rlist = [];
8846 node.body = [];
8847 while (TRUE) {
8848 this.reader.skip_white();
8849 var key = this.reader.read_word();
8850 if (key == "") {
8851 break;
8852 }
8853 if (!islower(key[0])) {
8854 node.op = key;
8855 break;
8856 }
8857 else {
8858 viml_add(node.rlist, key);
8859 }
8860 }
8861 if (node.op == "") {
8862 throw Err("E172: Missing marker", this.reader.getpos());
8863 }
8864 this.parse_trail();
8865 while (TRUE) {
8866 if (this.reader.peek() == "<EOF>") {
8867 break;
8868 }
8869 var line = this.reader.getn(-1);
8870 if (line == node.op) {
8871 return node;
8872 }
8873 viml_add(node.body, line);
8874 this.reader.get();
8875 }
8876 throw Err(viml_printf("E990: Missing end marker '%s'", node.op), this.reader.getpos());
8877}
8878
8879VimLParser.prototype.parse_cmd_let = function() {
8880 var pos = this.reader.tell();
8881 this.reader.skip_white();
8882 // :let
8883 if (this.ends_excmds(this.reader.peek())) {
8884 this.reader.seek_set(pos);
8885 this.parse_cmd_common();
8886 return;
8887 }
8888 var lhs = this.parse_letlhs();
8889 this.reader.skip_white();
8890 var s1 = this.reader.peekn(1);
8891 var s2 = this.reader.peekn(2);
8892 // TODO check scriptversion?
8893 if (s2 == "..") {
8894 var s2 = this.reader.peekn(3);
8895 }
8896 else if (s2 == "=<") {
8897 var s2 = this.reader.peekn(3);
8898 }
8899 // :let {var-name} ..
8900 if (this.ends_excmds(s1) || s2 != "+=" && s2 != "-=" && s2 != ".=" && s2 != "..=" && s2 != "*=" && s2 != "/=" && s2 != "%=" && s2 != "=<<" && s1 != "=") {
8901 this.reader.seek_set(pos);
8902 this.parse_cmd_common();
8903 return;
8904 }
8905 // :let left op right
8906 var node = Node(NODE_LET);
8907 node.pos = this.ea.cmdpos;
8908 node.ea = this.ea;
8909 node.op = "";
8910 node.left = lhs.left;
8911 node.list = lhs.list;
8912 node.rest = lhs.rest;
8913 node.right = NIL;
8914 if (s2 == "+=" || s2 == "-=" || s2 == ".=" || s2 == "..=" || s2 == "*=" || s2 == "/=" || s2 == "%=") {
8915 this.reader.getn(viml_len(s2));
8916 node.op = s2;
8917 }
8918 else if (s2 == "=<<") {
8919 this.reader.getn(viml_len(s2));
8920 this.reader.skip_white();
8921 node.op = s2;
8922 node.right = this.parse_heredoc();
8923 this.add_node(node);
8924 return;
8925 }
8926 else if (s1 == "=") {
8927 this.reader.getn(1);
8928 node.op = s1;
8929 }
8930 else {
8931 throw "NOT REACHED";
8932 }
8933 node.right = this.parse_expr();
8934 this.add_node(node);
8935}
8936
8937VimLParser.prototype.parse_cmd_const = function() {
8938 var pos = this.reader.tell();
8939 this.reader.skip_white();
8940 // :const
8941 if (this.ends_excmds(this.reader.peek())) {
8942 this.reader.seek_set(pos);
8943 this.parse_cmd_common();
8944 return;
8945 }
8946 var lhs = this.parse_constlhs();
8947 this.reader.skip_white();
8948 var s1 = this.reader.peekn(1);
8949 // :const {var-name}
8950 if (this.ends_excmds(s1) || s1 != "=") {
8951 this.reader.seek_set(pos);
8952 this.parse_cmd_common();
8953 return;
8954 }
8955 // :const left op right
8956 var node = Node(NODE_CONST);
8957 node.pos = this.ea.cmdpos;
8958 node.ea = this.ea;
8959 this.reader.getn(1);
8960 node.op = s1;
8961 node.left = lhs.left;
8962 node.list = lhs.list;
8963 node.rest = lhs.rest;
8964 node.right = this.parse_expr();
8965 this.add_node(node);
8966}
8967
8968VimLParser.prototype.parse_cmd_unlet = function() {
8969 var node = Node(NODE_UNLET);
8970 node.pos = this.ea.cmdpos;
8971 node.ea = this.ea;
8972 node.list = this.parse_lvaluelist();
8973 this.add_node(node);
8974}
8975
8976VimLParser.prototype.parse_cmd_lockvar = function() {
8977 var node = Node(NODE_LOCKVAR);
8978 node.pos = this.ea.cmdpos;
8979 node.ea = this.ea;
8980 node.depth = NIL;
8981 node.list = [];
8982 this.reader.skip_white();
8983 if (isdigit(this.reader.peekn(1))) {
8984 node.depth = viml_str2nr(this.reader.read_digit(), 10);
8985 }
8986 node.list = this.parse_lvaluelist();
8987 this.add_node(node);
8988}
8989
8990VimLParser.prototype.parse_cmd_unlockvar = function() {
8991 var node = Node(NODE_UNLOCKVAR);
8992 node.pos = this.ea.cmdpos;
8993 node.ea = this.ea;
8994 node.depth = NIL;
8995 node.list = [];
8996 this.reader.skip_white();
8997 if (isdigit(this.reader.peekn(1))) {
8998 node.depth = viml_str2nr(this.reader.read_digit(), 10);
8999 }
9000 node.list = this.parse_lvaluelist();
9001 this.add_node(node);
9002}
9003
9004VimLParser.prototype.parse_cmd_if = function() {
9005 var node = Node(NODE_IF);
9006 node.pos = this.ea.cmdpos;
9007 node.body = [];
9008 node.ea = this.ea;
9009 node.cond = this.parse_expr();
9010 node.elseif = [];
9011 node._else = NIL;
9012 node.endif = NIL;
9013 this.add_node(node);
9014 this.push_context(node);
9015}
9016
9017VimLParser.prototype.parse_cmd_elseif = function() {
9018 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9019 throw Err("E582: :elseif without :if", this.ea.cmdpos);
9020 }
9021 if (this.context[0].type != NODE_IF) {
9022 this.pop_context();
9023 }
9024 var node = Node(NODE_ELSEIF);
9025 node.pos = this.ea.cmdpos;
9026 node.body = [];
9027 node.ea = this.ea;
9028 node.cond = this.parse_expr();
9029 viml_add(this.context[0].elseif, node);
9030 this.push_context(node);
9031}
9032
9033VimLParser.prototype.parse_cmd_else = function() {
9034 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF) {
9035 throw Err("E581: :else without :if", this.ea.cmdpos);
9036 }
9037 if (this.context[0].type != NODE_IF) {
9038 this.pop_context();
9039 }
9040 var node = Node(NODE_ELSE);
9041 node.pos = this.ea.cmdpos;
9042 node.body = [];
9043 node.ea = this.ea;
9044 this.context[0]._else = node;
9045 this.push_context(node);
9046}
9047
9048VimLParser.prototype.parse_cmd_endif = function() {
9049 if (this.context[0].type != NODE_IF && this.context[0].type != NODE_ELSEIF && this.context[0].type != NODE_ELSE) {
9050 throw Err("E580: :endif without :if", this.ea.cmdpos);
9051 }
9052 if (this.context[0].type != NODE_IF) {
9053 this.pop_context();
9054 }
9055 var node = Node(NODE_ENDIF);
9056 node.pos = this.ea.cmdpos;
9057 node.ea = this.ea;
9058 this.context[0].endif = node;
9059 this.pop_context();
9060}
9061
9062VimLParser.prototype.parse_cmd_while = function() {
9063 var node = Node(NODE_WHILE);
9064 node.pos = this.ea.cmdpos;
9065 node.body = [];
9066 node.ea = this.ea;
9067 node.cond = this.parse_expr();
9068 node.endwhile = NIL;
9069 this.add_node(node);
9070 this.push_context(node);
9071}
9072
9073VimLParser.prototype.parse_cmd_endwhile = function() {
9074 if (this.context[0].type != NODE_WHILE) {
9075 throw Err("E588: :endwhile without :while", this.ea.cmdpos);
9076 }
9077 var node = Node(NODE_ENDWHILE);
9078 node.pos = this.ea.cmdpos;
9079 node.ea = this.ea;
9080 this.context[0].endwhile = node;
9081 this.pop_context();
9082}
9083
9084VimLParser.prototype.parse_cmd_for = function() {
9085 var node = Node(NODE_FOR);
9086 node.pos = this.ea.cmdpos;
9087 node.body = [];
9088 node.ea = this.ea;
9089 node.left = NIL;
9090 node.right = NIL;
9091 node.endfor = NIL;
9092 var lhs = this.parse_letlhs();
9093 node.left = lhs.left;
9094 node.list = lhs.list;
9095 node.rest = lhs.rest;
9096 this.reader.skip_white();
9097 var epos = this.reader.getpos();
9098 if (this.reader.read_alpha() != "in") {
9099 throw Err("Missing \"in\" after :for", epos);
9100 }
9101 node.right = this.parse_expr();
9102 this.add_node(node);
9103 this.push_context(node);
9104}
9105
9106VimLParser.prototype.parse_cmd_endfor = function() {
9107 if (this.context[0].type != NODE_FOR) {
9108 throw Err("E588: :endfor without :for", this.ea.cmdpos);
9109 }
9110 var node = Node(NODE_ENDFOR);
9111 node.pos = this.ea.cmdpos;
9112 node.ea = this.ea;
9113 this.context[0].endfor = node;
9114 this.pop_context();
9115}
9116
9117VimLParser.prototype.parse_cmd_continue = function() {
9118 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9119 throw Err("E586: :continue without :while or :for", this.ea.cmdpos);
9120 }
9121 var node = Node(NODE_CONTINUE);
9122 node.pos = this.ea.cmdpos;
9123 node.ea = this.ea;
9124 this.add_node(node);
9125}
9126
9127VimLParser.prototype.parse_cmd_break = function() {
9128 if (this.find_context(NODE_WHILE) == -1 && this.find_context(NODE_FOR) == -1) {
9129 throw Err("E587: :break without :while or :for", this.ea.cmdpos);
9130 }
9131 var node = Node(NODE_BREAK);
9132 node.pos = this.ea.cmdpos;
9133 node.ea = this.ea;
9134 this.add_node(node);
9135}
9136
9137VimLParser.prototype.parse_cmd_try = function() {
9138 var node = Node(NODE_TRY);
9139 node.pos = this.ea.cmdpos;
9140 node.body = [];
9141 node.ea = this.ea;
9142 node.catch = [];
9143 node._finally = NIL;
9144 node.endtry = NIL;
9145 this.add_node(node);
9146 this.push_context(node);
9147}
9148
9149VimLParser.prototype.parse_cmd_catch = function() {
9150 if (this.context[0].type == NODE_FINALLY) {
9151 throw Err("E604: :catch after :finally", this.ea.cmdpos);
9152 }
9153 else if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
9154 throw Err("E603: :catch without :try", this.ea.cmdpos);
9155 }
9156 if (this.context[0].type != NODE_TRY) {
9157 this.pop_context();
9158 }
9159 var node = Node(NODE_CATCH);
9160 node.pos = this.ea.cmdpos;
9161 node.body = [];
9162 node.ea = this.ea;
9163 node.pattern = NIL;
9164 this.reader.skip_white();
9165 if (!this.ends_excmds(this.reader.peek())) {
9166 var __tmp = this.parse_pattern(this.reader.get());
9167 node.pattern = __tmp[0];
9168 var _ = __tmp[1];
9169 }
9170 viml_add(this.context[0].catch, node);
9171 this.push_context(node);
9172}
9173
9174VimLParser.prototype.parse_cmd_finally = function() {
9175 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH) {
9176 throw Err("E606: :finally without :try", this.ea.cmdpos);
9177 }
9178 if (this.context[0].type != NODE_TRY) {
9179 this.pop_context();
9180 }
9181 var node = Node(NODE_FINALLY);
9182 node.pos = this.ea.cmdpos;
9183 node.body = [];
9184 node.ea = this.ea;
9185 this.context[0]._finally = node;
9186 this.push_context(node);
9187}
9188
9189VimLParser.prototype.parse_cmd_endtry = function() {
9190 if (this.context[0].type != NODE_TRY && this.context[0].type != NODE_CATCH && this.context[0].type != NODE_FINALLY) {
9191 throw Err("E602: :endtry without :try", this.ea.cmdpos);
9192 }
9193 if (this.context[0].type != NODE_TRY) {
9194 this.pop_context();
9195 }
9196 var node = Node(NODE_ENDTRY);
9197 node.pos = this.ea.cmdpos;
9198 node.ea = this.ea;
9199 this.context[0].endtry = node;
9200 this.pop_context();
9201}
9202
9203VimLParser.prototype.parse_cmd_throw = function() {
9204 var node = Node(NODE_THROW);
9205 node.pos = this.ea.cmdpos;
9206 node.ea = this.ea;
9207 node.left = this.parse_expr();
9208 this.add_node(node);
9209}
9210
9211VimLParser.prototype.parse_cmd_eval = function() {
9212 var node = Node(NODE_EVAL);
9213 node.pos = this.ea.cmdpos;
9214 node.ea = this.ea;
9215 node.left = this.parse_expr();
9216 this.add_node(node);
9217}
9218
9219VimLParser.prototype.parse_cmd_echo = function() {
9220 var node = Node(NODE_ECHO);
9221 node.pos = this.ea.cmdpos;
9222 node.ea = this.ea;
9223 node.list = this.parse_exprlist();
9224 this.add_node(node);
9225}
9226
9227VimLParser.prototype.parse_cmd_echon = function() {
9228 var node = Node(NODE_ECHON);
9229 node.pos = this.ea.cmdpos;
9230 node.ea = this.ea;
9231 node.list = this.parse_exprlist();
9232 this.add_node(node);
9233}
9234
9235VimLParser.prototype.parse_cmd_echohl = function() {
9236 var node = Node(NODE_ECHOHL);
9237 node.pos = this.ea.cmdpos;
9238 node.ea = this.ea;
9239 node.str = "";
9240 while (!this.ends_excmds(this.reader.peek())) {
9241 node.str += this.reader.get();
9242 }
9243 this.add_node(node);
9244}
9245
9246VimLParser.prototype.parse_cmd_echomsg = function() {
9247 var node = Node(NODE_ECHOMSG);
9248 node.pos = this.ea.cmdpos;
9249 node.ea = this.ea;
9250 node.list = this.parse_exprlist();
9251 this.add_node(node);
9252}
9253
9254VimLParser.prototype.parse_cmd_echoerr = function() {
9255 var node = Node(NODE_ECHOERR);
9256 node.pos = this.ea.cmdpos;
9257 node.ea = this.ea;
9258 node.list = this.parse_exprlist();
9259 this.add_node(node);
9260}
9261
9262VimLParser.prototype.parse_cmd_execute = function() {
9263 var node = Node(NODE_EXECUTE);
9264 node.pos = this.ea.cmdpos;
9265 node.ea = this.ea;
9266 node.list = this.parse_exprlist();
9267 this.add_node(node);
9268}
9269
9270VimLParser.prototype.parse_expr = function() {
9271 return new ExprParser(this.reader).parse();
9272}
9273
9274VimLParser.prototype.parse_exprlist = function() {
9275 var list = [];
9276 while (TRUE) {
9277 this.reader.skip_white();
9278 var c = this.reader.peek();
9279 if (c != "\"" && this.ends_excmds(c)) {
9280 break;
9281 }
9282 var node = this.parse_expr();
9283 viml_add(list, node);
9284 }
9285 return list;
9286}
9287
9288VimLParser.prototype.parse_lvalue_func = function() {
9289 var p = new LvalueParser(this.reader);
9290 var node = p.parse();
9291 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME || node.type == NODE_SUBSCRIPT || node.type == NODE_DOT || node.type == NODE_OPTION || node.type == NODE_ENV || node.type == NODE_REG) {
9292 return node;
9293 }
9294 throw Err("Invalid Expression", node.pos);
9295}
9296
9297// FIXME:
9298VimLParser.prototype.parse_lvalue = function() {
9299 var p = new LvalueParser(this.reader);
9300 var node = p.parse();
9301 if (node.type == NODE_IDENTIFIER) {
9302 if (!isvarname(node.value)) {
9303 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
9304 }
9305 }
9306 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME || node.type == NODE_SUBSCRIPT || node.type == NODE_SLICE || node.type == NODE_DOT || node.type == NODE_OPTION || node.type == NODE_ENV || node.type == NODE_REG) {
9307 return node;
9308 }
9309 throw Err("Invalid Expression", node.pos);
9310}
9311
9312// TODO: merge with s:VimLParser.parse_lvalue()
9313VimLParser.prototype.parse_constlvalue = function() {
9314 var p = new LvalueParser(this.reader);
9315 var node = p.parse();
9316 if (node.type == NODE_IDENTIFIER) {
9317 if (!isvarname(node.value)) {
9318 throw Err(viml_printf("E461: Illegal variable name: %s", node.value), node.pos);
9319 }
9320 }
9321 if (node.type == NODE_IDENTIFIER || node.type == NODE_CURLYNAME) {
9322 return node;
9323 }
9324 else if (node.type == NODE_SUBSCRIPT || node.type == NODE_SLICE || node.type == NODE_DOT) {
9325 throw Err("E996: Cannot lock a list or dict", node.pos);
9326 }
9327 else if (node.type == NODE_OPTION) {
9328 throw Err("E996: Cannot lock an option", node.pos);
9329 }
9330 else if (node.type == NODE_ENV) {
9331 throw Err("E996: Cannot lock an environment variable", node.pos);
9332 }
9333 else if (node.type == NODE_REG) {
9334 throw Err("E996: Cannot lock a register", node.pos);
9335 }
9336 throw Err("Invalid Expression", node.pos);
9337}
9338
9339VimLParser.prototype.parse_lvaluelist = function() {
9340 var list = [];
9341 var node = this.parse_expr();
9342 viml_add(list, node);
9343 while (TRUE) {
9344 this.reader.skip_white();
9345 if (this.ends_excmds(this.reader.peek())) {
9346 break;
9347 }
9348 var node = this.parse_lvalue();
9349 viml_add(list, node);
9350 }
9351 return list;
9352}
9353
9354// FIXME:
9355VimLParser.prototype.parse_letlhs = function() {
9356 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
9357 var tokenizer = new ExprTokenizer(this.reader);
9358 if (tokenizer.peek().type == TOKEN_SQOPEN) {
9359 tokenizer.get();
9360 lhs.list = [];
9361 while (TRUE) {
9362 var node = this.parse_lvalue();
9363 viml_add(lhs.list, node);
9364 var token = tokenizer.get();
9365 if (token.type == TOKEN_SQCLOSE) {
9366 break;
9367 }
9368 else if (token.type == TOKEN_COMMA) {
9369 continue;
9370 }
9371 else if (token.type == TOKEN_SEMICOLON) {
9372 var node = this.parse_lvalue();
9373 lhs.rest = node;
9374 var token = tokenizer.get();
9375 if (token.type == TOKEN_SQCLOSE) {
9376 break;
9377 }
9378 else {
9379 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
9380 }
9381 }
9382 else {
9383 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
9384 }
9385 }
9386 }
9387 else {
9388 lhs.left = this.parse_lvalue();
9389 }
9390 return lhs;
9391}
9392
9393// TODO: merge with s:VimLParser.parse_letlhs() ?
9394VimLParser.prototype.parse_constlhs = function() {
9395 var lhs = {"left":NIL, "list":NIL, "rest":NIL};
9396 var tokenizer = new ExprTokenizer(this.reader);
9397 if (tokenizer.peek().type == TOKEN_SQOPEN) {
9398 tokenizer.get();
9399 lhs.list = [];
9400 while (TRUE) {
9401 var node = this.parse_lvalue();
9402 viml_add(lhs.list, node);
9403 var token = tokenizer.get();
9404 if (token.type == TOKEN_SQCLOSE) {
9405 break;
9406 }
9407 else if (token.type == TOKEN_COMMA) {
9408 continue;
9409 }
9410 else if (token.type == TOKEN_SEMICOLON) {
9411 var node = this.parse_lvalue();
9412 lhs.rest = node;
9413 var token = tokenizer.get();
9414 if (token.type == TOKEN_SQCLOSE) {
9415 break;
9416 }
9417 else {
9418 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
9419 }
9420 }
9421 else {
9422 throw Err(viml_printf("E475 Invalid argument: %s", token.value), token.pos);
9423 }
9424 }
9425 }
9426 else {
9427 lhs.left = this.parse_constlvalue();
9428 }
9429 return lhs;
9430}
9431
9432VimLParser.prototype.ends_excmds = function(c) {
9433 return c == "" || c == "|" || c == "\"" || c == "<EOF>" || c == "<EOL>";
9434}
9435
9436// FIXME: validate argument
9437VimLParser.prototype.parse_wincmd = function() {
9438 var c = this.reader.getn(1);
9439 if (c == "") {
9440 throw Err("E471: Argument required", this.reader.getpos());
9441 }
9442 else if (c == "g" || c == "\x07") {
9443 // <C-G>
9444 var c2 = this.reader.getn(1);
9445 if (c2 == "" || iswhite(c2)) {
9446 throw Err("E474: Invalid Argument", this.reader.getpos());
9447 }
9448 }
9449 var end = this.reader.getpos();
9450 this.reader.skip_white();
9451 if (!this.ends_excmds(this.reader.peek())) {
9452 throw Err("E474: Invalid Argument", this.reader.getpos());
9453 }
9454 var node = Node(NODE_EXCMD);
9455 node.pos = this.ea.cmdpos;
9456 node.ea = this.ea;
9457 node.str = this.reader.getstr(this.ea.linepos, end);
9458 this.add_node(node);
9459}
9460
9461// FIXME: validate argument
9462VimLParser.prototype.parse_cmd_syntax = function() {
9463 var end = this.reader.getpos();
9464 while (TRUE) {
9465 var end = this.reader.getpos();
9466 var c = this.reader.peek();
9467 if (c == "/" || c == "'" || c == "\"") {
9468 this.reader.getn(1);
9469 this.parse_pattern(c);
9470 }
9471 else if (c == "=") {
9472 this.reader.getn(1);
9473 this.parse_pattern(" ");
9474 }
9475 else if (this.ends_excmds(c)) {
9476 break;
9477 }
9478 this.reader.getn(1);
9479 }
9480 var node = Node(NODE_EXCMD);
9481 node.pos = this.ea.cmdpos;
9482 node.ea = this.ea;
9483 node.str = this.reader.getstr(this.ea.linepos, end);
9484 this.add_node(node);
9485}
9486
9487VimLParser.prototype.neovim_additional_commands = [{"name":"rshada", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"wshada", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}];
9488VimLParser.prototype.neovim_removed_commands = [{"name":"Print", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"fixdel", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"helpfind", "minlen":5, "flags":"EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"open", "minlen":1, "flags":"RANGE|BANG|EXTRA", "parser":"parse_cmd_common"}, {"name":"shell", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tearoff", "minlen":2, "flags":"NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"gvim", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}];
9489// To find new builtin_commands, run the below script.
9490// $ scripts/update_builtin_commands.sh /path/to/vim/src/ex_cmds.h
9491VimLParser.prototype.builtin_commands = [{"name":"append", "minlen":1, "flags":"BANG|RANGE|ZEROR|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_append"}, {"name":"abbreviate", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"abclear", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"aboveleft", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"all", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"amenu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"anoremenu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"args", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argadd", "minlen":4, "flags":"BANG|NEEDARG|RANGE|NOTADR|ZEROR|FILES|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argdelete", "minlen":4, "flags":"BANG|RANGE|NOTADR|FILES|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argedit", "minlen":4, "flags":"BANG|NEEDARG|RANGE|NOTADR|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argdo", "minlen":5, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"argglobal", "minlen":4, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"arglocal", "minlen":4, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"argument", "minlen":4, "flags":"BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"ascii", "minlen":2, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"autocmd", "minlen":2, "flags":"BANG|EXTRA|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"augroup", "minlen":3, "flags":"BANG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"aunmenu", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"buffer", "minlen":1, "flags":"BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bNext", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"ball", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"badd", "minlen":3, "flags":"NEEDARG|FILE1|EDITCMD|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"bdelete", "minlen":2, "flags":"BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"behave", "minlen":2, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"belowright", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"bfirst", "minlen":2, "flags":"BANG|RANGE|NOTADR|TRLBAR", "parser":"parse_cmd_common"}, {"name":"blast", "minlen":2, "flags":"BANG|RANGE|NOTADR|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bmodified", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bnext", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"botright", "minlen":2, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"bprevious", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"brewind", "minlen":2, "flags":"BANG|RANGE|NOTADR|TRLBAR", "parser":"parse_cmd_common"}, {"name":"break", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_break"}, {"name":"breakadd", "minlen":6, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"breakdel", "minlen":6, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"breaklist", "minlen":6, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"browse", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"bufdo", "minlen":5, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"buffers", "minlen":7, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"bunload", "minlen":3, "flags":"BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"bwipeout", "minlen":2, "flags":"BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"change", "minlen":1, "flags":"BANG|WHOLEFOLD|RANGE|COUNT|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"cNext", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cNfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cabbrev", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cabclear", "minlen":4, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"caddbuffer", "minlen":3, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"caddexpr", "minlen":5, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"caddfile", "minlen":5, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"call", "minlen":3, "flags":"RANGE|NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_call"}, {"name":"catch", "minlen":3, "flags":"EXTRA|SBOXOK|CMDWIN", "parser":"parse_cmd_catch"}, {"name":"cbuffer", "minlen":2, "flags":"BANG|RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cc", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cclose", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cd", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"center", "minlen":2, "flags":"TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"cexpr", "minlen":3, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cfile", "minlen":2, "flags":"TRLBAR|FILE1|BANG", "parser":"parse_cmd_common"}, {"name":"cfirst", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cgetbuffer", "minlen":5, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cgetexpr", "minlen":5, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cgetfile", "minlen":2, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"changes", "minlen":7, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"chdir", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"checkpath", "minlen":3, "flags":"TRLBAR|BANG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"checktime", "minlen":6, "flags":"RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"clist", "minlen":2, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"clast", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"close", "minlen":3, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cnext", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cnewer", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cnfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cnoremap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cnoreabbrev", "minlen":6, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"copy", "minlen":2, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"colder", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"colorscheme", "minlen":4, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"command", "minlen":3, "flags":"EXTRA|BANG|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"comclear", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"compiler", "minlen":4, "flags":"BANG|TRLBAR|WORD1|CMDWIN", "parser":"parse_cmd_common"}, {"name":"continue", "minlen":3, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_continue"}, {"name":"confirm", "minlen":4, "flags":"NEEDARG|EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"copen", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"cprevious", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cpfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cquit", "minlen":2, "flags":"TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"crewind", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"cscope", "minlen":2, "flags":"EXTRA|NOTRLCOM|XFILE", "parser":"parse_cmd_common"}, {"name":"cstag", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"cunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cunabbrev", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"cwindow", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"delete", "minlen":1, "flags":"RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"delmarks", "minlen":4, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"debug", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"debuggreedy", "minlen":6, "flags":"RANGE|NOTADR|ZEROR|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"delcommand", "minlen":4, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"delfunction", "minlen":4, "flags":"BANG|NEEDARG|WORD1|CMDWIN", "parser":"parse_cmd_delfunction"}, {"name":"diffupdate", "minlen":3, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffget", "minlen":5, "flags":"RANGE|EXTRA|TRLBAR|MODIFY", "parser":"parse_cmd_common"}, {"name":"diffoff", "minlen":5, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffpatch", "minlen":5, "flags":"EXTRA|FILE1|TRLBAR|MODIFY", "parser":"parse_cmd_common"}, {"name":"diffput", "minlen":6, "flags":"RANGE|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffsplit", "minlen":5, "flags":"EXTRA|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"diffthis", "minlen":5, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"digraphs", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"display", "minlen":2, "flags":"EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"djump", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"dlist", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"doautocmd", "minlen":2, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"doautoall", "minlen":7, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"drop", "minlen":2, "flags":"FILES|EDITCMD|NEEDARG|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"dsearch", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"dsplit", "minlen":3, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"edit", "minlen":1, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"earlier", "minlen":2, "flags":"TRLBAR|EXTRA|NOSPC|CMDWIN", "parser":"parse_cmd_common"}, {"name":"echo", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echo"}, {"name":"echoerr", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echoerr"}, {"name":"echohl", "minlen":5, "flags":"EXTRA|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_echohl"}, {"name":"echomsg", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echomsg"}, {"name":"echon", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_echon"}, {"name":"else", "minlen":2, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_else"}, {"name":"elseif", "minlen":5, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_elseif"}, {"name":"emenu", "minlen":2, "flags":"NEEDARG|EXTRA|TRLBAR|NOTRLCOM|RANGE|NOTADR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"endif", "minlen":2, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endif"}, {"name":"endfor", "minlen":5, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endfor"}, {"name":"endfunction", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_endfunction"}, {"name":"endtry", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endtry"}, {"name":"endwhile", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_endwhile"}, {"name":"enew", "minlen":3, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"eval", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_eval"}, {"name":"ex", "minlen":2, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"execute", "minlen":3, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_execute"}, {"name":"exit", "minlen":3, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"exusage", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"file", "minlen":1, "flags":"RANGE|NOTADR|ZEROR|BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"files", "minlen":5, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"filetype", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"find", "minlen":3, "flags":"RANGE|NOTADR|BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"finally", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_finally"}, {"name":"finish", "minlen":4, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_finish"}, {"name":"first", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"fixdel", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"fold", "minlen":2, "flags":"RANGE|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"foldclose", "minlen":5, "flags":"RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"folddoopen", "minlen":5, "flags":"RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"folddoclosed", "minlen":7, "flags":"RANGE|DFLALL|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"foldopen", "minlen":5, "flags":"RANGE|BANG|WHOLEFOLD|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"for", "minlen":3, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_for"}, {"name":"function", "minlen":2, "flags":"EXTRA|BANG|CMDWIN", "parser":"parse_cmd_function"}, {"name":"global", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|EXTRA|DFLALL|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"goto", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"grep", "minlen":2, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"grepadd", "minlen":5, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"gui", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"gvim", "minlen":2, "flags":"BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"hardcopy", "minlen":2, "flags":"RANGE|COUNT|EXTRA|TRLBAR|DFLALL|BANG", "parser":"parse_cmd_common"}, {"name":"help", "minlen":1, "flags":"BANG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"helpfind", "minlen":5, "flags":"EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"helpgrep", "minlen":5, "flags":"EXTRA|NOTRLCOM|NEEDARG", "parser":"parse_cmd_common"}, {"name":"helptags", "minlen":5, "flags":"NEEDARG|FILES|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"highlight", "minlen":2, "flags":"BANG|EXTRA|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"hide", "minlen":3, "flags":"BANG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"history", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"insert", "minlen":1, "flags":"BANG|RANGE|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_insert"}, {"name":"iabbrev", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"iabclear", "minlen":4, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"if", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_if"}, {"name":"ijump", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"ilist", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"imap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"imapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"imenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"inoremap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"inoreabbrev", "minlen":6, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"inoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"intro", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"isearch", "minlen":2, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"isplit", "minlen":3, "flags":"BANG|RANGE|DFLALL|WHOLEFOLD|EXTRA", "parser":"parse_cmd_common"}, {"name":"iunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"iunabbrev", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"iunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"join", "minlen":1, "flags":"BANG|RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"jumps", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"k", "minlen":1, "flags":"RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"keepalt", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"keepmarks", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"keepjumps", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"keeppatterns", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"lNext", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lNfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"list", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"laddexpr", "minlen":3, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"laddbuffer", "minlen":5, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"laddfile", "minlen":5, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"last", "minlen":2, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"language", "minlen":3, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"later", "minlen":3, "flags":"TRLBAR|EXTRA|NOSPC|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lbuffer", "minlen":2, "flags":"BANG|RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lcd", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lchdir", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lclose", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lcscope", "minlen":3, "flags":"EXTRA|NOTRLCOM|XFILE", "parser":"parse_cmd_common"}, {"name":"left", "minlen":2, "flags":"TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"leftabove", "minlen":5, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"let", "minlen":3, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_let"}, {"name":"const", "minlen":4, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_const"}, {"name":"lexpr", "minlen":3, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lfile", "minlen":2, "flags":"TRLBAR|FILE1|BANG", "parser":"parse_cmd_common"}, {"name":"lfirst", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lgetbuffer", "minlen":5, "flags":"RANGE|NOTADR|WORD1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lgetexpr", "minlen":5, "flags":"NEEDARG|WORD1|NOTRLCOM|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lgetfile", "minlen":2, "flags":"TRLBAR|FILE1", "parser":"parse_cmd_common"}, {"name":"lgrep", "minlen":3, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lgrepadd", "minlen":6, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lhelpgrep", "minlen":2, "flags":"EXTRA|NOTRLCOM|NEEDARG", "parser":"parse_cmd_common"}, {"name":"ll", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"llast", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"list", "minlen":3, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lmake", "minlen":4, "flags":"BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lnext", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lnewer", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lnfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"loadkeymap", "minlen":5, "flags":"CMDWIN", "parser":"parse_cmd_loadkeymap"}, {"name":"loadview", "minlen":2, "flags":"FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lockmarks", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"lockvar", "minlen":5, "flags":"BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_lockvar"}, {"name":"lolder", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lopen", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"lprevious", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lpfile", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"lrewind", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR|BANG", "parser":"parse_cmd_common"}, {"name":"ls", "minlen":2, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ltag", "minlen":2, "flags":"NOTADR|TRLBAR|BANG|WORD1", "parser":"parse_cmd_common"}, {"name":"lunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lua", "minlen":3, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_lua"}, {"name":"luado", "minlen":4, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"luafile", "minlen":4, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"lvimgrep", "minlen":2, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lvimgrepadd", "minlen":9, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"lwindow", "minlen":2, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"move", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"mark", "minlen":2, "flags":"RANGE|WORD1|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"make", "minlen":3, "flags":"BANG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"map", "minlen":3, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mapclear", "minlen":4, "flags":"EXTRA|BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"marks", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"match", "minlen":3, "flags":"RANGE|NOTADR|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"menu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"menutranslate", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"messages", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mkexrc", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mksession", "minlen":3, "flags":"BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"mkspell", "minlen":4, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"mkvimrc", "minlen":3, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mkview", "minlen":5, "flags":"BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"mode", "minlen":3, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"mzscheme", "minlen":2, "flags":"RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN|SBOXOK", "parser":"parse_cmd_mzscheme"}, {"name":"mzfile", "minlen":3, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nbclose", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nbkey", "minlen":2, "flags":"EXTRA|NOTADR|NEEDARG", "parser":"parse_cmd_common"}, {"name":"nbstart", "minlen":3, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"next", "minlen":1, "flags":"RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"new", "minlen":3, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"nmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"noautocmd", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"noremap", "minlen":2, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nohlsearch", "minlen":3, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"noreabbrev", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"noremenu", "minlen":6, "flags":"RANGE|NOTADR|ZEROR|BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"normal", "minlen":4, "flags":"RANGE|BANG|EXTRA|NEEDARG|NOTRLCOM|USECTRLV|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"number", "minlen":2, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nunmap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"nunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"oldfiles", "minlen":2, "flags":"BANG|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"open", "minlen":1, "flags":"RANGE|BANG|EXTRA", "parser":"parse_cmd_common"}, {"name":"omap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"omapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"omenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"only", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"onoremap", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"onoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"options", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"ounmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ounmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ownsyntax", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"pclose", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"pedit", "minlen":3, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"perl", "minlen":2, "flags":"RANGE|EXTRA|DFLALL|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_perl"}, {"name":"print", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"profdel", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"profile", "minlen":4, "flags":"BANG|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"promptfind", "minlen":3, "flags":"EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"promptrepl", "minlen":7, "flags":"EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"perldo", "minlen":5, "flags":"RANGE|EXTRA|DFLALL|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"pop", "minlen":2, "flags":"RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"popup", "minlen":4, "flags":"NEEDARG|EXTRA|BANG|TRLBAR|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"ppop", "minlen":2, "flags":"RANGE|NOTADR|BANG|COUNT|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"preserve", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"previous", "minlen":4, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"psearch", "minlen":2, "flags":"BANG|RANGE|WHOLEFOLD|DFLALL|EXTRA", "parser":"parse_cmd_common"}, {"name":"ptag", "minlen":2, "flags":"RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptNext", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptfirst", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptjump", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"ptlast", "minlen":3, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"ptnext", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptprevious", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptrewind", "minlen":3, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"ptselect", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"put", "minlen":2, "flags":"RANGE|WHOLEFOLD|BANG|REGSTR|TRLBAR|ZEROR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"pwd", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"py3", "minlen":3, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_python3"}, {"name":"python3", "minlen":7, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_python3"}, {"name":"py3file", "minlen":4, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"python", "minlen":2, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_python"}, {"name":"pyfile", "minlen":3, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"pydo", "minlen":3, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"py3do", "minlen":4, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"quit", "minlen":1, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"quitall", "minlen":5, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"qall", "minlen":2, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"read", "minlen":1, "flags":"BANG|RANGE|WHOLEFOLD|FILE1|ARGOPT|TRLBAR|ZEROR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"recover", "minlen":3, "flags":"BANG|FILE1|TRLBAR", "parser":"parse_cmd_common"}, {"name":"redo", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"redir", "minlen":4, "flags":"BANG|FILES|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"redraw", "minlen":4, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"redrawstatus", "minlen":7, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"registers", "minlen":3, "flags":"EXTRA|NOTRLCOM|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"resize", "minlen":3, "flags":"RANGE|NOTADR|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"retab", "minlen":3, "flags":"TRLBAR|RANGE|WHOLEFOLD|DFLALL|BANG|WORD1|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"return", "minlen":4, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_return"}, {"name":"rewind", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"right", "minlen":2, "flags":"TRLBAR|RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"rightbelow", "minlen":6, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"ruby", "minlen":3, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_ruby"}, {"name":"rubydo", "minlen":5, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"rubyfile", "minlen":5, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"rundo", "minlen":4, "flags":"NEEDARG|FILE1", "parser":"parse_cmd_common"}, {"name":"runtime", "minlen":2, "flags":"BANG|NEEDARG|FILES|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"rviminfo", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"substitute", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sNext", "minlen":2, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sandbox", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"sargument", "minlen":2, "flags":"BANG|RANGE|NOTADR|COUNT|EXTRA|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sall", "minlen":3, "flags":"BANG|RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"saveas", "minlen":3, "flags":"BANG|DFLALL|FILE1|ARGOPT|CMDWIN|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbuffer", "minlen":2, "flags":"BANG|RANGE|NOTADR|BUFNAME|BUFUNL|COUNT|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbNext", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sball", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbfirst", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"sblast", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbmodified", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbnext", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbprevious", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sbrewind", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"scriptnames", "minlen":3, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"scriptencoding", "minlen":7, "flags":"WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"scscope", "minlen":3, "flags":"EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"set", "minlen":2, "flags":"TRLBAR|EXTRA|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"setfiletype", "minlen":4, "flags":"TRLBAR|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"setglobal", "minlen":4, "flags":"TRLBAR|EXTRA|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"setlocal", "minlen":4, "flags":"TRLBAR|EXTRA|CMDWIN|SBOXOK", "parser":"parse_cmd_common"}, {"name":"sfind", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sfirst", "minlen":4, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"shell", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"simalt", "minlen":3, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sign", "minlen":3, "flags":"NEEDARG|RANGE|NOTADR|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"silent", "minlen":3, "flags":"NEEDARG|EXTRA|BANG|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sleep", "minlen":2, "flags":"RANGE|NOTADR|COUNT|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"slast", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"smagic", "minlen":2, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"smap", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"smapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"smenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"snext", "minlen":2, "flags":"RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sniff", "minlen":3, "flags":"EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"snomagic", "minlen":3, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN", "parser":"parse_cmd_common"}, {"name":"snoremap", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"snoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sort", "minlen":3, "flags":"RANGE|DFLALL|WHOLEFOLD|BANG|EXTRA|NOTRLCOM|MODIFY", "parser":"parse_cmd_common"}, {"name":"source", "minlen":2, "flags":"BANG|FILE1|TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"spelldump", "minlen":6, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellgood", "minlen":3, "flags":"BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellinfo", "minlen":6, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellrepall", "minlen":6, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellundo", "minlen":6, "flags":"BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"spellwrong", "minlen":6, "flags":"BANG|RANGE|NOTADR|NEEDARG|EXTRA|TRLBAR", "parser":"parse_cmd_common"}, {"name":"split", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sprevious", "minlen":3, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"srewind", "minlen":3, "flags":"EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"stop", "minlen":2, "flags":"TRLBAR|BANG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"stag", "minlen":3, "flags":"RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"startinsert", "minlen":4, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"startgreplace", "minlen":6, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"startreplace", "minlen":6, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"stopinsert", "minlen":5, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"stjump", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"stselect", "minlen":3, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"sunhide", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"sunmap", "minlen":4, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"suspend", "minlen":3, "flags":"TRLBAR|BANG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"sview", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"swapname", "minlen":2, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"syntax", "minlen":2, "flags":"EXTRA|NOTRLCOM|CMDWIN", "parser":"parse_cmd_syntax"}, {"name":"syntime", "minlen":5, "flags":"NEEDARG|WORD1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"syncbind", "minlen":4, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"t", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"tNext", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"tabNext", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabclose", "minlen":4, "flags":"RANGE|NOTADR|COUNT|BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tabdo", "minlen":4, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"tabedit", "minlen":4, "flags":"BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabfind", "minlen":4, "flags":"BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|NEEDARG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabfirst", "minlen":6, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"tablast", "minlen":4, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabmove", "minlen":4, "flags":"RANGE|NOTADR|ZEROR|EXTRA|NOSPC|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabnew", "minlen":6, "flags":"BANG|FILE1|RANGE|NOTADR|ZEROR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabnext", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabonly", "minlen":4, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tabprevious", "minlen":4, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabrewind", "minlen":4, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"tabs", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tab", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"tag", "minlen":2, "flags":"RANGE|NOTADR|BANG|WORD1|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"tags", "minlen":4, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tcl", "minlen":2, "flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_tcl"}, {"name":"tcldo", "minlen":4, "flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tclfile", "minlen":4, "flags":"RANGE|FILE1|NEEDARG|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tearoff", "minlen":2, "flags":"NEEDARG|EXTRA|TRLBAR|NOTRLCOM|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tfirst", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"throw", "minlen":2, "flags":"EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_throw"}, {"name":"tjump", "minlen":2, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"tlast", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"tmenu", "minlen":2, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"tnext", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"topleft", "minlen":2, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"tprevious", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"trewind", "minlen":2, "flags":"RANGE|NOTADR|BANG|TRLBAR|ZEROR", "parser":"parse_cmd_common"}, {"name":"try", "minlen":3, "flags":"TRLBAR|SBOXOK|CMDWIN", "parser":"parse_cmd_try"}, {"name":"tselect", "minlen":2, "flags":"BANG|TRLBAR|WORD1", "parser":"parse_cmd_common"}, {"name":"tunmenu", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"undo", "minlen":1, "flags":"RANGE|NOTADR|COUNT|ZEROR|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"undojoin", "minlen":5, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"undolist", "minlen":5, "flags":"TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unabbreviate", "minlen":3, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unhide", "minlen":3, "flags":"RANGE|NOTADR|COUNT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"unlet", "minlen":3, "flags":"BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_unlet"}, {"name":"unlockvar", "minlen":4, "flags":"BANG|EXTRA|NEEDARG|SBOXOK|CMDWIN", "parser":"parse_cmd_unlockvar"}, {"name":"unmap", "minlen":3, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unmenu", "minlen":4, "flags":"BANG|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"unsilent", "minlen":3, "flags":"NEEDARG|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"update", "minlen":2, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vglobal", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|DFLALL|CMDWIN", "parser":"parse_cmd_common"}, {"name":"version", "minlen":2, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"verbose", "minlen":4, "flags":"NEEDARG|RANGE|NOTADR|EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vertical", "minlen":4, "flags":"NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"vimgrep", "minlen":3, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"vimgrepadd", "minlen":8, "flags":"RANGE|NOTADR|BANG|NEEDARG|EXTRA|NOTRLCOM|TRLBAR|XFILE", "parser":"parse_cmd_common"}, {"name":"visual", "minlen":2, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"viusage", "minlen":3, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"view", "minlen":3, "flags":"BANG|FILE1|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vnew", "minlen":3, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vsplit", "minlen":2, "flags":"BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"vunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"vunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"windo", "minlen":5, "flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "parser":"parse_cmd_common"}, {"name":"write", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"wNext", "minlen":2, "flags":"RANGE|WHOLEFOLD|NOTADR|BANG|FILE1|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wall", "minlen":2, "flags":"BANG|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"while", "minlen":2, "flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "parser":"parse_cmd_while"}, {"name":"winsize", "minlen":2, "flags":"EXTRA|NEEDARG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wincmd", "minlen":4, "flags":"NEEDARG|WORD1|RANGE|NOTADR", "parser":"parse_wincmd"}, {"name":"winpos", "minlen":4, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"wnext", "minlen":2, "flags":"RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wprevious", "minlen":2, "flags":"RANGE|NOTADR|BANG|FILE1|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wq", "minlen":2, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wqall", "minlen":3, "flags":"BANG|FILE1|ARGOPT|DFLALL|TRLBAR", "parser":"parse_cmd_common"}, {"name":"wsverb", "minlen":2, "flags":"EXTRA|NOTADR|NEEDARG", "parser":"parse_cmd_common"}, {"name":"wundo", "minlen":2, "flags":"BANG|NEEDARG|FILE1", "parser":"parse_cmd_common"}, {"name":"wviminfo", "minlen":2, "flags":"BANG|FILE1|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xit", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xall", "minlen":2, "flags":"BANG|TRLBAR", "parser":"parse_cmd_common"}, {"name":"xmapclear", "minlen":5, "flags":"EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xmenu", "minlen":3, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xnoremap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xnoremenu", "minlen":7, "flags":"RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xunmap", "minlen":2, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"xunmenu", "minlen":5, "flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "parser":"parse_cmd_common"}, {"name":"yank", "minlen":1, "flags":"RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"z", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"!", "minlen":1, "flags":"RANGE|WHOLEFOLD|BANG|FILES|CMDWIN", "parser":"parse_cmd_common"}, {"name":"#", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"&", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"*", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"<", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"=", "minlen":1, "flags":"RANGE|TRLBAR|DFLALL|EXFLAGS|CMDWIN", "parser":"parse_cmd_common"}, {"name":">", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"name":"@", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"Next", "minlen":1, "flags":"EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR", "parser":"parse_cmd_common"}, {"name":"Print", "minlen":1, "flags":"RANGE|WHOLEFOLD|COUNT|EXFLAGS|TRLBAR|CMDWIN", "parser":"parse_cmd_common"}, {"name":"X", "minlen":1, "flags":"TRLBAR", "parser":"parse_cmd_common"}, {"name":"~", "minlen":1, "flags":"RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"cbottom", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":3, "name":"cdo", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":3, "name":"cfdo", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"chistory", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN", "minlen":3, "name":"clearjumps", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM", "minlen":4, "name":"filter", "parser":"parse_cmd_common"}, {"flags":"RANGE|NOTADR|COUNT|TRLBAR", "minlen":5, "name":"helpclose", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"lbottom", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":2, "name":"ldo", "parser":"parse_cmd_common"}, {"flags":"BANG|NEEDARG|EXTRA|NOTRLCOM|RANGE|NOTADR|DFLALL", "minlen":3, "name":"lfdo", "parser":"parse_cmd_common"}, {"flags":"TRLBAR", "minlen":3, "name":"lhistory", "parser":"parse_cmd_common"}, {"flags":"BANG|EXTRA|TRLBAR|CMDWIN", "minlen":3, "name":"llist", "parser":"parse_cmd_common"}, {"flags":"NEEDARG|EXTRA|NOTRLCOM", "minlen":3, "name":"noswapfile", "parser":"parse_cmd_common"}, {"flags":"BANG|FILE1|NEEDARG|TRLBAR|SBOXOK|CMDWIN", "minlen":2, "name":"packadd", "parser":"parse_cmd_common"}, {"flags":"BANG|TRLBAR|SBOXOK|CMDWIN", "minlen":5, "name":"packloadall", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN|SBOXOK", "minlen":3, "name":"smile", "parser":"parse_cmd_common"}, {"flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "minlen":3, "name":"pyx", "parser":"parse_cmd_common"}, {"flags":"RANGE|DFLALL|EXTRA|NEEDARG|CMDWIN", "minlen":4, "name":"pyxdo", "parser":"parse_cmd_common"}, {"flags":"RANGE|EXTRA|NEEDARG|CMDWIN", "minlen":7, "name":"pythonx", "parser":"parse_cmd_common"}, {"flags":"RANGE|FILE1|NEEDARG|CMDWIN", "minlen":4, "name":"pyxfile", "parser":"parse_cmd_common"}, {"flags":"RANGE|BANG|FILES|CMDWIN", "minlen":3, "name":"terminal", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "minlen":3, "name":"tmap", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|CMDWIN", "minlen":5, "name":"tmapclear", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "minlen":3, "name":"tnoremap", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN", "minlen":5, "name":"tunmap", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":4, "name":"cabove", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"cafter", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"cbefore", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":4, "name":"cbelow", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NOTRLCOM|SBOXOK|CMDWIN", "minlen":4, "name":"const", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"labove", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"lafter", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":3, "name":"lbefore", "parser":"parse_cmd_common"}, {"flags":"RANGE|COUNT|TRLBAR", "minlen":4, "name":"lbelow", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN", "minlen":7, "name":"redrawtabline", "parser":"parse_cmd_common"}, {"flags":"WORD1|TRLBAR|CMDWIN", "minlen":7, "name":"scriptversion", "parser":"parse_cmd_common"}, {"flags":"BANG|FILE1|TRLBAR|CMDWIN", "minlen":2, "name":"tcd", "parser":"parse_cmd_common"}, {"flags":"BANG|FILE1|TRLBAR|CMDWIN", "minlen":3, "name":"tchdir", "parser":"parse_cmd_common"}, {"flags":"RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|CTRLV|CMDWIN", "minlen":3, "name":"tlmenu", "parser":"parse_cmd_common"}, {"flags":"RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|CTRLV|CMDWIN", "minlen":3, "name":"tlnoremenu", "parser":"parse_cmd_common"}, {"flags":"RANGE|ZEROR|EXTRA|TRLBAR|NOTRLCOM|CTRLV|CMDWIN", "minlen":3, "name":"tlunmenu", "parser":"parse_cmd_common"}, {"flags":"EXTRA|TRLBAR|CMDWIN", "minlen":2, "name":"xrestore", "parser":"parse_cmd_common"}, {"flags":"EXTRA|BANG|SBOXOK|CMDWIN", "minlen":3, "name":"def", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NEEDARG|TRLBAR|CMDWIN", "minlen":4, "name":"disassemble", "parser":"parse_cmd_common"}, {"flags":"TRLBAR|CMDWIN", "minlen":4, "name":"enddef", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NOTRLCOM", "minlen":3, "name":"export", "parser":"parse_cmd_common"}, {"flags":"EXTRA|NOTRLCOM", "minlen":3, "name":"import", "parser":"parse_cmd_common"}, {"flags":"BANG|RANGE|NEEDARG|EXTRA|TRLBAR", "minlen":7, "name":"spellrare", "parser":"parse_cmd_common"}, {"flags":"", "minlen":4, "name":"vim9script", "parser":"parse_cmd_common"}];
9492// To find new builtin_functions, run the below script.
9493// $ scripts/update_builtin_functions.sh /path/to/vim/src/evalfunc.c
9494VimLParser.prototype.builtin_functions = [{"name":"abs", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"acos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"add", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"and", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"append", "min_argc":2, "max_argc":2, "argtype":"FEARG_LAST"}, {"name":"appendbufline", "min_argc":3, "max_argc":3, "argtype":"FEARG_LAST"}, {"name":"argc", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"argidx", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"arglistid", "min_argc":0, "max_argc":2, "argtype":"0"}, {"name":"argv", "min_argc":0, "max_argc":2, "argtype":"0"}, {"name":"asin", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"assert_beeps", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"assert_equal", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_equalfile", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"assert_exception", "min_argc":1, "max_argc":2, "argtype":"0"}, {"name":"assert_fails", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"assert_false", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"assert_inrange", "min_argc":3, "max_argc":4, "argtype":"FEARG_3"}, {"name":"assert_match", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_notequal", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_notmatch", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"assert_report", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"assert_true", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"atan", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"atan2", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"balloon_gettext", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"balloon_show", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"balloon_split", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"browse", "min_argc":4, "max_argc":4, "argtype":"0"}, {"name":"browsedir", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"bufadd", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufexists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buffer_exists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buffer_name", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buffer_number", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"buflisted", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufload", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufloaded", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufname", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufnr", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"bufwinid", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"bufwinnr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"byte2line", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"byteidx", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"byteidxcomp", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"call", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ceil", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_canread", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_close", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_close_in", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_evalexpr", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_evalraw", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_getbufnr", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_getjob", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_info", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"ch_log", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_logfile", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_open", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_read", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_readblob", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_readraw", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_sendexpr", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_sendraw", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"ch_setoptions", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"ch_status", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"changenr", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"char2nr", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"chdir", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"cindent", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"clearmatches", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"col", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"complete", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"complete_add", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"complete_check", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"complete_info", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"confirm", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"copy", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"cos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"cosh", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"count", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"cscope_connection", "min_argc":0, "max_argc":3, "argtype":"0"}, {"name":"cursor", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"debugbreak", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"deepcopy", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"delete", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"deletebufline", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"did_filetype", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"diff_filler", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"diff_hlID", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"echoraw", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"empty", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"environ", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"escape", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"eval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"eventhandler", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"executable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"execute", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"exepath", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"exists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"exp", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"expand", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"expandcmd", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"extend", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"feedkeys", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"file_readable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"filereadable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"filewritable", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"filter", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"finddir", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"findfile", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"float2nr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"floor", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"fmod", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"fnameescape", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"fnamemodify", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"foldclosed", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foldclosedend", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foldlevel", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foldtext", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"foldtextresult", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"foreground", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"funcref", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"function", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"garbagecollect", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"get", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getbufinfo", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getbufline", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getbufvar", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getchangelist", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getchar", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getcharmod", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcharsearch", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdline", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdpos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdtype", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcmdwintype", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcompletion", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getcurpos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getcwd", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"getenv", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getfontname", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getfperm", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getfsize", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getftime", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getftype", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getimstatus", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getjumplist", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"getline", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"getloclist", "min_argc":1, "max_argc":2, "argtype":"0"}, {"name":"getmatches", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getmousepos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getpid", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getqflist", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"getreg", "min_argc":0, "max_argc":3, "argtype":"FEARG_1"}, {"name":"getregtype", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"gettabinfo", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"gettabvar", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"gettabwinvar", "min_argc":3, "max_argc":4, "argtype":"FEARG_1"}, {"name":"gettagstack", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getwininfo", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getwinpos", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"getwinposx", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getwinposy", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"getwinvar", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"glob", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"glob2regpat", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"globpath", "min_argc":2, "max_argc":5, "argtype":"FEARG_2"}, {"name":"has", "min_argc":1, "max_argc":1, "argtype":"0"}, {"name":"has_key", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"haslocaldir", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"hasmapto", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"highlightID", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"highlight_exists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"histadd", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"histdel", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"histget", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"histnr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"hlID", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"hlexists", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"hostname", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"iconv", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"indent", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"index", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"input", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"inputdialog", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"inputlist", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"inputrestore", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"inputsave", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"inputsecret", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"insert", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"interrupt", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"invert", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"isdirectory", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"isinf", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"islocked", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"isnan", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"items", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_getchannel", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_info", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_setoptions", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"job_start", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"job_status", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"job_stop", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"join", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"js_decode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"js_encode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"json_decode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"json_encode", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"keys", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"last_buffer_nr", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"len", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"libcall", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"libcallnr", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"line", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"line2byte", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"lispindent", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"list2str", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"listener_add", "min_argc":1, "max_argc":2, "argtype":"FEARG_2"}, {"name":"listener_flush", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"listener_remove", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"localtime", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"log", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"log10", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"luaeval", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"map", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"maparg", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"mapcheck", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"match", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchadd", "min_argc":2, "max_argc":5, "argtype":"FEARG_1"}, {"name":"matchaddpos", "min_argc":2, "max_argc":5, "argtype":"FEARG_1"}, {"name":"matcharg", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"matchdelete", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"matchend", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchlist", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchstr", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"matchstrpos", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"max", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"min", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"mkdir", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"mode", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"mzeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"nextnonblank", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"nr2char", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"or", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"pathshorten", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"perleval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_atcursor", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_beval", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_clear", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"popup_close", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_create", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_dialog", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_filter_menu", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"popup_filter_yesno", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"popup_findinfo", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"popup_findpreview", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"popup_getoptions", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_getpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_hide", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"popup_locate", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"popup_menu", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_move", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_notification", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_setoptions", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_settext", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"popup_show", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pow", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prevnonblank", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"printf", "min_argc":1, "max_argc":19, "argtype":"FEARG_2"}, {"name":"prompt_setcallback", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prompt_setinterrupt", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prompt_setprompt", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_add", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"prop_clear", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"prop_find", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_list", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_remove", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"prop_type_add", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_change", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_delete", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_get", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"prop_type_list", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pum_getpos", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"pumvisible", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"py3eval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pyeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"pyxeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"rand", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"range", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"readdir", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"readfile", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"reg_executing", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"reg_recording", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"reltime", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"reltimefloat", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"reltimestr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"remote_expr", "min_argc":2, "max_argc":4, "argtype":"FEARG_1"}, {"name":"remote_foreground", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"remote_peek", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"remote_read", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"remote_send", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"remote_startserver", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"remove", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"rename", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"repeat", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"resolve", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"reverse", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"round", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"rubyeval", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"screenattr", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"screenchar", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"screenchars", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"screencol", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"screenpos", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"screenrow", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"screenstring", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"search", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"searchdecl", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"searchpair", "min_argc":3, "max_argc":7, "argtype":"0"}, {"name":"searchpairpos", "min_argc":3, "max_argc":7, "argtype":"0"}, {"name":"searchpos", "min_argc":1, "max_argc":4, "argtype":"FEARG_1"}, {"name":"server2client", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"serverlist", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"setbufline", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"setbufvar", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"setcharsearch", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"setcmdpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"setenv", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"setfperm", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"setline", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"setloclist", "min_argc":2, "max_argc":4, "argtype":"FEARG_2"}, {"name":"setmatches", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"setpos", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"setqflist", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"setreg", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"settabvar", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"settabwinvar", "min_argc":4, "max_argc":4, "argtype":"FEARG_4"}, {"name":"settagstack", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"setwinvar", "min_argc":3, "max_argc":3, "argtype":"FEARG_3"}, {"name":"sha256", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"shellescape", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"shiftwidth", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_define", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sign_getdefined", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_getplaced", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sign_jump", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"sign_place", "min_argc":4, "max_argc":5, "argtype":"FEARG_1"}, {"name":"sign_placelist", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_undefine", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sign_unplace", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sign_unplacelist", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"simplify", "min_argc":1, "max_argc":1, "argtype":"0"}, {"name":"sin", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sinh", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"sort", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"sound_clear", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"sound_playevent", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sound_playfile", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"sound_stop", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"soundfold", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"spellbadword", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"spellsuggest", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"split", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"sqrt", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"srand", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"state", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"str2float", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"str2list", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"str2nr", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strcharpart", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strchars", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strdisplaywidth", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strftime", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strgetchar", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"stridx", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"string", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"strlen", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"strpart", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strptime", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"strridx", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"strtrans", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"strwidth", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"submatch", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"substitute", "min_argc":4, "max_argc":4, "argtype":"FEARG_1"}, {"name":"swapinfo", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"swapname", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"synID", "min_argc":3, "max_argc":3, "argtype":"0"}, {"name":"synIDattr", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"synIDtrans", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"synconcealed", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"synstack", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"system", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"systemlist", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"tabpagebuflist", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tabpagenr", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"tabpagewinnr", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"tagfiles", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"taglist", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"tan", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tanh", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tempname", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"term_dumpdiff", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"term_dumpload", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_dumpwrite", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"term_getaltscreen", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getansicolors", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getattr", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_getcursor", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getjob", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getline", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_getscrolled", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getsize", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_getstatus", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_gettitle", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"term_gettty", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_list", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"term_scrape", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_sendkeys", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setansicolors", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setapi", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setkill", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setrestore", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_setsize", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"term_start", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"term_wait", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"test_alloc_fail", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"test_autochdir", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_feedinput", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_garbagecollect_now", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_garbagecollect_soon", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_getvalue", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_ignore_error", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_null_blob", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_channel", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_dict", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_job", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_list", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_partial", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_null_string", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_option_not_set", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_override", "min_argc":2, "max_argc":2, "argtype":"FEARG_2"}, {"name":"test_refcount", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_scrollbar", "min_argc":3, "max_argc":3, "argtype":"FEARG_2"}, {"name":"test_setmouse", "min_argc":2, "max_argc":2, "argtype":"0"}, {"name":"test_settime", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_srand_seed", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"test_unknown", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"test_void", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"timer_info", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"timer_pause", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}, {"name":"timer_start", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"timer_stop", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"timer_stopall", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"tolower", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"toupper", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"tr", "min_argc":3, "max_argc":3, "argtype":"FEARG_1"}, {"name":"trim", "min_argc":1, "max_argc":2, "argtype":"FEARG_1"}, {"name":"trunc", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"type", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"undofile", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"undotree", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"uniq", "min_argc":1, "max_argc":3, "argtype":"FEARG_1"}, {"name":"values", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"virtcol", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"visualmode", "min_argc":0, "max_argc":1, "argtype":"0"}, {"name":"wildmenumode", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"win_execute", "min_argc":2, "max_argc":3, "argtype":"FEARG_2"}, {"name":"win_findbuf", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_getid", "min_argc":0, "max_argc":2, "argtype":"FEARG_1"}, {"name":"win_gettype", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_gotoid", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_id2tabwin", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_id2win", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_screenpos", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"win_splitmove", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"winbufnr", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"wincol", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"windowsversion", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winheight", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winlayout", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winline", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winnr", "min_argc":0, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winrestcmd", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winrestview", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"winsaveview", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"winwidth", "min_argc":1, "max_argc":1, "argtype":"FEARG_1"}, {"name":"wordcount", "min_argc":0, "max_argc":0, "argtype":"0"}, {"name":"writefile", "min_argc":2, "max_argc":3, "argtype":"FEARG_1"}, {"name":"xor", "min_argc":2, "max_argc":2, "argtype":"FEARG_1"}];
9495function ExprTokenizer() { this.__init__.apply(this, arguments); }
9496ExprTokenizer.prototype.__init__ = function(reader) {
9497 this.reader = reader;
9498 this.cache = {};
9499}
9500
9501ExprTokenizer.prototype.token = function(type, value, pos) {
9502 return {"type":type, "value":value, "pos":pos};
9503}
9504
9505ExprTokenizer.prototype.peek = function() {
9506 var pos = this.reader.tell();
9507 var r = this.get();
9508 this.reader.seek_set(pos);
9509 return r;
9510}
9511
9512ExprTokenizer.prototype.get = function() {
9513 // FIXME: remove dirty hack
9514 if (viml_has_key(this.cache, this.reader.tell())) {
9515 var x = this.cache[this.reader.tell()];
9516 this.reader.seek_set(x[0]);
9517 return x[1];
9518 }
9519 var pos = this.reader.tell();
9520 this.reader.skip_white();
9521 var r = this.get2();
9522 this.cache[pos] = [this.reader.tell(), r];
9523 return r;
9524}
9525
9526ExprTokenizer.prototype.get2 = function() {
9527 var r = this.reader;
9528 var pos = r.getpos();
9529 var c = r.peek();
9530 if (c == "<EOF>") {
9531 return this.token(TOKEN_EOF, c, pos);
9532 }
9533 else if (c == "<EOL>") {
9534 r.seek_cur(1);
9535 return this.token(TOKEN_EOL, c, pos);
9536 }
9537 else if (iswhite(c)) {
9538 var s = r.read_white();
9539 return this.token(TOKEN_SPACE, s, pos);
9540 }
9541 else if (c == "0" && (r.p(1) == "X" || r.p(1) == "x") && isxdigit(r.p(2))) {
9542 var s = r.getn(3);
9543 s += r.read_xdigit();
9544 return this.token(TOKEN_NUMBER, s, pos);
9545 }
9546 else if (c == "0" && (r.p(1) == "B" || r.p(1) == "b") && (r.p(2) == "0" || r.p(2) == "1")) {
9547 var s = r.getn(3);
9548 s += r.read_bdigit();
9549 return this.token(TOKEN_NUMBER, s, pos);
9550 }
9551 else if (c == "0" && (r.p(1) == "Z" || r.p(1) == "z") && r.p(2) != ".") {
9552 var s = r.getn(2);
9553 s += r.read_blob();
9554 return this.token(TOKEN_BLOB, s, pos);
9555 }
9556 else if (isdigit(c)) {
9557 var s = r.read_digit();
9558 if (r.p(0) == "." && isdigit(r.p(1))) {
9559 s += r.getn(1);
9560 s += r.read_digit();
9561 if ((r.p(0) == "E" || r.p(0) == "e") && (isdigit(r.p(1)) || (r.p(1) == "-" || r.p(1) == "+") && isdigit(r.p(2)))) {
9562 s += r.getn(2);
9563 s += r.read_digit();
9564 }
9565 }
9566 return this.token(TOKEN_NUMBER, s, pos);
9567 }
9568 else if (c == "i" && r.p(1) == "s" && !isidc(r.p(2))) {
9569 if (r.p(2) == "?") {
9570 r.seek_cur(3);
9571 return this.token(TOKEN_ISCI, "is?", pos);
9572 }
9573 else if (r.p(2) == "#") {
9574 r.seek_cur(3);
9575 return this.token(TOKEN_ISCS, "is#", pos);
9576 }
9577 else {
9578 r.seek_cur(2);
9579 return this.token(TOKEN_IS, "is", pos);
9580 }
9581 }
9582 else if (c == "i" && r.p(1) == "s" && r.p(2) == "n" && r.p(3) == "o" && r.p(4) == "t" && !isidc(r.p(5))) {
9583 if (r.p(5) == "?") {
9584 r.seek_cur(6);
9585 return this.token(TOKEN_ISNOTCI, "isnot?", pos);
9586 }
9587 else if (r.p(5) == "#") {
9588 r.seek_cur(6);
9589 return this.token(TOKEN_ISNOTCS, "isnot#", pos);
9590 }
9591 else {
9592 r.seek_cur(5);
9593 return this.token(TOKEN_ISNOT, "isnot", pos);
9594 }
9595 }
9596 else if (isnamec1(c)) {
9597 var s = r.read_name();
9598 return this.token(TOKEN_IDENTIFIER, s, pos);
9599 }
9600 else if (c == "|" && r.p(1) == "|") {
9601 r.seek_cur(2);
9602 return this.token(TOKEN_OROR, "||", pos);
9603 }
9604 else if (c == "&" && r.p(1) == "&") {
9605 r.seek_cur(2);
9606 return this.token(TOKEN_ANDAND, "&&", pos);
9607 }
9608 else if (c == "=" && r.p(1) == "=") {
9609 if (r.p(2) == "?") {
9610 r.seek_cur(3);
9611 return this.token(TOKEN_EQEQCI, "==?", pos);
9612 }
9613 else if (r.p(2) == "#") {
9614 r.seek_cur(3);
9615 return this.token(TOKEN_EQEQCS, "==#", pos);
9616 }
9617 else {
9618 r.seek_cur(2);
9619 return this.token(TOKEN_EQEQ, "==", pos);
9620 }
9621 }
9622 else if (c == "!" && r.p(1) == "=") {
9623 if (r.p(2) == "?") {
9624 r.seek_cur(3);
9625 return this.token(TOKEN_NEQCI, "!=?", pos);
9626 }
9627 else if (r.p(2) == "#") {
9628 r.seek_cur(3);
9629 return this.token(TOKEN_NEQCS, "!=#", pos);
9630 }
9631 else {
9632 r.seek_cur(2);
9633 return this.token(TOKEN_NEQ, "!=", pos);
9634 }
9635 }
9636 else if (c == ">" && r.p(1) == "=") {
9637 if (r.p(2) == "?") {
9638 r.seek_cur(3);
9639 return this.token(TOKEN_GTEQCI, ">=?", pos);
9640 }
9641 else if (r.p(2) == "#") {
9642 r.seek_cur(3);
9643 return this.token(TOKEN_GTEQCS, ">=#", pos);
9644 }
9645 else {
9646 r.seek_cur(2);
9647 return this.token(TOKEN_GTEQ, ">=", pos);
9648 }
9649 }
9650 else if (c == "<" && r.p(1) == "=") {
9651 if (r.p(2) == "?") {
9652 r.seek_cur(3);
9653 return this.token(TOKEN_LTEQCI, "<=?", pos);
9654 }
9655 else if (r.p(2) == "#") {
9656 r.seek_cur(3);
9657 return this.token(TOKEN_LTEQCS, "<=#", pos);
9658 }
9659 else {
9660 r.seek_cur(2);
9661 return this.token(TOKEN_LTEQ, "<=", pos);
9662 }
9663 }
9664 else if (c == "=" && r.p(1) == "~") {
9665 if (r.p(2) == "?") {
9666 r.seek_cur(3);
9667 return this.token(TOKEN_MATCHCI, "=~?", pos);
9668 }
9669 else if (r.p(2) == "#") {
9670 r.seek_cur(3);
9671 return this.token(TOKEN_MATCHCS, "=~#", pos);
9672 }
9673 else {
9674 r.seek_cur(2);
9675 return this.token(TOKEN_MATCH, "=~", pos);
9676 }
9677 }
9678 else if (c == "!" && r.p(1) == "~") {
9679 if (r.p(2) == "?") {
9680 r.seek_cur(3);
9681 return this.token(TOKEN_NOMATCHCI, "!~?", pos);
9682 }
9683 else if (r.p(2) == "#") {
9684 r.seek_cur(3);
9685 return this.token(TOKEN_NOMATCHCS, "!~#", pos);
9686 }
9687 else {
9688 r.seek_cur(2);
9689 return this.token(TOKEN_NOMATCH, "!~", pos);
9690 }
9691 }
9692 else if (c == ">") {
9693 if (r.p(1) == "?") {
9694 r.seek_cur(2);
9695 return this.token(TOKEN_GTCI, ">?", pos);
9696 }
9697 else if (r.p(1) == "#") {
9698 r.seek_cur(2);
9699 return this.token(TOKEN_GTCS, ">#", pos);
9700 }
9701 else {
9702 r.seek_cur(1);
9703 return this.token(TOKEN_GT, ">", pos);
9704 }
9705 }
9706 else if (c == "<") {
9707 if (r.p(1) == "?") {
9708 r.seek_cur(2);
9709 return this.token(TOKEN_LTCI, "<?", pos);
9710 }
9711 else if (r.p(1) == "#") {
9712 r.seek_cur(2);
9713 return this.token(TOKEN_LTCS, "<#", pos);
9714 }
9715 else {
9716 r.seek_cur(1);
9717 return this.token(TOKEN_LT, "<", pos);
9718 }
9719 }
9720 else if (c == "+") {
9721 r.seek_cur(1);
9722 return this.token(TOKEN_PLUS, "+", pos);
9723 }
9724 else if (c == "-") {
9725 if (r.p(1) == ">") {
9726 r.seek_cur(2);
9727 return this.token(TOKEN_ARROW, "->", pos);
9728 }
9729 else {
9730 r.seek_cur(1);
9731 return this.token(TOKEN_MINUS, "-", pos);
9732 }
9733 }
9734 else if (c == ".") {
9735 if (r.p(1) == "." && r.p(2) == ".") {
9736 r.seek_cur(3);
9737 return this.token(TOKEN_DOTDOTDOT, "...", pos);
9738 }
9739 else if (r.p(1) == ".") {
9740 r.seek_cur(2);
9741 return this.token(TOKEN_DOTDOT, "..", pos);
9742 // TODO check scriptversion?
9743 }
9744 else {
9745 r.seek_cur(1);
9746 return this.token(TOKEN_DOT, ".", pos);
9747 // TODO check scriptversion?
9748 }
9749 }
9750 else if (c == "*") {
9751 r.seek_cur(1);
9752 return this.token(TOKEN_STAR, "*", pos);
9753 }
9754 else if (c == "/") {
9755 r.seek_cur(1);
9756 return this.token(TOKEN_SLASH, "/", pos);
9757 }
9758 else if (c == "%") {
9759 r.seek_cur(1);
9760 return this.token(TOKEN_PERCENT, "%", pos);
9761 }
9762 else if (c == "!") {
9763 r.seek_cur(1);
9764 return this.token(TOKEN_NOT, "!", pos);
9765 }
9766 else if (c == "?") {
9767 r.seek_cur(1);
9768 return this.token(TOKEN_QUESTION, "?", pos);
9769 }
9770 else if (c == ":") {
9771 r.seek_cur(1);
9772 return this.token(TOKEN_COLON, ":", pos);
9773 }
9774 else if (c == "#") {
9775 if (r.p(1) == "{") {
9776 r.seek_cur(2);
9777 return this.token(TOKEN_LITCOPEN, "#{", pos);
9778 }
9779 else {
9780 r.seek_cur(1);
9781 return this.token(TOKEN_SHARP, "#", pos);
9782 }
9783 }
9784 else if (c == "(") {
9785 r.seek_cur(1);
9786 return this.token(TOKEN_POPEN, "(", pos);
9787 }
9788 else if (c == ")") {
9789 r.seek_cur(1);
9790 return this.token(TOKEN_PCLOSE, ")", pos);
9791 }
9792 else if (c == "[") {
9793 r.seek_cur(1);
9794 return this.token(TOKEN_SQOPEN, "[", pos);
9795 }
9796 else if (c == "]") {
9797 r.seek_cur(1);
9798 return this.token(TOKEN_SQCLOSE, "]", pos);
9799 }
9800 else if (c == "{") {
9801 r.seek_cur(1);
9802 return this.token(TOKEN_COPEN, "{", pos);
9803 }
9804 else if (c == "}") {
9805 r.seek_cur(1);
9806 return this.token(TOKEN_CCLOSE, "}", pos);
9807 }
9808 else if (c == ",") {
9809 r.seek_cur(1);
9810 return this.token(TOKEN_COMMA, ",", pos);
9811 }
9812 else if (c == "'") {
9813 r.seek_cur(1);
9814 return this.token(TOKEN_SQUOTE, "'", pos);
9815 }
9816 else if (c == "\"") {
9817 r.seek_cur(1);
9818 return this.token(TOKEN_DQUOTE, "\"", pos);
9819 }
9820 else if (c == "$") {
9821 var s = r.getn(1);
9822 s += r.read_word();
9823 return this.token(TOKEN_ENV, s, pos);
9824 }
9825 else if (c == "@") {
9826 // @<EOL> is treated as @"
9827 return this.token(TOKEN_REG, r.getn(2), pos);
9828 }
9829 else if (c == "&") {
9830 var s = "";
9831 if ((r.p(1) == "g" || r.p(1) == "l") && r.p(2) == ":") {
9832 var s = r.getn(3) + r.read_word();
9833 }
9834 else {
9835 var s = r.getn(1) + r.read_word();
9836 }
9837 return this.token(TOKEN_OPTION, s, pos);
9838 }
9839 else if (c == "=") {
9840 r.seek_cur(1);
9841 return this.token(TOKEN_EQ, "=", pos);
9842 }
9843 else if (c == "|") {
9844 r.seek_cur(1);
9845 return this.token(TOKEN_OR, "|", pos);
9846 }
9847 else if (c == ";") {
9848 r.seek_cur(1);
9849 return this.token(TOKEN_SEMICOLON, ";", pos);
9850 }
9851 else if (c == "`") {
9852 r.seek_cur(1);
9853 return this.token(TOKEN_BACKTICK, "`", pos);
9854 }
9855 else {
9856 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9857 }
9858}
9859
9860ExprTokenizer.prototype.get_sstring = function() {
9861 this.reader.skip_white();
9862 var c = this.reader.p(0);
9863 if (c != "'") {
9864 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9865 }
9866 this.reader.seek_cur(1);
9867 var s = "";
9868 while (TRUE) {
9869 var c = this.reader.p(0);
9870 if (c == "<EOF>" || c == "<EOL>") {
9871 throw Err("unexpected EOL", this.reader.getpos());
9872 }
9873 else if (c == "'") {
9874 this.reader.seek_cur(1);
9875 if (this.reader.p(0) == "'") {
9876 this.reader.seek_cur(1);
9877 s += "''";
9878 }
9879 else {
9880 break;
9881 }
9882 }
9883 else {
9884 this.reader.seek_cur(1);
9885 s += c;
9886 }
9887 }
9888 return s;
9889}
9890
9891ExprTokenizer.prototype.get_dstring = function() {
9892 this.reader.skip_white();
9893 var c = this.reader.p(0);
9894 if (c != "\"") {
9895 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9896 }
9897 this.reader.seek_cur(1);
9898 var s = "";
9899 while (TRUE) {
9900 var c = this.reader.p(0);
9901 if (c == "<EOF>" || c == "<EOL>") {
9902 throw Err("unexpectd EOL", this.reader.getpos());
9903 }
9904 else if (c == "\"") {
9905 this.reader.seek_cur(1);
9906 break;
9907 }
9908 else if (c == "\\") {
9909 this.reader.seek_cur(1);
9910 s += c;
9911 var c = this.reader.p(0);
9912 if (c == "<EOF>" || c == "<EOL>") {
9913 throw Err("ExprTokenizer: unexpected EOL", this.reader.getpos());
9914 }
9915 this.reader.seek_cur(1);
9916 s += c;
9917 }
9918 else {
9919 this.reader.seek_cur(1);
9920 s += c;
9921 }
9922 }
9923 return s;
9924}
9925
9926ExprTokenizer.prototype.parse_dict_literal_key = function() {
9927 this.reader.skip_white();
9928 var c = this.reader.peek();
9929 if (!isalnum(c) && c != "_" && c != "-") {
9930 throw Err(viml_printf("unexpected character: %s", c), this.reader.getpos());
9931 }
9932 var node = Node(NODE_STRING);
9933 var s = c;
9934 this.reader.seek_cur(1);
9935 node.pos = this.reader.getpos();
9936 while (TRUE) {
9937 var c = this.reader.p(0);
9938 if (c == "<EOF>" || c == "<EOL>") {
9939 throw Err("unexpectd EOL", this.reader.getpos());
9940 }
9941 if (!isalnum(c) && c != "_" && c != "-") {
9942 break;
9943 }
9944 this.reader.seek_cur(1);
9945 s += c;
9946 }
9947 node.value = "'" + s + "'";
9948 return node;
9949}
9950
9951function ExprParser() { this.__init__.apply(this, arguments); }
9952ExprParser.prototype.__init__ = function(reader) {
9953 this.reader = reader;
9954 this.tokenizer = new ExprTokenizer(reader);
9955}
9956
9957ExprParser.prototype.parse = function() {
9958 return this.parse_expr1();
9959}
9960
9961// expr1: expr2 ? expr1 : expr1
9962ExprParser.prototype.parse_expr1 = function() {
9963 var left = this.parse_expr2();
9964 var pos = this.reader.tell();
9965 var token = this.tokenizer.get();
9966 if (token.type == TOKEN_QUESTION) {
9967 var node = Node(NODE_TERNARY);
9968 node.pos = token.pos;
9969 node.cond = left;
9970 node.left = this.parse_expr1();
9971 var token = this.tokenizer.get();
9972 if (token.type != TOKEN_COLON) {
9973 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
9974 }
9975 node.right = this.parse_expr1();
9976 var left = node;
9977 }
9978 else {
9979 this.reader.seek_set(pos);
9980 }
9981 return left;
9982}
9983
9984// expr2: expr3 || expr3 ..
9985ExprParser.prototype.parse_expr2 = function() {
9986 var left = this.parse_expr3();
9987 while (TRUE) {
9988 var pos = this.reader.tell();
9989 var token = this.tokenizer.get();
9990 if (token.type == TOKEN_OROR) {
9991 var node = Node(NODE_OR);
9992 node.pos = token.pos;
9993 node.left = left;
9994 node.right = this.parse_expr3();
9995 var left = node;
9996 }
9997 else {
9998 this.reader.seek_set(pos);
9999 break;
10000 }
10001 }
10002 return left;
10003}
10004
10005// expr3: expr4 && expr4
10006ExprParser.prototype.parse_expr3 = function() {
10007 var left = this.parse_expr4();
10008 while (TRUE) {
10009 var pos = this.reader.tell();
10010 var token = this.tokenizer.get();
10011 if (token.type == TOKEN_ANDAND) {
10012 var node = Node(NODE_AND);
10013 node.pos = token.pos;
10014 node.left = left;
10015 node.right = this.parse_expr4();
10016 var left = node;
10017 }
10018 else {
10019 this.reader.seek_set(pos);
10020 break;
10021 }
10022 }
10023 return left;
10024}
10025
10026// expr4: expr5 == expr5
10027// expr5 != expr5
10028// expr5 > expr5
10029// expr5 >= expr5
10030// expr5 < expr5
10031// expr5 <= expr5
10032// expr5 =~ expr5
10033// expr5 !~ expr5
10034//
10035// expr5 ==? expr5
10036// expr5 ==# expr5
10037// etc.
10038//
10039// expr5 is expr5
10040// expr5 isnot expr5
10041ExprParser.prototype.parse_expr4 = function() {
10042 var left = this.parse_expr5();
10043 var pos = this.reader.tell();
10044 var token = this.tokenizer.get();
10045 if (token.type == TOKEN_EQEQ) {
10046 var node = Node(NODE_EQUAL);
10047 node.pos = token.pos;
10048 node.left = left;
10049 node.right = this.parse_expr5();
10050 var left = node;
10051 }
10052 else if (token.type == TOKEN_EQEQCI) {
10053 var node = Node(NODE_EQUALCI);
10054 node.pos = token.pos;
10055 node.left = left;
10056 node.right = this.parse_expr5();
10057 var left = node;
10058 }
10059 else if (token.type == TOKEN_EQEQCS) {
10060 var node = Node(NODE_EQUALCS);
10061 node.pos = token.pos;
10062 node.left = left;
10063 node.right = this.parse_expr5();
10064 var left = node;
10065 }
10066 else if (token.type == TOKEN_NEQ) {
10067 var node = Node(NODE_NEQUAL);
10068 node.pos = token.pos;
10069 node.left = left;
10070 node.right = this.parse_expr5();
10071 var left = node;
10072 }
10073 else if (token.type == TOKEN_NEQCI) {
10074 var node = Node(NODE_NEQUALCI);
10075 node.pos = token.pos;
10076 node.left = left;
10077 node.right = this.parse_expr5();
10078 var left = node;
10079 }
10080 else if (token.type == TOKEN_NEQCS) {
10081 var node = Node(NODE_NEQUALCS);
10082 node.pos = token.pos;
10083 node.left = left;
10084 node.right = this.parse_expr5();
10085 var left = node;
10086 }
10087 else if (token.type == TOKEN_GT) {
10088 var node = Node(NODE_GREATER);
10089 node.pos = token.pos;
10090 node.left = left;
10091 node.right = this.parse_expr5();
10092 var left = node;
10093 }
10094 else if (token.type == TOKEN_GTCI) {
10095 var node = Node(NODE_GREATERCI);
10096 node.pos = token.pos;
10097 node.left = left;
10098 node.right = this.parse_expr5();
10099 var left = node;
10100 }
10101 else if (token.type == TOKEN_GTCS) {
10102 var node = Node(NODE_GREATERCS);
10103 node.pos = token.pos;
10104 node.left = left;
10105 node.right = this.parse_expr5();
10106 var left = node;
10107 }
10108 else if (token.type == TOKEN_GTEQ) {
10109 var node = Node(NODE_GEQUAL);
10110 node.pos = token.pos;
10111 node.left = left;
10112 node.right = this.parse_expr5();
10113 var left = node;
10114 }
10115 else if (token.type == TOKEN_GTEQCI) {
10116 var node = Node(NODE_GEQUALCI);
10117 node.pos = token.pos;
10118 node.left = left;
10119 node.right = this.parse_expr5();
10120 var left = node;
10121 }
10122 else if (token.type == TOKEN_GTEQCS) {
10123 var node = Node(NODE_GEQUALCS);
10124 node.pos = token.pos;
10125 node.left = left;
10126 node.right = this.parse_expr5();
10127 var left = node;
10128 }
10129 else if (token.type == TOKEN_LT) {
10130 var node = Node(NODE_SMALLER);
10131 node.pos = token.pos;
10132 node.left = left;
10133 node.right = this.parse_expr5();
10134 var left = node;
10135 }
10136 else if (token.type == TOKEN_LTCI) {
10137 var node = Node(NODE_SMALLERCI);
10138 node.pos = token.pos;
10139 node.left = left;
10140 node.right = this.parse_expr5();
10141 var left = node;
10142 }
10143 else if (token.type == TOKEN_LTCS) {
10144 var node = Node(NODE_SMALLERCS);
10145 node.pos = token.pos;
10146 node.left = left;
10147 node.right = this.parse_expr5();
10148 var left = node;
10149 }
10150 else if (token.type == TOKEN_LTEQ) {
10151 var node = Node(NODE_SEQUAL);
10152 node.pos = token.pos;
10153 node.left = left;
10154 node.right = this.parse_expr5();
10155 var left = node;
10156 }
10157 else if (token.type == TOKEN_LTEQCI) {
10158 var node = Node(NODE_SEQUALCI);
10159 node.pos = token.pos;
10160 node.left = left;
10161 node.right = this.parse_expr5();
10162 var left = node;
10163 }
10164 else if (token.type == TOKEN_LTEQCS) {
10165 var node = Node(NODE_SEQUALCS);
10166 node.pos = token.pos;
10167 node.left = left;
10168 node.right = this.parse_expr5();
10169 var left = node;
10170 }
10171 else if (token.type == TOKEN_MATCH) {
10172 var node = Node(NODE_MATCH);
10173 node.pos = token.pos;
10174 node.left = left;
10175 node.right = this.parse_expr5();
10176 var left = node;
10177 }
10178 else if (token.type == TOKEN_MATCHCI) {
10179 var node = Node(NODE_MATCHCI);
10180 node.pos = token.pos;
10181 node.left = left;
10182 node.right = this.parse_expr5();
10183 var left = node;
10184 }
10185 else if (token.type == TOKEN_MATCHCS) {
10186 var node = Node(NODE_MATCHCS);
10187 node.pos = token.pos;
10188 node.left = left;
10189 node.right = this.parse_expr5();
10190 var left = node;
10191 }
10192 else if (token.type == TOKEN_NOMATCH) {
10193 var node = Node(NODE_NOMATCH);
10194 node.pos = token.pos;
10195 node.left = left;
10196 node.right = this.parse_expr5();
10197 var left = node;
10198 }
10199 else if (token.type == TOKEN_NOMATCHCI) {
10200 var node = Node(NODE_NOMATCHCI);
10201 node.pos = token.pos;
10202 node.left = left;
10203 node.right = this.parse_expr5();
10204 var left = node;
10205 }
10206 else if (token.type == TOKEN_NOMATCHCS) {
10207 var node = Node(NODE_NOMATCHCS);
10208 node.pos = token.pos;
10209 node.left = left;
10210 node.right = this.parse_expr5();
10211 var left = node;
10212 }
10213 else if (token.type == TOKEN_IS) {
10214 var node = Node(NODE_IS);
10215 node.pos = token.pos;
10216 node.left = left;
10217 node.right = this.parse_expr5();
10218 var left = node;
10219 }
10220 else if (token.type == TOKEN_ISCI) {
10221 var node = Node(NODE_ISCI);
10222 node.pos = token.pos;
10223 node.left = left;
10224 node.right = this.parse_expr5();
10225 var left = node;
10226 }
10227 else if (token.type == TOKEN_ISCS) {
10228 var node = Node(NODE_ISCS);
10229 node.pos = token.pos;
10230 node.left = left;
10231 node.right = this.parse_expr5();
10232 var left = node;
10233 }
10234 else if (token.type == TOKEN_ISNOT) {
10235 var node = Node(NODE_ISNOT);
10236 node.pos = token.pos;
10237 node.left = left;
10238 node.right = this.parse_expr5();
10239 var left = node;
10240 }
10241 else if (token.type == TOKEN_ISNOTCI) {
10242 var node = Node(NODE_ISNOTCI);
10243 node.pos = token.pos;
10244 node.left = left;
10245 node.right = this.parse_expr5();
10246 var left = node;
10247 }
10248 else if (token.type == TOKEN_ISNOTCS) {
10249 var node = Node(NODE_ISNOTCS);
10250 node.pos = token.pos;
10251 node.left = left;
10252 node.right = this.parse_expr5();
10253 var left = node;
10254 }
10255 else {
10256 this.reader.seek_set(pos);
10257 }
10258 return left;
10259}
10260
10261// expr5: expr6 + expr6 ..
10262// expr6 - expr6 ..
10263// expr6 . expr6 ..
10264// expr6 .. expr6 ..
10265ExprParser.prototype.parse_expr5 = function() {
10266 var left = this.parse_expr6();
10267 while (TRUE) {
10268 var pos = this.reader.tell();
10269 var token = this.tokenizer.get();
10270 if (token.type == TOKEN_PLUS) {
10271 var node = Node(NODE_ADD);
10272 node.pos = token.pos;
10273 node.left = left;
10274 node.right = this.parse_expr6();
10275 var left = node;
10276 }
10277 else if (token.type == TOKEN_MINUS) {
10278 var node = Node(NODE_SUBTRACT);
10279 node.pos = token.pos;
10280 node.left = left;
10281 node.right = this.parse_expr6();
10282 var left = node;
10283 }
10284 else if (token.type == TOKEN_DOTDOT) {
10285 // TODO check scriptversion?
10286 var node = Node(NODE_CONCAT);
10287 node.pos = token.pos;
10288 node.left = left;
10289 node.right = this.parse_expr6();
10290 var left = node;
10291 }
10292 else if (token.type == TOKEN_DOT) {
10293 // TODO check scriptversion?
10294 var node = Node(NODE_CONCAT);
10295 node.pos = token.pos;
10296 node.left = left;
10297 node.right = this.parse_expr6();
10298 var left = node;
10299 }
10300 else {
10301 this.reader.seek_set(pos);
10302 break;
10303 }
10304 }
10305 return left;
10306}
10307
10308// expr6: expr7 * expr7 ..
10309// expr7 / expr7 ..
10310// expr7 % expr7 ..
10311ExprParser.prototype.parse_expr6 = function() {
10312 var left = this.parse_expr7();
10313 while (TRUE) {
10314 var pos = this.reader.tell();
10315 var token = this.tokenizer.get();
10316 if (token.type == TOKEN_STAR) {
10317 var node = Node(NODE_MULTIPLY);
10318 node.pos = token.pos;
10319 node.left = left;
10320 node.right = this.parse_expr7();
10321 var left = node;
10322 }
10323 else if (token.type == TOKEN_SLASH) {
10324 var node = Node(NODE_DIVIDE);
10325 node.pos = token.pos;
10326 node.left = left;
10327 node.right = this.parse_expr7();
10328 var left = node;
10329 }
10330 else if (token.type == TOKEN_PERCENT) {
10331 var node = Node(NODE_REMAINDER);
10332 node.pos = token.pos;
10333 node.left = left;
10334 node.right = this.parse_expr7();
10335 var left = node;
10336 }
10337 else {
10338 this.reader.seek_set(pos);
10339 break;
10340 }
10341 }
10342 return left;
10343}
10344
10345// expr7: ! expr7
10346// - expr7
10347// + expr7
10348ExprParser.prototype.parse_expr7 = function() {
10349 var pos = this.reader.tell();
10350 var token = this.tokenizer.get();
10351 if (token.type == TOKEN_NOT) {
10352 var node = Node(NODE_NOT);
10353 node.pos = token.pos;
10354 node.left = this.parse_expr7();
10355 return node;
10356 }
10357 else if (token.type == TOKEN_MINUS) {
10358 var node = Node(NODE_MINUS);
10359 node.pos = token.pos;
10360 node.left = this.parse_expr7();
10361 return node;
10362 }
10363 else if (token.type == TOKEN_PLUS) {
10364 var node = Node(NODE_PLUS);
10365 node.pos = token.pos;
10366 node.left = this.parse_expr7();
10367 return node;
10368 }
10369 else {
10370 this.reader.seek_set(pos);
10371 var node = this.parse_expr8();
10372 return node;
10373 }
10374}
10375
10376// expr8: expr8[expr1]
10377// expr8[expr1 : expr1]
10378// expr8.name
10379// expr8->name(expr1, ...)
10380// expr8->s:user_func(expr1, ...)
10381// expr8->{lambda}(expr1, ...)
10382// expr8(expr1, ...)
10383ExprParser.prototype.parse_expr8 = function() {
10384 var left = this.parse_expr9();
10385 while (TRUE) {
10386 var pos = this.reader.tell();
10387 var c = this.reader.peek();
10388 var token = this.tokenizer.get();
10389 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
10390 var npos = token.pos;
10391 if (this.tokenizer.peek().type == TOKEN_COLON) {
10392 this.tokenizer.get();
10393 var node = Node(NODE_SLICE);
10394 node.pos = npos;
10395 node.left = left;
10396 node.rlist = [NIL, NIL];
10397 var token = this.tokenizer.peek();
10398 if (token.type != TOKEN_SQCLOSE) {
10399 node.rlist[1] = this.parse_expr1();
10400 }
10401 var token = this.tokenizer.get();
10402 if (token.type != TOKEN_SQCLOSE) {
10403 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10404 }
10405 var left = node;
10406 }
10407 else {
10408 var right = this.parse_expr1();
10409 if (this.tokenizer.peek().type == TOKEN_COLON) {
10410 this.tokenizer.get();
10411 var node = Node(NODE_SLICE);
10412 node.pos = npos;
10413 node.left = left;
10414 node.rlist = [right, NIL];
10415 var token = this.tokenizer.peek();
10416 if (token.type != TOKEN_SQCLOSE) {
10417 node.rlist[1] = this.parse_expr1();
10418 }
10419 var token = this.tokenizer.get();
10420 if (token.type != TOKEN_SQCLOSE) {
10421 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10422 }
10423 var left = node;
10424 }
10425 else {
10426 var node = Node(NODE_SUBSCRIPT);
10427 node.pos = npos;
10428 node.left = left;
10429 node.right = right;
10430 var token = this.tokenizer.get();
10431 if (token.type != TOKEN_SQCLOSE) {
10432 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10433 }
10434 var left = node;
10435 }
10436 }
10437 delete node;
10438 }
10439 else if (token.type == TOKEN_ARROW) {
10440 var funcname_or_lambda = this.parse_expr9();
10441 var token = this.tokenizer.get();
10442 if (token.type != TOKEN_POPEN) {
10443 throw Err("E107: Missing parentheses: lambda", token.pos);
10444 }
10445 var right = Node(NODE_CALL);
10446 right.pos = token.pos;
10447 right.left = funcname_or_lambda;
10448 right.rlist = this.parse_rlist();
10449 var node = Node(NODE_METHOD);
10450 node.pos = token.pos;
10451 node.left = left;
10452 node.right = right;
10453 var left = node;
10454 delete node;
10455 }
10456 else if (token.type == TOKEN_POPEN) {
10457 var node = Node(NODE_CALL);
10458 node.pos = token.pos;
10459 node.left = left;
10460 node.rlist = this.parse_rlist();
10461 var left = node;
10462 delete node;
10463 }
10464 else if (!iswhite(c) && token.type == TOKEN_DOT) {
10465 // TODO check scriptversion?
10466 var node = this.parse_dot(token, left);
10467 if (node === NIL) {
10468 this.reader.seek_set(pos);
10469 break;
10470 }
10471 var left = node;
10472 delete node;
10473 }
10474 else {
10475 this.reader.seek_set(pos);
10476 break;
10477 }
10478 }
10479 return left;
10480}
10481
10482ExprParser.prototype.parse_rlist = function() {
10483 var rlist = [];
10484 var token = this.tokenizer.peek();
10485 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
10486 this.tokenizer.get();
10487 }
10488 else {
10489 while (TRUE) {
10490 viml_add(rlist, this.parse_expr1());
10491 var token = this.tokenizer.get();
10492 if (token.type == TOKEN_COMMA) {
10493 // XXX: Vim allows foo(a, b, ). Lint should warn it.
10494 if (this.tokenizer.peek().type == TOKEN_PCLOSE) {
10495 this.tokenizer.get();
10496 break;
10497 }
10498 }
10499 else if (token.type == TOKEN_PCLOSE) {
10500 break;
10501 }
10502 else {
10503 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10504 }
10505 }
10506 }
10507 if (viml_len(rlist) > MAX_FUNC_ARGS) {
10508 // TODO: funcname E740: Too many arguments for function: %s
10509 throw Err("E740: Too many arguments for function", token.pos);
10510 }
10511 return rlist;
10512}
10513
10514// expr9: number
10515// "string"
10516// 'string'
10517// [expr1, ...]
10518// {expr1: expr1, ...}
10519// #{literal_key1: expr1, ...}
10520// {args -> expr1}
10521// &option
10522// (expr1)
10523// variable
10524// var{ria}ble
10525// $VAR
10526// @r
10527// function(expr1, ...)
10528// func{ti}on(expr1, ...)
10529ExprParser.prototype.parse_expr9 = function() {
10530 var pos = this.reader.tell();
10531 var token = this.tokenizer.get();
10532 var node = Node(-1);
10533 if (token.type == TOKEN_NUMBER) {
10534 var node = Node(NODE_NUMBER);
10535 node.pos = token.pos;
10536 node.value = token.value;
10537 }
10538 else if (token.type == TOKEN_BLOB) {
10539 var node = Node(NODE_BLOB);
10540 node.pos = token.pos;
10541 node.value = token.value;
10542 }
10543 else if (token.type == TOKEN_DQUOTE) {
10544 this.reader.seek_set(pos);
10545 var node = Node(NODE_STRING);
10546 node.pos = token.pos;
10547 node.value = "\"" + this.tokenizer.get_dstring() + "\"";
10548 }
10549 else if (token.type == TOKEN_SQUOTE) {
10550 this.reader.seek_set(pos);
10551 var node = Node(NODE_STRING);
10552 node.pos = token.pos;
10553 node.value = "'" + this.tokenizer.get_sstring() + "'";
10554 }
10555 else if (token.type == TOKEN_SQOPEN) {
10556 var node = Node(NODE_LIST);
10557 node.pos = token.pos;
10558 node.value = [];
10559 var token = this.tokenizer.peek();
10560 if (token.type == TOKEN_SQCLOSE) {
10561 this.tokenizer.get();
10562 }
10563 else {
10564 while (TRUE) {
10565 viml_add(node.value, this.parse_expr1());
10566 var token = this.tokenizer.peek();
10567 if (token.type == TOKEN_COMMA) {
10568 this.tokenizer.get();
10569 if (this.tokenizer.peek().type == TOKEN_SQCLOSE) {
10570 this.tokenizer.get();
10571 break;
10572 }
10573 }
10574 else if (token.type == TOKEN_SQCLOSE) {
10575 this.tokenizer.get();
10576 break;
10577 }
10578 else {
10579 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10580 }
10581 }
10582 }
10583 }
10584 else if (token.type == TOKEN_COPEN || token.type == TOKEN_LITCOPEN) {
10585 var is_litdict = token.type == TOKEN_LITCOPEN;
10586 var savepos = this.reader.tell();
10587 var nodepos = token.pos;
10588 var token = this.tokenizer.get();
10589 var lambda = token.type == TOKEN_ARROW;
10590 if (!lambda && !(token.type == TOKEN_SQUOTE || token.type == TOKEN_DQUOTE)) {
10591 // if the token type is stirng, we cannot peek next token and we can
10592 // assume it's not lambda.
10593 var token2 = this.tokenizer.peek();
10594 var lambda = token2.type == TOKEN_ARROW || token2.type == TOKEN_COMMA;
10595 }
10596 // fallback to dict or {expr} if true
10597 var fallback = FALSE;
10598 if (lambda) {
10599 // lambda {token,...} {->...} {token->...}
10600 var node = Node(NODE_LAMBDA);
10601 node.pos = nodepos;
10602 node.rlist = [];
10603 var named = {};
10604 while (TRUE) {
10605 if (token.type == TOKEN_ARROW) {
10606 break;
10607 }
10608 else if (token.type == TOKEN_IDENTIFIER) {
10609 if (!isargname(token.value)) {
10610 throw Err(viml_printf("E125: Illegal argument: %s", token.value), token.pos);
10611 }
10612 else if (viml_has_key(named, token.value)) {
10613 throw Err(viml_printf("E853: Duplicate argument name: %s", token.value), token.pos);
10614 }
10615 named[token.value] = 1;
10616 var varnode = Node(NODE_IDENTIFIER);
10617 varnode.pos = token.pos;
10618 varnode.value = token.value;
10619 // XXX: Vim doesn't skip white space before comma. {a ,b -> ...} => E475
10620 if (iswhite(this.reader.p(0)) && this.tokenizer.peek().type == TOKEN_COMMA) {
10621 throw Err("E475: Invalid argument: White space is not allowed before comma", this.reader.getpos());
10622 }
10623 var token = this.tokenizer.get();
10624 viml_add(node.rlist, varnode);
10625 if (token.type == TOKEN_COMMA) {
10626 // XXX: Vim allows last comma. {a, b, -> ...} => OK
10627 var token = this.tokenizer.peek();
10628 if (token.type == TOKEN_ARROW) {
10629 this.tokenizer.get();
10630 break;
10631 }
10632 }
10633 else if (token.type == TOKEN_ARROW) {
10634 break;
10635 }
10636 else {
10637 throw Err(viml_printf("unexpected token: %s, type: %d", token.value, token.type), token.pos);
10638 }
10639 }
10640 else if (token.type == TOKEN_DOTDOTDOT) {
10641 var varnode = Node(NODE_IDENTIFIER);
10642 varnode.pos = token.pos;
10643 varnode.value = token.value;
10644 viml_add(node.rlist, varnode);
10645 var token = this.tokenizer.peek();
10646 if (token.type == TOKEN_ARROW) {
10647 this.tokenizer.get();
10648 break;
10649 }
10650 else {
10651 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10652 }
10653 }
10654 else {
10655 var fallback = TRUE;
10656 break;
10657 }
10658 var token = this.tokenizer.get();
10659 }
10660 if (!fallback) {
10661 node.left = this.parse_expr1();
10662 var token = this.tokenizer.get();
10663 if (token.type != TOKEN_CCLOSE) {
10664 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10665 }
10666 return node;
10667 }
10668 }
10669 // dict
10670 var node = Node(NODE_DICT);
10671 node.pos = nodepos;
10672 node.value = [];
10673 this.reader.seek_set(savepos);
10674 var token = this.tokenizer.peek();
10675 if (token.type == TOKEN_CCLOSE) {
10676 this.tokenizer.get();
10677 return node;
10678 }
10679 while (1) {
10680 var key = is_litdict ? this.tokenizer.parse_dict_literal_key() : this.parse_expr1();
10681 var token = this.tokenizer.get();
10682 if (token.type == TOKEN_CCLOSE) {
10683 if (!viml_empty(node.value)) {
10684 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10685 }
10686 this.reader.seek_set(pos);
10687 var node = this.parse_identifier();
10688 break;
10689 }
10690 if (token.type != TOKEN_COLON) {
10691 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10692 }
10693 var val = this.parse_expr1();
10694 viml_add(node.value, [key, val]);
10695 var token = this.tokenizer.get();
10696 if (token.type == TOKEN_COMMA) {
10697 if (this.tokenizer.peek().type == TOKEN_CCLOSE) {
10698 this.tokenizer.get();
10699 break;
10700 }
10701 }
10702 else if (token.type == TOKEN_CCLOSE) {
10703 break;
10704 }
10705 else {
10706 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10707 }
10708 }
10709 return node;
10710 }
10711 else if (token.type == TOKEN_POPEN) {
10712 var node = this.parse_expr1();
10713 var token = this.tokenizer.get();
10714 if (token.type != TOKEN_PCLOSE) {
10715 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10716 }
10717 }
10718 else if (token.type == TOKEN_OPTION) {
10719 var node = Node(NODE_OPTION);
10720 node.pos = token.pos;
10721 node.value = token.value;
10722 }
10723 else if (token.type == TOKEN_IDENTIFIER) {
10724 this.reader.seek_set(pos);
10725 var node = this.parse_identifier();
10726 }
10727 else if (FALSE && (token.type == TOKEN_COLON || token.type == TOKEN_SHARP)) {
10728 // XXX: no parse error but invalid expression
10729 this.reader.seek_set(pos);
10730 var node = this.parse_identifier();
10731 }
10732 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
10733 this.reader.seek_set(pos);
10734 var node = this.parse_identifier();
10735 }
10736 else if (token.type == TOKEN_IS || token.type == TOKEN_ISCS || token.type == TOKEN_ISNOT || token.type == TOKEN_ISNOTCS) {
10737 this.reader.seek_set(pos);
10738 var node = this.parse_identifier();
10739 }
10740 else if (token.type == TOKEN_ENV) {
10741 var node = Node(NODE_ENV);
10742 node.pos = token.pos;
10743 node.value = token.value;
10744 }
10745 else if (token.type == TOKEN_REG) {
10746 var node = Node(NODE_REG);
10747 node.pos = token.pos;
10748 node.value = token.value;
10749 }
10750 else {
10751 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10752 }
10753 return node;
10754}
10755
10756// SUBSCRIPT or CONCAT
10757// dict "." [0-9A-Za-z_]+ => (subscript dict key)
10758// str "." expr6 => (concat str expr6)
10759ExprParser.prototype.parse_dot = function(token, left) {
10760 if (left.type != NODE_IDENTIFIER && left.type != NODE_CURLYNAME && left.type != NODE_DICT && left.type != NODE_SUBSCRIPT && left.type != NODE_CALL && left.type != NODE_DOT) {
10761 return NIL;
10762 }
10763 if (!iswordc(this.reader.p(0))) {
10764 return NIL;
10765 }
10766 var pos = this.reader.getpos();
10767 var name = this.reader.read_word();
10768 if (isnamec(this.reader.p(0))) {
10769 // XXX: foo is str => ok, foo is obj => invalid expression
10770 // foo.s:bar or foo.bar#baz
10771 return NIL;
10772 }
10773 var node = Node(NODE_DOT);
10774 node.pos = token.pos;
10775 node.left = left;
10776 node.right = Node(NODE_IDENTIFIER);
10777 node.right.pos = pos;
10778 node.right.value = name;
10779 return node;
10780}
10781
10782// CONCAT
10783// str ".." expr6 => (concat str expr6)
10784ExprParser.prototype.parse_concat = function(token, left) {
10785 if (left.type != NODE_IDENTIFIER && left.type != NODE_CURLYNAME && left.type != NODE_DICT && left.type != NODE_SUBSCRIPT && left.type != NODE_CALL && left.type != NODE_DOT) {
10786 return NIL;
10787 }
10788 if (!iswordc(this.reader.p(0))) {
10789 return NIL;
10790 }
10791 var pos = this.reader.getpos();
10792 var name = this.reader.read_word();
10793 if (isnamec(this.reader.p(0))) {
10794 // XXX: foo is str => ok, foo is obj => invalid expression
10795 // foo.s:bar or foo.bar#baz
10796 return NIL;
10797 }
10798 var node = Node(NODE_CONCAT);
10799 node.pos = token.pos;
10800 node.left = left;
10801 node.right = Node(NODE_IDENTIFIER);
10802 node.right.pos = pos;
10803 node.right.value = name;
10804 return node;
10805}
10806
10807ExprParser.prototype.parse_identifier = function() {
10808 this.reader.skip_white();
10809 var npos = this.reader.getpos();
10810 var curly_parts = this.parse_curly_parts();
10811 if (viml_len(curly_parts) == 1 && curly_parts[0].type == NODE_CURLYNAMEPART) {
10812 var node = Node(NODE_IDENTIFIER);
10813 node.pos = npos;
10814 node.value = curly_parts[0].value;
10815 return node;
10816 }
10817 else {
10818 var node = Node(NODE_CURLYNAME);
10819 node.pos = npos;
10820 node.value = curly_parts;
10821 return node;
10822 }
10823}
10824
10825ExprParser.prototype.parse_curly_parts = function() {
10826 var curly_parts = [];
10827 var c = this.reader.peek();
10828 var pos = this.reader.getpos();
10829 if (c == "<" && viml_equalci(this.reader.peekn(5), "<SID>")) {
10830 var name = this.reader.getn(5);
10831 var node = Node(NODE_CURLYNAMEPART);
10832 node.curly = FALSE;
10833 // Keep backword compatibility for the curly attribute
10834 node.pos = pos;
10835 node.value = name;
10836 viml_add(curly_parts, node);
10837 }
10838 while (TRUE) {
10839 var c = this.reader.peek();
10840 if (isnamec(c)) {
10841 var pos = this.reader.getpos();
10842 var name = this.reader.read_name();
10843 var node = Node(NODE_CURLYNAMEPART);
10844 node.curly = FALSE;
10845 // Keep backword compatibility for the curly attribute
10846 node.pos = pos;
10847 node.value = name;
10848 viml_add(curly_parts, node);
10849 }
10850 else if (c == "{") {
10851 this.reader.get();
10852 var pos = this.reader.getpos();
10853 var node = Node(NODE_CURLYNAMEEXPR);
10854 node.curly = TRUE;
10855 // Keep backword compatibility for the curly attribute
10856 node.pos = pos;
10857 node.value = this.parse_expr1();
10858 viml_add(curly_parts, node);
10859 this.reader.skip_white();
10860 var c = this.reader.p(0);
10861 if (c != "}") {
10862 throw Err(viml_printf("unexpected token: %s", c), this.reader.getpos());
10863 }
10864 this.reader.seek_cur(1);
10865 }
10866 else {
10867 break;
10868 }
10869 }
10870 return curly_parts;
10871}
10872
10873function LvalueParser() { ExprParser.apply(this, arguments); this.__init__.apply(this, arguments); }
10874LvalueParser.prototype = Object.create(ExprParser.prototype);
10875LvalueParser.prototype.parse = function() {
10876 return this.parse_lv8();
10877}
10878
10879// expr8: expr8[expr1]
10880// expr8[expr1 : expr1]
10881// expr8.name
10882LvalueParser.prototype.parse_lv8 = function() {
10883 var left = this.parse_lv9();
10884 while (TRUE) {
10885 var pos = this.reader.tell();
10886 var c = this.reader.peek();
10887 var token = this.tokenizer.get();
10888 if (!iswhite(c) && token.type == TOKEN_SQOPEN) {
10889 var npos = token.pos;
10890 var node = Node(-1);
10891 if (this.tokenizer.peek().type == TOKEN_COLON) {
10892 this.tokenizer.get();
10893 var node = Node(NODE_SLICE);
10894 node.pos = npos;
10895 node.left = left;
10896 node.rlist = [NIL, NIL];
10897 var token = this.tokenizer.peek();
10898 if (token.type != TOKEN_SQCLOSE) {
10899 node.rlist[1] = this.parse_expr1();
10900 }
10901 var token = this.tokenizer.get();
10902 if (token.type != TOKEN_SQCLOSE) {
10903 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10904 }
10905 }
10906 else {
10907 var right = this.parse_expr1();
10908 if (this.tokenizer.peek().type == TOKEN_COLON) {
10909 this.tokenizer.get();
10910 var node = Node(NODE_SLICE);
10911 node.pos = npos;
10912 node.left = left;
10913 node.rlist = [right, NIL];
10914 var token = this.tokenizer.peek();
10915 if (token.type != TOKEN_SQCLOSE) {
10916 node.rlist[1] = this.parse_expr1();
10917 }
10918 var token = this.tokenizer.get();
10919 if (token.type != TOKEN_SQCLOSE) {
10920 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10921 }
10922 }
10923 else {
10924 var node = Node(NODE_SUBSCRIPT);
10925 node.pos = npos;
10926 node.left = left;
10927 node.right = right;
10928 var token = this.tokenizer.get();
10929 if (token.type != TOKEN_SQCLOSE) {
10930 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10931 }
10932 }
10933 }
10934 var left = node;
10935 delete node;
10936 }
10937 else if (!iswhite(c) && token.type == TOKEN_DOT) {
10938 var node = this.parse_dot(token, left);
10939 if (node === NIL) {
10940 this.reader.seek_set(pos);
10941 break;
10942 }
10943 var left = node;
10944 delete node;
10945 }
10946 else {
10947 this.reader.seek_set(pos);
10948 break;
10949 }
10950 }
10951 return left;
10952}
10953
10954// expr9: &option
10955// variable
10956// var{ria}ble
10957// $VAR
10958// @r
10959LvalueParser.prototype.parse_lv9 = function() {
10960 var pos = this.reader.tell();
10961 var token = this.tokenizer.get();
10962 var node = Node(-1);
10963 if (token.type == TOKEN_COPEN) {
10964 this.reader.seek_set(pos);
10965 var node = this.parse_identifier();
10966 }
10967 else if (token.type == TOKEN_OPTION) {
10968 var node = Node(NODE_OPTION);
10969 node.pos = token.pos;
10970 node.value = token.value;
10971 }
10972 else if (token.type == TOKEN_IDENTIFIER) {
10973 this.reader.seek_set(pos);
10974 var node = this.parse_identifier();
10975 }
10976 else if (token.type == TOKEN_LT && viml_equalci(this.reader.peekn(4), "SID>")) {
10977 this.reader.seek_set(pos);
10978 var node = this.parse_identifier();
10979 }
10980 else if (token.type == TOKEN_ENV) {
10981 var node = Node(NODE_ENV);
10982 node.pos = token.pos;
10983 node.value = token.value;
10984 }
10985 else if (token.type == TOKEN_REG) {
10986 var node = Node(NODE_REG);
10987 node.pos = token.pos;
10988 node.pos = token.pos;
10989 node.value = token.value;
10990 }
10991 else {
10992 throw Err(viml_printf("unexpected token: %s", token.value), token.pos);
10993 }
10994 return node;
10995}
10996
10997function StringReader() { this.__init__.apply(this, arguments); }
10998StringReader.prototype.__init__ = function(lines) {
10999 this.buf = [];
11000 this.pos = [];
11001 var lnum = 0;
11002 var offset = 0;
11003 while (lnum < viml_len(lines)) {
11004 var col = 0;
11005 var __c7 = viml_split(lines[lnum], "\\zs");
11006 for (var __i7 = 0; __i7 < __c7.length; ++__i7) {
11007 var c = __c7[__i7];
11008 viml_add(this.buf, c);
11009 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11010 col += viml_len(c);
11011 offset += viml_len(c);
11012 }
11013 while (lnum + 1 < viml_len(lines) && viml_eqregh(lines[lnum + 1], "^\\s*\\\\")) {
11014 var skip = TRUE;
11015 var col = 0;
11016 var __c8 = viml_split(lines[lnum + 1], "\\zs");
11017 for (var __i8 = 0; __i8 < __c8.length; ++__i8) {
11018 var c = __c8[__i8];
11019 if (skip) {
11020 if (c == "\\") {
11021 var skip = FALSE;
11022 }
11023 }
11024 else {
11025 viml_add(this.buf, c);
11026 viml_add(this.pos, [lnum + 2, col + 1, offset]);
11027 }
11028 col += viml_len(c);
11029 offset += viml_len(c);
11030 }
11031 lnum += 1;
11032 offset += 1;
11033 }
11034 viml_add(this.buf, "<EOL>");
11035 viml_add(this.pos, [lnum + 1, col + 1, offset]);
11036 lnum += 1;
11037 offset += 1;
11038 }
11039 // for <EOF>
11040 viml_add(this.pos, [lnum + 1, 0, offset]);
11041 this.i = 0;
11042}
11043
11044StringReader.prototype.eof = function() {
11045 return this.i >= viml_len(this.buf);
11046}
11047
11048StringReader.prototype.tell = function() {
11049 return this.i;
11050}
11051
11052StringReader.prototype.seek_set = function(i) {
11053 this.i = i;
11054}
11055
11056StringReader.prototype.seek_cur = function(i) {
11057 this.i = this.i + i;
11058}
11059
11060StringReader.prototype.seek_end = function(i) {
11061 this.i = viml_len(this.buf) + i;
11062}
11063
11064StringReader.prototype.p = function(i) {
11065 if (this.i >= viml_len(this.buf)) {
11066 return "<EOF>";
11067 }
11068 return this.buf[this.i + i];
11069}
11070
11071StringReader.prototype.peek = function() {
11072 if (this.i >= viml_len(this.buf)) {
11073 return "<EOF>";
11074 }
11075 return this.buf[this.i];
11076}
11077
11078StringReader.prototype.get = function() {
11079 if (this.i >= viml_len(this.buf)) {
11080 return "<EOF>";
11081 }
11082 this.i += 1;
11083 return this.buf[this.i - 1];
11084}
11085
11086StringReader.prototype.peekn = function(n) {
11087 var pos = this.tell();
11088 var r = this.getn(n);
11089 this.seek_set(pos);
11090 return r;
11091}
11092
11093StringReader.prototype.getn = function(n) {
11094 var r = "";
11095 var j = 0;
11096 while (this.i < viml_len(this.buf) && (n < 0 || j < n)) {
11097 var c = this.buf[this.i];
11098 if (c == "<EOL>") {
11099 break;
11100 }
11101 r += c;
11102 this.i += 1;
11103 j += 1;
11104 }
11105 return r;
11106}
11107
11108StringReader.prototype.peekline = function() {
11109 return this.peekn(-1);
11110}
11111
11112StringReader.prototype.readline = function() {
11113 var r = this.getn(-1);
11114 this.get();
11115 return r;
11116}
11117
11118StringReader.prototype.getstr = function(begin, end) {
11119 var r = "";
11120 var __c9 = viml_range(begin.i, end.i - 1);
11121 for (var __i9 = 0; __i9 < __c9.length; ++__i9) {
11122 var i = __c9[__i9];
11123 if (i >= viml_len(this.buf)) {
11124 break;
11125 }
11126 var c = this.buf[i];
11127 if (c == "<EOL>") {
11128 var c = "\n";
11129 }
11130 r += c;
11131 }
11132 return r;
11133}
11134
11135StringReader.prototype.getpos = function() {
11136 var __tmp = this.pos[this.i];
11137 var lnum = __tmp[0];
11138 var col = __tmp[1];
11139 var offset = __tmp[2];
11140 return {"i":this.i, "lnum":lnum, "col":col, "offset":offset};
11141}
11142
11143StringReader.prototype.setpos = function(pos) {
11144 this.i = pos.i;
11145}
11146
11147StringReader.prototype.read_alpha = function() {
11148 var r = "";
11149 while (isalpha(this.peekn(1))) {
11150 r += this.getn(1);
11151 }
11152 return r;
11153}
11154
11155StringReader.prototype.read_alnum = function() {
11156 var r = "";
11157 while (isalnum(this.peekn(1))) {
11158 r += this.getn(1);
11159 }
11160 return r;
11161}
11162
11163StringReader.prototype.read_digit = function() {
11164 var r = "";
11165 while (isdigit(this.peekn(1))) {
11166 r += this.getn(1);
11167 }
11168 return r;
11169}
11170
11171StringReader.prototype.read_odigit = function() {
11172 var r = "";
11173 while (isodigit(this.peekn(1))) {
11174 r += this.getn(1);
11175 }
11176 return r;
11177}
11178
11179StringReader.prototype.read_blob = function() {
11180 var r = "";
11181 while (1) {
11182 var s = this.peekn(2);
11183 if (viml_eqregh(s, "^[0-9A-Fa-f][0-9A-Fa-f]$")) {
11184 r += this.getn(2);
11185 }
11186 else if (viml_eqregh(s, "^\\.[0-9A-Fa-f]$")) {
11187 r += this.getn(1);
11188 }
11189 else if (viml_eqregh(s, "^[0-9A-Fa-f][^0-9A-Fa-f]$")) {
11190 throw Err("E973: Blob literal should have an even number of hex characters:" + s, this.getpos());
11191 }
11192 else {
11193 break;
11194 }
11195 }
11196 return r;
11197}
11198
11199StringReader.prototype.read_xdigit = function() {
11200 var r = "";
11201 while (isxdigit(this.peekn(1))) {
11202 r += this.getn(1);
11203 }
11204 return r;
11205}
11206
11207StringReader.prototype.read_bdigit = function() {
11208 var r = "";
11209 while (this.peekn(1) == "0" || this.peekn(1) == "1") {
11210 r += this.getn(1);
11211 }
11212 return r;
11213}
11214
11215StringReader.prototype.read_integer = function() {
11216 var r = "";
11217 var c = this.peekn(1);
11218 if (c == "-" || c == "+") {
11219 var r = this.getn(1);
11220 }
11221 return r + this.read_digit();
11222}
11223
11224StringReader.prototype.read_word = function() {
11225 var r = "";
11226 while (iswordc(this.peekn(1))) {
11227 r += this.getn(1);
11228 }
11229 return r;
11230}
11231
11232StringReader.prototype.read_white = function() {
11233 var r = "";
11234 while (iswhite(this.peekn(1))) {
11235 r += this.getn(1);
11236 }
11237 return r;
11238}
11239
11240StringReader.prototype.read_nonwhite = function() {
11241 var r = "";
11242 var ch = this.peekn(1);
11243 while (!iswhite(ch) && ch != "") {
11244 r += this.getn(1);
11245 var ch = this.peekn(1);
11246 }
11247 return r;
11248}
11249
11250StringReader.prototype.read_name = function() {
11251 var r = "";
11252 while (isnamec(this.peekn(1))) {
11253 r += this.getn(1);
11254 }
11255 return r;
11256}
11257
11258StringReader.prototype.skip_white = function() {
11259 while (iswhite(this.peekn(1))) {
11260 this.seek_cur(1);
11261 }
11262}
11263
11264StringReader.prototype.skip_white_and_colon = function() {
11265 while (TRUE) {
11266 var c = this.peekn(1);
11267 if (!iswhite(c) && c != ":") {
11268 break;
11269 }
11270 this.seek_cur(1);
11271 }
11272}
11273
11274function Compiler() { this.__init__.apply(this, arguments); }
11275Compiler.prototype.__init__ = function() {
11276 this.indent = [""];
11277 this.lines = [];
11278}
11279
11280Compiler.prototype.out = function() {
11281 var a000 = Array.prototype.slice.call(arguments, 0);
11282 if (viml_len(a000) == 1) {
11283 if (a000[0][0] == ")") {
11284 this.lines[this.lines.length - 1] += a000[0];
11285 }
11286 else {
11287 viml_add(this.lines, this.indent[0] + a000[0]);
11288 }
11289 }
11290 else {
11291 viml_add(this.lines, this.indent[0] + viml_printf.apply(null, a000));
11292 }
11293}
11294
11295Compiler.prototype.incindent = function(s) {
11296 viml_insert(this.indent, this.indent[0] + s);
11297}
11298
11299Compiler.prototype.decindent = function() {
11300 viml_remove(this.indent, 0);
11301}
11302
11303Compiler.prototype.compile = function(node) {
11304 if (node.type == NODE_TOPLEVEL) {
11305 return this.compile_toplevel(node);
11306 }
11307 else if (node.type == NODE_COMMENT) {
11308 this.compile_comment(node);
11309 return NIL;
11310 }
11311 else if (node.type == NODE_EXCMD) {
11312 this.compile_excmd(node);
11313 return NIL;
11314 }
11315 else if (node.type == NODE_FUNCTION) {
11316 this.compile_function(node);
11317 return NIL;
11318 }
11319 else if (node.type == NODE_DELFUNCTION) {
11320 this.compile_delfunction(node);
11321 return NIL;
11322 }
11323 else if (node.type == NODE_RETURN) {
11324 this.compile_return(node);
11325 return NIL;
11326 }
11327 else if (node.type == NODE_EXCALL) {
11328 this.compile_excall(node);
11329 return NIL;
11330 }
11331 else if (node.type == NODE_EVAL) {
11332 this.compile_eval(node);
11333 return NIL;
11334 }
11335 else if (node.type == NODE_LET) {
11336 this.compile_let(node);
11337 return NIL;
11338 }
11339 else if (node.type == NODE_CONST) {
11340 this.compile_const(node);
11341 return NIL;
11342 }
11343 else if (node.type == NODE_UNLET) {
11344 this.compile_unlet(node);
11345 return NIL;
11346 }
11347 else if (node.type == NODE_LOCKVAR) {
11348 this.compile_lockvar(node);
11349 return NIL;
11350 }
11351 else if (node.type == NODE_UNLOCKVAR) {
11352 this.compile_unlockvar(node);
11353 return NIL;
11354 }
11355 else if (node.type == NODE_IF) {
11356 this.compile_if(node);
11357 return NIL;
11358 }
11359 else if (node.type == NODE_WHILE) {
11360 this.compile_while(node);
11361 return NIL;
11362 }
11363 else if (node.type == NODE_FOR) {
11364 this.compile_for(node);
11365 return NIL;
11366 }
11367 else if (node.type == NODE_CONTINUE) {
11368 this.compile_continue(node);
11369 return NIL;
11370 }
11371 else if (node.type == NODE_BREAK) {
11372 this.compile_break(node);
11373 return NIL;
11374 }
11375 else if (node.type == NODE_TRY) {
11376 this.compile_try(node);
11377 return NIL;
11378 }
11379 else if (node.type == NODE_THROW) {
11380 this.compile_throw(node);
11381 return NIL;
11382 }
11383 else if (node.type == NODE_ECHO) {
11384 this.compile_echo(node);
11385 return NIL;
11386 }
11387 else if (node.type == NODE_ECHON) {
11388 this.compile_echon(node);
11389 return NIL;
11390 }
11391 else if (node.type == NODE_ECHOHL) {
11392 this.compile_echohl(node);
11393 return NIL;
11394 }
11395 else if (node.type == NODE_ECHOMSG) {
11396 this.compile_echomsg(node);
11397 return NIL;
11398 }
11399 else if (node.type == NODE_ECHOERR) {
11400 this.compile_echoerr(node);
11401 return NIL;
11402 }
11403 else if (node.type == NODE_EXECUTE) {
11404 this.compile_execute(node);
11405 return NIL;
11406 }
11407 else if (node.type == NODE_TERNARY) {
11408 return this.compile_ternary(node);
11409 }
11410 else if (node.type == NODE_OR) {
11411 return this.compile_or(node);
11412 }
11413 else if (node.type == NODE_AND) {
11414 return this.compile_and(node);
11415 }
11416 else if (node.type == NODE_EQUAL) {
11417 return this.compile_equal(node);
11418 }
11419 else if (node.type == NODE_EQUALCI) {
11420 return this.compile_equalci(node);
11421 }
11422 else if (node.type == NODE_EQUALCS) {
11423 return this.compile_equalcs(node);
11424 }
11425 else if (node.type == NODE_NEQUAL) {
11426 return this.compile_nequal(node);
11427 }
11428 else if (node.type == NODE_NEQUALCI) {
11429 return this.compile_nequalci(node);
11430 }
11431 else if (node.type == NODE_NEQUALCS) {
11432 return this.compile_nequalcs(node);
11433 }
11434 else if (node.type == NODE_GREATER) {
11435 return this.compile_greater(node);
11436 }
11437 else if (node.type == NODE_GREATERCI) {
11438 return this.compile_greaterci(node);
11439 }
11440 else if (node.type == NODE_GREATERCS) {
11441 return this.compile_greatercs(node);
11442 }
11443 else if (node.type == NODE_GEQUAL) {
11444 return this.compile_gequal(node);
11445 }
11446 else if (node.type == NODE_GEQUALCI) {
11447 return this.compile_gequalci(node);
11448 }
11449 else if (node.type == NODE_GEQUALCS) {
11450 return this.compile_gequalcs(node);
11451 }
11452 else if (node.type == NODE_SMALLER) {
11453 return this.compile_smaller(node);
11454 }
11455 else if (node.type == NODE_SMALLERCI) {
11456 return this.compile_smallerci(node);
11457 }
11458 else if (node.type == NODE_SMALLERCS) {
11459 return this.compile_smallercs(node);
11460 }
11461 else if (node.type == NODE_SEQUAL) {
11462 return this.compile_sequal(node);
11463 }
11464 else if (node.type == NODE_SEQUALCI) {
11465 return this.compile_sequalci(node);
11466 }
11467 else if (node.type == NODE_SEQUALCS) {
11468 return this.compile_sequalcs(node);
11469 }
11470 else if (node.type == NODE_MATCH) {
11471 return this.compile_match(node);
11472 }
11473 else if (node.type == NODE_MATCHCI) {
11474 return this.compile_matchci(node);
11475 }
11476 else if (node.type == NODE_MATCHCS) {
11477 return this.compile_matchcs(node);
11478 }
11479 else if (node.type == NODE_NOMATCH) {
11480 return this.compile_nomatch(node);
11481 }
11482 else if (node.type == NODE_NOMATCHCI) {
11483 return this.compile_nomatchci(node);
11484 }
11485 else if (node.type == NODE_NOMATCHCS) {
11486 return this.compile_nomatchcs(node);
11487 }
11488 else if (node.type == NODE_IS) {
11489 return this.compile_is(node);
11490 }
11491 else if (node.type == NODE_ISCI) {
11492 return this.compile_isci(node);
11493 }
11494 else if (node.type == NODE_ISCS) {
11495 return this.compile_iscs(node);
11496 }
11497 else if (node.type == NODE_ISNOT) {
11498 return this.compile_isnot(node);
11499 }
11500 else if (node.type == NODE_ISNOTCI) {
11501 return this.compile_isnotci(node);
11502 }
11503 else if (node.type == NODE_ISNOTCS) {
11504 return this.compile_isnotcs(node);
11505 }
11506 else if (node.type == NODE_ADD) {
11507 return this.compile_add(node);
11508 }
11509 else if (node.type == NODE_SUBTRACT) {
11510 return this.compile_subtract(node);
11511 }
11512 else if (node.type == NODE_CONCAT) {
11513 return this.compile_concat(node);
11514 }
11515 else if (node.type == NODE_MULTIPLY) {
11516 return this.compile_multiply(node);
11517 }
11518 else if (node.type == NODE_DIVIDE) {
11519 return this.compile_divide(node);
11520 }
11521 else if (node.type == NODE_REMAINDER) {
11522 return this.compile_remainder(node);
11523 }
11524 else if (node.type == NODE_NOT) {
11525 return this.compile_not(node);
11526 }
11527 else if (node.type == NODE_PLUS) {
11528 return this.compile_plus(node);
11529 }
11530 else if (node.type == NODE_MINUS) {
11531 return this.compile_minus(node);
11532 }
11533 else if (node.type == NODE_SUBSCRIPT) {
11534 return this.compile_subscript(node);
11535 }
11536 else if (node.type == NODE_SLICE) {
11537 return this.compile_slice(node);
11538 }
11539 else if (node.type == NODE_DOT) {
11540 return this.compile_dot(node);
11541 }
11542 else if (node.type == NODE_METHOD) {
11543 return this.compile_method(node);
11544 }
11545 else if (node.type == NODE_CALL) {
11546 return this.compile_call(node);
11547 }
11548 else if (node.type == NODE_NUMBER) {
11549 return this.compile_number(node);
11550 }
11551 else if (node.type == NODE_BLOB) {
11552 return this.compile_blob(node);
11553 }
11554 else if (node.type == NODE_STRING) {
11555 return this.compile_string(node);
11556 }
11557 else if (node.type == NODE_LIST) {
11558 return this.compile_list(node);
11559 }
11560 else if (node.type == NODE_DICT) {
11561 return this.compile_dict(node);
11562 }
11563 else if (node.type == NODE_OPTION) {
11564 return this.compile_option(node);
11565 }
11566 else if (node.type == NODE_IDENTIFIER) {
11567 return this.compile_identifier(node);
11568 }
11569 else if (node.type == NODE_CURLYNAME) {
11570 return this.compile_curlyname(node);
11571 }
11572 else if (node.type == NODE_ENV) {
11573 return this.compile_env(node);
11574 }
11575 else if (node.type == NODE_REG) {
11576 return this.compile_reg(node);
11577 }
11578 else if (node.type == NODE_CURLYNAMEPART) {
11579 return this.compile_curlynamepart(node);
11580 }
11581 else if (node.type == NODE_CURLYNAMEEXPR) {
11582 return this.compile_curlynameexpr(node);
11583 }
11584 else if (node.type == NODE_LAMBDA) {
11585 return this.compile_lambda(node);
11586 }
11587 else if (node.type == NODE_HEREDOC) {
11588 return this.compile_heredoc(node);
11589 }
11590 else {
11591 throw viml_printf("Compiler: unknown node: %s", viml_string(node));
11592 }
11593 return NIL;
11594}
11595
11596Compiler.prototype.compile_body = function(body) {
11597 var __c10 = body;
11598 for (var __i10 = 0; __i10 < __c10.length; ++__i10) {
11599 var node = __c10[__i10];
11600 this.compile(node);
11601 }
11602}
11603
11604Compiler.prototype.compile_toplevel = function(node) {
11605 this.compile_body(node.body);
11606 return this.lines;
11607}
11608
11609Compiler.prototype.compile_comment = function(node) {
11610 this.out(";%s", node.str);
11611}
11612
11613Compiler.prototype.compile_excmd = function(node) {
11614 this.out("(excmd \"%s\")", viml_escape(node.str, "\\\""));
11615}
11616
11617Compiler.prototype.compile_function = function(node) {
11618 var left = this.compile(node.left);
11619 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
11620 var default_args = node.default_args.map((function(vval) { return this.compile(vval); }).bind(this));
11621 if (!viml_empty(rlist)) {
11622 var remaining = FALSE;
11623 if (rlist[rlist.length - 1] == "...") {
11624 viml_remove(rlist, -1);
11625 var remaining = TRUE;
11626 }
11627 var __c11 = viml_range(viml_len(rlist));
11628 for (var __i11 = 0; __i11 < __c11.length; ++__i11) {
11629 var i = __c11[__i11];
11630 if (i < viml_len(rlist) - viml_len(default_args)) {
11631 left += viml_printf(" %s", rlist[i]);
11632 }
11633 else {
11634 left += viml_printf(" (%s %s)", rlist[i], default_args[i + viml_len(default_args) - viml_len(rlist)]);
11635 }
11636 }
11637 if (remaining) {
11638 left += " . ...";
11639 }
11640 }
11641 this.out("(function (%s)", left);
11642 this.incindent(" ");
11643 this.compile_body(node.body);
11644 this.out(")");
11645 this.decindent();
11646}
11647
11648Compiler.prototype.compile_delfunction = function(node) {
11649 this.out("(delfunction %s)", this.compile(node.left));
11650}
11651
11652Compiler.prototype.compile_return = function(node) {
11653 if (node.left === NIL) {
11654 this.out("(return)");
11655 }
11656 else {
11657 this.out("(return %s)", this.compile(node.left));
11658 }
11659}
11660
11661Compiler.prototype.compile_excall = function(node) {
11662 this.out("(call %s)", this.compile(node.left));
11663}
11664
11665Compiler.prototype.compile_eval = function(node) {
11666 this.out("(eval %s)", this.compile(node.left));
11667}
11668
11669Compiler.prototype.compile_let = function(node) {
11670 var left = "";
11671 if (node.left !== NIL) {
11672 var left = this.compile(node.left);
11673 }
11674 else {
11675 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
11676 if (node.rest !== NIL) {
11677 left += " . " + this.compile(node.rest);
11678 }
11679 var left = "(" + left + ")";
11680 }
11681 var right = this.compile(node.right);
11682 this.out("(let %s %s %s)", node.op, left, right);
11683}
11684
11685// TODO: merge with s:Compiler.compile_let() ?
11686Compiler.prototype.compile_const = function(node) {
11687 var left = "";
11688 if (node.left !== NIL) {
11689 var left = this.compile(node.left);
11690 }
11691 else {
11692 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
11693 if (node.rest !== NIL) {
11694 left += " . " + this.compile(node.rest);
11695 }
11696 var left = "(" + left + ")";
11697 }
11698 var right = this.compile(node.right);
11699 this.out("(const %s %s %s)", node.op, left, right);
11700}
11701
11702Compiler.prototype.compile_unlet = function(node) {
11703 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11704 this.out("(unlet %s)", viml_join(list, " "));
11705}
11706
11707Compiler.prototype.compile_lockvar = function(node) {
11708 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11709 if (node.depth === NIL) {
11710 this.out("(lockvar %s)", viml_join(list, " "));
11711 }
11712 else {
11713 this.out("(lockvar %s %s)", node.depth, viml_join(list, " "));
11714 }
11715}
11716
11717Compiler.prototype.compile_unlockvar = function(node) {
11718 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11719 if (node.depth === NIL) {
11720 this.out("(unlockvar %s)", viml_join(list, " "));
11721 }
11722 else {
11723 this.out("(unlockvar %s %s)", node.depth, viml_join(list, " "));
11724 }
11725}
11726
11727Compiler.prototype.compile_if = function(node) {
11728 this.out("(if %s", this.compile(node.cond));
11729 this.incindent(" ");
11730 this.compile_body(node.body);
11731 this.decindent();
11732 var __c12 = node.elseif;
11733 for (var __i12 = 0; __i12 < __c12.length; ++__i12) {
11734 var enode = __c12[__i12];
11735 this.out(" elseif %s", this.compile(enode.cond));
11736 this.incindent(" ");
11737 this.compile_body(enode.body);
11738 this.decindent();
11739 }
11740 if (node._else !== NIL) {
11741 this.out(" else");
11742 this.incindent(" ");
11743 this.compile_body(node._else.body);
11744 this.decindent();
11745 }
11746 this.incindent(" ");
11747 this.out(")");
11748 this.decindent();
11749}
11750
11751Compiler.prototype.compile_while = function(node) {
11752 this.out("(while %s", this.compile(node.cond));
11753 this.incindent(" ");
11754 this.compile_body(node.body);
11755 this.out(")");
11756 this.decindent();
11757}
11758
11759Compiler.prototype.compile_for = function(node) {
11760 var left = "";
11761 if (node.left !== NIL) {
11762 var left = this.compile(node.left);
11763 }
11764 else {
11765 var left = viml_join(node.list.map((function(vval) { return this.compile(vval); }).bind(this)), " ");
11766 if (node.rest !== NIL) {
11767 left += " . " + this.compile(node.rest);
11768 }
11769 var left = "(" + left + ")";
11770 }
11771 var right = this.compile(node.right);
11772 this.out("(for %s %s", left, right);
11773 this.incindent(" ");
11774 this.compile_body(node.body);
11775 this.out(")");
11776 this.decindent();
11777}
11778
11779Compiler.prototype.compile_continue = function(node) {
11780 this.out("(continue)");
11781}
11782
11783Compiler.prototype.compile_break = function(node) {
11784 this.out("(break)");
11785}
11786
11787Compiler.prototype.compile_try = function(node) {
11788 this.out("(try");
11789 this.incindent(" ");
11790 this.compile_body(node.body);
11791 var __c13 = node.catch;
11792 for (var __i13 = 0; __i13 < __c13.length; ++__i13) {
11793 var cnode = __c13[__i13];
11794 if (cnode.pattern !== NIL) {
11795 this.decindent();
11796 this.out(" catch /%s/", cnode.pattern);
11797 this.incindent(" ");
11798 this.compile_body(cnode.body);
11799 }
11800 else {
11801 this.decindent();
11802 this.out(" catch");
11803 this.incindent(" ");
11804 this.compile_body(cnode.body);
11805 }
11806 }
11807 if (node._finally !== NIL) {
11808 this.decindent();
11809 this.out(" finally");
11810 this.incindent(" ");
11811 this.compile_body(node._finally.body);
11812 }
11813 this.out(")");
11814 this.decindent();
11815}
11816
11817Compiler.prototype.compile_throw = function(node) {
11818 this.out("(throw %s)", this.compile(node.left));
11819}
11820
11821Compiler.prototype.compile_echo = function(node) {
11822 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11823 this.out("(echo %s)", viml_join(list, " "));
11824}
11825
11826Compiler.prototype.compile_echon = function(node) {
11827 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11828 this.out("(echon %s)", viml_join(list, " "));
11829}
11830
11831Compiler.prototype.compile_echohl = function(node) {
11832 this.out("(echohl \"%s\")", viml_escape(node.str, "\\\""));
11833}
11834
11835Compiler.prototype.compile_echomsg = function(node) {
11836 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11837 this.out("(echomsg %s)", viml_join(list, " "));
11838}
11839
11840Compiler.prototype.compile_echoerr = function(node) {
11841 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11842 this.out("(echoerr %s)", viml_join(list, " "));
11843}
11844
11845Compiler.prototype.compile_execute = function(node) {
11846 var list = node.list.map((function(vval) { return this.compile(vval); }).bind(this));
11847 this.out("(execute %s)", viml_join(list, " "));
11848}
11849
11850Compiler.prototype.compile_ternary = function(node) {
11851 return viml_printf("(?: %s %s %s)", this.compile(node.cond), this.compile(node.left), this.compile(node.right));
11852}
11853
11854Compiler.prototype.compile_or = function(node) {
11855 return viml_printf("(|| %s %s)", this.compile(node.left), this.compile(node.right));
11856}
11857
11858Compiler.prototype.compile_and = function(node) {
11859 return viml_printf("(&& %s %s)", this.compile(node.left), this.compile(node.right));
11860}
11861
11862Compiler.prototype.compile_equal = function(node) {
11863 return viml_printf("(== %s %s)", this.compile(node.left), this.compile(node.right));
11864}
11865
11866Compiler.prototype.compile_equalci = function(node) {
11867 return viml_printf("(==? %s %s)", this.compile(node.left), this.compile(node.right));
11868}
11869
11870Compiler.prototype.compile_equalcs = function(node) {
11871 return viml_printf("(==# %s %s)", this.compile(node.left), this.compile(node.right));
11872}
11873
11874Compiler.prototype.compile_nequal = function(node) {
11875 return viml_printf("(!= %s %s)", this.compile(node.left), this.compile(node.right));
11876}
11877
11878Compiler.prototype.compile_nequalci = function(node) {
11879 return viml_printf("(!=? %s %s)", this.compile(node.left), this.compile(node.right));
11880}
11881
11882Compiler.prototype.compile_nequalcs = function(node) {
11883 return viml_printf("(!=# %s %s)", this.compile(node.left), this.compile(node.right));
11884}
11885
11886Compiler.prototype.compile_greater = function(node) {
11887 return viml_printf("(> %s %s)", this.compile(node.left), this.compile(node.right));
11888}
11889
11890Compiler.prototype.compile_greaterci = function(node) {
11891 return viml_printf("(>? %s %s)", this.compile(node.left), this.compile(node.right));
11892}
11893
11894Compiler.prototype.compile_greatercs = function(node) {
11895 return viml_printf("(># %s %s)", this.compile(node.left), this.compile(node.right));
11896}
11897
11898Compiler.prototype.compile_gequal = function(node) {
11899 return viml_printf("(>= %s %s)", this.compile(node.left), this.compile(node.right));
11900}
11901
11902Compiler.prototype.compile_gequalci = function(node) {
11903 return viml_printf("(>=? %s %s)", this.compile(node.left), this.compile(node.right));
11904}
11905
11906Compiler.prototype.compile_gequalcs = function(node) {
11907 return viml_printf("(>=# %s %s)", this.compile(node.left), this.compile(node.right));
11908}
11909
11910Compiler.prototype.compile_smaller = function(node) {
11911 return viml_printf("(< %s %s)", this.compile(node.left), this.compile(node.right));
11912}
11913
11914Compiler.prototype.compile_smallerci = function(node) {
11915 return viml_printf("(<? %s %s)", this.compile(node.left), this.compile(node.right));
11916}
11917
11918Compiler.prototype.compile_smallercs = function(node) {
11919 return viml_printf("(<# %s %s)", this.compile(node.left), this.compile(node.right));
11920}
11921
11922Compiler.prototype.compile_sequal = function(node) {
11923 return viml_printf("(<= %s %s)", this.compile(node.left), this.compile(node.right));
11924}
11925
11926Compiler.prototype.compile_sequalci = function(node) {
11927 return viml_printf("(<=? %s %s)", this.compile(node.left), this.compile(node.right));
11928}
11929
11930Compiler.prototype.compile_sequalcs = function(node) {
11931 return viml_printf("(<=# %s %s)", this.compile(node.left), this.compile(node.right));
11932}
11933
11934Compiler.prototype.compile_match = function(node) {
11935 return viml_printf("(=~ %s %s)", this.compile(node.left), this.compile(node.right));
11936}
11937
11938Compiler.prototype.compile_matchci = function(node) {
11939 return viml_printf("(=~? %s %s)", this.compile(node.left), this.compile(node.right));
11940}
11941
11942Compiler.prototype.compile_matchcs = function(node) {
11943 return viml_printf("(=~# %s %s)", this.compile(node.left), this.compile(node.right));
11944}
11945
11946Compiler.prototype.compile_nomatch = function(node) {
11947 return viml_printf("(!~ %s %s)", this.compile(node.left), this.compile(node.right));
11948}
11949
11950Compiler.prototype.compile_nomatchci = function(node) {
11951 return viml_printf("(!~? %s %s)", this.compile(node.left), this.compile(node.right));
11952}
11953
11954Compiler.prototype.compile_nomatchcs = function(node) {
11955 return viml_printf("(!~# %s %s)", this.compile(node.left), this.compile(node.right));
11956}
11957
11958Compiler.prototype.compile_is = function(node) {
11959 return viml_printf("(is %s %s)", this.compile(node.left), this.compile(node.right));
11960}
11961
11962Compiler.prototype.compile_isci = function(node) {
11963 return viml_printf("(is? %s %s)", this.compile(node.left), this.compile(node.right));
11964}
11965
11966Compiler.prototype.compile_iscs = function(node) {
11967 return viml_printf("(is# %s %s)", this.compile(node.left), this.compile(node.right));
11968}
11969
11970Compiler.prototype.compile_isnot = function(node) {
11971 return viml_printf("(isnot %s %s)", this.compile(node.left), this.compile(node.right));
11972}
11973
11974Compiler.prototype.compile_isnotci = function(node) {
11975 return viml_printf("(isnot? %s %s)", this.compile(node.left), this.compile(node.right));
11976}
11977
11978Compiler.prototype.compile_isnotcs = function(node) {
11979 return viml_printf("(isnot# %s %s)", this.compile(node.left), this.compile(node.right));
11980}
11981
11982Compiler.prototype.compile_add = function(node) {
11983 return viml_printf("(+ %s %s)", this.compile(node.left), this.compile(node.right));
11984}
11985
11986Compiler.prototype.compile_subtract = function(node) {
11987 return viml_printf("(- %s %s)", this.compile(node.left), this.compile(node.right));
11988}
11989
11990Compiler.prototype.compile_concat = function(node) {
11991 return viml_printf("(concat %s %s)", this.compile(node.left), this.compile(node.right));
11992}
11993
11994Compiler.prototype.compile_multiply = function(node) {
11995 return viml_printf("(* %s %s)", this.compile(node.left), this.compile(node.right));
11996}
11997
11998Compiler.prototype.compile_divide = function(node) {
11999 return viml_printf("(/ %s %s)", this.compile(node.left), this.compile(node.right));
12000}
12001
12002Compiler.prototype.compile_remainder = function(node) {
12003 return viml_printf("(%% %s %s)", this.compile(node.left), this.compile(node.right));
12004}
12005
12006Compiler.prototype.compile_not = function(node) {
12007 return viml_printf("(! %s)", this.compile(node.left));
12008}
12009
12010Compiler.prototype.compile_plus = function(node) {
12011 return viml_printf("(+ %s)", this.compile(node.left));
12012}
12013
12014Compiler.prototype.compile_minus = function(node) {
12015 return viml_printf("(- %s)", this.compile(node.left));
12016}
12017
12018Compiler.prototype.compile_subscript = function(node) {
12019 return viml_printf("(subscript %s %s)", this.compile(node.left), this.compile(node.right));
12020}
12021
12022Compiler.prototype.compile_slice = function(node) {
12023 var r0 = node.rlist[0] === NIL ? "nil" : this.compile(node.rlist[0]);
12024 var r1 = node.rlist[1] === NIL ? "nil" : this.compile(node.rlist[1]);
12025 return viml_printf("(slice %s %s %s)", this.compile(node.left), r0, r1);
12026}
12027
12028Compiler.prototype.compile_dot = function(node) {
12029 return viml_printf("(dot %s %s)", this.compile(node.left), this.compile(node.right));
12030}
12031
12032Compiler.prototype.compile_method = function(node) {
12033 return viml_printf("(method %s %s)", this.compile(node.left), this.compile(node.right));
12034}
12035
12036Compiler.prototype.compile_call = function(node) {
12037 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12038 if (viml_empty(rlist)) {
12039 return viml_printf("(%s)", this.compile(node.left));
12040 }
12041 else {
12042 return viml_printf("(%s %s)", this.compile(node.left), viml_join(rlist, " "));
12043 }
12044}
12045
12046Compiler.prototype.compile_number = function(node) {
12047 return node.value;
12048}
12049
12050Compiler.prototype.compile_blob = function(node) {
12051 return node.value;
12052}
12053
12054Compiler.prototype.compile_string = function(node) {
12055 return node.value;
12056}
12057
12058Compiler.prototype.compile_list = function(node) {
12059 var value = node.value.map((function(vval) { return this.compile(vval); }).bind(this));
12060 if (viml_empty(value)) {
12061 return "(list)";
12062 }
12063 else {
12064 return viml_printf("(list %s)", viml_join(value, " "));
12065 }
12066}
12067
12068Compiler.prototype.compile_dict = function(node) {
12069 var value = node.value.map((function(vval) { return "(" + this.compile(vval[0]) + " " + this.compile(vval[1]) + ")"; }).bind(this));
12070 if (viml_empty(value)) {
12071 return "(dict)";
12072 }
12073 else {
12074 return viml_printf("(dict %s)", viml_join(value, " "));
12075 }
12076}
12077
12078Compiler.prototype.compile_option = function(node) {
12079 return node.value;
12080}
12081
12082Compiler.prototype.compile_identifier = function(node) {
12083 return node.value;
12084}
12085
12086Compiler.prototype.compile_curlyname = function(node) {
12087 return viml_join(node.value.map((function(vval) { return this.compile(vval); }).bind(this)), "");
12088}
12089
12090Compiler.prototype.compile_env = function(node) {
12091 return node.value;
12092}
12093
12094Compiler.prototype.compile_reg = function(node) {
12095 return node.value;
12096}
12097
12098Compiler.prototype.compile_curlynamepart = function(node) {
12099 return node.value;
12100}
12101
12102Compiler.prototype.compile_curlynameexpr = function(node) {
12103 return "{" + this.compile(node.value) + "}";
12104}
12105
12106Compiler.prototype.escape_string = function(str) {
12107 var m = {"\n":"\\n", "\t":"\\t", "\r":"\\r"};
12108 var out = "\"";
12109 var __c14 = viml_range(viml_len(str));
12110 for (var __i14 = 0; __i14 < __c14.length; ++__i14) {
12111 var i = __c14[__i14];
12112 var c = str[i];
12113 if (viml_has_key(m, c)) {
12114 out += m[c];
12115 }
12116 else {
12117 out += c;
12118 }
12119 }
12120 out += "\"";
12121 return out;
12122}
12123
12124Compiler.prototype.compile_lambda = function(node) {
12125 var rlist = node.rlist.map((function(vval) { return this.compile(vval); }).bind(this));
12126 return viml_printf("(lambda (%s) %s)", viml_join(rlist, " "), this.compile(node.left));
12127}
12128
12129Compiler.prototype.compile_heredoc = function(node) {
12130 if (viml_empty(node.rlist)) {
12131 var rlist = "(list)";
12132 }
12133 else {
12134 var rlist = "(list " + viml_join(node.rlist.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
12135 }
12136 if (viml_empty(node.body)) {
12137 var body = "(list)";
12138 }
12139 else {
12140 var body = "(list " + viml_join(node.body.map((function(vval) { return this.escape_string(vval); }).bind(this)), " ") + ")";
12141 }
12142 var op = this.escape_string(node.op);
12143 return viml_printf("(heredoc %s %s %s)", rlist, op, body);
12144}
12145
12146// TODO: under construction
12147function RegexpParser() { this.__init__.apply(this, arguments); }
12148RegexpParser.prototype.RE_VERY_NOMAGIC = 1;
12149RegexpParser.prototype.RE_NOMAGIC = 2;
12150RegexpParser.prototype.RE_MAGIC = 3;
12151RegexpParser.prototype.RE_VERY_MAGIC = 4;
12152RegexpParser.prototype.__init__ = function(reader, cmd, delim) {
12153 this.reader = reader;
12154 this.cmd = cmd;
12155 this.delim = delim;
12156 this.reg_magic = this.RE_MAGIC;
12157}
12158
12159RegexpParser.prototype.isend = function(c) {
12160 return c == "<EOF>" || c == "<EOL>" || c == this.delim;
12161}
12162
12163RegexpParser.prototype.parse_regexp = function() {
12164 var prevtoken = "";
12165 var ntoken = "";
12166 var ret = [];
12167 if (this.reader.peekn(4) == "\\%#=") {
12168 var epos = this.reader.getpos();
12169 var token = this.reader.getn(5);
12170 if (token != "\\%#=0" && token != "\\%#=1" && token != "\\%#=2") {
12171 throw Err("E864: \\%#= can only be followed by 0, 1, or 2", epos);
12172 }
12173 viml_add(ret, token);
12174 }
12175 while (!this.isend(this.reader.peek())) {
12176 var prevtoken = ntoken;
12177 var __tmp = this.get_token();
12178 var token = __tmp[0];
12179 var ntoken = __tmp[1];
12180 if (ntoken == "\\m") {
12181 this.reg_magic = this.RE_MAGIC;
12182 }
12183 else if (ntoken == "\\M") {
12184 this.reg_magic = this.RE_NOMAGIC;
12185 }
12186 else if (ntoken == "\\v") {
12187 this.reg_magic = this.RE_VERY_MAGIC;
12188 }
12189 else if (ntoken == "\\V") {
12190 this.reg_magic = this.RE_VERY_NOMAGIC;
12191 }
12192 else if (ntoken == "\\*") {
12193 // '*' is not magic as the very first character.
12194 if (prevtoken == "" || prevtoken == "\\^" || prevtoken == "\\&" || prevtoken == "\\|" || prevtoken == "\\(") {
12195 var ntoken = "*";
12196 }
12197 }
12198 else if (ntoken == "\\^") {
12199 // '^' is only magic as the very first character.
12200 if (this.reg_magic != this.RE_VERY_MAGIC && prevtoken != "" && prevtoken != "\\&" && prevtoken != "\\|" && prevtoken != "\\n" && prevtoken != "\\(" && prevtoken != "\\%(") {
12201 var ntoken = "^";
12202 }
12203 }
12204 else if (ntoken == "\\$") {
12205 // '$' is only magic as the very last character
12206 var pos = this.reader.tell();
12207 if (this.reg_magic != this.RE_VERY_MAGIC) {
12208 while (!this.isend(this.reader.peek())) {
12209 var __tmp = this.get_token();
12210 var t = __tmp[0];
12211 var n = __tmp[1];
12212 // XXX: Vim doesn't check \v and \V?
12213 if (n == "\\c" || n == "\\C" || n == "\\m" || n == "\\M" || n == "\\Z") {
12214 continue;
12215 }
12216 if (n != "\\|" && n != "\\&" && n != "\\n" && n != "\\)") {
12217 var ntoken = "$";
12218 }
12219 break;
12220 }
12221 }
12222 this.reader.seek_set(pos);
12223 }
12224 else if (ntoken == "\\?") {
12225 // '?' is literal in '?' command.
12226 if (this.cmd == "?") {
12227 var ntoken = "?";
12228 }
12229 }
12230 viml_add(ret, ntoken);
12231 }
12232 return ret;
12233}
12234
12235// @return [actual_token, normalized_token]
12236RegexpParser.prototype.get_token = function() {
12237 if (this.reg_magic == this.RE_VERY_MAGIC) {
12238 return this.get_token_very_magic();
12239 }
12240 else if (this.reg_magic == this.RE_MAGIC) {
12241 return this.get_token_magic();
12242 }
12243 else if (this.reg_magic == this.RE_NOMAGIC) {
12244 return this.get_token_nomagic();
12245 }
12246 else if (this.reg_magic == this.RE_VERY_NOMAGIC) {
12247 return this.get_token_very_nomagic();
12248 }
12249}
12250
12251RegexpParser.prototype.get_token_very_magic = function() {
12252 if (this.isend(this.reader.peek())) {
12253 return ["<END>", "<END>"];
12254 }
12255 var c = this.reader.get();
12256 if (c == "\\") {
12257 return this.get_token_backslash_common();
12258 }
12259 else if (c == "*") {
12260 return ["*", "\\*"];
12261 }
12262 else if (c == "+") {
12263 return ["+", "\\+"];
12264 }
12265 else if (c == "=") {
12266 return ["=", "\\="];
12267 }
12268 else if (c == "?") {
12269 return ["?", "\\?"];
12270 }
12271 else if (c == "{") {
12272 return this.get_token_brace("{");
12273 }
12274 else if (c == "@") {
12275 return this.get_token_at("@");
12276 }
12277 else if (c == "^") {
12278 return ["^", "\\^"];
12279 }
12280 else if (c == "$") {
12281 return ["$", "\\$"];
12282 }
12283 else if (c == ".") {
12284 return [".", "\\."];
12285 }
12286 else if (c == "<") {
12287 return ["<", "\\<"];
12288 }
12289 else if (c == ">") {
12290 return [">", "\\>"];
12291 }
12292 else if (c == "%") {
12293 return this.get_token_percent("%");
12294 }
12295 else if (c == "[") {
12296 return this.get_token_sq("[");
12297 }
12298 else if (c == "~") {
12299 return ["~", "\\~"];
12300 }
12301 else if (c == "|") {
12302 return ["|", "\\|"];
12303 }
12304 else if (c == "&") {
12305 return ["&", "\\&"];
12306 }
12307 else if (c == "(") {
12308 return ["(", "\\("];
12309 }
12310 else if (c == ")") {
12311 return [")", "\\)"];
12312 }
12313 return [c, c];
12314}
12315
12316RegexpParser.prototype.get_token_magic = function() {
12317 if (this.isend(this.reader.peek())) {
12318 return ["<END>", "<END>"];
12319 }
12320 var c = this.reader.get();
12321 if (c == "\\") {
12322 var pos = this.reader.tell();
12323 var c = this.reader.get();
12324 if (c == "+") {
12325 return ["\\+", "\\+"];
12326 }
12327 else if (c == "=") {
12328 return ["\\=", "\\="];
12329 }
12330 else if (c == "?") {
12331 return ["\\?", "\\?"];
12332 }
12333 else if (c == "{") {
12334 return this.get_token_brace("\\{");
12335 }
12336 else if (c == "@") {
12337 return this.get_token_at("\\@");
12338 }
12339 else if (c == "<") {
12340 return ["\\<", "\\<"];
12341 }
12342 else if (c == ">") {
12343 return ["\\>", "\\>"];
12344 }
12345 else if (c == "%") {
12346 return this.get_token_percent("\\%");
12347 }
12348 else if (c == "|") {
12349 return ["\\|", "\\|"];
12350 }
12351 else if (c == "&") {
12352 return ["\\&", "\\&"];
12353 }
12354 else if (c == "(") {
12355 return ["\\(", "\\("];
12356 }
12357 else if (c == ")") {
12358 return ["\\)", "\\)"];
12359 }
12360 this.reader.seek_set(pos);
12361 return this.get_token_backslash_common();
12362 }
12363 else if (c == "*") {
12364 return ["*", "\\*"];
12365 }
12366 else if (c == "^") {
12367 return ["^", "\\^"];
12368 }
12369 else if (c == "$") {
12370 return ["$", "\\$"];
12371 }
12372 else if (c == ".") {
12373 return [".", "\\."];
12374 }
12375 else if (c == "[") {
12376 return this.get_token_sq("[");
12377 }
12378 else if (c == "~") {
12379 return ["~", "\\~"];
12380 }
12381 return [c, c];
12382}
12383
12384RegexpParser.prototype.get_token_nomagic = function() {
12385 if (this.isend(this.reader.peek())) {
12386 return ["<END>", "<END>"];
12387 }
12388 var c = this.reader.get();
12389 if (c == "\\") {
12390 var pos = this.reader.tell();
12391 var c = this.reader.get();
12392 if (c == "*") {
12393 return ["\\*", "\\*"];
12394 }
12395 else if (c == "+") {
12396 return ["\\+", "\\+"];
12397 }
12398 else if (c == "=") {
12399 return ["\\=", "\\="];
12400 }
12401 else if (c == "?") {
12402 return ["\\?", "\\?"];
12403 }
12404 else if (c == "{") {
12405 return this.get_token_brace("\\{");
12406 }
12407 else if (c == "@") {
12408 return this.get_token_at("\\@");
12409 }
12410 else if (c == ".") {
12411 return ["\\.", "\\."];
12412 }
12413 else if (c == "<") {
12414 return ["\\<", "\\<"];
12415 }
12416 else if (c == ">") {
12417 return ["\\>", "\\>"];
12418 }
12419 else if (c == "%") {
12420 return this.get_token_percent("\\%");
12421 }
12422 else if (c == "~") {
12423 return ["\\~", "\\^"];
12424 }
12425 else if (c == "[") {
12426 return this.get_token_sq("\\[");
12427 }
12428 else if (c == "|") {
12429 return ["\\|", "\\|"];
12430 }
12431 else if (c == "&") {
12432 return ["\\&", "\\&"];
12433 }
12434 else if (c == "(") {
12435 return ["\\(", "\\("];
12436 }
12437 else if (c == ")") {
12438 return ["\\)", "\\)"];
12439 }
12440 this.reader.seek_set(pos);
12441 return this.get_token_backslash_common();
12442 }
12443 else if (c == "^") {
12444 return ["^", "\\^"];
12445 }
12446 else if (c == "$") {
12447 return ["$", "\\$"];
12448 }
12449 return [c, c];
12450}
12451
12452RegexpParser.prototype.get_token_very_nomagic = function() {
12453 if (this.isend(this.reader.peek())) {
12454 return ["<END>", "<END>"];
12455 }
12456 var c = this.reader.get();
12457 if (c == "\\") {
12458 var pos = this.reader.tell();
12459 var c = this.reader.get();
12460 if (c == "*") {
12461 return ["\\*", "\\*"];
12462 }
12463 else if (c == "+") {
12464 return ["\\+", "\\+"];
12465 }
12466 else if (c == "=") {
12467 return ["\\=", "\\="];
12468 }
12469 else if (c == "?") {
12470 return ["\\?", "\\?"];
12471 }
12472 else if (c == "{") {
12473 return this.get_token_brace("\\{");
12474 }
12475 else if (c == "@") {
12476 return this.get_token_at("\\@");
12477 }
12478 else if (c == "^") {
12479 return ["\\^", "\\^"];
12480 }
12481 else if (c == "$") {
12482 return ["\\$", "\\$"];
12483 }
12484 else if (c == "<") {
12485 return ["\\<", "\\<"];
12486 }
12487 else if (c == ">") {
12488 return ["\\>", "\\>"];
12489 }
12490 else if (c == "%") {
12491 return this.get_token_percent("\\%");
12492 }
12493 else if (c == "~") {
12494 return ["\\~", "\\~"];
12495 }
12496 else if (c == "[") {
12497 return this.get_token_sq("\\[");
12498 }
12499 else if (c == "|") {
12500 return ["\\|", "\\|"];
12501 }
12502 else if (c == "&") {
12503 return ["\\&", "\\&"];
12504 }
12505 else if (c == "(") {
12506 return ["\\(", "\\("];
12507 }
12508 else if (c == ")") {
12509 return ["\\)", "\\)"];
12510 }
12511 this.reader.seek_set(pos);
12512 return this.get_token_backslash_common();
12513 }
12514 return [c, c];
12515}
12516
12517RegexpParser.prototype.get_token_backslash_common = function() {
12518 var cclass = "iIkKfFpPsSdDxXoOwWhHaAlLuU";
12519 var c = this.reader.get();
12520 if (c == "\\") {
12521 return ["\\\\", "\\\\"];
12522 }
12523 else if (viml_stridx(cclass, c) != -1) {
12524 return ["\\" + c, "\\" + c];
12525 }
12526 else if (c == "_") {
12527 var epos = this.reader.getpos();
12528 var c = this.reader.get();
12529 if (viml_stridx(cclass, c) != -1) {
12530 return ["\\_" + c, "\\_ . c"];
12531 }
12532 else if (c == "^") {
12533 return ["\\_^", "\\_^"];
12534 }
12535 else if (c == "$") {
12536 return ["\\_$", "\\_$"];
12537 }
12538 else if (c == ".") {
12539 return ["\\_.", "\\_."];
12540 }
12541 else if (c == "[") {
12542 return this.get_token_sq("\\_[");
12543 }
12544 throw Err("E63: invalid use of \\_", epos);
12545 }
12546 else if (viml_stridx("etrb", c) != -1) {
12547 return ["\\" + c, "\\" + c];
12548 }
12549 else if (viml_stridx("123456789", c) != -1) {
12550 return ["\\" + c, "\\" + c];
12551 }
12552 else if (c == "z") {
12553 var epos = this.reader.getpos();
12554 var c = this.reader.get();
12555 if (viml_stridx("123456789", c) != -1) {
12556 return ["\\z" + c, "\\z" + c];
12557 }
12558 else if (c == "s") {
12559 return ["\\zs", "\\zs"];
12560 }
12561 else if (c == "e") {
12562 return ["\\ze", "\\ze"];
12563 }
12564 else if (c == "(") {
12565 return ["\\z(", "\\z("];
12566 }
12567 throw Err("E68: Invalid character after \\z", epos);
12568 }
12569 else if (viml_stridx("cCmMvVZ", c) != -1) {
12570 return ["\\" + c, "\\" + c];
12571 }
12572 else if (c == "%") {
12573 var epos = this.reader.getpos();
12574 var c = this.reader.get();
12575 if (c == "d") {
12576 var r = this.getdecchrs();
12577 if (r != "") {
12578 return ["\\%d" + r, "\\%d" + r];
12579 }
12580 }
12581 else if (c == "o") {
12582 var r = this.getoctchrs();
12583 if (r != "") {
12584 return ["\\%o" + r, "\\%o" + r];
12585 }
12586 }
12587 else if (c == "x") {
12588 var r = this.gethexchrs(2);
12589 if (r != "") {
12590 return ["\\%x" + r, "\\%x" + r];
12591 }
12592 }
12593 else if (c == "u") {
12594 var r = this.gethexchrs(4);
12595 if (r != "") {
12596 return ["\\%u" + r, "\\%u" + r];
12597 }
12598 }
12599 else if (c == "U") {
12600 var r = this.gethexchrs(8);
12601 if (r != "") {
12602 return ["\\%U" + r, "\\%U" + r];
12603 }
12604 }
12605 throw Err("E678: Invalid character after \\%[dxouU]", epos);
12606 }
12607 return ["\\" + c, c];
12608}
12609
12610// \{}
12611RegexpParser.prototype.get_token_brace = function(pre) {
12612 var r = "";
12613 var minus = "";
12614 var comma = "";
12615 var n = "";
12616 var m = "";
12617 if (this.reader.p(0) == "-") {
12618 var minus = this.reader.get();
12619 r += minus;
12620 }
12621 if (isdigit(this.reader.p(0))) {
12622 var n = this.reader.read_digit();
12623 r += n;
12624 }
12625 if (this.reader.p(0) == ",") {
12626 var comma = this.rader.get();
12627 r += comma;
12628 }
12629 if (isdigit(this.reader.p(0))) {
12630 var m = this.reader.read_digit();
12631 r += m;
12632 }
12633 if (this.reader.p(0) == "\\") {
12634 r += this.reader.get();
12635 }
12636 if (this.reader.p(0) != "}") {
12637 throw Err("E554: Syntax error in \\{...}", this.reader.getpos());
12638 }
12639 this.reader.get();
12640 return [pre + r, "\\{" + minus + n + comma + m + "}"];
12641}
12642
12643// \[]
12644RegexpParser.prototype.get_token_sq = function(pre) {
12645 var start = this.reader.tell();
12646 var r = "";
12647 // Complement of range
12648 if (this.reader.p(0) == "^") {
12649 r += this.reader.get();
12650 }
12651 // At the start ']' and '-' mean the literal character.
12652 if (this.reader.p(0) == "]" || this.reader.p(0) == "-") {
12653 r += this.reader.get();
12654 }
12655 while (TRUE) {
12656 var startc = 0;
12657 var c = this.reader.p(0);
12658 if (this.isend(c)) {
12659 // If there is no matching ']', we assume the '[' is a normal character.
12660 this.reader.seek_set(start);
12661 return [pre, "["];
12662 }
12663 else if (c == "]") {
12664 this.reader.seek_cur(1);
12665 return [pre + r + "]", "\\[" + r + "]"];
12666 }
12667 else if (c == "[") {
12668 var e = this.get_token_sq_char_class();
12669 if (e == "") {
12670 var e = this.get_token_sq_equi_class();
12671 if (e == "") {
12672 var e = this.get_token_sq_coll_element();
12673 if (e == "") {
12674 var __tmp = this.get_token_sq_c();
12675 var e = __tmp[0];
12676 var startc = __tmp[1];
12677 }
12678 }
12679 }
12680 r += e;
12681 }
12682 else {
12683 var __tmp = this.get_token_sq_c();
12684 var e = __tmp[0];
12685 var startc = __tmp[1];
12686 r += e;
12687 }
12688 if (startc != 0 && this.reader.p(0) == "-" && !this.isend(this.reader.p(1)) && !(this.reader.p(1) == "\\" && this.reader.p(2) == "n")) {
12689 this.reader.seek_cur(1);
12690 r += "-";
12691 var c = this.reader.p(0);
12692 if (c == "[") {
12693 var e = this.get_token_sq_coll_element();
12694 if (e != "") {
12695 var endc = viml_char2nr(e[2]);
12696 }
12697 else {
12698 var __tmp = this.get_token_sq_c();
12699 var e = __tmp[0];
12700 var endc = __tmp[1];
12701 }
12702 r += e;
12703 }
12704 else {
12705 var __tmp = this.get_token_sq_c();
12706 var e = __tmp[0];
12707 var endc = __tmp[1];
12708 r += e;
12709 }
12710 if (startc > endc || endc > startc + 256) {
12711 throw Err("E16: Invalid range", this.reader.getpos());
12712 }
12713 }
12714 }
12715}
12716
12717// [c]
12718RegexpParser.prototype.get_token_sq_c = function() {
12719 var c = this.reader.p(0);
12720 if (c == "\\") {
12721 this.reader.seek_cur(1);
12722 var c = this.reader.p(0);
12723 if (c == "n") {
12724 this.reader.seek_cur(1);
12725 return ["\\n", 0];
12726 }
12727 else if (c == "r") {
12728 this.reader.seek_cur(1);
12729 return ["\\r", 13];
12730 }
12731 else if (c == "t") {
12732 this.reader.seek_cur(1);
12733 return ["\\t", 9];
12734 }
12735 else if (c == "e") {
12736 this.reader.seek_cur(1);
12737 return ["\\e", 27];
12738 }
12739 else if (c == "b") {
12740 this.reader.seek_cur(1);
12741 return ["\\b", 8];
12742 }
12743 else if (viml_stridx("]^-\\", c) != -1) {
12744 this.reader.seek_cur(1);
12745 return ["\\" + c, viml_char2nr(c)];
12746 }
12747 else if (viml_stridx("doxuU", c) != -1) {
12748 var __tmp = this.get_token_sq_coll_char();
12749 var c = __tmp[0];
12750 var n = __tmp[1];
12751 return [c, n];
12752 }
12753 else {
12754 return ["\\", viml_char2nr("\\")];
12755 }
12756 }
12757 else if (c == "-") {
12758 this.reader.seek_cur(1);
12759 return ["-", viml_char2nr("-")];
12760 }
12761 else {
12762 this.reader.seek_cur(1);
12763 return [c, viml_char2nr(c)];
12764 }
12765}
12766
12767// [\d123]
12768RegexpParser.prototype.get_token_sq_coll_char = function() {
12769 var pos = this.reader.tell();
12770 var c = this.reader.get();
12771 if (c == "d") {
12772 var r = this.getdecchrs();
12773 var n = viml_str2nr(r, 10);
12774 }
12775 else if (c == "o") {
12776 var r = this.getoctchrs();
12777 var n = viml_str2nr(r, 8);
12778 }
12779 else if (c == "x") {
12780 var r = this.gethexchrs(2);
12781 var n = viml_str2nr(r, 16);
12782 }
12783 else if (c == "u") {
12784 var r = this.gethexchrs(4);
12785 var n = viml_str2nr(r, 16);
12786 }
12787 else if (c == "U") {
12788 var r = this.gethexchrs(8);
12789 var n = viml_str2nr(r, 16);
12790 }
12791 else {
12792 var r = "";
12793 }
12794 if (r == "") {
12795 this.reader.seek_set(pos);
12796 return "\\";
12797 }
12798 return ["\\" + c + r, n];
12799}
12800
12801// [[.a.]]
12802RegexpParser.prototype.get_token_sq_coll_element = function() {
12803 if (this.reader.p(0) == "[" && this.reader.p(1) == "." && !this.isend(this.reader.p(2)) && this.reader.p(3) == "." && this.reader.p(4) == "]") {
12804 return this.reader.getn(5);
12805 }
12806 return "";
12807}
12808
12809// [[=a=]]
12810RegexpParser.prototype.get_token_sq_equi_class = function() {
12811 if (this.reader.p(0) == "[" && this.reader.p(1) == "=" && !this.isend(this.reader.p(2)) && this.reader.p(3) == "=" && this.reader.p(4) == "]") {
12812 return this.reader.getn(5);
12813 }
12814 return "";
12815}
12816
12817// [[:alpha:]]
12818RegexpParser.prototype.get_token_sq_char_class = function() {
12819 var class_names = ["alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "xdigit", "tab", "return", "backspace", "escape"];
12820 var pos = this.reader.tell();
12821 if (this.reader.p(0) == "[" && this.reader.p(1) == ":") {
12822 this.reader.seek_cur(2);
12823 var r = this.reader.read_alpha();
12824 if (this.reader.p(0) == ":" && this.reader.p(1) == "]") {
12825 this.reader.seek_cur(2);
12826 var __c15 = class_names;
12827 for (var __i15 = 0; __i15 < __c15.length; ++__i15) {
12828 var name = __c15[__i15];
12829 if (r == name) {
12830 return "[:" + name + ":]";
12831 }
12832 }
12833 }
12834 }
12835 this.reader.seek_set(pos);
12836 return "";
12837}
12838
12839// \@...
12840RegexpParser.prototype.get_token_at = function(pre) {
12841 var epos = this.reader.getpos();
12842 var c = this.reader.get();
12843 if (c == ">") {
12844 return [pre + ">", "\\@>"];
12845 }
12846 else if (c == "=") {
12847 return [pre + "=", "\\@="];
12848 }
12849 else if (c == "!") {
12850 return [pre + "!", "\\@!"];
12851 }
12852 else if (c == "<") {
12853 var c = this.reader.get();
12854 if (c == "=") {
12855 return [pre + "<=", "\\@<="];
12856 }
12857 else if (c == "!") {
12858 return [pre + "<!", "\\@<!"];
12859 }
12860 }
12861 throw Err("E64: @ follows nothing", epos);
12862}
12863
12864// \%...
12865RegexpParser.prototype.get_token_percent = function(pre) {
12866 var c = this.reader.get();
12867 if (c == "^") {
12868 return [pre + "^", "\\%^"];
12869 }
12870 else if (c == "$") {
12871 return [pre + "$", "\\%$"];
12872 }
12873 else if (c == "V") {
12874 return [pre + "V", "\\%V"];
12875 }
12876 else if (c == "#") {
12877 return [pre + "#", "\\%#"];
12878 }
12879 else if (c == "[") {
12880 return this.get_token_percent_sq(pre + "[");
12881 }
12882 else if (c == "(") {
12883 return [pre + "(", "\\%("];
12884 }
12885 else {
12886 return this.get_token_mlcv(pre);
12887 }
12888}
12889
12890// \%[]
12891RegexpParser.prototype.get_token_percent_sq = function(pre) {
12892 var r = "";
12893 while (TRUE) {
12894 var c = this.reader.peek();
12895 if (this.isend(c)) {
12896 throw Err("E69: Missing ] after \\%[", this.reader.getpos());
12897 }
12898 else if (c == "]") {
12899 if (r == "") {
12900 throw Err("E70: Empty \\%[", this.reader.getpos());
12901 }
12902 this.reader.seek_cur(1);
12903 break;
12904 }
12905 this.reader.seek_cur(1);
12906 r += c;
12907 }
12908 return [pre + r + "]", "\\%[" + r + "]"];
12909}
12910
12911// \%'m \%l \%c \%v
12912RegexpParser.prototype.get_token_mlvc = function(pre) {
12913 var r = "";
12914 var cmp = "";
12915 if (this.reader.p(0) == "<" || this.reader.p(0) == ">") {
12916 var cmp = this.reader.get();
12917 r += cmp;
12918 }
12919 if (this.reader.p(0) == "'") {
12920 r += this.reader.get();
12921 var c = this.reader.p(0);
12922 if (this.isend(c)) {
12923 // FIXME: Should be error? Vim allow this.
12924 var c = "";
12925 }
12926 else {
12927 var c = this.reader.get();
12928 }
12929 return [pre + r + c, "\\%" + cmp + "'" + c];
12930 }
12931 else if (isdigit(this.reader.p(0))) {
12932 var d = this.reader.read_digit();
12933 r += d;
12934 var c = this.reader.p(0);
12935 if (c == "l") {
12936 this.reader.get();
12937 return [pre + r + "l", "\\%" + cmp + d + "l"];
12938 }
12939 else if (c == "c") {
12940 this.reader.get();
12941 return [pre + r + "c", "\\%" + cmp + d + "c"];
12942 }
12943 else if (c == "v") {
12944 this.reader.get();
12945 return [pre + r + "v", "\\%" + cmp + d + "v"];
12946 }
12947 }
12948 throw Err("E71: Invalid character after %", this.reader.getpos());
12949}
12950
12951RegexpParser.prototype.getdecchrs = function() {
12952 return this.reader.read_digit();
12953}
12954
12955RegexpParser.prototype.getoctchrs = function() {
12956 return this.reader.read_odigit();
12957}
12958
12959RegexpParser.prototype.gethexchrs = function(n) {
12960 var r = "";
12961 var __c16 = viml_range(n);
12962 for (var __i16 = 0; __i16 < __c16.length; ++__i16) {
12963 var i = __c16[__i16];
12964 var c = this.reader.peek();
12965 if (!isxdigit(c)) {
12966 break;
12967 }
12968 r += this.reader.get();
12969 }
12970 return r;
12971}
12972
12973if (__webpack_require__.c[__webpack_require__.s] === module) {
12974 main();
12975}
12976else {
12977 module.exports = {
12978 VimLParser: VimLParser,
12979 StringReader: StringReader,
12980 Compiler: Compiler
12981 };
12982}
12983
12984/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(47)(module)))
12985
12986/***/ }),
12987/* 47 */
12988/***/ (function(module, exports) {
12989
12990module.exports = function(module) {
12991 if (!module.webpackPolyfill) {
12992 module.deprecate = function() {};
12993 module.paths = [];
12994 // module.parent = undefined by default
12995 if (!module.children) module.children = [];
12996 Object.defineProperty(module, "loaded", {
12997 enumerable: true,
12998 get: function() {
12999 return module.l;
13000 }
13001 });
13002 Object.defineProperty(module, "id", {
13003 enumerable: true,
13004 get: function() {
13005 return module.i;
13006 }
13007 });
13008 module.webpackPolyfill = 1;
13009 }
13010 return module;
13011};
13012
13013
13014/***/ }),
13015/* 48 */
13016/***/ (function(module, exports, __webpack_require__) {
13017
13018"use strict";
13019
13020Object.defineProperty(exports, "__esModule", { value: true });
13021exports.errorLinePattern = /[^:]+:\s*(.+?):\s*line\s*([0-9]+)\s*col\s*([0-9]+)/;
13022exports.commentPattern = /^[ \t]*("|')/;
13023exports.keywordPattern = /[\w#&$<>.:]/;
13024exports.builtinFunctionPattern = /^((<SID>|\b(v|g|b|s|l|a):)?[\w#&]+)[ \t]*\([^)]*\)/;
13025exports.wordPrePattern = /^.*?(((<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+)|(<SID>|<SID|<SI|<S|<|\b(v|g|b|s|l|a):))$/;
13026exports.wordNextPattern = /^((SID>|ID>|D>|>|<SID>|\b(v|g|b|s|l|a):)?[\w#&$.]+|(:[\w#&$.]+)).*?(\r\n|\r|\n)?$/;
13027exports.colorschemePattern = /\bcolorscheme[ \t]+\w*$/;
13028exports.mapCommandPattern = /^([ \t]*(\[ \t]*)?)\w*map[ \t]+/;
13029exports.highlightLinkPattern = /^[ \t]*(hi|highlight)[ \t]+link([ \t]+[^ \t]+)*[ \t]*$/;
13030exports.highlightPattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]*$/;
13031exports.highlightValuePattern = /^[ \t]*(hi|highlight)([ \t]+[^ \t]+)*[ \t]+([^ \t=]+)=[^ \t=]*$/;
13032exports.autocmdPattern = /^[ \t]*(au|autocmd)!?[ \t]+([^ \t,]+,)*[^ \t,]*$/;
13033exports.builtinVariablePattern = [
13034 /\bv:\w*$/,
13035];
13036exports.optionPattern = [
13037 /(^|[ \t]+)&\w*$/,
13038 /(^|[ \t]+)set(l|local|g|global)?[ \t]+\w+$/,
13039];
13040exports.notFunctionPattern = [
13041 /^[ \t]*\\$/,
13042 /^[ \t]*\w+$/,
13043 /^[ \t]*"/,
13044 /(let|set|colorscheme)[ \t][^ \t]*$/,
13045 /[^([,\\ \t\w#>]\w*$/,
13046 /^[ \t]*(hi|highlight)([ \t]+link)?([ \t]+[^ \t]+)*[ \t]*$/,
13047 exports.autocmdPattern,
13048];
13049exports.commandPattern = [
13050 /(^|[ \t]):\w+$/,
13051 /^[ \t]*\w+$/,
13052 /:?silent!?[ \t]\w+/,
13053];
13054exports.featurePattern = [
13055 /\bhas\([ \t]*["']\w*/,
13056];
13057exports.expandPattern = [
13058 /\bexpand\(['"]<\w*$/,
13059 /\bexpand\([ \t]*['"]\w*$/,
13060];
13061exports.notIdentifierPattern = [
13062 exports.commentPattern,
13063 /("|'):\w*$/,
13064 /^[ \t]*\\$/,
13065 /^[ \t]*call[ \t]+[^ \t()]*$/,
13066 /('|"|#|&|\$|<)\w*$/,
13067];
13068
13069
13070/***/ }),
13071/* 49 */,
13072/* 50 */,
13073/* 51 */,
13074/* 52 */,
13075/* 53 */
13076/***/ (function(module, exports, __webpack_require__) {
13077
13078"use strict";
13079
13080const taskManager = __webpack_require__(54);
13081const async_1 = __webpack_require__(84);
13082const stream_1 = __webpack_require__(117);
13083const sync_1 = __webpack_require__(118);
13084const settings_1 = __webpack_require__(120);
13085const utils = __webpack_require__(55);
13086function FastGlob(source, options) {
13087 try {
13088 assertPatternsInput(source);
13089 }
13090 catch (error) {
13091 return Promise.reject(error);
13092 }
13093 const works = getWorks(source, async_1.default, options);
13094 return Promise.all(works).then(utils.array.flatten);
13095}
13096(function (FastGlob) {
13097 function sync(source, options) {
13098 assertPatternsInput(source);
13099 const works = getWorks(source, sync_1.default, options);
13100 return utils.array.flatten(works);
13101 }
13102 FastGlob.sync = sync;
13103 function stream(source, options) {
13104 assertPatternsInput(source);
13105 const works = getWorks(source, stream_1.default, options);
13106 /**
13107 * The stream returned by the provider cannot work with an asynchronous iterator.
13108 * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
13109 * This affects performance (+25%). I don't see best solution right now.
13110 */
13111 return utils.stream.merge(works);
13112 }
13113 FastGlob.stream = stream;
13114 function generateTasks(source, options) {
13115 assertPatternsInput(source);
13116 const patterns = [].concat(source);
13117 const settings = new settings_1.default(options);
13118 return taskManager.generate(patterns, settings);
13119 }
13120 FastGlob.generateTasks = generateTasks;
13121})(FastGlob || (FastGlob = {}));
13122function getWorks(source, _Provider, options) {
13123 const patterns = [].concat(source);
13124 const settings = new settings_1.default(options);
13125 const tasks = taskManager.generate(patterns, settings);
13126 const provider = new _Provider(settings);
13127 return tasks.map(provider.read, provider);
13128}
13129function assertPatternsInput(source) {
13130 if ([].concat(source).every(isString)) {
13131 return;
13132 }
13133 throw new TypeError('Patterns must be a string or an array of strings');
13134}
13135function isString(source) {
13136 /* tslint:disable-next-line strict-type-predicates */
13137 return typeof source === 'string';
13138}
13139module.exports = FastGlob;
13140
13141
13142/***/ }),
13143/* 54 */
13144/***/ (function(module, exports, __webpack_require__) {
13145
13146"use strict";
13147
13148Object.defineProperty(exports, "__esModule", { value: true });
13149const utils = __webpack_require__(55);
13150function generate(patterns, settings) {
13151 const positivePatterns = getPositivePatterns(patterns);
13152 const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
13153 /**
13154 * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
13155 * filepath directly (without read directory).
13156 */
13157 const staticPatterns = !settings.caseSensitiveMatch ? [] : positivePatterns.filter(utils.pattern.isStaticPattern);
13158 const dynamicPatterns = !settings.caseSensitiveMatch ? positivePatterns : positivePatterns.filter(utils.pattern.isDynamicPattern);
13159 const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
13160 const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
13161 return staticTasks.concat(dynamicTasks);
13162}
13163exports.generate = generate;
13164function convertPatternsToTasks(positive, negative, dynamic) {
13165 const positivePatternsGroup = groupPatternsByBaseDirectory(positive);
13166 // When we have a global group – there is no reason to divide the patterns into independent tasks.
13167 // In this case, the global task covers the rest.
13168 if ('.' in positivePatternsGroup) {
13169 const task = convertPatternGroupToTask('.', positive, negative, dynamic);
13170 return [task];
13171 }
13172 return convertPatternGroupsToTasks(positivePatternsGroup, negative, dynamic);
13173}
13174exports.convertPatternsToTasks = convertPatternsToTasks;
13175function getPositivePatterns(patterns) {
13176 return utils.pattern.getPositivePatterns(patterns);
13177}
13178exports.getPositivePatterns = getPositivePatterns;
13179function getNegativePatternsAsPositive(patterns, ignore) {
13180 const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
13181 const positive = negative.map(utils.pattern.convertToPositivePattern);
13182 return positive;
13183}
13184exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
13185function groupPatternsByBaseDirectory(patterns) {
13186 return patterns.reduce((collection, pattern) => {
13187 const base = utils.pattern.getBaseDirectory(pattern);
13188 if (base in collection) {
13189 collection[base].push(pattern);
13190 }
13191 else {
13192 collection[base] = [pattern];
13193 }
13194 return collection;
13195 }, {});
13196}
13197exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
13198function convertPatternGroupsToTasks(positive, negative, dynamic) {
13199 return Object.keys(positive).map((base) => {
13200 return convertPatternGroupToTask(base, positive[base], negative, dynamic);
13201 });
13202}
13203exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
13204function convertPatternGroupToTask(base, positive, negative, dynamic) {
13205 return {
13206 dynamic,
13207 positive,
13208 negative,
13209 base,
13210 patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
13211 };
13212}
13213exports.convertPatternGroupToTask = convertPatternGroupToTask;
13214
13215
13216/***/ }),
13217/* 55 */
13218/***/ (function(module, exports, __webpack_require__) {
13219
13220"use strict";
13221
13222Object.defineProperty(exports, "__esModule", { value: true });
13223const array = __webpack_require__(56);
13224exports.array = array;
13225const errno = __webpack_require__(57);
13226exports.errno = errno;
13227const fs = __webpack_require__(58);
13228exports.fs = fs;
13229const path = __webpack_require__(59);
13230exports.path = path;
13231const pattern = __webpack_require__(60);
13232exports.pattern = pattern;
13233const stream = __webpack_require__(81);
13234exports.stream = stream;
13235
13236
13237/***/ }),
13238/* 56 */
13239/***/ (function(module, exports, __webpack_require__) {
13240
13241"use strict";
13242
13243Object.defineProperty(exports, "__esModule", { value: true });
13244function flatten(items) {
13245 return items.reduce((collection, item) => [].concat(collection, item), []);
13246}
13247exports.flatten = flatten;
13248
13249
13250/***/ }),
13251/* 57 */
13252/***/ (function(module, exports, __webpack_require__) {
13253
13254"use strict";
13255
13256Object.defineProperty(exports, "__esModule", { value: true });
13257function isEnoentCodeError(error) {
13258 return error.code === 'ENOENT';
13259}
13260exports.isEnoentCodeError = isEnoentCodeError;
13261
13262
13263/***/ }),
13264/* 58 */
13265/***/ (function(module, exports, __webpack_require__) {
13266
13267"use strict";
13268
13269Object.defineProperty(exports, "__esModule", { value: true });
13270class DirentFromStats {
13271 constructor(name, stats) {
13272 this.name = name;
13273 this.isBlockDevice = stats.isBlockDevice.bind(stats);
13274 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
13275 this.isDirectory = stats.isDirectory.bind(stats);
13276 this.isFIFO = stats.isFIFO.bind(stats);
13277 this.isFile = stats.isFile.bind(stats);
13278 this.isSocket = stats.isSocket.bind(stats);
13279 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
13280 }
13281}
13282function createDirentFromStats(name, stats) {
13283 return new DirentFromStats(name, stats);
13284}
13285exports.createDirentFromStats = createDirentFromStats;
13286
13287
13288/***/ }),
13289/* 59 */
13290/***/ (function(module, exports, __webpack_require__) {
13291
13292"use strict";
13293
13294Object.defineProperty(exports, "__esModule", { value: true });
13295const path = __webpack_require__(15);
13296/**
13297 * Designed to work only with simple paths: `dir\\file`.
13298 */
13299function unixify(filepath) {
13300 return filepath.replace(/\\/g, '/');
13301}
13302exports.unixify = unixify;
13303function makeAbsolute(cwd, filepath) {
13304 return path.resolve(cwd, filepath);
13305}
13306exports.makeAbsolute = makeAbsolute;
13307
13308
13309/***/ }),
13310/* 60 */
13311/***/ (function(module, exports, __webpack_require__) {
13312
13313"use strict";
13314
13315Object.defineProperty(exports, "__esModule", { value: true });
13316const path = __webpack_require__(15);
13317const globParent = __webpack_require__(61);
13318const isGlob = __webpack_require__(62);
13319const micromatch = __webpack_require__(64);
13320const GLOBSTAR = '**';
13321function isStaticPattern(pattern) {
13322 return !isDynamicPattern(pattern);
13323}
13324exports.isStaticPattern = isStaticPattern;
13325function isDynamicPattern(pattern) {
13326 return isGlob(pattern, { strict: false });
13327}
13328exports.isDynamicPattern = isDynamicPattern;
13329function convertToPositivePattern(pattern) {
13330 return isNegativePattern(pattern) ? pattern.slice(1) : pattern;
13331}
13332exports.convertToPositivePattern = convertToPositivePattern;
13333function convertToNegativePattern(pattern) {
13334 return '!' + pattern;
13335}
13336exports.convertToNegativePattern = convertToNegativePattern;
13337function isNegativePattern(pattern) {
13338 return pattern.startsWith('!') && pattern[1] !== '(';
13339}
13340exports.isNegativePattern = isNegativePattern;
13341function isPositivePattern(pattern) {
13342 return !isNegativePattern(pattern);
13343}
13344exports.isPositivePattern = isPositivePattern;
13345function getNegativePatterns(patterns) {
13346 return patterns.filter(isNegativePattern);
13347}
13348exports.getNegativePatterns = getNegativePatterns;
13349function getPositivePatterns(patterns) {
13350 return patterns.filter(isPositivePattern);
13351}
13352exports.getPositivePatterns = getPositivePatterns;
13353function getBaseDirectory(pattern) {
13354 return globParent(pattern);
13355}
13356exports.getBaseDirectory = getBaseDirectory;
13357function hasGlobStar(pattern) {
13358 return pattern.indexOf(GLOBSTAR) !== -1;
13359}
13360exports.hasGlobStar = hasGlobStar;
13361function endsWithSlashGlobStar(pattern) {
13362 return pattern.endsWith('/' + GLOBSTAR);
13363}
13364exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
13365function isAffectDepthOfReadingPattern(pattern) {
13366 const basename = path.basename(pattern);
13367 return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
13368}
13369exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
13370function getNaiveDepth(pattern) {
13371 const base = getBaseDirectory(pattern);
13372 const patternDepth = pattern.split('/').length;
13373 const patternBaseDepth = base.split('/').length;
13374 /**
13375 * This is a hack for pattern that has no base directory.
13376 *
13377 * This is related to the `*\something\*` pattern.
13378 */
13379 if (base === '.') {
13380 return patternDepth - patternBaseDepth;
13381 }
13382 return patternDepth - patternBaseDepth - 1;
13383}
13384exports.getNaiveDepth = getNaiveDepth;
13385function getMaxNaivePatternsDepth(patterns) {
13386 return patterns.reduce((max, pattern) => {
13387 const depth = getNaiveDepth(pattern);
13388 return depth > max ? depth : max;
13389 }, 0);
13390}
13391exports.getMaxNaivePatternsDepth = getMaxNaivePatternsDepth;
13392function makeRe(pattern, options) {
13393 return micromatch.makeRe(pattern, options);
13394}
13395exports.makeRe = makeRe;
13396function convertPatternsToRe(patterns, options) {
13397 return patterns.map((pattern) => makeRe(pattern, options));
13398}
13399exports.convertPatternsToRe = convertPatternsToRe;
13400function matchAny(entry, patternsRe) {
13401 const filepath = entry.replace(/^\.[\\\/]/, '');
13402 return patternsRe.some((patternRe) => patternRe.test(filepath));
13403}
13404exports.matchAny = matchAny;
13405
13406
13407/***/ }),
13408/* 61 */
13409/***/ (function(module, exports, __webpack_require__) {
13410
13411"use strict";
13412
13413
13414var isGlob = __webpack_require__(62);
13415var pathPosixDirname = __webpack_require__(15).posix.dirname;
13416var isWin32 = __webpack_require__(16).platform() === 'win32';
13417
13418var slash = '/';
13419var backslash = /\\/g;
13420var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
13421var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
13422var escaped = /\\([\*\?\|\[\]\(\)\{\}])/g;
13423
13424module.exports = function globParent(str) {
13425 // flip windows path separators
13426 if (isWin32 && str.indexOf(slash) < 0) {
13427 str = str.replace(backslash, slash);
13428 }
13429
13430 // special case for strings ending in enclosure containing path separator
13431 if (enclosure.test(str)) {
13432 str += slash;
13433 }
13434
13435 // preserves full path in case of trailing path separator
13436 str += 'a';
13437
13438 // remove path parts that are globby
13439 do {
13440 str = pathPosixDirname(str);
13441 } while (isGlob(str) || globby.test(str));
13442
13443 // remove escape chars and return result
13444 return str.replace(escaped, '$1');
13445};
13446
13447
13448/***/ }),
13449/* 62 */
13450/***/ (function(module, exports, __webpack_require__) {
13451
13452/*!
13453 * is-glob <https://github.com/jonschlinkert/is-glob>
13454 *
13455 * Copyright (c) 2014-2017, Jon Schlinkert.
13456 * Released under the MIT License.
13457 */
13458
13459var isExtglob = __webpack_require__(63);
13460var chars = { '{': '}', '(': ')', '[': ']'};
13461var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
13462var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
13463
13464module.exports = function isGlob(str, options) {
13465 if (typeof str !== 'string' || str === '') {
13466 return false;
13467 }
13468
13469 if (isExtglob(str)) {
13470 return true;
13471 }
13472
13473 var regex = strictRegex;
13474 var match;
13475
13476 // optionally relax regex
13477 if (options && options.strict === false) {
13478 regex = relaxedRegex;
13479 }
13480
13481 while ((match = regex.exec(str))) {
13482 if (match[2]) return true;
13483 var idx = match.index + match[0].length;
13484
13485 // if an open bracket/brace/paren is escaped,
13486 // set the index to the next closing character
13487 var open = match[1];
13488 var close = open ? chars[open] : null;
13489 if (open && close) {
13490 var n = str.indexOf(close, idx);
13491 if (n !== -1) {
13492 idx = n + 1;
13493 }
13494 }
13495
13496 str = str.slice(idx);
13497 }
13498 return false;
13499};
13500
13501
13502/***/ }),
13503/* 63 */
13504/***/ (function(module, exports) {
13505
13506/*!
13507 * is-extglob <https://github.com/jonschlinkert/is-extglob>
13508 *
13509 * Copyright (c) 2014-2016, Jon Schlinkert.
13510 * Licensed under the MIT License.
13511 */
13512
13513module.exports = function isExtglob(str) {
13514 if (typeof str !== 'string' || str === '') {
13515 return false;
13516 }
13517
13518 var match;
13519 while ((match = /(\\).|([@?!+*]\(.*\))/g.exec(str))) {
13520 if (match[2]) return true;
13521 str = str.slice(match.index + match[0].length);
13522 }
13523
13524 return false;
13525};
13526
13527
13528/***/ }),
13529/* 64 */
13530/***/ (function(module, exports, __webpack_require__) {
13531
13532"use strict";
13533
13534
13535const util = __webpack_require__(42);
13536const braces = __webpack_require__(65);
13537const picomatch = __webpack_require__(75);
13538const utils = __webpack_require__(78);
13539const isEmptyString = val => typeof val === 'string' && (val === '' || val === './');
13540
13541/**
13542 * Returns an array of strings that match one or more glob patterns.
13543 *
13544 * ```js
13545 * const mm = require('micromatch');
13546 * // mm(list, patterns[, options]);
13547 *
13548 * console.log(mm(['a.js', 'a.txt'], ['*.js']));
13549 * //=> [ 'a.js' ]
13550 * ```
13551 * @param {String|Array<string>} list List of strings to match.
13552 * @param {String|Array<string>} patterns One or more glob patterns to use for matching.
13553 * @param {Object} options See available [options](#options)
13554 * @return {Array} Returns an array of matches
13555 * @summary false
13556 * @api public
13557 */
13558
13559const micromatch = (list, patterns, options) => {
13560 patterns = [].concat(patterns);
13561 list = [].concat(list);
13562
13563 let omit = new Set();
13564 let keep = new Set();
13565 let items = new Set();
13566 let negatives = 0;
13567
13568 let onResult = state => {
13569 items.add(state.output);
13570 if (options && options.onResult) {
13571 options.onResult(state);
13572 }
13573 };
13574
13575 for (let i = 0; i < patterns.length; i++) {
13576 let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
13577 let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
13578 if (negated) negatives++;
13579
13580 for (let item of list) {
13581 let matched = isMatch(item, true);
13582
13583 let match = negated ? !matched.isMatch : matched.isMatch;
13584 if (!match) continue;
13585
13586 if (negated) {
13587 omit.add(matched.output);
13588 } else {
13589 omit.delete(matched.output);
13590 keep.add(matched.output);
13591 }
13592 }
13593 }
13594
13595 let result = negatives === patterns.length ? [...items] : [...keep];
13596 let matches = result.filter(item => !omit.has(item));
13597
13598 if (options && matches.length === 0) {
13599 if (options.failglob === true) {
13600 throw new Error(`No matches found for "${patterns.join(', ')}"`);
13601 }
13602
13603 if (options.nonull === true || options.nullglob === true) {
13604 return options.unescape ? patterns.map(p => p.replace(/\\/g, '')) : patterns;
13605 }
13606 }
13607
13608 return matches;
13609};
13610
13611/**
13612 * Backwards compatibility
13613 */
13614
13615micromatch.match = micromatch;
13616
13617/**
13618 * Returns a matcher function from the given glob `pattern` and `options`.
13619 * The returned function takes a string to match as its only argument and returns
13620 * true if the string is a match.
13621 *
13622 * ```js
13623 * const mm = require('micromatch');
13624 * // mm.matcher(pattern[, options]);
13625 *
13626 * const isMatch = mm.matcher('*.!(*a)');
13627 * console.log(isMatch('a.a')); //=> false
13628 * console.log(isMatch('a.b')); //=> true
13629 * ```
13630 * @param {String} `pattern` Glob pattern
13631 * @param {Object} `options`
13632 * @return {Function} Returns a matcher function.
13633 * @api public
13634 */
13635
13636micromatch.matcher = (pattern, options) => picomatch(pattern, options);
13637
13638/**
13639 * Returns true if **any** of the given glob `patterns` match the specified `string`.
13640 *
13641 * ```js
13642 * const mm = require('micromatch');
13643 * // mm.isMatch(string, patterns[, options]);
13644 *
13645 * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true
13646 * console.log(mm.isMatch('a.a', 'b.*')); //=> false
13647 * ```
13648 * @param {String} str The string to test.
13649 * @param {String|Array} patterns One or more glob patterns to use for matching.
13650 * @param {Object} [options] See available [options](#options).
13651 * @return {Boolean} Returns true if any patterns match `str`
13652 * @api public
13653 */
13654
13655micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
13656
13657/**
13658 * Backwards compatibility
13659 */
13660
13661micromatch.any = micromatch.isMatch;
13662
13663/**
13664 * Returns a list of strings that _**do not match any**_ of the given `patterns`.
13665 *
13666 * ```js
13667 * const mm = require('micromatch');
13668 * // mm.not(list, patterns[, options]);
13669 *
13670 * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));
13671 * //=> ['b.b', 'c.c']
13672 * ```
13673 * @param {Array} `list` Array of strings to match.
13674 * @param {String|Array} `patterns` One or more glob pattern to use for matching.
13675 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13676 * @return {Array} Returns an array of strings that **do not match** the given patterns.
13677 * @api public
13678 */
13679
13680micromatch.not = (list, patterns, options = {}) => {
13681 patterns = [].concat(patterns).map(String);
13682 let result = new Set();
13683 let items = [];
13684
13685 let onResult = state => {
13686 if (options.onResult) options.onResult(state);
13687 items.push(state.output);
13688 };
13689
13690 let matches = micromatch(list, patterns, { ...options, onResult });
13691
13692 for (let item of items) {
13693 if (!matches.includes(item)) {
13694 result.add(item);
13695 }
13696 }
13697 return [...result];
13698};
13699
13700/**
13701 * Returns true if the given `string` contains the given pattern. Similar
13702 * to [.isMatch](#isMatch) but the pattern can match any part of the string.
13703 *
13704 * ```js
13705 * var mm = require('micromatch');
13706 * // mm.contains(string, pattern[, options]);
13707 *
13708 * console.log(mm.contains('aa/bb/cc', '*b'));
13709 * //=> true
13710 * console.log(mm.contains('aa/bb/cc', '*d'));
13711 * //=> false
13712 * ```
13713 * @param {String} `str` The string to match.
13714 * @param {String|Array} `patterns` Glob pattern to use for matching.
13715 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13716 * @return {Boolean} Returns true if the patter matches any part of `str`.
13717 * @api public
13718 */
13719
13720micromatch.contains = (str, pattern, options) => {
13721 if (typeof str !== 'string') {
13722 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
13723 }
13724
13725 if (Array.isArray(pattern)) {
13726 return pattern.some(p => micromatch.contains(str, p, options));
13727 }
13728
13729 if (typeof pattern === 'string') {
13730 if (isEmptyString(str) || isEmptyString(pattern)) {
13731 return false;
13732 }
13733
13734 if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {
13735 return true;
13736 }
13737 }
13738
13739 return micromatch.isMatch(str, pattern, { ...options, contains: true });
13740};
13741
13742/**
13743 * Filter the keys of the given object with the given `glob` pattern
13744 * and `options`. Does not attempt to match nested keys. If you need this feature,
13745 * use [glob-object][] instead.
13746 *
13747 * ```js
13748 * const mm = require('micromatch');
13749 * // mm.matchKeys(object, patterns[, options]);
13750 *
13751 * const obj = { aa: 'a', ab: 'b', ac: 'c' };
13752 * console.log(mm.matchKeys(obj, '*b'));
13753 * //=> { ab: 'b' }
13754 * ```
13755 * @param {Object} `object` The object with keys to filter.
13756 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
13757 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13758 * @return {Object} Returns an object with only keys that match the given patterns.
13759 * @api public
13760 */
13761
13762micromatch.matchKeys = (obj, patterns, options) => {
13763 if (!utils.isObject(obj)) {
13764 throw new TypeError('Expected the first argument to be an object');
13765 }
13766 let keys = micromatch(Object.keys(obj), patterns, options);
13767 let res = {};
13768 for (let key of keys) res[key] = obj[key];
13769 return res;
13770};
13771
13772/**
13773 * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.
13774 *
13775 * ```js
13776 * const mm = require('micromatch');
13777 * // mm.some(list, patterns[, options]);
13778 *
13779 * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
13780 * // true
13781 * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));
13782 * // false
13783 * ```
13784 * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.
13785 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
13786 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13787 * @return {Boolean} Returns true if any patterns match `str`
13788 * @api public
13789 */
13790
13791micromatch.some = (list, patterns, options) => {
13792 let items = [].concat(list);
13793
13794 for (let pattern of [].concat(patterns)) {
13795 let isMatch = picomatch(String(pattern), options);
13796 if (items.some(item => isMatch(item))) {
13797 return true;
13798 }
13799 }
13800 return false;
13801};
13802
13803/**
13804 * Returns true if every string in the given `list` matches
13805 * any of the given glob `patterns`.
13806 *
13807 * ```js
13808 * const mm = require('micromatch');
13809 * // mm.every(list, patterns[, options]);
13810 *
13811 * console.log(mm.every('foo.js', ['foo.js']));
13812 * // true
13813 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));
13814 * // true
13815 * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));
13816 * // false
13817 * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));
13818 * // false
13819 * ```
13820 * @param {String|Array} `list` The string or array of strings to test.
13821 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
13822 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13823 * @return {Boolean} Returns true if any patterns match `str`
13824 * @api public
13825 */
13826
13827micromatch.every = (list, patterns, options) => {
13828 let items = [].concat(list);
13829
13830 for (let pattern of [].concat(patterns)) {
13831 let isMatch = picomatch(String(pattern), options);
13832 if (!items.every(item => isMatch(item))) {
13833 return false;
13834 }
13835 }
13836 return true;
13837};
13838
13839/**
13840 * Returns true if **all** of the given `patterns` match
13841 * the specified string.
13842 *
13843 * ```js
13844 * const mm = require('micromatch');
13845 * // mm.all(string, patterns[, options]);
13846 *
13847 * console.log(mm.all('foo.js', ['foo.js']));
13848 * // true
13849 *
13850 * console.log(mm.all('foo.js', ['*.js', '!foo.js']));
13851 * // false
13852 *
13853 * console.log(mm.all('foo.js', ['*.js', 'foo.js']));
13854 * // true
13855 *
13856 * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));
13857 * // true
13858 * ```
13859 * @param {String|Array} `str` The string to test.
13860 * @param {String|Array} `patterns` One or more glob patterns to use for matching.
13861 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13862 * @return {Boolean} Returns true if any patterns match `str`
13863 * @api public
13864 */
13865
13866micromatch.all = (str, patterns, options) => {
13867 if (typeof str !== 'string') {
13868 throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
13869 }
13870
13871 return [].concat(patterns).every(p => picomatch(p, options)(str));
13872};
13873
13874/**
13875 * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.
13876 *
13877 * ```js
13878 * const mm = require('micromatch');
13879 * // mm.capture(pattern, string[, options]);
13880 *
13881 * console.log(mm.capture('test/*.js', 'test/foo.js'));
13882 * //=> ['foo']
13883 * console.log(mm.capture('test/*.js', 'foo/bar.css'));
13884 * //=> null
13885 * ```
13886 * @param {String} `glob` Glob pattern to use for matching.
13887 * @param {String} `input` String to match
13888 * @param {Object} `options` See available [options](#options) for changing how matches are performed
13889 * @return {Boolean} Returns an array of captures if the input matches the glob pattern, otherwise `null`.
13890 * @api public
13891 */
13892
13893micromatch.capture = (glob, input, options) => {
13894 let posix = utils.isWindows(options);
13895 let regex = picomatch.makeRe(String(glob), { ...options, capture: true });
13896 let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);
13897
13898 if (match) {
13899 return match.slice(1).map(v => v === void 0 ? '' : v);
13900 }
13901};
13902
13903/**
13904 * Create a regular expression from the given glob `pattern`.
13905 *
13906 * ```js
13907 * const mm = require('micromatch');
13908 * // mm.makeRe(pattern[, options]);
13909 *
13910 * console.log(mm.makeRe('*.js'));
13911 * //=> /^(?:(\.[\\\/])?(?!\.)(?=.)[^\/]*?\.js)$/
13912 * ```
13913 * @param {String} `pattern` A glob pattern to convert to regex.
13914 * @param {Object} `options`
13915 * @return {RegExp} Returns a regex created from the given pattern.
13916 * @api public
13917 */
13918
13919micromatch.makeRe = (...args) => picomatch.makeRe(...args);
13920
13921/**
13922 * Scan a glob pattern to separate the pattern into segments. Used
13923 * by the [split](#split) method.
13924 *
13925 * ```js
13926 * const mm = require('micromatch');
13927 * const state = mm.scan(pattern[, options]);
13928 * ```
13929 * @param {String} `pattern`
13930 * @param {Object} `options`
13931 * @return {Object} Returns an object with
13932 * @api public
13933 */
13934
13935micromatch.scan = (...args) => picomatch.scan(...args);
13936
13937/**
13938 * Parse a glob pattern to create the source string for a regular
13939 * expression.
13940 *
13941 * ```js
13942 * const mm = require('micromatch');
13943 * const state = mm(pattern[, options]);
13944 * ```
13945 * @param {String} `glob`
13946 * @param {Object} `options`
13947 * @return {Object} Returns an object with useful properties and output to be used as regex source string.
13948 * @api public
13949 */
13950
13951micromatch.parse = (patterns, options) => {
13952 let res = [];
13953 for (let pattern of [].concat(patterns || [])) {
13954 for (let str of braces(String(pattern), options)) {
13955 res.push(picomatch.parse(str, options));
13956 }
13957 }
13958 return res;
13959};
13960
13961/**
13962 * Process the given brace `pattern`.
13963 *
13964 * ```js
13965 * const { braces } = require('micromatch');
13966 * console.log(braces('foo/{a,b,c}/bar'));
13967 * //=> [ 'foo/(a|b|c)/bar' ]
13968 *
13969 * console.log(braces('foo/{a,b,c}/bar', { expand: true }));
13970 * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]
13971 * ```
13972 * @param {String} `pattern` String with brace pattern to process.
13973 * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.
13974 * @return {Array}
13975 * @api public
13976 */
13977
13978micromatch.braces = (pattern, options) => {
13979 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
13980 if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) {
13981 return [pattern];
13982 }
13983 return braces(pattern, options);
13984};
13985
13986/**
13987 * Expand braces
13988 */
13989
13990micromatch.braceExpand = (pattern, options) => {
13991 if (typeof pattern !== 'string') throw new TypeError('Expected a string');
13992 return micromatch.braces(pattern, { ...options, expand: true });
13993};
13994
13995/**
13996 * Expose micromatch
13997 */
13998
13999module.exports = micromatch;
14000
14001
14002/***/ }),
14003/* 65 */
14004/***/ (function(module, exports, __webpack_require__) {
14005
14006"use strict";
14007
14008
14009const stringify = __webpack_require__(66);
14010const compile = __webpack_require__(68);
14011const expand = __webpack_require__(72);
14012const parse = __webpack_require__(73);
14013
14014/**
14015 * Expand the given pattern or create a regex-compatible string.
14016 *
14017 * ```js
14018 * const braces = require('braces');
14019 * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']
14020 * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']
14021 * ```
14022 * @param {String} `str`
14023 * @param {Object} `options`
14024 * @return {String}
14025 * @api public
14026 */
14027
14028const braces = (input, options = {}) => {
14029 let output = [];
14030
14031 if (Array.isArray(input)) {
14032 for (let pattern of input) {
14033 let result = braces.create(pattern, options);
14034 if (Array.isArray(result)) {
14035 output.push(...result);
14036 } else {
14037 output.push(result);
14038 }
14039 }
14040 } else {
14041 output = [].concat(braces.create(input, options));
14042 }
14043
14044 if (options && options.expand === true && options.nodupes === true) {
14045 output = [...new Set(output)];
14046 }
14047 return output;
14048};
14049
14050/**
14051 * Parse the given `str` with the given `options`.
14052 *
14053 * ```js
14054 * // braces.parse(pattern, [, options]);
14055 * const ast = braces.parse('a/{b,c}/d');
14056 * console.log(ast);
14057 * ```
14058 * @param {String} pattern Brace pattern to parse
14059 * @param {Object} options
14060 * @return {Object} Returns an AST
14061 * @api public
14062 */
14063
14064braces.parse = (input, options = {}) => parse(input, options);
14065
14066/**
14067 * Creates a braces string from an AST, or an AST node.
14068 *
14069 * ```js
14070 * const braces = require('braces');
14071 * let ast = braces.parse('foo/{a,b}/bar');
14072 * console.log(stringify(ast.nodes[2])); //=> '{a,b}'
14073 * ```
14074 * @param {String} `input` Brace pattern or AST.
14075 * @param {Object} `options`
14076 * @return {Array} Returns an array of expanded values.
14077 * @api public
14078 */
14079
14080braces.stringify = (input, options = {}) => {
14081 if (typeof input === 'string') {
14082 return stringify(braces.parse(input, options), options);
14083 }
14084 return stringify(input, options);
14085};
14086
14087/**
14088 * Compiles a brace pattern into a regex-compatible, optimized string.
14089 * This method is called by the main [braces](#braces) function by default.
14090 *
14091 * ```js
14092 * const braces = require('braces');
14093 * console.log(braces.compile('a/{b,c}/d'));
14094 * //=> ['a/(b|c)/d']
14095 * ```
14096 * @param {String} `input` Brace pattern or AST.
14097 * @param {Object} `options`
14098 * @return {Array} Returns an array of expanded values.
14099 * @api public
14100 */
14101
14102braces.compile = (input, options = {}) => {
14103 if (typeof input === 'string') {
14104 input = braces.parse(input, options);
14105 }
14106 return compile(input, options);
14107};
14108
14109/**
14110 * Expands a brace pattern into an array. This method is called by the
14111 * main [braces](#braces) function when `options.expand` is true. Before
14112 * using this method it's recommended that you read the [performance notes](#performance))
14113 * and advantages of using [.compile](#compile) instead.
14114 *
14115 * ```js
14116 * const braces = require('braces');
14117 * console.log(braces.expand('a/{b,c}/d'));
14118 * //=> ['a/b/d', 'a/c/d'];
14119 * ```
14120 * @param {String} `pattern` Brace pattern
14121 * @param {Object} `options`
14122 * @return {Array} Returns an array of expanded values.
14123 * @api public
14124 */
14125
14126braces.expand = (input, options = {}) => {
14127 if (typeof input === 'string') {
14128 input = braces.parse(input, options);
14129 }
14130
14131 let result = expand(input, options);
14132
14133 // filter out empty strings if specified
14134 if (options.noempty === true) {
14135 result = result.filter(Boolean);
14136 }
14137
14138 // filter out duplicates if specified
14139 if (options.nodupes === true) {
14140 result = [...new Set(result)];
14141 }
14142
14143 return result;
14144};
14145
14146/**
14147 * Processes a brace pattern and returns either an expanded array
14148 * (if `options.expand` is true), a highly optimized regex-compatible string.
14149 * This method is called by the main [braces](#braces) function.
14150 *
14151 * ```js
14152 * const braces = require('braces');
14153 * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))
14154 * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'
14155 * ```
14156 * @param {String} `pattern` Brace pattern
14157 * @param {Object} `options`
14158 * @return {Array} Returns an array of expanded values.
14159 * @api public
14160 */
14161
14162braces.create = (input, options = {}) => {
14163 if (input === '' || input.length < 3) {
14164 return [input];
14165 }
14166
14167 return options.expand !== true
14168 ? braces.compile(input, options)
14169 : braces.expand(input, options);
14170};
14171
14172/**
14173 * Expose "braces"
14174 */
14175
14176module.exports = braces;
14177
14178
14179/***/ }),
14180/* 66 */
14181/***/ (function(module, exports, __webpack_require__) {
14182
14183"use strict";
14184
14185
14186const utils = __webpack_require__(67);
14187
14188module.exports = (ast, options = {}) => {
14189 let stringify = (node, parent = {}) => {
14190 let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
14191 let invalidNode = node.invalid === true && options.escapeInvalid === true;
14192 let output = '';
14193
14194 if (node.value) {
14195 if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
14196 return '\\' + node.value;
14197 }
14198 return node.value;
14199 }
14200
14201 if (node.value) {
14202 return node.value;
14203 }
14204
14205 if (node.nodes) {
14206 for (let child of node.nodes) {
14207 output += stringify(child);
14208 }
14209 }
14210 return output;
14211 };
14212
14213 return stringify(ast);
14214};
14215
14216
14217
14218/***/ }),
14219/* 67 */
14220/***/ (function(module, exports, __webpack_require__) {
14221
14222"use strict";
14223
14224
14225exports.isInteger = num => {
14226 if (typeof num === 'number') {
14227 return Number.isInteger(num);
14228 }
14229 if (typeof num === 'string' && num.trim() !== '') {
14230 return Number.isInteger(Number(num));
14231 }
14232 return false;
14233};
14234
14235/**
14236 * Find a node of the given type
14237 */
14238
14239exports.find = (node, type) => node.nodes.find(node => node.type === type);
14240
14241/**
14242 * Find a node of the given type
14243 */
14244
14245exports.exceedsLimit = (min, max, step = 1, limit) => {
14246 if (limit === false) return false;
14247 if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
14248 return ((Number(max) - Number(min)) / Number(step)) >= limit;
14249};
14250
14251/**
14252 * Escape the given node with '\\' before node.value
14253 */
14254
14255exports.escapeNode = (block, n = 0, type) => {
14256 let node = block.nodes[n];
14257 if (!node) return;
14258
14259 if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
14260 if (node.escaped !== true) {
14261 node.value = '\\' + node.value;
14262 node.escaped = true;
14263 }
14264 }
14265};
14266
14267/**
14268 * Returns true if the given brace node should be enclosed in literal braces
14269 */
14270
14271exports.encloseBrace = node => {
14272 if (node.type !== 'brace') return false;
14273 if ((node.commas >> 0 + node.ranges >> 0) === 0) {
14274 node.invalid = true;
14275 return true;
14276 }
14277 return false;
14278};
14279
14280/**
14281 * Returns true if a brace node is invalid.
14282 */
14283
14284exports.isInvalidBrace = block => {
14285 if (block.type !== 'brace') return false;
14286 if (block.invalid === true || block.dollar) return true;
14287 if ((block.commas >> 0 + block.ranges >> 0) === 0) {
14288 block.invalid = true;
14289 return true;
14290 }
14291 if (block.open !== true || block.close !== true) {
14292 block.invalid = true;
14293 return true;
14294 }
14295 return false;
14296};
14297
14298/**
14299 * Returns true if a node is an open or close node
14300 */
14301
14302exports.isOpenOrClose = node => {
14303 if (node.type === 'open' || node.type === 'close') {
14304 return true;
14305 }
14306 return node.open === true || node.close === true;
14307};
14308
14309/**
14310 * Reduce an array of text nodes.
14311 */
14312
14313exports.reduce = nodes => nodes.reduce((acc, node) => {
14314 if (node.type === 'text') acc.push(node.value);
14315 if (node.type === 'range') node.type = 'text';
14316 return acc;
14317}, []);
14318
14319/**
14320 * Flatten an array
14321 */
14322
14323exports.flatten = (...args) => {
14324 const result = [];
14325 const flat = arr => {
14326 for (let i = 0; i < arr.length; i++) {
14327 let ele = arr[i];
14328 Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
14329 }
14330 return result;
14331 };
14332 flat(args);
14333 return result;
14334};
14335
14336
14337/***/ }),
14338/* 68 */
14339/***/ (function(module, exports, __webpack_require__) {
14340
14341"use strict";
14342
14343
14344const fill = __webpack_require__(69);
14345const utils = __webpack_require__(67);
14346
14347const compile = (ast, options = {}) => {
14348 let walk = (node, parent = {}) => {
14349 let invalidBlock = utils.isInvalidBrace(parent);
14350 let invalidNode = node.invalid === true && options.escapeInvalid === true;
14351 let invalid = invalidBlock === true || invalidNode === true;
14352 let prefix = options.escapeInvalid === true ? '\\' : '';
14353 let output = '';
14354
14355 if (node.isOpen === true) {
14356 return prefix + node.value;
14357 }
14358 if (node.isClose === true) {
14359 return prefix + node.value;
14360 }
14361
14362 if (node.type === 'open') {
14363 return invalid ? (prefix + node.value) : '(';
14364 }
14365
14366 if (node.type === 'close') {
14367 return invalid ? (prefix + node.value) : ')';
14368 }
14369
14370 if (node.type === 'comma') {
14371 return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');
14372 }
14373
14374 if (node.value) {
14375 return node.value;
14376 }
14377
14378 if (node.nodes && node.ranges > 0) {
14379 let args = utils.reduce(node.nodes);
14380 let range = fill(...args, { ...options, wrap: false, toRegex: true });
14381
14382 if (range.length !== 0) {
14383 return args.length > 1 && range.length > 1 ? `(${range})` : range;
14384 }
14385 }
14386
14387 if (node.nodes) {
14388 for (let child of node.nodes) {
14389 output += walk(child, node);
14390 }
14391 }
14392 return output;
14393 };
14394
14395 return walk(ast);
14396};
14397
14398module.exports = compile;
14399
14400
14401/***/ }),
14402/* 69 */
14403/***/ (function(module, exports, __webpack_require__) {
14404
14405"use strict";
14406/*!
14407 * fill-range <https://github.com/jonschlinkert/fill-range>
14408 *
14409 * Copyright (c) 2014-present, Jon Schlinkert.
14410 * Licensed under the MIT License.
14411 */
14412
14413
14414
14415const util = __webpack_require__(42);
14416const toRegexRange = __webpack_require__(70);
14417
14418const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
14419
14420const transform = toNumber => {
14421 return value => toNumber === true ? Number(value) : String(value);
14422};
14423
14424const isValidValue = value => {
14425 return typeof value === 'number' || (typeof value === 'string' && value !== '');
14426};
14427
14428const isNumber = num => Number.isInteger(+num);
14429
14430const zeros = input => {
14431 let value = `${input}`;
14432 let index = -1;
14433 if (value[0] === '-') value = value.slice(1);
14434 if (value === '0') return false;
14435 while (value[++index] === '0');
14436 return index > 0;
14437};
14438
14439const stringify = (start, end, options) => {
14440 if (typeof start === 'string' || typeof end === 'string') {
14441 return true;
14442 }
14443 return options.stringify === true;
14444};
14445
14446const pad = (input, maxLength, toNumber) => {
14447 if (maxLength > 0) {
14448 let dash = input[0] === '-' ? '-' : '';
14449 if (dash) input = input.slice(1);
14450 input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));
14451 }
14452 if (toNumber === false) {
14453 return String(input);
14454 }
14455 return input;
14456};
14457
14458const toMaxLen = (input, maxLength) => {
14459 let negative = input[0] === '-' ? '-' : '';
14460 if (negative) {
14461 input = input.slice(1);
14462 maxLength--;
14463 }
14464 while (input.length < maxLength) input = '0' + input;
14465 return negative ? ('-' + input) : input;
14466};
14467
14468const toSequence = (parts, options) => {
14469 parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
14470 parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
14471
14472 let prefix = options.capture ? '' : '?:';
14473 let positives = '';
14474 let negatives = '';
14475 let result;
14476
14477 if (parts.positives.length) {
14478 positives = parts.positives.join('|');
14479 }
14480
14481 if (parts.negatives.length) {
14482 negatives = `-(${prefix}${parts.negatives.join('|')})`;
14483 }
14484
14485 if (positives && negatives) {
14486 result = `${positives}|${negatives}`;
14487 } else {
14488 result = positives || negatives;
14489 }
14490
14491 if (options.wrap) {
14492 return `(${prefix}${result})`;
14493 }
14494
14495 return result;
14496};
14497
14498const toRange = (a, b, isNumbers, options) => {
14499 if (isNumbers) {
14500 return toRegexRange(a, b, { wrap: false, ...options });
14501 }
14502
14503 let start = String.fromCharCode(a);
14504 if (a === b) return start;
14505
14506 let stop = String.fromCharCode(b);
14507 return `[${start}-${stop}]`;
14508};
14509
14510const toRegex = (start, end, options) => {
14511 if (Array.isArray(start)) {
14512 let wrap = options.wrap === true;
14513 let prefix = options.capture ? '' : '?:';
14514 return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
14515 }
14516 return toRegexRange(start, end, options);
14517};
14518
14519const rangeError = (...args) => {
14520 return new RangeError('Invalid range arguments: ' + util.inspect(...args));
14521};
14522
14523const invalidRange = (start, end, options) => {
14524 if (options.strictRanges === true) throw rangeError([start, end]);
14525 return [];
14526};
14527
14528const invalidStep = (step, options) => {
14529 if (options.strictRanges === true) {
14530 throw new TypeError(`Expected step "${step}" to be a number`);
14531 }
14532 return [];
14533};
14534
14535const fillNumbers = (start, end, step = 1, options = {}) => {
14536 let a = Number(start);
14537 let b = Number(end);
14538
14539 if (!Number.isInteger(a) || !Number.isInteger(b)) {
14540 if (options.strictRanges === true) throw rangeError([start, end]);
14541 return [];
14542 }
14543
14544 // fix negative zero
14545 if (a === 0) a = 0;
14546 if (b === 0) b = 0;
14547
14548 let descending = a > b;
14549 let startString = String(start);
14550 let endString = String(end);
14551 let stepString = String(step);
14552 step = Math.max(Math.abs(step), 1);
14553
14554 let padded = zeros(startString) || zeros(endString) || zeros(stepString);
14555 let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
14556 let toNumber = padded === false && stringify(start, end, options) === false;
14557 let format = options.transform || transform(toNumber);
14558
14559 if (options.toRegex && step === 1) {
14560 return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
14561 }
14562
14563 let parts = { negatives: [], positives: [] };
14564 let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));
14565 let range = [];
14566 let index = 0;
14567
14568 while (descending ? a >= b : a <= b) {
14569 if (options.toRegex === true && step > 1) {
14570 push(a);
14571 } else {
14572 range.push(pad(format(a, index), maxLen, toNumber));
14573 }
14574 a = descending ? a - step : a + step;
14575 index++;
14576 }
14577
14578 if (options.toRegex === true) {
14579 return step > 1
14580 ? toSequence(parts, options)
14581 : toRegex(range, null, { wrap: false, ...options });
14582 }
14583
14584 return range;
14585};
14586
14587const fillLetters = (start, end, step = 1, options = {}) => {
14588 if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {
14589 return invalidRange(start, end, options);
14590 }
14591
14592
14593 let format = options.transform || (val => String.fromCharCode(val));
14594 let a = `${start}`.charCodeAt(0);
14595 let b = `${end}`.charCodeAt(0);
14596
14597 let descending = a > b;
14598 let min = Math.min(a, b);
14599 let max = Math.max(a, b);
14600
14601 if (options.toRegex && step === 1) {
14602 return toRange(min, max, false, options);
14603 }
14604
14605 let range = [];
14606 let index = 0;
14607
14608 while (descending ? a >= b : a <= b) {
14609 range.push(format(a, index));
14610 a = descending ? a - step : a + step;
14611 index++;
14612 }
14613
14614 if (options.toRegex === true) {
14615 return toRegex(range, null, { wrap: false, options });
14616 }
14617
14618 return range;
14619};
14620
14621const fill = (start, end, step, options = {}) => {
14622 if (end == null && isValidValue(start)) {
14623 return [start];
14624 }
14625
14626 if (!isValidValue(start) || !isValidValue(end)) {
14627 return invalidRange(start, end, options);
14628 }
14629
14630 if (typeof step === 'function') {
14631 return fill(start, end, 1, { transform: step });
14632 }
14633
14634 if (isObject(step)) {
14635 return fill(start, end, 0, step);
14636 }
14637
14638 let opts = { ...options };
14639 if (opts.capture === true) opts.wrap = true;
14640 step = step || opts.step || 1;
14641
14642 if (!isNumber(step)) {
14643 if (step != null && !isObject(step)) return invalidStep(step, opts);
14644 return fill(start, end, 1, step);
14645 }
14646
14647 if (isNumber(start) && isNumber(end)) {
14648 return fillNumbers(start, end, step, opts);
14649 }
14650
14651 return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
14652};
14653
14654module.exports = fill;
14655
14656
14657/***/ }),
14658/* 70 */
14659/***/ (function(module, exports, __webpack_require__) {
14660
14661"use strict";
14662/*!
14663 * to-regex-range <https://github.com/micromatch/to-regex-range>
14664 *
14665 * Copyright (c) 2015-present, Jon Schlinkert.
14666 * Released under the MIT License.
14667 */
14668
14669
14670
14671const isNumber = __webpack_require__(71);
14672
14673const toRegexRange = (min, max, options) => {
14674 if (isNumber(min) === false) {
14675 throw new TypeError('toRegexRange: expected the first argument to be a number');
14676 }
14677
14678 if (max === void 0 || min === max) {
14679 return String(min);
14680 }
14681
14682 if (isNumber(max) === false) {
14683 throw new TypeError('toRegexRange: expected the second argument to be a number.');
14684 }
14685
14686 let opts = { relaxZeros: true, ...options };
14687 if (typeof opts.strictZeros === 'boolean') {
14688 opts.relaxZeros = opts.strictZeros === false;
14689 }
14690
14691 let relax = String(opts.relaxZeros);
14692 let shorthand = String(opts.shorthand);
14693 let capture = String(opts.capture);
14694 let wrap = String(opts.wrap);
14695 let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;
14696
14697 if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
14698 return toRegexRange.cache[cacheKey].result;
14699 }
14700
14701 let a = Math.min(min, max);
14702 let b = Math.max(min, max);
14703
14704 if (Math.abs(a - b) === 1) {
14705 let result = min + '|' + max;
14706 if (opts.capture) {
14707 return `(${result})`;
14708 }
14709 if (opts.wrap === false) {
14710 return result;
14711 }
14712 return `(?:${result})`;
14713 }
14714
14715 let isPadded = hasPadding(min) || hasPadding(max);
14716 let state = { min, max, a, b };
14717 let positives = [];
14718 let negatives = [];
14719
14720 if (isPadded) {
14721 state.isPadded = isPadded;
14722 state.maxLen = String(state.max).length;
14723 }
14724
14725 if (a < 0) {
14726 let newMin = b < 0 ? Math.abs(b) : 1;
14727 negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
14728 a = state.a = 0;
14729 }
14730
14731 if (b >= 0) {
14732 positives = splitToPatterns(a, b, state, opts);
14733 }
14734
14735 state.negatives = negatives;
14736 state.positives = positives;
14737 state.result = collatePatterns(negatives, positives, opts);
14738
14739 if (opts.capture === true) {
14740 state.result = `(${state.result})`;
14741 } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {
14742 state.result = `(?:${state.result})`;
14743 }
14744
14745 toRegexRange.cache[cacheKey] = state;
14746 return state.result;
14747};
14748
14749function collatePatterns(neg, pos, options) {
14750 let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];
14751 let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];
14752 let intersected = filterPatterns(neg, pos, '-?', true, options) || [];
14753 let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
14754 return subpatterns.join('|');
14755}
14756
14757function splitToRanges(min, max) {
14758 let nines = 1;
14759 let zeros = 1;
14760
14761 let stop = countNines(min, nines);
14762 let stops = new Set([max]);
14763
14764 while (min <= stop && stop <= max) {
14765 stops.add(stop);
14766 nines += 1;
14767 stop = countNines(min, nines);
14768 }
14769
14770 stop = countZeros(max + 1, zeros) - 1;
14771
14772 while (min < stop && stop <= max) {
14773 stops.add(stop);
14774 zeros += 1;
14775 stop = countZeros(max + 1, zeros) - 1;
14776 }
14777
14778 stops = [...stops];
14779 stops.sort(compare);
14780 return stops;
14781}
14782
14783/**
14784 * Convert a range to a regex pattern
14785 * @param {Number} `start`
14786 * @param {Number} `stop`
14787 * @return {String}
14788 */
14789
14790function rangeToPattern(start, stop, options) {
14791 if (start === stop) {
14792 return { pattern: start, count: [], digits: 0 };
14793 }
14794
14795 let zipped = zip(start, stop);
14796 let digits = zipped.length;
14797 let pattern = '';
14798 let count = 0;
14799
14800 for (let i = 0; i < digits; i++) {
14801 let [startDigit, stopDigit] = zipped[i];
14802
14803 if (startDigit === stopDigit) {
14804 pattern += startDigit;
14805
14806 } else if (startDigit !== '0' || stopDigit !== '9') {
14807 pattern += toCharacterClass(startDigit, stopDigit, options);
14808
14809 } else {
14810 count++;
14811 }
14812 }
14813
14814 if (count) {
14815 pattern += options.shorthand === true ? '\\d' : '[0-9]';
14816 }
14817
14818 return { pattern, count: [count], digits };
14819}
14820
14821function splitToPatterns(min, max, tok, options) {
14822 let ranges = splitToRanges(min, max);
14823 let tokens = [];
14824 let start = min;
14825 let prev;
14826
14827 for (let i = 0; i < ranges.length; i++) {
14828 let max = ranges[i];
14829 let obj = rangeToPattern(String(start), String(max), options);
14830 let zeros = '';
14831
14832 if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
14833 if (prev.count.length > 1) {
14834 prev.count.pop();
14835 }
14836
14837 prev.count.push(obj.count[0]);
14838 prev.string = prev.pattern + toQuantifier(prev.count);
14839 start = max + 1;
14840 continue;
14841 }
14842
14843 if (tok.isPadded) {
14844 zeros = padZeros(max, tok, options);
14845 }
14846
14847 obj.string = zeros + obj.pattern + toQuantifier(obj.count);
14848 tokens.push(obj);
14849 start = max + 1;
14850 prev = obj;
14851 }
14852
14853 return tokens;
14854}
14855
14856function filterPatterns(arr, comparison, prefix, intersection, options) {
14857 let result = [];
14858
14859 for (let ele of arr) {
14860 let { string } = ele;
14861
14862 // only push if _both_ are negative...
14863 if (!intersection && !contains(comparison, 'string', string)) {
14864 result.push(prefix + string);
14865 }
14866
14867 // or _both_ are positive
14868 if (intersection && contains(comparison, 'string', string)) {
14869 result.push(prefix + string);
14870 }
14871 }
14872 return result;
14873}
14874
14875/**
14876 * Zip strings
14877 */
14878
14879function zip(a, b) {
14880 let arr = [];
14881 for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
14882 return arr;
14883}
14884
14885function compare(a, b) {
14886 return a > b ? 1 : b > a ? -1 : 0;
14887}
14888
14889function contains(arr, key, val) {
14890 return arr.some(ele => ele[key] === val);
14891}
14892
14893function countNines(min, len) {
14894 return Number(String(min).slice(0, -len) + '9'.repeat(len));
14895}
14896
14897function countZeros(integer, zeros) {
14898 return integer - (integer % Math.pow(10, zeros));
14899}
14900
14901function toQuantifier(digits) {
14902 let [start = 0, stop = ''] = digits;
14903 if (stop || start > 1) {
14904 return `{${start + (stop ? ',' + stop : '')}}`;
14905 }
14906 return '';
14907}
14908
14909function toCharacterClass(a, b, options) {
14910 return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;
14911}
14912
14913function hasPadding(str) {
14914 return /^-?(0+)\d/.test(str);
14915}
14916
14917function padZeros(value, tok, options) {
14918 if (!tok.isPadded) {
14919 return value;
14920 }
14921
14922 let diff = Math.abs(tok.maxLen - String(value).length);
14923 let relax = options.relaxZeros !== false;
14924
14925 switch (diff) {
14926 case 0:
14927 return '';
14928 case 1:
14929 return relax ? '0?' : '0';
14930 case 2:
14931 return relax ? '0{0,2}' : '00';
14932 default: {
14933 return relax ? `0{0,${diff}}` : `0{${diff}}`;
14934 }
14935 }
14936}
14937
14938/**
14939 * Cache
14940 */
14941
14942toRegexRange.cache = {};
14943toRegexRange.clearCache = () => (toRegexRange.cache = {});
14944
14945/**
14946 * Expose `toRegexRange`
14947 */
14948
14949module.exports = toRegexRange;
14950
14951
14952/***/ }),
14953/* 71 */
14954/***/ (function(module, exports, __webpack_require__) {
14955
14956"use strict";
14957/*!
14958 * is-number <https://github.com/jonschlinkert/is-number>
14959 *
14960 * Copyright (c) 2014-present, Jon Schlinkert.
14961 * Released under the MIT License.
14962 */
14963
14964
14965
14966module.exports = function(num) {
14967 if (typeof num === 'number') {
14968 return num - num === 0;
14969 }
14970 if (typeof num === 'string' && num.trim() !== '') {
14971 return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
14972 }
14973 return false;
14974};
14975
14976
14977/***/ }),
14978/* 72 */
14979/***/ (function(module, exports, __webpack_require__) {
14980
14981"use strict";
14982
14983
14984const fill = __webpack_require__(69);
14985const stringify = __webpack_require__(66);
14986const utils = __webpack_require__(67);
14987
14988const append = (queue = '', stash = '', enclose = false) => {
14989 let result = [];
14990
14991 queue = [].concat(queue);
14992 stash = [].concat(stash);
14993
14994 if (!stash.length) return queue;
14995 if (!queue.length) {
14996 return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
14997 }
14998
14999 for (let item of queue) {
15000 if (Array.isArray(item)) {
15001 for (let value of item) {
15002 result.push(append(value, stash, enclose));
15003 }
15004 } else {
15005 for (let ele of stash) {
15006 if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
15007 result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));
15008 }
15009 }
15010 }
15011 return utils.flatten(result);
15012};
15013
15014const expand = (ast, options = {}) => {
15015 let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;
15016
15017 let walk = (node, parent = {}) => {
15018 node.queue = [];
15019
15020 let p = parent;
15021 let q = parent.queue;
15022
15023 while (p.type !== 'brace' && p.type !== 'root' && p.parent) {
15024 p = p.parent;
15025 q = p.queue;
15026 }
15027
15028 if (node.invalid || node.dollar) {
15029 q.push(append(q.pop(), stringify(node, options)));
15030 return;
15031 }
15032
15033 if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {
15034 q.push(append(q.pop(), ['{}']));
15035 return;
15036 }
15037
15038 if (node.nodes && node.ranges > 0) {
15039 let args = utils.reduce(node.nodes);
15040
15041 if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
15042 throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
15043 }
15044
15045 let range = fill(...args, options);
15046 if (range.length === 0) {
15047 range = stringify(node, options);
15048 }
15049
15050 q.push(append(q.pop(), range));
15051 node.nodes = [];
15052 return;
15053 }
15054
15055 let enclose = utils.encloseBrace(node);
15056 let queue = node.queue;
15057 let block = node;
15058
15059 while (block.type !== 'brace' && block.type !== 'root' && block.parent) {
15060 block = block.parent;
15061 queue = block.queue;
15062 }
15063
15064 for (let i = 0; i < node.nodes.length; i++) {
15065 let child = node.nodes[i];
15066
15067 if (child.type === 'comma' && node.type === 'brace') {
15068 if (i === 1) queue.push('');
15069 queue.push('');
15070 continue;
15071 }
15072
15073 if (child.type === 'close') {
15074 q.push(append(q.pop(), queue, enclose));
15075 continue;
15076 }
15077
15078 if (child.value && child.type !== 'open') {
15079 queue.push(append(queue.pop(), child.value));
15080 continue;
15081 }
15082
15083 if (child.nodes) {
15084 walk(child, node);
15085 }
15086 }
15087
15088 return queue;
15089 };
15090
15091 return utils.flatten(walk(ast));
15092};
15093
15094module.exports = expand;
15095
15096
15097/***/ }),
15098/* 73 */
15099/***/ (function(module, exports, __webpack_require__) {
15100
15101"use strict";
15102
15103
15104const stringify = __webpack_require__(66);
15105
15106/**
15107 * Constants
15108 */
15109
15110const {
15111 MAX_LENGTH,
15112 CHAR_BACKSLASH, /* \ */
15113 CHAR_BACKTICK, /* ` */
15114 CHAR_COMMA, /* , */
15115 CHAR_DOT, /* . */
15116 CHAR_LEFT_PARENTHESES, /* ( */
15117 CHAR_RIGHT_PARENTHESES, /* ) */
15118 CHAR_LEFT_CURLY_BRACE, /* { */
15119 CHAR_RIGHT_CURLY_BRACE, /* } */
15120 CHAR_LEFT_SQUARE_BRACKET, /* [ */
15121 CHAR_RIGHT_SQUARE_BRACKET, /* ] */
15122 CHAR_DOUBLE_QUOTE, /* " */
15123 CHAR_SINGLE_QUOTE, /* ' */
15124 CHAR_NO_BREAK_SPACE,
15125 CHAR_ZERO_WIDTH_NOBREAK_SPACE
15126} = __webpack_require__(74);
15127
15128/**
15129 * parse
15130 */
15131
15132const parse = (input, options = {}) => {
15133 if (typeof input !== 'string') {
15134 throw new TypeError('Expected a string');
15135 }
15136
15137 let opts = options || {};
15138 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
15139 if (input.length > max) {
15140 throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
15141 }
15142
15143 let ast = { type: 'root', input, nodes: [] };
15144 let stack = [ast];
15145 let block = ast;
15146 let prev = ast;
15147 let brackets = 0;
15148 let length = input.length;
15149 let index = 0;
15150 let depth = 0;
15151 let value;
15152 let memo = {};
15153
15154 /**
15155 * Helpers
15156 */
15157
15158 const advance = () => input[index++];
15159 const push = node => {
15160 if (node.type === 'text' && prev.type === 'dot') {
15161 prev.type = 'text';
15162 }
15163
15164 if (prev && prev.type === 'text' && node.type === 'text') {
15165 prev.value += node.value;
15166 return;
15167 }
15168
15169 block.nodes.push(node);
15170 node.parent = block;
15171 node.prev = prev;
15172 prev = node;
15173 return node;
15174 };
15175
15176 push({ type: 'bos' });
15177
15178 while (index < length) {
15179 block = stack[stack.length - 1];
15180 value = advance();
15181
15182 /**
15183 * Invalid chars
15184 */
15185
15186 if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {
15187 continue;
15188 }
15189
15190 /**
15191 * Escaped chars
15192 */
15193
15194 if (value === CHAR_BACKSLASH) {
15195 push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });
15196 continue;
15197 }
15198
15199 /**
15200 * Right square bracket (literal): ']'
15201 */
15202
15203 if (value === CHAR_RIGHT_SQUARE_BRACKET) {
15204 push({ type: 'text', value: '\\' + value });
15205 continue;
15206 }
15207
15208 /**
15209 * Left square bracket: '['
15210 */
15211
15212 if (value === CHAR_LEFT_SQUARE_BRACKET) {
15213 brackets++;
15214
15215 let closed = true;
15216 let next;
15217
15218 while (index < length && (next = advance())) {
15219 value += next;
15220
15221 if (next === CHAR_LEFT_SQUARE_BRACKET) {
15222 brackets++;
15223 continue;
15224 }
15225
15226 if (next === CHAR_BACKSLASH) {
15227 value += advance();
15228 continue;
15229 }
15230
15231 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
15232 brackets--;
15233
15234 if (brackets === 0) {
15235 break;
15236 }
15237 }
15238 }
15239
15240 push({ type: 'text', value });
15241 continue;
15242 }
15243
15244 /**
15245 * Parentheses
15246 */
15247
15248 if (value === CHAR_LEFT_PARENTHESES) {
15249 block = push({ type: 'paren', nodes: [] });
15250 stack.push(block);
15251 push({ type: 'text', value });
15252 continue;
15253 }
15254
15255 if (value === CHAR_RIGHT_PARENTHESES) {
15256 if (block.type !== 'paren') {
15257 push({ type: 'text', value });
15258 continue;
15259 }
15260 block = stack.pop();
15261 push({ type: 'text', value });
15262 block = stack[stack.length - 1];
15263 continue;
15264 }
15265
15266 /**
15267 * Quotes: '|"|`
15268 */
15269
15270 if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
15271 let open = value;
15272 let next;
15273
15274 if (options.keepQuotes !== true) {
15275 value = '';
15276 }
15277
15278 while (index < length && (next = advance())) {
15279 if (next === CHAR_BACKSLASH) {
15280 value += next + advance();
15281 continue;
15282 }
15283
15284 if (next === open) {
15285 if (options.keepQuotes === true) value += next;
15286 break;
15287 }
15288
15289 value += next;
15290 }
15291
15292 push({ type: 'text', value });
15293 continue;
15294 }
15295
15296 /**
15297 * Left curly brace: '{'
15298 */
15299
15300 if (value === CHAR_LEFT_CURLY_BRACE) {
15301 depth++;
15302
15303 let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
15304 let brace = {
15305 type: 'brace',
15306 open: true,
15307 close: false,
15308 dollar,
15309 depth,
15310 commas: 0,
15311 ranges: 0,
15312 nodes: []
15313 };
15314
15315 block = push(brace);
15316 stack.push(block);
15317 push({ type: 'open', value });
15318 continue;
15319 }
15320
15321 /**
15322 * Right curly brace: '}'
15323 */
15324
15325 if (value === CHAR_RIGHT_CURLY_BRACE) {
15326 if (block.type !== 'brace') {
15327 push({ type: 'text', value });
15328 continue;
15329 }
15330
15331 let type = 'close';
15332 block = stack.pop();
15333 block.close = true;
15334
15335 push({ type, value });
15336 depth--;
15337
15338 block = stack[stack.length - 1];
15339 continue;
15340 }
15341
15342 /**
15343 * Comma: ','
15344 */
15345
15346 if (value === CHAR_COMMA && depth > 0) {
15347 if (block.ranges > 0) {
15348 block.ranges = 0;
15349 let open = block.nodes.shift();
15350 block.nodes = [open, { type: 'text', value: stringify(block) }];
15351 }
15352
15353 push({ type: 'comma', value });
15354 block.commas++;
15355 continue;
15356 }
15357
15358 /**
15359 * Dot: '.'
15360 */
15361
15362 if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
15363 let siblings = block.nodes;
15364
15365 if (depth === 0 || siblings.length === 0) {
15366 push({ type: 'text', value });
15367 continue;
15368 }
15369
15370 if (prev.type === 'dot') {
15371 block.range = [];
15372 prev.value += value;
15373 prev.type = 'range';
15374
15375 if (block.nodes.length !== 3 && block.nodes.length !== 5) {
15376 block.invalid = true;
15377 block.ranges = 0;
15378 prev.type = 'text';
15379 continue;
15380 }
15381
15382 block.ranges++;
15383 block.args = [];
15384 continue;
15385 }
15386
15387 if (prev.type === 'range') {
15388 siblings.pop();
15389
15390 let before = siblings[siblings.length - 1];
15391 before.value += prev.value + value;
15392 prev = before;
15393 block.ranges--;
15394 continue;
15395 }
15396
15397 push({ type: 'dot', value });
15398 continue;
15399 }
15400
15401 /**
15402 * Text
15403 */
15404
15405 push({ type: 'text', value });
15406 }
15407
15408 // Mark imbalanced braces and brackets as invalid
15409 do {
15410 block = stack.pop();
15411
15412 if (block.type !== 'root') {
15413 block.nodes.forEach(node => {
15414 if (!node.nodes) {
15415 if (node.type === 'open') node.isOpen = true;
15416 if (node.type === 'close') node.isClose = true;
15417 if (!node.nodes) node.type = 'text';
15418 node.invalid = true;
15419 }
15420 });
15421
15422 // get the location of the block on parent.nodes (block's siblings)
15423 let parent = stack[stack.length - 1];
15424 let index = parent.nodes.indexOf(block);
15425 // replace the (invalid) block with it's nodes
15426 parent.nodes.splice(index, 1, ...block.nodes);
15427 }
15428 } while (stack.length > 0);
15429
15430 push({ type: 'eos' });
15431 return ast;
15432};
15433
15434module.exports = parse;
15435
15436
15437/***/ }),
15438/* 74 */
15439/***/ (function(module, exports, __webpack_require__) {
15440
15441"use strict";
15442
15443
15444module.exports = {
15445 MAX_LENGTH: 1024 * 64,
15446
15447 // Digits
15448 CHAR_0: '0', /* 0 */
15449 CHAR_9: '9', /* 9 */
15450
15451 // Alphabet chars.
15452 CHAR_UPPERCASE_A: 'A', /* A */
15453 CHAR_LOWERCASE_A: 'a', /* a */
15454 CHAR_UPPERCASE_Z: 'Z', /* Z */
15455 CHAR_LOWERCASE_Z: 'z', /* z */
15456
15457 CHAR_LEFT_PARENTHESES: '(', /* ( */
15458 CHAR_RIGHT_PARENTHESES: ')', /* ) */
15459
15460 CHAR_ASTERISK: '*', /* * */
15461
15462 // Non-alphabetic chars.
15463 CHAR_AMPERSAND: '&', /* & */
15464 CHAR_AT: '@', /* @ */
15465 CHAR_BACKSLASH: '\\', /* \ */
15466 CHAR_BACKTICK: '`', /* ` */
15467 CHAR_CARRIAGE_RETURN: '\r', /* \r */
15468 CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
15469 CHAR_COLON: ':', /* : */
15470 CHAR_COMMA: ',', /* , */
15471 CHAR_DOLLAR: '$', /* . */
15472 CHAR_DOT: '.', /* . */
15473 CHAR_DOUBLE_QUOTE: '"', /* " */
15474 CHAR_EQUAL: '=', /* = */
15475 CHAR_EXCLAMATION_MARK: '!', /* ! */
15476 CHAR_FORM_FEED: '\f', /* \f */
15477 CHAR_FORWARD_SLASH: '/', /* / */
15478 CHAR_HASH: '#', /* # */
15479 CHAR_HYPHEN_MINUS: '-', /* - */
15480 CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
15481 CHAR_LEFT_CURLY_BRACE: '{', /* { */
15482 CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
15483 CHAR_LINE_FEED: '\n', /* \n */
15484 CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
15485 CHAR_PERCENT: '%', /* % */
15486 CHAR_PLUS: '+', /* + */
15487 CHAR_QUESTION_MARK: '?', /* ? */
15488 CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
15489 CHAR_RIGHT_CURLY_BRACE: '}', /* } */
15490 CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
15491 CHAR_SEMICOLON: ';', /* ; */
15492 CHAR_SINGLE_QUOTE: '\'', /* ' */
15493 CHAR_SPACE: ' ', /* */
15494 CHAR_TAB: '\t', /* \t */
15495 CHAR_UNDERSCORE: '_', /* _ */
15496 CHAR_VERTICAL_LINE: '|', /* | */
15497 CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
15498};
15499
15500
15501/***/ }),
15502/* 75 */
15503/***/ (function(module, exports, __webpack_require__) {
15504
15505"use strict";
15506
15507
15508module.exports = __webpack_require__(76);
15509
15510
15511/***/ }),
15512/* 76 */
15513/***/ (function(module, exports, __webpack_require__) {
15514
15515"use strict";
15516
15517
15518const path = __webpack_require__(15);
15519const scan = __webpack_require__(77);
15520const parse = __webpack_require__(80);
15521const utils = __webpack_require__(78);
15522
15523/**
15524 * Creates a matcher function from one or more glob patterns. The
15525 * returned function takes a string to match as its first argument,
15526 * and returns true if the string is a match. The returned matcher
15527 * function also takes a boolean as the second argument that, when true,
15528 * returns an object with additional information.
15529 *
15530 * ```js
15531 * const picomatch = require('picomatch');
15532 * // picomatch(glob[, options]);
15533 *
15534 * const isMatch = picomatch('*.!(*a)');
15535 * console.log(isMatch('a.a')); //=> false
15536 * console.log(isMatch('a.b')); //=> true
15537 * ```
15538 * @name picomatch
15539 * @param {String|Array} `globs` One or more glob patterns.
15540 * @param {Object=} `options`
15541 * @return {Function=} Returns a matcher function.
15542 * @api public
15543 */
15544
15545const picomatch = (glob, options, returnState = false) => {
15546 if (Array.isArray(glob)) {
15547 let fns = glob.map(input => picomatch(input, options, returnState));
15548 return str => {
15549 for (let isMatch of fns) {
15550 let state = isMatch(str);
15551 if (state) return state;
15552 }
15553 return false;
15554 };
15555 }
15556
15557 if (typeof glob !== 'string' || glob === '') {
15558 throw new TypeError('Expected pattern to be a non-empty string');
15559 }
15560
15561 let opts = options || {};
15562 let posix = utils.isWindows(options);
15563 let regex = picomatch.makeRe(glob, options, false, true);
15564 let state = regex.state;
15565 delete regex.state;
15566
15567 let isIgnored = () => false;
15568 if (opts.ignore) {
15569 let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
15570 isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
15571 }
15572
15573 const matcher = (input, returnObject = false) => {
15574 let { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });
15575 let result = { glob, state, regex, posix, input, output, match, isMatch };
15576
15577 if (typeof opts.onResult === 'function') {
15578 opts.onResult(result);
15579 }
15580
15581 if (isMatch === false) {
15582 result.isMatch = false;
15583 return returnObject ? result : false;
15584 }
15585
15586 if (isIgnored(input)) {
15587 if (typeof opts.onIgnore === 'function') {
15588 opts.onIgnore(result);
15589 }
15590 result.isMatch = false;
15591 return returnObject ? result : false;
15592 }
15593
15594 if (typeof opts.onMatch === 'function') {
15595 opts.onMatch(result);
15596 }
15597 return returnObject ? result : true;
15598 };
15599
15600 if (returnState) {
15601 matcher.state = state;
15602 }
15603
15604 return matcher;
15605};
15606
15607/**
15608 * Test `input` with the given `regex`. This is used by the main
15609 * `picomatch()` function to test the input string.
15610 *
15611 * ```js
15612 * const picomatch = require('picomatch');
15613 * // picomatch.test(input, regex[, options]);
15614 *
15615 * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
15616 * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
15617 * ```
15618 * @param {String} `input` String to test.
15619 * @param {RegExp} `regex`
15620 * @return {Object} Returns an object with matching info.
15621 * @api public
15622 */
15623
15624picomatch.test = (input, regex, options, { glob, posix } = {}) => {
15625 if (typeof input !== 'string') {
15626 throw new TypeError('Expected input to be a string');
15627 }
15628
15629 if (input === '') {
15630 return { isMatch: false, output: '' };
15631 }
15632
15633 let opts = options || {};
15634 let format = opts.format || (posix ? utils.toPosixSlashes : null);
15635 let match = input === glob;
15636 let output = (match && format) ? format(input) : input;
15637
15638 if (match === false) {
15639 output = format ? format(input) : input;
15640 match = output === glob;
15641 }
15642
15643 if (match === false || opts.capture === true) {
15644 if (opts.matchBase === true || opts.basename === true) {
15645 match = picomatch.matchBase(input, regex, options, posix);
15646 } else {
15647 match = regex.exec(output);
15648 }
15649 }
15650
15651 return { isMatch: !!match, match, output };
15652};
15653
15654/**
15655 * Match the basename of a filepath.
15656 *
15657 * ```js
15658 * const picomatch = require('picomatch');
15659 * // picomatch.matchBase(input, glob[, options]);
15660 * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
15661 * ```
15662 * @param {String} `input` String to test.
15663 * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
15664 * @return {Boolean}
15665 * @api public
15666 */
15667
15668picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
15669 let regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
15670 return regex.test(path.basename(input));
15671};
15672
15673/**
15674 * Returns true if **any** of the given glob `patterns` match the specified `string`.
15675 *
15676 * ```js
15677 * const picomatch = require('picomatch');
15678 * // picomatch.isMatch(string, patterns[, options]);
15679 *
15680 * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
15681 * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
15682 * ```
15683 * @param {String|Array} str The string to test.
15684 * @param {String|Array} patterns One or more glob patterns to use for matching.
15685 * @param {Object} [options] See available [options](#options).
15686 * @return {Boolean} Returns true if any patterns match `str`
15687 * @api public
15688 */
15689
15690picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
15691
15692/**
15693 * Parse a glob pattern to create the source string for a regular
15694 * expression.
15695 *
15696 * ```js
15697 * const picomatch = require('picomatch');
15698 * const result = picomatch.parse(glob[, options]);
15699 * ```
15700 * @param {String} `glob`
15701 * @param {Object} `options`
15702 * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
15703 * @api public
15704 */
15705
15706picomatch.parse = (glob, options) => parse(glob, options);
15707
15708/**
15709 * Scan a glob pattern to separate the pattern into segments.
15710 *
15711 * ```js
15712 * const picomatch = require('picomatch');
15713 * // picomatch.scan(input[, options]);
15714 *
15715 * const result = picomatch.scan('!./foo/*.js');
15716 * console.log(result);
15717 * // { prefix: '!./',
15718 * // input: '!./foo/*.js',
15719 * // base: 'foo',
15720 * // glob: '*.js',
15721 * // negated: true,
15722 * // isGlob: true }
15723 * ```
15724 * @param {String} `input` Glob pattern to scan.
15725 * @param {Object} `options`
15726 * @return {Object} Returns an object with
15727 * @api public
15728 */
15729
15730picomatch.scan = (input, options) => scan(input, options);
15731
15732/**
15733 * Create a regular expression from a glob pattern.
15734 *
15735 * ```js
15736 * const picomatch = require('picomatch');
15737 * // picomatch.makeRe(input[, options]);
15738 *
15739 * console.log(picomatch.makeRe('*.js'));
15740 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
15741 * ```
15742 * @param {String} `input` A glob pattern to convert to regex.
15743 * @param {Object} `options`
15744 * @return {RegExp} Returns a regex created from the given pattern.
15745 * @api public
15746 */
15747
15748picomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {
15749 if (!input || typeof input !== 'string') {
15750 throw new TypeError('Expected a non-empty string');
15751 }
15752
15753 let opts = options || {};
15754 let prepend = opts.contains ? '' : '^';
15755 let append = opts.contains ? '' : '$';
15756 let state = { negated: false, fastpaths: true };
15757 let prefix = '';
15758 let output;
15759
15760 if (input.startsWith('./')) {
15761 input = input.slice(2);
15762 prefix = state.prefix = './';
15763 }
15764
15765 if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
15766 output = parse.fastpaths(input, options);
15767 }
15768
15769 if (output === void 0) {
15770 state = picomatch.parse(input, options);
15771 state.prefix = prefix + (state.prefix || '');
15772 output = state.output;
15773 }
15774
15775 if (returnOutput === true) {
15776 return output;
15777 }
15778
15779 let source = `${prepend}(?:${output})${append}`;
15780 if (state && state.negated === true) {
15781 source = `^(?!${source}).*$`;
15782 }
15783
15784 let regex = picomatch.toRegex(source, options);
15785 if (returnState === true) {
15786 regex.state = state;
15787 }
15788
15789 return regex;
15790};
15791
15792/**
15793 * Create a regular expression from the given regex source string.
15794 *
15795 * ```js
15796 * const picomatch = require('picomatch');
15797 * // picomatch.toRegex(source[, options]);
15798 *
15799 * const { output } = picomatch.parse('*.js');
15800 * console.log(picomatch.toRegex(output));
15801 * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
15802 * ```
15803 * @param {String} `source` Regular expression source string.
15804 * @param {Object} `options`
15805 * @return {RegExp}
15806 * @api public
15807 */
15808
15809picomatch.toRegex = (source, options) => {
15810 try {
15811 let opts = options || {};
15812 return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
15813 } catch (err) {
15814 if (options && options.debug === true) throw err;
15815 return /$^/;
15816 }
15817};
15818
15819/**
15820 * Picomatch constants.
15821 * @return {Object}
15822 */
15823
15824picomatch.constants = __webpack_require__(79);
15825
15826/**
15827 * Expose "picomatch"
15828 */
15829
15830module.exports = picomatch;
15831
15832
15833/***/ }),
15834/* 77 */
15835/***/ (function(module, exports, __webpack_require__) {
15836
15837"use strict";
15838
15839
15840const utils = __webpack_require__(78);
15841
15842const {
15843 CHAR_ASTERISK, /* * */
15844 CHAR_AT, /* @ */
15845 CHAR_BACKWARD_SLASH, /* \ */
15846 CHAR_COMMA, /* , */
15847 CHAR_DOT, /* . */
15848 CHAR_EXCLAMATION_MARK, /* ! */
15849 CHAR_FORWARD_SLASH, /* / */
15850 CHAR_LEFT_CURLY_BRACE, /* { */
15851 CHAR_LEFT_PARENTHESES, /* ( */
15852 CHAR_LEFT_SQUARE_BRACKET, /* [ */
15853 CHAR_PLUS, /* + */
15854 CHAR_QUESTION_MARK, /* ? */
15855 CHAR_RIGHT_CURLY_BRACE, /* } */
15856 CHAR_RIGHT_PARENTHESES, /* ) */
15857 CHAR_RIGHT_SQUARE_BRACKET /* ] */
15858} = __webpack_require__(79);
15859
15860const isPathSeparator = code => {
15861 return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
15862};
15863
15864/**
15865 * Quickly scans a glob pattern and returns an object with a handful of
15866 * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
15867 * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).
15868 *
15869 * ```js
15870 * const pm = require('picomatch');
15871 * console.log(pm.scan('foo/bar/*.js'));
15872 * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
15873 * ```
15874 * @param {String} `str`
15875 * @param {Object} `options`
15876 * @return {Object} Returns an object with tokens and regex source string.
15877 * @api public
15878 */
15879
15880module.exports = (input, options) => {
15881 let opts = options || {};
15882 let length = input.length - 1;
15883 let index = -1;
15884 let start = 0;
15885 let lastIndex = 0;
15886 let isGlob = false;
15887 let backslashes = false;
15888 let negated = false;
15889 let braces = 0;
15890 let prev;
15891 let code;
15892
15893 let braceEscaped = false;
15894
15895 let eos = () => index >= length;
15896 let advance = () => {
15897 prev = code;
15898 return input.charCodeAt(++index);
15899 };
15900
15901 while (index < length) {
15902 code = advance();
15903 let next;
15904
15905 if (code === CHAR_BACKWARD_SLASH) {
15906 backslashes = true;
15907 next = advance();
15908
15909 if (next === CHAR_LEFT_CURLY_BRACE) {
15910 braceEscaped = true;
15911 }
15912 continue;
15913 }
15914
15915 if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
15916 braces++;
15917
15918 while (!eos() && (next = advance())) {
15919 if (next === CHAR_BACKWARD_SLASH) {
15920 backslashes = true;
15921 next = advance();
15922 continue;
15923 }
15924
15925 if (next === CHAR_LEFT_CURLY_BRACE) {
15926 braces++;
15927 continue;
15928 }
15929
15930 if (!braceEscaped && next === CHAR_DOT && (next = advance()) === CHAR_DOT) {
15931 isGlob = true;
15932 break;
15933 }
15934
15935 if (!braceEscaped && next === CHAR_COMMA) {
15936 isGlob = true;
15937 break;
15938 }
15939
15940 if (next === CHAR_RIGHT_CURLY_BRACE) {
15941 braces--;
15942 if (braces === 0) {
15943 braceEscaped = false;
15944 break;
15945 }
15946 }
15947 }
15948 }
15949
15950 if (code === CHAR_FORWARD_SLASH) {
15951 if (prev === CHAR_DOT && index === (start + 1)) {
15952 start += 2;
15953 continue;
15954 }
15955
15956 lastIndex = index + 1;
15957 continue;
15958 }
15959
15960 if (code === CHAR_ASTERISK) {
15961 isGlob = true;
15962 break;
15963 }
15964
15965 if (code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK) {
15966 isGlob = true;
15967 break;
15968 }
15969
15970 if (code === CHAR_LEFT_SQUARE_BRACKET) {
15971 while (!eos() && (next = advance())) {
15972 if (next === CHAR_BACKWARD_SLASH) {
15973 backslashes = true;
15974 next = advance();
15975 continue;
15976 }
15977
15978 if (next === CHAR_RIGHT_SQUARE_BRACKET) {
15979 isGlob = true;
15980 break;
15981 }
15982 }
15983 }
15984
15985 let isExtglobChar = code === CHAR_PLUS
15986 || code === CHAR_AT
15987 || code === CHAR_EXCLAMATION_MARK;
15988
15989 if (isExtglobChar && input.charCodeAt(index + 1) === CHAR_LEFT_PARENTHESES) {
15990 isGlob = true;
15991 break;
15992 }
15993
15994 if (code === CHAR_EXCLAMATION_MARK && index === start) {
15995 negated = true;
15996 start++;
15997 continue;
15998 }
15999
16000 if (code === CHAR_LEFT_PARENTHESES) {
16001 while (!eos() && (next = advance())) {
16002 if (next === CHAR_BACKWARD_SLASH) {
16003 backslashes = true;
16004 next = advance();
16005 continue;
16006 }
16007
16008 if (next === CHAR_RIGHT_PARENTHESES) {
16009 isGlob = true;
16010 break;
16011 }
16012 }
16013 }
16014
16015 if (isGlob) {
16016 break;
16017 }
16018 }
16019
16020 let prefix = '';
16021 let orig = input;
16022 let base = input;
16023 let glob = '';
16024
16025 if (start > 0) {
16026 prefix = input.slice(0, start);
16027 input = input.slice(start);
16028 lastIndex -= start;
16029 }
16030
16031 if (base && isGlob === true && lastIndex > 0) {
16032 base = input.slice(0, lastIndex);
16033 glob = input.slice(lastIndex);
16034 } else if (isGlob === true) {
16035 base = '';
16036 glob = input;
16037 } else {
16038 base = input;
16039 }
16040
16041 if (base && base !== '' && base !== '/' && base !== input) {
16042 if (isPathSeparator(base.charCodeAt(base.length - 1))) {
16043 base = base.slice(0, -1);
16044 }
16045 }
16046
16047 if (opts.unescape === true) {
16048 if (glob) glob = utils.removeBackslashes(glob);
16049
16050 if (base && backslashes === true) {
16051 base = utils.removeBackslashes(base);
16052 }
16053 }
16054
16055 return { prefix, input: orig, base, glob, negated, isGlob };
16056};
16057
16058
16059/***/ }),
16060/* 78 */
16061/***/ (function(module, exports, __webpack_require__) {
16062
16063"use strict";
16064
16065
16066const path = __webpack_require__(15);
16067const win32 = process.platform === 'win32';
16068const {
16069 REGEX_SPECIAL_CHARS,
16070 REGEX_SPECIAL_CHARS_GLOBAL,
16071 REGEX_REMOVE_BACKSLASH
16072} = __webpack_require__(79);
16073
16074exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
16075exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
16076exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
16077exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
16078exports.toPosixSlashes = str => str.replace(/\\/g, '/');
16079
16080exports.removeBackslashes = str => {
16081 return str.replace(REGEX_REMOVE_BACKSLASH, match => {
16082 return match === '\\' ? '' : match;
16083 });
16084}
16085
16086exports.supportsLookbehinds = () => {
16087 let segs = process.version.slice(1).split('.');
16088 if (segs.length === 3 && +segs[0] >= 9 || (+segs[0] === 8 && +segs[1] >= 10)) {
16089 return true;
16090 }
16091 return false;
16092};
16093
16094exports.isWindows = options => {
16095 if (options && typeof options.windows === 'boolean') {
16096 return options.windows;
16097 }
16098 return win32 === true || path.sep === '\\';
16099};
16100
16101exports.escapeLast = (input, char, lastIdx) => {
16102 let idx = input.lastIndexOf(char, lastIdx);
16103 if (idx === -1) return input;
16104 if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
16105 return input.slice(0, idx) + '\\' + input.slice(idx);
16106};
16107
16108
16109/***/ }),
16110/* 79 */
16111/***/ (function(module, exports, __webpack_require__) {
16112
16113"use strict";
16114
16115
16116const path = __webpack_require__(15);
16117const WIN_SLASH = '\\\\/';
16118const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
16119
16120/**
16121 * Posix glob regex
16122 */
16123
16124const DOT_LITERAL = '\\.';
16125const PLUS_LITERAL = '\\+';
16126const QMARK_LITERAL = '\\?';
16127const SLASH_LITERAL = '\\/';
16128const ONE_CHAR = '(?=.)';
16129const QMARK = '[^/]';
16130const END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
16131const START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
16132const DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
16133const NO_DOT = `(?!${DOT_LITERAL})`;
16134const NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
16135const NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
16136const NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
16137const QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
16138const STAR = `${QMARK}*?`;
16139
16140const POSIX_CHARS = {
16141 DOT_LITERAL,
16142 PLUS_LITERAL,
16143 QMARK_LITERAL,
16144 SLASH_LITERAL,
16145 ONE_CHAR,
16146 QMARK,
16147 END_ANCHOR,
16148 DOTS_SLASH,
16149 NO_DOT,
16150 NO_DOTS,
16151 NO_DOT_SLASH,
16152 NO_DOTS_SLASH,
16153 QMARK_NO_DOT,
16154 STAR,
16155 START_ANCHOR
16156};
16157
16158/**
16159 * Windows glob regex
16160 */
16161
16162const WINDOWS_CHARS = {
16163 ...POSIX_CHARS,
16164
16165 SLASH_LITERAL: `[${WIN_SLASH}]`,
16166 QMARK: WIN_NO_SLASH,
16167 STAR: `${WIN_NO_SLASH}*?`,
16168 DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
16169 NO_DOT: `(?!${DOT_LITERAL})`,
16170 NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
16171 NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
16172 NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
16173 QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
16174 START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
16175 END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
16176};
16177
16178/**
16179 * POSIX Bracket Regex
16180 */
16181
16182const POSIX_REGEX_SOURCE = {
16183 alnum: 'a-zA-Z0-9',
16184 alpha: 'a-zA-Z',
16185 ascii: '\\x00-\\x7F',
16186 blank: ' \\t',
16187 cntrl: '\\x00-\\x1F\\x7F',
16188 digit: '0-9',
16189 graph: '\\x21-\\x7E',
16190 lower: 'a-z',
16191 print: '\\x20-\\x7E ',
16192 punct: '\\-!"#$%&\'()\\*+,./:;<=>?@[\\]^_`{|}~',
16193 space: ' \\t\\r\\n\\v\\f',
16194 upper: 'A-Z',
16195 word: 'A-Za-z0-9_',
16196 xdigit: 'A-Fa-f0-9'
16197};
16198
16199module.exports = {
16200 MAX_LENGTH: 1024 * 64,
16201 POSIX_REGEX_SOURCE,
16202
16203 // regular expressions
16204 REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
16205 REGEX_NON_SPECIAL_CHAR: /^[^@![\].,$*+?^{}()|\\/]+/,
16206 REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
16207 REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
16208 REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
16209 REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
16210
16211 // Replace globs with equivalent patterns to reduce parsing time.
16212 REPLACEMENTS: {
16213 '***': '*',
16214 '**/**': '**',
16215 '**/**/**': '**'
16216 },
16217
16218 // Digits
16219 CHAR_0: 48, /* 0 */
16220 CHAR_9: 57, /* 9 */
16221
16222 // Alphabet chars.
16223 CHAR_UPPERCASE_A: 65, /* A */
16224 CHAR_LOWERCASE_A: 97, /* a */
16225 CHAR_UPPERCASE_Z: 90, /* Z */
16226 CHAR_LOWERCASE_Z: 122, /* z */
16227
16228 CHAR_LEFT_PARENTHESES: 40, /* ( */
16229 CHAR_RIGHT_PARENTHESES: 41, /* ) */
16230
16231 CHAR_ASTERISK: 42, /* * */
16232
16233 // Non-alphabetic chars.
16234 CHAR_AMPERSAND: 38, /* & */
16235 CHAR_AT: 64, /* @ */
16236 CHAR_BACKWARD_SLASH: 92, /* \ */
16237 CHAR_CARRIAGE_RETURN: 13, /* \r */
16238 CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */
16239 CHAR_COLON: 58, /* : */
16240 CHAR_COMMA: 44, /* , */
16241 CHAR_DOT: 46, /* . */
16242 CHAR_DOUBLE_QUOTE: 34, /* " */
16243 CHAR_EQUAL: 61, /* = */
16244 CHAR_EXCLAMATION_MARK: 33, /* ! */
16245 CHAR_FORM_FEED: 12, /* \f */
16246 CHAR_FORWARD_SLASH: 47, /* / */
16247 CHAR_GRAVE_ACCENT: 96, /* ` */
16248 CHAR_HASH: 35, /* # */
16249 CHAR_HYPHEN_MINUS: 45, /* - */
16250 CHAR_LEFT_ANGLE_BRACKET: 60, /* < */
16251 CHAR_LEFT_CURLY_BRACE: 123, /* { */
16252 CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */
16253 CHAR_LINE_FEED: 10, /* \n */
16254 CHAR_NO_BREAK_SPACE: 160, /* \u00A0 */
16255 CHAR_PERCENT: 37, /* % */
16256 CHAR_PLUS: 43, /* + */
16257 CHAR_QUESTION_MARK: 63, /* ? */
16258 CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */
16259 CHAR_RIGHT_CURLY_BRACE: 125, /* } */
16260 CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */
16261 CHAR_SEMICOLON: 59, /* ; */
16262 CHAR_SINGLE_QUOTE: 39, /* ' */
16263 CHAR_SPACE: 32, /* */
16264 CHAR_TAB: 9, /* \t */
16265 CHAR_UNDERSCORE: 95, /* _ */
16266 CHAR_VERTICAL_LINE: 124, /* | */
16267 CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
16268
16269 SEP: path.sep,
16270
16271 /**
16272 * Create EXTGLOB_CHARS
16273 */
16274
16275 extglobChars(chars) {
16276 return {
16277 '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },
16278 '?': { type: 'qmark', open: '(?:', close: ')?' },
16279 '+': { type: 'plus', open: '(?:', close: ')+' },
16280 '*': { type: 'star', open: '(?:', close: ')*' },
16281 '@': { type: 'at', open: '(?:', close: ')' }
16282 };
16283 },
16284
16285 /**
16286 * Create GLOB_CHARS
16287 */
16288
16289 globChars(win32) {
16290 return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
16291 }
16292};
16293
16294
16295/***/ }),
16296/* 80 */
16297/***/ (function(module, exports, __webpack_require__) {
16298
16299"use strict";
16300
16301
16302const utils = __webpack_require__(78);
16303const constants = __webpack_require__(79);
16304
16305/**
16306 * Constants
16307 */
16308
16309const {
16310 MAX_LENGTH,
16311 POSIX_REGEX_SOURCE,
16312 REGEX_NON_SPECIAL_CHAR,
16313 REGEX_SPECIAL_CHARS_BACKREF,
16314 REPLACEMENTS
16315} = constants;
16316
16317/**
16318 * Helpers
16319 */
16320
16321const expandRange = (args, options) => {
16322 if (typeof options.expandRange === 'function') {
16323 return options.expandRange(...args, options);
16324 }
16325
16326 args.sort();
16327 let value = `[${args.join('-')}]`;
16328
16329 try {
16330 /* eslint-disable no-new */
16331 new RegExp(value);
16332 } catch (ex) {
16333 return args.map(v => utils.escapeRegex(v)).join('..');
16334 }
16335
16336 return value;
16337};
16338
16339const negate = state => {
16340 let count = 1;
16341
16342 while (state.peek() === '!' && (state.peek(2) !== '(' || state.peek(3) === '?')) {
16343 state.advance();
16344 state.start++;
16345 count++;
16346 }
16347
16348 if (count % 2 === 0) {
16349 return false;
16350 }
16351
16352 state.negated = true;
16353 state.start++;
16354 return true;
16355};
16356
16357/**
16358 * Create the message for a syntax error
16359 */
16360
16361const syntaxError = (type, char) => {
16362 return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
16363};
16364
16365/**
16366 * Parse the given input string.
16367 * @param {String} input
16368 * @param {Object} options
16369 * @return {Object}
16370 */
16371
16372const parse = (input, options) => {
16373 if (typeof input !== 'string') {
16374 throw new TypeError('Expected a string');
16375 }
16376
16377 input = REPLACEMENTS[input] || input;
16378
16379 let opts = { ...options };
16380 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
16381 let len = input.length;
16382 if (len > max) {
16383 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
16384 }
16385
16386 let bos = { type: 'bos', value: '', output: opts.prepend || '' };
16387 let tokens = [bos];
16388
16389 let capture = opts.capture ? '' : '?:';
16390 let win32 = utils.isWindows(options);
16391
16392 // create constants based on platform, for windows or posix
16393 const PLATFORM_CHARS = constants.globChars(win32);
16394 const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
16395
16396 const {
16397 DOT_LITERAL,
16398 PLUS_LITERAL,
16399 SLASH_LITERAL,
16400 ONE_CHAR,
16401 DOTS_SLASH,
16402 NO_DOT,
16403 NO_DOT_SLASH,
16404 NO_DOTS_SLASH,
16405 QMARK,
16406 QMARK_NO_DOT,
16407 STAR,
16408 START_ANCHOR
16409 } = PLATFORM_CHARS;
16410
16411 const globstar = (opts) => {
16412 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
16413 };
16414
16415 let nodot = opts.dot ? '' : NO_DOT;
16416 let star = opts.bash === true ? globstar(opts) : STAR;
16417 let qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
16418
16419 if (opts.capture) {
16420 star = `(${star})`;
16421 }
16422
16423 // minimatch options support
16424 if (typeof opts.noext === 'boolean') {
16425 opts.noextglob = opts.noext;
16426 }
16427
16428 let state = {
16429 index: -1,
16430 start: 0,
16431 consumed: '',
16432 output: '',
16433 backtrack: false,
16434 brackets: 0,
16435 braces: 0,
16436 parens: 0,
16437 quotes: 0,
16438 tokens
16439 };
16440
16441 let extglobs = [];
16442 let stack = [];
16443 let prev = bos;
16444 let value;
16445
16446 /**
16447 * Tokenizing helpers
16448 */
16449
16450 const eos = () => state.index === len - 1;
16451 const peek = state.peek = (n = 1) => input[state.index + n];
16452 const advance = state.advance = () => input[++state.index];
16453 const append = token => {
16454 state.output += token.output != null ? token.output : token.value;
16455 state.consumed += token.value || '';
16456 };
16457
16458 const increment = type => {
16459 state[type]++;
16460 stack.push(type);
16461 };
16462
16463 const decrement = type => {
16464 state[type]--;
16465 stack.pop();
16466 };
16467
16468 /**
16469 * Push tokens onto the tokens array. This helper speeds up
16470 * tokenizing by 1) helping us avoid backtracking as much as possible,
16471 * and 2) helping us avoid creating extra tokens when consecutive
16472 * characters are plain text. This improves performance and simplifies
16473 * lookbehinds.
16474 */
16475
16476 const push = tok => {
16477 if (prev.type === 'globstar') {
16478 let isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');
16479 let isExtglob = extglobs.length && (tok.type === 'pipe' || tok.type === 'paren');
16480 if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {
16481 state.output = state.output.slice(0, -prev.output.length);
16482 prev.type = 'star';
16483 prev.value = '*';
16484 prev.output = star;
16485 state.output += prev.output;
16486 }
16487 }
16488
16489 if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {
16490 extglobs[extglobs.length - 1].inner += tok.value;
16491 }
16492
16493 if (tok.value || tok.output) append(tok);
16494 if (prev && prev.type === 'text' && tok.type === 'text') {
16495 prev.value += tok.value;
16496 return;
16497 }
16498
16499 tok.prev = prev;
16500 tokens.push(tok);
16501 prev = tok;
16502 };
16503
16504 const extglobOpen = (type, value) => {
16505 let token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };
16506
16507 token.prev = prev;
16508 token.parens = state.parens;
16509 token.output = state.output;
16510 let output = (opts.capture ? '(' : '') + token.open;
16511
16512 push({ type, value, output: state.output ? '' : ONE_CHAR });
16513 push({ type: 'paren', extglob: true, value: advance(), output });
16514 increment('parens');
16515 extglobs.push(token);
16516 };
16517
16518 const extglobClose = token => {
16519 let output = token.close + (opts.capture ? ')' : '');
16520
16521 if (token.type === 'negate') {
16522 let extglobStar = star;
16523
16524 if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {
16525 extglobStar = globstar(opts);
16526 }
16527
16528 if (extglobStar !== star || eos() || /^\)+$/.test(input.slice(state.index + 1))) {
16529 output = token.close = ')$))' + extglobStar;
16530 }
16531
16532 if (token.prev.type === 'bos' && eos()) {
16533 state.negatedExtglob = true;
16534 }
16535 }
16536
16537 push({ type: 'paren', extglob: true, value, output });
16538 decrement('parens');
16539 };
16540
16541 if (opts.fastpaths !== false && !/(^[*!]|[/{[()\]}"])/.test(input)) {
16542 let backslashes = false;
16543
16544 let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
16545 if (first === '\\') {
16546 backslashes = true;
16547 return m;
16548 }
16549
16550 if (first === '?') {
16551 if (esc) {
16552 return esc + first + (rest ? QMARK.repeat(rest.length) : '');
16553 }
16554 if (index === 0) {
16555 return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');
16556 }
16557 return QMARK.repeat(chars.length);
16558 }
16559
16560 if (first === '.') {
16561 return DOT_LITERAL.repeat(chars.length);
16562 }
16563
16564 if (first === '*') {
16565 if (esc) {
16566 return esc + first + (rest ? star : '');
16567 }
16568 return star;
16569 }
16570 return esc ? m : '\\' + m;
16571 });
16572
16573 if (backslashes === true) {
16574 if (opts.unescape === true) {
16575 output = output.replace(/\\/g, '');
16576 } else {
16577 output = output.replace(/\\+/g, m => {
16578 return m.length % 2 === 0 ? '\\\\' : (m ? '\\' : '');
16579 });
16580 }
16581 }
16582
16583 state.output = output;
16584 return state;
16585 }
16586
16587 /**
16588 * Tokenize input until we reach end-of-string
16589 */
16590
16591 while (!eos()) {
16592 value = advance();
16593
16594 if (value === '\u0000') {
16595 continue;
16596 }
16597
16598 /**
16599 * Escaped characters
16600 */
16601
16602 if (value === '\\') {
16603 let next = peek();
16604
16605 if (next === '/' && opts.bash !== true) {
16606 continue;
16607 }
16608
16609 if (next === '.' || next === ';') {
16610 continue;
16611 }
16612
16613 if (!next) {
16614 value += '\\';
16615 push({ type: 'text', value });
16616 continue;
16617 }
16618
16619 // collapse slashes to reduce potential for exploits
16620 let match = /^\\+/.exec(input.slice(state.index + 1));
16621 let slashes = 0;
16622
16623 if (match && match[0].length > 2) {
16624 slashes = match[0].length;
16625 state.index += slashes;
16626 if (slashes % 2 !== 0) {
16627 value += '\\';
16628 }
16629 }
16630
16631 if (opts.unescape === true) {
16632 value = advance() || '';
16633 } else {
16634 value += advance() || '';
16635 }
16636
16637 if (state.brackets === 0) {
16638 push({ type: 'text', value });
16639 continue;
16640 }
16641 }
16642
16643 /**
16644 * If we're inside a regex character class, continue
16645 * until we reach the closing bracket.
16646 */
16647
16648 if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {
16649 if (opts.posix !== false && value === ':') {
16650 let inner = prev.value.slice(1);
16651 if (inner.includes('[')) {
16652 prev.posix = true;
16653
16654 if (inner.includes(':')) {
16655 let idx = prev.value.lastIndexOf('[');
16656 let pre = prev.value.slice(0, idx);
16657 let rest = prev.value.slice(idx + 2);
16658 let posix = POSIX_REGEX_SOURCE[rest];
16659 if (posix) {
16660 prev.value = pre + posix;
16661 state.backtrack = true;
16662 advance();
16663
16664 if (!bos.output && tokens.indexOf(prev) === 1) {
16665 bos.output = ONE_CHAR;
16666 }
16667 continue;
16668 }
16669 }
16670 }
16671 }
16672
16673 if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {
16674 value = '\\' + value;
16675 }
16676
16677 if (value === ']' && (prev.value === '[' || prev.value === '[^')) {
16678 value = '\\' + value;
16679 }
16680
16681 if (opts.posix === true && value === '!' && prev.value === '[') {
16682 value = '^';
16683 }
16684
16685 prev.value += value;
16686 append({ value });
16687 continue;
16688 }
16689
16690 /**
16691 * If we're inside a quoted string, continue
16692 * until we reach the closing double quote.
16693 */
16694
16695 if (state.quotes === 1 && value !== '"') {
16696 value = utils.escapeRegex(value);
16697 prev.value += value;
16698 append({ value });
16699 continue;
16700 }
16701
16702 /**
16703 * Double quotes
16704 */
16705
16706 if (value === '"') {
16707 state.quotes = state.quotes === 1 ? 0 : 1;
16708 if (opts.keepQuotes === true) {
16709 push({ type: 'text', value });
16710 }
16711 continue;
16712 }
16713
16714 /**
16715 * Parentheses
16716 */
16717
16718 if (value === '(') {
16719 push({ type: 'paren', value });
16720 increment('parens');
16721 continue;
16722 }
16723
16724 if (value === ')') {
16725 if (state.parens === 0 && opts.strictBrackets === true) {
16726 throw new SyntaxError(syntaxError('opening', '('));
16727 }
16728
16729 let extglob = extglobs[extglobs.length - 1];
16730 if (extglob && state.parens === extglob.parens + 1) {
16731 extglobClose(extglobs.pop());
16732 continue;
16733 }
16734
16735 push({ type: 'paren', value, output: state.parens ? ')' : '\\)' });
16736 decrement('parens');
16737 continue;
16738 }
16739
16740 /**
16741 * Brackets
16742 */
16743
16744 if (value === '[') {
16745 if (opts.nobracket === true || !input.slice(state.index + 1).includes(']')) {
16746 if (opts.nobracket !== true && opts.strictBrackets === true) {
16747 throw new SyntaxError(syntaxError('closing', ']'));
16748 }
16749
16750 value = '\\' + value;
16751 } else {
16752 increment('brackets');
16753 }
16754
16755 push({ type: 'bracket', value });
16756 continue;
16757 }
16758
16759 if (value === ']') {
16760 if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {
16761 push({ type: 'text', value, output: '\\' + value });
16762 continue;
16763 }
16764
16765 if (state.brackets === 0) {
16766 if (opts.strictBrackets === true) {
16767 throw new SyntaxError(syntaxError('opening', '['));
16768 }
16769
16770 push({ type: 'text', value, output: '\\' + value });
16771 continue;
16772 }
16773
16774 decrement('brackets');
16775
16776 let prevValue = prev.value.slice(1);
16777 if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {
16778 value = '/' + value;
16779 }
16780
16781 prev.value += value;
16782 append({ value });
16783
16784 // when literal brackets are explicitly disabled
16785 // assume we should match with a regex character class
16786 if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
16787 continue;
16788 }
16789
16790 let escaped = utils.escapeRegex(prev.value);
16791 state.output = state.output.slice(0, -prev.value.length);
16792
16793 // when literal brackets are explicitly enabled
16794 // assume we should escape the brackets to match literal characters
16795 if (opts.literalBrackets === true) {
16796 state.output += escaped;
16797 prev.value = escaped;
16798 continue;
16799 }
16800
16801 // when the user specifies nothing, try to match both
16802 prev.value = `(${capture}${escaped}|${prev.value})`;
16803 state.output += prev.value;
16804 continue;
16805 }
16806
16807 /**
16808 * Braces
16809 */
16810
16811 if (value === '{' && opts.nobrace !== true) {
16812 push({ type: 'brace', value, output: '(' });
16813 increment('braces');
16814 continue;
16815 }
16816
16817 if (value === '}') {
16818 if (opts.nobrace === true || state.braces === 0) {
16819 push({ type: 'text', value, output: '\\' + value });
16820 continue;
16821 }
16822
16823 let output = ')';
16824
16825 if (state.dots === true) {
16826 let arr = tokens.slice();
16827 let range = [];
16828
16829 for (let i = arr.length - 1; i >= 0; i--) {
16830 tokens.pop();
16831 if (arr[i].type === 'brace') {
16832 break;
16833 }
16834 if (arr[i].type !== 'dots') {
16835 range.unshift(arr[i].value);
16836 }
16837 }
16838
16839 output = expandRange(range, opts);
16840 state.backtrack = true;
16841 }
16842
16843 push({ type: 'brace', value, output });
16844 decrement('braces');
16845 continue;
16846 }
16847
16848 /**
16849 * Pipes
16850 */
16851
16852 if (value === '|') {
16853 if (extglobs.length > 0) {
16854 extglobs[extglobs.length - 1].conditions++;
16855 }
16856 push({ type: 'text', value });
16857 continue;
16858 }
16859
16860 /**
16861 * Commas
16862 */
16863
16864 if (value === ',') {
16865 let output = value;
16866
16867 if (state.braces > 0 && stack[stack.length - 1] === 'braces') {
16868 output = '|';
16869 }
16870
16871 push({ type: 'comma', value, output });
16872 continue;
16873 }
16874
16875 /**
16876 * Slashes
16877 */
16878
16879 if (value === '/') {
16880 // if the beginning of the glob is "./", advance the start
16881 // to the current index, and don't add the "./" characters
16882 // to the state. This greatly simplifies lookbehinds when
16883 // checking for BOS characters like "!" and "." (not "./")
16884 if (prev.type === 'dot' && state.index === 1) {
16885 state.start = state.index + 1;
16886 state.consumed = '';
16887 state.output = '';
16888 tokens.pop();
16889 prev = bos; // reset "prev" to the first token
16890 continue;
16891 }
16892
16893 push({ type: 'slash', value, output: SLASH_LITERAL });
16894 continue;
16895 }
16896
16897 /**
16898 * Dots
16899 */
16900
16901 if (value === '.') {
16902 if (state.braces > 0 && prev.type === 'dot') {
16903 if (prev.value === '.') prev.output = DOT_LITERAL;
16904 prev.type = 'dots';
16905 prev.output += value;
16906 prev.value += value;
16907 state.dots = true;
16908 continue;
16909 }
16910
16911 push({ type: 'dot', value, output: DOT_LITERAL });
16912 continue;
16913 }
16914
16915 /**
16916 * Question marks
16917 */
16918
16919 if (value === '?') {
16920 if (prev && prev.type === 'paren') {
16921 let next = peek();
16922 let output = value;
16923
16924 if (next === '<' && !utils.supportsLookbehinds()) {
16925 throw new Error('Node.js v10 or higher is required for regex lookbehinds');
16926 }
16927
16928 if (prev.value === '(' && !/[!=<:]/.test(next) || (next === '<' && !/[!=]/.test(peek(2)))) {
16929 output = '\\' + value;
16930 }
16931
16932 push({ type: 'text', value, output });
16933 continue;
16934 }
16935
16936 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
16937 extglobOpen('qmark', value);
16938 continue;
16939 }
16940
16941 if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {
16942 push({ type: 'qmark', value, output: QMARK_NO_DOT });
16943 continue;
16944 }
16945
16946 push({ type: 'qmark', value, output: QMARK });
16947 continue;
16948 }
16949
16950 /**
16951 * Exclamation
16952 */
16953
16954 if (value === '!') {
16955 if (opts.noextglob !== true && peek() === '(') {
16956 if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {
16957 extglobOpen('negate', value);
16958 continue;
16959 }
16960 }
16961
16962 if (opts.nonegate !== true && state.index === 0) {
16963 negate(state);
16964 continue;
16965 }
16966 }
16967
16968 /**
16969 * Plus
16970 */
16971
16972 if (value === '+') {
16973 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
16974 extglobOpen('plus', value);
16975 continue;
16976 }
16977
16978 if (prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) {
16979 let output = prev.extglob === true ? '\\' + value : value;
16980 push({ type: 'plus', value, output });
16981 continue;
16982 }
16983
16984 // use regex behavior inside parens
16985 if (state.parens > 0 && opts.regex !== false) {
16986 push({ type: 'plus', value });
16987 continue;
16988 }
16989
16990 push({ type: 'plus', value: PLUS_LITERAL });
16991 continue;
16992 }
16993
16994 /**
16995 * Plain text
16996 */
16997
16998 if (value === '@') {
16999 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17000 push({ type: 'at', value, output: '' });
17001 continue;
17002 }
17003
17004 push({ type: 'text', value });
17005 continue;
17006 }
17007
17008 /**
17009 * Plain text
17010 */
17011
17012 if (value !== '*') {
17013 if (value === '$' || value === '^') {
17014 value = '\\' + value;
17015 }
17016
17017 let match = REGEX_NON_SPECIAL_CHAR.exec(input.slice(state.index + 1));
17018 if (match) {
17019 value += match[0];
17020 state.index += match[0].length;
17021 }
17022
17023 push({ type: 'text', value });
17024 continue;
17025 }
17026
17027 /**
17028 * Stars
17029 */
17030
17031 if (prev && (prev.type === 'globstar' || prev.star === true)) {
17032 prev.type = 'star';
17033 prev.star = true;
17034 prev.value += value;
17035 prev.output = star;
17036 state.backtrack = true;
17037 state.consumed += value;
17038 continue;
17039 }
17040
17041 if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {
17042 extglobOpen('star', value);
17043 continue;
17044 }
17045
17046 if (prev.type === 'star') {
17047 if (opts.noglobstar === true) {
17048 state.consumed += value;
17049 continue;
17050 }
17051
17052 let prior = prev.prev;
17053 let before = prior.prev;
17054 let isStart = prior.type === 'slash' || prior.type === 'bos';
17055 let afterStar = before && (before.type === 'star' || before.type === 'globstar');
17056
17057 if (opts.bash === true && (!isStart || (!eos() && peek() !== '/'))) {
17058 push({ type: 'star', value, output: '' });
17059 continue;
17060 }
17061
17062 let isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');
17063 let isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');
17064 if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {
17065 push({ type: 'star', value, output: '' });
17066 continue;
17067 }
17068
17069 // strip consecutive `/**/`
17070 while (input.slice(state.index + 1, state.index + 4) === '/**') {
17071 let after = input[state.index + 4];
17072 if (after && after !== '/') {
17073 break;
17074 }
17075 state.consumed += '/**';
17076 state.index += 3;
17077 }
17078
17079 if (prior.type === 'bos' && eos()) {
17080 prev.type = 'globstar';
17081 prev.value += value;
17082 prev.output = globstar(opts);
17083 state.output = prev.output;
17084 state.consumed += value;
17085 continue;
17086 }
17087
17088 if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {
17089 state.output = state.output.slice(0, -(prior.output + prev.output).length);
17090 prior.output = '(?:' + prior.output;
17091
17092 prev.type = 'globstar';
17093 prev.output = globstar(opts) + '|$)';
17094 prev.value += value;
17095
17096 state.output += prior.output + prev.output;
17097 state.consumed += value;
17098 continue;
17099 }
17100
17101 let next = peek();
17102 if (prior.type === 'slash' && prior.prev.type !== 'bos' && next === '/') {
17103 let end = peek(2) !== void 0 ? '|$' : '';
17104
17105 state.output = state.output.slice(0, -(prior.output + prev.output).length);
17106 prior.output = '(?:' + prior.output;
17107
17108 prev.type = 'globstar';
17109 prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
17110 prev.value += value;
17111
17112 state.output += prior.output + prev.output;
17113 state.consumed += value + advance();
17114
17115 push({ type: 'slash', value, output: '' });
17116 continue;
17117 }
17118
17119 if (prior.type === 'bos' && next === '/') {
17120 prev.type = 'globstar';
17121 prev.value += value;
17122 prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
17123 state.output = prev.output;
17124 state.consumed += value + advance();
17125 push({ type: 'slash', value, output: '' });
17126 continue;
17127 }
17128
17129 // remove single star from output
17130 state.output = state.output.slice(0, -prev.output.length);
17131
17132 // reset previous token to globstar
17133 prev.type = 'globstar';
17134 prev.output = globstar(opts);
17135 prev.value += value;
17136
17137 // reset output with globstar
17138 state.output += prev.output;
17139 state.consumed += value;
17140 continue;
17141 }
17142
17143 let token = { type: 'star', value, output: star };
17144
17145 if (opts.bash === true) {
17146 token.output = '.*?';
17147 if (prev.type === 'bos' || prev.type === 'slash') {
17148 token.output = nodot + token.output;
17149 }
17150 push(token);
17151 continue;
17152 }
17153
17154 if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {
17155 token.output = value;
17156 push(token);
17157 continue;
17158 }
17159
17160 if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {
17161 if (prev.type === 'dot') {
17162 state.output += NO_DOT_SLASH;
17163 prev.output += NO_DOT_SLASH;
17164
17165 } else if (opts.dot === true) {
17166 state.output += NO_DOTS_SLASH;
17167 prev.output += NO_DOTS_SLASH;
17168
17169 } else {
17170 state.output += nodot;
17171 prev.output += nodot;
17172 }
17173
17174 if (peek() !== '*') {
17175 state.output += ONE_CHAR;
17176 prev.output += ONE_CHAR;
17177 }
17178 }
17179
17180 push(token);
17181 }
17182
17183 while (state.brackets > 0) {
17184 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
17185 state.output = utils.escapeLast(state.output, '[');
17186 decrement('brackets');
17187 }
17188
17189 while (state.parens > 0) {
17190 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
17191 state.output = utils.escapeLast(state.output, '(');
17192 decrement('parens');
17193 }
17194
17195 while (state.braces > 0) {
17196 if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
17197 state.output = utils.escapeLast(state.output, '{');
17198 decrement('braces');
17199 }
17200
17201 if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {
17202 push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });
17203 }
17204
17205 // rebuild the output if we had to backtrack at any point
17206 if (state.backtrack === true) {
17207 state.output = '';
17208
17209 for (let token of state.tokens) {
17210 state.output += token.output != null ? token.output : token.value;
17211
17212 if (token.suffix) {
17213 state.output += token.suffix;
17214 }
17215 }
17216 }
17217
17218 return state;
17219};
17220
17221/**
17222 * Fast paths for creating regular expressions for common glob patterns.
17223 * This can significantly speed up processing and has very little downside
17224 * impact when none of the fast paths match.
17225 */
17226
17227parse.fastpaths = (input, options) => {
17228 let opts = { ...options };
17229 let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
17230 let len = input.length;
17231 if (len > max) {
17232 throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
17233 }
17234
17235 input = REPLACEMENTS[input] || input;
17236 let win32 = utils.isWindows(options);
17237
17238 // create constants based on platform, for windows or posix
17239 const {
17240 DOT_LITERAL,
17241 SLASH_LITERAL,
17242 ONE_CHAR,
17243 DOTS_SLASH,
17244 NO_DOT,
17245 NO_DOTS,
17246 NO_DOTS_SLASH,
17247 STAR,
17248 START_ANCHOR
17249 } = constants.globChars(win32);
17250
17251 let capture = opts.capture ? '' : '?:';
17252 let star = opts.bash === true ? '.*?' : STAR;
17253 let nodot = opts.dot ? NO_DOTS : NO_DOT;
17254 let slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
17255
17256 if (opts.capture) {
17257 star = `(${star})`;
17258 }
17259
17260 const globstar = (opts) => {
17261 return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
17262 };
17263
17264 const create = str => {
17265 switch (str) {
17266 case '*':
17267 return `${nodot}${ONE_CHAR}${star}`;
17268
17269 case '.*':
17270 return `${DOT_LITERAL}${ONE_CHAR}${star}`;
17271
17272 case '*.*':
17273 return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
17274
17275 case '*/*':
17276 return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
17277
17278 case '**':
17279 return nodot + globstar(opts);
17280
17281 case '**/*':
17282 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
17283
17284 case '**/*.*':
17285 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
17286
17287 case '**/.*':
17288 return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
17289
17290 default: {
17291 let match = /^(.*?)\.(\w+)$/.exec(str);
17292 if (!match) return;
17293
17294 let source = create(match[1], options);
17295 if (!source) return;
17296
17297 return source + DOT_LITERAL + match[2];
17298 }
17299 }
17300 };
17301
17302 let output = create(input);
17303 if (output && opts.strictSlashes !== true) {
17304 output += `${SLASH_LITERAL}?`;
17305 }
17306
17307 return output;
17308};
17309
17310module.exports = parse;
17311
17312
17313/***/ }),
17314/* 81 */
17315/***/ (function(module, exports, __webpack_require__) {
17316
17317"use strict";
17318
17319Object.defineProperty(exports, "__esModule", { value: true });
17320const merge2 = __webpack_require__(82);
17321function merge(streams) {
17322 const mergedStream = merge2(streams);
17323 streams.forEach((stream) => {
17324 stream.once('error', (err) => mergedStream.emit('error', err));
17325 });
17326 return mergedStream;
17327}
17328exports.merge = merge;
17329
17330
17331/***/ }),
17332/* 82 */
17333/***/ (function(module, exports, __webpack_require__) {
17334
17335"use strict";
17336
17337/*
17338 * merge2
17339 * https://github.com/teambition/merge2
17340 *
17341 * Copyright (c) 2014-2016 Teambition
17342 * Licensed under the MIT license.
17343 */
17344const Stream = __webpack_require__(83)
17345const PassThrough = Stream.PassThrough
17346const slice = Array.prototype.slice
17347
17348module.exports = merge2
17349
17350function merge2 () {
17351 const streamsQueue = []
17352 let merging = false
17353 const args = slice.call(arguments)
17354 let options = args[args.length - 1]
17355
17356 if (options && !Array.isArray(options) && options.pipe == null) args.pop()
17357 else options = {}
17358
17359 const doEnd = options.end !== false
17360 if (options.objectMode == null) options.objectMode = true
17361 if (options.highWaterMark == null) options.highWaterMark = 64 * 1024
17362 const mergedStream = PassThrough(options)
17363
17364 function addStream () {
17365 for (let i = 0, len = arguments.length; i < len; i++) {
17366 streamsQueue.push(pauseStreams(arguments[i], options))
17367 }
17368 mergeStream()
17369 return this
17370 }
17371
17372 function mergeStream () {
17373 if (merging) return
17374 merging = true
17375
17376 let streams = streamsQueue.shift()
17377 if (!streams) {
17378 process.nextTick(endStream)
17379 return
17380 }
17381 if (!Array.isArray(streams)) streams = [streams]
17382
17383 let pipesCount = streams.length + 1
17384
17385 function next () {
17386 if (--pipesCount > 0) return
17387 merging = false
17388 mergeStream()
17389 }
17390
17391 function pipe (stream) {
17392 function onend () {
17393 stream.removeListener('merge2UnpipeEnd', onend)
17394 stream.removeListener('end', onend)
17395 next()
17396 }
17397 // skip ended stream
17398 if (stream._readableState.endEmitted) return next()
17399
17400 stream.on('merge2UnpipeEnd', onend)
17401 stream.on('end', onend)
17402 stream.pipe(mergedStream, { end: false })
17403 // compatible for old stream
17404 stream.resume()
17405 }
17406
17407 for (let i = 0; i < streams.length; i++) pipe(streams[i])
17408
17409 next()
17410 }
17411
17412 function endStream () {
17413 merging = false
17414 // emit 'queueDrain' when all streams merged.
17415 mergedStream.emit('queueDrain')
17416 return doEnd && mergedStream.end()
17417 }
17418
17419 mergedStream.setMaxListeners(0)
17420 mergedStream.add = addStream
17421 mergedStream.on('unpipe', function (stream) {
17422 stream.emit('merge2UnpipeEnd')
17423 })
17424
17425 if (args.length) addStream.apply(null, args)
17426 return mergedStream
17427}
17428
17429// check and pause streams for pipe.
17430function pauseStreams (streams, options) {
17431 if (!Array.isArray(streams)) {
17432 // Backwards-compat with old-style streams
17433 if (!streams._readableState && streams.pipe) streams = streams.pipe(PassThrough(options))
17434 if (!streams._readableState || !streams.pause || !streams.pipe) {
17435 throw new Error('Only readable stream can be merged.')
17436 }
17437 streams.pause()
17438 } else {
17439 for (let i = 0, len = streams.length; i < len; i++) streams[i] = pauseStreams(streams[i], options)
17440 }
17441 return streams
17442}
17443
17444
17445/***/ }),
17446/* 83 */
17447/***/ (function(module, exports) {
17448
17449module.exports = require("stream");
17450
17451/***/ }),
17452/* 84 */
17453/***/ (function(module, exports, __webpack_require__) {
17454
17455"use strict";
17456
17457Object.defineProperty(exports, "__esModule", { value: true });
17458const stream_1 = __webpack_require__(85);
17459const provider_1 = __webpack_require__(112);
17460class ProviderAsync extends provider_1.default {
17461 constructor() {
17462 super(...arguments);
17463 this._reader = new stream_1.default(this._settings);
17464 }
17465 read(task) {
17466 const root = this._getRootDirectory(task);
17467 const options = this._getReaderOptions(task);
17468 const entries = [];
17469 return new Promise((resolve, reject) => {
17470 const stream = this.api(root, task, options);
17471 stream.once('error', reject);
17472 stream.on('data', (entry) => entries.push(options.transform(entry)));
17473 stream.once('end', () => resolve(entries));
17474 });
17475 }
17476 api(root, task, options) {
17477 if (task.dynamic) {
17478 return this._reader.dynamic(root, options);
17479 }
17480 return this._reader.static(task.patterns, options);
17481 }
17482}
17483exports.default = ProviderAsync;
17484
17485
17486/***/ }),
17487/* 85 */
17488/***/ (function(module, exports, __webpack_require__) {
17489
17490"use strict";
17491
17492Object.defineProperty(exports, "__esModule", { value: true });
17493const stream_1 = __webpack_require__(83);
17494const fsStat = __webpack_require__(86);
17495const fsWalk = __webpack_require__(91);
17496const reader_1 = __webpack_require__(111);
17497class ReaderStream extends reader_1.default {
17498 constructor() {
17499 super(...arguments);
17500 this._walkStream = fsWalk.walkStream;
17501 this._stat = fsStat.stat;
17502 }
17503 dynamic(root, options) {
17504 return this._walkStream(root, options);
17505 }
17506 static(patterns, options) {
17507 const filepaths = patterns.map(this._getFullEntryPath, this);
17508 const stream = new stream_1.PassThrough({ objectMode: true });
17509 stream._write = (index, _enc, done) => {
17510 return this._getEntry(filepaths[index], patterns[index], options)
17511 .then((entry) => {
17512 if (entry !== null && options.entryFilter(entry)) {
17513 stream.push(entry);
17514 }
17515 if (index === filepaths.length - 1) {
17516 stream.end();
17517 }
17518 done();
17519 })
17520 .catch(done);
17521 };
17522 for (let i = 0; i < filepaths.length; i++) {
17523 stream.write(i);
17524 }
17525 return stream;
17526 }
17527 _getEntry(filepath, pattern, options) {
17528 return this._getStat(filepath)
17529 .then((stats) => this._makeEntry(stats, pattern))
17530 .catch((error) => {
17531 if (options.errorFilter(error)) {
17532 return null;
17533 }
17534 throw error;
17535 });
17536 }
17537 _getStat(filepath) {
17538 return new Promise((resolve, reject) => {
17539 this._stat(filepath, this._fsStatSettings, (error, stats) => {
17540 error ? reject(error) : resolve(stats);
17541 });
17542 });
17543 }
17544}
17545exports.default = ReaderStream;
17546
17547
17548/***/ }),
17549/* 86 */
17550/***/ (function(module, exports, __webpack_require__) {
17551
17552"use strict";
17553
17554Object.defineProperty(exports, "__esModule", { value: true });
17555const async = __webpack_require__(87);
17556const sync = __webpack_require__(88);
17557const settings_1 = __webpack_require__(89);
17558exports.Settings = settings_1.default;
17559function stat(path, optionsOrSettingsOrCallback, callback) {
17560 if (typeof optionsOrSettingsOrCallback === 'function') {
17561 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
17562 }
17563 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
17564}
17565exports.stat = stat;
17566function statSync(path, optionsOrSettings) {
17567 const settings = getSettings(optionsOrSettings);
17568 return sync.read(path, settings);
17569}
17570exports.statSync = statSync;
17571function getSettings(settingsOrOptions = {}) {
17572 if (settingsOrOptions instanceof settings_1.default) {
17573 return settingsOrOptions;
17574 }
17575 return new settings_1.default(settingsOrOptions);
17576}
17577
17578
17579/***/ }),
17580/* 87 */
17581/***/ (function(module, exports, __webpack_require__) {
17582
17583"use strict";
17584
17585Object.defineProperty(exports, "__esModule", { value: true });
17586function read(path, settings, callback) {
17587 settings.fs.lstat(path, (lstatError, lstat) => {
17588 if (lstatError) {
17589 return callFailureCallback(callback, lstatError);
17590 }
17591 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
17592 return callSuccessCallback(callback, lstat);
17593 }
17594 settings.fs.stat(path, (statError, stat) => {
17595 if (statError) {
17596 if (settings.throwErrorOnBrokenSymbolicLink) {
17597 return callFailureCallback(callback, statError);
17598 }
17599 return callSuccessCallback(callback, lstat);
17600 }
17601 if (settings.markSymbolicLink) {
17602 stat.isSymbolicLink = () => true;
17603 }
17604 callSuccessCallback(callback, stat);
17605 });
17606 });
17607}
17608exports.read = read;
17609function callFailureCallback(callback, error) {
17610 callback(error);
17611}
17612function callSuccessCallback(callback, result) {
17613 callback(null, result);
17614}
17615
17616
17617/***/ }),
17618/* 88 */
17619/***/ (function(module, exports, __webpack_require__) {
17620
17621"use strict";
17622
17623Object.defineProperty(exports, "__esModule", { value: true });
17624function read(path, settings) {
17625 const lstat = settings.fs.lstatSync(path);
17626 if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
17627 return lstat;
17628 }
17629 try {
17630 const stat = settings.fs.statSync(path);
17631 if (settings.markSymbolicLink) {
17632 stat.isSymbolicLink = () => true;
17633 }
17634 return stat;
17635 }
17636 catch (error) {
17637 if (!settings.throwErrorOnBrokenSymbolicLink) {
17638 return lstat;
17639 }
17640 throw error;
17641 }
17642}
17643exports.read = read;
17644
17645
17646/***/ }),
17647/* 89 */
17648/***/ (function(module, exports, __webpack_require__) {
17649
17650"use strict";
17651
17652Object.defineProperty(exports, "__esModule", { value: true });
17653const fs = __webpack_require__(90);
17654class Settings {
17655 constructor(_options = {}) {
17656 this._options = _options;
17657 this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
17658 this.fs = fs.createFileSystemAdapter(this._options.fs);
17659 this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
17660 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
17661 }
17662 _getValue(option, value) {
17663 return option === undefined ? value : option;
17664 }
17665}
17666exports.default = Settings;
17667
17668
17669/***/ }),
17670/* 90 */
17671/***/ (function(module, exports, __webpack_require__) {
17672
17673"use strict";
17674
17675Object.defineProperty(exports, "__esModule", { value: true });
17676const fs = __webpack_require__(36);
17677exports.FILE_SYSTEM_ADAPTER = {
17678 lstat: fs.lstat,
17679 stat: fs.stat,
17680 lstatSync: fs.lstatSync,
17681 statSync: fs.statSync
17682};
17683function createFileSystemAdapter(fsMethods) {
17684 if (!fsMethods) {
17685 return exports.FILE_SYSTEM_ADAPTER;
17686 }
17687 return Object.assign({}, exports.FILE_SYSTEM_ADAPTER, fsMethods);
17688}
17689exports.createFileSystemAdapter = createFileSystemAdapter;
17690
17691
17692/***/ }),
17693/* 91 */
17694/***/ (function(module, exports, __webpack_require__) {
17695
17696"use strict";
17697
17698Object.defineProperty(exports, "__esModule", { value: true });
17699const async_1 = __webpack_require__(92);
17700const stream_1 = __webpack_require__(107);
17701const sync_1 = __webpack_require__(108);
17702const settings_1 = __webpack_require__(110);
17703exports.Settings = settings_1.default;
17704function walk(dir, optionsOrSettingsOrCallback, callback) {
17705 if (typeof optionsOrSettingsOrCallback === 'function') {
17706 return new async_1.default(dir, getSettings()).read(optionsOrSettingsOrCallback);
17707 }
17708 new async_1.default(dir, getSettings(optionsOrSettingsOrCallback)).read(callback);
17709}
17710exports.walk = walk;
17711function walkSync(dir, optionsOrSettings) {
17712 const settings = getSettings(optionsOrSettings);
17713 const provider = new sync_1.default(dir, settings);
17714 return provider.read();
17715}
17716exports.walkSync = walkSync;
17717function walkStream(dir, optionsOrSettings) {
17718 const settings = getSettings(optionsOrSettings);
17719 const provider = new stream_1.default(dir, settings);
17720 return provider.read();
17721}
17722exports.walkStream = walkStream;
17723function getSettings(settingsOrOptions = {}) {
17724 if (settingsOrOptions instanceof settings_1.default) {
17725 return settingsOrOptions;
17726 }
17727 return new settings_1.default(settingsOrOptions);
17728}
17729
17730
17731/***/ }),
17732/* 92 */
17733/***/ (function(module, exports, __webpack_require__) {
17734
17735"use strict";
17736
17737Object.defineProperty(exports, "__esModule", { value: true });
17738const async_1 = __webpack_require__(93);
17739class AsyncProvider {
17740 constructor(_root, _settings) {
17741 this._root = _root;
17742 this._settings = _settings;
17743 this._reader = new async_1.default(this._root, this._settings);
17744 this._storage = new Set();
17745 }
17746 read(callback) {
17747 this._reader.onError((error) => {
17748 callFailureCallback(callback, error);
17749 });
17750 this._reader.onEntry((entry) => {
17751 this._storage.add(entry);
17752 });
17753 this._reader.onEnd(() => {
17754 callSuccessCallback(callback, Array.from(this._storage));
17755 });
17756 this._reader.read();
17757 }
17758}
17759exports.default = AsyncProvider;
17760function callFailureCallback(callback, error) {
17761 callback(error);
17762}
17763function callSuccessCallback(callback, entries) {
17764 callback(null, entries);
17765}
17766
17767
17768/***/ }),
17769/* 93 */
17770/***/ (function(module, exports, __webpack_require__) {
17771
17772"use strict";
17773
17774Object.defineProperty(exports, "__esModule", { value: true });
17775const events_1 = __webpack_require__(45);
17776const fsScandir = __webpack_require__(94);
17777const fastq = __webpack_require__(103);
17778const common = __webpack_require__(105);
17779const reader_1 = __webpack_require__(106);
17780class AsyncReader extends reader_1.default {
17781 constructor(_root, _settings) {
17782 super(_root, _settings);
17783 this._settings = _settings;
17784 this._scandir = fsScandir.scandir;
17785 this._emitter = new events_1.EventEmitter();
17786 this._queue = fastq(this._worker.bind(this), this._settings.concurrency);
17787 this._isFatalError = false;
17788 this._isDestroyed = false;
17789 this._queue.drain = () => {
17790 if (!this._isFatalError) {
17791 this._emitter.emit('end');
17792 }
17793 };
17794 }
17795 read() {
17796 this._isFatalError = false;
17797 this._isDestroyed = false;
17798 setImmediate(() => {
17799 this._pushToQueue(this._root, this._settings.basePath);
17800 });
17801 return this._emitter;
17802 }
17803 destroy() {
17804 if (this._isDestroyed) {
17805 throw new Error('The reader is already destroyed');
17806 }
17807 this._isDestroyed = true;
17808 this._queue.killAndDrain();
17809 }
17810 onEntry(callback) {
17811 this._emitter.on('entry', callback);
17812 }
17813 onError(callback) {
17814 this._emitter.once('error', callback);
17815 }
17816 onEnd(callback) {
17817 this._emitter.once('end', callback);
17818 }
17819 _pushToQueue(dir, base) {
17820 const queueItem = { dir, base };
17821 this._queue.push(queueItem, (error) => {
17822 if (error) {
17823 this._handleError(error);
17824 }
17825 });
17826 }
17827 _worker(item, done) {
17828 this._scandir(item.dir, this._settings.fsScandirSettings, (error, entries) => {
17829 if (error) {
17830 return done(error, undefined);
17831 }
17832 for (const entry of entries) {
17833 this._handleEntry(entry, item.base);
17834 }
17835 done(null, undefined);
17836 });
17837 }
17838 _handleError(error) {
17839 if (!common.isFatalError(this._settings, error)) {
17840 return;
17841 }
17842 this._isFatalError = true;
17843 this._isDestroyed = true;
17844 this._emitter.emit('error', error);
17845 }
17846 _handleEntry(entry, base) {
17847 if (this._isDestroyed || this._isFatalError) {
17848 return;
17849 }
17850 const fullpath = entry.path;
17851 if (base !== undefined) {
17852 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
17853 }
17854 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
17855 this._emitEntry(entry);
17856 }
17857 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
17858 this._pushToQueue(fullpath, entry.path);
17859 }
17860 }
17861 _emitEntry(entry) {
17862 this._emitter.emit('entry', entry);
17863 }
17864}
17865exports.default = AsyncReader;
17866
17867
17868/***/ }),
17869/* 94 */
17870/***/ (function(module, exports, __webpack_require__) {
17871
17872"use strict";
17873
17874Object.defineProperty(exports, "__esModule", { value: true });
17875const async = __webpack_require__(95);
17876const sync = __webpack_require__(100);
17877const settings_1 = __webpack_require__(101);
17878exports.Settings = settings_1.default;
17879function scandir(path, optionsOrSettingsOrCallback, callback) {
17880 if (typeof optionsOrSettingsOrCallback === 'function') {
17881 return async.read(path, getSettings(), optionsOrSettingsOrCallback);
17882 }
17883 async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
17884}
17885exports.scandir = scandir;
17886function scandirSync(path, optionsOrSettings) {
17887 const settings = getSettings(optionsOrSettings);
17888 return sync.read(path, settings);
17889}
17890exports.scandirSync = scandirSync;
17891function getSettings(settingsOrOptions = {}) {
17892 if (settingsOrOptions instanceof settings_1.default) {
17893 return settingsOrOptions;
17894 }
17895 return new settings_1.default(settingsOrOptions);
17896}
17897
17898
17899/***/ }),
17900/* 95 */
17901/***/ (function(module, exports, __webpack_require__) {
17902
17903"use strict";
17904
17905Object.defineProperty(exports, "__esModule", { value: true });
17906const fsStat = __webpack_require__(86);
17907const rpl = __webpack_require__(96);
17908const constants_1 = __webpack_require__(97);
17909const utils = __webpack_require__(98);
17910function read(dir, settings, callback) {
17911 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
17912 return readdirWithFileTypes(dir, settings, callback);
17913 }
17914 return readdir(dir, settings, callback);
17915}
17916exports.read = read;
17917function readdirWithFileTypes(dir, settings, callback) {
17918 settings.fs.readdir(dir, { withFileTypes: true }, (readdirError, dirents) => {
17919 if (readdirError) {
17920 return callFailureCallback(callback, readdirError);
17921 }
17922 const entries = dirents.map((dirent) => ({
17923 dirent,
17924 name: dirent.name,
17925 path: `${dir}${settings.pathSegmentSeparator}${dirent.name}`
17926 }));
17927 if (!settings.followSymbolicLinks) {
17928 return callSuccessCallback(callback, entries);
17929 }
17930 const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));
17931 rpl(tasks, (rplError, rplEntries) => {
17932 if (rplError) {
17933 return callFailureCallback(callback, rplError);
17934 }
17935 callSuccessCallback(callback, rplEntries);
17936 });
17937 });
17938}
17939exports.readdirWithFileTypes = readdirWithFileTypes;
17940function makeRplTaskEntry(entry, settings) {
17941 return (done) => {
17942 if (!entry.dirent.isSymbolicLink()) {
17943 return done(null, entry);
17944 }
17945 settings.fs.stat(entry.path, (statError, stats) => {
17946 if (statError) {
17947 if (settings.throwErrorOnBrokenSymbolicLink) {
17948 return done(statError);
17949 }
17950 return done(null, entry);
17951 }
17952 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
17953 return done(null, entry);
17954 });
17955 };
17956}
17957function readdir(dir, settings, callback) {
17958 settings.fs.readdir(dir, (readdirError, names) => {
17959 if (readdirError) {
17960 return callFailureCallback(callback, readdirError);
17961 }
17962 const filepaths = names.map((name) => `${dir}${settings.pathSegmentSeparator}${name}`);
17963 const tasks = filepaths.map((filepath) => {
17964 return (done) => fsStat.stat(filepath, settings.fsStatSettings, done);
17965 });
17966 rpl(tasks, (rplError, results) => {
17967 if (rplError) {
17968 return callFailureCallback(callback, rplError);
17969 }
17970 const entries = [];
17971 for (let index = 0; index < names.length; index++) {
17972 const name = names[index];
17973 const stats = results[index];
17974 const entry = {
17975 name,
17976 path: filepaths[index],
17977 dirent: utils.fs.createDirentFromStats(name, stats)
17978 };
17979 if (settings.stats) {
17980 entry.stats = stats;
17981 }
17982 entries.push(entry);
17983 }
17984 callSuccessCallback(callback, entries);
17985 });
17986 });
17987}
17988exports.readdir = readdir;
17989function callFailureCallback(callback, error) {
17990 callback(error);
17991}
17992function callSuccessCallback(callback, result) {
17993 callback(null, result);
17994}
17995
17996
17997/***/ }),
17998/* 96 */
17999/***/ (function(module, exports) {
18000
18001module.exports = runParallel
18002
18003function runParallel (tasks, cb) {
18004 var results, pending, keys
18005 var isSync = true
18006
18007 if (Array.isArray(tasks)) {
18008 results = []
18009 pending = tasks.length
18010 } else {
18011 keys = Object.keys(tasks)
18012 results = {}
18013 pending = keys.length
18014 }
18015
18016 function done (err) {
18017 function end () {
18018 if (cb) cb(err, results)
18019 cb = null
18020 }
18021 if (isSync) process.nextTick(end)
18022 else end()
18023 }
18024
18025 function each (i, err, result) {
18026 results[i] = result
18027 if (--pending === 0 || err) {
18028 done(err)
18029 }
18030 }
18031
18032 if (!pending) {
18033 // empty
18034 done(null)
18035 } else if (keys) {
18036 // object
18037 keys.forEach(function (key) {
18038 tasks[key](function (err, result) { each(key, err, result) })
18039 })
18040 } else {
18041 // array
18042 tasks.forEach(function (task, i) {
18043 task(function (err, result) { each(i, err, result) })
18044 })
18045 }
18046
18047 isSync = false
18048}
18049
18050
18051/***/ }),
18052/* 97 */
18053/***/ (function(module, exports, __webpack_require__) {
18054
18055"use strict";
18056
18057Object.defineProperty(exports, "__esModule", { value: true });
18058const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
18059const MAJOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);
18060const MINOR_VERSION = parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);
18061/**
18062 * IS `true` for Node.js 10.10 and greater.
18063 */
18064exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = MAJOR_VERSION > 10 || (MAJOR_VERSION === 10 && MINOR_VERSION >= 10);
18065
18066
18067/***/ }),
18068/* 98 */
18069/***/ (function(module, exports, __webpack_require__) {
18070
18071"use strict";
18072
18073Object.defineProperty(exports, "__esModule", { value: true });
18074const fs = __webpack_require__(99);
18075exports.fs = fs;
18076
18077
18078/***/ }),
18079/* 99 */
18080/***/ (function(module, exports, __webpack_require__) {
18081
18082"use strict";
18083
18084Object.defineProperty(exports, "__esModule", { value: true });
18085class DirentFromStats {
18086 constructor(name, stats) {
18087 this.name = name;
18088 this.isBlockDevice = stats.isBlockDevice.bind(stats);
18089 this.isCharacterDevice = stats.isCharacterDevice.bind(stats);
18090 this.isDirectory = stats.isDirectory.bind(stats);
18091 this.isFIFO = stats.isFIFO.bind(stats);
18092 this.isFile = stats.isFile.bind(stats);
18093 this.isSocket = stats.isSocket.bind(stats);
18094 this.isSymbolicLink = stats.isSymbolicLink.bind(stats);
18095 }
18096}
18097function createDirentFromStats(name, stats) {
18098 return new DirentFromStats(name, stats);
18099}
18100exports.createDirentFromStats = createDirentFromStats;
18101
18102
18103/***/ }),
18104/* 100 */
18105/***/ (function(module, exports, __webpack_require__) {
18106
18107"use strict";
18108
18109Object.defineProperty(exports, "__esModule", { value: true });
18110const fsStat = __webpack_require__(86);
18111const constants_1 = __webpack_require__(97);
18112const utils = __webpack_require__(98);
18113function read(dir, settings) {
18114 if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
18115 return readdirWithFileTypes(dir, settings);
18116 }
18117 return readdir(dir, settings);
18118}
18119exports.read = read;
18120function readdirWithFileTypes(dir, settings) {
18121 const dirents = settings.fs.readdirSync(dir, { withFileTypes: true });
18122 return dirents.map((dirent) => {
18123 const entry = {
18124 dirent,
18125 name: dirent.name,
18126 path: `${dir}${settings.pathSegmentSeparator}${dirent.name}`
18127 };
18128 if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
18129 try {
18130 const stats = settings.fs.statSync(entry.path);
18131 entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
18132 }
18133 catch (error) {
18134 if (settings.throwErrorOnBrokenSymbolicLink) {
18135 throw error;
18136 }
18137 }
18138 }
18139 return entry;
18140 });
18141}
18142exports.readdirWithFileTypes = readdirWithFileTypes;
18143function readdir(dir, settings) {
18144 const names = settings.fs.readdirSync(dir);
18145 return names.map((name) => {
18146 const entryPath = `${dir}${settings.pathSegmentSeparator}${name}`;
18147 const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
18148 const entry = {
18149 name,
18150 path: entryPath,
18151 dirent: utils.fs.createDirentFromStats(name, stats)
18152 };
18153 if (settings.stats) {
18154 entry.stats = stats;
18155 }
18156 return entry;
18157 });
18158}
18159exports.readdir = readdir;
18160
18161
18162/***/ }),
18163/* 101 */
18164/***/ (function(module, exports, __webpack_require__) {
18165
18166"use strict";
18167
18168Object.defineProperty(exports, "__esModule", { value: true });
18169const path = __webpack_require__(15);
18170const fsStat = __webpack_require__(86);
18171const fs = __webpack_require__(102);
18172class Settings {
18173 constructor(_options = {}) {
18174 this._options = _options;
18175 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
18176 this.fs = fs.createFileSystemAdapter(this._options.fs);
18177 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
18178 this.stats = this._getValue(this._options.stats, false);
18179 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
18180 this.fsStatSettings = new fsStat.Settings({
18181 followSymbolicLink: this.followSymbolicLinks,
18182 fs: this.fs,
18183 throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
18184 });
18185 }
18186 _getValue(option, value) {
18187 return option === undefined ? value : option;
18188 }
18189}
18190exports.default = Settings;
18191
18192
18193/***/ }),
18194/* 102 */
18195/***/ (function(module, exports, __webpack_require__) {
18196
18197"use strict";
18198
18199Object.defineProperty(exports, "__esModule", { value: true });
18200const fs = __webpack_require__(36);
18201exports.FILE_SYSTEM_ADAPTER = {
18202 lstat: fs.lstat,
18203 stat: fs.stat,
18204 lstatSync: fs.lstatSync,
18205 statSync: fs.statSync,
18206 readdir: fs.readdir,
18207 readdirSync: fs.readdirSync
18208};
18209function createFileSystemAdapter(fsMethods) {
18210 if (!fsMethods) {
18211 return exports.FILE_SYSTEM_ADAPTER;
18212 }
18213 return Object.assign({}, exports.FILE_SYSTEM_ADAPTER, fsMethods);
18214}
18215exports.createFileSystemAdapter = createFileSystemAdapter;
18216
18217
18218/***/ }),
18219/* 103 */
18220/***/ (function(module, exports, __webpack_require__) {
18221
18222"use strict";
18223
18224
18225var reusify = __webpack_require__(104)
18226
18227function fastqueue (context, worker, concurrency) {
18228 if (typeof context === 'function') {
18229 concurrency = worker
18230 worker = context
18231 context = null
18232 }
18233
18234 var cache = reusify(Task)
18235 var queueHead = null
18236 var queueTail = null
18237 var _running = 0
18238
18239 var self = {
18240 push: push,
18241 drain: noop,
18242 saturated: noop,
18243 pause: pause,
18244 paused: false,
18245 concurrency: concurrency,
18246 running: running,
18247 resume: resume,
18248 idle: idle,
18249 length: length,
18250 unshift: unshift,
18251 empty: noop,
18252 kill: kill,
18253 killAndDrain: killAndDrain
18254 }
18255
18256 return self
18257
18258 function running () {
18259 return _running
18260 }
18261
18262 function pause () {
18263 self.paused = true
18264 }
18265
18266 function length () {
18267 var current = queueHead
18268 var counter = 0
18269
18270 while (current) {
18271 current = current.next
18272 counter++
18273 }
18274
18275 return counter
18276 }
18277
18278 function resume () {
18279 if (!self.paused) return
18280 self.paused = false
18281 for (var i = 0; i < self.concurrency; i++) {
18282 _running++
18283 release()
18284 }
18285 }
18286
18287 function idle () {
18288 return _running === 0 && self.length() === 0
18289 }
18290
18291 function push (value, done) {
18292 var current = cache.get()
18293
18294 current.context = context
18295 current.release = release
18296 current.value = value
18297 current.callback = done || noop
18298
18299 if (_running === self.concurrency || self.paused) {
18300 if (queueTail) {
18301 queueTail.next = current
18302 queueTail = current
18303 } else {
18304 queueHead = current
18305 queueTail = current
18306 self.saturated()
18307 }
18308 } else {
18309 _running++
18310 worker.call(context, current.value, current.worked)
18311 }
18312 }
18313
18314 function unshift (value, done) {
18315 var current = cache.get()
18316
18317 current.context = context
18318 current.release = release
18319 current.value = value
18320 current.callback = done || noop
18321
18322 if (_running === self.concurrency || self.paused) {
18323 if (queueHead) {
18324 current.next = queueHead
18325 queueHead = current
18326 } else {
18327 queueHead = current
18328 queueTail = current
18329 self.saturated()
18330 }
18331 } else {
18332 _running++
18333 worker.call(context, current.value, current.worked)
18334 }
18335 }
18336
18337 function release (holder) {
18338 if (holder) {
18339 cache.release(holder)
18340 }
18341 var next = queueHead
18342 if (next) {
18343 if (!self.paused) {
18344 if (queueTail === queueHead) {
18345 queueTail = null
18346 }
18347 queueHead = next.next
18348 next.next = null
18349 worker.call(context, next.value, next.worked)
18350 if (queueTail === null) {
18351 self.empty()
18352 }
18353 } else {
18354 _running--
18355 }
18356 } else if (--_running === 0) {
18357 self.drain()
18358 }
18359 }
18360
18361 function kill () {
18362 queueHead = null
18363 queueTail = null
18364 self.drain = noop
18365 }
18366
18367 function killAndDrain () {
18368 queueHead = null
18369 queueTail = null
18370 self.drain()
18371 self.drain = noop
18372 }
18373}
18374
18375function noop () {}
18376
18377function Task () {
18378 this.value = null
18379 this.callback = noop
18380 this.next = null
18381 this.release = noop
18382 this.context = null
18383
18384 var self = this
18385
18386 this.worked = function worked (err, result) {
18387 var callback = self.callback
18388 self.value = null
18389 self.callback = noop
18390 callback.call(self.context, err, result)
18391 self.release(self)
18392 }
18393}
18394
18395module.exports = fastqueue
18396
18397
18398/***/ }),
18399/* 104 */
18400/***/ (function(module, exports, __webpack_require__) {
18401
18402"use strict";
18403
18404
18405function reusify (Constructor) {
18406 var head = new Constructor()
18407 var tail = head
18408
18409 function get () {
18410 var current = head
18411
18412 if (current.next) {
18413 head = current.next
18414 } else {
18415 head = new Constructor()
18416 tail = head
18417 }
18418
18419 current.next = null
18420
18421 return current
18422 }
18423
18424 function release (obj) {
18425 tail.next = obj
18426 tail = obj
18427 }
18428
18429 return {
18430 get: get,
18431 release: release
18432 }
18433}
18434
18435module.exports = reusify
18436
18437
18438/***/ }),
18439/* 105 */
18440/***/ (function(module, exports, __webpack_require__) {
18441
18442"use strict";
18443
18444Object.defineProperty(exports, "__esModule", { value: true });
18445function isFatalError(settings, error) {
18446 if (settings.errorFilter === null) {
18447 return true;
18448 }
18449 return !settings.errorFilter(error);
18450}
18451exports.isFatalError = isFatalError;
18452function isAppliedFilter(filter, value) {
18453 return filter === null || filter(value);
18454}
18455exports.isAppliedFilter = isAppliedFilter;
18456function replacePathSegmentSeparator(filepath, separator) {
18457 return filepath.split(/[\\\/]/).join(separator);
18458}
18459exports.replacePathSegmentSeparator = replacePathSegmentSeparator;
18460function joinPathSegments(a, b, separator) {
18461 if (a === '') {
18462 return b;
18463 }
18464 return a + separator + b;
18465}
18466exports.joinPathSegments = joinPathSegments;
18467
18468
18469/***/ }),
18470/* 106 */
18471/***/ (function(module, exports, __webpack_require__) {
18472
18473"use strict";
18474
18475Object.defineProperty(exports, "__esModule", { value: true });
18476const common = __webpack_require__(105);
18477class Reader {
18478 constructor(_root, _settings) {
18479 this._root = _root;
18480 this._settings = _settings;
18481 this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);
18482 }
18483}
18484exports.default = Reader;
18485
18486
18487/***/ }),
18488/* 107 */
18489/***/ (function(module, exports, __webpack_require__) {
18490
18491"use strict";
18492
18493Object.defineProperty(exports, "__esModule", { value: true });
18494const stream_1 = __webpack_require__(83);
18495const async_1 = __webpack_require__(93);
18496class StreamProvider {
18497 constructor(_root, _settings) {
18498 this._root = _root;
18499 this._settings = _settings;
18500 this._reader = new async_1.default(this._root, this._settings);
18501 this._stream = new stream_1.Readable({
18502 objectMode: true,
18503 read: () => { },
18504 destroy: this._reader.destroy.bind(this._reader)
18505 });
18506 }
18507 read() {
18508 this._reader.onError((error) => {
18509 this._stream.emit('error', error);
18510 });
18511 this._reader.onEntry((entry) => {
18512 this._stream.push(entry);
18513 });
18514 this._reader.onEnd(() => {
18515 this._stream.push(null);
18516 });
18517 this._reader.read();
18518 return this._stream;
18519 }
18520}
18521exports.default = StreamProvider;
18522
18523
18524/***/ }),
18525/* 108 */
18526/***/ (function(module, exports, __webpack_require__) {
18527
18528"use strict";
18529
18530Object.defineProperty(exports, "__esModule", { value: true });
18531const sync_1 = __webpack_require__(109);
18532class SyncProvider {
18533 constructor(_root, _settings) {
18534 this._root = _root;
18535 this._settings = _settings;
18536 this._reader = new sync_1.default(this._root, this._settings);
18537 }
18538 read() {
18539 return this._reader.read();
18540 }
18541}
18542exports.default = SyncProvider;
18543
18544
18545/***/ }),
18546/* 109 */
18547/***/ (function(module, exports, __webpack_require__) {
18548
18549"use strict";
18550
18551Object.defineProperty(exports, "__esModule", { value: true });
18552const fsScandir = __webpack_require__(94);
18553const common = __webpack_require__(105);
18554const reader_1 = __webpack_require__(106);
18555class SyncReader extends reader_1.default {
18556 constructor() {
18557 super(...arguments);
18558 this._scandir = fsScandir.scandirSync;
18559 this._storage = new Set();
18560 this._queue = new Set();
18561 }
18562 read() {
18563 this._pushToQueue(this._root, this._settings.basePath);
18564 this._handleQueue();
18565 return Array.from(this._storage);
18566 }
18567 _pushToQueue(dir, base) {
18568 this._queue.add({ dir, base });
18569 }
18570 _handleQueue() {
18571 for (const item of this._queue.values()) {
18572 this._handleDirectory(item.dir, item.base);
18573 }
18574 }
18575 _handleDirectory(dir, base) {
18576 try {
18577 const entries = this._scandir(dir, this._settings.fsScandirSettings);
18578 for (const entry of entries) {
18579 this._handleEntry(entry, base);
18580 }
18581 }
18582 catch (error) {
18583 this._handleError(error);
18584 }
18585 }
18586 _handleError(error) {
18587 if (!common.isFatalError(this._settings, error)) {
18588 return;
18589 }
18590 throw error;
18591 }
18592 _handleEntry(entry, base) {
18593 const fullpath = entry.path;
18594 if (base !== undefined) {
18595 entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);
18596 }
18597 if (common.isAppliedFilter(this._settings.entryFilter, entry)) {
18598 this._pushToStorage(entry);
18599 }
18600 if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
18601 this._pushToQueue(fullpath, entry.path);
18602 }
18603 }
18604 _pushToStorage(entry) {
18605 this._storage.add(entry);
18606 }
18607}
18608exports.default = SyncReader;
18609
18610
18611/***/ }),
18612/* 110 */
18613/***/ (function(module, exports, __webpack_require__) {
18614
18615"use strict";
18616
18617Object.defineProperty(exports, "__esModule", { value: true });
18618const path = __webpack_require__(15);
18619const fsScandir = __webpack_require__(94);
18620class Settings {
18621 constructor(_options = {}) {
18622 this._options = _options;
18623 this.basePath = this._getValue(this._options.basePath, undefined);
18624 this.concurrency = this._getValue(this._options.concurrency, Infinity);
18625 this.deepFilter = this._getValue(this._options.deepFilter, null);
18626 this.entryFilter = this._getValue(this._options.entryFilter, null);
18627 this.errorFilter = this._getValue(this._options.errorFilter, null);
18628 this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);
18629 this.fsScandirSettings = new fsScandir.Settings({
18630 followSymbolicLinks: this._options.followSymbolicLinks,
18631 fs: this._options.fs,
18632 pathSegmentSeparator: this._options.pathSegmentSeparator,
18633 stats: this._options.stats,
18634 throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
18635 });
18636 }
18637 _getValue(option, value) {
18638 return option === undefined ? value : option;
18639 }
18640}
18641exports.default = Settings;
18642
18643
18644/***/ }),
18645/* 111 */
18646/***/ (function(module, exports, __webpack_require__) {
18647
18648"use strict";
18649
18650Object.defineProperty(exports, "__esModule", { value: true });
18651const path = __webpack_require__(15);
18652const fsStat = __webpack_require__(86);
18653const utils = __webpack_require__(55);
18654class Reader {
18655 constructor(_settings) {
18656 this._settings = _settings;
18657 this._fsStatSettings = new fsStat.Settings({
18658 followSymbolicLink: this._settings.followSymbolicLinks,
18659 fs: this._settings.fs,
18660 throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
18661 });
18662 }
18663 _getFullEntryPath(filepath) {
18664 return path.resolve(this._settings.cwd, filepath);
18665 }
18666 _makeEntry(stats, pattern) {
18667 const entry = {
18668 name: pattern,
18669 path: pattern,
18670 dirent: utils.fs.createDirentFromStats(pattern, stats)
18671 };
18672 if (this._settings.stats) {
18673 entry.stats = stats;
18674 }
18675 return entry;
18676 }
18677 _isFatalError(error) {
18678 return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;
18679 }
18680}
18681exports.default = Reader;
18682
18683
18684/***/ }),
18685/* 112 */
18686/***/ (function(module, exports, __webpack_require__) {
18687
18688"use strict";
18689
18690Object.defineProperty(exports, "__esModule", { value: true });
18691const path = __webpack_require__(15);
18692const deep_1 = __webpack_require__(113);
18693const entry_1 = __webpack_require__(114);
18694const error_1 = __webpack_require__(115);
18695const entry_2 = __webpack_require__(116);
18696class Provider {
18697 constructor(_settings) {
18698 this._settings = _settings;
18699 this.errorFilter = new error_1.default(this._settings);
18700 this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());
18701 this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());
18702 this.entryTransformer = new entry_2.default(this._settings);
18703 }
18704 _getRootDirectory(task) {
18705 return path.resolve(this._settings.cwd, task.base);
18706 }
18707 _getReaderOptions(task) {
18708 const basePath = task.base === '.' ? '' : task.base;
18709 return {
18710 basePath,
18711 pathSegmentSeparator: '/',
18712 concurrency: this._settings.concurrency,
18713 deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),
18714 entryFilter: this.entryFilter.getFilter(task.positive, task.negative),
18715 errorFilter: this.errorFilter.getFilter(),
18716 followSymbolicLinks: this._settings.followSymbolicLinks,
18717 fs: this._settings.fs,
18718 stats: this._settings.stats,
18719 throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
18720 transform: this.entryTransformer.getTransformer()
18721 };
18722 }
18723 _getMicromatchOptions() {
18724 return {
18725 dot: this._settings.dot,
18726 matchBase: this._settings.baseNameMatch,
18727 nobrace: !this._settings.braceExpansion,
18728 nocase: !this._settings.caseSensitiveMatch,
18729 noext: !this._settings.extglob,
18730 noglobstar: !this._settings.globstar,
18731 posix: true,
18732 strictSlashes: false
18733 };
18734 }
18735}
18736exports.default = Provider;
18737
18738
18739/***/ }),
18740/* 113 */
18741/***/ (function(module, exports, __webpack_require__) {
18742
18743"use strict";
18744
18745Object.defineProperty(exports, "__esModule", { value: true });
18746const utils = __webpack_require__(55);
18747class DeepFilter {
18748 constructor(_settings, _micromatchOptions) {
18749 this._settings = _settings;
18750 this._micromatchOptions = _micromatchOptions;
18751 }
18752 getFilter(basePath, positive, negative) {
18753 const maxPatternDepth = this._getMaxPatternDepth(positive);
18754 const negativeRe = this._getNegativePatternsRe(negative);
18755 return (entry) => this._filter(basePath, entry, negativeRe, maxPatternDepth);
18756 }
18757 _getMaxPatternDepth(patterns) {
18758 const globstar = patterns.some(utils.pattern.hasGlobStar);
18759 return globstar ? Infinity : utils.pattern.getMaxNaivePatternsDepth(patterns);
18760 }
18761 _getNegativePatternsRe(patterns) {
18762 const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);
18763 return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);
18764 }
18765 _filter(basePath, entry, negativeRe, maxPatternDepth) {
18766 const depth = this._getEntryDepth(basePath, entry.path);
18767 if (this._isSkippedByDeep(depth)) {
18768 return false;
18769 }
18770 if (this._isSkippedByMaxPatternDepth(depth, maxPatternDepth)) {
18771 return false;
18772 }
18773 if (this._isSkippedSymbolicLink(entry)) {
18774 return false;
18775 }
18776 if (this._isSkippedDotDirectory(entry)) {
18777 return false;
18778 }
18779 return this._isSkippedByNegativePatterns(entry, negativeRe);
18780 }
18781 _getEntryDepth(basePath, entryPath) {
18782 const basePathDepth = basePath.split('/').length;
18783 const entryPathDepth = entryPath.split('/').length;
18784 return entryPathDepth - (basePath === '' ? 0 : basePathDepth);
18785 }
18786 _isSkippedByDeep(entryDepth) {
18787 return entryDepth >= this._settings.deep;
18788 }
18789 _isSkippedByMaxPatternDepth(entryDepth, maxPatternDepth) {
18790 return !this._settings.baseNameMatch && maxPatternDepth !== Infinity && entryDepth > maxPatternDepth;
18791 }
18792 _isSkippedSymbolicLink(entry) {
18793 return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();
18794 }
18795 _isSkippedDotDirectory(entry) {
18796 return !this._settings.dot && entry.name.startsWith('.');
18797 }
18798 _isSkippedByNegativePatterns(entry, negativeRe) {
18799 return !utils.pattern.matchAny(entry.path, negativeRe);
18800 }
18801}
18802exports.default = DeepFilter;
18803
18804
18805/***/ }),
18806/* 114 */
18807/***/ (function(module, exports, __webpack_require__) {
18808
18809"use strict";
18810
18811Object.defineProperty(exports, "__esModule", { value: true });
18812const utils = __webpack_require__(55);
18813class EntryFilter {
18814 constructor(_settings, _micromatchOptions) {
18815 this._settings = _settings;
18816 this._micromatchOptions = _micromatchOptions;
18817 this.index = new Map();
18818 }
18819 getFilter(positive, negative) {
18820 const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
18821 const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
18822 return (entry) => this._filter(entry, positiveRe, negativeRe);
18823 }
18824 _filter(entry, positiveRe, negativeRe) {
18825 if (this._settings.unique) {
18826 if (this._isDuplicateEntry(entry)) {
18827 return false;
18828 }
18829 this._createIndexRecord(entry);
18830 }
18831 if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
18832 return false;
18833 }
18834 if (this._isSkippedByAbsoluteNegativePatterns(entry, negativeRe)) {
18835 return false;
18836 }
18837 const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
18838 return this._isMatchToPatterns(filepath, positiveRe) && !this._isMatchToPatterns(entry.path, negativeRe);
18839 }
18840 _isDuplicateEntry(entry) {
18841 return this.index.has(entry.path);
18842 }
18843 _createIndexRecord(entry) {
18844 this.index.set(entry.path, undefined);
18845 }
18846 _onlyFileFilter(entry) {
18847 return this._settings.onlyFiles && !entry.dirent.isFile();
18848 }
18849 _onlyDirectoryFilter(entry) {
18850 return this._settings.onlyDirectories && !entry.dirent.isDirectory();
18851 }
18852 _isSkippedByAbsoluteNegativePatterns(entry, negativeRe) {
18853 if (!this._settings.absolute) {
18854 return false;
18855 }
18856 const fullpath = utils.path.makeAbsolute(this._settings.cwd, entry.path);
18857 return this._isMatchToPatterns(fullpath, negativeRe);
18858 }
18859 _isMatchToPatterns(filepath, patternsRe) {
18860 return utils.pattern.matchAny(filepath, patternsRe);
18861 }
18862}
18863exports.default = EntryFilter;
18864
18865
18866/***/ }),
18867/* 115 */
18868/***/ (function(module, exports, __webpack_require__) {
18869
18870"use strict";
18871
18872Object.defineProperty(exports, "__esModule", { value: true });
18873const utils = __webpack_require__(55);
18874class ErrorFilter {
18875 constructor(_settings) {
18876 this._settings = _settings;
18877 }
18878 getFilter() {
18879 return (error) => this._isNonFatalError(error);
18880 }
18881 _isNonFatalError(error) {
18882 return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;
18883 }
18884}
18885exports.default = ErrorFilter;
18886
18887
18888/***/ }),
18889/* 116 */
18890/***/ (function(module, exports, __webpack_require__) {
18891
18892"use strict";
18893
18894Object.defineProperty(exports, "__esModule", { value: true });
18895const utils = __webpack_require__(55);
18896class EntryTransformer {
18897 constructor(_settings) {
18898 this._settings = _settings;
18899 }
18900 getTransformer() {
18901 return (entry) => this._transform(entry);
18902 }
18903 _transform(entry) {
18904 let filepath = entry.path;
18905 if (this._settings.absolute) {
18906 filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);
18907 filepath = utils.path.unixify(filepath);
18908 }
18909 if (this._settings.markDirectories && entry.dirent.isDirectory()) {
18910 filepath += '/';
18911 }
18912 if (!this._settings.objectMode) {
18913 return filepath;
18914 }
18915 return Object.assign({}, entry, { path: filepath });
18916 }
18917}
18918exports.default = EntryTransformer;
18919
18920
18921/***/ }),
18922/* 117 */
18923/***/ (function(module, exports, __webpack_require__) {
18924
18925"use strict";
18926
18927Object.defineProperty(exports, "__esModule", { value: true });
18928const stream_1 = __webpack_require__(83);
18929const stream_2 = __webpack_require__(85);
18930const provider_1 = __webpack_require__(112);
18931class ProviderStream extends provider_1.default {
18932 constructor() {
18933 super(...arguments);
18934 this._reader = new stream_2.default(this._settings);
18935 }
18936 read(task) {
18937 const root = this._getRootDirectory(task);
18938 const options = this._getReaderOptions(task);
18939 const source = this.api(root, task, options);
18940 const dest = new stream_1.Readable({ objectMode: true, read: () => { } });
18941 source
18942 .once('error', (error) => dest.emit('error', error))
18943 .on('data', (entry) => dest.emit('data', options.transform(entry)))
18944 .once('end', () => dest.emit('end'));
18945 return dest;
18946 }
18947 api(root, task, options) {
18948 if (task.dynamic) {
18949 return this._reader.dynamic(root, options);
18950 }
18951 return this._reader.static(task.patterns, options);
18952 }
18953}
18954exports.default = ProviderStream;
18955
18956
18957/***/ }),
18958/* 118 */
18959/***/ (function(module, exports, __webpack_require__) {
18960
18961"use strict";
18962
18963Object.defineProperty(exports, "__esModule", { value: true });
18964const sync_1 = __webpack_require__(119);
18965const provider_1 = __webpack_require__(112);
18966class ProviderSync extends provider_1.default {
18967 constructor() {
18968 super(...arguments);
18969 this._reader = new sync_1.default(this._settings);
18970 }
18971 read(task) {
18972 const root = this._getRootDirectory(task);
18973 const options = this._getReaderOptions(task);
18974 const entries = this.api(root, task, options);
18975 return entries.map(options.transform);
18976 }
18977 api(root, task, options) {
18978 if (task.dynamic) {
18979 return this._reader.dynamic(root, options);
18980 }
18981 return this._reader.static(task.patterns, options);
18982 }
18983}
18984exports.default = ProviderSync;
18985
18986
18987/***/ }),
18988/* 119 */
18989/***/ (function(module, exports, __webpack_require__) {
18990
18991"use strict";
18992
18993Object.defineProperty(exports, "__esModule", { value: true });
18994const fsStat = __webpack_require__(86);
18995const fsWalk = __webpack_require__(91);
18996const reader_1 = __webpack_require__(111);
18997class ReaderSync extends reader_1.default {
18998 constructor() {
18999 super(...arguments);
19000 this._walkSync = fsWalk.walkSync;
19001 this._statSync = fsStat.statSync;
19002 }
19003 dynamic(root, options) {
19004 return this._walkSync(root, options);
19005 }
19006 static(patterns, options) {
19007 const entries = [];
19008 for (const pattern of patterns) {
19009 const filepath = this._getFullEntryPath(pattern);
19010 const entry = this._getEntry(filepath, pattern, options);
19011 if (entry === null || !options.entryFilter(entry)) {
19012 continue;
19013 }
19014 entries.push(entry);
19015 }
19016 return entries;
19017 }
19018 _getEntry(filepath, pattern, options) {
19019 try {
19020 const stats = this._getStat(filepath);
19021 return this._makeEntry(stats, pattern);
19022 }
19023 catch (error) {
19024 if (options.errorFilter(error)) {
19025 return null;
19026 }
19027 throw error;
19028 }
19029 }
19030 _getStat(filepath) {
19031 return this._statSync(filepath, this._fsStatSettings);
19032 }
19033}
19034exports.default = ReaderSync;
19035
19036
19037/***/ }),
19038/* 120 */
19039/***/ (function(module, exports, __webpack_require__) {
19040
19041"use strict";
19042
19043Object.defineProperty(exports, "__esModule", { value: true });
19044const fs = __webpack_require__(36);
19045const os = __webpack_require__(16);
19046const CPU_COUNT = os.cpus().length;
19047exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
19048 lstat: fs.lstat,
19049 lstatSync: fs.lstatSync,
19050 stat: fs.stat,
19051 statSync: fs.statSync,
19052 readdir: fs.readdir,
19053 readdirSync: fs.readdirSync
19054};
19055// tslint:enable no-redundant-jsdoc
19056class Settings {
19057 constructor(_options = {}) {
19058 this._options = _options;
19059 this.absolute = this._getValue(this._options.absolute, false);
19060 this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);
19061 this.braceExpansion = this._getValue(this._options.braceExpansion, true);
19062 this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);
19063 this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);
19064 this.cwd = this._getValue(this._options.cwd, process.cwd());
19065 this.deep = this._getValue(this._options.deep, Infinity);
19066 this.dot = this._getValue(this._options.dot, false);
19067 this.extglob = this._getValue(this._options.extglob, true);
19068 this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);
19069 this.fs = this._getFileSystemMethods(this._options.fs);
19070 this.globstar = this._getValue(this._options.globstar, true);
19071 this.ignore = this._getValue(this._options.ignore, []);
19072 this.markDirectories = this._getValue(this._options.markDirectories, false);
19073 this.objectMode = this._getValue(this._options.objectMode, false);
19074 this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);
19075 this.onlyFiles = this._getValue(this._options.onlyFiles, true);
19076 this.stats = this._getValue(this._options.stats, false);
19077 this.suppressErrors = this._getValue(this._options.suppressErrors, false);
19078 this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);
19079 this.unique = this._getValue(this._options.unique, true);
19080 if (this.onlyDirectories) {
19081 this.onlyFiles = false;
19082 }
19083 if (this.stats) {
19084 this.objectMode = true;
19085 }
19086 }
19087 _getValue(option, value) {
19088 return option === undefined ? value : option;
19089 }
19090 _getFileSystemMethods(methods = {}) {
19091 return Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER, methods);
19092 }
19093}
19094exports.default = Settings;
19095
19096
19097/***/ }),
19098/* 121 */,
19099/* 122 */,
19100/* 123 */,
19101/* 124 */,
19102/* 125 */,
19103/* 126 */,
19104/* 127 */,
19105/* 128 */,
19106/* 129 */,
19107/* 130 */,
19108/* 131 */,
19109/* 132 */
19110/***/ (function(module, __webpack_exports__, __webpack_require__) {
19111
19112"use strict";
19113__webpack_require__.r(__webpack_exports__);
19114/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUriThrowOnMissingScheme", function() { return setUriThrowOnMissingScheme; });
19115/*---------------------------------------------------------------------------------------------
19116 * Copyright (c) Microsoft Corporation. All rights reserved.
19117 * Licensed under the MIT License. See License.txt in the project root for license information.
19118 *--------------------------------------------------------------------------------------------*/
19119
19120var __extends = (undefined && undefined.__extends) || (function () {
19121 var extendStatics = Object.setPrototypeOf ||
19122 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19123 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
19124 return function (d, b) {
19125 extendStatics(d, b);
19126 function __() { this.constructor = d; }
19127 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
19128 };
19129})();
19130var isWindows;
19131if (typeof process === 'object') {
19132 isWindows = process.platform === 'win32';
19133}
19134else if (typeof navigator === 'object') {
19135 var userAgent = navigator.userAgent;
19136 isWindows = userAgent.indexOf('Windows') >= 0;
19137}
19138//#endregion
19139var _schemePattern = /^\w[\w\d+.-]*$/;
19140var _singleSlashStart = /^\//;
19141var _doubleSlashStart = /^\/\//;
19142var _throwOnMissingSchema = true;
19143/**
19144 * @internal
19145 */
19146function setUriThrowOnMissingScheme(value) {
19147 var old = _throwOnMissingSchema;
19148 _throwOnMissingSchema = value;
19149 return old;
19150}
19151function _validateUri(ret, _strict) {
19152 // scheme, must be set
19153 if (!ret.scheme) {
19154 if (_strict || _throwOnMissingSchema) {
19155 throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
19156 // } else {
19157 // console.warn(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`);
19158 }
19159 }
19160 // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
19161 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
19162 if (ret.scheme && !_schemePattern.test(ret.scheme)) {
19163 throw new Error('[UriError]: Scheme contains illegal characters.');
19164 }
19165 // path, http://tools.ietf.org/html/rfc3986#section-3.3
19166 // If a URI contains an authority component, then the path component
19167 // must either be empty or begin with a slash ("/") character. If a URI
19168 // does not contain an authority component, then the path cannot begin
19169 // with two slash characters ("//").
19170 if (ret.path) {
19171 if (ret.authority) {
19172 if (!_singleSlashStart.test(ret.path)) {
19173 throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
19174 }
19175 }
19176 else {
19177 if (_doubleSlashStart.test(ret.path)) {
19178 throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
19179 }
19180 }
19181 }
19182}
19183// for a while we allowed uris *without* schemes and this is the migration
19184// for them, e.g. an uri without scheme and without strict-mode warns and falls
19185// back to the file-scheme. that should cause the least carnage and still be a
19186// clear warning
19187function _schemeFix(scheme, _strict) {
19188 if (_strict || _throwOnMissingSchema) {
19189 return scheme || _empty;
19190 }
19191 if (!scheme) {
19192 // console.trace('BAD uri lacks scheme, falling back to file-scheme.');
19193 scheme = 'file';
19194 }
19195 return scheme;
19196}
19197// implements a bit of https://tools.ietf.org/html/rfc3986#section-5
19198function _referenceResolution(scheme, path) {
19199 // the slash-character is our 'default base' as we don't
19200 // support constructing URIs relative to other URIs. This
19201 // also means that we alter and potentially break paths.
19202 // see https://tools.ietf.org/html/rfc3986#section-5.1.4
19203 switch (scheme) {
19204 case 'https':
19205 case 'http':
19206 case 'file':
19207 if (!path) {
19208 path = _slash;
19209 }
19210 else if (path[0] !== _slash) {
19211 path = _slash + path;
19212 }
19213 break;
19214 }
19215 return path;
19216}
19217var _empty = '';
19218var _slash = '/';
19219var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
19220/**
19221 * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
19222 * This class is a simple parser which creates the basic component parts
19223 * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
19224 * and encoding.
19225 *
19226 * foo://example.com:8042/over/there?name=ferret#nose
19227 * \_/ \______________/\_________/ \_________/ \__/
19228 * | | | | |
19229 * scheme authority path query fragment
19230 * | _____________________|__
19231 * / \ / \
19232 * urn:example:animal:ferret:nose
19233 */
19234var URI = (function () {
19235 /**
19236 * @internal
19237 */
19238 function URI(schemeOrData, authority, path, query, fragment, _strict) {
19239 if (_strict === void 0) { _strict = false; }
19240 if (typeof schemeOrData === 'object') {
19241 this.scheme = schemeOrData.scheme || _empty;
19242 this.authority = schemeOrData.authority || _empty;
19243 this.path = schemeOrData.path || _empty;
19244 this.query = schemeOrData.query || _empty;
19245 this.fragment = schemeOrData.fragment || _empty;
19246 // no validation because it's this URI
19247 // that creates uri components.
19248 // _validateUri(this);
19249 }
19250 else {
19251 this.scheme = _schemeFix(schemeOrData, _strict);
19252 this.authority = authority || _empty;
19253 this.path = _referenceResolution(this.scheme, path || _empty);
19254 this.query = query || _empty;
19255 this.fragment = fragment || _empty;
19256 _validateUri(this, _strict);
19257 }
19258 }
19259 URI.isUri = function (thing) {
19260 if (thing instanceof URI) {
19261 return true;
19262 }
19263 if (!thing) {
19264 return false;
19265 }
19266 return typeof thing.authority === 'string'
19267 && typeof thing.fragment === 'string'
19268 && typeof thing.path === 'string'
19269 && typeof thing.query === 'string'
19270 && typeof thing.scheme === 'string'
19271 && typeof thing.fsPath === 'function'
19272 && typeof thing.with === 'function'
19273 && typeof thing.toString === 'function';
19274 };
19275 Object.defineProperty(URI.prototype, "fsPath", {
19276 // ---- filesystem path -----------------------
19277 /**
19278 * Returns a string representing the corresponding file system path of this URI.
19279 * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
19280 * platform specific path separator.
19281 *
19282 * * Will *not* validate the path for invalid characters and semantics.
19283 * * Will *not* look at the scheme of this URI.
19284 * * The result shall *not* be used for display purposes but for accessing a file on disk.
19285 *
19286 *
19287 * The *difference* to `URI#path` is the use of the platform specific separator and the handling
19288 * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
19289 *
19290 * ```ts
19291 const u = URI.parse('file://server/c$/folder/file.txt')
19292 u.authority === 'server'
19293 u.path === '/shares/c$/file.txt'
19294 u.fsPath === '\\server\c$\folder\file.txt'
19295 ```
19296 *
19297 * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
19298 * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
19299 * with URIs that represent files on disk (`file` scheme).
19300 */
19301 get: function () {
19302 // if (this.scheme !== 'file') {
19303 // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
19304 // }
19305 return _makeFsPath(this);
19306 },
19307 enumerable: true,
19308 configurable: true
19309 });
19310 // ---- modify to new -------------------------
19311 URI.prototype.with = function (change) {
19312 if (!change) {
19313 return this;
19314 }
19315 var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
19316 if (scheme === undefined) {
19317 scheme = this.scheme;
19318 }
19319 else if (scheme === null) {
19320 scheme = _empty;
19321 }
19322 if (authority === undefined) {
19323 authority = this.authority;
19324 }
19325 else if (authority === null) {
19326 authority = _empty;
19327 }
19328 if (path === undefined) {
19329 path = this.path;
19330 }
19331 else if (path === null) {
19332 path = _empty;
19333 }
19334 if (query === undefined) {
19335 query = this.query;
19336 }
19337 else if (query === null) {
19338 query = _empty;
19339 }
19340 if (fragment === undefined) {
19341 fragment = this.fragment;
19342 }
19343 else if (fragment === null) {
19344 fragment = _empty;
19345 }
19346 if (scheme === this.scheme
19347 && authority === this.authority
19348 && path === this.path
19349 && query === this.query
19350 && fragment === this.fragment) {
19351 return this;
19352 }
19353 return new _URI(scheme, authority, path, query, fragment);
19354 };
19355 // ---- parse & validate ------------------------
19356 /**
19357 * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
19358 * `file:///usr/home`, or `scheme:with/path`.
19359 *
19360 * @param value A string which represents an URI (see `URI#toString`).
19361 */
19362 URI.parse = function (value, _strict) {
19363 if (_strict === void 0) { _strict = false; }
19364 var match = _regexp.exec(value);
19365 if (!match) {
19366 return new _URI(_empty, _empty, _empty, _empty, _empty);
19367 }
19368 return new _URI(match[2] || _empty, decodeURIComponent(match[4] || _empty), decodeURIComponent(match[5] || _empty), decodeURIComponent(match[7] || _empty), decodeURIComponent(match[9] || _empty), _strict);
19369 };
19370 /**
19371 * Creates a new URI from a file system path, e.g. `c:\my\files`,
19372 * `/usr/home`, or `\\server\share\some\path`.
19373 *
19374 * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
19375 * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
19376 * `URI.parse('file://' + path)` because the path might contain characters that are
19377 * interpreted (# and ?). See the following sample:
19378 * ```ts
19379 const good = URI.file('/coding/c#/project1');
19380 good.scheme === 'file';
19381 good.path === '/coding/c#/project1';
19382 good.fragment === '';
19383 const bad = URI.parse('file://' + '/coding/c#/project1');
19384 bad.scheme === 'file';
19385 bad.path === '/coding/c'; // path is now broken
19386 bad.fragment === '/project1';
19387 ```
19388 *
19389 * @param path A file system path (see `URI#fsPath`)
19390 */
19391 URI.file = function (path) {
19392 var authority = _empty;
19393 // normalize to fwd-slashes on windows,
19394 // on other systems bwd-slashes are valid
19395 // filename character, eg /f\oo/ba\r.txt
19396 if (isWindows) {
19397 path = path.replace(/\\/g, _slash);
19398 }
19399 // check for authority as used in UNC shares
19400 // or use the path as given
19401 if (path[0] === _slash && path[1] === _slash) {
19402 var idx = path.indexOf(_slash, 2);
19403 if (idx === -1) {
19404 authority = path.substring(2);
19405 path = _slash;
19406 }
19407 else {
19408 authority = path.substring(2, idx);
19409 path = path.substring(idx) || _slash;
19410 }
19411 }
19412 return new _URI('file', authority, path, _empty, _empty);
19413 };
19414 URI.from = function (components) {
19415 return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
19416 };
19417 // ---- printing/externalize ---------------------------
19418 /**
19419 * Creates a string representation for this URI. It's guaranteed that calling
19420 * `URI.parse` with the result of this function creates an URI which is equal
19421 * to this URI.
19422 *
19423 * * The result shall *not* be used for display purposes but for externalization or transport.
19424 * * The result will be encoded using the percentage encoding and encoding happens mostly
19425 * ignore the scheme-specific encoding rules.
19426 *
19427 * @param skipEncoding Do not encode the result, default is `false`
19428 */
19429 URI.prototype.toString = function (skipEncoding) {
19430 if (skipEncoding === void 0) { skipEncoding = false; }
19431 return _asFormatted(this, skipEncoding);
19432 };
19433 URI.prototype.toJSON = function () {
19434 return this;
19435 };
19436 URI.revive = function (data) {
19437 if (!data) {
19438 return data;
19439 }
19440 else if (data instanceof URI) {
19441 return data;
19442 }
19443 else {
19444 var result = new _URI(data);
19445 result._formatted = data.external;
19446 result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
19447 return result;
19448 }
19449 };
19450 return URI;
19451}());
19452/* harmony default export */ __webpack_exports__["default"] = (URI);
19453var _pathSepMarker = isWindows ? 1 : undefined;
19454// tslint:disable-next-line:class-name
19455var _URI = (function (_super) {
19456 __extends(_URI, _super);
19457 function _URI() {
19458 var _this = _super !== null && _super.apply(this, arguments) || this;
19459 _this._formatted = null;
19460 _this._fsPath = null;
19461 return _this;
19462 }
19463 Object.defineProperty(_URI.prototype, "fsPath", {
19464 get: function () {
19465 if (!this._fsPath) {
19466 this._fsPath = _makeFsPath(this);
19467 }
19468 return this._fsPath;
19469 },
19470 enumerable: true,
19471 configurable: true
19472 });
19473 _URI.prototype.toString = function (skipEncoding) {
19474 if (skipEncoding === void 0) { skipEncoding = false; }
19475 if (!skipEncoding) {
19476 if (!this._formatted) {
19477 this._formatted = _asFormatted(this, false);
19478 }
19479 return this._formatted;
19480 }
19481 else {
19482 // we don't cache that
19483 return _asFormatted(this, true);
19484 }
19485 };
19486 _URI.prototype.toJSON = function () {
19487 var res = {
19488 $mid: 1
19489 };
19490 // cached state
19491 if (this._fsPath) {
19492 res.fsPath = this._fsPath;
19493 res._sep = _pathSepMarker;
19494 }
19495 if (this._formatted) {
19496 res.external = this._formatted;
19497 }
19498 // uri components
19499 if (this.path) {
19500 res.path = this.path;
19501 }
19502 if (this.scheme) {
19503 res.scheme = this.scheme;
19504 }
19505 if (this.authority) {
19506 res.authority = this.authority;
19507 }
19508 if (this.query) {
19509 res.query = this.query;
19510 }
19511 if (this.fragment) {
19512 res.fragment = this.fragment;
19513 }
19514 return res;
19515 };
19516 return _URI;
19517}(URI));
19518// reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
19519var encodeTable = (_a = {},
19520 _a[58 /* Colon */] = '%3A',
19521 _a[47 /* Slash */] = '%2F',
19522 _a[63 /* QuestionMark */] = '%3F',
19523 _a[35 /* Hash */] = '%23',
19524 _a[91 /* OpenSquareBracket */] = '%5B',
19525 _a[93 /* CloseSquareBracket */] = '%5D',
19526 _a[64 /* AtSign */] = '%40',
19527 _a[33 /* ExclamationMark */] = '%21',
19528 _a[36 /* DollarSign */] = '%24',
19529 _a[38 /* Ampersand */] = '%26',
19530 _a[39 /* SingleQuote */] = '%27',
19531 _a[40 /* OpenParen */] = '%28',
19532 _a[41 /* CloseParen */] = '%29',
19533 _a[42 /* Asterisk */] = '%2A',
19534 _a[43 /* Plus */] = '%2B',
19535 _a[44 /* Comma */] = '%2C',
19536 _a[59 /* Semicolon */] = '%3B',
19537 _a[61 /* Equals */] = '%3D',
19538 _a[32 /* Space */] = '%20',
19539 _a);
19540function encodeURIComponentFast(uriComponent, allowSlash) {
19541 var res = undefined;
19542 var nativeEncodePos = -1;
19543 for (var pos = 0; pos < uriComponent.length; pos++) {
19544 var code = uriComponent.charCodeAt(pos);
19545 // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
19546 if ((code >= 97 /* a */ && code <= 122 /* z */)
19547 || (code >= 65 /* A */ && code <= 90 /* Z */)
19548 || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
19549 || code === 45 /* Dash */
19550 || code === 46 /* Period */
19551 || code === 95 /* Underline */
19552 || code === 126 /* Tilde */
19553 || (allowSlash && code === 47 /* Slash */)) {
19554 // check if we are delaying native encode
19555 if (nativeEncodePos !== -1) {
19556 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
19557 nativeEncodePos = -1;
19558 }
19559 // check if we write into a new string (by default we try to return the param)
19560 if (res !== undefined) {
19561 res += uriComponent.charAt(pos);
19562 }
19563 }
19564 else {
19565 // encoding needed, we need to allocate a new string
19566 if (res === undefined) {
19567 res = uriComponent.substr(0, pos);
19568 }
19569 // check with default table first
19570 var escaped = encodeTable[code];
19571 if (escaped !== undefined) {
19572 // check if we are delaying native encode
19573 if (nativeEncodePos !== -1) {
19574 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
19575 nativeEncodePos = -1;
19576 }
19577 // append escaped variant to result
19578 res += escaped;
19579 }
19580 else if (nativeEncodePos === -1) {
19581 // use native encode only when needed
19582 nativeEncodePos = pos;
19583 }
19584 }
19585 }
19586 if (nativeEncodePos !== -1) {
19587 res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
19588 }
19589 return res !== undefined ? res : uriComponent;
19590}
19591function encodeURIComponentMinimal(path) {
19592 var res = undefined;
19593 for (var pos = 0; pos < path.length; pos++) {
19594 var code = path.charCodeAt(pos);
19595 if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
19596 if (res === undefined) {
19597 res = path.substr(0, pos);
19598 }
19599 res += encodeTable[code];
19600 }
19601 else {
19602 if (res !== undefined) {
19603 res += path[pos];
19604 }
19605 }
19606 }
19607 return res !== undefined ? res : path;
19608}
19609/**
19610 * Compute `fsPath` for the given uri
19611 */
19612function _makeFsPath(uri) {
19613 var value;
19614 if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
19615 // unc path: file://shares/c$/far/boo
19616 value = "//" + uri.authority + uri.path;
19617 }
19618 else if (uri.path.charCodeAt(0) === 47 /* Slash */
19619 && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
19620 && uri.path.charCodeAt(2) === 58 /* Colon */) {
19621 // windows drive letter: file:///c:/far/boo
19622 value = uri.path[1].toLowerCase() + uri.path.substr(2);
19623 }
19624 else {
19625 // other path
19626 value = uri.path;
19627 }
19628 if (isWindows) {
19629 value = value.replace(/\//g, '\\');
19630 }
19631 return value;
19632}
19633/**
19634 * Create the external version of a uri
19635 */
19636function _asFormatted(uri, skipEncoding) {
19637 var encoder = !skipEncoding
19638 ? encodeURIComponentFast
19639 : encodeURIComponentMinimal;
19640 var res = '';
19641 var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
19642 if (scheme) {
19643 res += scheme;
19644 res += ':';
19645 }
19646 if (authority || scheme === 'file') {
19647 res += _slash;
19648 res += _slash;
19649 }
19650 if (authority) {
19651 var idx = authority.indexOf('@');
19652 if (idx !== -1) {
19653 // <user>@<auth>
19654 var userinfo = authority.substr(0, idx);
19655 authority = authority.substr(idx + 1);
19656 idx = userinfo.indexOf(':');
19657 if (idx === -1) {
19658 res += encoder(userinfo, false);
19659 }
19660 else {
19661 // <user>:<pass>@<auth>
19662 res += encoder(userinfo.substr(0, idx), false);
19663 res += ':';
19664 res += encoder(userinfo.substr(idx + 1), false);
19665 }
19666 res += '@';
19667 }
19668 authority = authority.toLowerCase();
19669 idx = authority.indexOf(':');
19670 if (idx === -1) {
19671 res += encoder(authority, false);
19672 }
19673 else {
19674 // <auth>:<port>
19675 res += encoder(authority.substr(0, idx), false);
19676 res += authority.substr(idx);
19677 }
19678 }
19679 if (path) {
19680 // lower-case windows drive letters in /C:/fff or C:/fff
19681 if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
19682 var code = path.charCodeAt(1);
19683 if (code >= 65 /* A */ && code <= 90 /* Z */) {
19684 path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
19685 }
19686 }
19687 else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
19688 var code = path.charCodeAt(0);
19689 if (code >= 65 /* A */ && code <= 90 /* Z */) {
19690 path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
19691 }
19692 }
19693 // encode the rest of the path
19694 res += encoder(path, true);
19695 }
19696 if (query) {
19697 res += '?';
19698 res += encoder(query, false);
19699 }
19700 if (fragment) {
19701 res += '#';
19702 res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
19703 }
19704 return res;
19705}
19706var _a;
19707
19708
19709/***/ }),
19710/* 133 */,
19711/* 134 */,
19712/* 135 */,
19713/* 136 */,
19714/* 137 */,
19715/* 138 */,
19716/* 139 */,
19717/* 140 */,
19718/* 141 */,
19719/* 142 */,
19720/* 143 */,
19721/* 144 */,
19722/* 145 */,
19723/* 146 */,
19724/* 147 */
19725/***/ (function(module, __webpack_exports__, __webpack_require__) {
19726
19727"use strict";
19728__webpack_require__.r(__webpack_exports__);
19729/* harmony import */ var _internal_Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
19730/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return _internal_Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]; });
19731
19732/* harmony import */ var _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(165);
19733/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return _internal_observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_1__["ConnectableObservable"]; });
19734
19735/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(170);
19736/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_2__["GroupedObservable"]; });
19737
19738/* harmony import */ var _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(162);
19739/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return _internal_symbol_observable__WEBPACK_IMPORTED_MODULE_3__["observable"]; });
19740
19741/* harmony import */ var _internal_Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(166);
19742/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return _internal_Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]; });
19743
19744/* harmony import */ var _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(171);
19745/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return _internal_BehaviorSubject__WEBPACK_IMPORTED_MODULE_5__["BehaviorSubject"]; });
19746
19747/* harmony import */ var _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(172);
19748/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return _internal_ReplaySubject__WEBPACK_IMPORTED_MODULE_6__["ReplaySubject"]; });
19749
19750/* harmony import */ var _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(189);
19751/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return _internal_AsyncSubject__WEBPACK_IMPORTED_MODULE_7__["AsyncSubject"]; });
19752
19753/* harmony import */ var _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(190);
19754/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asapScheduler", function() { return _internal_scheduler_asap__WEBPACK_IMPORTED_MODULE_8__["asap"]; });
19755
19756/* harmony import */ var _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(194);
19757/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "asyncScheduler", function() { return _internal_scheduler_async__WEBPACK_IMPORTED_MODULE_9__["async"]; });
19758
19759/* harmony import */ var _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(173);
19760/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "queueScheduler", function() { return _internal_scheduler_queue__WEBPACK_IMPORTED_MODULE_10__["queue"]; });
19761
19762/* harmony import */ var _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(195);
19763/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "animationFrameScheduler", function() { return _internal_scheduler_animationFrame__WEBPACK_IMPORTED_MODULE_11__["animationFrame"]; });
19764
19765/* harmony import */ var _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(198);
19766/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualTimeScheduler"]; });
19767
19768/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return _internal_scheduler_VirtualTimeScheduler__WEBPACK_IMPORTED_MODULE_12__["VirtualAction"]; });
19769
19770/* harmony import */ var _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(179);
19771/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return _internal_Scheduler__WEBPACK_IMPORTED_MODULE_13__["Scheduler"]; });
19772
19773/* harmony import */ var _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(156);
19774/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return _internal_Subscription__WEBPACK_IMPORTED_MODULE_14__["Subscription"]; });
19775
19776/* harmony import */ var _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(150);
19777/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return _internal_Subscriber__WEBPACK_IMPORTED_MODULE_15__["Subscriber"]; });
19778
19779/* harmony import */ var _internal_Notification__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(181);
19780/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["Notification"]; });
19781
19782/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return _internal_Notification__WEBPACK_IMPORTED_MODULE_16__["NotificationKind"]; });
19783
19784/* harmony import */ var _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(163);
19785/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _internal_util_pipe__WEBPACK_IMPORTED_MODULE_17__["pipe"]; });
19786
19787/* harmony import */ var _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(164);
19788/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return _internal_util_noop__WEBPACK_IMPORTED_MODULE_18__["noop"]; });
19789
19790/* harmony import */ var _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(199);
19791/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return _internal_util_identity__WEBPACK_IMPORTED_MODULE_19__["identity"]; });
19792
19793/* harmony import */ var _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(200);
19794/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return _internal_util_isObservable__WEBPACK_IMPORTED_MODULE_20__["isObservable"]; });
19795
19796/* harmony import */ var _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(201);
19797/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return _internal_util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_21__["ArgumentOutOfRangeError"]; });
19798
19799/* harmony import */ var _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(202);
19800/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return _internal_util_EmptyError__WEBPACK_IMPORTED_MODULE_22__["EmptyError"]; });
19801
19802/* harmony import */ var _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(167);
19803/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return _internal_util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_23__["ObjectUnsubscribedError"]; });
19804
19805/* harmony import */ var _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(159);
19806/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return _internal_util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_24__["UnsubscriptionError"]; });
19807
19808/* harmony import */ var _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(203);
19809/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return _internal_util_TimeoutError__WEBPACK_IMPORTED_MODULE_25__["TimeoutError"]; });
19810
19811/* harmony import */ var _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(204);
19812/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return _internal_observable_bindCallback__WEBPACK_IMPORTED_MODULE_26__["bindCallback"]; });
19813
19814/* harmony import */ var _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(206);
19815/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return _internal_observable_bindNodeCallback__WEBPACK_IMPORTED_MODULE_27__["bindNodeCallback"]; });
19816
19817/* harmony import */ var _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(207);
19818/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_observable_combineLatest__WEBPACK_IMPORTED_MODULE_28__["combineLatest"]; });
19819
19820/* harmony import */ var _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(218);
19821/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_observable_concat__WEBPACK_IMPORTED_MODULE_29__["concat"]; });
19822
19823/* harmony import */ var _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(229);
19824/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return _internal_observable_defer__WEBPACK_IMPORTED_MODULE_30__["defer"]; });
19825
19826/* harmony import */ var _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(182);
19827/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["empty"]; });
19828
19829/* harmony import */ var _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(230);
19830/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return _internal_observable_forkJoin__WEBPACK_IMPORTED_MODULE_32__["forkJoin"]; });
19831
19832/* harmony import */ var _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(222);
19833/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "from", function() { return _internal_observable_from__WEBPACK_IMPORTED_MODULE_33__["from"]; });
19834
19835/* harmony import */ var _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(231);
19836/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return _internal_observable_fromEvent__WEBPACK_IMPORTED_MODULE_34__["fromEvent"]; });
19837
19838/* harmony import */ var _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(232);
19839/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return _internal_observable_fromEventPattern__WEBPACK_IMPORTED_MODULE_35__["fromEventPattern"]; });
19840
19841/* harmony import */ var _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(233);
19842/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return _internal_observable_generate__WEBPACK_IMPORTED_MODULE_36__["generate"]; });
19843
19844/* harmony import */ var _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(234);
19845/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return _internal_observable_iif__WEBPACK_IMPORTED_MODULE_37__["iif"]; });
19846
19847/* harmony import */ var _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(235);
19848/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _internal_observable_interval__WEBPACK_IMPORTED_MODULE_38__["interval"]; });
19849
19850/* harmony import */ var _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(237);
19851/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_observable_merge__WEBPACK_IMPORTED_MODULE_39__["merge"]; });
19852
19853/* harmony import */ var _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(238);
19854/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "never", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["never"]; });
19855
19856/* harmony import */ var _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(183);
19857/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "of", function() { return _internal_observable_of__WEBPACK_IMPORTED_MODULE_41__["of"]; });
19858
19859/* harmony import */ var _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(239);
19860/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_observable_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_42__["onErrorResumeNext"]; });
19861
19862/* harmony import */ var _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(240);
19863/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _internal_observable_pairs__WEBPACK_IMPORTED_MODULE_43__["pairs"]; });
19864
19865/* harmony import */ var _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(241);
19866/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_observable_partition__WEBPACK_IMPORTED_MODULE_44__["partition"]; });
19867
19868/* harmony import */ var _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(244);
19869/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_observable_race__WEBPACK_IMPORTED_MODULE_45__["race"]; });
19870
19871/* harmony import */ var _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(245);
19872/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _internal_observable_range__WEBPACK_IMPORTED_MODULE_46__["range"]; });
19873
19874/* harmony import */ var _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(188);
19875/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return _internal_observable_throwError__WEBPACK_IMPORTED_MODULE_47__["throwError"]; });
19876
19877/* harmony import */ var _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(246);
19878/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _internal_observable_timer__WEBPACK_IMPORTED_MODULE_48__["timer"]; });
19879
19880/* harmony import */ var _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(247);
19881/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "using", function() { return _internal_observable_using__WEBPACK_IMPORTED_MODULE_49__["using"]; });
19882
19883/* harmony import */ var _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(248);
19884/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_observable_zip__WEBPACK_IMPORTED_MODULE_50__["zip"]; });
19885
19886/* harmony import */ var _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(223);
19887/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return _internal_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_51__["scheduled"]; });
19888
19889/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return _internal_observable_empty__WEBPACK_IMPORTED_MODULE_31__["EMPTY"]; });
19890
19891/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return _internal_observable_never__WEBPACK_IMPORTED_MODULE_40__["NEVER"]; });
19892
19893/* harmony import */ var _internal_config__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(154);
19894/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "config", function() { return _internal_config__WEBPACK_IMPORTED_MODULE_52__["config"]; });
19895
19896/** PURE_IMPORTS_START PURE_IMPORTS_END */
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952//# sourceMappingURL=index.js.map
19953
19954
19955/***/ }),
19956/* 148 */
19957/***/ (function(module, __webpack_exports__, __webpack_require__) {
19958
19959"use strict";
19960__webpack_require__.r(__webpack_exports__);
19961/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observable", function() { return Observable; });
19962/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(149);
19963/* harmony import */ var _util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(161);
19964/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(162);
19965/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(163);
19966/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(154);
19967/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
19968
19969
19970
19971
19972
19973var Observable = /*@__PURE__*/ (function () {
19974 function Observable(subscribe) {
19975 this._isScalar = false;
19976 if (subscribe) {
19977 this._subscribe = subscribe;
19978 }
19979 }
19980 Observable.prototype.lift = function (operator) {
19981 var observable = new Observable();
19982 observable.source = this;
19983 observable.operator = operator;
19984 return observable;
19985 };
19986 Observable.prototype.subscribe = function (observerOrNext, error, complete) {
19987 var operator = this.operator;
19988 var sink = Object(_util_toSubscriber__WEBPACK_IMPORTED_MODULE_1__["toSubscriber"])(observerOrNext, error, complete);
19989 if (operator) {
19990 sink.add(operator.call(sink, this.source));
19991 }
19992 else {
19993 sink.add(this.source || (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
19994 this._subscribe(sink) :
19995 this._trySubscribe(sink));
19996 }
19997 if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
19998 if (sink.syncErrorThrowable) {
19999 sink.syncErrorThrowable = false;
20000 if (sink.syncErrorThrown) {
20001 throw sink.syncErrorValue;
20002 }
20003 }
20004 }
20005 return sink;
20006 };
20007 Observable.prototype._trySubscribe = function (sink) {
20008 try {
20009 return this._subscribe(sink);
20010 }
20011 catch (err) {
20012 if (_config__WEBPACK_IMPORTED_MODULE_4__["config"].useDeprecatedSynchronousErrorHandling) {
20013 sink.syncErrorThrown = true;
20014 sink.syncErrorValue = err;
20015 }
20016 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_0__["canReportError"])(sink)) {
20017 sink.error(err);
20018 }
20019 else {
20020 console.warn(err);
20021 }
20022 }
20023 };
20024 Observable.prototype.forEach = function (next, promiseCtor) {
20025 var _this = this;
20026 promiseCtor = getPromiseCtor(promiseCtor);
20027 return new promiseCtor(function (resolve, reject) {
20028 var subscription;
20029 subscription = _this.subscribe(function (value) {
20030 try {
20031 next(value);
20032 }
20033 catch (err) {
20034 reject(err);
20035 if (subscription) {
20036 subscription.unsubscribe();
20037 }
20038 }
20039 }, reject, resolve);
20040 });
20041 };
20042 Observable.prototype._subscribe = function (subscriber) {
20043 var source = this.source;
20044 return source && source.subscribe(subscriber);
20045 };
20046 Observable.prototype[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]] = function () {
20047 return this;
20048 };
20049 Observable.prototype.pipe = function () {
20050 var operations = [];
20051 for (var _i = 0; _i < arguments.length; _i++) {
20052 operations[_i] = arguments[_i];
20053 }
20054 if (operations.length === 0) {
20055 return this;
20056 }
20057 return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipeFromArray"])(operations)(this);
20058 };
20059 Observable.prototype.toPromise = function (promiseCtor) {
20060 var _this = this;
20061 promiseCtor = getPromiseCtor(promiseCtor);
20062 return new promiseCtor(function (resolve, reject) {
20063 var value;
20064 _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
20065 });
20066 };
20067 Observable.create = function (subscribe) {
20068 return new Observable(subscribe);
20069 };
20070 return Observable;
20071}());
20072
20073function getPromiseCtor(promiseCtor) {
20074 if (!promiseCtor) {
20075 promiseCtor = _config__WEBPACK_IMPORTED_MODULE_4__["config"].Promise || Promise;
20076 }
20077 if (!promiseCtor) {
20078 throw new Error('no Promise impl found');
20079 }
20080 return promiseCtor;
20081}
20082//# sourceMappingURL=Observable.js.map
20083
20084
20085/***/ }),
20086/* 149 */
20087/***/ (function(module, __webpack_exports__, __webpack_require__) {
20088
20089"use strict";
20090__webpack_require__.r(__webpack_exports__);
20091/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "canReportError", function() { return canReportError; });
20092/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(150);
20093/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */
20094
20095function canReportError(observer) {
20096 while (observer) {
20097 var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;
20098 if (closed_1 || isStopped) {
20099 return false;
20100 }
20101 else if (destination && destination instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
20102 observer = destination;
20103 }
20104 else {
20105 observer = null;
20106 }
20107 }
20108 return true;
20109}
20110//# sourceMappingURL=canReportError.js.map
20111
20112
20113/***/ }),
20114/* 150 */
20115/***/ (function(module, __webpack_exports__, __webpack_require__) {
20116
20117"use strict";
20118__webpack_require__.r(__webpack_exports__);
20119/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscriber", function() { return Subscriber; });
20120/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SafeSubscriber", function() { return SafeSubscriber; });
20121/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
20122/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(152);
20123/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(153);
20124/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(156);
20125/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(160);
20126/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(154);
20127/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(155);
20128/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */
20129
20130
20131
20132
20133
20134
20135
20136var Subscriber = /*@__PURE__*/ (function (_super) {
20137 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subscriber, _super);
20138 function Subscriber(destinationOrNext, error, complete) {
20139 var _this = _super.call(this) || this;
20140 _this.syncErrorValue = null;
20141 _this.syncErrorThrown = false;
20142 _this.syncErrorThrowable = false;
20143 _this.isStopped = false;
20144 switch (arguments.length) {
20145 case 0:
20146 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
20147 break;
20148 case 1:
20149 if (!destinationOrNext) {
20150 _this.destination = _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"];
20151 break;
20152 }
20153 if (typeof destinationOrNext === 'object') {
20154 if (destinationOrNext instanceof Subscriber) {
20155 _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
20156 _this.destination = destinationOrNext;
20157 destinationOrNext.add(_this);
20158 }
20159 else {
20160 _this.syncErrorThrowable = true;
20161 _this.destination = new SafeSubscriber(_this, destinationOrNext);
20162 }
20163 break;
20164 }
20165 default:
20166 _this.syncErrorThrowable = true;
20167 _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
20168 break;
20169 }
20170 return _this;
20171 }
20172 Subscriber.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_4__["rxSubscriber"]] = function () { return this; };
20173 Subscriber.create = function (next, error, complete) {
20174 var subscriber = new Subscriber(next, error, complete);
20175 subscriber.syncErrorThrowable = false;
20176 return subscriber;
20177 };
20178 Subscriber.prototype.next = function (value) {
20179 if (!this.isStopped) {
20180 this._next(value);
20181 }
20182 };
20183 Subscriber.prototype.error = function (err) {
20184 if (!this.isStopped) {
20185 this.isStopped = true;
20186 this._error(err);
20187 }
20188 };
20189 Subscriber.prototype.complete = function () {
20190 if (!this.isStopped) {
20191 this.isStopped = true;
20192 this._complete();
20193 }
20194 };
20195 Subscriber.prototype.unsubscribe = function () {
20196 if (this.closed) {
20197 return;
20198 }
20199 this.isStopped = true;
20200 _super.prototype.unsubscribe.call(this);
20201 };
20202 Subscriber.prototype._next = function (value) {
20203 this.destination.next(value);
20204 };
20205 Subscriber.prototype._error = function (err) {
20206 this.destination.error(err);
20207 this.unsubscribe();
20208 };
20209 Subscriber.prototype._complete = function () {
20210 this.destination.complete();
20211 this.unsubscribe();
20212 };
20213 Subscriber.prototype._unsubscribeAndRecycle = function () {
20214 var _parentOrParents = this._parentOrParents;
20215 this._parentOrParents = null;
20216 this.unsubscribe();
20217 this.closed = false;
20218 this.isStopped = false;
20219 this._parentOrParents = _parentOrParents;
20220 return this;
20221 };
20222 return Subscriber;
20223}(_Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"]));
20224
20225var SafeSubscriber = /*@__PURE__*/ (function (_super) {
20226 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SafeSubscriber, _super);
20227 function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {
20228 var _this = _super.call(this) || this;
20229 _this._parentSubscriber = _parentSubscriber;
20230 var next;
20231 var context = _this;
20232 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(observerOrNext)) {
20233 next = observerOrNext;
20234 }
20235 else if (observerOrNext) {
20236 next = observerOrNext.next;
20237 error = observerOrNext.error;
20238 complete = observerOrNext.complete;
20239 if (observerOrNext !== _Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]) {
20240 context = Object.create(observerOrNext);
20241 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_1__["isFunction"])(context.unsubscribe)) {
20242 _this.add(context.unsubscribe.bind(context));
20243 }
20244 context.unsubscribe = _this.unsubscribe.bind(_this);
20245 }
20246 }
20247 _this._context = context;
20248 _this._next = next;
20249 _this._error = error;
20250 _this._complete = complete;
20251 return _this;
20252 }
20253 SafeSubscriber.prototype.next = function (value) {
20254 if (!this.isStopped && this._next) {
20255 var _parentSubscriber = this._parentSubscriber;
20256 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
20257 this.__tryOrUnsub(this._next, value);
20258 }
20259 else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
20260 this.unsubscribe();
20261 }
20262 }
20263 };
20264 SafeSubscriber.prototype.error = function (err) {
20265 if (!this.isStopped) {
20266 var _parentSubscriber = this._parentSubscriber;
20267 var useDeprecatedSynchronousErrorHandling = _config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling;
20268 if (this._error) {
20269 if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
20270 this.__tryOrUnsub(this._error, err);
20271 this.unsubscribe();
20272 }
20273 else {
20274 this.__tryOrSetError(_parentSubscriber, this._error, err);
20275 this.unsubscribe();
20276 }
20277 }
20278 else if (!_parentSubscriber.syncErrorThrowable) {
20279 this.unsubscribe();
20280 if (useDeprecatedSynchronousErrorHandling) {
20281 throw err;
20282 }
20283 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
20284 }
20285 else {
20286 if (useDeprecatedSynchronousErrorHandling) {
20287 _parentSubscriber.syncErrorValue = err;
20288 _parentSubscriber.syncErrorThrown = true;
20289 }
20290 else {
20291 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
20292 }
20293 this.unsubscribe();
20294 }
20295 }
20296 };
20297 SafeSubscriber.prototype.complete = function () {
20298 var _this = this;
20299 if (!this.isStopped) {
20300 var _parentSubscriber = this._parentSubscriber;
20301 if (this._complete) {
20302 var wrappedComplete = function () { return _this._complete.call(_this._context); };
20303 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
20304 this.__tryOrUnsub(wrappedComplete);
20305 this.unsubscribe();
20306 }
20307 else {
20308 this.__tryOrSetError(_parentSubscriber, wrappedComplete);
20309 this.unsubscribe();
20310 }
20311 }
20312 else {
20313 this.unsubscribe();
20314 }
20315 }
20316 };
20317 SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
20318 try {
20319 fn.call(this._context, value);
20320 }
20321 catch (err) {
20322 this.unsubscribe();
20323 if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
20324 throw err;
20325 }
20326 else {
20327 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
20328 }
20329 }
20330 };
20331 SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
20332 if (!_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
20333 throw new Error('bad call');
20334 }
20335 try {
20336 fn.call(this._context, value);
20337 }
20338 catch (err) {
20339 if (_config__WEBPACK_IMPORTED_MODULE_5__["config"].useDeprecatedSynchronousErrorHandling) {
20340 parent.syncErrorValue = err;
20341 parent.syncErrorThrown = true;
20342 return true;
20343 }
20344 else {
20345 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_6__["hostReportError"])(err);
20346 return true;
20347 }
20348 }
20349 return false;
20350 };
20351 SafeSubscriber.prototype._unsubscribe = function () {
20352 var _parentSubscriber = this._parentSubscriber;
20353 this._context = null;
20354 this._parentSubscriber = null;
20355 _parentSubscriber.unsubscribe();
20356 };
20357 return SafeSubscriber;
20358}(Subscriber));
20359
20360//# sourceMappingURL=Subscriber.js.map
20361
20362
20363/***/ }),
20364/* 151 */
20365/***/ (function(module, __webpack_exports__, __webpack_require__) {
20366
20367"use strict";
20368__webpack_require__.r(__webpack_exports__);
20369/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; });
20370/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; });
20371/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; });
20372/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; });
20373/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; });
20374/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; });
20375/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; });
20376/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; });
20377/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; });
20378/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; });
20379/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; });
20380/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; });
20381/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; });
20382/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; });
20383/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; });
20384/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; });
20385/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; });
20386/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; });
20387/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; });
20388/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; });
20389/*! *****************************************************************************
20390Copyright (c) Microsoft Corporation. All rights reserved.
20391Licensed under the Apache License, Version 2.0 (the "License"); you may not use
20392this file except in compliance with the License. You may obtain a copy of the
20393License at http://www.apache.org/licenses/LICENSE-2.0
20394
20395THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20396KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
20397WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
20398MERCHANTABLITY OR NON-INFRINGEMENT.
20399
20400See the Apache Version 2.0 License for specific language governing permissions
20401and limitations under the License.
20402***************************************************************************** */
20403/* global Reflect, Promise */
20404
20405var extendStatics = function(d, b) {
20406 extendStatics = Object.setPrototypeOf ||
20407 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
20408 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20409 return extendStatics(d, b);
20410};
20411
20412function __extends(d, b) {
20413 extendStatics(d, b);
20414 function __() { this.constructor = d; }
20415 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20416}
20417
20418var __assign = function() {
20419 __assign = Object.assign || function __assign(t) {
20420 for (var s, i = 1, n = arguments.length; i < n; i++) {
20421 s = arguments[i];
20422 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
20423 }
20424 return t;
20425 }
20426 return __assign.apply(this, arguments);
20427}
20428
20429function __rest(s, e) {
20430 var t = {};
20431 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
20432 t[p] = s[p];
20433 if (s != null && typeof Object.getOwnPropertySymbols === "function")
20434 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
20435 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20436 t[p[i]] = s[p[i]];
20437 }
20438 return t;
20439}
20440
20441function __decorate(decorators, target, key, desc) {
20442 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20443 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20444 else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
20445 return c > 3 && r && Object.defineProperty(target, key, r), r;
20446}
20447
20448function __param(paramIndex, decorator) {
20449 return function (target, key) { decorator(target, key, paramIndex); }
20450}
20451
20452function __metadata(metadataKey, metadataValue) {
20453 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
20454}
20455
20456function __awaiter(thisArg, _arguments, P, generator) {
20457 return new (P || (P = Promise))(function (resolve, reject) {
20458 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
20459 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20460 function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
20461 step((generator = generator.apply(thisArg, _arguments || [])).next());
20462 });
20463}
20464
20465function __generator(thisArg, body) {
20466 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
20467 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
20468 function verb(n) { return function (v) { return step([n, v]); }; }
20469 function step(op) {
20470 if (f) throw new TypeError("Generator is already executing.");
20471 while (_) try {
20472 if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
20473 if (y = 0, t) op = [op[0] & 2, t.value];
20474 switch (op[0]) {
20475 case 0: case 1: t = op; break;
20476 case 4: _.label++; return { value: op[1], done: false };
20477 case 5: _.label++; y = op[1]; op = [0]; continue;
20478 case 7: op = _.ops.pop(); _.trys.pop(); continue;
20479 default:
20480 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
20481 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
20482 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
20483 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
20484 if (t[2]) _.ops.pop();
20485 _.trys.pop(); continue;
20486 }
20487 op = body.call(thisArg, _);
20488 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
20489 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
20490 }
20491}
20492
20493function __exportStar(m, exports) {
20494 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
20495}
20496
20497function __values(o) {
20498 var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
20499 if (m) return m.call(o);
20500 return {
20501 next: function () {
20502 if (o && i >= o.length) o = void 0;
20503 return { value: o && o[i++], done: !o };
20504 }
20505 };
20506}
20507
20508function __read(o, n) {
20509 var m = typeof Symbol === "function" && o[Symbol.iterator];
20510 if (!m) return o;
20511 var i = m.call(o), r, ar = [], e;
20512 try {
20513 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
20514 }
20515 catch (error) { e = { error: error }; }
20516 finally {
20517 try {
20518 if (r && !r.done && (m = i["return"])) m.call(i);
20519 }
20520 finally { if (e) throw e.error; }
20521 }
20522 return ar;
20523}
20524
20525function __spread() {
20526 for (var ar = [], i = 0; i < arguments.length; i++)
20527 ar = ar.concat(__read(arguments[i]));
20528 return ar;
20529}
20530
20531function __spreadArrays() {
20532 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
20533 for (var r = Array(s), k = 0, i = 0; i < il; i++)
20534 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
20535 r[k] = a[j];
20536 return r;
20537};
20538
20539function __await(v) {
20540 return this instanceof __await ? (this.v = v, this) : new __await(v);
20541}
20542
20543function __asyncGenerator(thisArg, _arguments, generator) {
20544 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
20545 var g = generator.apply(thisArg, _arguments || []), i, q = [];
20546 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
20547 function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
20548 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
20549 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
20550 function fulfill(value) { resume("next", value); }
20551 function reject(value) { resume("throw", value); }
20552 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
20553}
20554
20555function __asyncDelegator(o) {
20556 var i, p;
20557 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
20558 function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
20559}
20560
20561function __asyncValues(o) {
20562 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
20563 var m = o[Symbol.asyncIterator], i;
20564 return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
20565 function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
20566 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
20567}
20568
20569function __makeTemplateObject(cooked, raw) {
20570 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
20571 return cooked;
20572};
20573
20574function __importStar(mod) {
20575 if (mod && mod.__esModule) return mod;
20576 var result = {};
20577 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
20578 result.default = mod;
20579 return result;
20580}
20581
20582function __importDefault(mod) {
20583 return (mod && mod.__esModule) ? mod : { default: mod };
20584}
20585
20586
20587/***/ }),
20588/* 152 */
20589/***/ (function(module, __webpack_exports__, __webpack_require__) {
20590
20591"use strict";
20592__webpack_require__.r(__webpack_exports__);
20593/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFunction", function() { return isFunction; });
20594/** PURE_IMPORTS_START PURE_IMPORTS_END */
20595function isFunction(x) {
20596 return typeof x === 'function';
20597}
20598//# sourceMappingURL=isFunction.js.map
20599
20600
20601/***/ }),
20602/* 153 */
20603/***/ (function(module, __webpack_exports__, __webpack_require__) {
20604
20605"use strict";
20606__webpack_require__.r(__webpack_exports__);
20607/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
20608/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(154);
20609/* harmony import */ var _util_hostReportError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(155);
20610/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */
20611
20612
20613var empty = {
20614 closed: true,
20615 next: function (value) { },
20616 error: function (err) {
20617 if (_config__WEBPACK_IMPORTED_MODULE_0__["config"].useDeprecatedSynchronousErrorHandling) {
20618 throw err;
20619 }
20620 else {
20621 Object(_util_hostReportError__WEBPACK_IMPORTED_MODULE_1__["hostReportError"])(err);
20622 }
20623 },
20624 complete: function () { }
20625};
20626//# sourceMappingURL=Observer.js.map
20627
20628
20629/***/ }),
20630/* 154 */
20631/***/ (function(module, __webpack_exports__, __webpack_require__) {
20632
20633"use strict";
20634__webpack_require__.r(__webpack_exports__);
20635/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "config", function() { return config; });
20636/** PURE_IMPORTS_START PURE_IMPORTS_END */
20637var _enable_super_gross_mode_that_will_cause_bad_things = false;
20638var config = {
20639 Promise: undefined,
20640 set useDeprecatedSynchronousErrorHandling(value) {
20641 if (value) {
20642 var error = /*@__PURE__*/ new Error();
20643 /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
20644 }
20645 else if (_enable_super_gross_mode_that_will_cause_bad_things) {
20646 /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');
20647 }
20648 _enable_super_gross_mode_that_will_cause_bad_things = value;
20649 },
20650 get useDeprecatedSynchronousErrorHandling() {
20651 return _enable_super_gross_mode_that_will_cause_bad_things;
20652 },
20653};
20654//# sourceMappingURL=config.js.map
20655
20656
20657/***/ }),
20658/* 155 */
20659/***/ (function(module, __webpack_exports__, __webpack_require__) {
20660
20661"use strict";
20662__webpack_require__.r(__webpack_exports__);
20663/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hostReportError", function() { return hostReportError; });
20664/** PURE_IMPORTS_START PURE_IMPORTS_END */
20665function hostReportError(err) {
20666 setTimeout(function () { throw err; }, 0);
20667}
20668//# sourceMappingURL=hostReportError.js.map
20669
20670
20671/***/ }),
20672/* 156 */
20673/***/ (function(module, __webpack_exports__, __webpack_require__) {
20674
20675"use strict";
20676__webpack_require__.r(__webpack_exports__);
20677/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subscription", function() { return Subscription; });
20678/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(157);
20679/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(158);
20680/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(152);
20681/* harmony import */ var _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(159);
20682/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */
20683
20684
20685
20686
20687var Subscription = /*@__PURE__*/ (function () {
20688 function Subscription(unsubscribe) {
20689 this.closed = false;
20690 this._parentOrParents = null;
20691 this._subscriptions = null;
20692 if (unsubscribe) {
20693 this._unsubscribe = unsubscribe;
20694 }
20695 }
20696 Subscription.prototype.unsubscribe = function () {
20697 var errors;
20698 if (this.closed) {
20699 return;
20700 }
20701 var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
20702 this.closed = true;
20703 this._parentOrParents = null;
20704 this._subscriptions = null;
20705 if (_parentOrParents instanceof Subscription) {
20706 _parentOrParents.remove(this);
20707 }
20708 else if (_parentOrParents !== null) {
20709 for (var index = 0; index < _parentOrParents.length; ++index) {
20710 var parent_1 = _parentOrParents[index];
20711 parent_1.remove(this);
20712 }
20713 }
20714 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(_unsubscribe)) {
20715 try {
20716 _unsubscribe.call(this);
20717 }
20718 catch (e) {
20719 errors = e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"] ? flattenUnsubscriptionErrors(e.errors) : [e];
20720 }
20721 }
20722 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(_subscriptions)) {
20723 var index = -1;
20724 var len = _subscriptions.length;
20725 while (++index < len) {
20726 var sub = _subscriptions[index];
20727 if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_1__["isObject"])(sub)) {
20728 try {
20729 sub.unsubscribe();
20730 }
20731 catch (e) {
20732 errors = errors || [];
20733 if (e instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) {
20734 errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
20735 }
20736 else {
20737 errors.push(e);
20738 }
20739 }
20740 }
20741 }
20742 }
20743 if (errors) {
20744 throw new _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"](errors);
20745 }
20746 };
20747 Subscription.prototype.add = function (teardown) {
20748 var subscription = teardown;
20749 if (!teardown) {
20750 return Subscription.EMPTY;
20751 }
20752 switch (typeof teardown) {
20753 case 'function':
20754 subscription = new Subscription(teardown);
20755 case 'object':
20756 if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
20757 return subscription;
20758 }
20759 else if (this.closed) {
20760 subscription.unsubscribe();
20761 return subscription;
20762 }
20763 else if (!(subscription instanceof Subscription)) {
20764 var tmp = subscription;
20765 subscription = new Subscription();
20766 subscription._subscriptions = [tmp];
20767 }
20768 break;
20769 default: {
20770 throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
20771 }
20772 }
20773 var _parentOrParents = subscription._parentOrParents;
20774 if (_parentOrParents === null) {
20775 subscription._parentOrParents = this;
20776 }
20777 else if (_parentOrParents instanceof Subscription) {
20778 if (_parentOrParents === this) {
20779 return subscription;
20780 }
20781 subscription._parentOrParents = [_parentOrParents, this];
20782 }
20783 else if (_parentOrParents.indexOf(this) === -1) {
20784 _parentOrParents.push(this);
20785 }
20786 else {
20787 return subscription;
20788 }
20789 var subscriptions = this._subscriptions;
20790 if (subscriptions === null) {
20791 this._subscriptions = [subscription];
20792 }
20793 else {
20794 subscriptions.push(subscription);
20795 }
20796 return subscription;
20797 };
20798 Subscription.prototype.remove = function (subscription) {
20799 var subscriptions = this._subscriptions;
20800 if (subscriptions) {
20801 var subscriptionIndex = subscriptions.indexOf(subscription);
20802 if (subscriptionIndex !== -1) {
20803 subscriptions.splice(subscriptionIndex, 1);
20804 }
20805 }
20806 };
20807 Subscription.EMPTY = (function (empty) {
20808 empty.closed = true;
20809 return empty;
20810 }(new Subscription()));
20811 return Subscription;
20812}());
20813
20814function flattenUnsubscriptionErrors(errors) {
20815 return errors.reduce(function (errs, err) { return errs.concat((err instanceof _util_UnsubscriptionError__WEBPACK_IMPORTED_MODULE_3__["UnsubscriptionError"]) ? err.errors : err); }, []);
20816}
20817//# sourceMappingURL=Subscription.js.map
20818
20819
20820/***/ }),
20821/* 157 */
20822/***/ (function(module, __webpack_exports__, __webpack_require__) {
20823
20824"use strict";
20825__webpack_require__.r(__webpack_exports__);
20826/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArray", function() { return isArray; });
20827/** PURE_IMPORTS_START PURE_IMPORTS_END */
20828var isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });
20829//# sourceMappingURL=isArray.js.map
20830
20831
20832/***/ }),
20833/* 158 */
20834/***/ (function(module, __webpack_exports__, __webpack_require__) {
20835
20836"use strict";
20837__webpack_require__.r(__webpack_exports__);
20838/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; });
20839/** PURE_IMPORTS_START PURE_IMPORTS_END */
20840function isObject(x) {
20841 return x !== null && typeof x === 'object';
20842}
20843//# sourceMappingURL=isObject.js.map
20844
20845
20846/***/ }),
20847/* 159 */
20848/***/ (function(module, __webpack_exports__, __webpack_require__) {
20849
20850"use strict";
20851__webpack_require__.r(__webpack_exports__);
20852/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UnsubscriptionError", function() { return UnsubscriptionError; });
20853/** PURE_IMPORTS_START PURE_IMPORTS_END */
20854function UnsubscriptionErrorImpl(errors) {
20855 Error.call(this);
20856 this.message = errors ?
20857 errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ') : '';
20858 this.name = 'UnsubscriptionError';
20859 this.errors = errors;
20860 return this;
20861}
20862UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
20863var UnsubscriptionError = UnsubscriptionErrorImpl;
20864//# sourceMappingURL=UnsubscriptionError.js.map
20865
20866
20867/***/ }),
20868/* 160 */
20869/***/ (function(module, __webpack_exports__, __webpack_require__) {
20870
20871"use strict";
20872__webpack_require__.r(__webpack_exports__);
20873/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rxSubscriber", function() { return rxSubscriber; });
20874/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$rxSubscriber", function() { return $$rxSubscriber; });
20875/** PURE_IMPORTS_START PURE_IMPORTS_END */
20876var rxSubscriber = typeof Symbol === 'function'
20877 ? /*@__PURE__*/ Symbol('rxSubscriber')
20878 : '@@rxSubscriber_' + /*@__PURE__*/ Math.random();
20879var $$rxSubscriber = rxSubscriber;
20880//# sourceMappingURL=rxSubscriber.js.map
20881
20882
20883/***/ }),
20884/* 161 */
20885/***/ (function(module, __webpack_exports__, __webpack_require__) {
20886
20887"use strict";
20888__webpack_require__.r(__webpack_exports__);
20889/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toSubscriber", function() { return toSubscriber; });
20890/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(150);
20891/* harmony import */ var _symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(160);
20892/* harmony import */ var _Observer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(153);
20893/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
20894
20895
20896
20897function toSubscriber(nextOrObserver, error, complete) {
20898 if (nextOrObserver) {
20899 if (nextOrObserver instanceof _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"]) {
20900 return nextOrObserver;
20901 }
20902 if (nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]) {
20903 return nextOrObserver[_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_1__["rxSubscriber"]]();
20904 }
20905 }
20906 if (!nextOrObserver && !error && !complete) {
20907 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](_Observer__WEBPACK_IMPORTED_MODULE_2__["empty"]);
20908 }
20909 return new _Subscriber__WEBPACK_IMPORTED_MODULE_0__["Subscriber"](nextOrObserver, error, complete);
20910}
20911//# sourceMappingURL=toSubscriber.js.map
20912
20913
20914/***/ }),
20915/* 162 */
20916/***/ (function(module, __webpack_exports__, __webpack_require__) {
20917
20918"use strict";
20919__webpack_require__.r(__webpack_exports__);
20920/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observable", function() { return observable; });
20921/** PURE_IMPORTS_START PURE_IMPORTS_END */
20922var observable = typeof Symbol === 'function' && Symbol.observable || '@@observable';
20923//# sourceMappingURL=observable.js.map
20924
20925
20926/***/ }),
20927/* 163 */
20928/***/ (function(module, __webpack_exports__, __webpack_require__) {
20929
20930"use strict";
20931__webpack_require__.r(__webpack_exports__);
20932/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; });
20933/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipeFromArray", function() { return pipeFromArray; });
20934/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(164);
20935/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */
20936
20937function pipe() {
20938 var fns = [];
20939 for (var _i = 0; _i < arguments.length; _i++) {
20940 fns[_i] = arguments[_i];
20941 }
20942 return pipeFromArray(fns);
20943}
20944function pipeFromArray(fns) {
20945 if (!fns) {
20946 return _noop__WEBPACK_IMPORTED_MODULE_0__["noop"];
20947 }
20948 if (fns.length === 1) {
20949 return fns[0];
20950 }
20951 return function piped(input) {
20952 return fns.reduce(function (prev, fn) { return fn(prev); }, input);
20953 };
20954}
20955//# sourceMappingURL=pipe.js.map
20956
20957
20958/***/ }),
20959/* 164 */
20960/***/ (function(module, __webpack_exports__, __webpack_require__) {
20961
20962"use strict";
20963__webpack_require__.r(__webpack_exports__);
20964/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
20965/** PURE_IMPORTS_START PURE_IMPORTS_END */
20966function noop() { }
20967//# sourceMappingURL=noop.js.map
20968
20969
20970/***/ }),
20971/* 165 */
20972/***/ (function(module, __webpack_exports__, __webpack_require__) {
20973
20974"use strict";
20975__webpack_require__.r(__webpack_exports__);
20976/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectableObservable", function() { return ConnectableObservable; });
20977/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectableObservableDescriptor", function() { return connectableObservableDescriptor; });
20978/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
20979/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
20980/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(148);
20981/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(150);
20982/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(156);
20983/* harmony import */ var _operators_refCount__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(169);
20984/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
20985
20986
20987
20988
20989
20990
20991var ConnectableObservable = /*@__PURE__*/ (function (_super) {
20992 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableObservable, _super);
20993 function ConnectableObservable(source, subjectFactory) {
20994 var _this = _super.call(this) || this;
20995 _this.source = source;
20996 _this.subjectFactory = subjectFactory;
20997 _this._refCount = 0;
20998 _this._isComplete = false;
20999 return _this;
21000 }
21001 ConnectableObservable.prototype._subscribe = function (subscriber) {
21002 return this.getSubject().subscribe(subscriber);
21003 };
21004 ConnectableObservable.prototype.getSubject = function () {
21005 var subject = this._subject;
21006 if (!subject || subject.isStopped) {
21007 this._subject = this.subjectFactory();
21008 }
21009 return this._subject;
21010 };
21011 ConnectableObservable.prototype.connect = function () {
21012 var connection = this._connection;
21013 if (!connection) {
21014 this._isComplete = false;
21015 connection = this._connection = new _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"]();
21016 connection.add(this.source
21017 .subscribe(new ConnectableSubscriber(this.getSubject(), this)));
21018 if (connection.closed) {
21019 this._connection = null;
21020 connection = _Subscription__WEBPACK_IMPORTED_MODULE_4__["Subscription"].EMPTY;
21021 }
21022 }
21023 return connection;
21024 };
21025 ConnectableObservable.prototype.refCount = function () {
21026 return Object(_operators_refCount__WEBPACK_IMPORTED_MODULE_5__["refCount"])()(this);
21027 };
21028 return ConnectableObservable;
21029}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
21030
21031var connectableProto = ConnectableObservable.prototype;
21032var connectableObservableDescriptor = {
21033 operator: { value: null },
21034 _refCount: { value: 0, writable: true },
21035 _subject: { value: null, writable: true },
21036 _connection: { value: null, writable: true },
21037 _subscribe: { value: connectableProto._subscribe },
21038 _isComplete: { value: connectableProto._isComplete, writable: true },
21039 getSubject: { value: connectableProto.getSubject },
21040 connect: { value: connectableProto.connect },
21041 refCount: { value: connectableProto.refCount }
21042};
21043var ConnectableSubscriber = /*@__PURE__*/ (function (_super) {
21044 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ConnectableSubscriber, _super);
21045 function ConnectableSubscriber(destination, connectable) {
21046 var _this = _super.call(this, destination) || this;
21047 _this.connectable = connectable;
21048 return _this;
21049 }
21050 ConnectableSubscriber.prototype._error = function (err) {
21051 this._unsubscribe();
21052 _super.prototype._error.call(this, err);
21053 };
21054 ConnectableSubscriber.prototype._complete = function () {
21055 this.connectable._isComplete = true;
21056 this._unsubscribe();
21057 _super.prototype._complete.call(this);
21058 };
21059 ConnectableSubscriber.prototype._unsubscribe = function () {
21060 var connectable = this.connectable;
21061 if (connectable) {
21062 this.connectable = null;
21063 var connection = connectable._connection;
21064 connectable._refCount = 0;
21065 connectable._subject = null;
21066 connectable._connection = null;
21067 if (connection) {
21068 connection.unsubscribe();
21069 }
21070 }
21071 };
21072 return ConnectableSubscriber;
21073}(_Subject__WEBPACK_IMPORTED_MODULE_1__["SubjectSubscriber"]));
21074var RefCountOperator = /*@__PURE__*/ (function () {
21075 function RefCountOperator(connectable) {
21076 this.connectable = connectable;
21077 }
21078 RefCountOperator.prototype.call = function (subscriber, source) {
21079 var connectable = this.connectable;
21080 connectable._refCount++;
21081 var refCounter = new RefCountSubscriber(subscriber, connectable);
21082 var subscription = source.subscribe(refCounter);
21083 if (!refCounter.closed) {
21084 refCounter.connection = connectable.connect();
21085 }
21086 return subscription;
21087 };
21088 return RefCountOperator;
21089}());
21090var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
21091 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
21092 function RefCountSubscriber(destination, connectable) {
21093 var _this = _super.call(this, destination) || this;
21094 _this.connectable = connectable;
21095 return _this;
21096 }
21097 RefCountSubscriber.prototype._unsubscribe = function () {
21098 var connectable = this.connectable;
21099 if (!connectable) {
21100 this.connection = null;
21101 return;
21102 }
21103 this.connectable = null;
21104 var refCount = connectable._refCount;
21105 if (refCount <= 0) {
21106 this.connection = null;
21107 return;
21108 }
21109 connectable._refCount = refCount - 1;
21110 if (refCount > 1) {
21111 this.connection = null;
21112 return;
21113 }
21114 var connection = this.connection;
21115 var sharedConnection = connectable._connection;
21116 this.connection = null;
21117 if (sharedConnection && (!connection || sharedConnection === connection)) {
21118 sharedConnection.unsubscribe();
21119 }
21120 };
21121 return RefCountSubscriber;
21122}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
21123//# sourceMappingURL=ConnectableObservable.js.map
21124
21125
21126/***/ }),
21127/* 166 */
21128/***/ (function(module, __webpack_exports__, __webpack_require__) {
21129
21130"use strict";
21131__webpack_require__.r(__webpack_exports__);
21132/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscriber", function() { return SubjectSubscriber; });
21133/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Subject", function() { return Subject; });
21134/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnonymousSubject", function() { return AnonymousSubject; });
21135/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
21136/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(148);
21137/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(150);
21138/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(156);
21139/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(167);
21140/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(168);
21141/* harmony import */ var _internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(160);
21142/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */
21143
21144
21145
21146
21147
21148
21149
21150var SubjectSubscriber = /*@__PURE__*/ (function (_super) {
21151 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscriber, _super);
21152 function SubjectSubscriber(destination) {
21153 var _this = _super.call(this, destination) || this;
21154 _this.destination = destination;
21155 return _this;
21156 }
21157 return SubjectSubscriber;
21158}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
21159
21160var Subject = /*@__PURE__*/ (function (_super) {
21161 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Subject, _super);
21162 function Subject() {
21163 var _this = _super.call(this) || this;
21164 _this.observers = [];
21165 _this.closed = false;
21166 _this.isStopped = false;
21167 _this.hasError = false;
21168 _this.thrownError = null;
21169 return _this;
21170 }
21171 Subject.prototype[_internal_symbol_rxSubscriber__WEBPACK_IMPORTED_MODULE_6__["rxSubscriber"]] = function () {
21172 return new SubjectSubscriber(this);
21173 };
21174 Subject.prototype.lift = function (operator) {
21175 var subject = new AnonymousSubject(this, this);
21176 subject.operator = operator;
21177 return subject;
21178 };
21179 Subject.prototype.next = function (value) {
21180 if (this.closed) {
21181 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
21182 }
21183 if (!this.isStopped) {
21184 var observers = this.observers;
21185 var len = observers.length;
21186 var copy = observers.slice();
21187 for (var i = 0; i < len; i++) {
21188 copy[i].next(value);
21189 }
21190 }
21191 };
21192 Subject.prototype.error = function (err) {
21193 if (this.closed) {
21194 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
21195 }
21196 this.hasError = true;
21197 this.thrownError = err;
21198 this.isStopped = true;
21199 var observers = this.observers;
21200 var len = observers.length;
21201 var copy = observers.slice();
21202 for (var i = 0; i < len; i++) {
21203 copy[i].error(err);
21204 }
21205 this.observers.length = 0;
21206 };
21207 Subject.prototype.complete = function () {
21208 if (this.closed) {
21209 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
21210 }
21211 this.isStopped = true;
21212 var observers = this.observers;
21213 var len = observers.length;
21214 var copy = observers.slice();
21215 for (var i = 0; i < len; i++) {
21216 copy[i].complete();
21217 }
21218 this.observers.length = 0;
21219 };
21220 Subject.prototype.unsubscribe = function () {
21221 this.isStopped = true;
21222 this.closed = true;
21223 this.observers = null;
21224 };
21225 Subject.prototype._trySubscribe = function (subscriber) {
21226 if (this.closed) {
21227 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
21228 }
21229 else {
21230 return _super.prototype._trySubscribe.call(this, subscriber);
21231 }
21232 };
21233 Subject.prototype._subscribe = function (subscriber) {
21234 if (this.closed) {
21235 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_4__["ObjectUnsubscribedError"]();
21236 }
21237 else if (this.hasError) {
21238 subscriber.error(this.thrownError);
21239 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
21240 }
21241 else if (this.isStopped) {
21242 subscriber.complete();
21243 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
21244 }
21245 else {
21246 this.observers.push(subscriber);
21247 return new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_5__["SubjectSubscription"](this, subscriber);
21248 }
21249 };
21250 Subject.prototype.asObservable = function () {
21251 var observable = new _Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]();
21252 observable.source = this;
21253 return observable;
21254 };
21255 Subject.create = function (destination, source) {
21256 return new AnonymousSubject(destination, source);
21257 };
21258 return Subject;
21259}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
21260
21261var AnonymousSubject = /*@__PURE__*/ (function (_super) {
21262 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnonymousSubject, _super);
21263 function AnonymousSubject(destination, source) {
21264 var _this = _super.call(this) || this;
21265 _this.destination = destination;
21266 _this.source = source;
21267 return _this;
21268 }
21269 AnonymousSubject.prototype.next = function (value) {
21270 var destination = this.destination;
21271 if (destination && destination.next) {
21272 destination.next(value);
21273 }
21274 };
21275 AnonymousSubject.prototype.error = function (err) {
21276 var destination = this.destination;
21277 if (destination && destination.error) {
21278 this.destination.error(err);
21279 }
21280 };
21281 AnonymousSubject.prototype.complete = function () {
21282 var destination = this.destination;
21283 if (destination && destination.complete) {
21284 this.destination.complete();
21285 }
21286 };
21287 AnonymousSubject.prototype._subscribe = function (subscriber) {
21288 var source = this.source;
21289 if (source) {
21290 return this.source.subscribe(subscriber);
21291 }
21292 else {
21293 return _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
21294 }
21295 };
21296 return AnonymousSubject;
21297}(Subject));
21298
21299//# sourceMappingURL=Subject.js.map
21300
21301
21302/***/ }),
21303/* 167 */
21304/***/ (function(module, __webpack_exports__, __webpack_require__) {
21305
21306"use strict";
21307__webpack_require__.r(__webpack_exports__);
21308/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectUnsubscribedError", function() { return ObjectUnsubscribedError; });
21309/** PURE_IMPORTS_START PURE_IMPORTS_END */
21310function ObjectUnsubscribedErrorImpl() {
21311 Error.call(this);
21312 this.message = 'object unsubscribed';
21313 this.name = 'ObjectUnsubscribedError';
21314 return this;
21315}
21316ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
21317var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
21318//# sourceMappingURL=ObjectUnsubscribedError.js.map
21319
21320
21321/***/ }),
21322/* 168 */
21323/***/ (function(module, __webpack_exports__, __webpack_require__) {
21324
21325"use strict";
21326__webpack_require__.r(__webpack_exports__);
21327/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubjectSubscription", function() { return SubjectSubscription; });
21328/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
21329/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(156);
21330/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
21331
21332
21333var SubjectSubscription = /*@__PURE__*/ (function (_super) {
21334 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubjectSubscription, _super);
21335 function SubjectSubscription(subject, subscriber) {
21336 var _this = _super.call(this) || this;
21337 _this.subject = subject;
21338 _this.subscriber = subscriber;
21339 _this.closed = false;
21340 return _this;
21341 }
21342 SubjectSubscription.prototype.unsubscribe = function () {
21343 if (this.closed) {
21344 return;
21345 }
21346 this.closed = true;
21347 var subject = this.subject;
21348 var observers = subject.observers;
21349 this.subject = null;
21350 if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
21351 return;
21352 }
21353 var subscriberIndex = observers.indexOf(this.subscriber);
21354 if (subscriberIndex !== -1) {
21355 observers.splice(subscriberIndex, 1);
21356 }
21357 };
21358 return SubjectSubscription;
21359}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
21360
21361//# sourceMappingURL=SubjectSubscription.js.map
21362
21363
21364/***/ }),
21365/* 169 */
21366/***/ (function(module, __webpack_exports__, __webpack_require__) {
21367
21368"use strict";
21369__webpack_require__.r(__webpack_exports__);
21370/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return refCount; });
21371/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
21372/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
21373/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
21374
21375
21376function refCount() {
21377 return function refCountOperatorFunction(source) {
21378 return source.lift(new RefCountOperator(source));
21379 };
21380}
21381var RefCountOperator = /*@__PURE__*/ (function () {
21382 function RefCountOperator(connectable) {
21383 this.connectable = connectable;
21384 }
21385 RefCountOperator.prototype.call = function (subscriber, source) {
21386 var connectable = this.connectable;
21387 connectable._refCount++;
21388 var refCounter = new RefCountSubscriber(subscriber, connectable);
21389 var subscription = source.subscribe(refCounter);
21390 if (!refCounter.closed) {
21391 refCounter.connection = connectable.connect();
21392 }
21393 return subscription;
21394 };
21395 return RefCountOperator;
21396}());
21397var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
21398 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RefCountSubscriber, _super);
21399 function RefCountSubscriber(destination, connectable) {
21400 var _this = _super.call(this, destination) || this;
21401 _this.connectable = connectable;
21402 return _this;
21403 }
21404 RefCountSubscriber.prototype._unsubscribe = function () {
21405 var connectable = this.connectable;
21406 if (!connectable) {
21407 this.connection = null;
21408 return;
21409 }
21410 this.connectable = null;
21411 var refCount = connectable._refCount;
21412 if (refCount <= 0) {
21413 this.connection = null;
21414 return;
21415 }
21416 connectable._refCount = refCount - 1;
21417 if (refCount > 1) {
21418 this.connection = null;
21419 return;
21420 }
21421 var connection = this.connection;
21422 var sharedConnection = connectable._connection;
21423 this.connection = null;
21424 if (sharedConnection && (!connection || sharedConnection === connection)) {
21425 sharedConnection.unsubscribe();
21426 }
21427 };
21428 return RefCountSubscriber;
21429}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
21430//# sourceMappingURL=refCount.js.map
21431
21432
21433/***/ }),
21434/* 170 */
21435/***/ (function(module, __webpack_exports__, __webpack_require__) {
21436
21437"use strict";
21438__webpack_require__.r(__webpack_exports__);
21439/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return groupBy; });
21440/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GroupedObservable", function() { return GroupedObservable; });
21441/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
21442/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
21443/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(156);
21444/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(148);
21445/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(166);
21446/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription,_Observable,_Subject PURE_IMPORTS_END */
21447
21448
21449
21450
21451
21452function groupBy(keySelector, elementSelector, durationSelector, subjectSelector) {
21453 return function (source) {
21454 return source.lift(new GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector));
21455 };
21456}
21457var GroupByOperator = /*@__PURE__*/ (function () {
21458 function GroupByOperator(keySelector, elementSelector, durationSelector, subjectSelector) {
21459 this.keySelector = keySelector;
21460 this.elementSelector = elementSelector;
21461 this.durationSelector = durationSelector;
21462 this.subjectSelector = subjectSelector;
21463 }
21464 GroupByOperator.prototype.call = function (subscriber, source) {
21465 return source.subscribe(new GroupBySubscriber(subscriber, this.keySelector, this.elementSelector, this.durationSelector, this.subjectSelector));
21466 };
21467 return GroupByOperator;
21468}());
21469var GroupBySubscriber = /*@__PURE__*/ (function (_super) {
21470 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupBySubscriber, _super);
21471 function GroupBySubscriber(destination, keySelector, elementSelector, durationSelector, subjectSelector) {
21472 var _this = _super.call(this, destination) || this;
21473 _this.keySelector = keySelector;
21474 _this.elementSelector = elementSelector;
21475 _this.durationSelector = durationSelector;
21476 _this.subjectSelector = subjectSelector;
21477 _this.groups = null;
21478 _this.attemptedToUnsubscribe = false;
21479 _this.count = 0;
21480 return _this;
21481 }
21482 GroupBySubscriber.prototype._next = function (value) {
21483 var key;
21484 try {
21485 key = this.keySelector(value);
21486 }
21487 catch (err) {
21488 this.error(err);
21489 return;
21490 }
21491 this._group(value, key);
21492 };
21493 GroupBySubscriber.prototype._group = function (value, key) {
21494 var groups = this.groups;
21495 if (!groups) {
21496 groups = this.groups = new Map();
21497 }
21498 var group = groups.get(key);
21499 var element;
21500 if (this.elementSelector) {
21501 try {
21502 element = this.elementSelector(value);
21503 }
21504 catch (err) {
21505 this.error(err);
21506 }
21507 }
21508 else {
21509 element = value;
21510 }
21511 if (!group) {
21512 group = (this.subjectSelector ? this.subjectSelector() : new _Subject__WEBPACK_IMPORTED_MODULE_4__["Subject"]());
21513 groups.set(key, group);
21514 var groupedObservable = new GroupedObservable(key, group, this);
21515 this.destination.next(groupedObservable);
21516 if (this.durationSelector) {
21517 var duration = void 0;
21518 try {
21519 duration = this.durationSelector(new GroupedObservable(key, group));
21520 }
21521 catch (err) {
21522 this.error(err);
21523 return;
21524 }
21525 this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
21526 }
21527 }
21528 if (!group.closed) {
21529 group.next(element);
21530 }
21531 };
21532 GroupBySubscriber.prototype._error = function (err) {
21533 var groups = this.groups;
21534 if (groups) {
21535 groups.forEach(function (group, key) {
21536 group.error(err);
21537 });
21538 groups.clear();
21539 }
21540 this.destination.error(err);
21541 };
21542 GroupBySubscriber.prototype._complete = function () {
21543 var groups = this.groups;
21544 if (groups) {
21545 groups.forEach(function (group, key) {
21546 group.complete();
21547 });
21548 groups.clear();
21549 }
21550 this.destination.complete();
21551 };
21552 GroupBySubscriber.prototype.removeGroup = function (key) {
21553 this.groups.delete(key);
21554 };
21555 GroupBySubscriber.prototype.unsubscribe = function () {
21556 if (!this.closed) {
21557 this.attemptedToUnsubscribe = true;
21558 if (this.count === 0) {
21559 _super.prototype.unsubscribe.call(this);
21560 }
21561 }
21562 };
21563 return GroupBySubscriber;
21564}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
21565var GroupDurationSubscriber = /*@__PURE__*/ (function (_super) {
21566 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupDurationSubscriber, _super);
21567 function GroupDurationSubscriber(key, group, parent) {
21568 var _this = _super.call(this, group) || this;
21569 _this.key = key;
21570 _this.group = group;
21571 _this.parent = parent;
21572 return _this;
21573 }
21574 GroupDurationSubscriber.prototype._next = function (value) {
21575 this.complete();
21576 };
21577 GroupDurationSubscriber.prototype._unsubscribe = function () {
21578 var _a = this, parent = _a.parent, key = _a.key;
21579 this.key = this.parent = null;
21580 if (parent) {
21581 parent.removeGroup(key);
21582 }
21583 };
21584 return GroupDurationSubscriber;
21585}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
21586var GroupedObservable = /*@__PURE__*/ (function (_super) {
21587 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](GroupedObservable, _super);
21588 function GroupedObservable(key, groupSubject, refCountSubscription) {
21589 var _this = _super.call(this) || this;
21590 _this.key = key;
21591 _this.groupSubject = groupSubject;
21592 _this.refCountSubscription = refCountSubscription;
21593 return _this;
21594 }
21595 GroupedObservable.prototype._subscribe = function (subscriber) {
21596 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
21597 var _a = this, refCountSubscription = _a.refCountSubscription, groupSubject = _a.groupSubject;
21598 if (refCountSubscription && !refCountSubscription.closed) {
21599 subscription.add(new InnerRefCountSubscription(refCountSubscription));
21600 }
21601 subscription.add(groupSubject.subscribe(subscriber));
21602 return subscription;
21603 };
21604 return GroupedObservable;
21605}(_Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"]));
21606
21607var InnerRefCountSubscription = /*@__PURE__*/ (function (_super) {
21608 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerRefCountSubscription, _super);
21609 function InnerRefCountSubscription(parent) {
21610 var _this = _super.call(this) || this;
21611 _this.parent = parent;
21612 parent.count++;
21613 return _this;
21614 }
21615 InnerRefCountSubscription.prototype.unsubscribe = function () {
21616 var parent = this.parent;
21617 if (!parent.closed && !this.closed) {
21618 _super.prototype.unsubscribe.call(this);
21619 parent.count -= 1;
21620 if (parent.count === 0 && parent.attemptedToUnsubscribe) {
21621 parent.unsubscribe();
21622 }
21623 }
21624 };
21625 return InnerRefCountSubscription;
21626}(_Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]));
21627//# sourceMappingURL=groupBy.js.map
21628
21629
21630/***/ }),
21631/* 171 */
21632/***/ (function(module, __webpack_exports__, __webpack_require__) {
21633
21634"use strict";
21635__webpack_require__.r(__webpack_exports__);
21636/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BehaviorSubject", function() { return BehaviorSubject; });
21637/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
21638/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
21639/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
21640/** PURE_IMPORTS_START tslib,_Subject,_util_ObjectUnsubscribedError PURE_IMPORTS_END */
21641
21642
21643
21644var BehaviorSubject = /*@__PURE__*/ (function (_super) {
21645 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BehaviorSubject, _super);
21646 function BehaviorSubject(_value) {
21647 var _this = _super.call(this) || this;
21648 _this._value = _value;
21649 return _this;
21650 }
21651 Object.defineProperty(BehaviorSubject.prototype, "value", {
21652 get: function () {
21653 return this.getValue();
21654 },
21655 enumerable: true,
21656 configurable: true
21657 });
21658 BehaviorSubject.prototype._subscribe = function (subscriber) {
21659 var subscription = _super.prototype._subscribe.call(this, subscriber);
21660 if (subscription && !subscription.closed) {
21661 subscriber.next(this._value);
21662 }
21663 return subscription;
21664 };
21665 BehaviorSubject.prototype.getValue = function () {
21666 if (this.hasError) {
21667 throw this.thrownError;
21668 }
21669 else if (this.closed) {
21670 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_2__["ObjectUnsubscribedError"]();
21671 }
21672 else {
21673 return this._value;
21674 }
21675 };
21676 BehaviorSubject.prototype.next = function (value) {
21677 _super.prototype.next.call(this, this._value = value);
21678 };
21679 return BehaviorSubject;
21680}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
21681
21682//# sourceMappingURL=BehaviorSubject.js.map
21683
21684
21685/***/ }),
21686/* 172 */
21687/***/ (function(module, __webpack_exports__, __webpack_require__) {
21688
21689"use strict";
21690__webpack_require__.r(__webpack_exports__);
21691/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ReplaySubject", function() { return ReplaySubject; });
21692/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
21693/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
21694/* harmony import */ var _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(173);
21695/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(156);
21696/* harmony import */ var _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(180);
21697/* harmony import */ var _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(167);
21698/* harmony import */ var _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(168);
21699/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */
21700
21701
21702
21703
21704
21705
21706
21707var ReplaySubject = /*@__PURE__*/ (function (_super) {
21708 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ReplaySubject, _super);
21709 function ReplaySubject(bufferSize, windowTime, scheduler) {
21710 if (bufferSize === void 0) {
21711 bufferSize = Number.POSITIVE_INFINITY;
21712 }
21713 if (windowTime === void 0) {
21714 windowTime = Number.POSITIVE_INFINITY;
21715 }
21716 var _this = _super.call(this) || this;
21717 _this.scheduler = scheduler;
21718 _this._events = [];
21719 _this._infiniteTimeWindow = false;
21720 _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;
21721 _this._windowTime = windowTime < 1 ? 1 : windowTime;
21722 if (windowTime === Number.POSITIVE_INFINITY) {
21723 _this._infiniteTimeWindow = true;
21724 _this.next = _this.nextInfiniteTimeWindow;
21725 }
21726 else {
21727 _this.next = _this.nextTimeWindow;
21728 }
21729 return _this;
21730 }
21731 ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {
21732 var _events = this._events;
21733 _events.push(value);
21734 if (_events.length > this._bufferSize) {
21735 _events.shift();
21736 }
21737 _super.prototype.next.call(this, value);
21738 };
21739 ReplaySubject.prototype.nextTimeWindow = function (value) {
21740 this._events.push(new ReplayEvent(this._getNow(), value));
21741 this._trimBufferThenGetEvents();
21742 _super.prototype.next.call(this, value);
21743 };
21744 ReplaySubject.prototype._subscribe = function (subscriber) {
21745 var _infiniteTimeWindow = this._infiniteTimeWindow;
21746 var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();
21747 var scheduler = this.scheduler;
21748 var len = _events.length;
21749 var subscription;
21750 if (this.closed) {
21751 throw new _util_ObjectUnsubscribedError__WEBPACK_IMPORTED_MODULE_5__["ObjectUnsubscribedError"]();
21752 }
21753 else if (this.isStopped || this.hasError) {
21754 subscription = _Subscription__WEBPACK_IMPORTED_MODULE_3__["Subscription"].EMPTY;
21755 }
21756 else {
21757 this.observers.push(subscriber);
21758 subscription = new _SubjectSubscription__WEBPACK_IMPORTED_MODULE_6__["SubjectSubscription"](this, subscriber);
21759 }
21760 if (scheduler) {
21761 subscriber.add(subscriber = new _operators_observeOn__WEBPACK_IMPORTED_MODULE_4__["ObserveOnSubscriber"](subscriber, scheduler));
21762 }
21763 if (_infiniteTimeWindow) {
21764 for (var i = 0; i < len && !subscriber.closed; i++) {
21765 subscriber.next(_events[i]);
21766 }
21767 }
21768 else {
21769 for (var i = 0; i < len && !subscriber.closed; i++) {
21770 subscriber.next(_events[i].value);
21771 }
21772 }
21773 if (this.hasError) {
21774 subscriber.error(this.thrownError);
21775 }
21776 else if (this.isStopped) {
21777 subscriber.complete();
21778 }
21779 return subscription;
21780 };
21781 ReplaySubject.prototype._getNow = function () {
21782 return (this.scheduler || _scheduler_queue__WEBPACK_IMPORTED_MODULE_2__["queue"]).now();
21783 };
21784 ReplaySubject.prototype._trimBufferThenGetEvents = function () {
21785 var now = this._getNow();
21786 var _bufferSize = this._bufferSize;
21787 var _windowTime = this._windowTime;
21788 var _events = this._events;
21789 var eventsCount = _events.length;
21790 var spliceCount = 0;
21791 while (spliceCount < eventsCount) {
21792 if ((now - _events[spliceCount].time) < _windowTime) {
21793 break;
21794 }
21795 spliceCount++;
21796 }
21797 if (eventsCount > _bufferSize) {
21798 spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);
21799 }
21800 if (spliceCount > 0) {
21801 _events.splice(0, spliceCount);
21802 }
21803 return _events;
21804 };
21805 return ReplaySubject;
21806}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
21807
21808var ReplayEvent = /*@__PURE__*/ (function () {
21809 function ReplayEvent(time, value) {
21810 this.time = time;
21811 this.value = value;
21812 }
21813 return ReplayEvent;
21814}());
21815//# sourceMappingURL=ReplaySubject.js.map
21816
21817
21818/***/ }),
21819/* 173 */
21820/***/ (function(module, __webpack_exports__, __webpack_require__) {
21821
21822"use strict";
21823__webpack_require__.r(__webpack_exports__);
21824/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "queue", function() { return queue; });
21825/* harmony import */ var _QueueAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(174);
21826/* harmony import */ var _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(177);
21827/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */
21828
21829
21830var queue = /*@__PURE__*/ new _QueueScheduler__WEBPACK_IMPORTED_MODULE_1__["QueueScheduler"](_QueueAction__WEBPACK_IMPORTED_MODULE_0__["QueueAction"]);
21831//# sourceMappingURL=queue.js.map
21832
21833
21834/***/ }),
21835/* 174 */
21836/***/ (function(module, __webpack_exports__, __webpack_require__) {
21837
21838"use strict";
21839__webpack_require__.r(__webpack_exports__);
21840/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueAction", function() { return QueueAction; });
21841/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
21842/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
21843/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
21844
21845
21846var QueueAction = /*@__PURE__*/ (function (_super) {
21847 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueAction, _super);
21848 function QueueAction(scheduler, work) {
21849 var _this = _super.call(this, scheduler, work) || this;
21850 _this.scheduler = scheduler;
21851 _this.work = work;
21852 return _this;
21853 }
21854 QueueAction.prototype.schedule = function (state, delay) {
21855 if (delay === void 0) {
21856 delay = 0;
21857 }
21858 if (delay > 0) {
21859 return _super.prototype.schedule.call(this, state, delay);
21860 }
21861 this.delay = delay;
21862 this.state = state;
21863 this.scheduler.flush(this);
21864 return this;
21865 };
21866 QueueAction.prototype.execute = function (state, delay) {
21867 return (delay > 0 || this.closed) ?
21868 _super.prototype.execute.call(this, state, delay) :
21869 this._execute(state, delay);
21870 };
21871 QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
21872 if (delay === void 0) {
21873 delay = 0;
21874 }
21875 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
21876 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
21877 }
21878 return scheduler.flush(this);
21879 };
21880 return QueueAction;
21881}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
21882
21883//# sourceMappingURL=QueueAction.js.map
21884
21885
21886/***/ }),
21887/* 175 */
21888/***/ (function(module, __webpack_exports__, __webpack_require__) {
21889
21890"use strict";
21891__webpack_require__.r(__webpack_exports__);
21892/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncAction", function() { return AsyncAction; });
21893/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
21894/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
21895/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */
21896
21897
21898var AsyncAction = /*@__PURE__*/ (function (_super) {
21899 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncAction, _super);
21900 function AsyncAction(scheduler, work) {
21901 var _this = _super.call(this, scheduler, work) || this;
21902 _this.scheduler = scheduler;
21903 _this.work = work;
21904 _this.pending = false;
21905 return _this;
21906 }
21907 AsyncAction.prototype.schedule = function (state, delay) {
21908 if (delay === void 0) {
21909 delay = 0;
21910 }
21911 if (this.closed) {
21912 return this;
21913 }
21914 this.state = state;
21915 var id = this.id;
21916 var scheduler = this.scheduler;
21917 if (id != null) {
21918 this.id = this.recycleAsyncId(scheduler, id, delay);
21919 }
21920 this.pending = true;
21921 this.delay = delay;
21922 this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
21923 return this;
21924 };
21925 AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
21926 if (delay === void 0) {
21927 delay = 0;
21928 }
21929 return setInterval(scheduler.flush.bind(scheduler, this), delay);
21930 };
21931 AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
21932 if (delay === void 0) {
21933 delay = 0;
21934 }
21935 if (delay !== null && this.delay === delay && this.pending === false) {
21936 return id;
21937 }
21938 clearInterval(id);
21939 return undefined;
21940 };
21941 AsyncAction.prototype.execute = function (state, delay) {
21942 if (this.closed) {
21943 return new Error('executing a cancelled action');
21944 }
21945 this.pending = false;
21946 var error = this._execute(state, delay);
21947 if (error) {
21948 return error;
21949 }
21950 else if (this.pending === false && this.id != null) {
21951 this.id = this.recycleAsyncId(this.scheduler, this.id, null);
21952 }
21953 };
21954 AsyncAction.prototype._execute = function (state, delay) {
21955 var errored = false;
21956 var errorValue = undefined;
21957 try {
21958 this.work(state);
21959 }
21960 catch (e) {
21961 errored = true;
21962 errorValue = !!e && e || new Error(e);
21963 }
21964 if (errored) {
21965 this.unsubscribe();
21966 return errorValue;
21967 }
21968 };
21969 AsyncAction.prototype._unsubscribe = function () {
21970 var id = this.id;
21971 var scheduler = this.scheduler;
21972 var actions = scheduler.actions;
21973 var index = actions.indexOf(this);
21974 this.work = null;
21975 this.state = null;
21976 this.pending = false;
21977 this.scheduler = null;
21978 if (index !== -1) {
21979 actions.splice(index, 1);
21980 }
21981 if (id != null) {
21982 this.id = this.recycleAsyncId(scheduler, id, null);
21983 }
21984 this.delay = null;
21985 };
21986 return AsyncAction;
21987}(_Action__WEBPACK_IMPORTED_MODULE_1__["Action"]));
21988
21989//# sourceMappingURL=AsyncAction.js.map
21990
21991
21992/***/ }),
21993/* 176 */
21994/***/ (function(module, __webpack_exports__, __webpack_require__) {
21995
21996"use strict";
21997__webpack_require__.r(__webpack_exports__);
21998/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Action", function() { return Action; });
21999/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
22000/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(156);
22001/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
22002
22003
22004var Action = /*@__PURE__*/ (function (_super) {
22005 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Action, _super);
22006 function Action(scheduler, work) {
22007 return _super.call(this) || this;
22008 }
22009 Action.prototype.schedule = function (state, delay) {
22010 if (delay === void 0) {
22011 delay = 0;
22012 }
22013 return this;
22014 };
22015 return Action;
22016}(_Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]));
22017
22018//# sourceMappingURL=Action.js.map
22019
22020
22021/***/ }),
22022/* 177 */
22023/***/ (function(module, __webpack_exports__, __webpack_require__) {
22024
22025"use strict";
22026__webpack_require__.r(__webpack_exports__);
22027/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueueScheduler", function() { return QueueScheduler; });
22028/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
22029/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
22030/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
22031
22032
22033var QueueScheduler = /*@__PURE__*/ (function (_super) {
22034 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](QueueScheduler, _super);
22035 function QueueScheduler() {
22036 return _super !== null && _super.apply(this, arguments) || this;
22037 }
22038 return QueueScheduler;
22039}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
22040
22041//# sourceMappingURL=QueueScheduler.js.map
22042
22043
22044/***/ }),
22045/* 178 */
22046/***/ (function(module, __webpack_exports__, __webpack_require__) {
22047
22048"use strict";
22049__webpack_require__.r(__webpack_exports__);
22050/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncScheduler", function() { return AsyncScheduler; });
22051/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
22052/* harmony import */ var _Scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(179);
22053/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
22054
22055
22056var AsyncScheduler = /*@__PURE__*/ (function (_super) {
22057 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncScheduler, _super);
22058 function AsyncScheduler(SchedulerAction, now) {
22059 if (now === void 0) {
22060 now = _Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"].now;
22061 }
22062 var _this = _super.call(this, SchedulerAction, function () {
22063 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
22064 return AsyncScheduler.delegate.now();
22065 }
22066 else {
22067 return now();
22068 }
22069 }) || this;
22070 _this.actions = [];
22071 _this.active = false;
22072 _this.scheduled = undefined;
22073 return _this;
22074 }
22075 AsyncScheduler.prototype.schedule = function (work, delay, state) {
22076 if (delay === void 0) {
22077 delay = 0;
22078 }
22079 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
22080 return AsyncScheduler.delegate.schedule(work, delay, state);
22081 }
22082 else {
22083 return _super.prototype.schedule.call(this, work, delay, state);
22084 }
22085 };
22086 AsyncScheduler.prototype.flush = function (action) {
22087 var actions = this.actions;
22088 if (this.active) {
22089 actions.push(action);
22090 return;
22091 }
22092 var error;
22093 this.active = true;
22094 do {
22095 if (error = action.execute(action.state, action.delay)) {
22096 break;
22097 }
22098 } while (action = actions.shift());
22099 this.active = false;
22100 if (error) {
22101 while (action = actions.shift()) {
22102 action.unsubscribe();
22103 }
22104 throw error;
22105 }
22106 };
22107 return AsyncScheduler;
22108}(_Scheduler__WEBPACK_IMPORTED_MODULE_1__["Scheduler"]));
22109
22110//# sourceMappingURL=AsyncScheduler.js.map
22111
22112
22113/***/ }),
22114/* 179 */
22115/***/ (function(module, __webpack_exports__, __webpack_require__) {
22116
22117"use strict";
22118__webpack_require__.r(__webpack_exports__);
22119/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Scheduler", function() { return Scheduler; });
22120var Scheduler = /*@__PURE__*/ (function () {
22121 function Scheduler(SchedulerAction, now) {
22122 if (now === void 0) {
22123 now = Scheduler.now;
22124 }
22125 this.SchedulerAction = SchedulerAction;
22126 this.now = now;
22127 }
22128 Scheduler.prototype.schedule = function (work, delay, state) {
22129 if (delay === void 0) {
22130 delay = 0;
22131 }
22132 return new this.SchedulerAction(this, work).schedule(state, delay);
22133 };
22134 Scheduler.now = function () { return Date.now(); };
22135 return Scheduler;
22136}());
22137
22138//# sourceMappingURL=Scheduler.js.map
22139
22140
22141/***/ }),
22142/* 180 */
22143/***/ (function(module, __webpack_exports__, __webpack_require__) {
22144
22145"use strict";
22146__webpack_require__.r(__webpack_exports__);
22147/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return observeOn; });
22148/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnOperator", function() { return ObserveOnOperator; });
22149/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnSubscriber", function() { return ObserveOnSubscriber; });
22150/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObserveOnMessage", function() { return ObserveOnMessage; });
22151/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
22152/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
22153/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(181);
22154/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
22155
22156
22157
22158function observeOn(scheduler, delay) {
22159 if (delay === void 0) {
22160 delay = 0;
22161 }
22162 return function observeOnOperatorFunction(source) {
22163 return source.lift(new ObserveOnOperator(scheduler, delay));
22164 };
22165}
22166var ObserveOnOperator = /*@__PURE__*/ (function () {
22167 function ObserveOnOperator(scheduler, delay) {
22168 if (delay === void 0) {
22169 delay = 0;
22170 }
22171 this.scheduler = scheduler;
22172 this.delay = delay;
22173 }
22174 ObserveOnOperator.prototype.call = function (subscriber, source) {
22175 return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
22176 };
22177 return ObserveOnOperator;
22178}());
22179
22180var ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {
22181 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ObserveOnSubscriber, _super);
22182 function ObserveOnSubscriber(destination, scheduler, delay) {
22183 if (delay === void 0) {
22184 delay = 0;
22185 }
22186 var _this = _super.call(this, destination) || this;
22187 _this.scheduler = scheduler;
22188 _this.delay = delay;
22189 return _this;
22190 }
22191 ObserveOnSubscriber.dispatch = function (arg) {
22192 var notification = arg.notification, destination = arg.destination;
22193 notification.observe(destination);
22194 this.unsubscribe();
22195 };
22196 ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
22197 var destination = this.destination;
22198 destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
22199 };
22200 ObserveOnSubscriber.prototype._next = function (value) {
22201 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
22202 };
22203 ObserveOnSubscriber.prototype._error = function (err) {
22204 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
22205 this.unsubscribe();
22206 };
22207 ObserveOnSubscriber.prototype._complete = function () {
22208 this.scheduleMessage(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
22209 this.unsubscribe();
22210 };
22211 return ObserveOnSubscriber;
22212}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
22213
22214var ObserveOnMessage = /*@__PURE__*/ (function () {
22215 function ObserveOnMessage(notification, destination) {
22216 this.notification = notification;
22217 this.destination = destination;
22218 }
22219 return ObserveOnMessage;
22220}());
22221
22222//# sourceMappingURL=observeOn.js.map
22223
22224
22225/***/ }),
22226/* 181 */
22227/***/ (function(module, __webpack_exports__, __webpack_require__) {
22228
22229"use strict";
22230__webpack_require__.r(__webpack_exports__);
22231/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationKind", function() { return NotificationKind; });
22232/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Notification", function() { return Notification; });
22233/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(182);
22234/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
22235/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(188);
22236/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */
22237
22238
22239
22240var NotificationKind;
22241/*@__PURE__*/ (function (NotificationKind) {
22242 NotificationKind["NEXT"] = "N";
22243 NotificationKind["ERROR"] = "E";
22244 NotificationKind["COMPLETE"] = "C";
22245})(NotificationKind || (NotificationKind = {}));
22246var Notification = /*@__PURE__*/ (function () {
22247 function Notification(kind, value, error) {
22248 this.kind = kind;
22249 this.value = value;
22250 this.error = error;
22251 this.hasValue = kind === 'N';
22252 }
22253 Notification.prototype.observe = function (observer) {
22254 switch (this.kind) {
22255 case 'N':
22256 return observer.next && observer.next(this.value);
22257 case 'E':
22258 return observer.error && observer.error(this.error);
22259 case 'C':
22260 return observer.complete && observer.complete();
22261 }
22262 };
22263 Notification.prototype.do = function (next, error, complete) {
22264 var kind = this.kind;
22265 switch (kind) {
22266 case 'N':
22267 return next && next(this.value);
22268 case 'E':
22269 return error && error(this.error);
22270 case 'C':
22271 return complete && complete();
22272 }
22273 };
22274 Notification.prototype.accept = function (nextOrObserver, error, complete) {
22275 if (nextOrObserver && typeof nextOrObserver.next === 'function') {
22276 return this.observe(nextOrObserver);
22277 }
22278 else {
22279 return this.do(nextOrObserver, error, complete);
22280 }
22281 };
22282 Notification.prototype.toObservable = function () {
22283 var kind = this.kind;
22284 switch (kind) {
22285 case 'N':
22286 return Object(_observable_of__WEBPACK_IMPORTED_MODULE_1__["of"])(this.value);
22287 case 'E':
22288 return Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_2__["throwError"])(this.error);
22289 case 'C':
22290 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_0__["empty"])();
22291 }
22292 throw new Error('unexpected notification kind value');
22293 };
22294 Notification.createNext = function (value) {
22295 if (typeof value !== 'undefined') {
22296 return new Notification('N', value);
22297 }
22298 return Notification.undefinedValueNotification;
22299 };
22300 Notification.createError = function (err) {
22301 return new Notification('E', undefined, err);
22302 };
22303 Notification.createComplete = function () {
22304 return Notification.completeNotification;
22305 };
22306 Notification.completeNotification = new Notification('C');
22307 Notification.undefinedValueNotification = new Notification('N', undefined);
22308 return Notification;
22309}());
22310
22311//# sourceMappingURL=Notification.js.map
22312
22313
22314/***/ }),
22315/* 182 */
22316/***/ (function(module, __webpack_exports__, __webpack_require__) {
22317
22318"use strict";
22319__webpack_require__.r(__webpack_exports__);
22320/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EMPTY", function() { return EMPTY; });
22321/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
22322/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
22323/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
22324
22325var EMPTY = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.complete(); });
22326function empty(scheduler) {
22327 return scheduler ? emptyScheduled(scheduler) : EMPTY;
22328}
22329function emptyScheduled(scheduler) {
22330 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });
22331}
22332//# sourceMappingURL=empty.js.map
22333
22334
22335/***/ }),
22336/* 183 */
22337/***/ (function(module, __webpack_exports__, __webpack_require__) {
22338
22339"use strict";
22340__webpack_require__.r(__webpack_exports__);
22341/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "of", function() { return of; });
22342/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(184);
22343/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
22344/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(187);
22345/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */
22346
22347
22348
22349function of() {
22350 var args = [];
22351 for (var _i = 0; _i < arguments.length; _i++) {
22352 args[_i] = arguments[_i];
22353 }
22354 var scheduler = args[args.length - 1];
22355 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_0__["isScheduler"])(scheduler)) {
22356 args.pop();
22357 return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(args, scheduler);
22358 }
22359 else {
22360 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(args);
22361 }
22362}
22363//# sourceMappingURL=of.js.map
22364
22365
22366/***/ }),
22367/* 184 */
22368/***/ (function(module, __webpack_exports__, __webpack_require__) {
22369
22370"use strict";
22371__webpack_require__.r(__webpack_exports__);
22372/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isScheduler", function() { return isScheduler; });
22373/** PURE_IMPORTS_START PURE_IMPORTS_END */
22374function isScheduler(value) {
22375 return value && typeof value.schedule === 'function';
22376}
22377//# sourceMappingURL=isScheduler.js.map
22378
22379
22380/***/ }),
22381/* 185 */
22382/***/ (function(module, __webpack_exports__, __webpack_require__) {
22383
22384"use strict";
22385__webpack_require__.r(__webpack_exports__);
22386/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromArray", function() { return fromArray; });
22387/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
22388/* harmony import */ var _util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(186);
22389/* harmony import */ var _scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(187);
22390/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */
22391
22392
22393
22394function fromArray(input, scheduler) {
22395 if (!scheduler) {
22396 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeToArray__WEBPACK_IMPORTED_MODULE_1__["subscribeToArray"])(input));
22397 }
22398 else {
22399 return Object(_scheduled_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
22400 }
22401}
22402//# sourceMappingURL=fromArray.js.map
22403
22404
22405/***/ }),
22406/* 186 */
22407/***/ (function(module, __webpack_exports__, __webpack_require__) {
22408
22409"use strict";
22410__webpack_require__.r(__webpack_exports__);
22411/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToArray", function() { return subscribeToArray; });
22412/** PURE_IMPORTS_START PURE_IMPORTS_END */
22413var subscribeToArray = function (array) {
22414 return function (subscriber) {
22415 for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {
22416 subscriber.next(array[i]);
22417 }
22418 subscriber.complete();
22419 };
22420};
22421//# sourceMappingURL=subscribeToArray.js.map
22422
22423
22424/***/ }),
22425/* 187 */
22426/***/ (function(module, __webpack_exports__, __webpack_require__) {
22427
22428"use strict";
22429__webpack_require__.r(__webpack_exports__);
22430/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleArray", function() { return scheduleArray; });
22431/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
22432/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(156);
22433/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
22434
22435
22436function scheduleArray(input, scheduler) {
22437 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
22438 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
22439 var i = 0;
22440 sub.add(scheduler.schedule(function () {
22441 if (i === input.length) {
22442 subscriber.complete();
22443 return;
22444 }
22445 subscriber.next(input[i++]);
22446 if (!subscriber.closed) {
22447 sub.add(this.schedule());
22448 }
22449 }));
22450 return sub;
22451 });
22452}
22453//# sourceMappingURL=scheduleArray.js.map
22454
22455
22456/***/ }),
22457/* 188 */
22458/***/ (function(module, __webpack_exports__, __webpack_require__) {
22459
22460"use strict";
22461__webpack_require__.r(__webpack_exports__);
22462/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwError", function() { return throwError; });
22463/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
22464/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
22465
22466function throwError(error, scheduler) {
22467 if (!scheduler) {
22468 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return subscriber.error(error); });
22469 }
22470 else {
22471 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
22472 }
22473}
22474function dispatch(_a) {
22475 var error = _a.error, subscriber = _a.subscriber;
22476 subscriber.error(error);
22477}
22478//# sourceMappingURL=throwError.js.map
22479
22480
22481/***/ }),
22482/* 189 */
22483/***/ (function(module, __webpack_exports__, __webpack_require__) {
22484
22485"use strict";
22486__webpack_require__.r(__webpack_exports__);
22487/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsyncSubject", function() { return AsyncSubject; });
22488/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
22489/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
22490/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(156);
22491/** PURE_IMPORTS_START tslib,_Subject,_Subscription PURE_IMPORTS_END */
22492
22493
22494
22495var AsyncSubject = /*@__PURE__*/ (function (_super) {
22496 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsyncSubject, _super);
22497 function AsyncSubject() {
22498 var _this = _super !== null && _super.apply(this, arguments) || this;
22499 _this.value = null;
22500 _this.hasNext = false;
22501 _this.hasCompleted = false;
22502 return _this;
22503 }
22504 AsyncSubject.prototype._subscribe = function (subscriber) {
22505 if (this.hasError) {
22506 subscriber.error(this.thrownError);
22507 return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
22508 }
22509 else if (this.hasCompleted && this.hasNext) {
22510 subscriber.next(this.value);
22511 subscriber.complete();
22512 return _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"].EMPTY;
22513 }
22514 return _super.prototype._subscribe.call(this, subscriber);
22515 };
22516 AsyncSubject.prototype.next = function (value) {
22517 if (!this.hasCompleted) {
22518 this.value = value;
22519 this.hasNext = true;
22520 }
22521 };
22522 AsyncSubject.prototype.error = function (error) {
22523 if (!this.hasCompleted) {
22524 _super.prototype.error.call(this, error);
22525 }
22526 };
22527 AsyncSubject.prototype.complete = function () {
22528 this.hasCompleted = true;
22529 if (this.hasNext) {
22530 _super.prototype.next.call(this, this.value);
22531 }
22532 _super.prototype.complete.call(this);
22533 };
22534 return AsyncSubject;
22535}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
22536
22537//# sourceMappingURL=AsyncSubject.js.map
22538
22539
22540/***/ }),
22541/* 190 */
22542/***/ (function(module, __webpack_exports__, __webpack_require__) {
22543
22544"use strict";
22545__webpack_require__.r(__webpack_exports__);
22546/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asap", function() { return asap; });
22547/* harmony import */ var _AsapAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(191);
22548/* harmony import */ var _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(193);
22549/** PURE_IMPORTS_START _AsapAction,_AsapScheduler PURE_IMPORTS_END */
22550
22551
22552var asap = /*@__PURE__*/ new _AsapScheduler__WEBPACK_IMPORTED_MODULE_1__["AsapScheduler"](_AsapAction__WEBPACK_IMPORTED_MODULE_0__["AsapAction"]);
22553//# sourceMappingURL=asap.js.map
22554
22555
22556/***/ }),
22557/* 191 */
22558/***/ (function(module, __webpack_exports__, __webpack_require__) {
22559
22560"use strict";
22561__webpack_require__.r(__webpack_exports__);
22562/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapAction", function() { return AsapAction; });
22563/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
22564/* harmony import */ var _util_Immediate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(192);
22565/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(175);
22566/** PURE_IMPORTS_START tslib,_util_Immediate,_AsyncAction PURE_IMPORTS_END */
22567
22568
22569
22570var AsapAction = /*@__PURE__*/ (function (_super) {
22571 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapAction, _super);
22572 function AsapAction(scheduler, work) {
22573 var _this = _super.call(this, scheduler, work) || this;
22574 _this.scheduler = scheduler;
22575 _this.work = work;
22576 return _this;
22577 }
22578 AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
22579 if (delay === void 0) {
22580 delay = 0;
22581 }
22582 if (delay !== null && delay > 0) {
22583 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
22584 }
22585 scheduler.actions.push(this);
22586 return scheduler.scheduled || (scheduler.scheduled = _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].setImmediate(scheduler.flush.bind(scheduler, null)));
22587 };
22588 AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
22589 if (delay === void 0) {
22590 delay = 0;
22591 }
22592 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
22593 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
22594 }
22595 if (scheduler.actions.length === 0) {
22596 _util_Immediate__WEBPACK_IMPORTED_MODULE_1__["Immediate"].clearImmediate(id);
22597 scheduler.scheduled = undefined;
22598 }
22599 return undefined;
22600 };
22601 return AsapAction;
22602}(_AsyncAction__WEBPACK_IMPORTED_MODULE_2__["AsyncAction"]));
22603
22604//# sourceMappingURL=AsapAction.js.map
22605
22606
22607/***/ }),
22608/* 192 */
22609/***/ (function(module, __webpack_exports__, __webpack_require__) {
22610
22611"use strict";
22612__webpack_require__.r(__webpack_exports__);
22613/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immediate", function() { return Immediate; });
22614/** PURE_IMPORTS_START PURE_IMPORTS_END */
22615var nextHandle = 1;
22616var tasksByHandle = {};
22617function runIfPresent(handle) {
22618 var cb = tasksByHandle[handle];
22619 if (cb) {
22620 cb();
22621 }
22622}
22623var Immediate = {
22624 setImmediate: function (cb) {
22625 var handle = nextHandle++;
22626 tasksByHandle[handle] = cb;
22627 Promise.resolve().then(function () { return runIfPresent(handle); });
22628 return handle;
22629 },
22630 clearImmediate: function (handle) {
22631 delete tasksByHandle[handle];
22632 },
22633};
22634//# sourceMappingURL=Immediate.js.map
22635
22636
22637/***/ }),
22638/* 193 */
22639/***/ (function(module, __webpack_exports__, __webpack_require__) {
22640
22641"use strict";
22642__webpack_require__.r(__webpack_exports__);
22643/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AsapScheduler", function() { return AsapScheduler; });
22644/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
22645/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
22646/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
22647
22648
22649var AsapScheduler = /*@__PURE__*/ (function (_super) {
22650 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AsapScheduler, _super);
22651 function AsapScheduler() {
22652 return _super !== null && _super.apply(this, arguments) || this;
22653 }
22654 AsapScheduler.prototype.flush = function (action) {
22655 this.active = true;
22656 this.scheduled = undefined;
22657 var actions = this.actions;
22658 var error;
22659 var index = -1;
22660 var count = actions.length;
22661 action = action || actions.shift();
22662 do {
22663 if (error = action.execute(action.state, action.delay)) {
22664 break;
22665 }
22666 } while (++index < count && (action = actions.shift()));
22667 this.active = false;
22668 if (error) {
22669 while (++index < count && (action = actions.shift())) {
22670 action.unsubscribe();
22671 }
22672 throw error;
22673 }
22674 };
22675 return AsapScheduler;
22676}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
22677
22678//# sourceMappingURL=AsapScheduler.js.map
22679
22680
22681/***/ }),
22682/* 194 */
22683/***/ (function(module, __webpack_exports__, __webpack_require__) {
22684
22685"use strict";
22686__webpack_require__.r(__webpack_exports__);
22687/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "async", function() { return async; });
22688/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(175);
22689/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
22690/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
22691
22692
22693var async = /*@__PURE__*/ new _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"](_AsyncAction__WEBPACK_IMPORTED_MODULE_0__["AsyncAction"]);
22694//# sourceMappingURL=async.js.map
22695
22696
22697/***/ }),
22698/* 195 */
22699/***/ (function(module, __webpack_exports__, __webpack_require__) {
22700
22701"use strict";
22702__webpack_require__.r(__webpack_exports__);
22703/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationFrame", function() { return animationFrame; });
22704/* harmony import */ var _AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(196);
22705/* harmony import */ var _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(197);
22706/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */
22707
22708
22709var animationFrame = /*@__PURE__*/ new _AnimationFrameScheduler__WEBPACK_IMPORTED_MODULE_1__["AnimationFrameScheduler"](_AnimationFrameAction__WEBPACK_IMPORTED_MODULE_0__["AnimationFrameAction"]);
22710//# sourceMappingURL=animationFrame.js.map
22711
22712
22713/***/ }),
22714/* 196 */
22715/***/ (function(module, __webpack_exports__, __webpack_require__) {
22716
22717"use strict";
22718__webpack_require__.r(__webpack_exports__);
22719/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameAction", function() { return AnimationFrameAction; });
22720/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
22721/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
22722/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
22723
22724
22725var AnimationFrameAction = /*@__PURE__*/ (function (_super) {
22726 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameAction, _super);
22727 function AnimationFrameAction(scheduler, work) {
22728 var _this = _super.call(this, scheduler, work) || this;
22729 _this.scheduler = scheduler;
22730 _this.work = work;
22731 return _this;
22732 }
22733 AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
22734 if (delay === void 0) {
22735 delay = 0;
22736 }
22737 if (delay !== null && delay > 0) {
22738 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
22739 }
22740 scheduler.actions.push(this);
22741 return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
22742 };
22743 AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
22744 if (delay === void 0) {
22745 delay = 0;
22746 }
22747 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
22748 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
22749 }
22750 if (scheduler.actions.length === 0) {
22751 cancelAnimationFrame(id);
22752 scheduler.scheduled = undefined;
22753 }
22754 return undefined;
22755 };
22756 return AnimationFrameAction;
22757}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
22758
22759//# sourceMappingURL=AnimationFrameAction.js.map
22760
22761
22762/***/ }),
22763/* 197 */
22764/***/ (function(module, __webpack_exports__, __webpack_require__) {
22765
22766"use strict";
22767__webpack_require__.r(__webpack_exports__);
22768/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AnimationFrameScheduler", function() { return AnimationFrameScheduler; });
22769/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
22770/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(178);
22771/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */
22772
22773
22774var AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {
22775 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AnimationFrameScheduler, _super);
22776 function AnimationFrameScheduler() {
22777 return _super !== null && _super.apply(this, arguments) || this;
22778 }
22779 AnimationFrameScheduler.prototype.flush = function (action) {
22780 this.active = true;
22781 this.scheduled = undefined;
22782 var actions = this.actions;
22783 var error;
22784 var index = -1;
22785 var count = actions.length;
22786 action = action || actions.shift();
22787 do {
22788 if (error = action.execute(action.state, action.delay)) {
22789 break;
22790 }
22791 } while (++index < count && (action = actions.shift()));
22792 this.active = false;
22793 if (error) {
22794 while (++index < count && (action = actions.shift())) {
22795 action.unsubscribe();
22796 }
22797 throw error;
22798 }
22799 };
22800 return AnimationFrameScheduler;
22801}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_1__["AsyncScheduler"]));
22802
22803//# sourceMappingURL=AnimationFrameScheduler.js.map
22804
22805
22806/***/ }),
22807/* 198 */
22808/***/ (function(module, __webpack_exports__, __webpack_require__) {
22809
22810"use strict";
22811__webpack_require__.r(__webpack_exports__);
22812/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualTimeScheduler", function() { return VirtualTimeScheduler; });
22813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VirtualAction", function() { return VirtualAction; });
22814/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
22815/* harmony import */ var _AsyncAction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(175);
22816/* harmony import */ var _AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(178);
22817/** PURE_IMPORTS_START tslib,_AsyncAction,_AsyncScheduler PURE_IMPORTS_END */
22818
22819
22820
22821var VirtualTimeScheduler = /*@__PURE__*/ (function (_super) {
22822 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualTimeScheduler, _super);
22823 function VirtualTimeScheduler(SchedulerAction, maxFrames) {
22824 if (SchedulerAction === void 0) {
22825 SchedulerAction = VirtualAction;
22826 }
22827 if (maxFrames === void 0) {
22828 maxFrames = Number.POSITIVE_INFINITY;
22829 }
22830 var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
22831 _this.maxFrames = maxFrames;
22832 _this.frame = 0;
22833 _this.index = -1;
22834 return _this;
22835 }
22836 VirtualTimeScheduler.prototype.flush = function () {
22837 var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
22838 var error, action;
22839 while ((action = actions[0]) && action.delay <= maxFrames) {
22840 actions.shift();
22841 this.frame = action.delay;
22842 if (error = action.execute(action.state, action.delay)) {
22843 break;
22844 }
22845 }
22846 if (error) {
22847 while (action = actions.shift()) {
22848 action.unsubscribe();
22849 }
22850 throw error;
22851 }
22852 };
22853 VirtualTimeScheduler.frameTimeFactor = 10;
22854 return VirtualTimeScheduler;
22855}(_AsyncScheduler__WEBPACK_IMPORTED_MODULE_2__["AsyncScheduler"]));
22856
22857var VirtualAction = /*@__PURE__*/ (function (_super) {
22858 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](VirtualAction, _super);
22859 function VirtualAction(scheduler, work, index) {
22860 if (index === void 0) {
22861 index = scheduler.index += 1;
22862 }
22863 var _this = _super.call(this, scheduler, work) || this;
22864 _this.scheduler = scheduler;
22865 _this.work = work;
22866 _this.index = index;
22867 _this.active = true;
22868 _this.index = scheduler.index = index;
22869 return _this;
22870 }
22871 VirtualAction.prototype.schedule = function (state, delay) {
22872 if (delay === void 0) {
22873 delay = 0;
22874 }
22875 if (!this.id) {
22876 return _super.prototype.schedule.call(this, state, delay);
22877 }
22878 this.active = false;
22879 var action = new VirtualAction(this.scheduler, this.work);
22880 this.add(action);
22881 return action.schedule(state, delay);
22882 };
22883 VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
22884 if (delay === void 0) {
22885 delay = 0;
22886 }
22887 this.delay = scheduler.frame + delay;
22888 var actions = scheduler.actions;
22889 actions.push(this);
22890 actions.sort(VirtualAction.sortActions);
22891 return true;
22892 };
22893 VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
22894 if (delay === void 0) {
22895 delay = 0;
22896 }
22897 return undefined;
22898 };
22899 VirtualAction.prototype._execute = function (state, delay) {
22900 if (this.active === true) {
22901 return _super.prototype._execute.call(this, state, delay);
22902 }
22903 };
22904 VirtualAction.sortActions = function (a, b) {
22905 if (a.delay === b.delay) {
22906 if (a.index === b.index) {
22907 return 0;
22908 }
22909 else if (a.index > b.index) {
22910 return 1;
22911 }
22912 else {
22913 return -1;
22914 }
22915 }
22916 else if (a.delay > b.delay) {
22917 return 1;
22918 }
22919 else {
22920 return -1;
22921 }
22922 };
22923 return VirtualAction;
22924}(_AsyncAction__WEBPACK_IMPORTED_MODULE_1__["AsyncAction"]));
22925
22926//# sourceMappingURL=VirtualTimeScheduler.js.map
22927
22928
22929/***/ }),
22930/* 199 */
22931/***/ (function(module, __webpack_exports__, __webpack_require__) {
22932
22933"use strict";
22934__webpack_require__.r(__webpack_exports__);
22935/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
22936/** PURE_IMPORTS_START PURE_IMPORTS_END */
22937function identity(x) {
22938 return x;
22939}
22940//# sourceMappingURL=identity.js.map
22941
22942
22943/***/ }),
22944/* 200 */
22945/***/ (function(module, __webpack_exports__, __webpack_require__) {
22946
22947"use strict";
22948__webpack_require__.r(__webpack_exports__);
22949/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObservable", function() { return isObservable; });
22950/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
22951/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
22952
22953function isObservable(obj) {
22954 return !!obj && (obj instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"] || (typeof obj.lift === 'function' && typeof obj.subscribe === 'function'));
22955}
22956//# sourceMappingURL=isObservable.js.map
22957
22958
22959/***/ }),
22960/* 201 */
22961/***/ (function(module, __webpack_exports__, __webpack_require__) {
22962
22963"use strict";
22964__webpack_require__.r(__webpack_exports__);
22965/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArgumentOutOfRangeError", function() { return ArgumentOutOfRangeError; });
22966/** PURE_IMPORTS_START PURE_IMPORTS_END */
22967function ArgumentOutOfRangeErrorImpl() {
22968 Error.call(this);
22969 this.message = 'argument out of range';
22970 this.name = 'ArgumentOutOfRangeError';
22971 return this;
22972}
22973ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
22974var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;
22975//# sourceMappingURL=ArgumentOutOfRangeError.js.map
22976
22977
22978/***/ }),
22979/* 202 */
22980/***/ (function(module, __webpack_exports__, __webpack_require__) {
22981
22982"use strict";
22983__webpack_require__.r(__webpack_exports__);
22984/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EmptyError", function() { return EmptyError; });
22985/** PURE_IMPORTS_START PURE_IMPORTS_END */
22986function EmptyErrorImpl() {
22987 Error.call(this);
22988 this.message = 'no elements in sequence';
22989 this.name = 'EmptyError';
22990 return this;
22991}
22992EmptyErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
22993var EmptyError = EmptyErrorImpl;
22994//# sourceMappingURL=EmptyError.js.map
22995
22996
22997/***/ }),
22998/* 203 */
22999/***/ (function(module, __webpack_exports__, __webpack_require__) {
23000
23001"use strict";
23002__webpack_require__.r(__webpack_exports__);
23003/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeoutError", function() { return TimeoutError; });
23004/** PURE_IMPORTS_START PURE_IMPORTS_END */
23005function TimeoutErrorImpl() {
23006 Error.call(this);
23007 this.message = 'Timeout has occurred';
23008 this.name = 'TimeoutError';
23009 return this;
23010}
23011TimeoutErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
23012var TimeoutError = TimeoutErrorImpl;
23013//# sourceMappingURL=TimeoutError.js.map
23014
23015
23016/***/ }),
23017/* 204 */
23018/***/ (function(module, __webpack_exports__, __webpack_require__) {
23019
23020"use strict";
23021__webpack_require__.r(__webpack_exports__);
23022/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindCallback", function() { return bindCallback; });
23023/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
23024/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(189);
23025/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
23026/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(149);
23027/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(157);
23028/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(184);
23029/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isArray,_util_isScheduler PURE_IMPORTS_END */
23030
23031
23032
23033
23034
23035
23036function bindCallback(callbackFunc, resultSelector, scheduler) {
23037 if (resultSelector) {
23038 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(resultSelector)) {
23039 scheduler = resultSelector;
23040 }
23041 else {
23042 return function () {
23043 var args = [];
23044 for (var _i = 0; _i < arguments.length; _i++) {
23045 args[_i] = arguments[_i];
23046 }
23047 return bindCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_4__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
23048 };
23049 }
23050 }
23051 return function () {
23052 var args = [];
23053 for (var _i = 0; _i < arguments.length; _i++) {
23054 args[_i] = arguments[_i];
23055 }
23056 var context = this;
23057 var subject;
23058 var params = {
23059 context: context,
23060 subject: subject,
23061 callbackFunc: callbackFunc,
23062 scheduler: scheduler,
23063 };
23064 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
23065 if (!scheduler) {
23066 if (!subject) {
23067 subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
23068 var handler = function () {
23069 var innerArgs = [];
23070 for (var _i = 0; _i < arguments.length; _i++) {
23071 innerArgs[_i] = arguments[_i];
23072 }
23073 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
23074 subject.complete();
23075 };
23076 try {
23077 callbackFunc.apply(context, args.concat([handler]));
23078 }
23079 catch (err) {
23080 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
23081 subject.error(err);
23082 }
23083 else {
23084 console.warn(err);
23085 }
23086 }
23087 }
23088 return subject.subscribe(subscriber);
23089 }
23090 else {
23091 var state = {
23092 args: args, subscriber: subscriber, params: params,
23093 };
23094 return scheduler.schedule(dispatch, 0, state);
23095 }
23096 });
23097 };
23098}
23099function dispatch(state) {
23100 var _this = this;
23101 var self = this;
23102 var args = state.args, subscriber = state.subscriber, params = state.params;
23103 var callbackFunc = params.callbackFunc, context = params.context, scheduler = params.scheduler;
23104 var subject = params.subject;
23105 if (!subject) {
23106 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
23107 var handler = function () {
23108 var innerArgs = [];
23109 for (var _i = 0; _i < arguments.length; _i++) {
23110 innerArgs[_i] = arguments[_i];
23111 }
23112 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
23113 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
23114 };
23115 try {
23116 callbackFunc.apply(context, args.concat([handler]));
23117 }
23118 catch (err) {
23119 subject.error(err);
23120 }
23121 }
23122 this.add(subject.subscribe(subscriber));
23123}
23124function dispatchNext(state) {
23125 var value = state.value, subject = state.subject;
23126 subject.next(value);
23127 subject.complete();
23128}
23129function dispatchError(state) {
23130 var err = state.err, subject = state.subject;
23131 subject.error(err);
23132}
23133//# sourceMappingURL=bindCallback.js.map
23134
23135
23136/***/ }),
23137/* 205 */
23138/***/ (function(module, __webpack_exports__, __webpack_require__) {
23139
23140"use strict";
23141__webpack_require__.r(__webpack_exports__);
23142/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
23143/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MapOperator", function() { return MapOperator; });
23144/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
23145/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
23146/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
23147
23148
23149function map(project, thisArg) {
23150 return function mapOperation(source) {
23151 if (typeof project !== 'function') {
23152 throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
23153 }
23154 return source.lift(new MapOperator(project, thisArg));
23155 };
23156}
23157var MapOperator = /*@__PURE__*/ (function () {
23158 function MapOperator(project, thisArg) {
23159 this.project = project;
23160 this.thisArg = thisArg;
23161 }
23162 MapOperator.prototype.call = function (subscriber, source) {
23163 return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
23164 };
23165 return MapOperator;
23166}());
23167
23168var MapSubscriber = /*@__PURE__*/ (function (_super) {
23169 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapSubscriber, _super);
23170 function MapSubscriber(destination, project, thisArg) {
23171 var _this = _super.call(this, destination) || this;
23172 _this.project = project;
23173 _this.count = 0;
23174 _this.thisArg = thisArg || _this;
23175 return _this;
23176 }
23177 MapSubscriber.prototype._next = function (value) {
23178 var result;
23179 try {
23180 result = this.project.call(this.thisArg, value, this.count++);
23181 }
23182 catch (err) {
23183 this.destination.error(err);
23184 return;
23185 }
23186 this.destination.next(result);
23187 };
23188 return MapSubscriber;
23189}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
23190//# sourceMappingURL=map.js.map
23191
23192
23193/***/ }),
23194/* 206 */
23195/***/ (function(module, __webpack_exports__, __webpack_require__) {
23196
23197"use strict";
23198__webpack_require__.r(__webpack_exports__);
23199/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindNodeCallback", function() { return bindNodeCallback; });
23200/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
23201/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(189);
23202/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
23203/* harmony import */ var _util_canReportError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(149);
23204/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(184);
23205/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(157);
23206/** PURE_IMPORTS_START _Observable,_AsyncSubject,_operators_map,_util_canReportError,_util_isScheduler,_util_isArray PURE_IMPORTS_END */
23207
23208
23209
23210
23211
23212
23213function bindNodeCallback(callbackFunc, resultSelector, scheduler) {
23214 if (resultSelector) {
23215 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_4__["isScheduler"])(resultSelector)) {
23216 scheduler = resultSelector;
23217 }
23218 else {
23219 return function () {
23220 var args = [];
23221 for (var _i = 0; _i < arguments.length; _i++) {
23222 args[_i] = arguments[_i];
23223 }
23224 return bindNodeCallback(callbackFunc, scheduler).apply(void 0, args).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_5__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
23225 };
23226 }
23227 }
23228 return function () {
23229 var args = [];
23230 for (var _i = 0; _i < arguments.length; _i++) {
23231 args[_i] = arguments[_i];
23232 }
23233 var params = {
23234 subject: undefined,
23235 args: args,
23236 callbackFunc: callbackFunc,
23237 scheduler: scheduler,
23238 context: this,
23239 };
23240 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
23241 var context = params.context;
23242 var subject = params.subject;
23243 if (!scheduler) {
23244 if (!subject) {
23245 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
23246 var handler = function () {
23247 var innerArgs = [];
23248 for (var _i = 0; _i < arguments.length; _i++) {
23249 innerArgs[_i] = arguments[_i];
23250 }
23251 var err = innerArgs.shift();
23252 if (err) {
23253 subject.error(err);
23254 return;
23255 }
23256 subject.next(innerArgs.length <= 1 ? innerArgs[0] : innerArgs);
23257 subject.complete();
23258 };
23259 try {
23260 callbackFunc.apply(context, args.concat([handler]));
23261 }
23262 catch (err) {
23263 if (Object(_util_canReportError__WEBPACK_IMPORTED_MODULE_3__["canReportError"])(subject)) {
23264 subject.error(err);
23265 }
23266 else {
23267 console.warn(err);
23268 }
23269 }
23270 }
23271 return subject.subscribe(subscriber);
23272 }
23273 else {
23274 return scheduler.schedule(dispatch, 0, { params: params, subscriber: subscriber, context: context });
23275 }
23276 });
23277 };
23278}
23279function dispatch(state) {
23280 var _this = this;
23281 var params = state.params, subscriber = state.subscriber, context = state.context;
23282 var callbackFunc = params.callbackFunc, args = params.args, scheduler = params.scheduler;
23283 var subject = params.subject;
23284 if (!subject) {
23285 subject = params.subject = new _AsyncSubject__WEBPACK_IMPORTED_MODULE_1__["AsyncSubject"]();
23286 var handler = function () {
23287 var innerArgs = [];
23288 for (var _i = 0; _i < arguments.length; _i++) {
23289 innerArgs[_i] = arguments[_i];
23290 }
23291 var err = innerArgs.shift();
23292 if (err) {
23293 _this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
23294 }
23295 else {
23296 var value = innerArgs.length <= 1 ? innerArgs[0] : innerArgs;
23297 _this.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
23298 }
23299 };
23300 try {
23301 callbackFunc.apply(context, args.concat([handler]));
23302 }
23303 catch (err) {
23304 this.add(scheduler.schedule(dispatchError, 0, { err: err, subject: subject }));
23305 }
23306 }
23307 this.add(subject.subscribe(subscriber));
23308}
23309function dispatchNext(arg) {
23310 var value = arg.value, subject = arg.subject;
23311 subject.next(value);
23312 subject.complete();
23313}
23314function dispatchError(arg) {
23315 var err = arg.err, subject = arg.subject;
23316 subject.error(err);
23317}
23318//# sourceMappingURL=bindNodeCallback.js.map
23319
23320
23321/***/ }),
23322/* 207 */
23323/***/ (function(module, __webpack_exports__, __webpack_require__) {
23324
23325"use strict";
23326__webpack_require__.r(__webpack_exports__);
23327/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
23328/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestOperator", function() { return CombineLatestOperator; });
23329/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CombineLatestSubscriber", function() { return CombineLatestSubscriber; });
23330/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
23331/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
23332/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(157);
23333/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
23334/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(209);
23335/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(185);
23336/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */
23337
23338
23339
23340
23341
23342
23343var NONE = {};
23344function combineLatest() {
23345 var observables = [];
23346 for (var _i = 0; _i < arguments.length; _i++) {
23347 observables[_i] = arguments[_i];
23348 }
23349 var resultSelector = null;
23350 var scheduler = null;
23351 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(observables[observables.length - 1])) {
23352 scheduler = observables.pop();
23353 }
23354 if (typeof observables[observables.length - 1] === 'function') {
23355 resultSelector = observables.pop();
23356 }
23357 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(observables[0])) {
23358 observables = observables[0];
23359 }
23360 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__["fromArray"])(observables, scheduler).lift(new CombineLatestOperator(resultSelector));
23361}
23362var CombineLatestOperator = /*@__PURE__*/ (function () {
23363 function CombineLatestOperator(resultSelector) {
23364 this.resultSelector = resultSelector;
23365 }
23366 CombineLatestOperator.prototype.call = function (subscriber, source) {
23367 return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));
23368 };
23369 return CombineLatestOperator;
23370}());
23371
23372var CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {
23373 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CombineLatestSubscriber, _super);
23374 function CombineLatestSubscriber(destination, resultSelector) {
23375 var _this = _super.call(this, destination) || this;
23376 _this.resultSelector = resultSelector;
23377 _this.active = 0;
23378 _this.values = [];
23379 _this.observables = [];
23380 return _this;
23381 }
23382 CombineLatestSubscriber.prototype._next = function (observable) {
23383 this.values.push(NONE);
23384 this.observables.push(observable);
23385 };
23386 CombineLatestSubscriber.prototype._complete = function () {
23387 var observables = this.observables;
23388 var len = observables.length;
23389 if (len === 0) {
23390 this.destination.complete();
23391 }
23392 else {
23393 this.active = len;
23394 this.toRespond = len;
23395 for (var i = 0; i < len; i++) {
23396 var observable = observables[i];
23397 this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i));
23398 }
23399 }
23400 };
23401 CombineLatestSubscriber.prototype.notifyComplete = function (unused) {
23402 if ((this.active -= 1) === 0) {
23403 this.destination.complete();
23404 }
23405 };
23406 CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
23407 var values = this.values;
23408 var oldVal = values[outerIndex];
23409 var toRespond = !this.toRespond
23410 ? 0
23411 : oldVal === NONE ? --this.toRespond : this.toRespond;
23412 values[outerIndex] = innerValue;
23413 if (toRespond === 0) {
23414 if (this.resultSelector) {
23415 this._tryResultSelector(values);
23416 }
23417 else {
23418 this.destination.next(values.slice());
23419 }
23420 }
23421 };
23422 CombineLatestSubscriber.prototype._tryResultSelector = function (values) {
23423 var result;
23424 try {
23425 result = this.resultSelector.apply(this, values);
23426 }
23427 catch (err) {
23428 this.destination.error(err);
23429 return;
23430 }
23431 this.destination.next(result);
23432 };
23433 return CombineLatestSubscriber;
23434}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
23435
23436//# sourceMappingURL=combineLatest.js.map
23437
23438
23439/***/ }),
23440/* 208 */
23441/***/ (function(module, __webpack_exports__, __webpack_require__) {
23442
23443"use strict";
23444__webpack_require__.r(__webpack_exports__);
23445/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OuterSubscriber", function() { return OuterSubscriber; });
23446/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
23447/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
23448/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
23449
23450
23451var OuterSubscriber = /*@__PURE__*/ (function (_super) {
23452 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OuterSubscriber, _super);
23453 function OuterSubscriber() {
23454 return _super !== null && _super.apply(this, arguments) || this;
23455 }
23456 OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
23457 this.destination.next(innerValue);
23458 };
23459 OuterSubscriber.prototype.notifyError = function (error, innerSub) {
23460 this.destination.error(error);
23461 };
23462 OuterSubscriber.prototype.notifyComplete = function (innerSub) {
23463 this.destination.complete();
23464 };
23465 return OuterSubscriber;
23466}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
23467
23468//# sourceMappingURL=OuterSubscriber.js.map
23469
23470
23471/***/ }),
23472/* 209 */
23473/***/ (function(module, __webpack_exports__, __webpack_require__) {
23474
23475"use strict";
23476__webpack_require__.r(__webpack_exports__);
23477/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToResult", function() { return subscribeToResult; });
23478/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(210);
23479/* harmony import */ var _subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(211);
23480/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(148);
23481/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */
23482
23483
23484
23485function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) {
23486 if (destination === void 0) {
23487 destination = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_0__["InnerSubscriber"](outerSubscriber, outerValue, outerIndex);
23488 }
23489 if (destination.closed) {
23490 return undefined;
23491 }
23492 if (result instanceof _Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]) {
23493 return result.subscribe(destination);
23494 }
23495 return Object(_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(result)(destination);
23496}
23497//# sourceMappingURL=subscribeToResult.js.map
23498
23499
23500/***/ }),
23501/* 210 */
23502/***/ (function(module, __webpack_exports__, __webpack_require__) {
23503
23504"use strict";
23505__webpack_require__.r(__webpack_exports__);
23506/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InnerSubscriber", function() { return InnerSubscriber; });
23507/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
23508/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
23509/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
23510
23511
23512var InnerSubscriber = /*@__PURE__*/ (function (_super) {
23513 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](InnerSubscriber, _super);
23514 function InnerSubscriber(parent, outerValue, outerIndex) {
23515 var _this = _super.call(this) || this;
23516 _this.parent = parent;
23517 _this.outerValue = outerValue;
23518 _this.outerIndex = outerIndex;
23519 _this.index = 0;
23520 return _this;
23521 }
23522 InnerSubscriber.prototype._next = function (value) {
23523 this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
23524 };
23525 InnerSubscriber.prototype._error = function (error) {
23526 this.parent.notifyError(error, this);
23527 this.unsubscribe();
23528 };
23529 InnerSubscriber.prototype._complete = function () {
23530 this.parent.notifyComplete(this);
23531 this.unsubscribe();
23532 };
23533 return InnerSubscriber;
23534}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
23535
23536//# sourceMappingURL=InnerSubscriber.js.map
23537
23538
23539/***/ }),
23540/* 211 */
23541/***/ (function(module, __webpack_exports__, __webpack_require__) {
23542
23543"use strict";
23544__webpack_require__.r(__webpack_exports__);
23545/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeTo", function() { return subscribeTo; });
23546/* harmony import */ var _subscribeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(186);
23547/* harmony import */ var _subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(212);
23548/* harmony import */ var _subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(213);
23549/* harmony import */ var _subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(215);
23550/* harmony import */ var _isArrayLike__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(216);
23551/* harmony import */ var _isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(217);
23552/* harmony import */ var _isObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(158);
23553/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(214);
23554/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(162);
23555/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565var subscribeTo = function (result) {
23566 if (!!result && typeof result[_symbol_observable__WEBPACK_IMPORTED_MODULE_8__["observable"]] === 'function') {
23567 return Object(_subscribeToObservable__WEBPACK_IMPORTED_MODULE_3__["subscribeToObservable"])(result);
23568 }
23569 else if (Object(_isArrayLike__WEBPACK_IMPORTED_MODULE_4__["isArrayLike"])(result)) {
23570 return Object(_subscribeToArray__WEBPACK_IMPORTED_MODULE_0__["subscribeToArray"])(result);
23571 }
23572 else if (Object(_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(result)) {
23573 return Object(_subscribeToPromise__WEBPACK_IMPORTED_MODULE_1__["subscribeToPromise"])(result);
23574 }
23575 else if (!!result && typeof result[_symbol_iterator__WEBPACK_IMPORTED_MODULE_7__["iterator"]] === 'function') {
23576 return Object(_subscribeToIterable__WEBPACK_IMPORTED_MODULE_2__["subscribeToIterable"])(result);
23577 }
23578 else {
23579 var value = Object(_isObject__WEBPACK_IMPORTED_MODULE_6__["isObject"])(result) ? 'an invalid object' : "'" + result + "'";
23580 var msg = "You provided " + value + " where a stream was expected."
23581 + ' You can provide an Observable, Promise, Array, or Iterable.';
23582 throw new TypeError(msg);
23583 }
23584};
23585//# sourceMappingURL=subscribeTo.js.map
23586
23587
23588/***/ }),
23589/* 212 */
23590/***/ (function(module, __webpack_exports__, __webpack_require__) {
23591
23592"use strict";
23593__webpack_require__.r(__webpack_exports__);
23594/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToPromise", function() { return subscribeToPromise; });
23595/* harmony import */ var _hostReportError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(155);
23596/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
23597
23598var subscribeToPromise = function (promise) {
23599 return function (subscriber) {
23600 promise.then(function (value) {
23601 if (!subscriber.closed) {
23602 subscriber.next(value);
23603 subscriber.complete();
23604 }
23605 }, function (err) { return subscriber.error(err); })
23606 .then(null, _hostReportError__WEBPACK_IMPORTED_MODULE_0__["hostReportError"]);
23607 return subscriber;
23608 };
23609};
23610//# sourceMappingURL=subscribeToPromise.js.map
23611
23612
23613/***/ }),
23614/* 213 */
23615/***/ (function(module, __webpack_exports__, __webpack_require__) {
23616
23617"use strict";
23618__webpack_require__.r(__webpack_exports__);
23619/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToIterable", function() { return subscribeToIterable; });
23620/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(214);
23621/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
23622
23623var subscribeToIterable = function (iterable) {
23624 return function (subscriber) {
23625 var iterator = iterable[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]]();
23626 do {
23627 var item = iterator.next();
23628 if (item.done) {
23629 subscriber.complete();
23630 break;
23631 }
23632 subscriber.next(item.value);
23633 if (subscriber.closed) {
23634 break;
23635 }
23636 } while (true);
23637 if (typeof iterator.return === 'function') {
23638 subscriber.add(function () {
23639 if (iterator.return) {
23640 iterator.return();
23641 }
23642 });
23643 }
23644 return subscriber;
23645 };
23646};
23647//# sourceMappingURL=subscribeToIterable.js.map
23648
23649
23650/***/ }),
23651/* 214 */
23652/***/ (function(module, __webpack_exports__, __webpack_require__) {
23653
23654"use strict";
23655__webpack_require__.r(__webpack_exports__);
23656/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSymbolIterator", function() { return getSymbolIterator; });
23657/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iterator", function() { return iterator; });
23658/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$$iterator", function() { return $$iterator; });
23659/** PURE_IMPORTS_START PURE_IMPORTS_END */
23660function getSymbolIterator() {
23661 if (typeof Symbol !== 'function' || !Symbol.iterator) {
23662 return '@@iterator';
23663 }
23664 return Symbol.iterator;
23665}
23666var iterator = /*@__PURE__*/ getSymbolIterator();
23667var $$iterator = iterator;
23668//# sourceMappingURL=iterator.js.map
23669
23670
23671/***/ }),
23672/* 215 */
23673/***/ (function(module, __webpack_exports__, __webpack_require__) {
23674
23675"use strict";
23676__webpack_require__.r(__webpack_exports__);
23677/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeToObservable", function() { return subscribeToObservable; });
23678/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(162);
23679/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
23680
23681var subscribeToObservable = function (obj) {
23682 return function (subscriber) {
23683 var obs = obj[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]]();
23684 if (typeof obs.subscribe !== 'function') {
23685 throw new TypeError('Provided object does not correctly implement Symbol.observable');
23686 }
23687 else {
23688 return obs.subscribe(subscriber);
23689 }
23690 };
23691};
23692//# sourceMappingURL=subscribeToObservable.js.map
23693
23694
23695/***/ }),
23696/* 216 */
23697/***/ (function(module, __webpack_exports__, __webpack_require__) {
23698
23699"use strict";
23700__webpack_require__.r(__webpack_exports__);
23701/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isArrayLike", function() { return isArrayLike; });
23702/** PURE_IMPORTS_START PURE_IMPORTS_END */
23703var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });
23704//# sourceMappingURL=isArrayLike.js.map
23705
23706
23707/***/ }),
23708/* 217 */
23709/***/ (function(module, __webpack_exports__, __webpack_require__) {
23710
23711"use strict";
23712__webpack_require__.r(__webpack_exports__);
23713/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPromise", function() { return isPromise; });
23714/** PURE_IMPORTS_START PURE_IMPORTS_END */
23715function isPromise(value) {
23716 return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
23717}
23718//# sourceMappingURL=isPromise.js.map
23719
23720
23721/***/ }),
23722/* 218 */
23723/***/ (function(module, __webpack_exports__, __webpack_require__) {
23724
23725"use strict";
23726__webpack_require__.r(__webpack_exports__);
23727/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
23728/* harmony import */ var _of__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(183);
23729/* harmony import */ var _operators_concatAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(219);
23730/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */
23731
23732
23733function concat() {
23734 var observables = [];
23735 for (var _i = 0; _i < arguments.length; _i++) {
23736 observables[_i] = arguments[_i];
23737 }
23738 return Object(_operators_concatAll__WEBPACK_IMPORTED_MODULE_1__["concatAll"])()(_of__WEBPACK_IMPORTED_MODULE_0__["of"].apply(void 0, observables));
23739}
23740//# sourceMappingURL=concat.js.map
23741
23742
23743/***/ }),
23744/* 219 */
23745/***/ (function(module, __webpack_exports__, __webpack_require__) {
23746
23747"use strict";
23748__webpack_require__.r(__webpack_exports__);
23749/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return concatAll; });
23750/* harmony import */ var _mergeAll__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(220);
23751/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */
23752
23753function concatAll() {
23754 return Object(_mergeAll__WEBPACK_IMPORTED_MODULE_0__["mergeAll"])(1);
23755}
23756//# sourceMappingURL=concatAll.js.map
23757
23758
23759/***/ }),
23760/* 220 */
23761/***/ (function(module, __webpack_exports__, __webpack_require__) {
23762
23763"use strict";
23764__webpack_require__.r(__webpack_exports__);
23765/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return mergeAll; });
23766/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
23767/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
23768/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */
23769
23770
23771function mergeAll(concurrent) {
23772 if (concurrent === void 0) {
23773 concurrent = Number.POSITIVE_INFINITY;
23774 }
23775 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"], concurrent);
23776}
23777//# sourceMappingURL=mergeAll.js.map
23778
23779
23780/***/ }),
23781/* 221 */
23782/***/ (function(module, __webpack_exports__, __webpack_require__) {
23783
23784"use strict";
23785__webpack_require__.r(__webpack_exports__);
23786/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return mergeMap; });
23787/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapOperator", function() { return MergeMapOperator; });
23788/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeMapSubscriber", function() { return MergeMapSubscriber; });
23789/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
23790/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
23791/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
23792/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
23793/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(205);
23794/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(222);
23795/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */
23796
23797
23798
23799
23800
23801
23802function mergeMap(project, resultSelector, concurrent) {
23803 if (concurrent === void 0) {
23804 concurrent = Number.POSITIVE_INFINITY;
23805 }
23806 if (typeof resultSelector === 'function') {
23807 return function (source) { return source.pipe(mergeMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };
23808 }
23809 else if (typeof resultSelector === 'number') {
23810 concurrent = resultSelector;
23811 }
23812 return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };
23813}
23814var MergeMapOperator = /*@__PURE__*/ (function () {
23815 function MergeMapOperator(project, concurrent) {
23816 if (concurrent === void 0) {
23817 concurrent = Number.POSITIVE_INFINITY;
23818 }
23819 this.project = project;
23820 this.concurrent = concurrent;
23821 }
23822 MergeMapOperator.prototype.call = function (observer, source) {
23823 return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));
23824 };
23825 return MergeMapOperator;
23826}());
23827
23828var MergeMapSubscriber = /*@__PURE__*/ (function (_super) {
23829 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeMapSubscriber, _super);
23830 function MergeMapSubscriber(destination, project, concurrent) {
23831 if (concurrent === void 0) {
23832 concurrent = Number.POSITIVE_INFINITY;
23833 }
23834 var _this = _super.call(this, destination) || this;
23835 _this.project = project;
23836 _this.concurrent = concurrent;
23837 _this.hasCompleted = false;
23838 _this.buffer = [];
23839 _this.active = 0;
23840 _this.index = 0;
23841 return _this;
23842 }
23843 MergeMapSubscriber.prototype._next = function (value) {
23844 if (this.active < this.concurrent) {
23845 this._tryNext(value);
23846 }
23847 else {
23848 this.buffer.push(value);
23849 }
23850 };
23851 MergeMapSubscriber.prototype._tryNext = function (value) {
23852 var result;
23853 var index = this.index++;
23854 try {
23855 result = this.project(value, index);
23856 }
23857 catch (err) {
23858 this.destination.error(err);
23859 return;
23860 }
23861 this.active++;
23862 this._innerSub(result, value, index);
23863 };
23864 MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
23865 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, undefined, undefined);
23866 var destination = this.destination;
23867 destination.add(innerSubscriber);
23868 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
23869 };
23870 MergeMapSubscriber.prototype._complete = function () {
23871 this.hasCompleted = true;
23872 if (this.active === 0 && this.buffer.length === 0) {
23873 this.destination.complete();
23874 }
23875 this.unsubscribe();
23876 };
23877 MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
23878 this.destination.next(innerValue);
23879 };
23880 MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
23881 var buffer = this.buffer;
23882 this.remove(innerSub);
23883 this.active--;
23884 if (buffer.length > 0) {
23885 this._next(buffer.shift());
23886 }
23887 else if (this.active === 0 && this.hasCompleted) {
23888 this.destination.complete();
23889 }
23890 };
23891 return MergeMapSubscriber;
23892}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
23893
23894//# sourceMappingURL=mergeMap.js.map
23895
23896
23897/***/ }),
23898/* 222 */
23899/***/ (function(module, __webpack_exports__, __webpack_require__) {
23900
23901"use strict";
23902__webpack_require__.r(__webpack_exports__);
23903/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "from", function() { return from; });
23904/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
23905/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(211);
23906/* harmony import */ var _scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(223);
23907/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */
23908
23909
23910
23911function from(input, scheduler) {
23912 if (!scheduler) {
23913 if (input instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
23914 return input;
23915 }
23916 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(input));
23917 }
23918 else {
23919 return Object(_scheduled_scheduled__WEBPACK_IMPORTED_MODULE_2__["scheduled"])(input, scheduler);
23920 }
23921}
23922//# sourceMappingURL=from.js.map
23923
23924
23925/***/ }),
23926/* 223 */
23927/***/ (function(module, __webpack_exports__, __webpack_require__) {
23928
23929"use strict";
23930__webpack_require__.r(__webpack_exports__);
23931/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduled", function() { return scheduled; });
23932/* harmony import */ var _scheduleObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(224);
23933/* harmony import */ var _schedulePromise__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(225);
23934/* harmony import */ var _scheduleArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(187);
23935/* harmony import */ var _scheduleIterable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(226);
23936/* harmony import */ var _util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(227);
23937/* harmony import */ var _util_isPromise__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(217);
23938/* harmony import */ var _util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(216);
23939/* harmony import */ var _util_isIterable__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(228);
23940/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */
23941
23942
23943
23944
23945
23946
23947
23948
23949function scheduled(input, scheduler) {
23950 if (input != null) {
23951 if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_4__["isInteropObservable"])(input)) {
23952 return Object(_scheduleObservable__WEBPACK_IMPORTED_MODULE_0__["scheduleObservable"])(input, scheduler);
23953 }
23954 else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_5__["isPromise"])(input)) {
23955 return Object(_schedulePromise__WEBPACK_IMPORTED_MODULE_1__["schedulePromise"])(input, scheduler);
23956 }
23957 else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_6__["isArrayLike"])(input)) {
23958 return Object(_scheduleArray__WEBPACK_IMPORTED_MODULE_2__["scheduleArray"])(input, scheduler);
23959 }
23960 else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_7__["isIterable"])(input) || typeof input === 'string') {
23961 return Object(_scheduleIterable__WEBPACK_IMPORTED_MODULE_3__["scheduleIterable"])(input, scheduler);
23962 }
23963 }
23964 throw new TypeError((input !== null && typeof input || input) + ' is not observable');
23965}
23966//# sourceMappingURL=scheduled.js.map
23967
23968
23969/***/ }),
23970/* 224 */
23971/***/ (function(module, __webpack_exports__, __webpack_require__) {
23972
23973"use strict";
23974__webpack_require__.r(__webpack_exports__);
23975/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleObservable", function() { return scheduleObservable; });
23976/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
23977/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(156);
23978/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(162);
23979/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
23980
23981
23982
23983function scheduleObservable(input, scheduler) {
23984 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
23985 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
23986 sub.add(scheduler.schedule(function () {
23987 var observable = input[_symbol_observable__WEBPACK_IMPORTED_MODULE_2__["observable"]]();
23988 sub.add(observable.subscribe({
23989 next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
23990 error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
23991 complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
23992 }));
23993 }));
23994 return sub;
23995 });
23996}
23997//# sourceMappingURL=scheduleObservable.js.map
23998
23999
24000/***/ }),
24001/* 225 */
24002/***/ (function(module, __webpack_exports__, __webpack_require__) {
24003
24004"use strict";
24005__webpack_require__.r(__webpack_exports__);
24006/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "schedulePromise", function() { return schedulePromise; });
24007/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24008/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(156);
24009/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
24010
24011
24012function schedulePromise(input, scheduler) {
24013 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24014 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
24015 sub.add(scheduler.schedule(function () {
24016 return input.then(function (value) {
24017 sub.add(scheduler.schedule(function () {
24018 subscriber.next(value);
24019 sub.add(scheduler.schedule(function () { return subscriber.complete(); }));
24020 }));
24021 }, function (err) {
24022 sub.add(scheduler.schedule(function () { return subscriber.error(err); }));
24023 });
24024 }));
24025 return sub;
24026 });
24027}
24028//# sourceMappingURL=schedulePromise.js.map
24029
24030
24031/***/ }),
24032/* 226 */
24033/***/ (function(module, __webpack_exports__, __webpack_require__) {
24034
24035"use strict";
24036__webpack_require__.r(__webpack_exports__);
24037/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheduleIterable", function() { return scheduleIterable; });
24038/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24039/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(156);
24040/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(214);
24041/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */
24042
24043
24044
24045function scheduleIterable(input, scheduler) {
24046 if (!input) {
24047 throw new Error('Iterable cannot be null');
24048 }
24049 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24050 var sub = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
24051 var iterator;
24052 sub.add(function () {
24053 if (iterator && typeof iterator.return === 'function') {
24054 iterator.return();
24055 }
24056 });
24057 sub.add(scheduler.schedule(function () {
24058 iterator = input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_2__["iterator"]]();
24059 sub.add(scheduler.schedule(function () {
24060 if (subscriber.closed) {
24061 return;
24062 }
24063 var value;
24064 var done;
24065 try {
24066 var result = iterator.next();
24067 value = result.value;
24068 done = result.done;
24069 }
24070 catch (err) {
24071 subscriber.error(err);
24072 return;
24073 }
24074 if (done) {
24075 subscriber.complete();
24076 }
24077 else {
24078 subscriber.next(value);
24079 this.schedule();
24080 }
24081 }));
24082 }));
24083 return sub;
24084 });
24085}
24086//# sourceMappingURL=scheduleIterable.js.map
24087
24088
24089/***/ }),
24090/* 227 */
24091/***/ (function(module, __webpack_exports__, __webpack_require__) {
24092
24093"use strict";
24094__webpack_require__.r(__webpack_exports__);
24095/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInteropObservable", function() { return isInteropObservable; });
24096/* harmony import */ var _symbol_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(162);
24097/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */
24098
24099function isInteropObservable(input) {
24100 return input && typeof input[_symbol_observable__WEBPACK_IMPORTED_MODULE_0__["observable"]] === 'function';
24101}
24102//# sourceMappingURL=isInteropObservable.js.map
24103
24104
24105/***/ }),
24106/* 228 */
24107/***/ (function(module, __webpack_exports__, __webpack_require__) {
24108
24109"use strict";
24110__webpack_require__.r(__webpack_exports__);
24111/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isIterable", function() { return isIterable; });
24112/* harmony import */ var _symbol_iterator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(214);
24113/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */
24114
24115function isIterable(input) {
24116 return input && typeof input[_symbol_iterator__WEBPACK_IMPORTED_MODULE_0__["iterator"]] === 'function';
24117}
24118//# sourceMappingURL=isIterable.js.map
24119
24120
24121/***/ }),
24122/* 229 */
24123/***/ (function(module, __webpack_exports__, __webpack_require__) {
24124
24125"use strict";
24126__webpack_require__.r(__webpack_exports__);
24127/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defer", function() { return defer; });
24128/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24129/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(222);
24130/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
24131/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
24132
24133
24134
24135function defer(observableFactory) {
24136 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24137 var input;
24138 try {
24139 input = observableFactory();
24140 }
24141 catch (err) {
24142 subscriber.error(err);
24143 return undefined;
24144 }
24145 var source = input ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(input) : Object(_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
24146 return source.subscribe(subscriber);
24147 });
24148}
24149//# sourceMappingURL=defer.js.map
24150
24151
24152/***/ }),
24153/* 230 */
24154/***/ (function(module, __webpack_exports__, __webpack_require__) {
24155
24156"use strict";
24157__webpack_require__.r(__webpack_exports__);
24158/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forkJoin", function() { return forkJoin; });
24159/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24160/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
24161/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(205);
24162/* harmony import */ var _util_isObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(158);
24163/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(222);
24164/** PURE_IMPORTS_START _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */
24165
24166
24167
24168
24169
24170function forkJoin() {
24171 var sources = [];
24172 for (var _i = 0; _i < arguments.length; _i++) {
24173 sources[_i] = arguments[_i];
24174 }
24175 if (sources.length === 1) {
24176 var first_1 = sources[0];
24177 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(first_1)) {
24178 return forkJoinInternal(first_1, null);
24179 }
24180 if (Object(_util_isObject__WEBPACK_IMPORTED_MODULE_3__["isObject"])(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
24181 var keys = Object.keys(first_1);
24182 return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
24183 }
24184 }
24185 if (typeof sources[sources.length - 1] === 'function') {
24186 var resultSelector_1 = sources.pop();
24187 sources = (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(sources[0])) ? sources[0] : sources;
24188 return forkJoinInternal(sources, null).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_2__["map"])(function (args) { return resultSelector_1.apply(void 0, args); }));
24189 }
24190 return forkJoinInternal(sources, null);
24191}
24192function forkJoinInternal(sources, keys) {
24193 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24194 var len = sources.length;
24195 if (len === 0) {
24196 subscriber.complete();
24197 return;
24198 }
24199 var values = new Array(len);
24200 var completed = 0;
24201 var emitted = 0;
24202 var _loop_1 = function (i) {
24203 var source = Object(_from__WEBPACK_IMPORTED_MODULE_4__["from"])(sources[i]);
24204 var hasValue = false;
24205 subscriber.add(source.subscribe({
24206 next: function (value) {
24207 if (!hasValue) {
24208 hasValue = true;
24209 emitted++;
24210 }
24211 values[i] = value;
24212 },
24213 error: function (err) { return subscriber.error(err); },
24214 complete: function () {
24215 completed++;
24216 if (completed === len || !hasValue) {
24217 if (emitted === len) {
24218 subscriber.next(keys ?
24219 keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :
24220 values);
24221 }
24222 subscriber.complete();
24223 }
24224 }
24225 }));
24226 };
24227 for (var i = 0; i < len; i++) {
24228 _loop_1(i);
24229 }
24230 });
24231}
24232//# sourceMappingURL=forkJoin.js.map
24233
24234
24235/***/ }),
24236/* 231 */
24237/***/ (function(module, __webpack_exports__, __webpack_require__) {
24238
24239"use strict";
24240__webpack_require__.r(__webpack_exports__);
24241/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEvent", function() { return fromEvent; });
24242/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24243/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
24244/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(152);
24245/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(205);
24246/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
24247
24248
24249
24250
24251var toString = Object.prototype.toString;
24252function fromEvent(target, eventName, options, resultSelector) {
24253 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(options)) {
24254 resultSelector = options;
24255 options = undefined;
24256 }
24257 if (resultSelector) {
24258 return fromEvent(target, eventName, options).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
24259 }
24260 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24261 function handler(e) {
24262 if (arguments.length > 1) {
24263 subscriber.next(Array.prototype.slice.call(arguments));
24264 }
24265 else {
24266 subscriber.next(e);
24267 }
24268 }
24269 setupSubscription(target, eventName, handler, subscriber, options);
24270 });
24271}
24272function setupSubscription(sourceObj, eventName, handler, subscriber, options) {
24273 var unsubscribe;
24274 if (isEventTarget(sourceObj)) {
24275 var source_1 = sourceObj;
24276 sourceObj.addEventListener(eventName, handler, options);
24277 unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };
24278 }
24279 else if (isJQueryStyleEventEmitter(sourceObj)) {
24280 var source_2 = sourceObj;
24281 sourceObj.on(eventName, handler);
24282 unsubscribe = function () { return source_2.off(eventName, handler); };
24283 }
24284 else if (isNodeStyleEventEmitter(sourceObj)) {
24285 var source_3 = sourceObj;
24286 sourceObj.addListener(eventName, handler);
24287 unsubscribe = function () { return source_3.removeListener(eventName, handler); };
24288 }
24289 else if (sourceObj && sourceObj.length) {
24290 for (var i = 0, len = sourceObj.length; i < len; i++) {
24291 setupSubscription(sourceObj[i], eventName, handler, subscriber, options);
24292 }
24293 }
24294 else {
24295 throw new TypeError('Invalid event target');
24296 }
24297 subscriber.add(unsubscribe);
24298}
24299function isNodeStyleEventEmitter(sourceObj) {
24300 return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';
24301}
24302function isJQueryStyleEventEmitter(sourceObj) {
24303 return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';
24304}
24305function isEventTarget(sourceObj) {
24306 return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';
24307}
24308//# sourceMappingURL=fromEvent.js.map
24309
24310
24311/***/ }),
24312/* 232 */
24313/***/ (function(module, __webpack_exports__, __webpack_require__) {
24314
24315"use strict";
24316__webpack_require__.r(__webpack_exports__);
24317/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fromEventPattern", function() { return fromEventPattern; });
24318/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24319/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
24320/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(152);
24321/* harmony import */ var _operators_map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(205);
24322/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */
24323
24324
24325
24326
24327function fromEventPattern(addHandler, removeHandler, resultSelector) {
24328 if (resultSelector) {
24329 return fromEventPattern(addHandler, removeHandler).pipe(Object(_operators_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (args) { return Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));
24330 }
24331 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24332 var handler = function () {
24333 var e = [];
24334 for (var _i = 0; _i < arguments.length; _i++) {
24335 e[_i] = arguments[_i];
24336 }
24337 return subscriber.next(e.length === 1 ? e[0] : e);
24338 };
24339 var retValue;
24340 try {
24341 retValue = addHandler(handler);
24342 }
24343 catch (err) {
24344 subscriber.error(err);
24345 return undefined;
24346 }
24347 if (!Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_2__["isFunction"])(removeHandler)) {
24348 return undefined;
24349 }
24350 return function () { return removeHandler(handler, retValue); };
24351 });
24352}
24353//# sourceMappingURL=fromEventPattern.js.map
24354
24355
24356/***/ }),
24357/* 233 */
24358/***/ (function(module, __webpack_exports__, __webpack_require__) {
24359
24360"use strict";
24361__webpack_require__.r(__webpack_exports__);
24362/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generate", function() { return generate; });
24363/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24364/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
24365/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(184);
24366/** PURE_IMPORTS_START _Observable,_util_identity,_util_isScheduler PURE_IMPORTS_END */
24367
24368
24369
24370function generate(initialStateOrOptions, condition, iterate, resultSelectorOrObservable, scheduler) {
24371 var resultSelector;
24372 var initialState;
24373 if (arguments.length == 1) {
24374 var options = initialStateOrOptions;
24375 initialState = options.initialState;
24376 condition = options.condition;
24377 iterate = options.iterate;
24378 resultSelector = options.resultSelector || _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
24379 scheduler = options.scheduler;
24380 }
24381 else if (resultSelectorOrObservable === undefined || Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_2__["isScheduler"])(resultSelectorOrObservable)) {
24382 initialState = initialStateOrOptions;
24383 resultSelector = _util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"];
24384 scheduler = resultSelectorOrObservable;
24385 }
24386 else {
24387 initialState = initialStateOrOptions;
24388 resultSelector = resultSelectorOrObservable;
24389 }
24390 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24391 var state = initialState;
24392 if (scheduler) {
24393 return scheduler.schedule(dispatch, 0, {
24394 subscriber: subscriber,
24395 iterate: iterate,
24396 condition: condition,
24397 resultSelector: resultSelector,
24398 state: state
24399 });
24400 }
24401 do {
24402 if (condition) {
24403 var conditionResult = void 0;
24404 try {
24405 conditionResult = condition(state);
24406 }
24407 catch (err) {
24408 subscriber.error(err);
24409 return undefined;
24410 }
24411 if (!conditionResult) {
24412 subscriber.complete();
24413 break;
24414 }
24415 }
24416 var value = void 0;
24417 try {
24418 value = resultSelector(state);
24419 }
24420 catch (err) {
24421 subscriber.error(err);
24422 return undefined;
24423 }
24424 subscriber.next(value);
24425 if (subscriber.closed) {
24426 break;
24427 }
24428 try {
24429 state = iterate(state);
24430 }
24431 catch (err) {
24432 subscriber.error(err);
24433 return undefined;
24434 }
24435 } while (true);
24436 return undefined;
24437 });
24438}
24439function dispatch(state) {
24440 var subscriber = state.subscriber, condition = state.condition;
24441 if (subscriber.closed) {
24442 return undefined;
24443 }
24444 if (state.needIterate) {
24445 try {
24446 state.state = state.iterate(state.state);
24447 }
24448 catch (err) {
24449 subscriber.error(err);
24450 return undefined;
24451 }
24452 }
24453 else {
24454 state.needIterate = true;
24455 }
24456 if (condition) {
24457 var conditionResult = void 0;
24458 try {
24459 conditionResult = condition(state.state);
24460 }
24461 catch (err) {
24462 subscriber.error(err);
24463 return undefined;
24464 }
24465 if (!conditionResult) {
24466 subscriber.complete();
24467 return undefined;
24468 }
24469 if (subscriber.closed) {
24470 return undefined;
24471 }
24472 }
24473 var value;
24474 try {
24475 value = state.resultSelector(state.state);
24476 }
24477 catch (err) {
24478 subscriber.error(err);
24479 return undefined;
24480 }
24481 if (subscriber.closed) {
24482 return undefined;
24483 }
24484 subscriber.next(value);
24485 if (subscriber.closed) {
24486 return undefined;
24487 }
24488 return this.schedule(state);
24489}
24490//# sourceMappingURL=generate.js.map
24491
24492
24493/***/ }),
24494/* 234 */
24495/***/ (function(module, __webpack_exports__, __webpack_require__) {
24496
24497"use strict";
24498__webpack_require__.r(__webpack_exports__);
24499/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "iif", function() { return iif; });
24500/* harmony import */ var _defer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(229);
24501/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(182);
24502/** PURE_IMPORTS_START _defer,_empty PURE_IMPORTS_END */
24503
24504
24505function iif(condition, trueResult, falseResult) {
24506 if (trueResult === void 0) {
24507 trueResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
24508 }
24509 if (falseResult === void 0) {
24510 falseResult = _empty__WEBPACK_IMPORTED_MODULE_1__["EMPTY"];
24511 }
24512 return Object(_defer__WEBPACK_IMPORTED_MODULE_0__["defer"])(function () { return condition() ? trueResult : falseResult; });
24513}
24514//# sourceMappingURL=iif.js.map
24515
24516
24517/***/ }),
24518/* 235 */
24519/***/ (function(module, __webpack_exports__, __webpack_require__) {
24520
24521"use strict";
24522__webpack_require__.r(__webpack_exports__);
24523/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return interval; });
24524/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24525/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
24526/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(236);
24527/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric PURE_IMPORTS_END */
24528
24529
24530
24531function interval(period, scheduler) {
24532 if (period === void 0) {
24533 period = 0;
24534 }
24535 if (scheduler === void 0) {
24536 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
24537 }
24538 if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(period) || period < 0) {
24539 period = 0;
24540 }
24541 if (!scheduler || typeof scheduler.schedule !== 'function') {
24542 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
24543 }
24544 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24545 subscriber.add(scheduler.schedule(dispatch, period, { subscriber: subscriber, counter: 0, period: period }));
24546 return subscriber;
24547 });
24548}
24549function dispatch(state) {
24550 var subscriber = state.subscriber, counter = state.counter, period = state.period;
24551 subscriber.next(counter);
24552 this.schedule({ subscriber: subscriber, counter: counter + 1, period: period }, period);
24553}
24554//# sourceMappingURL=interval.js.map
24555
24556
24557/***/ }),
24558/* 236 */
24559/***/ (function(module, __webpack_exports__, __webpack_require__) {
24560
24561"use strict";
24562__webpack_require__.r(__webpack_exports__);
24563/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumeric", function() { return isNumeric; });
24564/* harmony import */ var _isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(157);
24565/** PURE_IMPORTS_START _isArray PURE_IMPORTS_END */
24566
24567function isNumeric(val) {
24568 return !Object(_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(val) && (val - parseFloat(val) + 1) >= 0;
24569}
24570//# sourceMappingURL=isNumeric.js.map
24571
24572
24573/***/ }),
24574/* 237 */
24575/***/ (function(module, __webpack_exports__, __webpack_require__) {
24576
24577"use strict";
24578__webpack_require__.r(__webpack_exports__);
24579/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
24580/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24581/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
24582/* harmony import */ var _operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(220);
24583/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(185);
24584/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */
24585
24586
24587
24588
24589function merge() {
24590 var observables = [];
24591 for (var _i = 0; _i < arguments.length; _i++) {
24592 observables[_i] = arguments[_i];
24593 }
24594 var concurrent = Number.POSITIVE_INFINITY;
24595 var scheduler = null;
24596 var last = observables[observables.length - 1];
24597 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(last)) {
24598 scheduler = observables.pop();
24599 if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
24600 concurrent = observables.pop();
24601 }
24602 }
24603 else if (typeof last === 'number') {
24604 concurrent = observables.pop();
24605 }
24606 if (scheduler === null && observables.length === 1 && observables[0] instanceof _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
24607 return observables[0];
24608 }
24609 return Object(_operators_mergeAll__WEBPACK_IMPORTED_MODULE_2__["mergeAll"])(concurrent)(Object(_fromArray__WEBPACK_IMPORTED_MODULE_3__["fromArray"])(observables, scheduler));
24610}
24611//# sourceMappingURL=merge.js.map
24612
24613
24614/***/ }),
24615/* 238 */
24616/***/ (function(module, __webpack_exports__, __webpack_require__) {
24617
24618"use strict";
24619__webpack_require__.r(__webpack_exports__);
24620/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEVER", function() { return NEVER; });
24621/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "never", function() { return never; });
24622/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24623/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(164);
24624/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */
24625
24626
24627var NEVER = /*@__PURE__*/ new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](_util_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]);
24628function never() {
24629 return NEVER;
24630}
24631//# sourceMappingURL=never.js.map
24632
24633
24634/***/ }),
24635/* 239 */
24636/***/ (function(module, __webpack_exports__, __webpack_require__) {
24637
24638"use strict";
24639__webpack_require__.r(__webpack_exports__);
24640/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
24641/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24642/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(222);
24643/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(157);
24644/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
24645/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
24646
24647
24648
24649
24650function onErrorResumeNext() {
24651 var sources = [];
24652 for (var _i = 0; _i < arguments.length; _i++) {
24653 sources[_i] = arguments[_i];
24654 }
24655 if (sources.length === 0) {
24656 return _empty__WEBPACK_IMPORTED_MODULE_3__["EMPTY"];
24657 }
24658 var first = sources[0], remainder = sources.slice(1);
24659 if (sources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(first)) {
24660 return onErrorResumeNext.apply(void 0, first);
24661 }
24662 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24663 var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
24664 return Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(first).subscribe({
24665 next: function (value) { subscriber.next(value); },
24666 error: subNext,
24667 complete: subNext,
24668 });
24669 });
24670}
24671//# sourceMappingURL=onErrorResumeNext.js.map
24672
24673
24674/***/ }),
24675/* 240 */
24676/***/ (function(module, __webpack_exports__, __webpack_require__) {
24677
24678"use strict";
24679__webpack_require__.r(__webpack_exports__);
24680/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; });
24681/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
24682/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24683/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(156);
24684/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */
24685
24686
24687function pairs(obj, scheduler) {
24688 if (!scheduler) {
24689 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24690 var keys = Object.keys(obj);
24691 for (var i = 0; i < keys.length && !subscriber.closed; i++) {
24692 var key = keys[i];
24693 if (obj.hasOwnProperty(key)) {
24694 subscriber.next([key, obj[key]]);
24695 }
24696 }
24697 subscriber.complete();
24698 });
24699 }
24700 else {
24701 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24702 var keys = Object.keys(obj);
24703 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
24704 subscription.add(scheduler.schedule(dispatch, 0, { keys: keys, index: 0, subscriber: subscriber, subscription: subscription, obj: obj }));
24705 return subscription;
24706 });
24707 }
24708}
24709function dispatch(state) {
24710 var keys = state.keys, index = state.index, subscriber = state.subscriber, subscription = state.subscription, obj = state.obj;
24711 if (!subscriber.closed) {
24712 if (index < keys.length) {
24713 var key = keys[index];
24714 subscriber.next([key, obj[key]]);
24715 subscription.add(this.schedule({ keys: keys, index: index + 1, subscriber: subscriber, subscription: subscription, obj: obj }));
24716 }
24717 else {
24718 subscriber.complete();
24719 }
24720 }
24721}
24722//# sourceMappingURL=pairs.js.map
24723
24724
24725/***/ }),
24726/* 241 */
24727/***/ (function(module, __webpack_exports__, __webpack_require__) {
24728
24729"use strict";
24730__webpack_require__.r(__webpack_exports__);
24731/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
24732/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
24733/* harmony import */ var _util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(211);
24734/* harmony import */ var _operators_filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(243);
24735/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(148);
24736/** PURE_IMPORTS_START _util_not,_util_subscribeTo,_operators_filter,_Observable PURE_IMPORTS_END */
24737
24738
24739
24740
24741function partition(source, predicate, thisArg) {
24742 return [
24743 Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(predicate, thisArg)(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source))),
24744 Object(_operators_filter__WEBPACK_IMPORTED_MODULE_2__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(new _Observable__WEBPACK_IMPORTED_MODULE_3__["Observable"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_1__["subscribeTo"])(source)))
24745 ];
24746}
24747//# sourceMappingURL=partition.js.map
24748
24749
24750/***/ }),
24751/* 242 */
24752/***/ (function(module, __webpack_exports__, __webpack_require__) {
24753
24754"use strict";
24755__webpack_require__.r(__webpack_exports__);
24756/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "not", function() { return not; });
24757/** PURE_IMPORTS_START PURE_IMPORTS_END */
24758function not(pred, thisArg) {
24759 function notPred() {
24760 return !(notPred.pred.apply(notPred.thisArg, arguments));
24761 }
24762 notPred.pred = pred;
24763 notPred.thisArg = thisArg;
24764 return notPred;
24765}
24766//# sourceMappingURL=not.js.map
24767
24768
24769/***/ }),
24770/* 243 */
24771/***/ (function(module, __webpack_exports__, __webpack_require__) {
24772
24773"use strict";
24774__webpack_require__.r(__webpack_exports__);
24775/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; });
24776/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
24777/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
24778/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
24779
24780
24781function filter(predicate, thisArg) {
24782 return function filterOperatorFunction(source) {
24783 return source.lift(new FilterOperator(predicate, thisArg));
24784 };
24785}
24786var FilterOperator = /*@__PURE__*/ (function () {
24787 function FilterOperator(predicate, thisArg) {
24788 this.predicate = predicate;
24789 this.thisArg = thisArg;
24790 }
24791 FilterOperator.prototype.call = function (subscriber, source) {
24792 return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
24793 };
24794 return FilterOperator;
24795}());
24796var FilterSubscriber = /*@__PURE__*/ (function (_super) {
24797 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FilterSubscriber, _super);
24798 function FilterSubscriber(destination, predicate, thisArg) {
24799 var _this = _super.call(this, destination) || this;
24800 _this.predicate = predicate;
24801 _this.thisArg = thisArg;
24802 _this.count = 0;
24803 return _this;
24804 }
24805 FilterSubscriber.prototype._next = function (value) {
24806 var result;
24807 try {
24808 result = this.predicate.call(this.thisArg, value, this.count++);
24809 }
24810 catch (err) {
24811 this.destination.error(err);
24812 return;
24813 }
24814 if (result) {
24815 this.destination.next(value);
24816 }
24817 };
24818 return FilterSubscriber;
24819}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
24820//# sourceMappingURL=filter.js.map
24821
24822
24823/***/ }),
24824/* 244 */
24825/***/ (function(module, __webpack_exports__, __webpack_require__) {
24826
24827"use strict";
24828__webpack_require__.r(__webpack_exports__);
24829/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
24830/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceOperator", function() { return RaceOperator; });
24831/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RaceSubscriber", function() { return RaceSubscriber; });
24832/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
24833/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(157);
24834/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(185);
24835/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
24836/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(209);
24837/** PURE_IMPORTS_START tslib,_util_isArray,_fromArray,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
24838
24839
24840
24841
24842
24843function race() {
24844 var observables = [];
24845 for (var _i = 0; _i < arguments.length; _i++) {
24846 observables[_i] = arguments[_i];
24847 }
24848 if (observables.length === 1) {
24849 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_1__["isArray"])(observables[0])) {
24850 observables = observables[0];
24851 }
24852 else {
24853 return observables[0];
24854 }
24855 }
24856 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_2__["fromArray"])(observables, undefined).lift(new RaceOperator());
24857}
24858var RaceOperator = /*@__PURE__*/ (function () {
24859 function RaceOperator() {
24860 }
24861 RaceOperator.prototype.call = function (subscriber, source) {
24862 return source.subscribe(new RaceSubscriber(subscriber));
24863 };
24864 return RaceOperator;
24865}());
24866
24867var RaceSubscriber = /*@__PURE__*/ (function (_super) {
24868 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RaceSubscriber, _super);
24869 function RaceSubscriber(destination) {
24870 var _this = _super.call(this, destination) || this;
24871 _this.hasFirst = false;
24872 _this.observables = [];
24873 _this.subscriptions = [];
24874 return _this;
24875 }
24876 RaceSubscriber.prototype._next = function (observable) {
24877 this.observables.push(observable);
24878 };
24879 RaceSubscriber.prototype._complete = function () {
24880 var observables = this.observables;
24881 var len = observables.length;
24882 if (len === 0) {
24883 this.destination.complete();
24884 }
24885 else {
24886 for (var i = 0; i < len && !this.hasFirst; i++) {
24887 var observable = observables[i];
24888 var subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, observable, observable, i);
24889 if (this.subscriptions) {
24890 this.subscriptions.push(subscription);
24891 }
24892 this.add(subscription);
24893 }
24894 this.observables = null;
24895 }
24896 };
24897 RaceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
24898 if (!this.hasFirst) {
24899 this.hasFirst = true;
24900 for (var i = 0; i < this.subscriptions.length; i++) {
24901 if (i !== outerIndex) {
24902 var subscription = this.subscriptions[i];
24903 subscription.unsubscribe();
24904 this.remove(subscription);
24905 }
24906 }
24907 this.subscriptions = null;
24908 }
24909 this.destination.next(innerValue);
24910 };
24911 return RaceSubscriber;
24912}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
24913
24914//# sourceMappingURL=race.js.map
24915
24916
24917/***/ }),
24918/* 245 */
24919/***/ (function(module, __webpack_exports__, __webpack_require__) {
24920
24921"use strict";
24922__webpack_require__.r(__webpack_exports__);
24923/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "range", function() { return range; });
24924/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return dispatch; });
24925/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24926/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
24927
24928function range(start, count, scheduler) {
24929 if (start === void 0) {
24930 start = 0;
24931 }
24932 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
24933 if (count === undefined) {
24934 count = start;
24935 start = 0;
24936 }
24937 var index = 0;
24938 var current = start;
24939 if (scheduler) {
24940 return scheduler.schedule(dispatch, 0, {
24941 index: index, count: count, start: start, subscriber: subscriber
24942 });
24943 }
24944 else {
24945 do {
24946 if (index++ >= count) {
24947 subscriber.complete();
24948 break;
24949 }
24950 subscriber.next(current++);
24951 if (subscriber.closed) {
24952 break;
24953 }
24954 } while (true);
24955 }
24956 return undefined;
24957 });
24958}
24959function dispatch(state) {
24960 var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
24961 if (index >= count) {
24962 subscriber.complete();
24963 return;
24964 }
24965 subscriber.next(start);
24966 if (subscriber.closed) {
24967 return;
24968 }
24969 state.index = index + 1;
24970 state.start = start + 1;
24971 this.schedule(state);
24972}
24973//# sourceMappingURL=range.js.map
24974
24975
24976/***/ }),
24977/* 246 */
24978/***/ (function(module, __webpack_exports__, __webpack_require__) {
24979
24980"use strict";
24981__webpack_require__.r(__webpack_exports__);
24982/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; });
24983/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
24984/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
24985/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(236);
24986/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(184);
24987/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
24988
24989
24990
24991
24992function timer(dueTime, periodOrScheduler, scheduler) {
24993 if (dueTime === void 0) {
24994 dueTime = 0;
24995 }
24996 var period = -1;
24997 if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(periodOrScheduler)) {
24998 period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
24999 }
25000 else if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(periodOrScheduler)) {
25001 scheduler = periodOrScheduler;
25002 }
25003 if (!Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(scheduler)) {
25004 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
25005 }
25006 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
25007 var due = Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_2__["isNumeric"])(dueTime)
25008 ? dueTime
25009 : (+dueTime - scheduler.now());
25010 return scheduler.schedule(dispatch, due, {
25011 index: 0, period: period, subscriber: subscriber
25012 });
25013 });
25014}
25015function dispatch(state) {
25016 var index = state.index, period = state.period, subscriber = state.subscriber;
25017 subscriber.next(index);
25018 if (subscriber.closed) {
25019 return;
25020 }
25021 else if (period === -1) {
25022 return subscriber.complete();
25023 }
25024 state.index = index + 1;
25025 this.schedule(state, period);
25026}
25027//# sourceMappingURL=timer.js.map
25028
25029
25030/***/ }),
25031/* 247 */
25032/***/ (function(module, __webpack_exports__, __webpack_require__) {
25033
25034"use strict";
25035__webpack_require__.r(__webpack_exports__);
25036/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "using", function() { return using; });
25037/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(148);
25038/* harmony import */ var _from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(222);
25039/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
25040/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
25041
25042
25043
25044function using(resourceFactory, observableFactory) {
25045 return new _Observable__WEBPACK_IMPORTED_MODULE_0__["Observable"](function (subscriber) {
25046 var resource;
25047 try {
25048 resource = resourceFactory();
25049 }
25050 catch (err) {
25051 subscriber.error(err);
25052 return undefined;
25053 }
25054 var result;
25055 try {
25056 result = observableFactory(resource);
25057 }
25058 catch (err) {
25059 subscriber.error(err);
25060 return undefined;
25061 }
25062 var source = result ? Object(_from__WEBPACK_IMPORTED_MODULE_1__["from"])(result) : _empty__WEBPACK_IMPORTED_MODULE_2__["EMPTY"];
25063 var subscription = source.subscribe(subscriber);
25064 return function () {
25065 subscription.unsubscribe();
25066 if (resource) {
25067 resource.unsubscribe();
25068 }
25069 };
25070 });
25071}
25072//# sourceMappingURL=using.js.map
25073
25074
25075/***/ }),
25076/* 248 */
25077/***/ (function(module, __webpack_exports__, __webpack_require__) {
25078
25079"use strict";
25080__webpack_require__.r(__webpack_exports__);
25081/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
25082/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipOperator", function() { return ZipOperator; });
25083/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ZipSubscriber", function() { return ZipSubscriber; });
25084/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
25085/* harmony import */ var _fromArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(185);
25086/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(157);
25087/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(150);
25088/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(208);
25089/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(209);
25090/* harmony import */ var _internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(214);
25091/** PURE_IMPORTS_START tslib,_fromArray,_util_isArray,_Subscriber,_OuterSubscriber,_util_subscribeToResult,_.._internal_symbol_iterator PURE_IMPORTS_END */
25092
25093
25094
25095
25096
25097
25098
25099function zip() {
25100 var observables = [];
25101 for (var _i = 0; _i < arguments.length; _i++) {
25102 observables[_i] = arguments[_i];
25103 }
25104 var resultSelector = observables[observables.length - 1];
25105 if (typeof resultSelector === 'function') {
25106 observables.pop();
25107 }
25108 return Object(_fromArray__WEBPACK_IMPORTED_MODULE_1__["fromArray"])(observables, undefined).lift(new ZipOperator(resultSelector));
25109}
25110var ZipOperator = /*@__PURE__*/ (function () {
25111 function ZipOperator(resultSelector) {
25112 this.resultSelector = resultSelector;
25113 }
25114 ZipOperator.prototype.call = function (subscriber, source) {
25115 return source.subscribe(new ZipSubscriber(subscriber, this.resultSelector));
25116 };
25117 return ZipOperator;
25118}());
25119
25120var ZipSubscriber = /*@__PURE__*/ (function (_super) {
25121 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipSubscriber, _super);
25122 function ZipSubscriber(destination, resultSelector, values) {
25123 if (values === void 0) {
25124 values = Object.create(null);
25125 }
25126 var _this = _super.call(this, destination) || this;
25127 _this.iterators = [];
25128 _this.active = 0;
25129 _this.resultSelector = (typeof resultSelector === 'function') ? resultSelector : null;
25130 _this.values = values;
25131 return _this;
25132 }
25133 ZipSubscriber.prototype._next = function (value) {
25134 var iterators = this.iterators;
25135 if (Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(value)) {
25136 iterators.push(new StaticArrayIterator(value));
25137 }
25138 else if (typeof value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] === 'function') {
25139 iterators.push(new StaticIterator(value[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]]()));
25140 }
25141 else {
25142 iterators.push(new ZipBufferIterator(this.destination, this, value));
25143 }
25144 };
25145 ZipSubscriber.prototype._complete = function () {
25146 var iterators = this.iterators;
25147 var len = iterators.length;
25148 this.unsubscribe();
25149 if (len === 0) {
25150 this.destination.complete();
25151 return;
25152 }
25153 this.active = len;
25154 for (var i = 0; i < len; i++) {
25155 var iterator = iterators[i];
25156 if (iterator.stillUnsubscribed) {
25157 var destination = this.destination;
25158 destination.add(iterator.subscribe(iterator, i));
25159 }
25160 else {
25161 this.active--;
25162 }
25163 }
25164 };
25165 ZipSubscriber.prototype.notifyInactive = function () {
25166 this.active--;
25167 if (this.active === 0) {
25168 this.destination.complete();
25169 }
25170 };
25171 ZipSubscriber.prototype.checkIterators = function () {
25172 var iterators = this.iterators;
25173 var len = iterators.length;
25174 var destination = this.destination;
25175 for (var i = 0; i < len; i++) {
25176 var iterator = iterators[i];
25177 if (typeof iterator.hasValue === 'function' && !iterator.hasValue()) {
25178 return;
25179 }
25180 }
25181 var shouldComplete = false;
25182 var args = [];
25183 for (var i = 0; i < len; i++) {
25184 var iterator = iterators[i];
25185 var result = iterator.next();
25186 if (iterator.hasCompleted()) {
25187 shouldComplete = true;
25188 }
25189 if (result.done) {
25190 destination.complete();
25191 return;
25192 }
25193 args.push(result.value);
25194 }
25195 if (this.resultSelector) {
25196 this._tryresultSelector(args);
25197 }
25198 else {
25199 destination.next(args);
25200 }
25201 if (shouldComplete) {
25202 destination.complete();
25203 }
25204 };
25205 ZipSubscriber.prototype._tryresultSelector = function (args) {
25206 var result;
25207 try {
25208 result = this.resultSelector.apply(this, args);
25209 }
25210 catch (err) {
25211 this.destination.error(err);
25212 return;
25213 }
25214 this.destination.next(result);
25215 };
25216 return ZipSubscriber;
25217}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
25218
25219var StaticIterator = /*@__PURE__*/ (function () {
25220 function StaticIterator(iterator) {
25221 this.iterator = iterator;
25222 this.nextResult = iterator.next();
25223 }
25224 StaticIterator.prototype.hasValue = function () {
25225 return true;
25226 };
25227 StaticIterator.prototype.next = function () {
25228 var result = this.nextResult;
25229 this.nextResult = this.iterator.next();
25230 return result;
25231 };
25232 StaticIterator.prototype.hasCompleted = function () {
25233 var nextResult = this.nextResult;
25234 return nextResult && nextResult.done;
25235 };
25236 return StaticIterator;
25237}());
25238var StaticArrayIterator = /*@__PURE__*/ (function () {
25239 function StaticArrayIterator(array) {
25240 this.array = array;
25241 this.index = 0;
25242 this.length = 0;
25243 this.length = array.length;
25244 }
25245 StaticArrayIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
25246 return this;
25247 };
25248 StaticArrayIterator.prototype.next = function (value) {
25249 var i = this.index++;
25250 var array = this.array;
25251 return i < this.length ? { value: array[i], done: false } : { value: null, done: true };
25252 };
25253 StaticArrayIterator.prototype.hasValue = function () {
25254 return this.array.length > this.index;
25255 };
25256 StaticArrayIterator.prototype.hasCompleted = function () {
25257 return this.array.length === this.index;
25258 };
25259 return StaticArrayIterator;
25260}());
25261var ZipBufferIterator = /*@__PURE__*/ (function (_super) {
25262 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ZipBufferIterator, _super);
25263 function ZipBufferIterator(destination, parent, observable) {
25264 var _this = _super.call(this, destination) || this;
25265 _this.parent = parent;
25266 _this.observable = observable;
25267 _this.stillUnsubscribed = true;
25268 _this.buffer = [];
25269 _this.isComplete = false;
25270 return _this;
25271 }
25272 ZipBufferIterator.prototype[_internal_symbol_iterator__WEBPACK_IMPORTED_MODULE_6__["iterator"]] = function () {
25273 return this;
25274 };
25275 ZipBufferIterator.prototype.next = function () {
25276 var buffer = this.buffer;
25277 if (buffer.length === 0 && this.isComplete) {
25278 return { value: null, done: true };
25279 }
25280 else {
25281 return { value: buffer.shift(), done: false };
25282 }
25283 };
25284 ZipBufferIterator.prototype.hasValue = function () {
25285 return this.buffer.length > 0;
25286 };
25287 ZipBufferIterator.prototype.hasCompleted = function () {
25288 return this.buffer.length === 0 && this.isComplete;
25289 };
25290 ZipBufferIterator.prototype.notifyComplete = function () {
25291 if (this.buffer.length > 0) {
25292 this.isComplete = true;
25293 this.parent.notifyInactive();
25294 }
25295 else {
25296 this.destination.complete();
25297 }
25298 };
25299 ZipBufferIterator.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
25300 this.buffer.push(innerValue);
25301 this.parent.checkIterators();
25302 };
25303 ZipBufferIterator.prototype.subscribe = function (value, index) {
25304 return Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, this.observable, this, index);
25305 };
25306 return ZipBufferIterator;
25307}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_4__["OuterSubscriber"]));
25308//# sourceMappingURL=zip.js.map
25309
25310
25311/***/ }),
25312/* 249 */,
25313/* 250 */
25314/***/ (function(module, __webpack_exports__, __webpack_require__) {
25315
25316"use strict";
25317__webpack_require__.r(__webpack_exports__);
25318/* harmony import */ var _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(251);
25319/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return _internal_operators_audit__WEBPACK_IMPORTED_MODULE_0__["audit"]; });
25320
25321/* harmony import */ var _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(252);
25322/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return _internal_operators_auditTime__WEBPACK_IMPORTED_MODULE_1__["auditTime"]; });
25323
25324/* harmony import */ var _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(253);
25325/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _internal_operators_buffer__WEBPACK_IMPORTED_MODULE_2__["buffer"]; });
25326
25327/* harmony import */ var _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(254);
25328/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return _internal_operators_bufferCount__WEBPACK_IMPORTED_MODULE_3__["bufferCount"]; });
25329
25330/* harmony import */ var _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(255);
25331/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return _internal_operators_bufferTime__WEBPACK_IMPORTED_MODULE_4__["bufferTime"]; });
25332
25333/* harmony import */ var _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(256);
25334/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return _internal_operators_bufferToggle__WEBPACK_IMPORTED_MODULE_5__["bufferToggle"]; });
25335
25336/* harmony import */ var _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(257);
25337/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return _internal_operators_bufferWhen__WEBPACK_IMPORTED_MODULE_6__["bufferWhen"]; });
25338
25339/* harmony import */ var _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(258);
25340/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return _internal_operators_catchError__WEBPACK_IMPORTED_MODULE_7__["catchError"]; });
25341
25342/* harmony import */ var _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(259);
25343/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return _internal_operators_combineAll__WEBPACK_IMPORTED_MODULE_8__["combineAll"]; });
25344
25345/* harmony import */ var _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(260);
25346/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return _internal_operators_combineLatest__WEBPACK_IMPORTED_MODULE_9__["combineLatest"]; });
25347
25348/* harmony import */ var _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(261);
25349/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return _internal_operators_concat__WEBPACK_IMPORTED_MODULE_10__["concat"]; });
25350
25351/* harmony import */ var _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(219);
25352/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatAll", function() { return _internal_operators_concatAll__WEBPACK_IMPORTED_MODULE_11__["concatAll"]; });
25353
25354/* harmony import */ var _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(262);
25355/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return _internal_operators_concatMap__WEBPACK_IMPORTED_MODULE_12__["concatMap"]; });
25356
25357/* harmony import */ var _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(263);
25358/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return _internal_operators_concatMapTo__WEBPACK_IMPORTED_MODULE_13__["concatMapTo"]; });
25359
25360/* harmony import */ var _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(264);
25361/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _internal_operators_count__WEBPACK_IMPORTED_MODULE_14__["count"]; });
25362
25363/* harmony import */ var _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(265);
25364/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return _internal_operators_debounce__WEBPACK_IMPORTED_MODULE_15__["debounce"]; });
25365
25366/* harmony import */ var _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(266);
25367/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return _internal_operators_debounceTime__WEBPACK_IMPORTED_MODULE_16__["debounceTime"]; });
25368
25369/* harmony import */ var _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(267);
25370/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return _internal_operators_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_17__["defaultIfEmpty"]; });
25371
25372/* harmony import */ var _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(268);
25373/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return _internal_operators_delay__WEBPACK_IMPORTED_MODULE_18__["delay"]; });
25374
25375/* harmony import */ var _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(270);
25376/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return _internal_operators_delayWhen__WEBPACK_IMPORTED_MODULE_19__["delayWhen"]; });
25377
25378/* harmony import */ var _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(271);
25379/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return _internal_operators_dematerialize__WEBPACK_IMPORTED_MODULE_20__["dematerialize"]; });
25380
25381/* harmony import */ var _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(272);
25382/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return _internal_operators_distinct__WEBPACK_IMPORTED_MODULE_21__["distinct"]; });
25383
25384/* harmony import */ var _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(273);
25385/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return _internal_operators_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_22__["distinctUntilChanged"]; });
25386
25387/* harmony import */ var _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(274);
25388/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return _internal_operators_distinctUntilKeyChanged__WEBPACK_IMPORTED_MODULE_23__["distinctUntilKeyChanged"]; });
25389
25390/* harmony import */ var _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(275);
25391/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return _internal_operators_elementAt__WEBPACK_IMPORTED_MODULE_24__["elementAt"]; });
25392
25393/* harmony import */ var _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(278);
25394/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return _internal_operators_endWith__WEBPACK_IMPORTED_MODULE_25__["endWith"]; });
25395
25396/* harmony import */ var _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(279);
25397/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _internal_operators_every__WEBPACK_IMPORTED_MODULE_26__["every"]; });
25398
25399/* harmony import */ var _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(280);
25400/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return _internal_operators_exhaust__WEBPACK_IMPORTED_MODULE_27__["exhaust"]; });
25401
25402/* harmony import */ var _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(281);
25403/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return _internal_operators_exhaustMap__WEBPACK_IMPORTED_MODULE_28__["exhaustMap"]; });
25404
25405/* harmony import */ var _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(282);
25406/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return _internal_operators_expand__WEBPACK_IMPORTED_MODULE_29__["expand"]; });
25407
25408/* harmony import */ var _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(243);
25409/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _internal_operators_filter__WEBPACK_IMPORTED_MODULE_30__["filter"]; });
25410
25411/* harmony import */ var _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(283);
25412/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return _internal_operators_finalize__WEBPACK_IMPORTED_MODULE_31__["finalize"]; });
25413
25414/* harmony import */ var _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(284);
25415/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "find", function() { return _internal_operators_find__WEBPACK_IMPORTED_MODULE_32__["find"]; });
25416
25417/* harmony import */ var _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(285);
25418/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return _internal_operators_findIndex__WEBPACK_IMPORTED_MODULE_33__["findIndex"]; });
25419
25420/* harmony import */ var _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(286);
25421/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "first", function() { return _internal_operators_first__WEBPACK_IMPORTED_MODULE_34__["first"]; });
25422
25423/* harmony import */ var _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(170);
25424/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groupBy", function() { return _internal_operators_groupBy__WEBPACK_IMPORTED_MODULE_35__["groupBy"]; });
25425
25426/* harmony import */ var _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(287);
25427/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return _internal_operators_ignoreElements__WEBPACK_IMPORTED_MODULE_36__["ignoreElements"]; });
25428
25429/* harmony import */ var _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(288);
25430/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return _internal_operators_isEmpty__WEBPACK_IMPORTED_MODULE_37__["isEmpty"]; });
25431
25432/* harmony import */ var _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(289);
25433/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "last", function() { return _internal_operators_last__WEBPACK_IMPORTED_MODULE_38__["last"]; });
25434
25435/* harmony import */ var _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(205);
25436/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _internal_operators_map__WEBPACK_IMPORTED_MODULE_39__["map"]; });
25437
25438/* harmony import */ var _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(291);
25439/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return _internal_operators_mapTo__WEBPACK_IMPORTED_MODULE_40__["mapTo"]; });
25440
25441/* harmony import */ var _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(292);
25442/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return _internal_operators_materialize__WEBPACK_IMPORTED_MODULE_41__["materialize"]; });
25443
25444/* harmony import */ var _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(293);
25445/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _internal_operators_max__WEBPACK_IMPORTED_MODULE_42__["max"]; });
25446
25447/* harmony import */ var _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(296);
25448/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _internal_operators_merge__WEBPACK_IMPORTED_MODULE_43__["merge"]; });
25449
25450/* harmony import */ var _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(220);
25451/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeAll", function() { return _internal_operators_mergeAll__WEBPACK_IMPORTED_MODULE_44__["mergeAll"]; });
25452
25453/* harmony import */ var _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(221);
25454/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
25455
25456/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "flatMap", function() { return _internal_operators_mergeMap__WEBPACK_IMPORTED_MODULE_45__["mergeMap"]; });
25457
25458/* harmony import */ var _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(297);
25459/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return _internal_operators_mergeMapTo__WEBPACK_IMPORTED_MODULE_46__["mergeMapTo"]; });
25460
25461/* harmony import */ var _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(298);
25462/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return _internal_operators_mergeScan__WEBPACK_IMPORTED_MODULE_47__["mergeScan"]; });
25463
25464/* harmony import */ var _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(299);
25465/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _internal_operators_min__WEBPACK_IMPORTED_MODULE_48__["min"]; });
25466
25467/* harmony import */ var _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(300);
25468/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return _internal_operators_multicast__WEBPACK_IMPORTED_MODULE_49__["multicast"]; });
25469
25470/* harmony import */ var _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(180);
25471/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "observeOn", function() { return _internal_operators_observeOn__WEBPACK_IMPORTED_MODULE_50__["observeOn"]; });
25472
25473/* harmony import */ var _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(301);
25474/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return _internal_operators_onErrorResumeNext__WEBPACK_IMPORTED_MODULE_51__["onErrorResumeNext"]; });
25475
25476/* harmony import */ var _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(302);
25477/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return _internal_operators_pairwise__WEBPACK_IMPORTED_MODULE_52__["pairwise"]; });
25478
25479/* harmony import */ var _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(303);
25480/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _internal_operators_partition__WEBPACK_IMPORTED_MODULE_53__["partition"]; });
25481
25482/* harmony import */ var _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(304);
25483/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return _internal_operators_pluck__WEBPACK_IMPORTED_MODULE_54__["pluck"]; });
25484
25485/* harmony import */ var _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(305);
25486/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return _internal_operators_publish__WEBPACK_IMPORTED_MODULE_55__["publish"]; });
25487
25488/* harmony import */ var _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(306);
25489/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return _internal_operators_publishBehavior__WEBPACK_IMPORTED_MODULE_56__["publishBehavior"]; });
25490
25491/* harmony import */ var _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(307);
25492/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return _internal_operators_publishLast__WEBPACK_IMPORTED_MODULE_57__["publishLast"]; });
25493
25494/* harmony import */ var _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(308);
25495/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return _internal_operators_publishReplay__WEBPACK_IMPORTED_MODULE_58__["publishReplay"]; });
25496
25497/* harmony import */ var _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(309);
25498/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "race", function() { return _internal_operators_race__WEBPACK_IMPORTED_MODULE_59__["race"]; });
25499
25500/* harmony import */ var _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(294);
25501/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _internal_operators_reduce__WEBPACK_IMPORTED_MODULE_60__["reduce"]; });
25502
25503/* harmony import */ var _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(310);
25504/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return _internal_operators_repeat__WEBPACK_IMPORTED_MODULE_61__["repeat"]; });
25505
25506/* harmony import */ var _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(311);
25507/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return _internal_operators_repeatWhen__WEBPACK_IMPORTED_MODULE_62__["repeatWhen"]; });
25508
25509/* harmony import */ var _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(312);
25510/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return _internal_operators_retry__WEBPACK_IMPORTED_MODULE_63__["retry"]; });
25511
25512/* harmony import */ var _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(313);
25513/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return _internal_operators_retryWhen__WEBPACK_IMPORTED_MODULE_64__["retryWhen"]; });
25514
25515/* harmony import */ var _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(169);
25516/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "refCount", function() { return _internal_operators_refCount__WEBPACK_IMPORTED_MODULE_65__["refCount"]; });
25517
25518/* harmony import */ var _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(314);
25519/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return _internal_operators_sample__WEBPACK_IMPORTED_MODULE_66__["sample"]; });
25520
25521/* harmony import */ var _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(315);
25522/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return _internal_operators_sampleTime__WEBPACK_IMPORTED_MODULE_67__["sampleTime"]; });
25523
25524/* harmony import */ var _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(295);
25525/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _internal_operators_scan__WEBPACK_IMPORTED_MODULE_68__["scan"]; });
25526
25527/* harmony import */ var _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(316);
25528/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return _internal_operators_sequenceEqual__WEBPACK_IMPORTED_MODULE_69__["sequenceEqual"]; });
25529
25530/* harmony import */ var _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(317);
25531/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "share", function() { return _internal_operators_share__WEBPACK_IMPORTED_MODULE_70__["share"]; });
25532
25533/* harmony import */ var _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(318);
25534/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return _internal_operators_shareReplay__WEBPACK_IMPORTED_MODULE_71__["shareReplay"]; });
25535
25536/* harmony import */ var _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(319);
25537/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "single", function() { return _internal_operators_single__WEBPACK_IMPORTED_MODULE_72__["single"]; });
25538
25539/* harmony import */ var _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(320);
25540/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return _internal_operators_skip__WEBPACK_IMPORTED_MODULE_73__["skip"]; });
25541
25542/* harmony import */ var _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(321);
25543/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return _internal_operators_skipLast__WEBPACK_IMPORTED_MODULE_74__["skipLast"]; });
25544
25545/* harmony import */ var _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(322);
25546/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return _internal_operators_skipUntil__WEBPACK_IMPORTED_MODULE_75__["skipUntil"]; });
25547
25548/* harmony import */ var _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(323);
25549/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return _internal_operators_skipWhile__WEBPACK_IMPORTED_MODULE_76__["skipWhile"]; });
25550
25551/* harmony import */ var _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(324);
25552/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return _internal_operators_startWith__WEBPACK_IMPORTED_MODULE_77__["startWith"]; });
25553
25554/* harmony import */ var _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(325);
25555/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return _internal_operators_subscribeOn__WEBPACK_IMPORTED_MODULE_78__["subscribeOn"]; });
25556
25557/* harmony import */ var _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(327);
25558/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return _internal_operators_switchAll__WEBPACK_IMPORTED_MODULE_79__["switchAll"]; });
25559
25560/* harmony import */ var _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(328);
25561/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return _internal_operators_switchMap__WEBPACK_IMPORTED_MODULE_80__["switchMap"]; });
25562
25563/* harmony import */ var _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(329);
25564/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return _internal_operators_switchMapTo__WEBPACK_IMPORTED_MODULE_81__["switchMapTo"]; });
25565
25566/* harmony import */ var _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(277);
25567/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "take", function() { return _internal_operators_take__WEBPACK_IMPORTED_MODULE_82__["take"]; });
25568
25569/* harmony import */ var _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(290);
25570/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return _internal_operators_takeLast__WEBPACK_IMPORTED_MODULE_83__["takeLast"]; });
25571
25572/* harmony import */ var _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(330);
25573/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return _internal_operators_takeUntil__WEBPACK_IMPORTED_MODULE_84__["takeUntil"]; });
25574
25575/* harmony import */ var _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(331);
25576/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return _internal_operators_takeWhile__WEBPACK_IMPORTED_MODULE_85__["takeWhile"]; });
25577
25578/* harmony import */ var _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(332);
25579/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return _internal_operators_tap__WEBPACK_IMPORTED_MODULE_86__["tap"]; });
25580
25581/* harmony import */ var _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(333);
25582/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return _internal_operators_throttle__WEBPACK_IMPORTED_MODULE_87__["throttle"]; });
25583
25584/* harmony import */ var _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(334);
25585/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return _internal_operators_throttleTime__WEBPACK_IMPORTED_MODULE_88__["throttleTime"]; });
25586
25587/* harmony import */ var _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(276);
25588/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return _internal_operators_throwIfEmpty__WEBPACK_IMPORTED_MODULE_89__["throwIfEmpty"]; });
25589
25590/* harmony import */ var _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(335);
25591/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _internal_operators_timeInterval__WEBPACK_IMPORTED_MODULE_90__["timeInterval"]; });
25592
25593/* harmony import */ var _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(336);
25594/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _internal_operators_timeout__WEBPACK_IMPORTED_MODULE_91__["timeout"]; });
25595
25596/* harmony import */ var _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(337);
25597/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return _internal_operators_timeoutWith__WEBPACK_IMPORTED_MODULE_92__["timeoutWith"]; });
25598
25599/* harmony import */ var _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(338);
25600/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return _internal_operators_timestamp__WEBPACK_IMPORTED_MODULE_93__["timestamp"]; });
25601
25602/* harmony import */ var _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(339);
25603/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _internal_operators_toArray__WEBPACK_IMPORTED_MODULE_94__["toArray"]; });
25604
25605/* harmony import */ var _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(340);
25606/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _internal_operators_window__WEBPACK_IMPORTED_MODULE_95__["window"]; });
25607
25608/* harmony import */ var _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(341);
25609/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return _internal_operators_windowCount__WEBPACK_IMPORTED_MODULE_96__["windowCount"]; });
25610
25611/* harmony import */ var _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(342);
25612/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return _internal_operators_windowTime__WEBPACK_IMPORTED_MODULE_97__["windowTime"]; });
25613
25614/* harmony import */ var _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(343);
25615/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return _internal_operators_windowToggle__WEBPACK_IMPORTED_MODULE_98__["windowToggle"]; });
25616
25617/* harmony import */ var _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(344);
25618/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return _internal_operators_windowWhen__WEBPACK_IMPORTED_MODULE_99__["windowWhen"]; });
25619
25620/* harmony import */ var _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(345);
25621/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return _internal_operators_withLatestFrom__WEBPACK_IMPORTED_MODULE_100__["withLatestFrom"]; });
25622
25623/* harmony import */ var _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(346);
25624/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _internal_operators_zip__WEBPACK_IMPORTED_MODULE_101__["zip"]; });
25625
25626/* harmony import */ var _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(347);
25627/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return _internal_operators_zipAll__WEBPACK_IMPORTED_MODULE_102__["zipAll"]; });
25628
25629/** PURE_IMPORTS_START PURE_IMPORTS_END */
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734//# sourceMappingURL=index.js.map
25735
25736
25737/***/ }),
25738/* 251 */
25739/***/ (function(module, __webpack_exports__, __webpack_require__) {
25740
25741"use strict";
25742__webpack_require__.r(__webpack_exports__);
25743/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "audit", function() { return audit; });
25744/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
25745/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
25746/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
25747/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
25748
25749
25750
25751function audit(durationSelector) {
25752 return function auditOperatorFunction(source) {
25753 return source.lift(new AuditOperator(durationSelector));
25754 };
25755}
25756var AuditOperator = /*@__PURE__*/ (function () {
25757 function AuditOperator(durationSelector) {
25758 this.durationSelector = durationSelector;
25759 }
25760 AuditOperator.prototype.call = function (subscriber, source) {
25761 return source.subscribe(new AuditSubscriber(subscriber, this.durationSelector));
25762 };
25763 return AuditOperator;
25764}());
25765var AuditSubscriber = /*@__PURE__*/ (function (_super) {
25766 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](AuditSubscriber, _super);
25767 function AuditSubscriber(destination, durationSelector) {
25768 var _this = _super.call(this, destination) || this;
25769 _this.durationSelector = durationSelector;
25770 _this.hasValue = false;
25771 return _this;
25772 }
25773 AuditSubscriber.prototype._next = function (value) {
25774 this.value = value;
25775 this.hasValue = true;
25776 if (!this.throttled) {
25777 var duration = void 0;
25778 try {
25779 var durationSelector = this.durationSelector;
25780 duration = durationSelector(value);
25781 }
25782 catch (err) {
25783 return this.destination.error(err);
25784 }
25785 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
25786 if (!innerSubscription || innerSubscription.closed) {
25787 this.clearThrottle();
25788 }
25789 else {
25790 this.add(this.throttled = innerSubscription);
25791 }
25792 }
25793 };
25794 AuditSubscriber.prototype.clearThrottle = function () {
25795 var _a = this, value = _a.value, hasValue = _a.hasValue, throttled = _a.throttled;
25796 if (throttled) {
25797 this.remove(throttled);
25798 this.throttled = null;
25799 throttled.unsubscribe();
25800 }
25801 if (hasValue) {
25802 this.value = null;
25803 this.hasValue = false;
25804 this.destination.next(value);
25805 }
25806 };
25807 AuditSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
25808 this.clearThrottle();
25809 };
25810 AuditSubscriber.prototype.notifyComplete = function () {
25811 this.clearThrottle();
25812 };
25813 return AuditSubscriber;
25814}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
25815//# sourceMappingURL=audit.js.map
25816
25817
25818/***/ }),
25819/* 252 */
25820/***/ (function(module, __webpack_exports__, __webpack_require__) {
25821
25822"use strict";
25823__webpack_require__.r(__webpack_exports__);
25824/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "auditTime", function() { return auditTime; });
25825/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
25826/* harmony import */ var _audit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(251);
25827/* harmony import */ var _observable_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(246);
25828/** PURE_IMPORTS_START _scheduler_async,_audit,_observable_timer PURE_IMPORTS_END */
25829
25830
25831
25832function auditTime(duration, scheduler) {
25833 if (scheduler === void 0) {
25834 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
25835 }
25836 return Object(_audit__WEBPACK_IMPORTED_MODULE_1__["audit"])(function () { return Object(_observable_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(duration, scheduler); });
25837}
25838//# sourceMappingURL=auditTime.js.map
25839
25840
25841/***/ }),
25842/* 253 */
25843/***/ (function(module, __webpack_exports__, __webpack_require__) {
25844
25845"use strict";
25846__webpack_require__.r(__webpack_exports__);
25847/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return buffer; });
25848/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
25849/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
25850/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
25851/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
25852
25853
25854
25855function buffer(closingNotifier) {
25856 return function bufferOperatorFunction(source) {
25857 return source.lift(new BufferOperator(closingNotifier));
25858 };
25859}
25860var BufferOperator = /*@__PURE__*/ (function () {
25861 function BufferOperator(closingNotifier) {
25862 this.closingNotifier = closingNotifier;
25863 }
25864 BufferOperator.prototype.call = function (subscriber, source) {
25865 return source.subscribe(new BufferSubscriber(subscriber, this.closingNotifier));
25866 };
25867 return BufferOperator;
25868}());
25869var BufferSubscriber = /*@__PURE__*/ (function (_super) {
25870 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSubscriber, _super);
25871 function BufferSubscriber(destination, closingNotifier) {
25872 var _this = _super.call(this, destination) || this;
25873 _this.buffer = [];
25874 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, closingNotifier));
25875 return _this;
25876 }
25877 BufferSubscriber.prototype._next = function (value) {
25878 this.buffer.push(value);
25879 };
25880 BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
25881 var buffer = this.buffer;
25882 this.buffer = [];
25883 this.destination.next(buffer);
25884 };
25885 return BufferSubscriber;
25886}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
25887//# sourceMappingURL=buffer.js.map
25888
25889
25890/***/ }),
25891/* 254 */
25892/***/ (function(module, __webpack_exports__, __webpack_require__) {
25893
25894"use strict";
25895__webpack_require__.r(__webpack_exports__);
25896/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferCount", function() { return bufferCount; });
25897/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
25898/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
25899/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
25900
25901
25902function bufferCount(bufferSize, startBufferEvery) {
25903 if (startBufferEvery === void 0) {
25904 startBufferEvery = null;
25905 }
25906 return function bufferCountOperatorFunction(source) {
25907 return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
25908 };
25909}
25910var BufferCountOperator = /*@__PURE__*/ (function () {
25911 function BufferCountOperator(bufferSize, startBufferEvery) {
25912 this.bufferSize = bufferSize;
25913 this.startBufferEvery = startBufferEvery;
25914 if (!startBufferEvery || bufferSize === startBufferEvery) {
25915 this.subscriberClass = BufferCountSubscriber;
25916 }
25917 else {
25918 this.subscriberClass = BufferSkipCountSubscriber;
25919 }
25920 }
25921 BufferCountOperator.prototype.call = function (subscriber, source) {
25922 return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
25923 };
25924 return BufferCountOperator;
25925}());
25926var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
25927 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferCountSubscriber, _super);
25928 function BufferCountSubscriber(destination, bufferSize) {
25929 var _this = _super.call(this, destination) || this;
25930 _this.bufferSize = bufferSize;
25931 _this.buffer = [];
25932 return _this;
25933 }
25934 BufferCountSubscriber.prototype._next = function (value) {
25935 var buffer = this.buffer;
25936 buffer.push(value);
25937 if (buffer.length == this.bufferSize) {
25938 this.destination.next(buffer);
25939 this.buffer = [];
25940 }
25941 };
25942 BufferCountSubscriber.prototype._complete = function () {
25943 var buffer = this.buffer;
25944 if (buffer.length > 0) {
25945 this.destination.next(buffer);
25946 }
25947 _super.prototype._complete.call(this);
25948 };
25949 return BufferCountSubscriber;
25950}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
25951var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
25952 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferSkipCountSubscriber, _super);
25953 function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
25954 var _this = _super.call(this, destination) || this;
25955 _this.bufferSize = bufferSize;
25956 _this.startBufferEvery = startBufferEvery;
25957 _this.buffers = [];
25958 _this.count = 0;
25959 return _this;
25960 }
25961 BufferSkipCountSubscriber.prototype._next = function (value) {
25962 var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
25963 this.count++;
25964 if (count % startBufferEvery === 0) {
25965 buffers.push([]);
25966 }
25967 for (var i = buffers.length; i--;) {
25968 var buffer = buffers[i];
25969 buffer.push(value);
25970 if (buffer.length === bufferSize) {
25971 buffers.splice(i, 1);
25972 this.destination.next(buffer);
25973 }
25974 }
25975 };
25976 BufferSkipCountSubscriber.prototype._complete = function () {
25977 var _a = this, buffers = _a.buffers, destination = _a.destination;
25978 while (buffers.length > 0) {
25979 var buffer = buffers.shift();
25980 if (buffer.length > 0) {
25981 destination.next(buffer);
25982 }
25983 }
25984 _super.prototype._complete.call(this);
25985 };
25986 return BufferSkipCountSubscriber;
25987}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
25988//# sourceMappingURL=bufferCount.js.map
25989
25990
25991/***/ }),
25992/* 255 */
25993/***/ (function(module, __webpack_exports__, __webpack_require__) {
25994
25995"use strict";
25996__webpack_require__.r(__webpack_exports__);
25997/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferTime", function() { return bufferTime; });
25998/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
25999/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
26000/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(150);
26001/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(184);
26002/** PURE_IMPORTS_START tslib,_scheduler_async,_Subscriber,_util_isScheduler PURE_IMPORTS_END */
26003
26004
26005
26006
26007function bufferTime(bufferTimeSpan) {
26008 var length = arguments.length;
26009 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
26010 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_3__["isScheduler"])(arguments[arguments.length - 1])) {
26011 scheduler = arguments[arguments.length - 1];
26012 length--;
26013 }
26014 var bufferCreationInterval = null;
26015 if (length >= 2) {
26016 bufferCreationInterval = arguments[1];
26017 }
26018 var maxBufferSize = Number.POSITIVE_INFINITY;
26019 if (length >= 3) {
26020 maxBufferSize = arguments[2];
26021 }
26022 return function bufferTimeOperatorFunction(source) {
26023 return source.lift(new BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler));
26024 };
26025}
26026var BufferTimeOperator = /*@__PURE__*/ (function () {
26027 function BufferTimeOperator(bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
26028 this.bufferTimeSpan = bufferTimeSpan;
26029 this.bufferCreationInterval = bufferCreationInterval;
26030 this.maxBufferSize = maxBufferSize;
26031 this.scheduler = scheduler;
26032 }
26033 BufferTimeOperator.prototype.call = function (subscriber, source) {
26034 return source.subscribe(new BufferTimeSubscriber(subscriber, this.bufferTimeSpan, this.bufferCreationInterval, this.maxBufferSize, this.scheduler));
26035 };
26036 return BufferTimeOperator;
26037}());
26038var Context = /*@__PURE__*/ (function () {
26039 function Context() {
26040 this.buffer = [];
26041 }
26042 return Context;
26043}());
26044var BufferTimeSubscriber = /*@__PURE__*/ (function (_super) {
26045 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferTimeSubscriber, _super);
26046 function BufferTimeSubscriber(destination, bufferTimeSpan, bufferCreationInterval, maxBufferSize, scheduler) {
26047 var _this = _super.call(this, destination) || this;
26048 _this.bufferTimeSpan = bufferTimeSpan;
26049 _this.bufferCreationInterval = bufferCreationInterval;
26050 _this.maxBufferSize = maxBufferSize;
26051 _this.scheduler = scheduler;
26052 _this.contexts = [];
26053 var context = _this.openContext();
26054 _this.timespanOnly = bufferCreationInterval == null || bufferCreationInterval < 0;
26055 if (_this.timespanOnly) {
26056 var timeSpanOnlyState = { subscriber: _this, context: context, bufferTimeSpan: bufferTimeSpan };
26057 _this.add(context.closeAction = scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
26058 }
26059 else {
26060 var closeState = { subscriber: _this, context: context };
26061 var creationState = { bufferTimeSpan: bufferTimeSpan, bufferCreationInterval: bufferCreationInterval, subscriber: _this, scheduler: scheduler };
26062 _this.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, closeState));
26063 _this.add(scheduler.schedule(dispatchBufferCreation, bufferCreationInterval, creationState));
26064 }
26065 return _this;
26066 }
26067 BufferTimeSubscriber.prototype._next = function (value) {
26068 var contexts = this.contexts;
26069 var len = contexts.length;
26070 var filledBufferContext;
26071 for (var i = 0; i < len; i++) {
26072 var context_1 = contexts[i];
26073 var buffer = context_1.buffer;
26074 buffer.push(value);
26075 if (buffer.length == this.maxBufferSize) {
26076 filledBufferContext = context_1;
26077 }
26078 }
26079 if (filledBufferContext) {
26080 this.onBufferFull(filledBufferContext);
26081 }
26082 };
26083 BufferTimeSubscriber.prototype._error = function (err) {
26084 this.contexts.length = 0;
26085 _super.prototype._error.call(this, err);
26086 };
26087 BufferTimeSubscriber.prototype._complete = function () {
26088 var _a = this, contexts = _a.contexts, destination = _a.destination;
26089 while (contexts.length > 0) {
26090 var context_2 = contexts.shift();
26091 destination.next(context_2.buffer);
26092 }
26093 _super.prototype._complete.call(this);
26094 };
26095 BufferTimeSubscriber.prototype._unsubscribe = function () {
26096 this.contexts = null;
26097 };
26098 BufferTimeSubscriber.prototype.onBufferFull = function (context) {
26099 this.closeContext(context);
26100 var closeAction = context.closeAction;
26101 closeAction.unsubscribe();
26102 this.remove(closeAction);
26103 if (!this.closed && this.timespanOnly) {
26104 context = this.openContext();
26105 var bufferTimeSpan = this.bufferTimeSpan;
26106 var timeSpanOnlyState = { subscriber: this, context: context, bufferTimeSpan: bufferTimeSpan };
26107 this.add(context.closeAction = this.scheduler.schedule(dispatchBufferTimeSpanOnly, bufferTimeSpan, timeSpanOnlyState));
26108 }
26109 };
26110 BufferTimeSubscriber.prototype.openContext = function () {
26111 var context = new Context();
26112 this.contexts.push(context);
26113 return context;
26114 };
26115 BufferTimeSubscriber.prototype.closeContext = function (context) {
26116 this.destination.next(context.buffer);
26117 var contexts = this.contexts;
26118 var spliceIndex = contexts ? contexts.indexOf(context) : -1;
26119 if (spliceIndex >= 0) {
26120 contexts.splice(contexts.indexOf(context), 1);
26121 }
26122 };
26123 return BufferTimeSubscriber;
26124}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
26125function dispatchBufferTimeSpanOnly(state) {
26126 var subscriber = state.subscriber;
26127 var prevContext = state.context;
26128 if (prevContext) {
26129 subscriber.closeContext(prevContext);
26130 }
26131 if (!subscriber.closed) {
26132 state.context = subscriber.openContext();
26133 state.context.closeAction = this.schedule(state, state.bufferTimeSpan);
26134 }
26135}
26136function dispatchBufferCreation(state) {
26137 var bufferCreationInterval = state.bufferCreationInterval, bufferTimeSpan = state.bufferTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler;
26138 var context = subscriber.openContext();
26139 var action = this;
26140 if (!subscriber.closed) {
26141 subscriber.add(context.closeAction = scheduler.schedule(dispatchBufferClose, bufferTimeSpan, { subscriber: subscriber, context: context }));
26142 action.schedule(state, bufferCreationInterval);
26143 }
26144}
26145function dispatchBufferClose(arg) {
26146 var subscriber = arg.subscriber, context = arg.context;
26147 subscriber.closeContext(context);
26148}
26149//# sourceMappingURL=bufferTime.js.map
26150
26151
26152/***/ }),
26153/* 256 */
26154/***/ (function(module, __webpack_exports__, __webpack_require__) {
26155
26156"use strict";
26157__webpack_require__.r(__webpack_exports__);
26158/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferToggle", function() { return bufferToggle; });
26159/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
26160/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(156);
26161/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
26162/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
26163/** PURE_IMPORTS_START tslib,_Subscription,_util_subscribeToResult,_OuterSubscriber PURE_IMPORTS_END */
26164
26165
26166
26167
26168function bufferToggle(openings, closingSelector) {
26169 return function bufferToggleOperatorFunction(source) {
26170 return source.lift(new BufferToggleOperator(openings, closingSelector));
26171 };
26172}
26173var BufferToggleOperator = /*@__PURE__*/ (function () {
26174 function BufferToggleOperator(openings, closingSelector) {
26175 this.openings = openings;
26176 this.closingSelector = closingSelector;
26177 }
26178 BufferToggleOperator.prototype.call = function (subscriber, source) {
26179 return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector));
26180 };
26181 return BufferToggleOperator;
26182}());
26183var BufferToggleSubscriber = /*@__PURE__*/ (function (_super) {
26184 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferToggleSubscriber, _super);
26185 function BufferToggleSubscriber(destination, openings, closingSelector) {
26186 var _this = _super.call(this, destination) || this;
26187 _this.openings = openings;
26188 _this.closingSelector = closingSelector;
26189 _this.contexts = [];
26190 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, openings));
26191 return _this;
26192 }
26193 BufferToggleSubscriber.prototype._next = function (value) {
26194 var contexts = this.contexts;
26195 var len = contexts.length;
26196 for (var i = 0; i < len; i++) {
26197 contexts[i].buffer.push(value);
26198 }
26199 };
26200 BufferToggleSubscriber.prototype._error = function (err) {
26201 var contexts = this.contexts;
26202 while (contexts.length > 0) {
26203 var context_1 = contexts.shift();
26204 context_1.subscription.unsubscribe();
26205 context_1.buffer = null;
26206 context_1.subscription = null;
26207 }
26208 this.contexts = null;
26209 _super.prototype._error.call(this, err);
26210 };
26211 BufferToggleSubscriber.prototype._complete = function () {
26212 var contexts = this.contexts;
26213 while (contexts.length > 0) {
26214 var context_2 = contexts.shift();
26215 this.destination.next(context_2.buffer);
26216 context_2.subscription.unsubscribe();
26217 context_2.buffer = null;
26218 context_2.subscription = null;
26219 }
26220 this.contexts = null;
26221 _super.prototype._complete.call(this);
26222 };
26223 BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26224 outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue);
26225 };
26226 BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) {
26227 this.closeBuffer(innerSub.context);
26228 };
26229 BufferToggleSubscriber.prototype.openBuffer = function (value) {
26230 try {
26231 var closingSelector = this.closingSelector;
26232 var closingNotifier = closingSelector.call(this, value);
26233 if (closingNotifier) {
26234 this.trySubscribe(closingNotifier);
26235 }
26236 }
26237 catch (err) {
26238 this._error(err);
26239 }
26240 };
26241 BufferToggleSubscriber.prototype.closeBuffer = function (context) {
26242 var contexts = this.contexts;
26243 if (contexts && context) {
26244 var buffer = context.buffer, subscription = context.subscription;
26245 this.destination.next(buffer);
26246 contexts.splice(contexts.indexOf(context), 1);
26247 this.remove(subscription);
26248 subscription.unsubscribe();
26249 }
26250 };
26251 BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) {
26252 var contexts = this.contexts;
26253 var buffer = [];
26254 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
26255 var context = { buffer: buffer, subscription: subscription };
26256 contexts.push(context);
26257 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, closingNotifier, context);
26258 if (!innerSubscription || innerSubscription.closed) {
26259 this.closeBuffer(context);
26260 }
26261 else {
26262 innerSubscription.context = context;
26263 this.add(innerSubscription);
26264 subscription.add(innerSubscription);
26265 }
26266 };
26267 return BufferToggleSubscriber;
26268}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
26269//# sourceMappingURL=bufferToggle.js.map
26270
26271
26272/***/ }),
26273/* 257 */
26274/***/ (function(module, __webpack_exports__, __webpack_require__) {
26275
26276"use strict";
26277__webpack_require__.r(__webpack_exports__);
26278/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bufferWhen", function() { return bufferWhen; });
26279/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
26280/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(156);
26281/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
26282/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
26283/** PURE_IMPORTS_START tslib,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
26284
26285
26286
26287
26288function bufferWhen(closingSelector) {
26289 return function (source) {
26290 return source.lift(new BufferWhenOperator(closingSelector));
26291 };
26292}
26293var BufferWhenOperator = /*@__PURE__*/ (function () {
26294 function BufferWhenOperator(closingSelector) {
26295 this.closingSelector = closingSelector;
26296 }
26297 BufferWhenOperator.prototype.call = function (subscriber, source) {
26298 return source.subscribe(new BufferWhenSubscriber(subscriber, this.closingSelector));
26299 };
26300 return BufferWhenOperator;
26301}());
26302var BufferWhenSubscriber = /*@__PURE__*/ (function (_super) {
26303 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](BufferWhenSubscriber, _super);
26304 function BufferWhenSubscriber(destination, closingSelector) {
26305 var _this = _super.call(this, destination) || this;
26306 _this.closingSelector = closingSelector;
26307 _this.subscribing = false;
26308 _this.openBuffer();
26309 return _this;
26310 }
26311 BufferWhenSubscriber.prototype._next = function (value) {
26312 this.buffer.push(value);
26313 };
26314 BufferWhenSubscriber.prototype._complete = function () {
26315 var buffer = this.buffer;
26316 if (buffer) {
26317 this.destination.next(buffer);
26318 }
26319 _super.prototype._complete.call(this);
26320 };
26321 BufferWhenSubscriber.prototype._unsubscribe = function () {
26322 this.buffer = null;
26323 this.subscribing = false;
26324 };
26325 BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26326 this.openBuffer();
26327 };
26328 BufferWhenSubscriber.prototype.notifyComplete = function () {
26329 if (this.subscribing) {
26330 this.complete();
26331 }
26332 else {
26333 this.openBuffer();
26334 }
26335 };
26336 BufferWhenSubscriber.prototype.openBuffer = function () {
26337 var closingSubscription = this.closingSubscription;
26338 if (closingSubscription) {
26339 this.remove(closingSubscription);
26340 closingSubscription.unsubscribe();
26341 }
26342 var buffer = this.buffer;
26343 if (this.buffer) {
26344 this.destination.next(buffer);
26345 }
26346 this.buffer = [];
26347 var closingNotifier;
26348 try {
26349 var closingSelector = this.closingSelector;
26350 closingNotifier = closingSelector();
26351 }
26352 catch (err) {
26353 return this.error(err);
26354 }
26355 closingSubscription = new _Subscription__WEBPACK_IMPORTED_MODULE_1__["Subscription"]();
26356 this.closingSubscription = closingSubscription;
26357 this.add(closingSubscription);
26358 this.subscribing = true;
26359 closingSubscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
26360 this.subscribing = false;
26361 };
26362 return BufferWhenSubscriber;
26363}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
26364//# sourceMappingURL=bufferWhen.js.map
26365
26366
26367/***/ }),
26368/* 258 */
26369/***/ (function(module, __webpack_exports__, __webpack_require__) {
26370
26371"use strict";
26372__webpack_require__.r(__webpack_exports__);
26373/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "catchError", function() { return catchError; });
26374/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
26375/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
26376/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
26377/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
26378/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
26379
26380
26381
26382
26383function catchError(selector) {
26384 return function catchErrorOperatorFunction(source) {
26385 var operator = new CatchOperator(selector);
26386 var caught = source.lift(operator);
26387 return (operator.caught = caught);
26388 };
26389}
26390var CatchOperator = /*@__PURE__*/ (function () {
26391 function CatchOperator(selector) {
26392 this.selector = selector;
26393 }
26394 CatchOperator.prototype.call = function (subscriber, source) {
26395 return source.subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
26396 };
26397 return CatchOperator;
26398}());
26399var CatchSubscriber = /*@__PURE__*/ (function (_super) {
26400 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CatchSubscriber, _super);
26401 function CatchSubscriber(destination, selector, caught) {
26402 var _this = _super.call(this, destination) || this;
26403 _this.selector = selector;
26404 _this.caught = caught;
26405 return _this;
26406 }
26407 CatchSubscriber.prototype.error = function (err) {
26408 if (!this.isStopped) {
26409 var result = void 0;
26410 try {
26411 result = this.selector(err, this.caught);
26412 }
26413 catch (err2) {
26414 _super.prototype.error.call(this, err2);
26415 return;
26416 }
26417 this._unsubscribeAndRecycle();
26418 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
26419 this.add(innerSubscriber);
26420 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, undefined, undefined, innerSubscriber);
26421 }
26422 };
26423 return CatchSubscriber;
26424}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
26425//# sourceMappingURL=catchError.js.map
26426
26427
26428/***/ }),
26429/* 259 */
26430/***/ (function(module, __webpack_exports__, __webpack_require__) {
26431
26432"use strict";
26433__webpack_require__.r(__webpack_exports__);
26434/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineAll", function() { return combineAll; });
26435/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(207);
26436/** PURE_IMPORTS_START _observable_combineLatest PURE_IMPORTS_END */
26437
26438function combineAll(project) {
26439 return function (source) { return source.lift(new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_0__["CombineLatestOperator"](project)); };
26440}
26441//# sourceMappingURL=combineAll.js.map
26442
26443
26444/***/ }),
26445/* 260 */
26446/***/ (function(module, __webpack_exports__, __webpack_require__) {
26447
26448"use strict";
26449__webpack_require__.r(__webpack_exports__);
26450/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineLatest", function() { return combineLatest; });
26451/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(157);
26452/* harmony import */ var _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(207);
26453/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(222);
26454/** PURE_IMPORTS_START _util_isArray,_observable_combineLatest,_observable_from PURE_IMPORTS_END */
26455
26456
26457
26458var none = {};
26459function combineLatest() {
26460 var observables = [];
26461 for (var _i = 0; _i < arguments.length; _i++) {
26462 observables[_i] = arguments[_i];
26463 }
26464 var project = null;
26465 if (typeof observables[observables.length - 1] === 'function') {
26466 project = observables.pop();
26467 }
26468 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
26469 observables = observables[0].slice();
26470 }
26471 return function (source) { return source.lift.call(Object(_observable_from__WEBPACK_IMPORTED_MODULE_2__["from"])([source].concat(observables)), new _observable_combineLatest__WEBPACK_IMPORTED_MODULE_1__["CombineLatestOperator"](project)); };
26472}
26473//# sourceMappingURL=combineLatest.js.map
26474
26475
26476/***/ }),
26477/* 261 */
26478/***/ (function(module, __webpack_exports__, __webpack_require__) {
26479
26480"use strict";
26481__webpack_require__.r(__webpack_exports__);
26482/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concat", function() { return concat; });
26483/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(218);
26484/** PURE_IMPORTS_START _observable_concat PURE_IMPORTS_END */
26485
26486function concat() {
26487 var observables = [];
26488 for (var _i = 0; _i < arguments.length; _i++) {
26489 observables[_i] = arguments[_i];
26490 }
26491 return function (source) { return source.lift.call(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"].apply(void 0, [source].concat(observables))); };
26492}
26493//# sourceMappingURL=concat.js.map
26494
26495
26496/***/ }),
26497/* 262 */
26498/***/ (function(module, __webpack_exports__, __webpack_require__) {
26499
26500"use strict";
26501__webpack_require__.r(__webpack_exports__);
26502/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMap", function() { return concatMap; });
26503/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
26504/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
26505
26506function concatMap(project, resultSelector) {
26507 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(project, resultSelector, 1);
26508}
26509//# sourceMappingURL=concatMap.js.map
26510
26511
26512/***/ }),
26513/* 263 */
26514/***/ (function(module, __webpack_exports__, __webpack_require__) {
26515
26516"use strict";
26517__webpack_require__.r(__webpack_exports__);
26518/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "concatMapTo", function() { return concatMapTo; });
26519/* harmony import */ var _concatMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(262);
26520/** PURE_IMPORTS_START _concatMap PURE_IMPORTS_END */
26521
26522function concatMapTo(innerObservable, resultSelector) {
26523 return Object(_concatMap__WEBPACK_IMPORTED_MODULE_0__["concatMap"])(function () { return innerObservable; }, resultSelector);
26524}
26525//# sourceMappingURL=concatMapTo.js.map
26526
26527
26528/***/ }),
26529/* 264 */
26530/***/ (function(module, __webpack_exports__, __webpack_require__) {
26531
26532"use strict";
26533__webpack_require__.r(__webpack_exports__);
26534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "count", function() { return count; });
26535/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
26536/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
26537/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26538
26539
26540function count(predicate) {
26541 return function (source) { return source.lift(new CountOperator(predicate, source)); };
26542}
26543var CountOperator = /*@__PURE__*/ (function () {
26544 function CountOperator(predicate, source) {
26545 this.predicate = predicate;
26546 this.source = source;
26547 }
26548 CountOperator.prototype.call = function (subscriber, source) {
26549 return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
26550 };
26551 return CountOperator;
26552}());
26553var CountSubscriber = /*@__PURE__*/ (function (_super) {
26554 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountSubscriber, _super);
26555 function CountSubscriber(destination, predicate, source) {
26556 var _this = _super.call(this, destination) || this;
26557 _this.predicate = predicate;
26558 _this.source = source;
26559 _this.count = 0;
26560 _this.index = 0;
26561 return _this;
26562 }
26563 CountSubscriber.prototype._next = function (value) {
26564 if (this.predicate) {
26565 this._tryPredicate(value);
26566 }
26567 else {
26568 this.count++;
26569 }
26570 };
26571 CountSubscriber.prototype._tryPredicate = function (value) {
26572 var result;
26573 try {
26574 result = this.predicate(value, this.index++, this.source);
26575 }
26576 catch (err) {
26577 this.destination.error(err);
26578 return;
26579 }
26580 if (result) {
26581 this.count++;
26582 }
26583 };
26584 CountSubscriber.prototype._complete = function () {
26585 this.destination.next(this.count);
26586 this.destination.complete();
26587 };
26588 return CountSubscriber;
26589}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26590//# sourceMappingURL=count.js.map
26591
26592
26593/***/ }),
26594/* 265 */
26595/***/ (function(module, __webpack_exports__, __webpack_require__) {
26596
26597"use strict";
26598__webpack_require__.r(__webpack_exports__);
26599/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
26600/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
26601/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
26602/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
26603/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
26604
26605
26606
26607function debounce(durationSelector) {
26608 return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
26609}
26610var DebounceOperator = /*@__PURE__*/ (function () {
26611 function DebounceOperator(durationSelector) {
26612 this.durationSelector = durationSelector;
26613 }
26614 DebounceOperator.prototype.call = function (subscriber, source) {
26615 return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
26616 };
26617 return DebounceOperator;
26618}());
26619var DebounceSubscriber = /*@__PURE__*/ (function (_super) {
26620 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceSubscriber, _super);
26621 function DebounceSubscriber(destination, durationSelector) {
26622 var _this = _super.call(this, destination) || this;
26623 _this.durationSelector = durationSelector;
26624 _this.hasValue = false;
26625 _this.durationSubscription = null;
26626 return _this;
26627 }
26628 DebounceSubscriber.prototype._next = function (value) {
26629 try {
26630 var result = this.durationSelector.call(this, value);
26631 if (result) {
26632 this._tryNext(value, result);
26633 }
26634 }
26635 catch (err) {
26636 this.destination.error(err);
26637 }
26638 };
26639 DebounceSubscriber.prototype._complete = function () {
26640 this.emitValue();
26641 this.destination.complete();
26642 };
26643 DebounceSubscriber.prototype._tryNext = function (value, duration) {
26644 var subscription = this.durationSubscription;
26645 this.value = value;
26646 this.hasValue = true;
26647 if (subscription) {
26648 subscription.unsubscribe();
26649 this.remove(subscription);
26650 }
26651 subscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration);
26652 if (subscription && !subscription.closed) {
26653 this.add(this.durationSubscription = subscription);
26654 }
26655 };
26656 DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26657 this.emitValue();
26658 };
26659 DebounceSubscriber.prototype.notifyComplete = function () {
26660 this.emitValue();
26661 };
26662 DebounceSubscriber.prototype.emitValue = function () {
26663 if (this.hasValue) {
26664 var value = this.value;
26665 var subscription = this.durationSubscription;
26666 if (subscription) {
26667 this.durationSubscription = null;
26668 subscription.unsubscribe();
26669 this.remove(subscription);
26670 }
26671 this.value = null;
26672 this.hasValue = false;
26673 _super.prototype._next.call(this, value);
26674 }
26675 };
26676 return DebounceSubscriber;
26677}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
26678//# sourceMappingURL=debounce.js.map
26679
26680
26681/***/ }),
26682/* 266 */
26683/***/ (function(module, __webpack_exports__, __webpack_require__) {
26684
26685"use strict";
26686__webpack_require__.r(__webpack_exports__);
26687/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounceTime", function() { return debounceTime; });
26688/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
26689/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
26690/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194);
26691/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
26692
26693
26694
26695function debounceTime(dueTime, scheduler) {
26696 if (scheduler === void 0) {
26697 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
26698 }
26699 return function (source) { return source.lift(new DebounceTimeOperator(dueTime, scheduler)); };
26700}
26701var DebounceTimeOperator = /*@__PURE__*/ (function () {
26702 function DebounceTimeOperator(dueTime, scheduler) {
26703 this.dueTime = dueTime;
26704 this.scheduler = scheduler;
26705 }
26706 DebounceTimeOperator.prototype.call = function (subscriber, source) {
26707 return source.subscribe(new DebounceTimeSubscriber(subscriber, this.dueTime, this.scheduler));
26708 };
26709 return DebounceTimeOperator;
26710}());
26711var DebounceTimeSubscriber = /*@__PURE__*/ (function (_super) {
26712 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DebounceTimeSubscriber, _super);
26713 function DebounceTimeSubscriber(destination, dueTime, scheduler) {
26714 var _this = _super.call(this, destination) || this;
26715 _this.dueTime = dueTime;
26716 _this.scheduler = scheduler;
26717 _this.debouncedSubscription = null;
26718 _this.lastValue = null;
26719 _this.hasValue = false;
26720 return _this;
26721 }
26722 DebounceTimeSubscriber.prototype._next = function (value) {
26723 this.clearDebounce();
26724 this.lastValue = value;
26725 this.hasValue = true;
26726 this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));
26727 };
26728 DebounceTimeSubscriber.prototype._complete = function () {
26729 this.debouncedNext();
26730 this.destination.complete();
26731 };
26732 DebounceTimeSubscriber.prototype.debouncedNext = function () {
26733 this.clearDebounce();
26734 if (this.hasValue) {
26735 var lastValue = this.lastValue;
26736 this.lastValue = null;
26737 this.hasValue = false;
26738 this.destination.next(lastValue);
26739 }
26740 };
26741 DebounceTimeSubscriber.prototype.clearDebounce = function () {
26742 var debouncedSubscription = this.debouncedSubscription;
26743 if (debouncedSubscription !== null) {
26744 this.remove(debouncedSubscription);
26745 debouncedSubscription.unsubscribe();
26746 this.debouncedSubscription = null;
26747 }
26748 };
26749 return DebounceTimeSubscriber;
26750}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26751function dispatchNext(subscriber) {
26752 subscriber.debouncedNext();
26753}
26754//# sourceMappingURL=debounceTime.js.map
26755
26756
26757/***/ }),
26758/* 267 */
26759/***/ (function(module, __webpack_exports__, __webpack_require__) {
26760
26761"use strict";
26762__webpack_require__.r(__webpack_exports__);
26763/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultIfEmpty", function() { return defaultIfEmpty; });
26764/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
26765/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
26766/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
26767
26768
26769function defaultIfEmpty(defaultValue) {
26770 if (defaultValue === void 0) {
26771 defaultValue = null;
26772 }
26773 return function (source) { return source.lift(new DefaultIfEmptyOperator(defaultValue)); };
26774}
26775var DefaultIfEmptyOperator = /*@__PURE__*/ (function () {
26776 function DefaultIfEmptyOperator(defaultValue) {
26777 this.defaultValue = defaultValue;
26778 }
26779 DefaultIfEmptyOperator.prototype.call = function (subscriber, source) {
26780 return source.subscribe(new DefaultIfEmptySubscriber(subscriber, this.defaultValue));
26781 };
26782 return DefaultIfEmptyOperator;
26783}());
26784var DefaultIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
26785 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DefaultIfEmptySubscriber, _super);
26786 function DefaultIfEmptySubscriber(destination, defaultValue) {
26787 var _this = _super.call(this, destination) || this;
26788 _this.defaultValue = defaultValue;
26789 _this.isEmpty = true;
26790 return _this;
26791 }
26792 DefaultIfEmptySubscriber.prototype._next = function (value) {
26793 this.isEmpty = false;
26794 this.destination.next(value);
26795 };
26796 DefaultIfEmptySubscriber.prototype._complete = function () {
26797 if (this.isEmpty) {
26798 this.destination.next(this.defaultValue);
26799 }
26800 this.destination.complete();
26801 };
26802 return DefaultIfEmptySubscriber;
26803}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
26804//# sourceMappingURL=defaultIfEmpty.js.map
26805
26806
26807/***/ }),
26808/* 268 */
26809/***/ (function(module, __webpack_exports__, __webpack_require__) {
26810
26811"use strict";
26812__webpack_require__.r(__webpack_exports__);
26813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delay", function() { return delay; });
26814/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
26815/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
26816/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(269);
26817/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(150);
26818/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(181);
26819/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */
26820
26821
26822
26823
26824
26825function delay(delay, scheduler) {
26826 if (scheduler === void 0) {
26827 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
26828 }
26829 var absoluteDelay = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(delay);
26830 var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
26831 return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };
26832}
26833var DelayOperator = /*@__PURE__*/ (function () {
26834 function DelayOperator(delay, scheduler) {
26835 this.delay = delay;
26836 this.scheduler = scheduler;
26837 }
26838 DelayOperator.prototype.call = function (subscriber, source) {
26839 return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));
26840 };
26841 return DelayOperator;
26842}());
26843var DelaySubscriber = /*@__PURE__*/ (function (_super) {
26844 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelaySubscriber, _super);
26845 function DelaySubscriber(destination, delay, scheduler) {
26846 var _this = _super.call(this, destination) || this;
26847 _this.delay = delay;
26848 _this.scheduler = scheduler;
26849 _this.queue = [];
26850 _this.active = false;
26851 _this.errored = false;
26852 return _this;
26853 }
26854 DelaySubscriber.dispatch = function (state) {
26855 var source = state.source;
26856 var queue = source.queue;
26857 var scheduler = state.scheduler;
26858 var destination = state.destination;
26859 while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {
26860 queue.shift().notification.observe(destination);
26861 }
26862 if (queue.length > 0) {
26863 var delay_1 = Math.max(0, queue[0].time - scheduler.now());
26864 this.schedule(state, delay_1);
26865 }
26866 else {
26867 this.unsubscribe();
26868 source.active = false;
26869 }
26870 };
26871 DelaySubscriber.prototype._schedule = function (scheduler) {
26872 this.active = true;
26873 var destination = this.destination;
26874 destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {
26875 source: this, destination: this.destination, scheduler: scheduler
26876 }));
26877 };
26878 DelaySubscriber.prototype.scheduleNotification = function (notification) {
26879 if (this.errored === true) {
26880 return;
26881 }
26882 var scheduler = this.scheduler;
26883 var message = new DelayMessage(scheduler.now() + this.delay, notification);
26884 this.queue.push(message);
26885 if (this.active === false) {
26886 this._schedule(scheduler);
26887 }
26888 };
26889 DelaySubscriber.prototype._next = function (value) {
26890 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createNext(value));
26891 };
26892 DelaySubscriber.prototype._error = function (err) {
26893 this.errored = true;
26894 this.queue = [];
26895 this.destination.error(err);
26896 this.unsubscribe();
26897 };
26898 DelaySubscriber.prototype._complete = function () {
26899 this.scheduleNotification(_Notification__WEBPACK_IMPORTED_MODULE_4__["Notification"].createComplete());
26900 this.unsubscribe();
26901 };
26902 return DelaySubscriber;
26903}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
26904var DelayMessage = /*@__PURE__*/ (function () {
26905 function DelayMessage(time, notification) {
26906 this.time = time;
26907 this.notification = notification;
26908 }
26909 return DelayMessage;
26910}());
26911//# sourceMappingURL=delay.js.map
26912
26913
26914/***/ }),
26915/* 269 */
26916/***/ (function(module, __webpack_exports__, __webpack_require__) {
26917
26918"use strict";
26919__webpack_require__.r(__webpack_exports__);
26920/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return isDate; });
26921/** PURE_IMPORTS_START PURE_IMPORTS_END */
26922function isDate(value) {
26923 return value instanceof Date && !isNaN(+value);
26924}
26925//# sourceMappingURL=isDate.js.map
26926
26927
26928/***/ }),
26929/* 270 */
26930/***/ (function(module, __webpack_exports__, __webpack_require__) {
26931
26932"use strict";
26933__webpack_require__.r(__webpack_exports__);
26934/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "delayWhen", function() { return delayWhen; });
26935/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
26936/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
26937/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(148);
26938/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
26939/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(209);
26940/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
26941
26942
26943
26944
26945
26946function delayWhen(delayDurationSelector, subscriptionDelay) {
26947 if (subscriptionDelay) {
26948 return function (source) {
26949 return new SubscriptionDelayObservable(source, subscriptionDelay)
26950 .lift(new DelayWhenOperator(delayDurationSelector));
26951 };
26952 }
26953 return function (source) { return source.lift(new DelayWhenOperator(delayDurationSelector)); };
26954}
26955var DelayWhenOperator = /*@__PURE__*/ (function () {
26956 function DelayWhenOperator(delayDurationSelector) {
26957 this.delayDurationSelector = delayDurationSelector;
26958 }
26959 DelayWhenOperator.prototype.call = function (subscriber, source) {
26960 return source.subscribe(new DelayWhenSubscriber(subscriber, this.delayDurationSelector));
26961 };
26962 return DelayWhenOperator;
26963}());
26964var DelayWhenSubscriber = /*@__PURE__*/ (function (_super) {
26965 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DelayWhenSubscriber, _super);
26966 function DelayWhenSubscriber(destination, delayDurationSelector) {
26967 var _this = _super.call(this, destination) || this;
26968 _this.delayDurationSelector = delayDurationSelector;
26969 _this.completed = false;
26970 _this.delayNotifierSubscriptions = [];
26971 _this.index = 0;
26972 return _this;
26973 }
26974 DelayWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
26975 this.destination.next(outerValue);
26976 this.removeSubscription(innerSub);
26977 this.tryComplete();
26978 };
26979 DelayWhenSubscriber.prototype.notifyError = function (error, innerSub) {
26980 this._error(error);
26981 };
26982 DelayWhenSubscriber.prototype.notifyComplete = function (innerSub) {
26983 var value = this.removeSubscription(innerSub);
26984 if (value) {
26985 this.destination.next(value);
26986 }
26987 this.tryComplete();
26988 };
26989 DelayWhenSubscriber.prototype._next = function (value) {
26990 var index = this.index++;
26991 try {
26992 var delayNotifier = this.delayDurationSelector(value, index);
26993 if (delayNotifier) {
26994 this.tryDelay(delayNotifier, value);
26995 }
26996 }
26997 catch (err) {
26998 this.destination.error(err);
26999 }
27000 };
27001 DelayWhenSubscriber.prototype._complete = function () {
27002 this.completed = true;
27003 this.tryComplete();
27004 this.unsubscribe();
27005 };
27006 DelayWhenSubscriber.prototype.removeSubscription = function (subscription) {
27007 subscription.unsubscribe();
27008 var subscriptionIdx = this.delayNotifierSubscriptions.indexOf(subscription);
27009 if (subscriptionIdx !== -1) {
27010 this.delayNotifierSubscriptions.splice(subscriptionIdx, 1);
27011 }
27012 return subscription.outerValue;
27013 };
27014 DelayWhenSubscriber.prototype.tryDelay = function (delayNotifier, value) {
27015 var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, delayNotifier, value);
27016 if (notifierSubscription && !notifierSubscription.closed) {
27017 var destination = this.destination;
27018 destination.add(notifierSubscription);
27019 this.delayNotifierSubscriptions.push(notifierSubscription);
27020 }
27021 };
27022 DelayWhenSubscriber.prototype.tryComplete = function () {
27023 if (this.completed && this.delayNotifierSubscriptions.length === 0) {
27024 this.destination.complete();
27025 }
27026 };
27027 return DelayWhenSubscriber;
27028}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
27029var SubscriptionDelayObservable = /*@__PURE__*/ (function (_super) {
27030 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelayObservable, _super);
27031 function SubscriptionDelayObservable(source, subscriptionDelay) {
27032 var _this = _super.call(this) || this;
27033 _this.source = source;
27034 _this.subscriptionDelay = subscriptionDelay;
27035 return _this;
27036 }
27037 SubscriptionDelayObservable.prototype._subscribe = function (subscriber) {
27038 this.subscriptionDelay.subscribe(new SubscriptionDelaySubscriber(subscriber, this.source));
27039 };
27040 return SubscriptionDelayObservable;
27041}(_Observable__WEBPACK_IMPORTED_MODULE_2__["Observable"]));
27042var SubscriptionDelaySubscriber = /*@__PURE__*/ (function (_super) {
27043 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscriptionDelaySubscriber, _super);
27044 function SubscriptionDelaySubscriber(parent, source) {
27045 var _this = _super.call(this) || this;
27046 _this.parent = parent;
27047 _this.source = source;
27048 _this.sourceSubscribed = false;
27049 return _this;
27050 }
27051 SubscriptionDelaySubscriber.prototype._next = function (unused) {
27052 this.subscribeToSource();
27053 };
27054 SubscriptionDelaySubscriber.prototype._error = function (err) {
27055 this.unsubscribe();
27056 this.parent.error(err);
27057 };
27058 SubscriptionDelaySubscriber.prototype._complete = function () {
27059 this.unsubscribe();
27060 this.subscribeToSource();
27061 };
27062 SubscriptionDelaySubscriber.prototype.subscribeToSource = function () {
27063 if (!this.sourceSubscribed) {
27064 this.sourceSubscribed = true;
27065 this.unsubscribe();
27066 this.source.subscribe(this.parent);
27067 }
27068 };
27069 return SubscriptionDelaySubscriber;
27070}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27071//# sourceMappingURL=delayWhen.js.map
27072
27073
27074/***/ }),
27075/* 271 */
27076/***/ (function(module, __webpack_exports__, __webpack_require__) {
27077
27078"use strict";
27079__webpack_require__.r(__webpack_exports__);
27080/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dematerialize", function() { return dematerialize; });
27081/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27082/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
27083/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27084
27085
27086function dematerialize() {
27087 return function dematerializeOperatorFunction(source) {
27088 return source.lift(new DeMaterializeOperator());
27089 };
27090}
27091var DeMaterializeOperator = /*@__PURE__*/ (function () {
27092 function DeMaterializeOperator() {
27093 }
27094 DeMaterializeOperator.prototype.call = function (subscriber, source) {
27095 return source.subscribe(new DeMaterializeSubscriber(subscriber));
27096 };
27097 return DeMaterializeOperator;
27098}());
27099var DeMaterializeSubscriber = /*@__PURE__*/ (function (_super) {
27100 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DeMaterializeSubscriber, _super);
27101 function DeMaterializeSubscriber(destination) {
27102 return _super.call(this, destination) || this;
27103 }
27104 DeMaterializeSubscriber.prototype._next = function (value) {
27105 value.observe(this.destination);
27106 };
27107 return DeMaterializeSubscriber;
27108}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27109//# sourceMappingURL=dematerialize.js.map
27110
27111
27112/***/ }),
27113/* 272 */
27114/***/ (function(module, __webpack_exports__, __webpack_require__) {
27115
27116"use strict";
27117__webpack_require__.r(__webpack_exports__);
27118/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinct", function() { return distinct; });
27119/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DistinctSubscriber", function() { return DistinctSubscriber; });
27120/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27121/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
27122/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
27123/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
27124
27125
27126
27127function distinct(keySelector, flushes) {
27128 return function (source) { return source.lift(new DistinctOperator(keySelector, flushes)); };
27129}
27130var DistinctOperator = /*@__PURE__*/ (function () {
27131 function DistinctOperator(keySelector, flushes) {
27132 this.keySelector = keySelector;
27133 this.flushes = flushes;
27134 }
27135 DistinctOperator.prototype.call = function (subscriber, source) {
27136 return source.subscribe(new DistinctSubscriber(subscriber, this.keySelector, this.flushes));
27137 };
27138 return DistinctOperator;
27139}());
27140var DistinctSubscriber = /*@__PURE__*/ (function (_super) {
27141 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctSubscriber, _super);
27142 function DistinctSubscriber(destination, keySelector, flushes) {
27143 var _this = _super.call(this, destination) || this;
27144 _this.keySelector = keySelector;
27145 _this.values = new Set();
27146 if (flushes) {
27147 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, flushes));
27148 }
27149 return _this;
27150 }
27151 DistinctSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
27152 this.values.clear();
27153 };
27154 DistinctSubscriber.prototype.notifyError = function (error, innerSub) {
27155 this._error(error);
27156 };
27157 DistinctSubscriber.prototype._next = function (value) {
27158 if (this.keySelector) {
27159 this._useKeySelector(value);
27160 }
27161 else {
27162 this._finalizeNext(value, value);
27163 }
27164 };
27165 DistinctSubscriber.prototype._useKeySelector = function (value) {
27166 var key;
27167 var destination = this.destination;
27168 try {
27169 key = this.keySelector(value);
27170 }
27171 catch (err) {
27172 destination.error(err);
27173 return;
27174 }
27175 this._finalizeNext(key, value);
27176 };
27177 DistinctSubscriber.prototype._finalizeNext = function (key, value) {
27178 var values = this.values;
27179 if (!values.has(key)) {
27180 values.add(key);
27181 this.destination.next(value);
27182 }
27183 };
27184 return DistinctSubscriber;
27185}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
27186
27187//# sourceMappingURL=distinct.js.map
27188
27189
27190/***/ }),
27191/* 273 */
27192/***/ (function(module, __webpack_exports__, __webpack_require__) {
27193
27194"use strict";
27195__webpack_require__.r(__webpack_exports__);
27196/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilChanged", function() { return distinctUntilChanged; });
27197/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27198/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
27199/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27200
27201
27202function distinctUntilChanged(compare, keySelector) {
27203 return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };
27204}
27205var DistinctUntilChangedOperator = /*@__PURE__*/ (function () {
27206 function DistinctUntilChangedOperator(compare, keySelector) {
27207 this.compare = compare;
27208 this.keySelector = keySelector;
27209 }
27210 DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {
27211 return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));
27212 };
27213 return DistinctUntilChangedOperator;
27214}());
27215var DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {
27216 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](DistinctUntilChangedSubscriber, _super);
27217 function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
27218 var _this = _super.call(this, destination) || this;
27219 _this.keySelector = keySelector;
27220 _this.hasKey = false;
27221 if (typeof compare === 'function') {
27222 _this.compare = compare;
27223 }
27224 return _this;
27225 }
27226 DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {
27227 return x === y;
27228 };
27229 DistinctUntilChangedSubscriber.prototype._next = function (value) {
27230 var key;
27231 try {
27232 var keySelector = this.keySelector;
27233 key = keySelector ? keySelector(value) : value;
27234 }
27235 catch (err) {
27236 return this.destination.error(err);
27237 }
27238 var result = false;
27239 if (this.hasKey) {
27240 try {
27241 var compare = this.compare;
27242 result = compare(this.key, key);
27243 }
27244 catch (err) {
27245 return this.destination.error(err);
27246 }
27247 }
27248 else {
27249 this.hasKey = true;
27250 }
27251 if (!result) {
27252 this.key = key;
27253 this.destination.next(value);
27254 }
27255 };
27256 return DistinctUntilChangedSubscriber;
27257}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27258//# sourceMappingURL=distinctUntilChanged.js.map
27259
27260
27261/***/ }),
27262/* 274 */
27263/***/ (function(module, __webpack_exports__, __webpack_require__) {
27264
27265"use strict";
27266__webpack_require__.r(__webpack_exports__);
27267/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distinctUntilKeyChanged", function() { return distinctUntilKeyChanged; });
27268/* harmony import */ var _distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(273);
27269/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */
27270
27271function distinctUntilKeyChanged(key, compare) {
27272 return Object(_distinctUntilChanged__WEBPACK_IMPORTED_MODULE_0__["distinctUntilChanged"])(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });
27273}
27274//# sourceMappingURL=distinctUntilKeyChanged.js.map
27275
27276
27277/***/ }),
27278/* 275 */
27279/***/ (function(module, __webpack_exports__, __webpack_require__) {
27280
27281"use strict";
27282__webpack_require__.r(__webpack_exports__);
27283/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elementAt", function() { return elementAt; });
27284/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(201);
27285/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
27286/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(276);
27287/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(267);
27288/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(277);
27289/** PURE_IMPORTS_START _util_ArgumentOutOfRangeError,_filter,_throwIfEmpty,_defaultIfEmpty,_take PURE_IMPORTS_END */
27290
27291
27292
27293
27294
27295function elementAt(index, defaultValue) {
27296 if (index < 0) {
27297 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"]();
27298 }
27299 var hasDefaultValue = arguments.length >= 2;
27300 return function (source) {
27301 return source.pipe(Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return i === index; }), Object(_take__WEBPACK_IMPORTED_MODULE_4__["take"])(1), hasDefaultValue
27302 ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue)
27303 : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_2__["throwIfEmpty"])(function () { return new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_0__["ArgumentOutOfRangeError"](); }));
27304 };
27305}
27306//# sourceMappingURL=elementAt.js.map
27307
27308
27309/***/ }),
27310/* 276 */
27311/***/ (function(module, __webpack_exports__, __webpack_require__) {
27312
27313"use strict";
27314__webpack_require__.r(__webpack_exports__);
27315/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throwIfEmpty", function() { return throwIfEmpty; });
27316/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27317/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(202);
27318/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(150);
27319/** PURE_IMPORTS_START tslib,_util_EmptyError,_Subscriber PURE_IMPORTS_END */
27320
27321
27322
27323function throwIfEmpty(errorFactory) {
27324 if (errorFactory === void 0) {
27325 errorFactory = defaultErrorFactory;
27326 }
27327 return function (source) {
27328 return source.lift(new ThrowIfEmptyOperator(errorFactory));
27329 };
27330}
27331var ThrowIfEmptyOperator = /*@__PURE__*/ (function () {
27332 function ThrowIfEmptyOperator(errorFactory) {
27333 this.errorFactory = errorFactory;
27334 }
27335 ThrowIfEmptyOperator.prototype.call = function (subscriber, source) {
27336 return source.subscribe(new ThrowIfEmptySubscriber(subscriber, this.errorFactory));
27337 };
27338 return ThrowIfEmptyOperator;
27339}());
27340var ThrowIfEmptySubscriber = /*@__PURE__*/ (function (_super) {
27341 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrowIfEmptySubscriber, _super);
27342 function ThrowIfEmptySubscriber(destination, errorFactory) {
27343 var _this = _super.call(this, destination) || this;
27344 _this.errorFactory = errorFactory;
27345 _this.hasValue = false;
27346 return _this;
27347 }
27348 ThrowIfEmptySubscriber.prototype._next = function (value) {
27349 this.hasValue = true;
27350 this.destination.next(value);
27351 };
27352 ThrowIfEmptySubscriber.prototype._complete = function () {
27353 if (!this.hasValue) {
27354 var err = void 0;
27355 try {
27356 err = this.errorFactory();
27357 }
27358 catch (e) {
27359 err = e;
27360 }
27361 this.destination.error(err);
27362 }
27363 else {
27364 return this.destination.complete();
27365 }
27366 };
27367 return ThrowIfEmptySubscriber;
27368}(_Subscriber__WEBPACK_IMPORTED_MODULE_2__["Subscriber"]));
27369function defaultErrorFactory() {
27370 return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_1__["EmptyError"]();
27371}
27372//# sourceMappingURL=throwIfEmpty.js.map
27373
27374
27375/***/ }),
27376/* 277 */
27377/***/ (function(module, __webpack_exports__, __webpack_require__) {
27378
27379"use strict";
27380__webpack_require__.r(__webpack_exports__);
27381/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return take; });
27382/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27383/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
27384/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
27385/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
27386/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
27387
27388
27389
27390
27391function take(count) {
27392 return function (source) {
27393 if (count === 0) {
27394 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
27395 }
27396 else {
27397 return source.lift(new TakeOperator(count));
27398 }
27399 };
27400}
27401var TakeOperator = /*@__PURE__*/ (function () {
27402 function TakeOperator(total) {
27403 this.total = total;
27404 if (this.total < 0) {
27405 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
27406 }
27407 }
27408 TakeOperator.prototype.call = function (subscriber, source) {
27409 return source.subscribe(new TakeSubscriber(subscriber, this.total));
27410 };
27411 return TakeOperator;
27412}());
27413var TakeSubscriber = /*@__PURE__*/ (function (_super) {
27414 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeSubscriber, _super);
27415 function TakeSubscriber(destination, total) {
27416 var _this = _super.call(this, destination) || this;
27417 _this.total = total;
27418 _this.count = 0;
27419 return _this;
27420 }
27421 TakeSubscriber.prototype._next = function (value) {
27422 var total = this.total;
27423 var count = ++this.count;
27424 if (count <= total) {
27425 this.destination.next(value);
27426 if (count === total) {
27427 this.destination.complete();
27428 this.unsubscribe();
27429 }
27430 }
27431 };
27432 return TakeSubscriber;
27433}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27434//# sourceMappingURL=take.js.map
27435
27436
27437/***/ }),
27438/* 278 */
27439/***/ (function(module, __webpack_exports__, __webpack_require__) {
27440
27441"use strict";
27442__webpack_require__.r(__webpack_exports__);
27443/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endWith", function() { return endWith; });
27444/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(218);
27445/* harmony import */ var _observable_of__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(183);
27446/** PURE_IMPORTS_START _observable_concat,_observable_of PURE_IMPORTS_END */
27447
27448
27449function endWith() {
27450 var array = [];
27451 for (var _i = 0; _i < arguments.length; _i++) {
27452 array[_i] = arguments[_i];
27453 }
27454 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(source, _observable_of__WEBPACK_IMPORTED_MODULE_1__["of"].apply(void 0, array)); };
27455}
27456//# sourceMappingURL=endWith.js.map
27457
27458
27459/***/ }),
27460/* 279 */
27461/***/ (function(module, __webpack_exports__, __webpack_require__) {
27462
27463"use strict";
27464__webpack_require__.r(__webpack_exports__);
27465/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "every", function() { return every; });
27466/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27467/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
27468/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27469
27470
27471function every(predicate, thisArg) {
27472 return function (source) { return source.lift(new EveryOperator(predicate, thisArg, source)); };
27473}
27474var EveryOperator = /*@__PURE__*/ (function () {
27475 function EveryOperator(predicate, thisArg, source) {
27476 this.predicate = predicate;
27477 this.thisArg = thisArg;
27478 this.source = source;
27479 }
27480 EveryOperator.prototype.call = function (observer, source) {
27481 return source.subscribe(new EverySubscriber(observer, this.predicate, this.thisArg, this.source));
27482 };
27483 return EveryOperator;
27484}());
27485var EverySubscriber = /*@__PURE__*/ (function (_super) {
27486 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](EverySubscriber, _super);
27487 function EverySubscriber(destination, predicate, thisArg, source) {
27488 var _this = _super.call(this, destination) || this;
27489 _this.predicate = predicate;
27490 _this.thisArg = thisArg;
27491 _this.source = source;
27492 _this.index = 0;
27493 _this.thisArg = thisArg || _this;
27494 return _this;
27495 }
27496 EverySubscriber.prototype.notifyComplete = function (everyValueMatch) {
27497 this.destination.next(everyValueMatch);
27498 this.destination.complete();
27499 };
27500 EverySubscriber.prototype._next = function (value) {
27501 var result = false;
27502 try {
27503 result = this.predicate.call(this.thisArg, value, this.index++, this.source);
27504 }
27505 catch (err) {
27506 this.destination.error(err);
27507 return;
27508 }
27509 if (!result) {
27510 this.notifyComplete(false);
27511 }
27512 };
27513 EverySubscriber.prototype._complete = function () {
27514 this.notifyComplete(true);
27515 };
27516 return EverySubscriber;
27517}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27518//# sourceMappingURL=every.js.map
27519
27520
27521/***/ }),
27522/* 280 */
27523/***/ (function(module, __webpack_exports__, __webpack_require__) {
27524
27525"use strict";
27526__webpack_require__.r(__webpack_exports__);
27527/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaust", function() { return exhaust; });
27528/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27529/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
27530/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
27531/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
27532
27533
27534
27535function exhaust() {
27536 return function (source) { return source.lift(new SwitchFirstOperator()); };
27537}
27538var SwitchFirstOperator = /*@__PURE__*/ (function () {
27539 function SwitchFirstOperator() {
27540 }
27541 SwitchFirstOperator.prototype.call = function (subscriber, source) {
27542 return source.subscribe(new SwitchFirstSubscriber(subscriber));
27543 };
27544 return SwitchFirstOperator;
27545}());
27546var SwitchFirstSubscriber = /*@__PURE__*/ (function (_super) {
27547 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchFirstSubscriber, _super);
27548 function SwitchFirstSubscriber(destination) {
27549 var _this = _super.call(this, destination) || this;
27550 _this.hasCompleted = false;
27551 _this.hasSubscription = false;
27552 return _this;
27553 }
27554 SwitchFirstSubscriber.prototype._next = function (value) {
27555 if (!this.hasSubscription) {
27556 this.hasSubscription = true;
27557 this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, value));
27558 }
27559 };
27560 SwitchFirstSubscriber.prototype._complete = function () {
27561 this.hasCompleted = true;
27562 if (!this.hasSubscription) {
27563 this.destination.complete();
27564 }
27565 };
27566 SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {
27567 this.remove(innerSub);
27568 this.hasSubscription = false;
27569 if (this.hasCompleted) {
27570 this.destination.complete();
27571 }
27572 };
27573 return SwitchFirstSubscriber;
27574}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
27575//# sourceMappingURL=exhaust.js.map
27576
27577
27578/***/ }),
27579/* 281 */
27580/***/ (function(module, __webpack_exports__, __webpack_require__) {
27581
27582"use strict";
27583__webpack_require__.r(__webpack_exports__);
27584/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exhaustMap", function() { return exhaustMap; });
27585/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27586/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
27587/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
27588/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
27589/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(205);
27590/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(222);
27591/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
27592
27593
27594
27595
27596
27597
27598function exhaustMap(project, resultSelector) {
27599 if (resultSelector) {
27600 return function (source) { return source.pipe(exhaustMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
27601 }
27602 return function (source) {
27603 return source.lift(new ExhaustMapOperator(project));
27604 };
27605}
27606var ExhaustMapOperator = /*@__PURE__*/ (function () {
27607 function ExhaustMapOperator(project) {
27608 this.project = project;
27609 }
27610 ExhaustMapOperator.prototype.call = function (subscriber, source) {
27611 return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
27612 };
27613 return ExhaustMapOperator;
27614}());
27615var ExhaustMapSubscriber = /*@__PURE__*/ (function (_super) {
27616 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExhaustMapSubscriber, _super);
27617 function ExhaustMapSubscriber(destination, project) {
27618 var _this = _super.call(this, destination) || this;
27619 _this.project = project;
27620 _this.hasSubscription = false;
27621 _this.hasCompleted = false;
27622 _this.index = 0;
27623 return _this;
27624 }
27625 ExhaustMapSubscriber.prototype._next = function (value) {
27626 if (!this.hasSubscription) {
27627 this.tryNext(value);
27628 }
27629 };
27630 ExhaustMapSubscriber.prototype.tryNext = function (value) {
27631 var result;
27632 var index = this.index++;
27633 try {
27634 result = this.project(value, index);
27635 }
27636 catch (err) {
27637 this.destination.error(err);
27638 return;
27639 }
27640 this.hasSubscription = true;
27641 this._innerSub(result, value, index);
27642 };
27643 ExhaustMapSubscriber.prototype._innerSub = function (result, value, index) {
27644 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
27645 var destination = this.destination;
27646 destination.add(innerSubscriber);
27647 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, value, index, innerSubscriber);
27648 };
27649 ExhaustMapSubscriber.prototype._complete = function () {
27650 this.hasCompleted = true;
27651 if (!this.hasSubscription) {
27652 this.destination.complete();
27653 }
27654 this.unsubscribe();
27655 };
27656 ExhaustMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
27657 this.destination.next(innerValue);
27658 };
27659 ExhaustMapSubscriber.prototype.notifyError = function (err) {
27660 this.destination.error(err);
27661 };
27662 ExhaustMapSubscriber.prototype.notifyComplete = function (innerSub) {
27663 var destination = this.destination;
27664 destination.remove(innerSub);
27665 this.hasSubscription = false;
27666 if (this.hasCompleted) {
27667 this.destination.complete();
27668 }
27669 };
27670 return ExhaustMapSubscriber;
27671}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
27672//# sourceMappingURL=exhaustMap.js.map
27673
27674
27675/***/ }),
27676/* 282 */
27677/***/ (function(module, __webpack_exports__, __webpack_require__) {
27678
27679"use strict";
27680__webpack_require__.r(__webpack_exports__);
27681/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expand", function() { return expand; });
27682/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandOperator", function() { return ExpandOperator; });
27683/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpandSubscriber", function() { return ExpandSubscriber; });
27684/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27685/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
27686/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
27687/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
27688
27689
27690
27691function expand(project, concurrent, scheduler) {
27692 if (concurrent === void 0) {
27693 concurrent = Number.POSITIVE_INFINITY;
27694 }
27695 if (scheduler === void 0) {
27696 scheduler = undefined;
27697 }
27698 concurrent = (concurrent || 0) < 1 ? Number.POSITIVE_INFINITY : concurrent;
27699 return function (source) { return source.lift(new ExpandOperator(project, concurrent, scheduler)); };
27700}
27701var ExpandOperator = /*@__PURE__*/ (function () {
27702 function ExpandOperator(project, concurrent, scheduler) {
27703 this.project = project;
27704 this.concurrent = concurrent;
27705 this.scheduler = scheduler;
27706 }
27707 ExpandOperator.prototype.call = function (subscriber, source) {
27708 return source.subscribe(new ExpandSubscriber(subscriber, this.project, this.concurrent, this.scheduler));
27709 };
27710 return ExpandOperator;
27711}());
27712
27713var ExpandSubscriber = /*@__PURE__*/ (function (_super) {
27714 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ExpandSubscriber, _super);
27715 function ExpandSubscriber(destination, project, concurrent, scheduler) {
27716 var _this = _super.call(this, destination) || this;
27717 _this.project = project;
27718 _this.concurrent = concurrent;
27719 _this.scheduler = scheduler;
27720 _this.index = 0;
27721 _this.active = 0;
27722 _this.hasCompleted = false;
27723 if (concurrent < Number.POSITIVE_INFINITY) {
27724 _this.buffer = [];
27725 }
27726 return _this;
27727 }
27728 ExpandSubscriber.dispatch = function (arg) {
27729 var subscriber = arg.subscriber, result = arg.result, value = arg.value, index = arg.index;
27730 subscriber.subscribeToProjection(result, value, index);
27731 };
27732 ExpandSubscriber.prototype._next = function (value) {
27733 var destination = this.destination;
27734 if (destination.closed) {
27735 this._complete();
27736 return;
27737 }
27738 var index = this.index++;
27739 if (this.active < this.concurrent) {
27740 destination.next(value);
27741 try {
27742 var project = this.project;
27743 var result = project(value, index);
27744 if (!this.scheduler) {
27745 this.subscribeToProjection(result, value, index);
27746 }
27747 else {
27748 var state = { subscriber: this, result: result, value: value, index: index };
27749 var destination_1 = this.destination;
27750 destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
27751 }
27752 }
27753 catch (e) {
27754 destination.error(e);
27755 }
27756 }
27757 else {
27758 this.buffer.push(value);
27759 }
27760 };
27761 ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
27762 this.active++;
27763 var destination = this.destination;
27764 destination.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, result, value, index));
27765 };
27766 ExpandSubscriber.prototype._complete = function () {
27767 this.hasCompleted = true;
27768 if (this.hasCompleted && this.active === 0) {
27769 this.destination.complete();
27770 }
27771 this.unsubscribe();
27772 };
27773 ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
27774 this._next(innerValue);
27775 };
27776 ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
27777 var buffer = this.buffer;
27778 var destination = this.destination;
27779 destination.remove(innerSub);
27780 this.active--;
27781 if (buffer && buffer.length > 0) {
27782 this._next(buffer.shift());
27783 }
27784 if (this.hasCompleted && this.active === 0) {
27785 this.destination.complete();
27786 }
27787 };
27788 return ExpandSubscriber;
27789}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
27790
27791//# sourceMappingURL=expand.js.map
27792
27793
27794/***/ }),
27795/* 283 */
27796/***/ (function(module, __webpack_exports__, __webpack_require__) {
27797
27798"use strict";
27799__webpack_require__.r(__webpack_exports__);
27800/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finalize", function() { return finalize; });
27801/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27802/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
27803/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(156);
27804/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */
27805
27806
27807
27808function finalize(callback) {
27809 return function (source) { return source.lift(new FinallyOperator(callback)); };
27810}
27811var FinallyOperator = /*@__PURE__*/ (function () {
27812 function FinallyOperator(callback) {
27813 this.callback = callback;
27814 }
27815 FinallyOperator.prototype.call = function (subscriber, source) {
27816 return source.subscribe(new FinallySubscriber(subscriber, this.callback));
27817 };
27818 return FinallyOperator;
27819}());
27820var FinallySubscriber = /*@__PURE__*/ (function (_super) {
27821 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FinallySubscriber, _super);
27822 function FinallySubscriber(destination, callback) {
27823 var _this = _super.call(this, destination) || this;
27824 _this.add(new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"](callback));
27825 return _this;
27826 }
27827 return FinallySubscriber;
27828}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27829//# sourceMappingURL=finalize.js.map
27830
27831
27832/***/ }),
27833/* 284 */
27834/***/ (function(module, __webpack_exports__, __webpack_require__) {
27835
27836"use strict";
27837__webpack_require__.r(__webpack_exports__);
27838/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; });
27839/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueOperator", function() { return FindValueOperator; });
27840/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FindValueSubscriber", function() { return FindValueSubscriber; });
27841/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27842/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
27843/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27844
27845
27846function find(predicate, thisArg) {
27847 if (typeof predicate !== 'function') {
27848 throw new TypeError('predicate is not a function');
27849 }
27850 return function (source) { return source.lift(new FindValueOperator(predicate, source, false, thisArg)); };
27851}
27852var FindValueOperator = /*@__PURE__*/ (function () {
27853 function FindValueOperator(predicate, source, yieldIndex, thisArg) {
27854 this.predicate = predicate;
27855 this.source = source;
27856 this.yieldIndex = yieldIndex;
27857 this.thisArg = thisArg;
27858 }
27859 FindValueOperator.prototype.call = function (observer, source) {
27860 return source.subscribe(new FindValueSubscriber(observer, this.predicate, this.source, this.yieldIndex, this.thisArg));
27861 };
27862 return FindValueOperator;
27863}());
27864
27865var FindValueSubscriber = /*@__PURE__*/ (function (_super) {
27866 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](FindValueSubscriber, _super);
27867 function FindValueSubscriber(destination, predicate, source, yieldIndex, thisArg) {
27868 var _this = _super.call(this, destination) || this;
27869 _this.predicate = predicate;
27870 _this.source = source;
27871 _this.yieldIndex = yieldIndex;
27872 _this.thisArg = thisArg;
27873 _this.index = 0;
27874 return _this;
27875 }
27876 FindValueSubscriber.prototype.notifyComplete = function (value) {
27877 var destination = this.destination;
27878 destination.next(value);
27879 destination.complete();
27880 this.unsubscribe();
27881 };
27882 FindValueSubscriber.prototype._next = function (value) {
27883 var _a = this, predicate = _a.predicate, thisArg = _a.thisArg;
27884 var index = this.index++;
27885 try {
27886 var result = predicate.call(thisArg || this, value, index, this.source);
27887 if (result) {
27888 this.notifyComplete(this.yieldIndex ? index : value);
27889 }
27890 }
27891 catch (err) {
27892 this.destination.error(err);
27893 }
27894 };
27895 FindValueSubscriber.prototype._complete = function () {
27896 this.notifyComplete(this.yieldIndex ? -1 : undefined);
27897 };
27898 return FindValueSubscriber;
27899}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27900
27901//# sourceMappingURL=find.js.map
27902
27903
27904/***/ }),
27905/* 285 */
27906/***/ (function(module, __webpack_exports__, __webpack_require__) {
27907
27908"use strict";
27909__webpack_require__.r(__webpack_exports__);
27910/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findIndex", function() { return findIndex; });
27911/* harmony import */ var _operators_find__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(284);
27912/** PURE_IMPORTS_START _operators_find PURE_IMPORTS_END */
27913
27914function findIndex(predicate, thisArg) {
27915 return function (source) { return source.lift(new _operators_find__WEBPACK_IMPORTED_MODULE_0__["FindValueOperator"](predicate, source, true, thisArg)); };
27916}
27917//# sourceMappingURL=findIndex.js.map
27918
27919
27920/***/ }),
27921/* 286 */
27922/***/ (function(module, __webpack_exports__, __webpack_require__) {
27923
27924"use strict";
27925__webpack_require__.r(__webpack_exports__);
27926/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "first", function() { return first; });
27927/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(202);
27928/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
27929/* harmony import */ var _take__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(277);
27930/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(267);
27931/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(276);
27932/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(199);
27933/** PURE_IMPORTS_START _util_EmptyError,_filter,_take,_defaultIfEmpty,_throwIfEmpty,_util_identity PURE_IMPORTS_END */
27934
27935
27936
27937
27938
27939
27940function first(predicate, defaultValue) {
27941 var hasDefaultValue = arguments.length >= 2;
27942 return function (source) { return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_take__WEBPACK_IMPORTED_MODULE_2__["take"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_3__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_4__["throwIfEmpty"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); })); };
27943}
27944//# sourceMappingURL=first.js.map
27945
27946
27947/***/ }),
27948/* 287 */
27949/***/ (function(module, __webpack_exports__, __webpack_require__) {
27950
27951"use strict";
27952__webpack_require__.r(__webpack_exports__);
27953/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ignoreElements", function() { return ignoreElements; });
27954/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27955/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
27956/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27957
27958
27959function ignoreElements() {
27960 return function ignoreElementsOperatorFunction(source) {
27961 return source.lift(new IgnoreElementsOperator());
27962 };
27963}
27964var IgnoreElementsOperator = /*@__PURE__*/ (function () {
27965 function IgnoreElementsOperator() {
27966 }
27967 IgnoreElementsOperator.prototype.call = function (subscriber, source) {
27968 return source.subscribe(new IgnoreElementsSubscriber(subscriber));
27969 };
27970 return IgnoreElementsOperator;
27971}());
27972var IgnoreElementsSubscriber = /*@__PURE__*/ (function (_super) {
27973 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IgnoreElementsSubscriber, _super);
27974 function IgnoreElementsSubscriber() {
27975 return _super !== null && _super.apply(this, arguments) || this;
27976 }
27977 IgnoreElementsSubscriber.prototype._next = function (unused) {
27978 };
27979 return IgnoreElementsSubscriber;
27980}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
27981//# sourceMappingURL=ignoreElements.js.map
27982
27983
27984/***/ }),
27985/* 288 */
27986/***/ (function(module, __webpack_exports__, __webpack_require__) {
27987
27988"use strict";
27989__webpack_require__.r(__webpack_exports__);
27990/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
27991/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
27992/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
27993/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
27994
27995
27996function isEmpty() {
27997 return function (source) { return source.lift(new IsEmptyOperator()); };
27998}
27999var IsEmptyOperator = /*@__PURE__*/ (function () {
28000 function IsEmptyOperator() {
28001 }
28002 IsEmptyOperator.prototype.call = function (observer, source) {
28003 return source.subscribe(new IsEmptySubscriber(observer));
28004 };
28005 return IsEmptyOperator;
28006}());
28007var IsEmptySubscriber = /*@__PURE__*/ (function (_super) {
28008 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](IsEmptySubscriber, _super);
28009 function IsEmptySubscriber(destination) {
28010 return _super.call(this, destination) || this;
28011 }
28012 IsEmptySubscriber.prototype.notifyComplete = function (isEmpty) {
28013 var destination = this.destination;
28014 destination.next(isEmpty);
28015 destination.complete();
28016 };
28017 IsEmptySubscriber.prototype._next = function (value) {
28018 this.notifyComplete(false);
28019 };
28020 IsEmptySubscriber.prototype._complete = function () {
28021 this.notifyComplete(true);
28022 };
28023 return IsEmptySubscriber;
28024}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28025//# sourceMappingURL=isEmpty.js.map
28026
28027
28028/***/ }),
28029/* 289 */
28030/***/ (function(module, __webpack_exports__, __webpack_require__) {
28031
28032"use strict";
28033__webpack_require__.r(__webpack_exports__);
28034/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "last", function() { return last; });
28035/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(202);
28036/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
28037/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(290);
28038/* harmony import */ var _throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(276);
28039/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(267);
28040/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(199);
28041/** PURE_IMPORTS_START _util_EmptyError,_filter,_takeLast,_throwIfEmpty,_defaultIfEmpty,_util_identity PURE_IMPORTS_END */
28042
28043
28044
28045
28046
28047
28048function last(predicate, defaultValue) {
28049 var hasDefaultValue = arguments.length >= 2;
28050 return function (source) { return source.pipe(predicate ? Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(function (v, i) { return predicate(v, i, source); }) : _util_identity__WEBPACK_IMPORTED_MODULE_5__["identity"], Object(_takeLast__WEBPACK_IMPORTED_MODULE_2__["takeLast"])(1), hasDefaultValue ? Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_4__["defaultIfEmpty"])(defaultValue) : Object(_throwIfEmpty__WEBPACK_IMPORTED_MODULE_3__["throwIfEmpty"])(function () { return new _util_EmptyError__WEBPACK_IMPORTED_MODULE_0__["EmptyError"](); })); };
28051}
28052//# sourceMappingURL=last.js.map
28053
28054
28055/***/ }),
28056/* 290 */
28057/***/ (function(module, __webpack_exports__, __webpack_require__) {
28058
28059"use strict";
28060__webpack_require__.r(__webpack_exports__);
28061/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeLast", function() { return takeLast; });
28062/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
28063/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
28064/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
28065/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(182);
28066/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */
28067
28068
28069
28070
28071function takeLast(count) {
28072 return function takeLastOperatorFunction(source) {
28073 if (count === 0) {
28074 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_3__["empty"])();
28075 }
28076 else {
28077 return source.lift(new TakeLastOperator(count));
28078 }
28079 };
28080}
28081var TakeLastOperator = /*@__PURE__*/ (function () {
28082 function TakeLastOperator(total) {
28083 this.total = total;
28084 if (this.total < 0) {
28085 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
28086 }
28087 }
28088 TakeLastOperator.prototype.call = function (subscriber, source) {
28089 return source.subscribe(new TakeLastSubscriber(subscriber, this.total));
28090 };
28091 return TakeLastOperator;
28092}());
28093var TakeLastSubscriber = /*@__PURE__*/ (function (_super) {
28094 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeLastSubscriber, _super);
28095 function TakeLastSubscriber(destination, total) {
28096 var _this = _super.call(this, destination) || this;
28097 _this.total = total;
28098 _this.ring = new Array();
28099 _this.count = 0;
28100 return _this;
28101 }
28102 TakeLastSubscriber.prototype._next = function (value) {
28103 var ring = this.ring;
28104 var total = this.total;
28105 var count = this.count++;
28106 if (ring.length < total) {
28107 ring.push(value);
28108 }
28109 else {
28110 var index = count % total;
28111 ring[index] = value;
28112 }
28113 };
28114 TakeLastSubscriber.prototype._complete = function () {
28115 var destination = this.destination;
28116 var count = this.count;
28117 if (count > 0) {
28118 var total = this.count >= this.total ? this.total : this.count;
28119 var ring = this.ring;
28120 for (var i = 0; i < total; i++) {
28121 var idx = (count++) % total;
28122 destination.next(ring[idx]);
28123 }
28124 }
28125 destination.complete();
28126 };
28127 return TakeLastSubscriber;
28128}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28129//# sourceMappingURL=takeLast.js.map
28130
28131
28132/***/ }),
28133/* 291 */
28134/***/ (function(module, __webpack_exports__, __webpack_require__) {
28135
28136"use strict";
28137__webpack_require__.r(__webpack_exports__);
28138/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapTo", function() { return mapTo; });
28139/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
28140/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
28141/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
28142
28143
28144function mapTo(value) {
28145 return function (source) { return source.lift(new MapToOperator(value)); };
28146}
28147var MapToOperator = /*@__PURE__*/ (function () {
28148 function MapToOperator(value) {
28149 this.value = value;
28150 }
28151 MapToOperator.prototype.call = function (subscriber, source) {
28152 return source.subscribe(new MapToSubscriber(subscriber, this.value));
28153 };
28154 return MapToOperator;
28155}());
28156var MapToSubscriber = /*@__PURE__*/ (function (_super) {
28157 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MapToSubscriber, _super);
28158 function MapToSubscriber(destination, value) {
28159 var _this = _super.call(this, destination) || this;
28160 _this.value = value;
28161 return _this;
28162 }
28163 MapToSubscriber.prototype._next = function (x) {
28164 this.destination.next(this.value);
28165 };
28166 return MapToSubscriber;
28167}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28168//# sourceMappingURL=mapTo.js.map
28169
28170
28171/***/ }),
28172/* 292 */
28173/***/ (function(module, __webpack_exports__, __webpack_require__) {
28174
28175"use strict";
28176__webpack_require__.r(__webpack_exports__);
28177/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "materialize", function() { return materialize; });
28178/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
28179/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
28180/* harmony import */ var _Notification__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(181);
28181/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
28182
28183
28184
28185function materialize() {
28186 return function materializeOperatorFunction(source) {
28187 return source.lift(new MaterializeOperator());
28188 };
28189}
28190var MaterializeOperator = /*@__PURE__*/ (function () {
28191 function MaterializeOperator() {
28192 }
28193 MaterializeOperator.prototype.call = function (subscriber, source) {
28194 return source.subscribe(new MaterializeSubscriber(subscriber));
28195 };
28196 return MaterializeOperator;
28197}());
28198var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
28199 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MaterializeSubscriber, _super);
28200 function MaterializeSubscriber(destination) {
28201 return _super.call(this, destination) || this;
28202 }
28203 MaterializeSubscriber.prototype._next = function (value) {
28204 this.destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createNext(value));
28205 };
28206 MaterializeSubscriber.prototype._error = function (err) {
28207 var destination = this.destination;
28208 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createError(err));
28209 destination.complete();
28210 };
28211 MaterializeSubscriber.prototype._complete = function () {
28212 var destination = this.destination;
28213 destination.next(_Notification__WEBPACK_IMPORTED_MODULE_2__["Notification"].createComplete());
28214 destination.complete();
28215 };
28216 return MaterializeSubscriber;
28217}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28218//# sourceMappingURL=materialize.js.map
28219
28220
28221/***/ }),
28222/* 293 */
28223/***/ (function(module, __webpack_exports__, __webpack_require__) {
28224
28225"use strict";
28226__webpack_require__.r(__webpack_exports__);
28227/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
28228/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(294);
28229/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
28230
28231function max(comparer) {
28232 var max = (typeof comparer === 'function')
28233 ? function (x, y) { return comparer(x, y) > 0 ? x : y; }
28234 : function (x, y) { return x > y ? x : y; };
28235 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max);
28236}
28237//# sourceMappingURL=max.js.map
28238
28239
28240/***/ }),
28241/* 294 */
28242/***/ (function(module, __webpack_exports__, __webpack_require__) {
28243
28244"use strict";
28245__webpack_require__.r(__webpack_exports__);
28246/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return reduce; });
28247/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(295);
28248/* harmony import */ var _takeLast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(290);
28249/* harmony import */ var _defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(267);
28250/* harmony import */ var _util_pipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(163);
28251/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
28252
28253
28254
28255
28256function reduce(accumulator, seed) {
28257 if (arguments.length >= 2) {
28258 return function reduceOperatorFunctionWithSeed(source) {
28259 return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(accumulator, seed), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1), Object(_defaultIfEmpty__WEBPACK_IMPORTED_MODULE_2__["defaultIfEmpty"])(seed))(source);
28260 };
28261 }
28262 return function reduceOperatorFunction(source) {
28263 return Object(_util_pipe__WEBPACK_IMPORTED_MODULE_3__["pipe"])(Object(_scan__WEBPACK_IMPORTED_MODULE_0__["scan"])(function (acc, value, index) { return accumulator(acc, value, index + 1); }), Object(_takeLast__WEBPACK_IMPORTED_MODULE_1__["takeLast"])(1))(source);
28264 };
28265}
28266//# sourceMappingURL=reduce.js.map
28267
28268
28269/***/ }),
28270/* 295 */
28271/***/ (function(module, __webpack_exports__, __webpack_require__) {
28272
28273"use strict";
28274__webpack_require__.r(__webpack_exports__);
28275/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return scan; });
28276/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
28277/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
28278/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
28279
28280
28281function scan(accumulator, seed) {
28282 var hasSeed = false;
28283 if (arguments.length >= 2) {
28284 hasSeed = true;
28285 }
28286 return function scanOperatorFunction(source) {
28287 return source.lift(new ScanOperator(accumulator, seed, hasSeed));
28288 };
28289}
28290var ScanOperator = /*@__PURE__*/ (function () {
28291 function ScanOperator(accumulator, seed, hasSeed) {
28292 if (hasSeed === void 0) {
28293 hasSeed = false;
28294 }
28295 this.accumulator = accumulator;
28296 this.seed = seed;
28297 this.hasSeed = hasSeed;
28298 }
28299 ScanOperator.prototype.call = function (subscriber, source) {
28300 return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));
28301 };
28302 return ScanOperator;
28303}());
28304var ScanSubscriber = /*@__PURE__*/ (function (_super) {
28305 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ScanSubscriber, _super);
28306 function ScanSubscriber(destination, accumulator, _seed, hasSeed) {
28307 var _this = _super.call(this, destination) || this;
28308 _this.accumulator = accumulator;
28309 _this._seed = _seed;
28310 _this.hasSeed = hasSeed;
28311 _this.index = 0;
28312 return _this;
28313 }
28314 Object.defineProperty(ScanSubscriber.prototype, "seed", {
28315 get: function () {
28316 return this._seed;
28317 },
28318 set: function (value) {
28319 this.hasSeed = true;
28320 this._seed = value;
28321 },
28322 enumerable: true,
28323 configurable: true
28324 });
28325 ScanSubscriber.prototype._next = function (value) {
28326 if (!this.hasSeed) {
28327 this.seed = value;
28328 this.destination.next(value);
28329 }
28330 else {
28331 return this._tryNext(value);
28332 }
28333 };
28334 ScanSubscriber.prototype._tryNext = function (value) {
28335 var index = this.index++;
28336 var result;
28337 try {
28338 result = this.accumulator(this.seed, value, index);
28339 }
28340 catch (err) {
28341 this.destination.error(err);
28342 }
28343 this.seed = result;
28344 this.destination.next(result);
28345 };
28346 return ScanSubscriber;
28347}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28348//# sourceMappingURL=scan.js.map
28349
28350
28351/***/ }),
28352/* 296 */
28353/***/ (function(module, __webpack_exports__, __webpack_require__) {
28354
28355"use strict";
28356__webpack_require__.r(__webpack_exports__);
28357/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
28358/* harmony import */ var _observable_merge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(237);
28359/** PURE_IMPORTS_START _observable_merge PURE_IMPORTS_END */
28360
28361function merge() {
28362 var observables = [];
28363 for (var _i = 0; _i < arguments.length; _i++) {
28364 observables[_i] = arguments[_i];
28365 }
28366 return function (source) { return source.lift.call(_observable_merge__WEBPACK_IMPORTED_MODULE_0__["merge"].apply(void 0, [source].concat(observables))); };
28367}
28368//# sourceMappingURL=merge.js.map
28369
28370
28371/***/ }),
28372/* 297 */
28373/***/ (function(module, __webpack_exports__, __webpack_require__) {
28374
28375"use strict";
28376__webpack_require__.r(__webpack_exports__);
28377/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeMapTo", function() { return mergeMapTo; });
28378/* harmony import */ var _mergeMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(221);
28379/** PURE_IMPORTS_START _mergeMap PURE_IMPORTS_END */
28380
28381function mergeMapTo(innerObservable, resultSelector, concurrent) {
28382 if (concurrent === void 0) {
28383 concurrent = Number.POSITIVE_INFINITY;
28384 }
28385 if (typeof resultSelector === 'function') {
28386 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, resultSelector, concurrent);
28387 }
28388 if (typeof resultSelector === 'number') {
28389 concurrent = resultSelector;
28390 }
28391 return Object(_mergeMap__WEBPACK_IMPORTED_MODULE_0__["mergeMap"])(function () { return innerObservable; }, concurrent);
28392}
28393//# sourceMappingURL=mergeMapTo.js.map
28394
28395
28396/***/ }),
28397/* 298 */
28398/***/ (function(module, __webpack_exports__, __webpack_require__) {
28399
28400"use strict";
28401__webpack_require__.r(__webpack_exports__);
28402/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeScan", function() { return mergeScan; });
28403/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanOperator", function() { return MergeScanOperator; });
28404/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MergeScanSubscriber", function() { return MergeScanSubscriber; });
28405/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
28406/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(209);
28407/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
28408/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(210);
28409/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber PURE_IMPORTS_END */
28410
28411
28412
28413
28414function mergeScan(accumulator, seed, concurrent) {
28415 if (concurrent === void 0) {
28416 concurrent = Number.POSITIVE_INFINITY;
28417 }
28418 return function (source) { return source.lift(new MergeScanOperator(accumulator, seed, concurrent)); };
28419}
28420var MergeScanOperator = /*@__PURE__*/ (function () {
28421 function MergeScanOperator(accumulator, seed, concurrent) {
28422 this.accumulator = accumulator;
28423 this.seed = seed;
28424 this.concurrent = concurrent;
28425 }
28426 MergeScanOperator.prototype.call = function (subscriber, source) {
28427 return source.subscribe(new MergeScanSubscriber(subscriber, this.accumulator, this.seed, this.concurrent));
28428 };
28429 return MergeScanOperator;
28430}());
28431
28432var MergeScanSubscriber = /*@__PURE__*/ (function (_super) {
28433 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](MergeScanSubscriber, _super);
28434 function MergeScanSubscriber(destination, accumulator, acc, concurrent) {
28435 var _this = _super.call(this, destination) || this;
28436 _this.accumulator = accumulator;
28437 _this.acc = acc;
28438 _this.concurrent = concurrent;
28439 _this.hasValue = false;
28440 _this.hasCompleted = false;
28441 _this.buffer = [];
28442 _this.active = 0;
28443 _this.index = 0;
28444 return _this;
28445 }
28446 MergeScanSubscriber.prototype._next = function (value) {
28447 if (this.active < this.concurrent) {
28448 var index = this.index++;
28449 var destination = this.destination;
28450 var ish = void 0;
28451 try {
28452 var accumulator = this.accumulator;
28453 ish = accumulator(this.acc, value, index);
28454 }
28455 catch (e) {
28456 return destination.error(e);
28457 }
28458 this.active++;
28459 this._innerSub(ish, value, index);
28460 }
28461 else {
28462 this.buffer.push(value);
28463 }
28464 };
28465 MergeScanSubscriber.prototype._innerSub = function (ish, value, index) {
28466 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_3__["InnerSubscriber"](this, undefined, undefined);
28467 var destination = this.destination;
28468 destination.add(innerSubscriber);
28469 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_1__["subscribeToResult"])(this, ish, value, index, innerSubscriber);
28470 };
28471 MergeScanSubscriber.prototype._complete = function () {
28472 this.hasCompleted = true;
28473 if (this.active === 0 && this.buffer.length === 0) {
28474 if (this.hasValue === false) {
28475 this.destination.next(this.acc);
28476 }
28477 this.destination.complete();
28478 }
28479 this.unsubscribe();
28480 };
28481 MergeScanSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28482 var destination = this.destination;
28483 this.acc = innerValue;
28484 this.hasValue = true;
28485 destination.next(innerValue);
28486 };
28487 MergeScanSubscriber.prototype.notifyComplete = function (innerSub) {
28488 var buffer = this.buffer;
28489 var destination = this.destination;
28490 destination.remove(innerSub);
28491 this.active--;
28492 if (buffer.length > 0) {
28493 this._next(buffer.shift());
28494 }
28495 else if (this.active === 0 && this.hasCompleted) {
28496 if (this.hasValue === false) {
28497 this.destination.next(this.acc);
28498 }
28499 this.destination.complete();
28500 }
28501 };
28502 return MergeScanSubscriber;
28503}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
28504
28505//# sourceMappingURL=mergeScan.js.map
28506
28507
28508/***/ }),
28509/* 299 */
28510/***/ (function(module, __webpack_exports__, __webpack_require__) {
28511
28512"use strict";
28513__webpack_require__.r(__webpack_exports__);
28514/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
28515/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(294);
28516/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
28517
28518function min(comparer) {
28519 var min = (typeof comparer === 'function')
28520 ? function (x, y) { return comparer(x, y) < 0 ? x : y; }
28521 : function (x, y) { return x < y ? x : y; };
28522 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(min);
28523}
28524//# sourceMappingURL=min.js.map
28525
28526
28527/***/ }),
28528/* 300 */
28529/***/ (function(module, __webpack_exports__, __webpack_require__) {
28530
28531"use strict";
28532__webpack_require__.r(__webpack_exports__);
28533/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "multicast", function() { return multicast; });
28534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MulticastOperator", function() { return MulticastOperator; });
28535/* harmony import */ var _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(165);
28536/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */
28537
28538function multicast(subjectOrSubjectFactory, selector) {
28539 return function multicastOperatorFunction(source) {
28540 var subjectFactory;
28541 if (typeof subjectOrSubjectFactory === 'function') {
28542 subjectFactory = subjectOrSubjectFactory;
28543 }
28544 else {
28545 subjectFactory = function subjectFactory() {
28546 return subjectOrSubjectFactory;
28547 };
28548 }
28549 if (typeof selector === 'function') {
28550 return source.lift(new MulticastOperator(subjectFactory, selector));
28551 }
28552 var connectable = Object.create(source, _observable_ConnectableObservable__WEBPACK_IMPORTED_MODULE_0__["connectableObservableDescriptor"]);
28553 connectable.source = source;
28554 connectable.subjectFactory = subjectFactory;
28555 return connectable;
28556 };
28557}
28558var MulticastOperator = /*@__PURE__*/ (function () {
28559 function MulticastOperator(subjectFactory, selector) {
28560 this.subjectFactory = subjectFactory;
28561 this.selector = selector;
28562 }
28563 MulticastOperator.prototype.call = function (subscriber, source) {
28564 var selector = this.selector;
28565 var subject = this.subjectFactory();
28566 var subscription = selector(subject).subscribe(subscriber);
28567 subscription.add(source.subscribe(subject));
28568 return subscription;
28569 };
28570 return MulticastOperator;
28571}());
28572
28573//# sourceMappingURL=multicast.js.map
28574
28575
28576/***/ }),
28577/* 301 */
28578/***/ (function(module, __webpack_exports__, __webpack_require__) {
28579
28580"use strict";
28581__webpack_require__.r(__webpack_exports__);
28582/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNext", function() { return onErrorResumeNext; });
28583/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onErrorResumeNextStatic", function() { return onErrorResumeNextStatic; });
28584/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
28585/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(222);
28586/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(157);
28587/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
28588/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(210);
28589/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(209);
28590/** PURE_IMPORTS_START tslib,_observable_from,_util_isArray,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
28591
28592
28593
28594
28595
28596
28597function onErrorResumeNext() {
28598 var nextSources = [];
28599 for (var _i = 0; _i < arguments.length; _i++) {
28600 nextSources[_i] = arguments[_i];
28601 }
28602 if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
28603 nextSources = nextSources[0];
28604 }
28605 return function (source) { return source.lift(new OnErrorResumeNextOperator(nextSources)); };
28606}
28607function onErrorResumeNextStatic() {
28608 var nextSources = [];
28609 for (var _i = 0; _i < arguments.length; _i++) {
28610 nextSources[_i] = arguments[_i];
28611 }
28612 var source = null;
28613 if (nextSources.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_2__["isArray"])(nextSources[0])) {
28614 nextSources = nextSources[0];
28615 }
28616 source = nextSources.shift();
28617 return Object(_observable_from__WEBPACK_IMPORTED_MODULE_1__["from"])(source, null).lift(new OnErrorResumeNextOperator(nextSources));
28618}
28619var OnErrorResumeNextOperator = /*@__PURE__*/ (function () {
28620 function OnErrorResumeNextOperator(nextSources) {
28621 this.nextSources = nextSources;
28622 }
28623 OnErrorResumeNextOperator.prototype.call = function (subscriber, source) {
28624 return source.subscribe(new OnErrorResumeNextSubscriber(subscriber, this.nextSources));
28625 };
28626 return OnErrorResumeNextOperator;
28627}());
28628var OnErrorResumeNextSubscriber = /*@__PURE__*/ (function (_super) {
28629 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](OnErrorResumeNextSubscriber, _super);
28630 function OnErrorResumeNextSubscriber(destination, nextSources) {
28631 var _this = _super.call(this, destination) || this;
28632 _this.destination = destination;
28633 _this.nextSources = nextSources;
28634 return _this;
28635 }
28636 OnErrorResumeNextSubscriber.prototype.notifyError = function (error, innerSub) {
28637 this.subscribeToNextSource();
28638 };
28639 OnErrorResumeNextSubscriber.prototype.notifyComplete = function (innerSub) {
28640 this.subscribeToNextSource();
28641 };
28642 OnErrorResumeNextSubscriber.prototype._error = function (err) {
28643 this.subscribeToNextSource();
28644 this.unsubscribe();
28645 };
28646 OnErrorResumeNextSubscriber.prototype._complete = function () {
28647 this.subscribeToNextSource();
28648 this.unsubscribe();
28649 };
28650 OnErrorResumeNextSubscriber.prototype.subscribeToNextSource = function () {
28651 var next = this.nextSources.shift();
28652 if (!!next) {
28653 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_4__["InnerSubscriber"](this, undefined, undefined);
28654 var destination = this.destination;
28655 destination.add(innerSubscriber);
28656 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_5__["subscribeToResult"])(this, next, undefined, undefined, innerSubscriber);
28657 }
28658 else {
28659 this.destination.complete();
28660 }
28661 };
28662 return OnErrorResumeNextSubscriber;
28663}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
28664//# sourceMappingURL=onErrorResumeNext.js.map
28665
28666
28667/***/ }),
28668/* 302 */
28669/***/ (function(module, __webpack_exports__, __webpack_require__) {
28670
28671"use strict";
28672__webpack_require__.r(__webpack_exports__);
28673/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pairwise", function() { return pairwise; });
28674/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
28675/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
28676/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
28677
28678
28679function pairwise() {
28680 return function (source) { return source.lift(new PairwiseOperator()); };
28681}
28682var PairwiseOperator = /*@__PURE__*/ (function () {
28683 function PairwiseOperator() {
28684 }
28685 PairwiseOperator.prototype.call = function (subscriber, source) {
28686 return source.subscribe(new PairwiseSubscriber(subscriber));
28687 };
28688 return PairwiseOperator;
28689}());
28690var PairwiseSubscriber = /*@__PURE__*/ (function (_super) {
28691 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](PairwiseSubscriber, _super);
28692 function PairwiseSubscriber(destination) {
28693 var _this = _super.call(this, destination) || this;
28694 _this.hasPrev = false;
28695 return _this;
28696 }
28697 PairwiseSubscriber.prototype._next = function (value) {
28698 var pair;
28699 if (this.hasPrev) {
28700 pair = [this.prev, value];
28701 }
28702 else {
28703 this.hasPrev = true;
28704 }
28705 this.prev = value;
28706 if (pair) {
28707 this.destination.next(pair);
28708 }
28709 };
28710 return PairwiseSubscriber;
28711}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28712//# sourceMappingURL=pairwise.js.map
28713
28714
28715/***/ }),
28716/* 303 */
28717/***/ (function(module, __webpack_exports__, __webpack_require__) {
28718
28719"use strict";
28720__webpack_require__.r(__webpack_exports__);
28721/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return partition; });
28722/* harmony import */ var _util_not__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
28723/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(243);
28724/** PURE_IMPORTS_START _util_not,_filter PURE_IMPORTS_END */
28725
28726
28727function partition(predicate, thisArg) {
28728 return function (source) {
28729 return [
28730 Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(predicate, thisArg)(source),
28731 Object(_filter__WEBPACK_IMPORTED_MODULE_1__["filter"])(Object(_util_not__WEBPACK_IMPORTED_MODULE_0__["not"])(predicate, thisArg))(source)
28732 ];
28733 };
28734}
28735//# sourceMappingURL=partition.js.map
28736
28737
28738/***/ }),
28739/* 304 */
28740/***/ (function(module, __webpack_exports__, __webpack_require__) {
28741
28742"use strict";
28743__webpack_require__.r(__webpack_exports__);
28744/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pluck", function() { return pluck; });
28745/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(205);
28746/** PURE_IMPORTS_START _map PURE_IMPORTS_END */
28747
28748function pluck() {
28749 var properties = [];
28750 for (var _i = 0; _i < arguments.length; _i++) {
28751 properties[_i] = arguments[_i];
28752 }
28753 var length = properties.length;
28754 if (length === 0) {
28755 throw new Error('list of properties cannot be empty.');
28756 }
28757 return function (source) { return Object(_map__WEBPACK_IMPORTED_MODULE_0__["map"])(plucker(properties, length))(source); };
28758}
28759function plucker(props, length) {
28760 var mapper = function (x) {
28761 var currentProp = x;
28762 for (var i = 0; i < length; i++) {
28763 var p = currentProp[props[i]];
28764 if (typeof p !== 'undefined') {
28765 currentProp = p;
28766 }
28767 else {
28768 return undefined;
28769 }
28770 }
28771 return currentProp;
28772 };
28773 return mapper;
28774}
28775//# sourceMappingURL=pluck.js.map
28776
28777
28778/***/ }),
28779/* 305 */
28780/***/ (function(module, __webpack_exports__, __webpack_require__) {
28781
28782"use strict";
28783__webpack_require__.r(__webpack_exports__);
28784/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; });
28785/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(166);
28786/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(300);
28787/** PURE_IMPORTS_START _Subject,_multicast PURE_IMPORTS_END */
28788
28789
28790function publish(selector) {
28791 return selector ?
28792 Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"](); }, selector) :
28793 Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _Subject__WEBPACK_IMPORTED_MODULE_0__["Subject"]());
28794}
28795//# sourceMappingURL=publish.js.map
28796
28797
28798/***/ }),
28799/* 306 */
28800/***/ (function(module, __webpack_exports__, __webpack_require__) {
28801
28802"use strict";
28803__webpack_require__.r(__webpack_exports__);
28804/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishBehavior", function() { return publishBehavior; });
28805/* harmony import */ var _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(171);
28806/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(300);
28807/** PURE_IMPORTS_START _BehaviorSubject,_multicast PURE_IMPORTS_END */
28808
28809
28810function publishBehavior(value) {
28811 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _BehaviorSubject__WEBPACK_IMPORTED_MODULE_0__["BehaviorSubject"](value))(source); };
28812}
28813//# sourceMappingURL=publishBehavior.js.map
28814
28815
28816/***/ }),
28817/* 307 */
28818/***/ (function(module, __webpack_exports__, __webpack_require__) {
28819
28820"use strict";
28821__webpack_require__.r(__webpack_exports__);
28822/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishLast", function() { return publishLast; });
28823/* harmony import */ var _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(189);
28824/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(300);
28825/** PURE_IMPORTS_START _AsyncSubject,_multicast PURE_IMPORTS_END */
28826
28827
28828function publishLast() {
28829 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(new _AsyncSubject__WEBPACK_IMPORTED_MODULE_0__["AsyncSubject"]())(source); };
28830}
28831//# sourceMappingURL=publishLast.js.map
28832
28833
28834/***/ }),
28835/* 308 */
28836/***/ (function(module, __webpack_exports__, __webpack_require__) {
28837
28838"use strict";
28839__webpack_require__.r(__webpack_exports__);
28840/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishReplay", function() { return publishReplay; });
28841/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
28842/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(300);
28843/** PURE_IMPORTS_START _ReplaySubject,_multicast PURE_IMPORTS_END */
28844
28845
28846function publishReplay(bufferSize, windowTime, selectorOrScheduler, scheduler) {
28847 if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
28848 scheduler = selectorOrScheduler;
28849 }
28850 var selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
28851 var subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
28852 return function (source) { return Object(_multicast__WEBPACK_IMPORTED_MODULE_1__["multicast"])(function () { return subject; }, selector)(source); };
28853}
28854//# sourceMappingURL=publishReplay.js.map
28855
28856
28857/***/ }),
28858/* 309 */
28859/***/ (function(module, __webpack_exports__, __webpack_require__) {
28860
28861"use strict";
28862__webpack_require__.r(__webpack_exports__);
28863/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "race", function() { return race; });
28864/* harmony import */ var _util_isArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(157);
28865/* harmony import */ var _observable_race__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(244);
28866/** PURE_IMPORTS_START _util_isArray,_observable_race PURE_IMPORTS_END */
28867
28868
28869function race() {
28870 var observables = [];
28871 for (var _i = 0; _i < arguments.length; _i++) {
28872 observables[_i] = arguments[_i];
28873 }
28874 return function raceOperatorFunction(source) {
28875 if (observables.length === 1 && Object(_util_isArray__WEBPACK_IMPORTED_MODULE_0__["isArray"])(observables[0])) {
28876 observables = observables[0];
28877 }
28878 return source.lift.call(_observable_race__WEBPACK_IMPORTED_MODULE_1__["race"].apply(void 0, [source].concat(observables)));
28879 };
28880}
28881//# sourceMappingURL=race.js.map
28882
28883
28884/***/ }),
28885/* 310 */
28886/***/ (function(module, __webpack_exports__, __webpack_require__) {
28887
28888"use strict";
28889__webpack_require__.r(__webpack_exports__);
28890/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeat", function() { return repeat; });
28891/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
28892/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
28893/* harmony import */ var _observable_empty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(182);
28894/** PURE_IMPORTS_START tslib,_Subscriber,_observable_empty PURE_IMPORTS_END */
28895
28896
28897
28898function repeat(count) {
28899 if (count === void 0) {
28900 count = -1;
28901 }
28902 return function (source) {
28903 if (count === 0) {
28904 return Object(_observable_empty__WEBPACK_IMPORTED_MODULE_2__["empty"])();
28905 }
28906 else if (count < 0) {
28907 return source.lift(new RepeatOperator(-1, source));
28908 }
28909 else {
28910 return source.lift(new RepeatOperator(count - 1, source));
28911 }
28912 };
28913}
28914var RepeatOperator = /*@__PURE__*/ (function () {
28915 function RepeatOperator(count, source) {
28916 this.count = count;
28917 this.source = source;
28918 }
28919 RepeatOperator.prototype.call = function (subscriber, source) {
28920 return source.subscribe(new RepeatSubscriber(subscriber, this.count, this.source));
28921 };
28922 return RepeatOperator;
28923}());
28924var RepeatSubscriber = /*@__PURE__*/ (function (_super) {
28925 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatSubscriber, _super);
28926 function RepeatSubscriber(destination, count, source) {
28927 var _this = _super.call(this, destination) || this;
28928 _this.count = count;
28929 _this.source = source;
28930 return _this;
28931 }
28932 RepeatSubscriber.prototype.complete = function () {
28933 if (!this.isStopped) {
28934 var _a = this, source = _a.source, count = _a.count;
28935 if (count === 0) {
28936 return _super.prototype.complete.call(this);
28937 }
28938 else if (count > -1) {
28939 this.count = count - 1;
28940 }
28941 source.subscribe(this._unsubscribeAndRecycle());
28942 }
28943 };
28944 return RepeatSubscriber;
28945}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
28946//# sourceMappingURL=repeat.js.map
28947
28948
28949/***/ }),
28950/* 311 */
28951/***/ (function(module, __webpack_exports__, __webpack_require__) {
28952
28953"use strict";
28954__webpack_require__.r(__webpack_exports__);
28955/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repeatWhen", function() { return repeatWhen; });
28956/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
28957/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
28958/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
28959/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
28960/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
28961
28962
28963
28964
28965function repeatWhen(notifier) {
28966 return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
28967}
28968var RepeatWhenOperator = /*@__PURE__*/ (function () {
28969 function RepeatWhenOperator(notifier) {
28970 this.notifier = notifier;
28971 }
28972 RepeatWhenOperator.prototype.call = function (subscriber, source) {
28973 return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
28974 };
28975 return RepeatWhenOperator;
28976}());
28977var RepeatWhenSubscriber = /*@__PURE__*/ (function (_super) {
28978 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RepeatWhenSubscriber, _super);
28979 function RepeatWhenSubscriber(destination, notifier, source) {
28980 var _this = _super.call(this, destination) || this;
28981 _this.notifier = notifier;
28982 _this.source = source;
28983 _this.sourceIsBeingSubscribedTo = true;
28984 return _this;
28985 }
28986 RepeatWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
28987 this.sourceIsBeingSubscribedTo = true;
28988 this.source.subscribe(this);
28989 };
28990 RepeatWhenSubscriber.prototype.notifyComplete = function (innerSub) {
28991 if (this.sourceIsBeingSubscribedTo === false) {
28992 return _super.prototype.complete.call(this);
28993 }
28994 };
28995 RepeatWhenSubscriber.prototype.complete = function () {
28996 this.sourceIsBeingSubscribedTo = false;
28997 if (!this.isStopped) {
28998 if (!this.retries) {
28999 this.subscribeToRetries();
29000 }
29001 if (!this.retriesSubscription || this.retriesSubscription.closed) {
29002 return _super.prototype.complete.call(this);
29003 }
29004 this._unsubscribeAndRecycle();
29005 this.notifications.next();
29006 }
29007 };
29008 RepeatWhenSubscriber.prototype._unsubscribe = function () {
29009 var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
29010 if (notifications) {
29011 notifications.unsubscribe();
29012 this.notifications = null;
29013 }
29014 if (retriesSubscription) {
29015 retriesSubscription.unsubscribe();
29016 this.retriesSubscription = null;
29017 }
29018 this.retries = null;
29019 };
29020 RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
29021 var _unsubscribe = this._unsubscribe;
29022 this._unsubscribe = null;
29023 _super.prototype._unsubscribeAndRecycle.call(this);
29024 this._unsubscribe = _unsubscribe;
29025 return this;
29026 };
29027 RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
29028 this.notifications = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
29029 var retries;
29030 try {
29031 var notifier = this.notifier;
29032 retries = notifier(this.notifications);
29033 }
29034 catch (e) {
29035 return _super.prototype.complete.call(this);
29036 }
29037 this.retries = retries;
29038 this.retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
29039 };
29040 return RepeatWhenSubscriber;
29041}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
29042//# sourceMappingURL=repeatWhen.js.map
29043
29044
29045/***/ }),
29046/* 312 */
29047/***/ (function(module, __webpack_exports__, __webpack_require__) {
29048
29049"use strict";
29050__webpack_require__.r(__webpack_exports__);
29051/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retry", function() { return retry; });
29052/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29053/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
29054/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29055
29056
29057function retry(count) {
29058 if (count === void 0) {
29059 count = -1;
29060 }
29061 return function (source) { return source.lift(new RetryOperator(count, source)); };
29062}
29063var RetryOperator = /*@__PURE__*/ (function () {
29064 function RetryOperator(count, source) {
29065 this.count = count;
29066 this.source = source;
29067 }
29068 RetryOperator.prototype.call = function (subscriber, source) {
29069 return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
29070 };
29071 return RetryOperator;
29072}());
29073var RetrySubscriber = /*@__PURE__*/ (function (_super) {
29074 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetrySubscriber, _super);
29075 function RetrySubscriber(destination, count, source) {
29076 var _this = _super.call(this, destination) || this;
29077 _this.count = count;
29078 _this.source = source;
29079 return _this;
29080 }
29081 RetrySubscriber.prototype.error = function (err) {
29082 if (!this.isStopped) {
29083 var _a = this, source = _a.source, count = _a.count;
29084 if (count === 0) {
29085 return _super.prototype.error.call(this, err);
29086 }
29087 else if (count > -1) {
29088 this.count = count - 1;
29089 }
29090 source.subscribe(this._unsubscribeAndRecycle());
29091 }
29092 };
29093 return RetrySubscriber;
29094}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29095//# sourceMappingURL=retry.js.map
29096
29097
29098/***/ }),
29099/* 313 */
29100/***/ (function(module, __webpack_exports__, __webpack_require__) {
29101
29102"use strict";
29103__webpack_require__.r(__webpack_exports__);
29104/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "retryWhen", function() { return retryWhen; });
29105/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29106/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
29107/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
29108/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
29109/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29110
29111
29112
29113
29114function retryWhen(notifier) {
29115 return function (source) { return source.lift(new RetryWhenOperator(notifier, source)); };
29116}
29117var RetryWhenOperator = /*@__PURE__*/ (function () {
29118 function RetryWhenOperator(notifier, source) {
29119 this.notifier = notifier;
29120 this.source = source;
29121 }
29122 RetryWhenOperator.prototype.call = function (subscriber, source) {
29123 return source.subscribe(new RetryWhenSubscriber(subscriber, this.notifier, this.source));
29124 };
29125 return RetryWhenOperator;
29126}());
29127var RetryWhenSubscriber = /*@__PURE__*/ (function (_super) {
29128 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RetryWhenSubscriber, _super);
29129 function RetryWhenSubscriber(destination, notifier, source) {
29130 var _this = _super.call(this, destination) || this;
29131 _this.notifier = notifier;
29132 _this.source = source;
29133 return _this;
29134 }
29135 RetryWhenSubscriber.prototype.error = function (err) {
29136 if (!this.isStopped) {
29137 var errors = this.errors;
29138 var retries = this.retries;
29139 var retriesSubscription = this.retriesSubscription;
29140 if (!retries) {
29141 errors = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
29142 try {
29143 var notifier = this.notifier;
29144 retries = notifier(errors);
29145 }
29146 catch (e) {
29147 return _super.prototype.error.call(this, e);
29148 }
29149 retriesSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, retries);
29150 }
29151 else {
29152 this.errors = null;
29153 this.retriesSubscription = null;
29154 }
29155 this._unsubscribeAndRecycle();
29156 this.errors = errors;
29157 this.retries = retries;
29158 this.retriesSubscription = retriesSubscription;
29159 errors.next(err);
29160 }
29161 };
29162 RetryWhenSubscriber.prototype._unsubscribe = function () {
29163 var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
29164 if (errors) {
29165 errors.unsubscribe();
29166 this.errors = null;
29167 }
29168 if (retriesSubscription) {
29169 retriesSubscription.unsubscribe();
29170 this.retriesSubscription = null;
29171 }
29172 this.retries = null;
29173 };
29174 RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29175 var _unsubscribe = this._unsubscribe;
29176 this._unsubscribe = null;
29177 this._unsubscribeAndRecycle();
29178 this._unsubscribe = _unsubscribe;
29179 this.source.subscribe(this);
29180 };
29181 return RetryWhenSubscriber;
29182}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
29183//# sourceMappingURL=retryWhen.js.map
29184
29185
29186/***/ }),
29187/* 314 */
29188/***/ (function(module, __webpack_exports__, __webpack_require__) {
29189
29190"use strict";
29191__webpack_require__.r(__webpack_exports__);
29192/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sample", function() { return sample; });
29193/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29194/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
29195/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
29196/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29197
29198
29199
29200function sample(notifier) {
29201 return function (source) { return source.lift(new SampleOperator(notifier)); };
29202}
29203var SampleOperator = /*@__PURE__*/ (function () {
29204 function SampleOperator(notifier) {
29205 this.notifier = notifier;
29206 }
29207 SampleOperator.prototype.call = function (subscriber, source) {
29208 var sampleSubscriber = new SampleSubscriber(subscriber);
29209 var subscription = source.subscribe(sampleSubscriber);
29210 subscription.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(sampleSubscriber, this.notifier));
29211 return subscription;
29212 };
29213 return SampleOperator;
29214}());
29215var SampleSubscriber = /*@__PURE__*/ (function (_super) {
29216 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleSubscriber, _super);
29217 function SampleSubscriber() {
29218 var _this = _super !== null && _super.apply(this, arguments) || this;
29219 _this.hasValue = false;
29220 return _this;
29221 }
29222 SampleSubscriber.prototype._next = function (value) {
29223 this.value = value;
29224 this.hasValue = true;
29225 };
29226 SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29227 this.emitValue();
29228 };
29229 SampleSubscriber.prototype.notifyComplete = function () {
29230 this.emitValue();
29231 };
29232 SampleSubscriber.prototype.emitValue = function () {
29233 if (this.hasValue) {
29234 this.hasValue = false;
29235 this.destination.next(this.value);
29236 }
29237 };
29238 return SampleSubscriber;
29239}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29240//# sourceMappingURL=sample.js.map
29241
29242
29243/***/ }),
29244/* 315 */
29245/***/ (function(module, __webpack_exports__, __webpack_require__) {
29246
29247"use strict";
29248__webpack_require__.r(__webpack_exports__);
29249/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sampleTime", function() { return sampleTime; });
29250/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29251/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
29252/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194);
29253/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async PURE_IMPORTS_END */
29254
29255
29256
29257function sampleTime(period, scheduler) {
29258 if (scheduler === void 0) {
29259 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
29260 }
29261 return function (source) { return source.lift(new SampleTimeOperator(period, scheduler)); };
29262}
29263var SampleTimeOperator = /*@__PURE__*/ (function () {
29264 function SampleTimeOperator(period, scheduler) {
29265 this.period = period;
29266 this.scheduler = scheduler;
29267 }
29268 SampleTimeOperator.prototype.call = function (subscriber, source) {
29269 return source.subscribe(new SampleTimeSubscriber(subscriber, this.period, this.scheduler));
29270 };
29271 return SampleTimeOperator;
29272}());
29273var SampleTimeSubscriber = /*@__PURE__*/ (function (_super) {
29274 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SampleTimeSubscriber, _super);
29275 function SampleTimeSubscriber(destination, period, scheduler) {
29276 var _this = _super.call(this, destination) || this;
29277 _this.period = period;
29278 _this.scheduler = scheduler;
29279 _this.hasValue = false;
29280 _this.add(scheduler.schedule(dispatchNotification, period, { subscriber: _this, period: period }));
29281 return _this;
29282 }
29283 SampleTimeSubscriber.prototype._next = function (value) {
29284 this.lastValue = value;
29285 this.hasValue = true;
29286 };
29287 SampleTimeSubscriber.prototype.notifyNext = function () {
29288 if (this.hasValue) {
29289 this.hasValue = false;
29290 this.destination.next(this.lastValue);
29291 }
29292 };
29293 return SampleTimeSubscriber;
29294}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29295function dispatchNotification(state) {
29296 var subscriber = state.subscriber, period = state.period;
29297 subscriber.notifyNext();
29298 this.schedule(state, period);
29299}
29300//# sourceMappingURL=sampleTime.js.map
29301
29302
29303/***/ }),
29304/* 316 */
29305/***/ (function(module, __webpack_exports__, __webpack_require__) {
29306
29307"use strict";
29308__webpack_require__.r(__webpack_exports__);
29309/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequenceEqual", function() { return sequenceEqual; });
29310/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualOperator", function() { return SequenceEqualOperator; });
29311/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SequenceEqualSubscriber", function() { return SequenceEqualSubscriber; });
29312/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29313/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
29314/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29315
29316
29317function sequenceEqual(compareTo, comparator) {
29318 return function (source) { return source.lift(new SequenceEqualOperator(compareTo, comparator)); };
29319}
29320var SequenceEqualOperator = /*@__PURE__*/ (function () {
29321 function SequenceEqualOperator(compareTo, comparator) {
29322 this.compareTo = compareTo;
29323 this.comparator = comparator;
29324 }
29325 SequenceEqualOperator.prototype.call = function (subscriber, source) {
29326 return source.subscribe(new SequenceEqualSubscriber(subscriber, this.compareTo, this.comparator));
29327 };
29328 return SequenceEqualOperator;
29329}());
29330
29331var SequenceEqualSubscriber = /*@__PURE__*/ (function (_super) {
29332 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualSubscriber, _super);
29333 function SequenceEqualSubscriber(destination, compareTo, comparator) {
29334 var _this = _super.call(this, destination) || this;
29335 _this.compareTo = compareTo;
29336 _this.comparator = comparator;
29337 _this._a = [];
29338 _this._b = [];
29339 _this._oneComplete = false;
29340 _this.destination.add(compareTo.subscribe(new SequenceEqualCompareToSubscriber(destination, _this)));
29341 return _this;
29342 }
29343 SequenceEqualSubscriber.prototype._next = function (value) {
29344 if (this._oneComplete && this._b.length === 0) {
29345 this.emit(false);
29346 }
29347 else {
29348 this._a.push(value);
29349 this.checkValues();
29350 }
29351 };
29352 SequenceEqualSubscriber.prototype._complete = function () {
29353 if (this._oneComplete) {
29354 this.emit(this._a.length === 0 && this._b.length === 0);
29355 }
29356 else {
29357 this._oneComplete = true;
29358 }
29359 this.unsubscribe();
29360 };
29361 SequenceEqualSubscriber.prototype.checkValues = function () {
29362 var _c = this, _a = _c._a, _b = _c._b, comparator = _c.comparator;
29363 while (_a.length > 0 && _b.length > 0) {
29364 var a = _a.shift();
29365 var b = _b.shift();
29366 var areEqual = false;
29367 try {
29368 areEqual = comparator ? comparator(a, b) : a === b;
29369 }
29370 catch (e) {
29371 this.destination.error(e);
29372 }
29373 if (!areEqual) {
29374 this.emit(false);
29375 }
29376 }
29377 };
29378 SequenceEqualSubscriber.prototype.emit = function (value) {
29379 var destination = this.destination;
29380 destination.next(value);
29381 destination.complete();
29382 };
29383 SequenceEqualSubscriber.prototype.nextB = function (value) {
29384 if (this._oneComplete && this._a.length === 0) {
29385 this.emit(false);
29386 }
29387 else {
29388 this._b.push(value);
29389 this.checkValues();
29390 }
29391 };
29392 SequenceEqualSubscriber.prototype.completeB = function () {
29393 if (this._oneComplete) {
29394 this.emit(this._a.length === 0 && this._b.length === 0);
29395 }
29396 else {
29397 this._oneComplete = true;
29398 }
29399 };
29400 return SequenceEqualSubscriber;
29401}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29402
29403var SequenceEqualCompareToSubscriber = /*@__PURE__*/ (function (_super) {
29404 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SequenceEqualCompareToSubscriber, _super);
29405 function SequenceEqualCompareToSubscriber(destination, parent) {
29406 var _this = _super.call(this, destination) || this;
29407 _this.parent = parent;
29408 return _this;
29409 }
29410 SequenceEqualCompareToSubscriber.prototype._next = function (value) {
29411 this.parent.nextB(value);
29412 };
29413 SequenceEqualCompareToSubscriber.prototype._error = function (err) {
29414 this.parent.error(err);
29415 this.unsubscribe();
29416 };
29417 SequenceEqualCompareToSubscriber.prototype._complete = function () {
29418 this.parent.completeB();
29419 this.unsubscribe();
29420 };
29421 return SequenceEqualCompareToSubscriber;
29422}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29423//# sourceMappingURL=sequenceEqual.js.map
29424
29425
29426/***/ }),
29427/* 317 */
29428/***/ (function(module, __webpack_exports__, __webpack_require__) {
29429
29430"use strict";
29431__webpack_require__.r(__webpack_exports__);
29432/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "share", function() { return share; });
29433/* harmony import */ var _multicast__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(300);
29434/* harmony import */ var _refCount__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(169);
29435/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(166);
29436/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */
29437
29438
29439
29440function shareSubjectFactory() {
29441 return new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
29442}
29443function share() {
29444 return function (source) { return Object(_refCount__WEBPACK_IMPORTED_MODULE_1__["refCount"])()(Object(_multicast__WEBPACK_IMPORTED_MODULE_0__["multicast"])(shareSubjectFactory)(source)); };
29445}
29446//# sourceMappingURL=share.js.map
29447
29448
29449/***/ }),
29450/* 318 */
29451/***/ (function(module, __webpack_exports__, __webpack_require__) {
29452
29453"use strict";
29454__webpack_require__.r(__webpack_exports__);
29455/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shareReplay", function() { return shareReplay; });
29456/* harmony import */ var _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(172);
29457/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */
29458
29459function shareReplay(configOrBufferSize, windowTime, scheduler) {
29460 var config;
29461 if (configOrBufferSize && typeof configOrBufferSize === 'object') {
29462 config = configOrBufferSize;
29463 }
29464 else {
29465 config = {
29466 bufferSize: configOrBufferSize,
29467 windowTime: windowTime,
29468 refCount: false,
29469 scheduler: scheduler
29470 };
29471 }
29472 return function (source) { return source.lift(shareReplayOperator(config)); };
29473}
29474function shareReplayOperator(_a) {
29475 var _b = _a.bufferSize, bufferSize = _b === void 0 ? Number.POSITIVE_INFINITY : _b, _c = _a.windowTime, windowTime = _c === void 0 ? Number.POSITIVE_INFINITY : _c, useRefCount = _a.refCount, scheduler = _a.scheduler;
29476 var subject;
29477 var refCount = 0;
29478 var subscription;
29479 var hasError = false;
29480 var isComplete = false;
29481 return function shareReplayOperation(source) {
29482 refCount++;
29483 if (!subject || hasError) {
29484 hasError = false;
29485 subject = new _ReplaySubject__WEBPACK_IMPORTED_MODULE_0__["ReplaySubject"](bufferSize, windowTime, scheduler);
29486 subscription = source.subscribe({
29487 next: function (value) { subject.next(value); },
29488 error: function (err) {
29489 hasError = true;
29490 subject.error(err);
29491 },
29492 complete: function () {
29493 isComplete = true;
29494 subject.complete();
29495 },
29496 });
29497 }
29498 var innerSub = subject.subscribe(this);
29499 this.add(function () {
29500 refCount--;
29501 innerSub.unsubscribe();
29502 if (subscription && !isComplete && useRefCount && refCount === 0) {
29503 subscription.unsubscribe();
29504 subscription = undefined;
29505 subject = undefined;
29506 }
29507 });
29508 };
29509}
29510//# sourceMappingURL=shareReplay.js.map
29511
29512
29513/***/ }),
29514/* 319 */
29515/***/ (function(module, __webpack_exports__, __webpack_require__) {
29516
29517"use strict";
29518__webpack_require__.r(__webpack_exports__);
29519/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "single", function() { return single; });
29520/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29521/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
29522/* harmony import */ var _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(202);
29523/** PURE_IMPORTS_START tslib,_Subscriber,_util_EmptyError PURE_IMPORTS_END */
29524
29525
29526
29527function single(predicate) {
29528 return function (source) { return source.lift(new SingleOperator(predicate, source)); };
29529}
29530var SingleOperator = /*@__PURE__*/ (function () {
29531 function SingleOperator(predicate, source) {
29532 this.predicate = predicate;
29533 this.source = source;
29534 }
29535 SingleOperator.prototype.call = function (subscriber, source) {
29536 return source.subscribe(new SingleSubscriber(subscriber, this.predicate, this.source));
29537 };
29538 return SingleOperator;
29539}());
29540var SingleSubscriber = /*@__PURE__*/ (function (_super) {
29541 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SingleSubscriber, _super);
29542 function SingleSubscriber(destination, predicate, source) {
29543 var _this = _super.call(this, destination) || this;
29544 _this.predicate = predicate;
29545 _this.source = source;
29546 _this.seenValue = false;
29547 _this.index = 0;
29548 return _this;
29549 }
29550 SingleSubscriber.prototype.applySingleValue = function (value) {
29551 if (this.seenValue) {
29552 this.destination.error('Sequence contains more than one element');
29553 }
29554 else {
29555 this.seenValue = true;
29556 this.singleValue = value;
29557 }
29558 };
29559 SingleSubscriber.prototype._next = function (value) {
29560 var index = this.index++;
29561 if (this.predicate) {
29562 this.tryNext(value, index);
29563 }
29564 else {
29565 this.applySingleValue(value);
29566 }
29567 };
29568 SingleSubscriber.prototype.tryNext = function (value, index) {
29569 try {
29570 if (this.predicate(value, index, this.source)) {
29571 this.applySingleValue(value);
29572 }
29573 }
29574 catch (err) {
29575 this.destination.error(err);
29576 }
29577 };
29578 SingleSubscriber.prototype._complete = function () {
29579 var destination = this.destination;
29580 if (this.index > 0) {
29581 destination.next(this.seenValue ? this.singleValue : undefined);
29582 destination.complete();
29583 }
29584 else {
29585 destination.error(new _util_EmptyError__WEBPACK_IMPORTED_MODULE_2__["EmptyError"]);
29586 }
29587 };
29588 return SingleSubscriber;
29589}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29590//# sourceMappingURL=single.js.map
29591
29592
29593/***/ }),
29594/* 320 */
29595/***/ (function(module, __webpack_exports__, __webpack_require__) {
29596
29597"use strict";
29598__webpack_require__.r(__webpack_exports__);
29599/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skip", function() { return skip; });
29600/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29601/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
29602/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29603
29604
29605function skip(count) {
29606 return function (source) { return source.lift(new SkipOperator(count)); };
29607}
29608var SkipOperator = /*@__PURE__*/ (function () {
29609 function SkipOperator(total) {
29610 this.total = total;
29611 }
29612 SkipOperator.prototype.call = function (subscriber, source) {
29613 return source.subscribe(new SkipSubscriber(subscriber, this.total));
29614 };
29615 return SkipOperator;
29616}());
29617var SkipSubscriber = /*@__PURE__*/ (function (_super) {
29618 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipSubscriber, _super);
29619 function SkipSubscriber(destination, total) {
29620 var _this = _super.call(this, destination) || this;
29621 _this.total = total;
29622 _this.count = 0;
29623 return _this;
29624 }
29625 SkipSubscriber.prototype._next = function (x) {
29626 if (++this.count > this.total) {
29627 this.destination.next(x);
29628 }
29629 };
29630 return SkipSubscriber;
29631}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29632//# sourceMappingURL=skip.js.map
29633
29634
29635/***/ }),
29636/* 321 */
29637/***/ (function(module, __webpack_exports__, __webpack_require__) {
29638
29639"use strict";
29640__webpack_require__.r(__webpack_exports__);
29641/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipLast", function() { return skipLast; });
29642/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29643/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
29644/* harmony import */ var _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(201);
29645/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError PURE_IMPORTS_END */
29646
29647
29648
29649function skipLast(count) {
29650 return function (source) { return source.lift(new SkipLastOperator(count)); };
29651}
29652var SkipLastOperator = /*@__PURE__*/ (function () {
29653 function SkipLastOperator(_skipCount) {
29654 this._skipCount = _skipCount;
29655 if (this._skipCount < 0) {
29656 throw new _util_ArgumentOutOfRangeError__WEBPACK_IMPORTED_MODULE_2__["ArgumentOutOfRangeError"];
29657 }
29658 }
29659 SkipLastOperator.prototype.call = function (subscriber, source) {
29660 if (this._skipCount === 0) {
29661 return source.subscribe(new _Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"](subscriber));
29662 }
29663 else {
29664 return source.subscribe(new SkipLastSubscriber(subscriber, this._skipCount));
29665 }
29666 };
29667 return SkipLastOperator;
29668}());
29669var SkipLastSubscriber = /*@__PURE__*/ (function (_super) {
29670 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipLastSubscriber, _super);
29671 function SkipLastSubscriber(destination, _skipCount) {
29672 var _this = _super.call(this, destination) || this;
29673 _this._skipCount = _skipCount;
29674 _this._count = 0;
29675 _this._ring = new Array(_skipCount);
29676 return _this;
29677 }
29678 SkipLastSubscriber.prototype._next = function (value) {
29679 var skipCount = this._skipCount;
29680 var count = this._count++;
29681 if (count < skipCount) {
29682 this._ring[count] = value;
29683 }
29684 else {
29685 var currentIndex = count % skipCount;
29686 var ring = this._ring;
29687 var oldValue = ring[currentIndex];
29688 ring[currentIndex] = value;
29689 this.destination.next(oldValue);
29690 }
29691 };
29692 return SkipLastSubscriber;
29693}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29694//# sourceMappingURL=skipLast.js.map
29695
29696
29697/***/ }),
29698/* 322 */
29699/***/ (function(module, __webpack_exports__, __webpack_require__) {
29700
29701"use strict";
29702__webpack_require__.r(__webpack_exports__);
29703/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipUntil", function() { return skipUntil; });
29704/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29705/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
29706/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
29707/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
29708/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
29709
29710
29711
29712
29713function skipUntil(notifier) {
29714 return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
29715}
29716var SkipUntilOperator = /*@__PURE__*/ (function () {
29717 function SkipUntilOperator(notifier) {
29718 this.notifier = notifier;
29719 }
29720 SkipUntilOperator.prototype.call = function (destination, source) {
29721 return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
29722 };
29723 return SkipUntilOperator;
29724}());
29725var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
29726 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipUntilSubscriber, _super);
29727 function SkipUntilSubscriber(destination, notifier) {
29728 var _this = _super.call(this, destination) || this;
29729 _this.hasValue = false;
29730 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](_this, undefined, undefined);
29731 _this.add(innerSubscriber);
29732 _this.innerSubscription = innerSubscriber;
29733 Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(_this, notifier, undefined, undefined, innerSubscriber);
29734 return _this;
29735 }
29736 SkipUntilSubscriber.prototype._next = function (value) {
29737 if (this.hasValue) {
29738 _super.prototype._next.call(this, value);
29739 }
29740 };
29741 SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
29742 this.hasValue = true;
29743 if (this.innerSubscription) {
29744 this.innerSubscription.unsubscribe();
29745 }
29746 };
29747 SkipUntilSubscriber.prototype.notifyComplete = function () {
29748 };
29749 return SkipUntilSubscriber;
29750}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
29751//# sourceMappingURL=skipUntil.js.map
29752
29753
29754/***/ }),
29755/* 323 */
29756/***/ (function(module, __webpack_exports__, __webpack_require__) {
29757
29758"use strict";
29759__webpack_require__.r(__webpack_exports__);
29760/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "skipWhile", function() { return skipWhile; });
29761/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29762/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
29763/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
29764
29765
29766function skipWhile(predicate) {
29767 return function (source) { return source.lift(new SkipWhileOperator(predicate)); };
29768}
29769var SkipWhileOperator = /*@__PURE__*/ (function () {
29770 function SkipWhileOperator(predicate) {
29771 this.predicate = predicate;
29772 }
29773 SkipWhileOperator.prototype.call = function (subscriber, source) {
29774 return source.subscribe(new SkipWhileSubscriber(subscriber, this.predicate));
29775 };
29776 return SkipWhileOperator;
29777}());
29778var SkipWhileSubscriber = /*@__PURE__*/ (function (_super) {
29779 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SkipWhileSubscriber, _super);
29780 function SkipWhileSubscriber(destination, predicate) {
29781 var _this = _super.call(this, destination) || this;
29782 _this.predicate = predicate;
29783 _this.skipping = true;
29784 _this.index = 0;
29785 return _this;
29786 }
29787 SkipWhileSubscriber.prototype._next = function (value) {
29788 var destination = this.destination;
29789 if (this.skipping) {
29790 this.tryCallPredicate(value);
29791 }
29792 if (!this.skipping) {
29793 destination.next(value);
29794 }
29795 };
29796 SkipWhileSubscriber.prototype.tryCallPredicate = function (value) {
29797 try {
29798 var result = this.predicate(value, this.index++);
29799 this.skipping = Boolean(result);
29800 }
29801 catch (err) {
29802 this.destination.error(err);
29803 }
29804 };
29805 return SkipWhileSubscriber;
29806}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
29807//# sourceMappingURL=skipWhile.js.map
29808
29809
29810/***/ }),
29811/* 324 */
29812/***/ (function(module, __webpack_exports__, __webpack_require__) {
29813
29814"use strict";
29815__webpack_require__.r(__webpack_exports__);
29816/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "startWith", function() { return startWith; });
29817/* harmony import */ var _observable_concat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(218);
29818/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(184);
29819/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */
29820
29821
29822function startWith() {
29823 var array = [];
29824 for (var _i = 0; _i < arguments.length; _i++) {
29825 array[_i] = arguments[_i];
29826 }
29827 var scheduler = array[array.length - 1];
29828 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_1__["isScheduler"])(scheduler)) {
29829 array.pop();
29830 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source, scheduler); };
29831 }
29832 else {
29833 return function (source) { return Object(_observable_concat__WEBPACK_IMPORTED_MODULE_0__["concat"])(array, source); };
29834 }
29835}
29836//# sourceMappingURL=startWith.js.map
29837
29838
29839/***/ }),
29840/* 325 */
29841/***/ (function(module, __webpack_exports__, __webpack_require__) {
29842
29843"use strict";
29844__webpack_require__.r(__webpack_exports__);
29845/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribeOn", function() { return subscribeOn; });
29846/* harmony import */ var _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(326);
29847/** PURE_IMPORTS_START _observable_SubscribeOnObservable PURE_IMPORTS_END */
29848
29849function subscribeOn(scheduler, delay) {
29850 if (delay === void 0) {
29851 delay = 0;
29852 }
29853 return function subscribeOnOperatorFunction(source) {
29854 return source.lift(new SubscribeOnOperator(scheduler, delay));
29855 };
29856}
29857var SubscribeOnOperator = /*@__PURE__*/ (function () {
29858 function SubscribeOnOperator(scheduler, delay) {
29859 this.scheduler = scheduler;
29860 this.delay = delay;
29861 }
29862 SubscribeOnOperator.prototype.call = function (subscriber, source) {
29863 return new _observable_SubscribeOnObservable__WEBPACK_IMPORTED_MODULE_0__["SubscribeOnObservable"](source, this.delay, this.scheduler).subscribe(subscriber);
29864 };
29865 return SubscribeOnOperator;
29866}());
29867//# sourceMappingURL=subscribeOn.js.map
29868
29869
29870/***/ }),
29871/* 326 */
29872/***/ (function(module, __webpack_exports__, __webpack_require__) {
29873
29874"use strict";
29875__webpack_require__.r(__webpack_exports__);
29876/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SubscribeOnObservable", function() { return SubscribeOnObservable; });
29877/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29878/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(148);
29879/* harmony import */ var _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(190);
29880/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(236);
29881/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
29882
29883
29884
29885
29886var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
29887 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SubscribeOnObservable, _super);
29888 function SubscribeOnObservable(source, delayTime, scheduler) {
29889 if (delayTime === void 0) {
29890 delayTime = 0;
29891 }
29892 if (scheduler === void 0) {
29893 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
29894 }
29895 var _this = _super.call(this) || this;
29896 _this.source = source;
29897 _this.delayTime = delayTime;
29898 _this.scheduler = scheduler;
29899 if (!Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_3__["isNumeric"])(delayTime) || delayTime < 0) {
29900 _this.delayTime = 0;
29901 }
29902 if (!scheduler || typeof scheduler.schedule !== 'function') {
29903 _this.scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
29904 }
29905 return _this;
29906 }
29907 SubscribeOnObservable.create = function (source, delay, scheduler) {
29908 if (delay === void 0) {
29909 delay = 0;
29910 }
29911 if (scheduler === void 0) {
29912 scheduler = _scheduler_asap__WEBPACK_IMPORTED_MODULE_2__["asap"];
29913 }
29914 return new SubscribeOnObservable(source, delay, scheduler);
29915 };
29916 SubscribeOnObservable.dispatch = function (arg) {
29917 var source = arg.source, subscriber = arg.subscriber;
29918 return this.add(source.subscribe(subscriber));
29919 };
29920 SubscribeOnObservable.prototype._subscribe = function (subscriber) {
29921 var delay = this.delayTime;
29922 var source = this.source;
29923 var scheduler = this.scheduler;
29924 return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
29925 source: source, subscriber: subscriber
29926 });
29927 };
29928 return SubscribeOnObservable;
29929}(_Observable__WEBPACK_IMPORTED_MODULE_1__["Observable"]));
29930
29931//# sourceMappingURL=SubscribeOnObservable.js.map
29932
29933
29934/***/ }),
29935/* 327 */
29936/***/ (function(module, __webpack_exports__, __webpack_require__) {
29937
29938"use strict";
29939__webpack_require__.r(__webpack_exports__);
29940/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchAll", function() { return switchAll; });
29941/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(328);
29942/* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(199);
29943/** PURE_IMPORTS_START _switchMap,_util_identity PURE_IMPORTS_END */
29944
29945
29946function switchAll() {
29947 return Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(_util_identity__WEBPACK_IMPORTED_MODULE_1__["identity"]);
29948}
29949//# sourceMappingURL=switchAll.js.map
29950
29951
29952/***/ }),
29953/* 328 */
29954/***/ (function(module, __webpack_exports__, __webpack_require__) {
29955
29956"use strict";
29957__webpack_require__.r(__webpack_exports__);
29958/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMap", function() { return switchMap; });
29959/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
29960/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
29961/* harmony import */ var _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(210);
29962/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
29963/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(205);
29964/* harmony import */ var _observable_from__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(222);
29965/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */
29966
29967
29968
29969
29970
29971
29972function switchMap(project, resultSelector) {
29973 if (typeof resultSelector === 'function') {
29974 return function (source) { return source.pipe(switchMap(function (a, i) { return Object(_observable_from__WEBPACK_IMPORTED_MODULE_5__["from"])(project(a, i)).pipe(Object(_map__WEBPACK_IMPORTED_MODULE_4__["map"])(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };
29975 }
29976 return function (source) { return source.lift(new SwitchMapOperator(project)); };
29977}
29978var SwitchMapOperator = /*@__PURE__*/ (function () {
29979 function SwitchMapOperator(project) {
29980 this.project = project;
29981 }
29982 SwitchMapOperator.prototype.call = function (subscriber, source) {
29983 return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));
29984 };
29985 return SwitchMapOperator;
29986}());
29987var SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {
29988 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](SwitchMapSubscriber, _super);
29989 function SwitchMapSubscriber(destination, project) {
29990 var _this = _super.call(this, destination) || this;
29991 _this.project = project;
29992 _this.index = 0;
29993 return _this;
29994 }
29995 SwitchMapSubscriber.prototype._next = function (value) {
29996 var result;
29997 var index = this.index++;
29998 try {
29999 result = this.project(value, index);
30000 }
30001 catch (error) {
30002 this.destination.error(error);
30003 return;
30004 }
30005 this._innerSub(result, value, index);
30006 };
30007 SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {
30008 var innerSubscription = this.innerSubscription;
30009 if (innerSubscription) {
30010 innerSubscription.unsubscribe();
30011 }
30012 var innerSubscriber = new _InnerSubscriber__WEBPACK_IMPORTED_MODULE_2__["InnerSubscriber"](this, undefined, undefined);
30013 var destination = this.destination;
30014 destination.add(innerSubscriber);
30015 this.innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, result, value, index, innerSubscriber);
30016 };
30017 SwitchMapSubscriber.prototype._complete = function () {
30018 var innerSubscription = this.innerSubscription;
30019 if (!innerSubscription || innerSubscription.closed) {
30020 _super.prototype._complete.call(this);
30021 }
30022 this.unsubscribe();
30023 };
30024 SwitchMapSubscriber.prototype._unsubscribe = function () {
30025 this.innerSubscription = null;
30026 };
30027 SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
30028 var destination = this.destination;
30029 destination.remove(innerSub);
30030 this.innerSubscription = null;
30031 if (this.isStopped) {
30032 _super.prototype._complete.call(this);
30033 }
30034 };
30035 SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30036 this.destination.next(innerValue);
30037 };
30038 return SwitchMapSubscriber;
30039}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30040//# sourceMappingURL=switchMap.js.map
30041
30042
30043/***/ }),
30044/* 329 */
30045/***/ (function(module, __webpack_exports__, __webpack_require__) {
30046
30047"use strict";
30048__webpack_require__.r(__webpack_exports__);
30049/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "switchMapTo", function() { return switchMapTo; });
30050/* harmony import */ var _switchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(328);
30051/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */
30052
30053function switchMapTo(innerObservable, resultSelector) {
30054 return resultSelector ? Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; }, resultSelector) : Object(_switchMap__WEBPACK_IMPORTED_MODULE_0__["switchMap"])(function () { return innerObservable; });
30055}
30056//# sourceMappingURL=switchMapTo.js.map
30057
30058
30059/***/ }),
30060/* 330 */
30061/***/ (function(module, __webpack_exports__, __webpack_require__) {
30062
30063"use strict";
30064__webpack_require__.r(__webpack_exports__);
30065/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeUntil", function() { return takeUntil; });
30066/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
30067/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
30068/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
30069/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30070
30071
30072
30073function takeUntil(notifier) {
30074 return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
30075}
30076var TakeUntilOperator = /*@__PURE__*/ (function () {
30077 function TakeUntilOperator(notifier) {
30078 this.notifier = notifier;
30079 }
30080 TakeUntilOperator.prototype.call = function (subscriber, source) {
30081 var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
30082 var notifierSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(takeUntilSubscriber, this.notifier);
30083 if (notifierSubscription && !takeUntilSubscriber.seenValue) {
30084 takeUntilSubscriber.add(notifierSubscription);
30085 return source.subscribe(takeUntilSubscriber);
30086 }
30087 return takeUntilSubscriber;
30088 };
30089 return TakeUntilOperator;
30090}());
30091var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
30092 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeUntilSubscriber, _super);
30093 function TakeUntilSubscriber(destination) {
30094 var _this = _super.call(this, destination) || this;
30095 _this.seenValue = false;
30096 return _this;
30097 }
30098 TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30099 this.seenValue = true;
30100 this.complete();
30101 };
30102 TakeUntilSubscriber.prototype.notifyComplete = function () {
30103 };
30104 return TakeUntilSubscriber;
30105}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30106//# sourceMappingURL=takeUntil.js.map
30107
30108
30109/***/ }),
30110/* 331 */
30111/***/ (function(module, __webpack_exports__, __webpack_require__) {
30112
30113"use strict";
30114__webpack_require__.r(__webpack_exports__);
30115/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "takeWhile", function() { return takeWhile; });
30116/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
30117/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
30118/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
30119
30120
30121function takeWhile(predicate, inclusive) {
30122 if (inclusive === void 0) {
30123 inclusive = false;
30124 }
30125 return function (source) {
30126 return source.lift(new TakeWhileOperator(predicate, inclusive));
30127 };
30128}
30129var TakeWhileOperator = /*@__PURE__*/ (function () {
30130 function TakeWhileOperator(predicate, inclusive) {
30131 this.predicate = predicate;
30132 this.inclusive = inclusive;
30133 }
30134 TakeWhileOperator.prototype.call = function (subscriber, source) {
30135 return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));
30136 };
30137 return TakeWhileOperator;
30138}());
30139var TakeWhileSubscriber = /*@__PURE__*/ (function (_super) {
30140 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TakeWhileSubscriber, _super);
30141 function TakeWhileSubscriber(destination, predicate, inclusive) {
30142 var _this = _super.call(this, destination) || this;
30143 _this.predicate = predicate;
30144 _this.inclusive = inclusive;
30145 _this.index = 0;
30146 return _this;
30147 }
30148 TakeWhileSubscriber.prototype._next = function (value) {
30149 var destination = this.destination;
30150 var result;
30151 try {
30152 result = this.predicate(value, this.index++);
30153 }
30154 catch (err) {
30155 destination.error(err);
30156 return;
30157 }
30158 this.nextOrComplete(value, result);
30159 };
30160 TakeWhileSubscriber.prototype.nextOrComplete = function (value, predicateResult) {
30161 var destination = this.destination;
30162 if (Boolean(predicateResult)) {
30163 destination.next(value);
30164 }
30165 else {
30166 if (this.inclusive) {
30167 destination.next(value);
30168 }
30169 destination.complete();
30170 }
30171 };
30172 return TakeWhileSubscriber;
30173}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30174//# sourceMappingURL=takeWhile.js.map
30175
30176
30177/***/ }),
30178/* 332 */
30179/***/ (function(module, __webpack_exports__, __webpack_require__) {
30180
30181"use strict";
30182__webpack_require__.r(__webpack_exports__);
30183/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tap", function() { return tap; });
30184/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
30185/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
30186/* harmony import */ var _util_noop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(164);
30187/* harmony import */ var _util_isFunction__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(152);
30188/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */
30189
30190
30191
30192
30193function tap(nextOrObserver, error, complete) {
30194 return function tapOperatorFunction(source) {
30195 return source.lift(new DoOperator(nextOrObserver, error, complete));
30196 };
30197}
30198var DoOperator = /*@__PURE__*/ (function () {
30199 function DoOperator(nextOrObserver, error, complete) {
30200 this.nextOrObserver = nextOrObserver;
30201 this.error = error;
30202 this.complete = complete;
30203 }
30204 DoOperator.prototype.call = function (subscriber, source) {
30205 return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));
30206 };
30207 return DoOperator;
30208}());
30209var TapSubscriber = /*@__PURE__*/ (function (_super) {
30210 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TapSubscriber, _super);
30211 function TapSubscriber(destination, observerOrNext, error, complete) {
30212 var _this = _super.call(this, destination) || this;
30213 _this._tapNext = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30214 _this._tapError = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30215 _this._tapComplete = _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30216 _this._tapError = error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30217 _this._tapComplete = complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30218 if (Object(_util_isFunction__WEBPACK_IMPORTED_MODULE_3__["isFunction"])(observerOrNext)) {
30219 _this._context = _this;
30220 _this._tapNext = observerOrNext;
30221 }
30222 else if (observerOrNext) {
30223 _this._context = observerOrNext;
30224 _this._tapNext = observerOrNext.next || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30225 _this._tapError = observerOrNext.error || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30226 _this._tapComplete = observerOrNext.complete || _util_noop__WEBPACK_IMPORTED_MODULE_2__["noop"];
30227 }
30228 return _this;
30229 }
30230 TapSubscriber.prototype._next = function (value) {
30231 try {
30232 this._tapNext.call(this._context, value);
30233 }
30234 catch (err) {
30235 this.destination.error(err);
30236 return;
30237 }
30238 this.destination.next(value);
30239 };
30240 TapSubscriber.prototype._error = function (err) {
30241 try {
30242 this._tapError.call(this._context, err);
30243 }
30244 catch (err) {
30245 this.destination.error(err);
30246 return;
30247 }
30248 this.destination.error(err);
30249 };
30250 TapSubscriber.prototype._complete = function () {
30251 try {
30252 this._tapComplete.call(this._context);
30253 }
30254 catch (err) {
30255 this.destination.error(err);
30256 return;
30257 }
30258 return this.destination.complete();
30259 };
30260 return TapSubscriber;
30261}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30262//# sourceMappingURL=tap.js.map
30263
30264
30265/***/ }),
30266/* 333 */
30267/***/ (function(module, __webpack_exports__, __webpack_require__) {
30268
30269"use strict";
30270__webpack_require__.r(__webpack_exports__);
30271/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultThrottleConfig", function() { return defaultThrottleConfig; });
30272/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttle", function() { return throttle; });
30273/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
30274/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
30275/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
30276/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30277
30278
30279
30280var defaultThrottleConfig = {
30281 leading: true,
30282 trailing: false
30283};
30284function throttle(durationSelector, config) {
30285 if (config === void 0) {
30286 config = defaultThrottleConfig;
30287 }
30288 return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };
30289}
30290var ThrottleOperator = /*@__PURE__*/ (function () {
30291 function ThrottleOperator(durationSelector, leading, trailing) {
30292 this.durationSelector = durationSelector;
30293 this.leading = leading;
30294 this.trailing = trailing;
30295 }
30296 ThrottleOperator.prototype.call = function (subscriber, source) {
30297 return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));
30298 };
30299 return ThrottleOperator;
30300}());
30301var ThrottleSubscriber = /*@__PURE__*/ (function (_super) {
30302 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleSubscriber, _super);
30303 function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {
30304 var _this = _super.call(this, destination) || this;
30305 _this.destination = destination;
30306 _this.durationSelector = durationSelector;
30307 _this._leading = _leading;
30308 _this._trailing = _trailing;
30309 _this._hasValue = false;
30310 return _this;
30311 }
30312 ThrottleSubscriber.prototype._next = function (value) {
30313 this._hasValue = true;
30314 this._sendValue = value;
30315 if (!this._throttled) {
30316 if (this._leading) {
30317 this.send();
30318 }
30319 else {
30320 this.throttle(value);
30321 }
30322 }
30323 };
30324 ThrottleSubscriber.prototype.send = function () {
30325 var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;
30326 if (_hasValue) {
30327 this.destination.next(_sendValue);
30328 this.throttle(_sendValue);
30329 }
30330 this._hasValue = false;
30331 this._sendValue = null;
30332 };
30333 ThrottleSubscriber.prototype.throttle = function (value) {
30334 var duration = this.tryDurationSelector(value);
30335 if (!!duration) {
30336 this.add(this._throttled = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(this, duration));
30337 }
30338 };
30339 ThrottleSubscriber.prototype.tryDurationSelector = function (value) {
30340 try {
30341 return this.durationSelector(value);
30342 }
30343 catch (err) {
30344 this.destination.error(err);
30345 return null;
30346 }
30347 };
30348 ThrottleSubscriber.prototype.throttlingDone = function () {
30349 var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;
30350 if (_throttled) {
30351 _throttled.unsubscribe();
30352 }
30353 this._throttled = null;
30354 if (_trailing) {
30355 this.send();
30356 }
30357 };
30358 ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30359 this.throttlingDone();
30360 };
30361 ThrottleSubscriber.prototype.notifyComplete = function () {
30362 this.throttlingDone();
30363 };
30364 return ThrottleSubscriber;
30365}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
30366//# sourceMappingURL=throttle.js.map
30367
30368
30369/***/ }),
30370/* 334 */
30371/***/ (function(module, __webpack_exports__, __webpack_require__) {
30372
30373"use strict";
30374__webpack_require__.r(__webpack_exports__);
30375/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "throttleTime", function() { return throttleTime; });
30376/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
30377/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
30378/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194);
30379/* harmony import */ var _throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(333);
30380/** PURE_IMPORTS_START tslib,_Subscriber,_scheduler_async,_throttle PURE_IMPORTS_END */
30381
30382
30383
30384
30385function throttleTime(duration, scheduler, config) {
30386 if (scheduler === void 0) {
30387 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
30388 }
30389 if (config === void 0) {
30390 config = _throttle__WEBPACK_IMPORTED_MODULE_3__["defaultThrottleConfig"];
30391 }
30392 return function (source) { return source.lift(new ThrottleTimeOperator(duration, scheduler, config.leading, config.trailing)); };
30393}
30394var ThrottleTimeOperator = /*@__PURE__*/ (function () {
30395 function ThrottleTimeOperator(duration, scheduler, leading, trailing) {
30396 this.duration = duration;
30397 this.scheduler = scheduler;
30398 this.leading = leading;
30399 this.trailing = trailing;
30400 }
30401 ThrottleTimeOperator.prototype.call = function (subscriber, source) {
30402 return source.subscribe(new ThrottleTimeSubscriber(subscriber, this.duration, this.scheduler, this.leading, this.trailing));
30403 };
30404 return ThrottleTimeOperator;
30405}());
30406var ThrottleTimeSubscriber = /*@__PURE__*/ (function (_super) {
30407 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](ThrottleTimeSubscriber, _super);
30408 function ThrottleTimeSubscriber(destination, duration, scheduler, leading, trailing) {
30409 var _this = _super.call(this, destination) || this;
30410 _this.duration = duration;
30411 _this.scheduler = scheduler;
30412 _this.leading = leading;
30413 _this.trailing = trailing;
30414 _this._hasTrailingValue = false;
30415 _this._trailingValue = null;
30416 return _this;
30417 }
30418 ThrottleTimeSubscriber.prototype._next = function (value) {
30419 if (this.throttled) {
30420 if (this.trailing) {
30421 this._trailingValue = value;
30422 this._hasTrailingValue = true;
30423 }
30424 }
30425 else {
30426 this.add(this.throttled = this.scheduler.schedule(dispatchNext, this.duration, { subscriber: this }));
30427 if (this.leading) {
30428 this.destination.next(value);
30429 }
30430 else if (this.trailing) {
30431 this._trailingValue = value;
30432 this._hasTrailingValue = true;
30433 }
30434 }
30435 };
30436 ThrottleTimeSubscriber.prototype._complete = function () {
30437 if (this._hasTrailingValue) {
30438 this.destination.next(this._trailingValue);
30439 this.destination.complete();
30440 }
30441 else {
30442 this.destination.complete();
30443 }
30444 };
30445 ThrottleTimeSubscriber.prototype.clearThrottle = function () {
30446 var throttled = this.throttled;
30447 if (throttled) {
30448 if (this.trailing && this._hasTrailingValue) {
30449 this.destination.next(this._trailingValue);
30450 this._trailingValue = null;
30451 this._hasTrailingValue = false;
30452 }
30453 throttled.unsubscribe();
30454 this.remove(throttled);
30455 this.throttled = null;
30456 }
30457 };
30458 return ThrottleTimeSubscriber;
30459}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30460function dispatchNext(arg) {
30461 var subscriber = arg.subscriber;
30462 subscriber.clearThrottle();
30463}
30464//# sourceMappingURL=throttleTime.js.map
30465
30466
30467/***/ }),
30468/* 335 */
30469/***/ (function(module, __webpack_exports__, __webpack_require__) {
30470
30471"use strict";
30472__webpack_require__.r(__webpack_exports__);
30473/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return timeInterval; });
30474/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimeInterval", function() { return TimeInterval; });
30475/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
30476/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(295);
30477/* harmony import */ var _observable_defer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(229);
30478/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(205);
30479/** PURE_IMPORTS_START _scheduler_async,_scan,_observable_defer,_map PURE_IMPORTS_END */
30480
30481
30482
30483
30484function timeInterval(scheduler) {
30485 if (scheduler === void 0) {
30486 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
30487 }
30488 return function (source) {
30489 return Object(_observable_defer__WEBPACK_IMPORTED_MODULE_2__["defer"])(function () {
30490 return source.pipe(Object(_scan__WEBPACK_IMPORTED_MODULE_1__["scan"])(function (_a, value) {
30491 var current = _a.current;
30492 return ({ value: value, current: scheduler.now(), last: current });
30493 }, { current: scheduler.now(), value: undefined, last: undefined }), Object(_map__WEBPACK_IMPORTED_MODULE_3__["map"])(function (_a) {
30494 var current = _a.current, last = _a.last, value = _a.value;
30495 return new TimeInterval(value, current - last);
30496 }));
30497 });
30498 };
30499}
30500var TimeInterval = /*@__PURE__*/ (function () {
30501 function TimeInterval(value, interval) {
30502 this.value = value;
30503 this.interval = interval;
30504 }
30505 return TimeInterval;
30506}());
30507
30508//# sourceMappingURL=timeInterval.js.map
30509
30510
30511/***/ }),
30512/* 336 */
30513/***/ (function(module, __webpack_exports__, __webpack_require__) {
30514
30515"use strict";
30516__webpack_require__.r(__webpack_exports__);
30517/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return timeout; });
30518/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
30519/* harmony import */ var _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(203);
30520/* harmony import */ var _timeoutWith__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(337);
30521/* harmony import */ var _observable_throwError__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(188);
30522/** PURE_IMPORTS_START _scheduler_async,_util_TimeoutError,_timeoutWith,_observable_throwError PURE_IMPORTS_END */
30523
30524
30525
30526
30527function timeout(due, scheduler) {
30528 if (scheduler === void 0) {
30529 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
30530 }
30531 return Object(_timeoutWith__WEBPACK_IMPORTED_MODULE_2__["timeoutWith"])(due, Object(_observable_throwError__WEBPACK_IMPORTED_MODULE_3__["throwError"])(new _util_TimeoutError__WEBPACK_IMPORTED_MODULE_1__["TimeoutError"]()), scheduler);
30532}
30533//# sourceMappingURL=timeout.js.map
30534
30535
30536/***/ }),
30537/* 337 */
30538/***/ (function(module, __webpack_exports__, __webpack_require__) {
30539
30540"use strict";
30541__webpack_require__.r(__webpack_exports__);
30542/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeoutWith", function() { return timeoutWith; });
30543/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
30544/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
30545/* harmony import */ var _util_isDate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(269);
30546/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
30547/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(209);
30548/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30549
30550
30551
30552
30553
30554function timeoutWith(due, withObservable, scheduler) {
30555 if (scheduler === void 0) {
30556 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_1__["async"];
30557 }
30558 return function (source) {
30559 var absoluteTimeout = Object(_util_isDate__WEBPACK_IMPORTED_MODULE_2__["isDate"])(due);
30560 var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
30561 return source.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));
30562 };
30563}
30564var TimeoutWithOperator = /*@__PURE__*/ (function () {
30565 function TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler) {
30566 this.waitFor = waitFor;
30567 this.absoluteTimeout = absoluteTimeout;
30568 this.withObservable = withObservable;
30569 this.scheduler = scheduler;
30570 }
30571 TimeoutWithOperator.prototype.call = function (subscriber, source) {
30572 return source.subscribe(new TimeoutWithSubscriber(subscriber, this.absoluteTimeout, this.waitFor, this.withObservable, this.scheduler));
30573 };
30574 return TimeoutWithOperator;
30575}());
30576var TimeoutWithSubscriber = /*@__PURE__*/ (function (_super) {
30577 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](TimeoutWithSubscriber, _super);
30578 function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
30579 var _this = _super.call(this, destination) || this;
30580 _this.absoluteTimeout = absoluteTimeout;
30581 _this.waitFor = waitFor;
30582 _this.withObservable = withObservable;
30583 _this.scheduler = scheduler;
30584 _this.action = null;
30585 _this.scheduleTimeout();
30586 return _this;
30587 }
30588 TimeoutWithSubscriber.dispatchTimeout = function (subscriber) {
30589 var withObservable = subscriber.withObservable;
30590 subscriber._unsubscribeAndRecycle();
30591 subscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(subscriber, withObservable));
30592 };
30593 TimeoutWithSubscriber.prototype.scheduleTimeout = function () {
30594 var action = this.action;
30595 if (action) {
30596 this.action = action.schedule(this, this.waitFor);
30597 }
30598 else {
30599 this.add(this.action = this.scheduler.schedule(TimeoutWithSubscriber.dispatchTimeout, this.waitFor, this));
30600 }
30601 };
30602 TimeoutWithSubscriber.prototype._next = function (value) {
30603 if (!this.absoluteTimeout) {
30604 this.scheduleTimeout();
30605 }
30606 _super.prototype._next.call(this, value);
30607 };
30608 TimeoutWithSubscriber.prototype._unsubscribe = function () {
30609 this.action = null;
30610 this.scheduler = null;
30611 this.withObservable = null;
30612 };
30613 return TimeoutWithSubscriber;
30614}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
30615//# sourceMappingURL=timeoutWith.js.map
30616
30617
30618/***/ }),
30619/* 338 */
30620/***/ (function(module, __webpack_exports__, __webpack_require__) {
30621
30622"use strict";
30623__webpack_require__.r(__webpack_exports__);
30624/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timestamp", function() { return timestamp; });
30625/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timestamp", function() { return Timestamp; });
30626/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(194);
30627/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(205);
30628/** PURE_IMPORTS_START _scheduler_async,_map PURE_IMPORTS_END */
30629
30630
30631function timestamp(scheduler) {
30632 if (scheduler === void 0) {
30633 scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_0__["async"];
30634 }
30635 return Object(_map__WEBPACK_IMPORTED_MODULE_1__["map"])(function (value) { return new Timestamp(value, scheduler.now()); });
30636}
30637var Timestamp = /*@__PURE__*/ (function () {
30638 function Timestamp(value, timestamp) {
30639 this.value = value;
30640 this.timestamp = timestamp;
30641 }
30642 return Timestamp;
30643}());
30644
30645//# sourceMappingURL=timestamp.js.map
30646
30647
30648/***/ }),
30649/* 339 */
30650/***/ (function(module, __webpack_exports__, __webpack_require__) {
30651
30652"use strict";
30653__webpack_require__.r(__webpack_exports__);
30654/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; });
30655/* harmony import */ var _reduce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(294);
30656/** PURE_IMPORTS_START _reduce PURE_IMPORTS_END */
30657
30658function toArrayReducer(arr, item, index) {
30659 if (index === 0) {
30660 return [item];
30661 }
30662 arr.push(item);
30663 return arr;
30664}
30665function toArray() {
30666 return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(toArrayReducer, []);
30667}
30668//# sourceMappingURL=toArray.js.map
30669
30670
30671/***/ }),
30672/* 340 */
30673/***/ (function(module, __webpack_exports__, __webpack_require__) {
30674
30675"use strict";
30676__webpack_require__.r(__webpack_exports__);
30677/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return window; });
30678/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
30679/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
30680/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
30681/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
30682/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
30683
30684
30685
30686
30687function window(windowBoundaries) {
30688 return function windowOperatorFunction(source) {
30689 return source.lift(new WindowOperator(windowBoundaries));
30690 };
30691}
30692var WindowOperator = /*@__PURE__*/ (function () {
30693 function WindowOperator(windowBoundaries) {
30694 this.windowBoundaries = windowBoundaries;
30695 }
30696 WindowOperator.prototype.call = function (subscriber, source) {
30697 var windowSubscriber = new WindowSubscriber(subscriber);
30698 var sourceSubscription = source.subscribe(windowSubscriber);
30699 if (!sourceSubscription.closed) {
30700 windowSubscriber.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(windowSubscriber, this.windowBoundaries));
30701 }
30702 return sourceSubscription;
30703 };
30704 return WindowOperator;
30705}());
30706var WindowSubscriber = /*@__PURE__*/ (function (_super) {
30707 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
30708 function WindowSubscriber(destination) {
30709 var _this = _super.call(this, destination) || this;
30710 _this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
30711 destination.next(_this.window);
30712 return _this;
30713 }
30714 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
30715 this.openWindow();
30716 };
30717 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
30718 this._error(error);
30719 };
30720 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
30721 this._complete();
30722 };
30723 WindowSubscriber.prototype._next = function (value) {
30724 this.window.next(value);
30725 };
30726 WindowSubscriber.prototype._error = function (err) {
30727 this.window.error(err);
30728 this.destination.error(err);
30729 };
30730 WindowSubscriber.prototype._complete = function () {
30731 this.window.complete();
30732 this.destination.complete();
30733 };
30734 WindowSubscriber.prototype._unsubscribe = function () {
30735 this.window = null;
30736 };
30737 WindowSubscriber.prototype.openWindow = function () {
30738 var prevWindow = this.window;
30739 if (prevWindow) {
30740 prevWindow.complete();
30741 }
30742 var destination = this.destination;
30743 var newWindow = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
30744 destination.next(newWindow);
30745 };
30746 return WindowSubscriber;
30747}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
30748//# sourceMappingURL=window.js.map
30749
30750
30751/***/ }),
30752/* 341 */
30753/***/ (function(module, __webpack_exports__, __webpack_require__) {
30754
30755"use strict";
30756__webpack_require__.r(__webpack_exports__);
30757/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowCount", function() { return windowCount; });
30758/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
30759/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(150);
30760/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(166);
30761/** PURE_IMPORTS_START tslib,_Subscriber,_Subject PURE_IMPORTS_END */
30762
30763
30764
30765function windowCount(windowSize, startWindowEvery) {
30766 if (startWindowEvery === void 0) {
30767 startWindowEvery = 0;
30768 }
30769 return function windowCountOperatorFunction(source) {
30770 return source.lift(new WindowCountOperator(windowSize, startWindowEvery));
30771 };
30772}
30773var WindowCountOperator = /*@__PURE__*/ (function () {
30774 function WindowCountOperator(windowSize, startWindowEvery) {
30775 this.windowSize = windowSize;
30776 this.startWindowEvery = startWindowEvery;
30777 }
30778 WindowCountOperator.prototype.call = function (subscriber, source) {
30779 return source.subscribe(new WindowCountSubscriber(subscriber, this.windowSize, this.startWindowEvery));
30780 };
30781 return WindowCountOperator;
30782}());
30783var WindowCountSubscriber = /*@__PURE__*/ (function (_super) {
30784 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowCountSubscriber, _super);
30785 function WindowCountSubscriber(destination, windowSize, startWindowEvery) {
30786 var _this = _super.call(this, destination) || this;
30787 _this.destination = destination;
30788 _this.windowSize = windowSize;
30789 _this.startWindowEvery = startWindowEvery;
30790 _this.windows = [new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]()];
30791 _this.count = 0;
30792 destination.next(_this.windows[0]);
30793 return _this;
30794 }
30795 WindowCountSubscriber.prototype._next = function (value) {
30796 var startWindowEvery = (this.startWindowEvery > 0) ? this.startWindowEvery : this.windowSize;
30797 var destination = this.destination;
30798 var windowSize = this.windowSize;
30799 var windows = this.windows;
30800 var len = windows.length;
30801 for (var i = 0; i < len && !this.closed; i++) {
30802 windows[i].next(value);
30803 }
30804 var c = this.count - windowSize + 1;
30805 if (c >= 0 && c % startWindowEvery === 0 && !this.closed) {
30806 windows.shift().complete();
30807 }
30808 if (++this.count % startWindowEvery === 0 && !this.closed) {
30809 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_2__["Subject"]();
30810 windows.push(window_1);
30811 destination.next(window_1);
30812 }
30813 };
30814 WindowCountSubscriber.prototype._error = function (err) {
30815 var windows = this.windows;
30816 if (windows) {
30817 while (windows.length > 0 && !this.closed) {
30818 windows.shift().error(err);
30819 }
30820 }
30821 this.destination.error(err);
30822 };
30823 WindowCountSubscriber.prototype._complete = function () {
30824 var windows = this.windows;
30825 if (windows) {
30826 while (windows.length > 0 && !this.closed) {
30827 windows.shift().complete();
30828 }
30829 }
30830 this.destination.complete();
30831 };
30832 WindowCountSubscriber.prototype._unsubscribe = function () {
30833 this.count = 0;
30834 this.windows = null;
30835 };
30836 return WindowCountSubscriber;
30837}(_Subscriber__WEBPACK_IMPORTED_MODULE_1__["Subscriber"]));
30838//# sourceMappingURL=windowCount.js.map
30839
30840
30841/***/ }),
30842/* 342 */
30843/***/ (function(module, __webpack_exports__, __webpack_require__) {
30844
30845"use strict";
30846__webpack_require__.r(__webpack_exports__);
30847/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowTime", function() { return windowTime; });
30848/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
30849/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
30850/* harmony import */ var _scheduler_async__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194);
30851/* harmony import */ var _Subscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(150);
30852/* harmony import */ var _util_isNumeric__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(236);
30853/* harmony import */ var _util_isScheduler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(184);
30854/** PURE_IMPORTS_START tslib,_Subject,_scheduler_async,_Subscriber,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
30855
30856
30857
30858
30859
30860
30861function windowTime(windowTimeSpan) {
30862 var scheduler = _scheduler_async__WEBPACK_IMPORTED_MODULE_2__["async"];
30863 var windowCreationInterval = null;
30864 var maxWindowSize = Number.POSITIVE_INFINITY;
30865 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[3])) {
30866 scheduler = arguments[3];
30867 }
30868 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[2])) {
30869 scheduler = arguments[2];
30870 }
30871 else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[2])) {
30872 maxWindowSize = arguments[2];
30873 }
30874 if (Object(_util_isScheduler__WEBPACK_IMPORTED_MODULE_5__["isScheduler"])(arguments[1])) {
30875 scheduler = arguments[1];
30876 }
30877 else if (Object(_util_isNumeric__WEBPACK_IMPORTED_MODULE_4__["isNumeric"])(arguments[1])) {
30878 windowCreationInterval = arguments[1];
30879 }
30880 return function windowTimeOperatorFunction(source) {
30881 return source.lift(new WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler));
30882 };
30883}
30884var WindowTimeOperator = /*@__PURE__*/ (function () {
30885 function WindowTimeOperator(windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
30886 this.windowTimeSpan = windowTimeSpan;
30887 this.windowCreationInterval = windowCreationInterval;
30888 this.maxWindowSize = maxWindowSize;
30889 this.scheduler = scheduler;
30890 }
30891 WindowTimeOperator.prototype.call = function (subscriber, source) {
30892 return source.subscribe(new WindowTimeSubscriber(subscriber, this.windowTimeSpan, this.windowCreationInterval, this.maxWindowSize, this.scheduler));
30893 };
30894 return WindowTimeOperator;
30895}());
30896var CountedSubject = /*@__PURE__*/ (function (_super) {
30897 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CountedSubject, _super);
30898 function CountedSubject() {
30899 var _this = _super !== null && _super.apply(this, arguments) || this;
30900 _this._numberOfNextedValues = 0;
30901 return _this;
30902 }
30903 CountedSubject.prototype.next = function (value) {
30904 this._numberOfNextedValues++;
30905 _super.prototype.next.call(this, value);
30906 };
30907 Object.defineProperty(CountedSubject.prototype, "numberOfNextedValues", {
30908 get: function () {
30909 return this._numberOfNextedValues;
30910 },
30911 enumerable: true,
30912 configurable: true
30913 });
30914 return CountedSubject;
30915}(_Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]));
30916var WindowTimeSubscriber = /*@__PURE__*/ (function (_super) {
30917 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowTimeSubscriber, _super);
30918 function WindowTimeSubscriber(destination, windowTimeSpan, windowCreationInterval, maxWindowSize, scheduler) {
30919 var _this = _super.call(this, destination) || this;
30920 _this.destination = destination;
30921 _this.windowTimeSpan = windowTimeSpan;
30922 _this.windowCreationInterval = windowCreationInterval;
30923 _this.maxWindowSize = maxWindowSize;
30924 _this.scheduler = scheduler;
30925 _this.windows = [];
30926 var window = _this.openWindow();
30927 if (windowCreationInterval !== null && windowCreationInterval >= 0) {
30928 var closeState = { subscriber: _this, window: window, context: null };
30929 var creationState = { windowTimeSpan: windowTimeSpan, windowCreationInterval: windowCreationInterval, subscriber: _this, scheduler: scheduler };
30930 _this.add(scheduler.schedule(dispatchWindowClose, windowTimeSpan, closeState));
30931 _this.add(scheduler.schedule(dispatchWindowCreation, windowCreationInterval, creationState));
30932 }
30933 else {
30934 var timeSpanOnlyState = { subscriber: _this, window: window, windowTimeSpan: windowTimeSpan };
30935 _this.add(scheduler.schedule(dispatchWindowTimeSpanOnly, windowTimeSpan, timeSpanOnlyState));
30936 }
30937 return _this;
30938 }
30939 WindowTimeSubscriber.prototype._next = function (value) {
30940 var windows = this.windows;
30941 var len = windows.length;
30942 for (var i = 0; i < len; i++) {
30943 var window_1 = windows[i];
30944 if (!window_1.closed) {
30945 window_1.next(value);
30946 if (window_1.numberOfNextedValues >= this.maxWindowSize) {
30947 this.closeWindow(window_1);
30948 }
30949 }
30950 }
30951 };
30952 WindowTimeSubscriber.prototype._error = function (err) {
30953 var windows = this.windows;
30954 while (windows.length > 0) {
30955 windows.shift().error(err);
30956 }
30957 this.destination.error(err);
30958 };
30959 WindowTimeSubscriber.prototype._complete = function () {
30960 var windows = this.windows;
30961 while (windows.length > 0) {
30962 var window_2 = windows.shift();
30963 if (!window_2.closed) {
30964 window_2.complete();
30965 }
30966 }
30967 this.destination.complete();
30968 };
30969 WindowTimeSubscriber.prototype.openWindow = function () {
30970 var window = new CountedSubject();
30971 this.windows.push(window);
30972 var destination = this.destination;
30973 destination.next(window);
30974 return window;
30975 };
30976 WindowTimeSubscriber.prototype.closeWindow = function (window) {
30977 window.complete();
30978 var windows = this.windows;
30979 windows.splice(windows.indexOf(window), 1);
30980 };
30981 return WindowTimeSubscriber;
30982}(_Subscriber__WEBPACK_IMPORTED_MODULE_3__["Subscriber"]));
30983function dispatchWindowTimeSpanOnly(state) {
30984 var subscriber = state.subscriber, windowTimeSpan = state.windowTimeSpan, window = state.window;
30985 if (window) {
30986 subscriber.closeWindow(window);
30987 }
30988 state.window = subscriber.openWindow();
30989 this.schedule(state, windowTimeSpan);
30990}
30991function dispatchWindowCreation(state) {
30992 var windowTimeSpan = state.windowTimeSpan, subscriber = state.subscriber, scheduler = state.scheduler, windowCreationInterval = state.windowCreationInterval;
30993 var window = subscriber.openWindow();
30994 var action = this;
30995 var context = { action: action, subscription: null };
30996 var timeSpanState = { subscriber: subscriber, window: window, context: context };
30997 context.subscription = scheduler.schedule(dispatchWindowClose, windowTimeSpan, timeSpanState);
30998 action.add(context.subscription);
30999 action.schedule(state, windowCreationInterval);
31000}
31001function dispatchWindowClose(state) {
31002 var subscriber = state.subscriber, window = state.window, context = state.context;
31003 if (context && context.action && context.subscription) {
31004 context.action.remove(context.subscription);
31005 }
31006 subscriber.closeWindow(window);
31007}
31008//# sourceMappingURL=windowTime.js.map
31009
31010
31011/***/ }),
31012/* 343 */
31013/***/ (function(module, __webpack_exports__, __webpack_require__) {
31014
31015"use strict";
31016__webpack_require__.r(__webpack_exports__);
31017/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowToggle", function() { return windowToggle; });
31018/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
31019/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
31020/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(156);
31021/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(208);
31022/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(209);
31023/** PURE_IMPORTS_START tslib,_Subject,_Subscription,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
31024
31025
31026
31027
31028
31029function windowToggle(openings, closingSelector) {
31030 return function (source) { return source.lift(new WindowToggleOperator(openings, closingSelector)); };
31031}
31032var WindowToggleOperator = /*@__PURE__*/ (function () {
31033 function WindowToggleOperator(openings, closingSelector) {
31034 this.openings = openings;
31035 this.closingSelector = closingSelector;
31036 }
31037 WindowToggleOperator.prototype.call = function (subscriber, source) {
31038 return source.subscribe(new WindowToggleSubscriber(subscriber, this.openings, this.closingSelector));
31039 };
31040 return WindowToggleOperator;
31041}());
31042var WindowToggleSubscriber = /*@__PURE__*/ (function (_super) {
31043 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowToggleSubscriber, _super);
31044 function WindowToggleSubscriber(destination, openings, closingSelector) {
31045 var _this = _super.call(this, destination) || this;
31046 _this.openings = openings;
31047 _this.closingSelector = closingSelector;
31048 _this.contexts = [];
31049 _this.add(_this.openSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(_this, openings, openings));
31050 return _this;
31051 }
31052 WindowToggleSubscriber.prototype._next = function (value) {
31053 var contexts = this.contexts;
31054 if (contexts) {
31055 var len = contexts.length;
31056 for (var i = 0; i < len; i++) {
31057 contexts[i].window.next(value);
31058 }
31059 }
31060 };
31061 WindowToggleSubscriber.prototype._error = function (err) {
31062 var contexts = this.contexts;
31063 this.contexts = null;
31064 if (contexts) {
31065 var len = contexts.length;
31066 var index = -1;
31067 while (++index < len) {
31068 var context_1 = contexts[index];
31069 context_1.window.error(err);
31070 context_1.subscription.unsubscribe();
31071 }
31072 }
31073 _super.prototype._error.call(this, err);
31074 };
31075 WindowToggleSubscriber.prototype._complete = function () {
31076 var contexts = this.contexts;
31077 this.contexts = null;
31078 if (contexts) {
31079 var len = contexts.length;
31080 var index = -1;
31081 while (++index < len) {
31082 var context_2 = contexts[index];
31083 context_2.window.complete();
31084 context_2.subscription.unsubscribe();
31085 }
31086 }
31087 _super.prototype._complete.call(this);
31088 };
31089 WindowToggleSubscriber.prototype._unsubscribe = function () {
31090 var contexts = this.contexts;
31091 this.contexts = null;
31092 if (contexts) {
31093 var len = contexts.length;
31094 var index = -1;
31095 while (++index < len) {
31096 var context_3 = contexts[index];
31097 context_3.window.unsubscribe();
31098 context_3.subscription.unsubscribe();
31099 }
31100 }
31101 };
31102 WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31103 if (outerValue === this.openings) {
31104 var closingNotifier = void 0;
31105 try {
31106 var closingSelector = this.closingSelector;
31107 closingNotifier = closingSelector(innerValue);
31108 }
31109 catch (e) {
31110 return this.error(e);
31111 }
31112 var window_1 = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
31113 var subscription = new _Subscription__WEBPACK_IMPORTED_MODULE_2__["Subscription"]();
31114 var context_4 = { window: window_1, subscription: subscription };
31115 this.contexts.push(context_4);
31116 var innerSubscription = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_4__["subscribeToResult"])(this, closingNotifier, context_4);
31117 if (innerSubscription.closed) {
31118 this.closeWindow(this.contexts.length - 1);
31119 }
31120 else {
31121 innerSubscription.context = context_4;
31122 subscription.add(innerSubscription);
31123 }
31124 this.destination.next(window_1);
31125 }
31126 else {
31127 this.closeWindow(this.contexts.indexOf(outerValue));
31128 }
31129 };
31130 WindowToggleSubscriber.prototype.notifyError = function (err) {
31131 this.error(err);
31132 };
31133 WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
31134 if (inner !== this.openSubscription) {
31135 this.closeWindow(this.contexts.indexOf(inner.context));
31136 }
31137 };
31138 WindowToggleSubscriber.prototype.closeWindow = function (index) {
31139 if (index === -1) {
31140 return;
31141 }
31142 var contexts = this.contexts;
31143 var context = contexts[index];
31144 var window = context.window, subscription = context.subscription;
31145 contexts.splice(index, 1);
31146 window.complete();
31147 subscription.unsubscribe();
31148 };
31149 return WindowToggleSubscriber;
31150}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_3__["OuterSubscriber"]));
31151//# sourceMappingURL=windowToggle.js.map
31152
31153
31154/***/ }),
31155/* 344 */
31156/***/ (function(module, __webpack_exports__, __webpack_require__) {
31157
31158"use strict";
31159__webpack_require__.r(__webpack_exports__);
31160/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "windowWhen", function() { return windowWhen; });
31161/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
31162/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
31163/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(208);
31164/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(209);
31165/** PURE_IMPORTS_START tslib,_Subject,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
31166
31167
31168
31169
31170function windowWhen(closingSelector) {
31171 return function windowWhenOperatorFunction(source) {
31172 return source.lift(new WindowOperator(closingSelector));
31173 };
31174}
31175var WindowOperator = /*@__PURE__*/ (function () {
31176 function WindowOperator(closingSelector) {
31177 this.closingSelector = closingSelector;
31178 }
31179 WindowOperator.prototype.call = function (subscriber, source) {
31180 return source.subscribe(new WindowSubscriber(subscriber, this.closingSelector));
31181 };
31182 return WindowOperator;
31183}());
31184var WindowSubscriber = /*@__PURE__*/ (function (_super) {
31185 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WindowSubscriber, _super);
31186 function WindowSubscriber(destination, closingSelector) {
31187 var _this = _super.call(this, destination) || this;
31188 _this.destination = destination;
31189 _this.closingSelector = closingSelector;
31190 _this.openWindow();
31191 return _this;
31192 }
31193 WindowSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31194 this.openWindow(innerSub);
31195 };
31196 WindowSubscriber.prototype.notifyError = function (error, innerSub) {
31197 this._error(error);
31198 };
31199 WindowSubscriber.prototype.notifyComplete = function (innerSub) {
31200 this.openWindow(innerSub);
31201 };
31202 WindowSubscriber.prototype._next = function (value) {
31203 this.window.next(value);
31204 };
31205 WindowSubscriber.prototype._error = function (err) {
31206 this.window.error(err);
31207 this.destination.error(err);
31208 this.unsubscribeClosingNotification();
31209 };
31210 WindowSubscriber.prototype._complete = function () {
31211 this.window.complete();
31212 this.destination.complete();
31213 this.unsubscribeClosingNotification();
31214 };
31215 WindowSubscriber.prototype.unsubscribeClosingNotification = function () {
31216 if (this.closingNotification) {
31217 this.closingNotification.unsubscribe();
31218 }
31219 };
31220 WindowSubscriber.prototype.openWindow = function (innerSub) {
31221 if (innerSub === void 0) {
31222 innerSub = null;
31223 }
31224 if (innerSub) {
31225 this.remove(innerSub);
31226 innerSub.unsubscribe();
31227 }
31228 var prevWindow = this.window;
31229 if (prevWindow) {
31230 prevWindow.complete();
31231 }
31232 var window = this.window = new _Subject__WEBPACK_IMPORTED_MODULE_1__["Subject"]();
31233 this.destination.next(window);
31234 var closingNotifier;
31235 try {
31236 var closingSelector = this.closingSelector;
31237 closingNotifier = closingSelector();
31238 }
31239 catch (e) {
31240 this.destination.error(e);
31241 this.window.error(e);
31242 return;
31243 }
31244 this.add(this.closingNotification = Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_3__["subscribeToResult"])(this, closingNotifier));
31245 };
31246 return WindowSubscriber;
31247}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_2__["OuterSubscriber"]));
31248//# sourceMappingURL=windowWhen.js.map
31249
31250
31251/***/ }),
31252/* 345 */
31253/***/ (function(module, __webpack_exports__, __webpack_require__) {
31254
31255"use strict";
31256__webpack_require__.r(__webpack_exports__);
31257/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withLatestFrom", function() { return withLatestFrom; });
31258/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(151);
31259/* harmony import */ var _OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(208);
31260/* harmony import */ var _util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(209);
31261/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
31262
31263
31264
31265function withLatestFrom() {
31266 var args = [];
31267 for (var _i = 0; _i < arguments.length; _i++) {
31268 args[_i] = arguments[_i];
31269 }
31270 return function (source) {
31271 var project;
31272 if (typeof args[args.length - 1] === 'function') {
31273 project = args.pop();
31274 }
31275 var observables = args;
31276 return source.lift(new WithLatestFromOperator(observables, project));
31277 };
31278}
31279var WithLatestFromOperator = /*@__PURE__*/ (function () {
31280 function WithLatestFromOperator(observables, project) {
31281 this.observables = observables;
31282 this.project = project;
31283 }
31284 WithLatestFromOperator.prototype.call = function (subscriber, source) {
31285 return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));
31286 };
31287 return WithLatestFromOperator;
31288}());
31289var WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {
31290 tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](WithLatestFromSubscriber, _super);
31291 function WithLatestFromSubscriber(destination, observables, project) {
31292 var _this = _super.call(this, destination) || this;
31293 _this.observables = observables;
31294 _this.project = project;
31295 _this.toRespond = [];
31296 var len = observables.length;
31297 _this.values = new Array(len);
31298 for (var i = 0; i < len; i++) {
31299 _this.toRespond.push(i);
31300 }
31301 for (var i = 0; i < len; i++) {
31302 var observable = observables[i];
31303 _this.add(Object(_util_subscribeToResult__WEBPACK_IMPORTED_MODULE_2__["subscribeToResult"])(_this, observable, observable, i));
31304 }
31305 return _this;
31306 }
31307 WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
31308 this.values[outerIndex] = innerValue;
31309 var toRespond = this.toRespond;
31310 if (toRespond.length > 0) {
31311 var found = toRespond.indexOf(outerIndex);
31312 if (found !== -1) {
31313 toRespond.splice(found, 1);
31314 }
31315 }
31316 };
31317 WithLatestFromSubscriber.prototype.notifyComplete = function () {
31318 };
31319 WithLatestFromSubscriber.prototype._next = function (value) {
31320 if (this.toRespond.length === 0) {
31321 var args = [value].concat(this.values);
31322 if (this.project) {
31323 this._tryProject(args);
31324 }
31325 else {
31326 this.destination.next(args);
31327 }
31328 }
31329 };
31330 WithLatestFromSubscriber.prototype._tryProject = function (args) {
31331 var result;
31332 try {
31333 result = this.project.apply(this, args);
31334 }
31335 catch (err) {
31336 this.destination.error(err);
31337 return;
31338 }
31339 this.destination.next(result);
31340 };
31341 return WithLatestFromSubscriber;
31342}(_OuterSubscriber__WEBPACK_IMPORTED_MODULE_1__["OuterSubscriber"]));
31343//# sourceMappingURL=withLatestFrom.js.map
31344
31345
31346/***/ }),
31347/* 346 */
31348/***/ (function(module, __webpack_exports__, __webpack_require__) {
31349
31350"use strict";
31351__webpack_require__.r(__webpack_exports__);
31352/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return zip; });
31353/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(248);
31354/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
31355
31356function zip() {
31357 var observables = [];
31358 for (var _i = 0; _i < arguments.length; _i++) {
31359 observables[_i] = arguments[_i];
31360 }
31361 return function zipOperatorFunction(source) {
31362 return source.lift.call(_observable_zip__WEBPACK_IMPORTED_MODULE_0__["zip"].apply(void 0, [source].concat(observables)));
31363 };
31364}
31365//# sourceMappingURL=zip.js.map
31366
31367
31368/***/ }),
31369/* 347 */
31370/***/ (function(module, __webpack_exports__, __webpack_require__) {
31371
31372"use strict";
31373__webpack_require__.r(__webpack_exports__);
31374/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "zipAll", function() { return zipAll; });
31375/* harmony import */ var _observable_zip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(248);
31376/** PURE_IMPORTS_START _observable_zip PURE_IMPORTS_END */
31377
31378function zipAll(project) {
31379 return function (source) { return source.lift(new _observable_zip__WEBPACK_IMPORTED_MODULE_0__["ZipOperator"](project)); };
31380}
31381//# sourceMappingURL=zipAll.js.map
31382
31383
31384/***/ }),
31385/* 348 */,
31386/* 349 */
31387/***/ (function(module, exports, __webpack_require__) {
31388
31389"use strict";
31390
31391var __importDefault = (this && this.__importDefault) || function (mod) {
31392 return (mod && mod.__esModule) ? mod : { "default": mod };
31393};
31394Object.defineProperty(exports, "__esModule", { value: true });
31395var fast_glob_1 = __importDefault(__webpack_require__(53));
31396var os_1 = __importDefault(__webpack_require__(16));
31397var path_1 = __webpack_require__(15);
31398var rxjs_1 = __webpack_require__(147);
31399var operators_1 = __webpack_require__(250);
31400var vscode_uri_1 = __importDefault(__webpack_require__(132));
31401var fs_1 = __webpack_require__(36);
31402var constant_1 = __webpack_require__(2);
31403var util_1 = __webpack_require__(40);
31404var indexes = {};
31405var indexesFiles = {};
31406var queue = [];
31407var source$;
31408var gap = 100;
31409var count = 3;
31410var customProjectRootPatterns = constant_1.projectRootPatterns;
31411function initSource() {
31412 if (source$) {
31413 return;
31414 }
31415 source$ = new rxjs_1.Subject();
31416 source$.pipe(operators_1.concatMap(function (uri) {
31417 return rxjs_1.from(util_1.findProjectRoot(vscode_uri_1.default.parse(uri).fsPath, customProjectRootPatterns)).pipe(operators_1.switchMap(function (projectRoot) {
31418 return rxjs_1.from(util_1.getRealPath(projectRoot));
31419 }), operators_1.filter(function (projectRoot) { return projectRoot && projectRoot !== os_1.default.homedir(); }), operators_1.map(function (projectRoot) { return ({
31420 uri: uri,
31421 projectRoot: projectRoot,
31422 }); }));
31423 }), operators_1.filter(function (_a) {
31424 var projectRoot = _a.projectRoot;
31425 if (!indexes[projectRoot]) {
31426 indexes[projectRoot] = true;
31427 return true;
31428 }
31429 return false;
31430 }), operators_1.concatMap(function (_a) {
31431 var projectRoot = _a.projectRoot;
31432 var indexPath = path_1.join(projectRoot, "**/*.vim");
31433 return rxjs_1.from(fast_glob_1.default([indexPath, "!**/node_modules/**"])).pipe(operators_1.catchError(function (error) {
31434 process.send({
31435 msglog: [
31436 "Index Workspace Error: " + indexPath,
31437 "Error => " + (error.stack || error.message || error),
31438 ].join("\n"),
31439 });
31440 return rxjs_1.of(undefined);
31441 }), operators_1.filter(function (list) { return list && list.length > 0; }), operators_1.concatMap(function (list) {
31442 return rxjs_1.of.apply(void 0, list.sort(function (a, b) { return a.length - b.length; })).pipe(operators_1.filter(function (fpath) {
31443 if (!indexesFiles[fpath]) {
31444 indexesFiles[fpath] = true;
31445 return true;
31446 }
31447 return false;
31448 }), operators_1.mergeMap(function (fpath) {
31449 return rxjs_1.timer(gap).pipe(operators_1.concatMap(function () {
31450 var content = fs_1.readFileSync(fpath).toString();
31451 return rxjs_1.from(util_1.handleParse(content)).pipe(operators_1.filter(function (res) { return res[0] !== null; }), operators_1.map(function (res) { return ({
31452 node: res[0],
31453 uri: vscode_uri_1.default.file(fpath).toString(),
31454 }); }), operators_1.catchError(function (error) {
31455 process.send({
31456 msglog: fpath + ":\n" + (error.stack || error.message || error),
31457 });
31458 return rxjs_1.of(undefined);
31459 }));
31460 }));
31461 }, count));
31462 }));
31463 }), operators_1.filter(function (res) { return !!res; })).subscribe(function (res) {
31464 process.send({
31465 data: res,
31466 });
31467 }, function (error) {
31468 process.send({
31469 msglog: error.stack || error.message || error,
31470 });
31471 });
31472 if (queue.length) {
31473 queue.forEach(function (uri) {
31474 source$.next(uri);
31475 });
31476 queue = [];
31477 }
31478}
31479process.on("message", function (mess) {
31480 var uri = mess.uri, config = mess.config;
31481 if (uri) {
31482 if (source$) {
31483 source$.next(uri);
31484 }
31485 else {
31486 queue.push(uri);
31487 }
31488 }
31489 if (config) {
31490 if (config.gap !== undefined) {
31491 gap = config.gap;
31492 }
31493 if (config.count !== undefined) {
31494 count = config.count;
31495 }
31496 if (config.projectRootPatterns !== undefined) {
31497 customProjectRootPatterns = config.projectRootPatterns;
31498 }
31499 initSource();
31500 }
31501});
31502
31503
31504/***/ })
31505/******/ ])));
\No newline at end of file